Skip to content

Commit

Permalink
Fixed more fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
dboddie committed May 6, 2019
1 parent cf2be28 commit 36056f7
Show file tree
Hide file tree
Showing 8 changed files with 42 additions and 22 deletions.
1 change: 1 addition & 0 deletions Fixes/Confuzion/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,5 @@ python patch_checks.py
# Replace the original CONFUZION file with the patched version.
UEFtrans.py "$2" remove 1
UEFtrans.py "$2" insert 1 temp/CONFUZION
UEFtrans.py "$2" insert 0 temp/LOADER
rm -r temp
19 changes: 15 additions & 4 deletions Fixes/Confuzion/patch_checks.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,14 @@
t = open("temp/CONFUZION").read()
t = (# Disable Plus 1 features that cause problems.
"\x0c\x11\x00*FX163,128,1\r"
"?&212=&D6\r"
"?&213=&F1\r"
'CHAIN"CONLOAD"\x11\x01\r'
)

open("temp/LOADER", "wb").write(t)
open("temp/LOADER.inf", "w").write("$.LOADER\t0\t0\t%x" % len(t))

t = open("temp/CONFUZION", "rb").read()
#t = t[:0x19] + (
# "\xa9\x0d\xea" # lda $3cc -> lda #$0d; nop
# ) + t[0x1c:0x22] + (
Expand All @@ -7,7 +17,8 @@
# "\x49\x91\xea" # eor $3ca -> eor #$91; nop
# ) + t[0x2c:]

