2015-09-27 16:12:25 +00:00
|
|
|
|
2015-10-12 12:40:12 +00:00
|
|
|
;
|
|
|
|
; Groepaz/Hitmen, 12.10.2015
|
|
|
|
;
|
|
|
|
; lowlevel kplot function for the soft80 implementation
|
|
|
|
;
|
|
|
|
|
2015-09-27 16:12:25 +00:00
|
|
|
.export soft80_kplot
|
2015-10-12 13:44:41 +00:00
|
|
|
.import soft80_internal_cursorxlsb
|
2015-09-27 16:12:25 +00:00
|
|
|
|
|
|
|
.include "c64.inc"
|
|
|
|
.include "soft80.inc"
|
|
|
|
|
|
|
|
soft80_kplot:
|
|
|
|
bcs @getpos
|
|
|
|
|
2015-09-28 15:12:20 +00:00
|
|
|
stx CURS_Y
|
|
|
|
sty CURS_X
|
|
|
|
|
2015-09-27 16:12:25 +00:00
|
|
|
; calc pointer to bitmap
|
2015-10-12 17:57:33 +00:00
|
|
|
lda soft80_bitmapylo,x
|
2015-09-27 16:12:25 +00:00
|
|
|
clc
|
2015-10-12 17:57:33 +00:00
|
|
|
adc soft80_bitmapxlo,y
|
2015-09-27 16:12:25 +00:00
|
|
|
sta SCREEN_PTR
|
2015-10-12 17:57:33 +00:00
|
|
|
lda soft80_bitmapyhi,x
|
|
|
|
adc soft80_bitmapxhi,y
|
2015-09-27 16:12:25 +00:00
|
|
|
sta SCREEN_PTR+1
|
|
|
|
|
2015-10-12 13:44:41 +00:00
|
|
|
tya
|
|
|
|
and #1
|
|
|
|
sta soft80_internal_cursorxlsb
|
|
|
|
|
2015-09-27 16:12:25 +00:00
|
|
|
; calc pointer to vram
|
|
|
|
tya
|
2015-10-12 17:57:33 +00:00
|
|
|
lsr a
|
|
|
|
|
2015-09-27 16:12:25 +00:00
|
|
|
clc
|
2015-10-12 17:57:33 +00:00
|
|
|
adc soft80_vramlo,x
|
2015-09-27 16:12:25 +00:00
|
|
|
sta CRAM_PTR
|
|
|
|
lda #0
|
2015-10-12 17:57:33 +00:00
|
|
|
adc soft80_vramhi,x
|
2015-09-27 16:12:25 +00:00
|
|
|
sta CRAM_PTR+1
|
|
|
|
|
|
|
|
@getpos:
|
|
|
|
ldx CURS_Y
|
|
|
|
ldy CURS_X
|
|
|
|
rts
|
|
|
|
|
2015-10-12 12:40:12 +00:00
|
|
|
; FIXME: the following tables take up 260 bytes, perhaps move them
|
|
|
|
; to 0xdc00... area in ram under i/o
|
|
|
|
|
2015-09-27 16:49:30 +00:00
|
|
|
.rodata
|
2015-10-12 17:57:33 +00:00
|
|
|
soft80_bitmapxlo:
|
2015-09-27 16:49:30 +00:00
|
|
|
.repeat 80,col
|
|
|
|
.byte <((col/2)*8)
|
2015-09-27 16:12:25 +00:00
|
|
|
.endrepeat
|
2015-10-12 17:57:33 +00:00
|
|
|
soft80_bitmapxhi:
|
2015-09-27 16:12:25 +00:00
|
|
|
.repeat 80,col
|
|
|
|
.byte >((col/2)*8)
|
|
|
|
.endrepeat
|
2015-10-12 17:57:33 +00:00
|
|
|
soft80_vramlo:
|
2015-09-27 16:49:30 +00:00
|
|
|
.repeat 25,row
|
|
|
|
.byte <(soft80_vram+(row*40))
|
|
|
|
.endrepeat
|
2015-10-12 17:57:33 +00:00
|
|
|
soft80_vramhi:
|
2015-09-27 16:49:30 +00:00
|
|
|
.repeat 25,row
|
|
|
|
.byte >(soft80_vram+(row*40))
|
|
|
|
.endrepeat
|
2015-10-12 17:57:33 +00:00
|
|
|
soft80_bitmapylo:
|
2015-09-27 16:49:30 +00:00
|
|
|
.repeat 25,row
|
|
|
|
.byte <(soft80_bitmap+(row*40*8))
|
|
|
|
.endrepeat
|
2015-10-12 17:57:33 +00:00
|
|
|
soft80_bitmapyhi:
|
2015-09-27 16:49:30 +00:00
|
|
|
.repeat 25,row
|
|
|
|
.byte >(soft80_bitmap+(row*40*8))
|
|
|
|
.endrepeat
|
2015-09-27 16:12:25 +00:00
|
|
|
|
2015-10-09 11:34:23 +00:00
|
|
|
;-------------------------------------------------------------------------------
|
|
|
|
; force the init constructor to be imported
|
|
|
|
|
|
|
|
.import soft80_init
|
|
|
|
conio_init = soft80_init
|