From 4cf5f5092bd3694e496b7cd3add055712c09cc86 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felipe=20Corr=C3=AAa=20da=20Silva=20Sanches?= Date: Tue, 26 Dec 2023 04:18:50 +0000 Subject: [PATCH] code style fixes --- src/devices/bus/technics/hdae5000.h | 8 +- src/devices/bus/technics/kn5000_extension.h | 2 +- src/devices/cpu/tlcs900/dasm900.cpp | 173 ++++++++++++-------- src/devices/cpu/tlcs900/tmp94c241.cpp | 96 +++++------ src/devices/cpu/tlcs900/tmp94c241.h | 8 +- src/devices/cpu/tlcs900/tmp95c061.cpp | 36 ++-- src/mame/technics/kn1500.cpp | 15 +- src/mame/technics/kn5000.cpp | 24 +-- 8 files changed, 186 insertions(+), 176 deletions(-) diff --git a/src/devices/bus/technics/hdae5000.h b/src/devices/bus/technics/hdae5000.h index 543215bfe0af3..cbf8affde66b2 100644 --- a/src/devices/bus/technics/hdae5000.h +++ b/src/devices/bus/technics/hdae5000.h @@ -3,8 +3,10 @@ // // HD-AE5000 emulation // -#ifndef MAME_BUS_HD_AE5000_H -#define MAME_BUS_HD_AE5000_H +#ifndef MAME_BUS_TECHNICS_HDAE5000_H +#define MAME_BUS_TECHNICS_HDAE5000_H + +#pragma once #include "kn5000_extension.h" #include "bus/ata/hdd.h" @@ -33,4 +35,4 @@ class hdae5000_device : public device_t, public kn5000_extension_interface DECLARE_DEVICE_TYPE(HDAE5000, hdae5000_device) -#endif +#endif // MAME_BUS_TECHNICS_HDAE5000_H diff --git a/src/devices/bus/technics/kn5000_extension.h b/src/devices/bus/technics/kn5000_extension.h index 9a6b875d576aa..1104f00de8371 100644 --- a/src/devices/bus/technics/kn5000_extension.h +++ b/src/devices/bus/technics/kn5000_extension.h @@ -1,6 +1,6 @@ // license:BSD-3-Clause // copyright-holders:Olivier Galibert, Felipe Sanches - +// // Generic Technics KN5000 extension slot #ifndef MAME_BUS_TECHNICS_KN5000_EXTENSION_H diff --git a/src/devices/cpu/tlcs900/dasm900.cpp b/src/devices/cpu/tlcs900/dasm900.cpp index b91cf2aaf1405..73d9f079b89e7 100644 --- a/src/devices/cpu/tlcs900/dasm900.cpp +++ b/src/devices/cpu/tlcs900/dasm900.cpp @@ -1462,11 +1462,11 @@ const char *const tmp95c061_disassembler::s_sfr_names[0x80] = { }; tmp95c063_disassembler::tmp95c063_disassembler() - : tlcs900_disassembler(0xA0, s_sfr_names) + : tlcs900_disassembler(0xa0, s_sfr_names) { } -const char *const tmp95c063_disassembler::s_sfr_names[0xA0] = { +const char *const tmp95c063_disassembler::s_sfr_names[0xa0] = { /*00:*/ "0x00", "P1", "0x02", "0x03", "P1CR", "0x05", "P2", "0x07", /*08:*/ "0x08", "P2FC", "0x0a", "0x0b", "0x0c", "P5", "0x0e", "0x0f", /*10:*/ "P5CR", "P5FC", "P6", "P7", "0x14", "P6FC", "P7CR", "P7FC", @@ -1593,37 +1593,46 @@ offs_t tlcs900_disassembler::disassemble(std::ostream &stream, offs_t pc, const case M_C0: switch( op & 0x07 ) { - case 0x00: /* 0xC0 */ + case 0x00: /* 0xc0 */ imm = opcodes.r8( pos++ ); - if (imm < m_num_sfr){ + if( imm < m_num_sfr ) + { buf = string_format("%s", m_sfr_names[imm]); - } else { + } + else + { buf = string_format("0x%02x", imm); } break; - case 0x01: /* 0xC1 */ + case 0x01: /* 0xc1 */ imm = opcodes.r8( pos++ ); imm = imm | (opcodes.r8( pos++ ) << 8); - if (imm < m_num_sfr){ + if( imm < m_num_sfr ) + { buf = string_format("%s", m_sfr_names[imm]); - } else { + } + else + { buf = string_format("0x%04x", imm); } break; - case 0x02: /* 0xC2 */ + case 0x02: /* 0xc2 */ imm = opcodes.r8( pos++ ); imm = imm | (opcodes.r8( pos++ ) << 8); imm = imm | (opcodes.r8( pos++ ) << 16); - if (imm < m_num_sfr){ + if( imm < m_num_sfr ) + { buf = string_format("%s", m_sfr_names[imm]); - } else { + } + else + { buf = string_format("0x%06x", imm); } break; - case 0x03: /* 0xC3 */ + case 0x03: /* 0xc3 */ imm = opcodes.r8( pos++ ); switch( imm & 0x03 ) { @@ -1667,12 +1676,12 @@ offs_t tlcs900_disassembler::disassemble(std::ostream &stream, offs_t pc, const } break; - case 0x04: /* 0xC4 */ + case 0x04: /* 0xc4 */ imm = opcodes.r8( pos++ ); buf = string_format("-%s", s_allreg32[imm]); break; - case 0x05: /* 0xC5 */ + case 0x05: /* 0xc5 */ imm = opcodes.r8( pos++ ); buf = string_format("%s+", s_allreg32[imm]); break; @@ -1682,7 +1691,7 @@ offs_t tlcs900_disassembler::disassemble(std::ostream &stream, offs_t pc, const break; case oC8: - if ( op & 0x08 ) + if( op & 0x08 ) { buf = string_format("%s", s_reg8[ op & 0x07 ]); } @@ -1698,25 +1707,25 @@ offs_t tlcs900_disassembler::disassemble(std::ostream &stream, offs_t pc, const case M_D0: switch( op & 0x07 ) { - case 0x00: /* 0xD0 */ + case 0x00: /* 0xd0 */ imm = opcodes.r8( pos++ ); buf = string_format("0x%02x", imm); break; - case 0x01: /* 0xD1 */ + case 0x01: /* 0xd1 */ imm = opcodes.r8( pos++ ); imm = imm | (opcodes.r8( pos++ ) << 8); buf = string_format("0x%04x", imm); break; - case 0x02: /* 0xD2 */ + case 0x02: /* 0xd2 */ imm = opcodes.r8( pos++ ); imm = imm | (opcodes.r8( pos++ ) << 8); imm = imm | (opcodes.r8( pos++ ) << 16); buf = string_format("0x%06x", imm); break; - case 0x03: /* 0xD3 */ + case 0x03: /* 0xd3 */ imm = opcodes.r8( pos++ ); switch( imm & 0x03 ) { @@ -1760,12 +1769,12 @@ offs_t tlcs900_disassembler::disassemble(std::ostream &stream, offs_t pc, const } break; - case 0x04: /* 0xD4 */ + case 0x04: /* 0xd4 */ imm = opcodes.r8( pos++ ); buf = string_format("-%s", s_allreg32[imm]); break; - case 0x05: /* 0xD5 */ + case 0x05: /* 0xd5 */ imm = opcodes.r8( pos++ ); buf = string_format("%s+", s_allreg32[imm]); break; @@ -1775,7 +1784,7 @@ offs_t tlcs900_disassembler::disassemble(std::ostream &stream, offs_t pc, const break; case oD8: - if ( op & 0x08 ) + if( op & 0x08 ) { buf = string_format("%s", s_reg16[ op & 0x07 ]); } @@ -1792,25 +1801,25 @@ offs_t tlcs900_disassembler::disassemble(std::ostream &stream, offs_t pc, const case M_E0: switch( op & 0x07 ) { - case 0x00: /* 0xE0 */ + case 0x00: /* 0xe0 */ imm = opcodes.r8( pos++ ); buf = string_format("0x%02x", imm); break; - case 0x01: /* 0xE1 */ + case 0x01: /* 0xe1 */ imm = opcodes.r8( pos++ ); imm = imm | (opcodes.r8( pos++ ) << 8); buf = string_format("0x%04x", imm); break; - case 0x02: /* 0xE2 */ + case 0x02: /* 0xe2 */ imm = opcodes.r8( pos++ ); imm = imm | (opcodes.r8( pos++ ) << 8); imm = imm | (opcodes.r8( pos++ ) << 16); buf = string_format("0x%06x", imm); break; - case 0x03: /* 0xE3 */ + case 0x03: /* 0xe3 */ imm = opcodes.r8( pos++ ); switch( imm & 0x03 ) { @@ -1854,12 +1863,12 @@ offs_t tlcs900_disassembler::disassemble(std::ostream &stream, offs_t pc, const } break; - case 0x04: /* 0xE4 */ + case 0x04: /* 0xe4 */ imm = opcodes.r8( pos++ ); buf = string_format("-%s", s_allreg32[imm]); break; - case 0x05: /* 0xE5 */ + case 0x05: /* 0xe5 */ imm = opcodes.r8( pos++ ); buf = string_format("%s+", s_allreg32[imm]); break; @@ -1869,7 +1878,7 @@ offs_t tlcs900_disassembler::disassemble(std::ostream &stream, offs_t pc, const break; case M_E8: - if ( op & 0x08 ) + if( op & 0x08 ) { buf = string_format("%s", s_reg32[ op & 0x07 ]); } @@ -1885,37 +1894,46 @@ offs_t tlcs900_disassembler::disassemble(std::ostream &stream, offs_t pc, const case M_F0: switch( op & 0x07 ) { - case 0x00: /* 0xF0 */ + case 0x00: /* 0xf0 */ imm = opcodes.r8( pos++ ); - if (imm < m_num_sfr){ + if( imm < m_num_sfr ) + { buf = string_format("%s", m_sfr_names[imm]); - } else { + } + else + { buf = string_format("0x%02x", imm); } break; - case 0x01: /* 0xF1 */ + case 0x01: /* 0xf1 */ imm = opcodes.r8( pos++ ); imm = imm | (opcodes.r8( pos++ ) << 8); - if (imm < m_num_sfr){ + if( imm < m_num_sfr ) + { buf = string_format("%s", m_sfr_names[imm]); - } else { + } + else + { buf = string_format("0x%04x", imm); } break; - case 0x02: /* 0xF2 */ + case 0x02: /* 0xf2 */ imm = opcodes.r8( pos++ ); imm = imm | (opcodes.r8( pos++ ) << 8); imm = imm | (opcodes.r8( pos++ ) << 16); - if (imm < m_num_sfr){ + if( imm < m_num_sfr ) + { buf = string_format("%s", m_sfr_names[imm]); - } else { + } + else + { buf = string_format("0x%06x", imm); } break; - case 0x03: /* 0xF3 */ + case 0x03: /* 0xf3 */ imm = opcodes.r8( pos++ ); switch( imm & 0x03 ) { @@ -1959,12 +1977,12 @@ offs_t tlcs900_disassembler::disassemble(std::ostream &stream, offs_t pc, const } break; - case 0x04: /* 0xF4 */ + case 0x04: /* 0xf4 */ imm = opcodes.r8( pos++ ); buf = string_format("-%s", s_allreg32[imm]); break; - case 0x05: /* 0xF5 */ + case 0x05: /* 0xf5 */ imm = opcodes.r8( pos++ ); buf = string_format("%s+", s_allreg32[imm]); break; @@ -2022,13 +2040,15 @@ offs_t tlcs900_disassembler::disassemble(std::ostream &stream, offs_t pc, const case O_CC: util::stream_format(stream, " %s", s_cond[op & 0x0F]); - if ((op & 0x07) != 0 && dasm->mnemonic != M_SCC) + if( (op & 0x07) != 0 && dasm->mnemonic != M_SCC ) + { flags |= STEP_COND; + } break; case O_CR8: imm = opcodes.r8( pos++ ); - switch (imm & 0xe3) + switch(imm & 0xe3) { case 0x42: util::stream_format(stream, " DMAM%d", (imm >> 2) & 7); @@ -2041,7 +2061,7 @@ offs_t tlcs900_disassembler::disassemble(std::ostream &stream, offs_t pc, const case O_CR16: imm = opcodes.r8( pos++ ); - switch (imm & 0xe3) + switch(imm & 0xe3) { case 0x40: util::stream_format(stream, " DMAC%d", (imm >> 2) & 7); @@ -2054,7 +2074,7 @@ offs_t tlcs900_disassembler::disassemble(std::ostream &stream, offs_t pc, const case O_CR32: imm = opcodes.r8( pos++ ); - switch (imm & 0xe3) + switch( imm & 0xe3 ) { case 0x00: util::stream_format(stream, " DMAS%d", (imm >> 2) & 7); @@ -2070,13 +2090,13 @@ offs_t tlcs900_disassembler::disassemble(std::ostream &stream, offs_t pc, const case O_D8: imm = opcodes.r8( pos++ ); - util::stream_format(stream, " 0x%06x", ( pos + (int8_t)imm ) & 0xFFFFFF); + util::stream_format(stream, " 0x%06x", ( pos + (int8_t)imm ) & 0xffffff); break; case O_D16: imm = opcodes.r8( pos++ ); imm = imm | (opcodes.r8( pos++ ) << 8); - util::stream_format(stream, " 0x%06x", ( pos + (int16_t)imm ) & 0xFFFFFF); + util::stream_format(stream, " 0x%06x", ( pos + (int16_t)imm ) & 0xffffff); break; case O_F: @@ -2129,9 +2149,12 @@ offs_t tlcs900_disassembler::disassemble(std::ostream &stream, offs_t pc, const case O_M8: imm = opcodes.r8( pos++ ); - if (imm <= m_num_sfr){ + if( imm <= m_num_sfr ) + { util::stream_format(stream, " (%s)", m_sfr_names[imm]); - } else { + } + else + { util::stream_format(stream, " (0x%02x)", imm); } break; @@ -2139,9 +2162,12 @@ offs_t tlcs900_disassembler::disassemble(std::ostream &stream, offs_t pc, const case O_M16: imm = opcodes.r8( pos++ ); imm = imm | (opcodes.r8( pos++ ) << 8); - if (imm <= m_num_sfr){ + if( imm <= m_num_sfr ) + { util::stream_format(stream, " (%s)", m_sfr_names[imm]); - } else { + } + else + { util::stream_format(stream, " (0x%04x)", imm); } break; @@ -2182,61 +2208,63 @@ offs_t tlcs900_disassembler::disassemble(std::ostream &stream, offs_t pc, const case O_CC: util::stream_format(stream, ",%s", s_cond[op & 0x0F]); - if ((op & 0x07) != 0 && dasm->mnemonic != M_SCC) + if( (op & 0x07) != 0 && dasm->mnemonic != M_SCC ) + { flags |= STEP_COND; + } break; case O_CR8: imm = opcodes.r8( pos++ ); - switch (imm & 0xe3) + switch( imm & 0xe3 ) { case 0x42: - util::stream_format(stream, ", DMAM%d", (imm >> 2) & 7); + util::stream_format(stream, ",DMAM%d", (imm >> 2) & 7); break; default: - util::stream_format(stream, ", ", imm); + util::stream_format(stream, ",", imm); break; } break; case O_CR16: imm = opcodes.r8( pos++ ); - switch (imm & 0xe3) + switch( imm & 0xe3 ) { case 0x40: - util::stream_format(stream, ", DMAC%d", (imm >> 2) & 7); + util::stream_format(stream, ",DMAC%d", (imm >> 2) & 7); break; default: - util::stream_format(stream, ", ", imm); + util::stream_format(stream, ",", imm); break; } break; case O_CR32: imm = opcodes.r8( pos++ ); - switch (imm & 0xe3) + switch( imm & 0xe3 ) { case 0x00: - util::stream_format(stream, ", DMAS%d", (imm >> 2) & 7); + util::stream_format(stream, ",DMAS%d", (imm >> 2) & 7); break; case 0x20: - util::stream_format(stream, ", DMAD%d", (imm >> 2) & 7); + util::stream_format(stream, ",DMAD%d", (imm >> 2) & 7); break; default: - util::stream_format(stream, ", ", imm); + util::stream_format(stream, ",", imm); break; } break; case O_D8: imm = opcodes.r8( pos++ ); - util::stream_format(stream, ",0x%06x", ( pos + (int8_t)imm ) & 0xFFFFFF); + util::stream_format(stream, ",0x%06x", ( pos + (int8_t)imm ) & 0xffffff); break; case O_D16: imm = opcodes.r8( pos++ ); imm = imm | (opcodes.r8( pos++ ) << 8); - util::stream_format(stream, ",0x%06x", ( pos + (int16_t)imm ) & 0xFFFFFF); + util::stream_format(stream, ",0x%06x", ( pos + (int16_t)imm ) & 0xffffff); break; case O_F: @@ -2289,18 +2317,25 @@ offs_t tlcs900_disassembler::disassemble(std::ostream &stream, offs_t pc, const case O_M8: imm = opcodes.r8( pos++ ); - if (imm <= m_num_sfr){ + if( imm <= m_num_sfr ) + { util::stream_format(stream, " (%s)", m_sfr_names[imm]); - } else { + } + else + { util::stream_format(stream, " (0x%02x)", imm); - }break; + } + break; case O_M16: imm = opcodes.r8( pos++ ); imm = imm | (opcodes.r8( pos++ ) << 8); - if (imm <= m_num_sfr){ + if( imm <= m_num_sfr ) + { util::stream_format(stream, " (%s)", m_sfr_names[imm]); - } else { + } + else + { util::stream_format(stream, " (0x%04x)", imm); } break; diff --git a/src/devices/cpu/tlcs900/tmp94c241.cpp b/src/devices/cpu/tlcs900/tmp94c241.cpp index 7dee83567659a..10f2a5b85c743 100644 --- a/src/devices/cpu/tlcs900/tmp94c241.cpp +++ b/src/devices/cpu/tlcs900/tmp94c241.cpp @@ -357,7 +357,7 @@ void tmp94c241_device::device_reset() std::fill_n(&m_timer[0], 4, 0x00); std::fill_n(&m_timer16[0], 4, 0x00); m_watchdog_mode = 0x80; - for (int i = 0; i < 2; i++) + for( int i = 0; i < 2; i++ ) { m_serial_control[i] &= 0x80; m_serial_mode[i] &= 0x80; @@ -382,7 +382,7 @@ void tmp94c241_device::device_reset() std::fill_n(&m_dram_access[0], 2, 0x80); m_da_drive = 0x00; - for (int i = 0; i < TLCS900_NUM_INPUTS; i++) + for( int i = 0; i < TLCS900_NUM_INPUTS; i++ ) m_level[i] = CLEAR_LINE; } @@ -1018,8 +1018,8 @@ void tmp94c241_device::change_timer_flipflop(uint8_t flipflop, uint8_t operation { switch(operation) { - case FF_INVERT: - switch (flipflop) + case FLIPFLOP_INVERT: + switch( flipflop ) { case 0x1: if ((m_port_function[0xc] & 0x03) == 0x02) pc_w(m_port_latch[0xc] ^ 0x01); break; case 0x3: if ((m_port_function[0xc] & 0x03) == 0x02) pc_w(m_port_latch[0xc] ^ 0x02); break; @@ -1031,8 +1031,8 @@ void tmp94c241_device::change_timer_flipflop(uint8_t flipflop, uint8_t operation case 0xb: if ((m_port_function[0xc] & 0x03) == 0x03) pc_w(m_port_latch[0xc] ^ 0x02); break; } break; - case FF_SET: - switch (flipflop) + case FLIPFLOP_SET: + switch( flipflop ) { case 0x1: if ((m_port_function[0xc] & 0x03) == 0x02) pc_w(m_port_latch[0xc] & 0x01); break; case 0x3: if ((m_port_function[0xc] & 0x03) == 0x02) pc_w(m_port_latch[0xc] & 0x02); break; @@ -1044,8 +1044,8 @@ void tmp94c241_device::change_timer_flipflop(uint8_t flipflop, uint8_t operation case 0xb: if ((m_port_function[0xc] & 0x03) == 0x03) pc_w(m_port_latch[0xc] & 0x02); break; } break; - case FF_CLEAR: - switch (flipflop) + case FLIPFLOP_CLEAR: + switch( flipflop ) { case 0x1: if ((m_port_function[0xc] & 0x03) == 0x02) pc_w(m_port_latch[0xc] | ~0x01); break; case 0x3: if ((m_port_function[0xc] & 0x03) == 0x02) pc_w(m_port_latch[0xc] | ~0x02); break; @@ -1065,25 +1065,25 @@ void tmp94c241_device::t02ffcr_w(uint8_t data) switch( data & 0x0c ) { case 0x00: - change_timer_flipflop( 1, FF_INVERT ); + change_timer_flipflop( 1, FLIPFLOP_INVERT ); break; case 0x04: - change_timer_flipflop( 1, FF_SET ); + change_timer_flipflop( 1, FLIPFLOP_SET ); break; case 0x08: - change_timer_flipflop( 1, FF_CLEAR ); + change_timer_flipflop( 1, FLIPFLOP_CLEAR ); break; } switch( data & 0xc0 ) { case 0x00: - change_timer_flipflop( 3, FF_INVERT ); + change_timer_flipflop( 3, FLIPFLOP_INVERT ); break; case 0x40: - change_timer_flipflop( 3, FF_SET ); + change_timer_flipflop( 3, FLIPFLOP_SET ); break; case 0x80: - change_timer_flipflop( 3, FF_CLEAR ); + change_timer_flipflop( 3, FLIPFLOP_CLEAR ); break; } @@ -1208,25 +1208,25 @@ void tmp94c241_device::t4ffcr_w(uint8_t data) switch( data & 0x03 ) { case 0x00: - change_timer_flipflop( 4, FF_INVERT ); + change_timer_flipflop( 4, FLIPFLOP_INVERT ); break; case 0x01: - change_timer_flipflop( 4, FF_SET ); + change_timer_flipflop( 4, FLIPFLOP_SET ); break; case 0x02: - change_timer_flipflop( 4, FF_CLEAR ); + change_timer_flipflop( 4, FLIPFLOP_CLEAR ); break; } switch( data & 0xc0 ) { case 0x00: - change_timer_flipflop( 5, FF_INVERT ); + change_timer_flipflop( 5, FLIPFLOP_INVERT ); break; case 0x40: - change_timer_flipflop( 5, FF_SET ); + change_timer_flipflop( 5, FLIPFLOP_SET ); break; case 0x80: - change_timer_flipflop( 5, FF_CLEAR ); + change_timer_flipflop( 5, FLIPFLOP_CLEAR ); break; } @@ -1243,25 +1243,25 @@ void tmp94c241_device::t8ffcr_w(uint8_t data) switch( data & 0x03 ) { case 0x00: - change_timer_flipflop( 8, FF_INVERT ); + change_timer_flipflop( 8, FLIPFLOP_INVERT ); break; case 0x01: - change_timer_flipflop( 8, FF_SET ); + change_timer_flipflop( 8, FLIPFLOP_SET ); break; case 0x02: - change_timer_flipflop( 8, FF_CLEAR ); + change_timer_flipflop( 8, FLIPFLOP_CLEAR ); break; } switch( data & 0xc0 ) { case 0x00: - change_timer_flipflop( 9, FF_INVERT ); + change_timer_flipflop( 9, FLIPFLOP_INVERT ); break; case 0x40: - change_timer_flipflop( 9, FF_SET ); + change_timer_flipflop( 9, FLIPFLOP_SET ); break; case 0x80: - change_timer_flipflop( 9, FF_CLEAR ); + change_timer_flipflop( 9, FLIPFLOP_CLEAR ); break; } @@ -1279,25 +1279,25 @@ void tmp94c241_device::t6ffcr_w(uint8_t data) switch( data & 0x03 ) { case 0x00: - change_timer_flipflop( 6, FF_INVERT ); + change_timer_flipflop( 6, FLIPFLOP_INVERT ); break; case 0x01: - change_timer_flipflop( 6, FF_SET ); + change_timer_flipflop( 6, FLIPFLOP_SET ); break; case 0x02: - change_timer_flipflop( 6, FF_CLEAR ); + change_timer_flipflop( 6, FLIPFLOP_CLEAR ); break; } switch( data & 0xc0 ) { case 0x00: - change_timer_flipflop( 7, FF_INVERT ); + change_timer_flipflop( 7, FLIPFLOP_INVERT ); break; case 0x40: - change_timer_flipflop( 7, FF_SET ); + change_timer_flipflop( 7, FLIPFLOP_SET ); break; case 0x80: - change_timer_flipflop( 7, FF_CLEAR ); + change_timer_flipflop( 7, FLIPFLOP_CLEAR ); break; } @@ -1314,25 +1314,25 @@ void tmp94c241_device::taffcr_w(uint8_t data) switch( data & 0x03 ) { case 0x00: - change_timer_flipflop( 0xa, FF_INVERT ); + change_timer_flipflop( 0xa, FLIPFLOP_INVERT ); break; case 0x01: - change_timer_flipflop( 0xa, FF_SET ); + change_timer_flipflop( 0xa, FLIPFLOP_SET ); break; case 0x02: - change_timer_flipflop( 0xa, FF_CLEAR ); + change_timer_flipflop( 0xa, FLIPFLOP_CLEAR ); break; } switch( data & 0xc0 ) { case 0x00: - change_timer_flipflop( 0xb, FF_INVERT ); + change_timer_flipflop( 0xb, FLIPFLOP_INVERT ); break; case 0x40: - change_timer_flipflop( 0xb, FF_SET ); + change_timer_flipflop( 0xb, FLIPFLOP_SET ); break; case 0x80: - change_timer_flipflop( 0xb, FF_CLEAR ); + change_timer_flipflop( 0xb, FLIPFLOP_CLEAR ); break; } @@ -1752,8 +1752,8 @@ void tmp94c241_device::tlcs900_check_irqs() } /* Check regular irqs */ - for( i = TMP94C241_NUM_MASKABLE_IRQS - 1; i >= 0; i-- ) // the smaller the vector value, the higher the priority + for( i = TMP94C241_NUM_MASKABLE_IRQS - 1; i >= 0; i-- ) { if ( m_int_reg[tmp94c241_irq_vector_map[i].reg] & tmp94c241_irq_vector_map[i].iff ) { @@ -1770,7 +1770,7 @@ void tmp94c241_device::tlcs900_check_irqs() } /* Check highest allowed priority irq */ - for ( i = std::max( 1, ( ( m_sr.b.h & 0x70 ) >> 4 ) ); i < 7; i++ ) + for( i = std::max( 1, ( ( m_sr.b.h & 0x70 ) >> 4 ) ); i < 7; i++ ) { if ( irq_vectors[i] >= 0 ) { @@ -1853,7 +1853,7 @@ void tmp94c241_device::tlcs900_handle_timers() TIMER_CHANGE_1++; if ( (m_ffcr[0] & 0x03) == 0b10 ) - change_timer_flipflop( 1, FF_INVERT ); + change_timer_flipflop( 1, FLIPFLOP_INVERT ); /* In 16bit timer mode the timer should not be reset */ if ( TO1_OPERATING_MODE != MODE_16BIT_TIMER ) @@ -1894,7 +1894,7 @@ void tmp94c241_device::tlcs900_handle_timers() m_check_irqs = 1; if ( (m_ffcr[0] & 0x03) == 0b11 ) - change_timer_flipflop( 1, FF_INVERT ); + change_timer_flipflop( 1, FLIPFLOP_INVERT ); /* In 16bit timer mode also reset timer 0 */ if ( TO1_OPERATING_MODE == MODE_16BIT_TIMER ) @@ -1929,7 +1929,7 @@ void tmp94c241_device::tlcs900_handle_timers() TIMER_CHANGE_3++; if ( ((m_ffcr[0] & 0x30) >> 4) == 0b10 ) - change_timer_flipflop( 3, FF_INVERT ); + change_timer_flipflop( 3, FLIPFLOP_INVERT ); /* In 16bit timer mode the timer should not be reset */ if ( T23_OPERATING_MODE != MODE_16BIT_TIMER ) @@ -1970,7 +1970,7 @@ void tmp94c241_device::tlcs900_handle_timers() m_check_irqs = 1; if ( ((m_ffcr[0] & 0x30) >> 4) == 0b11 ) - change_timer_flipflop( 3, FF_INVERT ); + change_timer_flipflop( 3, FLIPFLOP_INVERT ); /* In 16bit timer mode also reset timer 2 */ if ( T23_OPERATING_MODE == MODE_16BIT_TIMER ) @@ -2004,7 +2004,7 @@ void tmp94c241_device::tlcs900_handle_timers() if ( ((UPCOUNTER_4 == SFR_TREG5) && EQ5T4) || ((UPCOUNTER_4 == SFR_TREG4) && EQ4T4) ) { - change_timer_flipflop( 4, FF_INVERT ); + change_timer_flipflop( 4, FLIPFLOP_INVERT ); UPCOUNTER_4 = 0; m_int_reg[TMP94C241_INTET45] |= 0x08; m_check_irqs = 1; @@ -2038,7 +2038,7 @@ void tmp94c241_device::tlcs900_handle_timers() if ( ((UPCOUNTER_6 == SFR_TREG7) && EQ7T6) || ((UPCOUNTER_6 == SFR_TREG6) && EQ6T6) ) { - change_timer_flipflop( 6, FF_INVERT ); + change_timer_flipflop( 6, FLIPFLOP_INVERT ); UPCOUNTER_6 = 0; m_int_reg[TMP94C241_INTET67] |= 0x08; m_check_irqs = 1; @@ -2072,7 +2072,7 @@ void tmp94c241_device::tlcs900_handle_timers() if ( ((UPCOUNTER_8 == SFR_TREG9) && EQ9T8) || ((UPCOUNTER_8 == SFR_TREG8) && EQ8T8) ) { - change_timer_flipflop( 8, FF_INVERT ); + change_timer_flipflop( 8, FLIPFLOP_INVERT ); UPCOUNTER_8 = 0; m_int_reg[TMP94C241_INTET89] |= 0x08; m_check_irqs = 1; @@ -2106,7 +2106,7 @@ void tmp94c241_device::tlcs900_handle_timers() if ( ((UPCOUNTER_A == SFR_TREGA) && EQATA) || ((UPCOUNTER_A == SFR_TREGB) && EQBTA) ) { - change_timer_flipflop( 0xa, FF_INVERT ); + change_timer_flipflop( 0xa, FLIPFLOP_INVERT ); UPCOUNTER_A = 0; m_int_reg[TMP94C241_INTETAB] |= 0x08; m_check_irqs = 1; diff --git a/src/devices/cpu/tlcs900/tmp94c241.h b/src/devices/cpu/tlcs900/tmp94c241.h index 0c9c48eea524e..b3d9197b5e86d 100644 --- a/src/devices/cpu/tlcs900/tmp94c241.h +++ b/src/devices/cpu/tlcs900/tmp94c241.h @@ -33,10 +33,10 @@ #define TMP94C241_INTNMWDT 17 // Flip-Flop operations: -#define FF_INVERT 0b00 -#define FF_SET 0b01 -#define FF_CLEAR 0b10 -#define FF_DONTCARE 0b11 +#define FLIPFLOP_INVERT 0b00 +#define FLIPFLOP_SET 0b01 +#define FLIPFLOP_CLEAR 0b10 +#define FLIPFLOP_DONTCARE 0b11 //************************************************************************** // TYPE DEFINITIONS diff --git a/src/devices/cpu/tlcs900/tmp95c061.cpp b/src/devices/cpu/tlcs900/tmp95c061.cpp index a5b13165b69b1..63c67349c80c9 100644 --- a/src/devices/cpu/tlcs900/tmp95c061.cpp +++ b/src/devices/cpu/tlcs900/tmp95c061.cpp @@ -575,11 +575,11 @@ void tmp95c061_device::tlcs900_handle_ad() } -enum ff_change +enum flipflop_change { - FF_CLEAR, - FF_SET, - FF_INVERT + FLIPFLOP_CLEAR, + FLIPFLOP_SET, + FLIPFLOP_INVERT }; @@ -590,13 +590,13 @@ void tmp95c061_device::tlcs900_change_tff( int which, int change ) case 1: switch( change ) { - case FF_CLEAR: + case FLIPFLOP_CLEAR: m_to1 = 0; break; - case FF_SET: + case FLIPFLOP_SET: m_to1 = 1; break; - case FF_INVERT: + case FLIPFLOP_INVERT: m_to1 ^= 1; break; } @@ -605,13 +605,13 @@ void tmp95c061_device::tlcs900_change_tff( int which, int change ) case 3: switch( change ) { - case FF_CLEAR: + case FLIPFLOP_CLEAR: m_to3 = 0; break; - case FF_SET: + case FLIPFLOP_SET: m_to3 = 1; break; - case FF_INVERT: + case FLIPFLOP_INVERT: m_to3 ^= 1; break; } @@ -696,7 +696,7 @@ void tmp95c061_device::tlcs900_handle_timers() if ( m_t8_invert & 0x02 ) { - tlcs900_change_tff( 1, FF_INVERT ); + tlcs900_change_tff( 1, FLIPFLOP_INVERT ); } /* In 16bit timer mode also reset timer 0 */ @@ -773,7 +773,7 @@ void tmp95c061_device::tlcs900_handle_timers() if ( m_t8_invert & 0x20 ) { - tlcs900_change_tff( 3, FF_INVERT ); + tlcs900_change_tff( 3, FLIPFLOP_INVERT ); } /* In 16bit timer mode also reset timer 2 */ @@ -1091,25 +1091,25 @@ void tmp95c061_device::tffcr_w(uint8_t data) switch( data & 0x0c ) { case 0x00: - tlcs900_change_tff( 1, FF_INVERT ); + tlcs900_change_tff( 1, FLIPFLOP_INVERT ); break; case 0x04: - tlcs900_change_tff( 1, FF_SET ); + tlcs900_change_tff( 1, FLIPFLOP_SET ); break; case 0x08: - tlcs900_change_tff( 1, FF_CLEAR ); + tlcs900_change_tff( 1, FLIPFLOP_CLEAR ); break; } switch( data & 0xc0 ) { case 0x00: - tlcs900_change_tff( 3, FF_INVERT ); + tlcs900_change_tff( 3, FLIPFLOP_INVERT ); break; case 0x40: - tlcs900_change_tff( 3, FF_SET ); + tlcs900_change_tff( 3, FLIPFLOP_SET ); break; case 0x80: - tlcs900_change_tff( 3, FF_CLEAR ); + tlcs900_change_tff( 3, FLIPFLOP_CLEAR ); break; } diff --git a/src/mame/technics/kn1500.cpp b/src/mame/technics/kn1500.cpp index 26ab617ea9229..fc15776bef99f 100644 --- a/src/mame/technics/kn1500.cpp +++ b/src/mame/technics/kn1500.cpp @@ -4,14 +4,6 @@ Technics SX-KN1500 music keyboard driver - Driver by Felipe C. da S. Sanches - - - Changelog: - - 2021 MAR 14 [Felipe Sanches]: - * Initial skeleton driver - ******************************************************************************/ #include "emu.h" @@ -277,14 +269,11 @@ void kn1500_state::kn1500(machine_config &config) ROM_START(kn1500) ROM_REGION16_LE(0x200000, "prog" , 0) - ROM_LOAD("technics_qsigt3c16079_5y68-j079_japan_9649eai.ic15", 0x00000, 0x200000, CRC(0f78da9a) -SHA1(53d5c43d833fb005a7bd377583252b84b646253d)) + ROM_LOAD("technics_qsigt3c16079_5y68-j079_japan_9649eai.ic15", 0x00000, 0x200000, CRC(0f78da9a) SHA1(53d5c43d833fb005a7bd377583252b84b646253d)) ROM_REGION16_LE(0x200000, "rhythm" , 0) // ROM_LOAD("technics_qsigt3c16068_japan.ic17", 0x00000, 0x200000, NO_DUMP) - ROM_LOAD("technics_qsigt3c16079_5y68-j079_japan_9649eai.ic15.rest", 0x00000, 0x200000, CRC(ce60897a) -SHA1(9b54f693f693488132b93e8bfed1927d7e741ae1)) - + ROM_LOAD("technics_qsigt3c16079_5y68-j079_japan_9649eai.ic15.rest", 0x00000, 0x200000, CRC(ce60897a) SHA1(9b54f693f693488132b93e8bfed1927d7e741ae1)) ROM_END diff --git a/src/mame/technics/kn5000.cpp b/src/mame/technics/kn5000.cpp index bcb8c2d1575fe..98d52bcf6b4af 100644 --- a/src/mame/technics/kn5000.cpp +++ b/src/mame/technics/kn5000.cpp @@ -4,34 +4,18 @@ Technics SX-KN5000 music keyboard driver - Driver by Felipe C. da S. Sanches - - - Changelog: - - 2021 MAR 18 [Felipe Sanches]: - * Initial skeleton driver - - 2021 AUG 03 [Felipe Sanches]: - * Hooking up FLASH ROM, VGA & Floppy controllers - and most of the maincpu mem_map - - 2023 DEC 12 [Felipe Sanches]: - * The optional HD-AE5000 extension board (for audio & hard-drive) - was split out as its own device. - ******************************************************************************/ #include "emu.h" +#include "bus/technics/hdae5000.h" #include "cpu/tlcs900/tmp94c241.h" #include "imagedev/floppy.h" -#include "bus/technics/hdae5000.h" #include "machine/gen_latch.h" #include "machine/upd765.h" -#include "video/pc_vga.h" #include "screen.h" #include "sound/beep.h" #include "speaker.h" +#include "video/pc_vga.h" class kn5000_state : public driver_device @@ -198,9 +182,9 @@ void kn5000_state::kn5000(machine_config &config) // PORT D: // bit 0 (output) = FDCRST - // bit 6 (input) = FD.I/O + // bit 6 (input) = FD.I/O m_maincpu->portd_write().set([this] (u8 data) { m_fdc->reset_w(BIT(data, 0)); }); - // TODO: bit 6! + // TODO: bit 6! // PORT E: