mirror of
https://github.com/a2-4am/anti-m.git
synced 2024-06-15 08:29:33 +00:00
commit
fc9a3dc043
|
@ -6,10 +6,3 @@ Do not work yet:
|
|||
$A2BB: 4C D4 A2 to bypass undocumented 6502 opcodes
|
||||
$A2F6: 4C 36 4D to bypass undocumented 6502 opcodes and 6502-specific JMP behavior
|
||||
...TODO there are more undocumented opcodes
|
||||
- Star Thief (Cavalier)
|
||||
$42C0: 4C 01 68 to bypass undocumented 6502 opcodes and 6502-specific JMP behavior
|
||||
- Quadrant 6112 (Sensible Software)
|
||||
- Beer Run (Sirius)
|
||||
- Gamma Goblins (Sirius)
|
||||
- Orbitron (Sirius)
|
||||
- Space Eggs (Sirius)
|
||||
|
|
|
@ -97,6 +97,8 @@ Tracer
|
|||
bcc BeginTheBoot
|
||||
jsr IDIDSI
|
||||
bcc BeginTheBoot
|
||||
jsr IDSirius
|
||||
bcc BeginTheBoot
|
||||
; [execution falls through here]
|
||||
Unsupported
|
||||
lda $C082
|
||||
|
@ -170,3 +172,4 @@ StringTable
|
|||
!src "src/idbroderbund.a"
|
||||
!src "src/idspiradisc.a"
|
||||
!src "src/ididsi.a"
|
||||
!src "src/idsirius.a"
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
; Broderbund & Gebelli tracers
|
||||
; written by 4am
|
||||
; written by 4am and qkumba
|
||||
;
|
||||
; tested on
|
||||
; - Choplifter (Broderbund)
|
||||
|
@ -7,10 +7,12 @@
|
|||
; - Dueling Digits (Broderbund)
|
||||
; - Genetic Drift (Broderbund)
|
||||
; - Labyrinth (Broderbund)
|
||||
; - Quadrant 6112 (Sensible Software)
|
||||
; - Red Alert (Broderbund)
|
||||
; - Seafox (Broderbund)
|
||||
; - Serpentine (Broderbund)
|
||||
; - Sky Blazer (Broderbund)
|
||||
; - Space Eggs (Sirius)
|
||||
; - Space Quarks (Broderbund)
|
||||
; - Star Blazer (Broderbund)
|
||||
; - Eggs-It (Gebelli)
|
||||
|
@ -36,10 +38,21 @@ IDBroderbund
|
|||
bcs @exit
|
||||
|
||||
; patch code to regain control after it loads 1 sector into $0300
|
||||
lda $837
|
||||
cmp #$4C
|
||||
clc
|
||||
bne @maybeSpaceEggs
|
||||
lda #<@BroderbundCallback
|
||||
sta $0838
|
||||
lda #>@BroderbundCallback
|
||||
sta $0839
|
||||
bne @exit
|
||||
|
||||
@maybeSpaceEggs
|
||||
lda #<@SpaceEggsCallback
|
||||
sta $0842
|
||||
lda #>@SpaceEggsCallback
|
||||
sta $0843
|
||||
|
||||
@exit
|
||||
rts
|
||||
|
@ -113,6 +126,7 @@ IDBroderbund
|
|||
lda #>@DMMCallback
|
||||
sta $0323
|
||||
jmp $0301
|
||||
; TODO
|
||||
|
||||
@unsupported
|
||||
jmp Unsupported
|
||||
|
@ -217,3 +231,110 @@ IDBroderbund
|
|||
lda #$FD ; SMC
|
||||
rts
|
||||
}
|
||||
|
||||
@SpaceEggsCallback
|
||||
lda $33C
|
||||
cmp #$AD
|
||||
bne @maybeQuadrant
|
||||
ldx #<@SpaceEggsCallback2
|
||||
ldy #>@SpaceEggsCallback2
|
||||
lda $3CC
|
||||
cmp #$36
|
||||
beq @hookhybrid
|
||||
ldx #<@StarThiefCallback
|
||||
ldy #>@StarThiefCallback
|
||||
cmp #$41
|
||||
bne +
|
||||
|
||||
@hookhybrid
|
||||
lda #$4C
|
||||
sta $33C
|
||||
stx $33D
|
||||
sty $33E
|
||||
jmp $301
|
||||
|
||||
@maybeQuadrant
|
||||
cmp #$3B
|
||||
bne +
|
||||
lda #$4C xor $99
|
||||
sta $39A
|
||||
lda #<@QuadrantCallback xor $99
|
||||
sta $39B
|
||||
lda #>@QuadrantCallback xor $99
|
||||
sta $39C
|
||||
jmp $301
|
||||
|
||||
@SpaceEggsCallback2
|
||||
lda $37E0
|
||||
cmp #$32
|
||||
bne +
|
||||
lda #$EA
|
||||
sta $3CDC
|
||||
sta $3CE0
|
||||
sta $3CE1
|
||||
sta $3CE7
|
||||
sta $3CEB
|
||||
sta $3CED
|
||||
sta $3CF1
|
||||
sta $3CF4
|
||||
sta $3CF8
|
||||
lda #<@SpaceEggsCallback3x
|
||||
sta $3CFE
|
||||
lda #>@SpaceEggsCallback3x
|
||||
sta $3CFF
|
||||
ldy #@SpaceEggsCallback3_e-@SpaceEggsCallback3
|
||||
- lda @SpaceEggsCallback3-1,y
|
||||
sta $300-1,y
|
||||
dey
|
||||
bne -
|
||||
+ jmp $3700 ; let it goooo...
|
||||
|
||||
@SpaceEggsCallback3 !pseudopc $300 {
|
||||
@SpaceEggsCallback3x
|
||||
jsr $3700
|
||||
pla
|
||||
pla
|
||||
jsr $5700
|
||||
lda #$EA
|
||||
sta $49C3
|
||||
sta $49C4
|
||||
sta $49C8
|
||||
sta $49CB
|
||||
sta $49CE
|
||||
sta $49D2
|
||||
sta $49E3
|
||||
sta $49E6
|
||||
sta $49ED
|
||||
sta $49F1
|
||||
sta $49F7
|
||||
sta $4928
|
||||
sta $4934
|
||||
sta $493B
|
||||
sta $4949
|
||||
sta $494F
|
||||
sta $4952
|
||||
sta $495A
|
||||
sta $495E
|
||||
sta $4960
|
||||
sta $4969
|
||||
sta $496F
|
||||
sta $4976
|
||||
sta $497A
|
||||
sta $497E
|
||||
rts
|
||||
}
|
||||
@SpaceEggsCallback3_e
|
||||
|
||||
@QuadrantCallback
|
||||
lda #$60
|
||||
sta $6B3
|
||||
jmp $400
|
||||
|
||||
@StarThiefCallback
|
||||
lda #$4C
|
||||
sta $42C0
|
||||
lda #$01
|
||||
sta $42C1
|
||||
lda #$68
|
||||
sta $42C2
|
||||
jmp $4200
|
||||
|
|
98
src/idsirius.a
Normal file
98
src/idsirius.a
Normal file
|
@ -0,0 +1,98 @@
|
|||
; Sirius tracer
|
||||
; written by qkumba
|
||||
;
|
||||
; tested on
|
||||
; - Beer Run
|
||||
; - Gamma Goblins
|
||||
; - Orbitron
|
||||
;
|
||||
IDSirius
|
||||
lda #8
|
||||
ldx #1
|
||||
ldy #18
|
||||
jsr CompareMemory
|
||||
!byte $8D,$50,$C0 ;STA $C050
|
||||
!byte $8D,$52,$C0 ;STA $C052
|
||||
!byte $8D,$54,$C0 ;STA $C054
|
||||
!byte $8D,WILDCARD,$C0 ;STA $C0xx
|
||||
!byte $A6,$2B ;LDX $2B
|
||||
!byte $A9,$04 ;LDA #$04
|
||||
!byte $85,$11 ;STA $11
|
||||
bcs @exit
|
||||
|
||||
; patch code to regain control after it loads sectors into $400+
|
||||
ldy #@callback1_e-@callback1
|
||||
- lda @callback1-1,y
|
||||
sta @callback1x-1,y
|
||||
dey
|
||||
bne -
|
||||
ldx #<@callback1x
|
||||
stx $087E
|
||||
ldy #>@callback1x
|
||||
sty $087F
|
||||
lda $86F
|
||||
cmp #$4C
|
||||
clc
|
||||
bne @exit
|
||||
stx $0870
|
||||
sty $0871
|
||||
|
||||
@exit
|
||||
rts
|
||||
|
||||
@callback1 !pseudopc $300 {
|
||||
@callback1x
|
||||
; replace undocumented opcode with stack pointer restore
|
||||
ldx $525
|
||||
inx
|
||||
bne @orbitron
|
||||
ldx #$20
|
||||
txs
|
||||
ldx #$A2
|
||||
stx $525
|
||||
ldx #$01
|
||||
stx $526
|
||||
ldx #$9A
|
||||
stx $527
|
||||
bne @run1
|
||||
|
||||
@orbitron
|
||||
ldx $53C
|
||||
cpx #$85
|
||||
bne @unknown
|
||||
ldx $517
|
||||
cpx #$7A
|
||||
bne @gammagoblins
|
||||
ldx #$EA
|
||||
stx $517
|
||||
bne @run1
|
||||
|
||||
@gammagoblins
|
||||
ldx #$4C
|
||||
stx $53C
|
||||
ldx #<@callback2
|
||||
stx $53D
|
||||
ldx #>@callback2
|
||||
stx $53E
|
||||
bne @run1
|
||||
|
||||
@unknown
|
||||
@run1
|
||||
ldx $2B
|
||||
jmp $400
|
||||
|
||||
@callback2
|
||||
lda #$EA
|
||||
sta $8F84
|
||||
sta $8F8F
|
||||
sta $8F93
|
||||
sta $8F98
|
||||
sta $8FB8
|
||||
sta $8FBC
|
||||
sta $8FD3
|
||||
sta $8FD8
|
||||
sta $8FE4
|
||||
tsx
|
||||
rts
|
||||
}
|
||||
@callback1_e
|
Loading…
Reference in New Issue
Block a user