1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-07-04 18:29:40 +00:00
Commit Graph

147 Commits

Author SHA1 Message Date
Thomas Harte
8b1ec827e0 Made an initial, very naive attempt to recognise two types of expanded cartridge: those with a superchip and those with a CBS RAM+, in both cases by looking for instructions that appear to write into cartridge space. 2017-02-26 17:11:57 -05:00
Thomas Harte
153525f23d Extended quality of known address read/write/modify mapping, and started recording internal accesses in addition to external. 2017-02-26 17:10:33 -05:00
Thomas Harte
87afa9140e Took some provision steps towards paging type autodetection and communication. But I think this is a distraction. 2017-02-20 17:44:36 -05:00
Thomas Harte
7ab6023a0c Ensured no attempt to call strcmp on null if a file name without an extension got into here. 2017-02-11 13:36:36 -05:00
Thomas Harte
f3d9aec8fc Fixed Electron's support for automatically booting floppy disks. 2017-01-08 14:47:41 -05:00
Thomas Harte
e5cc77f22d Added an extra sanity check. 2016-12-30 17:29:51 -05:00
Thomas Harte
beaa868079 Factored the MFM parser out into encodings. 2016-12-25 20:00:57 -05:00
Thomas Harte
4d3bdf8c7c Fixed failure to initialise the Microdisc flag if loading a tape. 2016-12-06 20:29:05 -05:00
Thomas Harte
59e2a09107 Added assumption that Microdisc => BASIC 1.1. 2016-11-22 08:12:24 +08:00
Thomas Harte
ea33a28695 Any Oric-format disks that are inserted now make it all the way to the Oric, along with a request to emulate the Microdisc. It has received a copy of the ROM. The ball is entirely in its court now. 2016-11-21 20:59:25 +08:00
Thomas Harte
8499783b14 Dragged multibyte primitives and signature checks up to the base class. Implemented support for Oric MFM-style .DSK, at the file format level. 2016-11-21 20:47:16 +08:00
Thomas Harte
8b40ae03ca Extended analysis to spot IRQ and NMI vector changes, for titles that simply adjust those then exit. Ensured Oric emulator can type and load quickly on an Oric 1 just as well as on an Atmos. 2016-11-15 11:05:53 +08:00
Thomas Harte
e2cdfae8a7 The emulated Oric now has access to both versions of the BASIC ROM and picks between them based on the static analyser's recommendation. 2016-11-15 10:39:16 +08:00
Thomas Harte
ab64731d51 Fixed off-by-one recording of disasssmbled addresses; added logic to the Oric static analyser to try to guess between BASIC 1.1 (the preferred option in a tie-break or if no information is found) and BASIC 1.0. 2016-11-15 10:31:47 +08:00
Thomas Harte
1bffc70494 In theory that's a full disassembler, at least as far as I want to go for now. Time to test. 2016-11-15 08:19:57 +08:00
Thomas Harte
a5fc45e66e Started fleshing this out; addressing modes are completely decoded, along with a bunch of opcodes, but appropriate address advancement isn't in yet, and neither is filling in derived metadata. 2016-11-14 12:19:09 +08:00
Thomas Harte
1b66847647 Started trying to implement something sufficient of a 6502 disassembler. 2016-11-11 20:10:58 -05:00
Thomas Harte
c257e7f58d Implemented better sync-to-zero and discovered a header counting bug plus, probably, a misleading representation of gaps in the Oric TAP decoder. 2016-11-07 20:17:06 -05:00
Thomas Harte
80702616ea Had a quick go at using the Oric parser for static analysis. Found out that synchronisation is lost. Need to investigate. 2016-11-06 22:56:38 -05:00
Thomas Harte
353c1c8ea3 Shifted ownership of PETSCII -> string conversion down to the storage layer, where it's useful for tape parsing. 2016-11-06 18:43:51 -05:00
Thomas Harte
1b15bc3a6c Started relocating the tape parsers down from static analyser to storage, to signify that they may be used by the emulation (if fast loading is supported on that machine). 2016-11-06 16:13:13 -05:00
Thomas Harte
093eb55fc6 The parsers no longer own a tape, merely taking one as an argument. So they can be an adjunct. 2016-11-06 15:25:18 -05:00
Thomas Harte
8c70dc5891 Implemented typer for the Oric, and I'm starting to think the code is a bit too repetitious. Refactoring will be forthcoming. Added CLOAD"" as the loading command for all Oric software. 2016-11-03 22:14:40 -04:00
Thomas Harte
4a062c616f Added enough wiring to get Oric TAPs through to a completely unimplemented Oric emulation. 2016-10-11 22:20:13 -04:00
Thomas Harte
df01c78039 It's a bit of a mess but this is probably close to appropriate for Oric TAP files. 2016-10-11 07:39:48 -04:00
Thomas Harte
2411f192f7 Switched back to full typing, even for DFS loading. It saves having to worry about sideways RAM filing systems and shift (if that's even the issue). 2016-10-01 21:09:28 -04:00
Thomas Harte
abf47efd40 Factored out Commodore is-a-ROM test, allowing it to be used from the Commodore analyser and thereby allowing ROMs to get as far as the machine again. 2016-09-29 19:39:13 -04:00
Thomas Harte
79412dc84d Upped MFM clock cycles, switched back to using the typer for the ADFS and adjusted ADFS ROM slots. 2016-09-28 21:28:34 -04:00
Thomas Harte
572d5587d9 Made a first stab at enabling multi-disk machines and thereby obeying (some of) the Plus 3's status register. 2016-09-25 21:24:16 -04:00
Thomas Harte
9bbcbd1001 Renamed class, intending to turn a Disk::Drive into literally just that, and have a thing with a PLL that consumes events be a Controller. 2016-09-25 20:05:56 -04:00
Thomas Harte
7f4c78139c Attempted to ensure that ADFS disks get to an appropriately-configured Electron. Not immediately sure why the shift press isn't working; doesn't need to be dealt with immediately. 2016-09-25 19:59:46 -04:00
Thomas Harte
523dbb9678 This'll do for getting the ADF into the machine. 2016-09-25 18:32:26 -04:00
Thomas Harte
de863719d0 Made a first attempt at Acorn ADFS support plus the start of a suitable analyser. 2016-09-25 17:46:11 -04:00
Thomas Harte
6084020ab3 Added shift-break as a better way to boot suitable disks. Continued attempting to clean the 1770. 2016-09-25 14:11:22 -04:00
Thomas Harte
67b54269c9 Added typer support for loading from DFS. It'll do for now. 2016-09-24 22:52:49 -04:00
Thomas Harte
a9e65e9b7a Tweaked disk side density, added call-outs to a WD1770 if the Electron had one (albeit without run_for_cycles yet as I need to figure out the clock rate), added a shell of the basic functions of the WD1770. No implementation yet. 2016-09-19 22:06:56 -04:00
Thomas Harte
c9dd07cecd DFS disks are now delivered right up to the emulator's front door. So everything's in place to get started on that WD1770 nonsense. 2016-09-19 08:29:23 -04:00
Thomas Harte
e025768604 Two passes of the index hole => no sector found. 2016-09-19 08:17:07 -04:00
Thomas Harte
64f2538b1f Added CRC checking to DFS comprehension; fixed a bunch of places where I'd used Objective-C's #import rather than #include. 2016-09-19 08:16:06 -04:00
Thomas Harte
c58cdbf151 Minor tweak to support zero-length files. 2016-09-19 07:37:11 -04:00
Thomas Harte
ca4df5dd61 Introduced a full container for disk catalogues, so as also to capture non-file information, and 'completed' (i.e. albeit that CRC checking is still absent) DFS catalogue decoding. 2016-09-19 07:35:02 -04:00
Thomas Harte
231f3dd0f4 This is exactly as far as I'm going to get with DFS parsing today, I think. 2016-09-18 22:18:01 -04:00
Thomas Harte
b1e7f2dfd0 There's no cache and no CRC checking yet, but this is probably a rough outline of an FM parser. 2016-09-18 22:03:06 -04:00
Thomas Harte
0ce901bd48 Added necessary wiring to get as far as asking an arm of the analyser to check out an Acorn disk image. 2016-09-18 21:18:11 -04:00
Thomas Harte
91cd7e143b Started on the SSD/DSD support. Realised I had ommitted multiple head support from my disk class. Fixed that. 2016-09-18 19:21:02 -04:00
Thomas Harte
5ebca62bba Now the CRC is a factoring out. 2016-09-18 18:35:50 -04:00
Thomas Harte
bfed9585b8 Added a sector cache to avoid having to re-decode things five times over. 2016-09-17 22:01:54 -04:00
Thomas Harte
ee8510984f Added just enough wiring to restore the 2600 to functionality. 2016-09-15 19:34:45 -04:00
Thomas Harte
92af19098c Improved file naming. 2016-09-15 19:24:59 -04:00
Thomas Harte
1d8fbe9068 With minor cleaning, this should now do Commodore disks correctly (?) 2016-09-15 19:21:09 -04:00
Thomas Harte
9827466297 Minor post-haste cleaning. 2016-09-15 07:58:32 -04:00
Thomas Harte
8992feb8cd Completed a first parse at the GCR parser, proving how incredibly slow my drive is. 2016-09-15 07:54:42 -04:00
Thomas Harte
9d6dcb80a7 Started work on a GCR parser and the helper functions that lie behind that. 2016-09-13 21:53:36 -04:00
Thomas Harte
df7aed7e8b The Commodore analyser now at least hands off to somebody else a chance to parse disks. 2016-09-13 07:26:51 -04:00
Thomas Harte
40660fe680 Made yet another guess at Commodore analysis. Elevated fast tape-related unnatural speed up to the OS-side mechanisms. 2016-09-12 22:06:03 -04:00
Thomas Harte
eeec516fa6 Implemented seeking on tapes, mucked about a bit more with the Commodore analyser, at least temporarily removed cropping from the Vic emulator. 2016-09-11 17:09:00 -04:00
Thomas Harte
1ca4a2a012 Sought to be more intelligent in handling cases where the two parts of a header or data field don't match — if either looks good then use it in isolation. 2016-09-10 17:01:17 -04:00
Thomas Harte
a5b17932ca Attempted further to improve memory model guesswork. With many further improvements to make... 2016-09-08 21:09:37 -04:00
Thomas Harte
27fedaf892 The error flag is no longer directly exposed. I also tweaked the Commodore import numbers just a touch. But I think I need proper calibration. 2016-09-08 21:09:05 -04:00
Thomas Harte
2b053436e5 Missed from previous commit; removed assumption that get_next_data always succeeds. 2016-09-08 07:39:43 -04:00
Thomas Harte
54557d7f13 Added reminder, ensured the couldn't-find-data case doesn't cause a crash. Though it should imply some manual investigation. 2016-09-08 07:39:17 -04:00
Thomas Harte
50175a9aed Added logic to try to spot when the first program is BASIC and, if so, what the correct memory model is, then to get that information to the Vic. Though it currently then gets overwritten by the view controller. Grrrr. 2016-09-07 22:17:19 -04:00
Thomas Harte
556b77f2fd Added some TODOs, re-enabled master Acorn decision. 2016-09-07 07:39:47 -04:00
Thomas Harte
6522a9a6c2 Pulled the strands together provisionally to complete Commodore ROM-format tape parsing. Things are going to get complicated if or when I need to tackle turbo loaders. 2016-09-07 07:34:48 -04:00
Thomas Harte
d66516fd62 Finished parser for data blocks. 2016-09-06 22:10:33 -04:00
Thomas Harte
bdebc18e0a Added a header parser for Commodore tapes. No time to grab file bodies now; time to go to work. 2016-09-06 08:49:32 -04:00
Thomas Harte
8901e94f0f Fixed: was counting between low->high transitions rather than vice versa by adding low time then checking. 2016-09-06 07:06:46 -04:00
Thomas Harte
149cbb327b Made something of a first attempt at a parser. Which is failing terribly. 2016-09-06 06:59:51 -04:00
Thomas Harte
8b933182af Added enough wiring (hopefully) that the Commodore tape's GetFiles should be called when appropriate. 2016-09-06 06:39:40 -04:00
Thomas Harte
cfe8251166 Further documented interface, fixed a potential parsing blockage. 2016-09-05 22:12:52 -04:00
Thomas Harte
963e307d0c Increased documentation. 2016-09-05 22:06:39 -04:00
Thomas Harte
05c24222d8 Liberated the tape parser template. 2016-09-05 20:02:35 -04:00
Thomas Harte
463b74301d Sought to reduce the amount of heap nonsense. 2016-09-05 19:59:58 -04:00
Thomas Harte
11850b872d Sought to emulate 0111 as a longer 0110 to test a particular HQ UEF. Some progress. Not great. 2016-09-05 18:28:43 -04:00
Thomas Harte
6239297212 Fixed off-by-one error on filename lengths and order-of-operations mistake preventing data CRC from being checked. 2016-09-05 18:15:15 -04:00
Thomas Harte
e25fee2332 I'm going back to believing in this test. 2016-09-05 17:55:40 -04:00
Thomas Harte
68874b6080 Fixed accidental implicit assumption that Acorn files will be at least two blocks. 2016-09-05 17:53:57 -04:00
Thomas Harte
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. 2016-09-05 17:17:52 -04:00
Thomas Harte
6f62803814 Resolved dropping of every other file. 2016-09-01 08:35:28 -04:00
Thomas Harte
21e5f407d8 I need to get a bit more definitive on naming but this gets all the way to setting a configuration upon an Electron. 2016-08-31 22:03:42 -04:00
Thomas Harte
9d7962d6c0 Closed the loop on Electron analysis for now. Including loading command detection. 2016-08-31 20:24:13 -04:00
Thomas Harte
d8c0da7ccb I think this should lead to a full representation of files on an Acorn tape, but subject to is_at_end working. 2016-08-31 19:57:09 -04:00
Thomas Harte
7b5d5858ff CRCs are just stored reversed. Of course. So this should be sufficient to load each chunk of an Acorn file. 2016-08-30 08:13:40 -04:00
Thomas Harte
b3521ed187 Started working towards capturing everything there is to know about a file. CRC calculation appears to be flawed somehow at the moment. 2016-08-30 07:38:08 -04:00
Thomas Harte
6218f05b8c This loads the name. That'll do for now. 2016-08-29 22:05:06 -04:00
Thomas Harte
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. 2016-08-29 21:53:06 -04:00
Thomas Harte
0032ad2634 Edging ever onwards; killed forced attempt at uniformity in targets, sketched out the interface for a next-file-from call to Acorn tapes. 2016-08-29 21:10:38 -04:00
Thomas Harte
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. 2016-08-29 08:48:49 -04:00
Thomas Harte
d9f0065154 Sketched out just enough classes to get through the get-contents-into-memory step of static analysis. 2016-08-28 12:20:40 -04:00
Thomas Harte
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. 2016-08-27 18:26:51 -04:00
Thomas Harte
a1b3a18d11 Started forcing a resolution on ROMs by doing. But have immediately misstepped. Rename coming momentarily... 2016-08-27 18:17:40 -04:00
Thomas Harte
56c0d70c1f Gave disks their own namespace. 2016-08-27 17:15:09 -04:00
Thomas Harte
c0402d0c2b Gave tapes their own namespace. 2016-08-27 17:09:45 -04:00
Thomas Harte
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? 2016-08-27 16:40:21 -04:00
Thomas Harte
55ada536ac Added a test call, further mutated result structure. 2016-08-27 14:25:16 -04:00
Thomas Harte
e68ff64045 Actually, this is less prescriptive. 2016-08-27 13:42:51 -04:00
Thomas Harte
5ffd9e4f0d This is probably how the static analyser interface will look? 2016-08-23 21:35:59 -04:00