]> git.sur5r.net Git - cc65/blob - libsrc/c64/soft80mono_kplot.s
Undo my previous commit.
[cc65] / libsrc / c64 / soft80mono_kplot.s
1
2 ;
3 ; Groepaz/Hitmen, 19.10.2015
4 ;
5 ; lowlevel kplot function for the monochrome soft80 implementation
6 ;
7
8         .export         soft80mono_kplot
9         .import         soft80mono_internal_cursorxlsb
10
11         .include        "c64.inc"
12         .include        "soft80.inc"
13
14 soft80mono_kplot:
15         bcs     @getpos
16
17         stx     CURS_Y
18         sty     CURS_X
19
20         sei
21         lda     $01
22         pha
23         lda     #$34                            ; enable RAM under I/O
24         sta     $01
25
26         ; calc pointer to bitmap
27         lda     soft80_bitmapylo,x
28         clc
29         adc     soft80_bitmapxlo,y
30         sta     SCREEN_PTR
31         lda     soft80_bitmapyhi,x
32         adc     soft80_bitmapxhi,y
33         sta     SCREEN_PTR+1
34
35         tya
36         and     #1
37         sta     soft80mono_internal_cursorxlsb
38
39         pla
40         sta     $01
41         cli
42
43 @getpos:
44         ldx     CURS_Y
45         ldy     CURS_X
46         rts
47
48 ;-------------------------------------------------------------------------------
49 ; force the init constructor to be imported
50
51         .import soft80mono_init
52 conio_init      = soft80mono_init