build DOS-ordered disk image instead, fiddle with drive 2 check and UI wording

This commit is contained in:
4am 2019-04-11 21:45:43 -04:00
parent dee9e3a59f
commit d86103529e
3 changed files with 49 additions and 25 deletions

View File

@ -16,22 +16,24 @@ ACME=acme
# https://github.com/mach-kernel/cadius
CADIUS=cadius
BUILDDISK=build/anti-m.po
BUILDDISK=build/anti-m
VOLUME=ANTI.M
asm:
mkdir -p build
$(ACME) -r build/anti-m.lst src/anti-m.a
cp res/work.bin "$(BUILDDISK)"
cp res/work.bin "$(BUILDDISK)".po
cp res/_FileInformation.txt build/ >>build/log
$(CADIUS) ADDFILE "$(BUILDDISK)" "/${VOLUME}/" "build/ANTI.M.SYSTEM" >>build/log
$(CADIUS) ADDFILE "$(BUILDDISK)".po "/${VOLUME}/" "build/ANTI.M.SYSTEM" >>build/log
$(ACME) -r build/proboot.lst src/proboot.a
bin/changebootloader.py "$(BUILDDISK)" build/proboot
bin/changebootloader.py "$(BUILDDISK)".po build/proboot
bin/po2do.py build/ build/
rm "$(BUILDDISK)".po
clean:
rm -rf build/
mount:
open "$(BUILDDISK)"
open "$(BUILDDISK)".dsk
all: clean asm mount

33
bin/po2do.py Executable file
View File

@ -0,0 +1,33 @@
#!/usr/bin/env python3
import sys
import glob
import os.path
kMap = {0x00: 0x00,
0x07: 0x08,
0x0E: 0x01,
0x06: 0x09,
0x0D: 0x02,
0x05: 0x0A,
0x0C: 0x03,
0x04: 0x0B,
0x0B: 0x04,
0x03: 0x0C,
0x0A: 0x05,
0x02: 0x0D,
0x09: 0x06,
0x01: 0x0E,
0x08: 0x07,
0x0F: 0x0F}
indir, outdir = sys.argv[1:3]
for infile in glob.glob(os.path.join(indir, "*.po")):
outfile = os.path.join(outdir, os.path.splitext(os.path.basename(infile))[0] + ".dsk")
with open(infile, 'rb') as f, open(outfile, 'wb') as g:
for track in range(0, 0x23):
sectors = [bytes(256)] * 0x10
for dos_sector in range(0, 0x10):
sectors[kMap[dos_sector]] = f.read(256)
g.write(b"".join(sectors))

View File

@ -57,7 +57,7 @@ tmp = $FC ; byte
cmp #$60
bne Boot
jsr CheckDrive2
bcc Boot2
bne Boot2
@showprompt
jsr HOME
lda MACHINEID
@ -162,18 +162,13 @@ CheckDrive2
bne --
dey
bpl --
ldy #0
- lda $C0EC
jsr @knownret
pha
pla
cmp $C0EC
clc
bne +
lda #$00
ldy #$00
- eor $C0EC
dey
bne -
sec
+ lda $C0E8
sta $C0E8
cmp #$00
@knownret
rts
@ -239,19 +234,13 @@ StringTable
!word @mainmenu
@header
!text "Anti-M v1.3-pre by 4am 2019-04-10"
!text "Anti-M v1.3-pre by 4am 2019-04-11"
!text "________________________________________",$8D
!text $8D,$8D,$8D,$8D,$00
!text $8D,$8D,$8D,$8D,$8D,$8D,$8D,$8D,$00
@mainmenu
!text " Insert original disk in slot 6 drive 1",$8D
!text $8D
!text " and press <RETURN> to boot",$8D
!text $8D
!text " or",$8D
!text $8D
!text " Insert original disk in slot 6 drive 2",$8D
!text $8D
!text " and press 2 to boot",$00
!text " and press <RETURN> to boot",$8D,$00
!src "src/compare.a"
!src "src/idbroderbund.a"