preparation for calling routines from mapped memory
This commit is contained in:
1 parent
9061a8d0fc
commit
30238362c1
3 files changed
+72
-6
No files matched your search
@@ -102,9 +102,9 @@
|
|||||||
|
|
||||||
// Check that memory model and ROM layout configurations is correct
|
// Check that memory model and ROM layout configurations is correct
|
||||||
{
|
{
|
||||||
//#if ROM_LAYOUT_M65 && !CONFIG_CPU_M65_45GS02
|
#if ROM_LAYOUT_M65 && !CONFIG_CPU_M65_45GS02
|
||||||
// .error "Mega65 ROM layout requires CONFIG_CPU_M65_45GS02"
|
.error "Mega65 ROM layout requires CONFIG_CPU_M65_45GS02"
|
||||||
//#endif
|
#endif
|
||||||
//#if ROM_LAYOUT_M65 && !CONFIG_MB_MEGA_65
|
//#if ROM_LAYOUT_M65 && !CONFIG_MB_MEGA_65
|
||||||
// .error "Mega65 ROM layout requires CONFIG_MB_MEGA_65"
|
// .error "Mega65 ROM layout requires CONFIG_MB_MEGA_65"
|
||||||
//#endif
|
//#endif
|
||||||
|
|||||||
@@ -1,13 +1,28 @@
|
|||||||
#if (ROM_LAYOUT_M65 && SEGMENT_KERNAL_1)
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Definitions for communication with Mega65 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
|
rts
|
||||||
|
|
||||||
|
|
||||||
#endif // ROM layout
|
#endif
|
||||||
@@ -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
|
||||||
Reference in new issue
Block a user