1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-07-06 01:28:57 +00:00

Corrected some constants, ensured both machines (so far) are setting the output device.

This commit is contained in:
Thomas Harte 2016-03-05 16:19:10 -05:00
parent 41c09f8c3f
commit 5c8db71c64
4 changed files with 6 additions and 2 deletions

View File

@ -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);
}

View File

@ -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));

View File

@ -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<CRTRunBuilder>(new CRTRunBuilder(23));
_composite_src_runs = std::unique_ptr<CRTRunBuilder>(new CRTRunBuilder(kCRTInputVertexSize));
va_list va;
va_copy(va, sizes);

View File

@ -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;