1
0
mirror of https://github.com/cc65/cc65.git synced 2024-11-19 06:31:31 +00:00
cc65/libsrc/pce/vdc.s

33 lines
857 B
ArmAsm
Raw Normal View History

2015-10-02 14:50:22 +00:00
.export vdc_init
2015-08-29 13:58:57 +00:00
.include "pce.inc"
2015-08-29 13:58:57 +00:00
; FIXME: implement selection of different video modes at runtime
HIRES = 1
vdc_init:
lda VDC_CTRL
2015-08-29 13:58:57 +00:00
VREG VDC_CR , $0000 ; disable display and interrupts
VREG VDC_BXR, $0000 ; no scrolling
VREG VDC_BYR, $0000
VREG VDC_MWR, $0070 ; 128 x 64 tiles (1024 x 512 pixels)
VREG VDC_VSR, $1702 ; CRTC
VREG VDC_VDR, $00DF ; CRTC - VDS
VREG VDC_VCR, $000C ; CRTC - VDE
VREG VDC_DCR, $0000
2015-07-15 11:18:12 +00:00
.if HIRES
VREG VDC_HSR, $0C02 ; CRTC
VREG VDC_HDR, $043C ; CRTC - HDS
2015-08-29 13:58:57 +00:00
lda #$06
2015-07-15 11:18:12 +00:00
.else
VREG VDC_HSR, $0202 ; CRTC
VREG VDC_HDR, $041F ; CRTC - HDS
2015-08-29 13:58:57 +00:00
lda #$04
2015-07-15 11:18:12 +00:00
.endif
sta VCE_CTRL
lda VDC_CTRL
2015-08-29 13:58:57 +00:00
rts