mirror of
https://github.com/deater/dos33fsprogs.git
synced 2024-06-10 13:29:57 +00:00
double: more vblank
This commit is contained in:
parent
bf32f928f9
commit
81c2b777ee
|
@ -1,16 +1,20 @@
|
||||||
; soft-switches
|
; soft-switches
|
||||||
; yes, I know these aren't necessary the "official" names
|
; yes, I know these aren't necessary the "official" names
|
||||||
|
|
||||||
KEYBOARD = $C000 ; Read
|
KEYBOARD = $C000 ; Read keypress+128
|
||||||
EIGHTYSTOREOFF = $C000 ; Write (turns off 80store)
|
EIGHTYSTOREOFF = $C000 ; (write) turns off 80store
|
||||||
EIGHTYSTOREON = $C001 ; Write (page2 writes to AUX memory)
|
EIGHTYSTOREON = $C001 ; (write) page2 writes to AUX memory
|
||||||
CLR80COL = $C00C
|
CLR80COL = $C00C
|
||||||
SET80COL = $C00D
|
SET80COL = $C00D
|
||||||
SETMOUSETEXT = $C00F ; (write) enable mouse text
|
SETMOUSETEXT = $C00F ; (write) enable mouse text
|
||||||
|
|
||||||
TBCOLOR = $C022 ; IIgs text foreground / background colors
|
VBLANK = $C019 ; *not* RDVBL (VBL signal low) (iie, opposite iigs)
|
||||||
CLOCKCTL = $C034 ; bits 0-3 are IIgs border color
|
RDVBLBAR = $C019 ; iic
|
||||||
NEWVIDEO = $C029 ; IIgs graphics modes
|
|
||||||
|
TBCOLOR = $C022 ; IIgs text foreground / background colors
|
||||||
|
CLOCKCTL = $C034 ; bits 0-3 are IIgs border color
|
||||||
|
NEWVIDEO = $C029 ; IIgs graphics modes
|
||||||
|
RDVBLMSK = $C041 ; iic read vbl interrupt
|
||||||
|
|
||||||
SET_GR = $C050
|
SET_GR = $C050
|
||||||
SET_TEXT= $C051
|
SET_TEXT= $C051
|
||||||
|
@ -20,9 +24,13 @@ PAGE1 = $C054
|
||||||
PAGE2 = $C055
|
PAGE2 = $C055
|
||||||
LORES = $C056
|
LORES = $C056
|
||||||
HIRES = $C057
|
HIRES = $C057
|
||||||
CLRAN3 = $C05E ; in 80-col mode, enable double graphics
|
DISVBL = $C05B ; (write) (iic) (ioudison) disable VBL interrupt
|
||||||
SETAN3 = $C05F ; in 80-col mode, disable double graphics
|
ENVBL = $C05B ; (write) (iic) (ioudison) enable VBL interrupt
|
||||||
VBLANK = $C019 ; *not* RDVBL (VBL signal low)
|
CLRAN3 = $C05E ; (write) in 80-col mode, enable double graphics
|
||||||
|
SETAN3 = $C05F ; (write) in 80-col mode, disable double graphics
|
||||||
|
PTRIG = $C070 ; analog input reset / reset VBL interrupt (iic)
|
||||||
|
IOUDISON = $C07E ; (write) disable IOU
|
||||||
|
IOUDISOFF = $C07F ; (write) enable IOU
|
||||||
|
|
||||||
; ROM routines
|
; ROM routines
|
||||||
SETCOL = $F864 ; COLOR=A*17
|
SETCOL = $F864 ; COLOR=A*17
|
||||||
|
|
43
vaporlock/doubledouble/vblank.s
Normal file
43
vaporlock/doubledouble/vblank.s
Normal file
|
@ -0,0 +1,43 @@
|
||||||
|
; alternate implementation by Oliver Schmidt
|
||||||
|
; from https://github.com/cc65/cc65/blob/master/libsrc/apple2/waitvsync.s
|
||||||
|
|
||||||
|
wait_vblank_iic:
|
||||||
|
; sei ; disables interrupts
|
||||||
|
sta IOUDISOFF
|
||||||
|
lda RDVBLMSK
|
||||||
|
bit ENVBL
|
||||||
|
bit PTRIG ; Reset VBL interrupt flag
|
||||||
|
: bit RDVBLBAR
|
||||||
|
bpl :-
|
||||||
|
asl
|
||||||
|
bcs :+ ; VBL interrupts were already enabled
|
||||||
|
bit DISVBL
|
||||||
|
: sta IOUDISON ; IIc Tech Ref Man: The firmware normally leaves IOUDIS on.
|
||||||
|
; cli ; re-enable interrupts
|
||||||
|
|
||||||
|
rts
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
;===========================
|
||||||
|
; wait for vblank on IIgs
|
||||||
|
; opposte of IIe?
|
||||||
|
wait_vblank_iigs:
|
||||||
|
lda VBLANK
|
||||||
|
bpl wait_vblank_iigs ; wait for negative (in vblank)
|
||||||
|
wait_vblank_done_iigs:
|
||||||
|
lda VBLANK ; wait for positive (vlank done)
|
||||||
|
bmi wait_vblank_done_iigs
|
||||||
|
rts
|
||||||
|
|
||||||
|
;===========================
|
||||||
|
; wait for vblank on IIe
|
||||||
|
wait_vblank_iie:
|
||||||
|
lda VBLANK
|
||||||
|
bmi wait_vblank_iie ; wait for positive (in vblank)
|
||||||
|
wait_vblank_done_iie:
|
||||||
|
lda VBLANK ; wait for negative (vlank done)
|
||||||
|
bpl wait_vblank_done_iie
|
||||||
|
rts
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user