Debugging misaligned read/write Or how to get your hack to work on Regen/Kega/real hardware
#16
Posted 18 February 2012 - 08:14 PM
#17
Posted 18 February 2012 - 08:23 PM
"But it's always an even number of bytes! I don't NEED to put an 'even' after it!!"
DO IT ANYWAY!!
#18
Posted 18 February 2012 - 09:05 PM
Chilly Willy, on 18 February 2012 - 08:23 PM, said:
This is more-or-less what I have been doing myself. But I still get the (increasingly less frequent) address error for other causes -- for example, the case I mentioned where an object calling DisplaySprite first and then calling DeleteObject afterwards due to its logic. Interestingly, I find that this is usually an S1 object.
#19
Posted 19 February 2012 - 06:20 AM
flamewing, on 18 February 2012 - 08:14 PM, said:
I put "build -g MAP", then triggered the error, but no s2.map (or s2built.map) was created.
Chilly Willy, on 18 February 2012 - 08:23 PM, said:
"But it's always an even number of bytes! I don't NEED to put an 'even' after it!!"
DO IT ANYWAY!!
I know you're meant to put it after all bytes like dc.b's and etc, but does that include all BINCLUDES and INCLUDES? Like:
; word_1E5A: word_1E7A: BINCLUDE "art/palettes/EHZ ARZ Water.bin"; Emerald Hill/Aquatic Ruin Rotating Water palette even word_1E9A: BINCLUDE "art/palettes/Hill Top Lava.bin"; Hill Top Lava palette even word_1F1A: BINCLUDE "art/palettes/Wood Conveyor.bin"; Wood Conveyor Belts palette even byte_1F2A: BINCLUDE "art/palettes/MTZ Cycle 1.bin"; Metropolis Cycle #1 palette even
Or
; word_1E5A: word_1E7A: BINCLUDE "art/palettes/EHZ ARZ Water.bin"; Emerald Hill/Aquatic Ruin Rotating Water palette word_1E9A: BINCLUDE "art/palettes/Hill Top Lava.bin"; Hill Top Lava palette word_1F1A: BINCLUDE "art/palettes/Wood Conveyor.bin"; Wood Conveyor Belts palette byte_1F2A: BINCLUDE "art/palettes/MTZ Cycle 1.bin"; Metropolis Cycle #1 palette even
#20
Posted 19 February 2012 - 07:24 AM
redhotsonic, on 19 February 2012 - 06:20 AM, said:
Then you are putting it in the wrong place. Where you are supposed to put the "-g MAP" is in this line in build.bat:
"win32/asw" -xx -c -A s2.asm
It should look like this:
"win32/asw" -xx -c -g MAP -A s2.asm
(the line is different in the Hg disassembly, by the way)
redhotsonic, on 19 February 2012 - 06:20 AM, said:
Ideally, it must also be placed after all bincludes; also, after every include that has anything other than code (but if you are paranoid, even if it only has code).
#21
Posted 19 February 2012 - 07:41 AM
#22
Posted 19 February 2012 - 07:53 AM
ILLEGAL
Is the most common to use, you can always do stuff such as:
movea.w #$0001,a0 jmp (a0)
To cause address errors.
#23
Posted 19 February 2012 - 08:02 AM
#24
Posted 19 February 2012 - 08:10 AM
Edit: nevermind, it can't be this.
#25
Posted 19 February 2012 - 08:14 AM
#26
Posted 19 February 2012 - 08:15 AM
Edit: done.
#29
Posted 20 February 2012 - 06:38 AM
word_1E7A: BINCLUDE "art/palettes/EHZ ARZ Water.bin"; Emerald Hill/Aquatic Ruin Rotating Water palette even
OR
even word_1E7A: BINCLUDE "art/palettes/EHZ ARZ Water.bin"; Emerald Hill/Aquatic Ruin Rotating Water palette
Second question. There are a lot of align commands. Mainly "align 4" Then there's a few "align 100" and "align 200" and with Sonic and Tails, etc, "align $20000". Should these be replaced with even or should be left alone?
#30
Posted 20 February 2012 - 09:50 AM

31