mirror of
https://github.com/holub/mame
synced 2025-04-23 00:39:36 +03:00
apple/apple2gs: Fix ROM0/1 ram size logic (#11264)
* 256k (ROM 0/1) apple2gs doesn't have any extra memory above the base 4 banks
This commit is contained in:
parent
997be1f7e5
commit
2fb9b7c0e4
@ -727,12 +727,24 @@ void apple2gs_state::machine_start()
|
||||
m_inh_slot = -1;
|
||||
m_cnxx_slot = CNXX_UNCLAIMED;
|
||||
|
||||
// install memory beyond 256K/1M
|
||||
address_space& space = m_maincpu->space(AS_PROGRAM);
|
||||
int ramsize = m_ram_size - 0x20000; // subtract 128K for banks 0 and 1, which are handled specially
|
||||
|
||||
// RAM sizes for both classes of machine no longer include the Mega II RAM
|
||||
space.install_ram(0x020000, ramsize - 1 + 0x20000, m_ram_ptr + 0x020000);
|
||||
// install memory beyond 256K
|
||||
int ramsize = m_ram_size;
|
||||
if (!m_is_rom3 && m_ram_size <= 1280 * 1024)
|
||||
{
|
||||
ramsize -= 0x40000; // subtract 256k for banks 0, 1, e0, e1
|
||||
}
|
||||
else if (m_is_rom3 || m_ram_size == 1024 * 1024 * 8)
|
||||
{
|
||||
ramsize -= 0x20000; // subtract 128K for banks 0 and 1, which are handled specially
|
||||
}
|
||||
|
||||
if (ramsize)
|
||||
{
|
||||
address_space& space = m_maincpu->space(AS_PROGRAM);
|
||||
// RAM sizes for both classes of machine no longer include the Mega II RAM
|
||||
space.install_ram(0x020000, ramsize - 1 + 0x20000, m_ram_ptr + 0x020000);
|
||||
}
|
||||
|
||||
// setup save states
|
||||
save_item(NAME(m_speaker_state));
|
||||
|
Loading…
Reference in New Issue
Block a user