Thomas Harte
|
5fe0cff692
|
Fine. I'll accept 'bin' files if I must.
|
2015-08-19 21:36:50 -04:00 |
|
Thomas Harte
|
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.
|
2015-08-18 22:22:47 -04:00 |
|
Thomas Harte
|
462a791ed3
|
Ensured that no backlog accumulates of cycles to run. Otherwise the background queue was lagging behind.
|
2015-08-18 21:13:54 -04:00 |
|
Thomas Harte
|
ca6b54536e
|
Added fire and reset inputs.
|
2015-08-18 20:58:05 -04:00 |
|
Thomas Harte
|
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.
|
2015-08-18 20:33:24 -04:00 |
|
Thomas Harte
|
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.
|
2015-08-18 00:17:03 -04:00 |
|
Thomas Harte
|
a693c081f8
|
Switched on the appropriate compiler warnings re: signed comparisons and implicit conversions. Fixed all less-than-explicit calls.
|
2015-08-16 16:08:29 -04:00 |
|
Thomas Harte
|
1cc479affd
|
Removed redundant GL call.
|
2015-08-16 15:40:03 -04:00 |
|
Thomas Harte
|
391789e75c
|
Removed stray space.
|
2015-08-13 23:22:51 +01:00 |
|
Thomas Harte
|
cbe76ea5d5
|
Got rid of the thread hopping in order to redraw the GL view. Which appears to help significantly with total application cost.
|
2015-08-13 22:01:25 +01:00 |
|
Thomas Harte
|
cc98534f94
|
Added test for NOP, discovering the undocumented ones to be the incorrect length.
|
2015-08-13 07:32:50 +01:00 |
|
Thomas Harte
|
6616265d93
|
Fixed collision tests, added a few more timing tests.
|
2015-08-13 03:33:45 +01:00 |
|
Thomas Harte
|
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.
|
2015-08-13 02:58:39 +01:00 |
|
Thomas Harte
|
975836c30f
|
Added a quick snippet test, discovering that I've cut a cycle from read/modify/writes.
|
2015-08-13 02:18:41 +01:00 |
|
Thomas Harte
|
503d684af0
|
Added a couple of timing tests, both of which seem to pass for now.
|
2015-08-13 01:55:23 +01:00 |
|
Thomas Harte
|
e8f70398c1
|
Added one basic timing test, for now: implied nop should be two cycles.
|
2015-08-13 01:06:56 +01:00 |
|
Thomas Harte
|
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.
|
2015-08-13 00:51:06 +01:00 |
|
Thomas Harte
|
0e52b7365e
|
Removed redundant code.
|
2015-08-10 16:42:25 +01: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
|
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
|
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
|
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
|
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
|
cfe758daa0
|
A tweak here, a tweak there, to help with debugging.
|
2015-07-30 21:29:40 -04:00 |
|
Thomas Harte
|
20c2d98b9a
|
Converted remaining spaces to real tabs.
|
2015-07-30 20:51:32 -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
|
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
|
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 |
|
Thomas Harte
|
65bb31d55b
|
With around about a thousand issues, not the least of which being sometimes unsafe memory accesses, I've at last got pixels on screen.
|
2015-07-26 23:50:43 -04:00 |
|
Thomas Harte
|
cd0a62d21e
|
With a slight tweak to the informal protocol used for 6502 memory access cycles, ensured the wait strobe actually halts the CPU, to give a more accurate linking of machine time to real time.
|
2015-07-26 15:55:19 -04:00 |
|
Thomas Harte
|
6252f6030f
|
Switched to idiomatic source name, ensured latest project name is in all appropriate header places, threw texture coordinates slightly into the shader mix.
|
2015-07-26 15:25:11 -04:00 |
|
Thomas Harte
|
e53fbcf9ea
|
Reshuffled to make the OpenGL view explicitly a conduit for CRT-style output, and to give it responsibility for frame drawing. Which is still an awkward thread hop for the time being, but I've yet to read up on the advocated approach to multithreading with an NSOpenGLView; it looked like special provisions were available.
|
2015-07-26 15:13:46 -04:00 |
|
Thomas Harte
|
78a91b67c5
|
Quickie: make sure the correct context is adjusted; use the intended convertPointToBacking:.
|
2015-07-24 23:42:19 -04:00 |
|
Thomas Harte
|
ecb2898bd5
|
The overall architecture of who has responsibility for what is now very askew but: the CRT now outputs a tightly packed short buffer, with the probable OpenGL destination in mind. So it's now all fixed arithmetic internally. CRTFrame is reduced to a plain C struct with the intention that the OpenGL view will take responsibility for it and stop doing the back-and-forth sprint on getting buffer data. The Atari 2600 now outputs explicit blanks rather than level blacks for its border, so that it's easier visually to debug the CRT in its form as far as it has currently progressed: to drawing lines where the cathode ray gun would run while outputting pixel. I note that I'm still not quite getting vertical sync right yet — I'm just accepting it anywhere in teh frame — but that should be an easy fix.
|
2015-07-24 23:29:45 -04:00 |
|
Thomas Harte
|
5ab47e600a
|
Got through the requisite amount of invisible pain to get something onto my GL display. But clearly this is factored in entirely the wrong way. Work to do.
|
2015-07-24 20:37:08 -04:00 |
|
Thomas Harte
|
31338ef754
|
Okay; having no minimum size is a user experience nightmare. Fixed.
|
2015-07-23 22:54:17 -04:00 |
|
Thomas Harte
|
44e8ffd01c
|
Ensured windows start and remain 4:3, made sure I request a GL 3.2 context and that an exception is raised if I call any old-fashioned GL functions.
|
2015-07-23 22:51:53 -04:00 |
|