summaryrefslogtreecommitdiffstatshomepage
path: root/src/mess/machine/mikro80.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mess/machine/mikro80.c')
-rw-r--r--src/mess/machine/mikro80.c40
1 files changed, 18 insertions, 22 deletions
diff --git a/src/mess/machine/mikro80.c b/src/mess/machine/mikro80.c
index 9cf46e44016..ec0d24319a2 100644
--- a/src/mess/machine/mikro80.c
+++ b/src/mess/machine/mikro80.c
@@ -9,18 +9,16 @@
#include "emu.h"
#include "cpu/i8085/i8085.h"
-#include "imagedev/cassette.h"
-#include "machine/i8255.h"
#include "includes/mikro80.h"
/* Driver initialization */
DRIVER_INIT_MEMBER(mikro80_state,mikro80)
{
/* set initialy ROM to be visible on first bank */
- UINT8 *RAM = memregion("maincpu")->base();
+ UINT8 *RAM = m_region_maincpu->base();
memset(RAM,0x0000,0x0800); // make frist page empty by default
- membank("bank1")->configure_entries(1, 2, RAM, 0x0000);
- membank("bank1")->configure_entries(0, 2, RAM, 0xf800);
+ m_bank1->configure_entries(1, 2, RAM, 0x0000);
+ m_bank1->configure_entries(0, 2, RAM, 0xf800);
m_key_mask = 0x7f;
}
@@ -33,20 +31,20 @@ DRIVER_INIT_MEMBER(mikro80_state,radio99)
READ8_MEMBER(mikro80_state::mikro80_8255_portb_r)
{
UINT8 key = 0xff;
- if ((m_keyboard_mask & 0x01)!=0) { key &= ioport("LINE0")->read(); }
- if ((m_keyboard_mask & 0x02)!=0) { key &= ioport("LINE1")->read(); }
- if ((m_keyboard_mask & 0x04)!=0) { key &= ioport("LINE2")->read(); }
- if ((m_keyboard_mask & 0x08)!=0) { key &= ioport("LINE3")->read(); }
- if ((m_keyboard_mask & 0x10)!=0) { key &= ioport("LINE4")->read(); }
- if ((m_keyboard_mask & 0x20)!=0) { key &= ioport("LINE5")->read(); }
- if ((m_keyboard_mask & 0x40)!=0) { key &= ioport("LINE6")->read(); }
- if ((m_keyboard_mask & 0x80)!=0) { key &= ioport("LINE7")->read(); }
+ if ((m_keyboard_mask & 0x01)!=0) { key &= m_io_line0->read(); }
+ if ((m_keyboard_mask & 0x02)!=0) { key &= m_io_line1->read(); }
+ if ((m_keyboard_mask & 0x04)!=0) { key &= m_io_line2->read(); }
+ if ((m_keyboard_mask & 0x08)!=0) { key &= m_io_line3->read(); }
+ if ((m_keyboard_mask & 0x10)!=0) { key &= m_io_line4->read(); }
+ if ((m_keyboard_mask & 0x20)!=0) { key &= m_io_line5->read(); }
+ if ((m_keyboard_mask & 0x40)!=0) { key &= m_io_line6->read(); }
+ if ((m_keyboard_mask & 0x80)!=0) { key &= m_io_line7->read(); }
return key & m_key_mask;
}
READ8_MEMBER(mikro80_state::mikro80_8255_portc_r)
{
- return ioport("LINE8")->read();
+ return m_io_line8->read();
}
WRITE8_MEMBER(mikro80_state::mikro80_8255_porta_w)
@@ -71,39 +69,37 @@ I8255_INTERFACE( mikro80_ppi8255_interface )
TIMER_CALLBACK_MEMBER(mikro80_state::mikro80_reset)
{
- membank("bank1")->set_entry(0);
+ m_bank1->set_entry(0);
}
void mikro80_state::machine_reset()
{
machine().scheduler().timer_set(attotime::from_usec(10), timer_expired_delegate(FUNC(mikro80_state::mikro80_reset),this));
- membank("bank1")->set_entry(1);
+ m_bank1->set_entry(1);
m_keyboard_mask = 0;
}
READ8_MEMBER(mikro80_state::mikro80_keyboard_r)
{
- i8255_device *ppi = machine().device<i8255_device>("ppi8255");
- return ppi->read(space, offset^0x03);
+ return m_ppi8255->read(space, offset^0x03);
}
WRITE8_MEMBER(mikro80_state::mikro80_keyboard_w)
{
- i8255_device *ppi = machine().device<i8255_device>("ppi8255");
- ppi->write(space, offset^0x03, data);
+ m_ppi8255->write(space, offset^0x03, data);
}
WRITE8_MEMBER(mikro80_state::mikro80_tape_w)
{
- machine().device<cassette_image_device>(CASSETTE_TAG)->output(data & 0x01 ? 1 : -1);
+ m_cassette->output(data & 0x01 ? 1 : -1);
}
READ8_MEMBER(mikro80_state::mikro80_tape_r)
{
- double level = machine().device<cassette_image_device>(CASSETTE_TAG)->input();
+ double level = m_cassette->input();
if (level < 0) {
return 0x00;
}