Jump to content

Guides:Fast 0x1500 ACE: Difference between revisions

m
Line 488:
E1 pop hl ; hl = $F500
E6 EF and $F5 ; a = $E5
84 add a, h ; af = $DA10
F5 push af
50 ld d, b
Line 497:
D0 ret nc ; On first pass, ignored. Taken whenever $DB7F is called
D6 B9 sub $B9 ; a = $21
EA 81 FB ld ($FB81), a
50 ld d, b
 
Box 3: $DB87
D6 FF sub $FF ; a = $22
EA 7F FB ld ($FB7F), a
D6 F4 sub $F4 ; a = $2E
85 add a, l ; a = $3E, reset carry flag
50 ld d, b
 
Box 4: $DB90
D4 7F FB call nc, $FB7F
E6 84 and $84 ; a = $04
D4 7F FB call nc, $FB7F
50 ld d, b
 
Box 5: $DB99
D6 D4 sub $D4 ; a = $30
EA 89 FB ld ($FB89), a
D6 FE sub $FE ; a = $32
FB ei
Line 521:
 
Box 6: $DBA2
EA 85 FB ld ($FB85), a
D6 F1 sub $F1 ; a = $41
EA 88 FB ld ($FB88), a
50 ld d, b
 
Box 7: $DBAB
F6 82 or $82 ; a = $C3, reset carry flag
D4 7F FB call nc, $FB7F
EA 87 FB ld ($FB87), a
50 ld d, b
 
Box 8: $DBB4
AF xor a ; a = $00
EA 86 FB ld ($FB86), a
F5 push af
D6 A7 sub $A7 ; a = $59
Line 541:
 
Box 9: $DBBD
D4 7F FB call nc, $FB7F
EA 82 FB ld ($FB82), a
D6 81 sub $81 ; a = $D8
50 ld d, b
Line 548:
Box 10: $DBC6
A7 and a ; Reset carry flag
D4 7F FB call nc, $FB7F
EA 83 FB ld ($FB83), a
F1 pop af ; a = $00
50 ld d, b
Line 555:
Box 11: $DBCF
D6 FF sub $FF ; a = $01
EA 84 FB ld ($FB84), a
E1 pop hl ; first of two pops to prevent side effects of 0x1500 ACE
F6 FF or $FF ; a = $FF
Line 561:
 
Box 12: $DBD8
D4 81 FB call nc, $FB81 ; $FB81 was rewritten to 21 59 D8 01 32 00 C3 41 30
EA 82 FB ld ($FB82), a ; Replace $59 by $FF to prevent possible crash when viewing $59 as text
E1 pop hl ; second of two pops to prevent side effects of 0x1500 ACE
D6 50 sub $50 ; a = $AF
 
Box 13: $DBE1
D6 E1 sub $E1 ; a = $CE
EA 93 F8 ld (wItems), a ; Replace first item in item pocket with TM15
A7 and a ; Reset carry flag
D0 ret nc
1,540

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.