summaryrefslogtreecommitdiffstats
path: root/src/mess
diff options
context:
space:
mode:
authorGravatarGravatar smf- <smf-@users.noreply.github.com>2014-01-11 01:00:43 +0000
committerGravatarGravatar smf- <smf-@users.noreply.github.com>2014-01-11 01:00:43 +0000
commit340b2178861799dd162df83d1c4985758a53bfc0 (patch)
tree528bc03ebb5b3bba0e06c2d09ace3bcb5e304dac /src/mess
parent5a89e028d557724b4613d555781ca8b6a4ceb4b7 (diff)
Replaced FLAG fake IO port with a DEVCB2 callback [smf]
Diffstat (limited to 'src/mess')
-rw-r--r--src/mess/drivers/binbug.c9
-rw-r--r--src/mess/drivers/cd2650.c9
-rw-r--r--src/mess/drivers/dolphunk.c9
-rw-r--r--src/mess/drivers/instruct.c9
-rw-r--r--src/mess/drivers/phunsy.c9
-rw-r--r--src/mess/drivers/pipbug.c8
-rw-r--r--src/mess/drivers/ravens.c13
7 files changed, 34 insertions, 32 deletions
diff --git a/src/mess/drivers/binbug.c b/src/mess/drivers/binbug.c
index 415c0076960..432abdc8587 100644
--- a/src/mess/drivers/binbug.c
+++ b/src/mess/drivers/binbug.c
@@ -71,7 +71,7 @@ public:
DECLARE_WRITE8_MEMBER(binbug_ctrl_w);
DECLARE_READ8_MEMBER(binbug_serial_r);
- DECLARE_WRITE8_MEMBER(binbug_serial_w);
+ DECLARE_WRITE_LINE_MEMBER(binbug_serial_w);
const UINT8 *m_p_chargen;
UINT8 m_framecnt;
virtual void video_start();
@@ -93,9 +93,9 @@ READ8_MEMBER( binbug_state::binbug_serial_r )
return m_keyboard->tx_r() & (m_cass->input() < 0.03);
}
-WRITE8_MEMBER( binbug_state::binbug_serial_w )
+WRITE_LINE_MEMBER( binbug_state::binbug_serial_w )
{
- m_cass->output(BIT(data, 0) ? -1.0 : +1.0);
+ m_cass->output(state ? -1.0 : +1.0);
}
static ADDRESS_MAP_START(binbug_mem, AS_PROGRAM, 8, binbug_state)
@@ -109,7 +109,7 @@ ADDRESS_MAP_END
static ADDRESS_MAP_START(binbug_io, AS_IO, 8, binbug_state)
ADDRESS_MAP_UNMAP_HIGH
AM_RANGE(S2650_CTRL_PORT, S2650_CTRL_PORT) AM_WRITE(binbug_ctrl_w)
- AM_RANGE(S2650_SENSE_PORT, S2650_FO_PORT) AM_READWRITE(binbug_serial_r,binbug_serial_w)
+ AM_RANGE(S2650_SENSE_PORT, S2650_SENSE_PORT) AM_READ(binbug_serial_r)
ADDRESS_MAP_END
/* Input ports */
@@ -299,6 +299,7 @@ static MACHINE_CONFIG_START( binbug, binbug_state )
MCFG_CPU_ADD("maincpu",S2650, XTAL_1MHz)
MCFG_CPU_PROGRAM_MAP(binbug_mem)
MCFG_CPU_IO_MAP(binbug_io)
+ MCFG_S2650_FLAG_HANDLER(WRITELINE(binbug_state, binbug_serial_w))
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
diff --git a/src/mess/drivers/cd2650.c b/src/mess/drivers/cd2650.c
index ef6e3045960..ef580c11da4 100644
--- a/src/mess/drivers/cd2650.c
+++ b/src/mess/drivers/cd2650.c
@@ -52,7 +52,7 @@ public:
DECLARE_WRITE8_MEMBER(beep_w);
DECLARE_WRITE8_MEMBER(kbd_put);
DECLARE_READ8_MEMBER(cass_r);
- DECLARE_WRITE8_MEMBER(cass_w);
+ DECLARE_WRITE_LINE_MEMBER(cass_w);
DECLARE_QUICKLOAD_LOAD_MEMBER(cd2650);
const UINT8 *m_p_chargen;
UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
@@ -73,9 +73,9 @@ WRITE8_MEMBER( cd2650_state::beep_w )
m_beep->set_state(BIT(data, 3));
}
-WRITE8_MEMBER( cd2650_state::cass_w )
+WRITE_LINE_MEMBER( cd2650_state::cass_w )
{
- m_cass->output(BIT(data, 0) ? -1.0 : +1.0);
+ m_cass->output(state ? -1.0 : +1.0);
}
READ8_MEMBER( cd2650_state::cass_r )
@@ -100,7 +100,7 @@ static ADDRESS_MAP_START( cd2650_io, AS_IO, 8, cd2650_state)
ADDRESS_MAP_UNMAP_HIGH
//AM_RANGE(0x80, 0x84) disk i/o
AM_RANGE(S2650_DATA_PORT,S2650_DATA_PORT) AM_READWRITE(keyin_r, beep_w)
- AM_RANGE(S2650_SENSE_PORT, S2650_FO_PORT) AM_READWRITE(cass_r, cass_w)
+ AM_RANGE(S2650_SENSE_PORT, S2650_SENSE_PORT) AM_READ(cass_r)
ADDRESS_MAP_END
/* Input ports */
@@ -279,6 +279,7 @@ static MACHINE_CONFIG_START( cd2650, cd2650_state )
MCFG_CPU_ADD("maincpu",S2650, XTAL_1MHz)
MCFG_CPU_PROGRAM_MAP(cd2650_mem)
MCFG_CPU_IO_MAP(cd2650_io)
+ MCFG_S2650_FLAG_HANDLER(WRITELINE(cd2650_state, cass_w))
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
diff --git a/src/mess/drivers/dolphunk.c b/src/mess/drivers/dolphunk.c
index 96445db5f20..cca64e044a0 100644
--- a/src/mess/drivers/dolphunk.c
+++ b/src/mess/drivers/dolphunk.c
@@ -99,7 +99,7 @@ public:
{ }
DECLARE_READ8_MEMBER(cass_r);
- DECLARE_WRITE8_MEMBER(cass_w);
+ DECLARE_WRITE_LINE_MEMBER(cass_w);
DECLARE_READ8_MEMBER(port07_r);
DECLARE_WRITE8_MEMBER(port00_w);
DECLARE_WRITE8_MEMBER(port06_w);
@@ -119,9 +119,9 @@ READ8_MEMBER( dolphunk_state::cass_r )
return (m_cass->input() > 0.03) ? 1 : 0;
}
-WRITE8_MEMBER( dolphunk_state::cass_w )
+WRITE_LINE_MEMBER( dolphunk_state::cass_w )
{
- m_cass_state = BIT(data, 0); // get flag bit
+ m_cass_state = state; // get flag bit
}
WRITE8_MEMBER( dolphunk_state::port00_w )
@@ -183,7 +183,7 @@ static ADDRESS_MAP_START( dolphunk_io, AS_IO, 8, dolphunk_state )
AM_RANGE(0x00, 0x03) AM_WRITE(port00_w) // 4-led display
AM_RANGE(0x06, 0x06) AM_WRITE(port06_w) // speaker (NOT a keyclick)
AM_RANGE(0x07, 0x07) AM_READ(port07_r) // pushbuttons
- AM_RANGE(S2650_SENSE_PORT, S2650_FO_PORT) AM_READWRITE(cass_r,cass_w)
+ AM_RANGE(S2650_SENSE_PORT, S2650_SENSE_PORT) AM_READ(cass_r)
AM_RANGE(0x102, 0x103) AM_NOP // stops error log filling up while using debug
ADDRESS_MAP_END
@@ -220,6 +220,7 @@ static MACHINE_CONFIG_START( dolphunk, dolphunk_state )
MCFG_CPU_ADD("maincpu",S2650, XTAL_1MHz)
MCFG_CPU_PROGRAM_MAP(dolphunk_mem)
MCFG_CPU_IO_MAP(dolphunk_io)
+ MCFG_S2650_FLAG_HANDLER(WRITELINE(dolphunk_state, cass_w))
/* video hardware */
MCFG_DEFAULT_LAYOUT(layout_dolphunk)
diff --git a/src/mess/drivers/instruct.c b/src/mess/drivers/instruct.c
index 91fd3f9e7d3..57ab0645083 100644
--- a/src/mess/drivers/instruct.c
+++ b/src/mess/drivers/instruct.c
@@ -66,7 +66,7 @@ public:
DECLARE_READ8_MEMBER(portfd_r);
DECLARE_READ8_MEMBER(portfe_r);
DECLARE_READ8_MEMBER(sense_r);
- DECLARE_WRITE8_MEMBER(flag_w);
+ DECLARE_WRITE_LINE_MEMBER(flag_w);
DECLARE_WRITE8_MEMBER(port_w);
DECLARE_WRITE8_MEMBER(portf8_w);
DECLARE_WRITE8_MEMBER(portf9_w);
@@ -88,9 +88,9 @@ private:
};
// flag led
-WRITE8_MEMBER( instruct_state::flag_w )
+WRITE_LINE_MEMBER( instruct_state::flag_w )
{
- output_set_value("led8", !BIT(data, 0));
+ output_set_value("led8", state);
}
// user port
@@ -229,7 +229,7 @@ static ADDRESS_MAP_START( instruct_io, AS_IO, 8, instruct_state )
AM_RANGE(0xfd, 0xfd) AM_READ(portfd_r)
AM_RANGE(0xfe, 0xfe) AM_READ(portfe_r)
AM_RANGE(S2650_DATA_PORT, S2650_DATA_PORT) AM_READWRITE(port_r,port_w)
- AM_RANGE(S2650_SENSE_PORT, S2650_FO_PORT) AM_READWRITE(sense_r,flag_w)
+ AM_RANGE(S2650_SENSE_PORT, S2650_SENSE_PORT) AM_READ(sense_r)
ADDRESS_MAP_END
/* Input ports */
@@ -417,6 +417,7 @@ static MACHINE_CONFIG_START( instruct, instruct_state )
MCFG_CPU_PROGRAM_MAP(instruct_mem)
MCFG_CPU_IO_MAP(instruct_io)
MCFG_CPU_PERIODIC_INT_DRIVER(instruct_state, t2l_int, 120)
+ MCFG_S2650_FLAG_HANDLER(WRITELINE(instruct_state, flag_w))
/* video hardware */
MCFG_DEFAULT_LAYOUT(layout_instruct)
diff --git a/src/mess/drivers/phunsy.c b/src/mess/drivers/phunsy.c
index 1eef9e927d4..ad54171ad75 100644
--- a/src/mess/drivers/phunsy.c
+++ b/src/mess/drivers/phunsy.c
@@ -43,7 +43,7 @@ public:
DECLARE_WRITE8_MEMBER( phunsy_data_w );
DECLARE_WRITE8_MEMBER( kbd_put );
DECLARE_READ8_MEMBER(cass_r);
- DECLARE_WRITE8_MEMBER(cass_w);
+ DECLARE_WRITE_LINE_MEMBER(cass_w);
const UINT8 *m_p_chargen;
UINT8 m_data_out;
UINT8 m_keyboard_input;
@@ -67,9 +67,9 @@ WRITE8_MEMBER( phunsy_state::phunsy_1800_w )
m_ram_1800[offset] = data;
}
-WRITE8_MEMBER( phunsy_state::cass_w )
+WRITE_LINE_MEMBER( phunsy_state::cass_w )
{
- m_cass->output(BIT(data, 0) ? -1.0 : +1.0);
+ m_cass->output(state ? -1.0 : +1.0);
}
READ8_MEMBER( phunsy_state::cass_r )
@@ -174,7 +174,7 @@ static ADDRESS_MAP_START( phunsy_io, AS_IO, 8, phunsy_state)
ADDRESS_MAP_UNMAP_HIGH
AM_RANGE( S2650_CTRL_PORT, S2650_CTRL_PORT ) AM_WRITE( phunsy_ctrl_w )
AM_RANGE( S2650_DATA_PORT,S2650_DATA_PORT) AM_READWRITE( phunsy_data_r, phunsy_data_w )
- AM_RANGE(S2650_SENSE_PORT, S2650_FO_PORT) AM_READWRITE(cass_r, cass_w)
+ AM_RANGE(S2650_SENSE_PORT, S2650_SENSE_PORT) AM_READ(cass_r)
ADDRESS_MAP_END
@@ -294,6 +294,7 @@ static MACHINE_CONFIG_START( phunsy, phunsy_state )
MCFG_CPU_ADD("maincpu",S2650, XTAL_1MHz)
MCFG_CPU_PROGRAM_MAP(phunsy_mem)
MCFG_CPU_IO_MAP(phunsy_io)
+ MCFG_S2650_FLAG_HANDLER(WRITELINE(phunsy_state, cass_w))
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
diff --git a/src/mess/drivers/pipbug.c b/src/mess/drivers/pipbug.c
index caa166d798f..74abae52785 100644
--- a/src/mess/drivers/pipbug.c
+++ b/src/mess/drivers/pipbug.c
@@ -54,7 +54,6 @@ public:
}
DECLARE_WRITE8_MEMBER(pipbug_ctrl_w);
- DECLARE_WRITE8_MEMBER(pipbug_serial_w);
required_device<rs232_port_device> m_rs232;
required_device<cpu_device> m_maincpu;
DECLARE_QUICKLOAD_LOAD_MEMBER( pipbug );
@@ -65,11 +64,6 @@ WRITE8_MEMBER( pipbug_state::pipbug_ctrl_w )
// 0x80 is written here - not connected in the baby 2650
}
-WRITE8_MEMBER( pipbug_state::pipbug_serial_w )
-{
- m_rs232->tx(data);
-}
-
static ADDRESS_MAP_START(pipbug_mem, AS_PROGRAM, 8, pipbug_state)
ADDRESS_MAP_UNMAP_HIGH
AM_RANGE( 0x0000, 0x03ff) AM_ROM
@@ -79,7 +73,6 @@ ADDRESS_MAP_END
static ADDRESS_MAP_START(pipbug_io, AS_IO, 8, pipbug_state)
// ADDRESS_MAP_UNMAP_HIGH
AM_RANGE(S2650_CTRL_PORT, S2650_CTRL_PORT) AM_WRITE(pipbug_ctrl_w)
- AM_RANGE(S2650_FO_PORT, S2650_FO_PORT) AM_WRITE(pipbug_serial_w)
AM_RANGE(S2650_SENSE_PORT, S2650_SENSE_PORT) AM_READNOP // this has to return zero or the parameter to write_sense is ignored
ADDRESS_MAP_END
@@ -173,6 +166,7 @@ static MACHINE_CONFIG_START( pipbug, pipbug_state )
MCFG_CPU_ADD("maincpu",S2650, XTAL_1MHz)
MCFG_CPU_PROGRAM_MAP(pipbug_mem)
MCFG_CPU_IO_MAP(pipbug_io)
+ MCFG_S2650_FLAG_HANDLER(DEVWRITELINE("rs232", rs232_port_device, tx))
/* video hardware */
MCFG_RS232_PORT_ADD("rs232", default_rs232_devices, "serial_terminal")
diff --git a/src/mess/drivers/ravens.c b/src/mess/drivers/ravens.c
index 04e4a5ee6d5..cc98e0de98b 100644
--- a/src/mess/drivers/ravens.c
+++ b/src/mess/drivers/ravens.c
@@ -96,7 +96,7 @@ public:
DECLARE_WRITE8_MEMBER(kbd_put);
DECLARE_MACHINE_RESET(ravens2);
DECLARE_READ8_MEMBER(cass_r);
- DECLARE_WRITE8_MEMBER(cass_w);
+ DECLARE_WRITE_LINE_MEMBER(cass_w);
DECLARE_QUICKLOAD_LOAD_MEMBER( ravens );
UINT8 m_term_char;
UINT8 m_term_data;
@@ -105,9 +105,9 @@ public:
required_device<cassette_image_device> m_cass;
};
-WRITE8_MEMBER( ravens_state::cass_w )
+WRITE_LINE_MEMBER( ravens_state::cass_w )
{
- m_cass->output(BIT(data, 0) ? -1.0 : +1.0);
+ m_cass->output(state ? -1.0 : +1.0);
}
READ8_MEMBER( ravens_state::cass_r )
@@ -207,7 +207,7 @@ static ADDRESS_MAP_START( ravens_io, AS_IO, 8, ravens_state )
AM_RANGE(0x09, 0x09) AM_WRITE(leds_w) // LED output port
AM_RANGE(0x10, 0x15) AM_WRITE(display_w) // 6-led display
AM_RANGE(0x17, 0x17) AM_READ(port17_r) // pushbuttons
- AM_RANGE(S2650_SENSE_PORT, S2650_FO_PORT) AM_READWRITE(cass_r,cass_w)
+ AM_RANGE(S2650_SENSE_PORT, S2650_SENSE_PORT) AM_READ(cass_r)
ADDRESS_MAP_END
static ADDRESS_MAP_START( ravens2_io, AS_IO, 8, ravens_state )
@@ -215,7 +215,7 @@ static ADDRESS_MAP_START( ravens2_io, AS_IO, 8, ravens_state )
AM_RANGE(0x07, 0x07) AM_READ(port07_r)
AM_RANGE(0x1b, 0x1b) AM_WRITE(port1b_w)
AM_RANGE(0x1c, 0x1c) AM_WRITE(port1c_w)
- AM_RANGE(S2650_SENSE_PORT, S2650_FO_PORT) AM_READWRITE(cass_r,cass_w)
+ AM_RANGE(S2650_SENSE_PORT, S2650_SENSE_PORT) AM_READ(cass_r)
ADDRESS_MAP_END
/* Input ports */
@@ -341,6 +341,7 @@ static MACHINE_CONFIG_START( ravens, ravens_state )
MCFG_CPU_ADD("maincpu",S2650, XTAL_1MHz) // frequency is unknown
MCFG_CPU_PROGRAM_MAP(ravens_mem)
MCFG_CPU_IO_MAP(ravens_io)
+ MCFG_S2650_FLAG_HANDLER(WRITELINE(ravens_state, cass_w))
/* video hardware */
MCFG_DEFAULT_LAYOUT(layout_ravens)
@@ -360,6 +361,8 @@ static MACHINE_CONFIG_START( ravens2, ravens_state )
MCFG_CPU_ADD("maincpu",S2650, XTAL_1MHz) // frequency is unknown
MCFG_CPU_PROGRAM_MAP(ravens_mem)
MCFG_CPU_IO_MAP(ravens2_io)
+ MCFG_S2650_FLAG_HANDLER(WRITELINE(ravens_state, cass_w))
+
MCFG_MACHINE_RESET_OVERRIDE(ravens_state, ravens2)
/* video hardware */