Code: Select all
AND #~SPR_VFLIP
My best guess is that the ~ operator returns a word instead of a byte, so I have to specifically state that I want the low byte?
Code: Select all
AND #<~SPR_VFLIP
Moderator: Moderators
Code: Select all
AND #~SPR_VFLIP
Code: Select all
AND #<~SPR_VFLIP
thefox wrote:Compare your ROM to the original SMB3 ROM. There are many ways to do this depending on your operating system. In Windows you can use fc /b on the command line. HxD hex editor can also do file comparisons (Analysis -> File-compare).
Once you find where the difference is, you just need to locate the same code in the assembly code and see what's going wrong. FCEUX debugger might come handy when doing this.
I think it would be a good idea to fix those places so you get a byte-per-byte equivalent output. Unfortunately IIRC ASM6 doesn't have a way to override zeropage addressing, so you might have to resort to creating some special macros (maybe something like LDA_ABS).Drakim wrote:And, a zero page access LDA is 2 bytes in size, while an absolute access LDA is 3 bytes in size. This means ALL bytes afterwards is gonna be offset. This makes comparing byte for byte between the two roms is nearly impossible.
Code: Select all
LDA #((KingToad_Sprites_End - KingToad_Sprites - 1) & ~3)