Work-In-Progress Reports for November 2004
FDC Emulator: MFM Data Generation & WinSTon: IPF Testing: Disk sector image to MFM Data conversion Since the IPF support is pretty much working, we spent a while working on the data conversion routine, which is used to load sector based images (for exmaple: .ST files) and convert them to MFM at runtime. We took the decision to make the tracks appear as if they were actually formatted by TOS. (more)
WDC1772 FDC Emulator and WinSTon Developments: To eliminate any possibility of the data bus being changed before it is used, a new value has been added to the API that represents the databus written at the point "now", while the original variable represents the databus contents up to the point of "now" so older code does not break. At the point of "now", naturally both variables are in sync. (more)
Atari ST Disk Images + FDC Implementation Notes: Updated WinSTon and Atari ST IPF Images If you did not realise yet, yes, we are using IPF images of original disks for testing, hence the reference to Copylock ST in a previous WIP update. Since we started the FDC emulation, the updated WinSTon has only been able to run IPF's. (more)
WinSTon Branching/Cycle Count Bug: Apparently there is a problem in WinSTon where the cycle counts come out incorrectly in certain situations, as described here and here in more detail. We took a look, and found the problem, which is described below. (more)
WDC1772 Type 3 Track Read: Finished the complete implementation of the Type 3 track read command, and this gets Copylock ST (non-density based version) working! The problem games from the previous WIP update now also work. (more)
WDC1772 Data Access Framework Complete (2): In the previous WIP update we talked about the various data access execution paths. Well, now (3) works - so real data is accessible to the FDC. It was quite a challenge to get every cycle right and still make it fast. (more)
WDC1772 Data Access Framework Complete: Disk access framework implemented. To enhance performance, only events that can happen within the specific context (i.e. non generic) are processed. This divides access into the following different execution paths: - Read line is not connected to the FDC, which happens when no drive is selected. (more)
Atari ST Disk System - Data Access & Timing: Work has started on the actual data access (read/write) related framework. Some existing functionality was changed to make sure changes that may affect a data access in progress happen only at the exact FDC clock cycle where they should. The emulation core always runs from the point of the last FDC clock cycle elapsed until a particular point - "now" (here on referred to as NOW). (more)
WDC1772 Type Commands: Morning Work Type Commands Implemented Type 4 (Forced Interrupt) FDC commands. Type 1..3 left to be done. Started implementing Type 1 commands. Remember, this is a cycle exact FDC emulator. (more)
WDC1772 FDC Framework: Implemented: * Generic FDC register/read write including side effects * FDC emulation loop * Motor control * FDC registers, status * Disk rotation * FDC idle state * Signals to host hardware * ...and other related things. Modified the interface to make running different types of FDC's possible in the future.
WDC1772 Drive/Track/Side Selection: A new call-back is available for changing the drive buffer used by the emulation code whenever the track or side changes. The drive and side select bits from the PSG were mapped to the FDC logic. All possibilities are supported as far as selection is concerned, but combining lines from the drives is not supported at the FDC logic level. (more)
WDC1772 Virtual Drives: Created virtual drives that can be attached to a virtual FDC. One FDC can control as many drives as needed, just like the real thing. However, emulation time can increase slightly with each one since all active drives have to emulate disk rotation and other related things, even if they are not selected. In the case of the Atari ST, this can be a maximum of two drives.
WDC1772 FDC Emulation: Changed the indirect line signal system to a direct call back system since there are not many output lines and certain operations are dependant on how the host behaves at any time of receiving the signal. This also eliminates the need to find out later what line has been changed by the FDC emulation code. There are call-backs for DRQ set, DRQ clear, IRQ set and IRQ clear states.
Another Datasheet Needed (and Found): A bit of a challenge this one. We needed the datasheet for a WD 1100-03 (address mark detector). We contacted Western Digital who were very helpful, but no longer have copies of their old datasheets. Even info of the clone chip of the WD 1100-03, as getting info on that could have been used as well. Huge thanks go to Ingo Sangmeister and F.J. Kraan for helping us get hold of these datasheets. (more)
Datasheets Needed (and Found): There were two more documents needed which we did not have, but do now. The first one, the WD1691 (provides floppy support logic) was kindly provided by F.J. Kraan, so a big thanks to you. Another was the FDC9216 (Floppy Disk Data Separator). We managed to find this one on the Internet, though it took some time to find it. (more)
Atari ST Disk System - Generics: The DMAC code we put into WinSTon is now hopefully complete and working. Remember this is just the interface plus a system DMA channel whose purpose is to allow communication with the "real" (emulated) FDC. This is designed so the real FDC (the WDC1772) is completely separated and the DMAC and the FDC only communicate with each other through signalling - just like the real components. (more)
Accurate FDC Timing: DMAC All the wiring and DMAC registers now work as expected. Manual Data Requests We then set out to find out about using manual data requests (as opposed to DMA-driven ones), that are possible with the WDC1772 but are not mentioned in any Atari documents. After some investigation, we found that it does indeed work. It would be interesting to see if any programs ever used this since it is not documented. (more)
Atari ST Disk System Research: DMA Controller We have still not yet found the documents for the C025913-38/C398739-001A DMA controller we talked about, so please still send it to us if you can get hold of it. In the meantime we found out how the workings of the chip work through various test programs that indirectly deny or confirm certain operations. Found * How is it attached to bus. * What it does. (more)
Atari ST Disk System: WinSTon is proving quite useful, as its source is quite understandable - with the exception of the ASM portions of it. When it was originally conceived, it was the first Direct-X one and unfortunately was really only geared up to meet the needs at a time when the only images floating around the net were "compact cracks". (more)