second: fix it so we reload music at the right place

This commit is contained in:
Vince Weaver 2023-10-29 21:49:45 -04:00
parent dd822670a6
commit 96ed5257b1
4 changed files with 55 additions and 3 deletions

View File

@ -202,7 +202,7 @@ tunnel2_data:
.incbin "graphics/tunnel2_cropped.hgr.zx02"
; object is 15 wide
; object is roughly 15 wide?
; this is a triangle pattern
; we could reverse at some point

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

View File

@ -116,5 +116,6 @@ mb_patch_oflo:
bne mb_patch_loop
mb_patch_done:
stx MB_ADDR_H ; restore slot for later
rts

View File

@ -34,7 +34,7 @@ restart:
bit $C083
bit $C083
lda #0
lda #0 ; load MUSIC_INTRO from disk
sta WHICH_LOAD
jsr load_file
@ -148,12 +148,63 @@ load_program_loop:
;=======================
;=======================
sei ; stop music interrupts
jsr clear_ay_both ; stop from making noise
; load music
lda #1 ; MUSIC_MAIN
sta WHICH_LOAD
jsr load_file
; load from disk
lda #3 ; chess
lda #3 ; CHESS
sta WHICH_LOAD
jsr load_file
; restart music
;============================
; Re-Init the Mockingboard
;============================
; NOTE: I don't know how much of this is actually necessary
; wasted a lot of time debugging, leaving it as-is
; as it seems to be working
lda #0
sta DONE_PLAYING
lda #1
sta LOOP
;========================
; patch mockingboard
jsr mockingboard_patch ; patch to work in slots other than 4?
jsr mockingboard_init
;=======================
; Set up 50Hz interrupt
;========================
jsr mockingboard_setup_interrupt
jsr reset_ay_both
jsr clear_ay_both
;==================
; init song
;==================
jsr pt3_init_song
cli ; start interrupts
;=======================
;=======================
; Run Chess