From f46c46abe1380d9576856877b5c122b650b649b3 Mon Sep 17 00:00:00 2001 From: cuz Date: Fri, 14 Sep 2001 17:09:22 +0000 Subject: [PATCH] Video RAM location is now defined in the linker config git-svn-id: svn://svn.cc65.org/cc65/trunk@924 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- libsrc/cbm510/crt0.s | 9 +++++---- libsrc/cbm510/io.inc | 3 +-- libsrc/cbm510/kplot.s | 7 ++++--- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/libsrc/cbm510/crt0.s b/libsrc/cbm510/crt0.s index 076d44d35..15335a1e9 100644 --- a/libsrc/cbm510/crt0.s +++ b/libsrc/cbm510/crt0.s @@ -7,7 +7,8 @@ .export _exit .import _clrscr, initlib, donelib .import push0, _main - .import __BSS_RUN__, __BSS_SIZE__ + .import __VIDRAM_START__ + .import __BSS_RUN__, __BSS_SIZE__ .import irq, nmi .import k_irq, k_nmi, k_plot, k_udtim, k_scnkey @@ -257,14 +258,14 @@ Z4: ora #$20 sta (tpi1),y -; Set bit 14/15 of the VIC address range to the high bits of VIDEO_RAM +; Set bit 14/15 of the VIC address range to the high bits of __VIDRAM_START__ ; PC6/PC7 (VICBANKSEL 0/1) = 11 ldy #tpiPortC lda (tpi2),y sta vidsave+1 and #$3F - ora #((>VIDEO_RAM) & $C0) + ora #<((>__VIDRAM_START__) & $C0) sta (tpi2),y ; Set bits 10-13 of the VIC address range to address F800 @@ -273,7 +274,7 @@ Z4: lda (vic),y sta vidsave+2 and #$0F - ora #(((>VIDEO_RAM) & $3F) << 2) + ora #<(((>__VIDRAM_START__) & $3F) << 2) sta (vic),y ; Switch back to the execution bank diff --git a/libsrc/cbm510/io.inc b/libsrc/cbm510/io.inc index a67c4099c..9f9939d9e 100644 --- a/libsrc/cbm510/io.inc +++ b/libsrc/cbm510/io.inc @@ -153,6 +153,5 @@ VIC_BG_COLOR3 = $24 ; Out video memory address -VIDEO_RAM = $F800 -COLOR_RAM = $D400 +COLOR_RAM = $D400 ; System bank diff --git a/libsrc/cbm510/kplot.s b/libsrc/cbm510/kplot.s index ec7123a4f..14369ce71 100644 --- a/libsrc/cbm510/kplot.s +++ b/libsrc/cbm510/kplot.s @@ -5,6 +5,7 @@ ; .export k_plot + .import __VIDRAM_START__ .importzp crtc .include "zeropage.inc" @@ -27,7 +28,7 @@ sta CRAM_PTR lda LineMSBTab,x sta SCREEN_PTR+1 - sub #>VIDEO_RAM + sub #>__VIDRAM_START__ add #>COLOR_RAM sta CRAM_PTR+1 @@ -45,7 +46,7 @@ get: ldx CURS_Y .macro LineLoTab .repeat 25, I - .byte <(VIDEO_RAM + I * 40) + .byte <(__VIDRAM_START__ + I * 40) .endrep .endmacro @@ -56,7 +57,7 @@ LineLSBTab: LineLoTab .macro LineHiTab .repeat 25, I - .byte >(VIDEO_RAM + I * 40) + .byte >(__VIDRAM_START__ + I * 40) .endrep .endmacro -- 2.39.5