Users browsing this thread: 1 Guest(s)
terra's magitek
I think this is what I would do.
At C1/4D4B, do a JSR to some free space (like at C1/FFE5, although there isn't much there to work with; if this is already used or not enough space, a JSL may be needed, although that uses one more byte than JSR so it would probably go best at C1/4D4A).
Then, at whatever free space you jumped to:
This can be expanded to include other characters, of course, or use BCC/BCS (instead of BNE) to check a range of characters instead of checking them individually.
At C1/4D4B, do a JSR to some free space (like at C1/FFE5, although there isn't much there to work with; if this is already used or not enough space, a JSL may be needed, although that uses one more byte than JSR so it would probably go best at C1/4D4A).
Then, at whatever free space you jumped to:
Code:
LDA $2EAE,Y (displaced code; if you JSL'd from C1/4D4A, you would need a TAY before this instruction)
BEQ $05 (Branch if the character is Terra)
CMP #$03
BNE $01 (Branch if the character is not Shadow)
TDC (zero A; this will ensure the branch at C1/4D4E is not taken when we return)
RTS (or RTL if you JSL'd instead)
This can be expanded to include other characters, of course, or use BCC/BCS (instead of BNE) to check a range of characters instead of checking them individually.
« Next Oldest | Next Newest »
|
||||
Users browsing this thread: 1 Guest(s)