migrated code to pragma-like ROM layout definitions
This commit is contained in:
1 parent
435ff6bbc2
commit
63c0404313
326 files changed
+1553
-1840
No files matched your search
@@ -1,4 +1,6 @@
|
||||
#if ROM_LAYOUT_STD
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * KERNAL_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// LOAD routine hook for fast loading via UltiDOS
|
||||
@@ -130,6 +132,3 @@ u64_load_check_status_ok:
|
||||
jmp !-
|
||||
!:
|
||||
rts
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,8 +1,8 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * KERNAL_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
|
||||
// XXX provide documentation and implementation
|
||||
|
||||
STUB_IMPLEMENTATION()
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,8 +1,8 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * KERNAL_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
|
||||
// XXX provide documentation and implementation
|
||||
|
||||
STUB_IMPLEMENTATION()
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,8 +1,8 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * KERNAL_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
|
||||
// Screen CHROUT
|
||||
|
||||
STUB_IMPLEMENTATION()
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,8 +1,8 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * KERNAL_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
|
||||
// Insert line at top of screen
|
||||
|
||||
STUB_IMPLEMENTATION()
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,8 +1,8 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * KERNAL_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
|
||||
// XXX provide documentation and implementation
|
||||
|
||||
STUB_IMPLEMENTATION()
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,8 +1,8 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * KERNAL_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
|
||||
// IEC close
|
||||
|
||||
STUB_IMPLEMENTATION()
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,8 +1,8 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * KERNAL_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
|
||||
// XXX provide documentation and implementation
|
||||
|
||||
STUB_IMPLEMENTATION()
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
+3
-4
@@ -1,4 +1,6 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * KERNAL_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
|
||||
// Kernal error codes are described in 'Commodore 64 Programmers Reference Guide', page 306
|
||||
@@ -91,6 +93,3 @@ kernalstatus_DEVICE_NOT_FOUND:
|
||||
ora #K_STS_DEVICE_NOT_FOUND
|
||||
sta IOSTATUS
|
||||
rts
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,4 +1,6 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * KERNAL_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// Official Kernal routine, described in:
|
||||
@@ -29,6 +31,3 @@ ACPTR:
|
||||
#else
|
||||
jmp kernalerror_ILLEGAL_DEVICE_NUMBER
|
||||
#endif
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,4 +1,6 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * KERNAL_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// IEC part of the CHKIN routine
|
||||
@@ -30,6 +32,3 @@ chkin_iec:
|
||||
jmp chkin_set_device
|
||||
|
||||
#endif // CONFIG_IEC
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,4 +1,6 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * KERNAL_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// IEC part of the CHRIN routine
|
||||
@@ -9,6 +11,3 @@ chrin_iec:
|
||||
|
||||
// XXX is this really all?
|
||||
jmp JACPTR
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,4 +1,6 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * KERNAL_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// IEC part of the CHROUT routine
|
||||
@@ -11,6 +13,3 @@ chrout_iec:
|
||||
jsr JCIOUT
|
||||
bcc_16 chrout_done_success
|
||||
jmp chrout_done_fail
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,4 +1,6 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * KERNAL_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// Official Kernal routine, described in:
|
||||
@@ -48,6 +50,3 @@ ciout_send_byte:
|
||||
rts
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,4 +1,6 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * KERNAL_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// IEC part of the CKOUT routine
|
||||
@@ -30,6 +32,3 @@ ckout_iec:
|
||||
|
||||
|
||||
#endif // CONFIG_IEC
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,4 +1,6 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * KERNAL_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// IEC part of the CLOSE routine
|
||||
@@ -34,6 +36,3 @@ close_iec_end:
|
||||
|
||||
|
||||
#endif // CONFIG_IEC
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,4 +1,6 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * KERNAL_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// IEC part of the CLRCHN routine
|
||||
@@ -29,6 +31,3 @@ clrchn_iec:
|
||||
|
||||
|
||||
#endif // CONFIG_IEC
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,4 +1,6 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * KERNAL_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// Checks whether device number (in .A) is a correct IEC device number
|
||||
@@ -32,6 +34,3 @@ iec_check_devnum_failed:
|
||||
rts
|
||||
|
||||
#endif // CONFIG_IEC
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,4 +1,6 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * KERNAL_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// Common part of CLOSE and LOAD/SAVE routines for IEC
|
||||
@@ -30,6 +32,3 @@ iec_close_load:
|
||||
|
||||
|
||||
#endif // CONFIG_IEC
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,4 +1,6 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * KERNAL_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// Kernal internal IEC routine
|
||||
@@ -22,6 +24,3 @@ iec_cmd_close:
|
||||
|
||||
|
||||
#endif // CONFIG_IEC
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,4 +1,6 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * KERNAL_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// Kernal internal IEC routine
|
||||
@@ -67,6 +69,3 @@ iec_check_channel_openclose:
|
||||
|
||||
|
||||
#endif // CONFIG_IEC
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,89 +1,88 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
|
||||
|
||||
//
|
||||
// Helper IEC routines to pull/release certain lines
|
||||
//
|
||||
// Order of operation is set for extra robustness, on non-emulated hardware
|
||||
// lines might need few cycles to stabilize (released CLK = DATA considered valid),
|
||||
// see page 10 of http://www.zimmers.net/anonftp/pub/cbm/programming/serial-bus.pdf
|
||||
//
|
||||
|
||||
|
||||
|
||||
#if CONFIG_IEC
|
||||
|
||||
|
||||
iec_pull_atn_clk_release_data:
|
||||
|
||||
lda CIA2_PRA
|
||||
ora #BIT_CIA2_PRA_ATN_OUT // pull
|
||||
sta CIA2_PRA
|
||||
|
||||
// FALLTROUGH
|
||||
|
||||
iec_pull_clk_release_data:
|
||||
|
||||
lda CIA2_PRA
|
||||
ora #BIT_CIA2_PRA_CLK_OUT // pull
|
||||
sta CIA2_PRA
|
||||
!:
|
||||
and #$FF - BIT_CIA2_PRA_DAT_OUT // release
|
||||
bne iec_pull_release_end // branch always
|
||||
|
||||
iec_pull_clk_release_data_oneshot:
|
||||
|
||||
lda CIA2_PRA
|
||||
ora #BIT_CIA2_PRA_CLK_OUT // pull
|
||||
bne !- // branch always
|
||||
|
||||
iec_release_atn_clk_data:
|
||||
|
||||
lda CIA2_PRA
|
||||
and #$FF - BIT_CIA2_PRA_ATN_OUT // release
|
||||
sta CIA2_PRA
|
||||
|
||||
// FALLTROUGH
|
||||
|
||||
iec_release_clk_data:
|
||||
|
||||
lda CIA2_PRA
|
||||
and #$FF - BIT_CIA2_PRA_DAT_OUT // release
|
||||
sta CIA2_PRA
|
||||
and #$FF - BIT_CIA2_PRA_CLK_OUT // release
|
||||
jmp iec_pull_release_end
|
||||
|
||||
iec_release_clk_pull_data:
|
||||
|
||||
lda CIA2_PRA
|
||||
ora #BIT_CIA2_PRA_DAT_OUT // pull
|
||||
sta CIA2_PRA
|
||||
and #$FF - BIT_CIA2_PRA_CLK_OUT // release
|
||||
bne iec_pull_release_end // branch always
|
||||
|
||||
iec_pull_data_release_atn_clk:
|
||||
|
||||
lda CIA2_PRA
|
||||
ora #BIT_CIA2_PRA_DAT_OUT // pull
|
||||
sta CIA2_PRA
|
||||
and #$FF - BIT_CIA2_PRA_CLK_OUT // release
|
||||
sta CIA2_PRA
|
||||
|
||||
// FALLTROUGH
|
||||
|
||||
iec_release_atn:
|
||||
|
||||
lda CIA2_PRA
|
||||
and #$FF - BIT_CIA2_PRA_ATN_OUT // release
|
||||
|
||||
// FALLTROUGH
|
||||
|
||||
iec_pull_release_end:
|
||||
|
||||
sta CIA2_PRA
|
||||
rts
|
||||
|
||||
|
||||
#endif // CONFIG_IEC
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * KERNAL_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// Helper IEC routines to pull/release certain lines
|
||||
//
|
||||
// Order of operation is set for extra robustness, on non-emulated hardware
|
||||
// lines might need few cycles to stabilize (released CLK = DATA considered valid),
|
||||
// see page 10 of http://www.zimmers.net/anonftp/pub/cbm/programming/serial-bus.pdf
|
||||
//
|
||||
|
||||
|
||||
|
||||
#if CONFIG_IEC
|
||||
|
||||
|
||||
iec_pull_atn_clk_release_data:
|
||||
|
||||
lda CIA2_PRA
|
||||
ora #BIT_CIA2_PRA_ATN_OUT // pull
|
||||
sta CIA2_PRA
|
||||
|
||||
// FALLTROUGH
|
||||
|
||||
iec_pull_clk_release_data:
|
||||
|
||||
lda CIA2_PRA
|
||||
ora #BIT_CIA2_PRA_CLK_OUT // pull
|
||||
sta CIA2_PRA
|
||||
!:
|
||||
and #$FF - BIT_CIA2_PRA_DAT_OUT // release
|
||||
bne iec_pull_release_end // branch always
|
||||
|
||||
iec_pull_clk_release_data_oneshot:
|
||||
|
||||
lda CIA2_PRA
|
||||
ora #BIT_CIA2_PRA_CLK_OUT // pull
|
||||
bne !- // branch always
|
||||
|
||||
iec_release_atn_clk_data:
|
||||
|
||||
lda CIA2_PRA
|
||||
and #$FF - BIT_CIA2_PRA_ATN_OUT // release
|
||||
sta CIA2_PRA
|
||||
|
||||
// FALLTROUGH
|
||||
|
||||
iec_release_clk_data:
|
||||
|
||||
lda CIA2_PRA
|
||||
and #$FF - BIT_CIA2_PRA_DAT_OUT // release
|
||||
sta CIA2_PRA
|
||||
and #$FF - BIT_CIA2_PRA_CLK_OUT // release
|
||||
jmp iec_pull_release_end
|
||||
|
||||
iec_release_clk_pull_data:
|
||||
|
||||
lda CIA2_PRA
|
||||
ora #BIT_CIA2_PRA_DAT_OUT // pull
|
||||
sta CIA2_PRA
|
||||
and #$FF - BIT_CIA2_PRA_CLK_OUT // release
|
||||
bne iec_pull_release_end // branch always
|
||||
|
||||
iec_pull_data_release_atn_clk:
|
||||
|
||||
lda CIA2_PRA
|
||||
ora #BIT_CIA2_PRA_DAT_OUT // pull
|
||||
sta CIA2_PRA
|
||||
and #$FF - BIT_CIA2_PRA_CLK_OUT // release
|
||||
sta CIA2_PRA
|
||||
|
||||
// FALLTROUGH
|
||||
|
||||
iec_release_atn:
|
||||
|
||||
lda CIA2_PRA
|
||||
and #$FF - BIT_CIA2_PRA_ATN_OUT // release
|
||||
|
||||
// FALLTROUGH
|
||||
|
||||
iec_pull_release_end:
|
||||
|
||||
sta CIA2_PRA
|
||||
rts
|
||||
|
||||
|
||||
#endif // CONFIG_IEC
|
||||
@@ -1,4 +1,6 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * KERNAL_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// Helper routines to return with error/success
|
||||
@@ -40,6 +42,3 @@ iec_return_DEVICE_NOT_FOUND:
|
||||
|
||||
|
||||
#endif // CONFIG_IEC
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,4 +1,6 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * KERNAL_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
// Receive a byte from the IEC bus.
|
||||
// Implemented based on https://www.pagetable.com/?p=1135, https://github.com/mist64/cbmbus_doc,
|
||||
@@ -157,6 +159,3 @@ iec_rx_end:
|
||||
|
||||
|
||||
#endif // CONFIG_IEC
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,4 +1,6 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * KERNAL_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// Helper routine to check for EOI while receiving byte from IEC
|
||||
@@ -40,6 +42,3 @@ iec_rx_check_eoi_done:
|
||||
|
||||
|
||||
#endif // CONFIG_IEC
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,4 +1,6 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * KERNAL_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// Sends file (stream) name to IEC device
|
||||
@@ -43,6 +45,3 @@ iec_send_file_name_done:
|
||||
|
||||
|
||||
#endif // CONFIG_IEC
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,4 +1,6 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * KERNAL_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
|
||||
#if CONFIG_IEC
|
||||
@@ -13,6 +15,3 @@ iec_set_idle:
|
||||
|
||||
|
||||
#endif // CONFIG_IEC
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,4 +1,6 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * KERNAL_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
// According to http://www.zimmers.net/anonftp/pub/cbm/programming/serial-bus.pdf
|
||||
// pages 7--8.
|
||||
@@ -41,6 +43,3 @@ iec_turnaround_to_listen:
|
||||
|
||||
|
||||
#endif // CONFIG_IEC
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,4 +1,6 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * KERNAL_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
// According to http://www.zimmers.net/anonftp/pub/cbm/programming/serial-bus.pdf
|
||||
// pages 7--8.
|
||||
@@ -33,6 +35,3 @@ iec_turnaround_to_talk:
|
||||
|
||||
|
||||
#endif // CONFIG_IEC
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,4 +1,6 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * KERNAL_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
// Implemented based on https://www.pagetable.com/?p=1135, https://github.com/mist64/cbmbus_doc
|
||||
|
||||
@@ -162,6 +164,3 @@ iec_tx_common_finalize:
|
||||
|
||||
|
||||
#endif // CONFIG_IEC
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,4 +1,6 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * KERNAL_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
// Implemented based on https://www.pagetable.com/?p=1135, https://github.com/mist64/cbmbus_doc
|
||||
|
||||
@@ -42,6 +44,3 @@ iec_tx_command:
|
||||
|
||||
|
||||
#endif // CONFIG_IEC
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,5 +1,6 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
|
||||
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * KERNAL_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
// Routine to finalize some IEC commands - which do not end in turnaround and are not followed by others
|
||||
// Implemented based on https://www.pagetable.com/?p=1135, https://github.com/mist64/cbmbus_doc
|
||||
@@ -24,6 +25,3 @@ iec_tx_command_finalize:
|
||||
|
||||
|
||||
#endif // CONFIG_IEC
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,4 +1,6 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * KERNAL_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
// Flush the IEC output buffer (if not empty) - send byte with EOI
|
||||
//
|
||||
@@ -21,6 +23,3 @@ iec_tx_flush:
|
||||
|
||||
|
||||
#endif // CONFIG_IEC
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,4 +1,6 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * KERNAL_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// Common EAL update routine
|
||||
@@ -20,6 +22,3 @@ iec_update_EAL_by_Y: // note: Carry has to be set by caller!
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,4 +1,6 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * KERNAL_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// Wait 1 ms (1000 usec)
|
||||
@@ -32,6 +34,3 @@ wait_x_bars: // additional entry point for delayy in screen and tape support
|
||||
iec_wait_rts: // dummy RTS, for very short waits
|
||||
|
||||
rts
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,4 +1,6 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * KERNAL_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
|
||||
#if CONFIG_IEC
|
||||
@@ -27,6 +29,3 @@ iec_wait20us:
|
||||
// 21 cycles
|
||||
|
||||
#endif // CONFIG_IEC
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,4 +1,6 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * KERNAL_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// Note: damages .X
|
||||
@@ -32,6 +34,3 @@ iec_wait60us:
|
||||
|
||||
|
||||
#endif // CONFIG_IEC
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,4 +1,6 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * KERNAL_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
|
||||
#if CONFIG_IEC
|
||||
@@ -12,6 +14,3 @@ iec_wait_for_clk_release:
|
||||
|
||||
|
||||
#endif // CONFIG_IEC
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,4 +1,6 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * KERNAL_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
|
||||
#if CONFIG_IEC
|
||||
@@ -14,6 +16,3 @@ iec_wait_for_data_pull:
|
||||
|
||||
|
||||
#endif // CONFIG_IEC
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,4 +1,6 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * KERNAL_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
|
||||
#if CONFIG_IEC
|
||||
@@ -13,6 +15,3 @@ iec_wait_for_data_release:
|
||||
rts
|
||||
|
||||
#endif // CONFIG_IEC
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,4 +1,6 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * KERNAL_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// Official Kernal routine, described in:
|
||||
@@ -34,6 +36,3 @@ LISTEN:
|
||||
jmp kernalerror_ILLEGAL_DEVICE_NUMBER
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,4 +1,6 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * KERNAL_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// IEC part of the LOAD routine
|
||||
@@ -193,6 +195,3 @@ load_iec_get_addr_byte:
|
||||
|
||||
|
||||
#endif // CONFIG_IEC
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,4 +1,6 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * KERNAL_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// IEC part of the OPEN routine
|
||||
@@ -39,6 +41,3 @@ open_iec_done:
|
||||
|
||||
|
||||
#endif // CONFIG_IEC
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,4 +1,6 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * KERNAL_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// IEC part of the SAVE routine
|
||||
@@ -126,6 +128,3 @@ iec_save_loop_end:
|
||||
|
||||
|
||||
#endif // CONFIG_IEC
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,4 +1,6 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * KERNAL_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// Official Kernal routine, described in:
|
||||
@@ -29,6 +31,3 @@ SECOND:
|
||||
jmp kernalerror_ILLEGAL_DEVICE_NUMBER
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,4 +1,6 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * KERNAL_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// Official Kernal routine, described in:
|
||||
@@ -47,6 +49,3 @@ common_talk_listen: // common part of TALK and LISTEN
|
||||
jmp kernalerror_ILLEGAL_DEVICE_NUMBER
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,4 +1,6 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * KERNAL_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// Official Kernal routine, described in:
|
||||
@@ -29,6 +31,3 @@ TKSA:
|
||||
jmp kernalerror_ILLEGAL_DEVICE_NUMBER
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,4 +1,6 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * KERNAL_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// Official Kernal routine, described in:
|
||||
@@ -36,6 +38,3 @@ UNLSN:
|
||||
jmp kernalerror_ILLEGAL_DEVICE_NUMBER
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,4 +1,6 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * KERNAL_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// Official Kernal routine, described in:
|
||||
@@ -47,6 +49,3 @@ common_untlk_tksa: // common part of UNTLK and TKSA
|
||||
jmp kernalerror_ILLEGAL_DEVICE_NUMBER
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,4 +1,6 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * KERNAL_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// Advertise burst IEC protocol support to the receiver
|
||||
@@ -32,6 +34,3 @@ burst_advertise_done:
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,4 +1,6 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * KERNAL_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// Advertise burst IEC protocol support to the receiver
|
||||
@@ -56,6 +58,3 @@ burst_advertise_done:
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,4 +1,6 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * KERNAL_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// Advertise burst IEC protocol support to the receiver
|
||||
@@ -27,6 +29,3 @@ burst_advertise_done:
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,4 +1,6 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * KERNAL_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// Helper routine for JiffyDOS detection
|
||||
@@ -61,6 +63,3 @@ dolphindos_detect_success:
|
||||
|
||||
|
||||
#endif // CONFIG_IEC_DOLPHINDOS
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,4 +1,6 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * KERNAL_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// DolphinDOS protocol support for IEC - optimized load loop
|
||||
@@ -118,6 +120,3 @@ dolphindos_load_end:
|
||||
|
||||
|
||||
#endif // CONFIG_IEC_DOLPHINDOS and not CONFIG_MEMORY_MODEL_60K
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,4 +1,6 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * KERNAL_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// Helper table for encoding lower nibble for JiffyDOS,
|
||||
@@ -38,6 +40,3 @@ jiffydos_bittable:
|
||||
|
||||
|
||||
#endif // CONFIG_IEC_JIFFYDOS
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,4 +1,6 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * KERNAL_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// Helper routine for JiffyDOS detection
|
||||
@@ -50,6 +52,3 @@ jiffydos_detect_end:
|
||||
|
||||
|
||||
#endif // CONFIG_IEC_JIFFYDOS
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,4 +1,6 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * KERNAL_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// JiffyDOS protocol support for IEC - optimized load loop
|
||||
@@ -169,6 +171,3 @@ jiffydos_load_end:
|
||||
|
||||
|
||||
#endif // CONFIG_IEC_JIFFYDOS and not CONFIG_MEMORY_MODEL_60K
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,4 +1,6 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * KERNAL_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// JiffyDOS transfer preparation routine
|
||||
@@ -28,6 +30,3 @@ jiffydos_prepare:
|
||||
|
||||
|
||||
#endif // CONFIG_IEC_JIFFYDOS
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,4 +1,6 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * KERNAL_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// JiffyDOS protocol support for IEC - byte reception
|
||||
@@ -109,6 +111,3 @@ jiffydos_rx_byte_end:
|
||||
|
||||
|
||||
#endif // CONFIG_IEC_JIFFYDOS
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,4 +1,6 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * KERNAL_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// JiffyDOS protocol support for IEC - byte transfer
|
||||
@@ -102,6 +104,3 @@ jiffydos_tx_byte_wait_eoi:
|
||||
|
||||
|
||||
#endif // CONFIG_IEC_JIFFYDOS
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,4 +1,6 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * KERNAL_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// JiffyDOS helper routine to wait for appropriate moment,
|
||||
@@ -33,6 +35,3 @@ jiffydos_wait_line_done:
|
||||
|
||||
|
||||
#endif // CONFIG_IEC_JIFFYDOS
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,18 +1,22 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * KERNAL_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
|
||||
// c64 prg p263
|
||||
|
||||
cartridge_check:
|
||||
|
||||
ldx #$05
|
||||
cartridge_check_l1:
|
||||
!:
|
||||
lda CART_SIG-1,x
|
||||
cmp cartridge_signature-1,x
|
||||
bne no_cartridge
|
||||
bne cartridge_check_end
|
||||
dex
|
||||
bne cartridge_check_l1
|
||||
bne !-
|
||||
|
||||
// FALLTROUGH
|
||||
no_cartridge:
|
||||
|
||||
cartridge_check_end:
|
||||
|
||||
rts
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,4 +1,6 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * KERNAL_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// This is a part CINT which initializes screen and keyboard
|
||||
@@ -6,6 +8,8 @@
|
||||
// For more details see:
|
||||
// - [RG64] C64 Programmers Reference Guide - page 280
|
||||
// - [CM64] Computes Mapping the Commodore 64 - page 242
|
||||
//
|
||||
|
||||
|
||||
cint_screen_keyboard:
|
||||
|
||||
@@ -70,6 +74,3 @@ cint_screen_keyboard:
|
||||
// Fallthrough/jump to screen clear routine (Computes Mapping the 64 p215)
|
||||
|
||||
jmp clear_screen
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,4 +1,6 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * KERNAL_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// Part of the official Kernal routine, described in:
|
||||
@@ -21,6 +23,3 @@ cint_legacy: // $E518
|
||||
// Game 'Operacja Proboszcz' is one example.
|
||||
|
||||
jmp cint_screen_keyboard // XXX try to fit the code here
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,4 +1,6 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * KERNAL_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// Well-known Kernal routine, described in:
|
||||
@@ -65,6 +67,3 @@ setup_vicii:
|
||||
// Setup default I/O devices
|
||||
|
||||
jmp clrchn_reset
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,4 +1,6 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * KERNAL_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
// Resources describing the C64 reset sequence:
|
||||
// https://www.c64-wiki.com/wiki/Reset_(Process)
|
||||
@@ -50,6 +52,3 @@ hw_entry_reset:
|
||||
|
||||
// c64 prg p269
|
||||
jmp (IBASIC_COLD_START)
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,4 +1,6 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * KERNAL_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// Official Kernal routine, described in:
|
||||
@@ -144,6 +146,3 @@ IOINIT:
|
||||
rts
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,4 +1,6 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * KERNAL_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// Official Kernal routine, described in:
|
||||
@@ -13,6 +15,3 @@ CINT:
|
||||
|
||||
jsr cint_legacy
|
||||
jmp setup_pal_ntsc
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,9 +1,9 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * KERNAL_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
|
||||
// $FFFC - CPU Reset Vector
|
||||
// Uncontrovertial, as it is a CPU requirement, and nothing else.
|
||||
|
||||
.word hw_entry_reset
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,4 +1,6 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * KERNAL_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
// Detect video system (PAL/NTSC), use method by Graham, as it is short and reliable
|
||||
// see here: https://codebase64.org/doku.php?id=base:detect_pal_ntsc
|
||||
@@ -60,6 +62,3 @@ setup_irq_timer: // entry point needed by UP9600 and CIA1 burst mod support
|
||||
sta CIA1_TIMAHI // $DC05
|
||||
|
||||
rts
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,4 +1,6 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * KERNAL_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
|
||||
default_irq_handler:
|
||||
@@ -44,6 +46,3 @@ default_irq_handler_end_tape:
|
||||
|
||||
// Acknowledge CIA interrupt and return
|
||||
jmp clear_cia1_interrupt_flag_and_return_from_interrupt
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,4 +1,7 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * KERNAL_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
|
||||
// https://csdb.dk/forums/index.php?roomid=11&topicid=5776
|
||||
// Clear the CIA1 interrupt flag, and then fall through to
|
||||
@@ -11,6 +14,3 @@ clear_cia1_interrupt_flag_and_return_from_interrupt:
|
||||
ldy CIA1_ICR
|
||||
|
||||
// FALL THROUGH to $EA81
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,4 +1,6 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * KERNAL_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
// The IRQ is a commonly messed with thing on the C64,
|
||||
// so we need to handle entry points that are commonly
|
||||
@@ -17,7 +19,5 @@ return_from_interrupt:
|
||||
ply_trash_a
|
||||
plx_trash_a
|
||||
pla
|
||||
|
||||
rti
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,4 +1,7 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * KERNAL_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
|
||||
default_nmi_handler:
|
||||
|
||||
@@ -31,6 +34,3 @@ default_nmi_handler:
|
||||
sta CMP0+0
|
||||
sta CMP0+1
|
||||
jmp (CBINV)
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,4 +1,7 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * KERNAL_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
|
||||
default_brk_handler:
|
||||
|
||||
@@ -23,6 +26,3 @@ default_brk_handler:
|
||||
cli
|
||||
|
||||
jmp (IBASIC_WARM_START)
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,9 +1,9 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * KERNAL_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
|
||||
// $FFFA - CPU NMI Hanlder
|
||||
// Uncontrovertial as this is also a CPU requirement.
|
||||
|
||||
.word hw_entry_nmi
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,10 +1,10 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * KERNAL_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
|
||||
// $FFFE - CPU IRQ Vector.
|
||||
// This is non-controvertial, as it is a 6502 CPU requirement, and we just have to point
|
||||
// it to whatever IRQ routine we make.
|
||||
|
||||
.word hw_entry_irq
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,4 +1,6 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * KERNAL_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
|
||||
hw_entry_irq:
|
||||
@@ -48,6 +50,3 @@ irq_handler_brk:
|
||||
|
||||
// Interrupt caused by BRK
|
||||
jmp (CBINV)
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,4 +1,6 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * KERNAL_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
|
||||
hw_entry_nmi:
|
||||
@@ -20,6 +22,3 @@ hw_entry_nmi:
|
||||
// Vector not initialized - call default interrupt routine
|
||||
pla
|
||||
jmp default_nmi_handler
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,4 +1,6 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * KERNAL_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// Common part of CHKIN and CKOUT
|
||||
@@ -17,6 +19,3 @@ chkinout_file_not_open:
|
||||
ply_trash_a
|
||||
pla
|
||||
jmp kernalerror_FILE_NOT_OPEN
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,4 +1,6 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * KERNAL_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// Official Kernal routine, described in:
|
||||
@@ -34,6 +36,3 @@ clall_real:
|
||||
|
||||
// Not sure whether original Kernal does so, but it seems sane to also clear possible errors
|
||||
jmp kernalstatus_reset
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,4 +1,6 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * KERNAL_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// Official Kernal routine, described in:
|
||||
@@ -12,6 +14,3 @@
|
||||
|
||||
GETIN:
|
||||
jmp getin_real
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,4 +1,6 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * KERNAL_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// Official Kernal routine, described in:
|
||||
@@ -47,6 +49,3 @@ chrin_getin: // jump entry for GETIN
|
||||
// Not a supported device
|
||||
|
||||
jmp lvs_device_not_found_error
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,4 +1,6 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * KERNAL_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// Official Kernal routine, described in:
|
||||
@@ -76,6 +78,3 @@ chrout_done_success:
|
||||
lda SCHAR
|
||||
clc // indicate success
|
||||
rts
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,4 +1,6 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * KERNAL_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// Official Kernal routines, described in:
|
||||
@@ -68,6 +70,3 @@ chkin_file_not_input:
|
||||
ply_trash_a
|
||||
pla
|
||||
jmp kernalerror_FILE_NOT_INPUT
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,4 +1,6 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * KERNAL_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// Official Kernal routines, described in:
|
||||
@@ -61,6 +63,3 @@ ckout_file_not_output:
|
||||
ply_trash_a
|
||||
pla
|
||||
jmp kernalerror_FILE_NOT_OUTPUT
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,4 +1,6 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * KERNAL_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// Official Kernal routine, described in:
|
||||
@@ -56,6 +58,3 @@ close_remove_from_table:
|
||||
|
||||
close_end:
|
||||
rts
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,4 +1,7 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * KERNAL_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
|
||||
// Our implementation is longer than the original one,
|
||||
// placing it here would cause a collision with CLRCHN
|
||||
@@ -6,6 +9,3 @@
|
||||
|
||||
CLALL:
|
||||
jmp clall_real
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,4 +1,6 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * KERNAL_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// Official Kernal routine, described in:
|
||||
@@ -31,6 +33,3 @@ clrchn_reset: // entry needed by setup_vicii
|
||||
sta DFLTO
|
||||
|
||||
rts
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,4 +1,6 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * KERNAL_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// Official Kernal routine, described in:
|
||||
@@ -77,6 +79,3 @@ open_done_success:
|
||||
|
||||
clc
|
||||
rts
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,4 +1,6 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * KERNAL_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// LOAD preparation routine
|
||||
@@ -22,6 +24,3 @@ LOAD_PREP:
|
||||
sty MEMUSS+1
|
||||
stx MEMUSS+0
|
||||
jmp (ILOAD)
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,4 +1,6 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * KERNAL_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// Official Kernal routine, described in:
|
||||
@@ -57,6 +59,3 @@ LOAD:
|
||||
#endif
|
||||
|
||||
jmp lvs_illegal_device_number
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,4 +1,6 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * KERNAL_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// SAVE preparation routine
|
||||
@@ -28,6 +30,3 @@ SAVE_PREP:
|
||||
sta STAL+0
|
||||
|
||||
jmp (ISAVE)
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,4 +1,6 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * KERNAL_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// Official Kernal routine, described in:
|
||||
@@ -29,6 +31,3 @@ SAVE:
|
||||
#endif
|
||||
|
||||
jmp lvs_illegal_device_number
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,4 +1,6 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * KERNAL_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
// Just a helper routine
|
||||
|
||||
@@ -21,6 +23,3 @@ find_fls_not_found:
|
||||
|
||||
sec
|
||||
rts
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,4 +1,6 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * KERNAL_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// Official Kernal routine, described in:
|
||||
@@ -27,6 +29,3 @@ getin_real:
|
||||
#endif // HAS_RS232
|
||||
|
||||
jmp chrin_getin
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,4 +1,6 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * KERNAL_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// Helper functions for various LOAD/VERIFY/SAVE routine variants (IEC / U64 / etc.)
|
||||
@@ -271,6 +273,3 @@ lvs_verify_error:
|
||||
rts
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,4 +1,6 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * KERNAL_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// Official Kernal routine, described in:
|
||||
@@ -30,6 +32,3 @@ READST:
|
||||
|
||||
lda IOSTATUS
|
||||
rts
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,4 +1,6 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * KERNAL_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// Official Kernal routine, described in:
|
||||
@@ -19,6 +21,3 @@ SETFLS:
|
||||
stx FA
|
||||
|
||||
rts
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
@@ -1,4 +1,6 @@
|
||||
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * KERNAL_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// Official Kernal routine, described in:
|
||||
@@ -10,8 +12,6 @@
|
||||
//
|
||||
|
||||
SETMSG:
|
||||
|
||||
sta MSGFLG
|
||||
rts
|
||||
|
||||
|
||||
#endif // ROM layout
|
||||
Loaded 100 of 326 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user