2013-04-07 21:29:09 +00:00
|
|
|
;ACME 0.94.4
|
2012-02-27 21:14:46 +00:00
|
|
|
|
|
|
|
; ab hier liegt die Cursorsteuerung
|
|
|
|
; A = screenx, Y = screeny
|
|
|
|
!zone
|
|
|
|
crsrset sta .m ; buffer x
|
|
|
|
iny ; adjust height
|
|
|
|
iny
|
|
|
|
iny
|
|
|
|
sty .n ; buffer y
|
|
|
|
jsr crsroff
|
|
|
|
lda #0 ; clear Hi
|
2013-04-07 21:29:09 +00:00
|
|
|
sta vtemp + 1
|
|
|
|
.n = * + 1: lda #MODIFIED8 ; y
|
2012-02-27 21:14:46 +00:00
|
|
|
asl ; *2
|
|
|
|
asl ; *4
|
2013-04-07 21:29:09 +00:00
|
|
|
rol vtemp + 1
|
2012-02-27 21:14:46 +00:00
|
|
|
asl ; *8
|
2013-04-07 21:29:09 +00:00
|
|
|
rol vtemp + 1
|
2012-02-27 21:14:46 +00:00
|
|
|
asl ; *16
|
2013-04-07 21:29:09 +00:00
|
|
|
rol vtemp + 1
|
2012-02-27 21:14:46 +00:00
|
|
|
sta vtemp ; stash Lo
|
2013-04-07 21:29:09 +00:00
|
|
|
ldy vtemp + 1 ; copy Hi
|
|
|
|
sty vtemp + 2
|
2012-02-27 21:14:46 +00:00
|
|
|
asl ; *32
|
2013-04-07 21:29:09 +00:00
|
|
|
rol vtemp + 2
|
2012-02-27 21:14:46 +00:00
|
|
|
asl ; *64
|
2013-04-07 21:29:09 +00:00
|
|
|
rol vtemp + 2
|
2012-02-27 21:14:46 +00:00
|
|
|
adc vtemp ; + 16er-Lo
|
|
|
|
sta vtemp ; 80er-Lo in vtemp
|
|
|
|
bcc + ; page
|
2013-04-07 21:29:09 +00:00
|
|
|
inc vtemp + 1
|
|
|
|
clc
|
2012-02-27 21:14:46 +00:00
|
|
|
+
|
2013-04-07 21:29:09 +00:00
|
|
|
.m = * + 1: adc #MODIFIED8 ; x
|
2012-02-27 21:14:46 +00:00
|
|
|
sta vtemp ; store Lo
|
2013-04-07 21:29:09 +00:00
|
|
|
lda vtemp + 1 ; get 16er-Hi
|
|
|
|
adc vtemp + 2 ; add 64er-Hi
|
2012-02-27 21:14:46 +00:00
|
|
|
adc #attrhi ; add base
|
2013-04-07 21:29:09 +00:00
|
|
|
sta vtemp + 1 ; store Hi
|
2012-02-27 21:14:46 +00:00
|
|
|
|
|
|
|
!zone
|
|
|
|
crsron lda conreg ; buffert CR
|
|
|
|
sta .m
|
|
|
|
+bank15
|
|
|
|
jsr vpntcrsr ; set address
|
2013-04-07 21:29:09 +00:00
|
|
|
+wait_for_vdc
|
2012-02-27 21:14:46 +00:00
|
|
|
lda reg ; get attribute
|
|
|
|
sta tcolor ; buffer it
|
|
|
|
jsr vpntcrsr ; set address
|
|
|
|
lda clrcrsr ; get crsr
|
2013-04-07 21:29:09 +00:00
|
|
|
+wait_for_vdc
|
2012-02-27 21:14:46 +00:00
|
|
|
sta reg ; set crsr
|
2013-04-07 21:29:09 +00:00
|
|
|
.m = * + 1: lda #MODIFIED8 ; bank
|
2012-02-27 21:14:46 +00:00
|
|
|
sta conreg ; restore CR
|
|
|
|
rts
|
|
|
|
|
|
|
|
!zone
|
|
|
|
crsroff lda conreg ; buffer CR
|
|
|
|
sta .m
|
|
|
|
+bank15
|
|
|
|
jsr vpntcrsr ; set address
|
|
|
|
lda tcolor ; get attribute
|
2013-04-07 21:29:09 +00:00
|
|
|
+wait_for_vdc
|
2012-02-27 21:14:46 +00:00
|
|
|
sta reg ; set attribute
|
2013-04-07 21:29:09 +00:00
|
|
|
.m = * + 1: lda #MODIFIED8 ; bank
|
2012-02-27 21:14:46 +00:00
|
|
|
sta conreg ; restore CR
|
|
|
|
rts
|
|
|
|
|
|
|
|
; push data
|
|
|
|
!zone
|
|
|
|
crsrnew ldx crsrheap ; get stackpointer
|
|
|
|
lda vtemp ; get low
|
2013-04-07 21:29:09 +00:00
|
|
|
sta crsrheap, x ; push
|
|
|
|
lda vtemp + 1 ; get high
|
|
|
|
sta crsrheap + 1, x ; push
|
2012-02-27 21:14:46 +00:00
|
|
|
inx ; inc stackpointer
|
|
|
|
inx
|
|
|
|
stx crsrheap ; set stackpointer
|
|
|
|
jsr crsroff
|
|
|
|
|
|
|
|
!zone
|
|
|
|
crsrhide ldx #$3f ; place cursor
|
2013-04-07 21:29:09 +00:00
|
|
|
stx vtemp + 1 ; outside visible
|
2012-02-27 21:14:46 +00:00
|
|
|
ldx #$ff ; area
|
|
|
|
stx vtemp
|
|
|
|
rts
|
|
|
|
|
|
|
|
!zone
|
|
|
|
crsrold ldx crsrheap ; get stackpointer
|
|
|
|
dex ; previous entry !
|
|
|
|
dex
|
2013-04-07 21:29:09 +00:00
|
|
|
lda crsrheap, x ; get lo
|
2012-02-27 21:14:46 +00:00
|
|
|
sta vtemp ; set lo
|
2013-04-07 21:29:09 +00:00
|
|
|
lda crsrheap + 1, x ; get hi
|
|
|
|
sta vtemp + 1 ; set hi
|
2012-02-27 21:14:46 +00:00
|
|
|
stx crsrheap ; set stackpointer
|
|
|
|
jmp crsron
|
|
|
|
|
|
|
|
!zone
|
|
|
|
crsrinit ldx #1 ; init cursorstack
|
|
|
|
stx crsrheap
|
|
|
|
jmp crsrhide ; and hide cursor
|
|
|
|
|
|
|
|
crsrheap !fill 33, 33
|
|
|
|
|
|
|
|
vpntcrsr +ldax vtemp
|
|
|
|
jmp ramaccess ; set vdc
|