mirror of
https://github.com/holub/mame
synced 2025-10-05 08:41:31 +03:00
allow 8kb and 48kb sizes
This commit is contained in:
parent
d775dfb341
commit
3714cc3043
@ -66,22 +66,22 @@ msx_cart_interface::msx_cart_interface(const machine_config &mconfig, device_t &
|
||||
|
||||
void msx_cart_interface::rom_alloc(UINT32 size)
|
||||
{
|
||||
m_rom.resize(size);
|
||||
m_rom.resize_and_clear(size, 0xff);
|
||||
}
|
||||
|
||||
void msx_cart_interface::rom_vlm5030_alloc(UINT32 size)
|
||||
{
|
||||
m_rom_vlm5030.resize(size);
|
||||
m_rom_vlm5030.resize_and_clear(size, 0xff);
|
||||
}
|
||||
|
||||
void msx_cart_interface::ram_alloc(UINT32 size)
|
||||
{
|
||||
m_ram.resize(size);
|
||||
m_ram.resize_and_clear(size);
|
||||
}
|
||||
|
||||
void msx_cart_interface::sram_alloc(UINT32 size)
|
||||
{
|
||||
m_sram.resize(size);
|
||||
m_sram.resize_and_clear(size);
|
||||
}
|
||||
|
||||
|
||||
|
@ -137,11 +137,22 @@ bool msx_slot_cartridge_device::call_load()
|
||||
else
|
||||
{
|
||||
UINT32 length = this->length();
|
||||
|
||||
UINT32 length_aligned = 0x4000;
|
||||
while (length_aligned < length )
|
||||
|
||||
// determine how much space to allocate
|
||||
UINT32 length_aligned = 0x10000;
|
||||
|
||||
if (length <= 0x2000)
|
||||
length_aligned = 0x2000;
|
||||
else if (length <= 0x4000)
|
||||
length_aligned = 0x4000;
|
||||
else if (length <= 0x8000)
|
||||
length_aligned = 0x8000;
|
||||
else if (length <= 0xc000)
|
||||
length_aligned = 0xc000;
|
||||
else
|
||||
{
|
||||
length_aligned *= 2;
|
||||
while (length_aligned < length )
|
||||
length_aligned *= 2;
|
||||
}
|
||||
|
||||
m_cartridge->rom_alloc(length_aligned);
|
||||
|
Loading…
Reference in New Issue
Block a user