Guides:Coin Case ACE: Difference between revisions

Jump to navigation Jump to search
Content deleted Content added
TimoVM (talk | contribs)
TimoVM (talk | contribs)
Line 143: Line 143:
D6 FD sub $FD ; set a to $03.
D6 FD sub $FD ; set a to $03.
E0 9F ld (hRomBank), a; Set current ROM bank to bank 3. This ROM bank contains item and pack data and ensures safe return.
E0 9F ld (hRomBank), a; Set current ROM bank to bank 3. This ROM bank contains item and pack data and ensures safe return.
E8 FF add sp, $FF ; $FF is interpreted as a singed integer, stack pointer gets decremented and the stack is now properly aligned again
E8 FF add sp, $FF ; $FF is interpreted as a singed integer, stack pointer gets decremented and the stack is now properly aligned again.
D1 pop de
D1 pop de
D1 pop de
D1 pop de
D1 pop de ; Pop text command related addresses so that returning from ACE execution will resume normal game operation
D1 pop de ; Pop text command related addresses so that returning from ACE execution will resume normal game operation.
AF xor a ; Set a to $00, set carry flag to 0
AF xor a ; Set a to $00, set carry flag to 0.
D2 B9 F8 jp nc, $F8B9 ; Jump to echo ram copy of $D8B9, which lies a few bytes before box data
D2 B9 F8 jp nc, $F8B9 ; Jump to echo ram copy of $D8B9, which lies a few bytes before box data.
</pre>
</pre>