| Chase H.Q. | Routines |
| Prev: F7EF | Up: Map | Next: F82F |
|
Almost the same as EE6E
|
||||
|
Keep playing current pattern until this counter becomes zero.
|
||||
| bank7_next_pattern | F7FF | LD A,$00 | Load number of pattern repetitions. Self modified by F80F below. | |
| F801 | DEC A | Decrease | ||
| F802 | LD ($F311),A | Self modify bank7_next_pattern above | ||
| F805 | RET NZ | Return if non-zero | ||
| b7np_next | F806 | LD HL,$0000 | Load address of current pattern. Self modified by F814 below. | |
| b7np_start_at_hl | F809 | LD A,(HL) | Read new repetition count | |
| F80A | INC HL | |||
| F80B | CP $FF | Jump to b7np_restart if it's $FF (end of patterns) | ||
| F80D | JR Z,b7np_restart | |||
| F80F | LD ($F311),A | Self modify bank7_next_pattern above with new repetition count | ||
| F812 | LD C,(HL) | Read music data offset | ||
| F813 | INC HL | |||
| F814 | LD ($F318),HL | Self modify b7np_next above (pattern addr) | ||
|
Calculate address of music data.
|
||||
| F817 | LD B,$00 | BC = C | ||
| F819 | LD HL,$F553 | Load address of base of music data | ||
| F81C | ADD HL,BC | Combine with offset | ||
| F81D | LD A,(HL) | A = *HL++ -- load first byte of music data | ||
| F81E | INC HL | |||
| F81F | LD ($F362),A | Self modify b7pm_delay_complete (delay reload, first byte of pattern) | ||
| F822 | LD ($F356),A | Self modify b7pm_delay_1 (delay counter, first byte of pattern) | ||
| F825 | LD ($F372),HL | Self modify b7pm_reset_pattern (addr of second music data byte in pattern) | ||
| F828 | RET | Return | ||
| b7np_restart | F829 | LD A,(HL) | HL = wordat(HL); HL++ | |
| F82A | INC HL | |||
| F82B | LD H,(HL) | |||
| F82C | LD L,A | |||
| F82D | JR b7np_start_at_hl | Jump to b7np_start_at_hl | ||
| Prev: F7EF | Up: Map | Next: F82F |