fixed a few things, compiles again :)

This commit is contained in:
mrdudz
2017-06-17 03:01:31 +02:00
parent dd2972d699
commit b523f070f3
9 changed files with 33 additions and 85 deletions

View File

@@ -163,8 +163,13 @@ SID_Read3 := $D41C
; --------------------------------------------------------------------------- ; ---------------------------------------------------------------------------
; I/O: VDC (128 only) ; I/O: VDC (128 only)
VDC_INDEX := $D600 VDC_INDEX := $D600 ; VDC address
VDC_DATA := $D601 VDC_DATA := $D601 ; VDC data
VDC_DATA_HI := 18
VDC_DATA_LO := 19
VDC_CSET := 28
VDC_DATA_RW := 31
; --------------------------------------------------------------------------- ; ---------------------------------------------------------------------------
; I/O: CIAs ; I/O: CIAs

View File

@@ -6,7 +6,7 @@
.import mul40 .import mul40
.importzp ptr4 .importzp ptr4
.include "atari/atari.inc" .include "atari.inc"
.segment "CODE" .segment "CODE"

View File

@@ -8,7 +8,7 @@
.include "zeropage.inc" .include "zeropage.inc"
.include "c128/c128.inc" .include "c128.inc"
.segment "CODE" .segment "CODE"
@@ -57,18 +57,18 @@ _cpeekchar:
@s: @s:
; get byte from vdc mem ; get byte from vdc mem
ldx #VDC_DATA_LO ldx #VDC_DATA_LO
stx VDC_ADDR_REG stx VDC_INDEX
@L0: bit VDC_ADDR_REG @L0: bit VDC_INDEX
bpl @L0 bpl @L0
sta VDC_DATA_REG sta VDC_DATA
dex dex
tya tya
stx VDC_ADDR_REG stx VDC_INDEX
sta VDC_DATA_REG sta VDC_DATA
ldx #VDC_DATA_RW ldx #VDC_DATA_RW
stx VDC_ADDR_REG stx VDC_INDEX
@L1: bit VDC_ADDR_REG @L1: bit VDC_INDEX
bpl @L1 bpl @L1
lda VDC_DATA_REG lda VDC_DATA
jmp @return jmp @return

View File

@@ -4,7 +4,7 @@
.import _gotoxy .import _gotoxy
.include "c128/c128.inc" .include "c128.inc"
.segment "CODE" .segment "CODE"
@@ -33,20 +33,20 @@ _cpeekcol:
@s: @s:
; get byte from vdc mem ; get byte from vdc mem
ldx #VDC_DATA_LO ldx #VDC_DATA_LO
stx VDC_ADDR_REG stx VDC_INDEX
@L0: bit VDC_ADDR_REG @L0: bit VDC_INDEX
bpl @L0 bpl @L0
sta VDC_DATA_REG sta VDC_DATA
dex dex
;;tya ;;tya
stx VDC_ADDR_REG stx VDC_INDEX
sty VDC_DATA_REG sty VDC_DATA
ldx #VDC_DATA_RW ldx #VDC_DATA_RW
stx VDC_ADDR_REG stx VDC_INDEX
@L1: bit VDC_ADDR_REG @L1: bit VDC_INDEX
bpl @L1 bpl @L1
lda VDC_DATA_REG lda VDC_DATA
and #$0f and #$0f

View File

@@ -1,39 +0,0 @@
.export _cpeekchar
.export _cpeekcharxy
.import _gotoxy
.include "cbm/cbm.inc"
.segment "CODE"
_cpeekcharxy:
jsr _gotoxy ; Set cursor
_cpeekchar:
ldy CURS_X
lda (SCREEN_PTR),y ; get char
ldx #0
and #$7f
; 0 - $1f +$40
; $20 - $3f
; $40 - $7e +$80
cmp #$1f
bcs @sk1
;; clc
adc #$40
rts
@sk1:
cmp #$40
bcc @end
clc
adc #$80
@end:
rts

View File

@@ -1,21 +0,0 @@
.export _cpeekcol
.export _cpeekcolxy
.import _gotoxy
.include "cc65/conio.inc"
.segment "CODE"
_cpeekcolxy:
jsr _gotoxy ; Set cursor
_cpeekcol:
ldy CURS_X
lda (CRAM_PTR),y ; get color
and #$0f
ldx #0
rts

View File

@@ -4,7 +4,8 @@
.import _gotoxy .import _gotoxy
.include "cbm510/cbm510.inc" .include "cbm510.inc"
.include "extzp.inc"
.segment "CODE" .segment "CODE"

View File

@@ -4,7 +4,8 @@
.import _gotoxy .import _gotoxy
.include "cbm510/cbm510.inc" .include "cbm510.inc"
.include "extzp.inc"
.segment "CODE" .segment "CODE"

View File

@@ -4,7 +4,8 @@
.import _gotoxy .import _gotoxy
.include "cbm610/cbm610.inc" .include "cbm610.inc"
.include "extzp.inc"
.segment "CODE" .segment "CODE"