t = ("\xa9\x91" # lda #$91
t = (# Update CFS checks.
"\xa9\x91" # lda #$91
"\x8d\xca\x03" # sta $3ca
"\xa9\x0e" # lda #$0e
"\x8d\xcb\x03" # sta $3cb
Expand All @@ -19,5 +30,5 @@
"\x8d\xce\x03" # sta $3ce
) + t

open("temp/CONFUZION", "w").write(t)
open("temp/CONFUZION.inf", "w").write("$.CONFUZION\td37\td37\t22c9")
open("temp/CONFUZION", "wb").write(t)
open("temp/CONFUZION.inf", "w").write("$.CONFUZION\td37\td37\t%x" % len(t))
8 changes: 2 additions & 6 deletions Fixes/Lunar_Rescue/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,7 @@ fi

cp "$1" "$2"
UEFtrans.py "$1" extract 0,1,2,3 temp

# Patch out the JMP (&FFFC) reset call EORed with 0x0e in the final file.
# 0x04 is 0xea ^ 0x0e where 0xea is the opcode for NOP.
python -c 't = open("temp/Lunar3\xc3").read(); t = t[:0x261e] + "\x04\x04\x04" + t[0x2621:]; open("temp/Lunar3\xc3", "w").write(t)'

UEFtrans.py "$2" remove 3
python -c 'import commands, os; os.system("UEFtrans.py '"$2"' insert 3 temp/Lunar3\xc3")'
python patch_file.py "$2"

rm -r temp
11 changes: 11 additions & 0 deletions Fixes/Lunar_Rescue/patch_file.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/usr/bin/env python

import commands, os, sys

# Patch out the JMP (&FFFC) reset call EORed with 0x0e in the final file.
# 0x04 is 0xea ^ 0x0e where 0xea is the opcode for NOP.
t = open("temp/Lunar3\xc3").read()
t = t[:0x261e] + "\x04\x04\x04" + t[0x2621:]
open("temp/Lunar3\xc3", "wb").write(t)

os.system("UEFtrans.py " + commands.mkarg(sys.argv[1]) + " insert 3 temp/Lunar3\xc3")
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ obtained from [the UEF2ROM repository](https://bitbucket.org/dboddie/uef2rom).
Some are build from disk images which must first be converted to UEF files.
This is performed by a collection of scripts in the `Fixes` directory.

Some of these scripts require the `UEFtrans.py` tool which can be obtained from
Some of these scripts require the `UEFtrans.py` tool and `UEFfile.py` module
which can be obtained from
[the UEFfile repository](https://bitbucket.org/dboddie/ueffile).

Other scripts require the `ADF2INF.py` tool which can be obtained from
Expand Down
18 changes: 9 additions & 9 deletions batch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ UEF2ROM.py -a -B e00 -c e00::x:/: -m -s UEFs/AnarchyZone-patched.uef ROMs/Anarch
UEF2ROM.py -a -B e00 -c e00:.5ad0/: -m -s -pf patch_files/arcadians.txt UEFs/Arcadians_E.uef ROMs/Arcadians-1.rom ROMs/Arcadians-2.rom
UEF2ROM.py -a -B e00 -c e00 -w 39f UEFs/AstroPlumber_E.uef ROMs/AstroPlumber.rom
UEF2ROM.py -a -c :.b00/: -m -s -pf patch_files/aviator.txt UEFs/Aviator-v1.1_B.uef ROMs/Aviator-1.rom ROMs/Aviator-2.rom
UEF2ROM.py -a -B e00 -c e00:e00:/: -p -s -w 39f UEFs/Ballistix_E-EveryGameGoing-BlueRibbon.uef ROMs/Ballistix-1.rom ROMs/Ballistix-2.rom
UEF2ROM.py -a -B e00 -c e00:e00:/: -p -s -w 39f UEFs/Ballistix_E.uef ROMs/Ballistix-1.rom ROMs/Ballistix-2.rom
UEF2ROM.py -a -B e00 -c x:1100/: -s -t -w 39f UEFs/BalloonBuster_E.uef ROMs/BalloonBuster.rom
UEF2ROM.py -a -B e00 -c : -m UEFs/BanditsAt3OClock_E.uef ROMs/Bandits.rom
UEF2ROM.py -a -B e00 -c e00:e00::e00:6700:120/: -p -f 0-8 -s UEFs/Barbarian_E.uef ROMs/Barbarian-Practice-1.rom ROMs/Barbarian-Practice-2.rom
Expand All @@ -30,7 +30,7 @@ UEF2ROM.py -a -c e00:/: -L postload/keyboard_scan_disable.oph postload -pf patch
UEF2ROM.py -a -B e00 -c e00:.4200 -m -pf patch_files/boxer.txt UEFs/Boxer_E.uef ROMs/Boxer.rom
UEF2ROM.py -a -B e00 -c :x:e00:e00:1100:/:e00:400:400:400:400 -r -s -w 860 -t UEFs/Breakthrough_RUN_E.uef ROMs/Breakthrough-1.rom ROMs/Breakthrough-2.rom
UEF2ROM.py -a -B e00 -c e00/: -s -t -pf patch_files/brian_jacks.txt UEFs/BrianJacksSuperstarChallenge_E.uef ROMs/BrianJacksSuperstarChallenge.rom
UEF2ROM.py -a -B e00 -c e00:e00:5800:e00:e00/: -w 880 UEFs/BugBlast.uef ROMs/BugBlast-1.rom ROMs/BugBlast-2.rom
UEF2ROM.py -a -B e00 -c e00:e00:5800:e00:e00/: -w 880 UEFs/BugBlaster-PIASRR_E.uef ROMs/BugBlast-1.rom ROMs/BugBlast-2.rom
UEF2ROM.py -a -B e00 -c e00:1900:e00:400:900:1000:1100:3f00 -s -t -w 39f UEFs/BugEyes_E.uef ROMs/BugEyes.rom
UEF2ROM.py -a -B e00 -c e00::1d00/6b00 -m -s UEFs/BugEyes2-EveryGameGoing.uef ROMs/BugEyes2-1.rom ROMs/BugEyes2-2.rom
UEF2ROM.py -a -B e00 -c : UEFs/Bugs_E.uef ROMs/Bugs.rom
Expand All @@ -55,18 +55,18 @@ cat ROMs/Clogger-1.rom ROMs/Clogger-2.rom ROMs/Clogger-3.rom > ROMs/Clogger_E.ro
UEF2ROM.py -a -B e00 -c 600:400/: -f 4-5 -m -r -s UEFs/CodenameDroid_E.uef ROMs/CodenameDroid-1.rom ROMs/CodenameDroid-2.rom
UEF2ROM.py -a -B e00 -c :/: -s -w 39f UEFs/Commando-PIASRR_E.uef ROMs/Commando-1.rom ROMs/Commando-2.rom
UEF2ROM.py -a -B e00 -c e00 -w 39f UEFs/ConditionRed_E.uef ROMs/ConditionRed.rom
UEF2ROM.py -a -B e00 -c x:: -f 1-3 -m -r UEFs/Confuzion-EveryGameGoing.uef ROMs/Confuzion.rom
UEF2ROM.py -a -B e00 -c x:x:x:: -m -x UEFs/Confuzion-EveryGameGoing.uef ROMs/Confuzion.rom
UEF2ROM.py -a -B e00 -c e00 -w 39f UEFs/CopsNRobbers_BE.uef ROMs/CopsNRobbers.rom
UEF2ROM.py -a -B e00 -c e00:e00 UEFs/CosmicCamouflage_Tape.uef ROMs/CosmicCamouflage.rom
UEF2ROM.py -a -B e00 -c e00:e00 UEFs/CosmicCamouflage_E.uef ROMs/CosmicCamouflage.rom
UEF2ROM.py -a -B e00 -c e00::::::1900/: -s -t -w d3f:ef97 UEFs/CrazeeRider_E.uef ROMs/CrazeeRider-1.rom ROMs/CrazeeRider-2.rom
UEF2ROM.py -a -B e00 -c e00:.4543 -m -pf patch_files/crazy_tracer.txt UEFs/CrazyTracer_E.uef ROMs/CrazyTracer.rom
UEF2ROM.py -a -B e00 -c e00 -m UEFs/CreepyCave_BE.uef ROMs/CreepyCave.rom
UEF2ROM.py -a -B e00 -c ::x UEFs/Croaker_E.uef ROMs/Croaker.rom
UEF2ROM.py -a -B e00 -c :::x:x:x:x:dc0:dc0/dc0 -p -t -w 39f UEFs/CrystalCastles_E.uef ROMs/CrystalCastles-1.rom ROMs/CrystalCastles-2.rom
UEF2ROM.py -a -B e00 -c : UEFs/CybertronMission_Tape.uef ROMs/CybertronMission.rom
UEF2ROM.py -a -B e00 -c : UEFs/CybertronMission_E.uef ROMs/CybertronMission.rom
UEF2ROM.py -a -c ::5f80:::6840:7c40:/: -pf patch_files/cyborg_warriors.txt -s -w 39f UEFs/CyborgWarriors_E.uef ROMs/CyborgWarriors-1.rom ROMs/CyborgWarriors-2.rom
UEF2ROM.py -a -B e00 -c e00:/: -m -s UEFs/CylonAttack_E.uef ROMs/CylonAttack-1.rom ROMs/CylonAttack-2.rom
UEF2ROM.py -a -B e00 -c e00:1500: UEFs/DangerUXB_Tape.uef ROMs/DangerUXB.rom
UEF2ROM.py -a -B e00 -c e00:1500: UEFs/DangerUXB_E.uef ROMs/DangerUXB.rom
UEF2ROM.py -a -B e00 -c : UEFs/DareDevilDenis_E.uef ROMs/DareDevilDenis.rom
UEF2ROM.py -a -B e00 -c e00:::::3000 -p -w 39f UEFs/DeathStar-SCRR_E.uef ROMs/DeathStar.rom
UEF2ROM.py -a -B e00 -c e00::x:x/: -s -w 39f UEFs/DenisThroughTheDrinkingGlass_E.uef ROMs/DenisThroughTheDrinkingGlass-1.rom ROMs/DenisThroughTheDrinkingGlass-2.rom
Expand All @@ -86,7 +86,7 @@ UEF2ROM.py -a -B e00 -c e00:/: -s -pf patch_files/elite.txt UEFs/Elite-SRR_E.uef
UEF2ROM.py -a -B e00 -c e00:/: -s -t -w 39f UEFs/Elixir_E.uef ROMs/Elixir-1.rom ROMs/Elixir-2.rom
UEF2ROM.py -a -B e00 -c : -m UEFs/Empire_BE.uef ROMs/Empire.rom
UEF2ROM.py -a -B e00 -c : -m UEFs/Enigma_E.uef ROMs/Enigma.rom
UEF2ROM.py -a -B e00 -c :::e00 UEFs/EMBA.uef ROMs/EMBA.rom
UEF2ROM.py -a -B e00 -c :::e00 UEFs/EscapeFromMoonbaseAlpha_E.uef ROMs/EMBA.rom
UEF2ROM.py -a -B e00 -c e00 UEFs/Erbert_E.uef ROMs/Erbert.rom
UEF2ROM.py -a -c e00:/: -L postload/southern_belle.oph postload -s -w d3f UEFs/EveningStar_E.uef ROMs/EveningStar-1.rom ROMs/EveningStar-2.rom
UEF2ROM.py -a -B e00 -c e00:e00::x -f 1-5 -m -s -P 290 1:2:3:0 UEFs/Exile-EveryGameGoing.uef ROMs/Exile-1.rom ROMs/Exile-2.rom ROMs/Exile-3.rom ROMs/Exile-4.rom
Expand Down Expand Up @@ -140,7 +140,7 @@ UEF2ROM.py -a -c e00:e00:5820:f00/5800 -m -s UEFs/JoeBlade2_E.uef ROMs/JoeBlade2
UEF2ROM.py -a -B e00 -c : -p -s -w 39f UEFs/Joey-patched.uef ROMs/Joey.rom
UEF2ROM.py -a -B e00 -c e00 -m UEFs/Skirmish_E.uef ROMs/Joust.rom
UEF2ROM.py -a -B e00 -c e00 -m UEFs/JungleJive_E.uef ROMs/JungleJive.rom
UEF2ROM.py -a -B e00 -c e00:/: -s UEFs/KarateCombat.uef ROMs/KarateCombat-1.rom ROMs/KarateCombat-2.rom
UEF2ROM.py -a -B e00 -c e00:/: -s UEFs/KarateCombat-SCRR_E.uef ROMs/KarateCombat-1.rom ROMs/KarateCombat-2.rom
UEF2ROM.py -a -B e00 -c x:/: -s -w 39f UEFs/Kayleth_E.uef ROMs/Kayleth-1.rom ROMs/Kayleth-2.rom
UEF2ROM.py -a -c : -s UEFs/Killapede_BE.uef ROMs/Killapede.rom
UEF2ROM.py -a -B e00 -c e00: UEFs/KillerGorilla_E.uef ROMs/KillerGorilla.rom
Expand Down Expand Up @@ -276,7 +276,7 @@ cat ROMs/LastNinja-1.rom ROMs/LastNinja-2.rom ROMs/LastNinja-3.rom ROMs/LastNinj
UEF2ROM.py -a -B e00 -c :4000: -m UEFs/TheMine_E.uef ROMs/TheMine.rom
UEF2ROM.py -a -B e00 -c : -m -r UEFs/TheNineDancers_RUN_BE.uef ROMs/TheNineDancers.rom
UEF2ROM.py -a -c e00:400:7080:1d00:2400/: -m -s UEFs/The_Way_Of_The_Exploding_Fist-EveryGameGoing.uef ROMs/ExplodingFist-1.rom ROMs/ExplodingFist-2.rom
UEF2ROM.py -a -B e00 -c e00:/: -s UEFs/Thrust_Tape.uef ROMs/Thrust-1.rom ROMs/Thrust-2.rom
UEF2ROM.py -a -B e00 -c e00:/: -s UEFs/Thrust_E.uef ROMs/Thrust-1.rom ROMs/Thrust-2.rom
UEF2ROM.py -a -B e00 -c ::::x:/: -r -s -w 39f UEFs/Thunderstruck_E.uef ROMs/Thunderstruck-1.rom ROMs/Thunderstruck-2.rom
UEF2ROM.py -a -B e00 -c x:/: -m -r -s UEFs/Thunderstruck2_E.uef ROMs/Thunderstruck2-1.rom ROMs/Thunderstruck2-2.rom
UEF2ROM.py -a -B e00 -c e00:/: -w 39f UEFs/Trapper_E.uef ROMs/Trapper.rom
Expand Down
2 changes: 1 addition & 1 deletion fetch-uefs.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,4 +82,4 @@

new_lines.append(",".join(new_line))

open("roms.csv", "w").write("\n".join(new_lines))
open("roms.csv", "w").write("\n".join(new_lines) + "\n")
2 changes: 1 addition & 1 deletion roms.csv
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ OK (paging required),Clogger,Impact,Clogger_E.uef,Clogger-1.rom Clogger-2.rom Cl
OK (stripped),Codename: Droid,Superior,CodenameDroid_E.uef,CodenameDroid-1.rom CodenameDroid-2.rom,-a -B e00 -c 600:400/: -f 4-5 -m -r -s,https://www.stairwaytohell.com/electron/uefarchive/Superior/CodenameDroid_E.zip,CodenameDroid_E.uef
OK,Commando,Elite,Commando-PIASRR_E.uef,Commando-1.rom Commando-2.rom,-a -B e00 -c :/: -s -w 39f,https://www.stairwaytohell.com/electron/uefarchive/SuperiorReRelease/Commando-PIASRR_E.zip,Commando-PIASRR_E.uef
OK,Condition Red,Blue Ribbon,ConditionRed_E.uef,ConditionRed.rom,-a -B e00 -c e00 -w 39f,https://www.stairwaytohell.com/electron/uefarchive/BlueRibbon/ConditionRed_E.zip,ConditionRed_E.uef
OK (patched),Confuzion,Incentive,Confuzion-EveryGameGoing.uef,Confuzion.rom,-a -B e00 -c x:: -f 1-3 -m -r,http://www.everygamegoing.com/download/electron/incentive/tapes/Confuzion.zip,Confuzion_BE.uef
OK (patched),Confuzion,Incentive,Confuzion-EveryGameGoing.uef,Confuzion.rom,-a -B e00 -c x:x:x:: -m -x,http://www.everygamegoing.com/download/electron/incentive/tapes/Confuzion.zip,Confuzion_BE.uef
OK,Cops n' Robbers,Atlantis,CopsNRobbers_BE.uef,CopsNRobbers.rom,-a -B e00 -c e00 -w 39f,https://www.stairwaytohell.com/electron/uefarchive/Atlantis/CopsNRobbers_BE.zip,CopsNRobbers_BE.uef
OK,Cosmic Camouflage,Superior/Acornsoft,CosmicCamouflage_E.uef,CosmicCamouflage.rom,-a -B e00 -c e00:e00,https://www.stairwaytohell.com/electron/uefarchive/Superior/CosmicCamouflage_E.zip,CosmicCamouflage_E.uef
OK,Crazee Rider,Superior,CrazeeRider_E.uef,CrazeeRider-1.rom CrazeeRider-2.rom,-a -B e00 -c e00::::::1900/: -s -t -w d3f:ef97,https://www.stairwaytohell.com/electron/uefarchive/Superior/CrazeeRider_E.zip,CrazeeRider_E.uef
Expand Down

0 comments on commit 36056f7

Please sign in to comment.