mirror of
https://github.com/a2-4am/anti-m.git
synced 2025-01-02 19:29:21 +00:00
build DOS-ordered disk image instead, fiddle with drive 2 check and UI wording
This commit is contained in:
parent
dee9e3a59f
commit
d86103529e
12
Makefile
12
Makefile
@ -16,22 +16,24 @@ ACME=acme
|
|||||||
# https://github.com/mach-kernel/cadius
|
# https://github.com/mach-kernel/cadius
|
||||||
CADIUS=cadius
|
CADIUS=cadius
|
||||||
|
|
||||||
BUILDDISK=build/anti-m.po
|
BUILDDISK=build/anti-m
|
||||||
VOLUME=ANTI.M
|
VOLUME=ANTI.M
|
||||||
|
|
||||||
asm:
|
asm:
|
||||||
mkdir -p build
|
mkdir -p build
|
||||||
$(ACME) -r build/anti-m.lst src/anti-m.a
|
$(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
|
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
|
$(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:
|
clean:
|
||||||
rm -rf build/
|
rm -rf build/
|
||||||
|
|
||||||
mount:
|
mount:
|
||||||
open "$(BUILDDISK)"
|
open "$(BUILDDISK)".dsk
|
||||||
|
|
||||||
all: clean asm mount
|
all: clean asm mount
|
||||||
|
33
bin/po2do.py
Executable file
33
bin/po2do.py
Executable 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))
|
29
src/anti-m.a
29
src/anti-m.a
@ -57,7 +57,7 @@ tmp = $FC ; byte
|
|||||||
cmp #$60
|
cmp #$60
|
||||||
bne Boot
|
bne Boot
|
||||||
jsr CheckDrive2
|
jsr CheckDrive2
|
||||||
bcc Boot2
|
bne Boot2
|
||||||
@showprompt
|
@showprompt
|
||||||
jsr HOME
|
jsr HOME
|
||||||
lda MACHINEID
|
lda MACHINEID
|
||||||
@ -162,18 +162,13 @@ CheckDrive2
|
|||||||
bne --
|
bne --
|
||||||
dey
|
dey
|
||||||
bpl --
|
bpl --
|
||||||
ldy #0
|
lda #$00
|
||||||
- lda $C0EC
|
ldy #$00
|
||||||
jsr @knownret
|
- eor $C0EC
|
||||||
pha
|
|
||||||
pla
|
|
||||||
cmp $C0EC
|
|
||||||
clc
|
|
||||||
bne +
|
|
||||||
dey
|
dey
|
||||||
bne -
|
bne -
|
||||||
sec
|
sta $C0E8
|
||||||
+ lda $C0E8
|
cmp #$00
|
||||||
@knownret
|
@knownret
|
||||||
rts
|
rts
|
||||||
|
|
||||||
@ -239,19 +234,13 @@ StringTable
|
|||||||
!word @mainmenu
|
!word @mainmenu
|
||||||
|
|
||||||
@header
|
@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
|
||||||
!text $8D,$8D,$8D,$8D,$00
|
!text $8D,$8D,$8D,$8D,$8D,$8D,$8D,$8D,$00
|
||||||
@mainmenu
|
@mainmenu
|
||||||
!text " Insert original disk in slot 6 drive 1",$8D
|
!text " Insert original disk in slot 6 drive 1",$8D
|
||||||
!text $8D
|
!text $8D
|
||||||
!text " and press <RETURN> to boot",$8D
|
!text " and press <RETURN> to boot",$8D,$00
|
||||||
!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
|
|
||||||
|
|
||||||
!src "src/compare.a"
|
!src "src/compare.a"
|
||||||
!src "src/idbroderbund.a"
|
!src "src/idbroderbund.a"
|
||||||
|
Loading…
Reference in New Issue
Block a user