minitel2: Improved ROM list
Different revisions of the Minitel 2 came with slightly different ROMs. In addition to the ones already listed (Bv4 and Bv9), this commits adds references to Bv6 and Bv7 too.
The descriptions of the ROMs were updated to mention "France Telecom" (the "ft_" in their names), who commissioned this Minitel model.
A placeholder "Custom ROM (for homebrew development)" was added too, with the maximum possible size (64 KiB). This makes it easy use precompiled MAME binaries to test/debug an homebrew ROM too, by simply copying it into the roms directory under the name "devel.bin" and then booting with "-bios devel".
cc @jfdelnero
Instead of using a fake devel region maybe add a GENERIC_SOCKET(config, m_rom, generic_linear_slot, "minitel_rom", "bin,rom"); to the machine.
Then in machine_reset() you can check whether the user has manually loaded a ROM with m_rom->exists() and install it, overwriting your ROM region, with install_read_handler(0x0000, 0xffff, emu::rw_delegate(*m_rom, FUNC(generic_slot_device::read_rom)));.
Ensure to check the loaded ROM has a power of 2 size, ie. 8K, 16K, 32K, 64K, and it will automatically mirror it for you as it's a generic_linear_slot.
Thanks Pernod, that's what I was going to suggest.
DO NOT MERGE THE CURRENT REVISION
GENERIC_SOCKET apprach
Instead of using a fake
develregion maybe add aGENERIC_SOCKET(config, m_rom, generic_linear_slot, "minitel_rom", "bin,rom");to the machine. Then inmachine_reset()you can check whether the user has manually loaded a ROM withm_rom->exists()and install it, overwriting your ROM region, withinstall_read_handler(0x0000, 0xffff, emu::rw_delegate(*m_rom, FUNC(generic_slot_device::read_rom)));. Ensure to check the loaded ROM has a power of 2 size, ie. 8K, 16K, 32K, 64K, and it will automatically mirror it for you as it's ageneric_linear_slot.
@Pernod70 I've just tried this and it worked, except that I also had to change option_add_internal to option_add in src/devices/bus/generic/carts.cpp to make it usable from the command-line.
device_slot_interface &generic_linear_slot(device_slot_interface &device)
{
device.option_add("rom", GENERIC_ROM_LINEAR); // <-------- INSTEAD OF option_add_internal
return device;
}
Without this extra change, I would get
$ ./mame -window minitel2 -romslot rom -romimage MY_LARGE_IMAGE.bin
Ignoring MAME exception: Unknown slot option 'rom' in slot 'romslot'
Unknown slot option 'rom' in slot 'romslot'
Did I miss something about your proposal? I've uploaded the code in the current revision, if you want to have a look
ROM_LOAD_OPTIONAL approach
As an alternative, I've also tested the approach suggested by @angelosa of adding a ROM_LOAD_OPTIONAL for the upper half, and it works for me too:
// For loading custom ROMs larger than 32 KiB.
ROM_LOAD_OPTIONAL( "top32k.bin", 0x8000, 0x8000, NO_DUMP )
Conclusion
All things considered, I think the ROM_LOAD_OPTIONAL approach looks simpler to me, as it's just a two-line change that doesn't involve overriding the ROM region in code. Having to split the large ROM files I'm testing in two halves is not an issue for me :slightly_smiling_face:
DO NOT MERGE THE CURRENT REVISION
You can mark a PR as draft, if you don't want being merged.
@Pernod70 I've just tried this and it worked, except that I also had to change
option_add_internaltooption_addinsrc/devices/bus/generic/carts.cppto make it usable from the command-line.device_slot_interface &generic_linear_slot(device_slot_interface &device) { device.option_add("rom", GENERIC_ROM_LINEAR); // <-------- INSTEAD OF option_add_internal return device; }Without this extra change, I would get
$ ./mame -window minitel2 -romslot rom -romimage MY_LARGE_IMAGE.bin Ignoring MAME exception: Unknown slot option 'rom' in slot 'romslot' Unknown slot option 'rom' in slot 'romslot'Did I miss something about your proposal? I've uploaded the code in the current revision, if you want to have a look
You don't need to change carts.cpp. Your command line should be:
$ ./mame -window minitel2 -rom MY_LARGE_IMAGE.bin
You don't need to change carts.cpp. Your command line should be:
$ ./mame -window minitel2 -rom MY_LARGE_IMAGE.bin
Nice, it worked perfectly! Sorry for missing it out.
I've uploaded the PR :smiley:
Is there anything left for me to do on this PR? :)