mirror of
https://github.com/holub/mame
synced 2025-04-19 23:12:11 +03:00
(nw) zorba: adjusted to requirements
This commit is contained in:
parent
6bdc7cc979
commit
8a0531799d
@ -72,7 +72,7 @@ ToDo:
|
||||
|
||||
void zorba_state::zorba_mem(address_map &map)
|
||||
{
|
||||
map(0x0000, 0x3fff).ram().share("mainram").lr8(NAME([this] (offs_t offset) { if(m_rom_in_map) return m_rom[offset]; else return m_ram[offset]; }));
|
||||
map(0x0000, 0x3fff).ram().share("mainram").bankr("bank1");
|
||||
map(0x4000, 0xffff).ram();
|
||||
}
|
||||
|
||||
@ -275,11 +275,12 @@ void zorba_state::machine_start()
|
||||
save_item(NAME(m_printer_select));
|
||||
|
||||
save_item(NAME(m_term_data));
|
||||
save_item(NAME(m_rom_in_map));
|
||||
|
||||
m_printer_prowriter = false;
|
||||
m_printer_fault = 0;
|
||||
m_printer_select = 0;
|
||||
m_bank1->configure_entry(0, m_ram);
|
||||
m_bank1->configure_entry(1, m_rom);
|
||||
}
|
||||
|
||||
void zorba_state::machine_reset()
|
||||
@ -293,7 +294,7 @@ void zorba_state::machine_reset()
|
||||
m_printer_prowriter = BIT(m_config_port->read(), 0);
|
||||
m_pia0->cb1_w(m_printer_prowriter ? m_printer_select : m_printer_fault);
|
||||
|
||||
m_rom_in_map = true;
|
||||
m_bank1->set_entry(1);
|
||||
|
||||
m_maincpu->reset();
|
||||
}
|
||||
@ -306,25 +307,25 @@ void zorba_state::machine_reset()
|
||||
uint8_t zorba_state::ram_r()
|
||||
{
|
||||
if (!machine().side_effects_disabled())
|
||||
m_rom_in_map = false;
|
||||
m_bank1->set_entry(0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
void zorba_state::ram_w(uint8_t data)
|
||||
{
|
||||
m_rom_in_map = false;
|
||||
m_bank1->set_entry(0);
|
||||
}
|
||||
|
||||
uint8_t zorba_state::rom_r()
|
||||
{
|
||||
if (!machine().side_effects_disabled())
|
||||
m_rom_in_map = true;
|
||||
m_bank1->set_entry(1);
|
||||
return 0;
|
||||
}
|
||||
|
||||
void zorba_state::rom_w(uint8_t data)
|
||||
{
|
||||
m_rom_in_map = true;
|
||||
m_bank1->set_entry(1);
|
||||
}
|
||||
|
||||
|
||||
|
@ -29,6 +29,7 @@ public:
|
||||
, m_config_port(*this, "CNF")
|
||||
, m_rom(*this, "maincpu")
|
||||
, m_ram(*this, "mainram")
|
||||
, m_bank1(*this, "bank1")
|
||||
, m_p_chargen(*this, "chargen")
|
||||
, m_maincpu(*this, "maincpu")
|
||||
, m_dma(*this, "dma")
|
||||
@ -94,6 +95,7 @@ private:
|
||||
|
||||
required_region_ptr<u8> m_rom;
|
||||
required_shared_ptr<u8> m_ram;
|
||||
required_memory_bank m_bank1;
|
||||
required_region_ptr<uint8_t> m_p_chargen;
|
||||
|
||||
required_device<cpu_device> m_maincpu;
|
||||
@ -124,7 +126,6 @@ private:
|
||||
int m_printer_select;
|
||||
|
||||
uint8_t m_term_data;
|
||||
bool m_rom_in_map;
|
||||
};
|
||||
|
||||
#endif // MAME_INCLUDES_ZORBA_H
|
||||
|
Loading…
Reference in New Issue
Block a user