1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-07-05 10:28:58 +00:00
Commit Graph

422 Commits

Author SHA1 Message Date
Thomas Harte
4211389ac7 Connected machine-supplied colour burst amplitude to shader, discarding hard-coded value. Net effect: the colour component is now discarded for the ZX80 and 81. 2017-07-06 21:29:08 -04:00
Thomas Harte
c6d00ec7d1 Switched phase and amplitude varying to a 3d vector; the third component is 1/amplitude if amplitude is non-zero, and zero otherwise. So you can multiply by that to get chrominance, rather than dividing by amplitude. With the direct effect that detected chrominance should automatically be zero if the colour burst didn't exist (i.e. had zero amplitude). 2017-07-06 21:25:38 -04:00
Thomas Harte
a5075d9eb5 Formalised the reasoning behind the colour phase fix-up and made it an opt-in per-caller value. Only the Oric currently needs to opt in. 2017-05-16 20:31:39 -04:00
Thomas Harte
c2b5a9bb1f Minor fix: given that phase is now a function of position, stop nudging position. 2017-05-13 21:50:48 -04:00
Thomas Harte
b14c892740 Switched to a safer RAII approach to this lock. 2017-05-10 21:29:39 -04:00
Thomas Harte
e01f3f06c8 Completed curly bracket movement. 2017-03-26 14:34:47 -04:00
Thomas Harte
e63229a5e5 Pulled vertical sync detection entirely outside the loop, and gave it greater perspective. 2017-03-06 19:15:33 -05:00
Thomas Harte
ad73379d1c Took vertical sync detection logic entirely out of the loop. 2017-03-05 20:17:55 -05:00
Thomas Harte
4751615623 Fixed NTSC colour cycle count, and hence the 2600's reported line lengths and phase offset. 2017-03-04 17:31:39 -05:00
Thomas Harte
a3fcd15980 Loosened sync charge level requirement. 2017-03-01 22:16:56 -05:00
Thomas Harte
026b418b4a Ensured filtered 1:1 audio resampling is applied. 2017-02-28 21:27:38 -05:00
Thomas Harte
d19f26887d Performed a very naive shuffling of output builder sets onto the OpenGL queue. Which makes the frequency switcher work properly from it's possibly-contextless thread. 2017-02-20 10:39:31 -05:00
Thomas Harte
6cb95b4fc5 Switched to passing around std::strings rather than char *s, because they should be easier to capture. 2017-02-20 10:35:33 -05:00
Thomas Harte
d979a822ac Introduced a deferred task list for the OpenGL thread. 2017-02-19 21:46:07 -05:00
Thomas Harte
fccdce65b9 Switched to lock guards. 2017-02-19 21:45:28 -05:00
Thomas Harte
97cdfea9e9 Resolved spurious static analyser complaint: input_size and output_size aren't supposed to have defined values if input or output is null. But whatever. 2017-02-11 13:36:09 -05:00
Thomas Harte
fcf8cafb5d Sought to ensure that communicating a colour burst in multiple parts doesn't ruin the phase. 2017-02-06 18:27:44 -05:00
Thomas Harte
23f3ccd77a Made a further attempt to prevent overwrites. 2017-02-05 17:47:34 -05:00
Thomas Harte
ebde955356 This needs to be a memmove as the areas may overlap. 2017-01-29 16:12:48 -05:00
Thomas Harte
7fd02e7f4c Added an extra flag to avoid potential race condition on is_full_, being reset from the background despite a write area not having been allocated. 2017-01-29 16:11:29 -05:00
Thomas Harte
c2d7e36c8f Ensured logic for whether composite output is in use is consistent. 2017-01-25 21:25:03 -05:00
Thomas Harte
4d6e78e641 Reinstated temporary Oric-related fix. 2017-01-24 22:16:15 -05:00
Thomas Harte
5761c8267b [Re-]Eliminated connection between colour subcarrier frequency and monitor output mode. 2017-01-24 20:48:54 -05:00
Thomas Harte
b4159295f6 Switched to using quads for intermediate draws. The specific concern is the flexibility offered in the GL spec as to line drawing algorithms. And even if a driver implements exactly to spec then it should omit the final pixel. 2017-01-11 21:18:41 -05:00
Thomas Harte
d0a93409e6 Made an attempt to simplify in-shader phase calculation, now that output position is a direct multiple of phase. 2017-01-11 08:18:00 -05:00
Thomas Harte
4c3669f210 Reduced precision of input phase, but I'm not necessarily persuaded by it as a move. However it's clear that something is off in that whole area. But if phase is locked by output position, do I need to retain this level of complexity? Also ensured that intermediate buffers prior to the final are sampled using the nearest sampling mode, also to reduce precision errors. 2017-01-10 22:08:07 -05:00
Thomas Harte
eeb646868b Switched off filtering, at least temporarily, to try to ensure that sampling is all where it should be. 2017-01-08 19:53:08 -05:00
Thomas Harte
3d789732a2 Switched back to full buffer clearing. Until I can figure out the source of noise. 2017-01-08 19:50:31 -05:00
Thomas Harte
d2a7d39749 Ensured the output lock isn't held while talking to the delegate. 2017-01-08 19:49:21 -05:00
Thomas Harte
9521718120 Colour phase is multiplied by 255, not 256. 2017-01-08 17:21:26 -05:00
Thomas Harte
28909e33ca Eliminated phaseCyclesPerTick as implied. 2017-01-08 16:48:02 -05:00
Thomas Harte
79632b1d34 Instituted de-escalating phase-related extensions, definitively to kill rounding error edges. 2017-01-08 16:24:22 -05:00
Thomas Harte
7ad64ff16b Made further efforts to support throughput via memory barrier. 2017-01-08 14:47:16 -05:00
Thomas Harte
be48c950b4 Started taking steps towards using a texture barrier where possible to reduce all of my framebuffer binds. Some output appears, but it's not correct. 2017-01-08 11:13:20 -05:00
Thomas Harte
0487b8c178 Definitively eliminated the additional y filtering step; if I'm going to work to ensure always four samples per colour cycle, I can put the channel separation coefficients directly into their shaders, cutting down on samples. 2017-01-07 16:02:33 -05:00
Thomas Harte
5740015f56 Temporarily disabled composite processing to show the pure stream. Fixed both automatic calculations of phase — per line and, at input, per pixel. 2017-01-07 12:38:00 -05:00
Thomas Harte
c84004bfa3 Fixed: colour_cycle_numerator_ doesn't need to be multiplied by the time multiplier because it'll get that for free from the calculation of next_run_length. 2017-01-06 21:36:19 -05:00
Thomas Harte
c746a3711f Temporarily disabled my attempt to be clever with bilinear filtering when applying a lowpass filter. Will need to investigate. 2017-01-04 08:06:18 -05:00
Thomas Harte
aa7774a9a6 Experimental: up the chroma accuracy, just let the luma go straight through. Subject to figuring out how I'm still losing so much precision. 2017-01-03 22:41:34 -05:00
Thomas Harte
a836120945 Restored proper colour separation, but somewhere a massive hit in horizontal resolution is happening — much greater than one would expect from the sample size picked. So investigation to come. 2017-01-03 22:32:07 -05:00
Thomas Harte
7d60df9075 Added the option for both intermediate and output shaders to use only a portion of the input/output texture; made an attempt to pick an appropriate proportion in order to align signal sampling with the colour subcarrier. 2017-01-03 22:16:52 -05:00
Thomas Harte
f2b8b26bc4 Started throwing some comments into my shaders. 2017-01-03 21:16:38 -05:00
Thomas Harte
34d213dec4 Decreased Y resolution, again also hopefully temporarily. 2016-12-10 15:35:38 -05:00
Thomas Harte
81a102d951 Upped intermediate buffer size, at least temporarily, while I look for the source of the interference patterns I'm seeing. 2016-12-10 15:20:10 -05:00
Thomas Harte
0e71802b92 Reduced Oric video to single nibble constants. Removed attempt at asynchronous flush as no longer required. 2016-12-10 14:17:46 -05:00
Thomas Harte
a549fd1ecc Introduced the ability simply to piggy-back off the CRT's natural phase for the colour burst, thereby eliminating a couple of redundant independent attempts in the Oric and Electron. 2016-12-10 13:42:34 -05:00
Thomas Harte
5216dda675 Added some brief extra exposition to the texture builder, cut all internal tex_x/y and source_divider stuff from the CRT. 2016-12-06 19:08:55 -05:00
Thomas Harte
33d52bb573 Ensured no over-moving. 2016-12-06 19:02:18 -05:00
Thomas Harte
4ff33254e1 Sought to shift locking back up to the CRT. And to be a bit more RAII-ish. 2016-12-06 18:48:30 -05:00
Thomas Harte
60f9ddfde8 Fixed start test and added incrementation of start locations. 2016-12-06 08:08:57 -05:00