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
This commit is contained in:
parent
09305ce21c
commit
f46c46abe1
3 changed files with 10 additions and 9 deletions
|
@ -7,6 +7,7 @@
|
||||||
.export _exit
|
.export _exit
|
||||||
.import _clrscr, initlib, donelib
|
.import _clrscr, initlib, donelib
|
||||||
.import push0, _main
|
.import push0, _main
|
||||||
|
.import __VIDRAM_START__
|
||||||
.import __BSS_RUN__, __BSS_SIZE__
|
.import __BSS_RUN__, __BSS_SIZE__
|
||||||
.import irq, nmi
|
.import irq, nmi
|
||||||
.import k_irq, k_nmi, k_plot, k_udtim, k_scnkey
|
.import k_irq, k_nmi, k_plot, k_udtim, k_scnkey
|
||||||
|
@ -257,14 +258,14 @@ Z4:
|
||||||
ora #$20
|
ora #$20
|
||||||
sta (tpi1),y
|
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
|
; PC6/PC7 (VICBANKSEL 0/1) = 11
|
||||||
|
|
||||||
ldy #tpiPortC
|
ldy #tpiPortC
|
||||||
lda (tpi2),y
|
lda (tpi2),y
|
||||||
sta vidsave+1
|
sta vidsave+1
|
||||||
and #$3F
|
and #$3F
|
||||||
ora #((>VIDEO_RAM) & $C0)
|
ora #<((>__VIDRAM_START__) & $C0)
|
||||||
sta (tpi2),y
|
sta (tpi2),y
|
||||||
|
|
||||||
; Set bits 10-13 of the VIC address range to address F800
|
; Set bits 10-13 of the VIC address range to address F800
|
||||||
|
@ -273,7 +274,7 @@ Z4:
|
||||||
lda (vic),y
|
lda (vic),y
|
||||||
sta vidsave+2
|
sta vidsave+2
|
||||||
and #$0F
|
and #$0F
|
||||||
ora #(((>VIDEO_RAM) & $3F) << 2)
|
ora #<(((>__VIDRAM_START__) & $3F) << 2)
|
||||||
sta (vic),y
|
sta (vic),y
|
||||||
|
|
||||||
; Switch back to the execution bank
|
; Switch back to the execution bank
|
||||||
|
|
|
@ -153,6 +153,5 @@ VIC_BG_COLOR3 = $24
|
||||||
|
|
||||||
; Out video memory address
|
; Out video memory address
|
||||||
|
|
||||||
VIDEO_RAM = $F800
|
COLOR_RAM = $D400 ; System bank
|
||||||
COLOR_RAM = $D400
|
|
||||||
|
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
;
|
;
|
||||||
|
|
||||||
.export k_plot
|
.export k_plot
|
||||||
|
.import __VIDRAM_START__
|
||||||
.importzp crtc
|
.importzp crtc
|
||||||
|
|
||||||
.include "zeropage.inc"
|
.include "zeropage.inc"
|
||||||
|
@ -27,7 +28,7 @@
|
||||||
sta CRAM_PTR
|
sta CRAM_PTR
|
||||||
lda LineMSBTab,x
|
lda LineMSBTab,x
|
||||||
sta SCREEN_PTR+1
|
sta SCREEN_PTR+1
|
||||||
sub #>VIDEO_RAM
|
sub #>__VIDRAM_START__
|
||||||
add #>COLOR_RAM
|
add #>COLOR_RAM
|
||||||
sta CRAM_PTR+1
|
sta CRAM_PTR+1
|
||||||
|
|
||||||
|
@ -45,7 +46,7 @@ get: ldx CURS_Y
|
||||||
|
|
||||||
.macro LineLoTab
|
.macro LineLoTab
|
||||||
.repeat 25, I
|
.repeat 25, I
|
||||||
.byte <(VIDEO_RAM + I * 40)
|
.byte <(__VIDRAM_START__ + I * 40)
|
||||||
.endrep
|
.endrep
|
||||||
.endmacro
|
.endmacro
|
||||||
|
|
||||||
|
@ -56,7 +57,7 @@ LineLSBTab: LineLoTab
|
||||||
|
|
||||||
.macro LineHiTab
|
.macro LineHiTab
|
||||||
.repeat 25, I
|
.repeat 25, I
|
||||||
.byte >(VIDEO_RAM + I * 40)
|
.byte >(__VIDRAM_START__ + I * 40)
|
||||||
.endrep
|
.endrep
|
||||||
.endmacro
|
.endmacro
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue