mirror of
https://github.com/a2-4am/4cade.git
synced 2024-11-26 01:49:25 +00:00
add ProBoot bootloader
This commit is contained in:
parent
c21dbf84b5
commit
cc76275366
20
Makefile
20
Makefile
@ -35,14 +35,12 @@ asm: md
|
||||
dsk: md asm
|
||||
$(CADIUS) CREATEVOLUME build/"$(DISK)" "${VOLUME}" 32766KB >>build/log
|
||||
cp res/_FileInformation.txt build/ >>build/log
|
||||
$(CADIUS) ADDFILE build/"$(DISK)" "/${VOLUME}/" "res/PRODOS" >>build/log
|
||||
# $(CADIUS) ADDFILE build/"$(DISK)" "/${VOLUME}/" "res/PRODOS" >>build/log
|
||||
$(CADIUS) ADDFILE build/"$(DISK)" "/${VOLUME}/" "build/LAUNCHER.SYSTEM" >>build/log
|
||||
$(CADIUS) CREATEFOLDER build/"$(DISK)" "/${VOLUME}/X/" >>build/log
|
||||
$(CADIUS) ADDFILE build/"$(DISK)" "/${VOLUME}/" "res/GAMES.CONF" >>build/log
|
||||
$(CADIUS) ADDFILE build/"$(DISK)" "/${VOLUME}/" "res/ATTRACT.CONF" >>build/log
|
||||
$(CADIUS) ADDFILE build/"$(DISK)" "/${VOLUME}/" "res/FX.CONF" >>build/log
|
||||
$(CADIUS) ADDFILE build/"$(DISK)" "/${VOLUME}/" "res/COVER" >>build/log
|
||||
$(CADIUS) ADDFILE build/"$(DISK)" "/${VOLUME}/" "res/COVER.A2FC" >>build/log
|
||||
rsync -aP res/hgr/* build/HGR >>build/log
|
||||
bin/buildfileinfo.py build/HGR >>build/log
|
||||
$(CADIUS) ADDFOLDER build/"$(DISK)" "/${VOLUME}/HGR" "build/HGR" >>build/log
|
||||
@ -58,15 +56,11 @@ dsk: md asm
|
||||
bin/do2po.py res/dsk/ build/po/
|
||||
# rsync -a res/dsk/*.po build/po/
|
||||
# bin/extract.py build/po/ | sh >build/log
|
||||
# rm -f build/X/**/.DS_Store
|
||||
# rm -f build/X/**/PRODOS
|
||||
# rm -f build/X/**/LOADER.SYSTEM
|
||||
# $(CADIUS) ADDFOLDER build/"$(DISK)" "/${VOLUME}/X" "build/X" >build/log
|
||||
|
||||
artwork: dsk
|
||||
# $(CADIUS) ADDFOLDER build/"$(DISK)" "/${VOLUME}/ARTWORK" "res/artwork"
|
||||
# $(CADIUS) ADDFILE build/"$(DISK)" "/${VOLUME}/ARTWORK/" "res/DHRSLIDE.SYSTEM"
|
||||
# $(CADIUS) ADDFOLDER build/"$(DISK)" "/${VOLUME}/ARTWORKGS" "res/artworkgs"
|
||||
rm -f build/X/**/.DS_Store
|
||||
rm -f build/X/**/PRODOS
|
||||
rm -f build/X/**/LOADER.SYSTEM
|
||||
$(CADIUS) ADDFOLDER build/"$(DISK)" "/${VOLUME}/X" "build/X" >build/log
|
||||
bin/changebootloader.py build/"$(DISK)" res/proboothd
|
||||
|
||||
mount: dsk
|
||||
osascript bin/V2Make.scpt "`pwd`" bin/4cade.vii build/"$(DISK)"
|
||||
@ -83,4 +77,4 @@ md:
|
||||
clean:
|
||||
rm -rf build/
|
||||
|
||||
all: clean asm dsk artwork mount
|
||||
all: clean asm dsk mount
|
||||
|
15
bin/changebootloader.py
Executable file
15
bin/changebootloader.py
Executable file
@ -0,0 +1,15 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import sys
|
||||
import os.path
|
||||
|
||||
target_2mg_file, bootloader = sys.argv[1:]
|
||||
assert(os.path.splitext(target_2mg_file)[-1].lower() == ".2mg")
|
||||
with open(bootloader, 'rb') as f:
|
||||
boot = f.read()
|
||||
assert(len(boot) == 512)
|
||||
with open(target_2mg_file, 'rb') as f:
|
||||
data = bytearray(f.read())
|
||||
data[64:64+len(boot)] = boot
|
||||
with open(target_2mg_file, 'wb') as f:
|
||||
f.write(data)
|
26
src/4cade.a
26
src/4cade.a
@ -207,12 +207,14 @@ HGRLoad
|
||||
; load HGR screenshot at $4000
|
||||
+LOAD_FILE kHGRScreenshotDirectory, PTR
|
||||
|
||||
jsr $6000 ; transition effect code was loaded here earlier
|
||||
jsr $6000 ; transition effect code was loaded here earlier
|
||||
jmp WaitOnScreenshot
|
||||
|
||||
DHGRLoad
|
||||
ldx $C000
|
||||
bmi Exit
|
||||
bpl +
|
||||
rts
|
||||
+
|
||||
+STAY PTR
|
||||
jsr ResetPath
|
||||
+LDADDR kDHGRScreenshotDirectory
|
||||
@ -224,21 +226,15 @@ DHGRLoad
|
||||
jsr LoadDHRFile
|
||||
!word gPathname
|
||||
jsr FizzleDHGR
|
||||
; note: execution falls through here
|
||||
WaitOnScreenshot
|
||||
ldx #0
|
||||
ldy #0
|
||||
@wait lda $C000
|
||||
bmi Exit
|
||||
jsr @burn
|
||||
dey
|
||||
bne @wait
|
||||
ldx #$20
|
||||
- lda #0
|
||||
jsr WaitForKeyWithTimeout
|
||||
bmi +
|
||||
dex
|
||||
bne @wait
|
||||
rts
|
||||
@burn jsr @burn2
|
||||
@burn2 jsr @burn3
|
||||
@burn3 jsr Exit
|
||||
Exit rts
|
||||
bpl -
|
||||
+ rts
|
||||
|
||||
LoadTransition
|
||||
jsr okvs_nth ; get filename of transition effect code
|
||||
|
Loading…
Reference in New Issue
Block a user