mirror of
https://github.com/cc65/cc65.git
synced 2025-01-10 03:30:05 +00:00
initial import from old sources
This commit is contained in:
parent
25f4482641
commit
eb96a90e5f
20
libsrc/c128/waitvblank.s
Normal file
20
libsrc/c128/waitvblank.s
Normal file
@ -0,0 +1,20 @@
|
||||
|
||||
.export _waitvblank
|
||||
|
||||
.include "c128/c128.inc"
|
||||
|
||||
_waitvblank:
|
||||
lda PALFLAG
|
||||
beq @ntsc
|
||||
ldx #(312-24)-256
|
||||
.byte $2c
|
||||
@ntsc:
|
||||
ldx #(262-4)-256
|
||||
@l1:
|
||||
lda VIC_CTRL1
|
||||
and #$80
|
||||
beq @l1
|
||||
@l2:
|
||||
cpx VIC_HLINE
|
||||
bcs @l2
|
||||
rts
|
20
libsrc/c64/waitvblank.s
Normal file
20
libsrc/c64/waitvblank.s
Normal file
@ -0,0 +1,20 @@
|
||||
|
||||
.export _waitvblank
|
||||
|
||||
.include "c64/c64.inc"
|
||||
|
||||
_waitvblank:
|
||||
lda PALFLAG
|
||||
beq @ntsc
|
||||
ldx #(312-24)-256
|
||||
.byte $2c
|
||||
@ntsc:
|
||||
ldx #(262-4)-256
|
||||
@l1:
|
||||
lda VIC_CTRL1
|
||||
and #$80
|
||||
beq @l1
|
||||
@l2:
|
||||
cpx VIC_HLINE
|
||||
bcs @l2
|
||||
rts
|
37
libsrc/cbm510/waitvblank.s
Normal file
37
libsrc/cbm510/waitvblank.s
Normal file
@ -0,0 +1,37 @@
|
||||
|
||||
.export _waitvblank
|
||||
.import PALFLAG
|
||||
.import sys_bank, restore_bank
|
||||
|
||||
.importzp vic
|
||||
|
||||
.include "cbm510/cbm510.inc"
|
||||
|
||||
_waitvblank:
|
||||
rts ; FIXME
|
||||
|
||||
jsr sys_bank ; Switch to the system bank
|
||||
|
||||
lda PALFLAG
|
||||
beq ntsc
|
||||
ldx #(312-24)-256
|
||||
.byte $2c
|
||||
ntsc:
|
||||
ldx #(262-2)-256
|
||||
|
||||
sei
|
||||
ldy #VIC_CTRL1
|
||||
l1:
|
||||
lda (vic),y
|
||||
and #$80
|
||||
beq l1
|
||||
|
||||
;?!?
|
||||
; ldy #VIC_HLINE
|
||||
; txa
|
||||
;l2:
|
||||
; cmp (vic),y
|
||||
; bcs l2
|
||||
|
||||
cli
|
||||
jmp restore_bank
|
16
libsrc/vic20/waitvblank.s
Normal file
16
libsrc/vic20/waitvblank.s
Normal file
@ -0,0 +1,16 @@
|
||||
.export _waitvblank
|
||||
|
||||
.include "vic20/vic20.inc"
|
||||
|
||||
_waitvblank:
|
||||
lda PALFLAG
|
||||
beq @ntsc
|
||||
ldx #(312-8)/2
|
||||
.byte $2c
|
||||
@ntsc:
|
||||
ldx #(262-8)/2
|
||||
@l2:
|
||||
cpx VIC_HLINE
|
||||
bcs @l2
|
||||
rts
|
||||
|
Loading…
x
Reference in New Issue
Block a user