1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-10-31 18:04:37 +00:00
Commit Graph

2487 Commits

Author SHA1 Message Date
Thomas Harte
279f4760d7 Eliminated buffer_size_ as something explicitly stored, and reduced size of delegate call out. 2017-07-16 15:01:39 -04:00
Thomas Harte
f931cd582d Switched to use of std::vector in those few remaining places where I was still using a unique_ptr to a native type and newing for myself. So, some of my earliest bits of code. 2017-07-16 13:54:07 -04:00
Thomas Harte
ab51bc443b Eliminated foolish double indirection on phase history. 2017-07-16 13:39:41 -04:00
Thomas Harte
c8575fe6e0 Mild clean ups, and a tweak to permitted top and bottom phase. 2017-07-16 13:39:08 -04:00
Thomas Harte
4489f120f9 Eliminated foolish double indirection on phase history. 2017-07-15 22:40:38 -04:00
Thomas Harte
253f9603ed Split the normal tape parser class into two in order to add a new option: a PLL-driven tape parser. Decided to see what happens if I attempt to use that to parse CSW Acorn data. 2017-07-15 19:07:35 -04:00
Thomas Harte
6ca712b498 Merge pull request #148 from TomHarte/CSW
Adds support for the CSW file format
2017-07-15 15:33:05 -04:00
Thomas Harte
b743566339 Corrected under-request of data: was erroneously supplying the size of input as the expected size of output. 2017-07-15 15:19:03 -04:00
Thomas Harte
481487f084 Oh yuck, it looks like I've repeated this same test in two different places. Must figure out where to factor it out to. But in the meantime, the emulated Electron has just loaded its first CSW. 2017-07-13 22:39:30 -04:00
Thomas Harte
fc8313430a Added an early exit if what was read as a header turns out pretty much certainly not to be a header. 2017-07-13 21:26:45 -04:00
Thomas Harte
648618d280 Tweaked bit timing decision. 2017-07-13 21:26:05 -04:00
Thomas Harte
ae1a130843 Fixed: length of 0 is a special case. 2017-07-13 20:57:27 -04:00
Thomas Harte
33d16ae0cd Fixes: individual static analysers reset tapes, for potential successors. The ZX81 file analyser no longer overruns its buffer upon receiving a file that is shorter than 11 bytes. 2017-07-12 21:34:08 -04:00
Thomas Harte
f09fe30af5 Attempted a full implementation of CSW. All in memory for now. 2017-07-12 21:23:59 -04:00
Thomas Harte
33eadb5549 Started taking further steps towards CSW support; reading the ZLib documentation is next. 2017-07-11 22:41:10 -04:00
Thomas Harte
368bff1a82 Added a shell class that will one day be able to parse CSW files, plus the logic and metadata to instantiate it when a CSW presents itself. 2017-07-10 21:43:58 -04:00
Thomas Harte
d853841dd5 Further lightened up my file-is-ZX81 check. 2017-07-10 20:44:13 -04:00
Thomas Harte
eacaafeb48 Merge pull request #147 from TomHarte/ZX8081Typer
Introduces preliminary `Typer` support for the ZX80 and ZX81
2017-07-09 22:30:30 -04:00
Thomas Harte
ac59dd8b1d Added enough typing to issue a load command. No thoughts as to running yet though. 2017-07-09 22:07:12 -04:00
Thomas Harte
353c854734 Removed a TODO that is no longer appropriate. 2017-07-09 22:06:50 -04:00
Thomas Harte
3e5c209039 Added basic Typer support for the ZX80 and '81. 2017-07-09 22:00:34 -04:00
Thomas Harte
f56d96267e Merge pull request #146 from TomHarte/MSCrash
Corrects accounting errors in ZX80/81 video
2017-07-09 20:09:44 -04:00
Thomas Harte
ed28260aaf Hardens the ZX80/81 video routines to ensure they never try to push data into the future and don't double-count time when pixels would ostensibly run into sync. You could previously see the CRT being handed negative run lengths if sync interrupted pixels or if a run of more than 320 pixels (my arbitrary buffer size) occurred, with corresponding poor behaviour given my use of unsigned numbers. 2017-07-09 19:33:05 -04:00
Thomas Harte
8ccec37a4b Eliminated a further potential cause of texture/geometry mismatch: the texture retain succeeded but then there wasn't room for geometry. 2017-07-09 19:11:38 -04:00
Thomas Harte
646622b99e Merge pull request #145 from TomHarte/RandomNoise
Eliminates occasional on-screen noise
2017-07-09 17:59:16 -04:00
Thomas Harte
a25c2fd6b5 Got more explicit about what the thinking is here re: multiple sources of action. 2017-07-09 17:54:26 -04:00
Thomas Harte
ee1a9a4781 Eliminates attempts cleverly to shuffle unsubmitted runs, because no mechanism exists to stop them overwriting previously-submitted-but-not-yet-flushed runs. Which implies that the buffer must be fully circular. The cost of which is sometimes having to make two calls to glTexSubImage2D. Also added some TODOs, and a means for reporting when a retain_latest is ineffective, in which situation it would be inappropriate to attempt to generate correlated geometry 2017-07-09 17:50:22 -04:00
Thomas Harte
a0367d6669 Merge pull request #144 from TomHarte/HiRes
Corrects various ZX80/81 video deficiencies
2017-07-09 17:17:16 -04:00
Thomas Harte
87658e83c1 Moved line counter reset logic; I think this is actually correct. 2017-07-09 00:05:30 -04:00
Thomas Harte
4509c3ce34 By observation, it appears that disabling vsync occurs on any port output whatsoever, as long as NMI isn't blocking it. 2017-07-08 21:01:52 -04:00
Thomas Harte
30e93979d2 Removed data work if sync is enabled; in that case no data is output. 2017-07-08 21:01:07 -04:00
Thomas Harte
d6b87053bf Introduced an explicit record of whether a video byte is latched. It's definitely incorrect to treat the latching of 0 as equivalent to no latching, as the byte that will eventually become video is not strongly implied. 2017-07-08 20:40:19 -04:00
Thomas Harte
22389a5d2d Merge branch 'master' into HiRes 2017-07-08 20:38:25 -04:00
Thomas Harte
37696532c2 Merge pull request #143 from TomHarte/MotorControl
Introduces both manual and automatic tape control for the ZX80 and 81
2017-07-08 19:34:40 -04:00
Thomas Harte
54efcb7e2f Made a game attempt at automatic motor control and ensured setting is initialised correctly from the user defaults. 2017-07-08 19:31:20 -04:00
Thomas Harte
bcb7c27cc4 Given that I'm not racing this any more, turned the intended 1 second back into 1 second. 2017-07-08 19:21:33 -04:00
Thomas Harte
e2575d6de4 Routed tape motor selections through to the C++ side of the world, and ensured that manual tape playback works properly. 2017-07-08 19:21:12 -04:00
Thomas Harte
23e989e170 This will likely do for the Swift/XIB side of things: the play/pause button is enabled or disabled as per the user's choice of automatic tape control, and toggles function when pressed. It communicates activity down to the Objective-C[++] layer, giving it a route through to the actual machine. 2017-07-08 19:12:06 -04:00
Thomas Harte
28412150e6 Added controls for controlling the tape motor of the ZX80/81, assuming I can find an automatic option. 2017-07-08 17:59:33 -04:00
Thomas Harte
6d941b0c1f Merge pull request #142 from TomHarte/BufferOverflow
Corrects a source of potential desynchronisation between the texture and geometry builders
2017-07-08 16:54:41 -04:00
Thomas Harte
2f90f35478 Ensured the same write area can be submitted multiple times — this is actively used if a run of data overlaps a flywheel-suggested sync. Which nullifies the idea of not having a write area in the barrel, at least as soon as any one has been allocated. 2017-07-07 23:37:44 -04:00
Thomas Harte
12f7e1b804 Enshrined a default colour burst amplitude. Which now everybody relies on. The 102 figure is derived from the burst apparently being 40 IRE. 2017-07-07 23:35:14 -04:00
Thomas Harte
c7fa2ed11a It makes more sense not to retain the previous texture builder run until vertex storage is confirmed. 2017-07-07 23:21:25 -04:00
Thomas Harte
bfbe12b94b Made an attempt further to tie geometry and texture generation fully together, removing the assumption that the caller will achieve one-to-one calling. 2017-07-07 22:25:05 -04:00
Thomas Harte
7476c64a66 Merge branch 'master' into BufferOverflow 2017-07-07 21:11:07 -04:00
Thomas Harte
46fff8e8a2 Ensured bit 8 is uniquely from the latched video byte, not an OR of that with the refresh address. 2017-07-06 22:48:48 -04:00
Thomas Harte
cd646aab9e Merge pull request #141 from TomHarte/ZX81FastLoading
Corrects ZX81 fast loading
2017-07-06 22:39:19 -04:00
Thomas Harte
a3684545b5 Added a block on the tape motor for a short period after each time the ROM routine is intercepted for a substituted byte read. To reduce the collision between fast tape and real tape loading. 2017-07-06 22:33:54 -04:00
Thomas Harte
2f42874fd3 Another fix to deal with real-time fighting: allow 8 and 18 pulses to be recognised as 1s and 0s. That's because the hand-off from ROM routines to parsing may occur very shortly before the first pulse of a valid sequence, making it look like there's a ghost. A cleaner solution needs to be found, probably revolving around allowing parsers to be attached to tapes and therefore to run constantly. 2017-07-06 22:33:03 -04:00
Thomas Harte
84d0e9b4cd Accept a pulse that begins exactly on seek_time as being found while seeking. 2017-07-06 22:31:45 -04:00