From 3449120c24f97f56c30da3d37ec5319fb7bfd764 Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Sat, 27 Feb 2016 22:51:37 -0500 Subject: [PATCH] Added a note to future self, put the scan edge generator back to the way round it was before. --- Outputs/CRT/CRT.cpp | 6 ++++++ Outputs/CRT/CRTOpenGL.cpp | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/Outputs/CRT/CRT.cpp b/Outputs/CRT/CRT.cpp index 3ed7727e3..4e96929a5 100644 --- a/Outputs/CRT/CRT.cpp +++ b/Outputs/CRT/CRT.cpp @@ -158,6 +158,12 @@ void CRT::advance_cycles(unsigned int number_of_cycles, unsigned int source_divi #define lateral(v) next_run[kCRTSizeOfVertex*v + kCRTVertexOffsetOfLateral] #define timestamp(v) (*(uint32_t *)&next_run[kCRTSizeOfVertex*v + kCRTVertexOffsetOfTimestamp]) + // Vertex output is arranged as: + // + // [0/4] 3 + // + // 1 [2/5] + if(next_run) { // set the type, initial raster position and type of this run diff --git a/Outputs/CRT/CRTOpenGL.cpp b/Outputs/CRT/CRTOpenGL.cpp index 324f3c0a6..89513778d 100644 --- a/Outputs/CRT/CRTOpenGL.cpp +++ b/Outputs/CRT/CRTOpenGL.cpp @@ -375,7 +375,7 @@ void CRT::prepare_shader() glUniform2f(positionConversionUniform, _horizontal_flywheel->get_scan_period(), _vertical_flywheel->get_scan_period() / (unsigned int)_vertical_flywheel_output_divider); float scan_angle = atan2f(1.0f / (float)_height_of_display, 1.0f); - float scan_normal[] = { sinf(scan_angle), -cosf(scan_angle)}; + float scan_normal[] = { sinf(scan_angle), cosf(scan_angle)}; float multiplier = (float)_horizontal_flywheel->get_standard_period() / ((float)_height_of_display * (float)_horizontal_flywheel->get_scan_period()); scan_normal[0] *= multiplier; scan_normal[1] *= multiplier;