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