summaryrefslogtreecommitdiffstatshomepage
path: root/src/mess/machine
diff options
context:
space:
mode:
author Miodrag Milanovic <mmicko@gmail.com>2013-07-23 07:18:56 +0000
committer Miodrag Milanovic <mmicko@gmail.com>2013-07-23 07:18:56 +0000
commit14629cbcb42fb824f71120ca93fcb7d53a360390 (patch)
tree4d8b9459d6e98a677927c934c5322c328819de3a /src/mess/machine
parentd3f32a1ba70fe3edf112059b6319fbfe218fe8d6 (diff)
Cleanups and version bumpmame0149u1
Diffstat (limited to 'src/mess/machine')
-rw-r--r--src/mess/machine/apollo.c4
-rw-r--r--src/mess/machine/bml3mp1805.c2
-rw-r--r--src/mess/machine/corvushd.c2
-rw-r--r--src/mess/machine/cs4031.c50
-rw-r--r--src/mess/machine/dccons.c6
-rw-r--r--src/mess/machine/esqpanel.c40
-rw-r--r--src/mess/machine/esqpanel.h2
-rw-r--r--src/mess/machine/gb.c2
-rw-r--r--src/mess/machine/gb_slot.c2
-rw-r--r--src/mess/machine/gb_slot.h2
-rw-r--r--src/mess/machine/imi5000h.c150
-rw-r--r--src/mess/machine/kb_pc83.c288
-rw-r--r--src/mess/machine/kb_pc83.h2
-rw-r--r--src/mess/machine/kb_pcat84.c176
-rw-r--r--src/mess/machine/kb_pcat84.h2
-rw-r--r--src/mess/machine/kb_pcxt83.c82
-rw-r--r--src/mess/machine/kb_pcxt83.h2
-rw-r--r--src/mess/machine/macpds.c2
-rw-r--r--src/mess/machine/nes.c172
-rw-r--r--src/mess/machine/pc_keyboards.h8
-rw-r--r--src/mess/machine/shark.c2
-rw-r--r--src/mess/machine/shark.h2
-rw-r--r--src/mess/machine/sms.c2
-rw-r--r--src/mess/machine/sms_lphaser.c2
-rw-r--r--src/mess/machine/sms_paddle.c1
-rw-r--r--src/mess/machine/sms_rfu.c1
-rw-r--r--src/mess/machine/sms_sports.c1
-rw-r--r--src/mess/machine/smsctrl.c22
-rw-r--r--src/mess/machine/sns_sa1.c76
-rw-r--r--src/mess/machine/softbox.c8
-rw-r--r--src/mess/machine/softbox.h4
31 files changed, 555 insertions, 562 deletions
diff --git a/src/mess/machine/apollo.c b/src/mess/machine/apollo.c
index cef23e2a2a2..c38a1f7c882 100644
--- a/src/mess/machine/apollo.c
+++ b/src/mess/machine/apollo.c
@@ -511,7 +511,7 @@ WRITE8_MEMBER(apollo_state::apollo_dma_write_word){
READ8_MEMBER(apollo_state::apollo_dma8237_ctape_dack_r ) {
UINT8 data = sc499_dack_r(&space.machine());
- CLOG2(("dma ctape dack read %02x",data));
+ CLOG2(("dma ctape dack read %02x",data));
// hack for DN3000: select appropriate DMA channel No.
dn3000_dma_channel1 = 1; // 1 = ctape, 2 = floppy dma channel
@@ -520,7 +520,7 @@ READ8_MEMBER(apollo_state::apollo_dma8237_ctape_dack_r ) {
}
WRITE8_MEMBER(apollo_state::apollo_dma8237_ctape_dack_w ) {
- CLOG2(("dma ctape dack write %02x", data));
+ CLOG2(("dma ctape dack write %02x", data));
sc499_dack_w(&space.machine(), data);
// hack for DN3000: select appropriate DMA channel No.
diff --git a/src/mess/machine/bml3mp1805.c b/src/mess/machine/bml3mp1805.c
index 0106d95acfb..b7aa02cb184 100644
--- a/src/mess/machine/bml3mp1805.c
+++ b/src/mess/machine/bml3mp1805.c
@@ -86,7 +86,7 @@ const rom_entry *bml3bus_mp1805_device::device_rom_region() const
READ8_MEMBER( bml3bus_mp1805_device::bml3_mp1805_r)
{
// TODO: read supported or not?
- // return mc6843_drq_r(m_mc6843) ? 0x00 : 0x80;
+ // return mc6843_drq_r(m_mc6843) ? 0x00 : 0x80;
return -1;
}
diff --git a/src/mess/machine/corvushd.c b/src/mess/machine/corvushd.c
index db90ac6d21a..1d196cade20 100644
--- a/src/mess/machine/corvushd.c
+++ b/src/mess/machine/corvushd.c
@@ -1562,7 +1562,7 @@ UINT8 corvus_hdc_init( device_t *device )
c->root_device = device;
- return corvus_hdc_init(device->machine());
+ return corvus_hdc_init(device->machine());
}
diff --git a/src/mess/machine/cs4031.c b/src/mess/machine/cs4031.c
index 60056017267..974697e2ce0 100644
--- a/src/mess/machine/cs4031.c
+++ b/src/mess/machine/cs4031.c
@@ -16,13 +16,13 @@
- 8254 timer
- MC14818 RTC
- TODO:
- - The chipset has the ability to intercept the GATEA20 and
- RESET commands sent to the 8042 keyboard controller,
- this is not emulated yet
- - No emulation of memory parity checks
- - Move IPC core to its own file so it can be shared with
- other chipsets
+ TODO:
+ - The chipset has the ability to intercept the GATEA20 and
+ RESET commands sent to the 8042 keyboard controller,
+ this is not emulated yet
+ - No emulation of memory parity checks
+ - Move IPC core to its own file so it can be shared with
+ other chipsets
***************************************************************************/
@@ -459,9 +459,9 @@ void cs4031_device::update_dma_clock()
//**************************************************************************
/*
- Check NMI sources and generate NMI if needed
+ Check NMI sources and generate NMI if needed
- Not emulated here: Parity check NMI
+ Not emulated here: Parity check NMI
*/
void cs4031_device::nmi()
{
@@ -774,10 +774,10 @@ WRITE_LINE_MEMBER( cs4031_device::kbrst_w )
}
/*
- Fast CPU reset and Gate A20
+ Fast CPU reset and Gate A20
- 0 - Fast CPU reset
- 1 - Fast Gate A20
+ 0 - Fast CPU reset
+ 1 - Fast Gate A20
*/
WRITE8_MEMBER( cs4031_device::sysctrl_w )
@@ -804,16 +804,16 @@ WRITE8_MEMBER( cs4031_device::sysctrl_w )
//**************************************************************************
/*
- "Port B" - AT-compatible port with miscellaneous information
-
- 0 - Timer 2 gate (rw)
- 1 - Speaker data (rw)
- 2 - Enable parity check (rw) [not emulated]
- 3 - Enable IOCHECK (rw)
- 4 - Refresh detect (r)
- 5 - Timer 2 output (r)
- 6 - Channel check latch (r)
- 7 - Parity check latch (r) [not emulated]
+ "Port B" - AT-compatible port with miscellaneous information
+
+ 0 - Timer 2 gate (rw)
+ 1 - Speaker data (rw)
+ 2 - Enable parity check (rw) [not emulated]
+ 3 - Enable IOCHECK (rw)
+ 4 - Refresh detect (r)
+ 5 - Timer 2 output (r)
+ 6 - Channel check latch (r)
+ 7 - Parity check latch (r) [not emulated]
*/
READ8_MEMBER( cs4031_device::portb_r )
@@ -845,10 +845,10 @@ WRITE8_MEMBER( cs4031_device::portb_w )
}
/*
- NMI mask and RTC address
+ NMI mask and RTC address
- 7 - NMI mask
- 6:0 - RTC address
+ 7 - NMI mask
+ 6:0 - RTC address
*/
WRITE8_MEMBER( cs4031_device::rtc_w )
{
diff --git a/src/mess/machine/dccons.c b/src/mess/machine/dccons.c
index 78700808c29..7ebc9993fce 100644
--- a/src/mess/machine/dccons.c
+++ b/src/mess/machine/dccons.c
@@ -11,8 +11,8 @@
cfffee0 - stack location when bad happens
- TODO:
- - gdrom_alt_status is identical to normal status except that "but it does not clear DMA status information when it is accessed"
+ TODO:
+ - gdrom_alt_status is identical to normal status except that "but it does not clear DMA status information when it is accessed"
*/
@@ -682,7 +682,7 @@ READ32_MEMBER(dc_cons_state::dc_mess_g1_ctrl_r )
WRITE32_MEMBER(dc_cons_state::dc_mess_g1_ctrl_w )
{
g1bus_regs[offset] = data; // 5f7400+reg*4=dat
-// mame_printf_verbose("G1CTRL: [%08x=%x] write %" I64FMT "x to %x, mask %" I64FMT "x\n", 0x5f7400+reg*4, dat, data, offset, mem_mask);
+// mame_printf_verbose("G1CTRL: [%08x=%x] write %" I64FMT "x to %x, mask %" I64FMT "x\n", 0x5f7400+reg*4, dat, data, offset, mem_mask);
switch (offset)
{
case SB_GDST:
diff --git a/src/mess/machine/esqpanel.c b/src/mess/machine/esqpanel.c
index 1b5aed11684..44dcc3bfefd 100644
--- a/src/mess/machine/esqpanel.c
+++ b/src/mess/machine/esqpanel.c
@@ -93,33 +93,33 @@ void esqpanel_device::rcv_complete() // Rx completed receiving byte
}
m_bCalibSecondByte = false;
}
- else if (m_bButtonLightSecondByte)
+ else if (m_bButtonLightSecondByte)
{
// Lights on the Buttons, on the VFX-SD:
- // Number Button
- // 0 1-6
- // 1 8
- // 2 6
- // 3 4
- // 4 2
- // 5 Compare
- // 6 1
- // 7 Presets
- // 8 7-12
- // 9 9
- // a 7
- // b 5
- // c 3
- // d Sounds
- // e 0
- // f Cart
-// int lightNumber = data & 0x3f;
+ // Number Button
+ // 0 1-6
+ // 1 8
+ // 2 6
+ // 3 4
+ // 4 2
+ // 5 Compare
+ // 6 1
+ // 7 Presets
+ // 8 7-12
+ // 9 9
+ // a 7
+ // b 5
+ // c 3
+ // d Sounds
+ // e 0
+ // f Cart
+// int lightNumber = data & 0x3f;
// Light states:
// 0 = Off
// 2 = On
// 3 = Blinking
-// int lightState = (data & 0xc0) >> 6;
+// int lightState = (data & 0xc0) >> 6;
// TODO: do something with the button information!
// printf("Setting light %d to %s\n", lightNumber, lightState == 3 ? "Blink" : lightState == 2 ? "On" : "Off");
diff --git a/src/mess/machine/esqpanel.h b/src/mess/machine/esqpanel.h
index d98725f36d6..e4bc497b616 100644
--- a/src/mess/machine/esqpanel.h
+++ b/src/mess/machine/esqpanel.h
@@ -50,7 +50,7 @@
struct esqpanel_interface
{
devcb_write_line m_out_tx_cb;
- devcb_write16 m_analog_value_cb;
+ devcb_write16 m_analog_value_cb;
};
// ======================> esqpanel_device
diff --git a/src/mess/machine/gb.c b/src/mess/machine/gb.c
index f3259c4215c..27fa55eea56 100644
--- a/src/mess/machine/gb.c
+++ b/src/mess/machine/gb.c
@@ -455,7 +455,7 @@ WRITE8_MEMBER(gb_state::sgb_io_w)
break;
default:
machine().device<sgb_lcd_device>("lcd")->sgb_io_write_pal(sgb_data[0] >> 3, &sgb_data[0]);
- break;
+ break;
}
m_sgb_start = 0;
m_sgb_bytecount = 0;
diff --git a/src/mess/machine/gb_slot.c b/src/mess/machine/gb_slot.c
index 0558fbe7886..a87afcc899d 100644
--- a/src/mess/machine/gb_slot.c
+++ b/src/mess/machine/gb_slot.c
@@ -606,7 +606,7 @@ const char * megaduck_cart_slot_device::get_default_card_software(const machine_
{
if (open_image_file(options))
return "rom";
-
+
return software_get_default_slot(config, options, this, "rom");
}
diff --git a/src/mess/machine/gb_slot.h b/src/mess/machine/gb_slot.h
index 02c13b61e12..8c9049f68d5 100644
--- a/src/mess/machine/gb_slot.h
+++ b/src/mess/machine/gb_slot.h
@@ -178,7 +178,7 @@ public:
virtual bool call_load();
virtual const char *image_interface() const { return "megaduck_cart"; }
virtual const char *file_extensions() const { return "bin"; }
-
+
// slot interface overrides
virtual const char * get_default_card_software(const machine_config &config, emu_options &options);
};
diff --git a/src/mess/machine/imi5000h.c b/src/mess/machine/imi5000h.c
index 2501d7ed774..d8e9fc35dde 100644
--- a/src/mess/machine/imi5000h.c
+++ b/src/mess/machine/imi5000h.c
@@ -17,11 +17,11 @@
// MACROS / CONSTANTS
//**************************************************************************
-#define Z80_TAG "u70"
-#define Z80CTC_TAG "u45"
-#define Z80PIO_0_TAG "u25"
-#define Z80PIO_2_TAG "u64"
-#define Z80PIO_3_TAG "u73"
+#define Z80_TAG "u70"
+#define Z80CTC_TAG "u45"
+#define Z80PIO_0_TAG "u25"
+#define Z80PIO_2_TAG "u64"
+#define Z80PIO_3_TAG "u73"
@@ -139,9 +139,9 @@ static Z80CTC_INTERFACE( ctc_intf )
READ8_MEMBER( imi5000h_device::pio0_pa_r )
{
/*
-
+
bit description
-
+
0 -SEEK COMPLETE
1 -SECTOR SIZE 2 (UB4:4)
2 -SECTOR SIZE 1 (UB4:1)
@@ -149,8 +149,8 @@ READ8_MEMBER( imi5000h_device::pio0_pa_r )
4 CRC ERROR
5 WRITE FAULT
6 -INDEX SEL
- 7
-
+ 7
+
*/
return 0;
@@ -159,36 +159,36 @@ READ8_MEMBER( imi5000h_device::pio0_pa_r )
WRITE8_MEMBER( imi5000h_device::pio0_pa_w )
{
/*
-
+
bit description
-
- 0
- 1
- 2
- 3
- 4
- 5
- 6
+
+ 0
+ 1
+ 2
+ 3
+ 4
+ 5
+ 6
7 ACTIVITY LED
-
+
*/
}
READ8_MEMBER( imi5000h_device::pio0_pb_r )
{
/*
-
+
bit description
-
+
0 -READY
- 1
- 2
- 3
- 4
- 5
- 6
- 7
-
+ 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+
*/
return 0;
@@ -197,10 +197,10 @@ READ8_MEMBER( imi5000h_device::pio0_pb_r )
WRITE8_MEMBER( imi5000h_device::pio0_pb_w )
{
/*
-
+
bit description
-
- 0
+
+ 0
1 DIRECTION IN
2 -HSXSTB
3 STEP
@@ -208,7 +208,7 @@ WRITE8_MEMBER( imi5000h_device::pio0_pb_w )
5 HEAD SEL 2^1
6 HEAD SEL 2^2
7 REDUCE WR CURRENT
-
+
*/
}
@@ -231,18 +231,18 @@ static Z80PIO_INTERFACE( pio0_intf )
READ8_MEMBER( imi5000h_device::pio2_pa_r )
{
/*
-
+
bit description
-
- 0
- 1
- 2
- 3
- 4
- 5
+
+ 0
+ 1
+ 2
+ 3
+ 4
+ 5
6 -SYNC
7 -DRV.ACK
-
+
*/
return 0;
@@ -251,18 +251,18 @@ READ8_MEMBER( imi5000h_device::pio2_pa_r )
WRITE8_MEMBER( imi5000h_device::pio2_pa_w )
{
/*
-
+
bit description
-
+
0 BUS DIR
1 -DRV.ACK
2 -ALT SEL
3 -HSXFER
4 PIO RDY
5 -COMPL
- 6
- 7
-
+ 6
+ 7
+
*/
}
@@ -296,18 +296,18 @@ static Z80PIO_INTERFACE( pio2_intf )
READ8_MEMBER( imi5000h_device::pio3_pa_r )
{
/*
-
+
bit description
-
+
0 -TIMEOUT DISABLE (UB4:8)
1 -UNIT SELECT 1 (UB4:7)
2 -UNIT SELECT 2 (UB4:6)
3 SYSTEM/-DIAG (UB4:5)
4 -RXD
- 5
+ 5
6 -TRACK 00
- 7
-
+ 7
+
*/
return 0;
@@ -316,36 +316,36 @@ READ8_MEMBER( imi5000h_device::pio3_pa_r )
WRITE8_MEMBER( imi5000h_device::pio3_pa_w )
{
/*
-
+
bit description
-
- 0
- 1
- 2
- 3
- 4
+
+ 0
+ 1
+ 2
+ 3
+ 4
5 TXD
- 6
+ 6
7 -WRITE DISABLE
-
+
*/
}
READ8_MEMBER( imi5000h_device::pio3_pb_r )
{
/*
-
+
bit description
-
- 0
- 1
+
+ 0
+ 1
2 6MB1
3 -WRITE PROTECT (W2)
4 -FORMAT ENABLE
5 6MB2
6 12MB1
7 12MB2
-
+
*/
return 0;
@@ -354,18 +354,18 @@ READ8_MEMBER( imi5000h_device::pio3_pb_r )
WRITE8_MEMBER( imi5000h_device::pio3_pb_w )
{
/*
-
+
bit description
-
+
0 -DRV 1 SEL
1 -DRV 2 SEL
- 2
- 3
- 4
- 5
- 6
- 7
-
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+
*/
}
diff --git a/src/mess/machine/kb_pc83.c b/src/mess/machine/kb_pc83.c
index 689123747c1..8fc6f7606d5 100644
--- a/src/mess/machine/kb_pc83.c
+++ b/src/mess/machine/kb_pc83.c
@@ -85,148 +85,148 @@ machine_config_constructor ibm_pc_83_keyboard_device::device_mconfig_additions()
INPUT_PORTS_START( ibm_pc_83_keyboard )
PORT_START("DR00")
- PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD )
- PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD )
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD )
- PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD )
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD )
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD )
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD )
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD )
PORT_START("DR01")
- PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD )
- PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD )
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD )
- PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD )
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD )
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD )
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD )
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD )
PORT_START("DR02")
- PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD )
- PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD )
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD )
- PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD )
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD )
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD )
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD )
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD )
PORT_START("DR03")
- PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD )
- PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD )
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD )
- PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD )
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD )
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD )
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD )
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD )
PORT_START("DR04")
- PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD )
- PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD )
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD )
- PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD )
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD )
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD )
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD )
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD )
PORT_START("DR05")
- PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD )
- PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD )
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD )
- PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD )
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD )
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD )
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD )
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD )
PORT_START("DR06")
- PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD )
- PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD )
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD )
- PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD )
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD )
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD )
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD )
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD )
PORT_START("DR07")
- PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD )
- PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD )
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD )
- PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD )
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD )
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD )
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD )
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD )
PORT_START("DR08")
- PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD )
- PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD )
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD )
- PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD )
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD )
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD )
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD )
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD )
PORT_START("DR09")
- PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD )
- PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD )
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD )
- PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD )
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD )
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD )
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD )
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD )
PORT_START("DR10")
- PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD )
- PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD )
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD )
- PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD )
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD )
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD )
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD )
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD )
PORT_START("DR11")
- PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD )
- PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD )
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD )
- PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD )
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD )
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD )
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD )
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD )
PORT_START("DR12")
- PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD )
- PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD )
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD )
- PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD )
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD )
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD )
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD )
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD )
PORT_START("DR13")
- PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD )
- PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD )
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD )
- PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD )
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD )
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD )
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD )
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD )
PORT_START("DR14")
- PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD )
- PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD )
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD )
- PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD )
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD )
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD )
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD )
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD )
PORT_START("DR15")
- PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD )
- PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD )
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD )
- PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD )
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD )
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD )
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD )
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD )
PORT_START("DR16")
- PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD )
- PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD )
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD )
- PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD )
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD )
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD )
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD )
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD )
PORT_START("DR17")
- PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD )
- PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD )
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD )
- PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD )
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD )
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD )
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD )
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD )
PORT_START("DR18")
- PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD )
- PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD )
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD )
- PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD )
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD )
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD )
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD )
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD )
PORT_START("DR19")
- PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD )
- PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD )
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD )
- PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD )
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD )
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD )
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD )
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD )
PORT_START("DR20")
- PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD )
- PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD )
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD )
- PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD )
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD )
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD )
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD )
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD )
PORT_START("DR21")
- PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD )
- PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD )
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD )
- PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD )
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD )
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD )
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD )
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD )
PORT_START("DR22")
- PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD )
- PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD )
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD )
- PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD )
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD )
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD )
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD )
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD )
PORT_START("DR23")
- PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD )
- PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD )
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD )
- PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD )
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD )
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD )
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD )
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD )
INPUT_PORTS_END
@@ -251,32 +251,32 @@ ioport_constructor ibm_pc_83_keyboard_device::device_input_ports() const
ibm_pc_83_keyboard_device::ibm_pc_83_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, PC_KBD_IBM_PC_83, "IBM PC Keyboard", tag, owner, clock, "kb_pc83", __FILE__),
- device_pc_kbd_interface(mconfig, *this),
- m_maincpu(*this, I8048_TAG),
- m_dr00(*this, "DR00"),
- m_dr01(*this, "DR01"),
- m_dr02(*this, "DR02"),
- m_dr03(*this, "DR03"),
- m_dr04(*this, "DR04"),
- m_dr05(*this, "DR05"),
- m_dr06(*this, "DR06"),
- m_dr07(*this, "DR07"),
- m_dr08(*this, "DR08"),
- m_dr09(*this, "DR09"),
- m_dr10(*this, "DR10"),
- m_dr11(*this, "DR11"),
- m_dr12(*this, "DR12"),
- m_dr13(*this, "DR13"),
- m_dr14(*this, "DR14"),
- m_dr15(*this, "DR15"),
- m_dr16(*this, "DR16"),
- m_dr17(*this, "DR17"),
- m_dr18(*this, "DR18"),
- m_dr19(*this, "DR19"),
- m_dr20(*this, "DR20"),
- m_dr21(*this, "DR21"),
- m_dr22(*this, "DR22"),
- m_dr23(*this, "DR23")
+ device_pc_kbd_interface(mconfig, *this),
+ m_maincpu(*this, I8048_TAG),
+ m_dr00(*this, "DR00"),
+ m_dr01(*this, "DR01"),
+ m_dr02(*this, "DR02"),
+ m_dr03(*this, "DR03"),
+ m_dr04(*this, "DR04"),
+ m_dr05(*this, "DR05"),
+ m_dr06(*this, "DR06"),
+ m_dr07(*this, "DR07"),
+ m_dr08(*this, "DR08"),
+ m_dr09(*this, "DR09"),
+ m_dr10(*this, "DR10"),
+ m_dr11(*this, "DR11"),
+ m_dr12(*this, "DR12"),
+ m_dr13(*this, "DR13"),
+ m_dr14(*this, "DR14"),
+ m_dr15(*this, "DR15"),
+ m_dr16(*this, "DR16"),
+ m_dr17(*this, "DR17"),
+ m_dr18(*this, "DR18"),
+ m_dr19(*this, "DR19"),
+ m_dr20(*this, "DR20"),
+ m_dr21(*this, "DR21"),
+ m_dr22(*this, "DR22"),
+ m_dr23(*this, "DR23")
{
}
@@ -309,9 +309,9 @@ void ibm_pc_83_keyboard_device::device_reset()
WRITE8_MEMBER( ibm_pc_83_keyboard_device::bus_w )
{
/*
-
+
bit description
-
+
0 CNT 1
1 CNT 2
2 CNT 4
@@ -319,8 +319,8 @@ WRITE8_MEMBER( ibm_pc_83_keyboard_device::bus_w )
4 CNT 16
5 CNT 32
6 CNT 64
- 7
-
+ 7
+
*/
m_cnt = data & 0x7f;
@@ -334,20 +334,20 @@ WRITE8_MEMBER( ibm_pc_83_keyboard_device::bus_w )
READ8_MEMBER( ibm_pc_83_keyboard_device::p1_r )
{
/*
-
+
bit description
-
+
0 -REQ IN
1 DATA IN
- 2
- 3
- 4
- 5
- 6
- 7
-
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+
*/
-
+
UINT8 data = 0;
data |= clock_signal();
@@ -364,18 +364,18 @@ READ8_MEMBER( ibm_pc_83_keyboard_device::p1_r )
WRITE8_MEMBER( ibm_pc_83_keyboard_device::p2_w )
{
/*
-
+
bit description
-
+
0 -MATRIX STROBE
1 CLOCK OUT
2 DATA OUT
- 3
- 4
- 5
- 6
- 7
-
+ 3
+ 4
+ 5
+ 6
+ 7
+
*/
m_pc_kbdc->clock_write_from_kb(BIT(data, 1));
diff --git a/src/mess/machine/kb_pc83.h b/src/mess/machine/kb_pc83.h
index 866ca04aade..5ac49d70f10 100644
--- a/src/mess/machine/kb_pc83.h
+++ b/src/mess/machine/kb_pc83.h
@@ -26,7 +26,7 @@
// ======================> ibm_pc_83_keyboard_device
class ibm_pc_83_keyboard_device : public device_t,
- public device_pc_kbd_interface
+ public device_pc_kbd_interface
{
public:
// construction/destruction
diff --git a/src/mess/machine/kb_pcat84.c b/src/mess/machine/kb_pcat84.c
index d62071c9949..9379c7f6ccc 100644
--- a/src/mess/machine/kb_pcat84.c
+++ b/src/mess/machine/kb_pcat84.c
@@ -9,19 +9,19 @@
/*
- TODO:
+ TODO:
- - cpu LC timing
- - 3270PC keys
+ - cpu LC timing
+ - 3270PC keys
*/
/*
- Part No Layout
- -------------------
- 6450225 UK 84-key
- 6110344 UK 122-key
+ Part No Layout
+ -------------------
+ 6450225 UK 84-key
+ 6110344 UK 122-key
*/
@@ -53,7 +53,7 @@ ROM_START( ibm_pc_at_84_keyboard )
ROM_REGION( 0x400, I8048_TAG, 0 )
/*
Keyboard Part No 6450225
-
+
PH 1503099
D 878154
8441 D H
@@ -80,7 +80,7 @@ ROM_START( ibm_3270pc_122_keyboard )
ROM_REGION( 0x400, I8048_TAG, 0 )
/*
Keyboard Part No 6110344
-
+
PH 1385001
D
8512 D H
@@ -160,7 +160,7 @@ INPUT_PORTS_START( ibm_pc_at_84_keyboard )
PORT_START("DR02")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_LALT) PORT_CHAR(UCHAR_MAMEKEY(LALT))
- PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_LSHIFT) PORT_CHAR(UCHAR_SHIFT_1)
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_LSHIFT) PORT_CHAR(UCHAR_SHIFT_1)
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_LCONTROL) PORT_CHAR(UCHAR_SHIFT_2)
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_Q) PORT_CHAR('q') PORT_CHAR('Q')
@@ -239,7 +239,7 @@ INPUT_PORTS_START( ibm_pc_at_84_keyboard )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_START("DR10")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL )
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_QUOTE) PORT_CHAR('\'') PORT_CHAR('"')
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_OPENBRACE) PORT_CHAR('[') PORT_CHAR('{')
@@ -356,59 +356,59 @@ ioport_constructor ibm_3270pc_122_keyboard_device::device_input_ports() const
ibm_pc_at_84_keyboard_device::ibm_pc_at_84_keyboard_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source)
: device_t(mconfig, type, name, tag, owner, clock, shortname, source),
- device_pc_kbd_interface(mconfig, *this),
- m_maincpu(*this, I8048_TAG),
- m_dr00(*this, "DR00"),
- m_dr01(*this, "DR01"),
- m_dr02(*this, "DR02"),
- m_dr03(*this, "DR03"),
- m_dr04(*this, "DR04"),
- m_dr05(*this, "DR05"),
- m_dr06(*this, "DR06"),
- m_dr07(*this, "DR07"),
- m_dr08(*this, "DR08"),
- m_dr09(*this, "DR09"),
- m_dr10(*this, "DR10"),
- m_dr11(*this, "DR11"),
- m_dr12(*this, "DR12"),
- m_dr13(*this, "DR13"),
- m_dr14(*this, "DR14"),
- m_dr15(*this, "DR15"),
- m_kbdida(*this, "KBDIDA"),
- m_kbdidb(*this, "KBDIDB"),
- m_db(0),
- m_cnt(0),
- m_sense(0),
- m_t1(1)
+ device_pc_kbd_interface(mconfig, *this),
+ m_maincpu(*this, I8048_TAG),
+ m_dr00(*this, "DR00"),
+ m_dr01(*this, "DR01"),
+ m_dr02(*this, "DR02"),
+ m_dr03(*this, "DR03"),
+ m_dr04(*this, "DR04"),
+ m_dr05(*this, "DR05"),
+ m_dr06(*this, "DR06"),
+ m_dr07(*this, "DR07"),
+ m_dr08(*this, "DR08"),
+ m_dr09(*this, "DR09"),
+ m_dr10(*this, "DR10"),
+ m_dr11(*this, "DR11"),
+ m_dr12(*this, "DR12"),
+ m_dr13(*this, "DR13"),
+ m_dr14(*this, "DR14"),
+ m_dr15(*this, "DR15"),
+ m_kbdida(*this, "KBDIDA"),
+ m_kbdidb(*this, "KBDIDB"),
+ m_db(0),
+ m_cnt(0),
+ m_sense(0),
+ m_t1(1)
{
}
ibm_pc_at_84_keyboard_device::ibm_pc_at_84_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, PC_KBD_IBM_PC_AT_84, "IBM PC/AT Keyboard", tag, owner, clock, "kb_pcat84", __FILE__),
- device_pc_kbd_interface(mconfig, *this),
- m_maincpu(*this, I8048_TAG),
- m_dr00(*this, "DR00"),
- m_dr01(*this, "DR01"),
- m_dr02(*this, "DR02"),
- m_dr03(*this, "DR03"),
- m_dr04(*this, "DR04"),
- m_dr05(*this, "DR05"),
- m_dr06(*this, "DR06"),
- m_dr07(*this, "DR07"),
- m_dr08(*this, "DR08"),
- m_dr09(*this, "DR09"),
- m_dr10(*this, "DR10"),
- m_dr11(*this, "DR11"),
- m_dr12(*this, "DR12"),
- m_dr13(*this, "DR13"),
- m_dr14(*this, "DR14"),
- m_dr15(*this, "DR15"),
- m_kbdida(*this, "KBDIDA"),
- m_kbdidb(*this, "KBDIDB"),
- m_db(0),
- m_cnt(0),
- m_sense(0),
- m_t1(1)
+ device_pc_kbd_interface(mconfig, *this),
+ m_maincpu(*this, I8048_TAG),
+ m_dr00(*this, "DR00"),
+ m_dr01(*this, "DR01"),
+ m_dr02(*this, "DR02"),
+ m_dr03(*this, "DR03"),
+ m_dr04(*this, "DR04"),
+ m_dr05(*this, "DR05"),
+ m_dr06(*this, "DR06"),
+ m_dr07(*this, "DR07"),
+ m_dr08(*this, "DR08"),
+ m_dr09(*this, "DR09"),
+ m_dr10(*this, "DR10"),
+ m_dr11(*this, "DR11"),
+ m_dr12(*this, "DR12"),
+ m_dr13(*this, "DR13"),
+ m_dr14(*this, "DR14"),
+ m_dr15(*this, "DR15"),
+ m_kbdida(*this, "KBDIDA"),
+ m_kbdidb(*this, "KBDIDB"),
+ m_db(0),
+ m_cnt(0),
+ m_sense(0),
+ m_t1(1)
{
}
@@ -449,9 +449,9 @@ void ibm_pc_at_84_keyboard_device::device_reset()
WRITE8_MEMBER( ibm_pc_at_84_keyboard_device::bus_w )
{
/*
-
+
bit description
-
+
0 SENSE 0
1 SENSE 1
2 SENSE 2
@@ -460,7 +460,7 @@ WRITE8_MEMBER( ibm_pc_at_84_keyboard_device::bus_w )
5 CNT 2
6 CNT 3
7 CNT G
-
+
*/
m_db = data;
@@ -479,18 +479,18 @@ WRITE8_MEMBER( ibm_pc_at_84_keyboard_device::bus_w )
READ8_MEMBER( ibm_pc_at_84_keyboard_device::p1_r )
{
/*
-
+
bit description
-
- 0
- 1
+
+ 0
+ 1
2 KBDID A1
3 KBDID A2
4 KBDID A3
5 KBDID A4
6 KBDID A5
7 KBDID A6
-
+
*/
UINT8 data = 0;
@@ -508,18 +508,18 @@ READ8_MEMBER( ibm_pc_at_84_keyboard_device::p1_r )
WRITE8_MEMBER( ibm_pc_at_84_keyboard_device::p1_w )
{
/*
-
+
bit description
-
+
0 SENSE G
1 T1
- 2
- 3
- 4
- 5
- 6
- 7
-
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+
*/
if (!BIT(data, 0))
@@ -538,18 +538,18 @@ WRITE8_MEMBER( ibm_pc_at_84_keyboard_device::p1_w )
READ8_MEMBER( ibm_pc_at_84_keyboard_device::p2_r )
{
/*
-
+
bit description
-
+
0 KBDID B1
1 KBDID B2
2 KBDID B3
3 KBDID B4
4 KBDID B5
5 KBDID B6
- 6
- 7
-
+ 6
+ 7
+
*/
UINT8 data = 0xc0;
@@ -567,18 +567,18 @@ READ8_MEMBER( ibm_pc_at_84_keyboard_device::p2_r )
WRITE8_MEMBER( ibm_pc_at_84_keyboard_device::p2_w )
{
/*
-
+
bit description
-
+
0 SCROLL LED
1 NUM LED
2 CAPS LED
- 3
- 4
- 5
+ 3
+ 4
+ 5
6 CLOCK
7 DATA
-
+
*/
output_set_led_value(LED_SCROLL, BIT(data, 0));
@@ -638,5 +638,5 @@ int ibm_pc_at_84_keyboard_device::key_depressed()
case 15: data = m_dr15->read(); break;
}
- return m_t1 && BIT(data, m_sense);
+ return m_t1 && BIT(data, m_sense);
}
diff --git a/src/mess/machine/kb_pcat84.h b/src/mess/machine/kb_pcat84.h
index de0b4f552e2..d3e82a5f014 100644
--- a/src/mess/machine/kb_pcat84.h
+++ b/src/mess/machine/kb_pcat84.h
@@ -26,7 +26,7 @@
// ======================> ibm_pc_at_84_keyboard_device
class ibm_pc_at_84_keyboard_device : public device_t,
- public device_pc_kbd_interface
+ public device_pc_kbd_interface
{
public:
// construction/destruction
diff --git a/src/mess/machine/kb_pcxt83.c b/src/mess/machine/kb_pcxt83.c
index a28e721242a..e17fc011c5e 100644
--- a/src/mess/machine/kb_pcxt83.c
+++ b/src/mess/machine/kb_pcxt83.c
@@ -9,11 +9,11 @@
/*
- Part No Layout
- -------------------
- 1501100 US
- 1501102 Germany
- 1501105 UK
+ Part No Layout
+ -------------------
+ 1501100 US
+ 1501102 Germany
+ 1501105 UK
*/
@@ -199,7 +199,7 @@ INPUT_PORTS_START( ibm_pc_xt_83_keyboard )
PORT_START("MD09")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_BACKSLASH) PORT_CHAR('\\') PORT_CHAR('|')
- PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_LSHIFT) PORT_CHAR(UCHAR_SHIFT_1)
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_LSHIFT) PORT_CHAR(UCHAR_SHIFT_1)
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_LCONTROL) PORT_CHAR(UCHAR_SHIFT_2)
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_A) PORT_CHAR('a') PORT_CHAR('A')
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_Q) PORT_CHAR('q') PORT_CHAR('Q')
@@ -250,25 +250,25 @@ ioport_constructor ibm_pc_xt_83_keyboard_device::device_input_ports() const
ibm_pc_xt_83_keyboard_device::ibm_pc_xt_83_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, PC_KBD_IBM_PC_XT_83, "IBM PC/XT Keyboard", tag, owner, clock, "kb_pcxt83", __FILE__),
- device_pc_kbd_interface(mconfig, *this),
- m_maincpu(*this, I8048_TAG),
- m_md00(*this, "MD00"),
- m_md01(*this, "MD01"),
- m_md02(*this, "MD02"),
- m_md03(*this, "MD03"),
- m_md04(*this, "MD04"),
- m_md05(*this, "MD05"),
- m_md06(*this, "MD06"),
- m_md07(*this, "MD07"),
- m_md08(*this, "MD08"),
- m_md09(*this, "MD09"),
- m_md10(*this, "MD10"),
- m_md11(*this, "MD11"),
- m_bus(0xff),
- m_p1(0xff),
- m_p2(0xff),
- m_sense(0),
- m_q(1)
+ device_pc_kbd_interface(mconfig, *this),
+ m_maincpu(*this, I8048_TAG),
+ m_md00(*this, "MD00"),
+ m_md01(*this, "MD01"),
+ m_md02(*this, "MD02"),
+ m_md03(*this, "MD03"),
+ m_md04(*this, "MD04"),
+ m_md05(*this, "MD05"),
+ m_md06(*this, "MD06"),
+ m_md07(*this, "MD07"),
+ m_md08(*this, "MD08"),
+ m_md09(*this, "MD09"),
+ m_md10(*this, "MD10"),
+ m_md11(*this, "MD11"),
+ m_bus(0xff),
+ m_p1(0xff),
+ m_p2(0xff),
+ m_sense(0),
+ m_q(1)
{
}
@@ -280,7 +280,7 @@ ibm_pc_xt_83_keyboard_device::ibm_pc_xt_83_keyboard_device(const machine_config
void ibm_pc_xt_83_keyboard_device::device_start()
{
set_pc_kbdc_device();
-
+
// state saving
save_item(NAME(m_bus));
save_item(NAME(m_p1));
@@ -336,18 +336,18 @@ READ8_MEMBER( ibm_pc_xt_83_keyboard_device::bus_r )
WRITE8_MEMBER( ibm_pc_xt_83_keyboard_device::bus_w )
{
/*
-
+
bit description
-
- 0
- 1
- 2
- 3
- 4
+
+ 0
+ 1
+ 2
+ 3
+ 4
5 DATAOUT
6 -REQOUT
7 Z1 RESET
-
+
*/
m_pc_kbdc->data_write_from_kb(BIT(data, 5));
@@ -369,7 +369,7 @@ WRITE8_MEMBER( ibm_pc_xt_83_keyboard_device::bus_w )
if (BIT(m_p2, 5)) data &= m_md09->read();
if (BIT(m_p2, 6)) data &= m_md10->read();
if (BIT(m_p2, 7)) data &= m_md11->read();
-
+
m_q = BIT(data, m_sense);
}
@@ -384,9 +384,9 @@ WRITE8_MEMBER( ibm_pc_xt_83_keyboard_device::bus_w )
WRITE8_MEMBER( ibm_pc_xt_83_keyboard_device::p1_w )
{
/*
-
+
bit description
-
+
0 MD00
1 MD01
2 MD02
@@ -395,7 +395,7 @@ WRITE8_MEMBER( ibm_pc_xt_83_keyboard_device::p1_w )
5 MD05
6 MD06
7 MD07
-
+
*/
m_p1 = data;
@@ -409,9 +409,9 @@ WRITE8_MEMBER( ibm_pc_xt_83_keyboard_device::p1_w )
WRITE8_MEMBER( ibm_pc_xt_83_keyboard_device::p2_w )
{
/*
-
+
bit description
-
+
0 SELECT 2
1 SELECT 1
2 SELECT 0
@@ -420,7 +420,7 @@ WRITE8_MEMBER( ibm_pc_xt_83_keyboard_device::p2_w )
5 MD09
6 MD10
7 MD11
-
+
*/
if (!BIT(m_p2, 3) && BIT(data, 3))
diff --git a/src/mess/machine/kb_pcxt83.h b/src/mess/machine/kb_pcxt83.h
index 3059aa7b1d7..8a05b3f1cc0 100644
--- a/src/mess/machine/kb_pcxt83.h
+++ b/src/mess/machine/kb_pcxt83.h
@@ -26,7 +26,7 @@
// ======================> ibm_pc_xt_83_keyboard_device
class ibm_pc_xt_83_keyboard_device : public device_t,
- public device_pc_kbd_interface
+ public device_pc_kbd_interface
{
public:
// construction/destruction
diff --git a/src/mess/machine/macpds.c b/src/mess/machine/macpds.c
index 49c35885e6b..e7876214f9b 100644
--- a/src/mess/machine/macpds.c
+++ b/src/mess/machine/macpds.c
@@ -216,5 +216,3 @@ void device_macpds_card_interface::install_rom(device_t *dev, const char *romreg
m_macpds->install_bank(addr, addr+romlen-1, 0, 0, bankname, rom);
}
-
-
diff --git a/src/mess/machine/nes.c b/src/mess/machine/nes.c
index f6cc65d2633..0f745c34c5e 100644
--- a/src/mess/machine/nes.c
+++ b/src/mess/machine/nes.c
@@ -220,10 +220,10 @@ READ8_MEMBER(nes_state::nes_in0_r)
// in the unused upper 3 bits, so typically a read from $4016 leaves 0x40 there.
UINT8 ret = 0x40;
ret |= (m_pad_latch[0] & 0x01);
-
+
// shift
m_pad_latch[0] >>= 1;
-
+
// zapper
if ((cfg & 0x000f) == 0x0002)
{
@@ -265,27 +265,27 @@ READ8_MEMBER(nes_state::nes_in1_r)
// shift
m_pad_latch[1] >>= 1;
-
+
// zapper
if ((cfg & 0x00f0) == 0x0020)
{
int x = m_zapper_latch[1][1]; // x-position
int y = m_zapper_latch[1][2]; // y-position
UINT32 pix, color_base;
-
+
// get the pixel at the gun position
pix = m_ppu->get_pixel(x, y);
-
+
// get the color base from the ppu
color_base = m_ppu->get_colorbase();
-
+
// check if the cursor is over a bright pixel
if ((pix == color_base + 0x20) || (pix == color_base + 0x30) ||
(pix == color_base + 0x33) || (pix == color_base + 0x34))
ret &= ~0x08; // sprite hit
else
ret |= 0x08; // no sprite hit
-
+
// light gun trigger
ret |= (m_zapper_latch[1][0] << 4);
}
@@ -293,12 +293,12 @@ READ8_MEMBER(nes_state::nes_in1_r)
// arkanoid paddle
if ((cfg & 0x00f0) == 0x0040)
{
- ret |= (m_paddle_btn_latch << 3); // button
- ret |= ((m_paddle_latch & 0x80) >> 3); // paddle data
+ ret |= (m_paddle_btn_latch << 3); // button
+ ret |= ((m_paddle_latch & 0x80) >> 3); // paddle data
m_paddle_latch <<= 1;
m_paddle_latch &= 0xff;
}
-
+
// powerpad
if ((cfg & 0x00f0) == 0x0050 || (cfg & 0x00f0) == 0x0060)
{
@@ -307,7 +307,7 @@ READ8_MEMBER(nes_state::nes_in1_r)
m_powerpad_latch[0] >>= 1;
m_powerpad_latch[1] >>= 1;
}
-
+
if (LOG_JOY)
logerror("joy 1 read, val: %02x, pc: %04x\n", ret, space.device().safe_pc());
@@ -317,10 +317,10 @@ READ8_MEMBER(nes_state::nes_in1_r)
WRITE8_MEMBER(nes_state::nes_in0_w)
{
int cfg = m_io_ctrlsel->read();
-
+
if (LOG_JOY)
logerror("joy write, val: %02x, pc: %04x\n", data, space.device().safe_pc());
-
+
// Check if lightgun has been chosen as input: if so, enable crosshair
timer_set(attotime::zero, TIMER_ZAPPER_TICK);
@@ -330,49 +330,49 @@ WRITE8_MEMBER(nes_state::nes_in0_w)
// Toggling bit 0 high then low resets controllers
m_pad_latch[0] = 0;
m_pad_latch[1] = 0;
- m_zapper_latch[0][0] = 0;
- m_zapper_latch[0][1] = 0;
- m_zapper_latch[0][2] = 0;
- m_zapper_latch[1][0] = 0;
- m_zapper_latch[1][1] = 0;
+ m_zapper_latch[0][0] = 0;
+ m_zapper_latch[0][1] = 0;
+ m_zapper_latch[0][2] = 0;
+ m_zapper_latch[1][0] = 0;
+ m_zapper_latch[1][1] = 0;
m_zapper_latch[1][2] = 0;
m_paddle_btn_latch = 0;
m_paddle_latch = 0;
m_powerpad_latch[0] = 0;
m_powerpad_latch[1] = 0;
-
+
// P1 inputs
switch (cfg & 0x000f)
{
case 0x01: // pad 1
m_pad_latch[0] = m_io_pad[0]->read();
break;
-
+
case 0x02: // zapper (secondary)
m_zapper_latch[0][0] = m_io_zapper1_t->read();
m_zapper_latch[0][1] = m_io_zapper1_x->read();
m_zapper_latch[0][2] = m_io_zapper1_y->read();
break;
}
-
+
// P2 inputs
switch ((cfg & 0x00f0) >> 4)
{
case 0x01: // pad 2
m_pad_latch[1] = m_io_pad[1]->read();
break;
-
+
case 0x02: // zapper (primary) - most games expect pad in port1 & zapper in port2
m_zapper_latch[1][0] = m_io_zapper2_t->read();
m_zapper_latch[1][1] = m_io_zapper2_x->read();
m_zapper_latch[1][2] = m_io_zapper2_y->read();
break;
-
+
case 0x04: // arkanoid paddle
m_paddle_btn_latch = m_io_paddle_btn->read();
m_paddle_latch = (UINT8) (m_io_paddle->read() ^ 0xff);
break;
-
+
case 0x05: // power pad
case 0x06: // power pad
m_powerpad_latch[0] = m_io_powerpad[0]->read();
@@ -383,11 +383,11 @@ WRITE8_MEMBER(nes_state::nes_in0_w)
// P3 & P4 inputs in NES Four Score are read serially with P1 & P2
// P3 inputs
if ((cfg & 0x0f00))
- m_pad_latch[0] |= ((m_io_pad[2]->read() << 8) | (0x08 << 16)); // pad 3 + signature
-
+ m_pad_latch[0] |= ((m_io_pad[2]->read() << 8) | (0x08 << 16)); // pad 3 + signature
+
// P4 inputs
if ((cfg & 0xf000))
- m_pad_latch[1] |= ((m_io_pad[3]->read() << 8) | (0x04 << 16)); // pad 4 + signature
+ m_pad_latch[1] |= ((m_io_pad[3]->read() << 8) | (0x04 << 16)); // pad 4 + signature
}
@@ -400,23 +400,23 @@ READ8_MEMBER(nes_state::fc_in0_r)
{
int cfg = m_io_ctrlsel->read();
int exp = m_io_exp->read();
-
+
// Some games expect bit 6 to be set because the last entry on the data bus shows up
// in the unused upper 3 bits, so typically a read from $4016 leaves 0x40 there.
UINT8 ret = 0x40;
ret |= (m_pad_latch[0] & 0x01);
-
+
// shift
m_pad_latch[0] >>= 1;
// microphone bit
if ((cfg & 0x00f0) == 0x00f0)
- ret |= m_mic_obstruct; //bit2!
+ ret |= m_mic_obstruct; //bit2!
// EXP input
switch (exp & 0x0f)
- {
- case 0x02: // FC Keyboard: tape input
+ {
+ case 0x02: // FC Keyboard: tape input
if ((m_cassette->get_state() & CASSETTE_MASK_UISTATE) == CASSETTE_PLAY)
{
double level = m_cassette->input();
@@ -426,124 +426,124 @@ READ8_MEMBER(nes_state::fc_in0_r)
ret |= 0x02;
}
break;
-
+
case 0x04: // Arkanoid paddle
- ret |= (m_paddle_btn_latch << 1); // button
+ ret |= (m_paddle_btn_latch << 1); // button
break;
-
+
case 0x07: // Mahjong Panel
ret |= ((m_mjpanel_latch & 0x01) << 1);
m_mjpanel_latch >>= 1;
break;
-
+
case 0x08: // 'multitap' p3
ret |= ((m_pad_latch[2] & 0x01) << 1);
m_pad_latch[2] >>= 1;
break;
}
-
+
if (LOG_JOY)
logerror("joy 0 read, val: %02x, pc: %04x\n", ret, space.device().safe_pc());
-
+
return ret;
}
READ8_MEMBER(nes_state::fc_in1_r)
{
int exp = m_io_exp->read();
-
+
// Some games expect bit 6 to be set because the last entry on the data bus shows up
// in the unused upper 3 bits, so typically a read from $4017 leaves 0x40 there.
UINT8 ret = 0x40;
ret |= (m_pad_latch[1] & 0x01);
-
+
// shift
m_pad_latch[1] >>= 1;
-
+
// EXP input
switch (exp & 0x0f)
{
- case 0x01: // Lightgun
+ case 0x01: // Lightgun
{
int x = m_zapper_latch[0][1]; // x-position
int y = m_zapper_latch[0][2]; // y-position
UINT32 pix, color_base;
-
+
// get the pixel at the gun position
pix = m_ppu->get_pixel(x, y);
-
+
// get the color base from the ppu
color_base = m_ppu->get_colorbase();
-
+
// check if the cursor is over a bright pixel
if ((pix == color_base + 0x20) || (pix == color_base + 0x30) ||
(pix == color_base + 0x33) || (pix == color_base + 0x34))
ret &= ~0x08; // sprite hit
else
ret |= 0x08; // no sprite hit
-
+
// light gun trigger
ret |= (m_zapper_latch[0][0] << 4);
}
break;
-
- case 0x02: // FC Keyboard: rows of the keyboard matrix are read 4-bits at time and returned as bit1->bit4
+
+ case 0x02: // FC Keyboard: rows of the keyboard matrix are read 4-bits at time and returned as bit1->bit4
if (m_fck_scan < 9)
ret |= ~(((m_io_fckey[m_fck_scan]->read() >> (m_fck_mode * 4)) & 0x0f) << 1) & 0x1e;
else
ret |= 0x1e;
break;
- case 0x03: // Subor Keyboard: rows of the keyboard matrix are read 4-bits at time and returned as bit1->bit4
+ case 0x03: // Subor Keyboard: rows of the keyboard matrix are read 4-bits at time and returned as bit1->bit4
if (m_fck_scan < 12)
ret |= ~(((m_io_subkey[m_fck_scan]->read() >> (m_fck_mode * 4)) & 0x0f) << 1) & 0x1e;
else
ret |= 0x1e;
break;
-
+
case 0x04: // Arkanoid paddle
- ret |= ((m_paddle_latch & 0x80) >> 6); // paddle data
+ ret |= ((m_paddle_latch & 0x80) >> 6); // paddle data
m_paddle_latch <<= 1;
m_paddle_latch &= 0xff;
break;
-
+
case 0x05: // family trainer
case 0x06: // family trainer
if (!BIT(m_ftrainer_scan, 0))
- {
+ {
// read low line: buttons 9,10,11,12
for (int i = 0; i < 4; i++)
ret |= ((m_io_ftrainer[i]->read() & 0x01) << (1 + i));
}
else if (!BIT(m_ftrainer_scan, 1))
- {
+ {
// read mid line: buttons 5,6,7,8
for (int i = 0; i < 4; i++)
ret |= ((m_io_ftrainer[i]->read() & 0x02) << (1 + i));
}
else if (!BIT(m_ftrainer_scan, 2))
- {
+ {
// read high line: buttons 1,2,3,4
for (int i = 0; i < 4; i++)
ret |= ((m_io_ftrainer[i]->read() & 0x04) << (1 + i));
}
break;
-
+
case 0x07: // Mahjong Panel
ret |= ((m_mjpanel_latch & 0x01) << 1);
m_mjpanel_latch >>= 1;
break;
-
+
case 0x08: // 'multitap' p4
ret |= ((m_pad_latch[3] & 0x01) << 1);
m_pad_latch[3] >>= 1;
break;
}
-
+
if (LOG_JOY)
logerror("joy 1 read, val: %02x, pc: %04x\n", ret, space.device().safe_pc());
-
+
return ret;
}
@@ -551,10 +551,10 @@ WRITE8_MEMBER(nes_state::fc_in0_w)
{
int cfg = m_io_ctrlsel->read();
int exp = m_io_exp->read();
-
+
if (LOG_JOY)
logerror("joy write, val: %02x, pc: %04x\n", data, space.device().safe_pc());
-
+
// Check if lightgun has been chosen as input: if so, enable crosshair
timer_set(attotime::zero, TIMER_LIGHTGUN_TICK);
@@ -564,17 +564,17 @@ WRITE8_MEMBER(nes_state::fc_in0_w)
// tape output (not fully tested)
if ((m_cassette->get_state() & CASSETTE_MASK_UISTATE) == CASSETTE_RECORD)
m_cassette->output(((data & 0x07) == 0x07) ? +1.0 : -1.0);
-
+
if (BIT(data, 2)) // keyboard active
{
int lines = ((exp & 0x0f) == 0x02) ? 9 : 12;
UINT8 out = BIT(data, 1); // scan
-
+
if (m_fck_mode && !out && ++m_fck_scan > lines)
m_fck_scan = 0;
-
+
m_fck_mode = out; // access lower or upper 4 bits
-
+
if (BIT(data, 0)) // reset
m_fck_scan = 0;
}
@@ -589,32 +589,32 @@ WRITE8_MEMBER(nes_state::fc_in0_w)
if (data & 0x01)
return;
-
+
// Toggling bit 0 high then low resets controllers
m_pad_latch[0] = 0;
m_pad_latch[1] = 0;
m_pad_latch[2] = 0;
m_pad_latch[3] = 0;
- m_zapper_latch[0][0] = 0;
- m_zapper_latch[0][1] = 0;
- m_zapper_latch[0][2] = 0;
+ m_zapper_latch[0][0] = 0;
+ m_zapper_latch[0][1] = 0;
+ m_zapper_latch[0][2] = 0;
m_paddle_btn_latch = 0;
m_paddle_latch = 0;
m_mjpanel_latch = 0;
m_mic_obstruct = 0;
-
+
// P1 inputs
switch (cfg & 0x000f)
{
case 0x01: // pad 1
m_pad_latch[0] = m_io_pad[0]->read();
break;
-
+
case 0x02: // crazy climber (left stick)
m_pad_latch[0] = m_io_cc_left->read();
break;
}
-
+
// P2 inputs
switch ((cfg & 0x00f0) >> 4)
{
@@ -632,31 +632,31 @@ WRITE8_MEMBER(nes_state::fc_in0_w)
m_pad_latch[1] = (m_io_pad[1]->read() & ~0x04);
break;
}
-
- // P3 & P4 inputs in Famicom (e.g. through Hori Twin Adapter or Hori 4 Players Adapter)
+
+ // P3 & P4 inputs in Famicom (e.g. through Hori Twin Adapter or Hori 4 Players Adapter)
// are read in parallel with P1 & P2 (just using diff bits)
// P3 inputs
if ((exp & 0x0f) == 8 && (cfg & 0x0f00) == 0x0100)
- m_pad_latch[2] = m_io_pad[2]->read(); // pad 3
-
+ m_pad_latch[2] = m_io_pad[2]->read(); // pad 3
+
// P4 inputs
if ((exp & 0x0f) == 8 && (cfg & 0xf000) == 0x1000)
- m_pad_latch[3] = m_io_pad[3]->read(); // pad 4
+ m_pad_latch[3] = m_io_pad[3]->read(); // pad 4
// EXP input
switch (exp & 0x0f)
{
- case 0x01: // Lightgun
+ case 0x01: // Lightgun
m_zapper_latch[0][0] = m_io_zapper2_t->read();
m_zapper_latch[0][1] = m_io_zapper2_x->read();
m_zapper_latch[0][2] = m_io_zapper2_y->read();
break;
- case 0x02: // FC Keyboard
- case 0x03: // Subor Keyboard
+ case 0x02: // FC Keyboard
+ case 0x03: // Subor Keyboard
// these are scanned differently than other devices:
- // writes to $4016 with bit2 set always update the
+ // writes to $4016 with bit2 set always update the
// line counter and writing bit0 set resets the counter
break;
@@ -668,11 +668,11 @@ WRITE8_MEMBER(nes_state::fc_in0_w)
case 0x05: // family trainer
case 0x06: // family trainer
// these are scanned differently than other devices:
- // bit0-bit2 of writes to $4016 select the row to read
+ // bit0-bit2 of writes to $4016 select the row to read
// from from the mat input "columns"
break;
-
-
+
+
case 0x07: // Mahjong Panel
if (data & 0xf8)
logerror("Error: Mahjong panel read with mux data %02x\n", (data & 0xfe));
@@ -680,7 +680,7 @@ WRITE8_MEMBER(nes_state::fc_in0_w)
m_mjpanel_latch = m_io_mahjong[(data & 0xfe) >> 1]->read();
break;
}
-
+
}
@@ -699,7 +699,7 @@ void nes_state::device_timer(emu_timer &timer, device_timer_id id, int param, vo
/* disable lightpen crosshair */
crosshair_set_screen(machine(), 0, CROSSHAIR_SCREEN_NONE);
}
-
+
if ((m_io_ctrlsel->read() & 0x00f0) == 0x0020)
{
/* enable lightpen crosshair */
diff --git a/src/mess/machine/pc_keyboards.h b/src/mess/machine/pc_keyboards.h
index 91639e2f4ee..2b95e323990 100644
--- a/src/mess/machine/pc_keyboards.h
+++ b/src/mess/machine/pc_keyboards.h
@@ -10,8 +10,8 @@
// PC XT protocol keyboards
#define STR_KBD_KEYTRONIC_PC3270 "keytronc_pc3270"
-#define STR_KBD_IBM_PC_83 "pc"
-#define STR_KBD_IBM_PC_XT_83 "pcxt"
+#define STR_KBD_IBM_PC_83 "pc"
+#define STR_KBD_IBM_PC_XT_83 "pcxt"
SLOT_INTERFACE_EXTERN(pc_xt_keyboards);
@@ -19,8 +19,8 @@ SLOT_INTERFACE_EXTERN(pc_xt_keyboards);
// Reuses STR_KBD_KEYTRONIC_PC3270 (same keyboard in AT protocol mode by default)
#define STR_KBD_MICROSOFT_NATURAL "ms_naturl"
-#define STR_KBD_IBM_PC_AT_84 "pcat"
-#define STR_KBD_IBM_3270PC_122 "3270pc"
+#define STR_KBD_IBM_PC_AT_84 "pcat"
+#define STR_KBD_IBM_3270PC_122 "3270pc"
SLOT_INTERFACE_EXTERN(pc_at_keyboards);
diff --git a/src/mess/machine/shark.c b/src/mess/machine/shark.c
index d1a7c2748b1..d82cb5d2f4f 100644
--- a/src/mess/machine/shark.c
+++ b/src/mess/machine/shark.c
@@ -16,7 +16,7 @@
//**************************************************************************
#define I8085_TAG "i8085"
-#define RS232_TAG "rs232"
+#define RS232_TAG "rs232"
diff --git a/src/mess/machine/shark.h b/src/mess/machine/shark.h
index 68fdfa8f9ab..7e84ebfcc85 100644
--- a/src/mess/machine/shark.h
+++ b/src/mess/machine/shark.h
@@ -29,7 +29,7 @@
// ======================> shark_device
class shark_device : public device_t,
- public device_ieee488_interface
+ public device_ieee488_interface
{
public:
// construction/destruction
diff --git a/src/mess/machine/sms.c b/src/mess/machine/sms.c
index 651af1cfc6e..6a06513c84c 100644
--- a/src/mess/machine/sms.c
+++ b/src/mess/machine/sms.c
@@ -836,7 +836,7 @@ WRITE8_MEMBER(smssdisp_state::sms_store_cart_select_w)
logerror("switching in part of %s slot #%d\n", slottype ? "card" : "cartridge", slot );
/* cartridge? slot #0 */
//if (slottype == 0)
- // m_current_cartridge = slot;
+ // m_current_cartridge = slot;
setup_rom();
}
diff --git a/src/mess/machine/sms_lphaser.c b/src/mess/machine/sms_lphaser.c
index 59b79985f03..e24a0b5a088 100644
--- a/src/mess/machine/sms_lphaser.c
+++ b/src/mess/machine/sms_lphaser.c
@@ -267,5 +267,3 @@ void sms_light_phaser_device::device_timer(emu_timer &timer, device_timer_id id,
assert_always(FALSE, "Unknown id in sms_light_phaser_device::device_timer");
}
}
-
-
diff --git a/src/mess/machine/sms_paddle.c b/src/mess/machine/sms_paddle.c
index 5cdf63146f7..fe639a91781 100644
--- a/src/mess/machine/sms_paddle.c
+++ b/src/mess/machine/sms_paddle.c
@@ -109,4 +109,3 @@ UINT8 sms_paddle_device::peripheral_r()
return m_paddle_pins->read();
}
-
diff --git a/src/mess/machine/sms_rfu.c b/src/mess/machine/sms_rfu.c
index f98eea82663..f4721d15975 100644
--- a/src/mess/machine/sms_rfu.c
+++ b/src/mess/machine/sms_rfu.c
@@ -140,4 +140,3 @@ machine_config_constructor sms_rapid_fire_device::device_mconfig_additions() con
{
return MACHINE_CONFIG_NAME( rfire_slot );
}
-
diff --git a/src/mess/machine/sms_sports.c b/src/mess/machine/sms_sports.c
index 49615f4a207..0fcda8d91c2 100644
--- a/src/mess/machine/sms_sports.c
+++ b/src/mess/machine/sms_sports.c
@@ -161,4 +161,3 @@ void sms_sports_pad_device::peripheral_w(UINT8 data)
{
m_sports_out->write(data);
}
-
diff --git a/src/mess/machine/smsctrl.c b/src/mess/machine/smsctrl.c
index 8218853ad88..9c907b46744 100644
--- a/src/mess/machine/smsctrl.c
+++ b/src/mess/machine/smsctrl.c
@@ -77,24 +77,24 @@ sms_control_port_device::~sms_control_port_device()
void sms_control_port_device::device_start()
{
m_device = dynamic_cast<device_sms_control_port_interface *>(get_card_device());
-
+
m_th_pin_handler.resolve_safe();
m_pixel_handler.resolve_safe(0);
}
-UINT8 sms_control_port_device::port_r()
-{
- UINT8 data = 0xff;
- if (m_device)
- data = m_device->peripheral_r();
- return data;
+UINT8 sms_control_port_device::port_r()
+{
+ UINT8 data = 0xff;
+ if (m_device)
+ data = m_device->peripheral_r();
+ return data;
}
-void sms_control_port_device::port_w( UINT8 data )
-{
- if (m_device)
- m_device->peripheral_w(data);
+void sms_control_port_device::port_w( UINT8 data )
+{
+ if (m_device)
+ m_device->peripheral_w(data);
}
diff --git a/src/mess/machine/sns_sa1.c b/src/mess/machine/sns_sa1.c
index 9026cba69c7..494253d3e1e 100644
--- a/src/mess/machine/sns_sa1.c
+++ b/src/mess/machine/sns_sa1.c
@@ -43,7 +43,7 @@
kakinoki: S-CPU crashes after pressing start
kirby3j, kirby3: uses SA-1 DMA
kirbysdb, kirbyss, kirbyfun, kirbysd, kirbysda: plays OK
- marvelou: plays OK, uses SA-1 normal DMA only but has corrupt gfx
+ marvelou: plays OK, uses SA-1 normal DMA only but has corrupt gfx
miniyonk: plays OK
panicbw: plays OK
pgaeuro, pgaeurou, pga96, pga96u, pga, pgaj: plays OK
@@ -69,15 +69,15 @@
#include "emu.h"
#include "machine/sns_sa1.h"
-#define SA1_IRQ_SCPU (0x80)
-#define SA1_IRQ_TIMER (0x40)
-#define SA1_IRQ_DMA (0x20)
-#define SA1_NMI_SCPU (0x10)
+#define SA1_IRQ_SCPU (0x80)
+#define SA1_IRQ_TIMER (0x40)
+#define SA1_IRQ_DMA (0x20)
+#define SA1_NMI_SCPU (0x10)
-#define SCPU_IRQ_SA1 (0x80)
-#define SCPU_IRQV_ALT (0x40)
+#define SCPU_IRQ_SA1 (0x80)
+#define SCPU_IRQV_ALT (0x40)
#define SCPU_IRQ_CHARCONV (0x20)
-#define SCPU_NMIV_ALT (0x10)
+#define SCPU_NMIV_ALT (0x10)
//-------------------------------------------------
// constructor
@@ -229,21 +229,21 @@ UINT8 sns_sa1_device::var_length_read(address_space &space, UINT32 offset)
void sns_sa1_device::dma_transfer(address_space &space)
{
-// printf("DMA src %08x (%d), dst %08x (%d) cnt %d\n", m_src_addr, m_dma_ctrl & 3, m_dst_addr, m_dma_ctrl & 4, m_dma_cnt);
+// printf("DMA src %08x (%d), dst %08x (%d) cnt %d\n", m_src_addr, m_dma_ctrl & 3, m_dst_addr, m_dma_ctrl & 4, m_dma_cnt);
- while (m_dma_cnt--)
+ while (m_dma_cnt--)
{
UINT8 data = 0; // open bus?
UINT32 dma_src = m_src_addr++;
UINT32 dma_dst = m_dst_addr++;
-
+
// source and destination cannot be the same
// source = { 0=ROM, 1=BWRAM, 2=IRAM }
// destination = { 0=IRAM, 1=BWRAM }
if ((m_dma_ctrl & 0x03) == 1 && (m_dma_ctrl & 0x04) == 0x04) continue;
if ((m_dma_ctrl & 0x03) == 2 && (m_dma_ctrl & 0x04) == 0x00) continue;
- switch (m_dma_ctrl & 0x03)
+ switch (m_dma_ctrl & 0x03)
{
case 0: // ROM
if ((dma_src & 0x408000) == 0x008000 && (dma_src & 0x800000) == 0x000000)
@@ -263,7 +263,7 @@ void sns_sa1_device::dma_transfer(address_space &space)
case 1: // BWRAM
if ((dma_src & 0x40e000) == 0x006000)
{
- data = read_bwram((m_bwram_sa1 * 0x2000) + (dma_src & 0x1fff));
+ data = read_bwram((m_bwram_sa1 * 0x2000) + (dma_src & 0x1fff));
}
if ((dma_src & 0xf00000) == 0x400000)
{
@@ -275,17 +275,17 @@ void sns_sa1_device::dma_transfer(address_space &space)
data = read_iram(dma_src);
break;
}
-
- switch (m_dma_ctrl & 0x04)
+
+ switch (m_dma_ctrl & 0x04)
{
- case 0x00: // IRAM
+ case 0x00: // IRAM
write_iram(dma_dst, data);
break;
- case 0x04: // BWRAM
+ case 0x04: // BWRAM
if ((dma_dst & 0x40e000) == 0x006000)
{
- write_bwram((m_bwram_sa1 * 0x2000) + (dma_dst & 0x1fff), data);
+ write_bwram((m_bwram_sa1 * 0x2000) + (dma_dst & 0x1fff), data);
}
if ((dma_dst & 0xf00000) == 0x400000)
{
@@ -294,7 +294,7 @@ void sns_sa1_device::dma_transfer(address_space &space)
break;
}
}
-
+
m_sa1_flags |= SA1_IRQ_DMA;
recalc_irqs();
}
@@ -413,15 +413,15 @@ void sns_sa1_device::write_regs(address_space &space, UINT32 offset, UINT8 data)
{
case 0x000:
// SA-1 control flags
-// printf("%02x to SA-1 control\n", data);
+// printf("%02x to SA-1 control\n", data);
if ((BIT(data, 5)) && !(BIT(m_sa1_ctrl, 5)))
{
-// printf("Engaging SA-1 reset\n");
+// printf("Engaging SA-1 reset\n");
m_sa1->set_input_line(INPUT_LINE_HALT, ASSERT_LINE);
}
else if (!(BIT(data, 5)) && (BIT(m_sa1_ctrl, 5)))
{
-// printf("Releasing SA-1 reset\n");
+// printf("Releasing SA-1 reset\n");
m_sa1->set_input_line(INPUT_LINE_HALT, CLEAR_LINE);
m_sa1->set_input_line(INPUT_LINE_RESET, ASSERT_LINE);
m_sa1->set_input_line(INPUT_LINE_RESET, CLEAR_LINE);
@@ -446,16 +446,16 @@ void sns_sa1_device::write_regs(address_space &space, UINT32 offset, UINT8 data)
case 0x001:
// SNES SIE 00h SNES CPU Int Enable (W)
m_scpu_sie = data;
-// printf("S-CPU IE = %02x\n", data);
+// printf("S-CPU IE = %02x\n", data);
recalc_irqs();
break;
case 0x002:
// SNES SIC 00h SNES CPU Int Clear (W)
- if (BIT(data, 7)) // ack IRQ from SA-1
+ if (BIT(data, 7)) // ack IRQ from SA-1
{
m_scpu_flags &= ~SCPU_IRQ_SA1;
}
- if (BIT(data, 5)) // ack character conversion IRQ
+ if (BIT(data, 5)) // ack character conversion IRQ
{
m_scpu_flags &= ~SCPU_IRQ_CHARCONV;
}
@@ -497,7 +497,7 @@ void sns_sa1_device::write_regs(address_space &space, UINT32 offset, UINT8 data)
if (m_scpu_ctrl & 0x80)
{
m_scpu_flags |= SCPU_IRQ_SA1;
-// printf("SA-1 cause S-CPU IRQ\n");
+// printf("SA-1 cause S-CPU IRQ\n");
}
// message to SA-1
@@ -508,14 +508,14 @@ void sns_sa1_device::write_regs(address_space &space, UINT32 offset, UINT8 data)
m_scpu_flags &= ~(SCPU_IRQV_ALT|SCPU_NMIV_ALT);
// and set them
- m_scpu_flags |= (data & (SCPU_IRQV_ALT|SCPU_NMIV_ALT));
+ m_scpu_flags |= (data & (SCPU_IRQV_ALT|SCPU_NMIV_ALT));
recalc_irqs();
break;
case 0x00a:
// SA-1 CIE 00h SA-1 CPU Int Enable (W)
m_sa1_sie = data;
-// printf("SA-1 IE = %02x\n", data);
+// printf("SA-1 IE = %02x\n", data);
recalc_irqs();
break;
case 0x00b:
@@ -627,7 +627,7 @@ void sns_sa1_device::write_regs(address_space &space, UINT32 offset, UINT8 data)
break;
case 0x030:
// SA-1 DCNT 00h DMA Control (W)
-// printf("%02x to SA-1 DMA control\n", data);
+// printf("%02x to SA-1 DMA control\n", data);
m_dma_ctrl = data;
break;
case 0x031:
@@ -658,24 +658,24 @@ void sns_sa1_device::write_regs(address_space &space, UINT32 offset, UINT8 data)
if (!(m_dma_ctrl & 0x20) && !(m_dma_ctrl & 0x04)) // Normal DMA to IRAM
{
dma_transfer(space);
-// printf("SA-1: normal DMA to IRAM\n");
+// printf("SA-1: normal DMA to IRAM\n");
}
- if (m_dma_ctrl & 0x20 && m_dma_ctrl & 0x10) // CC DMA Type 1
+ if (m_dma_ctrl & 0x20 && m_dma_ctrl & 0x10) // CC DMA Type 1
{
-// printf("SA-1: CC DMA type 1\n");
+// printf("SA-1: CC DMA type 1\n");
dma_cctype1_transfer(space);
}
}
- break;
+ break;
case 0x037:
// DMA Dest Device Start Address High
m_dst_addr = (m_dst_addr & 0xffff00) | (data << 16);
if (m_dma_ctrl & 0x80)
{
- if (!(m_dma_ctrl & 0x20) && m_dma_ctrl & 0x04) // Normal DMA to BWRAM
+ if (!(m_dma_ctrl & 0x20) && m_dma_ctrl & 0x04) // Normal DMA to BWRAM
{
-// printf("SA-1: normal DMA to BWRAM\n");
+// printf("SA-1: normal DMA to BWRAM\n");
dma_transfer(space);
}
}
@@ -714,12 +714,12 @@ void sns_sa1_device::write_regs(address_space &space, UINT32 offset, UINT8 data)
m_brf_reg[offset & 0x0f] = data;
if ((offset & 0x07) == 7 && m_dma_ctrl & 0x80)
{
- if (m_dma_ctrl & 0x20 && !(m_dma_ctrl & 0x10)) // CC DMA Type 2
+ if (m_dma_ctrl & 0x20 && !(m_dma_ctrl & 0x10)) // CC DMA Type 2
{
-// printf("SA-1: CC DMA type 2\n");
+// printf("SA-1: CC DMA type 2\n");
dma_cctype2_transfer(space);
}
- }
+ }
break;
case 0x050:
// Math control
diff --git a/src/mess/machine/softbox.c b/src/mess/machine/softbox.c
index fc0866a8a44..bc0debb87fe 100644
--- a/src/mess/machine/softbox.c
+++ b/src/mess/machine/softbox.c
@@ -358,7 +358,7 @@ void softbox_device::device_start()
// reset that must happen after child devices
// have performed their resets
//-------------------------------------------------
-
+
void softbox_device::device_reset_after_children()
{
/* The Z80 starts at address 0x0000 but the SoftBox has RAM there and
@@ -366,11 +366,11 @@ void softbox_device::device_reset_after_children()
74S287 PROM that temporarily changes the memory map so that the
IC3 EPROM at 0xf000 is mapped to 0x0000 for the first instruction
fetch only. The instruction normally at 0xf000 is an absolute jump
- into the BIOS. On reset, the Z80 will fetch it from 0x0000 and set
+ into the BIOS. On reset, the Z80 will fetch it from 0x0000 and set
its PC, then the normal map will be restored before the next
- instruction fetch. Here we just set the PC to 0xf000 after the Z80
+ instruction fetch. Here we just set the PC to 0xf000 after the Z80
resets, which has the same effect. */
-
+
m_maincpu->set_state_int(Z80_PC, 0xf000);
}
diff --git a/src/mess/machine/softbox.h b/src/mess/machine/softbox.h
index a07b5ba33a1..985bf80fe73 100644
--- a/src/mess/machine/softbox.h
+++ b/src/mess/machine/softbox.h
@@ -58,8 +58,8 @@ protected:
virtual void device_start();
virtual void device_reset_after_children();
- // device_ieee488_interface overrides
- virtual void ieee488_ifc(int state);
+ // device_ieee488_interface overrides
+ virtual void ieee488_ifc(int state);
private:
enum