-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
trs/mc10.cpp: add minimum rom size and block size for cartridge rom, clean global namespace #12088
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This complicates the interface unnecessarily.
else if (len < m_cart->min_rom_length()) | ||
{ | ||
return std::make_pair( | ||
image_error::INVALIDLENGTH, | ||
util::string_format("Unsupported cartridge size (must be at least %u bytes)", m_cart->min_rom_length())); | ||
} | ||
else if (len % m_cart->block_rom_length() != 0) | ||
{ | ||
return std::make_pair( | ||
image_error::INVALIDLENGTH, | ||
util::string_format("Unsupported cartridge size (must be a multiple of %u bytes)", m_cart->block_rom_length())); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding the minimum length and granularity to the interface over-complicates things when they can be checked in load()
if necessary anyway. The only reason the maximum length is checked here is to guard against attempting to read an excessively large file as loose software.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will do.
DEFINE_DEVICE_TYPE_PRIVATE(MC10_PAK_MCX128, device_mc10cart_interface, mc10_pak_mcx128_device, "mc10_mcx128", "Darren Atkinson's MCX-128 cartridge") | ||
DEFINE_DEVICE_TYPE_PRIVATE(ALICE_PAK_MCX128, device_mc10cart_interface, alice_pak_mcx128_device, "alice_mcx128", "Darren Atkinson's MCX-128 cartridge (Alice ROM)") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do these actually need to be different device types at all? Would making the ROMs BIOS options not be adequate?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not the author of that part, I only applied to it the comment you made on private device and namespace to the neighbour file. But anyway, as I started to change it, I can push the change further.
If I understand the suggestion, it would be to have only one device type for mcx128, but add a configuration option on it to select between both ROMs described at the beginning of the file?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you look at a card like this: https://github.com/mamedev/mame/blob/master/src/devices/bus/a2bus/grappler.cpp
Note that the Grappler+ has options for the 3.0 and 3.2 ROM revisions. You select them like -sl1 grapplus,bios=v30
or -sl1 grapplus,bios=v32
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I finally had time to look at this. I see a difference between the grappler and the mc10 situation. From what I understand, for grappler, both ROMs are valid for the card. So this is presented as an option, with a default value.
For the MCX128 device, you must use the ROM depending on the ROM installed for the particular flavour of the computer. Both computers are (almost) the same, but they have different system ROMs. And this, if you run the MC-10, you must use the ROM for MC-10 in the MCX128 device. And the same for Alice, with its own ROM.
So that's why the author originally made two devices I guess. Changing the ROM for the device does not represent a valid configuration.
Is there a way to have the "default ROM" depending on the emulated computer?
Yeah, look for "set_default_bios_tag". It works well.
OG.
…On Fri, May 17, 2024 at 10:36 PM Sylvain Glaize ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In src/devices/bus/mc10/mcx128.cpp
<#12088 (comment)>:
> +DEFINE_DEVICE_TYPE_PRIVATE(MC10_PAK_MCX128, device_mc10cart_interface, mc10_pak_mcx128_device, "mc10_mcx128", "Darren Atkinson's MCX-128 cartridge")
DEFINE_DEVICE_TYPE_PRIVATE(ALICE_PAK_MCX128, device_mc10cart_interface, alice_pak_mcx128_device, "alice_mcx128", "Darren Atkinson's MCX-128 cartridge (Alice ROM)")
I finally had time to look at this. I see a difference between the
grappler and the mc10 situation. From what I understand, for grappler, both
ROMs are valid for the card. So this is presented as an option, with a
default value.
For the MCX128 device, you must use the ROM depending on the ROM installed
for the particular flavour of the computer. Both computers are (almost) the
same, but they have different system ROMs. And this, if you run the MC-10,
you must use the ROM for MC-10 in the MCX128 device. And the same for
Alice, with its own ROM.
So that's why the author originally made two devices I guess. Changing the
ROM for the device does not represent a valid configuration.
Is there a way to have the "default ROM" depending on the emulated
computer?
—
Reply to this email directly, view it on GitHub
<#12088 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACGSF4LS5M5T6XOCFRFHDH3ZCZS6NAVCNFSM6AAAAABEDFXDISVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZDANRUGM2TSNBQGI>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Resolving the comments on #12080
Report the comments on other previously written MC10 cart devices.