Commit Graph

  • 1b6754c5f8 Shuffled code, realised I wasn't actually binding my shader. Thomas Harte 2016-05-01 19:22:24 -04:00
  • 69984b54e5 Fixed aspect ratio storage. Adjusted indentation slightly. Thomas Harte 2016-05-01 16:49:44 -04:00
  • 6982e945fb Fixed those issues breaking GL state, I hope. Thomas Harte 2016-05-01 16:17:52 -04:00
  • 4ec4cceb84 Made a first attempt at adding draw-as-a-quad functionality to texture targets. Thomas Harte 2016-05-01 13:52:35 -04:00
  • 2616d748fe Introduced bind-if-necessary/unbind semantics for shaders. Thomas Harte 2016-05-01 11:07:49 -04:00
  • fe2abbd4ed Minor adjustments to ensure sampling occurs as intended. Thomas Harte 2016-04-30 20:48:09 -04:00
  • 16ef09fc2b Made an attempt intelligently to use bilinear filtering to increase filtering quality with the same number of samples. Thomas Harte 2016-04-29 18:37:35 -04:00
  • 501ab74eaf Fixed time multiplier calculation. Thomas Harte 2016-04-28 22:12:59 -04:00
  • 23ea832f41 Increased brightness in television mode, added a clear if screen resolution changes. Thomas Harte 2016-04-28 22:04:47 -04:00
  • 3638414b37 Added additional comments. Thomas Harte 2016-04-28 21:55:14 -04:00
  • e6c3b148ac Switched wholeheartedly to the new shader. Thomas Harte 2016-04-28 21:45:44 -04:00
  • 8538b62ea2 Made an attempt to extract and consolidate the logic behind the intermediate shaders. Thomas Harte 2016-04-28 21:04:59 -04:00
  • ef3647f6cf Being bold: per-scan timing isn't coming back, I think, so started completely removing it. Thomas Harte 2016-04-27 23:00:43 -04:00
  • 87c778ebb7 Fixed code use of parameter name. Thomas Harte 2016-04-27 22:58:53 -04:00
  • 494ef6a324 Updated documentation, taking the opportunity to improve a parameter name. Thomas Harte 2016-04-27 22:57:40 -04:00
  • 7c20fce467 I guess NumberOfFields is done for. Thomas Harte 2016-04-27 22:48:37 -04:00
  • 8849dc3265 Finished consolidation into OutputShader. With its documentation yet to update. Thomas Harte 2016-04-27 22:41:32 -04:00
  • 496d979aca Made a decision to clean up by creating per-shader classes. Well, more or less. First thing to be factored out: the output shader. Thomas Harte 2016-04-27 22:29:54 -04:00
  • f6d58f1ce7 Played in the margins with image retention. Thomas Harte 2016-04-26 22:14:12 -04:00
  • 416c944f02 Experimental: let's try accumulating history directly in the framebuffer. Thomas Harte 2016-04-26 21:41:39 -04:00
  • 3af97d4069 Eliminated redundant variable. Thomas Harte 2016-04-26 19:57:05 -04:00
  • 345348aeb7 Merge branch 'master' of github.com:TomHarte/CLK Thomas Harte 2016-04-25 22:41:15 -04:00
  • 6c567d166a Fixed colour burst acceptance, switched to an integral single byte streaming of Atari colours. Thomas Harte 2016-04-25 20:56:15 -04:00
  • 973a53744b Switched from asterisks for footnote marks, per Markdown requirements. Thomas Harte 2016-04-25 13:09:35 -04:00
  • 3341e3550b Filled in some detail on the TV emulation. Thomas Harte 2016-04-25 13:08:22 -04:00
  • 51c1562eee Update README.md Thomas Harte 2016-04-25 10:19:51 -04:00
  • 6d769b3639 Merge pull request #1 from TomHarte/Electron Thomas Harte 2016-04-24 22:33:20 -04:00
  • 9b64f64db7 Attempted to normalise some style decisions.` Thomas Harte 2016-04-24 22:32:24 -04:00
  • 7a8d100861 Found a new working formula for NTSC Atari 2600 colours. Thomas Harte 2016-04-24 22:02:00 -04:00
  • 884755c560 Ensured the GL context is available when switching Atari 2600 output, and that it locks the output. Thomas Harte 2016-04-24 20:56:21 -04:00
  • 2bd6566768 Oh, of course, I can use GL_CONSTANT_ALPHA so that new colours can be painted at alpha 1.0 while possibly saturating with old colours. Thomas Harte 2016-04-24 20:47:24 -04:00
  • d221c712b0 Ensured GL context is active when destructing CRTOpenGL. Thomas Harte 2016-04-24 20:34:25 -04:00
  • acab22d95a Removed any improper talk of YUV. Switched to (cos, -sin) formulation of the quadrature vector, which I now believe to be correct. Thomas Harte 2016-04-24 20:27:03 -04:00
  • d393776677 Fixed an incorrect sign. Thomas Harte 2016-04-24 19:29:30 -04:00
  • db908a7547 Adjusted Atari to using its non-standard line lengths. Thomas Harte 2016-04-24 19:23:30 -04:00
  • 9b2b7a09eb Ensured that colour space changes take effect. Thomas Harte 2016-04-24 19:16:23 -04:00
  • 929cfc49cb Extended window for picking output frequency, attempted to consolidate CRT OpenGL timing uniforms for approprate resetting. Thomas Harte 2016-04-24 18:58:31 -04:00
  • 082003ed0a Reintroduced the CRT delegate and the 2600's automatic region switching. Albeit that the CRT itself doesn't adjust properly to new timings yet. Thomas Harte 2016-04-24 18:36:22 -04:00
  • 9260d97b03 Oh, of course, it's that the output vertex array doesn't get initialised unless there's an RGB shader program. Silly oversight. Fixed. And switched back to TV output for correct colours. Thomas Harte 2016-04-24 17:56:36 -04:00
  • d0f9a6c2f5 Added a dump-the-input default RGB output shader. Which at least proves that the Atari 2600 is generally still working. Thomas Harte 2016-04-24 17:35:25 -04:00
  • 775fc270e6 Fixed bug whereby first frame drawn has random collection of data. Thomas Harte 2016-04-24 07:00:22 -04:00
  • 80a3169674 Started reviving the Atari 2600 emulation. Put new startup sequence into place. Thomas Harte 2016-04-24 06:56:08 -04:00
  • bdaf4cee43 Switched to an in-framebuffer approach to phosphor decay, which might be acceptable now that every single pixel is being painted, re-emphasises luminance and stretched sampling period for the two FIR filters as well as decreasing the amount of signal that is retained, subjectively to improve output. Thomas Harte 2016-04-24 06:16:41 -04:00
  • c123f3bf74 Fixed run extension, temporarily forced colour amplitude. Thomas Harte 2016-04-23 14:16:49 -04:00
  • a4889074b8 Moved final colour space conversion out of the innermost loop. Thomas Harte 2016-04-22 21:29:27 -04:00
  • 8ff1f82008 Fixed accidental channel duplication. Thomas Harte 2016-04-22 19:18:28 -04:00
  • 95639f1189 Made attempt to introduce final filtering stage and output. Thomas Harte 2016-04-22 19:15:59 -04:00
  • 23311d633b Doubled phosphor life, added comment on required final stage fix for tomorrow. Thomas Harte 2016-04-21 23:15:48 -04:00
  • 59c07f7ddd This, at least, is an attempt to decode chrominance, as yet unfiltered, and not commuted to RGB (and possibly packed incorrectly). Thomas Harte 2016-04-21 23:01:54 -04:00
  • cc7bf97a9c This now attempts to filter y. Thomas Harte 2016-04-21 22:32:30 -04:00
  • e7ed1224a5 Introduced the second filtering stage, albeit that it presently does nothing whatsoever. Thomas Harte 2016-04-21 21:32:36 -04:00
  • ae2760e034 Colour phase is now updated and varies per line. Thomas Harte 2016-04-21 21:07:29 -04:00
  • 23ce032ba1 Started edging towards the necessary flexibility for the other two intermediate shaders. Thomas Harte 2016-04-21 20:21:34 -04:00
  • 4b9985626d Started commuting alpha to direction. The incoming amplitude is now honoured. Thomas Harte 2016-04-21 19:53:41 -04:00
  • 638b08302b The initial composite buffer is now genuinely a composite signal. Thomas Harte 2016-04-21 19:37:32 -04:00
  • 9c89b668ae Made further attempts to improve synchronisation and interrelated timing between display and machine update. Thomas Harte 2016-04-20 22:35:46 -04:00
  • d9a9dffe63 Factored out wraparound buffer addressing where it's otherwise going to get really repetitive; need to look at using the same approach for the glTexSubImage2D step at least but that probably means properly encapsulating the buffer builder's state. Thomas Harte 2016-04-20 21:05:32 -04:00
  • 8232ed765e Eliminated use of zero-alpha runs to clear new lines in the intermediate buffer in favour of a scissored glClear. It's just an easier way to scale the current approach to three intermediate buffers. Thomas Harte 2016-04-20 20:44:25 -04:00
  • e2da77fb8b Clarified constants, ensured monitor mode works from startup. Thomas Harte 2016-04-19 22:53:39 -04:00
  • ef83595af3 Fixed: issue was (i) always thinking the entire source run buffer needed to be issued; and (ii) having fixed that, always thinking that the block that needs redrawing doesn't overflow the buffer. Fixed both. 'Television' mode is now working without explicit synchronisation (and with a lot less work). Thomas Harte 2016-04-19 22:38:11 -04:00
  • 3d7a3ce995 Eliminated some redundant texture binds. Thomas Harte 2016-04-19 22:30:05 -04:00
  • 145c0b3b71 Smoothed output device changes, killing some dead state. Added an explicit glFinish to suggest that the problem is synchronisation rather than any sort of data or shader error. Thomas Harte 2016-04-19 22:21:26 -04:00
  • 7aa87723a9 Added: key states are all cleared if the window loses focus. Which resolves sticky key issues. Allowing me just to use command+option+O for options and map both command and option as FUNC. Thomas Harte 2016-04-19 21:29:10 -04:00
  • 66f2c10c04 Resolved potential crash if tape requests are made without one inserted. Softened glFinish to glFlush, though I'm still not sure I should strictly need even that. Thomas Harte 2016-04-19 21:00:48 -04:00
  • 88e237b8de Standardised indentation and added one extra piece of documentation. Thomas Harte 2016-04-19 20:53:55 -04:00
  • 20aa9e291d Attempted to deal with the precision issues causing 'television' output currently to differ from 'monitor' output. Documented TextureTarget while I'm here. Thomas Harte 2016-04-19 20:51:34 -04:00
  • 6f52ed14d6 Trivially fixed. Appears to confirm an off-by-one error in the television implementation. Which would explain one of the visual phenomena — a repeating corrupted line. Thomas Harte 2016-04-19 19:32:52 -04:00
  • b90a487a16 Attempted to enable both monitor and television output paths in the same codebase. The television route seems to be broken. Investigation required. Thomas Harte 2016-04-19 19:30:50 -04:00
  • 6c9bcfa637 Got rigorous on exceptions, started working towards having a working 'composite' shader at the same time as having a working RGB shader. Thomas Harte 2016-04-19 08:05:43 -04:00
  • bcc784bda9 Introduced an interface for specifying attribute bindings, taking the opportunity to document the interface and introduce exceptions. Thomas Harte 2016-04-19 07:23:15 -04:00
  • 9d39c14752 Nothing of substance different; main current mystery: why do old frames recur and why does other jumpiness occur? Do I need some explicit synchronistion? Thomas Harte 2016-04-18 22:18:03 -04:00
  • cf55a0c423 Fixed: composite output y is now incremented upon the start of retrace, that causing it to have different values at either edge of scans. Thomas Harte 2016-04-18 21:49:45 -04:00
  • 9580dde3ad Fixed left/right shuffling. Was simply failing to supply the integer version of coordinates. Thomas Harte 2016-04-18 21:40:23 -04:00
  • d5bac2f04f Spotted error was in texture target all along. This now gets as far as showing something a lot like the correct display, but precision is way off. Way off. Thomas Harte 2016-04-18 21:32:48 -04:00
  • 86626bbd72 Switched key that maps to FUNC from command to option. Logic is that command may frequently be used for performing an action which changes the key window, in which case we won't realise if it is released. Thomas Harte 2016-04-18 19:20:26 -04:00
  • f89308e913 Set the 'options' windows to hide on application deactivation so that they don't cluelessly sit on top of the rest of the system. Thomas Harte 2016-04-18 19:14:58 -04:00
  • bf29c8e2bf Fixed mismatch in television/monitor selection, ticked view for drawing concurrently, since it can, removed stray space. Thomas Harte 2016-04-18 19:01:15 -04:00
  • 3d53f157de Output selection now takes effect. So I can stop accidentally committing changes back and forth. Thomas Harte 2016-04-18 08:27:58 -04:00
  • 94f148e212 Wired in options, at least getting as far as the Objective-C bridge. Then fast loading makes it to the emulated machine, display output type doesn't. Thomas Harte 2016-04-18 08:21:00 -04:00
  • 6158275ea7 Started adding an options panel. Thomas Harte 2016-04-17 21:43:39 -04:00
  • 5980f5e991 Number of taps can be specified explicitly if you desire. Thomas Harte 2016-04-17 20:45:57 -04:00
  • 499f7ace07 Re-enabled working video output for the Electron for the day and consolidated the rough metric I'm using to pick a number of taps for the audio filter. Thomas Harte 2016-04-17 20:43:20 -04:00
  • 9ede284eb6 Added blanking source runs, ensuring the rolling buffer is appropriately cleared. Thomas Harte 2016-04-17 20:34:52 -04:00
  • 43cae267f9 Shuffled further in an attempt to get as far as having static but incorrectly-interpreted pixel data on screen. It's not currently static. So work to do. Thomas Harte 2016-04-17 18:08:05 -04:00
  • a8fbd82a3d Made an attempt at correctly mapping to eye coordinates. Thomas Harte 2016-04-17 17:21:24 -04:00
  • ece51917fa Added first attempt at performing the first step of television output: mapping from source data to the first of the processing buffers. It's immediately obvious that my eye coordinates are off. Thomas Harte 2016-04-17 17:17:59 -04:00
  • abce0ed3c4 Added setup of the source vertex array. Thomas Harte 2016-04-17 16:17:23 -04:00
  • 6ff9ffba6c Switching temporarily to an attempt to draw input runs as if RGB: shader compiles, fixed a race condition on out-of-bounds accesses for the source buffer. Thomas Harte 2016-04-17 15:51:28 -04:00
  • 104f44f27f Attempted to improve deinterlacing, gave the CRT full control over blend mode, switched back to 2000000Mhz audio. Thomas Harte 2016-04-14 22:20:47 -04:00
  • 323f1a24db Introduced blackout period solution to vertical sync confusing horizontal sync. Need to find out whether it's accurate. Thomas Harte 2016-04-14 20:30:45 -04:00
  • 6a17c2992d Introduced a compile-time configurable audio divider, set it arbitrarily to '8' for now. Discovered why my graphics aren't centred and added a TODO. Thomas Harte 2016-04-13 22:31:59 -04:00
  • 026ce0255f Source runs are now captured, and that buffer appropriately reset. Thomas Harte 2016-04-13 22:20:13 -04:00
  • 2ea02ed127 A source array buffer is also now created, mapped, unmapped, etc. Thomas Harte 2016-04-13 22:14:18 -04:00
  • 955e185790 Minor simplification. Thomas Harte 2016-04-13 19:19:04 -04:00
  • 04d1b65c93 Reinstated texture target creation, cut them down to merely RGB. Thomas Harte 2016-04-12 22:48:47 -04:00
  • 4be8053ba9 Updated documentation. Thomas Harte 2016-04-12 22:38:49 -04:00
  • 4d889d9c7f Made an attempt slightly to simplify the fragment processor, at both ends. Thomas Harte 2016-04-12 22:35:11 -04:00
  • fe8b0ebc7e Tidied up a little, mostly bumping things out of just-in-time creation that I can just do well in advance. Thomas Harte 2016-04-12 22:31:13 -04:00
  • 069ec2e889 In search of the cause of performance issues again, excised the per-pixel sin until it can be further evaluated. Thomas Harte 2016-04-11 23:13:54 -04:00
  • d100c755b7 The final line runs on a diagonal. Leave room for that. Thomas Harte 2016-04-11 23:13:14 -04:00