| ← B803 | Map | B873 → |
B85A: Sound effect: name-entry cursor move
|
The blip that marks each cursor step along the name-entry strip. Its pitch follows the cursor index.
|
||||
|
|
||||
| sfx_name_cursor | B85A | PUSH BC | Preserve the caller's AF, BC and DE. | |
| B85B | PUSH DE | |||
| B85C | PUSH AF | |||
| B85D | LD A,(name_entry_cursor) | Read the name-entry cursor index. | ||
| B860 | CPL | The cursor's position along the strip sets the pitch, one value per cell. | ||
| B861 | ADD A,A | |||
| B862 | LD C,A | |||
| B863 | ADD A,A | |||
| B864 | ADD A,C | |||
| B865 | LD D,A | |||
| B866 | LD C,$0A | Fixed burst length | ||
| sfx_name_cursor_loop | B868 | CALL sound_blip | Emit one square-wave cycle at the current pitch. | |
| B86B | DEC D | Step the period across the burst. | ||
| B86C | DEC C | |||
| B86D | JR NZ,sfx_name_cursor_loop | |||
| B86F | POP AF | Hand the caller's registers back. | ||
| B870 | POP DE | |||
| B871 | POP BC | |||
| B872 | RET | |||
| ← B803 | Map | B873 → |
