mame icon indicating copy to clipboard operation
mame copied to clipboard

BBC B Micro emulation not working unless a ROM file named cm62024.bin is present.

Open rebroad opened this issue 6 months ago • 11 comments

Affected commit: d26cb4aa3d235b0e9b908ab1b49ff9bf087c5138

Problem: The BBC Micro drivers (bbcb.cpp, bbcbp.cpp) now require cm62024.bin (Voice Synthesis Module ROM) as a mandatory ROM file. This prevents the emulator from running without it, even though this ROM is only needed for speech synthesis features which most software doesn't use.

Expected behavior: The cm62024.bin ROM should be marked as ROM_LOAD_OPTIONAL rather than ROM_LOAD, similar to how other optional peripherals are handled in MAME.

Impact:

  • Users without this ROM file cannot run BBC Micro emulation
  • The VSM region is already allocated with ROMREGION_ERASE00, so it will fill with zeros if the ROM is missing
  • Most BBC Micro software does not use speech synthesis

Proposed fix: Change all instances of:

ROM_LOAD("cm62024.bin", 0x3c000, 0x4000, CRC(98e1bf9e) SHA1(b369809275cb67dfd8a749265e91adb2d2558ae6))

To:

ROM_LOAD_OPTIONAL("cm62024.bin", 0x3c000, 0x4000, CRC(98e1bf9e) SHA1(b369809275cb67dfd8a749265e91adb2d2558ae6))

This would allow BBC Micro emulation to work for users who don't have the speech ROM, while still supporting it for those who do.

Additional context:

  • The commit message mentions "TMS5220 speech is now working" which suggests speech synthesis was the focus of this change
  • The cm62024.bin ROM is specifically for the Voice Synthesis Module
  • Most BBC Micro games and software don't require speech synthesis
  • I have verified this fix works correctly by testing with the modified code

rebroad avatar Oct 08 '25 18:10 rebroad

Is the voice synthesizer and ROM some kind of add-on card or cartridge, or is it built into the machine but optional?

rb6502 avatar Oct 08 '25 18:10 rb6502

The file cm62024.bin (previously named phroma.bin) has been required to run BBC Micro emulation for at least 10 years, even though it wasn't working. So now that it is working you want to encourage users to not use it, even though they very likely have the file?

The VSP is an optional internal upgrade, empty sockets are provided on the motherboard for the VSP and VSM. The VSP is now implemented as a slot option, but the driver still requires the VSM as different BBC models came with either a UK or US speech PHROM.

I'd rather have users discovering games that used speech rather than them never knowing.

Pernod70 avatar Oct 08 '25 18:10 Pernod70

Is the voice synthesizer and ROM some kind of add-on card or cartridge, or is it built into the machine but optional?

Not build into the BBC B by default. It was a purchasable (GBP55) add on.

https://www.retro-kit.co.uk/page.cfm/content/Acorn-Speech-Synthesiser-Upgrade/ https://www.sprow.co.uk/bbc/speechupgrade.htm

rebroad avatar Oct 08 '25 22:10 rebroad

The file cm62024.bin (previously named phroma.bin) has been required to run BBC Micro emulation for at least 10 years, even though it wasn't working. So now that it is working you want to encourage users to not use it, even though they very likely have the file?

The VSP is an optional internal upgrade, empty sockets are provided on the motherboard for the VSP and VSM. The VSP is now implemented as a slot option, but the driver still requires the VSM as different BBC models came with either a UK or US speech PHROM.

I'd rather have users discovering games that used speech rather than them never knowing.

Many people might have the phroma.bin file, but how will they now know that they need to rename this file to cm62024.bin? Also, I cannot find any references to the ROM being called 62024. It was generally called TMS5220 or TMS6100. Not quite sure the benefit of renaming it, but it stopped me from using the latest version, so I doubt I will be the only one affected.

rebroad avatar Oct 08 '25 22:10 rebroad

MAME loads ROMs by hash, not by filename. So they don't actually need to know about renaming it at all.

rb6502 avatar Oct 08 '25 22:10 rb6502

Also, I cannot find any references to the ROM being called 62024. It was generally called TMS5220 or TMS6100. Not quite sure the benefit of renaming it, but it stopped me from using the latest version, so I doubt I will be the only one affected.

See photo of full kit at https://www.computinghistory.org.uk/det/33103/Acorn-BBC-Micro-Speech-System/. A TMS6100 is a type of speech PHROM, whereas CM62024 identifies it as containing the Kenneth Kendall speech data. The US Beeb was factory fitted with a different PHROM, the VM61002 (phrom_us.bin renamed to vm61002.bin but you didn't complain about that) from Texas Instruments, which was also factory fitted to all Torch machines.

And as already mentioned the renaming is irrelevant as MAME looks for ROMS by hash and not filename.

Pernod70 avatar Oct 08 '25 23:10 Pernod70

“Optional ROMs” are deprecated. The options are:

  • Make separate UK and US speech add-on devices
  • Make the UK and US ROMs BIOS options for the speech add-on device and use set_option_default_bios when adding the slot option in the host system to set the correct default speech ROM.

cuavas avatar Oct 09 '25 02:10 cuavas

Also, I cannot find any references to the ROM being called 62024. It was generally called TMS5220 or TMS6100. Not quite sure the benefit of renaming it, but it stopped me from using the latest version, so I doubt I will be the only one affected.

See photo of full kit at https://www.computinghistory.org.uk/det/33103/Acorn-BBC-Micro-Speech-System/. A TMS6100 is a type of speech PHROM, whereas CM62024 identifies it as containing the Kenneth Kendall speech data. The US Beeb was factory fitted with a different PHROM, the VM61002 (phrom_us.bin renamed to vm61002.bin but you didn't complain about that) from Texas Instruments, which was also factory fitted to all Torch machines.

