mirror of
https://github.com/MiSTer-devel/PCXT_MiSTer.git
synced 2026-05-17 03:04:20 +00:00
XTIDE support is given to those ROMs that must be loaded on EC000, and Tandy ROMs are added.
40 lines
1.1 KiB
Python
40 lines
1.1 KiB
Python
import os
|
|
import glob
|
|
import zipfile
|
|
import requests
|
|
|
|
if __name__ == "__main__":
|
|
URL = "http://minuszerodegrees.net/bios/BIOS_5160_08NOV82.zip"
|
|
response = requests.get(URL)
|
|
open("ibm5160.zip", "wb").write(response.content)
|
|
|
|
with zipfile.ZipFile("ibm5160.zip", 'r') as zip_ref:
|
|
zip_ref.extractall()
|
|
|
|
try:
|
|
os.remove("ibm5160.zip")
|
|
except:
|
|
print("Error while deleting file : ibm5160.zip")
|
|
|
|
rom_filename = "boot.rom"
|
|
xtidename = "ide_xtl.rom"
|
|
ibm5160_basename = "BIOS_5160_08NOV82_"
|
|
|
|
with open(rom_filename, "wb") as romf, open(ibm5160_basename + "U19_5000027_27256.bin", "rb") as f:
|
|
romf.write(f.read())
|
|
|
|
with open(rom_filename, "ab") as romf, open(ibm5160_basename + "U18_1501512.bin", "rb") as f:
|
|
romf.write(f.read())
|
|
|
|
with open(rom_filename, "ab") as romf, open(xtidename, "rb") as f:
|
|
romf.write(f.read())
|
|
|
|
fileList = glob.glob(ibm5160_basename + "*.bin")
|
|
|
|
for filePath in fileList:
|
|
try:
|
|
os.remove(filePath)
|
|
except:
|
|
print("Error while deleting file : ", filePath)
|
|
|