Skip to content

Commit 363a8bf

Browse files
committed
Add Dragon 64 system support
Add Dragon 64 (British home computer, 1983) as a new system with MAME and XRoar emulator support. The Dragon 64 is compatible with Tandy CoCo. Features: - MAME driver support (dragon32, dragon64, dgnalpha) - XRoar emulator integration - Software list support (cassettes, cartridges, disk images) - Model selection (Dragon 32, 64, Alpha) - Media type selection (cassette, cartridge, floppy) Add MC-10 system support and enhance xroar options Add Tandy MC-10 (Micro Color Computer) as a new system with MAME, libretro MAME, and xroar emulator support. Also fix xroar default machine selection for dragon64 and add new xroar options (RAM size, TV type, TV input, keyboard translation) for all xroar systems. Add MC-10 BIOS definitions to batocera-systems Add mc10.zip (mc10.rom) and alice.zip (alice.rom) BIOS file checks for the MC-10 system. Add dragon64 to MAME media type detection and autoload Dragon 64 is CoCo-compatible and needs the same media type routing (.cas → cassette, .dsk → floppy, else → cartridge) and autoload logic as coco.
1 parent 8cbfb85 commit 363a8bf

File tree

13 files changed

+341
-7
lines changed

13 files changed

+341
-7
lines changed

package/batocera/core/batocera-configgen/configgen/configgen/generators/mame/mameGenerator.py

