diff options
Diffstat (limited to 'src/emu/machine')
| -rw-r--r-- | src/emu/machine/6525tpi.h | 6 | ||||
| -rw-r--r-- | src/emu/machine/74145.c | 8 | ||||
| -rw-r--r-- | src/emu/machine/74145.h | 4 | ||||
| -rw-r--r-- | src/emu/machine/74181.c | 2 | ||||
| -rw-r--r-- | src/emu/machine/er59256.c | 3 | ||||
| -rw-r--r-- | src/emu/machine/er59256.h | 8 | ||||
| -rw-r--r-- | src/emu/machine/i80130.c | 16 | ||||
| -rw-r--r-- | src/emu/machine/ins8154.c | 4 | ||||
| -rw-r--r-- | src/emu/machine/ins8154.h | 4 | ||||
| -rw-r--r-- | src/emu/machine/mc146818.c | 6 | ||||
| -rw-r--r-- | src/emu/machine/mc146818.h | 2 | ||||
| -rw-r--r-- | src/emu/machine/mc6846.h | 8 | ||||
| -rw-r--r-- | src/emu/machine/mc6854.c | 6 | ||||
| -rw-r--r-- | src/emu/machine/mc6854.h | 6 | ||||
| -rw-r--r-- | src/emu/machine/ncr5380n.c | 67 | ||||
| -rw-r--r-- | src/emu/machine/pd4990a.h | 6 | ||||
| -rw-r--r-- | src/emu/machine/ram.c | 4 | ||||
| -rw-r--r-- | src/emu/machine/ram.h | 4 |
18 files changed, 81 insertions, 83 deletions
diff --git a/src/emu/machine/6525tpi.h b/src/emu/machine/6525tpi.h index c0f6d1a484e..51d0003cc61 100644 --- a/src/emu/machine/6525tpi.h +++ b/src/emu/machine/6525tpi.h @@ -78,7 +78,7 @@ public: DECLARE_WRITE8_MEMBER( pa_w ); DECLARE_WRITE8_MEMBER( pb_w ); DECLARE_WRITE8_MEMBER( pc_w ); - + UINT8 get_ddr_a(); UINT8 get_ddr_b(); UINT8 get_ddr_c(); @@ -88,7 +88,7 @@ protected: virtual void device_config_complete(); virtual void device_start(); virtual void device_reset(); - + private: // internal state devcb_resolved_write_line m_out_irq_func; @@ -111,7 +111,7 @@ private: UINT8 m_air; UINT8 m_irq_level[5]; - + void set_interrupt(); void clear_interrupt(); }; diff --git a/src/emu/machine/74145.c b/src/emu/machine/74145.c index afbac27c65b..3cb15e899a3 100644 --- a/src/emu/machine/74145.c +++ b/src/emu/machine/74145.c @@ -1,11 +1,11 @@ /***************************************************************************** * - * TTL74145 + * TTL74145 * - * license: MAME, GPL-2.0+ - * copyright-holders: Dirk Best + * license: MAME, GPL-2.0+ + * copyright-holders: Dirk Best * - * BCD-to-Decimal decoder + * BCD-to-Decimal decoder * * __ __ * 0-| v |-VCC diff --git a/src/emu/machine/74145.h b/src/emu/machine/74145.h index 1294ee72f34..de3458ab219 100644 --- a/src/emu/machine/74145.h +++ b/src/emu/machine/74145.h @@ -2,8 +2,8 @@ TTL74145 - license: MAME, GPL-2.0+ - copyright-holders: Dirk Best + license: MAME, GPL-2.0+ + copyright-holders: Dirk Best BCD-to-Decimal decoder diff --git a/src/emu/machine/74181.c b/src/emu/machine/74181.c index a9b50e1a543..e9d8b6f2ace 100644 --- a/src/emu/machine/74181.c +++ b/src/emu/machine/74181.c @@ -46,7 +46,7 @@ void ttl74181_device::device_start() save_item(NAME(m_s)); save_item(NAME(m_m)); save_item(NAME(m_c)); - + update(); } diff --git a/src/emu/machine/er59256.c b/src/emu/machine/er59256.c index ee4e5b4ce47..018fe9d0882 100644 --- a/src/emu/machine/er59256.c +++ b/src/emu/machine/er59256.c @@ -29,7 +29,6 @@ er59256_device::er59256_device(const machine_config &mconfig, const char *tag, d m_command(0), m_flags(0) { - } //------------------------------------------------- @@ -54,7 +53,7 @@ void er59256_device::device_start() m_command=CMD_INVALID; m_flags&= ~FLAG_DATA_LOADED; - + save_item(NAME(m_eerom)); save_item(NAME(m_io_bits)); save_item(NAME(m_old_io_bits)); diff --git a/src/emu/machine/er59256.h b/src/emu/machine/er59256.h index da9fb9004fe..1cdfa42df38 100644 --- a/src/emu/machine/er59256.h +++ b/src/emu/machine/er59256.h @@ -26,16 +26,16 @@ public: UINT8 get_iobits(); void preload_rom(const UINT16 *rom_data, int count); UINT8 data_loaded(); - + protected: // device-level overrides virtual void device_config_complete(); virtual void device_start(); virtual void device_stop(); - + private: // internal state - + /* The actual memory */ UINT16 m_eerom[EEROM_WORDS]; @@ -58,7 +58,7 @@ private: /* Write enable and write in progress flags */ UINT8 m_flags; - + void decode_command(); }; diff --git a/src/emu/machine/i80130.c b/src/emu/machine/i80130.c index c9175aebfd6..021bc185147 100644 --- a/src/emu/machine/i80130.c +++ b/src/emu/machine/i80130.c @@ -142,14 +142,14 @@ machine_config_constructor i80130_device::device_mconfig_additions() const i80130_device::i80130_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : device_t(mconfig, I80130, "I80130", tag, owner, clock, "i80130", __FILE__), - m_pic(*this, "pic"), - m_pit(*this, "pit"), - m_write_irq(*this), - m_write_ack(*this), - m_write_lir(*this), - m_write_systick(*this), - m_write_delay(*this), - m_write_baud(*this) + m_pic(*this, "pic"), + m_pit(*this, "pit"), + m_write_irq(*this), + m_write_ack(*this), + m_write_lir(*this), + m_write_systick(*this), + m_write_delay(*this), + m_write_baud(*this) { } diff --git a/src/emu/machine/ins8154.c b/src/emu/machine/ins8154.c index dadde33e8c7..45ca7143f9e 100644 --- a/src/emu/machine/ins8154.c +++ b/src/emu/machine/ins8154.c @@ -2,8 +2,8 @@ National Semiconductor INS8154 - license: MAME, GPL-2.0+ - copyright-holders: Dirk Best + license: MAME, GPL-2.0+ + copyright-holders: Dirk Best N-Channel 128-by-8 Bit RAM Input/Output (RAM I/O) diff --git a/src/emu/machine/ins8154.h b/src/emu/machine/ins8154.h index f52d894d124..eef4aebffe9 100644 --- a/src/emu/machine/ins8154.h +++ b/src/emu/machine/ins8154.h @@ -2,8 +2,8 @@ National Semiconductor INS8154 - license: MAME, GPL-2.0+ - copyright-holders: Dirk Best + license: MAME, GPL-2.0+ + copyright-holders: Dirk Best N-Channel 128-by-8 Bit RAM Input/Output (RAM I/O) diff --git a/src/emu/machine/mc146818.c b/src/emu/machine/mc146818.c index a09ac1a1e87..fdfc9ca2d16 100644 --- a/src/emu/machine/mc146818.c +++ b/src/emu/machine/mc146818.c @@ -186,7 +186,7 @@ void mc146818_device::nvram_default() if (m_region != NULL) { UINT32 bytes = m_region->bytes(); - + if (bytes > data_size()) bytes = data_size(); @@ -237,7 +237,7 @@ int mc146818_device::to_ram(int a) { if (!(m_data[REG_B] & REG_B_DM)) return dec_2_bcd(a); - + return a; } @@ -250,7 +250,7 @@ int mc146818_device::from_ram(int a) { if (!(m_data[REG_B] & REG_B_DM)) return bcd_2_dec(a); - + return a; } diff --git a/src/emu/machine/mc146818.h b/src/emu/machine/mc146818.h index adae4f7cf36..fd0cab8f2d9 100644 --- a/src/emu/machine/mc146818.h +++ b/src/emu/machine/mc146818.h @@ -171,5 +171,5 @@ private: // device type definition extern const device_type MC146818; - + #endif /* __MC146818_H__ */ diff --git a/src/emu/machine/mc6846.h b/src/emu/machine/mc6846.h index 9e0dc9d4814..a3c0a370e50 100644 --- a/src/emu/machine/mc6846.h +++ b/src/emu/machine/mc6846.h @@ -52,7 +52,7 @@ public: /* partial access to internal state */ UINT16 get_preset(); /* timer interval - 1 in us */ - + protected: // device-level overrides virtual void device_config_complete(); @@ -61,7 +61,7 @@ protected: private: // internal state - + /* registers */ UINT8 m_csr; /* 0,4: combination status register */ UINT8 m_pcr; /* 1: peripheral control register */ @@ -104,12 +104,12 @@ private: int m_old_cif; int m_old_cto; - + inline UINT16 counter(); inline void update_irq(); inline void update_cto(); inline void timer_launch(); - + TIMER_CALLBACK_MEMBER(timer_expire); TIMER_CALLBACK_MEMBER(timer_one_shot); }; diff --git a/src/emu/machine/mc6854.c b/src/emu/machine/mc6854.c index b2009ef6500..2ec4196baad 100644 --- a/src/emu/machine/mc6854.c +++ b/src/emu/machine/mc6854.c @@ -186,11 +186,11 @@ mc6854_device::mc6854_device(const machine_config &mconfig, const char *tag, dev m_fpos(0) { for (int i = 0; i < MC6854_FIFO_SIZE; i++) - { + { m_tfifo[i] = 0; m_rfifo[i] = 0; } - + for (int i = 0; i < MAX_FRAME_LENGTH; i++) { m_frame[i] = 0; @@ -379,7 +379,7 @@ void mc6854_device::tfifo_terminate( ) TIMER_CALLBACK_MEMBER(mc6854_device::tfifo_cb) { device_t* device = (device_t*) ptr; - + int i, data = m_tfifo[ MC6854_FIFO_SIZE - 1 ]; if ( ! m_tstate ) diff --git a/src/emu/machine/mc6854.h b/src/emu/machine/mc6854.h index 4f52c9a736b..b6d4fce565b 100644 --- a/src/emu/machine/mc6854.h +++ b/src/emu/machine/mc6854.h @@ -107,18 +107,18 @@ private: 5 = 8-bit logical control field(s) 6 = variable-length data field(s) */ - + void send_bits( UINT32 data, int len, int zi ); void tfifo_push( UINT8 data ); void tfifo_terminate( ); TIMER_CALLBACK_MEMBER(tfifo_cb); void tfifo_clear( ); - + void rfifo_push( UINT8 d ); void rfifo_terminate( ); UINT8 rfifo_pop( ); void rfifo_clear( ); - + void update_sr2( ); void update_sr1( ); }; diff --git a/src/emu/machine/ncr5380n.c b/src/emu/machine/ncr5380n.c index e9846ce9b46..a14fad48f69 100644 --- a/src/emu/machine/ncr5380n.c +++ b/src/emu/machine/ncr5380n.c @@ -3,13 +3,13 @@ ncr5380n.c Implementation of the NCR 5380, aka the Zilog Z5380 - + TODO: - IRQs - Target mode - + 40801766 - IIx ROM waiting point for "next read fails" - + *********************************************************************/ #include "emu.h" @@ -78,7 +78,7 @@ void ncr5380n_device::device_reset() void ncr5380n_device::reset_soft() { state = IDLE; - scsi_bus->ctrl_w(scsi_refid, 0, S_ALL); // clear any signals we're driving + scsi_bus->ctrl_w(scsi_refid, 0, S_ALL); // clear any signals we're driving scsi_bus->ctrl_wait(scsi_refid, S_ALL, S_ALL); status = 0; drq = false; @@ -97,13 +97,13 @@ void ncr5380n_device::scsi_ctrl_changed() { UINT32 ctrl = scsi_bus->ctrl_r(); -// printf("scsi_ctrl_changed: lines now %x\n", ctrl); +// printf("scsi_ctrl_changed: lines now %x\n", ctrl); -/* if ((ctrl & (S_PHASE_MASK|S_SEL|S_BSY)) != last_phase) - { - printf("phase now %d, REQ %x SEL %x BSY %x\n", ctrl & S_PHASE_MASK, ctrl & S_REQ, ctrl & S_SEL, ctrl & S_BSY); - last_phase = (S_PHASE_MASK|S_SEL|S_BSY); - }*/ +/* if ((ctrl & (S_PHASE_MASK|S_SEL|S_BSY)) != last_phase) + { + printf("phase now %d, REQ %x SEL %x BSY %x\n", ctrl & S_PHASE_MASK, ctrl & S_REQ, ctrl & S_SEL, ctrl & S_BSY); + last_phase = (S_PHASE_MASK|S_SEL|S_BSY); + }*/ // recalculate phase match m_busstatus &= ~BAS_PHASEMATCH; @@ -117,7 +117,7 @@ void ncr5380n_device::scsi_ctrl_changed() // if BSY drops or the phase goes mismatch, that terminates the DMA if ((!(ctrl & S_BSY)) || !(m_busstatus & BAS_PHASEMATCH)) { -// printf("BSY dropped or phase mismatch during DMA, ending DMA\n"); +// printf("BSY dropped or phase mismatch during DMA, ending DMA\n"); m_mode &= ~MODE_DMA; m_busstatus |= BAS_ENDOFDMA; drq_clear(); @@ -162,7 +162,7 @@ void ncr5380n_device::step(bool timeout) int win; for(win=7; win>=0 && !(data & (1<<win)); win--); -// printf("arb complete: data %02x win %02x scsi_id %02x\n", data, win, scsi_id); +// printf("arb complete: data %02x win %02x scsi_id %02x\n", data, win, scsi_id); if(win != scsi_id) { scsi_bus->data_w(scsi_refid, 0); scsi_bus->ctrl_w(scsi_refid, 0, S_ALL); @@ -222,7 +222,7 @@ void ncr5380n_device::step(bool timeout) state = state & STATE_MASK; step(false); - drq_set(); // raise DRQ now that we've completed + drq_set(); // raise DRQ now that we've completed break; default: @@ -252,21 +252,21 @@ void ncr5380n_device::recv_byte() void ncr5380n_device::function_bus_complete() { state = IDLE; -// istatus |= I_FUNCTION|I_BUS; +// istatus |= I_FUNCTION|I_BUS; check_irq(); } void ncr5380n_device::function_complete() { state = IDLE; -// istatus |= I_FUNCTION; +// istatus |= I_FUNCTION; check_irq(); } void ncr5380n_device::bus_complete() { state = IDLE; -// istatus |= I_BUS; +// istatus |= I_BUS; check_irq(); } @@ -309,7 +309,7 @@ WRITE8_MEMBER(ncr5380n_device::icmd_w) // asserting to drive the data bus? if ((data & IC_DBUS) && !(m_icommand & IC_DBUS)) { -// printf("%s: driving data bus with %02x\n", tag(), m_outdata); +// printf("%s: driving data bus with %02x\n", tag(), m_outdata); scsi_bus->data_w(scsi_refid, m_outdata); delay(2); } @@ -327,7 +327,7 @@ WRITE8_MEMBER(ncr5380n_device::icmd_w) (data & IC_SEL ? S_SEL : 0) | (data & IC_ATN ? S_ATN : 0); -// printf("%s: changing control lines %04x\n", tag(), newdata); +// printf("%s: changing control lines %04x\n", tag(), newdata); scsi_bus->ctrl_w(scsi_refid, newdata, S_RST|S_ACK|S_BSY|S_SEL|S_ATN); } @@ -342,11 +342,11 @@ READ8_MEMBER(ncr5380n_device::mode_r) WRITE8_MEMBER(ncr5380n_device::mode_w) { -// printf("%s: mode_w %02x (%08x)\n", tag(), data, space.device().safe_pc()); +// printf("%s: mode_w %02x (%08x)\n", tag(), data, space.device().safe_pc()); // arbitration bit being set? if ((data & MODE_ARBITRATE) && !(m_mode & MODE_ARBITRATE)) { - // if SEL is selected and the assert SEL bit in the initiator + // if SEL is selected and the assert SEL bit in the initiator // command register is clear, fail if ((scsi_bus->ctrl_r() & S_SEL) && !(m_icommand & IC_SEL)) { @@ -355,7 +355,7 @@ WRITE8_MEMBER(ncr5380n_device::mode_w) else { seq = 0; -// state = DISC_SEL_ARBITRATION; +// state = DISC_SEL_ARBITRATION; arbitrate(); } } @@ -363,20 +363,20 @@ WRITE8_MEMBER(ncr5380n_device::mode_w) { // arbitration in progress bit ONLY clears when the host disables arbitration. (thanks, Zilog Z8530 manual!) // the Apple II High Speed SCSI Card boot code explicitly requires this. - m_icommand &= ~ IC_ARBITRATION; + m_icommand &= ~ IC_ARBITRATION; } m_mode = data; } READ8_MEMBER(ncr5380n_device::command_r) { -// logerror("%s: command_r %02x (%08x)\n", tag(), m_tcommand, space.device().safe_pc()); +// logerror("%s: command_r %02x (%08x)\n", tag(), m_tcommand, space.device().safe_pc()); return m_tcommand; } WRITE8_MEMBER(ncr5380n_device::command_w) { -// printf("%s: command_w %02x (%08x)\n", tag(), data, space.device().safe_pc()); +// printf("%s: command_w %02x (%08x)\n", tag(), data, space.device().safe_pc()); m_tcommand = data; // recalculate phase match @@ -390,11 +390,11 @@ WRITE8_MEMBER(ncr5380n_device::command_w) void ncr5380n_device::arbitrate() { m_icommand &= ~IC_ARBLOST; - m_icommand |= IC_ARBITRATION; // set in progress flag + m_icommand |= IC_ARBITRATION; // set in progress flag state = (state & STATE_MASK) | (ARB_COMPLETE << SUB_SHIFT); scsi_bus->data_w(scsi_refid, m_outdata); scsi_bus->ctrl_w(scsi_refid, S_BSY, S_BSY); - m_icommand |= IC_BSY; // make sure BSY shows in icommand (Zilog 5380 manual suggests this behavior, Apple II High-Speed SCSI Card firmware requires it) + m_icommand |= IC_BSY; // make sure BSY shows in icommand (Zilog 5380 manual suggests this behavior, Apple II High-Speed SCSI Card firmware requires it) delay(11); } @@ -411,7 +411,7 @@ void ncr5380n_device::check_irq() READ8_MEMBER(ncr5380n_device::status_r) { UINT32 ctrl = scsi_bus->ctrl_r(); - UINT8 res = status | + UINT8 res = status | (ctrl & S_RST ? ST_RST : 0) | (ctrl & S_BSY ? ST_BSY : 0) | (ctrl & S_REQ ? ST_REQ : 0) | @@ -420,7 +420,7 @@ READ8_MEMBER(ncr5380n_device::status_r) (ctrl & S_INP ? ST_IO : 0) | (ctrl & S_SEL ? ST_SEL : 0); -// printf("%s: status_r %02x (%08x)\n", tag(), res, space.device().safe_pc()); +// printf("%s: status_r %02x (%08x)\n", tag(), res, space.device().safe_pc()); return res; } @@ -435,7 +435,7 @@ READ8_MEMBER(ncr5380n_device::busandstatus_r) (ctrl & S_ATN ? BAS_ATN : 0) | (ctrl & S_ACK ? BAS_ACK : 0); -// printf("%s: busandstatus_r %02x (%08x)\n", tag(), res, space.device().safe_pc()); +// printf("%s: busandstatus_r %02x (%08x)\n", tag(), res, space.device().safe_pc()); return res; } @@ -463,7 +463,7 @@ READ8_MEMBER(ncr5380n_device::resetparityirq_r) WRITE8_MEMBER(ncr5380n_device::startdmainitrx_w) { -// printf("%02x to start dma initiator Rx\n", data); +// printf("%02x to start dma initiator Rx\n", data); recv_byte(); } @@ -495,7 +495,7 @@ UINT8 ncr5380n_device::dma_r() void ncr5380n_device::drq_set() { - if(!drq) + if(!drq) { drq = true; m_busstatus |= BAS_DMAREQUEST; @@ -505,7 +505,7 @@ void ncr5380n_device::drq_set() void ncr5380n_device::drq_clear() { - if(drq) + if(drq) { drq = false; m_busstatus &= ~BAS_DMAREQUEST; @@ -547,7 +547,7 @@ READ8_MEMBER(ncr5380n_device::read) WRITE8_MEMBER(ncr5380n_device::write) { -// printf("%x to 5380 @ %x\n", data, offset); +// printf("%x to 5380 @ %x\n", data, offset); switch (offset & 7) { case 0: @@ -583,4 +583,3 @@ WRITE8_MEMBER(ncr5380n_device::write) break; } } - diff --git a/src/emu/machine/pd4990a.h b/src/emu/machine/pd4990a.h index 2d767928e02..341343bfe3f 100644 --- a/src/emu/machine/pd4990a.h +++ b/src/emu/machine/pd4990a.h @@ -20,14 +20,14 @@ class upd4990a_old_device : public device_t public: upd4990a_old_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); ~upd4990a_old_device() {} - + /* this should be refactored, once RTCs get unified */ void addretrace(); DECLARE_READ8_MEMBER( testbit_r ); DECLARE_READ8_MEMBER( databit_r ); DECLARE_WRITE16_MEMBER( control_16_w ); - + protected: // device-level overrides virtual void device_config_complete(); @@ -59,7 +59,7 @@ private: int m_clock_line; int m_command_line; //?? - + void increment_month(); void increment_day(); void readbit(); diff --git a/src/emu/machine/ram.c b/src/emu/machine/ram.c index f4dad9f81a8..66085274f88 100644 --- a/src/emu/machine/ram.c +++ b/src/emu/machine/ram.c @@ -2,8 +2,8 @@ RAM device - license: MAME, GPL-2.0+ - copyright-holders: Dirk Best + license: MAME, GPL-2.0+ + copyright-holders: Dirk Best Provides a configurable amount of RAM to drivers diff --git a/src/emu/machine/ram.h b/src/emu/machine/ram.h index bde5e157512..7579c730a6e 100644 --- a/src/emu/machine/ram.h +++ b/src/emu/machine/ram.h @@ -2,8 +2,8 @@ RAM device - license: MAME, GPL-2.0+ - copyright-holders: Dirk Best + license: MAME, GPL-2.0+ + copyright-holders: Dirk Best Provides a configurable amount of RAM to drivers |
