2001-09-13 21:47:10 +00:00
|
|
|
;
|
|
|
|
; Ullrich von Bassewitz, 13.09.2001
|
|
|
|
;
|
|
|
|
; PLOT routine for the 510.
|
|
|
|
;
|
|
|
|
|
2002-11-19 23:02:47 +00:00
|
|
|
.export PLOT
|
2001-09-14 17:09:22 +00:00
|
|
|
.import __VIDRAM_START__
|
2001-09-13 21:47:10 +00:00
|
|
|
.importzp crtc
|
|
|
|
|
2002-05-26 09:08:52 +00:00
|
|
|
.include "cbm510.inc"
|
2001-09-14 14:37:08 +00:00
|
|
|
|
|
|
|
.macpack generic
|
|
|
|
|
2001-09-14 09:52:30 +00:00
|
|
|
; ------------------------------------------------------------------------
|
|
|
|
;
|
2001-09-13 21:47:10 +00:00
|
|
|
|
2002-11-19 23:02:47 +00:00
|
|
|
.proc PLOT
|
2001-09-13 21:47:10 +00:00
|
|
|
|
2001-09-14 14:37:08 +00:00
|
|
|
bcs get
|
2001-09-13 21:47:10 +00:00
|
|
|
|
2001-09-14 14:37:08 +00:00
|
|
|
stx CURS_Y
|
2001-09-14 09:52:30 +00:00
|
|
|
sty CURS_X
|
|
|
|
|
2001-09-14 14:37:08 +00:00
|
|
|
lda LineLSBTab,x
|
|
|
|
sta SCREEN_PTR
|
|
|
|
sta CRAM_PTR
|
|
|
|
lda LineMSBTab,x
|
|
|
|
sta SCREEN_PTR+1
|
2001-09-14 17:09:22 +00:00
|
|
|
sub #>__VIDRAM_START__
|
2001-09-14 14:37:08 +00:00
|
|
|
add #>COLOR_RAM
|
|
|
|
sta CRAM_PTR+1
|
|
|
|
|
|
|
|
get: ldx CURS_Y
|
|
|
|
ldy CURS_X
|
|
|
|
|
2001-09-13 21:47:10 +00:00
|
|
|
rts
|
2001-09-14 14:37:08 +00:00
|
|
|
|
2001-09-13 21:47:10 +00:00
|
|
|
.endproc
|
|
|
|
|
|
|
|
; -------------------------------------------------------------------------
|
|
|
|
; Low bytes of the start address of the screen lines
|
|
|
|
|
|
|
|
.rodata
|
|
|
|
|
2001-09-14 09:52:30 +00:00
|
|
|
.macro LineLoTab
|
|
|
|
.repeat 25, I
|
2001-09-14 17:09:22 +00:00
|
|
|
.byte <(__VIDRAM_START__ + I * 40)
|
2001-09-14 09:52:30 +00:00
|
|
|
.endrep
|
|
|
|
.endmacro
|
|
|
|
|
|
|
|
LineLSBTab: LineLoTab
|
|
|
|
|
2001-09-13 21:47:10 +00:00
|
|
|
; -------------------------------------------------------------------------
|
|
|
|
; High bytes of the start address of the screen lines
|
|
|
|
|
2001-09-14 09:52:30 +00:00
|
|
|
.macro LineHiTab
|
|
|
|
.repeat 25, I
|
2001-09-14 17:09:22 +00:00
|
|
|
.byte >(__VIDRAM_START__ + I * 40)
|
2001-09-14 09:52:30 +00:00
|
|
|
.endrep
|
|
|
|
.endmacro
|
|
|
|
|
|
|
|
LineMSBTab: LineHiTab
|
|
|
|
|
|
|
|
|
2002-11-19 23:02:47 +00:00
|
|
|
|