1
0
mirror of https://github.com/TomHarte/CLK.git synced 2025-03-06 01:30:19 +00:00

Eliminates a variety of end-of-line spaces.

This commit is contained in:
Thomas Harte 2017-11-07 22:54:22 -05:00
parent f95515ae81
commit 6e1d69581c
14 changed files with 33 additions and 33 deletions

View File

@ -237,7 +237,7 @@ class Joystick: public Inputs::Joystick {
Joystick(UserPortVIA &user_port_via_port_handler, KeyboardVIA &keyboard_via_port_handler) : Joystick(UserPortVIA &user_port_via_port_handler, KeyboardVIA &keyboard_via_port_handler) :
user_port_via_port_handler_(user_port_via_port_handler), user_port_via_port_handler_(user_port_via_port_handler),
keyboard_via_port_handler_(keyboard_via_port_handler) {} keyboard_via_port_handler_(keyboard_via_port_handler) {}
void set_digital_input(DigitalInput digital_input, bool is_active) override { void set_digital_input(DigitalInput digital_input, bool is_active) override {
JoystickInput mapped_input; JoystickInput mapped_input;
switch (digital_input) { switch (digital_input) {
@ -444,7 +444,7 @@ class ConcreteMachine:
write_to_map(processor_read_memory_map_, user_basic_memory_, 0x0000, sizeof(user_basic_memory_)); write_to_map(processor_read_memory_map_, user_basic_memory_, 0x0000, sizeof(user_basic_memory_));
write_to_map(processor_read_memory_map_, screen_memory_, 0x1000, sizeof(screen_memory_)); write_to_map(processor_read_memory_map_, screen_memory_, 0x1000, sizeof(screen_memory_));
write_to_map(processor_read_memory_map_, colour_memory_, 0x9400, sizeof(colour_memory_)); write_to_map(processor_read_memory_map_, colour_memory_, 0x9400, sizeof(colour_memory_));
write_to_map(processor_write_memory_map_, user_basic_memory_, 0x0000, sizeof(user_basic_memory_)); write_to_map(processor_write_memory_map_, user_basic_memory_, 0x0000, sizeof(user_basic_memory_));
write_to_map(processor_write_memory_map_, screen_memory_, 0x1000, sizeof(screen_memory_)); write_to_map(processor_write_memory_map_, screen_memory_, 0x1000, sizeof(screen_memory_));
write_to_map(processor_write_memory_map_, colour_memory_, 0x9400, sizeof(colour_memory_)); write_to_map(processor_write_memory_map_, colour_memory_, 0x9400, sizeof(colour_memory_));

View File

@ -34,7 +34,7 @@ enum ROMSlot: uint8_t {
/*! /*!
@abstract Represents an Acorn Electron. @abstract Represents an Acorn Electron.
@discussion An instance of Electron::Machine represents the current state of an @discussion An instance of Electron::Machine represents the current state of an
Acorn Electron. Acorn Electron.
*/ */

View File

@ -17,7 +17,7 @@
/* /*
* Summary: * Summary:
* Virtual keycodes * Virtual keycodes
* *
* Discussion: * Discussion:
* These constants are the virtual keycodes defined originally in * These constants are the virtual keycodes defined originally in
* Inside Mac Volume V, pg. V-191. They identify physical keys on a * Inside Mac Volume V, pg. V-191. They identify physical keys on a

View File

@ -282,15 +282,15 @@ class Z80MemptrTests: XCTestCase {
CPIR CPIR
when BC=1 or A=(HL): exactly as CPI when BC=1 or A=(HL): exactly as CPI
In other cases MEMPTR = PC + 1 on each step, where PC = instruction address. 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 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: /* TODO:
CPDR CPDR
when BC=1 or A=(HL): exactly as CPD when BC=1 or A=(HL): exactly as CPD
In other cases MEMPTR = PC + 1 on each step, where PC = instruction address. 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 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)
*/ */
@ -307,13 +307,13 @@ class Z80MemptrTests: XCTestCase {
/* TODO: /* TODO:
INIR INIR
exactly as INI on each execution. exactly as INI on each execution.
I.e. resulting MEMPTR = ((1 << 8) + C) + 1 I.e. resulting MEMPTR = ((1 << 8) + C) + 1
*/ */
/* TODO: /* TODO:
INDR INDR
exactly as IND on each execution. exactly as IND on each execution.
I.e. resulting MEMPTR = ((1 << 8) + C) - 1 I.e. resulting MEMPTR = ((1 << 8) + C) - 1
*/ */
/* TODO: /* TODO:
@ -328,7 +328,7 @@ class Z80MemptrTests: XCTestCase {
/* TODO: /* TODO:
OTIR OTIR
exactly as OUTI on each execution. I.e. resulting MEMPTR = C + 1 exactly as OUTI on each execution. I.e. resulting MEMPTR = C + 1
*/ */
/* TODO: /* TODO:

View File

@ -87,7 +87,7 @@ bool KeyboardKeyForSDLScancode(SDL_Keycode scancode, Inputs::Keyboard::Key &key)
BIND(TAB, Tab) BIND(TAB, Tab)
BIND(LEFTBRACKET, OpenSquareBracket) BIND(RIGHTBRACKET, CloseSquareBracket) BIND(LEFTBRACKET, OpenSquareBracket) BIND(RIGHTBRACKET, CloseSquareBracket)
BIND(BACKSLASH, BackSlash) BIND(BACKSLASH, BackSlash)
BIND(CAPSLOCK, CapsLock) BIND(SEMICOLON, Semicolon) BIND(CAPSLOCK, CapsLock) BIND(SEMICOLON, Semicolon)
BIND(APOSTROPHE, Quote) BIND(RETURN, Enter) BIND(APOSTROPHE, Quote) BIND(RETURN, Enter)
@ -193,7 +193,7 @@ int main(int argc, char *argv[]) {
results.emplace_back(nullptr); results.emplace_back(nullptr);
continue; continue;
} }
std::unique_ptr<std::vector<uint8_t>> data(new std::vector<uint8_t>); std::unique_ptr<std::vector<uint8_t>> data(new std::vector<uint8_t>);
fseek(file, 0, SEEK_END); fseek(file, 0, SEEK_END);
@ -207,7 +207,7 @@ int main(int argc, char *argv[]) {
return results; return results;
}); });
if(!roms_loaded) { if(!roms_loaded) {
std::cerr << "Could not find system ROMs; please install to /usr/local/share/CLK/ or /usr/share/CLK/" << std::endl; std::cerr << "Could not find system ROMs; please install to /usr/local/share/CLK/ or /usr/share/CLK/" << std::endl;
return -1; return -1;
@ -225,13 +225,13 @@ int main(int argc, char *argv[]) {
// Create an audio pipe. // Create an audio pipe.
SDL_AudioSpec desired_audio_spec; SDL_AudioSpec desired_audio_spec;
SDL_AudioSpec obtained_audio_spec; SDL_AudioSpec obtained_audio_spec;
SDL_zero(desired_audio_spec); SDL_zero(desired_audio_spec);
desired_audio_spec.freq = 48000; // TODO: how can I get SDL to reveal the output rate of this machine? desired_audio_spec.freq = 48000; // TODO: how can I get SDL to reveal the output rate of this machine?
desired_audio_spec.format = AUDIO_S16; desired_audio_spec.format = AUDIO_S16;
desired_audio_spec.channels = 1; desired_audio_spec.channels = 1;
desired_audio_spec.samples = AudioBufferSize; desired_audio_spec.samples = AudioBufferSize;
speaker_delegate.audio_device = SDL_OpenAudioDevice(nullptr, 0, &desired_audio_spec, &obtained_audio_spec, SDL_AUDIO_ALLOW_FREQUENCY_CHANGE); speaker_delegate.audio_device = SDL_OpenAudioDevice(nullptr, 0, &desired_audio_spec, &obtained_audio_spec, SDL_AUDIO_ALLOW_FREQUENCY_CHANGE);
speaker->set_output_rate(obtained_audio_spec.freq, obtained_audio_spec.samples); speaker->set_output_rate(obtained_audio_spec.freq, obtained_audio_spec.samples);

View File

@ -250,7 +250,7 @@ class CRT {
/*! Tells the CRT that the next call to draw_frame will occur on a different OpenGL context than /*! Tells the CRT that the next call to draw_frame will occur on a different OpenGL context than
the previous. the previous.
@param should_delete_resources If @c true then all resources textures, vertex arrays, etc @param should_delete_resources If @c true then all resources textures, vertex arrays, etc
currently held by the CRT will be deleted now via calls to glDeleteTexture and equivalent. If currently held by the CRT will be deleted now via calls to glDeleteTexture and equivalent. If
@c false then the references are simply marked as invalid. @c false then the references are simply marked as invalid.
*/ */
@ -263,7 +263,7 @@ class CRT {
/*! Sets a function that will map from whatever data the machine provided to a composite signal. /*! Sets a function that will map from whatever data the machine provided to a composite signal.
@param shader A GLSL fragment including a function with the signature @param shader A GLSL fragment including a function with the signature
`float composite_sample(usampler2D texID, vec2 coordinate, vec2 iCoordinate, float phase, float amplitude)` `float composite_sample(usampler2D texID, vec2 coordinate, vec2 iCoordinate, float phase, float amplitude)`
that evaluates to the composite signal level as a function of a source buffer, sampling location, colour that evaluates to the composite signal level as a function of a source buffer, sampling location, colour
carrier phase and amplitude. carrier phase and amplitude.
*/ */
@ -299,7 +299,7 @@ class CRT {
format will be applied. format will be applied.
@param shader A GLSL fragent including a function with the signature @param shader A GLSL fragent including a function with the signature
`vec3 rgb_sample(usampler2D sampler, vec2 coordinate, vec2 icoordinate)` that evaluates to an RGB colour `vec3 rgb_sample(usampler2D sampler, vec2 coordinate, vec2 icoordinate)` that evaluates to an RGB colour
as a function of: as a function of:
* `usampler2D sampler` representing the source buffer; * `usampler2D sampler` representing the source buffer;

View File

@ -46,7 +46,7 @@ public:
/*! /*!
Performs an @c glUseProgram to make this the active shader unless: Performs an @c glUseProgram to make this the active shader unless:
(i) it was the previous shader bound; and (i) it was the previous shader bound; and
(ii) no calls have been received to unbind in the interim. (ii) no calls have been received to unbind in the interim.
Subsequently performs all work queued up for the next bind irrespective of whether a @c glUseProgram call occurred. Subsequently performs all work queued up for the next bind irrespective of whether a @c glUseProgram call occurred.

View File

@ -33,17 +33,17 @@ namespace CRT {
(i) allocate a write area with allocate_write_area, supplying a maximum size. (i) allocate a write area with allocate_write_area, supplying a maximum size.
(ii) call reduce_previous_allocation_to to announce the actual size written. (ii) call reduce_previous_allocation_to to announce the actual size written.
This will cause you to have added source data to the target texture. You can then either use that data This will cause you to have added source data to the target texture. You can then either use that data
or allow it to expire. or allow it to expire.
(iii) call retain_latest to add the most recently written write area to the flush queue. (iii) call retain_latest to add the most recently written write area to the flush queue.
The flush queue contains provisional data, that can sit in the CPU's memory space indefinitely. This facility The flush queue contains provisional data, that can sit in the CPU's memory space indefinitely. This facility
is provided because it is expected that a texture will be built alontside some other collection of data is provided because it is expected that a texture will be built alontside some other collection of data
that data in the flush queue is expected to become useful in coordination with something else but should that data in the flush queue is expected to become useful in coordination with something else but should
be retained at least until then. be retained at least until then.
(iv) call flush to move data to the submit queue. (iv) call flush to move data to the submit queue.
When you flush, you'll receive a record of the bounds of all newly-flushed areas of source data. That gives When you flush, you'll receive a record of the bounds of all newly-flushed areas of source data. That gives

View File

@ -400,7 +400,7 @@ template < class T,
int halfResult = (destinationValue&0xfff) - (sourceValue&0xfff) - (carry_result_ & Flag::Carry); int halfResult = (destinationValue&0xfff) - (sourceValue&0xfff) - (carry_result_ & Flag::Carry);
// subtraction, so parity rules are: // subtraction, so parity rules are:
// signs of operands were different, // signs of operands were different,
// sign of result is different // sign of result is different
int overflow = (result ^ destinationValue) & (sourceValue ^ destinationValue); int overflow = (result ^ destinationValue) & (sourceValue ^ destinationValue);

View File

@ -203,7 +203,7 @@ class ProcessorBase: public ProcessorStorage {
/*! /*!
Sets the logical value of the non-maskable interrupt line. Sets the logical value of the non-maskable interrupt line.
@param offset See discussion in set_interrupt_line. @param offset See discussion in set_interrupt_line.
*/ */
inline void set_non_maskable_interrupt_line(bool value, int offset = 0); inline void set_non_maskable_interrupt_line(bool value, int offset = 0);

View File

@ -71,8 +71,8 @@ void FIRFilter::coefficients_for_idealised_filter_response(short *filterCoeffici
float I0 = ino(a); float I0 = ino(a);
float NpSquared = static_cast<float>(Np * Np); float NpSquared = static_cast<float>(Np * Np);
for(unsigned int i = 0; i <= Np; i++) { for(unsigned int i = 0; i <= Np; i++) {
filterCoefficientsFloat[Np + i] = filterCoefficientsFloat[Np + i] =
A[i] * A[i] *
ino(a * sqrtf(1.0f - (static_cast<float>(i * i) / NpSquared) )) / ino(a * sqrtf(1.0f - (static_cast<float>(i * i) / NpSquared) )) /
I0; I0;
} }
@ -81,7 +81,7 @@ void FIRFilter::coefficients_for_idealised_filter_response(short *filterCoeffici
for(unsigned int i = 0; i < Np; i++) { for(unsigned int i = 0; i < Np; i++) {
filterCoefficientsFloat[i] = filterCoefficientsFloat[numberOfTaps - 1 - i]; filterCoefficientsFloat[i] = filterCoefficientsFloat[numberOfTaps - 1 - i];
} }
/* scale back up so that we retain 100% of input volume */ /* scale back up so that we retain 100% of input volume */
float coefficientTotal = 0.0f; float coefficientTotal = 0.0f;
for(unsigned int i = 0; i < numberOfTaps; i++) { for(unsigned int i = 0; i < numberOfTaps; i++) {
@ -124,7 +124,7 @@ FIRFilter::FIRFilter(unsigned int number_of_taps, float input_sample_rate, float
A[0] = 2.0f * (high_frequency - low_frequency) / input_sample_rate; A[0] = 2.0f * (high_frequency - low_frequency) / input_sample_rate;
for(unsigned int i = 1; i <= Np; i++) { for(unsigned int i = 1; i <= Np; i++) {
float iPi = static_cast<float>(i) * static_cast<float>(M_PI); float iPi = static_cast<float>(i) * static_cast<float>(M_PI);
A[i] = A[i] =
( (
sinf(twoOverSampleRate * iPi * high_frequency) - sinf(twoOverSampleRate * iPi * high_frequency) -
sinf(twoOverSampleRate * iPi * low_frequency) sinf(twoOverSampleRate * iPi * low_frequency)

View File

@ -221,7 +221,7 @@ uint8_t Parser::get_next_byte(const std::shared_ptr<Storage::Tape::Tape> &tape)
} }
/*! /*!
Reads the next nine symbols and applies a binary test to each to differentiate between ::One and not-::One. Reads the next nine symbols and applies a binary test to each to differentiate between ::One and not-::One.
Returns a byte composed of the first eight of those as bits; sets the error flag if any symbol is not Returns a byte composed of the first eight of those as bits; sets the error flag if any symbol is not
::One and not ::Zero, or if the ninth bit is not equal to the odd parity of the other eight. ::One and not ::Zero, or if the ninth bit is not equal to the odd parity of the other eight.
*/ */
@ -285,7 +285,7 @@ void Parser::process_pulse(const Storage::Tape::Tape::Pulse &pulse)
} }
/*! /*!
Per the contract with StaticAnalyser::TapeParser; produces any of a word marker, an end-of-block marker, Per the contract with StaticAnalyser::TapeParser; produces any of a word marker, an end-of-block marker,
a zero, a one or a lead-in symbol based on the currently captured waves. a zero, a one or a lead-in symbol based on the currently captured waves.
*/ */
void Parser::inspect_waves(const std::vector<WaveType> &waves) void Parser::inspect_waves(const std::vector<WaveType> &waves)

View File

@ -110,7 +110,7 @@ class Parser: public Storage::Tape::PulseClassificationParser<WaveType, SymbolTy
uint8_t get_next_byte(const std::shared_ptr<Storage::Tape::Tape> &tape); uint8_t get_next_byte(const std::shared_ptr<Storage::Tape::Tape> &tape);
/*! /*!
Reads the next nine symbols and applies a binary test to each to differentiate between ::One and not-::One. Reads the next nine symbols and applies a binary test to each to differentiate between ::One and not-::One.
Returns a byte composed of the first eight of those as bits; sets the error flag if any symbol is not Returns a byte composed of the first eight of those as bits; sets the error flag if any symbol is not
::One and not ::Zero, or if the ninth bit is not equal to the odd parity of the other eight. ::One and not ::Zero, or if the ninth bit is not equal to the odd parity of the other eight.
*/ */
@ -131,7 +131,7 @@ class Parser: public Storage::Tape::PulseClassificationParser<WaveType, SymbolTy
float wave_period_; float wave_period_;
/*! /*!
Per the contract with StaticAnalyser::TapeParser; produces any of a word marker, an end-of-block marker, Per the contract with StaticAnalyser::TapeParser; produces any of a word marker, an end-of-block marker,
a zero, a one or a lead-in symbol based on the currently captured waves. a zero, a one or a lead-in symbol based on the currently captured waves.
*/ */
void inspect_waves(const std::vector<WaveType> &waves); void inspect_waves(const std::vector<WaveType> &waves);

View File

@ -88,7 +88,7 @@ void TimedEventLoop::set_next_event_time_interval(Time interval) {
} }
Time TimedEventLoop::get_time_into_next_event() { Time TimedEventLoop::get_time_into_next_event() {
// TODO: calculate, presumably as [length of interval] - ([cycles left] + [subcycles left]) // TODO: calculate, presumably as [length of interval] - ([cycles left] + [subcycles left])
Time zero; Time zero;
return zero; return zero;
} }