From 7238415d1f30cae0b47e54dd04eb0b5e558c132e Mon Sep 17 00:00:00 2001 From: Vas Crabb Date: Sun, 27 Nov 2016 09:56:49 +1100 Subject: srcclean (nw) --- src/mame/machine/apple2gs.cpp | 18 ++++++++-------- src/mame/machine/atarixga.cpp | 38 ++++++++++++++++----------------- src/mame/machine/atarixga.h | 16 +++++++------- src/mame/machine/cedar_magnet_board.h | 2 +- src/mame/machine/cedar_magnet_sound.cpp | 20 ++++++++--------- src/mame/machine/cedar_magnet_sound.h | 4 ++-- src/mame/machine/fmt_icmem.cpp | 2 +- src/mame/machine/fmt_icmem.h | 2 +- src/mame/machine/msx_matsushita.cpp | 2 +- src/mame/machine/znmcu.cpp | 2 +- 10 files changed, 53 insertions(+), 53 deletions(-) (limited to 'src/mame/machine') diff --git a/src/mame/machine/apple2gs.cpp b/src/mame/machine/apple2gs.cpp index 0b76ef83802..f7b382432d5 100644 --- a/src/mame/machine/apple2gs.cpp +++ b/src/mame/machine/apple2gs.cpp @@ -1052,15 +1052,15 @@ READ8_MEMBER( apple2gs_state::apple2gs_c0xx_r ) case 0x38: /* C038 - SCCBREG */ result = m_scc->cb_r(space, 0, mem_mask); break; - + case 0x39: /* C039 - SCCAREG */ result = m_scc->ca_r(space, 0, mem_mask); break; - + case 0x3A: /* C03A - SCCBDATA */ result = m_scc->db_r(space, 0, mem_mask); break; - + case 0x3B: /* C03B - SCCADATA */ result = m_scc->da_r(space, 0, mem_mask); break; @@ -1232,19 +1232,19 @@ WRITE8_MEMBER( apple2gs_state::apple2gs_c0xx_w ) case 0x38: /* C038 - SCCBREG */ m_scc->cb_w(space, 0, data); - break; - + break; + case 0x39: /* C039 - SCCAREG */ m_scc->ca_w(space, 0, data); - break; - + break; + case 0x3A: /* C03A - SCCBDATA */ m_scc->db_w(space, 0, data); - break; + break; case 0x3B: /* C03B - SCCADATA */ m_scc->da_w(space, 0, data); - break; + break; case 0x3C: /* C03C - SOUNDCTL */ case 0x3D: /* C03D - SOUNDDATA */ diff --git a/src/mame/machine/atarixga.cpp b/src/mame/machine/atarixga.cpp index 27aa4debef3..cd574d48db9 100644 --- a/src/mame/machine/atarixga.cpp +++ b/src/mame/machine/atarixga.cpp @@ -73,7 +73,7 @@ atari_136094_0072_device::atari_136094_0072_device(const machine_config &mconfig void atari_136094_0072_device::device_start() { m_ram = std::make_unique(RAM_WORDS); - + save_pointer(NAME(m_ram.get()), RAM_WORDS * sizeof(uint16_t)); save_item(NAME(m_address)); save_item(NAME(m_ciphertext)); @@ -296,7 +296,7 @@ void atari_136095_0072_device::device_start() save_pointer(NAME(m_ram.get()), RAM_WORDS * sizeof(uint16_t)); save_item(NAME(m_update.addr)); - save_item(NAME(m_update.data)); + save_item(NAME(m_update.data)); save_item(NAME(m_poly_lsb)); save_item(NAME(m_reply)); } @@ -323,7 +323,7 @@ uint16_t atari_136095_0072_device::powers2(uint8_t k, uint16_t x) { size_t i, n; uint16_t t = 1 << (x % 16); - + if ((x == 15) || (x == 16)) n = k + 13; else @@ -338,7 +338,7 @@ uint16_t atari_136095_0072_device::powers2(uint8_t k, uint16_t x) uint16_t atari_136095_0072_device::decipher(uint8_t k, uint16_t c) { uint16_t i, p = 0; - + /* key 0x00 is special, it has 15 "identical twins". */ static const uint8_t kmap[128] = { @@ -359,27 +359,27 @@ uint16_t atari_136095_0072_device::decipher(uint8_t k, uint16_t c) 0x5D,0x05,0x00,0x08,0x25,0x29,0x30,0x69, 0x00,0x4E,0x35,0x3B,0x00,0x0C,0x0A,0x2B, }; - + /* Only 128 keys internally, if high bit set, then find the 7-bit "twin" by xor 0xA8. */ if (k & 0x80) k ^= 0xA8; - + k = kmap[k]; - + if ((c & (c - 1)) == 0) { return powers2(k, ctz(c)); } - + for (i = 0; i < 15; ++i) { if (1 & (c >> i)) { p ^= powers2(k, i); } } - + if (c & 0x8000) { p ^= powers2(k, 16); } - + uint16_t x = 0xC000; for (i = 0; i < k + 13; ++i) { @@ -388,7 +388,7 @@ uint16_t atari_136095_0072_device::decipher(uint8_t k, uint16_t c) x = lfsr2(x); } - + return p; } @@ -418,7 +418,7 @@ READ32_MEMBER(atari_136095_0072_device::polylsb_read) WRITE32_MEMBER(atari_136095_0072_device::write) { uint16_t address, value = 0; - + address = offset << 2; if (ACCESSING_BITS_16_31) { @@ -429,7 +429,7 @@ WRITE32_MEMBER(atari_136095_0072_device::write) address += 2; value = uint16_t (data & 0xFFFF); } - + switch (m_mode) { case FPGA_SETKEY: @@ -443,11 +443,11 @@ WRITE32_MEMBER(atari_136095_0072_device::write) m_ram[(offset << 1) + 1] = value; } break; - + /* Send Ciphertext to FPGA for decryption. */ case FPGA_DECIPHER: uint16_t key_offset, key_byte; - + /* Algorithm to select key byte based on offset. */ key_offset = ((((address >> 8) & 1) ^ 1) << 0) | ((((address >> 2) & 1) ^ 1) << 1) @@ -464,7 +464,7 @@ WRITE32_MEMBER(atari_136095_0072_device::write) key_byte = m_ram[key_offset]; m_reply = decipher(key_byte, value); break; - + case FPGA_PROCESS: case FPGA_RESULT: default: @@ -478,12 +478,12 @@ READ32_MEMBER(atari_136095_0072_device::read) { uint16_t address; uint32_t reply = 0; - + address = offset << 2; if (ACCESSING_BITS_0_15) address += 2; - + switch (address) { case 0x0020: @@ -503,6 +503,6 @@ READ32_MEMBER(atari_136095_0072_device::read) default: break; } - + return reply; } diff --git a/src/mame/machine/atarixga.h b/src/mame/machine/atarixga.h index d8e0b76c948..5204caa5e94 100644 --- a/src/mame/machine/atarixga.h +++ b/src/mame/machine/atarixga.h @@ -40,14 +40,14 @@ public: virtual DECLARE_WRITE32_MEMBER(write) override; virtual DECLARE_READ32_MEMBER(read) override; - + protected: virtual void device_start() override; virtual void device_reset() override; private: static const size_t RAM_WORDS = 2048; - + uint16_t powers2(uint8_t k, uint16_t x); uint16_t lfsr2(uint16_t x); uint16_t lfsr1(uint16_t x); @@ -59,10 +59,10 @@ private: FPGA_SETKEY, FPGA_DECIPHER }; - + fpga_mode m_mode; uint16_t m_address; // last written address - uint16_t m_ciphertext; // last written ciphertext + uint16_t m_ciphertext; // last written ciphertext }; class atari_136095_0072_device : public atari_xga_device @@ -72,17 +72,17 @@ public: DECLARE_WRITE32_MEMBER(polylsb_write); DECLARE_READ32_MEMBER(polylsb_read); - + virtual DECLARE_WRITE32_MEMBER(write) override; virtual DECLARE_READ32_MEMBER(read) override; - + protected: virtual void device_start() override; virtual void device_reset() override; - + private: static const size_t RAM_WORDS = 4096; - + uint16_t powers2(uint8_t k, uint16_t x); uint16_t lfsr2(uint16_t x); uint16_t lfsr1(uint16_t x); diff --git a/src/mame/machine/cedar_magnet_board.h b/src/mame/machine/cedar_magnet_board.h index 1ffbcef1c05..1672f9e5e76 100644 --- a/src/mame/machine/cedar_magnet_board.h +++ b/src/mame/machine/cedar_magnet_board.h @@ -22,7 +22,7 @@ public: uint8_t* m_ram; z80_device* m_cpu; - + virtual uint8_t read_cpu_bus(int offset); virtual void write_cpu_bus(int offset, uint8_t data); diff --git a/src/mame/machine/cedar_magnet_sound.cpp b/src/mame/machine/cedar_magnet_sound.cpp index bc17672db81..37132fb77f3 100644 --- a/src/mame/machine/cedar_magnet_sound.cpp +++ b/src/mame/machine/cedar_magnet_sound.cpp @@ -62,10 +62,10 @@ static ADDRESS_MAP_START( cedar_magnet_sound_io, AS_IO, 8, cedar_magnet_sound_de AM_RANGE(0x0c, 0x0c) AM_DEVWRITE("aysnd0", ay8910_device, address_w) AM_RANGE(0x0d, 0x0d) AM_DEVWRITE("aysnd0", ay8910_device, data_w) - + AM_RANGE(0x10, 0x10) AM_DEVWRITE("aysnd1", ay8910_device, address_w) AM_RANGE(0x11, 0x11) AM_DEVWRITE("aysnd1", ay8910_device, data_w) - + AM_RANGE(0x14, 0x14) AM_READ(soundlatch_r) ADDRESS_MAP_END @@ -84,12 +84,12 @@ WRITE8_MEMBER(cedar_magnet_sound_device::ay1_porta_w) WRITE_LINE_MEMBER(cedar_magnet_sound_device::ctc0_z0_w) { -// printf("USED ctc0_z0_w %d\n", state); +// printf("USED ctc0_z0_w %d\n", state); } WRITE_LINE_MEMBER(cedar_magnet_sound_device::ctc0_z1_w) { -// printf("USED ctc0_z1_w %d\n", state); +// printf("USED ctc0_z1_w %d\n", state); } @@ -148,8 +148,8 @@ TIMER_CALLBACK_MEMBER(cedar_magnet_sound_device::reset_assert_callback) INTERRUPT_GEN_MEMBER(cedar_magnet_sound_device::fake_irq) { // these should be coming from the CTC... -// if (m_fake_counter==0) m_cpu->set_input_line_and_vector(0, HOLD_LINE,0xe6); -// if (m_fake_counter==1) m_cpu->set_input_line_and_vector(0, HOLD_LINE,0xee); +// if (m_fake_counter==0) m_cpu->set_input_line_and_vector(0, HOLD_LINE,0xe6); +// if (m_fake_counter==1) m_cpu->set_input_line_and_vector(0, HOLD_LINE,0xee); if (m_fake_counter==2) m_cpu->set_input_line_and_vector(0, HOLD_LINE,0xf6); // drives the AY, should be from ctc1 4th counter? m_fake_counter++; @@ -161,19 +161,19 @@ static MACHINE_CONFIG_FRAGMENT( cedar_magnet_sound ) MCFG_CPU_ADD("topcpu", Z80,4000000) MCFG_CPU_PROGRAM_MAP(cedar_magnet_sound_map) MCFG_CPU_IO_MAP(cedar_magnet_sound_io) -// MCFG_Z80_DAISY_CHAIN(daisy_chain) +// MCFG_Z80_DAISY_CHAIN(daisy_chain) MCFG_CPU_PERIODIC_INT_DRIVER(cedar_magnet_sound_device, fake_irq, 4*60) MCFG_DEVICE_ADD("ctc0", Z80CTC, 4000000/8 ) -// MCFG_Z80CTC_INTR_CB(INPUTLINE("topcpu", INPUT_LINE_IRQ0)) +// MCFG_Z80CTC_INTR_CB(INPUTLINE("topcpu", INPUT_LINE_IRQ0)) MCFG_Z80CTC_INTR_CB(WRITELINE(cedar_magnet_sound_device, ctc0_int_w)) MCFG_Z80CTC_ZC0_CB(WRITELINE(cedar_magnet_sound_device, ctc0_z0_w)) MCFG_Z80CTC_ZC1_CB(WRITELINE(cedar_magnet_sound_device, ctc0_z1_w)) MCFG_Z80CTC_ZC2_CB(WRITELINE(cedar_magnet_sound_device, ctc0_z2_w)) MCFG_DEVICE_ADD("ctc1", Z80CTC, 4000000/8 ) -// MCFG_Z80CTC_INTR_CB(INPUTLINE("topcpu", INPUT_LINE_IRQ0)) -// MCFG_Z80CTC_INTR_CB(DEVWRITELINE("ctc0", z80ctc_device, trg0)) +// MCFG_Z80CTC_INTR_CB(INPUTLINE("topcpu", INPUT_LINE_IRQ0)) +// MCFG_Z80CTC_INTR_CB(DEVWRITELINE("ctc0", z80ctc_device, trg0)) MCFG_Z80CTC_INTR_CB(WRITELINE(cedar_magnet_sound_device, ctc1_int_w)) MCFG_Z80CTC_ZC0_CB(WRITELINE(cedar_magnet_sound_device, ctc1_z0_w)) MCFG_Z80CTC_ZC1_CB(WRITELINE(cedar_magnet_sound_device, ctc1_z1_w)) diff --git a/src/mame/machine/cedar_magnet_sound.h b/src/mame/machine/cedar_magnet_sound.h index d4fb3a6cace..fcd498c1aa8 100644 --- a/src/mame/machine/cedar_magnet_sound.h +++ b/src/mame/machine/cedar_magnet_sound.h @@ -24,7 +24,7 @@ class cedar_magnet_sound_device : public cedar_magnet_board_device public: // construction/destruction cedar_magnet_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); - + required_device m_ctc0; required_device m_ctc1; @@ -36,7 +36,7 @@ public: void write_command(uint8_t data); uint8_t m_command; - + DECLARE_WRITE_LINE_MEMBER(ctc1_z0_w); DECLARE_WRITE_LINE_MEMBER(ctc1_z1_w); DECLARE_WRITE_LINE_MEMBER(ctc1_z2_w); diff --git a/src/mame/machine/fmt_icmem.cpp b/src/mame/machine/fmt_icmem.cpp index da2679a211e..8a22f583d30 100644 --- a/src/mame/machine/fmt_icmem.cpp +++ b/src/mame/machine/fmt_icmem.cpp @@ -148,7 +148,7 @@ READ8_MEMBER(fmt_icmem_device::status_r) if(m_change) ret |= 0x80; m_change = false; - + return ret; } diff --git a/src/mame/machine/fmt_icmem.h b/src/mame/machine/fmt_icmem.h index d9eb85cbd30..dc58c6f6814 100644 --- a/src/mame/machine/fmt_icmem.h +++ b/src/mame/machine/fmt_icmem.h @@ -59,7 +59,7 @@ public: protected: virtual ioport_constructor device_input_ports() const override; - + private: required_ioport m_writeprotect; std::unique_ptr m_memcard_ram; diff --git a/src/mame/machine/msx_matsushita.cpp b/src/mame/machine/msx_matsushita.cpp index 3c6db780f42..d5b1f13e44f 100644 --- a/src/mame/machine/msx_matsushita.cpp +++ b/src/mame/machine/msx_matsushita.cpp @@ -84,7 +84,7 @@ READ8_MEMBER(msx_matsushita_device::switched_read) case 0x03: { uint8_t result = (((m_pattern & 0x80) ? m_nibble1 : m_nibble2) << 4) | ((m_pattern & 0x40) ? m_nibble1 : m_nibble2); - + if (!space.debugger_access()) m_pattern = (m_pattern << 2) | (m_pattern >> 6); diff --git a/src/mame/machine/znmcu.cpp b/src/mame/machine/znmcu.cpp index 495ff89e740..a61baa1ab14 100644 --- a/src/mame/machine/znmcu.cpp +++ b/src/mame/machine/znmcu.cpp @@ -111,4 +111,4 @@ void znmcu_device::device_timer(emu_timer &timer, device_timer_id tid, int param m_mcu_timer->adjust(attotime::from_usec(5), 1); } -} \ No newline at end of file +} -- cgit v1.2.3