fixed RSSTAT usage conflict
This commit is contained in:
1 parent
4f58088207
commit
58dc012831
10 files changed
+68
-42
No files matched your search
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -104,17 +104,45 @@
|
||||
.label CNTDN = $A5 // -- NOT IMPLEMENTED --
|
||||
.label BUFPNT = $A6 // -- NOT IMPLEMENTED --
|
||||
.label INBIT = $A7 // -- NOT IMPLEMENTED --
|
||||
.label BITCI = $A8 // -- NOT IMPLEMENTED --
|
||||
.label RINONE = $A9 // -- NOT IMPLEMENTED --
|
||||
.label RIDDATA = $AA // -- NOT IMPLEMENTED --
|
||||
.label RIPRTY = $AB // -- NOT IMPLEMENTED --
|
||||
|
||||
// #if CONFIG_EXTENDED_SCNKEY
|
||||
|
||||
// Reuse RS232 variables, since they should not be used by other things.
|
||||
// Carefully avoid $A7 which is used by 64NET
|
||||
.label KeyQuantity = $A8 // 1 byte
|
||||
.label BufferNew = $A9 // 3 bytes
|
||||
|
||||
// #endif // CONFIG_EXTENDED_SCNKEY
|
||||
// .label BITCI = $A8 // -- NOT IMPLEMENTED --
|
||||
// .label RINONE = $A9 // -- NOT IMPLEMENTED --
|
||||
// .label RIDDATA = $AA // -- NOT IMPLEMENTED --
|
||||
// .label RIPRTY = $AB // -- NOT IMPLEMENTED --
|
||||
|
||||
.label SAL = $AC // $AC-$AD -- NOT IMPLEMENTED -- (implemented screen part)
|
||||
.label EAL = $AE // $AE-$AF -- NOT IMPLEMENTED -- [!] used also by screen editor, for temporary color storage when scrolling
|
||||
.label CMP0 = $B0 // $B0-$B1 temporary tape storage, [!] here used for BRK instruction address
|
||||
.label TAPE1 = $B2 // $B2-$B3 tape buffer pointer
|
||||
.label BITTS = $B4 // -- NOT IMPLEMENTED --
|
||||
|
||||
// #if CONFIG_EXTENDED_SCNKEY
|
||||
|
||||
// Reuse RS232 variables, since they should not be used by other things.
|
||||
// This one should be initialized in cinit to $FF
|
||||
.label BufferQuantity = $B4 // 1 byte
|
||||
|
||||
// #endif // CONFIG_EXTENDED_SCNKEY
|
||||
// .label BITTS = $B4 // -- NOT IMPLEMENTED --
|
||||
|
||||
.label NXTBIT = $B5 // -- NOT IMPLEMENTED --
|
||||
.label RODATA = $B6 // -- NOT IMPLEMENTED --
|
||||
|
||||
// #if CONFIG_EXTENDED_SCNKEY
|
||||
|
||||
// Reuse RS232 variables, since they should not be used by other things.
|
||||
// Carefully avoiding $A7 which is used by 64NET
|
||||
.label TempZP = $B6 // 1 byte
|
||||
|
||||
// #endif // CONFIG_EXTENDED_SCNKEY
|
||||
// .label RODATA = $B6 // -- NOT IMPLEMENTED --
|
||||
|
||||
.label FNLEN = $B7 // current file name length
|
||||
.label LA = $B8 // current logical_file number
|
||||
.label SA = $B9 // current secondary address
|
||||
@@ -163,6 +191,15 @@
|
||||
//
|
||||
|
||||
.label BUF = $200 // $200-$250, BASIC line editor input buffer (81 bytes)
|
||||
|
||||
// #if CONFIG_EXTENDED_SCNKEY
|
||||
|
||||
// $250-$258 is the 81st - 88th characters in BASIC input, a carry over from VIC-20
|
||||
// and not used on C64, so safe for us to use, probably.
|
||||
.label ScanResult = $250 // 8 bytes
|
||||
|
||||
// #endif // CONFIG_EXTENDED_SCNKEY
|
||||
|
||||
// [!] XXX document $251-$258 usage
|
||||
.label LAT = $259 // $259-$262, logical file numbers (table, 10 bytes)
|
||||
.label FAT = $263 // $263-$26C, device numbers (table, 10 bytes)
|
||||
@@ -183,12 +220,22 @@
|
||||
.label KEYLOG = $28F // $28F-$290 routine to setup keyboard decoding
|
||||
.label MODE = $291 // flag, is case switch allowed
|
||||
.label AUTODN = $292 // -- NOT IMPLEMENTED -- screen scroll disable
|
||||
.label M51CRT = $293 // -- NOT IMPLEMENTED -- mock 6551
|
||||
.label M51CDR = $294 // -- NOT IMPLEMENTED -- mock 6551
|
||||
.label M51AJB = $295 // $295-$296 -- NOT IMPLEMENTED -- mock 6551
|
||||
.label RSSTAT = $297 // -- NOT IMPLEMENTED -- mock 6551, RS-232 status
|
||||
.label BITNUM = $298 // -- NOT IMPLEMENTED --
|
||||
.label BAUDOF = $299 // $299-$29A -- NOT IMPLEMENTED --
|
||||
|
||||
// #if CONFIG_EXTENDED_SCNKEY
|
||||
|
||||
// Reuse RS232 variables, since they should not be used by other things.
|
||||
// This one should be initialized in cinit to $FF
|
||||
.label BufferOld = $293 // 3 bytes
|
||||
.label Buffer = $297 // 4 bytes
|
||||
|
||||
// #endif // CONFIG_EXTENDED_SCNKEY
|
||||
// .label M51CRT = $293 // -- NOT IMPLEMENTED -- mock 6551
|
||||
// .label M51CDR = $294 // -- NOT IMPLEMENTED -- mock 6551
|
||||
// .label M51AJB = $295 // $295-$296 -- NOT IMPLEMENTED -- mock 6551
|
||||
// .label RSSTAT = $297 // -- NOT IMPLEMENTED -- mock 6551, RS-232 status
|
||||
// .label BITNUM = $298 // -- NOT IMPLEMENTED --
|
||||
// .label BAUDOF = $299 // $299-$29A -- NOT IMPLEMENTED --
|
||||
|
||||
.label RIDBE = $29B // -- NOT IMPLEMENTED --
|
||||
.label RIDBS = $29C // -- NOT IMPLEMENTED --
|
||||
.label RODBS = $29D // -- NOT IMPLEMENTED --
|
||||
|
||||
@@ -97,7 +97,7 @@ LOAD:
|
||||
// Get load address and store it if secondary address is zero
|
||||
jsr iec_rx_byte
|
||||
bcc !+
|
||||
jmp lvs_file_not_found_error // XXX deduplicate with other jumps in this routine
|
||||
jmp kernalerror_FILE_NOT_FOUND // XXX deduplicate with other jumps in this routine
|
||||
!:
|
||||
ldx SA
|
||||
beq !+
|
||||
@@ -105,7 +105,7 @@ LOAD:
|
||||
!:
|
||||
jsr iec_rx_byte
|
||||
bcc !+
|
||||
jmp lvs_file_not_found_error // XXX deduplicate with other jumps in this routine
|
||||
jmp kernalerror_FILE_NOT_FOUND // XXX deduplicate with other jumps in this routine
|
||||
!:
|
||||
ldx SA
|
||||
beq !+
|
||||
|
||||
@@ -164,8 +164,6 @@ lvs_illegal_device_number:
|
||||
jsr kernalstatus_DEVICE_NOT_FOUND
|
||||
jmp kernalerror_ILLEGAL_DEVICE_NUMBER
|
||||
|
||||
.label lvs_file_not_found_error = kernalerror_FILE_NOT_FOUND
|
||||
|
||||
lvs_load_verify_error:
|
||||
// XXX should we really return BASIC error code here?
|
||||
lda VERCKK
|
||||
|
||||
+2
-1
@@ -18,7 +18,8 @@ READST:
|
||||
|
||||
// This is RS-232 device - according to 'Compute's Mapping the Commodore 64' page 239
|
||||
// it reads status from RSSTAT
|
||||
lda RSSTAT
|
||||
// XXX 'lda RSSTAT' not possible due to extended scnkey, fix it!
|
||||
lda #$FF
|
||||
rts
|
||||
!:
|
||||
// According to 'Compute's Mapping the Commodore 64' page 239, it usually retrieves
|
||||
|
||||
@@ -46,25 +46,6 @@
|
||||
|
||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
|
||||
|
||||
// // ZERO PAGE Varibles
|
||||
// $250-$258 is the 81st - 88th characters in BASIC input, a carry over from VIC-20
|
||||
// and not used on C64, so safe for us to use, probably.
|
||||
// (Compute's Mapping the 64 p51)
|
||||
.label ScanResult = $250 // 8 bytes
|
||||
// Other variables are in RS232 ZP locations for now
|
||||
// (Carefully avoiding $A7 which is used by 64NET)
|
||||
.label BufferNew = $A9 // 3 bytes
|
||||
.label KeyQuantity = $A8 // 1 byte
|
||||
.label TempZP = $B6 // 1 byte
|
||||
|
||||
// Reuse RS232 variables, since they should not be used
|
||||
// by other things
|
||||
// These are initialised in cinit all to $FF
|
||||
.label BufferOld = $293 // 3 bytes
|
||||
.label Buffer = $297 // 4 bytes
|
||||
.label BufferQuantity = $B4 // 1 byte
|
||||
|
||||
|
||||
// Operational Variables
|
||||
.const MaxKeyRollover = 3
|
||||
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
|
||||
vector_real:
|
||||
|
||||
// Temporary storage location - checked on real C64 that this is the
|
||||
// Use MEMUSS as temporary storage location - checked on real C64 that this is the
|
||||
// address originally used; after calling VECTOR and checking zero page
|
||||
// area afterwards, the address could be found there
|
||||
.label _caller_arr_ptr = MEMUSS
|
||||
|
||||
// According to 'Compute's Mapping the Commodore 64' page 237,
|
||||
// the CBM implementation does not disable IRQs - yet, the
|
||||
@@ -17,20 +16,20 @@ vector_real:
|
||||
|
||||
// Prepare the user data pointer - strange order to reduce risk
|
||||
// of potential similarity to the original routine
|
||||
sty _caller_arr_ptr + 1
|
||||
stx _caller_arr_ptr + 0
|
||||
sty MEMUSS + 1
|
||||
stx MEMUSS + 0
|
||||
|
||||
// Select routine variant - store or restore vectors
|
||||
ldy #$1F
|
||||
bcc vector_restore
|
||||
|
||||
lda CINV, y
|
||||
sta (_caller_arr_ptr), y
|
||||
sta (MEMUSS), y
|
||||
|
||||
bcs vector_end_loop // branch always
|
||||
|
||||
vector_restore:
|
||||
lda (_caller_arr_ptr), y
|
||||
lda (MEMUSS), y
|
||||
sta CINV, y
|
||||
|
||||
// FALLTROUGH
|
||||
|
||||
Reference in new issue
Block a user