mame icon indicating copy to clipboard operation
mame copied to clipboard

minitel2: Improved ROM list

Open fabio-d opened this issue 2 months ago • 6 comments

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

fabio-d avatar Oct 11 '25 11:10 fabio-d

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.

Pernod70 avatar Oct 15 '25 12:10 Pernod70

Thanks Pernod, that's what I was going to suggest.

rb6502 avatar Oct 15 '25 15:10 rb6502

DO NOT MERGE THE CURRENT REVISION

GENERIC_SOCKET apprach

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.

@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:

fabio-d avatar Oct 25 '25 14:10 fabio-d

DO NOT MERGE THE CURRENT REVISION

You can mark a PR as draft, if you don't want being merged.

angelosa avatar Oct 25 '25 14:10 angelosa

@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

You don't need to change carts.cpp. Your command line should be: $ ./mame -window minitel2 -rom MY_LARGE_IMAGE.bin

Pernod70 avatar Oct 25 '25 15:10 Pernod70

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:

fabio-d avatar Oct 25 '25 16:10 fabio-d

Is there anything left for me to do on this PR? :)

fabio-d avatar Dec 14 '25 11:12 fabio-d