mirror of
https://github.com/badvision/lawless-legends.git
synced 2025-02-28 12:29:59 +00:00
Create proper save file on all disks. Updated memory map.
This commit is contained in:
parent
99f9f9f35c
commit
4b9f2c9a85
@ -1820,10 +1820,9 @@ class A2PackPartitions
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Ready to write the output file.
|
// Ready to write the output file.
|
||||||
println "Writing output file."
|
println "Writing output files."
|
||||||
new File("build/root").mkdir()
|
new File("build/root").mkdir()
|
||||||
|
|
||||||
|
|
||||||
def part1Path = new File("build/root/game.part.1.bin").path
|
def part1Path = new File("build/root/game.part.1.bin").path
|
||||||
new File(part1Path).withOutputStream { stream -> writePartition(stream, 1) }
|
new File(part1Path).withOutputStream { stream -> writePartition(stream, 1) }
|
||||||
|
|
||||||
@ -2604,8 +2603,27 @@ end
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
def copyOrCreateSave(dstDir)
|
||||||
|
{
|
||||||
|
def prevSave = new File("build/prevGame/game.1.save.\$f1")
|
||||||
|
def newSave = new File("${dstDir}/game.1.save.\$f1")
|
||||||
|
if (prevSave.exists()) {
|
||||||
|
copyIfNewer(prevSave, newSave)
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
// Create empty save file
|
||||||
|
newSave.withOutputStream { outStream ->
|
||||||
|
(0..3071).each {
|
||||||
|
outStream.write( (byte) 0)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
def createHddImage()
|
def createHddImage()
|
||||||
{
|
{
|
||||||
|
println "Creating hdd image."
|
||||||
|
|
||||||
// Copy the combined core executable to the output directory
|
// Copy the combined core executable to the output directory
|
||||||
copyIfNewer(new File("build/src/core/build/LEGENDOS.SYSTEM.sys#2000"),
|
copyIfNewer(new File("build/src/core/build/LEGENDOS.SYSTEM.sys#2000"),
|
||||||
new File("build/root/LEGENDOS.SYSTEM.sys#2000"))
|
new File("build/root/LEGENDOS.SYSTEM.sys#2000"))
|
||||||
@ -2614,9 +2632,7 @@ end
|
|||||||
new File("build/root/PROBOOT.sys#800"))
|
new File("build/root/PROBOOT.sys#800"))
|
||||||
|
|
||||||
// If we preserved a previous save game, copy it to the new image.
|
// If we preserved a previous save game, copy it to the new image.
|
||||||
def prevSave = new File("build/prevGame/game.1.save.\$f1")
|
copyOrCreateSave("build/root")
|
||||||
if (prevSave.exists())
|
|
||||||
copyIfNewer(prevSave, new File("build/root/game.1.save.\$f1"))
|
|
||||||
|
|
||||||
// Decompress the base image.
|
// Decompress the base image.
|
||||||
// No need to delete old file; that was done by outer-level code.
|
// No need to delete old file; that was done by outer-level code.
|
||||||
@ -2630,6 +2646,9 @@ end
|
|||||||
|
|
||||||
def createFloppyImages()
|
def createFloppyImages()
|
||||||
{
|
{
|
||||||
|
println "Creating floppy images."
|
||||||
|
|
||||||
|
// We'll be copying stuff from the hdd directory
|
||||||
def hddDir = new File("build/root")
|
def hddDir = new File("build/root")
|
||||||
|
|
||||||
// Build a DSK image for each floppy
|
// Build a DSK image for each floppy
|
||||||
@ -2643,8 +2662,11 @@ end
|
|||||||
// Copy files.
|
// Copy files.
|
||||||
def rootDir = new File("build/root$i")
|
def rootDir = new File("build/root$i")
|
||||||
rootDir.mkdir()
|
rootDir.mkdir()
|
||||||
if (i == 1)
|
if (i == 1) {
|
||||||
copyIfNewer(new File(hddDir, "LEGENDOS.SYSTEM.sys#2000"), new File(rootDir, "LEGENDOS.SYSTEM.sys#2000"))
|
copyIfNewer(new File(hddDir, "LEGENDOS.SYSTEM.sys#2000"), new File(rootDir, "LEGENDOS.SYSTEM.sys#2000"))
|
||||||
|
copyOrCreateSave("build/root$i")
|
||||||
|
}
|
||||||
|
|
||||||
copyIfNewer(new File(hddDir, "game.part.${i}.bin"), new File(rootDir, "game.part.${i}.bin"))
|
copyIfNewer(new File(hddDir, "game.part.${i}.bin"), new File(rootDir, "game.part.${i}.bin"))
|
||||||
|
|
||||||
// Unzip a fresh empty disk image
|
// Unzip a fresh empty disk image
|
||||||
|
@ -46,36 +46,41 @@
|
|||||||
;
|
;
|
||||||
; MAIN 64K MEMORY
|
; MAIN 64K MEMORY
|
||||||
; :::::::::::::::
|
; :::::::::::::::
|
||||||
; 0000.01FF 6502 zero page and stack
|
; 0000.01FF 6502 zero page and stack
|
||||||
; 0200.03FF input buffer, misc vecs
|
; 0200.03FF input buffer, misc vecs
|
||||||
; 0400.07FF text screen (used for debugging)
|
; 0400.07FF text screen (used for debugging)
|
||||||
; 0800.0Dxx memory manager
|
; 0800.0Dxx memory manager part 1
|
||||||
; 0Exx.0Fxx PLASMA locals storage
|
; 0Exx.0Fxx PLASMA locals storage
|
||||||
; 10xx.18xx gameloop asm, data and stubs
|
; 10xx.18xx gameloop asm, data and stubs
|
||||||
; 19xx.1FFF (free)
|
; 19xx.1FFF (free)
|
||||||
; 2000.3FFF hi-res page 1
|
; 2000.3FFF hi-res page 1
|
||||||
; 4000.4FFF hi-res page 2 /
|
; 4000.5FFF hi-res page 2 /
|
||||||
; memory manager work space
|
; memory manager work space
|
||||||
; 6000.6xxx 2D or 3D renderer
|
; 6000.6xxx 2D or 3D renderer
|
||||||
; 7xxx.BFFF (free)
|
; 7xxx.BFFF (free)
|
||||||
; C000.CFFF I/O
|
; C000.CFFF I/O
|
||||||
; D000.DFFF bank 1: memory manager and decompressor
|
; (bank 1) D000.DEFF memory manager part 2
|
||||||
; bank 2: PLASMA runtime
|
; (bank 1) DF00.DFFF decompressor
|
||||||
; E000.EBFF small-object heap
|
; (bank 2) D000.D9FF PLASMA runtime
|
||||||
; EC00.FAFF font engine
|
; (bank 2) DA00.DFFF (unused)
|
||||||
; FB00.FFF9 font data
|
; E000.EBFF small-object heap
|
||||||
; FFFA.FFFF 6502 vectors
|
; EC00.FAFF font engine
|
||||||
|
; FB00.FFF9 font data
|
||||||
|
; FFFA.FFFF 6502 vectors
|
||||||
;
|
;
|
||||||
; AUX 64K MEMORY
|
; AUX 64K MEMORY
|
||||||
; ::::::::::::::
|
; ::::::::::::::
|
||||||
; 0000.01FF 6502 zero page and stack
|
; 0000.01FF 6502 zero page and stack
|
||||||
; 0200.2xxx expander (if 3D map is running)
|
; 0200.03FF (currently unused)
|
||||||
; 3000.9xxx (free)
|
; 0400.07FF (unused, but screen holes overwritten by hard-disk C7xx ROM)
|
||||||
; Axxx.BFFF gameloop PLASMA code (loaded as high as possible)
|
; 0800.2xxx expander part 1 (if 3D map is running)
|
||||||
; C000.CFFF I/O
|
; 3000.9xxx (free)
|
||||||
; D000.DFFF bank 1: ProRWTS runtime (Note: D900.DFFF free)
|
; Axxx.BFFF gameloop PLASMA code (loaded as high as possible)
|
||||||
; bank 2: part of expander
|
; C000.CFFF I/O
|
||||||
; E000.FFF9 (free)
|
; (bank 1) D000.DAFF ProRWTS runtime
|
||||||
|
; (bank 1) DB00.DFFF (unused)
|
||||||
|
; (bank 2) D000.DFFF expander part 2
|
||||||
|
; E000.FFF9 (free)
|
||||||
; FFFA.FFFF 6502 vectors
|
; FFFA.FFFF 6502 vectors
|
||||||
;
|
;
|
||||||
; ----------------------------
|
; ----------------------------
|
||||||
|
Loading…
x
Reference in New Issue
Block a user