Commit Graph

  • 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
  • 650077feac Pulled a few things out as constants, zoomed in a little. Still in a 4:3 window though. Thomas Harte 2016-01-11 22:18:34 -05:00
  • 72019d0ea3 Made an attempt to get video output correct. Thomas Harte 2016-01-11 22:08:30 -05:00
  • e93dbdb463 Implemented keyboard input. Thomas Harte 2016-01-11 19:48:31 -05:00
  • ce916ebd6a Fixed runaway frame generator. Thomas Harte 2016-01-10 23:32:57 -05:00
  • 93f7df04a0 Ensured correctly timed sampling of the interrupt line. Thomas Harte 2016-01-10 22:55:56 -05:00
  • ccf20299a3 Made an attempt at getting some interrupts all up inside this thing. Thomas Harte 2016-01-10 19:06:46 -05:00
  • cc5ba8243e Fixed: turned out the power-on bit was being cleared. Thomas Harte 2016-01-10 17:17:39 -05:00
  • d95414b2eb I'm not really sure what's going wrong with paging yet but this fixes the 0xc000 byte error. Thomas Harte 2016-01-10 12:30:24 -05:00
  • e07981c147 Fixed screen start address. Thomas Harte 2016-01-09 22:52:08 -05:00
  • 1308332a71 Hard-coded to 40 columns of black and white, here's some text, at least. Thomas Harte 2016-01-09 22:39:46 -05:00
  • 037602765a This now correctly (I think) decodes information posted to the CRT. But doesn't yet post it correctly. I'm very close now, I hope. Thomas Harte 2016-01-09 22:19:00 -05:00
  • 07a041d788 Fixed vertical retrace sync. Thomas Harte 2016-01-09 21:54:31 -05:00
  • 3d6f20b7b9 Output, at last! Though sync is clearly way off. Thomas Harte 2016-01-09 21:53:33 -05:00
  • 09df218c01 Some output! Showing that three lines of solid sync isn't smart. But here it is. Thomas Harte 2016-01-09 21:48:53 -05:00
  • b4f31edea3 Made an attempt to get RGB output mode up and running, and showing at least a box where pixels would be. Thomas Harte 2016-01-09 21:32:56 -05:00
  • a900bfed65 Fixed to ensure that frame rendering wraps around, and to properly connect the Electron to its view. Now I need a working pixel shader. Thomas Harte 2016-01-09 20:34:22 -05:00
  • 7341f5c341 This is intended to be enough to start producing something of an output. But something's obviously still broken. Thomas Harte 2016-01-09 20:26:40 -05:00
  • 716bb3281b This at least now connects up a CRT, though it never talks to it. Thomas Harte 2016-01-07 22:26:49 -05:00
  • 47a7654c00 Added just enough that this is probably a successful boot. I guess I'm going to need to get invested in graphics next? Hmmm. Thomas Harte 2016-01-07 21:01:13 -05:00
  • 8c1bfa5a05 This is the bare minimum to prove that the ROM is trying properly to boot. Thomas Harte 2016-01-07 20:36:27 -05:00
  • 0db8938d27 Added the option for the CSCathodeRayView to show only a subsection of the full scan area. Zoomed in a little on the 2600. Put in enough piping to give the Electron sight of its ROMs at least. Thomas Harte 2016-01-06 23:14:36 -05:00
  • bfd9957c81 You now get an Electron only if you ask for a new file. That'll do for now while it's the only thing that one might want to start without supplying a file. The 6502 now starts from a defined point — being reset. The Electron is starting to grow the absolute most simple buds of its memory map. Thomas Harte 2016-01-06 21:09:49 -05:00
  • c69b3256ba Slightly simplified Swift usage. Thomas Harte 2016-01-04 23:44:36 -05:00
  • 616dc0b57c Okay, so this is the absolute bare minimum about of refactoring and wiring necessary to get the [unimplemented] Electron machine pumping. Thomas Harte 2016-01-04 23:40:43 -05:00
  • 43ab8bbad5 Okay, so then here's a first shot at the Objective-C -> C++ bridge for the Electron. Thomas Harte 2016-01-04 23:16:37 -05:00
  • ab45c1d530 Started working on a shell for the Electron emulation, including factoring out the common CRT delegate -> Objective-C bridging, serial dispatch queue and frameskipping logic from the Atari 2600 shell. Thomas Harte 2016-01-04 23:12:47 -05:00
  • 22fa024546 Added document XIB. Thomas Harte 2016-01-03 20:46:39 -05:00
  • aa0714fe27 Started sketching out an Acorn Electron emulation, as it's a platform I'm familiar with and will force me to figure out PAL decoding. Factored out NTSC-specific parts of the display decoding logic and hence added RGB output mode. Thomas Harte 2016-01-03 20:41:43 -05:00
  • 96503a3ac5 Switched to nicer nullable/nonnull syntax. Thomas Harte 2016-01-02 17:59:21 -05:00
  • feeedbe33b The standard Xcode versioning updates. Nothing of substance. Thomas Harte 2016-01-02 17:57:23 -05:00
  • 675070c5dd Very, _very_ minor: switched to normal C++ constructor syntax for simple variable initialisation. Thomas Harte 2015-12-06 16:53:37 -05:00
  • 5feef2110f Added a very basic attempt at shadow mask emulation. Thomas Harte 2015-09-24 21:23:16 -04:00
  • 63b648be65 Switched down to four samples per pixel, just more than half as many, to fit into a vec4. Edges aren't as smooth but I'm wondering whether it'll make much odds when I implement a shadow mask. Thomas Harte 2015-09-17 19:25:15 -04:00
  • 5d6bee4927 Of course, being in-phase means being the cosine wave. Thomas Harte 2015-09-10 21:30:39 -04:00
  • 82aa6d074a 'type' is out, at least for the time being. Thomas Harte 2015-09-05 20:25:30 -04:00
  • 6a0b4e86c8 An Xcode beta version bump, nothing more. Thomas Harte 2015-09-05 17:21:36 -04:00
  • 53e699516b Disabled multisampling unless and until I can get the per-pixel cost down. Thomas Harte 2015-09-05 17:21:16 -04:00
  • 7fb6c86d9d Okay, it looks like colour 3 is approximately phase offset 0, and the palette wraps around after 14 entries, not 16. Also got a bit less dependent on floating point accuracy for the step. Thomas Harte 2015-09-05 17:10:41 -04:00
  • 39027b675d Fixed YIQ conversion and made sampling pattern slightly more rational. Thomas Harte 2015-09-05 17:09:24 -04:00
  • 80cf3d9301 Formally gave the 2600 responsibility for providing the code that decodes one of the things it has put into a buffer into a composite sample. Thomas Harte 2015-09-03 12:28:16 -04:00
  • ac8fc9a1a0 Experimenting with pre-encoding luminance and chrominance separation over on the CPU as otherwise the GPU does them repetitively and more awkwardly (as it's working purely in floats). It means uploading twice as much data though, so I don't know. Still only half as much as the RGBA path of a few days ago. Will experiment. Thomas Harte 2015-09-03 11:15:23 -04:00
  • 11acf3f2d3 Made some further minor attempted improvements. Thomas Harte 2015-09-02 20:51:56 -04:00
  • 161450942a Removed outdated comment. This is better now than it was. Thomas Harte 2015-09-02 17:20:23 -04:00
  • 0d6094d842 Attempted very basic vectorisation, plus some minor other clean-ups. Thomas Harte 2015-09-02 17:17:22 -04:00
  • f60ba4f487 Added a note about horribleness to the source. You never know who's looking. Thomas Harte 2015-09-01 22:38:15 -04:00
  • cb6e6e8acb It's the worst fragment shader you'll ever see. The worst. But this attempts NTSC composite video emulation, artefacts included. Thomas Harte 2015-09-01 22:36:45 -04:00
  • 5fe0cff692 Fine. I'll accept 'bin' files if I must. Thomas Harte 2015-08-19 21:36:50 -04:00
  • 043d2f9896 It sounds like the two sync signals are exclusive ORd. Thomas Harte 2015-08-19 21:36:33 -04:00
  • 3c3c4d2f7c Enlarged drawing range a little. Thomas Harte 2015-08-19 21:35:26 -04:00
  • c5e480cfae Threw in missile repeats. Thomas Harte 2015-08-19 09:46:57 -04:00
  • 28fad66272 Okay, so I had those constants transposed. What a klutz I've been! Thomas Harte 2015-08-19 09:09:00 -04:00
  • f74d9ee373 Copied in quote. So that I can stop looking it up. Thomas Harte 2015-08-18 22:36:32 -04:00
  • a62c7f5c56 At last! Discovered CRT scanning bug; was always moving by the full proposed run length along the scan, not the time until the next event. Using this, have implemented proper vertical sync at last (I think). Have disabled scanline banding too, as now everything meets up it's more helpful to be able to see with clarity. Thomas Harte 2015-08-18 22:22:47 -04:00
  • 462a791ed3 Ensured that no backlog accumulates of cycles to run. Otherwise the background queue was lagging behind. Thomas Harte 2015-08-18 21:13:54 -04:00
  • ca6b54536e Added fire and reset inputs. Thomas Harte 2015-08-18 20:58:05 -04:00
  • 88d5064737 Not that it makes a lot of difference, there being no names to mangle, but moved the closing #ifdef __cplusplus to the idiomatic place. Thomas Harte 2015-08-18 20:33:59 -04:00
  • bc805a90fe Wired up joystick directions, at least, and fire button presses get as far as the C++. But there's some latching to figure out before they'll work. Thomas Harte 2015-08-18 20:33:24 -04:00
  • 902795d61c Switched vertical sync detection method, at least for now. They never happen automatically (I need to fix that) and just always take effect if detected in the lower half of the display. PAL/NTSC is determined just by looking at the refresh rate. Thomas Harte 2015-08-18 00:17:03 -04:00
  • d21ccddeef Fixed: _vBlankExtend is now cleared at the correct moment. Thomas Harte 2015-08-17 17:54:36 -04:00
  • a33d31d02a Fixed to allow loading of ROMs less than 1kb in size. Thomas Harte 2015-08-17 00:34:01 -04:00
  • 083b678785 Quickie: observed that the initial position is one scanline dirty, not zero. Also switched to a size_t on the write pointer, size_t being the correct C size for into-memory offsets. Thomas Harte 2015-08-17 00:25:32 -04:00
  • df68aeff5a Fixed: made sure that _vBlankExtend resets itself even on non-pixel lines. Thomas Harte 2015-08-17 00:09:28 -04:00
  • 414849f166 Confirmed: pixel counters are not paused by programmatic vertical blank. Thomas Harte 2015-08-16 17:34:20 -04:00
  • cde9bb7ebc Put common shift step into a macro. Thomas Harte 2015-08-16 16:12:20 -04:00
  • a693c081f8 Switched on the appropriate compiler warnings re: signed comparisons and implicit conversions. Fixed all less-than-explicit calls. Thomas Harte 2015-08-16 16:08:29 -04:00
  • 1cc479affd Removed redundant GL call. Thomas Harte 2015-08-16 15:40:03 -04:00
  • 410c09cb35 Made attempt not to touch the _collisions registers (which are instance variables) unless the local variables imply it's potentially necessary. So that's a broad phase on collisions, I guess. Thomas Harte 2015-08-16 15:39:40 -04:00
  • 40cb1cf60d ... and the ball graphic. Thomas Harte 2015-08-16 11:24:33 -04:00
  • afaa86a649 Minor thing: skip the internal counter stuff if we're definitely going to end up with a transparent pixel anyway for the player and missile graphics. Thomas Harte 2015-08-16 11:23:46 -04:00
  • 4b5aabdd54 Attempted to take even more out of the inner pixel loop. Thomas Harte 2015-08-13 23:23:04 +01:00
  • 391789e75c Removed stray space. Thomas Harte 2015-08-13 23:22:51 +01:00
  • cbe76ea5d5 Got rid of the thread hopping in order to redraw the GL view. Which appears to help significantly with total application cost. Thomas Harte 2015-08-13 22:01:25 +01:00
  • 92c7d56cc3 Tiny little speed improvement. Every little helps. Thomas Harte 2015-08-13 21:50:24 +01:00
  • 17bbe27c9a As an experiment, performed some very basic moving of playfield composition outside of the pixel loop. Thomas Harte 2015-08-13 21:32:22 +01:00
  • 033655835a My understanding now is that object position counting will begin the cycle after the call is made, not that cycle, and that the timer loops just once, with the logic for counter pumping being whether the relevant flag is still set, irregardless of whether the counter is still going. Thomas Harte 2015-08-13 18:59:23 +01:00
  • b440fed323 Fixed a couple of incorrect references to horizontal constants or calculations where the intention is to use vertical. Thomas Harte 2015-08-13 18:29:07 +01:00
  • 323aa27e13 Fixed: paging is based directly on the access, independent of the read/write line (since it isn't actually exposed to catridges). Thomas Harte 2015-08-13 15:04:30 +01:00
  • 59c872ada6 Attempted to reintroduce suitably noted emergency flyback. To re-enable auto-selection of PAL. Thomas Harte 2015-08-13 14:55:53 +01:00
  • 9838e01cc1 Made a first attempt at paging. Thomas Harte 2015-08-13 13:24:02 +01:00
  • 9ca57b80a7 Minor steps to help with diagnostics; all commented out or merely to benefit with breakpoint placement. Thomas Harte 2015-08-13 08:43:10 +01:00
  • cc98534f94 Added test for NOP, discovering the undocumented ones to be the incorrect length. Thomas Harte 2015-08-13 07:32:50 +01:00
  • 6616265d93 Fixed collision tests, added a few more timing tests. Thomas Harte 2015-08-13 03:33:45 +01:00
  • dd0f17130a Found and fixed some timing errors in absolute indexed and in (indirect), y addressing modes: neither is able in write or read-modify-write modes to shave a cycle as then can when reading. Thomas Harte 2015-08-13 02:58:39 +01:00
  • 975836c30f Added a quick snippet test, discovering that I've cut a cycle from read/modify/writes. Thomas Harte 2015-08-13 02:18:41 +01:00
  • 503d684af0 Added a couple of timing tests, both of which seem to pass for now. Thomas Harte 2015-08-13 01:55:23 +01:00
  • e8f70398c1 Added one basic timing test, for now: implied nop should be two cycles. Thomas Harte 2015-08-13 01:06:56 +01:00
  • d19f8ed507 Removed the implicit reset upon 6502 startup, adding a reset line. Hence all tests now pass again. Added an empty shell for timing tests, the all-RAM 6502 now counting bus cycles. Thomas Harte 2015-08-13 00:51:06 +01:00
  • 687816d470 Made some attempted simplifications, implemented collisions. Thomas Harte 2015-08-13 00:31:57 +01:00
  • aebf636528 Ensured the PIA timer resumes its normal tick rate after being read; fixed those spaces that had crept in where tabs should be. Thomas Harte 2015-08-10 16:55:16 +01:00
  • 42677f5f83 Fixed association of motion registers and actual registers. Thomas Harte 2015-08-10 16:43:45 +01:00
  • 0e52b7365e Removed redundant code. Thomas Harte 2015-08-10 16:42:25 +01:00
  • 2dde2efff0 Attempted to standardise object counters. Thomas Harte 2015-08-10 15:09:40 +01:00
  • a228969655 This should happen every fourth cycle. Thomas Harte 2015-08-10 08:16:17 +01:00
  • 3c27306a8e My counter was going the wrong way. Thomas Harte 2015-08-10 00:33:37 +01:00