2015-09-27 18:12:25 +02:00
|
|
|
|
2015-10-12 14:40:12 +02:00
|
|
|
;
|
|
|
|
; Groepaz/Hitmen, 12.10.2015
|
|
|
|
;
|
|
|
|
; lowlevel kplot function for the soft80 implementation
|
|
|
|
;
|
|
|
|
|
2015-09-27 18:12:25 +02:00
|
|
|
.export soft80_kplot
|
2015-10-12 15:44:41 +02:00
|
|
|
.import soft80_internal_cursorxlsb
|
2015-09-27 18:12:25 +02:00
|
|
|
|
|
|
|
.include "c64.inc"
|
|
|
|
.include "soft80.inc"
|
|
|
|
|
|
|
|
soft80_kplot:
|
|
|
|
bcs @getpos
|
|
|
|
|
2015-09-28 17:12:20 +02:00
|
|
|
stx CURS_Y
|
|
|
|
sty CURS_X
|
|
|
|
|
2015-10-12 23:39:47 +02:00
|
|
|
sei
|
|
|
|
lda $01
|
|
|
|
pha
|
|
|
|
lda #$34 ; enable RAM under I/O
|
|
|
|
sta $01
|
|
|
|
|
2015-09-27 18:12:25 +02:00
|
|
|
; calc pointer to bitmap
|
2015-10-12 19:57:33 +02:00
|
|
|
lda soft80_bitmapylo,x
|
2015-09-27 18:12:25 +02:00
|
|
|
clc
|
2015-10-12 19:57:33 +02:00
|
|
|
adc soft80_bitmapxlo,y
|
2015-09-27 18:12:25 +02:00
|
|
|
sta SCREEN_PTR
|
2015-10-12 19:57:33 +02:00
|
|
|
lda soft80_bitmapyhi,x
|
|
|
|
adc soft80_bitmapxhi,y
|
2015-09-27 18:12:25 +02:00
|
|
|
sta SCREEN_PTR+1
|
|
|
|
|
2015-10-12 15:44:41 +02:00
|
|
|
tya
|
|
|
|
and #1
|
|
|
|
sta soft80_internal_cursorxlsb
|
|
|
|
|
2015-09-27 18:12:25 +02:00
|
|
|
; calc pointer to vram
|
|
|
|
tya
|
2015-10-12 19:57:33 +02:00
|
|
|
lsr a
|
|
|
|
|
2015-09-27 18:12:25 +02:00
|
|
|
clc
|
2015-10-12 19:57:33 +02:00
|
|
|
adc soft80_vramlo,x
|
2015-09-27 18:12:25 +02:00
|
|
|
sta CRAM_PTR
|
|
|
|
lda #0
|
2015-10-12 19:57:33 +02:00
|
|
|
adc soft80_vramhi,x
|
2015-09-27 18:12:25 +02:00
|
|
|
sta CRAM_PTR+1
|
|
|
|
|
2015-10-12 23:39:47 +02:00
|
|
|
pla
|
|
|
|
sta $01
|
|
|
|
cli
|
|
|
|
|
2015-09-27 18:12:25 +02:00
|
|
|
@getpos:
|
|
|
|
ldx CURS_Y
|
|
|
|
ldy CURS_X
|
|
|
|
rts
|
|
|
|
|
2015-10-09 13:34:23 +02:00
|
|
|
;-------------------------------------------------------------------------------
|
|
|
|
; force the init constructor to be imported
|
|
|
|
|
|
|
|
.import soft80_init
|
|
|
|
conio_init = soft80_init
|