diff --git a/asm_routines/dos33_routines.s b/asm_routines/dos33_routines.s index f8c7594e..db05df04 100644 --- a/asm_routines/dos33_routines.s +++ b/asm_routines/dos33_routines.s @@ -3,11 +3,9 @@ ; FIXME: make these a parameter ; filename -;disk_buff EQU $6000 -;read_size EQU $2A00 ; (3*256*14) -disk_buff EQU $4000 -read_size EQU $1000 ; 4kB +disk_buff EQU $2000 +read_size EQU $4000 ; 16kB ;; For the disk-read code ;RWTSL EQU $F0 @@ -40,7 +38,8 @@ FILEMANAGER EQU $3D6 ;================================ ; read from disk ;================================ - ; + ; FILENAME pointed to by INH:INL + ; OUTH:OUTL trashed ; read_file: jsr LOCATE_FILEM_PARAM ; $3DC entry point @@ -54,6 +53,30 @@ read_file: ; lda #0 ; 0 = text ; sta (FILEML),y + + ; copy filename into place + ldy #0 + lda #filename + sta OUTH + +filename_copy_loop: + lda (INL),y ; load byte + beq filename_pad_spaces ; if zero, done + ora #$80 ; convert to apple ascii + sta (OUTL),y ; store out + iny + bne filename_copy_loop + +filename_pad_spaces: + lda #$A0 ; filename needs ' ' padded + sta (OUTL),y + iny + cpy #31 ; fill 30 bytes + bne filename_pad_spaces + + ldy #8 ; filename ptr offset = 8 lda #krw_file + sta INH jsr read_file @@ -358,11 +362,11 @@ new_song: jsr clear_bottoms ; clear bottom of page 0/1 - lda #file_info - sta OUTH - ldy #0 +; lda #file_info +; sta OUTH +; ldy #0 ; FIXME: optimize @@ -424,6 +428,12 @@ bloop3: rts +;========== +; filenames +;========== +krw_file: + .asciiz "INTRO2.KRW" + ;========= ;routines ;========= @@ -440,17 +450,6 @@ bloop3: .include "rasterbars.s" .include "volume_bars.s" -;=========== -; File info -;=========== -file_info: -.byte 1 -.asciiz "INTRO2: JUNGAR OF BIT WORLD FROM KIEV" -.byte 5 -.asciiz "BY: SURGEON (ALEKSEY LUTSENKO)" -.byte 15 -.asciiz "0:00 / 0:00" - ;========= ; strings ;=========