Skip to content

Commit

Permalink
Revert "Only copy the z80 driver at startup"
Browse files Browse the repository at this point in the history
This reverts commit 98f717a.
  • Loading branch information
viciious committed Aug 24, 2023
1 parent 9662f77 commit 10a76b9
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src-md/crt0.s
Original file line number Diff line number Diff line change
Expand Up @@ -654,6 +654,14 @@ start_music:
move.l d0,(a0)+ /* clear work ram used by FM driver */
dbra d1,2b

lea z80_vgm_start,a0
lea z80_vgm_end,a1
lea 0xA00000,a2
3:
move.b (a0)+,(a2)+ /* copy Z80 driver */
cmpa.l a0,a1
bne.b 3b

| FM setup
movea.l vgm_ptr,a6 /* lzss buffer */
lea 0x1C(a6),a6 /* loop offset */
Expand Down Expand Up @@ -855,6 +863,14 @@ stop_music:
move.l d0,(a0)+ /* clear work ram used by FM driver */
dbra d1,1b

lea z80_vgm_start,a0
lea z80_vgm_end,a1
lea 0xA00000,a2
2:
move.b (a0)+,(a2)+ /* copy Z80 driver */
cmpa.l a0,a1
bne.b 2b

move.w #0x0000,0xA11200 /* Z80 assert reset */

move.w #0x0000,0xA11100 /* Z80 deassert bus request */
Expand Down

0 comments on commit 10a76b9

Please sign in to comment.