diff --git a/Machines/Atari2600/Atari2600.cpp b/Machines/Atari2600/Atari2600.cpp index 4ca0ee466..8f33622f6 100644 --- a/Machines/Atari2600/Atari2600.cpp +++ b/Machines/Atari2600/Atari2600.cpp @@ -33,6 +33,7 @@ Machine::Machine() : "float aOffset = 6.283185308 * (c.y - 3.0 / 16.0) * 1.14285714285714;\n" "return y + step(0.03125, c.y) * 0.1 * cos(phase - aOffset);\n" "}"); + _crt->set_output_device(Outputs::CRT::Television); memset(_collisions, 0xff, sizeof(_collisions)); set_reset_line(true); } diff --git a/Machines/Electron/Electron.cpp b/Machines/Electron/Electron.cpp index 3f0c1eb6b..5f791a349 100644 --- a/Machines/Electron/Electron.cpp +++ b/Machines/Electron/Electron.cpp @@ -40,6 +40,7 @@ Machine::Machine() : "float texValue = texture(texID, coordinate).r;" "return vec3(step(4.0/256.0, mod(texValue, 8.0/256.0)), step(2.0/256.0, mod(texValue, 4.0/256.0)), step(1.0/256.0, mod(texValue, 2.0/256.0)));" "}"); + _crt->set_output_device(Outputs::CRT::Monitor); // _crt->set_visible_area(Outputs::Rect(0.23108f, 0.0f, 0.8125f, 0.98f)); //1875 memset(_key_states, 0, sizeof(_key_states)); diff --git a/Outputs/CRT/CRT.cpp b/Outputs/CRT/CRT.cpp index cfd1a4720..88777530d 100644 --- a/Outputs/CRT/CRT.cpp +++ b/Outputs/CRT/CRT.cpp @@ -68,7 +68,7 @@ void CRT::allocate_buffers(unsigned int number, va_list sizes) { _run_builders[builder] = new CRTRunBuilder(kCRTOutputVertexSize); } - _composite_src_runs = std::unique_ptr(new CRTRunBuilder(23)); + _composite_src_runs = std::unique_ptr(new CRTRunBuilder(kCRTInputVertexSize)); va_list va; va_copy(va, sizes); diff --git a/Outputs/CRT/CRTOpenGL.hpp b/Outputs/CRT/CRTOpenGL.hpp index 6fd3e516c..23ffc4f0c 100644 --- a/Outputs/CRT/CRTOpenGL.hpp +++ b/Outputs/CRT/CRTOpenGL.hpp @@ -22,8 +22,10 @@ const size_t kCRTOutputVertexSize = 16; // remapping occurs to ensure a continous stream of data for each scan, giving correct out-of-bounds behaviour const size_t kCRTInputVertexOffsetOfInputPosition = 0; const size_t kCRTInputVertexOffsetOfOutputPosition = 4; +const size_t kCRTInputVertexOffsetOfPhaseAndAmplitude = 8; +const size_t kCRTInputVertexOffsetOfPhaseAge = 12; -const size_t kCRTInputVertexSize = 8; +const size_t kCRTInputVertexSize = 16; // These constants hold the size of the rolling buffer to which the CPU writes const int CRTInputBufferBuilderWidth = 2048;