Guides:Fast 0x1500 ACE: Difference between revisions
Jump to navigation
Jump to search
Content added Content deleted
Line 489: | Line 489: | ||
E6 EF and $EF ; a = $E5 |
E6 EF and $EF ; a = $E5 |
||
84 add a, h ; af = $DA10 |
84 add a, h ; af = $DA10 |
||
E1 pop hl |
|||
50 ld d, b |
50 ld d, b |
||
Box 2: $DB7E |
Box 2: $DB7E |
||
F5 push af |
|||
⚫ | |||
E1 pop hl ; hl = $DA10, overwritten to $22, ldi (hl), a |
|||
D0 ret nc ; On first pass, ignored. Taken whenever $DB7F is called |
D0 ret nc ; On first pass, ignored. Taken whenever $DB7F is called |
||
D6 B9 sub $B9 ; a = $21 |
D6 B9 sub $B9 ; a = $21 |
||
Line 569: | Line 569: | ||
D6 E1 sub $E1 ; a = $CE |
D6 E1 sub $E1 ; a = $CE |
||
EA 93 F8 ld (wItems), a ; Replace first item in item pocket with TM15 |
EA 93 F8 ld (wItems), a ; Replace first item in item pocket with TM15 |
||
AF xor a ; a = $00 |
|||
85 add a, l |
|||
F7 rst30h ; Resume text function, immediately hit terminator |
|||
FB ei |
|||
50 ld d, b |
50 ld d, b |
||
Line 596: | Line 596: | ||
E6 E5 and $E5 ; a = $E5 |
E6 E5 and $E5 ; a = $E5 |
||
84 add a, h ; af = $DA10 |
84 add a, h ; af = $DA10 |
||
E1 pop hl |
|||
50 ld d, b |
50 ld d, b |
||
Box 2: $DB7E |
Box 2: $DB7E |
||
F5 push af |
|||
⚫ | |||
E1 pop hl ; hl = $DA10, overwritten to $22, ldi (hl), a |
|||
D0 ret nc ; On first pass, ignored. Taken whenever $DB7F is called |
D0 ret nc ; On first pass, ignored. Taken whenever $DB7F is called |
||
D6 B9 sub $B9 ; a = $21 |
D6 B9 sub $B9 ; a = $21 |
||
Line 676: | Line 676: | ||
D6 E1 sub $E1 ; a = $CE |
D6 E1 sub $E1 ; a = $CE |
||
EA 93 F8 ld (wItems), a ; Replace first item in item pocket with TM15 |
EA 93 F8 ld (wItems), a ; Replace first item in item pocket with TM15 |
||
AF xor a ; a = $00 |
|||
85 add a, l |
|||
F7 rst30h ; Resume text function, immediately hit terminator |
|||
FB ei |
|||
50 ld d, b |
50 ld d, b |
||
Line 703: | Line 703: | ||
E6 E5 and $E5 ; a = $E5 |
E6 E5 and $E5 ; a = $E5 |
||
84 add a, h ; af = $DA10 |
84 add a, h ; af = $DA10 |
||
E1 pop hl |
|||
50 ld d, b |
50 ld d, b |
||
Box 2: $DB7E |
Box 2: $DB7E |
||
F5 push af |
|||
⚫ | |||
E1 pop hl ; hl = $DA10, overwritten to $22, ldi (hl), a |
|||
D0 ret nc ; On first pass, ignored. Taken whenever $DB7F is called |
D0 ret nc ; On first pass, ignored. Taken whenever $DB7F is called |
||
D6 B9 sub $B9 ; a = $21 |
D6 B9 sub $B9 ; a = $21 |
||
Line 783: | Line 783: | ||
D6 E1 sub $E1 ; a = $CE |
D6 E1 sub $E1 ; a = $CE |
||
EA 93 F8 ld (wItems), a ; Replace first item in item pocket with TM15 |
EA 93 F8 ld (wItems), a ; Replace first item in item pocket with TM15 |
||
AF xor a ; a = $00 |
|||
85 add a, l |
|||
F7 rst30h ; Resume text function, immediately hit terminator |
|||
FB ei |
|||
50 ld d, b |
50 ld d, b |
||
Line 973: | Line 973: | ||
Box 7: $D8AC |
Box 7: $D8AC |
||
E1 pop hl |
E1 pop hl |
||
⚫ | |||
A7 and a ; Reset carry flag |
|||
⚫ | |||
D0 call nc |
|||
85 add a, l |
|||
F7 rst30h ; Resume text function, immediately hit terminator |
|||
Box 14: displayed as screen tiles at $C4BE |
Box 14: displayed as screen tiles at $C4BE |
||
Line 999: | Line 1,001: | ||
Box 2: $DB7E |
Box 2: $DB7E |
||
D6 B8 sub $B8 ; a = $22 |
D6 B8 sub $B8 ; a = $22 |
||
EA |
EA A8 FB ld (.write), a |
||
85 add a, l ; a = $32 |
85 add a, l ; a = $32 |
||
D6 F4 sub $F4 ; a = $3E |
D6 F4 sub $F4 ; a = $3E |
||
Line 1,005: | Line 1,007: | ||
Box 3: $DB87 |
Box 3: $DB87 |
||
CD |
CD A8 FB call .write |
||
C6 C6 add $C6 ; a = $04 |
C6 C6 add $C6 ; a = $04 |
||
CD |
CD A8 FB call .write |
||
50 ld d, b |
50 ld d, b |
||
Box 4: $DB90 |
Box 4: $DB90 |
||
C6 BF add $BF ; a = $C3 |
C6 BF add $BF ; a = $C3 |
||
CD |
CD A8 FB call .write |
||
FB ei |
FB ei |
||
C6 96 add $96 ; a = $59 |
C6 96 add $96 ; a = $59 |
||
Line 1,018: | Line 1,020: | ||
Box 5: $DB99 |
Box 5: $DB99 |
||
CD |
CD A8 FB call .write |
||
C6 7F add $7F ; a = $D8 |
C6 7F add $7F ; a = $D8 |
||
CD |
CD A8 FB call .write |
||
50 ld d, b |
50 ld d, b |
||
Line 1,026: | Line 1,028: | ||
E1 pop hl |
E1 pop hl |
||
E1 pop hl ; Prevent side effects when returning to text printer |
E1 pop hl ; Prevent side effects when returning to text printer |
||
E1 pop hl |
|||
C9 ret |
|||
⚫ | |||
85 add a, l |
|||
F7 rst30h ; Resume text function, immediately hit terminator |
|||
22 ldi (hl), a ; .write |
22 ldi (hl), a ; .write |
||
C9 ret |
C9 ret |