diff --git a/asm_routines/dos33_routines.s b/asm_routines/dos33_routines.s index 8cc0ab70..160bdcc8 100644 --- a/asm_routines/dos33_routines.s +++ b/asm_routines/dos33_routines.s @@ -72,6 +72,7 @@ filename_pad_spaces: cpy #30 ; fill 30 bytes bne filename_pad_spaces +filename_pad_done: ldy #8 ; filename ptr offset = 8 lda #read_size sta (FILEML),y @@ -258,7 +284,7 @@ dos33_read: lda #>disk_buff sta (FILEML),y - bne filemanager_interface ; same as JMP + jmp filemanager_interface filename: ; OUT.0 diff --git a/chiptune_player/README.chiptune b/chiptune_player/README.chiptune index 1cc76fdf..5cb355e1 100644 --- a/chiptune_player/README.chiptune +++ b/chiptune_player/README.chiptune @@ -342,3 +342,8 @@ Thought it only took 1s max? Not in face of interrupts. TIME_TAKEN ($88) stores how long took to decode INTRO2: 60@19, 60@36, 62@50 61@1:03 61@1:32 60@2:05 61@2:32 + ++ Our old friend, forget the # so we're comparing against some random + zero page value rather than a constsant + ++ Related, the accidentally put in a $ when I meant for it to be decimal. diff --git a/chiptune_player/chiptune_player.s b/chiptune_player/chiptune_player.s index 9bb0a456..e9810ace 100644 --- a/chiptune_player/chiptune_player.s +++ b/chiptune_player/chiptune_player.s @@ -132,18 +132,19 @@ mockingboard_found: jsr new_song +; jsr increment_file ; debug +; jsr new_song + +; cli + - lda #UNPACK_BUFFER - sta INH ;============================ ; Enable 6502 interrupts ;============================ - ;cli ; clear interrupt mask + cli ; clear interrupt mask ;============================ @@ -175,7 +176,7 @@ check_copy_loop: inc COPY_OFFSET ; (opt: make subtract?) ; 5 - lda #$14 + lda #14 ; NOT HEX URGH! cmp COPY_OFFSET bne check_copy_loop @@ -232,6 +233,8 @@ done_play: jsr increment_file jsr new_song + cli + jmp main_loop forever_loop: @@ -347,6 +350,10 @@ read_size EQU $4000 adc #0 sta LZ4_SRC+1 + lda #UNPACK_BUFFER + sta INH ; Decompress first chunks @@ -361,8 +368,6 @@ read_size EQU $4000 jsr setup_next_subsong - cli ; start playing - rts ;================= @@ -510,7 +515,7 @@ filename_found: increment_file: inc WHICH_FILE lda WHICH_FILE - cmp NUM_FILES + cmp #NUM_FILES bne done_increment lda #0 sta WHICH_FILE diff --git a/chiptune_player/zp.inc b/chiptune_player/zp.inc index ac577981..8107fcaa 100644 --- a/chiptune_player/zp.inc +++ b/chiptune_player/zp.inc @@ -27,6 +27,9 @@ COLOR EQU $30 ; dos33 zero page = 26-2f, 35-38, 3e 3f 40-4d ; overlap applesoft 67-6a,6f,70,af,b0,ca-cd,d8 + +; DOS33: Confirmed kills $68 + RWTSL EQU $60 RWTSH EQU $61 DOSBUFL EQU $62 @@ -35,8 +38,8 @@ FILEML EQU $64 FILEMH EQU $65 ;TURNING EQU $60 ;SCREEN_X EQU $61 ; not used? -SCREEN_Y EQU $67 -WHICH_FILE EQU $68 + ;SCREEN_Y EQU $62 + ;ANGLE EQU $63 ;HORIZ_SCALE_I EQU $64 @@ -95,6 +98,8 @@ C_COLOR EQU $85 COPY_TIME EQU $86 DECOMPRESS_TIME EQU $87 TIME_TAKEN EQU $88 +SCREEN_Y EQU $89 +WHICH_FILE EQU $8A ;NUM2L EQU $80 ;NUM2H EQU $81 ;RESULT EQU $82 ; 83,84,85