store to $D000

This commit is contained in:
Peter Ferrie 2019-06-18 21:49:12 -07:00
parent c9a00d6bef
commit 1966d4a893
6 changed files with 28 additions and 20 deletions

View File

@ -21,7 +21,8 @@ ACME=acme
CADIUS=cadius
asm: md
$(ACME) -r build/4cade.lst src/4cade.a
$(ACME) -r build/4cade.lst src/4cade.a >build/relbase.log
$(ACME) -r build/4cade.lst -DRELBASE=`cat build/relbase.log | grep "RELBASE =" | cut -d"=" -f2 | cut -d"(" -f2 | cut -d")" -f1` src/4cade.a
$(ACME) src/fx/fx.dhgr.ripple.a
$(ACME) src/fx/fx.dhgr.iris.a
$(ACME) src/fx/fx.dhgr.radial.a

View File

@ -5,6 +5,10 @@
!to "build/LAUNCHER.SYSTEM",plain
*=$2000
!ifndef RELBASE {
RELBASE=$2000
}
!source "src/constants.a"
!source "src/macros.a"
@ -12,7 +16,7 @@
!source "src/4cade.init.a"
FirstMover
!pseudopc $D000 {
!pseudopc RELBASE {
Reenter ; self-running demos should call this to exit back to 4cade
cld
cli
@ -68,6 +72,13 @@ Main
!source "src/ui.font.a"
!source "src/ui.font.data.a"
gGlobalPrefsStore
!word *+2 ; address of first okvs store
!word $D000 ; address of first okvs store
}
LastMover
!if RELBASE = $2000 {
!ifdef PASS2 {
} else { ;PASS2
!set PASS2=1
!warn "RELBASE = ", $FE00 - (LastMover - FirstMover)
}
}

View File

@ -26,11 +26,10 @@
; bit 6 = 1 if 128K
; bit 7 = 1 if joystick
jsr init ; initialize ProRWTS2 (bye bye ProDOS)
+READ_RAM1_WRITE_RAM1
+READ_ROM_WRITE_RAM1
ldx #$00 ; relocate rest of program to RAM bank 1 in language card
@FM lda FirstMover,x
sta $D000,x
sta RELBASE,x
inx
bne @FM
lda @FM+2
@ -40,6 +39,7 @@
inc @FM+5
bne @FM
+
jsr init ; initialize ProRWTS2 (bye bye ProDOS)
jmp OneTimeSetup
@no64K

View File

@ -288,6 +288,7 @@ traverse
pla
sta (namlo), y
lda $c08b
@go
rts
@ -404,7 +405,7 @@ ProDOS_enter
!ifdef PASS2 {
!set CloseHandles = @imp_close
} else { ;PASS2
!set PASS2=1
!set CloseHandles = *
}
stx ProDOS_savedX+1
sty ProDOS_savedY+1

View File

@ -463,8 +463,8 @@ unrentry1 jsr $d1d1
bankram
!if load_banked = 1 {
lda LCBANK2 - ((lc_bank - 1) * 8)
lda LCBANK2 - ((lc_bank - 1) * 8)
lda LCBANK2 + 2 - ((lc_bank - 1) * 8)
lda LCBANK2 + 2 - ((lc_bank - 1) * 8)
} ;load_banked
!if load_aux = 1 {
sta SETAUXWR + (load_banked * 4) ;SETAUXWR or SETAUXZP
@ -550,15 +550,8 @@ unrdrvoff1 lda MOTOROFF
;and code is less than two pages long (e.g. aligned_read, no write)
;can't insert code during pass two because it breaks existing offsets
!ifdef PASS2 {
!if >(hddcodeend - reloc) > 0 {
!set hack=$100
} ;hddcodeend
} else { ;PASS2 not defined
!set hack=0
} ;PASS2
lda unrelochdd + hack, y
sta reloc + hack, y
lda unrelochdd + $100, y
sta reloc + $100, y
} ;one_page
iny
bne -
@ -2877,7 +2870,6 @@ hdddataend
;math magic to determine ideal loading address, and information dump
!ifdef PASS2 {
} else { ;PASS2 not defined
!set PASS2=1
!if enable_floppy = 1 {
!if reloc < $c000 {
!if ((dataend + $ff) & -256) > $c000 {

View File

@ -6,6 +6,7 @@ rem
rem a qkumba monstrosity from 2018-10-29
rem
setlocal enabledelayedexpansion
set DISK=4cade.2mg
set VOLUME=A.4AM.PACK
@ -30,7 +31,9 @@ if "%1" equ "asm" (
2>nul md build\DEMO
2>nul md build\FX
%ACME% -r build\4cade.lst src\4cade.a
2>build\out.txt %ACME% -r build\4cade.lst src\4cade.a
for /f "tokens=2,3 delims=)" %%q in ('find "RELBASE =" build\out.txt') do set _make=%%q
%ACME% -DRELBASE=$%_make:~-4% -r build\4cade.lst src\4cade.a
%ACME% src\fx\fx.dhgr.ripple.a
%ACME% src\fx\fx.dhgr.iris.a
%ACME% src\fx\fx.dhgr.radial.a