Commit Graph

  • 570d25214e Made an initial attempt at typer support for the CPC. Thomas Harte 2017-08-11 11:21:07 -04:00
  • f0b7e58968 Merge pull request #185 from TomHarte/CPMCatalogue Thomas Harte 2017-08-11 11:00:49 -04:00
  • 0411b51582 Added an attempt to deal with 16-bit allocation units, and to ensure middle-of-file holes are respected. Thomas Harte 2017-08-11 10:59:37 -04:00
  • dea782cff9 Added a "yeah, I don't know" fallback. Thomas Harte 2017-08-11 10:47:45 -04:00
  • 388dd99762 Advanced this just enough to suggest a loading command for most things. Thomas Harte 2017-08-11 10:47:12 -04:00
  • 026101a268 Killed logic_extents_per_physical, since I don't know how to handle it, and instituted tracks, to allow a decision about short versus long allocation units. Thomas Harte 2017-08-11 10:46:50 -04:00
  • 734099a956 Threw a sector cache into my MFM parser, in an attempt to cut down analysis costs. Also made it aware of multiple heads. Thomas Harte 2017-08-11 10:29:13 -04:00
  • 6be5851484 Cleaned up. Thomas Harte 2017-08-10 22:34:29 -04:00
  • 994179f188 Taking a whole bunch of guesses, this might be correct. Thomas Harte 2017-08-10 22:33:08 -04:00
  • 6a65c7a52a Started working on a CPC-oriented analyser; for now I just want to be able to make a good guess at the appropriate file to load from a disk. As it turns out, the CPC simply adopts the CP/M format, so a generic parser is appropriate. This is its beginning. Thomas Harte 2017-08-10 17:10:21 -04:00
  • 0d2d3ea17c Merge branch 'master' into DeferredVideo Thomas Harte 2017-08-10 16:01:02 -04:00
  • 5d374ebb18 Merge pull request #184 from TomHarte/DeferredVideo Thomas Harte 2017-08-10 16:00:39 -04:00
  • 62eadbb51a Adjusted gamma ratio to be the correct way around. The PAL midrange should be slightly darker now. Thomas Harte 2017-08-10 15:36:27 -04:00
  • ad8c8166bc Built in gamma conversion for all machines, assuming an output of 2.8 for PAL, 2.2 for NTSC. Thomas Harte 2017-08-10 15:17:08 -04:00
  • a5593bec79 Threw in support for the light-pen trigger. Thomas Harte 2017-08-10 15:00:14 -04:00
  • a1e2646301 Imposed counter size limits. Thomas Harte 2017-08-10 14:58:24 -04:00
  • cf810d8357 Minor: ensure the CRT is set to output as a monitor. Thomas Harte 2017-08-10 14:42:47 -04:00
  • f258d6fbb2 Merge pull request #183 from TomHarte/6845Address Thomas Harte 2017-08-10 12:51:40 -04:00
  • 4961fda2a9 Ensured counter-intuitive CRTC writes get through, taking the opportunity to correct my handling of port IO in general: selecting multiple devices for input results in a logical AND (i.e. open collector mode), and both the CRTC and gate array will receive data from 'input's if applicable. Thomas Harte 2017-08-10 12:39:19 -04:00
  • 6a6e5ae79c Forced users of the 6845 to be explicit about which type. So far with no effect. Thomas Harte 2017-08-10 12:28:57 -04:00
  • 02d792c003 Simplified logic slightly, avoiding repetition. Thomas Harte 2017-08-10 11:48:37 -04:00
  • be8e7a4144 Eliminated false register aliasing, restricted register sizes and locked out reading and writing where appropriate. Thomas Harte 2017-08-10 11:22:30 -04:00
  • b1dbd7833a Merge branch 'master' into 6845Address Thomas Harte 2017-08-10 11:15:08 -04:00
  • 84ab05c5ef Merge branch 'BetterFDC' Thomas Harte 2017-08-10 11:14:53 -04:00
  • 78138261c2 Merge pull request #182 from TomHarte/BetterFDC Thomas Harte 2017-08-10 11:14:08 -04:00
  • a4c910f1de This appears to be a more accurate take on 6845 address advancement — it is necessary that character output has finished for the line address to be updated. Thomas Harte 2017-08-10 11:12:53 -04:00
  • 2eed24e859 Made an initial attempt at [a subset of] multi-sector reads. Thomas Harte 2017-08-10 11:11:26 -04:00
  • 7d1023ea98 Added a 'ready' getter to Drive, formally to let the drive take ownership of that test. Thomas Harte 2017-08-08 21:15:56 -04:00
  • b11d142cff Switched to descriptive names. Thomas Harte 2017-08-08 20:35:41 -04:00
  • 021ff8674e Added something for sense drive status. Thomas Harte 2017-08-08 20:30:54 -04:00
  • 1b86bc21ab Might as well get official on my ongoing efforts at CPC emulation. Thomas Harte 2017-08-08 17:58:54 -04:00
  • e3d1f4fe1e Subjectively, this might be more correct. It definitely prevents intermediate frequencies. More research required. Thomas Harte 2017-08-08 17:58:35 -04:00
  • a7452aebff Merge pull request #181 from TomHarte/6128 Thomas Harte 2017-08-08 16:06:31 -04:00
  • 484524d781 Implements RAM paging. The 6128 is now emulated. Thomas Harte 2017-08-08 16:01:56 -04:00
  • dbf9927caf Merge branch '8255Modes' Thomas Harte 2017-08-08 07:44:56 -04:00
  • 3bdedfd749 Improved comments. Thomas Harte 2017-08-08 07:44:46 -04:00
  • 005084af3d Merge pull request #180 from TomHarte/6845FrameLength Thomas Harte 2017-08-08 07:37:48 -04:00
  • 46278ff297 Experimental: is this meant to be a compare-before-increment? Thomas Harte 2017-08-07 23:02:29 -04:00
  • d73dcbb268 Merge pull request #179 from TomHarte/AYDirection Thomas Harte 2017-08-07 19:58:39 -04:00
  • 390ecec3d9 Added: now declines to pass on output if in input mode for ports A and B. Thomas Harte 2017-08-07 19:56:22 -04:00
  • 41a30c147d Adjusted: invalid register selection simply deselects all registers. Thomas Harte 2017-08-07 19:51:36 -04:00
  • 4709ae80cb Added port direction tests. Thomas Harte 2017-08-07 19:36:55 -04:00
  • 7fbb455836 Per the CPC test I'm checking, 0s should be returned for non-retained bits, not 1s. Thomas Harte 2017-08-07 19:07:12 -04:00
  • 745afd217f The port input/output flags are now honoured; reading a port that is set as an output returns the current output value. Thomas Harte 2017-08-07 19:01:18 -04:00
  • 4427e9a254 Merge pull request #178 from TomHarte/CPC664 Thomas Harte 2017-08-07 18:39:33 -04:00
  • 2b0dcf8573 Transcribed the status bits that I think actually need to be obeyed. Thomas Harte 2017-08-07 12:37:45 -04:00
  • 47732ffb98 Prevented the 8272 from overreading ID fields (and, by doing so, overrunning its internal buffer). Exposed the MFMController's CRC generator for inspection. Thomas Harte 2017-08-07 12:37:22 -04:00
  • d07f3216ab Added a broad phase on whether seeking is ongoing. Thomas Harte 2017-08-07 12:12:59 -04:00
  • 56d65ba6f3 Adapted slightly, to retain the ability to advertise an incorrect size, to adjust the confusion I've created by having two different types of thing both called new_sector, and to print a warning when ignoring error flags. Thomas Harte 2017-08-07 12:12:04 -04:00
  • 895a3cbf24 Corrected reading of the track size table for extended disks. My first extended disk has now loaded. Thomas Harte 2017-08-07 11:38:19 -04:00
  • d951c8c1c2 Fixed search for track start position with extended disks: it's no longer an infinite loop. So that's a pretty good performance improvement. Thomas Harte 2017-08-07 11:36:29 -04:00
  • a294963e98 Made an absolutely basic attempt to accommodate some extended disk images. Thomas Harte 2017-08-07 11:26:15 -04:00
  • 68c73184b1 Had failed to spot that by taking control of stepping at this level, the appropriate invalidate_tracks were not being sent. Thomas Harte 2017-08-07 10:36:53 -04:00
  • 7f824d6494 Ensured seeks and recalibrates end immediately if no seeking is required. Thomas Harte 2017-08-07 10:31:32 -04:00
  • 3219212f03 A closer inspection of the data sheet seems to suggest that invalid command sequences will post ST0. Thomas Harte 2017-08-07 07:35:41 -04:00
  • d90e35e5bd Added a bunch of comments, and ensured that the data request bit remains set for the entire period that command bytes are accepted. Thomas Harte 2017-08-07 07:27:00 -04:00
  • 73f8488150 Reaching the end of the usable part of my day, decided to tidy up a little before bed with indentation that reflects a distinction between top-level entry points and mere loops. Thomas Harte 2017-08-06 22:14:18 -04:00
  • 3853966a1e Removed formal storage of ST3, as it just seems to be composed live. This may turn out also to be the best way to deal with ST0–2, time will tell. Also took a stab at the error in responding properly to the ROM's intended use of seek might be accepting new commands as replacements for old ones rather than rejecting them. That didn't seem to do the trick. Thomas Harte 2017-08-06 22:10:12 -04:00
  • d63893a437 Collapsed implementations of recalibrate and seek, and decided to intend to go for an upward count on steps taken rather than a downward one. But seek continues presently to fail. Thomas Harte 2017-08-06 21:52:52 -04:00
  • 90c74043f5 Remembered to toggle off RQM between bytes. CAT now works. Thomas Harte 2017-08-06 21:21:59 -04:00
  • 600445d90a Made a first attempt to return sector contents. Thomas Harte 2017-08-06 20:40:29 -04:00
  • e4b405fd3d With the ROM now using a read ID to set its expectations, implemented that and fixed FIND/READ_HEADER macros for multiple use. Execution now reaches the unimplemented section of read data. Thomas Harte 2017-08-06 20:32:46 -04:00
  • 3b7ecbdf0d Renamed result_ to result_stack_ to emphasis the fact that it goes backwards. Switched meaning of CB so that it is set for the entire command, execution and result phases. Thomas Harte 2017-08-06 20:17:12 -04:00
  • 01efb645cb Took a reasonable gamble that the CHRN reported is from internal registers, not from the last-found header. Thomas Harte 2017-08-06 19:57:34 -04:00
  • b5ec1f42d5 Started resetting 'busy' when entering the result phase. AMSDOS now complains of a missing disk after failing to find sector 01. My belief is that it should end up asking for C1. So this is not even getting through a failure to find a sector correctly yet. Thomas Harte 2017-08-06 19:48:17 -04:00
  • c839556a27 Fixed: rewind the file to check for 'EXTENDED' if 'MV - CPC' failed. Thomas Harte 2017-08-06 19:47:10 -04:00
  • e9972aa0dd Added respect for the index-hole limit on reading, and an error phase. Thomas Harte 2017-08-06 19:25:44 -04:00
  • 1c9a744b01 Made an effort to start inspecting ID fields, at least. Discovered that my emulation has somehow stopped proceeding beyond sense interrupt status though. Fix one in that area: adjust ST0 just in time for the sense interrupt status response, as that'll need to specify the drive number properly. Thomas Harte 2017-08-06 18:06:20 -04:00
  • e6d4bb29d8 Discovered correct sense interrupt status result if nobody is in the completed seeking state, and switched to it. It's a single 0x80 rather than two bytes. Thomas Harte 2017-08-06 15:34:33 -04:00
  • 6c5b562d97 Made an attempt at some of the correct seek/recalibrate behaviour: it's now asynchronous from command processing and able to work on up to four drives at once. I just probably am not yet hitting all the status flags I need to hit. Thomas Harte 2017-08-06 15:22:07 -04:00
  • a7103f9333 Disks are now communicated to the 8272. Which is able to handle four of them. Thomas Harte 2017-08-06 13:24:14 -04:00
  • c12425e141 Added storage for the extended four status registers, and made an attempt at implementing the two most trivial result-phase commands. Am slightly paused momentarily trying to figure out whether seek activity is orthogonal to read/write activity. Thomas Harte 2017-08-06 12:55:57 -04:00
  • 89f6de1383 Started on a real ugly-implementation coroutine approach, and implemented specify as a fairly trivial first command: it has no result phase, and is the only thing called by AMSDOS as part of the initialisation sequence. Thomas Harte 2017-08-06 12:36:18 -04:00
  • 77da582e88 Switched the container in which events are passed to int, with the intention of subclasses extending the receivable range. Thomas Harte 2017-08-06 12:35:20 -04:00
  • 34eaf75352 Fixed WAIT_FOR_TIME macro. Thomas Harte 2017-08-06 12:08:54 -04:00
  • ffadb04761 Documented, and removed a couple of Event types that are WD-specific but had accidentally flown into here. Will need to figure out how best to expose the CRC result too, but I'm willing to let that one drop out naturally as I implement the 8272. Thomas Harte 2017-08-06 11:36:36 -04:00
  • 29288b690e Switched disk controllers to be instantiated explicitly in terms of cycles, created an Amstrad-specific subclass of the 8272 to record the direct programmatic availability of all disk motors bundled together, and otherwise adjusted to ensure the thing is clocked and that the motor is enabled and disabled appropriately. The 8272 is also now formally a subclass of the incoming MDM controller. Thomas Harte 2017-08-06 09:45:16 -04:00
  • 25fd3f7e50 Mildly increased work in here, still primarily oriented towards logging what I actually need to get done. Thomas Harte 2017-08-05 22:26:59 -04:00
  • 4d60b8801c Started trying to factor out just the PLL stream -> FM/MFM events part that is presently in the WD1770. Thomas Harte 2017-08-05 22:26:15 -04:00
  • 3e984e75b6 Strung up an empty shell that eventually should contain the 8272, and added appropriate IO decoding to the Amstrad. Thomas Harte 2017-08-05 19:45:52 -04:00
  • 9e8645ca7a Fixed ROM paging port decoding. It should have been fd00 if completely decoded, not df00, but also shouldn't be completely decoded. Thomas Harte 2017-08-05 19:24:03 -04:00
  • caf3ac0645 Sought: (i) to instruct the CPC that it should be a 664, not a 464, if given a disk image (at least until I have RAM paging implemented for a 6128); (ii) to support ROM selection within the CPC and allow paging in of AMSDOS. Thomas Harte 2017-08-05 19:20:38 -04:00
  • 0f4343cd84 Merge pull request #177 from TomHarte/DSKFileFormat Thomas Harte 2017-08-05 11:55:13 -04:00
  • 192f232d3f Silenced warnings. Thomas Harte 2017-08-05 11:53:29 -04:00
  • 6e4d3b8a77 Added enough logic to produce some sort of version of a completely unprotected DSK. So enough to start bootstrapping an FDC emulation, at least. Thomas Harte 2017-08-05 11:44:53 -04:00
  • 8eda24261c Removed unnecessary header — it's implied by being a child of FileHolder. Thomas Harte 2017-08-05 11:44:06 -04:00
  • 75c59fefab Added an empty husk to begin support for Amstrad CPC disk image formats. Thomas Harte 2017-08-05 10:02:10 -04:00
  • 4b19cf60df Added omitted semicolon. Thomas Harte 2017-08-05 09:18:55 -04:00
  • 2b476554e7 Merge pull request #176 from TomHarte/AYDeferrer Thomas Harte 2017-08-05 09:13:47 -04:00
  • b3788fed41 Fixed AY queuing behaviour as handled by the Amstrad. I think I need to come up with clearer semantics here. Thomas Harte 2017-08-05 09:12:17 -04:00
  • b999c1d8aa Merge branch 'FilteredSync' Thomas Harte 2017-08-04 16:52:14 -04:00
  • a63aa80dc9 Merge branch 'master' of github.com:TomHarte/CLK Thomas Harte 2017-08-04 16:51:52 -04:00
  • 63f57c8c4f Adjusted visible portion of frame; completely empirical, as I'm chasing a machine that shipped with a monitor. Thomas Harte 2017-08-04 16:50:58 -04:00
  • 7e6a6365c9 Adjusted visible portion of frame; completely empirical, as I'm chasing a machine that shipped with a monitor. Thomas Harte 2017-08-04 16:50:58 -04:00
  • 3dbf26ac49 Merge pull request #175 from TomHarte/FilteredSync Thomas Harte 2017-08-04 16:38:52 -04:00
  • f075fea78c Introduces filtering of the CRTC's vsync signal into the gate array. Thomas Harte 2017-08-04 16:36:55 -04:00
  • cc8380c286 Merge pull request #174 from TomHarte/ProperBorder Thomas Harte 2017-08-04 12:15:22 -04:00
  • c0f0c68f4f Corrects quick-hack version of border drawing: the assumption that the colour must be the same over a plotted period. Also corrects my entry for colour 15. Thomas Harte 2017-08-04 12:13:05 -04:00
  • c2bb019381 Merge pull request #173 from TomHarte/TimingFixes Thomas Harte 2017-08-04 09:06:42 -04:00
  • 26ce6cdab2 Permitted register 3 to dictate vertical sync length. Thomas Harte 2017-08-04 08:56:36 -04:00