preparation for calling routines from mapped memory

This commit is contained in:
FeralChild64 committed 2020-01-14 18:06:24 +01:00
1 parent 9061a8d0fc
commit 30238362c1
3 files changed
+72 -6

No files matched your search

+3 -3
View File
@@ -102,9 +102,9 @@
// Check that memory model and ROM layout configurations is correct
{
//#if ROM_LAYOUT_M65 && !CONFIG_CPU_M65_45GS02
// .error "Mega65 ROM layout requires CONFIG_CPU_M65_45GS02"
//#endif
#if ROM_LAYOUT_M65 && !CONFIG_CPU_M65_45GS02
.error "Mega65 ROM layout requires CONFIG_CPU_M65_45GS02"
#endif
//#if ROM_LAYOUT_M65 && !CONFIG_MB_MEGA_65
// .error "Mega65 ROM layout requires CONFIG_MB_MEGA_65"
//#endif
+18 -3
View File
@@ -1,13 +1,28 @@
#if (ROM_LAYOUT_M65 && SEGMENT_KERNAL_1)
//
// Definitions for communication with Mega65 segment KERNAL_1
//
// XXX this is for testing only
#if (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
// Labels for jumps
.label KERNAL_1__TESTROUTINE = $4000
#elif (ROM_LAYOUT_M65 && SEGMENT_KERNAL_1)
// Jumptable (OpenROMs private!)
jmp TESTROUTINE
TESTROUTINE:
rts
#endif // ROM layout
#endif
+51
View File
@@ -0,0 +1,51 @@
#if (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
//
// ROM mapping routines for Mega65
//
map_NORMAL:
pha
phx
phy
phz
lda #$00
tax
tay
taz
// FALLTROUGH
map_end:
map
eom
plz
ply
plx
pla
rts
map_KERNAL_1:
pha
phx
phy
phz
lda #$00
tay
taz
ldx #$42 // XXX map 8KB from 0x20000 to 0x4000 - somehow does not seem to work
bne map_end
#endif // ROM layout