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,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
|
||||
Reference in new issue
Block a user