Commit Graph

  • ec3cccbb0d Working towards HQ UEF support: fixed bug whereby writing to tape output would reset input pulse stepper; added support for chunk 0116 and approximate support for 0113. Thomas Harte 2016-02-20 22:03:14 -05:00
  • 3754cf4bce Played about with interrupt timing. Thomas Harte 2016-02-20 21:24:02 -05:00
  • 574985f9a2 Fixed interlaced timing; switched to a more robust detector for horizontal sync; eliminated some test logging. Thomas Harte 2016-02-20 20:29:40 -05:00
  • 00f414d757 Made an attempt to reintroduce interlacing and screen modes with gaps. Something's wrong with synchronisation though, so most likely I'm outputting a bad signal. Thomas Harte 2016-02-20 17:32:51 -05:00
  • 68992a62f9 Switched to a subtler to out-of-band syncs. Thomas Harte 2016-02-20 00:16:07 -05:00
  • da361be3ee This might be more accurate? Probably not. Who knows? Thomas Harte 2016-02-20 00:13:43 -05:00
  • 518c134348 Blank lines are missing (if the double negative can be forgiven) but the framebuffer is otherwise seemingly working well again. Thomas Harte 2016-02-20 00:11:23 -05:00
  • a3432120f3 Fixed synchronisation — my two fields weren't of equal length, I wasn't breaking calls to the CRT upon 40/80 transitions, I had the wrong maximum run length. Now I just need to put real pixels back in. Thomas Harte 2016-02-19 23:57:57 -05:00
  • 1954f7bcbd Got back to a stable image, at least when staying in a mode. Which is what I was trying to fix. Hmmm. Thomas Harte 2016-02-19 23:41:09 -05:00
  • dce1649fc5 Commuted some camelCase variables into more standard C++ underscore names; decided the best fix for the graphics output is to break it down into much simpler chunks. output_pixels is currently a placeholder that simply outputs blank so the current effect is that all data is missing but it should be easy enough now to put pixels back in. Thomas Harte 2016-02-18 23:23:49 -05:00
  • 570d88a876 Added a simple metric for measuring surprise. Which will hopefully allow me to reimplement PAL/NTSC auto-selection for the Atari 2600. Thomas Harte 2016-02-18 23:22:06 -05:00
  • c7f54d649e Switched back down to two samples per pixel. Though one might do it. Need to investigate. Thomas Harte 2016-02-18 23:21:25 -05:00
  • ce3c098c28 Widened beam a little, moved to a linear approximation of age across scans, cut number of stored frames. Thomas Harte 2016-02-16 21:48:09 -05:00
  • 3ea0d04a1a -dealloc now blocks until all audio queue buffers are no longer playing. Thomas Harte 2016-02-16 21:47:23 -05:00
  • b261e86c62 Reintroduced lateral as a parameter in CRT drawing, to simulate a rounded raster. Thomas Harte 2016-02-16 20:37:04 -05:00
  • 0b5417ab44 Made an attempt to put interrupts in the correct places regardless of even/odd field. Thomas Harte 2016-02-16 20:36:19 -05:00
  • bbffbb5dc2 Resolved deadlock if an invalidate call was sent to the Electron while it was in the middle of an update. Thomas Harte 2016-02-16 20:35:45 -05:00
  • a01f90ff3e Attempted a switch to the real PAL visible area and to something a bit like a real phosphor decay. Thomas Harte 2016-02-14 21:57:23 -05:00
  • 7580d192d5 Fixes: now setting correct frame time estimate, properly enabling the timestamp attribute, and ensuring that the Electron flushes screen work at least once per host frame update. Thomas Harte 2016-02-14 19:28:02 -05:00
  • 752db78431 No doubt still imperfect but killed the repeated whole texture uploads. Thomas Harte 2016-02-13 23:55:02 -05:00
  • 697e50c0cc Screen output is back, no matter how inefficiently. Thomas Harte 2016-02-13 23:50:18 -05:00
  • d0b2d840da A minor fix to data queuing. Display still absent. Thomas Harte 2016-02-13 20:57:41 -05:00
  • 7bd237193d Edged closer towards realistic timing. Thomas Harte 2016-02-13 20:52:35 -05:00
  • eeb0e134fd Started the transition towards a more natural collection of rolling buffers, with phosphor decay in mind. Thomas Harte 2016-02-13 20:52:23 -05:00
  • f57d6d350b Fixed uninitialised error and incorrect default constructor. Thomas Harte 2016-02-12 22:35:16 -05:00
  • fd2d5c78f8 Started trying to nudge towards the multistage approach to video decoding. Thomas Harte 2016-02-12 22:31:05 -05:00
  • 7bc5a43c36 Fixed type warning. Thomas Harte 2016-02-12 22:30:22 -05:00
  • 0527888b15 Endeavoured to ensure safe shutdown. Thomas Harte 2016-02-12 22:30:06 -05:00
  • 0a09762be6 Fixed output precision compared to the new approach of trusting the flywheel for position, and eliminated fixed-Acorn constants. Also re-enabled the faded previous frame, at least temporarily. Thomas Harte 2016-02-12 19:53:49 -05:00
  • 341fafd3c5 Adjusted visible area. Thomas Harte 2016-02-12 19:52:04 -05:00
  • 1d20a29d97 Made an attempt to switch to the flywheels for both vertical and horizontal sync, and to act more appropriately for out-of-bounds sync requests. Lots of tweaking to do, I fear. Thomas Harte 2016-02-11 23:43:08 -05:00
  • c81891ec43 Minor tidying and at least acknowledged the new flywheel encapsulation. Thomas Harte 2016-02-11 22:13:38 -05:00
  • 86017de1fb Fixed field timing. It's 312.5 lines now, closer to the PAL standard. Thomas Harte 2016-02-11 22:12:37 -05:00
  • a6574d1f96 Made an attempt to factor out and more clearly to document my implementation of flywheel synchronisation. Thomas Harte 2016-02-11 22:12:12 -05:00
  • c66409421e Switched to generating an interlaced output, that apparently being correct. Enabled a poor man's version of phosphor persistence to smooth things out a little. It's not completely unconvincing. Thomas Harte 2016-02-10 23:11:25 -05:00
  • b5bcadb8d3 Reinstated clipped CRT output, with more appropriate ownership of the decision. Thomas Harte 2016-02-07 22:18:55 -05:00
  • 3a689d14cc Added padding of supplied data to correct for any potential rounding errors when rendering. Thomas Harte 2016-02-07 20:29:32 -05:00
  • 3a9ea66f8b Filled in shader class. Thomas Harte 2016-02-07 19:21:22 -05:00
  • 4d0a218a57 Certainly at least seriously considering a separate holder for the "compile a shader" logic. Otherwise taking steps back towards PAL/NTSC decoding. Thomas Harte 2016-02-07 17:32:38 -05:00
  • 602327cd9d Sketched out a quick class for rendering to texture. Thomas Harte 2016-02-07 15:42:02 -05:00
  • 2e3ba6bbb2 Removed some logging. Thomas Harte 2016-02-07 14:42:40 -05:00
  • 2cb12a7513 Allowed overly aggressive allocations to be cleared up after the fact. thomasharte 2016-02-06 16:07:23 -05:00
  • d3d505b7bc That's one header file less. Thomas Harte 2016-02-05 23:05:58 -05:00
  • bf348ccb96 Fixed clearing logic. Thomas Harte 2016-02-05 22:47:12 -05:00
  • 6ab425deda There is now a semi-reasonable amount of screen output again. Thomas Harte 2016-02-05 21:35:39 -05:00
  • 80e7e5e602 Updated to return old behaviour of drawing only upon changes. Thomas Harte 2016-02-04 23:05:47 -05:00
  • 8bc3f8046d This endeavours to move everything into the CRT class except the final version of shader building. Thomas Harte 2016-02-04 22:57:46 -05:00
  • e0d51408e4 Onward with carrying this through to the bitter end, this at least results in all the appropriate knowledge and call-ins occuring at the CRT. Thomas Harte 2016-02-04 22:28:50 -05:00
  • 09e11469c3 Simplified further: eliminated delegate. Which means I can go frame-free internally to the CRT at some point, if I want. Thomas Harte 2016-02-03 19:11:18 -05:00
  • 19393390ac It's broken now, but this is what I now intend the full public interface of the CRT to be. Thomas Harte 2016-02-02 22:41:33 -05:00
  • 4554abb755 Made an attempt to be more rigorous in display generation on the Electron, to make sure I deal with mid-line changes to/from blank line mode. Even if it turns out that they generate pixels. Thomas Harte 2016-01-29 21:14:13 -05:00
  • adc6838ba0 Continued slow migration of shader ownership to CRT. Attempted to start debugging the tape interface. Thomas Harte 2016-01-27 21:35:57 -05:00
  • 96c946b8af Made a very basic attempt to emulate tape output. Thomas Harte 2016-01-24 18:20:55 -05:00
  • 1819e7b9cc Started sketching out an appropriate interface to transfer responsibility for shaders to the CRT. Thomas Harte 2016-01-23 19:06:32 -05:00
  • ace331d4b4 Got a bit higher level in CRT timing specification. Which internally allows it now to infer the colour clock frequency. Which will be helpful momentarily. Thomas Harte 2016-01-23 18:53:20 -05:00
  • a9e26d7808 Introduced a scan's delay, as intended. Thomas Harte 2016-01-23 17:49:25 -05:00
  • cd97617a8a Bumped the speaker up to the full namespace, since Tape lives there to avoid delegation complexity. Turned the CRT into something the Electron statically owns, fixing a memory leak by simplifying. Thomas Harte 2016-01-23 17:45:06 -05:00
  • 20cab08f8f Added a two-slot buffer of scans and a comon dispatch mechanism. Thomas Harte 2016-01-23 17:44:34 -05:00
  • f4cd0aa38e Ensured that all relevant information is given to the tape class. Made an attempt not to write to a screen output buffer if we don't have one. Added some debug printing. Thomas Harte 2016-01-23 13:09:56 -05:00
  • 949c33774a Fixed failure to set a delegate, slowed tape speed if operating in RAM. Thomas Harte 2016-01-23 11:42:14 -05:00
  • 43a7d1b7ae It'll be helpful to be able to isolate the tape interface when I'm faking a fast load. So factored out. Thomas Harte 2016-01-23 00:14:44 -05:00
  • 0efe4b312c Disabled my various bits of rate interchange debugging; improved test for when to call update_display due to a RAM write. Thomas Harte 2016-01-21 22:16:52 -05:00
  • 82cb1c365c Further simplified inner loops. Thomas Harte 2016-01-21 21:35:04 -05:00
  • 34640cec93 Started trying to move some logic out of the inner loop. Thomas Harte 2016-01-21 21:28:09 -05:00
  • 48ddd3c497 Set about documenting the CRT; while doing so decided to add an optional clock divider for input; having done so decided to try to exploit it with the Electron. Thomas Harte 2016-01-21 21:17:47 -05:00
  • baef1ccd57 Made the constructor protected, to emphasise that this class isn't for instantiation. Also added extra comments aplenty. Thomas Harte 2016-01-21 08:39:34 -05:00
  • 9fa35dd559 Killed some whitespace lines. Thomas Harte 2016-01-20 21:58:34 -05:00
  • de7218cdf0 Added a lot of commenting to the CPU6502 definition, simplifying its construction. Added missing nullability modifier to CSElectron. Fixed bad-habit Objective-C style naming on the Electron's Interrupt enum. Thomas Harte 2016-01-20 21:55:38 -05:00
  • 4c16d34063 Moved set_tape so that the inline definition of get_next_tape_pulse is visible to it. Also eliminated some dead typedefs. Thomas Harte 2016-01-20 08:27:25 -05:00
  • f727582911 Started making first moves towards stripping CSCathodeRayView of its responsibilities. If that can be merely an OpenGL view that presents things, things will be a lot more portable. Thomas Harte 2016-01-20 08:21:33 -05:00
  • 280a2292ff Shushed. Thomas Harte 2016-01-19 23:33:15 -05:00
  • 9036cf3b7c Thus did the first UEF load. Thomas Harte 2016-01-19 23:03:27 -05:00
  • e65cd4cf06 Some data is marginally reaching the CPU from the tape. Thomas Harte 2016-01-19 22:05:34 -05:00
  • 832797182f Update TapeUEF.cpp Thomas Harte 2016-01-19 18:59:10 -05:00
  • 956b90e203 Attempted further to improve latency; added view adjustment for non-4:3 output aspect ratios. The 4:3 is currently hardcoded, so further work will be required. Thomas Harte 2016-01-18 23:55:52 -05:00
  • 90eef1df74 Tightened to provide lower latency audio, hopefully. Thomas Harte 2016-01-18 20:01:06 -06:00
  • 03f683d588 Gave the audio queue something a lot like a spin lock on waiting to pipe out audio. Thomas Harte 2016-01-18 19:57:18 -06:00
  • 127684c590 With silence and high tone implemented, this may well hit a large proportion of existing files. Thomas Harte 2016-01-18 19:45:14 -06:00
  • 7d6214e078 This likely gets chunks 0100 and 0102 correct. Thomas Harte 2016-01-18 19:37:36 -06:00
  • 5a39e42413 Wired up enough such that some basic attempt at parsing a UEF occurs.` Thomas Harte 2016-01-18 17:06:09 -06:00
  • 2779f0e569 Statred working on support for at least the most fundamental file format. Thomas Harte 2016-01-18 15:46:41 -06:00
  • b70fdc2de8 Switched to being explicitly careful about not wrapping around and stomping on data not yet output. Thomas Harte 2016-01-18 13:56:20 -06:00
  • ddcc34740b Added lots of debugging output while I attempt to locate the source of audio scratchiness, also simplified manner of dealing with wraparound within the AudioQueue wrapper. Thomas Harte 2016-01-18 13:50:19 -06:00
  • b58e59e2bb Fixed: now outputting the requested output rate, rather than massively overproducing at the input rate. Thomas Harte 2016-01-14 23:12:40 -05:00
  • e63b6d22ae As shown by the commented-out code, the aliasing-adaptation seems to be working. So something is wrong somewhere else. Thomas Harte 2016-01-14 21:59:37 -05:00
  • 383b2be4c6 Fixed one off-by-one error. Thomas Harte 2016-01-14 21:33:27 -05:00
  • 8bd04a6be4 Switched model for filter subclasses. Implemented test square[-ish] wave to check for obvious stream errors. None is clear. Thomas Harte 2016-01-14 21:27:02 -05:00
  • 781249acf7 Fixed crash. Thomas Harte 2016-01-14 20:35:36 -05:00
  • 38ffcaa262 Here, at last, is _some_ audio output, at least. Thomas Harte 2016-01-14 20:33:22 -05:00
  • afde8dac49 Closed the loop such that audio manages to bubble up into Objective-C. Thomas Harte 2016-01-13 22:38:59 -05:00
  • 439d452e23 Resolved some errors. Thomas Harte 2016-01-13 22:11:33 -05:00
  • 49e89a4bcb I'm not yet completely convinced by my approach to time basing, but it'll probably do? If so then this more or less gets me ready for a point-sampled filtering. Thomas Harte 2016-01-13 22:02:39 -05:00
  • d9a7ef9e46 Edging towards audio output; the speaker is given appropriate input and output rates, and then updated with current divider and enabled/disabled status. Thomas Harte 2016-01-13 21:03:43 -05:00
  • d28abdc037 Made an attempt at correct timing, adding support for additional paged ROMs, added file association for .rom. Thomas Harte 2016-01-12 22:34:26 -05:00
  • 84ba4e2900 Tidied a little, started working towards supporting speaker output. Thomas Harte 2016-01-12 22:19:56 -05:00
  • 3437781abd Started sketching out an interface for sound generation. Which made me realise that the CRT in CRTDelegate was redundant, since C++ has namespaces. Thomas Harte 2016-01-12 16:54:09 -05:00
  • 6112f4ef6b Withdrew soft filtering for now; until the sampling frequency is passed on it's not sufficiently rigorous. Thomas Harte 2016-01-12 16:42:16 -05:00
  • 75d6ec354b Added some very basic filtering in RGB mode. Thomas Harte 2016-01-12 16:27:09 -05:00
  • 49a36ec9ac Added F12 as break. Thomas Harte 2016-01-11 22:35:52 -05:00
  • cba09b5490 Switched display update and RAM write order. Thomas Harte 2016-01-11 22:29:16 -05:00