fixed screensize, timertick, revers mode
This commit is contained in:
@@ -1,9 +1,10 @@
|
||||
;
|
||||
; Screen size variables
|
||||
;
|
||||
.include "pce.inc"
|
||||
|
||||
.export _screensize
|
||||
_screensize:
|
||||
.export screensize
|
||||
screensize:
|
||||
ldx xsize
|
||||
ldy ysize
|
||||
rts
|
||||
@@ -13,5 +14,5 @@ _screensize:
|
||||
.rodata
|
||||
.export xsize, ysize
|
||||
|
||||
xsize: .byte 64
|
||||
ysize: .byte 28
|
||||
xsize: .byte charsperline
|
||||
ysize: .byte screenrows
|
||||
@@ -51,7 +51,7 @@ set_palette:
|
||||
;
|
||||
;----------------------------------------------------------------------------
|
||||
|
||||
.importzp ptr1
|
||||
.importzp ptr1, tmp1
|
||||
conio_init:
|
||||
; Load font
|
||||
st0 #VDC_MAWR
|
||||
@@ -65,10 +65,35 @@ conio_init:
|
||||
sta ptr1+1
|
||||
|
||||
st0 #VDC_VWR ; VWR
|
||||
|
||||
lda #0
|
||||
sta tmp1
|
||||
jsr copy
|
||||
|
||||
lda #<font
|
||||
sta ptr1
|
||||
lda #>font
|
||||
sta ptr1+1
|
||||
|
||||
lda #$ff
|
||||
sta tmp1
|
||||
jsr copy
|
||||
|
||||
|
||||
ldx #0
|
||||
stx BGCOLOR
|
||||
inx
|
||||
stx CHARCOLOR
|
||||
|
||||
|
||||
rts
|
||||
|
||||
copy:
|
||||
ldy #$80 ; 128 chars
|
||||
charloop: ldx #$08 ; 8 bytes/char
|
||||
lineloop:
|
||||
lda (ptr1)
|
||||
eor tmp1
|
||||
sta a:VDC_DATA_LO ; bitplane 0
|
||||
stz a:VDC_DATA_HI ; bitplane 1
|
||||
|
||||
@@ -89,12 +114,6 @@ fillloop: st1 #$00
|
||||
dey
|
||||
bne charloop ; next character
|
||||
|
||||
ldx #0
|
||||
stx BGCOLOR
|
||||
inx
|
||||
stx CHARCOLOR
|
||||
|
||||
|
||||
rts
|
||||
|
||||
.rodata
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
.export newline, plot
|
||||
.import popa, _gotoxy
|
||||
.import PLOT
|
||||
.import xsize
|
||||
|
||||
.importzp tmp3,tmp4
|
||||
|
||||
@@ -38,7 +39,7 @@ cputdirect:
|
||||
advance:
|
||||
ldy CURS_X
|
||||
iny
|
||||
cpy #xsize
|
||||
cpy xsize
|
||||
bne L3
|
||||
jsr newline ; new line
|
||||
ldy #0 ; + cr
|
||||
|
||||
@@ -6,16 +6,11 @@ joystick support should get verified on real hw
|
||||
- the masks for buttons may be wrong.
|
||||
- 6 button gamepads are different and need slightly different code
|
||||
|
||||
revers() is a dummy function, actual reverse output is not supported yet
|
||||
|
||||
some graphical petscii chars should get added to the charset
|
||||
|
||||
interruptor support in crt0 (and cfg) is missing
|
||||
- clock() should be hooked to a VBL interrupt
|
||||
|
||||
conio lacks support for different screen sizes, which could be used with
|
||||
different video modes
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
a good emulator to use for PC-Engine is "mednafen" (mednafen.sourceforge.net)
|
||||
|
||||
@@ -1,10 +1,24 @@
|
||||
|
||||
; FIXME: actual revers output is not supported yet
|
||||
.include "pce.inc"
|
||||
|
||||
.export _revers
|
||||
_revers:
|
||||
lda #0
|
||||
rts
|
||||
.export _revers
|
||||
|
||||
.proc _revers
|
||||
|
||||
ldx #$00 ; Assume revers off
|
||||
tay ; Test onoff
|
||||
beq L1 ; Jump if off
|
||||
ldx #$80 ; Load on value
|
||||
ldy #$00 ; Assume old value is zero
|
||||
L1: lda RVS ; Load old value
|
||||
stx RVS ; Set new value
|
||||
beq L2 ; Jump if old value zero
|
||||
iny ; Make old value = 1
|
||||
L2: ldx #$00 ; Load high byte of result
|
||||
tya ; Load low byte, set CC
|
||||
rts
|
||||
|
||||
.endproc
|
||||
|
||||
;-------------------------------------------------------------------------------
|
||||
; force the init constructor to be imported
|
||||
|
||||
Reference in New Issue
Block a user