diff options
| author | 2014-04-07 06:04:18 +0000 | |
|---|---|---|
| committer | 2014-04-07 06:04:18 +0000 | |
| commit | fec65e0b5766ade69e086d1c5b859d97494fce56 (patch) | |
| tree | c22b07938e9ad590184f1276bc2bead6d888a78d /src/emu/machine | |
| parent | 30d94e51c53f30187a1bc565ef33e4744319790e (diff) | |
Cleanups and version bumpmame0153
Diffstat (limited to 'src/emu/machine')
86 files changed, 870 insertions, 879 deletions
diff --git a/src/emu/machine/64h156.c b/src/emu/machine/64h156.c index cd511244e02..730c805c3ac 100644 --- a/src/emu/machine/64h156.c +++ b/src/emu/machine/64h156.c @@ -19,7 +19,7 @@ - cycle exact VIA - get these running and we're golden - - Bounty Bob Strikes Back (aligned halftracks) + - Bounty Bob Strikes Back (aligned halftracks) - Quiwi (speed change within track) - Defender of the Crown (V-MAX! v2, density checks) - Test Drive / Cabal (HLS, sub-cycle jitter) @@ -201,7 +201,7 @@ void c64h156_device::commit(attotime tm) { if(cur_live.write_start_time.is_never() || tm == cur_live.write_start_time || !cur_live.write_position) return; - + if (LOG) logerror("%s committing %u transitions since %s\n", tm.as_string(), cur_live.write_position, cur_live.write_start_time.as_string()); m_floppy->write_flux(cur_live.write_start_time, tm, cur_live.write_position, cur_live.write_buffer); @@ -293,14 +293,14 @@ void c64h156_device::live_run(attotime limit) cur_live.cell_counter++; cur_live.cell_counter &= 0xf; } - + if (!BIT(cell_counter, 1) && BIT(cur_live.cell_counter, 1)) { // read bit cur_live.shift_reg <<= 1; cur_live.shift_reg |= !(BIT(cur_live.cell_counter, 3) || BIT(cur_live.cell_counter, 2)); cur_live.shift_reg &= 0x3ff; - - if (LOG) logerror("%s read bit %u (%u) >> %03x, oe=%u soe=%u sync=%u byte=%u\n", cur_live.tm.as_string(), cur_live.bit_counter, + + if (LOG) logerror("%s read bit %u (%u) >> %03x, oe=%u soe=%u sync=%u byte=%u\n", cur_live.tm.as_string(), cur_live.bit_counter, !(BIT(cur_live.cell_counter, 3) || BIT(cur_live.cell_counter, 2)), cur_live.shift_reg, cur_live.oe, cur_live.soe, cur_live.sync, cur_live.byte); syncpoint = true; @@ -392,7 +392,7 @@ int c64h156_device::get_next_bit(attotime &tm, attotime limit) if (bit) { cur_live.zero_counter = 0; cur_live.cycles_until_random_flux = (rand() % 31) + 289; - + get_next_edge(next); } diff --git a/src/emu/machine/6522via.c b/src/emu/machine/6522via.c index f879c21d500..a6316a75406 100644 --- a/src/emu/machine/6522via.c +++ b/src/emu/machine/6522via.c @@ -470,7 +470,7 @@ UINT8 via6522_device::input_pb() void via6522_device::output_pb() { UINT8 pb = (m_out_b & m_ddr_b) | ~m_ddr_b; - + if (T1_SET_PB7(m_acr)) pb = (pb & 0x7f) | (m_t1_pb7 << 7); diff --git a/src/emu/machine/6526cia.h b/src/emu/machine/6526cia.h index e44a36bfbe4..c3d5f8a40d1 100644 --- a/src/emu/machine/6526cia.h +++ b/src/emu/machine/6526cia.h @@ -1,6 +1,6 @@ /********************************************************************** - - WARNING: DO NOT USE! WILL BE REMOVED IN FAVOR OF machine/mos6526.h + + WARNING: DO NOT USE! WILL BE REMOVED IN FAVOR OF machine/mos6526.h ********************************************************************** diff --git a/src/emu/machine/6850acia.c b/src/emu/machine/6850acia.c index 2e52de30d57..04344c9c612 100644 --- a/src/emu/machine/6850acia.c +++ b/src/emu/machine/6850acia.c @@ -329,7 +329,7 @@ WRITE_LINE_MEMBER( acia6850_device::write_rxc ) { m_status &= ~SR_DCD; } - + m_rx_counter++; switch (m_rx_state) @@ -430,7 +430,7 @@ WRITE_LINE_MEMBER( acia6850_device::write_rxc ) m_rx_counter = 0; if (LOG) logerror("MC6850 '%s': RX STOP BIT\n", tag()); - + if (!m_rxd) { m_status |= SR_FE; @@ -536,7 +536,7 @@ WRITE_LINE_MEMBER( acia6850_device::write_txc ) if (m_tx_counter == m_divide) { m_tx_counter = 0; - + m_tx_bits++; if (LOG) logerror("MC6850 '%s': TX STOP BIT %d\n", tag(), m_tx_bits); diff --git a/src/emu/machine/68561mpcc.c b/src/emu/machine/68561mpcc.c index cae122bdd0f..02b0a4468a4 100644 --- a/src/emu/machine/68561mpcc.c +++ b/src/emu/machine/68561mpcc.c @@ -160,7 +160,7 @@ void mpcc68561_t::device_timer(emu_timer &timer, device_timer_id id, int param, void mpcc68561_t::device_start() { intrq_cb.resolve_safe(); - + memset(channel, 0, sizeof(channel)); mode = 0; diff --git a/src/emu/machine/74145.h b/src/emu/machine/74145.h index 2cc52919892..7e22abf870b 100644 --- a/src/emu/machine/74145.h +++ b/src/emu/machine/74145.h @@ -23,25 +23,25 @@ #define MCFG_TTL74145_OUTPUT_LINE_2_CB(_devcb) \ devcb = &ttl74145_device::set_output_line_2_callback(*device, DEVCB2_##_devcb); - + #define MCFG_TTL74145_OUTPUT_LINE_3_CB(_devcb) \ devcb = &ttl74145_device::set_output_line_3_callback(*device, DEVCB2_##_devcb); - + #define MCFG_TTL74145_OUTPUT_LINE_4_CB(_devcb) \ devcb = &ttl74145_device::set_output_line_4_callback(*device, DEVCB2_##_devcb); - + #define MCFG_TTL74145_OUTPUT_LINE_5_CB(_devcb) \ devcb = &ttl74145_device::set_output_line_5_callback(*device, DEVCB2_##_devcb); - + #define MCFG_TTL74145_OUTPUT_LINE_6_CB(_devcb) \ devcb = &ttl74145_device::set_output_line_6_callback(*device, DEVCB2_##_devcb); - + #define MCFG_TTL74145_OUTPUT_LINE_7_CB(_devcb) \ devcb = &ttl74145_device::set_output_line_7_callback(*device, DEVCB2_##_devcb); - + #define MCFG_TTL74145_OUTPUT_LINE_8_CB(_devcb) \ devcb = &ttl74145_device::set_output_line_8_callback(*device, DEVCB2_##_devcb); - + #define MCFG_TTL74145_OUTPUT_LINE_9_CB(_devcb) \ devcb = &ttl74145_device::set_output_line_9_callback(*device, DEVCB2_##_devcb); @@ -56,7 +56,7 @@ class ttl74145_device : public device_t public: // construction/destruction ttl74145_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - + template<class _Object> static devcb2_base &set_output_line_0_callback(device_t &device, _Object object) { return downcast<ttl74145_device &>(device).m_output_line_0_cb.set_callback(object); } template<class _Object> static devcb2_base &set_output_line_1_callback(device_t &device, _Object object) { return downcast<ttl74145_device &>(device).m_output_line_1_cb.set_callback(object); } template<class _Object> static devcb2_base &set_output_line_2_callback(device_t &device, _Object object) { return downcast<ttl74145_device &>(device).m_output_line_2_cb.set_callback(object); } @@ -67,7 +67,7 @@ public: template<class _Object> static devcb2_base &set_output_line_7_callback(device_t &device, _Object object) { return downcast<ttl74145_device &>(device).m_output_line_7_cb.set_callback(object); } template<class _Object> static devcb2_base &set_output_line_8_callback(device_t &device, _Object object) { return downcast<ttl74145_device &>(device).m_output_line_8_cb.set_callback(object); } template<class _Object> static devcb2_base &set_output_line_9_callback(device_t &device, _Object object) { return downcast<ttl74145_device &>(device).m_output_line_9_cb.set_callback(object); } - + UINT16 read(); void write(UINT8 data); protected: diff --git a/src/emu/machine/8042kbdc.h b/src/emu/machine/8042kbdc.h index c89a07dcb00..81f2d63a323 100644 --- a/src/emu/machine/8042kbdc.h +++ b/src/emu/machine/8042kbdc.h @@ -101,7 +101,7 @@ protected: int m_offset1; int m_poll_delay; - + required_device<at_keyboard_device> m_keyboard_dev; devcb_resolved_write_line m_system_reset_func; diff --git a/src/emu/machine/8530scc.c b/src/emu/machine/8530scc.c index 56ffbd30365..2c6497dc6df 100644 --- a/src/emu/machine/8530scc.c +++ b/src/emu/machine/8530scc.c @@ -23,7 +23,7 @@ const device_type SCC8530 = &device_creator<scc8530_t>; IMPLEMENTATION ***************************************************************************/ -scc8530_t::scc8530_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : +scc8530_t::scc8530_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : device_t(mconfig, SCC8530, "Zilog 8530 SCC", tag, owner, clock, "scc8530", __FILE__), intrq_cb(*this) { diff --git a/src/emu/machine/bcreader.c b/src/emu/machine/bcreader.c index 6583a7625b3..e9589c05a00 100644 --- a/src/emu/machine/bcreader.c +++ b/src/emu/machine/bcreader.c @@ -4,46 +4,46 @@ Generic barcode reader emulation. - This device only provides the storage of the actual barcode, entered - by the user via Internal UI, both as a raw strip of pixels (up to 95, - for an EAN-13 barcode) and as an array of 0-9 digits. - - It is up to the driver to handle the serial transfer of the data to - the emulated machine, depending on the used protocol - - E.g. Bandai Datach games directly read the raw pixel sequence of - black/white bars; - OTOH Barcode Battle (used by Barcode World for NES and a few SNES - titles) sends the digits as sequences of 20 bytes (13 for the code, - suitably padded for shorted codes, followed by a signature) and the - actual serial transmission to the console is up to the slot device - connected to the NES/SNES controller port (yet to be emulated, in this - case) + This device only provides the storage of the actual barcode, entered + by the user via Internal UI, both as a raw strip of pixels (up to 95, + for an EAN-13 barcode) and as an array of 0-9 digits. + + It is up to the driver to handle the serial transfer of the data to + the emulated machine, depending on the used protocol + + E.g. Bandai Datach games directly read the raw pixel sequence of + black/white bars; + OTOH Barcode Battle (used by Barcode World for NES and a few SNES + titles) sends the digits as sequences of 20 bytes (13 for the code, + suitably padded for shorted codes, followed by a signature) and the + actual serial transmission to the console is up to the slot device + connected to the NES/SNES controller port (yet to be emulated, in this + case) Note: we currently support the following barcode formats * UPC-A: 12 digits * EAN-13: 13 digits (extension of the former) - * EAN-8: 8 digits (same encoding as UPC-A, but 4-digits blocks instead - of 6-digits blocks) + * EAN-8: 8 digits (same encoding as UPC-A, but 4-digits blocks instead + of 6-digits blocks) Notice that since EAN-13 is an extension of UPC-A, we just treat UPC-A - as an EAN-13 code with leading '0'. If any barcode reader shall be found - which supports the older format only, this shall be changed - - - TODO: add support for UPC-E barcodes? these are 8 digits barcodes with 17 - black stripes (they are compressed UPC-A codes). Datach reader does not - support these, so it is low priority - - - TODO 2: verify barcode checksum in is_valid() and not only length, so - that we can then use the actual last digit in the decode function below, - rather than replacing it with the checksum value - - - TODO 3: possibly the white spaces before the actual barcode (see the - 61 white pixels sent by read_pixel() before and after the code), shall - be moved to the specific implementations to emulate different "sensitivity" - of the readers? Bandai Datach seems to need at least 32 pixels... + as an EAN-13 code with leading '0'. If any barcode reader shall be found + which supports the older format only, this shall be changed + + + TODO: add support for UPC-E barcodes? these are 8 digits barcodes with 17 + black stripes (they are compressed UPC-A codes). Datach reader does not + support these, so it is low priority + + + TODO 2: verify barcode checksum in is_valid() and not only length, so + that we can then use the actual last digit in the decode function below, + rather than replacing it with the checksum value + + + TODO 3: possibly the white spaces before the actual barcode (see the + 61 white pixels sent by read_pixel() before and after the code), shall + be moved to the specific implementations to emulate different "sensitivity" + of the readers? Bandai Datach seems to need at least 32 pixels... ***************************************************************************/ @@ -85,7 +85,7 @@ void barcode_reader_device::device_start() //------------------------------------------------- // Barcode Decoding - convert the entered sequence -// of digits into a sequence of B/W pixels (the +// of digits into a sequence of B/W pixels (the // actual bars) - each digit corresponds to 7 pixels // 0 is black, 1 is white //------------------------------------------------- @@ -140,11 +140,11 @@ void barcode_reader_device::decode(int len) if (len == 13) { // UPC-A and EAN-13 - + m_pixel_data[output++] = 0; m_pixel_data[output++] = 1; m_pixel_data[output++] = 0; - + for (int i = 1; i < 7; i++) { if (bcread_parity_type[m_byte_data[0]][i - 1]) @@ -158,13 +158,13 @@ void barcode_reader_device::decode(int len) m_pixel_data[output++] = bcread_data_LE[m_byte_data[i]][j]; } } - + m_pixel_data[output++] = 1; m_pixel_data[output++] = 0; m_pixel_data[output++] = 1; m_pixel_data[output++] = 0; m_pixel_data[output++] = 1; - + for (int i = 7; i < 12; i++) { for (int j = 0; j < 7; j++) @@ -178,59 +178,59 @@ void barcode_reader_device::decode(int len) else if (len == 8) { // EAN-8 (same encoding as UPC-A, but only 4+4 digits, instead of 6+6) - + m_pixel_data[output++] = 0; m_pixel_data[output++] = 1; m_pixel_data[output++] = 0; - + for (int i = 0; i < 4; i++) { for (int j = 0; j < 7; j++) m_pixel_data[output++] = bcread_data_LO[m_byte_data[i]][j]; } - + m_pixel_data[output++] = 1; m_pixel_data[output++] = 0; m_pixel_data[output++] = 1; m_pixel_data[output++] = 0; m_pixel_data[output++] = 1; - + for (int i = 4; i < 7; i++) { for (int j = 0; j < 7; j++) m_pixel_data[output++] = bcread_data_RE[m_byte_data[i]][j]; } - + // ignore the last digit and compute it as checksum of the first 12 for (int i = 0; i < 7; i++) sum += (i & 1) ? (m_byte_data[i] * 1) : (m_byte_data[i] * 3); } - + if (m_pixel_data) { sum = (10 - (sum % 10)) % 10; if (sum != m_byte_data[len - 1]) - logerror("WARNING: wrong checksum detected in the barcode! chksum %d last digit %d\n", + logerror("WARNING: wrong checksum detected in the barcode! chksum %d last digit %d\n", sum, m_byte_data[len - 1]); - + for (int i = 0; i < 7; i++) m_pixel_data[output++] = bcread_data_RE[sum][i]; - + m_pixel_data[output++] = 0; m_pixel_data[output++] = 1; m_pixel_data[output++] = 0; } - + m_byte_length = len; m_pixel_length = output; -// printf("byte len %d - pixel len\n", m_byte_length, m_pixel_length); +// printf("byte len %d - pixel len\n", m_byte_length, m_pixel_length); } //------------------------------------------------- // write_code - invoked by UI, stores the barcode -// both as an array of digits and as a sequence +// both as an array of digits and as a sequence // of B/W pixels (the actual bars) //------------------------------------------------- @@ -322,7 +322,7 @@ int barcode_reader_device::read_pixel() return 0; } } - + // no pending transfer = black pixel = 0 return 0; } diff --git a/src/emu/machine/bcreader.h b/src/emu/machine/bcreader.h index 26e55a3d05c..4cb25404bc2 100644 --- a/src/emu/machine/bcreader.h +++ b/src/emu/machine/bcreader.h @@ -31,11 +31,11 @@ public: // TODO: add checksum validation! bool is_valid(int len) { return (len != 12 && len != 13 && len != 8) ? FALSE : TRUE; } void decode(int len); - + protected: // device-level overrides virtual void device_start(); - + UINT8 m_byte_data[13]; UINT8 m_pixel_data[100]; int m_byte_length; diff --git a/src/emu/machine/com8116.h b/src/emu/machine/com8116.h index dc34c7438e8..43eb1b21856 100644 --- a/src/emu/machine/com8116.h +++ b/src/emu/machine/com8116.h @@ -90,7 +90,7 @@ private: int m_fx4; int m_fr; int m_ft; - + const int *m_fr_divisors; const int *m_ft_divisors; diff --git a/src/emu/machine/ds75161a.h b/src/emu/machine/ds75161a.h index bd0e3df7142..e5241ecb085 100644 --- a/src/emu/machine/ds75161a.h +++ b/src/emu/machine/ds75161a.h @@ -37,22 +37,22 @@ #define MCFG_DS75161A_IN_REN_CB(_devcb) \ devcb = &ds75161a_device::set_in_ren_callback(*device, DEVCB2_##_devcb); - + #define MCFG_DS75161A_IN_IFC_CB(_devcb) \ devcb = &ds75161a_device::set_in_ifc_callback(*device, DEVCB2_##_devcb); - + #define MCFG_DS75161A_IN_NDAC_CB(_devcb) \ devcb = &ds75161a_device::set_in_ndac_callback(*device, DEVCB2_##_devcb); - + #define MCFG_DS75161A_IN_NRFD_CB(_devcb) \ devcb = &ds75161a_device::set_in_nrfd_callback(*device, DEVCB2_##_devcb); - + #define MCFG_DS75161A_IN_DAV_CB(_devcb) \ devcb = &ds75161a_device::set_in_dav_callback(*device, DEVCB2_##_devcb); - + #define MCFG_DS75161A_IN_EOI_CB(_devcb) \ devcb = &ds75161a_device::set_in_eoi_callback(*device, DEVCB2_##_devcb); - + #define MCFG_DS75161A_IN_ATN_CB(_devcb) \ devcb = &ds75161a_device::set_in_atn_callback(*device, DEVCB2_##_devcb); @@ -61,22 +61,22 @@ #define MCFG_DS75161A_OUT_REN_CB(_devcb) \ devcb = &ds75161a_device::set_out_ren_callback(*device, DEVCB2_##_devcb); - + #define MCFG_DS75161A_OUT_IFC_CB(_devcb) \ devcb = &ds75161a_device::set_out_ifc_callback(*device, DEVCB2_##_devcb); - + #define MCFG_DS75161A_OUT_NDAC_CB(_devcb) \ devcb = &ds75161a_device::set_out_ndac_callback(*device, DEVCB2_##_devcb); - + #define MCFG_DS75161A_OUT_NRFD_CB(_devcb) \ devcb = &ds75161a_device::set_out_nrfd_callback(*device, DEVCB2_##_devcb); - + #define MCFG_DS75161A_OUT_DAV_CB(_devcb) \ devcb = &ds75161a_device::set_out_dav_callback(*device, DEVCB2_##_devcb); - + #define MCFG_DS75161A_OUT_EOI_CB(_devcb) \ devcb = &ds75161a_device::set_out_eoi_callback(*device, DEVCB2_##_devcb); - + #define MCFG_DS75161A_OUT_ATN_CB(_devcb) \ devcb = &ds75161a_device::set_out_atn_callback(*device, DEVCB2_##_devcb); @@ -94,7 +94,7 @@ class ds75161a_device : public device_t public: // construction/destruction ds75161a_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - + template<class _Object> static devcb2_base &set_in_ren_callback(device_t &device, _Object object) { return downcast<ds75161a_device &>(device).m_in_ren_cb.set_callback(object); } template<class _Object> static devcb2_base &set_in_ifc_callback(device_t &device, _Object object) { return downcast<ds75161a_device &>(device).m_in_ifc_cb.set_callback(object); } template<class _Object> static devcb2_base &set_in_ndac_callback(device_t &device, _Object object) { return downcast<ds75161a_device &>(device).m_in_ndac_cb.set_callback(object); } diff --git a/src/emu/machine/generic.c b/src/emu/machine/generic.c index 1d3bb1cfa17..c958855f5cc 100644 --- a/src/emu/machine/generic.c +++ b/src/emu/machine/generic.c @@ -433,4 +433,3 @@ CUSTOM_INPUT_MEMBER( driver_device::custom_port_read ) const char *tag = (const char *)param; return ioport(tag)->read(); } - diff --git a/src/emu/machine/hd63450.c b/src/emu/machine/hd63450.c index a95a3ba9d5d..07babdadddd 100644 --- a/src/emu/machine/hd63450.c +++ b/src/emu/machine/hd63450.c @@ -61,7 +61,7 @@ void hd63450_device::device_start() // get the CPU device m_cpu = machine().device<cpu_device>(m_cpu_tag); assert(m_cpu != NULL); - + // resolve callbacks m_dma_end.resolve(); m_dma_error.resolve_safe(); @@ -73,7 +73,7 @@ void hd63450_device::device_start() m_dma_write_1.resolve(); m_dma_write_2.resolve(); m_dma_write_3.resolve(); - + // Initialise timers and registers for (int x = 0; x < 4 ; x++) { @@ -86,7 +86,7 @@ void hd63450_device::device_start() READ16_MEMBER(hd63450_device::read) { int channel,reg; - + channel = (offset & 0x60) >> 5; reg = offset & 0x1f; @@ -321,7 +321,7 @@ void hd63450_device::single_transfer(int x) address_space &space = m_cpu->space(AS_PROGRAM); int data; int datasize = 1; - + if(m_in_progress[x] != 0) // DMA in progress in channel x { if(m_reg[x].ocr & 0x80) // direction: 1 = device -> memory diff --git a/src/emu/machine/hd63450.h b/src/emu/machine/hd63450.h index 3c9061776a4..297481e9048 100644 --- a/src/emu/machine/hd63450.h +++ b/src/emu/machine/hd63450.h @@ -16,25 +16,25 @@ #define MCFG_HD63450_DMA_READ_1_CB(_devcb) \ devcb = &hd63450_device::set_dma_read_1_callback(*device, DEVCB2_##_devcb); - + #define MCFG_HD63450_DMA_READ_2_CB(_devcb) \ devcb = &hd63450_device::set_dma_read_2_callback(*device, DEVCB2_##_devcb); #define MCFG_HD63450_DMA_READ_3_CB(_devcb) \ devcb = &hd63450_device::set_dma_read_3_callback(*device, DEVCB2_##_devcb); - + #define MCFG_HD63450_DMA_WRITE_0_CB(_devcb) \ devcb = &hd63450_device::set_dma_write_0_callback(*device, DEVCB2_##_devcb); #define MCFG_HD63450_DMA_WRITE_1_CB(_devcb) \ devcb = &hd63450_device::set_dma_write_1_callback(*device, DEVCB2_##_devcb); - + #define MCFG_HD63450_DMA_WRITE_2_CB(_devcb) \ devcb = &hd63450_device::set_dma_write_2_callback(*device, DEVCB2_##_devcb); - + #define MCFG_HD63450_DMA_WRITE_3_CB(_devcb) \ devcb = &hd63450_device::set_dma_write_3_callback(*device, DEVCB2_##_devcb); - + struct hd63450_regs { // offsets in bytes @@ -81,16 +81,16 @@ public: template<class _Object> static devcb2_base &set_dma_write_0_callback(device_t &device, _Object object) { return downcast<hd63450_device &>(device).m_dma_write_0.set_callback(object); } template<class _Object> static devcb2_base &set_dma_write_1_callback(device_t &device, _Object object) { return downcast<hd63450_device &>(device).m_dma_write_1.set_callback(object); } template<class _Object> static devcb2_base &set_dma_write_2_callback(device_t &device, _Object object) { return downcast<hd63450_device &>(device).m_dma_write_2.set_callback(object); } - template<class _Object> static devcb2_base &set_dma_write_3_callback(device_t &device, _Object object) { return downcast<hd63450_device &>(device).m_dma_write_3.set_callback(object); } + template<class _Object> static devcb2_base &set_dma_write_3_callback(device_t &device, _Object object) { return downcast<hd63450_device &>(device).m_dma_write_3.set_callback(object); } DECLARE_READ16_MEMBER( read ); DECLARE_WRITE16_MEMBER( write ); - + void single_transfer(int x); void set_timer(int channel, attotime tm); int get_vector(int channel); int get_error_vector(int channel); - + protected: // device-level overrides virtual void device_config_complete(); @@ -107,7 +107,7 @@ private: devcb2_write8 m_dma_write_1; devcb2_write8 m_dma_write_2; devcb2_write8 m_dma_write_3; - + // internal state hd63450_regs m_reg[4]; emu_timer* m_timer[4]; // for timing data reading/writing each channel diff --git a/src/emu/machine/hd64610.h b/src/emu/machine/hd64610.h index 4d25cef9a7a..da8856f3d7f 100644 --- a/src/emu/machine/hd64610.h +++ b/src/emu/machine/hd64610.h @@ -36,10 +36,10 @@ #define MCFG_HD64610_OUT_IRQ_CB(_devcb) \ devcb = &hd64610_device::set_out_irq_callback(*device, DEVCB2_##_devcb); - + #define MCFG_HD64610_OUT_1HZ_CB(_devcb) \ devcb = &hd64610_device::set_out_1hz_callback(*device, DEVCB2_##_devcb); - + //************************************************************************** // TYPE DEFINITIONS @@ -54,7 +54,7 @@ class hd64610_device : public device_t, public: // construction/destruction hd64610_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - + template<class _Object> static devcb2_base &set_out_irq_callback(device_t &device, _Object object) { return downcast<hd64610_device &>(device).m_out_irq_cb.set_callback(object); } template<class _Object> static devcb2_base &set_out_1hz_callback(device_t &device, _Object object) { return downcast<hd64610_device &>(device).m_out_1hz_cb.set_callback(object); } diff --git a/src/emu/machine/i8251.c b/src/emu/machine/i8251.c index 3d82f7876a4..4a8860db4b6 100644 --- a/src/emu/machine/i8251.c +++ b/src/emu/machine/i8251.c @@ -686,7 +686,7 @@ void i8251_device::device_timer(emu_timer &timer, device_timer_id id, int param, WRITE_LINE_MEMBER(i8251_device::write_rxd) { m_rxd = state; -// device_serial_interface::rx_w(state); +// device_serial_interface::rx_w(state); } WRITE_LINE_MEMBER(i8251_device::write_cts) diff --git a/src/emu/machine/i8271.c b/src/emu/machine/i8271.c index f446d87862c..cf53c4c6768 100644 --- a/src/emu/machine/i8271.c +++ b/src/emu/machine/i8271.c @@ -133,12 +133,12 @@ i8271_device::i8271_device(const machine_config &mconfig, const char *tag, devic { m_CommandParameters[i] = 0; } - + for (int i = 0; i < 2; i++ ) { m_CurrentTrack[i] = 0; } - + for (int i = 0; i < 4; i++ ) { m_BadTracks[i] = 0; @@ -313,19 +313,19 @@ void i8271_device::device_timer(emu_timer &timer, device_timer_id id, int param, /* stop it */ m_data_timer->reset(); break; - + case TIMER_TIMED_COMMAND_COMPLETE: command_complete(1,1); /* stop it, but don't allow it to be free'd */ m_command_complete_timer->reset(); break; - + default: break; } } - + /* setup a timed data request - data request will be triggered in a few usecs time */ void i8271_device::timed_data_request() { @@ -345,7 +345,7 @@ command completion. Required for read data and write data, where last byte could void i8271_device::timed_command_complete() { int usecs; - + /* 64 for single density - 2 crc bytes later*/ usecs = 64*2; @@ -669,7 +669,7 @@ void i8271_device::do_read() void i8271_device::do_read_id() { chrn_id id; - + /* get next id from disc */ current_image()->floppy_drive_get_next_id(m_side,&id); diff --git a/src/emu/machine/i8271.h b/src/emu/machine/i8271.h index 52e5c5ac7fd..496d655c9c5 100644 --- a/src/emu/machine/i8271.h +++ b/src/emu/machine/i8271.h @@ -46,14 +46,14 @@ public: DECLARE_READ8_MEMBER(data_r); DECLARE_WRITE8_MEMBER(data_w); - + protected: // device-level overrides virtual void device_config_complete(); virtual void device_start(); virtual void device_reset(); virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr); - + private: // internal state enum @@ -64,7 +64,7 @@ private: devcb2_write_line m_write_irq; devcb2_write_line m_write_drq; - + int m_flags; int m_state; unsigned char m_Command; @@ -127,7 +127,7 @@ private: emu_timer *m_data_timer; emu_timer *m_command_complete_timer; - + legacy_floppy_image_device *current_image(); void seek_to_track(int track); void load_bad_tracks(int surface); diff --git a/src/emu/machine/i8355.h b/src/emu/machine/i8355.h index ab2cfbb827b..1316c2ffa21 100644 --- a/src/emu/machine/i8355.h +++ b/src/emu/machine/i8355.h @@ -57,13 +57,13 @@ #define MCFG_I8355_OUT_PA_CB(_devcb) \ devcb = &i8355_device::set_out_pa_callback(*device, DEVCB2_##_devcb); - + #define MCFG_I8355_IN_PB_CB(_devcb) \ devcb = &i8355_device::set_in_pb_callback(*device, DEVCB2_##_devcb); - + #define MCFG_I8355_OUT_PB_CB(_devcb) \ devcb = &i8355_device::set_out_pb_callback(*device, DEVCB2_##_devcb); - + ///************************************************************************* // TYPE DEFINITIONS @@ -82,7 +82,7 @@ public: template<class _Object> static devcb2_base &set_out_pa_callback(device_t &device, _Object object) { return downcast<i8355_device &>(device).m_out_pa_cb.set_callback(object); } template<class _Object> static devcb2_base &set_in_pb_callback(device_t &device, _Object object) { return downcast<i8355_device &>(device).m_in_pb_cb.set_callback(object); } template<class _Object> static devcb2_base &set_out_pb_callback(device_t &device, _Object object) { return downcast<i8355_device &>(device).m_out_pb_cb.set_callback(object); } - + DECLARE_READ8_MEMBER( io_r ); DECLARE_WRITE8_MEMBER( io_w ); diff --git a/src/emu/machine/im6402.h b/src/emu/machine/im6402.h index 3779ad7a99e..7c45743bbf7 100644 --- a/src/emu/machine/im6402.h +++ b/src/emu/machine/im6402.h @@ -78,7 +78,7 @@ // ======================> im6402_device class im6402_device : public device_t, - public device_serial_interface + public device_serial_interface { public: // construction/destruction diff --git a/src/emu/machine/ins8154.h b/src/emu/machine/ins8154.h index 4c836c9e6c6..238685582f7 100644 --- a/src/emu/machine/ins8154.h +++ b/src/emu/machine/ins8154.h @@ -46,13 +46,13 @@ #define MCFG_INS8154_IN_A_CB(_devcb) \ devcb = &ins8154_device::set_in_a_callback(*device, DEVCB2_##_devcb); - + #define MCFG_INS8154_OUT_A_CB(_devcb) \ devcb = &ins8154_device::set_out_a_callback(*device, DEVCB2_##_devcb); - + #define MCFG_INS8154_IN_B_CB(_devcb) \ devcb = &ins8154_device::set_in_b_callback(*device, DEVCB2_##_devcb); - + #define MCFG_INS8154_OUT_B_CB(_devcb) \ devcb = &ins8154_device::set_out_b_callback(*device, DEVCB2_##_devcb); @@ -76,7 +76,7 @@ public: template<class _Object> static devcb2_base &set_in_b_callback(device_t &device, _Object object) { return downcast<ins8154_device &>(device).m_in_b_cb.set_callback(object); } template<class _Object> static devcb2_base &set_out_b_callback(device_t &device, _Object object) { return downcast<ins8154_device &>(device).m_out_b_cb.set_callback(object); } template<class _Object> static devcb2_base &set_out_irq_callback(device_t &device, _Object object) { return downcast<ins8154_device &>(device).m_out_irq_cb.set_callback(object); } - + DECLARE_READ8_MEMBER( ins8154_r ); DECLARE_WRITE8_MEMBER( ins8154_w ); diff --git a/src/emu/machine/k053252.h b/src/emu/machine/k053252.h index c1ecccbf657..027c2144f03 100644 --- a/src/emu/machine/k053252.h +++ b/src/emu/machine/k053252.h @@ -19,7 +19,7 @@ devcb = &k053252_device::set_int2_ack_callback(*device, DEVCB2_##_devcb); /*#define MCFG_K053252_INT_TIME_CB(_devcb) \ - devcb = &k053252_device::set_int_time_callback(*device, DEVCB2_##_devcb); */ + devcb = &k053252_device::set_int_time_callback(*device, DEVCB2_##_devcb); */ #define MCFG_K053252_OFFSETS(_offsx, _offsy) \ k053252_device::set_offsets(*device, _offsx, _offsy); @@ -38,7 +38,7 @@ public: template<class _Object> static devcb2_base &set_int2_ack_callback(device_t &device, _Object object) { return downcast<k053252_device &>(device).m_int2_ack_cb.set_callback(object); } //template<class _Object> static devcb2_base &set_int_time_callback(device_t &device, _Object object) { return downcast<k053252_device &>(device).m_int_time_cb.set_callback(object); } static void set_offsets(device_t &device, int offsx, int offsy) { downcast<k053252_device &>(device).m_offsx = offsx; downcast<k053252_device &>(device).m_offsy = offsy;} - + DECLARE_READ8_MEMBER( read ); // CCU registers DECLARE_WRITE8_MEMBER( write ); diff --git a/src/emu/machine/kb3600.c b/src/emu/machine/kb3600.c index de24bd3f822..62d961ba51a 100644 --- a/src/emu/machine/kb3600.c +++ b/src/emu/machine/kb3600.c @@ -160,7 +160,7 @@ void ay3600_device::device_timer(emu_timer &timer, device_timer_id id, int param if (!found) { - ako = 1; + ako = 1; if (m_b != b) { @@ -181,7 +181,7 @@ void ay3600_device::device_timer(emu_timer &timer, device_timer_id id, int param } } } - else // key released, unmark it from the keys_down table + else // key released, unmark it from the keys_down table { for (int k = 0; k < MAX_KEYS_DOWN; k++) { diff --git a/src/emu/machine/kb3600.h b/src/emu/machine/kb3600.h index 003424ea8bf..47b40f976ac 100644 --- a/src/emu/machine/kb3600.h +++ b/src/emu/machine/kb3600.h @@ -65,31 +65,31 @@ // INTERFACE CONFIGURATION MACROS //************************************************************************** -#define MCFG_AY3600_MATRIX_X0(_cb) \ +#define MCFG_AY3600_MATRIX_X0(_cb) \ devcb = &ay3600_device::set_x0_cb(*device, DEVCB2_##_cb); -#define MCFG_AY3600_MATRIX_X1(_cb) \ +#define MCFG_AY3600_MATRIX_X1(_cb) \ devcb = &ay3600_device::set_x1_cb(*device, DEVCB2_##_cb); -#define MCFG_AY3600_MATRIX_X2(_cb) \ +#define MCFG_AY3600_MATRIX_X2(_cb) \ devcb = &ay3600_device::set_x2_cb(*device, DEVCB2_##_cb); -#define MCFG_AY3600_MATRIX_X3(_cb) \ +#define MCFG_AY3600_MATRIX_X3(_cb) \ devcb = &ay3600_device::set_x3_cb(*device, DEVCB2_##_cb); -#define MCFG_AY3600_MATRIX_X4(_cb) \ +#define MCFG_AY3600_MATRIX_X4(_cb) \ devcb = &ay3600_device::set_x4_cb(*device, DEVCB2_##_cb); -#define MCFG_AY3600_MATRIX_X5(_cb) \ +#define MCFG_AY3600_MATRIX_X5(_cb) \ devcb = &ay3600_device::set_x5_cb(*device, DEVCB2_##_cb); -#define MCFG_AY3600_MATRIX_X6(_cb) \ +#define MCFG_AY3600_MATRIX_X6(_cb) \ devcb = &ay3600_device::set_x6_cb(*device, DEVCB2_##_cb); -#define MCFG_AY3600_MATRIX_X7(_cb) \ +#define MCFG_AY3600_MATRIX_X7(_cb) \ devcb = &ay3600_device::set_x7_cb(*device, DEVCB2_##_cb); -#define MCFG_AY3600_MATRIX_X8(_cb) \ +#define MCFG_AY3600_MATRIX_X8(_cb) \ devcb = &ay3600_device::set_x8_cb(*device, DEVCB2_##_cb); -#define MCFG_AY3600_SHIFT_CB(_cb) \ +#define MCFG_AY3600_SHIFT_CB(_cb) \ devcb = &ay3600_device::set_shift_cb(*device, DEVCB2_##_cb); -#define MCFG_AY3600_CONTROL_CB(_cb) \ +#define MCFG_AY3600_CONTROL_CB(_cb) \ devcb = &ay3600_device::set_control_cb(*device, DEVCB2_##_cb); -#define MCFG_AY3600_DATA_READY_CB(_cb) \ +#define MCFG_AY3600_DATA_READY_CB(_cb) \ devcb = &ay3600_device::set_data_ready_cb(*device, DEVCB2_##_cb); -#define MCFG_AY3600_AKO_CB(_cb) \ +#define MCFG_AY3600_AKO_CB(_cb) \ devcb = &ay3600_device::set_ako_cb(*device, DEVCB2_##_cb); //************************************************************************** diff --git a/src/emu/machine/kr2376.c b/src/emu/machine/kr2376.c index 8829e2ede0b..b58885a87fe 100644 --- a/src/emu/machine/kr2376.c +++ b/src/emu/machine/kr2376.c @@ -346,4 +346,4 @@ INPUT_PORTS_END ioport_constructor kr2376_device::device_input_ports() const { return INPUT_PORTS_NAME( kr2376 ); -}
\ No newline at end of file +} diff --git a/src/emu/machine/kr2376.h b/src/emu/machine/kr2376.h index 3f7d9fe696c..dad802f94e6 100644 --- a/src/emu/machine/kr2376.h +++ b/src/emu/machine/kr2376.h @@ -59,7 +59,7 @@ public: ~kr2376_device() {} template<class _Object> static devcb2_base &set_strobe_wr_callback(device_t &device, _Object object) { return downcast<kr2376_device &>(device).m_write_strobe.set_callback(object); } - + /* keyboard data */ DECLARE_READ8_MEMBER( data_r ); @@ -74,7 +74,7 @@ protected: virtual void device_start(); virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr); virtual ioport_constructor device_input_ports() const; - + private: // internal state int m_pins[41]; @@ -91,12 +91,12 @@ private: /* timers */ emu_timer *m_scan_timer; /* keyboard scan timer */ devcb2_write_line m_write_strobe; - + enum { TIMER_SCAN_TICK }; - + void change_output_lines(); void clock_scan_counters(); void detect_keypress(); diff --git a/src/emu/machine/laserdsc.c b/src/emu/machine/laserdsc.c index 0337f28147a..cc0c46e8461 100644 --- a/src/emu/machine/laserdsc.c +++ b/src/emu/machine/laserdsc.c @@ -314,7 +314,7 @@ void laserdisc_device::device_start() // if we have a palette and it's not started, wait for it if (m_overlay_palette != NULL && !m_overlay_palette->started()) throw device_missing_dependencies(); - + // initialize the various pieces init_disc(); init_video(); @@ -373,7 +373,7 @@ void laserdisc_device::device_validity_check(validity_checker &valid) const { texture_format texformat = !m_overupdate_ind16.isnull() ? TEXFORMAT_PALETTE16 : TEXFORMAT_RGB32; if (m_overlay_palette == NULL && texformat == TEXFORMAT_PALETTE16) - mame_printf_error("Overlay screen does not have palette defined\n"); + mame_printf_error("Overlay screen does not have palette defined\n"); } //------------------------------------------------- diff --git a/src/emu/machine/latch8.c b/src/emu/machine/latch8.c index ae82c8f7b4f..5d8444b6a0a 100644 --- a/src/emu/machine/latch8.c +++ b/src/emu/machine/latch8.c @@ -54,7 +54,7 @@ READ8_MEMBER( latch8_device::read ) { int i; for (i=0; i<8; i++) - { + { if (i==0 && !m_read_0.isnull()) { res &= ~( 1 << i); res |= ((m_read_0(space, 0, 0xff) >> m_offset[i]) & 0x01) << i; } if (i==1 && !m_read_1.isnull()) { res &= ~( 1 << i); res |= ((m_read_1(space, 0, 0xff) >> m_offset[i]) & 0x01) << i; } if (i==2 && !m_read_2.isnull()) { res &= ~( 1 << i); res |= ((m_read_2(space, 0, 0xff) >> m_offset[i]) & 0x01) << i; } @@ -62,7 +62,7 @@ READ8_MEMBER( latch8_device::read ) if (i==4 && !m_read_4.isnull()) { res &= ~( 1 << i); res |= ((m_read_4(space, 0, 0xff) >> m_offset[i]) & 0x01) << i; } if (i==5 && !m_read_5.isnull()) { res &= ~( 1 << i); res |= ((m_read_5(space, 0, 0xff) >> m_offset[i]) & 0x01) << i; } if (i==6 && !m_read_6.isnull()) { res &= ~( 1 << i); res |= ((m_read_6(space, 0, 0xff) >> m_offset[i]) & 0x01) << i; } - if (i==7 && !m_read_7.isnull()) { res &= ~( 1 << i); res |= ((m_read_7(space, 0, 0xff) >> m_offset[i]) & 0x01) << i;} + if (i==7 && !m_read_7.isnull()) { res &= ~( 1 << i); res |= ((m_read_7(space, 0, 0xff) >> m_offset[i]) & 0x01) << i;} } } return (res & ~m_maskout) ^ m_xorvalue; @@ -150,7 +150,7 @@ latch8_device::latch8_device(const machine_config &mconfig, const char *tag, dev m_has_read(0), m_maskout(0), m_xorvalue(0), - m_nosync(0), + m_nosync(0), m_write_0(*this), m_write_1(*this), m_write_2(*this), @@ -168,13 +168,13 @@ latch8_device::latch8_device(const machine_config &mconfig, const char *tag, dev m_read_6(*this), m_read_7(*this) { - memset(m_offset, 0, sizeof(m_offset)); + memset(m_offset, 0, sizeof(m_offset)); } //------------------------------------------------- // device_validity_check - validate device -// configuration +// configuration //------------------------------------------------- void latch8_device::device_validity_check(validity_checker &valid) const @@ -202,7 +202,7 @@ void latch8_device::device_start() m_write_5.resolve(); m_write_6.resolve(); m_write_7.resolve(); - + m_read_0.resolve(); m_read_1.resolve(); m_read_2.resolve(); @@ -211,7 +211,7 @@ void latch8_device::device_start() m_read_5.resolve(); m_read_6.resolve(); m_read_7.resolve(); - + /* setup nodemap */ if (!m_write_0.isnull()) m_has_write = 1; if (!m_write_1.isnull()) m_has_write = 1; @@ -221,7 +221,7 @@ void latch8_device::device_start() if (!m_write_5.isnull()) m_has_write = 1; if (!m_write_6.isnull()) m_has_write = 1; if (!m_write_7.isnull()) m_has_write = 1; - + /* setup device read handlers */ if (!m_read_0.isnull()) m_has_read = 1; if (!m_read_1.isnull()) m_has_read = 1; diff --git a/src/emu/machine/latch8.h b/src/emu/machine/latch8.h index 3b195732c2f..50048dfb246 100644 --- a/src/emu/machine/latch8.h +++ b/src/emu/machine/latch8.h @@ -26,8 +26,8 @@ class latch8_device : public device_t { public: latch8_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - - + + /* write & read full byte */ DECLARE_READ8_MEMBER( read ); @@ -76,7 +76,7 @@ public: static void set_maskout(device_t &device, UINT32 maskout) { downcast<latch8_device &>(device).m_maskout = maskout; } static void set_xorvalue(device_t &device, UINT32 xorvalue) { downcast<latch8_device &>(device).m_xorvalue = xorvalue; } static void set_nosync(device_t &device, UINT32 nosync) { downcast<latch8_device &>(device).m_nosync = nosync; } - + template<class _Object> static devcb2_base &set_write_0(device_t &device, _Object object, UINT32 offset) { downcast<latch8_device &>(device).m_offset[0] = offset; return downcast<latch8_device &>(device).m_write_0.set_callback(object); } template<class _Object> static devcb2_base &set_write_1(device_t &device, _Object object, UINT32 offset) { downcast<latch8_device &>(device).m_offset[1] = offset; return downcast<latch8_device &>(device).m_write_1.set_callback(object); } template<class _Object> static devcb2_base &set_write_2(device_t &device, _Object object, UINT32 offset) { downcast<latch8_device &>(device).m_offset[2] = offset; return downcast<latch8_device &>(device).m_write_2.set_callback(object); } @@ -85,7 +85,7 @@ public: template<class _Object> static devcb2_base &set_write_5(device_t &device, _Object object, UINT32 offset) { downcast<latch8_device &>(device).m_offset[5] = offset; return downcast<latch8_device &>(device).m_write_5.set_callback(object); } template<class _Object> static devcb2_base &set_write_6(device_t &device, _Object object, UINT32 offset) { downcast<latch8_device &>(device).m_offset[6] = offset; return downcast<latch8_device &>(device).m_write_6.set_callback(object); } template<class _Object> static devcb2_base &set_write_7(device_t &device, _Object object, UINT32 offset) { downcast<latch8_device &>(device).m_offset[7] = offset; return downcast<latch8_device &>(device).m_write_7.set_callback(object); } - + template<class _Object> static devcb2_base &set_read_0(device_t &device, _Object object, UINT32 offset) { downcast<latch8_device &>(device).m_offset[0] = offset; return downcast<latch8_device &>(device).m_read_0.set_callback(object); } template<class _Object> static devcb2_base &set_read_1(device_t &device, _Object object, UINT32 offset) { downcast<latch8_device &>(device).m_offset[1] = offset; return downcast<latch8_device &>(device).m_read_1.set_callback(object); } template<class _Object> static devcb2_base &set_read_2(device_t &device, _Object object, UINT32 offset) { downcast<latch8_device &>(device).m_offset[2] = offset; return downcast<latch8_device &>(device).m_read_2.set_callback(object); } @@ -94,13 +94,13 @@ public: template<class _Object> static devcb2_base &set_read_5(device_t &device, _Object object, UINT32 offset) { downcast<latch8_device &>(device).m_offset[5] = offset; return downcast<latch8_device &>(device).m_read_5.set_callback(object); } template<class _Object> static devcb2_base &set_read_6(device_t &device, _Object object, UINT32 offset) { downcast<latch8_device &>(device).m_offset[6] = offset; return downcast<latch8_device &>(device).m_read_6.set_callback(object); } template<class _Object> static devcb2_base &set_read_7(device_t &device, _Object object, UINT32 offset) { downcast<latch8_device &>(device).m_offset[7] = offset; return downcast<latch8_device &>(device).m_read_7.set_callback(object); } - + protected: // device-level overrides virtual void device_start(); virtual void device_reset(); virtual void device_validity_check(validity_checker &valid) const; - + TIMER_CALLBACK_MEMBER( timerproc ); void update(UINT8 new_val, UINT8 mask); inline UINT8 bitx_r( offs_t offset, int bit); @@ -110,12 +110,12 @@ private: UINT8 m_value; UINT8 m_has_write; UINT8 m_has_read; - + /* only for byte reads, does not affect bit reads and node_map */ UINT32 m_maskout; UINT32 m_xorvalue; /* after mask */ UINT32 m_nosync; - + devcb2_write8 m_write_0; devcb2_write8 m_write_1; devcb2_write8 m_write_2; @@ -133,7 +133,7 @@ private: devcb2_read8 m_read_5; devcb2_read8 m_read_6; devcb2_read8 m_read_7; - + UINT32 m_offset[8]; }; @@ -186,7 +186,7 @@ extern const device_type LATCH8; /* Upon read, replace bits by reading from another device handler */ #define MCFG_LATCH8_READ_0(_devcb, _from_bit) \ devcb = &latch8_device::set_read_0(*device, DEVCB2_##_devcb, _from_bit); - + #define MCFG_LATCH8_READ_1(_devcb, _from_bit) \ devcb = &latch8_device::set_read_1(*device, DEVCB2_##_devcb, _from_bit); diff --git a/src/emu/machine/lh5810.h b/src/emu/machine/lh5810.h index 4f70a48db84..901740dc510 100644 --- a/src/emu/machine/lh5810.h +++ b/src/emu/machine/lh5810.h @@ -43,16 +43,16 @@ enum #define MCFG_LH5810_PORTA_W_CB(_devcb) \ devcb = &lh5810_device::set_porta_w_callback(*device, DEVCB2_##_devcb); - + #define MCFG_LH5810_PORTB_R_CB(_devcb) \ devcb = &lh5810_device::set_portb_r_callback(*device, DEVCB2_##_devcb); - + #define MCFG_LH5810_PORTB_W_CB(_devcb) \ devcb = &lh5810_device::set_portb_w_callback(*device, DEVCB2_##_devcb); - + #define MCFG_LH5810_PORTC_W_CB(_devcb) \ devcb = &lh5810_device::set_portc_w_callback(*device, DEVCB2_##_devcb); - + #define MCFG_LH5810_OUT_INT_CB(_devcb) \ devcb = &lh5810_device::set_out_int_callback(*device, DEVCB2_##_devcb); //currently unused @@ -76,7 +76,7 @@ public: template<class _Object> static devcb2_base &set_portb_w_callback(device_t &device, _Object object) { return downcast<lh5810_device &>(device).m_portb_w_cb.set_callback(object); } template<class _Object> static devcb2_base &set_portc_w_callback(device_t &device, _Object object) { return downcast<lh5810_device &>(device).m_portc_w_cb.set_callback(object); } template<class _Object> static devcb2_base &set_out_int_callback(device_t &device, _Object object) { return downcast<lh5810_device &>(device).m_out_int_cb.set_callback(object); } - + DECLARE_READ8_MEMBER( data_r ); DECLARE_WRITE8_MEMBER( data_w ); diff --git a/src/emu/machine/mb87078.c b/src/emu/machine/mb87078.c index 7e06e38685e..5552e44e245 100644 --- a/src/emu/machine/mb87078.c +++ b/src/emu/machine/mb87078.c @@ -119,7 +119,7 @@ mb87078_device::mb87078_device(const machine_config &mconfig, const char *tag, d void mb87078_device::device_start() { m_gain_changed_cb.resolve_safe(); - + save_item(NAME(m_channel_latch)); save_item(NAME(m_reset_comp)); save_item(NAME(m_latch[0])); diff --git a/src/emu/machine/mb87078.h b/src/emu/machine/mb87078.h index 2e8ef88ddd3..3b578ebd961 100644 --- a/src/emu/machine/mb87078.h +++ b/src/emu/machine/mb87078.h @@ -25,7 +25,7 @@ class mb87078_device : public device_t public: mb87078_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); ~mb87078_device() {} - + template<class _Object> static devcb2_base &set_gain_changed_callback(device_t &device, _Object object) { return downcast<mb87078_device &>(device).m_gain_changed_cb.set_callback(object); } void data_w(int data, int dsel); @@ -57,7 +57,7 @@ private: int m_channel_latch; /* current channel */ UINT8 m_latch[2][4]; /* 6bit+3bit 4 data latches */ UINT8 m_reset_comp; - + devcb2_write8 m_gain_changed_cb; }; diff --git a/src/emu/machine/mc2661.h b/src/emu/machine/mc2661.h index 36d78fe62f7..3994adc94a5 100644 --- a/src/emu/machine/mc2661.h +++ b/src/emu/machine/mc2661.h @@ -78,7 +78,7 @@ // ======================> mc2661_device class mc2661_device : public device_t, - public device_serial_interface + public device_serial_interface { public: // construction/destruction diff --git a/src/emu/machine/mc68328.h b/src/emu/machine/mc68328.h index 64e7385f439..f8198250a44 100644 --- a/src/emu/machine/mc68328.h +++ b/src/emu/machine/mc68328.h @@ -633,8 +633,8 @@ public: template<class _Object> static devcb2_base &set_out_spim_callback(device_t &device, _Object object) { return downcast<mc68328_device &>(device).m_out_spim_cb.set_callback(object); } template<class _Object> static devcb2_base &set_in_spim_callback(device_t &device, _Object object) { return downcast<mc68328_device &>(device).m_in_spim_cb.set_callback(object); } template<class _Object> static devcb2_base &set_spim_xch_trigger_callback(device_t &device, _Object object) { return downcast<mc68328_device &>(device).m_spim_xch_trigger_cb.set_callback(object); } - - + + DECLARE_WRITE16_MEMBER(write); DECLARE_READ16_MEMBER(read); DECLARE_WRITE_LINE_MEMBER(set_penirq_line); @@ -699,82 +699,82 @@ private: required_device<cpu_device> m_cpu; }; - + extern const device_type MC68328; #define MCFG_MC68328_CPU(_tag) \ mc68328_device::static_set_cpu_tag(*device, "^"_tag); - + #define MCFG_MC68328_OUT_PORT_A_CB(_devcb) \ devcb = &mc68328_device::set_out_port_a_callback(*device, DEVCB2_##_devcb); - + #define MCFG_MC68328_OUT_PORT_B_CB(_devcb) \ devcb = &mc68328_device::set_out_port_b_callback(*device, DEVCB2_##_devcb); - + #define MCFG_MC68328_OUT_PORT_C_CB(_devcb) \ devcb = &mc68328_device::set_out_port_c_callback(*device, DEVCB2_##_devcb); - + #define MCFG_MC68328_OUT_PORT_D_CB(_devcb) \ devcb = &mc68328_device::set_out_port_d_callback(*device, DEVCB2_##_devcb); - + #define MCFG_MC68328_OUT_PORT_E_CB(_devcb) \ devcb = &mc68328_device::set_out_port_e_callback(*device, DEVCB2_##_devcb); - + #define MCFG_MC68328_OUT_PORT_F_CB(_devcb) \ devcb = &mc68328_device::set_out_port_f_callback(*device, DEVCB2_##_devcb); - + #define MCFG_MC68328_OUT_PORT_G_CB(_devcb) \ devcb = &mc68328_device::set_out_port_g_callback(*device, DEVCB2_##_devcb); - + #define MCFG_MC68328_OUT_PORT_J_CB(_devcb) \ devcb = &mc68328_device::set_out_port_j_callback(*device, DEVCB2_##_devcb); - + #define MCFG_MC68328_OUT_PORT_K_CB(_devcb) \ devcb = &mc68328_device::set_out_port_k_callback(*device, DEVCB2_##_devcb); - + #define MCFG_MC68328_OUT_PORT_M_CB(_devcb) \ devcb = &mc68328_device::set_out_port_m_callback(*device, DEVCB2_##_devcb); - + #define MCFG_MC68328_IN_PORT_A_CB(_devcb) \ devcb = &mc68328_device::set_in_port_a_callback(*device, DEVCB2_##_devcb); - + #define MCFG_MC68328_IN_PORT_B_CB(_devcb) \ devcb = &mc68328_device::set_in_port_b_callback(*device, DEVCB2_##_devcb); - + #define MCFG_MC68328_IN_PORT_C_CB(_devcb) \ devcb = &mc68328_device::set_in_port_c_callback(*device, DEVCB2_##_devcb); - + #define MCFG_MC68328_IN_PORT_D_CB(_devcb) \ devcb = &mc68328_device::set_in_port_d_callback(*device, DEVCB2_##_devcb); - + #define MCFG_MC68328_IN_PORT_E_CB(_devcb) \ devcb = &mc68328_device::set_in_port_e_callback(*device, DEVCB2_##_devcb); - + #define MCFG_MC68328_IN_PORT_F_CB(_devcb) \ devcb = &mc68328_device::set_in_port_f_callback(*device, DEVCB2_##_devcb); - + #define MCFG_MC68328_IN_PORT_G_CB(_devcb) \ devcb = &mc68328_device::set_in_port_g_callback(*device, DEVCB2_##_devcb); - + #define MCFG_MC68328_IN_PORT_J_CB(_devcb) \ devcb = &mc68328_device::set_in_port_j_callback(*device, DEVCB2_##_devcb); - + #define MCFG_MC68328_IN_PORT_K_CB(_devcb) \ devcb = &mc68328_device::set_in_port_k_callback(*device, DEVCB2_##_devcb); - + #define MCFG_MC68328_IN_PORT_M_CB(_devcb) \ devcb = &mc68328_device::set_in_port_m_callback(*device, DEVCB2_##_devcb); - + #define MCFG_MC68328_OUT_PWM_CB(_devcb) \ devcb = &mc68328_device::set_out_pwm_callback(*device, DEVCB2_##_devcb); - + #define MCFG_MC68328_OUT_SPIM_CB(_devcb) \ devcb = &mc68328_device::set_out_spim_callback(*device, DEVCB2_##_devcb); - + #define MCFG_MC68328_IN_SPIM_CB(_devcb) \ devcb = &mc68328_device::set_in_spim_callback(*device, DEVCB2_##_devcb); - + #define MCFG_MC68328_SPIM_XCH_TRIGGER_CB(_devcb) \ devcb = &mc68328_device::set_spim_xch_trigger_callback(*device, DEVCB2_##_devcb); diff --git a/src/emu/machine/mc6843.c b/src/emu/machine/mc6843.c index b7e678603c3..afc9c6a2423 100644 --- a/src/emu/machine/mc6843.c +++ b/src/emu/machine/mc6843.c @@ -144,7 +144,7 @@ void mc6843_device::device_reset() img->floppy_drive_set_ready_state(FLOPPY_DRIVE_READY, 0 ); img->floppy_drive_set_rpm( 300. ); } - + /* reset registers */ m_CMR &= 0xf0; /* zero only command */ m_ISR = 0; @@ -464,7 +464,7 @@ void mc6843_device::device_timer(emu_timer &timer, device_timer_id id, int param } } break; - + default: break; } diff --git a/src/emu/machine/mc6843.h b/src/emu/machine/mc6843.h index 5c66033c1a6..b86ffa5e05b 100644 --- a/src/emu/machine/mc6843.h +++ b/src/emu/machine/mc6843.h @@ -19,7 +19,7 @@ class mc6843_device : public device_t public: mc6843_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); ~mc6843_device() {} - + template<class _Object> static devcb2_base &set_irq_wr_callback(device_t &device, _Object object) { return downcast<mc6843_device &>(device).m_write_irq.set_callback(object); } DECLARE_READ8_MEMBER(read); @@ -34,13 +34,13 @@ protected: virtual void device_start(); virtual void device_reset(); virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr); - + private: enum { TIMER_CONT }; - + devcb2_write_line m_write_irq; /* registers */ @@ -66,7 +66,7 @@ private: /* trigger delayed actions (bottom halves) */ emu_timer* m_timer_cont; - + legacy_floppy_image_device* floppy_image(UINT8 drive); legacy_floppy_image_device* floppy_image(); void status_update(); @@ -78,7 +78,7 @@ private: void finish_RCR(); void cont_SR(); void cont_SW(); - + }; extern const device_type MC6843; diff --git a/src/emu/machine/mc6846.h b/src/emu/machine/mc6846.h index da7974db557..8e420ecaa81 100644 --- a/src/emu/machine/mc6846.h +++ b/src/emu/machine/mc6846.h @@ -18,7 +18,7 @@ #define MCFG_MC6846_OUT_CP2_CB(_devcb) \ devcb = &mc6846_device::set_out_cp2_callback(*device, DEVCB2_##_devcb); - + #define MCFG_MC6846_IN_PORT_CB(_devcb) \ devcb = &mc6846_device::set_in_port_callback(*device, DEVCB2_##_devcb); @@ -41,7 +41,7 @@ public: template<class _Object> static devcb2_base &set_in_port_callback(device_t &device, _Object object) { return downcast<mc6846_device &>(device).m_in_port_cb.set_callback(object); } template<class _Object> static devcb2_base &set_out_cto_callback(device_t &device, _Object object) { return downcast<mc6846_device &>(device).m_out_cto_cb.set_callback(object); } template<class _Object> static devcb2_base &set_irq_callback(device_t &device, _Object object) { return downcast<mc6846_device &>(device).m_irq_cb.set_callback(object); } - + /* interface to CPU via address/data bus*/ DECLARE_READ8_MEMBER(read); DECLARE_WRITE8_MEMBER(write); diff --git a/src/emu/machine/mc68681.c b/src/emu/machine/mc68681.c index 39961a519a0..accc5bda7e4 100644 --- a/src/emu/machine/mc68681.c +++ b/src/emu/machine/mc68681.c @@ -167,7 +167,7 @@ void mc68681_device::update_interrupts() { LOG(( "68681: Interrupt line not active (IMR & ISR = %02X)\n", ISR & IMR)); write_irq(CLEAR_LINE); - m_read_vector = false; // clear IACK too + m_read_vector = false; // clear IACK too } }; @@ -235,7 +235,7 @@ TIMER_CALLBACK_MEMBER( mc68681_device::duart_timer_callback ) // timer output to bit 3? if ((OPCR & 0xc) == 0x4) { - OPR ^= 0x8; + OPR ^= 0x8; write_outport(OPR ^ 0xff); } @@ -280,7 +280,7 @@ READ8_MEMBER( mc68681_device::read ) // reading this clears all the input change bits IPCR &= 0x0f; - ISR &= ~INT_INPUT_PORT_CHANGE; + ISR &= ~INT_INPUT_PORT_CHANGE; update_interrupts(); } break; @@ -304,20 +304,20 @@ READ8_MEMBER( mc68681_device::read ) break; case 0x0a: /* 1X/16X Test */ - r = 0x61; // the old 68681 returned this and it makes Apollo happy + r = 0x61; // the old 68681 returned this and it makes Apollo happy break; case 0x0d: /* IP */ if (!read_inport.isnull()) { - r = read_inport(); // TODO: go away + r = read_inport(); // TODO: go away } else { r = IP_last_state; } - r |= 0x80; // bit 7 is always set + r |= 0x80; // bit 7 is always set // bit 6 is /IACK (note the active-low) if (m_read_vector) @@ -328,7 +328,7 @@ READ8_MEMBER( mc68681_device::read ) { r |= 0x40; } - break; + break; case 0x0e: /* Start counter command */ { @@ -402,7 +402,7 @@ WRITE8_MEMBER( mc68681_device::write ) // check for pending input port delta interrupts if ((((IPCR>>4) & data) & 0x0f) != 0) { - ISR |= INT_INPUT_PORT_CHANGE; + ISR |= INT_INPUT_PORT_CHANGE; } m_chanA->ACR_updated(); @@ -466,7 +466,7 @@ WRITE_LINE_MEMBER( mc68681_device::ip0_w ) if (ACR & 1) { - ISR |= INT_INPUT_PORT_CHANGE; + ISR |= INT_INPUT_PORT_CHANGE; update_interrupts(); } } @@ -486,7 +486,7 @@ WRITE_LINE_MEMBER( mc68681_device::ip1_w ) if (ACR & 2) { - ISR |= INT_INPUT_PORT_CHANGE; + ISR |= INT_INPUT_PORT_CHANGE; update_interrupts(); } } @@ -506,7 +506,7 @@ WRITE_LINE_MEMBER( mc68681_device::ip2_w ) if (ACR & 4) { - ISR |= INT_INPUT_PORT_CHANGE; + ISR |= INT_INPUT_PORT_CHANGE; update_interrupts(); } } @@ -526,7 +526,7 @@ WRITE_LINE_MEMBER( mc68681_device::ip3_w ) if (ACR & 8) { - ISR |= INT_INPUT_PORT_CHANGE; + ISR |= INT_INPUT_PORT_CHANGE; update_interrupts(); } } @@ -671,7 +671,7 @@ void mc68681_channel::rcv_complete() { receive_register_extract(); -// printf("%s ch %d rcv complete\n", tag(), m_ch); +// printf("%s ch %d rcv complete\n", tag(), m_ch); if ( rx_enabled ) { @@ -693,7 +693,7 @@ void mc68681_channel::rcv_complete() void mc68681_channel::tra_complete() { -// printf("%s ch %d Tx complete\n", tag(), m_ch); +// printf("%s ch %d Tx complete\n", tag(), m_ch); tx_ready = 1; SR |= STATUS_TRANSMITTER_READY; @@ -730,7 +730,7 @@ void mc68681_channel::tra_callback() if ((MR2&0xC0) != 0x80) { int bit = transmit_register_get_data_bit(); -// printf("%s ch %d transmit %d\n", tag(), m_ch, bit); +// printf("%s ch %d transmit %d\n", tag(), m_ch, bit); if (m_ch == 0) { m_uart->write_a_tx(bit); @@ -740,7 +740,7 @@ void mc68681_channel::tra_callback() m_uart->write_b_tx(bit); } } - else // must call this to advance the transmitter + else // must call this to advance the transmitter { transmit_register_get_data_bit(); } @@ -750,7 +750,7 @@ void mc68681_channel::update_interrupts() { if (rx_enabled) { - if (rx_fifo_num > 0) + if (rx_fifo_num > 0) { SR |= STATUS_RECEIVER_READY; } @@ -867,7 +867,7 @@ UINT8 mc68681_channel::read_rx_fifo() rx_fifo_num--; update_interrupts(); -// printf("Rx read %02x\n", rv); +// printf("Rx read %02x\n", rv); return rv; }; @@ -917,7 +917,7 @@ void mc68681_channel::write_chan_reg(int reg, UINT8 data) CSR = data; tx_baud_rate = m_uart->calc_baud(m_ch, data & 0xf); rx_baud_rate = m_uart->calc_baud(m_ch, (data>>4) & 0xf); -// printf("%s ch %d CSR %02x Tx baud %d Rx baud %d\n", tag(), m_ch, data, tx_baud_rate, rx_baud_rate); +// printf("%s ch %d CSR %02x Tx baud %d Rx baud %d\n", tag(), m_ch, data, tx_baud_rate, rx_baud_rate); set_rcv_rate(rx_baud_rate); set_tra_rate(tx_baud_rate); break; @@ -1000,7 +1000,7 @@ void mc68681_channel::recalc_framing() break; } -// printf("%s ch %d MR1 %02x MR2 %02x => %d bits / char, %d stop bits, parity %d\n", tag(), m_ch, MR1, MR2, (MR1 & 3)+5, stopbits, parity); +// printf("%s ch %d MR1 %02x MR2 %02x => %d bits / char, %d stop bits, parity %d\n", tag(), m_ch, MR1, MR2, (MR1 & 3)+5, stopbits, parity); set_data_frame(1, (MR1 & 3)+5, parity, stopbits); } @@ -1092,7 +1092,7 @@ void mc68681_channel::write_TX(UINT8 data) printf("Write %02x to TX when TX not ready!\n", data); }*/ -// printf("%s ch %d Tx %02x\n", tag(), m_ch, data); +// printf("%s ch %d Tx %02x\n", tag(), m_ch, data); tx_ready = 0; SR &= ~STATUS_TRANSMITTER_READY; diff --git a/src/emu/machine/mc68681.h b/src/emu/machine/mc68681.h index e56ad90041c..5fa87b31042 100644 --- a/src/emu/machine/mc68681.h +++ b/src/emu/machine/mc68681.h @@ -149,7 +149,7 @@ private: PAIR CTR; /* Counter/Timer Preset Value */ UINT8 IPCR; /* Input Port Control Register */ - bool m_read_vector; // if this is read and IRQ is active, it counts as pulling IACK + bool m_read_vector; // if this is read and IRQ is active, it counts as pulling IACK /* state */ UINT8 IP_last_state; /* last state of IP bits */ diff --git a/src/emu/machine/mc68901.c b/src/emu/machine/mc68901.c index 40e499a8654..80b40357dac 100644 --- a/src/emu/machine/mc68901.c +++ b/src/emu/machine/mc68901.c @@ -530,7 +530,7 @@ void mc68901_device::rcv_complete() receive_register_extract(); m_receive_buffer = get_received_char(); //if (m_receive_pending) TODO: error? - + m_receive_pending = 1; rx_buffer_full(); } diff --git a/src/emu/machine/mc68901.h b/src/emu/machine/mc68901.h index e4b52ed31ed..d3612c6d111 100644 --- a/src/emu/machine/mc68901.h +++ b/src/emu/machine/mc68901.h @@ -74,16 +74,16 @@ #define MCFG_MC68901_OUT_TDO_CB(_devcb) \ devcb = &mc68901_device::set_out_tdo_callback(*device, DEVCB2_##_devcb); - + #define MCFG_MC68901_OUT_SO_CB(_devcb) \ devcb = &mc68901_device::set_out_so_callback(*device, DEVCB2_##_devcb); /*#define MCFG_MC68901_OUT_RR_CB(_devcb) \ - devcb = &mc68901_device::set_out_rr_callback(*device, DEVCB2_##_devcb); + devcb = &mc68901_device::set_out_rr_callback(*device, DEVCB2_##_devcb); #define MCFG_MC68901_OUT_TR_CB(_devcb) \ - devcb = &mc68901_device::set_out_tr_callback(*device, DEVCB2_##_devcb);*/ - + devcb = &mc68901_device::set_out_tr_callback(*device, DEVCB2_##_devcb);*/ + //************************************************************************** // TYPE DEFINITIONS @@ -98,7 +98,7 @@ class mc68901_device : public device_t, public: // construction/destruction mc68901_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - + static void set_timer_clock(device_t &device, int timer_clock) { downcast<mc68901_device &>(device).m_timer_clock = timer_clock; } static void set_rx_clock(device_t &device, int rx_clock) { downcast<mc68901_device &>(device).m_rx_clock = rx_clock; } static void set_tx_clock(device_t &device, int tx_clock) { downcast<mc68901_device &>(device).m_tx_clock = tx_clock; } diff --git a/src/emu/machine/mm58167.c b/src/emu/machine/mm58167.c index 4cfdfe74070..40a93285480 100644 --- a/src/emu/machine/mm58167.c +++ b/src/emu/machine/mm58167.c @@ -1,9 +1,9 @@ /********************************************************************** mm58167.c - National Semiconductor MM58167 real-time clock emulation - + TODO: alarms and IRQs not used by the Apple /// and aren't implemented. - + **********************************************************************/ #include "mm58167.h" @@ -18,30 +18,30 @@ const device_type MM58167 = &device_creator<mm58167_device>; // registers (0-7 are the live data, 8-f are the setting for the compare IRQ) typedef enum { - R_CNT_MILLISECONDS = 0, // 0 = milliseconds - R_CNT_HUNDTENTHS, // 1 = hundreds and tenths of seconds - R_CNT_SECONDS, // 2 = seconds - R_CNT_MINUTES, // 3 = minutes - R_CNT_HOURS, // 4 = hours - R_CNT_DAYOFWEEK, // 5 = day of the week - R_CNT_DAYOFMONTH, // 6 = day of the month - R_CNT_MONTH, // 7 = month - R_RAM_MILLISECONDS, // 8 = milliseconds - R_RAM_HUNDTENTHS, // 9 = hundreds and tenths of seconds - R_RAM_SECONDS, // a = seconds - R_RAM_MINUTES, // b = minutes - R_RAM_HOURS, // c = hours - R_RAM_DAYOFWEEK, // d = day of the week - R_RAM_DAYOFMONTH, // e = day of the month - R_RAM_MONTH, // f = month - R_CTL_IRQSTATUS, // 10 = IRQ status (b7 = compare, b6 = 10th sec, b5 = sec, b4 = min, b3 = hour, b2 = day, b1 = week, b0 = month) - R_CTL_IRQCONTROL, // 11 = IRQ control (same bit layout as status, but write here to enable/disable/clear) - R_CTL_RESETCOUNTERS, // 12 = reset counters - R_CTL_RESETRAM, // 13 = reset RAM - R_CTL_STATUS, // 14 = status bit - R_CTL_GOCMD, // 15 = GO Command - R_CTL_STANDBYIRQ, // 16 = standby IRQ - R_CTL_TESTMODE // 17 = test mode + R_CNT_MILLISECONDS = 0, // 0 = milliseconds + R_CNT_HUNDTENTHS, // 1 = hundreds and tenths of seconds + R_CNT_SECONDS, // 2 = seconds + R_CNT_MINUTES, // 3 = minutes + R_CNT_HOURS, // 4 = hours + R_CNT_DAYOFWEEK, // 5 = day of the week + R_CNT_DAYOFMONTH, // 6 = day of the month + R_CNT_MONTH, // 7 = month + R_RAM_MILLISECONDS, // 8 = milliseconds + R_RAM_HUNDTENTHS, // 9 = hundreds and tenths of seconds + R_RAM_SECONDS, // a = seconds + R_RAM_MINUTES, // b = minutes + R_RAM_HOURS, // c = hours + R_RAM_DAYOFWEEK, // d = day of the week + R_RAM_DAYOFMONTH, // e = day of the month + R_RAM_MONTH, // f = month + R_CTL_IRQSTATUS, // 10 = IRQ status (b7 = compare, b6 = 10th sec, b5 = sec, b4 = min, b3 = hour, b2 = day, b1 = week, b0 = month) + R_CTL_IRQCONTROL, // 11 = IRQ control (same bit layout as status, but write here to enable/disable/clear) + R_CTL_RESETCOUNTERS, // 12 = reset counters + R_CTL_RESETRAM, // 13 = reset RAM + R_CTL_STATUS, // 14 = status bit + R_CTL_GOCMD, // 15 = GO Command + R_CTL_STANDBYIRQ, // 16 = standby IRQ + R_CTL_TESTMODE // 17 = test mode } mm58167_regs_t; //------------------------------------------------- @@ -81,7 +81,7 @@ void mm58167_device::device_reset() { set_current_time(machine()); - m_regs[R_CTL_STATUS] = 0; // not busy + m_regs[R_CTL_STATUS] = 0; // not busy m_milliseconds = 0; } @@ -116,23 +116,23 @@ void mm58167_device::device_timer(emu_timer &timer, device_timer_id id, int para void mm58167_device::rtc_clock_updated(int year, int month, int day, int day_of_week, int hour, int minute, int second) { - m_regs[R_CNT_SECONDS] = make_bcd(second); // seconds (BCD) - m_regs[R_CNT_MINUTES] = make_bcd(minute); // minutes (BCD) - m_regs[R_CNT_HOURS] = make_bcd(hour); // hour (BCD) - m_regs[R_CNT_DAYOFWEEK] = make_bcd(day_of_week); // day of the week (BCD) - m_regs[R_CNT_DAYOFMONTH] = make_bcd(day); // day of the month (BCD) - m_regs[R_CNT_MONTH] = make_bcd(month); // month (BCD) + m_regs[R_CNT_SECONDS] = make_bcd(second); // seconds (BCD) + m_regs[R_CNT_MINUTES] = make_bcd(minute); // minutes (BCD) + m_regs[R_CNT_HOURS] = make_bcd(hour); // hour (BCD) + m_regs[R_CNT_DAYOFWEEK] = make_bcd(day_of_week); // day of the week (BCD) + m_regs[R_CNT_DAYOFMONTH] = make_bcd(day); // day of the month (BCD) + m_regs[R_CNT_MONTH] = make_bcd(month); // month (BCD) } READ8_MEMBER(mm58167_device::read) { -// printf("read reg %x = %02x\n", offset, m_regs[offset]); +// printf("read reg %x = %02x\n", offset, m_regs[offset]); return m_regs[offset]; } WRITE8_MEMBER(mm58167_device::write) { -// printf("%02x to reg %x\n", data, offset); +// printf("%02x to reg %x\n", data, offset); if ((offset >= R_RAM_MILLISECONDS) && (offset != R_CTL_IRQSTATUS)) { @@ -149,7 +149,7 @@ WRITE8_MEMBER(mm58167_device::write) case R_CTL_RESETRAM: if (data == 0xff) { - for (int i = R_RAM_MILLISECONDS; i < R_CTL_IRQSTATUS; i++) + for (int i = R_RAM_MILLISECONDS; i < R_CTL_IRQSTATUS; i++) { m_regs[i] = 0; } @@ -159,9 +159,8 @@ WRITE8_MEMBER(mm58167_device::write) case R_CTL_IRQCONTROL: if (data != 0) { - logerror("MM58167: IRQs not implemented\n"); + logerror("MM58167: IRQs not implemented\n"); } break; } } - diff --git a/src/emu/machine/mm58167.h b/src/emu/machine/mm58167.h index 5605afb680d..830209bffa0 100644 --- a/src/emu/machine/mm58167.h +++ b/src/emu/machine/mm58167.h @@ -1,9 +1,9 @@ /********************************************************************** mm58167.h - National Semiconductor MM58167 real-time clock emulation - - license: MAME, BSD-3-Clause, LGPL v2 - copyright-holders: R. Belmont + + license: MAME, BSD-3-Clause, LGPL v2 + copyright-holders: R. Belmont **********************************************************************/ diff --git a/src/emu/machine/mm74c922.h b/src/emu/machine/mm74c922.h index 477738e0dd6..d30f5ac9314 100644 --- a/src/emu/machine/mm74c922.h +++ b/src/emu/machine/mm74c922.h @@ -106,12 +106,12 @@ private: void clock_scan_counters(); void detect_keypress(); - devcb2_write_line m_write_da; - devcb2_read8 m_read_x1; - devcb2_read8 m_read_x2; - devcb2_read8 m_read_x3; - devcb2_read8 m_read_x4; - devcb2_read8 m_read_x5; + devcb2_write_line m_write_da; + devcb2_read8 m_read_x1; + devcb2_read8 m_read_x2; + devcb2_read8 m_read_x3; + devcb2_read8 m_read_x4; + devcb2_read8 m_read_x5; double m_cap_osc; double m_cap_debounce; diff --git a/src/emu/machine/mos6530.h b/src/emu/machine/mos6530.h index 6f05a1e29ec..24477172bc2 100644 --- a/src/emu/machine/mos6530.h +++ b/src/emu/machine/mos6530.h @@ -70,20 +70,20 @@ public: DECLARE_READ8_MEMBER( read ); DECLARE_WRITE8_MEMBER( write ); - + UINT8 porta_in_get(); UINT8 portb_in_get(); UINT8 porta_out_get(); UINT8 portb_out_get(); - + protected: // device-level overrides virtual void device_config_complete(); virtual void device_start(); virtual void device_reset(); virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr); - + private: // internal state @@ -99,13 +99,13 @@ private: emu_timer * m_timer; UINT32 m_clock; - - void update_irqstate(); + + void update_irqstate(); UINT8 get_timer(); - + void porta_in_set(UINT8 data, UINT8 mask); void portb_in_set(UINT8 data, UINT8 mask); - + enum { TIMER_END_CALLBACK diff --git a/src/emu/machine/mos6551.c b/src/emu/machine/mos6551.c index a103b6072e2..9c777bcf6e8 100644 --- a/src/emu/machine/mos6551.c +++ b/src/emu/machine/mos6551.c @@ -577,7 +577,7 @@ WRITE_LINE_MEMBER(mos6551_device::receiver_clock) m_rx_counter = 0; if (LOG) logerror("MOS6551 '%s': RX STOP BIT\n", tag()); - + if (!(m_status & SR_RDRF)) { if (!m_rxd) diff --git a/src/emu/machine/msm6242.h b/src/emu/machine/msm6242.h index 7f3adec9cf4..4a3deb6639c 100644 --- a/src/emu/machine/msm6242.h +++ b/src/emu/machine/msm6242.h @@ -27,8 +27,8 @@ class msm6242_device : public device_t, public: // construction/destruction msm6242_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - - + + template<class _Object> static devcb2_base &set_out_int_handler(device_t &device, _Object object) { return downcast<msm6242_device &>(device).m_out_int_handler.set_callback(object); } // I/O operations diff --git a/src/emu/machine/ncr5380.h b/src/emu/machine/ncr5380.h index 3c649fe11b3..b2d1e8e8f44 100644 --- a/src/emu/machine/ncr5380.h +++ b/src/emu/machine/ncr5380.h @@ -40,7 +40,7 @@ class ncr5380_device : public device_t public: // construction/destruction ncr5380_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - + template<class _Object> static devcb2_base &set_irq_callback(device_t &device, _Object object) { return downcast<ncr5380_device &>(device).m_irq_cb.set_callback(object); } // our API diff --git a/src/emu/machine/netlist.c b/src/emu/machine/netlist.c index 3526753df08..52f6769ebba 100644 --- a/src/emu/machine/netlist.c +++ b/src/emu/machine/netlist.c @@ -73,9 +73,9 @@ const device_type NETLIST_STREAM_OUTPUT = &device_creator<netlist_mame_stream_ou void netlist_mame_sub_interface::static_set_mult_offset(device_t &device, const double mult, const double offset) { - netlist_mame_sub_interface &netlist = dynamic_cast<netlist_mame_sub_interface &>(device); - netlist.m_mult = mult; - netlist.m_offset = offset; + netlist_mame_sub_interface &netlist = dynamic_cast<netlist_mame_sub_interface &>(device); + netlist.m_mult = mult; + netlist.m_offset = offset; } @@ -105,8 +105,8 @@ void netlist_mame_analog_input_t::device_start() } if (m_mult != 1.0 || m_offset != 0.0) { - // disable automatic scaling for ioports - m_auto_port = false; + // disable automatic scaling for ioports + m_auto_port = false; } } @@ -116,34 +116,34 @@ void netlist_mame_analog_input_t::device_start() // ---------------------------------------------------------------------------------------- netlist_mame_analog_output_t::netlist_mame_analog_output_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) - : device_t(mconfig, NETLIST_ANALOG_INPUT, "netlist analog output", tag, owner, clock, "netlist_analog_output", __FILE__), - netlist_mame_sub_interface(*owner), - m_in("") + : device_t(mconfig, NETLIST_ANALOG_INPUT, "netlist analog output", tag, owner, clock, "netlist_analog_output", __FILE__), + netlist_mame_sub_interface(*owner), + m_in("") { } void netlist_mame_analog_output_t::static_set_params(device_t &device, const char *in_name, netlist_analog_output_delegate adelegate) { - netlist_mame_analog_output_t &netlist = downcast<netlist_mame_analog_output_t &>(device); - netlist.m_in = in_name; - netlist.m_delegate = adelegate; + netlist_mame_analog_output_t &netlist = downcast<netlist_mame_analog_output_t &>(device); + netlist.m_in = in_name; + netlist.m_delegate = adelegate; } void netlist_mame_analog_output_t::custom_netlist_additions(netlist_setup_t &setup) { - pstring dname = "OUT_" + m_in; - m_delegate.bind_relative_to(owner()->machine().root_device()); - NETLIB_NAME(analog_callback) *dev = downcast<NETLIB_NAME(analog_callback) *>( - setup.factory().new_device_by_classname("nld_analog_callback", setup)); + pstring dname = "OUT_" + m_in; + m_delegate.bind_relative_to(owner()->machine().root_device()); + NETLIB_NAME(analog_callback) *dev = downcast<NETLIB_NAME(analog_callback) *>( + setup.factory().new_device_by_classname("nld_analog_callback", setup)); - setup.register_dev(dev, dname); - dev->register_callback(m_delegate); - setup.register_link(dname + ".IN", m_in); + setup.register_dev(dev, dname); + dev->register_callback(m_delegate); + setup.register_link(dname + ".IN", m_in); } void netlist_mame_analog_output_t::device_start() { - LOG_DEV_CALLS(("start %s\n", tag())); + LOG_DEV_CALLS(("start %s\n", tag())); } @@ -185,40 +185,40 @@ void netlist_mame_logic_input_t::device_start() // ---------------------------------------------------------------------------------------- netlist_mame_stream_input_t::netlist_mame_stream_input_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) - : device_t(mconfig, NETLIST_ANALOG_INPUT, "netlist analog input", tag, owner, clock, "netlist_analog_input", __FILE__), - netlist_mame_sub_interface(*owner), - m_channel(0), - m_param_name("") + : device_t(mconfig, NETLIST_ANALOG_INPUT, "netlist analog input", tag, owner, clock, "netlist_analog_input", __FILE__), + netlist_mame_sub_interface(*owner), + m_channel(0), + m_param_name("") { } void netlist_mame_stream_input_t::static_set_params(device_t &device, int channel, const char *param_name) { - netlist_mame_stream_input_t &netlist = downcast<netlist_mame_stream_input_t &>(device); - netlist.m_param_name = param_name; - netlist.m_channel = channel; + netlist_mame_stream_input_t &netlist = downcast<netlist_mame_stream_input_t &>(device); + netlist.m_param_name = param_name; + netlist.m_channel = channel; } void netlist_mame_stream_input_t::device_start() { - LOG_DEV_CALLS(("start %s\n", tag())); + LOG_DEV_CALLS(("start %s\n", tag())); } void netlist_mame_stream_input_t::custom_netlist_additions(netlist_setup_t &setup) { - NETLIB_NAME(sound_in) *snd_in = setup.netlist().get_first_device<NETLIB_NAME(sound_in)>(); - if (snd_in == NULL) - { - snd_in = dynamic_cast<NETLIB_NAME(sound_in) *>(setup.factory().new_device_by_classname("nld_sound_in", setup)); - setup.register_dev(snd_in, "STREAM_INPUT"); - } + NETLIB_NAME(sound_in) *snd_in = setup.netlist().get_first_device<NETLIB_NAME(sound_in)>(); + if (snd_in == NULL) + { + snd_in = dynamic_cast<NETLIB_NAME(sound_in) *>(setup.factory().new_device_by_classname("nld_sound_in", setup)); + setup.register_dev(snd_in, "STREAM_INPUT"); + } - pstring sparam = pstring::sprintf("STREAM_INPUT.CHAN%d", m_channel); - setup.register_param(sparam, m_param_name); - sparam = pstring::sprintf("STREAM_INPUT.MULT%d", m_channel); - setup.register_param(sparam, m_mult); - sparam = pstring::sprintf("STREAM_INPUT.OFFSET%d", m_channel); - setup.register_param(sparam, m_offset); + pstring sparam = pstring::sprintf("STREAM_INPUT.CHAN%d", m_channel); + setup.register_param(sparam, m_param_name); + sparam = pstring::sprintf("STREAM_INPUT.MULT%d", m_channel); + setup.register_param(sparam, m_mult); + sparam = pstring::sprintf("STREAM_INPUT.OFFSET%d", m_channel); + setup.register_param(sparam, m_offset); } // ---------------------------------------------------------------------------------------- @@ -226,37 +226,37 @@ void netlist_mame_stream_input_t::custom_netlist_additions(netlist_setup_t &setu // ---------------------------------------------------------------------------------------- netlist_mame_stream_output_t::netlist_mame_stream_output_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) - : device_t(mconfig, NETLIST_ANALOG_INPUT, "netlist analog input", tag, owner, clock, "netlist_analog_input", __FILE__), - netlist_mame_sub_interface(*owner), - m_channel(0), - m_out_name("") + : device_t(mconfig, NETLIST_ANALOG_INPUT, "netlist analog input", tag, owner, clock, "netlist_analog_input", __FILE__), + netlist_mame_sub_interface(*owner), + m_channel(0), + m_out_name("") { } void netlist_mame_stream_output_t::static_set_params(device_t &device, int channel, const char *out_name) { - netlist_mame_stream_output_t &netlist = downcast<netlist_mame_stream_output_t &>(device); - netlist.m_out_name = out_name; - netlist.m_channel = channel; + netlist_mame_stream_output_t &netlist = downcast<netlist_mame_stream_output_t &>(device); + netlist.m_out_name = out_name; + netlist.m_channel = channel; } void netlist_mame_stream_output_t::device_start() { - LOG_DEV_CALLS(("start %s\n", tag())); + LOG_DEV_CALLS(("start %s\n", tag())); } void netlist_mame_stream_output_t::custom_netlist_additions(netlist_setup_t &setup) { - NETLIB_NAME(sound_out) *snd_out; - pstring sname = pstring::sprintf("STREAM_OUT_%d", m_channel); + NETLIB_NAME(sound_out) *snd_out; + pstring sname = pstring::sprintf("STREAM_OUT_%d", m_channel); - snd_out = dynamic_cast<NETLIB_NAME(sound_out) *>(setup.factory().new_device_by_classname("nld_sound_out", setup)); - setup.register_dev(snd_out, sname); + snd_out = dynamic_cast<NETLIB_NAME(sound_out) *>(setup.factory().new_device_by_classname("nld_sound_out", setup)); + setup.register_dev(snd_out, sname); - setup.register_param(sname + ".CHAN" , m_channel); - setup.register_param(sname + ".MULT", m_mult); - setup.register_param(sname + ".OFFSET", m_offset); - setup.register_link(sname + ".IN", m_out_name); + setup.register_param(sname + ".CHAN" , m_channel); + setup.register_param(sname + ".MULT", m_mult); + setup.register_param(sname + ".OFFSET", m_offset); + setup.register_link(sname + ".IN", m_out_name); } @@ -266,21 +266,21 @@ void netlist_mame_stream_output_t::custom_netlist_additions(netlist_setup_t &set void netlist_mame_t::verror(const loglevel_e level, const char *format, va_list ap) const { - pstring errstr = pstring(format).vprintf(ap); + pstring errstr = pstring(format).vprintf(ap); - switch (level) - { - case NL_WARNING: - logerror("netlist WARNING: %s\n", errstr.cstr()); - break; - case NL_LOG: - logerror("netlist LOG: %s\n", errstr.cstr()); - break; - case NL_ERROR: - emu_fatalerror error("netlist ERROR: %s\n", errstr.cstr()); - throw error; - break; - } + switch (level) + { + case NL_WARNING: + logerror("netlist WARNING: %s\n", errstr.cstr()); + break; + case NL_LOG: + logerror("netlist LOG: %s\n", errstr.cstr()); + break; + case NL_ERROR: + emu_fatalerror error("netlist ERROR: %s\n", errstr.cstr()); + throw error; + break; + } } // ---------------------------------------------------------------------------------------- @@ -293,25 +293,25 @@ ADDRESS_MAP_END netlist_mame_device_t::netlist_mame_device_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : device_t(mconfig, NETLIST_CORE, "Netlist core device", tag, owner, clock, "netlist_core", __FILE__), - m_icount(0), - m_div(0), - m_rem(0), - m_old(netlist_time::zero), - m_netlist(NULL), - m_setup(NULL), - m_setup_func(NULL) + m_icount(0), + m_div(0), + m_rem(0), + m_old(netlist_time::zero), + m_netlist(NULL), + m_setup(NULL), + m_setup_func(NULL) { } netlist_mame_device_t::netlist_mame_device_t(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *file) - : device_t(mconfig, type, name, tag, owner, clock, shortname, file), - m_icount(0), - m_div(0), - m_rem(0), - m_old(netlist_time::zero), - m_netlist(NULL), - m_setup(NULL), - m_setup_func(NULL) + : device_t(mconfig, type, name, tag, owner, clock, shortname, file), + m_icount(0), + m_div(0), + m_rem(0), + m_old(netlist_time::zero), + m_netlist(NULL), + m_setup(NULL), + m_setup_func(NULL) { } @@ -358,32 +358,32 @@ void netlist_mame_device_t::device_start() m_setup->start_devices(); m_setup->resolve_inputs(); - netlist().save(NAME(m_rem)); - netlist().save(NAME(m_div)); - netlist().save(NAME(m_old)); + netlist().save(NAME(m_rem)); + netlist().save(NAME(m_div)); + netlist().save(NAME(m_old)); save_state(); - m_old = netlist_time::zero; - m_rem = 0; + m_old = netlist_time::zero; + m_rem = 0; } void netlist_mame_device_t::device_clock_changed() { - //printf("device_clock_changed\n"); - m_div = netlist_time::from_hz(clock()).as_raw(); - //m_rem = 0; - NL_VERBOSE_OUT(("Setting clock %" I64FMT "d and divisor %d\n", clockfreq, m_div)); - //printf("Setting clock %d and divisor %d\n", clock(), m_div); + //printf("device_clock_changed\n"); + m_div = netlist_time::from_hz(clock()).as_raw(); + //m_rem = 0; + NL_VERBOSE_OUT(("Setting clock %" I64FMT "d and divisor %d\n", clockfreq, m_div)); + //printf("Setting clock %d and divisor %d\n", clock(), m_div); } void netlist_mame_device_t::device_reset() { LOG_DEV_CALLS(("device_reset\n")); - m_old = netlist_time::zero; - m_rem = 0; + m_old = netlist_time::zero; + m_rem = 0; netlist().do_reset(); } @@ -419,15 +419,15 @@ void netlist_mame_device_t::device_timer(emu_timer &timer, device_timer_id id, i ATTR_HOT ATTR_ALIGN void netlist_mame_device_t::update_time_x() { - const netlist_time delta = netlist().time() - m_old + netlist_time::from_raw(m_rem); - m_old = netlist().time(); - m_icount -= divu_64x32_rem(delta.as_raw(), m_div, &m_rem); + const netlist_time delta = netlist().time() - m_old + netlist_time::from_raw(m_rem); + m_old = netlist().time(); + m_icount -= divu_64x32_rem(delta.as_raw(), m_div, &m_rem); } ATTR_HOT ATTR_ALIGN void netlist_mame_device_t::check_mame_abort_slice() { - if (m_icount <= 0) - netlist().abort_current_queue_slice(); + if (m_icount <= 0) + netlist().abort_current_queue_slice(); } ATTR_COLD void netlist_mame_device_t::save_state() @@ -444,9 +444,9 @@ ATTR_COLD void netlist_mame_device_t::save_state() case DT_INT64: save_pointer((INT64 *) s->m_ptr, s->m_name, s->m_count); break; - case DT_INT16: - save_pointer((INT16 *) s->m_ptr, s->m_name, s->m_count); - break; + case DT_INT16: + save_pointer((INT16 *) s->m_ptr, s->m_name, s->m_count); + break; case DT_INT8: save_pointer((INT8 *) s->m_ptr, s->m_name, s->m_count); break; @@ -457,7 +457,7 @@ ATTR_COLD void netlist_mame_device_t::save_state() save_pointer((bool *) s->m_ptr, s->m_name, s->m_count); break; case DT_CUSTOM: - break; + break; case NOT_SUPPORTED: default: netlist().error("found unsupported save element %s\n", s->m_name.cstr()); @@ -472,47 +472,47 @@ ATTR_COLD void netlist_mame_device_t::save_state() // ---------------------------------------------------------------------------------------- netlist_mame_cpu_device_t::netlist_mame_cpu_device_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) - : netlist_mame_device_t(mconfig, NETLIST_CPU, "Netlist cpu device", tag, owner, clock, "netlist_cpu", __FILE__), - device_execute_interface(mconfig, *this), - device_state_interface(mconfig, *this), - device_disasm_interface(mconfig, *this), - device_memory_interface(mconfig, *this), - m_program_config("program", ENDIANNESS_LITTLE, 8, 12, 0, ADDRESS_MAP_NAME(program_dummy)) + : netlist_mame_device_t(mconfig, NETLIST_CPU, "Netlist cpu device", tag, owner, clock, "netlist_cpu", __FILE__), + device_execute_interface(mconfig, *this), + device_state_interface(mconfig, *this), + device_disasm_interface(mconfig, *this), + device_memory_interface(mconfig, *this), + m_program_config("program", ENDIANNESS_LITTLE, 8, 12, 0, ADDRESS_MAP_NAME(program_dummy)) { } void netlist_mame_cpu_device_t::device_start() { - netlist_mame_device_t::device_start(); + netlist_mame_device_t::device_start(); - LOG_DEV_CALLS(("device_start %s\n", tag())); + LOG_DEV_CALLS(("device_start %s\n", tag())); - // State support + // State support - state_add(STATE_GENPC, "curpc", m_genPC).noshow(); + state_add(STATE_GENPC, "curpc", m_genPC).noshow(); - for (int i=0; i < netlist().m_nets.count(); i++) - { - netlist_net_t *n = netlist().m_nets[i]; - if (n->isFamily(netlist_object_t::LOGIC)) - { - state_add(i*2, n->name(), n->Q_state_ptr()); - } - else - { - state_add(i*2+1, n->name(), n->Q_Analog_state_ptr()).formatstr("%20s"); - } - } + for (int i=0; i < netlist().m_nets.count(); i++) + { + netlist_net_t *n = netlist().m_nets[i]; + if (n->isFamily(netlist_object_t::LOGIC)) + { + state_add(i*2, n->name(), n->Q_state_ptr()); + } + else + { + state_add(i*2+1, n->name(), n->Q_Analog_state_ptr()).formatstr("%20s"); + } + } - // set our instruction counter - m_icountptr = &m_icount; + // set our instruction counter + m_icountptr = &m_icount; } void netlist_mame_cpu_device_t::nl_register_devices() { - setup().factory().register_device<nld_analog_callback>( "NETDEV_CALLBACK", "nld_analog_callback", "-"); + setup().factory().register_device<nld_analog_callback>( "NETDEV_CALLBACK", "nld_analog_callback", "-"); } ATTR_COLD UINT64 netlist_mame_cpu_device_t::execute_clocks_to_cycles(UINT64 clocks) const @@ -559,13 +559,13 @@ ATTR_HOT void netlist_mame_cpu_device_t::execute_run() m_genPC &= 255; debugger_instruction_hook(this, m_genPC); netlist().process_queue(netlist_time::from_raw(m_div)); - update_time_x(); + update_time_x(); } } else { - netlist().process_queue(netlist_time::from_raw(m_div) * m_icount); - update_time_x(); + netlist().process_queue(netlist_time::from_raw(m_div) * m_icount); + update_time_x(); } } @@ -574,93 +574,92 @@ ATTR_HOT void netlist_mame_cpu_device_t::execute_run() // ---------------------------------------------------------------------------------------- netlist_mame_sound_device_t::netlist_mame_sound_device_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) - : netlist_mame_device_t(mconfig, NETLIST_CPU, "Netlist sound device", tag, owner, clock, "netlist_sound", __FILE__), - device_sound_interface(mconfig, *this) + : netlist_mame_device_t(mconfig, NETLIST_CPU, "Netlist sound device", tag, owner, clock, "netlist_sound", __FILE__), + device_sound_interface(mconfig, *this) { } void netlist_mame_sound_device_t::device_start() { - netlist_mame_device_t::device_start(); + netlist_mame_device_t::device_start(); - LOG_DEV_CALLS(("device_start %s\n", tag())); + LOG_DEV_CALLS(("device_start %s\n", tag())); - // Configure outputs + // Configure outputs - netlist_list_t<nld_sound_out *> outdevs = netlist().get_device_list<nld_sound_out>(); - if (outdevs.count() == 0) - fatalerror("No output devices"); + netlist_list_t<nld_sound_out *> outdevs = netlist().get_device_list<nld_sound_out>(); + if (outdevs.count() == 0) + fatalerror("No output devices"); - m_num_outputs = outdevs.count(); + m_num_outputs = outdevs.count(); - /* resort channels */ - for (int i=0; i < MAX_OUT; i++) m_out[i] = NULL; - for (int i=0; i < m_num_outputs; i++) - { - int chan = outdevs[i]->m_channel.Value(); + /* resort channels */ + for (int i=0; i < MAX_OUT; i++) m_out[i] = NULL; + for (int i=0; i < m_num_outputs; i++) + { + int chan = outdevs[i]->m_channel.Value(); - netlist().log("Output %d on channel %d", i, chan); + netlist().log("Output %d on channel %d", i, chan); - if (chan < 0 || chan >= MAX_OUT || chan >= outdevs.count()) - fatalerror("illegal channel number"); - m_out[chan] = outdevs[i]; - m_out[chan]->m_sample = netlist_time::from_hz(clock()); - m_out[chan]->m_buffer = NULL; - } + if (chan < 0 || chan >= MAX_OUT || chan >= outdevs.count()) + fatalerror("illegal channel number"); + m_out[chan] = outdevs[i]; + m_out[chan]->m_sample = netlist_time::from_hz(clock()); + m_out[chan]->m_buffer = NULL; + } - // Configure inputs + // Configure inputs - m_num_inputs = 0; - m_in = NULL; + m_num_inputs = 0; + m_in = NULL; - netlist_list_t<nld_sound_in *> indevs = netlist().get_device_list<nld_sound_in>(); - if (indevs.count() > 1) - fatalerror("A maximum of one input device is allowed!"); - if (indevs.count() == 1) - { - m_in = indevs[0]; - m_num_inputs = m_in->resolve(); - m_in->m_inc = netlist_time::from_hz(clock()); - } + netlist_list_t<nld_sound_in *> indevs = netlist().get_device_list<nld_sound_in>(); + if (indevs.count() > 1) + fatalerror("A maximum of one input device is allowed!"); + if (indevs.count() == 1) + { + m_in = indevs[0]; + m_num_inputs = m_in->resolve(); + m_in->m_inc = netlist_time::from_hz(clock()); + } - /* initialize the stream(s) */ - m_stream = machine().sound().stream_alloc(*this, m_num_inputs, m_num_outputs, clock()); + /* initialize the stream(s) */ + m_stream = machine().sound().stream_alloc(*this, m_num_inputs, m_num_outputs, clock()); } void netlist_mame_sound_device_t::nl_register_devices() { - setup().factory().register_device<nld_sound_out>("NETDEV_SOUND_OUT", "nld_sound_out", "+CHAN"); - setup().factory().register_device<nld_sound_in>("NETDEV_SOUND_IN", "nld_sound_in", "-"); + setup().factory().register_device<nld_sound_out>("NETDEV_SOUND_OUT", "nld_sound_out", "+CHAN"); + setup().factory().register_device<nld_sound_in>("NETDEV_SOUND_IN", "nld_sound_in", "-"); } void netlist_mame_sound_device_t::sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples) { - for (int i=0; i < m_num_outputs; i++) - { - m_out[i]->m_buffer = outputs[i]; - } + for (int i=0; i < m_num_outputs; i++) + { + m_out[i]->m_buffer = outputs[i]; + } - if (m_num_inputs) - m_in->buffer_reset(); + if (m_num_inputs) + m_in->buffer_reset(); - for (int i=0; i < m_num_inputs; i++) - { - m_in->m_buffer[i] = inputs[i]; - } + for (int i=0; i < m_num_inputs; i++) + { + m_in->m_buffer[i] = inputs[i]; + } - netlist_time cur = netlist().time(); + netlist_time cur = netlist().time(); - netlist().process_queue(netlist_time::from_raw(m_div) * samples); + netlist().process_queue(netlist_time::from_raw(m_div) * samples); - cur += (netlist_time::from_raw(m_div) * samples); + cur += (netlist_time::from_raw(m_div) * samples); - for (int i=0; i < m_num_outputs; i++) - { - m_out[i]->sound_update(cur); - m_out[i]->buffer_reset(cur); - } + for (int i=0; i < m_num_outputs; i++) + { + m_out[i]->sound_update(cur); + m_out[i]->buffer_reset(cur); + } } - diff --git a/src/emu/machine/netlist.h b/src/emu/machine/netlist.h index 957fbd55c38..181d37e3873 100644 --- a/src/emu/machine/netlist.h +++ b/src/emu/machine/netlist.h @@ -68,29 +68,29 @@ netlist_mame_analog_input_t::static_set_mult_offset(*device, _mult, _offset); #define MCFG_NETLIST_ANALOG_OUTPUT(_basetag, _tag, _IN, _class, _member, _class_tag) \ - MCFG_DEVICE_ADD(_basetag ":" _tag, NETLIST_ANALOG_OUTPUT, 0) \ - netlist_mame_analog_output_t::static_set_params(*device, _IN, \ - netlist_analog_output_delegate(& _class :: _member, \ - # _class "::" # _member, _class_tag, (_class *) 0) ); + MCFG_DEVICE_ADD(_basetag ":" _tag, NETLIST_ANALOG_OUTPUT, 0) \ + netlist_mame_analog_output_t::static_set_params(*device, _IN, \ + netlist_analog_output_delegate(& _class :: _member, \ + # _class "::" # _member, _class_tag, (_class *) 0) ); #define MCFG_NETLIST_LOGIC_INPUT(_basetag, _tag, _name, _shift, _mask) \ MCFG_DEVICE_ADD(_basetag ":" _tag, NETLIST_LOGIC_INPUT, 0) \ netlist_mame_logic_input_t::static_set_params(*device, _name, _mask, _shift); #define MCFG_NETLIST_STREAM_INPUT(_basetag, _chan, _name) \ - MCFG_DEVICE_ADD(_basetag ":cin" # _chan, NETLIST_STREAM_INPUT, 0) \ - netlist_mame_stream_input_t::static_set_params(*device, _chan, _name); + MCFG_DEVICE_ADD(_basetag ":cin" # _chan, NETLIST_STREAM_INPUT, 0) \ + netlist_mame_stream_input_t::static_set_params(*device, _chan, _name); #define MCFG_NETLIST_STREAM_OUTPUT(_basetag, _chan, _name) \ - MCFG_DEVICE_ADD(_basetag ":cout" # _chan, NETLIST_STREAM_OUTPUT, 0) \ - netlist_mame_stream_output_t::static_set_params(*device, _chan, _name); + MCFG_DEVICE_ADD(_basetag ":cout" # _chan, NETLIST_STREAM_OUTPUT, 0) \ + netlist_mame_stream_output_t::static_set_params(*device, _chan, _name); #define NETLIST_LOGIC_PORT_CHANGED(_base, _tag) \ PORT_CHANGED_MEMBER(_base ":" _tag, netlist_mame_logic_input_t, input_changed, 0) #define NETLIST_ANALOG_PORT_CHANGED(_base, _tag) \ - PORT_CHANGED_MEMBER(_base ":" _tag, netlist_mame_analog_input_t, input_changed, 0) + PORT_CHANGED_MEMBER(_base ":" _tag, netlist_mame_analog_input_t, input_changed, 0) // ---------------------------------------------------------------------------------------- @@ -101,7 +101,7 @@ setup.parse((char *)downcast<netlist_mame_t &>(setup.netlist()).machine().root_device().memregion(_name)->base()); #define NETDEV_ANALOG_CALLBACK_MEMBER(_name) \ - void _name(const double data, const attotime &time) + void _name(const double data, const attotime &time) #if 0 @@ -116,12 +116,12 @@ #if 0 #define NETDEV_SOUND_OUT(_name, _v, _m) \ - NET_REGISTER_DEV(sound_out, _name) \ - PARAM(_name.CHAN, _v) \ - PARAM(_name.MULT, _m) + NET_REGISTER_DEV(sound_out, _name) \ + PARAM(_name.CHAN, _v) \ + PARAM(_name.MULT, _m) #define NETDEV_SOUND_IN(_name) \ - NET_REGISTER_DEV(sound_in, _name) + NET_REGISTER_DEV(sound_in, _name) #endif class netlist_mame_device_t; @@ -166,18 +166,18 @@ public: ATTR_HOT inline netlist_setup_t &setup() { return *m_setup; } ATTR_HOT inline netlist_mame_t &netlist() { return *m_netlist; } - ATTR_HOT inline netlist_time last_time_update() { return m_old; } + ATTR_HOT inline netlist_time last_time_update() { return m_old; } ATTR_HOT void update_time_x(); ATTR_HOT void check_mame_abort_slice(); - int m_icount; + int m_icount; protected: - // Custom to netlist ... + // Custom to netlist ... - virtual void nl_register_devices() { }; + virtual void nl_register_devices() { }; - // device_t overrides + // device_t overrides virtual void device_config_complete(); virtual void device_start(); virtual void device_stop(); @@ -185,20 +185,20 @@ protected: virtual void device_post_load(); virtual void device_pre_save(); virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr); - //virtual void device_debug_setup(); - virtual void device_clock_changed(); + //virtual void device_debug_setup(); + virtual void device_clock_changed(); - UINT32 m_div; + UINT32 m_div; private: - void save_state(); + void save_state(); - /* timing support here - so sound can hijack it ... */ - UINT32 m_rem; - netlist_time m_old; + /* timing support here - so sound can hijack it ... */ + UINT32 m_rem; + netlist_time m_old; netlist_mame_t * m_netlist; - netlist_setup_t * m_setup; + netlist_setup_t * m_setup; void (*m_setup_func)(netlist_setup_t &); }; @@ -213,75 +213,75 @@ inline running_machine &netlist_mame_t::machine() // ---------------------------------------------------------------------------------------- class netlist_mame_cpu_device_t : public netlist_mame_device_t, - public device_execute_interface, - public device_state_interface, - public device_disasm_interface, - public device_memory_interface + public device_execute_interface, + public device_state_interface, + public device_disasm_interface, + public device_memory_interface { public: - // construction/destruction - netlist_mame_cpu_device_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - virtual ~netlist_mame_cpu_device_t() {} + // construction/destruction + netlist_mame_cpu_device_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + virtual ~netlist_mame_cpu_device_t() {} - static void static_set_constructor(device_t &device, void (*setup_func)(netlist_setup_t &)); + static void static_set_constructor(device_t &device, void (*setup_func)(netlist_setup_t &)); protected: - // netlist_mame_device_t - virtual void nl_register_devices(); - - // device_t overrides - - //virtual void device_config_complete(); - virtual void device_start(); - //virtual void device_stop(); - //virtual void device_reset(); - //virtual void device_post_load(); - //virtual void device_pre_save(); - //virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr); - - // device_execute_interface overrides - - virtual UINT64 execute_clocks_to_cycles(UINT64 clocks) const; - virtual UINT64 execute_cycles_to_clocks(UINT64 cycles) const; - - ATTR_HOT virtual void execute_run(); - - // device_disasm_interface overrides - ATTR_COLD virtual UINT32 disasm_min_opcode_bytes() const { return 1; } - ATTR_COLD virtual UINT32 disasm_max_opcode_bytes() const { return 1; } - ATTR_COLD virtual offs_t disasm_disassemble(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, UINT32 options); - - // device_memory_interface overrides - - address_space_config m_program_config; - - virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const - { - switch (spacenum) - { - case AS_PROGRAM: return &m_program_config; - case AS_IO: return NULL; - default: return NULL; - } - } - - // device_state_interface overrides - - virtual void state_string_export(const device_state_entry &entry, astring &string) - { - if (entry.index() >= 0) - { - if (entry.index() & 1) - string.format("%10.6f", *((double *) entry.dataptr())); - else - string.format("%d", *((netlist_sig_t *) entry.dataptr())); - } - } + // netlist_mame_device_t + virtual void nl_register_devices(); + + // device_t overrides + + //virtual void device_config_complete(); + virtual void device_start(); + //virtual void device_stop(); + //virtual void device_reset(); + //virtual void device_post_load(); + //virtual void device_pre_save(); + //virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr); + + // device_execute_interface overrides + + virtual UINT64 execute_clocks_to_cycles(UINT64 clocks) const; + virtual UINT64 execute_cycles_to_clocks(UINT64 cycles) const; + + ATTR_HOT virtual void execute_run(); + + // device_disasm_interface overrides + ATTR_COLD virtual UINT32 disasm_min_opcode_bytes() const { return 1; } + ATTR_COLD virtual UINT32 disasm_max_opcode_bytes() const { return 1; } + ATTR_COLD virtual offs_t disasm_disassemble(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, UINT32 options); + + // device_memory_interface overrides + + address_space_config m_program_config; + + virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const + { + switch (spacenum) + { + case AS_PROGRAM: return &m_program_config; + case AS_IO: return NULL; + default: return NULL; + } + } + + // device_state_interface overrides + + virtual void state_string_export(const device_state_entry &entry, astring &string) + { + if (entry.index() >= 0) + { + if (entry.index() & 1) + string.format("%10.6f", *((double *) entry.dataptr())); + else + string.format("%d", *((netlist_sig_t *) entry.dataptr())); + } + } private: - int m_genPC; + int m_genPC; }; @@ -293,45 +293,45 @@ class nld_sound_in; // ---------------------------------------------------------------------------------------- class netlist_mame_sound_device_t : public netlist_mame_device_t, - public device_sound_interface + public device_sound_interface { public: - // construction/destruction - netlist_mame_sound_device_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - virtual ~netlist_mame_sound_device_t() {} + // construction/destruction + netlist_mame_sound_device_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + virtual ~netlist_mame_sound_device_t() {} - static void static_set_constructor(device_t &device, void (*setup_func)(netlist_setup_t &)); + static void static_set_constructor(device_t &device, void (*setup_func)(netlist_setup_t &)); - inline sound_stream *get_stream() { return m_stream; } + inline sound_stream *get_stream() { return m_stream; } - // device_sound_interface overrides + // device_sound_interface overrides - virtual void sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples); + virtual void sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples); protected: - // netlist_mame_device_t - virtual void nl_register_devices(); + // netlist_mame_device_t + virtual void nl_register_devices(); - // device_t overrides + // device_t overrides - //virtual void device_config_complete(); - virtual void device_start(); - //virtual void device_stop(); - //virtual void device_reset(); - //virtual void device_post_load(); - //virtual void device_pre_save(); - //virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr); + //virtual void device_config_complete(); + virtual void device_start(); + //virtual void device_stop(); + //virtual void device_reset(); + //virtual void device_post_load(); + //virtual void device_pre_save(); + //virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr); private: - static const int MAX_OUT = 10; - nld_sound_out *m_out[MAX_OUT]; - nld_sound_in *m_in; - sound_stream *m_stream; - int m_num_inputs; - int m_num_outputs; + static const int MAX_OUT = 10; + nld_sound_out *m_out[MAX_OUT]; + nld_sound_in *m_in; + sound_stream *m_stream; + int m_num_inputs; + int m_num_outputs; }; @@ -344,11 +344,11 @@ class netlist_mame_sub_interface public: // construction/destruction netlist_mame_sub_interface(device_t &aowner) - : m_offset(0.0), m_mult(1.0) - { - m_owner = dynamic_cast<netlist_mame_device_t *>(&aowner); - m_sound = dynamic_cast<netlist_mame_sound_device_t *>(&aowner); - } + : m_offset(0.0), m_mult(1.0) + { + m_owner = dynamic_cast<netlist_mame_device_t *>(&aowner); + m_sound = dynamic_cast<netlist_mame_sound_device_t *>(&aowner); + } virtual ~netlist_mame_sub_interface() { } virtual void custom_netlist_additions(netlist_setup_t &setup) { } @@ -359,14 +359,14 @@ public: inline void update_to_current_time() { - m_sound->get_stream()->update(); + m_sound->get_stream()->update(); } - static void static_set_mult_offset(device_t &device, const double mult, const double offset); + static void static_set_mult_offset(device_t &device, const double mult, const double offset); protected: - double m_offset; - double m_mult; + double m_offset; + double m_mult; private: netlist_mame_device_t *m_owner; @@ -390,16 +390,16 @@ public: inline void write(const double val) { - if (is_sound_device()) - { - update_to_current_time(); - m_param->setTo(val * m_mult + m_offset); - } - else - { - // FIXME: use device timer .... - m_param->setTo(val * m_mult + m_offset); - } + if (is_sound_device()) + { + update_to_current_time(); + m_param->setTo(val * m_mult + m_offset); + } + else + { + // FIXME: use device timer .... + m_param->setTo(val * m_mult + m_offset); + } } inline DECLARE_INPUT_CHANGED_MEMBER(input_changed) @@ -432,24 +432,24 @@ private: typedef device_delegate<void (const double, const attotime &)> netlist_analog_output_delegate; class netlist_mame_analog_output_t : public device_t, - public netlist_mame_sub_interface + public netlist_mame_sub_interface { public: - // construction/destruction - netlist_mame_analog_output_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - virtual ~netlist_mame_analog_output_t() { } + // construction/destruction + netlist_mame_analog_output_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + virtual ~netlist_mame_analog_output_t() { } - static void static_set_params(device_t &device, const char *in_name, netlist_analog_output_delegate adelegate); + static void static_set_params(device_t &device, const char *in_name, netlist_analog_output_delegate adelegate); protected: - // device-level overrides - virtual void device_start(); - virtual void custom_netlist_additions(netlist_setup_t &setup); + // device-level overrides + virtual void device_start(); + virtual void custom_netlist_additions(netlist_setup_t &setup); private: - pstring m_in; - netlist_analog_output_delegate m_delegate; + pstring m_in; + netlist_analog_output_delegate m_delegate; }; @@ -470,16 +470,16 @@ public: inline void write(const UINT32 val) { - if (is_sound_device()) - { - update_to_current_time(); - m_param->setTo((val >> m_shift) & m_mask); - } - else - { - // FIXME: use device timer .... - m_param->setTo((val >> m_shift) & m_mask); - } + if (is_sound_device()) + { + update_to_current_time(); + m_param->setTo((val >> m_shift) & m_mask); + } + else + { + // FIXME: use device timer .... + m_param->setTo((val >> m_shift) & m_mask); + } } inline DECLARE_INPUT_CHANGED_MEMBER(input_changed) { write(newval); } @@ -505,23 +505,23 @@ private: // ---------------------------------------------------------------------------------------- class netlist_mame_stream_input_t : public device_t, - public netlist_mame_sub_interface + public netlist_mame_sub_interface { public: - // construction/destruction - netlist_mame_stream_input_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - virtual ~netlist_mame_stream_input_t() { } + // construction/destruction + netlist_mame_stream_input_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + virtual ~netlist_mame_stream_input_t() { } - static void static_set_params(device_t &device, int channel, const char *param_name); + static void static_set_params(device_t &device, int channel, const char *param_name); protected: - // device-level overrides - virtual void device_start(); - virtual void custom_netlist_additions(netlist_setup_t &setup); + // device-level overrides + virtual void device_start(); + virtual void custom_netlist_additions(netlist_setup_t &setup); private: - UINT32 m_channel; - pstring m_param_name; + UINT32 m_channel; + pstring m_param_name; }; // ---------------------------------------------------------------------------------------- @@ -529,23 +529,23 @@ private: // ---------------------------------------------------------------------------------------- class netlist_mame_stream_output_t : public device_t, - public netlist_mame_sub_interface + public netlist_mame_sub_interface { public: - // construction/destruction - netlist_mame_stream_output_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - virtual ~netlist_mame_stream_output_t() { } + // construction/destruction + netlist_mame_stream_output_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + virtual ~netlist_mame_stream_output_t() { } - static void static_set_params(device_t &device, int channel, const char *out_name); + static void static_set_params(device_t &device, int channel, const char *out_name); protected: - // device-level overrides - virtual void device_start(); - virtual void custom_netlist_additions(netlist_setup_t &setup); + // device-level overrides + virtual void device_start(); + virtual void custom_netlist_additions(netlist_setup_t &setup); private: - UINT32 m_channel; - pstring m_out_name; + UINT32 m_channel; + pstring m_out_name; }; // ---------------------------------------------------------------------------------------- // netdev_callback @@ -563,9 +563,9 @@ public: m_cpu_device = downcast<netlist_mame_cpu_device_t *>(&downcast<netlist_mame_t &>(netlist()).parent()); } - ATTR_COLD void reset() - { - } + ATTR_COLD void reset() + { + } ATTR_COLD void register_callback(netlist_analog_output_delegate callback) { @@ -574,9 +574,9 @@ public: ATTR_HOT void update() { - m_cpu_device->update_time_x(); - m_callback(INPANALOG(m_in), m_cpu_device->local_time()); - m_cpu_device->check_mame_abort_slice(); + m_cpu_device->update_time_x(); + m_callback(INPANALOG(m_in), m_cpu_device->local_time()); + m_cpu_device->check_mame_abort_slice(); } private: @@ -601,18 +601,18 @@ public: { register_input("IN", m_in); register_param("CHAN", m_channel, 0); - register_param("MULT", m_mult, 1000.0); - register_param("OFFSET", m_offset, 0.0); - m_sample = netlist_time::from_hz(1); //sufficiently big enough - save(NAME(m_last_buffer)); + register_param("MULT", m_mult, 1000.0); + register_param("OFFSET", m_offset, 0.0); + m_sample = netlist_time::from_hz(1); //sufficiently big enough + save(NAME(m_last_buffer)); } - ATTR_COLD void reset() - { - m_cur = 0; - m_last_pos = 0; - m_last_buffer = netlist_time::zero; - } + ATTR_COLD void reset() + { + m_cur = 0; + m_last_pos = 0; + m_last_buffer = netlist_time::zero; + } ATTR_HOT void sound_update(const netlist_time upto) { @@ -634,15 +634,15 @@ public: ATTR_HOT void buffer_reset(netlist_time upto) { - m_last_pos = 0; - m_last_buffer = upto; + m_last_pos = 0; + m_last_buffer = upto; } netlist_param_int_t m_channel; - netlist_param_double_t m_mult; - netlist_param_double_t m_offset; - stream_sample_t *m_buffer; - netlist_time m_sample; + netlist_param_double_t m_mult; + netlist_param_double_t m_offset; + stream_sample_t *m_buffer; + netlist_time m_sample; private: netlist_analog_input_t m_in; @@ -658,84 +658,84 @@ private: class NETLIB_NAME(sound_in) : public netlist_device_t { public: - NETLIB_NAME(sound_in)() - : netlist_device_t() { } - - static const int MAX_INPUT_CHANNELS = 10; - - ATTR_COLD void start() - { - // clock part - register_output("Q", m_Q); - register_input("FB", m_feedback); - - connect(m_feedback, m_Q); - m_inc = netlist_time::from_nsec(1); - - - for (int i = 0; i < MAX_INPUT_CHANNELS; i++) - { - register_param(pstring::sprintf("CHAN%d", i), m_param_name[i], ""); - register_param(pstring::sprintf("MULT%d", i), m_param_mult[i], 1.0); - register_param(pstring::sprintf("OFFSET%d", i), m_param_offset[i], 0.0); - } - m_num_channel = 0; - } - - ATTR_COLD void reset() - { - m_pos = 0; - for (int i = 0; i < MAX_INPUT_CHANNELS; i++) - m_buffer[i] = NULL; - } - - ATTR_COLD int resolve() - { - m_pos = 0; - for (int i = 0; i < MAX_INPUT_CHANNELS; i++) - { - if (m_param_name[i].Value() != "") - { - if (i != m_num_channel) - netlist().error("sound input numbering has to be sequential!"); - m_num_channel++; - m_param[i] = dynamic_cast<netlist_param_double_t *>(setup().find_param(m_param_name[i].Value(), true)); - } - } - return m_num_channel; - } - - ATTR_HOT void update() - { - for (int i=0; i<m_num_channel; i++) - { - if (m_buffer[i] == NULL) - break; // stop, called outside of stream_update - double v = m_buffer[i][m_pos]; - m_param[i]->setTo(v * m_param_mult[i].Value() + m_param_offset[i].Value()); - } - m_pos++; - OUTLOGIC(m_Q, !m_Q.net().new_Q(), m_inc ); - } - - ATTR_HOT void buffer_reset() - { - m_pos = 0; - } - - netlist_param_str_t m_param_name[MAX_INPUT_CHANNELS]; - netlist_param_double_t *m_param[MAX_INPUT_CHANNELS]; - stream_sample_t *m_buffer[MAX_INPUT_CHANNELS]; - netlist_param_double_t m_param_mult[MAX_INPUT_CHANNELS]; - netlist_param_double_t m_param_offset[MAX_INPUT_CHANNELS]; - netlist_time m_inc; + NETLIB_NAME(sound_in)() + : netlist_device_t() { } + + static const int MAX_INPUT_CHANNELS = 10; + + ATTR_COLD void start() + { + // clock part + register_output("Q", m_Q); + register_input("FB", m_feedback); + + connect(m_feedback, m_Q); + m_inc = netlist_time::from_nsec(1); + + + for (int i = 0; i < MAX_INPUT_CHANNELS; i++) + { + register_param(pstring::sprintf("CHAN%d", i), m_param_name[i], ""); + register_param(pstring::sprintf("MULT%d", i), m_param_mult[i], 1.0); + register_param(pstring::sprintf("OFFSET%d", i), m_param_offset[i], 0.0); + } + m_num_channel = 0; + } + + ATTR_COLD void reset() + { + m_pos = 0; + for (int i = 0; i < MAX_INPUT_CHANNELS; i++) + m_buffer[i] = NULL; + } + + ATTR_COLD int resolve() + { + m_pos = 0; + for (int i = 0; i < MAX_INPUT_CHANNELS; i++) + { + if (m_param_name[i].Value() != "") + { + if (i != m_num_channel) + netlist().error("sound input numbering has to be sequential!"); + m_num_channel++; + m_param[i] = dynamic_cast<netlist_param_double_t *>(setup().find_param(m_param_name[i].Value(), true)); + } + } + return m_num_channel; + } + + ATTR_HOT void update() + { + for (int i=0; i<m_num_channel; i++) + { + if (m_buffer[i] == NULL) + break; // stop, called outside of stream_update + double v = m_buffer[i][m_pos]; + m_param[i]->setTo(v * m_param_mult[i].Value() + m_param_offset[i].Value()); + } + m_pos++; + OUTLOGIC(m_Q, !m_Q.net().new_Q(), m_inc ); + } + + ATTR_HOT void buffer_reset() + { + m_pos = 0; + } + + netlist_param_str_t m_param_name[MAX_INPUT_CHANNELS]; + netlist_param_double_t *m_param[MAX_INPUT_CHANNELS]; + stream_sample_t *m_buffer[MAX_INPUT_CHANNELS]; + netlist_param_double_t m_param_mult[MAX_INPUT_CHANNELS]; + netlist_param_double_t m_param_offset[MAX_INPUT_CHANNELS]; + netlist_time m_inc; private: - netlist_ttl_input_t m_feedback; - netlist_ttl_output_t m_Q; + netlist_ttl_input_t m_feedback; + netlist_ttl_output_t m_Q; - int m_pos; - int m_num_channel; + int m_pos; + int m_num_channel; }; // device type definition diff --git a/src/emu/machine/nsc810.c b/src/emu/machine/nsc810.c index c88e53181f5..2161a867378 100644 --- a/src/emu/machine/nsc810.c +++ b/src/emu/machine/nsc810.c @@ -308,4 +308,3 @@ WRITE8_MEMBER(nsc810_device::write) } } } - diff --git a/src/emu/machine/pc_lpt.c b/src/emu/machine/pc_lpt.c index e5558835e21..266ad2aa992 100644 --- a/src/emu/machine/pc_lpt.c +++ b/src/emu/machine/pc_lpt.c @@ -167,4 +167,3 @@ WRITE_LINE_MEMBER( pc_lpt_device::write_centronics_ack ) m_cent_status_in->write_bit6(state); update_irq(); } - diff --git a/src/emu/machine/pci.c b/src/emu/machine/pci.c index abb59481aa9..ae611d67cae 100644 --- a/src/emu/machine/pci.c +++ b/src/emu/machine/pci.c @@ -287,4 +287,3 @@ void pci_bus_legacy_device::device_reset() m_devicenum = -1; m_address = 0; } - diff --git a/src/emu/machine/pckeybrd.c b/src/emu/machine/pckeybrd.c index 3801c6a20ff..12aefd6086f 100644 --- a/src/emu/machine/pckeybrd.c +++ b/src/emu/machine/pckeybrd.c @@ -336,7 +336,7 @@ void pc_keyboard_device::device_start() ioport_queue_chars_delegate(FUNC(pc_keyboard_device::queue_chars), this), ioport_accept_char_delegate(FUNC(pc_keyboard_device::accept_char), this), ioport_charqueue_empty_delegate(FUNC(pc_keyboard_device::charqueue_empty), this)); - + m_out_keypress_func.resolve_safe(); m_keyboard_timer = timer_alloc(); } diff --git a/src/emu/machine/pckeybrd.h b/src/emu/machine/pckeybrd.h index e04f94f7d5a..cf65ed85c2c 100644 --- a/src/emu/machine/pckeybrd.h +++ b/src/emu/machine/pckeybrd.h @@ -73,7 +73,7 @@ private: optional_ioport m_ioport_5; optional_ioport m_ioport_6; optional_ioport m_ioport_7; - + devcb2_write_line m_out_keypress_func; emu_timer *m_keyboard_timer; }; @@ -85,9 +85,9 @@ public: DECLARE_WRITE8_MEMBER( write ); - static void static_set_type(device_t &device, KEYBOARD_TYPE type, int default_set) + static void static_set_type(device_t &device, KEYBOARD_TYPE type, int default_set) { downcast<at_keyboard_device &>(device).m_scan_code_set = default_set; downcast<at_keyboard_device &>(device).m_type = type; } - + protected: virtual void device_reset(); virtual void device_start(); diff --git a/src/emu/machine/rp5c01.h b/src/emu/machine/rp5c01.h index 7497e3b7f9c..d201b8c82bf 100644 --- a/src/emu/machine/rp5c01.h +++ b/src/emu/machine/rp5c01.h @@ -51,7 +51,7 @@ class rp5c01_device : public device_t, public: // construction/destruction rp5c01_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - + template<class _Object> static devcb2_base &set_out_alarm_callback(device_t &device, _Object object) { return downcast<rp5c01_device &>(device).m_out_alarm_cb.set_callback(object); } DECLARE_READ8_MEMBER( read ); diff --git a/src/emu/machine/rp5c15.h b/src/emu/machine/rp5c15.h index 18daeb562d4..37a57b9a61c 100644 --- a/src/emu/machine/rp5c15.h +++ b/src/emu/machine/rp5c15.h @@ -52,7 +52,7 @@ class rp5c15_device : public device_t, public: // construction/destruction rp5c15_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - + template<class _Object> static devcb2_base &set_out_alarm_callback(device_t &device, _Object object) { return downcast<rp5c15_device &>(device).m_out_alarm_cb.set_callback(object); } template<class _Object> static devcb2_base &set_out_clkout_callback(device_t &device, _Object object) { return downcast<rp5c15_device &>(device).m_out_clkout_cb.set_callback(object); } diff --git a/src/emu/machine/rtc4543.c b/src/emu/machine/rtc4543.c index dd751d42a44..ab6fb21555c 100644 --- a/src/emu/machine/rtc4543.c +++ b/src/emu/machine/rtc4543.c @@ -29,8 +29,8 @@ const device_type RTC4543 = &device_creator<rtc4543_device>; rtc4543_device::rtc4543_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : device_t(mconfig, RTC4543, "Epson R4543", tag, owner, clock, "rtc4543", __FILE__), - device_rtc_interface(mconfig, *this), - data_cb(*this) + device_rtc_interface(mconfig, *this), + data_cb(*this) { } diff --git a/src/emu/machine/rtc65271.h b/src/emu/machine/rtc65271.h index 6836bda4a62..8f496897459 100644 --- a/src/emu/machine/rtc65271.h +++ b/src/emu/machine/rtc65271.h @@ -31,7 +31,7 @@ protected: public: template<class _Object> static devcb2_base &set_interrupt_callback(device_t &device, _Object object) { return downcast<rtc65271_device &>(device).m_interrupt_cb.set_callback(object); } - + DECLARE_READ8_MEMBER( rtc_r ); DECLARE_READ8_MEMBER( xram_r ); DECLARE_WRITE8_MEMBER( rtc_w ); diff --git a/src/emu/machine/s3c2400.c b/src/emu/machine/s3c2400.c index 4ed4c77a073..ca008fd36fb 100644 --- a/src/emu/machine/s3c2400.c +++ b/src/emu/machine/s3c2400.c @@ -67,7 +67,7 @@ s3c2400_device::s3c2400_device(const machine_config &mconfig, const char *tag, d s3c2400_device::~s3c2400_device() { } - + //------------------------------------------------- // static_set_palette_tag: Set the tag of the // palette device @@ -99,8 +99,8 @@ void s3c2400_device::device_config_complete() void s3c2400_device::device_start() { s3c24xx_device_start(); - - address_space &space = m_cpu->memory().space( AS_PROGRAM); + + address_space &space = m_cpu->memory().space( AS_PROGRAM); space.install_readwrite_handler(0x14000000, 0x1400003b, read32_delegate(FUNC(s3c2400_device::s3c24xx_memcon_r), this), write32_delegate(FUNC(s3c2400_device::s3c24xx_memcon_w), this)); space.install_readwrite_handler(0x14200000, 0x1420005b, read32_delegate(FUNC(s3c2400_device::s3c24xx_usb_host_r), this), write32_delegate(FUNC(s3c2400_device::s3c24xx_usb_host_w), this)); space.install_readwrite_handler(0x14400000, 0x14400017, read32_delegate(FUNC(s3c2400_device::s3c24xx_irq_r), this), write32_delegate(FUNC(s3c2400_device::s3c24xx_irq_w), this)); diff --git a/src/emu/machine/s3c2400.h b/src/emu/machine/s3c2400.h index c9d335bdd90..578b3dd4668 100644 --- a/src/emu/machine/s3c2400.h +++ b/src/emu/machine/s3c2400.h @@ -16,7 +16,7 @@ #define MCFG_S3C2400_ADD(_tag, _clock, _config, _palette_tag) \ MCFG_DEVICE_ADD(_tag, S3C2400, _clock) \ - MCFG_DEVICE_CONFIG(_config) \ + MCFG_DEVICE_CONFIG(_config) \ s3c2400_device::static_set_palette_tag(*device, "^" _palette_tag); #define S3C2400_INTERFACE(name) \ @@ -369,7 +369,7 @@ struct s3c2400_interface #define S3C24XX_DMA_COUNT 4 #define S3C24XX_SPI_COUNT 1 -class s3c2400_device : public device_t, +class s3c2400_device : public device_t, public s3c2400_interface { public: @@ -536,19 +536,19 @@ public: void s3c24xx_spi_reset(); UINT32 s3c24xx_spi_r(UINT32 ch, UINT32 offset); void s3c24xx_spi_w(UINT32 ch, UINT32 offset, UINT32 data, UINT32 mem_mask); - READ32_MEMBER( s3c24xx_spi_0_r ); + READ32_MEMBER( s3c24xx_spi_0_r ); WRITE32_MEMBER( s3c24xx_spi_0_w ); void s3c24xx_mmc_reset(); READ32_MEMBER( s3c24xx_mmc_r ); WRITE32_MEMBER( s3c24xx_mmc_w ); void s3c24xx_device_reset(); void s3c24xx_device_start(); - + void s3c2400_uart_fifo_w(int uart, UINT8 data); /******************************************************************************* - TYPE DEFINITIONS + TYPE DEFINITIONS *******************************************************************************/ struct s3c24xx_memcon_regs_t @@ -901,7 +901,7 @@ public: devcb_resolved_write8 m_address_w; devcb_resolved_read8 m_nand_data_r; devcb_resolved_write8 m_nand_data_w; - + }; extern const device_type S3C2400; diff --git a/src/emu/machine/s3c2410.c b/src/emu/machine/s3c2410.c index 0bba6bd3022..140e2620c13 100644 --- a/src/emu/machine/s3c2410.c +++ b/src/emu/machine/s3c2410.c @@ -101,8 +101,8 @@ void s3c2410_device::device_config_complete() void s3c2410_device::device_start() { s3c24xx_device_start(); - - address_space &space = m_cpu->memory().space( AS_PROGRAM); + + address_space &space = m_cpu->memory().space( AS_PROGRAM); space.install_readwrite_handler( 0x48000000, 0x4800003b, read32_delegate(FUNC(s3c2410_device::s3c24xx_memcon_r), this), write32_delegate(FUNC(s3c2410_device::s3c24xx_memcon_w), this)); space.install_readwrite_handler( 0x49000000, 0x4900005b, read32_delegate(FUNC(s3c2410_device::s3c24xx_usb_host_r), this), write32_delegate(FUNC(s3c2410_device::s3c24xx_usb_host_w), this)); space.install_readwrite_handler( 0x4a000000, 0x4a00001f, read32_delegate(FUNC(s3c2410_device::s3c24xx_irq_r), this), write32_delegate(FUNC(s3c2410_device::s3c24xx_irq_w), this)); diff --git a/src/emu/machine/s3c2410.h b/src/emu/machine/s3c2410.h index 0a90287060a..29a356d4435 100644 --- a/src/emu/machine/s3c2410.h +++ b/src/emu/machine/s3c2410.h @@ -16,7 +16,7 @@ #define MCFG_S3C2410_ADD(_tag, _clock, _config, _palette_tag) \ MCFG_DEVICE_ADD(_tag, S3C2410, _clock) \ - MCFG_DEVICE_CONFIG(_config) \ + MCFG_DEVICE_CONFIG(_config) \ s3c2410_device::static_set_palette_tag(*device, "^" _palette_tag); #define S3C2410_INTERFACE(name) \ @@ -454,7 +454,7 @@ static const UINT32 MAP_SUBINT_TO_INT[11] = #define S3C24XX_DMA_COUNT 4 #define S3C24XX_SPI_COUNT 2 -class s3c2410_device : public device_t, +class s3c2410_device : public device_t, public s3c2410_interface { public: @@ -465,7 +465,7 @@ public: static void static_set_palette_tag(device_t &device, const char *tag); DECLARE_WRITE_LINE_MEMBER( frnb_w ); - + // device-level overrides virtual void device_config_complete(); virtual void device_start(); @@ -475,7 +475,7 @@ private: required_device<palette_device> m_palette; public: UINT32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); - + void s3c24xx_reset(); inline int iface_core_pin_r(int pin); void s3c24xx_lcd_reset(); @@ -633,7 +633,7 @@ public: void s3c24xx_spi_w(UINT32 ch, UINT32 offset, UINT32 data, UINT32 mem_mask); READ32_MEMBER( s3c24xx_spi_0_r ); READ32_MEMBER( s3c24xx_spi_1_r ); - WRITE32_MEMBER( s3c24xx_spi_0_w ); + WRITE32_MEMBER( s3c24xx_spi_0_w ); WRITE32_MEMBER( s3c24xx_spi_1_w ); void s3c24xx_sdi_reset(); READ32_MEMBER( s3c24xx_sdi_r ); @@ -661,9 +661,9 @@ public: void s3c2410_touch_screen( int state); void s3c2410_request_eint( UINT32 number); void s3c2410_nand_calculate_mecc( UINT8 *data, UINT32 size, UINT8 *mecc); - + /******************************************************************************* - TYPE DEFINITIONS + TYPE DEFINITIONS *******************************************************************************/ struct s3c24xx_memcon_regs_t @@ -1070,7 +1070,7 @@ public: devcb_resolved_write8 m_command_w; devcb_resolved_write8 m_address_w; devcb_resolved_read8 m_nand_data_r; - devcb_resolved_write8 m_nand_data_w; + devcb_resolved_write8 m_nand_data_w; }; extern const device_type S3C2410; diff --git a/src/emu/machine/s3c2440.c b/src/emu/machine/s3c2440.c index d9482a4fab8..bfa4388ed4f 100644 --- a/src/emu/machine/s3c2440.c +++ b/src/emu/machine/s3c2440.c @@ -104,36 +104,36 @@ void s3c2440_device::device_config_complete() void s3c2440_device::device_start() { address_space &space = m_cpu->memory().space( AS_PROGRAM); - space.install_readwrite_handler(0x48000000, 0x4800003b, read32_delegate(FUNC(s3c2440_device::s3c24xx_memcon_r), this), write32_delegate(FUNC(s3c2440_device::s3c24xx_memcon_w), this)); - space.install_readwrite_handler(0x49000000, 0x4900005b, read32_delegate(FUNC(s3c2440_device::s3c24xx_usb_host_r), this), write32_delegate(FUNC(s3c2440_device::s3c24xx_usb_host_w), this)); - space.install_readwrite_handler(0x4a000000, 0x4a00001f, read32_delegate(FUNC(s3c2440_device::s3c24xx_irq_r), this), write32_delegate(FUNC(s3c2440_device::s3c24xx_irq_w), this)); - space.install_readwrite_handler(0x4b000000, 0x4b000023, read32_delegate(FUNC(s3c2440_device::s3c24xx_dma_0_r), this), write32_delegate(FUNC(s3c2440_device::s3c24xx_dma_0_w), this)); - space.install_readwrite_handler(0x4b000040, 0x4b000063, read32_delegate(FUNC(s3c2440_device::s3c24xx_dma_1_r), this), write32_delegate(FUNC(s3c2440_device::s3c24xx_dma_1_w), this)); - space.install_readwrite_handler(0x4b000080, 0x4b0000a3, read32_delegate(FUNC(s3c2440_device::s3c24xx_dma_2_r), this), write32_delegate(FUNC(s3c2440_device::s3c24xx_dma_2_w), this)); - space.install_readwrite_handler(0x4b0000c0, 0x4b0000e3, read32_delegate(FUNC(s3c2440_device::s3c24xx_dma_3_r), this), write32_delegate(FUNC(s3c2440_device::s3c24xx_dma_3_w), this)); - space.install_readwrite_handler(0x4c000000, 0x4c00001b, read32_delegate(FUNC(s3c2440_device::s3c24xx_clkpow_r), this), write32_delegate(FUNC(s3c2440_device::s3c24xx_clkpow_w), this)); - space.install_readwrite_handler(0x4d000000, 0x4d000063, read32_delegate(FUNC(s3c2440_device::s3c24xx_lcd_r), this), write32_delegate(FUNC(s3c2440_device::s3c24xx_lcd_w), this)); - space.install_readwrite_handler(0x4d000400, 0x4d0007ff, read32_delegate(FUNC(s3c2440_device::s3c24xx_lcd_palette_r), this), write32_delegate(FUNC(s3c2440_device::s3c24xx_lcd_palette_w), this)); - space.install_readwrite_handler(0x4e000000, 0x4e00003f, read32_delegate(FUNC(s3c2440_device::s3c24xx_nand_r), this), write32_delegate(FUNC(s3c2440_device::s3c24xx_nand_w), this)); - space.install_readwrite_handler(0x4f000000, 0x4f0000a3, read32_delegate(FUNC(s3c2440_device::s3c24xx_cam_r), this), write32_delegate(FUNC(s3c2440_device::s3c24xx_cam_w), this)); - space.install_readwrite_handler(0x50000000, 0x5000002b, read32_delegate(FUNC(s3c2440_device::s3c24xx_uart_0_r), this), write32_delegate(FUNC(s3c2440_device::s3c24xx_uart_0_w), this)); - space.install_readwrite_handler(0x50004000, 0x5000402b, read32_delegate(FUNC(s3c2440_device::s3c24xx_uart_1_r), this), write32_delegate(FUNC(s3c2440_device::s3c24xx_uart_1_w), this)); - space.install_readwrite_handler(0x50008000, 0x5000802b, read32_delegate(FUNC(s3c2440_device::s3c24xx_uart_2_r), this), write32_delegate(FUNC(s3c2440_device::s3c24xx_uart_2_w), this)); - space.install_readwrite_handler(0x51000000, 0x51000043, read32_delegate(FUNC(s3c2440_device::s3c24xx_pwm_r), this), write32_delegate(FUNC(s3c2440_device::s3c24xx_pwm_w), this)); - space.install_readwrite_handler(0x52000140, 0x5200026f, read32_delegate(FUNC(s3c2440_device::s3c24xx_usb_device_r), this), write32_delegate(FUNC(s3c2440_device::s3c24xx_usb_device_w), this)); - space.install_readwrite_handler(0x53000000, 0x5300000b, read32_delegate(FUNC(s3c2440_device::s3c24xx_wdt_r), this), write32_delegate(FUNC(s3c2440_device::s3c24xx_wdt_w), this)); - space.install_readwrite_handler(0x54000000, 0x54000013, read32_delegate(FUNC(s3c2440_device::s3c24xx_iic_r), this), write32_delegate(FUNC(s3c2440_device::s3c24xx_iic_w), this)); - space.install_readwrite_handler(0x55000000, 0x55000013, read32_delegate(FUNC(s3c2440_device::s3c24xx_iis_r), this), write32_delegate(FUNC(s3c2440_device::s3c24xx_iis_w), this)); - space.install_readwrite_handler(0x56000000, 0x560000df, read32_delegate(FUNC(s3c2440_device::s3c24xx_gpio_r), this), write32_delegate(FUNC(s3c2440_device::s3c24xx_gpio_w), this)); - space.install_readwrite_handler(0x57000040, 0x5700008b, read32_delegate(FUNC(s3c2440_device::s3c24xx_rtc_r), this), write32_delegate(FUNC(s3c2440_device::s3c24xx_rtc_w), this)); - space.install_readwrite_handler(0x58000000, 0x58000017, read32_delegate(FUNC(s3c2440_device::s3c24xx_adc_r), this), write32_delegate(FUNC(s3c2440_device::s3c24xx_adc_w), this)); - space.install_readwrite_handler(0x59000000, 0x59000017, read32_delegate(FUNC(s3c2440_device::s3c24xx_spi_0_r), this), write32_delegate(FUNC(s3c2440_device::s3c24xx_spi_0_w), this)); - space.install_readwrite_handler(0x59000020, 0x59000037, read32_delegate(FUNC(s3c2440_device::s3c24xx_spi_1_r), this), write32_delegate(FUNC(s3c2440_device::s3c24xx_spi_1_w), this)); - space.install_readwrite_handler(0x5a000000, 0x5a000043, read32_delegate(FUNC(s3c2440_device::s3c24xx_sdi_r), this), write32_delegate(FUNC(s3c2440_device::s3c24xx_sdi_w), this)); - space.install_readwrite_handler(0x5b000000, 0x5b00001f, read32_delegate(FUNC(s3c2440_device::s3c24xx_ac97_r), this), write32_delegate(FUNC(s3c2440_device::s3c24xx_ac97_w), this)); + space.install_readwrite_handler(0x48000000, 0x4800003b, read32_delegate(FUNC(s3c2440_device::s3c24xx_memcon_r), this), write32_delegate(FUNC(s3c2440_device::s3c24xx_memcon_w), this)); + space.install_readwrite_handler(0x49000000, 0x4900005b, read32_delegate(FUNC(s3c2440_device::s3c24xx_usb_host_r), this), write32_delegate(FUNC(s3c2440_device::s3c24xx_usb_host_w), this)); + space.install_readwrite_handler(0x4a000000, 0x4a00001f, read32_delegate(FUNC(s3c2440_device::s3c24xx_irq_r), this), write32_delegate(FUNC(s3c2440_device::s3c24xx_irq_w), this)); + space.install_readwrite_handler(0x4b000000, 0x4b000023, read32_delegate(FUNC(s3c2440_device::s3c24xx_dma_0_r), this), write32_delegate(FUNC(s3c2440_device::s3c24xx_dma_0_w), this)); + space.install_readwrite_handler(0x4b000040, 0x4b000063, read32_delegate(FUNC(s3c2440_device::s3c24xx_dma_1_r), this), write32_delegate(FUNC(s3c2440_device::s3c24xx_dma_1_w), this)); + space.install_readwrite_handler(0x4b000080, 0x4b0000a3, read32_delegate(FUNC(s3c2440_device::s3c24xx_dma_2_r), this), write32_delegate(FUNC(s3c2440_device::s3c24xx_dma_2_w), this)); + space.install_readwrite_handler(0x4b0000c0, 0x4b0000e3, read32_delegate(FUNC(s3c2440_device::s3c24xx_dma_3_r), this), write32_delegate(FUNC(s3c2440_device::s3c24xx_dma_3_w), this)); + space.install_readwrite_handler(0x4c000000, 0x4c00001b, read32_delegate(FUNC(s3c2440_device::s3c24xx_clkpow_r), this), write32_delegate(FUNC(s3c2440_device::s3c24xx_clkpow_w), this)); + space.install_readwrite_handler(0x4d000000, 0x4d000063, read32_delegate(FUNC(s3c2440_device::s3c24xx_lcd_r), this), write32_delegate(FUNC(s3c2440_device::s3c24xx_lcd_w), this)); + space.install_readwrite_handler(0x4d000400, 0x4d0007ff, read32_delegate(FUNC(s3c2440_device::s3c24xx_lcd_palette_r), this), write32_delegate(FUNC(s3c2440_device::s3c24xx_lcd_palette_w), this)); + space.install_readwrite_handler(0x4e000000, 0x4e00003f, read32_delegate(FUNC(s3c2440_device::s3c24xx_nand_r), this), write32_delegate(FUNC(s3c2440_device::s3c24xx_nand_w), this)); + space.install_readwrite_handler(0x4f000000, 0x4f0000a3, read32_delegate(FUNC(s3c2440_device::s3c24xx_cam_r), this), write32_delegate(FUNC(s3c2440_device::s3c24xx_cam_w), this)); + space.install_readwrite_handler(0x50000000, 0x5000002b, read32_delegate(FUNC(s3c2440_device::s3c24xx_uart_0_r), this), write32_delegate(FUNC(s3c2440_device::s3c24xx_uart_0_w), this)); + space.install_readwrite_handler(0x50004000, 0x5000402b, read32_delegate(FUNC(s3c2440_device::s3c24xx_uart_1_r), this), write32_delegate(FUNC(s3c2440_device::s3c24xx_uart_1_w), this)); + space.install_readwrite_handler(0x50008000, 0x5000802b, read32_delegate(FUNC(s3c2440_device::s3c24xx_uart_2_r), this), write32_delegate(FUNC(s3c2440_device::s3c24xx_uart_2_w), this)); + space.install_readwrite_handler(0x51000000, 0x51000043, read32_delegate(FUNC(s3c2440_device::s3c24xx_pwm_r), this), write32_delegate(FUNC(s3c2440_device::s3c24xx_pwm_w), this)); + space.install_readwrite_handler(0x52000140, 0x5200026f, read32_delegate(FUNC(s3c2440_device::s3c24xx_usb_device_r), this), write32_delegate(FUNC(s3c2440_device::s3c24xx_usb_device_w), this)); + space.install_readwrite_handler(0x53000000, 0x5300000b, read32_delegate(FUNC(s3c2440_device::s3c24xx_wdt_r), this), write32_delegate(FUNC(s3c2440_device::s3c24xx_wdt_w), this)); + space.install_readwrite_handler(0x54000000, 0x54000013, read32_delegate(FUNC(s3c2440_device::s3c24xx_iic_r), this), write32_delegate(FUNC(s3c2440_device::s3c24xx_iic_w), this)); + space.install_readwrite_handler(0x55000000, 0x55000013, read32_delegate(FUNC(s3c2440_device::s3c24xx_iis_r), this), write32_delegate(FUNC(s3c2440_device::s3c24xx_iis_w), this)); + space.install_readwrite_handler(0x56000000, 0x560000df, read32_delegate(FUNC(s3c2440_device::s3c24xx_gpio_r), this), write32_delegate(FUNC(s3c2440_device::s3c24xx_gpio_w), this)); + space.install_readwrite_handler(0x57000040, 0x5700008b, read32_delegate(FUNC(s3c2440_device::s3c24xx_rtc_r), this), write32_delegate(FUNC(s3c2440_device::s3c24xx_rtc_w), this)); + space.install_readwrite_handler(0x58000000, 0x58000017, read32_delegate(FUNC(s3c2440_device::s3c24xx_adc_r), this), write32_delegate(FUNC(s3c2440_device::s3c24xx_adc_w), this)); + space.install_readwrite_handler(0x59000000, 0x59000017, read32_delegate(FUNC(s3c2440_device::s3c24xx_spi_0_r), this), write32_delegate(FUNC(s3c2440_device::s3c24xx_spi_0_w), this)); + space.install_readwrite_handler(0x59000020, 0x59000037, read32_delegate(FUNC(s3c2440_device::s3c24xx_spi_1_r), this), write32_delegate(FUNC(s3c2440_device::s3c24xx_spi_1_w), this)); + space.install_readwrite_handler(0x5a000000, 0x5a000043, read32_delegate(FUNC(s3c2440_device::s3c24xx_sdi_r), this), write32_delegate(FUNC(s3c2440_device::s3c24xx_sdi_w), this)); + space.install_readwrite_handler(0x5b000000, 0x5b00001f, read32_delegate(FUNC(s3c2440_device::s3c24xx_ac97_r), this), write32_delegate(FUNC(s3c2440_device::s3c24xx_ac97_w), this)); s3c24xx_device_start(); - + s3c24xx_video_start(); } diff --git a/src/emu/machine/s3c2440.h b/src/emu/machine/s3c2440.h index b3e74134ee3..288d0b16441 100644 --- a/src/emu/machine/s3c2440.h +++ b/src/emu/machine/s3c2440.h @@ -15,7 +15,7 @@ #define MCFG_S3C2440_ADD(_tag, _clock, _config, _palette_tag) \ MCFG_DEVICE_ADD(_tag, S3C2440, _clock) \ - MCFG_DEVICE_CONFIG(_config) \ + MCFG_DEVICE_CONFIG(_config) \ s3c2440_device::static_set_palette_tag(*device, "^" _palette_tag); #define S3C2440_INTERFACE(name) \ @@ -486,7 +486,7 @@ static const UINT32 MAP_SUBINT_TO_INT[15] = #define S3C24XX_DMA_COUNT 4 #define S3C24XX_SPI_COUNT 2 -class s3c2440_device : public device_t, +class s3c2440_device : public device_t, public s3c2440_interface { public: @@ -508,7 +508,7 @@ private: required_device<palette_device> m_palette; public: UINT32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); - + void s3c24xx_reset(); inline int iface_core_pin_r(int pin); void s3c24xx_lcd_reset(); @@ -696,7 +696,7 @@ public: void s3c24xx_nand_auto_boot(); void s3c24xx_device_reset(); void s3c24xx_device_start(); - + void s3c2440_uart_fifo_w( int uart, UINT8 data); void s3c2440_touch_screen( int state); @@ -705,7 +705,7 @@ public: /******************************************************************************* - TYPE DEFINITIONS + TYPE DEFINITIONS *******************************************************************************/ struct s3c24xx_memcon_regs_t @@ -1119,7 +1119,7 @@ public: s3c24xx_ac97_regs_t regs; }; - + UINT8 m_steppingstone[4*1024]; s3c24xx_memcon_t m_memcon; s3c24xx_usbhost_t m_usbhost; @@ -1156,7 +1156,7 @@ public: devcb_resolved_write8 m_address_w; devcb_resolved_read8 m_nand_data_r; devcb_resolved_write8 m_nand_data_w; - + }; extern const device_type S3C2440; diff --git a/src/emu/machine/s3c24xx.inc b/src/emu/machine/s3c24xx.inc index 5f99ffee5d3..fa6d4a1fe91 100644 --- a/src/emu/machine/s3c24xx.inc +++ b/src/emu/machine/s3c24xx.inc @@ -86,7 +86,7 @@ /* ... */ void S3C24_CLASS_NAME::s3c24xx_reset() -{ +{ verboselog( machine(), 1, "reset\n"); m_cpu->reset(); this->reset(); @@ -3472,7 +3472,6 @@ void S3C24_CLASS_NAME::s3c24xx_device_reset() void S3C24_CLASS_NAME::s3c24xx_device_start() { - verboselog( machine(), 1, "s3c24xx device start\n"); m_pin_r.resolve(m_iface_core.pin_r, *this); m_pin_w.resolve(m_iface_core.pin_w, *this); diff --git a/src/emu/machine/saturn.c b/src/emu/machine/saturn.c index 143bb913477..ea08344ccb1 100644 --- a/src/emu/machine/saturn.c +++ b/src/emu/machine/saturn.c @@ -762,9 +762,9 @@ WRITE8_MEMBER(saturn_state::scsp_irq) if (offset != 0) { - if (data == ASSERT_LINE) m_scsp_last_line = offset; + if (data == ASSERT_LINE) m_scsp_last_line = offset; m_audiocpu->set_input_line(offset, data); - } + } else { m_audiocpu->set_input_line(m_scsp_last_line, data); diff --git a/src/emu/machine/seibu_cop.h b/src/emu/machine/seibu_cop.h index 1d62a5048bd..5c1a22cf64a 100644 --- a/src/emu/machine/seibu_cop.h +++ b/src/emu/machine/seibu_cop.h @@ -1,6 +1,6 @@ /*************************************************************************** - Seibu COP device + Seibu COP device ***************************************************************************/ @@ -20,7 +20,7 @@ #define MCFG_SEIBU_COP_IN_WORD_CB(_devcb) \ devcb = &seibu_cop_device::set_in_word_callback(*device, DEVCB2_##_devcb); - + #define MCFG_SEIBU_COP_IN_DWORD_CB(_devcb) \ devcb = &seibu_cop_device::set_in_dword_callback(*device, DEVCB2_##_devcb); @@ -32,7 +32,7 @@ #define MCFG_SEIBU_COP_OUT_DWORD_CB(_devcb) \ devcb = &seibu_cop_device::set_out_dword_callback(*device, DEVCB2_##_devcb); - + //************************************************************************** @@ -47,7 +47,7 @@ class seibu_cop_device : public device_t, public: // construction/destruction seibu_cop_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - + template<class _Object> static devcb2_base &set_in_byte_callback(device_t &device, _Object object) { return downcast<seibu_cop_device &>(device).m_in_byte_cb.set_callback(object); } template<class _Object> static devcb2_base &set_in_word_callback(device_t &device, _Object object) { return downcast<seibu_cop_device &>(device).m_in_word_cb.set_callback(object); } template<class _Object> static devcb2_base &set_in_dword_callback(device_t &device, _Object object) { return downcast<seibu_cop_device &>(device).m_in_dword_cb.set_callback(object); } diff --git a/src/emu/machine/smc91c9x.h b/src/emu/machine/smc91c9x.h index 56fa75a4a0f..f3ca0eefc9e 100644 --- a/src/emu/machine/smc91c9x.h +++ b/src/emu/machine/smc91c9x.h @@ -25,7 +25,7 @@ public: ~smc91c9x_device() {} template<class _Object> static devcb2_base &set_irq_callback(device_t &device, _Object object) { return downcast<smc91c9x_device &>(device).m_irq_handler.set_callback(object); } - + DECLARE_READ16_MEMBER( read ); DECLARE_WRITE16_MEMBER( write ); @@ -86,7 +86,7 @@ extern const device_type SMC91C96; #define MCFG_SMC91C94_ADD(_tag) \ MCFG_DEVICE_ADD(_tag, SMC91C94, 0) - + #define MCFG_SMC91C94_IRQ_CALLBACK(_write) \ devcb = &smc91c94_device::set_irq_callback(*device, DEVCB2_##_write); diff --git a/src/emu/machine/smc92x4.c b/src/emu/machine/smc92x4.c index 516c6eef019..72a663e8736 100644 --- a/src/emu/machine/smc92x4.c +++ b/src/emu/machine/smc92x4.c @@ -189,12 +189,12 @@ enum smc92x4_device::smc92x4_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : device_t(mconfig, SMC92X4, "SMC 9224/9234 Hard/Floppy Disk Controller", tag, owner, clock, "smc92x4", __FILE__), - m_out_intrq(*this), - m_out_dip(*this), - m_out_auxbus(*this), - m_in_auxbus(*this), - m_in_dma(*this), - m_out_dma(*this) + m_out_intrq(*this), + m_out_dip(*this), + m_out_auxbus(*this), + m_in_auxbus(*this), + m_in_dma(*this), + m_out_dma(*this) { } diff --git a/src/emu/machine/smc92x4.h b/src/emu/machine/smc92x4.h index 4b06c14dd1d..48e774e289b 100644 --- a/src/emu/machine/smc92x4.h +++ b/src/emu/machine/smc92x4.h @@ -223,7 +223,7 @@ private: // We expect the embedding board to replace the drive according to the // select lines. legacy_floppy_image_device *m_drive; - mfm_harddisk_device *m_harddisk; + mfm_harddisk_device *m_harddisk; }; #define MCFG_SMC92X4_ADD(_tag, _intrf) \ diff --git a/src/emu/machine/tc009xlvc.h b/src/emu/machine/tc009xlvc.h index 66c57c3cdf5..6ea809b8e8a 100644 --- a/src/emu/machine/tc009xlvc.h +++ b/src/emu/machine/tc009xlvc.h @@ -20,7 +20,7 @@ public: // static configuration static void static_set_gfxdecode_tag(device_t &device, const char *tag); static void static_set_palette_tag(device_t &device, const char *tag); - + DECLARE_READ8_MEMBER( vregs_r ); DECLARE_WRITE8_MEMBER( vregs_w ); diff --git a/src/emu/machine/terminal.c b/src/emu/machine/terminal.c index 5c4d8e5c924..cb5c494ca14 100644 --- a/src/emu/machine/terminal.c +++ b/src/emu/machine/terminal.c @@ -418,4 +418,3 @@ ioport_constructor generic_terminal_device::device_input_ports() const } const device_type GENERIC_TERMINAL = &device_creator<generic_terminal_device>; - diff --git a/src/emu/machine/tmp68301.h b/src/emu/machine/tmp68301.h index f227cacbd9f..a870279b28c 100644 --- a/src/emu/machine/tmp68301.h +++ b/src/emu/machine/tmp68301.h @@ -28,7 +28,7 @@ public: template<class _Object> static devcb2_base &set_in_parallel_callback(device_t &device, _Object object) { return downcast<tmp68301_device &>(device).m_in_parallel_cb.set_callback(object); } template<class _Object> static devcb2_base &set_out_parallel_callback(device_t &device, _Object object) { return downcast<tmp68301_device &>(device).m_out_parallel_cb.set_callback(object); } - + // Hardware Registers DECLARE_READ16_MEMBER( regs_r ); DECLARE_WRITE16_MEMBER( regs_w ); @@ -58,7 +58,7 @@ protected: private: devcb2_read16 m_in_parallel_cb; devcb2_write16 m_out_parallel_cb; - + // internal state UINT16 m_regs[0x400]; diff --git a/src/emu/machine/tms5501.c b/src/emu/machine/tms5501.c index 03ca513aad7..09f2e01509f 100644 --- a/src/emu/machine/tms5501.c +++ b/src/emu/machine/tms5501.c @@ -443,7 +443,7 @@ WRITE_LINE_MEMBER( tms5501_device::xi7_w ) } } - m_xi7 = state; + m_xi7 = state; } @@ -458,7 +458,7 @@ WRITE_LINE_MEMBER( tms5501_device::sens_w ) set_interrupt(IRQ_SENS); } - m_sens = state; + m_sens = state; } @@ -501,7 +501,7 @@ void tms5501_device::check_interrupt() } else { - m_write_irq(CLEAR_LINE); + m_write_irq(CLEAR_LINE); } } @@ -522,7 +522,7 @@ UINT8 tms5501_device::get_vector() m_irq &= ~(1 << i); check_interrupt(); - + if (LOG) logerror("%s: TMS5501 '%s' Interrupt Acknowledge %02x\n", machine().describe_context(), tag(), rst); break; } diff --git a/src/emu/machine/upd1990a.c b/src/emu/machine/upd1990a.c index 7e79f88d697..0f3145f1f3b 100644 --- a/src/emu/machine/upd1990a.c +++ b/src/emu/machine/upd1990a.c @@ -171,7 +171,7 @@ void upd1990a_device::device_timer(emu_timer &timer, device_timer_id id, int par int max_shift = is_serial_mode() ? 6 : 5; m_data_out = (m_time_counter[max_shift - 1] == 0); m_write_data(get_data_out()); - + for (int i = 0; i < max_shift; i++) { m_time_counter[i]++; @@ -219,11 +219,11 @@ WRITE_LINE_MEMBER( upd1990a_device::stb_w ) { m_c = m_c_unlatched; if (m_c == 7) - m_c = MODE_TEST; + m_c = MODE_TEST; } - + if (LOG) logerror("uPD1990A '%s' Command %x\n", tag(), m_c); - + // common functions if (m_c == MODE_REGISTER_HOLD || (m_c >= MODE_TP_64HZ && m_c < MODE_TEST)) { @@ -234,7 +234,7 @@ WRITE_LINE_MEMBER( upd1990a_device::stb_w ) m_testmode = false; m_timer_test_mode->enable(0); } - + switch (m_c) { case MODE_REGISTER_HOLD: @@ -285,10 +285,10 @@ WRITE_LINE_MEMBER( upd1990a_device::stb_w ) bcd_to_integer(m_time_counter[1]), bcd_to_integer(m_time_counter[0]) ); - + // reset stage 10-15 of clock divider m_timer_clock->adjust(attotime::from_ticks(m_timer_clock->remaining().as_ticks(clock()) % (clock() / 512), clock()), 0, attotime::from_hz(clock() / 32768.0)); - + // disable(low) time pulse in testmode if (m_testmode) { @@ -336,7 +336,7 @@ WRITE_LINE_MEMBER( upd1990a_device::stb_w ) // set timer pulse const float div[4] = { 512.0, 128.0, 16.0, 8.0 }; m_timer_tp->adjust(attotime::zero, 0, attotime::from_hz((clock() / div[m_c - MODE_TP_64HZ]) * 2.0)); - + break; } @@ -349,7 +349,7 @@ WRITE_LINE_MEMBER( upd1990a_device::stb_w ) attotime one_second = attotime::from_hz(clock() / 32768.0); const float mul[4] = { 1.0, 10.0, 30.0, 60.0 }; m_timer_tp->adjust(attotime::zero, 0, one_second * mul[m_c - MODE_TP_1S_INT] / 2.0); - + break; } @@ -374,7 +374,7 @@ WRITE_LINE_MEMBER( upd1990a_device::stb_w ) m_timer_test_mode->adjust(attotime::zero, 0, attotime::from_hz(clock() / div)); break; } - + default: break; } @@ -399,7 +399,7 @@ WRITE_LINE_MEMBER( upd1990a_device::clk_w ) if (!m_clk && state) { int in = m_data_in; - + if (is_serial_mode()) { // always clock serial command register @@ -407,7 +407,7 @@ WRITE_LINE_MEMBER( upd1990a_device::clk_w ) m_shift_reg[6] >>= 1; m_shift_reg[6] |= (m_data_in << 3); } - + if (m_c == MODE_SHIFT) { // clock shift register @@ -420,7 +420,7 @@ WRITE_LINE_MEMBER( upd1990a_device::clk_w ) else m_shift_reg[i] |= (m_shift_reg[i + 1] << 7 & 0x80); } - + // data out LSB of shift register m_data_out = m_shift_reg[0] & 1; m_write_data(get_data_out()); @@ -449,7 +449,7 @@ WRITE_LINE_MEMBER( upd1990a_device::oe_w ) int prev_oe = m_oe; m_oe = state; - + if (m_oe != prev_oe && m_c != MODE_TEST) m_write_data(get_data_out()); } diff --git a/src/emu/machine/upd1990a.h b/src/emu/machine/upd1990a.h index 47d636e7656..4bd421521d9 100644 --- a/src/emu/machine/upd1990a.h +++ b/src/emu/machine/upd1990a.h @@ -134,7 +134,7 @@ private: bool m_testmode; // testmode active int m_variant; - + // timers emu_timer *m_timer_clock; emu_timer *m_timer_tp; diff --git a/src/emu/machine/upd7002.c b/src/emu/machine/upd7002.c index 5358062f57c..0c26131b1a0 100644 --- a/src/emu/machine/upd7002.c +++ b/src/emu/machine/upd7002.c @@ -17,7 +17,7 @@ const device_type UPD7002 = &device_creator<upd7002_device>; upd7002_device::upd7002_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) - : device_t(mconfig, UPD7002, "uPD7002", tag, owner, clock, "upd7002", __FILE__) + : device_t(mconfig, UPD7002, "uPD7002", tag, owner, clock, "upd7002", __FILE__) { } diff --git a/src/emu/machine/upd7002.h b/src/emu/machine/upd7002.h index aa6f83e400d..da991fe6a79 100644 --- a/src/emu/machine/upd7002.h +++ b/src/emu/machine/upd7002.h @@ -33,7 +33,7 @@ struct upd7002_interface ***************************************************************************/ class upd7002_device : public device_t, - public upd7002_interface + public upd7002_interface { public: upd7002_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); @@ -42,17 +42,17 @@ public: DECLARE_READ8_MEMBER ( eoc_r ); DECLARE_READ8_MEMBER ( read ); DECLARE_WRITE8_MEMBER ( write ); - + protected: // device-level overrides virtual void device_config_complete(); virtual void device_start(); virtual void device_reset(); virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr); - + private: // internal state - + /* Status Register D0 and D1 define the currently selected input channel D2 flag output @@ -83,7 +83,7 @@ private: the counter at the end of the first conversion will not match and not be processed only then at the end of the second conversion will the conversion complete function run */ int m_conversion_counter; - + enum { TIMER_CONVERSION_COMPLETE diff --git a/src/emu/machine/upd765.c b/src/emu/machine/upd765.c index aaefd4be4f9..801ec5b7d0b 100644 --- a/src/emu/machine/upd765.c +++ b/src/emu/machine/upd765.c @@ -133,7 +133,7 @@ void upd765_family_device::device_start() intrq_cb.resolve_safe(); drq_cb.resolve_safe(); hdl_cb.resolve_safe(); - + for(int i=0; i != 4; i++) { char name[2]; flopi[i].tm = timer_alloc(i); diff --git a/src/emu/machine/wd17xx.c b/src/emu/machine/wd17xx.c index 57352f7ab87..386c110b780 100644 --- a/src/emu/machine/wd17xx.c +++ b/src/emu/machine/wd17xx.c @@ -376,7 +376,7 @@ void wd1770_device::wd17xx_set_intrq() /* set intrq after delay */ TIMER_CALLBACK_MEMBER( wd1770_device::wd17xx_command_callback ) -{ +{ if (m_last_command_data != FDC_FORCE_INT) { wd17xx_set_intrq(); diff --git a/src/emu/machine/wd17xx.h b/src/emu/machine/wd17xx.h index beb2f7a710a..6fd5a7f446f 100644 --- a/src/emu/machine/wd17xx.h +++ b/src/emu/machine/wd17xx.h @@ -68,7 +68,7 @@ public: WRITE_LINE_MEMBER( wprt_w ); WRITE_LINE_MEMBER( dden_w ); READ_LINE_MEMBER( drq_r ); - READ_LINE_MEMBER( intrq_r ); + READ_LINE_MEMBER( intrq_r ); protected: // device-level overrides virtual void device_config_complete(); @@ -179,7 +179,7 @@ protected: UINT8 m_was_busy; /* Pointer to interface */ - const wd17xx_interface *m_intf; + const wd17xx_interface *m_intf; }; extern ATTR_DEPRECATED const device_type WD1770; diff --git a/src/emu/machine/wd33c93.h b/src/emu/machine/wd33c93.h index ce1e4f6b0e4..f89671b4c1e 100644 --- a/src/emu/machine/wd33c93.h +++ b/src/emu/machine/wd33c93.h @@ -53,7 +53,7 @@ class wd33c93_device : public device_t public: // construction/destruction wd33c93_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - + template<class _Object> static devcb2_base &set_irq_callback(device_t &device, _Object object) { return downcast<wd33c93_device &>(device).m_irq_cb.set_callback(object); } DECLARE_READ8_MEMBER(read); diff --git a/src/emu/machine/z80dma.c b/src/emu/machine/z80dma.c index 342ae1ea560..af022b3e8ee 100644 --- a/src/emu/machine/z80dma.c +++ b/src/emu/machine/z80dma.c @@ -897,4 +897,3 @@ WRITE_LINE_MEMBER(z80dma_device::wait_w) WRITE_LINE_MEMBER(z80dma_device::bai_w) { } - diff --git a/src/emu/machine/z8536.h b/src/emu/machine/z8536.h index 765b5398780..6136385455b 100644 --- a/src/emu/machine/z8536.h +++ b/src/emu/machine/z8536.h @@ -76,7 +76,7 @@ // ======================> z8536_device class z8536_device : public device_t, - public device_z80daisy_interface + public device_z80daisy_interface { public: // construction/destruction |
