Compare commits

...

24 Commits
v1.6 ... master

Author SHA1 Message Date
4am
a34bbf79e7 prep for 2.2 release 2024-02-27 11:26:29 -05:00
4am
385e514ce2
support ABM (#45)
Co-authored-by: Peter Ferrie <peter.ferrie@gmail.com>
2024-02-27 11:18:24 -05:00
4am
834efd426f prep for 2.1 release 2024-02-23 14:06:38 -05:00
4am
d4f81acf8b prep for 2.1 release 2024-02-23 14:04:56 -05:00
4am
bdbf06e59e prep for 2.1 release 2024-02-23 14:02:54 -05:00
Peter Ferrie
2afbe1ce50
fix detection of 13-sector disks (#43) 2024-02-23 14:00:08 -05:00
4am
e4c718f48e Merge branch 'master' of https://github.com/a2-4am/anti-m 2023-09-18 12:05:51 -04:00
4am
a4064c4bc1 2.0 release 2023-09-18 12:05:06 -04:00
Peter Ferrie
3a6b60cc72
strengthen drive 2 detection, set init A properly (fixes Micro League Basball) (#41) 2023-09-17 23:41:15 -04:00
Peter Ferrie
d739c08dab
fix bug in ProDOS tracer (#40) 2023-09-11 20:35:29 -04:00
4am
1ad0b3014a update version number for release 2023-05-15 17:05:33 -04:00
4am
e1295dee5a update version number for release 2023-05-15 17:03:54 -04:00
4am
513f8066d5
Update README.md 2023-05-15 16:53:13 -04:00
Peter Ferrie
6aa4146eb7
support Space Adventure (#39) 2023-05-15 16:50:31 -04:00
Peter Ferrie
e12b8fcfab
enable booting Ultracheckers from drive 2 (#38) 2022-04-19 21:18:36 -04:00
Peter Ferrie
9bee8fc449
support Disk Recovery (#37)
* support Disk Recovery

* enable booting Disk Recovery from drive 2
2022-03-21 21:22:17 -04:00
Peter Ferrie
d3c4100f32
fix drive 2 detection (#36) 2021-05-20 11:46:48 -04:00
4am
98e587d4d6 1.8 release 2020-11-10 15:45:34 -05:00
Peter Ferrie
4d636eddb5
fix Virtual II in 13-sector mode, too (#32) 2020-11-10 07:17:07 -05:00
Peter Ferrie
f1c81a1d5b
Master (#31)
* support Sensible Speller

* more Virtual II fixes
2020-11-08 23:24:38 -05:00
Peter Ferrie
009434aca3
support Sensible Speller (#30) 2020-10-15 21:02:57 -04:00
4am
6008129f5e update docs 2020-08-12 22:37:05 -04:00
Peter Ferrie
e2771b1b3c
fix World Karate Championship (#29) 2020-08-11 21:36:25 -04:00
Peter Ferrie
ef4f60166d
support Odin (#28) 2020-08-11 21:02:04 -04:00
8 changed files with 311 additions and 21 deletions

View File

@ -2,8 +2,8 @@
Boot any Apple II disk on any Apple II
[Download latest Anti-M disk image](https://github.com/a2-4am/anti-m/releases/download/v1.6/anti-m-v1.6-2019-11-09.dsk)
(version **1.6**, released **2019-11-09**, runs on any 48K Apple II)
[Download latest Anti-M disk image](https://github.com/a2-4am/anti-m/releases/latest/download/anti-m.dsk)
(version **2.2**, released **2024-02-27**, runs on any 48K Apple II)
## What is this?
@ -49,6 +49,7 @@ then press `<RETURN>`. The game should boot normally.
- Lazer Silk (Gebelli)
- Lunar Leepers (On-Line Systems)
- Neptune (Gebelli)
- Odin (Odesta)
- Orbitron (Sirius)
- Pest Patrol (On-Line Systems)
- Phaser Fire (Gebelli)
@ -56,13 +57,16 @@ then press `<RETURN>`. The game should boot normally.
- Red Alert (Broderbund)
- Russki Duck (Gebelli)
- Seafox (Broderbund)
- Sensible Speller (Sensible Software)
- Serpentine (Broderbund) (*)
- Sky Blazer (Broderbund)
- Space Adventure (Sierra Software)
- Space Eggs (Sirius)
- Space Quarks (Broderbund)
- Star Blazer (Broderbund)
- Star Thief (Cavalier)
- Trick Shot (IDSI)
- Typing Tutor (Microsoft)
- Zenith (Gebelli)
- all 13-sector disks (e.g. Epyx, Edu-Ware, many others)
- all ProDOS disks
@ -95,6 +99,37 @@ launching Anti-M.
## History
v2.2 - 2024-02-27
- add support for ABM
v2.1 - 2024-02-23
- fix detection of 13-sector disks (thanks John A. for the report)
v2.0 - 2023-09-18
- fix a crash when booting "Story Maker"
- fix a crash when booting "Micro League Baseball"
- further drive 2 fixes for AppleWin
v1.9 - 2023-05-15
- support "Disk Recovery"
- support "Space Adventure"
- fix drive 2 detection
v1.8 - 2020-11-10
- support "Sensible Speller"
- support "Typing Tutor"
- add some compatibility fixes for Virtual ][
v1.7 - 2020-08-11
- support "Odin"
- fix a crash when booting "World Karate Championship"
v1.6 - 2019-11-09
- support Personal Software 13-sector disks ("MicroChess 2.0," "Checker King,"

View File

@ -6,7 +6,7 @@
;-------------------------------
; Anti-M
; a 4am hack
; (c) 2019 by 4am
; (c) 2019-2024 by 4am
;
; Permission is hereby granted, free of charge, to any
; person obtaining a copy of this software and associated
@ -57,7 +57,7 @@ tmp = $FC ; byte
cmp #$60
bne Boot
jsr CheckDrive2
bne Boot2
bcs Boot2
@showprompt
jsr HOME
lda MACHINEID
@ -155,25 +155,103 @@ Boot
CheckDrive2
lda $C0E9
lda $C0EB
ldy #6
-- ldx #$11
- dex
bne -
sec
sbc #1
jsr @spinup
jsr @seek
ldx #21
ldy #0
--- iny
bne +
clc
dex
bmi @driveoff
+
- lda $C0EC
bpl -
-- cmp #$D5
bne ---
- lda $C0EC
bpl -
cmp #$AA
bne --
- lda $C0EC
bpl -
cmp #$AD
bne --
@driveoff
lda $C0E8
rts
step=$fd
phase=$fe
tmptrk=$ff
tmpsec=$3c
@seek
ldy #0
sty step
sty phase
lda #$44
sta tmptrk
@copy_cur
lda tmptrk
sta tmpsec
sec
sbc phase
beq +++
bcs +
eor #$ff
inc tmptrk
bcc ++
+ sbc #1
dec tmptrk
++ cmp step
bcc +
lda step
+ cmp #8
bcs +
tay
sec
+ jsr ++++
lda step1, y
jsr @delay
lda tmpsec
clc
jsr +++++
lda step2, y
jsr @delay
inc step
bne @copy_cur
+++ jsr @delay
clc
++++ lda tmptrk
+++++ and #3
rol
tax
lda $C0E0, x
rts
@spinup ldy #6
- jsr @delay
dey
bpl --
lda #$00
ldy #$00
- eor $C0EC
dey
bne -
sta $C0E8
cmp #$00
bpl -
@delay
-- ldx #$11
- dex
bne -
inc $46
bne +
inc $47
+ sec
sbc #1
bne --
@knownret
rts
step1 !byte 1, $30, $28, $24, $20, $1e, $1d, $1c
step2 !byte $70, $2c, $26, $22, $1f, $1e, $1d, $1c
Tracer
jsr IDBroderbund
bcc BeginTheBoot
@ -187,14 +265,21 @@ Tracer
bcc BeginTheBoot
jsr IDProgame
bcc BeginTheBoot
jsr IDAlphaBeta
bcc BeginTheBoot
; [execution falls through here]
; [and runs anyway]
BeginTheBoot
lda #$CD ;Virtual II fixes
sta $9D
sta $A2
lda #4
sta $AC
lda #$11 ;Virtual II fix
pha
plp ;match boot-time flags and registers
lda #1
lda $800 ;might not be 1
ldy #0
ldx #$60
jmp $0801
@ -205,10 +290,18 @@ Tracer13
bcc BeginTheBoot13
jsr IDBoot13
bcc BeginTheBoot13
jsr IDSensible
bcc BeginTheBoot13
; [execution falls through here]
; [and runs anyway]
BeginTheBoot13
lda #$CD ;Virtual II fixes
sta $9D
sta $A2
lda #4
sta $AC
ldx #$33 ;Sensible Software fix
ldy $0300
jmp $0301
@ -253,7 +346,7 @@ StringTable
!word @mainmenu
@header
!text "Anti-M v1.6 by 4am 2019-11-09"
!text "Anti-M v2.2 by 4am 2024-02-27"
!text "________________________________________",$8D
!text $8D,$8D,$8D,$8D,$8D,$8D,$8D,$8D,$00
@mainmenu
@ -270,3 +363,5 @@ StringTable
!src "src/idprodos.a"
!src "src/idprogame.a"
!src "src/idpersonal.a"
!src "src/idalphabeta.a"
!src "src/idsensible.a"

37
src/idalphabeta.a Normal file
View File

@ -0,0 +1,37 @@
; Alpha-Beta tracer
; written by qkumba
;
; tested on
; - Odin
;
IDAlphaBeta
lda #8
ldx #1
ldy #15
jsr CompareMemory
!byte $48 ;PHA
!byte $28 ;PLP
!byte $8C,$F4,$03 ;STY $03F4
!byte $2C,$81,$C0 ;BIT $C081
!byte $2C,$81,$C0 ;BIT $C081
!byte $98 ;TYA
!byte $99,$08,$FF ;STA $FF08,Y
bcs @exit
; patch code to offer magic values
lda #$A9 ;LDA
sta $833
sta $83B
sta $841
ldx #$FA
stx $834
lda #$EA
sta $835
sta $83D
sta $843
inx
stx $83C
lda #3
sta $842
@exit
rts

View File

@ -10,6 +10,11 @@ IDBoot
ldy #$5C
sty @patch+1
bcc +
; we found D5 AA 96 T00S00 D5 AA ..
; check for weird Sensible Software 13-sector disk with D5 AA 96 sectors
cmp #$B5
beq ++
lda #$90
sta $867B
@ -29,7 +34,7 @@ IDBoot
bne @patch
; and loop anyway in case it's a hybrid disk and we missed the D5 AA 96
dec @retries
++ dec @retries
bne @patch
; found nothing but D5 AA B5, proceed as 13-sector
@ -248,6 +253,18 @@ IDBoot13
jmp @dispatch
@notdos32f
lda #$7D
ldx #$6E
ldy #8
jsr @CompareMemoryRel
!byte $BD,$8A,$C0 ;LDA $C08A,X
!byte $B0,$03 ;BCS *+5
!byte $BD,$8B,$C0 ;LDA $C08B,X
bcs @notdos32g
inc $7D6F
jmp @dispatch
@notdos32g
@dispatch
lda $d1d1 ;SMC

View File

@ -24,6 +24,8 @@
; - Phaser Fire (Gebelli)
; - Russki Duck (Gebelli)
; - Zenith (Gebelli)
; - Disk Recovery (Sensible Software)
; - ABM (MUSE)
;
IDBroderbund
; first stage is just a standard hybrid DOS 3.2/3.3 bootloader
@ -266,9 +268,15 @@ IDBroderbund
ldx #<@DOS33Callback
ldy #>@DOS33Callback
cmp #$B6
beq @hookhybrid
ldx #<@MUSECallback
ldy #>@MUSECallback
cmp #$76
bne @jmpdos
@hookhybrid
lda #$0C
sta $300 ;Sensible Software page-wraparound fix
lda #$4C
sta $33C
stx $33D
@ -315,6 +323,16 @@ IDBroderbund
beq @skip2a
inc $3D60
@skip2a
+ ldy $371D
cpy $371F
bne +
dey
bne +
lda $371E
ora $3720
ora $3721
bne +
inc $371F ; select drive 2
+ jmp $3700 ; let it goooo...
@SpaceEggsCallback3 !pseudopc $300 {
@ -427,6 +445,24 @@ IDBroderbund
ldx #$60
jmp $B700
@MUSECallback
lda $85FF
beq @skip2f
lda #$7D
ldx #$5F
ldy #8
jsr CompareMemory
!byte $BD,$8A,$C0 ;LDA $C08A,X
!byte $B0,$03 ;BCS *+5
!byte $BD,$8B,$C0 ;LDA $C08B,X
bcs @notmuse
inc $7D60
@notmuse
@skip2f
ldx #$60
jmp $7700
@StarThiefCallback2 !pseudopc $110 {
@StarThiefCallback2x
lda #$4C

View File

@ -101,6 +101,13 @@ IDIDSI
lda $d1d1,X ;SMC
cmp #$c0
bne @cb3jump
ldy #<((@cb3_end + 1) & -2)
- tya
eor $bf00,y
sta $bf00,y
iny
iny
bne -
lda #$BF
@cb3patch2
sta $d1d1,X ;SMC
@ -114,6 +121,7 @@ IDIDSI
sta $d1d1,X ;SMC
@cb3jump
jmp (@cb3patch3+1)
@cb3_end
}
@tracer3_e
}

View File

@ -12,17 +12,37 @@ IDProDOS
!byte $86,$43 ;STA $43
!byte $C9,$03 ;CMP #$03
bcs @exit
ldx #$60
stx $801
inc $3D
jsr $C65C
dec $27
dec $3D
dec $3D
lda #$38
sta $801
lda #9
ldx #$48
ldy #7
jsr CompareMemory
!byte $C9,$E7 ;CMP #$E7
!byte $D0,$F4 ;BCS *-$0B
!byte $BD,$8C,$C0 ;LDA $C08C,X
bcc @exit
ldy #@ProDOSCallback_e-@ProDOSCallback
- lda @ProDOSCallback-1,y
sta @ProDOSCallbackx-1,y
dey
bne -
lda #$4C
sta $8FC
lda #<@ProDOSCallbackx
sta $8FD
lda #>@ProDOSCallbackx
sta $8FE
clc
@exit
rts

42
src/idsensible.a Normal file
View File

@ -0,0 +1,42 @@
; Sensible Software tracer
; written by qkumba
;
; tested on
; - Sensible Speller
;
IDSensible
lda #3
ldx #1
ldy #6
jsr CompareMemory
!byte $29,$00 ;AND #$00
!byte $85,$3A ;STA $3A
!byte $9A ;TXS
!byte $08 ;PHP
bcs @exit
; patch encoded code to regain control after it loads sectors into $400+
lda #(<@pcallback) xor $99
sta $03A3
lda #(>@pcallback) xor $99
sta $03A4
@exit
rts
@pcallback
!word @callback
@callback
; disable ROM checksum-failure branching
lda $6CE
cmp #$4C
bne +
lda #$60
sta $6CE
; and nibble check which fails occasionally
lda #$2C
sta $79B
+ jmp ($0026)