diff --git a/Ample/DiskImagesWindowController.m b/Ample/DiskImagesWindowController.m index 1165622..35ac150 100644 --- a/Ample/DiskImagesWindowController.m +++ b/Ample/DiskImagesWindowController.m @@ -49,6 +49,8 @@ @"2img", @"2mg", @"chd", @"dc", @"do", @"dsk", @"hd", @"hdv", @"image", @"nib", @"po", @"wav", @"woz", @"iso", @"raw", // st, etc. @"mfm", @"st", @"msa", @"stx", @"ipf", + // + @"rom", @"bin", // not supported/relevant. // @"mfi", @"dfi", @"hfe", @"d77" @"d88", @"1dd", @"cqm", @"cqi", @"td0", @"imd", nil diff --git a/Ample/Media.h b/Ample/Media.h index 4a72da1..9e09240 100644 --- a/Ample/Media.h +++ b/Ample/Media.h @@ -21,6 +21,7 @@ typedef struct Media { unsigned midiin; unsigned midiout; unsigned picture; + unsigned rom; uint64_t floppy_mask; } Media; @@ -35,6 +36,7 @@ typedef enum { MediaType_Cassette, MediaType_Picture, MediaType_MIDI, + MediaType_ROM, } MediaType; struct Media MediaFromDictionary(NSDictionary *); diff --git a/Ample/Media.m b/Ample/Media.m index a161643..0d86d7e 100644 --- a/Ample/Media.m +++ b/Ample/Media.m @@ -26,6 +26,7 @@ struct Media MediaFromDictionary(NSDictionary *dict) { _(midiin); _(midiout); _(picture); + _(rom); return m; #undef _ @@ -52,6 +53,7 @@ void MediaAdd(Media *dest, const Media *src) { _(midiin); _(midiout); _(picture); + _(rom); #undef _ @@ -81,6 +83,7 @@ BOOL MediaEqual(const Media *lhs, const Media *rhs) { _(midiin); _(midiout); _(picture); + _(rom); _(floppy_mask); @@ -352,6 +355,9 @@ MediaType ClassifyMediaFile(id file) { //case _x3('c', 'q', 'm'): // copyQM //case _x3('c', 'q', 'i'): // copyQM + case _x3('r', 'o', 'm'): + case _x3('b', 'i', 'n'): + return MediaType_ROM; } return MediaTypeUnknown; diff --git a/Ample/MediaViewController.m b/Ample/MediaViewController.m index e106c17..9fba415 100644 --- a/Ample/MediaViewController.m +++ b/Ample/MediaViewController.m @@ -332,6 +332,7 @@ _data[kIndexMidiIn] = [MediaCategory categoryWithTitle: @"MIDI (In)"]; _data[kIndexMidiOut] = [MediaCategory categoryWithTitle: @"MIDI (Out)"]; _data[kIndexPicture] = [MediaCategory categoryWithTitle: @"Picture"]; + _data[kIndexROM] = [MediaCategory categoryWithTitle: @"ROM"]; for (unsigned i = 0; i < CATEGORY_COUNT; ++i) { [_data[i] setCategory: i]; @@ -339,7 +340,6 @@ } _root = [NSMutableArray new]; - } @@ -347,7 +347,7 @@ -(void)rebuildArgs { static char* prefix[] = { - "flop", "flop", "hard", "cdrm", "cass", "disk", "bitb", "min", "mout", "pic" + "flop", "flop", "hard", "cdrm", "cass", "disk", "bitb", "min", "mout", "pic", "rom", }; static_assert(SIZEOF(prefix) == CATEGORY_COUNT, "Missing item"); NSMutableArray *args = [NSMutableArray new]; @@ -441,17 +441,10 @@ x = media.name; cat = _data[index]; delta |= [cat setItemCount: x] _(floppy_5_25, kIndexFloppy525); _(pseudo_disk, kIndexDiskImage); _(bitbanger, kIndexBitBanger); - // disable midi for now - it's either a midi file (which auto-plays too soon to be useful) - // or a midi device ("default" for first one). - // So we should build a device list (and pre-populate the default one) - // another approach is a separate utility to act as a midi/serial input converter - // and midi file / serial converter so the modem/serial port could be used. -#if 1 _(midiin, kIndexMidiIn); _(midiout, kIndexMidiOut); -#endif _(picture, kIndexPicture); - + _(rom, kIndexROM); if (delta) { [self rebuildRoot]; @@ -782,6 +775,7 @@ static NSString *kDragType = @"private.ample.media"; case kIndexMidiIn: case kIndexMidiOut: case kIndexBitBanger: + case kIndexROM: default: break; } @@ -836,6 +830,7 @@ static NSString *kDragType = @"private.ample.media"; case MediaType_CDROM: ix = kIndexCDROM; break; case MediaType_Picture: ix = kIndexPicture; break; + case MediaType_ROM: ix = kIndexROM; break; case MediaType_MIDI: // ix = kIndexMidiIn; break; case MediaTypeError: case MediaTypeUnknown: @@ -873,7 +868,7 @@ static NSString *kDragType = @"private.ample.media"; } static NSString * BookmarkStrings[] = { - @"flop_525", @"flop_35", @"hard", @"cdrm", @"cass", @"disk", @"bitb", @"midiin", @"midiout", @"pic" + @"flop_525", @"flop_35", @"hard", @"cdrm", @"cass", @"disk", @"bitb", @"midiin", @"midiout", @"pic", @"rom", }; static_assert(SIZEOF(BookmarkStrings) == CATEGORY_COUNT, "Missing item"); diff --git a/Ample/Resources/ace100.plist b/Ample/Resources/ace100.plist index 037d28a..04eb35c 100644 --- a/Ample/Resources/ace100.plist +++ b/Ample/Resources/ace100.plist @@ -142,6 +142,35 @@ devname a2ram16k + + value + romcardfp + description + Apple II ROM Card (Applesoft BASIC) + devname + a2romfp + + + value + romcard + description + Apple II ROM Card (Custom) + devname + a2romusr + media + + rom + 1 + + + + value + romcardint + description + Apple II ROM Card (Integer BASIC) + devname + a2romint + value ssram diff --git a/Ample/Resources/ace1000.plist b/Ample/Resources/ace1000.plist index fc05861..f988781 100644 --- a/Ample/Resources/ace1000.plist +++ b/Ample/Resources/ace1000.plist @@ -82,6 +82,35 @@ devname a2ram16k + + value + romcardfp + description + Apple II ROM Card (Applesoft BASIC) + devname + a2romfp + + + value + romcard + description + Apple II ROM Card (Custom) + devname + a2romusr + media + + rom + 1 + + + + value + romcardint + description + Apple II ROM Card (Integer BASIC) + devname + a2romint + value ssram diff --git a/Ample/Resources/albert.plist b/Ample/Resources/albert.plist index abbaa6c..a64f08c 100644 --- a/Ample/Resources/albert.plist +++ b/Ample/Resources/albert.plist @@ -82,6 +82,35 @@ devname a2ram16k + + value + romcardfp + description + Apple II ROM Card (Applesoft BASIC) + devname + a2romfp + + + value + romcard + description + Apple II ROM Card (Custom) + devname + a2romusr + media + + rom + 1 + + + + value + romcardint + description + Apple II ROM Card (Integer BASIC) + devname + a2romint + value ssram diff --git a/Ample/Resources/am100.plist b/Ample/Resources/am100.plist index 265abf8..70a603c 100644 --- a/Ample/Resources/am100.plist +++ b/Ample/Resources/am100.plist @@ -82,6 +82,35 @@ devname a2ram16k + + value + romcardfp + description + Apple II ROM Card (Applesoft BASIC) + devname + a2romfp + + + value + romcard + description + Apple II ROM Card (Custom) + devname + a2romusr + media + + rom + 1 + + + + value + romcardint + description + Apple II ROM Card (Integer BASIC) + devname + a2romint + value ssram diff --git a/Ample/Resources/am64.plist b/Ample/Resources/am64.plist index a69ea3a..ab0c124 100644 --- a/Ample/Resources/am64.plist +++ b/Ample/Resources/am64.plist @@ -82,6 +82,35 @@ devname a2ram16k + + value + romcardfp + description + Apple II ROM Card (Applesoft BASIC) + devname + a2romfp + + + value + romcard + description + Apple II ROM Card (Custom) + devname + a2romusr + media + + rom + 1 + + + + value + romcardint + description + Apple II ROM Card (Integer BASIC) + devname + a2romint + value ssram diff --git a/Ample/Resources/apple2.plist b/Ample/Resources/apple2.plist index 3357960..f7e392e 100644 --- a/Ample/Resources/apple2.plist +++ b/Ample/Resources/apple2.plist @@ -171,6 +171,35 @@ devname a2ram16k + + value + romcardfp + description + Apple II ROM Card (Applesoft BASIC) + devname + a2romfp + + + value + romcard + description + Apple II ROM Card (Custom) + devname + a2romusr + media + + rom + 1 + + + + value + romcardint + description + Apple II ROM Card (Integer BASIC) + devname + a2romint + value ssram diff --git a/Ample/Resources/apple2jp.plist b/Ample/Resources/apple2jp.plist index ee5cb15..8c2d37a 100644 --- a/Ample/Resources/apple2jp.plist +++ b/Ample/Resources/apple2jp.plist @@ -82,6 +82,35 @@ devname a2ram16k + + value + romcardfp + description + Apple II ROM Card (Applesoft BASIC) + devname + a2romfp + + + value + romcard + description + Apple II ROM Card (Custom) + devname + a2romusr + media + + rom + 1 + + + + value + romcardint + description + Apple II ROM Card (Integer BASIC) + devname + a2romint + value ssram diff --git a/Ample/Resources/apple2p.plist b/Ample/Resources/apple2p.plist index 4e5f8cc..a9d7b9c 100644 --- a/Ample/Resources/apple2p.plist +++ b/Ample/Resources/apple2p.plist @@ -82,6 +82,35 @@ devname a2ram16k + + value + romcardfp + description + Apple II ROM Card (Applesoft BASIC) + devname + a2romfp + + + value + romcard + description + Apple II ROM Card (Custom) + devname + a2romusr + media + + rom + 1 + + + + value + romcardint + description + Apple II ROM Card (Integer BASIC) + devname + a2romint + value ssram diff --git a/Ample/Resources/basis108.plist b/Ample/Resources/basis108.plist index e395d6d..44f2a30 100644 --- a/Ample/Resources/basis108.plist +++ b/Ample/Resources/basis108.plist @@ -142,6 +142,35 @@ devname a2ram16k + + value + romcardfp + description + Apple II ROM Card (Applesoft BASIC) + devname + a2romfp + + + value + romcard + description + Apple II ROM Card (Custom) + devname + a2romusr + media + + rom + 1 + + + + value + romcardint + description + Apple II ROM Card (Integer BASIC) + devname + a2romint + value ssram diff --git a/Ample/Resources/craft2p.plist b/Ample/Resources/craft2p.plist index af69807..b3e3335 100644 --- a/Ample/Resources/craft2p.plist +++ b/Ample/Resources/craft2p.plist @@ -82,6 +82,35 @@ devname a2ram16k + + value + romcardfp + description + Apple II ROM Card (Applesoft BASIC) + devname + a2romfp + + + value + romcard + description + Apple II ROM Card (Custom) + devname + a2romusr + media + + rom + 1 + + + + value + romcardint + description + Apple II ROM Card (Integer BASIC) + devname + a2romint + value ssram diff --git a/Ample/Resources/dodo.plist b/Ample/Resources/dodo.plist index e49836d..c498377 100644 --- a/Ample/Resources/dodo.plist +++ b/Ample/Resources/dodo.plist @@ -82,6 +82,35 @@ devname a2ram16k + + value + romcardfp + description + Apple II ROM Card (Applesoft BASIC) + devname + a2romfp + + + value + romcard + description + Apple II ROM Card (Custom) + devname + a2romusr + media + + rom + 1 + + + + value + romcardint + description + Apple II ROM Card (Integer BASIC) + devname + a2romint + value ssram diff --git a/Ample/Resources/elppa.plist b/Ample/Resources/elppa.plist index a94acfc..48bbb0b 100644 --- a/Ample/Resources/elppa.plist +++ b/Ample/Resources/elppa.plist @@ -82,6 +82,35 @@ devname a2ram16k + + value + romcardfp + description + Apple II ROM Card (Applesoft BASIC) + devname + a2romfp + + + value + romcard + description + Apple II ROM Card (Custom) + devname + a2romusr + media + + rom + 1 + + + + value + romcardint + description + Apple II ROM Card (Integer BASIC) + devname + a2romint + value ssram diff --git a/Ample/Resources/hkc8800a.plist b/Ample/Resources/hkc8800a.plist index f703d54..82a1e95 100644 --- a/Ample/Resources/hkc8800a.plist +++ b/Ample/Resources/hkc8800a.plist @@ -82,6 +82,35 @@ devname a2ram16k + + value + romcardfp + description + Apple II ROM Card (Applesoft BASIC) + devname + a2romfp + + + value + romcard + description + Apple II ROM Card (Custom) + devname + a2romusr + media + + rom + 1 + + + + value + romcardint + description + Apple II ROM Card (Integer BASIC) + devname + a2romint + value ssram diff --git a/Ample/Resources/ivelultr.plist b/Ample/Resources/ivelultr.plist index 12c19b2..4ea860d 100644 --- a/Ample/Resources/ivelultr.plist +++ b/Ample/Resources/ivelultr.plist @@ -82,6 +82,35 @@ devname a2ram16k + + value + romcardfp + description + Apple II ROM Card (Applesoft BASIC) + devname + a2romfp + + + value + romcard + description + Apple II ROM Card (Custom) + devname + a2romusr + media + + rom + 1 + + + + value + romcardint + description + Apple II ROM Card (Integer BASIC) + devname + a2romint + value ssram diff --git a/Ample/Resources/las3000.plist b/Ample/Resources/las3000.plist index b091235..ff437c1 100644 --- a/Ample/Resources/las3000.plist +++ b/Ample/Resources/las3000.plist @@ -8,6 +8,8 @@ Laser 3000 media + cass + 1 resolution diff --git a/Ample/Resources/laser2c.plist b/Ample/Resources/laser2c.plist index 495f06c..f823962 100644 --- a/Ample/Resources/laser2c.plist +++ b/Ample/Resources/laser2c.plist @@ -82,6 +82,35 @@ devname a2ram16k + + value + romcardfp + description + Apple II ROM Card (Applesoft BASIC) + devname + a2romfp + + + value + romcard + description + Apple II ROM Card (Custom) + devname + a2romusr + media + + rom + 1 + + + + value + romcardint + description + Apple II ROM Card (Integer BASIC) + devname + a2romint + value ssram diff --git a/Ample/Resources/maxxi.plist b/Ample/Resources/maxxi.plist index b588b8c..60902a9 100644 --- a/Ample/Resources/maxxi.plist +++ b/Ample/Resources/maxxi.plist @@ -82,6 +82,35 @@ devname a2ram16k + + value + romcardfp + description + Apple II ROM Card (Applesoft BASIC) + devname + a2romfp + + + value + romcard + description + Apple II ROM Card (Custom) + devname + a2romusr + media + + rom + 1 + + + + value + romcardint + description + Apple II ROM Card (Integer BASIC) + devname + a2romint + value ssram diff --git a/Ample/Resources/microeng.plist b/Ample/Resources/microeng.plist index c0a4e05..38235d7 100644 --- a/Ample/Resources/microeng.plist +++ b/Ample/Resources/microeng.plist @@ -82,6 +82,35 @@ devname a2ram16k + + value + romcardfp + description + Apple II ROM Card (Applesoft BASIC) + devname + a2romfp + + + value + romcard + description + Apple II ROM Card (Custom) + devname + a2romusr + media + + rom + 1 + + + + value + romcardint + description + Apple II ROM Card (Integer BASIC) + devname + a2romint + value ssram diff --git a/Ample/Resources/prav82.plist b/Ample/Resources/prav82.plist index 1cc0570..14fd233 100644 --- a/Ample/Resources/prav82.plist +++ b/Ample/Resources/prav82.plist @@ -82,6 +82,35 @@ devname a2ram16k + + value + romcardfp + description + Apple II ROM Card (Applesoft BASIC) + devname + a2romfp + + + value + romcard + description + Apple II ROM Card (Custom) + devname + a2romusr + media + + rom + 1 + + + + value + romcardint + description + Apple II ROM Card (Integer BASIC) + devname + a2romint + value ssram diff --git a/Ample/Resources/prav8m.plist b/Ample/Resources/prav8m.plist index 191b1d2..9f14ea5 100644 --- a/Ample/Resources/prav8m.plist +++ b/Ample/Resources/prav8m.plist @@ -82,6 +82,35 @@ devname a2ram16k + + value + romcardfp + description + Apple II ROM Card (Applesoft BASIC) + devname + a2romfp + + + value + romcard + description + Apple II ROM Card (Custom) + devname + a2romusr + media + + rom + 1 + + + + value + romcardint + description + Apple II ROM Card (Integer BASIC) + devname + a2romint + value ssram diff --git a/Ample/Resources/roms.plist b/Ample/Resources/roms.plist index 8b374d4..2855e26 100644 --- a/Ample/Resources/roms.plist +++ b/Ample/Resources/roms.plist @@ -236,6 +236,18 @@ description Apple II Parallel Printer Interface Card + + value + a2romfp + description + Apple II ROM Card (Applesoft BASIC) + + + value + a2romint + description + Apple II ROM Card (Integer BASIC)) + value a2scsi diff --git a/Ample/Resources/space84.plist b/Ample/Resources/space84.plist index e887f4b..660eaa3 100644 --- a/Ample/Resources/space84.plist +++ b/Ample/Resources/space84.plist @@ -82,6 +82,35 @@ devname a2ram16k + + value + romcardfp + description + Apple II ROM Card (Applesoft BASIC) + devname + a2romfp + + + value + romcard + description + Apple II ROM Card (Custom) + devname + a2romusr + media + + rom + 1 + + + + value + romcardint + description + Apple II ROM Card (Integer BASIC) + devname + a2romint + value ssram diff --git a/Ample/Resources/uniap2en.plist b/Ample/Resources/uniap2en.plist index 7c34ba1..6a68fd3 100644 --- a/Ample/Resources/uniap2en.plist +++ b/Ample/Resources/uniap2en.plist @@ -82,6 +82,35 @@ devname a2ram16k + + value + romcardfp + description + Apple II ROM Card (Applesoft BASIC) + devname + a2romfp + + + value + romcard + description + Apple II ROM Card (Custom) + devname + a2romusr + media + + rom + 1 + + + + value + romcardint + description + Apple II ROM Card (Integer BASIC) + devname + a2romint + value ssram diff --git a/Ample/Resources/uniap2pt.plist b/Ample/Resources/uniap2pt.plist index 10be457..7b14902 100644 --- a/Ample/Resources/uniap2pt.plist +++ b/Ample/Resources/uniap2pt.plist @@ -82,6 +82,35 @@ devname a2ram16k + + value + romcardfp + description + Apple II ROM Card (Applesoft BASIC) + devname + a2romfp + + + value + romcard + description + Apple II ROM Card (Custom) + devname + a2romusr + media + + rom + 1 + + + + value + romcardint + description + Apple II ROM Card (Integer BASIC) + devname + a2romint + value ssram diff --git a/Ample/Resources/uniap2ti.plist b/Ample/Resources/uniap2ti.plist index 732f561..07502fe 100644 --- a/Ample/Resources/uniap2ti.plist +++ b/Ample/Resources/uniap2ti.plist @@ -82,6 +82,35 @@ devname a2ram16k + + value + romcardfp + description + Apple II ROM Card (Applesoft BASIC) + devname + a2romfp + + + value + romcard + description + Apple II ROM Card (Custom) + devname + a2romusr + media + + rom + 1 + + + + value + romcardint + description + Apple II ROM Card (Integer BASIC) + devname + a2romint + value ssram diff --git a/Ample/Slot.m b/Ample/Slot.m index 62c5fa9..456256c 100644 --- a/Ample/Slot.m +++ b/Ample/Slot.m @@ -531,6 +531,7 @@ https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/KeyVa _(midiin); _(midiout); _(picture); + _(rom); #undef _ for (Slot *s in _children) { diff --git a/Ample/TableCellView.h b/Ample/TableCellView.h index 5bb2fbe..787fc3d 100644 --- a/Ample/TableCellView.h +++ b/Ample/TableCellView.h @@ -22,11 +22,12 @@ enum { kIndexMidiIn, kIndexMidiOut, kIndexPicture, // computer eyes -pic, .png only. + kIndexROM, // kIndexPrintout // -prin, .prn extension only? kIndexLast }; -#define CATEGORY_COUNT 10 +#define CATEGORY_COUNT 11 static_assert(kIndexLast == CATEGORY_COUNT, "Invalid Category Count"); diff --git a/python/mkmachines.py b/python/mkmachines.py index 406b695..ba6a49c 100644 --- a/python/mkmachines.py +++ b/python/mkmachines.py @@ -254,7 +254,12 @@ def find_media(parent, include_slots=False): # n.b. - floppies are 5.25" 360k or 180k. not bootable, not usable from prodos # without special prodos file or loading driver into pc transporter ram. if parent.get("name") == "pcxport": - media.get["floppy_5_25"] = media.get("floppy_5_25", 0) + 2 + media["floppy_5_25"] = media.get("floppy_5_25", 0) + 2 + + + # special case for a2romusr + if parent.get("name") == "a2romusr": + media["rom"] = media.get("rom", 0) + 1 if not media: return None return media @@ -280,6 +285,7 @@ DEVICE_REMAP = { '35hd': '3.5" HD', '35dd': '3.5" DD', '35sd': '3.5" SD', + 'a2romusr': 'ROM', } DEVICE_MEDIA = { 'cdrom': 'cdrom', @@ -294,6 +300,7 @@ DEVICE_MEDIA = { 'aplcdsc': 'cdrom', # 'null_modem': 'bitbanger', # 'rs232_sync_io': 'bitbanger', + 'a2romusr': 'rom', } DEVICE_EXCLUDE = set([ @@ -323,6 +330,7 @@ def make_device_options(slot): for option in slot.findall("./slotoption"): name = option.get("name") devname = option.get("devname") + if name in DEVICE_EXCLUDE: continue device = None @@ -387,7 +395,6 @@ def make_devices(): for name in names: m = submachines[name] - # print(" {}".format(name)) slots = make_device_slots(m) if slots: devices.append({ @@ -491,6 +498,7 @@ def make_smartport(machine): def fix_machine_description(x, devname): # x = x.replace(", www.dreher.net","") + x = x.replace("))", ")") # Apple II ROM Card (Integer BASIC)) return x def make_slot(m, slotname, nodes):