mirror of https://github.com/ksherlock/ample.git
fix cdrom miscount, add some more slots
This commit is contained in:
parent
09ced05403
commit
37920884e0
|
@ -91,7 +91,8 @@ SLOTS = (
|
||||||
"centronics", "mdin", "mdout",
|
"centronics", "mdin", "mdout",
|
||||||
|
|
||||||
# dec
|
# dec
|
||||||
"eia", "host", "com_prt", "prt_port"
|
"eia", "host", "com_prt", "prt_port",
|
||||||
|
"rs232a", "rs232b", "serial0", "serial1",
|
||||||
)
|
)
|
||||||
|
|
||||||
SLOT_NAMES = {
|
SLOT_NAMES = {
|
||||||
|
@ -127,8 +128,12 @@ SLOT_NAMES = {
|
||||||
"mdin": "MIDI In",
|
"mdin": "MIDI In",
|
||||||
"mdout": "MIDI Out",
|
"mdout": "MIDI Out",
|
||||||
|
|
||||||
"eia": "Modem",
|
"eia": "Serial",
|
||||||
"host": "Modem",
|
"host": "Serial",
|
||||||
"com_prt": "Modem",
|
"com_prt": "Serial",
|
||||||
"prt_port": "Printer"
|
"prt_port": "Printer",
|
||||||
|
"rs232a": "Serial A",
|
||||||
|
"rs232b": "Serial B",
|
||||||
|
"serial0": "Serial 0",
|
||||||
|
"serial1": "Serial 1",
|
||||||
}
|
}
|
||||||
|
|
|
@ -137,10 +137,12 @@ def find_machine_media(parent):
|
||||||
# mac [various] - pds/lcpds slot
|
# mac [various] - pds/lcpds slot
|
||||||
# mac128k - kbd slot
|
# mac128k - kbd slot
|
||||||
#
|
#
|
||||||
# mac - if scsi:3 / scsibus:3 are not in the xml but are hardcoded cd-rom drives.
|
|
||||||
|
|
||||||
|
|
||||||
mname = parent.get("name")
|
mname = parent.get("name")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
remap = {
|
remap = {
|
||||||
"cassette": "cass",
|
"cassette": "cass",
|
||||||
"apple1_cass": "cass",
|
"apple1_cass": "cass",
|
||||||
|
@ -158,7 +160,6 @@ def find_machine_media(parent):
|
||||||
intf = x.get("interface")
|
intf = x.get("interface")
|
||||||
if intf == None: intf = typ # cassette has no interface.
|
if intf == None: intf = typ # cassette has no interface.
|
||||||
|
|
||||||
# print(" ",intf)
|
|
||||||
|
|
||||||
slot = None
|
slot = None
|
||||||
if ':' in tag:
|
if ':' in tag:
|
||||||
|
@ -169,14 +170,32 @@ def find_machine_media(parent):
|
||||||
# as of 232 (231?), these are configurable as :scsi:0, etc or :scsibus:0, etc.
|
# as of 232 (231?), these are configurable as :scsi:0, etc or :scsibus:0, etc.
|
||||||
# if mname[0:3] == "mac" and slot in ("scsi", "scsibus"): slot = None
|
# if mname[0:3] == "mac" and slot in ("scsi", "scsibus"): slot = None
|
||||||
|
|
||||||
# MAME 0.258 - scsi slot 3 now hardcoded for cd-rom
|
# MAME 0.258 - macintosh scsi slot 3 now hardcoded for cd-rom
|
||||||
if slot and intf != "cdrom": continue
|
|
||||||
|
#print(tag, " - ", slot, " - ",intf)
|
||||||
|
|
||||||
|
#if slot and intf != "cdrom": continue
|
||||||
# skip slot devices -- they'll be handled as part of the device.
|
# skip slot devices -- they'll be handled as part of the device.
|
||||||
|
if slot: continue
|
||||||
|
|
||||||
if intf in remap:
|
if intf in remap:
|
||||||
name = remap[intf]
|
name = remap[intf]
|
||||||
media[name] = media.get(name, 0) + 1
|
media[name] = media.get(name, 0) + 1
|
||||||
|
|
||||||
|
|
||||||
|
# mac - scsi:3 / scsibus:3 are not in the xml but are hardcoded cd-rom drives.
|
||||||
|
# check for undeclared cd-rom
|
||||||
|
slotlist = set()
|
||||||
|
for x in parent.findall("./slot"):
|
||||||
|
slotname = split2(x.get("name"))
|
||||||
|
slotlist.add(slotname)
|
||||||
|
|
||||||
|
# print(slotlist)
|
||||||
|
for name in ("scsi","scsibus","scsi1"):
|
||||||
|
if name + ":4" in slotlist and name + ":3" not in slotlist:
|
||||||
|
media["cdrom"] = media.get("cdrom", 0) + 1
|
||||||
|
|
||||||
|
|
||||||
return media
|
return media
|
||||||
|
|
||||||
|
|
||||||
|
@ -227,6 +246,8 @@ def find_media(parent, include_slots=False):
|
||||||
name = remap_dev[name]
|
name = remap_dev[name]
|
||||||
media[name] = media.get(name, 0) + 1
|
media[name] = media.get(name, 0) + 1
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# ata_slot (vulcan, cffa, zip, etc) needs to check slot to see if default.
|
# ata_slot (vulcan, cffa, zip, etc) needs to check slot to see if default.
|
||||||
# nscsi_connector (a2scsi, a2hsscsi) needs to check slot to see if default.
|
# nscsi_connector (a2scsi, a2hsscsi) needs to check slot to see if default.
|
||||||
|
|
||||||
|
@ -258,6 +279,7 @@ def find_media(parent, include_slots=False):
|
||||||
if parent.get("name") == "a2romusr":
|
if parent.get("name") == "a2romusr":
|
||||||
media["rom"] = media.get("rom", 0) + 1
|
media["rom"] = media.get("rom", 0) + 1
|
||||||
|
|
||||||
|
|
||||||
# scsibus:1 is special cd-rom
|
# scsibus:1 is special cd-rom
|
||||||
if parent.get("name") == "a2scsi":
|
if parent.get("name") == "a2scsi":
|
||||||
media["cdrom"] = media.get("cdrom", 0) + 1
|
media["cdrom"] = media.get("cdrom", 0) + 1
|
||||||
|
@ -382,6 +404,11 @@ def make_device_options(slot):
|
||||||
return options
|
return options
|
||||||
|
|
||||||
|
|
||||||
|
def split2(x):
|
||||||
|
xx = x.split(":")
|
||||||
|
if len(xx) == 1: return xx[0]
|
||||||
|
return xx[0] + ":" + xx[1]
|
||||||
|
|
||||||
# given a machine, return a list of slotoptions.
|
# given a machine, return a list of slotoptions.
|
||||||
def make_device_slots(machine):
|
def make_device_slots(machine):
|
||||||
|
|
||||||
|
|
|
@ -33,12 +33,13 @@ mac_ii_children = [
|
||||||
|
|
||||||
mac_lc_children = [
|
mac_lc_children = [
|
||||||
"maclc", "maclc2", "maclc3", "maclc3p",
|
"maclc", "maclc2", "maclc3", "maclc3p",
|
||||||
"maclc475", "maclc520", "maclc550", "maclc575", "maclc580",
|
"maclc475", "maclc520", "maclc550", "maclc575",
|
||||||
"macct610", "macct650",
|
"macct610", "macct650",
|
||||||
]
|
]
|
||||||
|
# maclc50" / macqd630 slots are messed up right now.
|
||||||
|
|
||||||
mac_quadra_children = [
|
mac_quadra_children = [
|
||||||
"macqd605", "macqd610", "macqd630", "macqd650", "macqd700", "macqd800",
|
"macqd605", "macqd610", "macqd650", "macqd700", "macqd800",
|
||||||
]
|
]
|
||||||
|
|
||||||
# se/30 and classic 2 are implemented as a nubus but i'm sticking then with the 128 due to the form factor.
|
# se/30 and classic 2 are implemented as a nubus but i'm sticking then with the 128 due to the form factor.
|
||||||
|
|
Loading…
Reference in New Issue