Commit Graph

  • 0350925c1e Started sketching out greater support. Mostly TODOs right now, but pulse sequence and pure tone are implemented. I probably also need at least the CSW block to hit everything you might see in a ZX80 or ZX81 tape. Then I can worry about the rest when I have a way to test them. Thomas Harte 2017-07-17 19:38:15 -04:00
  • 94e3dd0d4f Merge branch 'master' into TZX Thomas Harte 2017-07-17 19:07:05 -04:00
  • 5d44422230 Merge pull request #152 from TomHarte/CSWLength Thomas Harte 2017-07-17 19:06:43 -04:00
  • eafdd7dbd7 Corrected decompressed size expectations: it may be up to five times the size of the number of waves, as waves are up to five bytes in length. Thomas Harte 2017-07-17 19:04:25 -04:00
  • 127b584e79 Ensured that resetting a TZX resets the is-at-end flag. Thomas Harte 2017-07-17 07:52:28 -04:00
  • 2179edc7fe Adjusted to allow the very first thing found to be data, and ensured that unrecognised symbols break files just as gaps do. Thomas Harte 2017-07-17 07:43:47 -04:00
  • 9108495586 Added a safety seek. Thomas Harte 2017-07-17 07:35:53 -04:00
  • fa617eac6b Spotted that pilot and data segments have different encodings — of course! — and attempted to adapt. Thomas Harte 2017-07-17 07:34:10 -04:00
  • b63971caf7 Took a first, incorrect, shot at TZX chunk 0x19, the generalised data block. Thomas Harte 2017-07-16 22:40:38 -04:00
  • 7327da6350 Switched the nascent TZX to use the new PulseQueuedTape. Thomas Harte 2017-07-16 22:06:56 -04:00
  • 8f72fc4a44 Factored out from the UEF implementation the concept of being a tape that has a queue of pending pulses and manages that queue. Thomas Harte 2017-07-16 22:04:40 -04:00
  • 238348c885 Performed the initial wiring to announce that this application supports TZX files and to route them to the ZX80/81 static analyser. The TZX class itself does not yet do much beyond basic validation. I think it'll be easiest if it follows in UEF's footsteps in queuing up pulses ahead of time, so some factoring out is now required. Thomas Harte 2017-07-16 21:33:11 -04:00
  • 7b5f93510b Fixed the DigitalPhaseLockedLoopBridge bridge, once again fixing tests. Thomas Harte 2017-07-16 20:55:57 -04:00
  • b3861ff755 Reduced copying of Pulses. Thomas Harte 2017-07-16 19:49:31 -04:00
  • 5a6b7219b9 Merge pull request #150 from TomHarte/PLLParsing Thomas Harte 2017-07-16 19:28:51 -04:00
  • c2bc34fd87 Eliminated the PLLParser class. I think the proper abstraction if and when another machine requires PLL-esque parsing is probably to template out the Acorn wiring of a PLL to a Parser, and/or generalise the Acorn shifter. It'll be easier to decide when the time comes. Thomas Harte 2017-07-16 19:25:26 -04:00
  • 1d3ae31755 Abstracted the concept of an Acorn shifter away from being a PLLParser. The Acorn tape parser now skips using that class and uses the shifter. The actual Electron also uses the shifter. So the two are completely aligned. Net result: the Electron should successfully load exactly when static analysis was successful. Thomas Harte 2017-07-16 19:24:01 -04:00
  • 8ddd686049 Removed redundant variable. Thomas Harte 2017-07-16 19:04:03 -04:00
  • e5188a60dc Settled on the new average-of-length approach to a PLL window sizing, eliminating the old errors-of-phase approach. Since it anchors automatically to the original target clocks per bit, killed the explicit mention of a tolerance. Thomas Harte 2017-07-16 19:03:50 -04:00
  • e71d13c090 With the new PLL implementation, switching to a deeper window size returns the Acorn tape parser to: working. Thomas Harte 2017-07-16 17:12:12 -04:00
  • ba83dfd454 Merge branch 'master' into PLLParsing Thomas Harte 2017-07-16 17:01:00 -04:00
  • 2fb0aea990 Updated the C1540 test vessel to the new world. Thomas Harte 2017-07-16 17:00:39 -04:00
  • 51177e4e1f Attempted a different implementation of the PLL, that responds to changes only once. Thomas Harte 2017-07-16 16:49:04 -04:00
  • 004d6da9fb Merge branch 'master' into PLLParsing Thomas Harte 2017-07-16 15:03:13 -04:00
  • 561373e793 Merge pull request #149 from TomHarte/BetterVectors Thomas Harte 2017-07-16 15:02:52 -04:00
  • 279f4760d7 Eliminated buffer_size_ as something explicitly stored, and reduced size of delegate call out. Thomas Harte 2017-07-16 15:01:39 -04:00
  • 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. Thomas Harte 2017-07-16 13:54:07 -04:00
  • ab51bc443b Eliminated foolish double indirection on phase history. Thomas Harte 2017-07-15 22:40:38 -04:00
  • c8575fe6e0 Mild clean ups, and a tweak to permitted top and bottom phase. Thomas Harte 2017-07-16 13:39:08 -04:00
  • 4489f120f9 Eliminated foolish double indirection on phase history. Thomas Harte 2017-07-15 22:40:38 -04:00
  • 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. Thomas Harte 2017-07-15 19:07:35 -04:00
  • 6ca712b498 Merge pull request #148 from TomHarte/CSW 2017-07-15 Thomas Harte 2017-07-15 15:33:05 -04:00
  • b743566339 Corrected under-request of data: was erroneously supplying the size of input as the expected size of output. Thomas Harte 2017-07-15 15:19:03 -04:00
  • 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. Thomas Harte 2017-07-13 22:39:30 -04:00
  • fc8313430a Added an early exit if what was read as a header turns out pretty much certainly not to be a header. Thomas Harte 2017-07-13 21:26:45 -04:00
  • 648618d280 Tweaked bit timing decision. Thomas Harte 2017-07-13 21:26:05 -04:00
  • ae1a130843 Fixed: length of 0 is a special case. Thomas Harte 2017-07-13 20:57:27 -04:00
  • 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. Thomas Harte 2017-07-12 21:34:08 -04:00
  • f09fe30af5 Attempted a full implementation of CSW. All in memory for now. Thomas Harte 2017-07-12 21:23:59 -04:00
  • 33eadb5549 Started taking further steps towards CSW support; reading the ZLib documentation is next. Thomas Harte 2017-07-11 22:41:10 -04:00
  • 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. Thomas Harte 2017-07-10 21:43:58 -04:00
  • d853841dd5 Further lightened up my file-is-ZX81 check. Thomas Harte 2017-07-10 20:44:13 -04:00
  • eacaafeb48 Merge pull request #147 from TomHarte/ZX8081Typer Thomas Harte 2017-07-09 22:30:30 -04:00
  • ac59dd8b1d Added enough typing to issue a load command. No thoughts as to running yet though. Thomas Harte 2017-07-09 22:07:12 -04:00
  • 353c854734 Removed a TODO that is no longer appropriate. Thomas Harte 2017-07-09 22:06:50 -04:00
  • 3e5c209039 Added basic Typer support for the ZX80 and '81. Thomas Harte 2017-07-09 22:00:34 -04:00
  • f56d96267e Merge pull request #146 from TomHarte/MSCrash Thomas Harte 2017-07-09 20:09:44 -04:00
  • 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. Thomas Harte 2017-07-09 19:33:05 -04:00
  • 8ccec37a4b Eliminated a further potential cause of texture/geometry mismatch: the texture retain succeeded but then there wasn't room for geometry. Thomas Harte 2017-07-09 19:11:38 -04:00
  • 646622b99e Merge pull request #145 from TomHarte/RandomNoise Thomas Harte 2017-07-09 17:59:16 -04:00
  • a25c2fd6b5 Got more explicit about what the thinking is here re: multiple sources of action. Thomas Harte 2017-07-09 17:54:26 -04:00
  • 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 Thomas Harte 2017-07-09 17:50:22 -04:00
  • a0367d6669 Merge pull request #144 from TomHarte/HiRes Thomas Harte 2017-07-09 17:17:16 -04:00
  • 87658e83c1 Moved line counter reset logic; I think this is actually correct. Thomas Harte 2017-07-09 00:05:30 -04:00
  • 4509c3ce34 By observation, it appears that disabling vsync occurs on any port output whatsoever, as long as NMI isn't blocking it. Thomas Harte 2017-07-08 21:01:52 -04:00
  • 30e93979d2 Removed data work if sync is enabled; in that case no data is output. Thomas Harte 2017-07-08 21:01:07 -04:00
  • 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. Thomas Harte 2017-07-08 20:40:19 -04:00
  • 22389a5d2d Merge branch 'master' into HiRes Thomas Harte 2017-07-08 20:38:25 -04:00
  • 37696532c2 Merge pull request #143 from TomHarte/MotorControl Thomas Harte 2017-07-08 19:34:40 -04:00
  • 54efcb7e2f Made a game attempt at automatic motor control and ensured setting is initialised correctly from the user defaults. Thomas Harte 2017-07-08 19:31:20 -04:00
  • bcb7c27cc4 Given that I'm not racing this any more, turned the intended 1 second back into 1 second. Thomas Harte 2017-07-08 19:21:33 -04:00
  • e2575d6de4 Routed tape motor selections through to the C++ side of the world, and ensured that manual tape playback works properly. Thomas Harte 2017-07-08 19:21:12 -04:00
  • 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. Thomas Harte 2017-07-08 19:12:06 -04:00
  • 28412150e6 Added controls for controlling the tape motor of the ZX80/81, assuming I can find an automatic option. Thomas Harte 2017-07-08 17:59:33 -04:00
  • 6d941b0c1f Merge pull request #142 from TomHarte/BufferOverflow Thomas Harte 2017-07-08 16:54:41 -04:00
  • 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. Thomas Harte 2017-07-07 23:37:44 -04:00
  • 12f7e1b804 Enshrined a default colour burst amplitude. Which now everybody relies on. The 102 figure is derived from the burst apparently being 40 IRE. Thomas Harte 2017-07-07 23:35:14 -04:00
  • c7fa2ed11a It makes more sense not to retain the previous texture builder run until vertex storage is confirmed. Thomas Harte 2017-07-07 23:21:25 -04:00
  • 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. Thomas Harte 2017-07-07 22:25:05 -04:00
  • 7476c64a66 Merge branch 'master' into BufferOverflow Thomas Harte 2017-07-07 21:11:07 -04:00
  • 46fff8e8a2 Ensured bit 8 is uniquely from the latched video byte, not an OR of that with the refresh address. Thomas Harte 2017-07-06 22:48:48 -04:00
  • cd646aab9e Merge pull request #141 from TomHarte/ZX81FastLoading Thomas Harte 2017-07-06 22:39:19 -04:00
  • 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. Thomas Harte 2017-07-06 22:33:54 -04:00
  • 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. Thomas Harte 2017-07-06 22:33:03 -04:00
  • 84d0e9b4cd Accept a pulse that begins exactly on seek_time as being found while seeking. Thomas Harte 2017-07-06 22:31:45 -04:00
  • a53011f778 Extended intro and outro length because right now I'm racing this myself. Can return to normal once tape motor control is implemented. Thomas Harte 2017-07-06 22:31:12 -04:00
  • b842c5b8bb Merge branch 'master' into ZX81FastLoading Thomas Harte 2017-07-06 22:03:24 -04:00
  • ab1374f801 Added an assert on an assumed buffer size alignment. Thomas Harte 2017-07-06 21:46:24 -04:00
  • a5359027f0 Merge pull request #140 from TomHarte/ColourSuppression Thomas Harte 2017-07-06 21:42:02 -04:00
  • 43951a36eb Merge branch 'master' into ColourSuppression Thomas Harte 2017-07-06 21:40:42 -04:00
  • 55df96491c Merge pull request #139 from TomHarte/TyperFixes Thomas Harte 2017-07-06 21:40:15 -04:00
  • 0c037627fc Typer fixes: the recipient no longer releases the caller, and a duplicate call to strlen and piece of arithmetic is corrected. Thomas Harte 2017-07-06 21:17:04 -04:00
  • 344d267fd2 Introduced sharper chrominance for genuinely black-and-white signals. Thomas Harte 2017-07-06 21:38:33 -04:00
  • 4211389ac7 Connected machine-supplied colour burst amplitude to shader, discarding hard-coded value. Net effect: the colour component is now discarded for the ZX80 and 81. Thomas Harte 2017-07-06 21:29:08 -04:00
  • c6d00ec7d1 Switched phase and amplitude varying to a 3d vector; the third component is 1/amplitude if amplitude is non-zero, and zero otherwise. So you can multiply by that to get chrominance, rather than dividing by amplitude. With the direct effect that detected chrominance should automatically be zero if the colour burst didn't exist (i.e. had zero amplitude). Thomas Harte 2017-07-06 21:25:38 -04:00
  • 212ae60622 Typer fixes: the recipient no longer releases the caller, and a duplicate call to strlen and piece of arithmetic is corrected. Thomas Harte 2017-07-06 21:17:04 -04:00
  • a72a2e0a1a Ensured tape doesn't proceed of its own volition when in fast-loading mode. Thomas Harte 2017-06-23 20:21:37 -04:00
  • 50375fb373 Ensured tape position is unaffected if the attempt at loading quickly fails. Thomas Harte 2017-06-23 20:18:19 -04:00
  • 2d02c23574 Merge pull request #138 from TomHarte/ZX81Ports Thomas Harte 2017-06-23 08:32:21 -04:00
  • cb105fdeb4 Took a first stab at high-res support. Thomas Harte 2017-06-22 22:48:17 -04:00
  • acfd4dde36 Reduced port writes which can adjust programmatic sync, and prevented anything while NMI generation is active. Moved line counter increment from triggered by interrupt acknowledge to triggered by horizontal sync. In both cases, cribbing from my own earlier work. Initial results suggest that sync issues are resolved in third-party software. Thomas Harte 2017-06-22 22:44:06 -04:00
  • 919fc48cc5 Fixed dumb out-of-bounds access error. Thomas Harte 2017-06-22 22:28:50 -04:00
  • aec4fd066b I think I've definitively decided against this model of timing. Thomas Harte 2017-06-22 21:32:14 -04:00
  • 73c7b18900 Added a public declaration of ZX80/81 support to the readme. Thomas Harte 2017-06-22 21:14:43 -04:00
  • 3dfe45d225 Merge pull request #137 from TomHarte/NMIWaitTest Thomas Harte 2017-06-22 21:11:54 -04:00
  • 95a6b0f85c Introduced an NMI/wait interrupt timing test, and adjusted the Z80 to conform to information posted by Wilf Rigter. Thomas Harte 2017-06-22 21:09:26 -04:00
  • 87ee8450fe Minor rejig: it's much more likely that something that can't be distinguished is a ZX81 program. TODO: some sort of BASIC token parsing, to be more confident. Thomas Harte 2017-06-22 20:23:14 -04:00
  • f2a6bcf2a8 Merge pull request #136 from TomHarte/ZX8081Options Thomas Harte 2017-06-22 20:21:28 -04:00
  • 644ef13acd Connected up the fast-tape GUI option for the ZX80 and '81. Thomas Harte 2017-06-22 20:20:31 -04:00
  • 342574761f Merge pull request #135 from TomHarte/InterruptWaitStates Thomas Harte 2017-06-22 20:15:54 -04:00