msx1_cart.xml: Hexadecimal sizes, explicitly configure loading for smaller images, add information and usage notes. (#10883)

* Use hexadecimal sizes.
* Added a feature to explicitly indicate where in memory cartridges without mappers should be loaded.
* Updated serial, isbn, gtin, and usage notes.
* Updated versions in Arabic releases and added Arabic alt_titles.
This commit is contained in:
wilbertpol 2023-02-11 21:24:12 +00:00 committed by GitHub
parent 6f93428f96
commit 2afd1bf48e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 4575 additions and 2880 deletions

File diff suppressed because it is too large Load Diff

View File

@ -184,6 +184,7 @@ LZ93A13 (32 pin) - 8KB banks
<year>1987</year>
<publisher>Taito</publisher>
<info name="alt_title" value="バブルボブル" />
<info name="serial" value="TMS-02" />
<info name="usage" value="Requires a Japanese system" />
<part name="cart" interface="msx_cart">
<feature name="pcb" value="TA-1M" />
@ -3104,9 +3105,9 @@ LZ93A13 (32 pin) - 8KB banks
<year>19??</year>
<publisher>Philips</publisher>
<part name="cart" interface="msx_cart">
<feature name="mapper" value="NOMAPPER" />
<dataarea name="rom" size="16384">
<rom name="stcmsx2p.bin" size="16384" crc="4e4fbe2a" sha1="f29cef9d13d50d9e3158064c6bb381def6ff384d" offset="0x0000" />
<feature name="start_page" value="0"/>
<dataarea name="rom" size="0x4000">
<rom name="stcmsx2p.bin" size="0x4000" crc="4e4fbe2a" sha1="f29cef9d13d50d9e3158064c6bb381def6ff384d" />
</dataarea>
</part>
</software>
@ -3115,10 +3116,11 @@ LZ93A13 (32 pin) - 8KB banks
<description>Cheese 2 (Japan)</description>
<year>1985</year>
<publisher>Neos</publisher>
<info name="usage" value="Requires a mouse in general purpose port 1."/>
<part name="cart" interface="msx_cart">
<feature name="mapper" value="NOMAPPER" />
<dataarea name="rom" size="32768">
<rom name="cheese 2 (japan) (program).rom" size="32768" crc="2ffb49c3" sha1="930b4896c1590ebbb74d330447ec36e3feb5cab6" status="baddump" offset="0" />
<feature name="start_page" value="1"/>
<dataarea name="rom" size="0x8000">
<rom name="cheese 2 (japan) (program).rom" size="0x8000" crc="2ffb49c3" sha1="930b4896c1590ebbb74d330447ec36e3feb5cab6" status="baddump" />
</dataarea>
</part>
</software>

View File

@ -50,6 +50,31 @@ image_init_result msx_cart_nomapper_device::initialize_cartridge(std::string &me
const u32 size = cart_rom_region()->bytes();
u8 *rom = cart_rom_region()->base();
// 64KB images fill all pages.
if (size == 0x10000)
{
m_start_address = 0;
}
else if (is_loaded_through_softlist())
{
const char *start_page_str = get_feature("start_page");
if (!start_page_str)
{
message = "msx_cart_nomapper_device: Feature 'start_page' was not found.";
return image_init_result::FAIL;
}
u32 start_page = strtol(start_page_str, nullptr, 0);
if (start_page > 2)
{
message = "msx_cart_nomapper_device: Invalid value for 'start_page', allowed values are 0, 1, and 2";
return image_init_result::FAIL;
}
m_start_address = start_page * 0x4000;
}
else
{
// Try to guess the start address from the rom contents.
// determine start address, default to 0x4000
m_start_address = 0x4000;
@ -99,11 +124,7 @@ image_init_result msx_cart_nomapper_device::initialize_cartridge(std::string &me
m_start_address = 0;
break;
// 64KB
default:
m_start_address = 0;
break;
}
}
m_end_address = std::min<u32>(m_start_address + size, 0x10000);

View File

@ -92,6 +92,8 @@ protected:
memory_region *cart_kanji_region() { return m_exp ? m_exp->memregion("kanji") : nullptr; }
memory_region *cart_ram_region() { return m_exp ? m_exp->memregion("ram") : nullptr; }
memory_region *cart_sram_region() { return m_exp ? m_exp->memregion("sram") : nullptr; }
const char *get_feature(std::string_view feature_name) { return m_exp ? m_exp->get_feature(feature_name) : nullptr; }
bool is_loaded_through_softlist() { return m_exp ? m_exp->loaded_through_softlist() : false; }
DECLARE_WRITE_LINE_MEMBER(irq_out);
address_space &memory_space() const;
address_space &io_space() const;