one more cleanup in aliases
This commit is contained in:
1 parent
b9e3cb89bf
commit
8de99f2b14
18 files changed
+40
-45
No files matched your search
@@ -41,8 +41,6 @@
|
||||
.label screen_line_link_table = $D9
|
||||
.label current_screen_line_colour_ptr = $F3
|
||||
.label keyboard_decoding_table_ptr = $F5
|
||||
.label rs232_rx_buffer_ptr = $F7
|
||||
.label rs232_tx_buffer_ptr = $F9
|
||||
|
||||
// "Compute's Mapping the 64" book
|
||||
.label keyboard_buffer = $0277
|
||||
|
||||
@@ -54,7 +54,7 @@ cint_pal:
|
||||
|
||||
lda #$01
|
||||
!:
|
||||
sta PALNTSC
|
||||
sta TVSFLG
|
||||
|
||||
cint_brk: // entry for BRK and STOP+RESTORE - XXX, where should it start?
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ close_load:
|
||||
jsr LISTEN
|
||||
|
||||
lda #$E0 // CLOSE command
|
||||
sta IEC_TMP2
|
||||
sta TBTCNT
|
||||
jsr iec_tx_command
|
||||
jsr iec_tx_command_finalize
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@ CLOSE:
|
||||
jmp close_remove_from_table
|
||||
!:
|
||||
ora $E0 // CLOSE command
|
||||
sta IEC_TMP2
|
||||
sta TBTCNT
|
||||
jsr iec_tx_command
|
||||
bcs close_remove_from_table
|
||||
jsr iec_tx_command_finalize
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
//
|
||||
// Official Kernal routine, described in:
|
||||
//
|
||||
@@ -23,7 +22,7 @@
|
||||
LOAD:
|
||||
|
||||
// Are we loading or verifying?
|
||||
sta VERCK
|
||||
sta VERCKK
|
||||
|
||||
// Store start address of LOAD
|
||||
stx STAL+0
|
||||
@@ -82,7 +81,7 @@ LOAD:
|
||||
jmp lvs_load_verify_error // XXX deduplicate with other jumps in this routine
|
||||
!:
|
||||
lda #$60 // open channel / data (p3) , required according to p13
|
||||
sta IEC_TMP2
|
||||
sta TBTCNT
|
||||
jsr iec_tx_command
|
||||
bcc !+
|
||||
jmp lvs_load_verify_error // XXX deduplicate with other jumps in this routine
|
||||
|
||||
@@ -21,7 +21,7 @@ VECTOR:
|
||||
// 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 = MEMUS
|
||||
.label _caller_arr_ptr = MEMUSS
|
||||
|
||||
// According to 'Compute's Mapping the Commodore 64' page 237,
|
||||
// the CBM implementation does not disable IRQs - yet, the
|
||||
|
||||
@@ -18,7 +18,7 @@ iec_cmd_open: // similar to TKSA, but without turnaround
|
||||
|
||||
common_open_close_unlsn_second: // common part of several commands
|
||||
|
||||
sta IEC_TMP2
|
||||
sta TBTCNT
|
||||
jsr iec_tx_command
|
||||
bcs !+ // branch if error
|
||||
jmp iec_tx_command_finalize
|
||||
|
||||
@@ -135,12 +135,12 @@ iec_rx_clk_wait2:
|
||||
plp
|
||||
|
||||
// Restore registers
|
||||
sta IEC_TMP2 // $A4 is a byte buffer according to http://sta.c64.org/cbm64mem.html
|
||||
sta TBTCNT // $A4 is a byte buffer according to http://sta.c64.org/cbm64mem.html
|
||||
pla
|
||||
tay
|
||||
pla
|
||||
tax
|
||||
lda IEC_TMP2
|
||||
lda TBTCNT
|
||||
|
||||
clc
|
||||
rts
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
|
||||
// Implemented based on https://www.pagetable.com/?p=1135, https://github.com/mist64/cbmbus_doc
|
||||
|
||||
// Expects byte to send in IEC_TMP2 ($A4 is a byte buffer according to http://sta.c64.org/cbm64mem.html)
|
||||
// Expects byte to send in TBTCNT ($A4 is a byte buffer according to http://sta.c64.org/cbm64mem.html)
|
||||
// Carry flag set = signal EOI
|
||||
//
|
||||
// Preserves .X and .Y registers
|
||||
@@ -53,9 +53,9 @@ iec_tx_common:
|
||||
|
||||
iec_tx_common_sendbit:
|
||||
// Is next bit 0 or 1?
|
||||
lda IEC_TMP2
|
||||
lda TBTCNT
|
||||
lsr
|
||||
sta IEC_TMP2
|
||||
sta TBTCNT
|
||||
bcs !+
|
||||
|
||||
// Bit is 0
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
|
||||
// Implemented based on https://www.pagetable.com/?p=1135, https://github.com/mist64/cbmbus_doc
|
||||
|
||||
// Expects byte to send in IEC_TMP2 ($A4 is a byte buffer according to http://sta.c64.org/cbm64mem.html)
|
||||
// Expects byte to send in TBTCNT ($A4 is a byte buffer according to http://sta.c64.org/cbm64mem.html)
|
||||
// Carry flag set = signal EOI
|
||||
//
|
||||
// Preserves .X and .Y registers
|
||||
|
||||
@@ -18,7 +18,7 @@ lvs_send_file_name_loop:
|
||||
sec
|
||||
!:
|
||||
// Transmit one character
|
||||
sta IEC_TMP2
|
||||
sta TBTCNT
|
||||
jsr iec_tx_byte
|
||||
jmp lvs_send_file_name_loop
|
||||
lvs_send_file_name_done:
|
||||
@@ -86,7 +86,7 @@ lvs_display_loading_verifying:
|
||||
// Display LOADING / VERIFYING and start address
|
||||
lda MSGFLG
|
||||
bpl lvs_display_end
|
||||
lda VERCK
|
||||
lda VERCKK
|
||||
beq !+
|
||||
jsr printf // XXX don't use printf, use packed message
|
||||
.byte $0D
|
||||
@@ -156,7 +156,7 @@ lvs_illegal_device_number:
|
||||
|
||||
lvs_load_verify_error:
|
||||
// XXX should we really return BASIC error code here?
|
||||
lda VERCK
|
||||
lda VERCKK
|
||||
bne lvs_verify_error
|
||||
lda #B_ERR_LOAD
|
||||
bne lvs_error_end
|
||||
|
||||
+4
-4
@@ -12,13 +12,13 @@ MEMTOP:
|
||||
|
||||
bcc memtop_set
|
||||
|
||||
ldy MEMSIZ+1
|
||||
ldx MEMSIZ+0
|
||||
ldy MEMEND+1
|
||||
ldx MEMEND+0
|
||||
rts
|
||||
|
||||
memtop_set:
|
||||
|
||||
sty MEMSIZ+1
|
||||
stx MEMSIZ+0
|
||||
sty MEMEND+1
|
||||
stx MEMEND+0
|
||||
|
||||
rts
|
||||
+4
-4
@@ -61,14 +61,14 @@ ramtas_l2:
|
||||
ldx #>$0400
|
||||
stx HIBASE
|
||||
|
||||
// Work out RAM size and put in MEMSTR and MEMSIZ
|
||||
// Work out RAM size and put in MEMSTR and MEMEND
|
||||
// "Compute's Mapping the 64", p54
|
||||
// http://unusedino.de/ec64/technical/project64/mapping_c64.html
|
||||
ldx #>$0800
|
||||
stx MEMSTR+1
|
||||
ldx #$00
|
||||
stx MEMSTR+0
|
||||
stx MEMSIZ+0
|
||||
stx MEMEND+0
|
||||
// Try to modify $8000, if it fails then RAM ends at $7FFF, else $9FFF
|
||||
lda $8000
|
||||
eor #$FF
|
||||
@@ -79,12 +79,12 @@ ramtas_l2:
|
||||
beq ramtas_32K_RAM
|
||||
sta $8000
|
||||
ldx #$A0
|
||||
stx MEMSIZ+1
|
||||
stx MEMEND+1
|
||||
jmp ramtas_RAM_sized
|
||||
ramtas_32K_RAM:
|
||||
sta $8000 // in case RAM is hiding beneath a ROM
|
||||
ldx #$80
|
||||
stx MEMSIZ+1
|
||||
stx MEMEND+1
|
||||
// Fall through
|
||||
ramtas_RAM_sized:
|
||||
|
||||
|
||||
+1
-1
@@ -26,7 +26,7 @@ TALK:
|
||||
|
||||
common_talk_listen: // common part of TALK and LISTEN
|
||||
|
||||
sta IEC_TMP2
|
||||
sta TBTCNT
|
||||
jmp iec_tx_command
|
||||
|
||||
|
||||
+1
-1
@@ -21,7 +21,7 @@ UNTLK:
|
||||
|
||||
common_untlk_tksa: // common part of UNTLK and TKSA
|
||||
|
||||
sta IEC_TMP2
|
||||
sta TBTCNT
|
||||
jsr iec_tx_command
|
||||
bcs !+ // branch if error
|
||||
// XXX - for TKSA, is it really the right place to do a turnaround? I've got some doubts
|
||||
|
||||
Reference in new issue
Block a user