| SMW Sprite disassembly project |
|
Forum Index - SMW Hacking - General SMW Hacking Help - ASM & Related Topics - SMW Sprite disassembly project |
|
|
|
|
| Posted on 2011-10-15 03:05:45 PM |
Link | Quote |
|
Originally posted by KilloZapit
Woah, that has a lot of data tables. Honestly though, you seem to disassemble a heck of a lot of stuff that I would think would be better left to the original code, like the powerup stuff in the yoshi disassembly. But it is a full disassembly, so yeah.
The goal was to fully disassemble the sprites, so shortcuts were not on my to do list. Almost none of this code is useful to spriters other than maybe some yoshi routines. Beyond that these are just for show so to speak to say that we have them.
EDIT: Finished the bonus game. bonus.asm is sprite 82. This one is fully commented and I will probably submit it later today.
EDIT2: disassembled the bubble sprite. bubble.asm is sprite 9D. This one is not yet commented.
|
| Last edited on 2011-10-17 01:39:13 AM by p4plus2. |
|
| Posted on 2012-03-17 01:55:30 PM |
Link | Quote |
|
So this is what the mysterious new empty forum section is for... (right?)
Anyway, how do I disassemble a sprite? Do I just take a good look at the ROM in a hex editor, wait for the light bulb to turn on, and start playing with it? (JK) What program do I use?
|
| Last edited on 2012-03-17 01:57:25 PM by Roads1. |
|
| Posted on 2012-03-17 03:03:43 PM |
Link | Quote |
|
|
Get all.log from the Tools section, find the code for the sprite you want to disassemble, and fix up the syntax so that it can be assembled and inserted with Spritetool. Commenting the code is optional, but very much preferred.
|
|
| Posted on 2012-03-17 03:34:13 PM |
Link | Quote |
|
1. How do I find the code? I have no idea what I'm looking for other than the fact that it forms sprites F6 to FF (yeah, I want to do them for my practice even though they crash the game).
2. How do I fix up the syntax too? Do I just copy the code out and isolate it?
|
| Last edited on 2012-03-17 03:34:27 PM by Roads1. |
|
| Posted on 2012-03-17 03:41:59 PM |
Link | Quote |
|
1. Use ctrl+f.
2. Just fix it so it will assemble in xkas/asar. If you want to know WHAT to fix assemble it as is and it will give you a list of errors to fix.
|
| Last edited on 2012-03-17 03:42:26 PM by wiiqwertyuiop. |
|
| Posted on 2012-03-17 03:45:40 PM |
Link | Quote |
|
Originally posted by Roads11. How do I find the code?
Originally posted by all.logCallSpriteInit: A9 08 LDA.B #$08 ; \ Sprite status = Normal
CODE_018174: 9D C8 14 STA.W $14C8,X ; /
CODE_018177: B5 9E LDA RAM_SpriteNum,X
CODE_018179: 22 DF 86 00 JSL.L ExecutePtr
SpriteInitPtr: 75 85 .dw InitStandardSprite ; 00 - Green Koopa, no shell
75 85 .dw InitStandardSprite ; 01 - Red Koopa, no shell
75 85 .dw InitStandardSprite ; 02 - Blue Koopa, no shell
75 85 .dw InitStandardSprite ; 03 - Yellow Koopa, no shell
75 85 .dw InitStandardSprite ; 04 - Green Koopa
[...]
CallSpriteMain: 9C 91 14 STZ.W $1491 ; CallSpriteMain
CODE_0185C6: B5 9E LDA RAM_SpriteNum,X
CODE_0185C8: 22 DF 86 00 JSL.L ExecutePtr
SpriteMainPtr: 04 89 .dw ShellessKoopas ; 00 - Green Koopa, no shell
04 89 .dw ShellessKoopas ; 01 - Red Koopa, no shell
04 89 .dw ShellessKoopas ; 02 - Blue Koopa, no shell
04 89 .dw ShellessKoopas ; 03 - Yellow Koopa, no shell
FC 8A .dw Spr0to13Start ; 04 - Green Koopa
Here's the pointers.
Quotesprites F6 to FF (yeah, I want to do them for my practice even though they crash the game)
There is no code for them. Using sprite F4 tries reading outside some random table, jumps to a location that is not code, and crashes. Disassemble sprites 12 or 36 instead; they have code pointers.
Quote2. How do I fix up the syntax too? Do I just copy the code out and isolate it?
Edit it until it assembles.
|
|
|
|
|
|
|
Forum Index - SMW Hacking - General SMW Hacking Help - ASM & Related Topics - SMW Sprite disassembly project |