mirror of
https://github.com/a2-4am/4cade.git
synced 2025-01-11 07:30:02 +00:00
move font data to D600 in RAM bank 2 to free up space for program data
This commit is contained in:
parent
fe48ae825a
commit
4803b46472
@ -70,11 +70,11 @@ Main
|
||||
!source "src/parse.games.a"
|
||||
!source "src/ui.sound.a"
|
||||
!source "src/ui.font.a"
|
||||
!source "src/ui.font.data.a"
|
||||
gGlobalPrefsStore
|
||||
!word $D000 ; address of first okvs store
|
||||
}
|
||||
LastMover
|
||||
!source "src/ui.font.data.a"
|
||||
!if RELBASE = $2000 {
|
||||
!ifdef PASS2 {
|
||||
} else { ;PASS2
|
||||
|
@ -27,8 +27,8 @@
|
||||
; bit 7 = 1 if joystick
|
||||
|
||||
+READ_ROM_WRITE_RAM2
|
||||
jsr init ; initialize ProRWTS2 (bye bye ProDOS)
|
||||
ldx #$00 ; relocate rest of program to RAM bank 1 in language card
|
||||
jsr init ; initialize and relocate ProRWTS2 to $D400 in RAM bank 2
|
||||
ldx #$00 ; relocate program code to top of language card
|
||||
@FM lda FirstMover,x
|
||||
sta RELBASE,x
|
||||
inx
|
||||
@ -39,7 +39,17 @@
|
||||
inc @FM+2
|
||||
inc @FM+5
|
||||
bne @FM
|
||||
+
|
||||
|
||||
+ ldy #$04
|
||||
@LM lda LastMover,x ; relocate font data to $D600 in RAM bank 2
|
||||
sta $D600,x
|
||||
inx
|
||||
bne @LM
|
||||
inc @LM+2
|
||||
inc @LM+5
|
||||
dey
|
||||
bne @LM
|
||||
|
||||
jmp OneTimeSetup
|
||||
|
||||
@no64K
|
||||
|
@ -1,7 +1,22 @@
|
||||
;license:MIT
|
||||
;(c) 2018 by 4am
|
||||
;(c) 2018-9 by 4am
|
||||
;
|
||||
|
||||
;------------------------------------------------------------------------------
|
||||
; YE OLDE GRAND UNIFIED MEMORY MAP
|
||||
;
|
||||
; LC RAM BANK 1
|
||||
; D000.. - data structures (e.g. gGamesListStore)
|
||||
; ..FFFB - main program code
|
||||
; FFFC..FFFF - reset and other vectors
|
||||
;
|
||||
; LC RAM BANK 2
|
||||
; D000..D3FF - ProRWTS data
|
||||
; D400..D5FF - ProRWTS code
|
||||
; D600..D9FF - HGR font data
|
||||
; DA00..DFFF - unused
|
||||
;------------------------------------------------------------------------------
|
||||
|
||||
; soft switches
|
||||
STOREOFF = $C000 ; write to use following 4 flags:
|
||||
READMAINMEM = $C002 ; write to R main mem
|
||||
|
@ -128,6 +128,7 @@ DrawBuffer
|
||||
sta @row5+1
|
||||
sta @row6+1
|
||||
sta @row7+1
|
||||
+READ_RAM2_WRITE_RAM2
|
||||
@loop
|
||||
@src ldy $FDFD,x
|
||||
lda FontDataRow0,y
|
||||
@ -149,69 +150,5 @@ DrawBuffer
|
||||
inc HTAB
|
||||
dex
|
||||
bpl @loop
|
||||
rts
|
||||
|
||||
InvertChar
|
||||
; inverts a character already drawn to the screen
|
||||
; carry bit clear -> draw on page 1
|
||||
; carry bit set -> draw on page 2
|
||||
; $24 contains textpage column (0..39) (this is the standard HTAB address)
|
||||
; $25 contains textpage line (0..23) (this is the standard VTAB address)
|
||||
; HTAB is NOT incremented
|
||||
; VTAB is NOT incremented
|
||||
; clobbers A
|
||||
; preserves X/Y
|
||||
bcs +
|
||||
lda #$00
|
||||
+HIDE_NEXT_2_BYTES
|
||||
+
|
||||
lda #$60
|
||||
sta @pagemask
|
||||
txa
|
||||
pha
|
||||
tya
|
||||
pha
|
||||
lda VTAB
|
||||
asl
|
||||
asl
|
||||
asl
|
||||
; routine to calculate memory address within HGR page
|
||||
; (routine clobbers A and Y but preserves X)
|
||||
asl
|
||||
tay
|
||||
and #$F0
|
||||
bpl @calc1
|
||||
ora #$05
|
||||
@calc1 bcc @calc2
|
||||
ora #$0A
|
||||
@calc2 asl
|
||||
asl
|
||||
sta @hgrlo+1
|
||||
tya
|
||||
and #$0E
|
||||
adc #$10
|
||||
asl @hgrlo+1
|
||||
rol
|
||||
@pagemask=*+1
|
||||
eor #$FD ; SMC (0=hi-res page 1, #$60=hi-res page 2)
|
||||
sta DEST+1
|
||||
@hgrlo lda #$FD
|
||||
clc
|
||||
adc HTAB
|
||||
sta DEST
|
||||
ldx #8
|
||||
ldy #0
|
||||
- lda (DEST),y
|
||||
eor #$7F
|
||||
sta (DEST),y
|
||||
lda DEST+1
|
||||
clc
|
||||
adc #$04
|
||||
sta DEST+1
|
||||
dex
|
||||
bne -
|
||||
pla
|
||||
tay
|
||||
pla
|
||||
tax
|
||||
+READ_RAM1_WRITE_RAM1
|
||||
rts
|
||||
|
@ -1,3 +1,4 @@
|
||||
!pseudopc $D600 {
|
||||
FontDataRow0
|
||||
!byte $80
|
||||
!byte $80
|
||||
@ -1030,3 +1031,4 @@ FontDataRow7
|
||||
!byte $86
|
||||
!byte $80
|
||||
!byte $FF
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user