more work on new memory models
This commit is contained in:
1 parent
6a4fe4d180
commit
21f2f52571
27 files changed
+279
-133
No files matched your search
@@ -21,7 +21,7 @@ iec_send_file_name_loop:
|
||||
ldx #<FNADDR+0
|
||||
jsr peek_under_roms
|
||||
#elif CONFIG_MEMORY_MODEL_46K || CONFIG_MEMORY_MODEL_50K
|
||||
jsr peek_under_roms_FNADDR
|
||||
jsr peek_under_roms_via_FNADDR
|
||||
#else // CONFIG_MEMORY_MODEL_38K
|
||||
lda (FNADDR),y
|
||||
#endif
|
||||
|
||||
@@ -83,7 +83,7 @@ iec_save_loop:
|
||||
ldx #<MEMUSS+0
|
||||
jsr peek_under_roms
|
||||
#elif CONFIG_MEMORY_MODEL_46K || CONFIG_MEMORY_MODEL_50K
|
||||
jsr peek_under_roms_MEMUSS
|
||||
jsr peek_under_roms_via_MEMUSS
|
||||
#else // CONFIG_MEMORY_MODEL_38K
|
||||
lda (MEMUSS),y
|
||||
#endif
|
||||
|
||||
@@ -68,8 +68,14 @@ lvs_handle_byte_verify:
|
||||
|
||||
#elif CONFIG_MEMORY_MODEL_46K || CONFIG_MEMORY_MODEL_50K
|
||||
|
||||
// Store byte for comparing
|
||||
sta TBTCNT
|
||||
|
||||
ldy #0
|
||||
jsr peek_under_roms_EAL
|
||||
jsr peek_under_roms_via_EAL
|
||||
|
||||
// Compare with stored byte
|
||||
cmp TBTCNT
|
||||
|
||||
#else // CONFIG_MEMORY_MODEL_38K
|
||||
|
||||
@@ -140,7 +146,7 @@ lvs_display_searching_for:
|
||||
ldx #<FNADDR+0
|
||||
jsr peek_under_roms
|
||||
#elif CONFIG_MEMORY_MODEL_46K || CONFIG_MEMORY_MODEL_50K
|
||||
jsr peek_under_roms_FNADDR
|
||||
jsr peek_under_roms_via_FNADDR
|
||||
#else // CONFIG_MEMORY_MODEL_38K
|
||||
lda (FNADDR),y
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,85 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * KERNAL_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
|
||||
#if CONFIG_MEMORY_MODEL_46K ||CONFIG_MEMORY_MODEL_50K
|
||||
|
||||
|
||||
peek_under_roms_via_MEMUSS:
|
||||
|
||||
// Store current memory mapping, unmap BASIC ROM
|
||||
|
||||
lda CPU_R6510
|
||||
pha
|
||||
and #$FE
|
||||
sta CPU_R6510
|
||||
|
||||
// Retrieve value from under ROMs
|
||||
|
||||
lda (MEMUSS), y
|
||||
|
||||
// FALLTROUGH
|
||||
|
||||
peek_under_roms_finalize:
|
||||
|
||||
// Store value in a safe place
|
||||
|
||||
tax
|
||||
|
||||
// Restore memory mapping
|
||||
|
||||
pla
|
||||
sta CPU_R6510
|
||||
|
||||
// Retrieve value and quit
|
||||
|
||||
txa
|
||||
rts
|
||||
|
||||
|
||||
peek_under_roms_via_FNADDR:
|
||||
|
||||
// Store current memory mapping, unmap BASIC ROM
|
||||
|
||||
lda CPU_R6510
|
||||
pha
|
||||
and #$FE
|
||||
sta CPU_R6510
|
||||
|
||||
// Retrieve value from under ROMs
|
||||
|
||||
lda (FNADDR), y
|
||||
|
||||
// Continue using common code
|
||||
|
||||
#if HAS_OPCODES_65C02
|
||||
bra peek_under_roms_finalize
|
||||
#else
|
||||
jmp peek_under_roms_finalize
|
||||
#endif
|
||||
|
||||
|
||||
peek_under_roms_via_EAL:
|
||||
|
||||
// Store current memory mapping, unmap BASIC ROM
|
||||
|
||||
lda CPU_R6510
|
||||
pha
|
||||
and #$FE
|
||||
sta CPU_R6510
|
||||
|
||||
// Retrieve value from under ROMs
|
||||
|
||||
lda (EAL), y
|
||||
|
||||
// Continue using common code
|
||||
|
||||
#if HAS_OPCODES_65C02
|
||||
bra peek_under_roms_finalize
|
||||
#else
|
||||
jmp peek_under_roms_finalize
|
||||
#endif
|
||||
|
||||
|
||||
#endif
|
||||
+1
-80
@@ -3,86 +3,7 @@
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
|
||||
#if CONFIG_MEMORY_MODEL_46K ||CONFIG_MEMORY_MODEL_50K
|
||||
|
||||
|
||||
peek_under_roms_MEMUSS:
|
||||
|
||||
// Store current memory mapping, unmap BASIC ROM
|
||||
|
||||
lda CPU_R6510
|
||||
pha
|
||||
and #$FE
|
||||
sta CPU_R6510
|
||||
|
||||
// Retrieve value from under ROMs
|
||||
|
||||
lda (MEMUSS), y
|
||||
|
||||
// FALLTROUGH
|
||||
|
||||
peek_under_roms_finalize:
|
||||
|
||||
// Store value in a safe place
|
||||
|
||||
tax
|
||||
|
||||
// Restore memory mapping
|
||||
|
||||
pla
|
||||
sta CPU_R6510
|
||||
|
||||
// Retrieve value and quit
|
||||
|
||||
txa
|
||||
rts
|
||||
|
||||
|
||||
peek_under_roms_FNADDR:
|
||||
|
||||
// Store current memory mapping, unmap BASIC ROM
|
||||
|
||||
lda CPU_R6510
|
||||
pha
|
||||
and #$FE
|
||||
sta CPU_R6510
|
||||
|
||||
// Retrieve value from under ROMs
|
||||
|
||||
lda (FNADDR), y
|
||||
|
||||
// Continue using common code
|
||||
|
||||
#if HAS_OPCODES_65C02
|
||||
bra peek_under_roms_finalize
|
||||
#else
|
||||
jmp peek_under_roms_finalize
|
||||
#endif
|
||||
|
||||
|
||||
peek_under_roms_EAL:
|
||||
|
||||
// Store current memory mapping, unmap BASIC ROM
|
||||
|
||||
lda CPU_R6510
|
||||
pha
|
||||
and #$FE
|
||||
sta CPU_R6510
|
||||
|
||||
// Retrieve value from under ROMs
|
||||
|
||||
lda (EAL), y
|
||||
|
||||
// Continue using common code
|
||||
|
||||
#if HAS_OPCODES_65C02
|
||||
bra peek_under_roms_finalize
|
||||
#else
|
||||
jmp peek_under_roms_finalize
|
||||
#endif
|
||||
|
||||
|
||||
#elif CONFIG_MEMORY_MODEL_60K
|
||||
#if CONFIG_MEMORY_MODEL_60K
|
||||
|
||||
|
||||
// IMPORTANT:
|
||||
@@ -14,10 +14,6 @@
|
||||
.error "CONFIG_MEMORY_MODEL_60K is not compatible with RS-232 memory allocation code"
|
||||
#endif
|
||||
|
||||
#if CONFIG_MEMORY_MODEL_46K ||CONFIG_MEMORY_MODEL_50K
|
||||
.error "TODO: add compatibility with these memory models"
|
||||
#endif
|
||||
|
||||
|
||||
close_rs232:
|
||||
|
||||
|
||||
@@ -14,9 +14,6 @@
|
||||
.error "CONFIG_MEMORY_MODEL_60K is not compatible with RS-232 memory allocation code"
|
||||
#endif
|
||||
|
||||
#if CONFIG_MEMORY_MODEL_46K ||CONFIG_MEMORY_MODEL_50K
|
||||
.error "TODO: add compatibility with these memory models"
|
||||
#endif
|
||||
|
||||
open_rs232:
|
||||
|
||||
|
||||
Reference in new issue
Block a user