diff --git a/Analyser/Static/Acorn/Tape.cpp b/Analyser/Static/Acorn/Tape.cpp index c812d21ad..b162e2a56 100644 --- a/Analyser/Static/Acorn/Tape.cpp +++ b/Analyser/Static/Acorn/Tape.cpp @@ -20,7 +20,7 @@ static std::unique_ptr GetNextChunk(const std::shared_ptr> 1) | (parser.get_next_bit(tape) << 9) +#define shift() shift_register = (shift_register >> 1) | (parser.get_next_bit(tape) << 9) // find next area of high tone while(!tape->is_at_end() && (shift_register != 0x3ff)) { diff --git a/Analyser/Static/Commodore/StaticAnalyser.cpp b/Analyser/Static/Commodore/StaticAnalyser.cpp index baa28bd9d..940f89cb0 100644 --- a/Analyser/Static/Commodore/StaticAnalyser.cpp +++ b/Analyser/Static/Commodore/StaticAnalyser.cpp @@ -93,7 +93,7 @@ Analyser::Static::TargetList Analyser::Static::Commodore::GetTargets(const Media // make a first guess based on loading address switch(files.front().starting_address) { default: - LOG("Unrecognised loading address for Commodore program: " << PADHEX(4) << files.front().starting_address); + LOG("Unrecognised loading address for Commodore program: " << PADHEX(4) << files.front().starting_address); [[fallthrough]]; case 0x1001: memory_model = Target::MemoryModel::Unexpanded; diff --git a/Analyser/Static/Disassembler/6502.cpp b/Analyser/Static/Disassembler/6502.cpp index 11344a067..146559da5 100644 --- a/Analyser/Static/Disassembler/6502.cpp +++ b/Analyser/Static/Disassembler/6502.cpp @@ -11,7 +11,7 @@ #include "Kernel.hpp" using namespace Analyser::Static::MOS6502; -namespace { +namespace { using PartialDisassembly = Analyser::Static::Disassembly::PartialDisassembly; diff --git a/Analyser/Static/Disassembler/Z80.cpp b/Analyser/Static/Disassembler/Z80.cpp index 96c113986..81998c8b6 100644 --- a/Analyser/Static/Disassembler/Z80.cpp +++ b/Analyser/Static/Disassembler/Z80.cpp @@ -11,7 +11,7 @@ #include "Kernel.hpp" using namespace Analyser::Static::Z80; -namespace { +namespace { using PartialDisassembly = Analyser::Static::Disassembly::PartialDisassembly; diff --git a/Components/5380/ncr5380.cpp b/Components/5380/ncr5380.cpp index 1d89d4eac..7dccdf007 100644 --- a/Components/5380/ncr5380.cpp +++ b/Components/5380/ncr5380.cpp @@ -156,7 +156,7 @@ uint8_t NCR5380::read(int address, bool) { return uint8_t(bus_.get_state()); case 1: - LOG("[1] Initiator command register get: " << (arbitration_in_progress_ ? 'p' : '-') << (lost_arbitration_ ? 'l' : '-')); + LOG("[1] Initiator command register get: " << (arbitration_in_progress_ ? 'p' : '-') << (lost_arbitration_ ? 'l' : '-')); return // Bits repeated as they were set. (initiator_command_ & ~0x60) | diff --git a/Components/5380/ncr5380.hpp b/Components/5380/ncr5380.hpp index 18d4e367d..d58e75d0f 100644 --- a/Components/5380/ncr5380.hpp +++ b/Components/5380/ncr5380.hpp @@ -23,7 +23,7 @@ class NCR5380 final: public SCSI::Bus::Observer { public: NCR5380(SCSI::Bus &bus, int clock_rate); - /*! Writes @c value to @c address. */ + /*! Writes @c value to @c address. */ void write(int address, uint8_t value, bool dma_acknowledge = false); /*! Reads from @c address. */ diff --git a/Components/9918/Implementation/Fetch.hpp b/Components/9918/Implementation/Fetch.hpp index 1b644c978..efb972617 100644 --- a/Components/9918/Implementation/Fetch.hpp +++ b/Components/9918/Implementation/Fetch.hpp @@ -206,7 +206,7 @@ class SpriteFetcher { // the attribute table, and forcing them to 1 but masking out bit 9 for the colour table. // // AttributeAddressMask is used to enable or disable that behaviour. - static constexpr AddressT AttributeAddressMask = (mode == SpriteMode::Mode2) ? AddressT(~0x180) : AddressT(~0x000); + static constexpr AddressT AttributeAddressMask = (mode == SpriteMode::Mode2) ? AddressT(~0x180) : AddressT(~0x000); SpriteFetcher(Base *base, uint8_t y) : base(base), diff --git a/Components/DiskII/DiskII.cpp b/Components/DiskII/DiskII.cpp index 772cc2380..0f9577b8c 100644 --- a/Components/DiskII/DiskII.cpp +++ b/Components/DiskII/DiskII.cpp @@ -13,7 +13,7 @@ using namespace Apple; -namespace { +namespace { const uint8_t input_command = 0x4; // i.e. Q6 const uint8_t input_mode = 0x8; // i.e. Q7 const uint8_t input_flux = 0x1; @@ -144,7 +144,7 @@ void DiskII::decide_clocking_preference() { // none, given that drives are not running, the shift register has already emptied or stopped and there's no flux about to be received. if(!(inputs_ & ~input_flux)) { const bool is_stuck_at_nop = - !flux_duration_ && state_machine_[(state_ & 0xf0) | inputs_ | ((shift_register_&0x80) >> 6)] == state_ && (state_ &0xf) == 0x8; + !flux_duration_ && state_machine_[(state_ & 0xf0) | inputs_ | ((shift_register_&0x80) >> 6)] == state_ && (state_ &0xf) == 0x8; clocking_preference_ = (drive_is_sleeping_[0] && drive_is_sleeping_[1] && (!shift_register_ || is_stuck_at_nop) && (inputs_&input_flux)) diff --git a/Components/DiskII/IWM.cpp b/Components/DiskII/IWM.cpp index b8d4e6465..94d8ad7b6 100644 --- a/Components/DiskII/IWM.cpp +++ b/Components/DiskII/IWM.cpp @@ -17,7 +17,7 @@ using namespace Apple; -namespace { +namespace { constexpr int CA0 = 1 << 0; constexpr int CA1 = 1 << 1; constexpr int CA2 = 1 << 2; @@ -220,7 +220,7 @@ void IWM::set_select(bool enabled) { } void IWM::push_drive_state() { - if(drives_[active_drive_]) { + if(drives_[active_drive_]) { const uint8_t drive_control_lines = ((state_ & CA0) ? IWMDrive::CA0 : 0) | ((state_ & CA1) ? IWMDrive::CA1 : 0) | diff --git a/Components/OPx/Implementation/PhaseGenerator.hpp b/Components/OPx/Implementation/PhaseGenerator.hpp index b5cb3ff73..948034336 100644 --- a/Components/OPx/Implementation/PhaseGenerator.hpp +++ b/Components/OPx/Implementation/PhaseGenerator.hpp @@ -108,7 +108,7 @@ template class PhaseGenerator { } private: - static constexpr int precision_shift = 1 + precision; + static constexpr int precision_shift = 1 + precision; int phase_ = 0; diff --git a/Components/OPx/Implementation/Tables.hpp b/Components/OPx/Implementation/Tables.hpp index 242144ee7..fab014a2b 100644 --- a/Components/OPx/Implementation/Tables.hpp +++ b/Components/OPx/Implementation/Tables.hpp @@ -51,7 +51,7 @@ struct LogSign { @returns Negative log sin of x, assuming a 1024-unit circle. */ constexpr LogSign negative_log_sin(int x) { - /// Defines the first quadrant of 1024-unit negative log to the base two of sine (that conveniently misses sin(0)). + /// Defines the first quadrant of 1024-unit negative log to the base two of sine (that conveniently misses sin(0)). /// /// Expected branchless usage for a full 1024 unit output: /// diff --git a/InstructionSets/M50740/Executor.hpp b/InstructionSets/M50740/Executor.hpp index 6ab8bcf55..8d87e9de3 100644 --- a/InstructionSets/M50740/Executor.hpp +++ b/InstructionSets/M50740/Executor.hpp @@ -151,7 +151,7 @@ class Executor: public CachingExecutor { Timer timers_[3], prescalers_[2]; inline int update_timer(Timer &timer, int count); - // Interrupt and timer control. + // Interrupt and timer control. uint8_t interrupt_control_ = 0, timer_control_ = 0; bool interrupt_line_ = false; diff --git a/InstructionSets/M50740/Instruction.hpp b/InstructionSets/M50740/Instruction.hpp index d48333888..ea616b5fa 100644 --- a/InstructionSets/M50740/Instruction.hpp +++ b/InstructionSets/M50740/Instruction.hpp @@ -201,10 +201,10 @@ inline std::string address(AddressingMode addressing_mode, const uint8_t *operat case AddressingMode::AbsoluteIndirect: output << "($" << NUM(operation[2]) << NUM(operation[1]) << ") "; break; case AddressingMode::ZeroPageIndirect: output << "($" << NUM(operation[1]) << ")"; break; case AddressingMode::SpecialPage: output << "$1f" << NUM(operation[1]); break; - case AddressingMode::ImmediateZeroPage: output << "#$" << NUM(operation[1]) << ", $" << NUM(operation[2]); break; - case AddressingMode::AccumulatorRelative: output << "A, $" << NUM4(2 + program_counter + int8_t(operation[1])); break; + case AddressingMode::ImmediateZeroPage: output << "#$" << NUM(operation[1]) << ", $" << NUM(operation[2]); break; + case AddressingMode::AccumulatorRelative: output << "A, $" << NUM4(2 + program_counter + int8_t(operation[1])); break; case AddressingMode::ZeroPageRelative: - output << "$" << NUM(operation[1]) << ", $" << NUM4(3 + program_counter + int8_t(operation[2])); + output << "$" << NUM(operation[1]) << ", $" << NUM4(3 + program_counter + int8_t(operation[2])); break; } #undef NUM4 diff --git a/InstructionSets/M68k/Instruction.hpp b/InstructionSets/M68k/Instruction.hpp index de4eb9b1f..97a2240a2 100644 --- a/InstructionSets/M68k/Instruction.hpp +++ b/InstructionSets/M68k/Instruction.hpp @@ -289,7 +289,7 @@ enum class Condition { /// Those entries starting 0b00 or 0b01 are mapped as per the 68000's native encoding; /// those starting 0b00 are those which are indicated directly by a mode field and those starting /// 0b01 are those which are indicated by a register field given a mode of 0b111. The only minor -/// exception is AddressRegisterDirect, which exists on a 68000 but isn't specifiable by a +/// exception is AddressRegisterDirect, which exists on a 68000 but isn't specifiable by a /// mode and register, it's contextual based on the instruction. /// /// Those modes starting in 0b10 are the various extended addressing modes introduced as diff --git a/InstructionSets/x86/Instruction.hpp b/InstructionSets/x86/Instruction.hpp index a3172f911..9fc8a8c54 100644 --- a/InstructionSets/x86/Instruction.hpp +++ b/InstructionSets/x86/Instruction.hpp @@ -143,7 +143,7 @@ enum class Operation: uint8_t { MOV, /// Negatives; source and destination point to the same thing, to negative. NEG, - /// Logical NOT; source and destination point to the same thing, to negative. + /// Logical NOT; source and destination point to the same thing, to negative. NOT, /// Logical AND; source, destination, operand and displacement will be populated appropriately. AND, @@ -223,7 +223,7 @@ enum class Operation: uint8_t { /// ES:[e]DI and incrementing or decrementing [e]DI as per the /// current EFLAGS DF flag. INS, - /// Outputs a byte, word or double word from ES:[e]DI to the port specified by DX, + /// Outputs a byte, word or double word from ES:[e]DI to the port specified by DX, /// incrementing or decrementing [e]DI as per the current EFLAGS DF flag.] OUTS, diff --git a/Machines/Amiga/Bitplanes.hpp b/Machines/Amiga/Bitplanes.hpp index d3a3ad23b..8926f9fc4 100644 --- a/Machines/Amiga/Bitplanes.hpp +++ b/Machines/Amiga/Bitplanes.hpp @@ -46,7 +46,7 @@ class Bitplanes: public DMADevice<6, 2> { BitplaneData next; }; -template constexpr SourceT bitplane_swizzle(SourceT value) { +template constexpr SourceT bitplane_swizzle(SourceT value) { return (value&0x21) | ((value&0x02) << 2) | diff --git a/Machines/Amiga/Keyboard.cpp b/Machines/Amiga/Keyboard.cpp index 0b3916328..54f01f137 100644 --- a/Machines/Amiga/Keyboard.cpp +++ b/Machines/Amiga/Keyboard.cpp @@ -12,7 +12,7 @@ // // // Before -// the transmission starts, both KCLK and KDAT are high. The keyboard starts +// the transmission starts, both KCLK and KDAT are high. The keyboard starts // the transmission by putting out the first data bit (on KDAT), followed by // a pulse on KCLK (low then high); then it puts out the second data bit and // pulses KCLK until all eight data bits have been sent. @@ -20,23 +20,23 @@ // When the computer has received the eighth bit, it must pulse KDAT low for // at least 1 (one) microsecond, as a handshake signal to the keyboard. The // keyboard must be able to detect pulses greater than or equal -// to 1 microsecond. Software MUST pulse the line low for 85 microseconds to +// to 1 microsecond. Software MUST pulse the line low for 85 microseconds to // ensure compatibility with all keyboard models. // // // If the handshake pulse does not arrive within // 143 ms of the last clock of the transmission, the keyboard will assume // that the computer is still waiting for the rest of the transmission and is -// therefore out of sync. The keyboard will then attempt to restore sync by -// going into "resync mode." In this mode, the keyboard clocks out a 1 and +// therefore out of sync. The keyboard will then attempt to restore sync by +// going into "resync mode." In this mode, the keyboard clocks out a 1 and // waits for a handshake pulse. If none arrives within 143 ms, it clocks out // another 1 and waits again. // // The keyboard Hard Resets the Amiga by pulling KCLK low and starting a 500 -// millisecond timer. When one or more of the keys is released and 500 +// millisecond timer. When one or more of the keys is released and 500 // milliseconds have passed, the keyboard will release KCLK. // -// The usual sequence of events will therefore be: power-up; synchronize; +// The usual sequence of events will therefore be: power-up; synchronize; // transmit "initiate power-up key stream" ($FD); transmit "terminate key // stream" ($FE). @@ -52,8 +52,8 @@ Keyboard::Keyboard(Serial::Line &output) : output_(output) { switch(shift_state_) { case ShiftState::Shifting: // The keyboard processor sets the KDAT line about 20 microseconds before it - // pulls KCLK low. KCLK stays low for about 20 microseconds, then goes high - // again. The processor waits another 20 microseconds before changing KDAT. + // pulls KCLK low. KCLK stays low for about 20 microseconds, then goes high + // again. The processor waits another 20 microseconds before changing KDAT. switch(bit_phase_) { default: break; case 0: lines_ = Lines::Clock | (shift_sequence_ & 1); break; diff --git a/Machines/Apple/AppleII/AppleII.cpp b/Machines/Apple/AppleII/AppleII.cpp index d99f31147..292323433 100644 --- a/Machines/Apple/AppleII/AppleII.cpp +++ b/Machines/Apple/AppleII/AppleII.cpp @@ -243,8 +243,8 @@ template class ConcreteMachine: page(0xc1, 0xc4, state.region_C1_C3 ? &rom_[0xc100 - 0xc100] : nullptr, nullptr); read_pages_[0xc3] = state.region_C3 ? &rom_[0xc300 - 0xc100] : nullptr; - page(0xc4, 0xc8, state.region_C4_C8 ? &rom_[0xc400 - 0xc100] : nullptr, nullptr); - page(0xc8, 0xd0, state.region_C8_D0 ? &rom_[0xc800 - 0xc100] : nullptr, nullptr); + page(0xc4, 0xc8, state.region_C4_C8 ? &rom_[0xc400 - 0xc100] : nullptr, nullptr); + page(0xc8, 0xd0, state.region_C8_D0 ? &rom_[0xc800 - 0xc100] : nullptr, nullptr); } if constexpr (bool(type & PagingType::Main)) { diff --git a/Machines/Atari/2600/Atari2600Inputs.h b/Machines/Atari/2600/Atari2600Inputs.h index 0165f465b..84103cc39 100644 --- a/Machines/Atari/2600/Atari2600Inputs.h +++ b/Machines/Atari/2600/Atari2600Inputs.h @@ -13,7 +13,7 @@ extern "C" { #endif -typedef enum { +typedef enum { Atari2600DigitalInputJoy1Up, Atari2600DigitalInputJoy1Down, Atari2600DigitalInputJoy1Left, @@ -27,7 +27,7 @@ typedef enum { Atari2600DigitalInputJoy2Fire, } Atari2600DigitalInput; -typedef enum { +typedef enum { Atari2600SwitchReset, Atari2600SwitchSelect, Atari2600SwitchColour, diff --git a/Machines/Atari/ST/AtariST.hpp b/Machines/Atari/ST/AtariST.hpp index 3db975087..604019779 100644 --- a/Machines/Atari/ST/AtariST.hpp +++ b/Machines/Atari/ST/AtariST.hpp @@ -28,7 +28,7 @@ class Machine { friend Configurable::DisplayOption; public: Options(Configurable::OptionsType type) : Configurable::DisplayOption( - type == Configurable::OptionsType::UserFriendly ? Configurable::Display::RGB : Configurable::Display::CompositeColour) { + type == Configurable::OptionsType::UserFriendly ? Configurable::Display::RGB : Configurable::Display::CompositeColour) { if(needs_declare()) { declare_display_option(); limit_enum(&output, Configurable::Display::RGB, Configurable::Display::CompositeColour, -1); diff --git a/Machines/Atari/ST/Video.cpp b/Machines/Atari/ST/Video.cpp index 290972247..cd7ea0298 100644 --- a/Machines/Atari/ST/Video.cpp +++ b/Machines/Atari/ST/Video.cpp @@ -634,7 +634,7 @@ void Video::VideoStream::will_change_border_colour() { void Video::VideoStream::flush_border() { // Output colour 0 for the entirety of duration_ (or black, if this is 1bpp mode). uint16_t *const colour_pointer = reinterpret_cast(crt_.begin_data(1)); - if(colour_pointer) *colour_pointer = (bpp_ != OutputBpp::One) ? palette_[0] : 0; + if(colour_pointer) *colour_pointer = (bpp_ != OutputBpp::One) ? palette_[0] : 0; crt_.output_level(duration_*2); duration_ = 0; diff --git a/Machines/Commodore/Vic-20/Keyboard.hpp b/Machines/Commodore/Vic-20/Keyboard.hpp index 77145d8f7..092267ebb 100644 --- a/Machines/Commodore/Vic-20/Keyboard.hpp +++ b/Machines/Commodore/Vic-20/Keyboard.hpp @@ -41,7 +41,7 @@ enum Key: uint16_t { KeyF6 = 0xfff4, KeyF8 = 0xfff5, - // Physical keys not within the usual matrix. + // Physical keys not within the usual matrix. KeyRestore = 0xfffd, #undef key }; diff --git a/Machines/Commodore/Vic-20/Vic20.cpp b/Machines/Commodore/Vic-20/Vic20.cpp index 56967236e..dc7f1df73 100644 --- a/Machines/Commodore/Vic-20/Vic20.cpp +++ b/Machines/Commodore/Vic-20/Vic20.cpp @@ -705,9 +705,9 @@ class ConcreteMachine: } CPU::MOS6502::Processor m6502_; - std::vector character_rom_; - std::vector basic_rom_; - std::vector kernel_rom_; + std::vector character_rom_; + std::vector basic_rom_; + std::vector kernel_rom_; std::vector rom_; uint16_t rom_address_, rom_length_; diff --git a/Machines/Enterprise/Nick.cpp b/Machines/Enterprise/Nick.cpp index 79091ac5a..9ec7d2fe6 100644 --- a/Machines/Enterprise/Nick.cpp +++ b/Machines/Enterprise/Nick.cpp @@ -10,7 +10,7 @@ #include -namespace { +namespace { uint16_t mapped_colour(uint8_t source) { // On the Enterprise, red and green are 3-bit quantities; blue is a 2-bit quantity. diff --git a/Machines/Oric/Oric.cpp b/Machines/Oric/Oric.cpp index 6633c600e..42bd23697 100644 --- a/Machines/Oric/Oric.cpp +++ b/Machines/Oric/Oric.cpp @@ -202,7 +202,7 @@ class VIAPortHandler: public MOS::MOS6522::IRQDelegatePortHandler { Reponds to changes in the 6522's port output. On an Oric port B sets the tape motor control and the keyboard's active row. Port A is connected to the AY's data bus. */ - void set_port_output(MOS::MOS6522::Port port, uint8_t value, uint8_t) { + void set_port_output(MOS::MOS6522::Port port, uint8_t value, uint8_t) { if(port) { keyboard_.set_active_row(value); tape_player_.set_motor_control(value & 0x40); diff --git a/Machines/ScanProducer.hpp b/Machines/ScanProducer.hpp index d823436bf..785dfed56 100644 --- a/Machines/ScanProducer.hpp +++ b/Machines/ScanProducer.hpp @@ -75,7 +75,7 @@ class ScanProducer { } /*! - Maps back from Outputs::Display::VideoSignal to Configurable::Display, + Maps back from Outputs::Display::VideoSignal to Configurable::Display, calling @c get_display_type for the input. */ Configurable::Display get_video_signal_configurable() const { diff --git a/Machines/Sinclair/ZX8081/ZX8081.cpp b/Machines/Sinclair/ZX8081/ZX8081.cpp index c0eca7117..9d238bb0e 100644 --- a/Machines/Sinclair/ZX8081/ZX8081.cpp +++ b/Machines/Sinclair/ZX8081/ZX8081.cpp @@ -39,8 +39,8 @@ namespace { // TODO: // Quiksilva sound support: -// 7FFFh.W PSG index -// 7FFEh.R/W PSG data +// 7FFFh.W PSG index +// 7FFEh.R/W PSG data namespace Sinclair { namespace ZX8081 { diff --git a/Machines/Sinclair/ZXSpectrum/ZXSpectrum.cpp b/Machines/Sinclair/ZXSpectrum/ZXSpectrum.cpp index 4fcf507f9..7f7ad7f08 100644 --- a/Machines/Sinclair/ZXSpectrum/ZXSpectrum.cpp +++ b/Machines/Sinclair/ZXSpectrum/ZXSpectrum.cpp @@ -693,7 +693,7 @@ template class ConcreteMachine: if(c == 4) break; } - return !media.tapes.empty() || (!media.disks.empty() && model == Model::Plus3); + return !media.tapes.empty() || (!media.disks.empty() && model == Model::Plus3); } // MARK: - ClockingHint::Observer. diff --git a/Machines/Utility/MemoryPacker.hpp b/Machines/Utility/MemoryPacker.hpp index 0815ec7b5..3da4743d1 100644 --- a/Machines/Utility/MemoryPacker.hpp +++ b/Machines/Utility/MemoryPacker.hpp @@ -28,7 +28,7 @@ void PackBigEndian16(const std::vector &source, uint8_t *target); /*! Copies the bytes from @c source into @c target, interpreting them - as big-endian 16-bit data and writing them as host-endian 16-bit data. + as big-endian 16-bit data and writing them as host-endian 16-bit data. @c target will be resized to the proper size exactly to contain the contents of @c source. diff --git a/Machines/Utility/ROMCatalogue.cpp b/Machines/Utility/ROMCatalogue.cpp index fec569c69..930a0d701 100644 --- a/Machines/Utility/ROMCatalogue.cpp +++ b/Machines/Utility/ROMCatalogue.cpp @@ -254,7 +254,7 @@ std::string Description::description(int flags) const { if(flags & DescriptionFlag::Filename) { flags &= ~DescriptionFlag::Filename; - output << machine_name << '/'; + output << machine_name << '/'; if(file_names.size() == 1) { output << file_names[0]; } else { diff --git a/OSBindings/Mac/Clock Signal/Joystick Manager/CSJoystickManager.m b/OSBindings/Mac/Clock Signal/Joystick Manager/CSJoystickManager.m index 3fd0407f4..3900553e5 100644 --- a/OSBindings/Mac/Clock Signal/Joystick Manager/CSJoystickManager.m +++ b/OSBindings/Mac/Clock Signal/Joystick Manager/CSJoystickManager.m @@ -422,11 +422,11 @@ API_AVAILABLE(macos(11.0)) @end static void DeviceMatched(void *context, IOReturn result, void *sender, IOHIDDeviceRef device) { - [(__bridge CSJoystickManager *)context deviceMatched:device result:result sender:sender]; + [(__bridge CSJoystickManager *)context deviceMatched:device result:result sender:sender]; } static void DeviceRemoved(void *context, IOReturn result, void *sender, IOHIDDeviceRef device) { - [(__bridge CSJoystickManager *)context deviceRemoved:device result:result sender:sender]; + [(__bridge CSJoystickManager *)context deviceRemoved:device result:result sender:sender]; } @implementation CSJoystickManager { diff --git a/OSBindings/Mac/Clock Signal/ScanTarget/CSScanTarget.mm b/OSBindings/Mac/Clock Signal/ScanTarget/CSScanTarget.mm index afe3a9ef5..1bd993e78 100644 --- a/OSBindings/Mac/Clock Signal/ScanTarget/CSScanTarget.mm +++ b/OSBindings/Mac/Clock Signal/ScanTarget/CSScanTarget.mm @@ -1150,7 +1150,7 @@ using BufferingScanTarget = Outputs::Display::BufferingScanTarget; [commandBuffer commit]; } -- (Outputs::Display::ScanTarget *)scanTarget { +- (Outputs::Display::ScanTarget *)scanTarget { return &_scanTarget; } diff --git a/OSBindings/Mac/Clock Signal/Views/CSScanTargetView.h b/OSBindings/Mac/Clock Signal/Views/CSScanTargetView.h index e53d2318e..03c210710 100644 --- a/OSBindings/Mac/Clock Signal/Views/CSScanTargetView.h +++ b/OSBindings/Mac/Clock Signal/Views/CSScanTargetView.h @@ -97,7 +97,7 @@ @end /*! - Although I'm still on the fence about this as a design decision, CSScanTargetView is itself responsible + Although I'm still on the fence about this as a design decision, CSScanTargetView is itself responsible for creating and destroying a CVDisplayLink. There's a practical reason for this: you'll get real synchronisation only if a link is explicitly tied to a particular display, and the CSScanTargetView therefore owns the knowledge necessary to decide when to create and modify them. It doesn't currently just propagate "did change screen"-type diff --git a/OSBindings/Mac/Clock Signal/Views/CSScanTargetView.m b/OSBindings/Mac/Clock Signal/Views/CSScanTargetView.m index 4d54dceb8..5956609b5 100644 --- a/OSBindings/Mac/Clock Signal/Views/CSScanTargetView.m +++ b/OSBindings/Mac/Clock Signal/Views/CSScanTargetView.m @@ -377,7 +377,7 @@ static CVReturn DisplayLinkCallback(__unused CVDisplayLinkRef displayLink, const [super mouseUp:event]; } -- (void)rightMouseUp:(NSEvent *)event { +- (void)rightMouseUp:(NSEvent *)event { [self applyButtonUp:event]; [super rightMouseUp:event]; } diff --git a/OSBindings/Mac/Clock SignalTests/65816ComparativeTests.mm b/OSBindings/Mac/Clock SignalTests/65816ComparativeTests.mm index e47d84d0e..c342889a6 100644 --- a/OSBindings/Mac/Clock SignalTests/65816ComparativeTests.mm +++ b/OSBindings/Mac/Clock SignalTests/65816ComparativeTests.mm @@ -18,7 +18,7 @@ namespace { struct StopException {}; -struct BusHandler: public CPU::MOS6502Esque::BusHandler { +struct BusHandler: public CPU::MOS6502Esque::BusHandler { // Use a map to store RAM contents, in order to preserve initialised state. std::unordered_map ram; std::unordered_map inventions; diff --git a/OSBindings/Mac/Clock SignalTests/68000ComparativeTests.mm b/OSBindings/Mac/Clock SignalTests/68000ComparativeTests.mm index a85808242..2f0a13008 100644 --- a/OSBindings/Mac/Clock SignalTests/68000ComparativeTests.mm +++ b/OSBindings/Mac/Clock SignalTests/68000ComparativeTests.mm @@ -260,7 +260,7 @@ struct TestProcessor: public CPU::MC68000::BusHandler { } } -- (void)testOperationClassic:(NSDictionary *)test name:(NSString *)name { +- (void)testOperationClassic:(NSDictionary *)test name:(NSString *)name { struct TerminateMarker {}; auto uniqueTest68000 = std::make_unique(reinterpret_cast(_ram.data())); diff --git a/OSBindings/Mac/Clock SignalTests/AllSuiteATests.swift b/OSBindings/Mac/Clock SignalTests/AllSuiteATests.swift index 12076e958..b3f13462f 100644 --- a/OSBindings/Mac/Clock SignalTests/AllSuiteATests.swift +++ b/OSBindings/Mac/Clock SignalTests/AllSuiteATests.swift @@ -16,7 +16,7 @@ class AllSuiteATests: XCTestCase { let machine = CSTestMachine6502(processor: .processor6502) machine.setData(allSuiteA, atAddress: 0x4000) - machine.setValue(CSTestMachine6502JamOpcode, forAddress:0x45c0); // end + machine.setValue(CSTestMachine6502JamOpcode, forAddress:0x45c0); // end machine.setValue(0x4000, for: CSTestMachine6502Register.programCounter) while !machine.isJammed { diff --git a/OSBindings/Mac/Clock SignalTests/FUSETests.swift b/OSBindings/Mac/Clock SignalTests/FUSETests.swift index 0bb5eaf64..203f88c1a 100644 --- a/OSBindings/Mac/Clock SignalTests/FUSETests.swift +++ b/OSBindings/Mac/Clock SignalTests/FUSETests.swift @@ -129,7 +129,7 @@ fileprivate func ==(lhs: RegisterState, rhs: RegisterState) -> Bool { lhs.bc == rhs.bc && lhs.de == rhs.de && lhs.hl == rhs.hl && - (lhs.afDash & ~0x0028) == (rhs.afDash & ~0x0028) && + (lhs.afDash & ~0x0028) == (rhs.afDash & ~0x0028) && lhs.bcDash == rhs.bcDash && lhs.deDash == rhs.deDash && lhs.hlDash == rhs.hlDash && diff --git a/OSBindings/Mac/Clock SignalTests/OPLTests.mm b/OSBindings/Mac/Clock SignalTests/OPLTests.mm index 6691ad860..a9649fb3a 100644 --- a/OSBindings/Mac/Clock SignalTests/OPLTests.mm +++ b/OSBindings/Mac/Clock SignalTests/OPLTests.mm @@ -82,7 +82,7 @@ // as "close enough". Sadly the raw data isn't given, so // that's the best as I can do. Fingers crossed! - NSURL *const url = [[NSBundle bundleForClass:[self class]] URLForResource:@"fm" withExtension:@"json"]; + NSURL *const url = [[NSBundle bundleForClass:[self class]] URLForResource:@"fm" withExtension:@"json"]; NSArray *const parent = [NSJSONSerialization JSONObjectWithData:[NSData dataWithContentsOfURL:url] options:0 error:nil]; for(int c = 0; c < 64; ++c) { diff --git a/OSBindings/Mac/Clock SignalTests/Z80MemptrTests.swift b/OSBindings/Mac/Clock SignalTests/Z80MemptrTests.swift index 546efa40c..ea1f1728f 100644 --- a/OSBindings/Mac/Clock SignalTests/Z80MemptrTests.swift +++ b/OSBindings/Mac/Clock SignalTests/Z80MemptrTests.swift @@ -174,8 +174,8 @@ class Z80MemptrTester: XCTestCase { // LD (bc/de),A, and LD (nn),A func testLDrpA() { - // MEMPTR_low = (addr + 1) & #FF, MEMPTR_hi = A - // Note for *BM1: MEMPTR_low = (addr + 1) & #FF, MEMPTR_hi = 0 + // MEMPTR_low = (addr + 1) & #FF, MEMPTR_hi = A + // Note for *BM1: MEMPTR_low = (addr + 1) & #FF, MEMPTR_hi = 0 let bcProgram: [UInt8] = [ 0x02 ] @@ -534,8 +534,8 @@ class Z80MemptrTester: XCTestCase { /* TODO: OUT (port),A - MEMPTR_low = (port + 1) & #FF, MEMPTR_hi = A - Note for *BM1: MEMPTR_low = (port + 1) & #FF, MEMPTR_hi = 0 + MEMPTR_low = (port + 1) & #FF, MEMPTR_hi = A + Note for *BM1: MEMPTR_low = (port + 1) & #FF, MEMPTR_hi = 0 */ /* TODO: @@ -586,7 +586,7 @@ class Z80MemptrTester: XCTestCase { when BC=1 or A=(HL): exactly as CPI In other cases MEMPTR = PC + 1 on each step, where PC = instruction address. Note* since at the last execution BC=1 or A=(HL), resulting MEMPTR = PC + 1 + 1 - (if there were not interrupts during the execution) + (if there were not interrupts during the execution) */ /* TODO: @@ -594,7 +594,7 @@ class Z80MemptrTester: XCTestCase { when BC=1 or A=(HL): exactly as CPD In other cases MEMPTR = PC + 1 on each step, where PC = instruction address. Note* since at the last execution BC=1 or A=(HL), resulting MEMPTR = PC + 1 - 1 - (if there were not interrupts during the execution) + (if there were not interrupts during the execution) */ /* TODO: diff --git a/OSBindings/SDL/main.cpp b/OSBindings/SDL/main.cpp index 16eb63bfd..226cb7c41 100644 --- a/OSBindings/SDL/main.cpp +++ b/OSBindings/SDL/main.cpp @@ -534,7 +534,7 @@ int main(int argc, char *argv[]) { const ParsedArguments arguments = parse_arguments(argc, argv); // This may be printed either as - const std::string usage_suffix = " [file or --new={machine}] [OPTIONS] [--rompath={path to ROMs}] [--speed={speed multiplier, e.g. 1.5}] [--logical-keyboard] [--volume={0.0 to 1.0}]"; + const std::string usage_suffix = " [file or --new={machine}] [OPTIONS] [--rompath={path to ROMs}] [--speed={speed multiplier, e.g. 1.5}] [--logical-keyboard] [--volume={0.0 to 1.0}]"; // Print a help message if requested. if(arguments.selections.find("help") != arguments.selections.end() || arguments.selections.find("h") != arguments.selections.end()) { diff --git a/Processors/6502/Implementation/6502Implementation.hpp b/Processors/6502/Implementation/6502Implementation.hpp index 45e8dcf12..d07bfe9ee 100644 --- a/Processors/6502/Implementation/6502Implementation.hpp +++ b/Processors/6502/Implementation/6502Implementation.hpp @@ -172,7 +172,7 @@ template void Proces case CyclePullOperand: s_++; read_mem(operand_, s_ | 0x100); break; case OperationSetFlagsFromOperand: set_flags(operand_); continue; case OperationSetOperandFromFlagsWithBRKSet: operand_ = flags_.get(); continue; - case OperationSetOperandFromFlags: operand_ = flags_.get() & ~Flag::Break; continue; + case OperationSetOperandFromFlags: operand_ = flags_.get() & ~Flag::Break; continue; case OperationSetFlagsFromA: flags_.set_nz(a_); continue; case OperationSetFlagsFromX: flags_.set_nz(x_); continue; case OperationSetFlagsFromY: flags_.set_nz(y_); continue; diff --git a/Processors/68000/Implementation/68000Implementation.hpp b/Processors/68000/Implementation/68000Implementation.hpp index 719c53d31..5a49bbb7e 100644 --- a/Processors/68000/Implementation/68000Implementation.hpp +++ b/Processors/68000/Implementation/68000Implementation.hpp @@ -410,7 +410,7 @@ void Processor new_encoder(Storage::Disk::PCMSegment &segment, bool is_double_density) { std::unique_ptr encoder; diff --git a/Storage/Disk/Parsers/CPM.cpp b/Storage/Disk/Parsers/CPM.cpp index 47be75bda..23e5ab3f9 100644 --- a/Storage/Disk/Parsers/CPM.cpp +++ b/Storage/Disk/Parsers/CPM.cpp @@ -138,7 +138,7 @@ std::unique_ptr Storage::Disk::CPM::GetCatalogue( track = first_sector / parameters.sectors_per_track; for(int s = 0; s < sectors_per_block && record < number_of_records; s++) { - Storage::Encodings::MFM::Sector *sector_contents = parser.get_sector(0, uint8_t(track), uint8_t(parameters.first_sector + sector)); + Storage::Encodings::MFM::Sector *sector_contents = parser.get_sector(0, uint8_t(track), uint8_t(parameters.first_sector + sector)); if(!sector_contents || sector_contents->samples.empty()) break; sector++; if(sector == parameters.sectors_per_track) { diff --git a/Storage/MassStorage/Formats/HFV.cpp b/Storage/MassStorage/Formats/HFV.cpp index 3aa8b6f0b..5c1364b88 100644 --- a/Storage/MassStorage/Formats/HFV.cpp +++ b/Storage/MassStorage/Formats/HFV.cpp @@ -18,7 +18,7 @@ HFV::HFV(const std::string &file_name) : file_(file_name) { // Is this an HFS volume? // TODO: check filing system for MFS or HFS+. const auto prefix = file_.read(2); - if(prefix[0] != 'L' || prefix[1] != 'K') throw std::exception(); + if(prefix[0] != 'L' || prefix[1] != 'K') throw std::exception(); } size_t HFV::get_block_size() { diff --git a/Storage/MassStorage/SCSI/Target.hpp b/Storage/MassStorage/SCSI/Target.hpp index 7ca91d680..5eff599cc 100644 --- a/Storage/MassStorage/SCSI/Target.hpp +++ b/Storage/MassStorage/SCSI/Target.hpp @@ -323,7 +323,7 @@ struct Executor { return true; } - /* Group 5 commands. */ + /* Group 5 commands. */ bool set_block_limits(const CommandState &, Responder &) { return false; } }; diff --git a/Storage/State/SZX.cpp b/Storage/State/SZX.cpp index 8a924f6ee..c734240de 100644 --- a/Storage/State/SZX.cpp +++ b/Storage/State/SZX.cpp @@ -116,7 +116,7 @@ std::unique_ptr SZX::load(const std::string &file_name const uint8_t flags = file.get8(); state->z80.execution_state.is_halted = flags & 2; // TODO: bit 0 indicates that the last instruction was an EI, or an invalid - // DD or FD. I assume I'm supposed to use that to conclude an interrupt + // DD or FD. I assume I'm supposed to use that to conclude an interrupt // verdict but I'm unclear what the effect of an invalid DD or FD is so // have not yet implemented this. diff --git a/Storage/Tape/Formats/CAS.cpp b/Storage/Tape/Formats/CAS.cpp index b201d0493..0d9dec328 100644 --- a/Storage/Tape/Formats/CAS.cpp +++ b/Storage/Tape/Formats/CAS.cpp @@ -50,7 +50,7 @@ using namespace Storage::Tape; everything to the next 0x1f as padding. */ -namespace { +namespace { const uint8_t header_signature[8] = {0x1f, 0xa6, 0xde, 0xba, 0xcc, 0x13, 0x7d, 0x74}; #define TenX(x) {x, x, x, x, x, x, x, x, x, x} diff --git a/Storage/Tape/Formats/TZX.cpp b/Storage/Tape/Formats/TZX.cpp index 8d45f6a8a..b082ae95f 100644 --- a/Storage/Tape/Formats/TZX.cpp +++ b/Storage/Tape/Formats/TZX.cpp @@ -31,7 +31,7 @@ TZX::TZX(const std::string &file_name) : uint8_t minor_version = file_.get8(); // Reject if an incompatible version - if(major_version != 1 || minor_version > 21) throw ErrorNotTZX; + if(major_version != 1 || minor_version > 21) throw ErrorNotTZX; virtual_reset(); } @@ -213,7 +213,7 @@ void TZX::get_standard_speed_data_block() { if(!data_block.data.data_length) return; uint8_t first_byte = file_.get8(); - data_block.length_of_pilot_tone = (first_byte < 128) ? 8063 : 3223; + data_block.length_of_pilot_tone = (first_byte < 128) ? 8063 : 3223; file_.seek(-1, SEEK_CUR); get_data_block(data_block); diff --git a/Storage/Tape/Parsers/Acorn.hpp b/Storage/Tape/Parsers/Acorn.hpp index 4e6f0b4c9..4b4a50790 100644 --- a/Storage/Tape/Parsers/Acorn.hpp +++ b/Storage/Tape/Parsers/Acorn.hpp @@ -44,7 +44,7 @@ enum class SymbolType { One, Zero }; -class Parser: public Storage::Tape::Parser, public Shifter::Delegate { +class Parser: public Storage::Tape::Parser, public Shifter::Delegate { public: Parser(); diff --git a/Storage/Tape/Parsers/MSX.cpp b/Storage/Tape/Parsers/MSX.cpp index f3f5701bf..fed2c6a6a 100644 --- a/Storage/Tape/Parsers/MSX.cpp +++ b/Storage/Tape/Parsers/MSX.cpp @@ -120,8 +120,8 @@ int Parser::get_byte(const FileSpeed &speed, Storage::Tape::BinaryTapePlayer &ta /* "Each of the eight data bits is then read by counting the number of transitions within a fixed period of time (1B03H). If zero or one transitions are found it is a 0 bit, if two - or three are found it is a 1 bit. If more than three transitions are found the routine - terminates with Flag C as this is presumed to be a hardware error of some sort. " + or three are found it is a 1 bit. If more than three transitions are found the routine + terminates with Flag C as this is presumed to be a hardware error of some sort." */ int result = 0; const int cycles_per_window = int(