And as already mentioned the renaming is irrelevant as MAME looks for ROMS by hash and not filename.

I didn't compain about phrom_us.bin or vm61002.bin because MAME does not refuse to run if either or both of those files are missing. MAME is not looking for vm62024.bin by hash - it's looking by filename. i.e. MAME was working before your commit but not after your commit (unless one adds the file cm62024.bin - the phrom.bin file, regardless of its name is not needed at all before your commit).

rebroad@HP-ENVY-x360:~/.mame/roms/bbcb$ mv cm62024.bin wibble.bin
rebroad@HP-ENVY-x360:~/.mame/roms/bbcb$ nmame bbcb -flop1 ~/Downloads/Spy\ Hunter\ \(1983\)\(U.S.\ Gold\)\[SPY\ start].ssd -window -debug
cm62024.bin NOT FOUND (tried in bbcb)
saa5050 WRONG CHECKSUMS:
    EXPECTED: CRC(201490f3) SHA1(6c8daba70374e5aa3a6402f24cdc5f8677d58a0f)
       FOUND: CRC(6298fc0b) SHA1(ae38e7f51dd33733bacfa896425ca105682b31d6)
Fatal error: Required files are missing, the machine cannot be run.
rebroad@HP-ENVY-x360:~/.mame/roms/bbcb$ mame bbcb -flop1 ~/Downloads/Spy\ Hunter\ \(1983\)\(U.S.\ Gold\)\[SPY\ start].ssd -window -debug
saa5050 WRONG CHECKSUMS:
    EXPECTED: CRC(201490f3) SHA1(6c8daba70374e5aa3a6402f24cdc5f8677d58a0f)
       FOUND: CRC(6298fc0b) SHA1(ae38e7f51dd33733bacfa896425ca105682b31d6)
WARNING: the machine might not run correctly.
Average speed: 100.10% (1 seconds)
rebroad@HP-ENVY-x360:~/.mame/roms/bbcb$ mv wibble.bin /tmp
rebroad@HP-ENVY-x360:~/.mame/roms/bbcb$ mame bbcb -flop1 ~/Downloads/Spy\ Hunter\ \(1983\)\(U.S.\ Gold\)\[SPY\ start].ssd -window -debug
saa5050 WRONG CHECKSUMS:
    EXPECTED: CRC(201490f3) SHA1(6c8daba70374e5aa3a6402f24cdc5f8677d58a0f)
       FOUND: CRC(6298fc0b) SHA1(ae38e7f51dd33733bacfa896425ca105682b31d6)
WARNING: the machine might not run correctly.
Average speed: 100.00% (2 seconds)
rebroad@HP-ENVY-x360:~/.mame/roms/bbcb$ nmame bbcb -flop1 ~/Downloads/Spy\ Hunter\ \(1983\)\(U.S.\ Gold\)\[SPY\ start].ssd -window -debug
cm62024.bin NOT FOUND (tried in bbcb)
saa5050 WRONG CHECKSUMS:
    EXPECTED: CRC(201490f3) SHA1(6c8daba70374e5aa3a6402f24cdc5f8677d58a0f)
       FOUND: CRC(6298fc0b) SHA1(ae38e7f51dd33733bacfa896425ca105682b31d6)
Fatal error: Required files are missing, the machine cannot be run.
rebroad@HP-ENVY-x360:~/.mame/roms/bbcb$ mv /tmp/wibble.bin cm62024.bin
rebroad@HP-ENVY-x360:~/.mame/roms/bbcb$ nmame bbcb -flop1 ~/Downloads/Spy\ Hunter\ \(1983\)\(U.S.\ Gold\)\[SPY\ start].ssd -window -debug
saa5050 WRONG CHECKSUMS:
    EXPECTED: CRC(201490f3) SHA1(6c8daba70374e5aa3a6402f24cdc5f8677d58a0f)
       FOUND: CRC(6298fc0b) SHA1(ae38e7f51dd33733bacfa896425ca105682b31d6)
WARNING: the machine might not run correctly.
Average speed: 100.02% (1 seconds)
rebroad@HP-ENVY-x360:~/.mame/roms/bbcb$ nmame -version
0.281 (mame0281-201-gdc26e7675bf-dirty)
rebroad@HP-ENVY-x360:~/.mame/roms/bbcb$ mame -version
0.264 (unknown)

The mame command is the standard mame (version 0.264) that is installed with Ubuntu 24.04 LTS, and nmame is the latest master.

rebroad avatar Oct 09 '25 08:10 rebroad

The typical trick is to 0 or 1 fill a binary file by the requested size (so cm62024.bin for 0x4000, if the region is already rom filled then an empty 1-byte should do the trick too), that would have the same effect and make rom validation to pass with a CRC warning. The general convention is to leave the base machine in the zip, then have an extra folder with your DIY rom mods. Latter overrides former.

angelosa avatar Oct 09 '25 08:10 angelosa

MAME will only load by filename as a last resort when hashes don't match, so what are the CRC32 and SHA1 hashes of your phroma.bin? Considering your output clearly shows you have a very old saa5050.zip then maybe your phroma.bin is bad too?

This whole issue is based on the OP's reluctance to updated their romsets.

Pernod70 avatar Oct 09 '25 12:10 Pernod70

@Pernod70 But should we be encouraging users to download phroma.bin if they didn't actually purchase the ROM? From a legal standpoint, surely we should support the standard BBC B hardware without requiring optional paid-for extras to be pirated?

rebroad avatar Oct 31 '25 20:10 rebroad