mirror of
https://github.com/holub/mame
synced 2025-10-07 17:27:06 +03:00
z100: Map video RAM using PROM module
This commit is contained in:
parent
39e0a5be24
commit
220b440a09
@ -174,6 +174,7 @@ public:
|
||||
m_epci(*this, "epci%u", 0U),
|
||||
m_crtc(*this, "crtc"),
|
||||
m_palette(*this, "palette"),
|
||||
m_vrmm(*this, "vrmm"),
|
||||
m_floppy(nullptr)
|
||||
{ }
|
||||
|
||||
@ -222,6 +223,7 @@ private:
|
||||
required_device_array<mc2661_device, 2> m_epci;
|
||||
required_device<mc6845_device> m_crtc;
|
||||
required_device<palette_device> m_palette;
|
||||
required_region_ptr<uint8_t> m_vrmm;
|
||||
|
||||
std::unique_ptr<uint8_t[]> m_gvram;
|
||||
uint8_t m_keyb_press;
|
||||
@ -277,8 +279,8 @@ MC6845_UPDATE_ROW(z100_state::update_row)
|
||||
|
||||
offs_t z100_state::vram_map(offs_t offset) const
|
||||
{
|
||||
// FIXME: part of this calculation is actually done through a ROM
|
||||
return (offset & 0x30000) | ((((offset & 0x007f) << 4 | (offset & 0x0780) >> 7) + ((offset & 0xf800) >> 11) * 0x0500 + (uint16_t(m_start_addr) << 8)) & 0xffff);
|
||||
return (offset & 0x30000) | (offset & 0x000f) << 4 | (offset & 0x0780) >> 7
|
||||
| ((m_vrmm[(offset & 0xf800) >> 8 | (offset & 0x0070) >> 4] + m_start_addr) & 0xff) << 8;
|
||||
}
|
||||
|
||||
READ8_MEMBER( z100_state::z100_vram_r )
|
||||
@ -763,11 +765,14 @@ void z100_state::z100(machine_config &config)
|
||||
|
||||
/* ROM definition */
|
||||
ROM_START( z100 )
|
||||
ROM_REGION( 0x4000, "ipl", ROMREGION_ERASEFF )
|
||||
ROM_REGION( 0x4000, "ipl", 0 )
|
||||
ROM_LOAD( "intel-d27128-1.bin", 0x0000, 0x4000, CRC(b21f0392) SHA1(69e492891cceb143a685315efe0752981a2d8143))
|
||||
|
||||
ROM_REGION( 0x0400, "upi", ROMREGION_ERASEFF ) // 8041A keyboard controller
|
||||
ROM_REGION( 0x0400, "upi", ROMREGION_ERASE00 ) // 8041A keyboard controller
|
||||
ROM_LOAD( "444-109.u284", 0x0000, 0x0400, NO_DUMP )
|
||||
|
||||
ROM_REGION( 0x0100, "vrmm", 0 ) // Video RAM Mapping Module
|
||||
ROM_LOAD( "444-127.u370", 0x0000, 0x0100, CRC(ac386f6b) SHA1(2b62b939d704d90edf59923a8a1a51ef1902f4d7) BAD_DUMP ) // typed in from manual
|
||||
ROM_END
|
||||
|
||||
void z100_state::driver_init()
|
||||
|
Loading…
Reference in New Issue
Block a user