mirror of
https://github.com/TomHarte/CLK.git
synced 2024-11-25 16:31:42 +00:00
Fix typos
This commit is contained in:
parent
def1f90d86
commit
5ef6b190af
@ -280,7 +280,7 @@ template <class BusHandler, bool is_iie> class Video: public VideoBase {
|
|||||||
|
|
||||||
if(is_vertical_sync_line) {
|
if(is_vertical_sync_line) {
|
||||||
// In effect apply an XOR to HSYNC and VSYNC flags in order to include equalising
|
// 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_start = std::max(first_sync_column - sync_length, column_);
|
||||||
const int blank_end = std::min(first_sync_column, ending_column);
|
const int blank_end = std::min(first_sync_column, ending_column);
|
||||||
if(blank_end > blank_start) {
|
if(blank_end > blank_start) {
|
||||||
|
@ -36,7 +36,7 @@
|
|||||||
.b = 0.5 + 0.5 * chrominance * sin(phase)
|
.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
|
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.
|
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,
|
[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]
|
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:
|
that has sought to separate luminance and chrominance, and with phase and amplitude now baked into the latter:
|
||||||
|
|
||||||
.r = luminance
|
.r = luminance
|
||||||
@ -220,7 +220,7 @@ using BufferingScanTarget = Outputs::Display::BufferingScanTarget;
|
|||||||
|
|
||||||
// Textures: the stencil.
|
// 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
|
// 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.
|
// 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.
|
/// from which lines are painted to the frame buffer.
|
||||||
CompositeColour
|
CompositeColour
|
||||||
|
|
||||||
// TODO: decide what to do for downard-scaled direct-to-display. Obvious options are to include lowpass
|
// TODO: decide what to do for downward-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
|
// 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
|
// to stick with DirectToDisplay but with a minimum size for the frame buffer and apply filtering from
|
||||||
// there to the screen.
|
// there to the screen.
|
||||||
};
|
};
|
||||||
@ -448,7 +448,7 @@ using BufferingScanTarget = Outputs::Display::BufferingScanTarget;
|
|||||||
[self copyTexture:_oldFrameBuffer to:_frameBuffer];
|
[self copyTexture:_oldFrameBuffer to:_frameBuffer];
|
||||||
} else {
|
} else {
|
||||||
// TODO: this use of clearTexture is the only reasn _frameBuffer has a marked usage of MTLTextureUsageShaderWrite;
|
// 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?
|
// its storage further?
|
||||||
[self clearTexture:_frameBuffer];
|
[self clearTexture:_frameBuffer];
|
||||||
}
|
}
|
||||||
|
@ -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.
|
// 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?
|
// 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_;
|
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_);
|
end_point.cycles_since_end_of_horizontal_retrace = uint16_t(cycles_since_horizontal_sync_ / time_multiplier_);
|
||||||
|
|
||||||
return end_point;
|
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.number_of_cycles = number_of_cycles;
|
||||||
scan.phase = phase;
|
scan.phase = phase;
|
||||||
scan.amplitude = amplitude >> 1;
|
scan.amplitude = amplitude >> 1;
|
||||||
is_alernate_line_ = is_alternate_line;
|
is_alternate_line_ = is_alternate_line;
|
||||||
output_scan(&scan);
|
output_scan(&scan);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -60,7 +60,7 @@ class CRT {
|
|||||||
int64_t phase_denominator_ = 1;
|
int64_t phase_denominator_ = 1;
|
||||||
int64_t phase_numerator_ = 0;
|
int64_t phase_numerator_ = 0;
|
||||||
int64_t colour_cycle_numerator_ = 1;
|
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);
|
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);
|
Flywheel::SyncEvent get_next_vertical_sync_event(bool vsync_is_requested, int cycles_to_run_for, int *cycles_advanced);
|
||||||
|
@ -457,7 +457,7 @@ std::unique_ptr<Shader> ScanTarget::conversion_shader() const {
|
|||||||
");"
|
");"
|
||||||
"float luminance = dot(samples, vec4(0.15, 0.35, 0.35, 0.25));"
|
"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]("
|
"vec2 chrominances[4] = vec2[4]("
|
||||||
"textureLod(qamTextureName, qamTextureCoordinates[0], 0).gb,"
|
"textureLod(qamTextureName, qamTextureCoordinates[0], 0).gb,"
|
||||||
"textureLod(qamTextureName, qamTextureCoordinates[1], 0).gb,"
|
"textureLod(qamTextureName, qamTextureCoordinates[1], 0).gb,"
|
||||||
|
@ -38,8 +38,8 @@ MacintoshIMG::MacintoshIMG(const std::string &file_name, FixedType type, size_t
|
|||||||
MacintoshIMG::MacintoshIMG(const std::string &file_name) :
|
MacintoshIMG::MacintoshIMG(const std::string &file_name) :
|
||||||
file_(file_name) {
|
file_(file_name) {
|
||||||
|
|
||||||
// Test 1: is this a raw secctor dump? If so it'll start with
|
// Test 1: is this a raw sector dump? If so it'll start with
|
||||||
// either the magic word 0x4C4B (big endian) or with 0x00000
|
// either the magic word 0x4C4B (big endian) or with 0x0000
|
||||||
// and be exactly 819,200 bytes long if double sided, or
|
// and be exactly 819,200 bytes long if double sided, or
|
||||||
// 409,600 bytes if single sided.
|
// 409,600 bytes if single sided.
|
||||||
//
|
//
|
||||||
|
@ -38,7 +38,7 @@ Storage::Disk::PCMSegment sync(int length, int bit_size) {
|
|||||||
// Reserve sufficient storage.
|
// Reserve sufficient storage.
|
||||||
segment.data.reserve(size_t(length * bit_size));
|
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--) {
|
while(length--) {
|
||||||
int c = 8;
|
int c = 8;
|
||||||
while(c--)
|
while(c--)
|
||||||
|
Loading…
Reference in New Issue
Block a user