1
0
mirror of https://github.com/cc65/cc65.git synced 2024-06-08 15:29:37 +00:00

initial import from old sources

This commit is contained in:
mrdudz 2016-02-28 22:35:46 +01:00
parent 25f4482641
commit eb96a90e5f
4 changed files with 93 additions and 0 deletions

20
libsrc/c128/waitvblank.s Normal file
View 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
View 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

View 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
View 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