hw initialization for running under hypervisor
This commit is contained in:
1 parent
a744fd0230
commit
6de965e77d
5 files changed
+44
No files matched your search
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,4 @@
|
|||||||
|
;; #LAYOUT# M65 KERNAL_0 #TAKE
|
||||||
|
;; #LAYOUT# * * #IGNORE
|
||||||
|
|
||||||
|
!word m65_hypervisor_reset
|
||||||
@@ -0,0 +1,34 @@
|
|||||||
|
;; #LAYOUT# M65 KERNAL_0 #TAKE
|
||||||
|
;; #LAYOUT# * * #IGNORE
|
||||||
|
|
||||||
|
; Reset (hardware initialization) to be used when Open ROMs is used under hypervisor
|
||||||
|
; XXX for now this is just a proposal
|
||||||
|
|
||||||
|
|
||||||
|
m65_hypervisor_reset:
|
||||||
|
|
||||||
|
; Proceed like with normal reset, skip problematic parts
|
||||||
|
|
||||||
|
sei ; disable the interrupts, as fast as possible
|
||||||
|
cld ; Kernal is not designed to operate in decimal mode
|
||||||
|
|
||||||
|
see ; disable extended stack
|
||||||
|
ldx #$FF ; initial stack size
|
||||||
|
txs
|
||||||
|
|
||||||
|
; XXX size-optimize this; share code with regular reset
|
||||||
|
|
||||||
|
jsr m65_reset_part ; initialize MEGA65 specific hardware
|
||||||
|
|
||||||
|
ldx #$28 ; 40 columns, screen disabled for now
|
||||||
|
stx VIC_SCROLX
|
||||||
|
|
||||||
|
jsr IOINIT_skip_DOS ; DOS needs to map memory over $8000 - not allowed under hypervisor
|
||||||
|
jsr JRAMTAS
|
||||||
|
jsr JRESTOR
|
||||||
|
jsr JCINT
|
||||||
|
|
||||||
|
; Finished
|
||||||
|
|
||||||
|
cli
|
||||||
|
rts
|
||||||
@@ -22,6 +22,12 @@ IOINIT:
|
|||||||
jsr (VK1__IOINIT)
|
jsr (VK1__IOINIT)
|
||||||
jmp m65dos_init ; end by initializing the MEGA65 internal DOS
|
jmp m65dos_init ; end by initializing the MEGA65 internal DOS
|
||||||
|
|
||||||
|
IOINIT_skip_DOS:
|
||||||
|
|
||||||
|
jsr map_KERNAL_1
|
||||||
|
jsr (VK1__IOINIT)
|
||||||
|
jmp map_NORMAL
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
;
|
;
|
||||||
|
|||||||
Reference in new issue
Block a user