summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/machine
diff options
context:
space:
mode:
Diffstat (limited to 'src/emu/machine')
-rw-r--r--src/emu/machine/e0516.c8
-rw-r--r--src/emu/machine/e0516.h8
-rw-r--r--src/emu/machine/nmc9306.c42
-rw-r--r--src/emu/machine/nmc9306.h10
-rw-r--r--src/emu/machine/upd1990a.c26
-rw-r--r--src/emu/machine/z8536.c48
-rw-r--r--src/emu/machine/z8536.h16
7 files changed, 79 insertions, 79 deletions
diff --git a/src/emu/machine/e0516.c b/src/emu/machine/e0516.c
index 05b7df778cd..463814ffb91 100644
--- a/src/emu/machine/e0516.c
+++ b/src/emu/machine/e0516.c
@@ -89,7 +89,7 @@ void e0516_device::device_start()
// allocate timers
m_timer = timer_alloc();
m_timer->adjust(attotime::from_hz(clock() / 32768), 0, attotime::from_hz(clock() / 32768));
-
+
// state saving
save_item(NAME(m_cs));
save_item(NAME(m_clk));
@@ -165,7 +165,7 @@ void e0516_device::device_timer(emu_timer &timer, device_timer_id id, int param,
WRITE_LINE_MEMBER( e0516_device::cs_w )
{
m_cs = state;
-
+
if (m_cs)
{
m_data_latch = 0;
@@ -183,7 +183,7 @@ WRITE_LINE_MEMBER( e0516_device::cs_w )
WRITE_LINE_MEMBER( e0516_device::clk_w )
{
m_clk = state;
-
+
if (m_cs || m_clk) return;
m_bits++;
@@ -215,7 +215,7 @@ WRITE_LINE_MEMBER( e0516_device::clk_w )
{
// read
if (LOG) logerror("E05-16 '%s' Data Bit OUT %u\n", tag(), m_dio);
-
+
m_dio = BIT(m_data_latch, 0);
m_data_latch >>= 1;
}
diff --git a/src/emu/machine/e0516.h b/src/emu/machine/e0516.h
index 83c25db1582..223b317ebb7 100644
--- a/src/emu/machine/e0516.h
+++ b/src/emu/machine/e0516.h
@@ -76,10 +76,10 @@ class e0516_device : public device_t
e0516_device(running_machine &_machine, const e0516_device_config &_config);
public:
- DECLARE_WRITE_LINE_MEMBER( cs_w );
- DECLARE_WRITE_LINE_MEMBER( clk_w );
- DECLARE_WRITE_LINE_MEMBER( dio_w );
- DECLARE_READ_LINE_MEMBER( dio_r );
+ DECLARE_WRITE_LINE_MEMBER( cs_w );
+ DECLARE_WRITE_LINE_MEMBER( clk_w );
+ DECLARE_WRITE_LINE_MEMBER( dio_w );
+ DECLARE_READ_LINE_MEMBER( dio_r );
protected:
// device-level overrides
diff --git a/src/emu/machine/nmc9306.c b/src/emu/machine/nmc9306.c
index 71ded4d32ad..7fef8bd7eaa 100644
--- a/src/emu/machine/nmc9306.c
+++ b/src/emu/machine/nmc9306.c
@@ -226,14 +226,14 @@ WRITE_LINE_MEMBER( nmc9306_device::cs_w )
WRITE_LINE_MEMBER( nmc9306_device::sk_w )
{
m_sk = state;
-
+
if (!m_cs || !m_sk) return;
-
+
switch (m_state)
{
case STATE_IDLE:
if (LOG) logerror("NMC9306 '%s' Idle %u\n", tag(), m_di);
-
+
if (m_di)
{
// start bit received
@@ -241,28 +241,28 @@ WRITE_LINE_MEMBER( nmc9306_device::sk_w )
m_bits = 0;
}
break;
-
+
case STATE_COMMAND:
if (LOG) logerror("NMC9306 '%s' Command Bit %u\n", tag(), m_di);
-
+
m_command <<= 1;
m_command |= m_di;
m_bits++;
-
+
if (m_bits == 4)
{
m_state = STATE_ADDRESS;
m_bits = 0;
}
break;
-
+
case STATE_ADDRESS:
if (LOG) logerror("NMC9306 '%s' Address Bit %u\n", tag(), m_di);
-
+
m_address <<= 1;
m_address |= m_di;
m_bits++;
-
+
if (m_bits == 4)
{
switch ((m_command >> 2) & 0x03)
@@ -275,11 +275,11 @@ WRITE_LINE_MEMBER( nmc9306_device::sk_w )
m_ewen = false;
m_state = STATE_IDLE;
break;
-
+
case WRAL:
if (LOG) logerror("NMC9306 '%s' WRAL\n", tag());
break;
-
+
case ERAL:
if (LOG) logerror("NMC9306 '%s' ERAL\n", tag());
break;
@@ -296,46 +296,46 @@ WRITE_LINE_MEMBER( nmc9306_device::sk_w )
if (LOG) logerror("NMC9306 '%s' WRITE %u\n", tag(), m_address & 0x0f);
m_state = STATE_DATA_IN;
break;
-
+
case READ:
if (LOG) logerror("NMC9306 '%s' READ %u\n", tag(), m_address & 0x0f);
m_data = read(m_address & 0x0f);
m_state = STATE_DATA_OUT;
break;
-
+
case ERASE:
if (LOG) logerror("NMC9306 '%s' ERASE %u\n", tag(), m_address & 0x0f);
erase(m_address & 0x0f);
m_state = STATE_ERASE;
break;
}
-
+
m_bits = 0;
}
break;
-
+
case STATE_DATA_IN:
if (LOG) logerror("NMC9306 '%s' Data Bit IN %u\n", tag(), m_di);
-
+
m_data <<= 1;
m_data |= m_di;
m_bits++;
-
+
if (m_bits == 16)
{
write(m_address & 0x0f, m_data);
-
+
m_state = STATE_IDLE;
}
break;
-
+
case STATE_DATA_OUT:
if (LOG) logerror("NMC9306 '%s' Data Bit OUT %u\n", tag(), m_di);
-
+
m_do = BIT(m_data, 15);
m_data <<= 1;
m_bits++;
-
+
if (m_bits == 16)
{
m_state = STATE_IDLE;
diff --git a/src/emu/machine/nmc9306.h b/src/emu/machine/nmc9306.h
index aa9dfb20593..366738b9a5e 100644
--- a/src/emu/machine/nmc9306.h
+++ b/src/emu/machine/nmc9306.h
@@ -74,10 +74,10 @@ class nmc9306_device : public device_t,
nmc9306_device(running_machine &_machine, const nmc9306_device_config &_config);
public:
- DECLARE_WRITE_LINE_MEMBER( cs_w );
- DECLARE_WRITE_LINE_MEMBER( sk_w );
- DECLARE_WRITE_LINE_MEMBER( di_w );
- DECLARE_READ_LINE_MEMBER( do_r );
+ DECLARE_WRITE_LINE_MEMBER( cs_w );
+ DECLARE_WRITE_LINE_MEMBER( sk_w );
+ DECLARE_WRITE_LINE_MEMBER( di_w );
+ DECLARE_READ_LINE_MEMBER( do_r );
protected:
// device-level overrides
@@ -94,7 +94,7 @@ private:
inline void erase(offs_t offset);
UINT16 m_register[16];
-
+
int m_bits;
int m_state;
UINT8 m_command;
diff --git a/src/emu/machine/upd1990a.c b/src/emu/machine/upd1990a.c
index 36c82d8fbf1..b89d7820569 100644
--- a/src/emu/machine/upd1990a.c
+++ b/src/emu/machine/upd1990a.c
@@ -86,7 +86,7 @@ void upd1990a_device_config::device_config_complete()
//**************************************************************************
//-------------------------------------------------
-// convert_to_bcd -
+// convert_to_bcd -
//-------------------------------------------------
inline UINT8 upd1990a_device::convert_to_bcd(int val)
@@ -96,7 +96,7 @@ inline UINT8 upd1990a_device::convert_to_bcd(int val)
//-------------------------------------------------
-// bcd_to_integer -
+// bcd_to_integer -
//-------------------------------------------------
inline int upd1990a_device::bcd_to_integer(UINT8 val)
@@ -106,7 +106,7 @@ inline int upd1990a_device::bcd_to_integer(UINT8 val)
//-------------------------------------------------
-// advance_seconds -
+// advance_seconds -
//-------------------------------------------------
inline void upd1990a_device::advance_seconds()
@@ -263,7 +263,7 @@ void upd1990a_device::device_timer(emu_timer &timer, device_timer_id id, int par
//-------------------------------------------------
-// oe_w -
+// oe_w -
//-------------------------------------------------
WRITE_LINE_MEMBER( upd1990a_device::oe_w )
@@ -275,7 +275,7 @@ WRITE_LINE_MEMBER( upd1990a_device::oe_w )
//-------------------------------------------------
-// cs_w -
+// cs_w -
//-------------------------------------------------
WRITE_LINE_MEMBER( upd1990a_device::cs_w )
@@ -287,7 +287,7 @@ WRITE_LINE_MEMBER( upd1990a_device::cs_w )
//-------------------------------------------------
-// stb_w -
+// stb_w -
//-------------------------------------------------
WRITE_LINE_MEMBER( upd1990a_device::stb_w )
@@ -425,7 +425,7 @@ WRITE_LINE_MEMBER( upd1990a_device::stb_w )
//-------------------------------------------------
-// clk_w -
+// clk_w -
//-------------------------------------------------
WRITE_LINE_MEMBER( upd1990a_device::clk_w )
@@ -467,7 +467,7 @@ WRITE_LINE_MEMBER( upd1990a_device::clk_w )
//-------------------------------------------------
-// c0_w -
+// c0_w -
//-------------------------------------------------
WRITE_LINE_MEMBER( upd1990a_device::c0_w )
@@ -479,7 +479,7 @@ WRITE_LINE_MEMBER( upd1990a_device::c0_w )
//-------------------------------------------------
-// c1_w -
+// c1_w -
//-------------------------------------------------
WRITE_LINE_MEMBER( upd1990a_device::c1_w )
@@ -491,7 +491,7 @@ WRITE_LINE_MEMBER( upd1990a_device::c1_w )
//-------------------------------------------------
-// c2_w -
+// c2_w -
//-------------------------------------------------
WRITE_LINE_MEMBER( upd1990a_device::c2_w )
@@ -503,7 +503,7 @@ WRITE_LINE_MEMBER( upd1990a_device::c2_w )
//-------------------------------------------------
-// data_in_w -
+// data_in_w -
//-------------------------------------------------
WRITE_LINE_MEMBER( upd1990a_device::data_in_w )
@@ -515,7 +515,7 @@ WRITE_LINE_MEMBER( upd1990a_device::data_in_w )
//-------------------------------------------------
-// data_out_r -
+// data_out_r -
//-------------------------------------------------
READ_LINE_MEMBER( upd1990a_device::data_out_r )
@@ -525,7 +525,7 @@ READ_LINE_MEMBER( upd1990a_device::data_out_r )
//-------------------------------------------------
-// tp_r -
+// tp_r -
//-------------------------------------------------
READ_LINE_MEMBER( upd1990a_device::tp_r )
diff --git a/src/emu/machine/z8536.c b/src/emu/machine/z8536.c
index e9d2d277b83..322d764ada2 100644
--- a/src/emu/machine/z8536.c
+++ b/src/emu/machine/z8536.c
@@ -166,13 +166,13 @@ enum
// master interrupt control register
#define MICR_RESET 0x01 // reset
-#define MICR_RJA 0x02 // right justified address
+#define MICR_RJA 0x02 // right justified address
#define MICR_CT_VIS 0x04 // counter/timer vector includes status
#define MICR_PB_VIS 0x08 // port B vector includes status
#define MICR_PA_VIS 0x10 // port A vector includes status
#define MICR_NV 0x20 // no vector
-#define MICR_DLC 0x40 // disable lower chain
-#define MICR_MIE 0x80 // master interrupt enable
+#define MICR_DLC 0x40 // disable lower chain
+#define MICR_MIE 0x80 // master interrupt enable
// master configuration control register
@@ -287,7 +287,7 @@ void z8536_device_config::device_config_complete()
inline UINT8 z8536_device::read_register(offs_t offset)
{
UINT8 data = 0;
-
+
data = m_register[offset]; // HACK
switch (offset)
@@ -295,19 +295,19 @@ inline UINT8 z8536_device::read_register(offs_t offset)
case PORT_A_DATA:
data = devcb_call_read8(&m_in_pa_func, 0);
break;
-
+
case PORT_B_DATA:
data = devcb_call_read8(&m_in_pb_func, 0);
break;
-
+
case PORT_C_DATA:
data = 0xf0 | (devcb_call_read8(&m_in_pc_func, 0) & 0x0f);
break;
-
+
default:
logerror("Z8536 '%s' Unimplemented read from register %u\n", tag(), offset);
}
-
+
return data;
}
@@ -340,29 +340,29 @@ inline void z8536_device::write_register(offs_t offset, UINT8 data)
m_state = STATE_0;
}
break;
-
+
case PORT_A_DATA:
devcb_call_write8(&m_out_pa_func, 0, data);
break;
-
+
case PORT_B_DATA:
devcb_call_write8(&m_out_pb_func, 0, data);
break;
-
+
case PORT_C_DATA:
{
UINT8 mask = (data & 0xf0) | (data >> 4);
m_output[PORT_C] = (m_output[PORT_C] & mask) | ((data & 0x0f) & (mask ^ 0xff));
-
+
devcb_call_write8(&m_out_pc_func, 0, m_output[PORT_C]);
}
break;
-
+
default:
logerror("Z8536 '%s' Unimplemented write %02x to register %u\n", tag(), data, offset);
}
-
+
m_register[offset] = data; // HACK
}
@@ -374,13 +374,13 @@ inline void z8536_device::write_register(offs_t offset, UINT8 data)
inline void z8536_device::write_register(offs_t offset, UINT8 data, UINT8 mask)
{
UINT8 combined_data = (data & mask) | (m_register[offset] & (mask ^ 0xff));
-
+
write_register(offset, combined_data);
}
//-------------------------------------------------
-// count -
+// count -
//-------------------------------------------------
inline void z8536_device::count(device_timer_id id)
@@ -389,7 +389,7 @@ inline void z8536_device::count(device_timer_id id)
//-------------------------------------------------
-// trigger -
+// trigger -
//-------------------------------------------------
inline void z8536_device::trigger(device_timer_id id)
@@ -398,7 +398,7 @@ inline void z8536_device::trigger(device_timer_id id)
//-------------------------------------------------
-// gate -
+// gate -
//-------------------------------------------------
inline void z8536_device::gate(device_timer_id id)
@@ -432,7 +432,7 @@ void z8536_device::device_start()
m_timer[TIMER_1] = timer_alloc(TIMER_1);
m_timer[TIMER_2] = timer_alloc(TIMER_2);
m_timer[TIMER_3] = timer_alloc(TIMER_3);
-
+
// resolve callbacks
devcb_resolve_write_line(&m_out_int_func, &m_config.m_out_int_func, this);
devcb_resolve_read8(&m_in_pa_func, &m_config.m_in_pa_func, this);
@@ -451,12 +451,12 @@ void z8536_device::device_start()
void z8536_device::device_reset()
{
m_state = STATE_RESET;
-
+
for (int i = 0; i < 48; i++)
{
m_register[i] = 0;
}
-
+
m_register[MASTER_INTERRUPT_CONTROL] = MICR_RESET;
m_pointer = 0;
}
@@ -473,11 +473,11 @@ void z8536_device::device_timer(emu_timer &timer, device_timer_id id, int param,
case TIMER_1:
count(TIMER_1);
break;
-
+
case TIMER_2:
count(TIMER_2);
break;
-
+
case TIMER_3:
count(TIMER_3);
break;
@@ -527,7 +527,7 @@ READ8_MEMBER( z8536_device::read )
break;
}
}
-
+
return data;
}
diff --git a/src/emu/machine/z8536.h b/src/emu/machine/z8536.h
index 75f82f12988..9a71eafa92f 100644
--- a/src/emu/machine/z8536.h
+++ b/src/emu/machine/z8536.h
@@ -68,13 +68,13 @@
struct z8536_interface
{
devcb_write_line m_out_int_func;
-
+
devcb_read8 m_in_pa_func;
devcb_write8 m_out_pa_func;
-
+
devcb_read8 m_in_pb_func;
devcb_write8 m_out_pb_func;
-
+
devcb_read8 m_in_pc_func;
devcb_write8 m_out_pc_func;
};
@@ -144,19 +144,19 @@ private:
inline UINT8 read_register(offs_t offset, UINT8 mask);
inline void write_register(offs_t offset, UINT8 data);
inline void write_register(offs_t offset, UINT8 data, UINT8 mask);
-
+
inline void count(device_timer_id id);
inline void trigger(device_timer_id id);
inline void gate(device_timer_id id);
-
+
devcb_resolved_write_line m_out_int_func;
-
+
devcb_resolved_read8 m_in_pa_func;
devcb_resolved_write8 m_out_pa_func;
-
+
devcb_resolved_read8 m_in_pb_func;
devcb_resolved_write8 m_out_pb_func;
-
+
devcb_resolved_read8 m_in_pc_func;
devcb_resolved_write8 m_out_pc_func;