turbo tape can now load files up to 250 blocks
This commit is contained in:
1 parent
18b3f0e895
commit
3322932e5e
4 files changed
+67
-9
No files matched your search
@@ -82,6 +82,18 @@ load_tape_turbo_header_loop:
|
||||
|
||||
load_tape_turbo_payload:
|
||||
|
||||
// Copy helper byte store routine to RAM, provide default memory mapping
|
||||
|
||||
ldx #(__tape_turbo_bytestore_size - 1)
|
||||
!:
|
||||
lda tape_turbo_bytestore_source, x
|
||||
sta __tape_turbo_bytestore, x
|
||||
dex
|
||||
bpl !-
|
||||
|
||||
lda CPU_R6510
|
||||
sta __tape_turbo_bytestore_defmap
|
||||
|
||||
// Initial checksum value
|
||||
|
||||
lda #$00
|
||||
@@ -96,7 +108,7 @@ load_tape_turbo_payload:
|
||||
load_tape_turbo_loop:
|
||||
|
||||
jsr tape_turbo_get_byte
|
||||
sta (MEMUSS),y
|
||||
jsr __tape_turbo_bytestore // like 'sta (MEMUSS),y' - but under I/O
|
||||
|
||||
eor PRTY // handle checksum
|
||||
sta PRTY
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
|
||||
//
|
||||
// Tape (turbo) helper routine - storing byte uder I/O
|
||||
//
|
||||
|
||||
// This helper routine is meant to be copiet to the start of CPU stack.
|
||||
// Original ROM tape loading routines uses this area to store information
|
||||
// about bytes that did not read properly for the first time
|
||||
// (see Mapping the C64, page 47); this mechanism is useless for turbo tape,
|
||||
// but it means we can safely use this area for our purposes
|
||||
|
||||
|
||||
#if CONFIG_TAPE_TURBO
|
||||
|
||||
|
||||
.label __tape_turbo_bytestore = STACK
|
||||
.label __tape_turbo_bytestore_defmap = __tape_turbo_bytestore + 7
|
||||
.label __tape_turbo_bytestore_size = __tape_turbo_bytestore_source_end - tape_turbo_bytestore_source
|
||||
|
||||
|
||||
tape_turbo_bytestore_source:
|
||||
|
||||
// Set all memory as RAM, tape motor ON
|
||||
ldx #$00
|
||||
stx CPU_R6510
|
||||
|
||||
// Store byte in memory
|
||||
sta (MEMUSS), y
|
||||
|
||||
// Restore default memory layout
|
||||
ldx #$00 // value will be determined later, offset from start: 7 bytes
|
||||
stx CPU_R6510
|
||||
|
||||
// Go back
|
||||
rts
|
||||
|
||||
__tape_turbo_bytestore_source_end:
|
||||
|
||||
|
||||
#endif // CONFIG_TAPE_TURBO
|
||||
Reference in new issue
Block a user