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-10-12 21:39:47 +00:00
|
|
|
sei
|
|
|
|
lda $01
|
|
|
|
pha
|
|
|
|
lda #$34 ; enable RAM under I/O
|
|
|
|
sta $01
|
|
|
|
|
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
|
|
|
|
|
2015-10-12 21:39:47 +00:00
|
|
|
pla
|
|
|
|
sta $01
|
|
|
|
cli
|
|
|
|
|
2015-09-27 16:12:25 +00:00
|
|
|
@getpos:
|
|
|
|
ldx CURS_Y
|
|
|
|
ldy CURS_X
|
|
|
|
rts
|
|
|
|
|
2015-10-09 11:34:23 +00:00
|
|
|
;-------------------------------------------------------------------------------
|
|
|
|
; force the init constructor to be imported
|
|
|
|
|
|
|
|
.import soft80_init
|
|
|
|
conio_init = soft80_init
|