From 9595d16ac07474316f5f96e6017bbb41a61a8941 Mon Sep 17 00:00:00 2001 From: cuz Date: Mon, 9 Dec 2002 10:45:16 +0000 Subject: [PATCH] Fixed the PLOT function git-svn-id: svn://svn.cc65.org/cc65/trunk@1728 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- libsrc/vic20/Makefile | 1 + libsrc/vic20/kernal.s | 2 -- libsrc/vic20/kplot.s | 21 +++++++++++++++++++++ libsrc/vic20/vic20.inc | 5 +---- 4 files changed, 23 insertions(+), 6 deletions(-) create mode 100644 libsrc/vic20/kplot.s diff --git a/libsrc/vic20/Makefile b/libsrc/vic20/Makefile index 8ffc8e886..4967c2720 100644 --- a/libsrc/vic20/Makefile +++ b/libsrc/vic20/Makefile @@ -21,6 +21,7 @@ OBJS = _scrsize.o \ cputc.o \ kbhit.o \ kernal.o \ + kplot.o \ randomize.o \ readjoy.o diff --git a/libsrc/vic20/kernal.s b/libsrc/vic20/kernal.s index 885a2fca9..ca1bac5bc 100644 --- a/libsrc/vic20/kernal.s +++ b/libsrc/vic20/kernal.s @@ -41,7 +41,6 @@ .export CLALL .export UDTIM .export SCREEN - .export PLOT .export IOBASE @@ -85,6 +84,5 @@ GETIN = $FFE4 CLALL = $FFE7 UDTIM = $FFEA SCREEN = $FFED -PLOT = $FFF0 IOBASE = $FFF3 diff --git a/libsrc/vic20/kplot.s b/libsrc/vic20/kplot.s new file mode 100644 index 000000000..2f4de2754 --- /dev/null +++ b/libsrc/vic20/kplot.s @@ -0,0 +1,21 @@ +; +; Ullrich von Bassewitz, 2002-12-09 +; +; PLOT replacement function for the VIC20. The kernal function does not set +; the pointer to the color RAM correctly. +; + + .export PLOT + + +.proc PLOT + + bcs @L1 + jsr $FFF0 ; Set cursor position + jmp $EAB2 ; Set pointer to color RAM + +@L1: jmp $FFF0 ; Get cursor position + +.endproc + + diff --git a/libsrc/vic20/vic20.inc b/libsrc/vic20/vic20.inc index c67be541e..c24b99cc2 100644 --- a/libsrc/vic20/vic20.inc +++ b/libsrc/vic20/vic20.inc @@ -33,9 +33,6 @@ PALFLAG = $2A6 ; $01 = PAL, $00 = NTSC ; Direct entries CLRSCR = $E55F KBDREAD = $E5CF -NAMED_OPEN = $F495 -NAMED_CLOSE = $F6DA -PLOTCHAR = $EAAA ; Char in A, color in X ; --------------------------------------------------------------------------- ; Vector and other locations @@ -47,7 +44,7 @@ NMIVec = $0318 ; --------------------------------------------------------------------------- ; I/O: 6560 VIC -VIC = $9000 +VIC = $9000 VIC_LINES = $9003 ; Screen lines, bit 7 is bit 0 from VIC_HLINE VIC_HLINE = $9004 ; Rasterline, bits 1-8 VIC_COLOR = $900F ; Border and background color -- 2.39.5