From 5ef6b190afbe56282647d37298fc82635847da6b Mon Sep 17 00:00:00 2001 From: Ryan Carsten Schmidt Date: Thu, 14 Dec 2023 03:20:12 -0600 Subject: [PATCH] Fix typos --- Machines/Apple/AppleII/Video.hpp | 2 +- .../Mac/Clock Signal/ScanTarget/CSScanTarget.mm | 12 ++++++------ Outputs/CRT/CRT.cpp | 4 ++-- Outputs/CRT/CRT.hpp | 2 +- Outputs/OpenGL/ScanTargetGLSLFragments.cpp | 2 +- Storage/Disk/DiskImage/Formats/MacintoshIMG.cpp | 4 ++-- Storage/Disk/Encodings/AppleGCR/Encoder.cpp | 2 +- 7 files changed, 14 insertions(+), 14 deletions(-) diff --git a/Machines/Apple/AppleII/Video.hpp b/Machines/Apple/AppleII/Video.hpp index 9cd75093c..5de296b46 100644 --- a/Machines/Apple/AppleII/Video.hpp +++ b/Machines/Apple/AppleII/Video.hpp @@ -280,7 +280,7 @@ template class Video: public VideoBase { if(is_vertical_sync_line) { // In effect apply an XOR to HSYNC and VSYNC flags in order to include equalising - // pulses (and hencce keep hsync approximately where it should be during vsync). + // pulses (and hence keep hsync approximately where it should be during vsync). const int blank_start = std::max(first_sync_column - sync_length, column_); const int blank_end = std::min(first_sync_column, ending_column); if(blank_end > blank_start) { diff --git a/OSBindings/Mac/Clock Signal/ScanTarget/CSScanTarget.mm b/OSBindings/Mac/Clock Signal/ScanTarget/CSScanTarget.mm index 1bd993e78..94b1c96f6 100644 --- a/OSBindings/Mac/Clock Signal/ScanTarget/CSScanTarget.mm +++ b/OSBindings/Mac/Clock Signal/ScanTarget/CSScanTarget.mm @@ -36,7 +36,7 @@ .b = 0.5 + 0.5 * chrominance * sin(phase) Contents of the composition buffer are then drawn into the finalised line texture; at this point a suitable - low-filter is applied to the two chrominance channels, colours are converted to RGB and gamma corrected. + low-pass filter is applied to the two chrominance channels, colours are converted to RGB and gamma corrected. Contents from the finalised line texture are then painted to the display. @@ -54,7 +54,7 @@ [aside: upfront calculation of cos/sin is just because it'll need to be calculated at this precision anyway, and doing it here avoids having to do unit<->radian conversions on phase alone] - Contents of the composition buffer are transferred to the separated-luma buffer, subject to a low-paass filter + Contents of the composition buffer are transferred to the separated-luma buffer, subject to a low-pass filter that has sought to separate luminance and chrominance, and with phase and amplitude now baked into the latter: .r = luminance @@ -220,7 +220,7 @@ using BufferingScanTarget = Outputs::Display::BufferingScanTarget; // Textures: the stencil. // - // Scan targets recceive scans, not full frames. Those scans may not cover the entire display, + // Scan targets receive scans, not full frames. Those scans may not cover the entire display, // either because unlit areas have been omitted or because a sync discrepancy means that the full // potential vertical or horizontal width of the display isn't used momentarily. // @@ -249,8 +249,8 @@ using BufferingScanTarget = Outputs::Display::BufferingScanTarget; /// from which lines are painted to the frame buffer. CompositeColour - // TODO: decide what to do for downard-scaled direct-to-display. Obvious options are to include lowpass - // filtering into the scan outputter and contine hoping that the vertical takes care of itself, or maybe + // TODO: decide what to do for downward-scaled direct-to-display. Obvious options are to include lowpass + // filtering into the scan outputter and continue hoping that the vertical takes care of itself, or maybe // to stick with DirectToDisplay but with a minimum size for the frame buffer and apply filtering from // there to the screen. }; @@ -448,7 +448,7 @@ using BufferingScanTarget = Outputs::Display::BufferingScanTarget; [self copyTexture:_oldFrameBuffer to:_frameBuffer]; } else { // TODO: this use of clearTexture is the only reasn _frameBuffer has a marked usage of MTLTextureUsageShaderWrite; - // it'd probably be smarter to blank it with geometry rather than potentially complicating + // it'd probably be smarter to blank it with geometry rather than potentially complicating // its storage further? [self clearTexture:_frameBuffer]; } diff --git a/Outputs/CRT/CRT.cpp b/Outputs/CRT/CRT.cpp index ad1d3cf1c..85e812bbb 100644 --- a/Outputs/CRT/CRT.cpp +++ b/Outputs/CRT/CRT.cpp @@ -199,7 +199,7 @@ Outputs::Display::ScanTarget::Scan::EndPoint CRT::end_point(uint16_t data_offset // Ensure .composite_angle is sampled at the location indicated by .cycles_since_end_of_horizontal_retrace. // TODO: I could supply time_multiplier_ as a modal and just not round .cycles_since_end_of_horizontal_retrace. Would that be better? const auto lost_precision = cycles_since_horizontal_sync_ % time_multiplier_; - end_point.composite_angle = int16_t(((phase_numerator_ - lost_precision * colour_cycle_numerator_) << 6) / phase_denominator_) * (is_alernate_line_ ? -1 : 1); + end_point.composite_angle = int16_t(((phase_numerator_ - lost_precision * colour_cycle_numerator_) << 6) / phase_denominator_) * (is_alternate_line_ ? -1 : 1); end_point.cycles_since_end_of_horizontal_retrace = uint16_t(cycles_since_horizontal_sync_ / time_multiplier_); return end_point; @@ -414,7 +414,7 @@ void CRT::output_colour_burst(int number_of_cycles, uint8_t phase, bool is_alter scan.number_of_cycles = number_of_cycles; scan.phase = phase; scan.amplitude = amplitude >> 1; - is_alernate_line_ = is_alternate_line; + is_alternate_line_ = is_alternate_line; output_scan(&scan); } diff --git a/Outputs/CRT/CRT.hpp b/Outputs/CRT/CRT.hpp index fc9bbe794..8db867bf4 100644 --- a/Outputs/CRT/CRT.hpp +++ b/Outputs/CRT/CRT.hpp @@ -60,7 +60,7 @@ class CRT { int64_t phase_denominator_ = 1; int64_t phase_numerator_ = 0; int64_t colour_cycle_numerator_ = 1; - bool is_alernate_line_ = false, phase_alternates_ = false, should_be_alternate_line_ = false; + bool is_alternate_line_ = false, phase_alternates_ = false, should_be_alternate_line_ = false; void advance_cycles(int number_of_cycles, bool hsync_requested, bool vsync_requested, const Scan::Type type, int number_of_samples); Flywheel::SyncEvent get_next_vertical_sync_event(bool vsync_is_requested, int cycles_to_run_for, int *cycles_advanced); diff --git a/Outputs/OpenGL/ScanTargetGLSLFragments.cpp b/Outputs/OpenGL/ScanTargetGLSLFragments.cpp index 70432da83..f668132f7 100644 --- a/Outputs/OpenGL/ScanTargetGLSLFragments.cpp +++ b/Outputs/OpenGL/ScanTargetGLSLFragments.cpp @@ -457,7 +457,7 @@ std::unique_ptr ScanTarget::conversion_shader() const { ");" "float luminance = dot(samples, vec4(0.15, 0.35, 0.35, 0.25));" - // Split and average chrominaxnce. + // Split and average chrominance. "vec2 chrominances[4] = vec2[4](" "textureLod(qamTextureName, qamTextureCoordinates[0], 0).gb," "textureLod(qamTextureName, qamTextureCoordinates[1], 0).gb," diff --git a/Storage/Disk/DiskImage/Formats/MacintoshIMG.cpp b/Storage/Disk/DiskImage/Formats/MacintoshIMG.cpp index 2bd311b80..4f49ce338 100644 --- a/Storage/Disk/DiskImage/Formats/MacintoshIMG.cpp +++ b/Storage/Disk/DiskImage/Formats/MacintoshIMG.cpp @@ -38,8 +38,8 @@ MacintoshIMG::MacintoshIMG(const std::string &file_name, FixedType type, size_t MacintoshIMG::MacintoshIMG(const std::string &file_name) : file_(file_name) { - // Test 1: is this a raw secctor dump? If so it'll start with - // either the magic word 0x4C4B (big endian) or with 0x00000 + // Test 1: is this a raw sector dump? If so it'll start with + // either the magic word 0x4C4B (big endian) or with 0x0000 // and be exactly 819,200 bytes long if double sided, or // 409,600 bytes if single sided. // diff --git a/Storage/Disk/Encodings/AppleGCR/Encoder.cpp b/Storage/Disk/Encodings/AppleGCR/Encoder.cpp index 0fa51e366..0cd6850f0 100644 --- a/Storage/Disk/Encodings/AppleGCR/Encoder.cpp +++ b/Storage/Disk/Encodings/AppleGCR/Encoder.cpp @@ -38,7 +38,7 @@ Storage::Disk::PCMSegment sync(int length, int bit_size) { // Reserve sufficient storage. segment.data.reserve(size_t(length * bit_size)); - // Write patters of 0xff padded with 0s to the selected bit size. + // Write patterns of 0xff padded with 0s to the selected bit size. while(length--) { int c = 8; while(c--)