mirror of
https://github.com/deater/dos33fsprogs.git
synced 2025-02-05 06:31:25 +00:00
mockingboard: running out of RAM, load it high
This commit is contained in:
parent
5498666f2f
commit
8a430e86f3
@ -29,7 +29,7 @@ FREQUENT_CHAR EQU 0
|
|||||||
|
|
||||||
;R: .res (1024-64) ; N-F
|
;R: .res (1024-64) ; N-F
|
||||||
|
|
||||||
R EQU $4000
|
R EQU $9000
|
||||||
|
|
||||||
; Init
|
; Init
|
||||||
lzss_init:
|
lzss_init:
|
||||||
@ -142,9 +142,7 @@ output_loop:
|
|||||||
load_carry1:
|
load_carry1:
|
||||||
|
|
||||||
store_byte:
|
store_byte:
|
||||||
|
|
||||||
sta (OUTPUTL),Y ; store byte to output
|
sta (OUTPUTL),Y ; store byte to output
|
||||||
|
|
||||||
inc OUTPUTL ; increment address
|
inc OUTPUTL ; increment address
|
||||||
bne sb_carry
|
bne sb_carry
|
||||||
inc OUTPUTH ; handle overflow
|
inc OUTPUTH ; handle overflow
|
||||||
@ -188,23 +186,16 @@ done_logo:
|
|||||||
rts
|
rts
|
||||||
|
|
||||||
|
|
||||||
;============================================
|
|
||||||
; inc_pointer - increments the output pointer
|
|
||||||
;============================================
|
|
||||||
|
|
||||||
inc_pointer:
|
|
||||||
ldx #OUTPUTL
|
|
||||||
|
|
||||||
;==================================================
|
;==================================================
|
||||||
; inc16 - increments a 16-bit pointer in zero page
|
; inc16 - increments a 16-bit pointer in zero page
|
||||||
;==================================================
|
;==================================================
|
||||||
|
|
||||||
inc16:
|
inc16:
|
||||||
inc 0,X ; increment address
|
inc 0,X ; increment address
|
||||||
bne no_carry
|
bne not_zero
|
||||||
inx
|
inx
|
||||||
inc 0,X ; handle overflow
|
inc 0,X ; handle overflow
|
||||||
no_carry:
|
not_zero:
|
||||||
rts
|
rts
|
||||||
|
|
||||||
|
|
||||||
|
12
linker_scripts/apple2_4000.inc
Normal file
12
linker_scripts/apple2_4000.inc
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
MEMORY {
|
||||||
|
ZP: start = $00, size = $1A, type = rw;
|
||||||
|
RAM: start = $4000, size = $5000, file = %O;
|
||||||
|
}
|
||||||
|
|
||||||
|
SEGMENTS {
|
||||||
|
CODE: load = RAM, type = ro;
|
||||||
|
RODATA: load = RAM, type = ro;
|
||||||
|
DATA: load = RAM, type = rw;
|
||||||
|
BSS: load = RAM, type = bss, define = yes;
|
||||||
|
ZEROPAGE: load = ZP, type = zp;
|
||||||
|
}
|
@ -9,7 +9,7 @@ mock.dsk: KSP_THEME_UNCOMPRESSED KSP_THEME_COMPRESSED \
|
|||||||
KSP_THEME_INTERRUPT INTERRUPT_TEST
|
KSP_THEME_INTERRUPT INTERRUPT_TEST
|
||||||
$(DOS33) -y mock_test.dsk BSAVE -a 0x1000 KSP_THEME_UNCOMPRESSED
|
$(DOS33) -y mock_test.dsk BSAVE -a 0x1000 KSP_THEME_UNCOMPRESSED
|
||||||
$(DOS33) -y mock_test.dsk BSAVE -a 0x1000 KSP_THEME_COMPRESSED
|
$(DOS33) -y mock_test.dsk BSAVE -a 0x1000 KSP_THEME_COMPRESSED
|
||||||
$(DOS33) -y mock_test.dsk BSAVE -a 0xc00 KSP_THEME_INTERRUPT
|
$(DOS33) -y mock_test.dsk BSAVE -a 0x4000 KSP_THEME_INTERRUPT
|
||||||
$(DOS33) -y mock_test.dsk BSAVE -a 0x1000 INTERRUPT_TEST
|
$(DOS33) -y mock_test.dsk BSAVE -a 0x1000 INTERRUPT_TEST
|
||||||
|
|
||||||
KSP_THEME_COMPRESSED: ksp_theme_compressed.o
|
KSP_THEME_COMPRESSED: ksp_theme_compressed.o
|
||||||
@ -21,10 +21,11 @@ ksp_theme_compressed.o: ksp_theme_compressed.s \
|
|||||||
ca65 -o ksp_theme_compressed.o ksp_theme_compressed.s -l ksp_theme_compressed.lst
|
ca65 -o ksp_theme_compressed.o ksp_theme_compressed.s -l ksp_theme_compressed.lst
|
||||||
|
|
||||||
KSP_THEME_INTERRUPT: ksp_theme_interrupt.o
|
KSP_THEME_INTERRUPT: ksp_theme_interrupt.o
|
||||||
ld65 -o KSP_THEME_INTERRUPT ksp_theme_interrupt.o -C ../linker_scripts/apple2_c00.inc
|
ld65 -o KSP_THEME_INTERRUPT ksp_theme_interrupt.o -C ../linker_scripts/apple2_4000.inc
|
||||||
|
|
||||||
ksp_theme_interrupt.o: ksp_theme_interrupt.s \
|
ksp_theme_interrupt.o: ksp_theme_interrupt.s \
|
||||||
../asm_routines/mockingboard.s \
|
../asm_routines/mockingboard.s \
|
||||||
|
../asm_routines/lzss_decompress.s \
|
||||||
ksp_title.inc
|
ksp_title.inc
|
||||||
ca65 -o ksp_theme_interrupt.o ksp_theme_interrupt.s -l ksp_theme_interrupt.lst
|
ca65 -o ksp_theme_interrupt.o ksp_theme_interrupt.s -l ksp_theme_interrupt.lst
|
||||||
|
|
||||||
|
@ -107,7 +107,7 @@ mockingboard_found:
|
|||||||
; Enable 6502 interrupts
|
; Enable 6502 interrupts
|
||||||
;============================
|
;============================
|
||||||
;
|
;
|
||||||
cli ; clear interrupt mask
|
; cli ; clear interrupt mask
|
||||||
|
|
||||||
|
|
||||||
bit SET_GR ; graphics mode
|
bit SET_GR ; graphics mode
|
||||||
@ -119,7 +119,7 @@ mockingboard_found:
|
|||||||
; Graphics
|
; Graphics
|
||||||
;==========================
|
;==========================
|
||||||
uncompress_graphics:
|
uncompress_graphics:
|
||||||
jsr lzss_init ; init R to zero
|
;jsr lzss_init ; init R to zero
|
||||||
|
|
||||||
lda #>ksp_title ; load logo pointer
|
lda #>ksp_title ; load logo pointer
|
||||||
sta BASH
|
sta BASH
|
||||||
@ -131,7 +131,7 @@ uncompress_graphics:
|
|||||||
lda #<ksp_title_end
|
lda #<ksp_title_end
|
||||||
sta LZSS_ENDL
|
sta LZSS_ENDL
|
||||||
|
|
||||||
; HGR page 1
|
; HGR page 2
|
||||||
lda #>$2000
|
lda #>$2000
|
||||||
sta OUTH
|
sta OUTH
|
||||||
lda #<$2000
|
lda #<$2000
|
||||||
@ -315,3 +315,6 @@ done_message: .asciiz "DONE PLAYING"
|
|||||||
;=============
|
;=============
|
||||||
|
|
||||||
.include "ksp_title.inc"
|
.include "ksp_title.inc"
|
||||||
|
.include "ksp_squad.inc"
|
||||||
|
.include "ksp_loading.inc"
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user