simplify Home logic

no longer need to switch in ROM
This commit is contained in:
4am 2020-03-13 10:34:56 -04:00
parent 47998cb9d4
commit 3a14c998f9
2 changed files with 15 additions and 24 deletions

View File

@ -41,6 +41,7 @@ NEWVIDEO = $C029 ; IIgs graphics modes (also VidHD)
SPEAKER = $C030 ; chirp chirp
CLOCKCTL = $C034 ; bits 0-3 are IIgs border color (also VidHD)
SHADOW = $C035 ; IIgs auxmem-to-bank-E1 shadowing (also VidHD)
TEXTMODE = $C051
PAGE1 = $C054 ; page 1 (affects text, HGR, DHGR)
PAGE2 = $C055 ; page 2 (affects text, HGR, DHGR)
DHIRESON = $C05E ; double hi-res on switch

View File

@ -39,7 +39,7 @@ ClearScreens
; clear and display text screen (HARDER THAN IT SOUNDS)
;
; in: none
; out: $0106..$011F clobbered
; out: none
;------------------------------------------------------------------------------
Home
lda MachineStatus
@ -57,37 +57,27 @@ Home
sta CLOCKCTL ; black border
sta CLOCKCTL ; set twice for VidHD
@noSHR
ldx #(.end-@start)
- lda @start-1,x
sta $105,x
lda #$A0 ; clear text screen page 1
ldx #$78 ; but preserve screen holes
- sta $3FF,x
sta $47F,x
sta $4FF,x
sta $57F,x
sta $5FF,x
sta $67F,x
sta $6FF,x
sta $77F,x
dex
bne -
stx gMachineInDHGRMode
jmp $106
@start
; this will be run from main memory
lda #$A0 ; clear text screen page 1
ldx #$77
- sta $400,x
sta $480,x
sta $500,x
sta $580,x
sta $600,x
sta $680,x
sta $700,x
sta $780,x
dex
bpl -
sta DHIRESOFF ; get out of DHGR mode
sta CLR80VID ; get out of DHGR mode
; write-order matters for RGB-card
sta CLR80VID ; /!\ order of operations matters for RGB card
lda PAGE1
lda $C051 ; now show it
lda TEXTMODE
SwitchToBank1
+READ_RAM1_WRITE_RAM1
rts ; and return to caller
.end
rts
;------------------------------------------------------------------------------
; BlankDHGR