diff options
author | mahlemiut <mahlemiut@users.noreply.github.com> | 2014-07-09 02:10:41 +0000 |
---|---|---|
committer | mahlemiut <mahlemiut@users.noreply.github.com> | 2014-07-09 02:10:41 +0000 |
commit | e705d2392e74400dca9638f3b93a744463996bd9 (patch) | |
tree | 49d4b08c2dc36e28f57358bd820341446af7f800 /src/mess/machine/amstrad.c | |
parent | d45ce5936e87958d2ebb26b5a2b0a253e621aa4b (diff) |
amstrad: added the ability for expansion devices to contain ROMs (as some do).
added ROMs for DK'Tronics Speech Synthesiser, and both RS232
interfaces (plus one alternate for the Amstrad interface).
split Amstrad and Pace serial interfaces into separate devices as
they have different sized ROM areas. [Barry Rodewald]
Diffstat (limited to 'src/mess/machine/amstrad.c')
-rw-r--r-- | src/mess/machine/amstrad.c | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/src/mess/machine/amstrad.c b/src/mess/machine/amstrad.c index 2a6deae8054..00eb19cd089 100644 --- a/src/mess/machine/amstrad.c +++ b/src/mess/machine/amstrad.c @@ -2864,7 +2864,30 @@ void amstrad_state::enumerate_roms() } /* enumerate expansion ROMs */ - // TODO: get ROMs from expansion devices (that aren't ROMboxes) + + /* find any expansion devices that have a 'exp_rom' region */ + cpc_expansion_slot_device* exp_port = m_exp; + + while(exp_port != NULL) + { + device_t* temp; + + temp = dynamic_cast<device_t*>(exp_port->get_card_device()); + if(temp != NULL) + { + if(temp->memregion("exp_rom")->base() != NULL) + { + int num = temp->memregion("exp_rom")->bytes() / 0x4000; + for(i=0;i<num;i++) + { + m_Amstrad_ROM_Table[m_rom_count] = temp->memregion("exp_rom")->base()+0x4000*i; + NEXT_ROM_SLOT + } + } + } + exp_port = temp->subdevice<cpc_expansion_slot_device>("exp"); + } + /* add ROMs from ROMbox expansion */ romexp = get_expansion_device(machine(),"rom"); |