1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-06-09 17:29:36 +00:00

Eliminate various other errant spaces.

This commit is contained in:
Thomas Harte 2023-05-16 16:40:09 -04:00
parent f821b60430
commit 8578dfbf22
55 changed files with 86 additions and 86 deletions

View File

@ -20,7 +20,7 @@ static std::unique_ptr<File::Chunk> GetNextChunk(const std::shared_ptr<Storage::
int shift_register = 0;
// TODO: move this into the parser
#define shift() shift_register = (shift_register >> 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)) {

View File

@ -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;

View File

@ -11,7 +11,7 @@
#include "Kernel.hpp"
using namespace Analyser::Static::MOS6502;
namespace {
namespace {
using PartialDisassembly = Analyser::Static::Disassembly::PartialDisassembly<Disassembly, uint16_t>;

View File

@ -11,7 +11,7 @@
#include "Kernel.hpp"
using namespace Analyser::Static::Z80;
namespace {
namespace {
using PartialDisassembly = Analyser::Static::Disassembly::PartialDisassembly<Disassembly, uint16_t>;

View File

@ -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) |

View File

@ -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. */

View File

@ -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<personality> *base, uint8_t y) :
base(base),

View File

@ -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))

View File

@ -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) |

View File

@ -108,7 +108,7 @@ template <int precision> class PhaseGenerator {
}
private:
static constexpr int precision_shift = 1 + precision;
static constexpr int precision_shift = 1 + precision;
int phase_ = 0;

View File

@ -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:
///

View File

@ -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;

View File

@ -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

View File

@ -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

View File

@ -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,

View File

@ -46,7 +46,7 @@ class Bitplanes: public DMADevice<6, 2> {
BitplaneData next;
};
template <typename SourceT> constexpr SourceT bitplane_swizzle(SourceT value) {
template <typename SourceT> constexpr SourceT bitplane_swizzle(SourceT value) {
return
(value&0x21) |
((value&0x02) << 2) |

View File

@ -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<true> &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;

View File

@ -243,8 +243,8 @@ template <Analyser::Static::AppleII::Target::Model model> 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)) {

View File

@ -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,

View File

@ -28,7 +28,7 @@ class Machine {
friend Configurable::DisplayOption<Options>;
public:
Options(Configurable::OptionsType type) : Configurable::DisplayOption<Options>(
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);

View File

@ -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<uint16_t *>(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;

View File

@ -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
};

View File

@ -705,9 +705,9 @@ class ConcreteMachine:
}
CPU::MOS6502::Processor<CPU::MOS6502::Personality::P6502, ConcreteMachine, false> m6502_;
std::vector<uint8_t> character_rom_;
std::vector<uint8_t> basic_rom_;
std::vector<uint8_t> kernel_rom_;
std::vector<uint8_t> character_rom_;
std::vector<uint8_t> basic_rom_;
std::vector<uint8_t> kernel_rom_;
std::vector<uint8_t> rom_;
uint16_t rom_address_, rom_length_;

View File

@ -10,7 +10,7 @@
#include <cstdio>
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.

View File

@ -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);

View File

