1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-11-19 08:31:11 +00:00
Commit Graph

3349 Commits

Author SHA1 Message Date
Thomas Harte
cd67e31e64 Made a first attempt at switching a little closer to TIA's real internal counter setup. 2015-08-09 22:47:11 +01:00
Thomas Harte
987be65a59 Made a quick attempt at reimplementing skip-to-the-end logic for ready waits. 2015-08-09 02:42:01 -04:00
Thomas Harte
eb23a493e5 Switched back to one texel per colour clock, at least for now. Attempted to break _RGBA assumption within the cathode ray view. 2015-08-05 23:36:04 -04:00
Thomas Harte
fd36f13baf The cathode ray view no longer hard codes the frame size. So that's one less coupling. Doubled pixel output size to give sufficient sampling detail to capture the NTSC colour clock (ummm, hopefully). 2015-08-05 21:45:47 -04:00
Thomas Harte
67e82c713f Broke assumption that every item in a vertex description is a short, specifically turning lateral into a byte. Which buys me a byte for phase, if that's sufficient. 2015-08-05 21:12:33 -04:00
Thomas Harte
5644b3a1cc Fixed scanline sizing and fill issues, as well as shortening vsync to the correct Atari length. 2015-08-05 20:55:27 -04:00
Thomas Harte
265d1d5b24 Merge branch 'EdgeTriggeredVSync' 2015-08-05 20:30:02 -04:00
Thomas Harte
84d1c2e47d Fixed end of sync time calculation and ensured the pretend capacitor is emptied by the decision to retrace and doesn't refill during retrace. 2015-08-05 20:29:20 -04:00
Thomas Harte
04c2640b15 Made a quick attempt to allow vsync triggers only on the raising edge of a sync signal. Will need to investigate more thoroughly. 2015-08-03 08:42:05 -04:00
Thomas Harte
5313b48ebd I'm ashamed to admit, I: played with numbers until enough things looked stable such that I can investigate other things. Discovery: my PAL autodetection was way off. Fixed, hopefully. 2015-08-02 20:32:18 -04:00
Thomas Harte
55017b78a5 Made an attempt to unify my variable storage (and, technically, to get beam size correct across the frame). 2015-08-02 19:30:45 -04:00
Thomas Harte
6e52e5df1c Full separate 'lateral' usage is go. Also probably at some point I need to throw in a phase property, which this new flexibility will help with. 2015-08-02 14:32:29 -04:00
Thomas Harte
3ab6585789 Started making the format of data included in a CRTFrame less a matter of variously hard-coded magic constants. Which will allow me to separate the idea of an internal lateral position from the direct texture coordinate, avoiding precision sampling errors at the top and bottom. 2015-08-02 14:25:21 -04:00
Thomas Harte
be421587ad Eliminated the vertical retrace counter; vertical retrace ends when the beam gets back to the top. 2015-08-02 13:48:35 -04:00
Thomas Harte
de4f2bf5dd Maybe the 10 lines resource I saw meant 10 lines including charge time? 2015-07-31 19:00:40 -04:00
Thomas Harte
5f1d76e855 Can't seem to find any documentation: assumed horizontal sync is generated during vertical. 2015-07-31 18:49:02 -04:00
Thomas Harte
c1a12ad4df Fix to make sure end of vertical sync is always correctly spotted as an event, rather than just happening off the books. So I can now watch Joust roll to its heart's content. 2015-07-31 18:15:59 -04:00
Thomas Harte
9c91f1a2eb Added an attempt at NTSC/PAL autodetection, based on number of missed vertical syncs. 2015-07-31 18:04:33 -04:00
Thomas Harte
a5d66e9dd6 Factored out a few more constants, started trying to ensure there's enough slack and the mechanisms in place for the CathodeRayView to hold onto two frames if it desires, for potential phosphor simulation, switched once again to additive blending — much more like a real CRT — and added a sine function across the width of spans per my understanding of how an electron gun actually fires.
Why do all this when overall timing is still so far off? It helps me more easily see how overall timing is so far off.
2015-07-31 17:47:10 -04:00
Thomas Harte
c1d1fb65cb Made an attempt properly to emulate the RDY line and the Atari's use of it. 2015-07-31 16:54:20 -04:00
Thomas Harte
53dd5c8f16 Trying to fix my RDY line emulation. Switched to PAL timings, at least temporarily, since it's starting to make a difference. 2015-07-31 16:44:53 -04:00
Thomas Harte
e4615cda2e Switched back to unrealistic solid raster beams for the time being. 2015-07-30 23:01:59 -04:00
Thomas Harte
39bfbf1000 Attempted ball graphics enable delay. 2015-07-30 23:01:28 -04:00
Thomas Harte
6ad3fbbaf2 Slowed flywheel adjustments a little, the better to highlight phase errors for the time being. 2015-07-30 23:00:54 -04:00
Thomas Harte
78e66d2577 Added an attempt at ball rendering. 2015-07-30 21:30:00 -04:00
Thomas Harte
cfe758daa0 A tweak here, a tweak there, to help with debugging. 2015-07-30 21:29:40 -04:00
Thomas Harte
a95b36a53d Made first attempt at missile display. In Enduro, at least, one seems to work but the other seems to be absent. 2015-07-30 21:09:18 -04:00
Thomas Harte
1b7846f09b Made a first attempt at the sprite latches. Hopefully this should make a few more Activision logos, etc, show up correctly. 2015-07-30 20:52:26 -04:00
Thomas Harte
20c2d98b9a Converted remaining spaces to real tabs. 2015-07-30 20:51:32 -04:00
Thomas Harte
1fa7a77793 Continuing in my attempts to figure out the complete absence of graphics from some games: there are 262 lines on an NTSC screen, not 256. Also ensured that the CRT has a little spare range at the edges so that its generated triangles don't wrap around just because of integer overflow. 2015-07-30 20:07:20 -04:00
Thomas Harte
98efae2536 Reintroduced emergency vertical sync — so that output occurs even when the emulation isn't catching syncs properly — and switched some spaces to tabs. 2015-07-30 17:16:49 -04:00
Thomas Harte
14adcd2096 Had a quick bash at timer overflow. 2015-07-30 16:09:32 -04:00
Thomas Harte
58908b60ac So, provisionally: this looks like (i) the one cycle to write; plus (ii) the number of cycles to get to the end of the pixels (which is _horizontalTimer+1 for me because _horizontalTimer = 0 is a pixel); plus (iii) one cycle of latency to wake up. Am I making that up? Time will tell. 2015-07-30 15:49:38 -04:00
Thomas Harte
f5475369d6 Fixed foreshadowing of sprites yet to come. Put flipMask back the other way around. 2015-07-30 12:07:28 -04:00
Thomas Harte
f653b5dff3 Made a first tentative attempt at supporting all eight sprite modes. 2015-07-30 11:52:28 -04:00
Thomas Harte
151c6b4421 Quick fix: add one cycle to get to the genuine end of the line (i.e. after cycle 0, not on it). Not 3, with the video then becoming desynchronised from the CPU clock. 2015-07-30 00:00:35 -04:00
Thomas Harte
0124832876 Merge branch 'master' of github.com:TomHarte/CLK 2015-07-29 23:49:10 -04:00
Thomas Harte
d1ae2caf91 Did the absolute minimum necessary to get some sprites showing in some capacity. 2015-07-29 23:48:52 -04:00
Thomas Harte
23df94d011 Got at least as far as putting a single dot at the player 0 and player 1 positions. Which may or may not be accurate. 2015-07-29 22:37:37 -04:00
Thomas Harte
596d34190c Fixed: write pointer is calculated only after write x and y are known. This is probably the memory handling problem? 2015-07-28 08:15:54 -04:00
Thomas Harte
164866d613 Collapsed two methods into one, to avoid redundant pixel copying. 2015-07-27 22:12:13 -04:00
Thomas Harte
828ae66a45 It appears ARC extends its reach into C++ nowadays. Fixed additional retain cycle. 2015-07-27 21:17:53 -04:00
Thomas Harte
3c25ead1f3 Started working out some of my retain cycles and general failures to release. Switched .mm filename so that Xcode will stop getting confused when I try to switch between implementation and interface files. 2015-07-27 21:15:10 -04:00
Thomas Harte
1cbebdafcc This now uploads only a portion of the source buffer if possible. Which is usually possible. 2015-07-27 20:58:51 -04:00
Thomas Harte
1f229ee6f7 More tweaks to provide a stable image, at least for the time being. 2015-07-27 20:18:25 -04:00
Thomas Harte
01109d441b Made an attempt at NTSC colours. Hard coded in RGB, not composite. Short cuts, tsk. 2015-07-27 19:04:03 -04:00
Thomas Harte
662e7942ac Enabled multisampling. This is hardly an expensive use case. 2015-07-27 16:57:11 -04:00
Thomas Harte
b9cf6fd4dc Implemented a virtual skew control, hard coded to what is conveniently exactly the right number. 2015-07-27 16:44:47 -04:00
Thomas Harte
31e9a53a44 Removed some debugging code. 2015-07-27 16:43:51 -04:00
Thomas Harte
caffe56a2d Slightly expanded width of cathode ray gun, decided to figure out exactly how to deal with off-by-one lengths and precision at a later date, ensured that failure to catch vertical sync doesn't cause out-of-bounds buffer access on the hard-coded, assumed large enough, 512x512 data textures. 2015-07-27 00:28:47 -04:00