Commit Graph

  • 463b74301d Sought to reduce the amount of heap nonsense. Thomas Harte 2016-09-05 19:59:58 -04:00
  • 11850b872d Sought to emulate 0111 as a longer 0110 to test a particular HQ UEF. Some progress. Not great. Thomas Harte 2016-09-05 18:28:43 -04:00
  • 6239297212 Fixed off-by-one error on filename lengths and order-of-operations mistake preventing data CRC from being checked. Thomas Harte 2016-09-05 18:15:15 -04:00
  • e25fee2332 I'm going back to believing in this test. Thomas Harte 2016-09-05 17:55:40 -04:00
  • 68874b6080 Fixed accidental implicit assumption that Acorn files will be at least two blocks. Thomas Harte 2016-09-05 17:53:57 -04:00
  • 93f5b5303e Factored out the stuff I expect to be common to this tape nonsense, started looking at the one currently-failing tape. More on the latter to do. Thomas Harte 2016-09-05 17:17:52 -04:00
  • 6f62803814 Resolved dropping of every other file. Thomas Harte 2016-09-01 08:35:28 -04:00
  • 21e5f407d8 I need to get a bit more definitive on naming but this gets all the way to setting a configuration upon an Electron. Thomas Harte 2016-08-31 22:03:42 -04:00
  • bdc6a5635f Merge branch 'master' of github.com:TomHarte/CLK Thomas Harte 2016-08-31 21:21:37 -04:00
  • a9b67dfba0 Introduced an NSDocumentController subclass. Thomas Harte 2016-08-31 21:21:07 -04:00
  • 7bc2b6b161 Added the minor piece that will allow analysis results to be obtained from Objective-C, and exposed to Swift in sufficient detail for it to be able to pass on to the machine. Thomas Harte 2016-08-31 20:43:29 -04:00
  • 9d7962d6c0 Closed the loop on Electron analysis for now. Including loading command detection. Thomas Harte 2016-08-31 20:24:13 -04:00
  • d8c0da7ccb I think this should lead to a full representation of files on an Acorn tape, but subject to is_at_end working. Thomas Harte 2016-08-31 19:57:09 -04:00
  • 7b5d5858ff CRCs are just stored reversed. Of course. So this should be sufficient to load each chunk of an Acorn file. Thomas Harte 2016-08-30 08:13:40 -04:00
  • b3521ed187 Started working towards capturing everything there is to know about a file. CRC calculation appears to be flawed somehow at the moment. Thomas Harte 2016-08-30 07:38:08 -04:00
  • 6218f05b8c This loads the name. That'll do for now. Thomas Harte 2016-08-29 22:05:06 -04:00
  • 963a479908 Made a quick first attempt at getting a file name from Acorn tape, failing terribly but at least formalising tapes being able to signal their end. Thomas Harte 2016-08-29 21:53:06 -04:00
  • 0032ad2634 Edging ever onwards; killed forced attempt at uniformity in targets, sketched out the interface for a next-file-from call to Acorn tapes. Thomas Harte 2016-08-29 21:10:38 -04:00
  • d1abfc040c Addressed my dithering here: the file format containers themselves should do nothing but inspect the data to find out whether it is of the correct format. The machine steps are there for machine-specific validation. So it's probably easier to treat a binary ROM image just as a binary ROM image. Therefore, the Acorn-specific .rom detection is now in an Acorn-specific area. Thomas Harte 2016-08-29 08:48:49 -04:00
  • 29c972f4b8 Added hacky segue into analysis for all Electron formats. Added analyser to try to differentiate Acorn-format ROMs from other things called .rom, which are likely to be numerous. Thomas Harte 2016-08-28 12:43:17 -04:00
  • d9f0065154 Sketched out just enough classes to get through the get-contents-into-memory step of static analysis. Thomas Harte 2016-08-28 12:20:40 -04:00
  • 24938326ac ROMs definitely have no behaviour other than responding to memory accesses. Cartridges might. So picked the more general term. Sketched out a class at least to parse PRG as though it were a cartridge. Hence the static analyser can guess at whether a PRG is a cartridge or an ordinary program. Thomas Harte 2016-08-27 18:26:51 -04:00
  • a1b3a18d11 Started forcing a resolution on ROMs by doing. But have immediately misstepped. Rename coming momentarily... Thomas Harte 2016-08-27 18:17:40 -04:00
  • 82c8459055 Minor tidying of namespace usage declarations. Thomas Harte 2016-08-27 17:18:12 -04:00
  • 56c0d70c1f Gave disks their own namespace. Thomas Harte 2016-08-27 17:15:09 -04:00
  • c0402d0c2b Gave tapes their own namespace. Thomas Harte 2016-08-27 17:09:45 -04:00
  • 8c333059a8 Turning this into a slog: gave UEF a more appropriate name, got as far as now having to decide what to do about ROMs as to structure. I guess they're machine specific, so specific classes? Thomas Harte 2016-08-27 16:40:21 -04:00
  • 55ada536ac Added a test call, further mutated result structure. Thomas Harte 2016-08-27 14:25:16 -04:00
  • e68ff64045 Actually, this is less prescriptive. Thomas Harte 2016-08-27 13:42:51 -04:00
  • 1aebb4ea03 Merge remote-tracking branch 'origin/master' into FasterLoading Thomas Harte 2016-08-24 20:52:10 -04:00
  • 2f470843e2 Update README.md Thomas Harte 2016-08-24 09:21:01 -04:00
  • b3ae582c76 Update README.md Thomas Harte 2016-08-24 09:19:26 -04:00
  • f170991c78 Update README.md Thomas Harte 2016-08-24 09:18:35 -04:00
  • 5ffd9e4f0d This is probably how the static analyser interface will look? Thomas Harte 2016-08-23 21:35:59 -04:00
  • 0d077691b0 Resolved warning. Thomas Harte 2016-08-23 21:10:22 -04:00
  • dab3580111 Experimental: can I afford a lower sampling rate if there's a low-pass filter in effect? Thomas Harte 2016-08-22 22:18:05 -04:00
  • f937e08c91 Merge pull request #47 from TomHarte/PALAudioFrequency Thomas Harte 2016-08-21 20:45:09 -04:00
  • 1541273785 Moved responsibility for throwing in a low-pass filter up to the Vic, appropriately. Thomas Harte 2016-08-21 18:13:31 -04:00
  • c783090980 It turns out that the Vic has a 1.6Khz low-pass filter. So added that. Thomas Harte 2016-08-21 12:13:41 -04:00
  • 8d839c5278 I think this is correct. And have explained why. Thomas Harte 2016-08-20 16:54:43 -04:00
  • 7c9455251d Fixed reload for the lower-frequency audio channels. Thomas Harte 2016-08-19 17:34:01 -04:00
  • 99157ad6b2 Ensured the 6560 knows its real audio clock on a PAL machine; removed some stray semicolons. Thomas Harte 2016-08-19 13:35:34 -04:00
  • e985c72ce8 Removed a dead special case. Thomas Harte 2016-08-19 12:23:06 -04:00
  • 0cf3e25dd0 Merge pull request #46 from TomHarte/PRGTape Thomas Harte 2016-08-19 12:20:11 -04:00
  • 73ce67bee8 Added some documentation of the intention here. Thomas Harte 2016-08-19 11:04:59 -04:00
  • 4edd1214f1 This has now successfully loaded its first PRG-as-a-tape. Thomas Harte 2016-08-19 10:58:42 -04:00
  • 902c0f967a Implements known phase pattern for PAL output. Thomas Harte 2016-08-17 08:09:48 -04:00
  • 2935848f35 Adopted header/header/data/data pattern. But still not complete joy. Thomas Harte 2016-08-17 08:03:34 -04:00
  • e5523dbbed This gets through loading the first(/only?) copy. I tried repeating it with a bit-flipped header, now I'm trying repeating the header with a different file type. More documentation searching to do, I guess. Thomas Harte 2016-08-16 22:17:08 -04:00
  • 1bca9aa2bb Fixed parity: now calculated from the actual byte and works the other way around. The Vic now believes it is loading the actual program. So I guess bytes, headers and the lead-in is working. Thomas Harte 2016-08-16 21:41:09 -04:00
  • dfe9fb83ef This proves that bytes are being deposited properly. For the first 36 anyway, and with no announcement. Thomas Harte 2016-08-16 21:09:50 -04:00
  • 12f8aff65b Lengths I'd taken seem to have been for dipoles, not single poles. So I just doubled the clock rate. Also I was producing each dipole as high then low, when they should probably be low then high. The Vic now at least recognises that something is happening on the tape. Thomas Harte 2016-08-16 19:46:53 -04:00
  • 3a23d5d8cf Adjusted the check digit. Thomas Harte 2016-08-15 22:44:36 -04:00
  • dbe47f3f45 I've obviously misunderstood something as, as far as I'm concerned, this should at least get me a 'LOADING'. Thomas Harte 2016-08-15 22:40:05 -04:00
  • 7994148f55 I'm starting to make a little headway, I think: this performs lead-ins and countdowns, though with no actual data or anything as helpful as that. Thomas Harte 2016-08-15 22:10:53 -04:00
  • 7e2b4554ea This likely forms the Commodore dipoles correctly. It just stays stuck in leader tone forever is all. Thomas Harte 2016-08-15 20:08:50 -04:00
  • ca2dc6b6c4 Ensured ROMs survive in the new memory model. Thomas Harte 2016-08-15 19:56:01 -04:00
  • 38aec44d85 Made sufficient changes for the Vic itself to believe it can recast a PRG as a tape and insert it that way. So now the ball is in the court of: how the heck are Commodore tapes encoded? Thomas Harte 2016-08-15 19:44:41 -04:00
  • 3aa40212f3 Fixed minor documentation error; admitted that this class didn't invent the idea of a pulse. Thomas Harte 2016-08-15 19:37:21 -04:00
  • e59301b416 Merge pull request #45 from TomHarte/MemoryModels Thomas Harte 2016-08-14 20:01:19 -04:00
  • 547aefb696 Slightly adjusted PRG strategy, made a note about where next. Thomas Harte 2016-08-14 16:36:42 -04:00
  • 6079d30e58 Eliminated waiting here — either the buffer can be enqueued now or it is dropped. Thomas Harte 2016-08-14 16:20:24 -04:00
  • 48a00d9e05 ... which means that all files are now expected. Thomas Harte 2016-08-14 14:24:03 -04:00
  • 5373f6cc57 Completed setting of options, including mapping from country to ROM + television standard. Thomas Harte 2016-08-14 14:23:08 -04:00
  • b5af1746d5 Added a through path to the Objective-C for setting region and memory size. Thomas Harte 2016-08-14 14:14:59 -04:00
  • f15d89239f Made a stab at storage and restoration of country and memory size. Thomas Harte 2016-08-14 14:00:08 -04:00
  • df77c2a20a Added the XIB side of wiring for region and memory size options. Thomas Harte 2016-08-14 13:53:14 -04:00
  • d9016909ed Added some wiring for PAL/NTSC mode switching on the Vic, making an attempt to simplify the whole loop of having different clock rates. Thomas Harte 2016-08-14 13:33:20 -04:00
  • a547b7e1d8 Took basic steps towards supporting memory expansions. Thomas Harte 2016-08-13 17:21:25 -04:00
  • 0a13dd5c5b Merge pull request #44 from TomHarte/6560Template Thomas Harte 2016-08-12 20:58:34 -04:00
  • 142774be37 Collapsed 6560 template to a more direct loop, albeit with quite a bit still left to fix. Thomas Harte 2016-08-09 21:10:53 -04:00
  • 12bad8f23f Turned the 6560 into an ordinary template, similar to the rest of the project, albeit right now with a fairly shonky internal implementation. Fixed a Mac-specific interface sizing issue. Thomas Harte 2016-08-09 20:41:05 -04:00
  • 285a288c80 Switched to two cycles of options loading, meaning that they get set before files are inserted. Might need some further work? Thomas Harte 2016-08-07 21:48:09 -04:00
  • be54d8040e Made a first stab at having automatic loading be optional. But things are currently arranged such that the machine options are communicated too late to have an effect. So work to do. Thomas Harte 2016-08-06 17:39:27 -04:00
  • 3e65450a54 Converted the 6560 fully into a template; worked on allowing the typer to run at a much faster rate where hardware has some trigger by which it can request the next key. Thomas Harte 2016-08-06 14:33:24 -04:00
  • c6e046253e Shunted code for the main part up into the header, in advance of turning it into a template so as to bring it inside the normal orthodoxy. Thomas Harte 2016-08-05 19:13:49 -04:00
  • 9d76cd9b60 Removed dead instance storage. Thomas Harte 2016-08-04 21:41:12 -04:00
  • b46355331c Merge pull request #43 from TomHarte/NonSkippingTracks Thomas Harte 2016-08-04 21:39:18 -04:00
  • 3e90b85ff8 Made an attempt to insert proper conversions to/from rotational speed. The Time class is now really turning into a full-on quotient. Might need refactoring. Thomas Harte 2016-08-04 21:36:39 -04:00
  • e57ab1025d Fixed location calculation, up to a point. Thomas Harte 2016-08-03 22:33:00 -04:00
  • 9af9b28baf Made very first attempt at closing the loop on this. But it's time for work. Thomas Harte 2016-08-03 08:16:23 -04:00
  • e15241dc3c Added ability to query how long since the new interval was set to the timed event loop. Discovered that LCM will returning the net effect of the common factors only. Otherwise continued iterating towards time preservation. Thomas Harte 2016-08-03 07:49:00 -04:00
  • a3a3486f54 Okay, it's becoming more apparent where the (very mild) complexity will be here. But started moving towards retaining rotation between tracks. Thomas Harte 2016-08-03 07:33:26 -04:00
  • 21f1fa37a4 Fixed Time addition, added accumulation of distance into track into the disk drive, added a short circuit for LCM. Thomas Harte 2016-08-03 07:26:05 -04:00
  • 30f8b6baa4 Made an attempt to add the necessary extension to Track, with a concrete implementation in PCMTrack, to support time-based seeking, the intended mechanism for not magically spinning the disk back to the index hole upon every head step. Thomas Harte 2016-08-03 06:59:45 -04:00
  • d832e5e10d Reduced 1540 PLL to running at 4Mhz. Which is possibly correct (?) Made minor change to avoid divide if possible. Thomas Harte 2016-08-02 21:28:50 -04:00
  • 5d40d70c92 Fixed 6560 addressing error, added an autotyper for Vic disks (more work potentially needed), fixed semantics for testing whether a 6502 is about to reset. Thomas Harte 2016-08-01 10:32:32 -04:00
  • d74c3760fb Update README.md Thomas Harte 2016-08-01 10:19:25 -04:00
  • 95a3c42407 Merge pull request #42 from TomHarte/D64 Thomas Harte 2016-08-01 10:13:22 -04:00
  • bc10b3ee9a It appears the problem is as simple as sectors being counted from zero. Thomas Harte 2016-08-01 10:08:38 -04:00
  • f5e4ea3351 Some minor tidying, lots more of the caveman stuff as I try to determine what I'm doing wrong. Thomas Harte 2016-08-01 09:43:08 -04:00
  • a00f9adba3 Made a first attempt at D64 support. Made an error somewhere but this should be 90% of it. Thomas Harte 2016-08-01 08:41:16 -04:00
  • 58297f1baf Performed the basic metadata and routing for opening D64 files. Realised that I wasn't actually necessarily catching exceptions properly for all file opens, and fixed. Thomas Harte 2016-08-01 07:09:15 -04:00
  • ee2a7c9415 Added slightly to exposition, to match other formats. Thomas Harte 2016-08-01 06:54:57 -04:00
  • 2799a87218 Reduced possibility of overflow on LCM, improved commenting widely, removed one stale piece of G64 bootstrapping caveman stuff. Thomas Harte 2016-08-01 06:04:55 -04:00
  • a2ca94431e Merge pull request #41 from TomHarte/DiskDrive Thomas Harte 2016-08-01 04:43:07 -04:00
  • 18744cd98b Slightly updated comments, switched to 1540 ROM so as very slightly to improve loading time. Thomas Harte 2016-08-01 04:37:30 -04:00
  • b43a7381ae Fixed framing and first-byte-after-sync signalling. Hacked together as parts of it are, loading now appears to work! Thomas Harte 2016-08-01 04:25:11 -04:00
  • 41893b5ef6 Put in the absolute minimum logic for drive motor emulation. Drive appears to be attempting head steps. Thomas Harte 2016-07-31 19:38:51 -04:00
  • 740ea0b7e2 Added overflow-flag setting logic and ensured disk ROM gets through regardless of ROM/disk installation order. Thomas Harte 2016-07-31 19:33:18 -04:00