@ -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 {

View File

@ -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 {

View File

@ -693,7 +693,7 @@ template<Model model> 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.

View File

@ -28,7 +28,7 @@ void PackBigEndian16(const std::vector<uint8_t> &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.

View File

@ -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 {

View File

@ -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 {

View File

@ -1150,7 +1150,7 @@ using BufferingScanTarget = Outputs::Display::BufferingScanTarget;
[commandBuffer commit];
}
- (Outputs::Display::ScanTarget *)scanTarget {
- (Outputs::Display::ScanTarget *)scanTarget {
return &_scanTarget;
}

View File

@ -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

View File

@ -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];
}

View File

@ -18,7 +18,7 @@ namespace {
struct StopException {};
struct BusHandler: public CPU::MOS6502Esque::BusHandler<uint32_t> {
struct BusHandler: public CPU::MOS6502Esque::BusHandler<uint32_t> {
// Use a map to store RAM contents, in order to preserve initialised state.
std::unordered_map<uint32_t, uint8_t> ram;
std::unordered_map<uint32_t, uint8_t> inventions;

View File

@ -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<TestProcessor>(reinterpret_cast<uint8_t *>(_ram.data()));

View File

@ -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 {

View File

@ -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 &&

View File

@ -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) {

View File

@ -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:

View File

@ -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()) {

View File

@ -172,7 +172,7 @@ template <Personality personality, typename T, bool uses_ready_line> 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;

View File

@ -410,7 +410,7 @@ void Processor<BusHandler, dtack_is_implicit, permit_overrun, signal_will_perfor
// Perform the RESET exception, which seeds the stack pointer and program
// counter, populates the prefetch queue, and then moves to instruction dispatch.
BeginState(Reset):
IdleBus(7); // (n-)*5 nn
IdleBus(7); // (n-)*5 nn
// Establish general reset state.
status_.begin_exception(7);
@ -493,7 +493,7 @@ void Processor<BusHandler, dtack_is_implicit, permit_overrun, signal_will_perfor
//
// And the documented bus pattern is:
//
// nn ns ns nS ns ns ns nS nV nv np n np
// nn ns ns nS ns ns ns nS nV nv np n np
//
// So, based on the hoopy ordering of a standard exception, maybe:
//

View File

@ -18,7 +18,7 @@ PartialMachineCycle::PartialMachineCycle(const PartialMachineCycle &rhs) noexcep
was_requested(rhs.was_requested) {}
PartialMachineCycle::PartialMachineCycle(Operation operation, HalfCycles length, uint16_t *address, uint8_t *value, bool was_requested) noexcept :
operation(operation), length(length), address(address), value(value), was_requested(was_requested) {}
operation(operation), length(length), address(address), value(value), was_requested(was_requested) {}
PartialMachineCycle::PartialMachineCycle() noexcept :
operation(Internal), length(0), address(nullptr), value(nullptr), was_requested(false) {}

View File

@ -523,7 +523,7 @@ template < class T,
uint8_t result = a_ - temp8_; \
const uint8_t halfResult = (a_&0xf) - (temp8_&0xf); \
\
parity_overflow_result_ = bc_.full ? Flag::Parity : 0; \
parity_overflow_result_ = bc_.full ? Flag::Parity : 0; \
half_carry_result_ = halfResult; \
subtract_flag_ = Flag::Subtract; \
sign_result_ = zero_result_ = result; \

View File

@ -394,22 +394,22 @@ void ProcessorStorage::assemble_base_page(InstructionPage &target, RegisterPair1
/* 0x3f CCF */ Sequence({MicroOp::CCF}),
/* 0x40 LD B, B; 0x41 LD B, C; 0x42 LD B, D; 0x43 LD B, E; 0x44 LD B, H; 0x45 LD B, L; 0x46 LD B, (HL); 0x47 LD B, A */
/* 0x40 LD B, B; 0x41 LD B, C; 0x42 LD B, D; 0x43 LD B, E; 0x44 LD B, H; 0x45 LD B, L; 0x46 LD B, (HL); 0x47 LD B, A */
LD_GROUP(bc_.halves.high, bc_.halves.high),
/* 0x48 LD C, B; 0x49 LD C, C; 0x4a LD C, D; 0x4b LD C, E; 0x4c LD C, H; 0x4d LD C, L; 0x4e LD C, (HL); 0x4f LD C, A */
/* 0x48 LD C, B; 0x49 LD C, C; 0x4a LD C, D; 0x4b LD C, E; 0x4c LD C, H; 0x4d LD C, L; 0x4e LD C, (HL); 0x4f LD C, A */
LD_GROUP(bc_.halves.low, bc_.halves.low),
/* 0x50 LD D, B; 0x51 LD D, C; 0x52 LD D, D; 0x53 LD D, E; 0x54 LD D, H; 0x55 LD D, L; 0x56 LD D, (HL); 0x57 LD D, A */
/* 0x50 LD D, B; 0x51 LD D, C; 0x52 LD D, D; 0x53 LD D, E; 0x54 LD D, H; 0x55 LD D, L; 0x56 LD D, (HL); 0x57 LD D, A */
LD_GROUP(de_.halves.high, de_.halves.high),
/* 0x58 LD E, B; 0x59 LD E, C; 0x5a LD E, D; 0x5b LD E, E; 0x5c LD E, H; 0x5d LD E, L; 0x5e LD E, (HL); 0x5f LD E, A */
/* 0x58 LD E, B; 0x59 LD E, C; 0x5a LD E, D; 0x5b LD E, E; 0x5c LD E, H; 0x5d LD E, L; 0x5e LD E, (HL); 0x5f LD E, A */
LD_GROUP(de_.halves.low, de_.halves.low),
/* 0x60 LD H, B; 0x61 LD H, C; 0x62 LD H, D; 0x63 LD H, E; 0x64 LD H, H; 0x65 LD H, L; 0x66 LD H, (HL); 0x67 LD H, A */
/* 0x60 LD H, B; 0x61 LD H, C; 0x62 LD H, D; 0x63 LD H, E; 0x64 LD H, H; 0x65 LD H, L; 0x66 LD H, (HL); 0x67 LD H, A */
LD_GROUP(index.halves.high, hl_.halves.high),
/* 0x68 LD L, B; 0x69 LD L, C; 0x6a LD L, D; 0x6b LD L, E; 0x6c LD L, H; 0x6d LD H, L; 0x6e LD L, (HL); 0x6f LD L, A */
/* 0x68 LD L, B; 0x69 LD L, C; 0x6a LD L, D; 0x6b LD L, E; 0x6c LD L, H; 0x6d LD H, L; 0x6e LD L, (HL); 0x6f LD L, A */
LD_GROUP(index.halves.low, hl_.halves.low),
/* 0x70 LD (HL), B */ Sequence(INDEX(), Write(INDEX_ADDR(), bc_.halves.high)),

View File

@ -14,7 +14,7 @@
using namespace Storage::Disk;
namespace {
namespace {
std::unique_ptr<Storage::Encodings::MFM::Encoder> new_encoder(Storage::Disk::PCMSegment &segment, bool is_double_density) {
std::unique_ptr<Storage::Encodings::MFM::Encoder> encoder;

View File

@ -138,7 +138,7 @@ std::unique_ptr<Storage::Disk::CPM::Catalogue> 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) {

View File

@ -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() {

View File

@ -323,7 +323,7 @@ struct Executor {
return true;
}
/* Group 5 commands. */
/* Group 5 commands. */
bool set_block_limits(const CommandState &, Responder &) { return false; }
};

View File

@ -116,7 +116,7 @@ std::unique_ptr<Analyser::Static::Target> 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.

View File

@ -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}

View File

@ -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);

View File

@ -44,7 +44,7 @@ enum class SymbolType {
One, Zero
};
class Parser: public Storage::Tape::Parser<SymbolType>, public Shifter::Delegate {
class Parser: public Storage::Tape::Parser<SymbolType>, public Shifter::Delegate {
public:
Parser();

View File

@ -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(