mirror of
https://github.com/irmen/prog8.git
synced 2025-01-11 13:29:45 +00:00
cx16: retain display mode (composite etc)
This commit is contained in:
parent
0f6a6d6fea
commit
153b422496
@ -82,11 +82,10 @@ gfx2 {
|
||||
bpp = 2
|
||||
}
|
||||
else -> {
|
||||
; back to default text mode and colors
|
||||
cx16.VERA_CTRL = %10000000 ; reset VERA and palette
|
||||
c64.IOINIT()
|
||||
c64.RESTOR()
|
||||
; back to default text mode
|
||||
cx16.r15L = cx16.VERA_DC_VIDEO & %00000111 ; retain chroma + output mode
|
||||
c64.CINT()
|
||||
cx16.VERA_DC_VIDEO = (cx16.VERA_DC_VIDEO & %11111000) | cx16.r15L
|
||||
width = 0
|
||||
height = 0
|
||||
bpp = 0
|
||||
|
@ -613,12 +613,19 @@ asmsub init_system() {
|
||||
%asm {{
|
||||
sei
|
||||
cld
|
||||
lda VERA_DC_VIDEO
|
||||
and #%00000111 ; retain chroma + output mode
|
||||
sta P8ZP_SCRATCH_REG
|
||||
lda #$80
|
||||
sta VERA_CTRL
|
||||
sta VERA_CTRL ; reset vera
|
||||
stz $01 ; select rom bank 0 (enable kernal)
|
||||
jsr c64.IOINIT
|
||||
jsr c64.RESTOR
|
||||
jsr c64.CINT
|
||||
lda VERA_DC_VIDEO
|
||||
and #%11111000
|
||||
ora P8ZP_SCRATCH_REG
|
||||
sta VERA_DC_VIDEO ; keep old output mode
|
||||
lda #$90 ; black
|
||||
jsr c64.CHROUT
|
||||
lda #1 ; swap fg/bg
|
||||
|
@ -1,22 +1,22 @@
|
||||
%import gfx2
|
||||
%import textio
|
||||
%import test_stack
|
||||
%import math
|
||||
|
||||
%option no_sysinit
|
||||
%zeropage basicsafe
|
||||
|
||||
|
||||
main {
|
||||
|
||||
sub start() {
|
||||
gfx2.screen_mode(5)
|
||||
|
||||
; demo1()
|
||||
; sys.wait(3*60)
|
||||
demo1()
|
||||
sys.wait(2*60)
|
||||
demo2()
|
||||
|
||||
gfx2.screen_mode(0)
|
||||
txt.print("done!\n")
|
||||
|
||||
test_stack.test()
|
||||
}
|
||||
|
||||
sub demo1() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user