This commit is contained in:
FeralChild64 committed 2021-08-08 20:54:29 +02:00
1 parent 02e9badb65
commit a12eaff249
4 files changed
+19 -14

No files matched your search

BIN
View File
Binary file not shown.
Binary file not shown.
+14 -14
View File
@@ -8,33 +8,33 @@ 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
sei ; disable the interrupts, as fast as possible
cld ; Kernal is not designed to operate in decimal mode
lda #$00
sta NMINV+1 ; soft-disable custom NMI interrupt handler
sta NMINV+1 ; soft-disable custom NMI interrupt handler
; Do not reset the stack (see, ldx #$FF, txs) - we need to know where to return
jsr m65_reset_part ; init MEGA65 specific hardware, shutdown VIC-IV, clear native mode mark
ldx #$28 ; 40 columns, screen disabled for now
jsr m65_reset_part ; init MEGA65 specific hardware, shutdown VIC-IV, clear native mode mark
ldx #$28 ; 40 columns, screen disabled for now
stx VIC_SCROLX
jsr IOINIT_skip_DOS ; better not to initialize DOS under hypervisor, risk of incompatibility
jsr m65_reset_common ; RAMTAS, RESTOR, CINT
jsr IOINIT_skip_DOS ; better not to initialize DOS under hypervisor, risk of incompatibility
jsr m65_reset_part_skip_palette ; also skip palette setting, but do RAMTAS, RESTOR, CINT
; Restore hypervisor memory mapping and quit
lda #$00 ; lower memory - megabyte $00
ldx #$0F ; lower memory - request to set the megabyte
ldy #$FF ; higher memory - megabyte $FF
ldz #$0F ; higher memory - request to set the megabyte
lda #$00 ; lower memory - megabyte $00
ldx #$0F ; lower memory - request to set the megabyte
ldy #$FF ; higher memory - megabyte $FF
ldz #$0F ; higher memory - request to set the megabyte
map
tax ; lower memory - keep unmapped (.A is already 0)
tay ; higher memory - lower 16 bits of the offset are also 0's
ldz #$3F ; higher memory - map is %0011 = $3, offset is $FF0
tax ; lower memory - keep unmapped (.A is already 0)
tay ; higher memory - lower 16 bits of the offset are also 0's
ldz #$3F ; higher memory - map is %0011 = $3, offset is $FF0
map
eom
+5
View File
@@ -8,6 +8,11 @@ m65_reset_part:
jsr map_KERNAL_1
jsr (VK1__m65_colorset_reset)
; FALLTROUGH
m65_reset_part_skip_palette: ; for hypervisor reset do not set palette, see https://github.com/MEGA65/open-roms/issues/68
jsr map_NORMAL ; we want normal memory mapping
jsr viciv_shutdown ; by default we do not want the VIC-IV