Lines changed: 36 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -395,13 +395,18 @@ def generate(self, system, rom, playersControllers, metadata, guns, wheels, game
395395
commandArray += [ "-flop1" ]
396396
else:
397397
commandArray += [ "-cart1" ]
398-
elif system.name == "coco":
398+
elif system.name in ("coco", "dragon64"):
399399
if romExt.casefold() == ".cas":
400400
commandArray += [ "-cass" ]
401401
elif romExt.casefold() == ".dsk":
402402
commandArray += [ "-flop1" ]
403403
else:
404404
commandArray += [ "-cart" ]
405+
elif system.name == "mc10":
406+
if romExt.casefold() == ".cas":
407+
commandArray += [ "-cass" ]
408+
else:
409+
commandArray += [ "-cart" ]
405410
else:
406411
commandArray += [ f'-{messRomType[messMode]}' ]
407412
else:
@@ -483,7 +488,7 @@ def generate(self, system, rom, playersControllers, metadata, guns, wheels, game
483488
):
484489
autoRunCmd = 'LOADM”“,,R\\n'
485490
autoRunDelay = 5
486-
elif system.name == "coco":
491+
elif system.name in ("coco", "dragon64"):
487492
romType = 'cart'
488493
autoRunDelay = 2
489494

@@ -513,6 +518,35 @@ def generate(self, system, rom, playersControllers, metadata, guns, wheels, game
513518
else:
514519
autoRunCmd = f'LOADM \"{romName}\":EXEC\\n'
515520

521+
# check for a user override
522+
autoRunFile = MAME_CONFIG / 'autoload' / f'{system.name}_{romType}_autoload.csv'
523+
if autoRunFile.exists():
524+
with autoRunFile.open() as openARFile:
525+
autoRunList = csv.reader(openARFile, delimiter=';', quotechar="'")
526+
for row in autoRunList:
527+
if row and not row[0].startswith('#') and row[0].casefold() == romName.casefold():
528+
autoRunCmd = f"{row[1]}\\n"
529+
elif system.name == "mc10":
530+
romType = 'cart'
531+
autoRunDelay = 2
532+
533+
# if using software list, use "usage" for autoRunCmd (if provided)
534+
if softList != "":
535+
softListFile = Path('/usr/bin/mame/hash') / f'{softList}.xml'
536+
if softListFile.exists():
537+
softwarelist = ET.parse(softListFile)
538+
for software in softwarelist.findall('software'):
539+
if software.attrib and software.get('name') == romName:
540+
for info in software.iter('info'):
541+
if info.get('name') == 'usage':
542+
autoRunCmd = f"{info.get('value')}\\n"
543+
544+
# if still undefined, default autoRunCmd based on media type
545+
if autoRunCmd == "":
546+
if altromtype == "cass" or (softList and softList.endswith("cass")) or romExt.casefold() == ".cas":
547+
romType = 'cass'
548+
autoRunCmd = 'CLOAD\\n'
549+
516550
# check for a user override
517551
autoRunFile = MAME_CONFIG / 'autoload' / f'{system.name}_{romType}_autoload.csv'
518552
if autoRunFile.exists():

package/batocera/core/batocera-configgen/configgen/configgen/generators/xroar/xroarGenerator.py

Lines changed: 26 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,19 +31,40 @@ def generate(self, system, rom, playersControllers, metadata, guns, wheels, game
3131
f.write("rompath /userdata/bios/xroar\n")
3232

3333
# Machine Selection
34-
f.write(f"default-machine {system.config.get('xroar_machine', 'coco2bus')}\n")
35-
34+
default_machines = {'mc10': 'mc10', 'dragon64': 'dragon64'}
35+
default_machine = default_machines.get(system.name, 'coco2bus')
36+
f.write(f"default-machine {system.config.get('xroar_machine', default_machine)}\n")
37+
3638
# Set audio volume to 100
3739
f.write(f"ao-volume 100\n")
38-
40+
3941
# Cartridge Autostart
4042
if system.config.get_bool('xroar_cartauto'):
4143
f.write(f"cart-autorun\n")
42-
44+
4345
# VSync
4446
if system.config.get_bool('xroar_vsync'):
4547
f.write(f"vo-vsync\n")
46-
48+
49+
# RAM Size
50+
xroar_ram = system.config.get('xroar_ram')
51+
if xroar_ram:
52+
f.write(f"ram {xroar_ram}\n")
53+
54+
# TV Type
55+
xroar_tv_type = system.config.get('xroar_tv_type')
56+
if xroar_tv_type:
57+
f.write(f"tv-type {xroar_tv_type}\n")
58+
59+
# TV Input
60+
xroar_tv_input = system.config.get('xroar_tv_input')
61+
if xroar_tv_input:
62+
f.write(f"tv-input {xroar_tv_input}\n")
63+
64+
# Keyboard Translation
65+
if system.config.get_bool('xroar_kbd_translate'):
66+
f.write("kbd-translate\n")
67+
4768
# Fullscreen
4869
f.write("fs\n")
4970

package/batocera/core/batocera-configgen/configs/configgen-defaults-qcs6490.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,9 @@ tutor:
7373
coco:
7474
emulator: mame
7575
core: mame
76+
dragon64:
77+
emulator: mame
78+
core: mame
7679
archimedes:
7780
emulator: mame
7881
core: mame

package/batocera/core/batocera-configgen/configs/configgen-defaults-sm8250.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,9 @@ tutor:
7373
coco:
7474
emulator: mame
7575
core: mame
76+
dragon64:
77+
emulator: mame
78+
core: mame
7679
archimedes:
7780
emulator: mame
7881
core: mame

package/batocera/core/batocera-configgen/configs/configgen-defaults-sm8550.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,9 @@ tutor:
7171
coco:
7272
emulator: mame
7373
core: mame
74+
dragon64:
75+
emulator: mame
76+
core: mame
7477
archimedes:
7578
emulator: mame
7679
core: mame

package/batocera/core/batocera-configgen/configs/configgen-defaults-x86_64.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,9 @@ tutor:
9191
coco:
9292
emulator: mame
9393
core: mame
94+
dragon64:
95+
emulator: mame
96+
core: mame
9497
macintosh:
9598
emulator: mame
9699
core: mame

package/batocera/core/batocera-configgen/configs/configgen-defaults.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,12 @@ doom3:
177177
dos:
178178
emulator: libretro
179179
core: dosbox_pure
180+
dragon64:
181+
emulator: libretro
182+
core: mame
183+
mc10:
184+
emulator: libretro
185+
core: mame
180186
dreamcast:
181187
emulator: libretro
182188
core: flycast

package/batocera/core/batocera-configgen/data/mame/messSystems.csv

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ camplynx;lynx48k;cass;'mload""'
1212
casloopy;casloopy;cart;
1313
cdi;cdimono1;cdrm;
1414
coco;coco3;cart;
15+
dragon64;dragon64;cart;
16+
mc10;mc10;cass;
1517
crvision;crvision;cart;
1618
electron;electron64;cass;'*T.\nCH.""\n'
1719
fm7;fm7;flop1;

package/batocera/core/batocera-scripts/scripts/batocera-systems

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -430,6 +430,20 @@ systems = {
430430
{ "md5": "", "file": "bios/coco_fdc_v11.zip" },
431431
{ "md5": "8cab28f4b7311b8df63c07bb3b59bfd5", "zippedFile": "disk11.rom", "file": "bios/coco_fdc_v11.zip"} ] },
432432

433+
# ---------- Dragon 64 ---------- #
434+
"dragon64": { "name": "Dragon 64", "biosFiles": [ { "md5": "", "file": "bios/dragon64.zip" },
435+
{ "md5": "", "zippedFile": "d64_1.rom", "file": "bios/dragon64.zip"},
436+
{ "md5": "", "zippedFile": "d64_2.rom", "file": "bios/dragon64.zip"},
437+
{ "md5": "", "zippedFile": "d64bas.rom", "file": "bios/dragon64.zip"},
438+
{ "md5": "", "file": "bios/dragon32.zip" },
439+
{ "md5": "", "zippedFile": "d32.rom", "file": "bios/dragon32.zip"} ] },
440+
441+
# ---------- Tandy MC-10 ---------- #
442+
"mc10": { "name": "Tandy MC-10", "biosFiles": [ { "md5": "", "file": "bios/mc10.zip" },
443+
{ "md5": "", "zippedFile": "mc10.rom", "file": "bios/mc10.zip"},
444+
{ "md5": "", "file": "bios/alice.zip" },
445+
{ "md5": "", "zippedFile": "alice.rom", "file": "bios/alice.zip"} ] },
446+
433447
# ---------- Tomy Tutor ---------- #
434448
"tutor": { "name": "Tomy Tutor", "biosFiles": [ { "md5": "", "file": "bios/tutor.zip" },
435449
{ "md5": "196ba41dd1184fe754390534cc273116", "zippedFile": "tutor1.bin", "file": "bios/tutor.zip"},

package/batocera/emulationstation/batocera-es-system/es_systems.yml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3675,6 +3675,58 @@ coco:
36753675
comment_br: |
36763676
Requer o arquivo coco.zip da BIOS do MAME
36773677
3678+
dragon64:
3679+
name: Dragon 64
3680+
manufacturer: Dragon Data
3681+
release: 1983
3682+
hardware: computer
3683+
extensions: [wav, cas, dsk, dmk, ccc, rom, bin, zip, 7z]
3684+
emulators:
3685+
libretro:
3686+
mame: { requireAnyOf: [BR2_PACKAGE_LIBRETRO_MAME] }
3687+
mame:
3688+
mame: { requireAnyOf: [BR2_PACKAGE_MAME] }
3689+
xroar:
3690+
xroar: { requireAnyOf: [BR2_PACKAGE_XROAR] }
3691+
comment_en: |
3692+
MAME requires BIOS file dragon64.zip (or dragon32.zip for Dragon 32)
3693+
3694+
The Dragon 64 is a British home computer from 1983, compatible with Tandy CoCo.
3695+
It features a Motorola 6809E CPU, 64KB RAM, and Microsoft Extended BASIC.
3696+
3697+
Default Autoload Behaviors
3698+
1. Cartridge (.ccc/.rom) files autoload directly
3699+
2. Cassette (.cas/.wav) files autoload using CLOADM:EXEC
3700+
3. Disk (.dsk/.dmk) files autoload from boot disk
3701+
3702+
Dragon Models supported by MAME:
3703+
- Dragon 32 (1982) - 32KB RAM version
3704+
- Dragon 64 (1983) - 64KB RAM with RS-232 serial port
3705+
- Dragon Alpha (prototype) - Enhanced Dragon 64
3706+
3707+
user definable autoload overrides in: `system/configs/mame/autoload/dragon64_{cass,flop}_autoload.csv`
3708+
comment_br: |
3709+
Requer o arquivo dragon64.zip da BIOS do MAME
3710+
3711+
mc10:
3712+
name: MC-10
3713+
manufacturer: Tandy Radio Shack
3714+
release: 1983
3715+
hardware: computer
3716+
extensions: [wav, cas, rom, bin, zip, 7z]
3717+
emulators:
3718+
libretro:
3719+
mame: { requireAnyOf: [BR2_PACKAGE_LIBRETRO_MAME] }
3720+
mame:
3721+
mame: { requireAnyOf: [BR2_PACKAGE_MAME] }
3722+
xroar:
3723+
xroar: { requireAnyOf: [BR2_PACKAGE_XROAR] }
3724+
comment_en: |
3725+
MAME requires BIOS file mc10.zip
3726+
3727+
Xroar requires BASIC ROMs to be in the /userdata/bios/xroar folder.
3728+
The required rom files can be obtained from here: https://colorcomputerarchive.com/repo/ROMs/XRoar
3729+
36783730
vc4000:
36793731
name: VC 4000
36803732
manufacturer: Interton

0 commit comments

Comments
 (0)