summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/machine/mc68901.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/emu/machine/mc68901.c')
-rw-r--r--src/emu/machine/mc68901.c214
1 files changed, 107 insertions, 107 deletions
diff --git a/src/emu/machine/mc68901.c b/src/emu/machine/mc68901.c
index 89fc6230797..cf5c81f6b52 100644
--- a/src/emu/machine/mc68901.c
+++ b/src/emu/machine/mc68901.c
@@ -152,93 +152,93 @@ enum
};
-#define AER_GPIP_0 0x01
-#define AER_GPIP_1 0x02
-#define AER_GPIP_2 0x04
-#define AER_GPIP_3 0x08
-#define AER_GPIP_4 0x10
-#define AER_GPIP_5 0x20
-#define AER_GPIP_6 0x40
-#define AER_GPIP_7 0x80
-
-
-#define VR_S 0x08
-
-
-#define IR_GPIP_0 0x0001
-#define IR_GPIP_1 0x0002
-#define IR_GPIP_2 0x0004
-#define IR_GPIP_3 0x0008
-#define IR_TIMER_D 0x0010
-#define IR_TIMER_C 0x0020
-#define IR_GPIP_4 0x0040
-#define IR_GPIP_5 0x0080
-#define IR_TIMER_B 0x0100
-#define IR_XMIT_ERROR 0x0200
-#define IR_XMIT_BUFFER_EMPTY 0x0400
-#define IR_RCV_ERROR 0x0800
-#define IR_RCV_BUFFER_FULL 0x1000
-#define IR_TIMER_A 0x2000
-#define IR_GPIP_6 0x4000
-#define IR_GPIP_7 0x8000
-
-
-#define TCR_TIMER_STOPPED 0x00
-#define TCR_TIMER_DELAY_4 0x01
-#define TCR_TIMER_DELAY_10 0x02
-#define TCR_TIMER_DELAY_16 0x03
-#define TCR_TIMER_DELAY_50 0x04
-#define TCR_TIMER_DELAY_64 0x05
-#define TCR_TIMER_DELAY_100 0x06
-#define TCR_TIMER_DELAY_200 0x07
-#define TCR_TIMER_EVENT 0x08
-#define TCR_TIMER_PULSE_4 0x09
-#define TCR_TIMER_PULSE_10 0x0a
-#define TCR_TIMER_PULSE_16 0x0b
-#define TCR_TIMER_PULSE_50 0x0c
-#define TCR_TIMER_PULSE_64 0x0d
-#define TCR_TIMER_PULSE_100 0x0e
-#define TCR_TIMER_PULSE_200 0x0f
-#define TCR_TIMER_RESET 0x10
-
-
-#define UCR_PARITY_ENABLED 0x04
-#define UCR_PARITY_EVEN 0x02
-#define UCR_PARITY_ODD 0x00
-#define UCR_WORD_LENGTH_8 0x00
-#define UCR_WORD_LENGTH_7 0x20
-#define UCR_WORD_LENGTH_6 0x40
-#define UCR_WORD_LENGTH_5 0x60
-#define UCR_START_STOP_0_0 0x00
-#define UCR_START_STOP_1_1 0x08
-#define UCR_START_STOP_1_15 0x10
-#define UCR_START_STOP_1_2 0x18
-#define UCR_CLOCK_DIVIDE_16 0x80
-#define UCR_CLOCK_DIVIDE_1 0x00
-
-
-#define RSR_RCV_ENABLE 0x01
-#define RSR_SYNC_STRIP_ENABLE 0x02
-#define RSR_MATCH 0x04
-#define RSR_CHAR_IN_PROGRESS 0x04
-#define RSR_FOUND_SEARCH 0x08
-#define RSR_BREAK 0x08
-#define RSR_FRAME_ERROR 0x10
-#define RSR_PARITY_ERROR 0x20
-#define RSR_OVERRUN_ERROR 0x40
-#define RSR_BUFFER_FULL 0x80
-
-#define TSR_XMIT_ENABLE 0x01
-#define TSR_OUTPUT_HI_Z 0x00
-#define TSR_OUTPUT_LOW 0x02
-#define TSR_OUTPUT_HIGH 0x04
-#define TSR_OUTPUT_LOOP 0x06
-#define TSR_OUTPUT_MASK 0x06
-#define TSR_BREAK 0x08
-#define TSR_END_OF_XMIT 0x10
-#define TSR_AUTO_TURNAROUND 0x20
-#define TSR_UNDERRUN_ERROR 0x40
-#define TSR_BUFFER_EMPTY 0x80
+#define AER_GPIP_0 0x01
+#define AER_GPIP_1 0x02
+#define AER_GPIP_2 0x04
+#define AER_GPIP_3 0x08
+#define AER_GPIP_4 0x10
+#define AER_GPIP_5 0x20
+#define AER_GPIP_6 0x40
+#define AER_GPIP_7 0x80
+
+
+#define VR_S 0x08
+
+
+#define IR_GPIP_0 0x0001
+#define IR_GPIP_1 0x0002
+#define IR_GPIP_2 0x0004
+#define IR_GPIP_3 0x0008
+#define IR_TIMER_D 0x0010
+#define IR_TIMER_C 0x0020
+#define IR_GPIP_4 0x0040
+#define IR_GPIP_5 0x0080
+#define IR_TIMER_B 0x0100
+#define IR_XMIT_ERROR 0x0200
+#define IR_XMIT_BUFFER_EMPTY 0x0400
+#define IR_RCV_ERROR 0x0800
+#define IR_RCV_BUFFER_FULL 0x1000
+#define IR_TIMER_A 0x2000
+#define IR_GPIP_6 0x4000
+#define IR_GPIP_7 0x8000
+
+
+#define TCR_TIMER_STOPPED 0x00
+#define TCR_TIMER_DELAY_4 0x01
+#define TCR_TIMER_DELAY_10 0x02
+#define TCR_TIMER_DELAY_16 0x03
+#define TCR_TIMER_DELAY_50 0x04
+#define TCR_TIMER_DELAY_64 0x05
+#define TCR_TIMER_DELAY_100 0x06
+#define TCR_TIMER_DELAY_200 0x07
+#define TCR_TIMER_EVENT 0x08
+#define TCR_TIMER_PULSE_4 0x09
+#define TCR_TIMER_PULSE_10 0x0a
+#define TCR_TIMER_PULSE_16 0x0b
+#define TCR_TIMER_PULSE_50 0x0c
+#define TCR_TIMER_PULSE_64 0x0d
+#define TCR_TIMER_PULSE_100 0x0e
+#define TCR_TIMER_PULSE_200 0x0f
+#define TCR_TIMER_RESET 0x10
+
+
+#define UCR_PARITY_ENABLED 0x04
+#define UCR_PARITY_EVEN 0x02
+#define UCR_PARITY_ODD 0x00
+#define UCR_WORD_LENGTH_8 0x00
+#define UCR_WORD_LENGTH_7 0x20
+#define UCR_WORD_LENGTH_6 0x40
+#define UCR_WORD_LENGTH_5 0x60
+#define UCR_START_STOP_0_0 0x00
+#define UCR_START_STOP_1_1 0x08
+#define UCR_START_STOP_1_15 0x10
+#define UCR_START_STOP_1_2 0x18
+#define UCR_CLOCK_DIVIDE_16 0x80
+#define UCR_CLOCK_DIVIDE_1 0x00
+
+
+#define RSR_RCV_ENABLE 0x01
+#define RSR_SYNC_STRIP_ENABLE 0x02
+#define RSR_MATCH 0x04
+#define RSR_CHAR_IN_PROGRESS 0x04
+#define RSR_FOUND_SEARCH 0x08
+#define RSR_BREAK 0x08
+#define RSR_FRAME_ERROR 0x10
+#define RSR_PARITY_ERROR 0x20
+#define RSR_OVERRUN_ERROR 0x40
+#define RSR_BUFFER_FULL 0x80
+
+#define TSR_XMIT_ENABLE 0x01
+#define TSR_OUTPUT_HI_Z 0x00
+#define TSR_OUTPUT_LOW 0x02
+#define TSR_OUTPUT_HIGH 0x04
+#define TSR_OUTPUT_LOOP 0x06
+#define TSR_OUTPUT_MASK 0x06
+#define TSR_BREAK 0x08
+#define TSR_END_OF_XMIT 0x10
+#define TSR_AUTO_TURNAROUND 0x20
+#define TSR_UNDERRUN_ERROR 0x40
+#define TSR_BUFFER_EMPTY 0x80
static const int INT_MASK_GPIO[] =
@@ -631,10 +631,10 @@ inline void mc68901_device::serial_transmit()
{
switch (m_xmit_state)
{
- case XMIT_OFF: tx_disabled(); break;
- case XMIT_STARTING: tx_starting(); break;
- case XMIT_BREAK: tx_break(); break;
- case XMIT_ON: tx_enabled(); break;
+ case XMIT_OFF: tx_disabled(); break;
+ case XMIT_STARTING: tx_starting(); break;
+ case XMIT_BREAK: tx_break(); break;
+ case XMIT_ON: tx_enabled(); break;
}
}
@@ -648,10 +648,10 @@ inline void mc68901_device::timer_count(int index)
switch (index)
{
- case TIMER_A: m_out_tao_func(m_to[index]); break;
- case TIMER_B: m_out_tbo_func(m_to[index]); break;
- case TIMER_C: m_out_tco_func(m_to[index]); break;
- case TIMER_D: m_out_tdo_func(m_to[index]); break;
+ case TIMER_A: m_out_tao_func(m_to[index]); break;
+ case TIMER_B: m_out_tbo_func(m_to[index]); break;
+ case TIMER_C: m_out_tco_func(m_to[index]); break;
+ case TIMER_D: m_out_tdo_func(m_to[index]); break;
}
if (m_ier & INT_MASK_TIMER[index])
@@ -740,9 +740,9 @@ inline void mc68901_device::gpio_input(int bit, int state)
//-------------------------------------------------
mc68901_device::mc68901_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
- : device_t(mconfig, MC68901, "Motorola MC68901", tag, owner, clock),
- m_gpip(0),
- m_tsr(TSR_BUFFER_EMPTY)
+ : device_t(mconfig, MC68901, "Motorola MC68901", tag, owner, clock),
+ m_gpip(0),
+ m_tsr(TSR_BUFFER_EMPTY)
{
}
@@ -957,7 +957,7 @@ READ8_MEMBER( mc68901_device::read )
return m_udr;
- default: return 0;
+ default: return 0;
}
}
@@ -1439,14 +1439,14 @@ int mc68901_device::get_vector()
return M68K_INT_ACK_SPURIOUS;
}
-WRITE_LINE_MEMBER( mc68901_device::i0_w ) { gpio_input(0, state); }
-WRITE_LINE_MEMBER( mc68901_device::i1_w ) { gpio_input(1, state); }
-WRITE_LINE_MEMBER( mc68901_device::i2_w ) { gpio_input(2, state); }
-WRITE_LINE_MEMBER( mc68901_device::i3_w ) { gpio_input(3, state); }
-WRITE_LINE_MEMBER( mc68901_device::i4_w ) { gpio_input(4, state); }
-WRITE_LINE_MEMBER( mc68901_device::i5_w ) { gpio_input(5, state); }
-WRITE_LINE_MEMBER( mc68901_device::i6_w ) { gpio_input(6, state); }
-WRITE_LINE_MEMBER( mc68901_device::i7_w ) { gpio_input(7, state); }
+WRITE_LINE_MEMBER( mc68901_device::i0_w ) { gpio_input(0, state); }
+WRITE_LINE_MEMBER( mc68901_device::i1_w ) { gpio_input(1, state); }
+WRITE_LINE_MEMBER( mc68901_device::i2_w ) { gpio_input(2, state); }
+WRITE_LINE_MEMBER( mc68901_device::i3_w ) { gpio_input(3, state); }
+WRITE_LINE_MEMBER( mc68901_device::i4_w ) { gpio_input(4, state); }
+WRITE_LINE_MEMBER( mc68901_device::i5_w ) { gpio_input(5, state); }
+WRITE_LINE_MEMBER( mc68901_device::i6_w ) { gpio_input(6, state); }
+WRITE_LINE_MEMBER( mc68901_device::i7_w ) { gpio_input(7, state); }
WRITE_LINE_MEMBER( mc68901_device::tai_w )