It is currently Tue Dec 18, 2018 11:51 am

All times are UTC - 7 hours





Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: Sat Sep 29, 2018 11:44 pm 
Offline
User avatar

Joined: Thu Jan 19, 2006 5:08 pm
Posts: 754
For example, the disassembly for "Super Mario Bros. 2 (U) [PRG0]" (currently updated by a user named "kmck" on Github), as well as the disassembly for "Super Mario Bros. 3 (U) [PRG1]" by Southbird, currently has an array of:
Code:
.dsb 256
also known as:
Code:
.res 256
making sprites not portable to any other semi-compatible system, with some work, such as SNES or PC-Engine...

That part was the easy part, The Stupid things I hate most that the disassembly: is that the sprites are supposed to be something like this (on the NES/Famicom):

Code:
;Taken from SMBDIS
.enum $0200
Sprites_Y_Position: .dsb 1
Sprites_TileNumber: .dsb 1
Sprites_Attributes: .dsb 1
Sprites_X_Position: .dsb 1
.ende


The thing was to replace every "sprite DMA" store and load ($02xx) to all those, but I need a favor, In order to fork both disassemblies (or/and submit them to the author's cache of submissions/addenums) I need a special editor suggestion to try to get these done, If not, This may hurt...

Just so you know, There ARE LOTS of entrys for these sprite DMA things...

Thanks.

_________________
AKA SmilyMZX/AtariHacker.


Top
 Profile  
 
PostPosted: Sun Sep 30, 2018 7:41 am 
Offline

Joined: Wed Aug 16, 2017 12:15 am
Posts: 50
I didn't really get what you're looking for, but you can do surprisingly much with a text editor that can search&replace regular expressions (e.g. Notepad++).

For example, to replace any lda instruction followed by an sta instruction with ldx and stx, respectively, replace (.*)lda(.*\r?\n.*)sta(.*) with \1ldx\2stx\3 (assuming . doesn't match newlines).


Top
 Profile  
 
PostPosted: Sun Sep 30, 2018 12:36 pm 
Offline
User avatar

Joined: Thu Jan 19, 2006 5:08 pm
Posts: 754
These disassemblies are using the wrong formatting conventions, This is an example of what was done for both:

Code Snippet 2 - RAM:
Code:
;OAM RAM
.enum $0200
SpriteDMAArea: .dsb 256
.ende


Code Snippet 2 - ROM:
Code:
;... [Code here] ...
sta SpriteDMAArea,y ; Y position
;... [And here] ...
sta SpriteDMAArea+3,y ; X position
;... [Tile code here] ...
sta SpriteDMAArea+1,y ; Tile
;... [Attribute code here] ...
sta SpriteDMAArea+2,y ; Attributes
;... [Continue code here] ...


They just have to be reformatted to new names, Simply to make things better to understand.

_________________
AKA SmilyMZX/AtariHacker.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC - 7 hours


Who is online

Users browsing this forum: Bing [Bot] and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group