PLEASE! Some help with using a floppy controller chip. - Page 1
Forum section: electronics / projects

author: bitwise_
author_rank: Contributor
timestamp: June 23, 2025, 12:13:16 am
content: Hi all.I am using a WD1770 floppy controller with my CPU and I am having a terrible time. This is for 5.25" floppies.I am trying to format the disc by issuing the write track command. The controller raises the DRQ status when it is ready to receive a byte, so I have a few loops to write the format data block by waiting for DRQ high then writing to the data register. My CPU is 2.5MHz so has a clock period of 0.4us. The WD1770 datasheet says I have a window of 47.5us to respond to DRQ. I am formatting using single density FM with 128 bytes per sector, 16 sectors per track. Trying to format a single track.My first issue is, after the 16 sectors are written (if they really are), there is a filler area at the end thats suposed to be ~369 bytes long. However when I get to that point, it writes around 1700 bytes instead. This makes no sense.Then secondly if I try to read the track back, I read only 0's and none at all of the bytes I wrote. The disc starts spinning when I issue the command, then spins for 2 seconds and stops.My concern is, am I missing the DRQ pulses? What could be happening here? The datasheet doesn't mention how long DRQ stays high for, but says the service time maximum is 47.5us. My loop is well below that.When the format command is done however, I don't read errors from the status register, even though I wrote 1700 bytes of filler which is wrong.My loop for reading is basically:wait for DRQ highwhen high, write byte to data registercheck busy flag is low and if so exitelse go back to checking DRQThis loop starts but never ends. It stays stuck. I added a counter to limit the loop, but then the data is all zeroes.Something is really wrong here.I can issue step, and restore commands so I don't think my wiring is wrong and I've checked.Please if you know about this kind of thing, I need some help. I've spent days on this wtihout success. Thanks a lot.

author: bitwise_
author_rank: Contributor
timestamp: June 23, 2025, 02:45:57 pm
content: When I give read track commands I read random garbage, but this is progress from before when I was reading all 0's. What changed is that I select HEAD 1 instead of HEAD 0 on the drive. For some reason this changed the behaviour. I guess the drive is hard wired as HEAD 1.I probed the DRQ pin on the WD for a read track, and I get high pulses around 24us long and 35us long low. It looks like the CPU is reading the pulses and not missing them. But still it reads garbage.How much time do I have to read DRQ? even if I missed 2 or 3 of them, the WD writes 00's in its place, so I should be at least reading 00's and some data, but nope. I get periods of say AAAAAAAAAAAAAAAAAAA follows by BBBBBBBBBBBBBBBBB or FFFFFFFFFFFFFFFFFF or whatever, and then some random chars.At the very end I read a block of E5 which is the filler bytes I wrote. But not always, sometimes I read a long block of repeating chars.This is a mind wreck... I am totally lost. I really want this to work.Am I missing the DRQ? is it that tight? My loop is about 25us max for reading. This is what I have:syscall_fdc_read:mov al,  ; read data register to clear any errorsmov al,  ; read status register to clear any errorsmov al, %11100000mov , alcall fdc_wait_64usmov di, transient_areafdc_read_loop: ; for each byte, we need to wait for DRQ to be highmov al,  ; read busy flagmov bl, aland bl, $01 ; busy bitjz fdc_read_endand al, $02 ; check drq bitjz fdc_read_loopmov al,  ; send data byte to wd1770stosbjmp fdc_read_loopis anything wrong with this?

author: radiolistener
author_rank: Super Contributor
timestamp: June 23, 2025, 04:42:14 pm
content: A track on a floppy disk does not simply contain user data, it holds raw data encoded in a specific format. Certain bytes are written in a special way and serve as synchronization markers for reading sectors. When you use a track read command, you are accessing the raw bitstream without synchronization. This includes sync bytes, but since there is no FDC synchronization before each address mark or sector data block, synchronization eventually is broken, usually it happens after first sector data block. As a result, you may see garbage data. This is ok.To reliably read or write actual content, use the sector read/write commands. These commands synchronize the controller using sync bytes written before the sector data area, ensuring correct and stable operation.Also note that the track write command is not intended for writing user data. Its purpose is to format the track by defining the layout of the track with writing gap bytes, track index mark, sector address marks and sector data areas. Therefore, you must provide a properly structured track format that includes proper gaps, sync bytes, address marks, CRCs, inter-sector gaps, data blocks (zeros), and corresponding CRCs. When you write some bytes with write track command it is written in a special way to represent synchronization bytes, so you cannot write user data with this command. Actual sector data should be read from or written to the disk using the sector read/write commands, not the track read/write commands.Regarding DRQ, you must provide the next byte in time, if you fail to do so, an error will occur. The average time for a track can be estimated based on the disk's rotation speed. As I recall, a track typically holds around 6000-6400 raw bytes (including formatting overhead). With a rotation speed of 300 or 360 RPM, the write speed would be approximately 6400 * 360 / 60 = 38400 bytes per second = 26 microseconds per byte.When a sector read command is issued, the controller begins scanning the track for address marks. Once it finds a matching address mark with the requested sector number, it waits for the subsequent sync bytes and then starts transferring the data block. At the end of the block, the controller reads two CRC bytes and verifies data integrity. If the CRC check fails, a read error flag is set.The sector write command operates in a similar manner, except it overwrites the sector's data block along with the synchro-bytes before the block and two CRC bytes after the block. However, since it's not possible to precisely match the phase of the previous recording, a phase discontinuity occurs before and after the data block. As a result, when using the track read command, this disruption can cause loss of synchronization and you will get garbage after these points on the track.

author: m k
author_rank: Super Contributor
timestamp: June 23, 2025, 05:26:26 pm
content: Quote from: bitwise_ on June 23, 2025, 12:13:16 amYour loop has a problem, it can't get stuck.Busy drops when next index happens.

author: radiolistener
author_rank: Super Contributor
timestamp: June 23, 2025, 05:30:29 pm
content: yes, index pulse at the beginning of the track leads to finish write command.Also note that using very large sector sizes increases the risk of losing synchronization, potentially resulting in read errors if the disk's rotational speed is not sufficiently stable.

author: grumpydoc
author_rank: Super Contributor
timestamp: June 23, 2025, 05:47:54 pm
content: Mmm crusty memory time.I'vedonethis on a 4MHz Z80 but a loooonnng time ago.With a slow CPU you have to be careful about timing. Track rotation time is 16.67ms, bit rate is 125kHz for single density FM which is 8us a bit/64us a byte - or 160 clocksShould be doable I would have thought - what CPU - 8086 or 8088?Edit: "Track rotation time is 16.67ms" - no it isn't, it's 166.7ms

author: bitwise_
author_rank: Contributor
timestamp: June 23, 2025, 05:53:09 pm
content: Quote from: radiolistener on June 23, 2025, 04:42:14 pmHi there and thank you very much for your time with this.I am writing data to format the disk as described by the datasheet. This is the data:Code:; data for formatting a floppy drive in single density mode (128 bytes per sector):; fdc_40_FF:; .fill 40, $FF ; or 00; fdc_128_format_inner:; .fill 6, $00 ; <--|; .fill 1, $FE ; ID Address Mark |; .fill 1, $00 ; Track Number 0 thru 39 |; .fill 1, $00 ; Side Number 00 or 01 |; .fill 1, $01 ; Sector Number 0x01 through 0x10 |; .fill 1, $00 ; Sector Length |; .fill 1, $F7 ; 2 CRC's Written | Write 16 times; .fill 11, $FF ; or 00 |; .fill 6, $00 ; |; .fill 1, $FB ; Data Address Mark |; .fill 128, $E5 ; Data (IBM uses E5) |; .fill 1, $F7 ; 2 CRC's Written |; .fill 10, $FF ; or 00 <--|; fdc_128_format_end:; .fill 369, $FF ; or 00. Continue writing until wd1770 interrupts out. approx 369 bytes.;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;When I use the read track command, I was expecting to see all this data there. I know I'm not going to see specific user data. I just want to see the format data. But I don't. I see garbage. I do see the E5 block now and then but at random locations. Otherwise I see a lot of repeating characters mixed with other random ones.I wonder if I am missing the DRQ because my CPU is too slow? It's 2.5MHz, and the loop is around 20us till it sees a DRQ. In FM/Single density how can this be too slow? The datasheet says I have 47.5us to react. This is very puzzling...

author: bitwise_
author_rank: Contributor
timestamp: June 23, 2025, 05:56:03 pm
content: Quote from: grumpydoc on June 23, 2025, 05:47:54 pmThank you so much for your time. My CPU is a homebrew CPU at 2.5Mhz. This is what I assumed as well, around 64us. The datasheet says 47.5us, but I am within that limit!When formatting, the filler part should be around 369 bytes, but I write around 1700 bytes! The loop goes on much longer. And the status register is 00, no errors. I chdecked the DRQ line with a scope and I see proper pulses, some wider, some smaller, but all orderly....Let me take a screenshot of the data perhaps that can give some clues.... I'll post that next.,,

author: bitwise_
author_rank: Contributor
timestamp: June 23, 2025, 06:00:32 pm
content: This is the data I am reading when sending a read track command. But this data is random and changes with each read. But at least there are patterns. I just am not knowledgeable enough to know what they mean...Read Track 1:Code:0000 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................0010 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................0020 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................0030 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................0040 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................0050 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................0060 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................0070 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................0080 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................0090 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................00A0 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................00B0 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................00C0 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................00D0 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................00E0 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................00F0 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................0100 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................0110 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................0120 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................0130 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................0140 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................0150 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................0160 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................0170 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................0180 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................0190 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................01A0 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................01B0 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................01C0 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................01D0 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................01E0 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................01F0 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................0200 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................0210 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................0220 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................0230 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................0240 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................0250 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................0260 FF FF FF FF FF FF FF FF FF FF 2F 5F FF FF FF FF ........../_....0270 FF CE 00 00 0C 00 A4 9F FF FF FF FF FF FF FF FF ................0280 FF FF FF 00 00 00 00 00 00 FB AA AA AA AA AA AA ................0290 AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ................02A0 AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ................02B0 AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ................02C0 AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ................02D0 AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ................02E0 AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ................02F0 AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ................0300 AA AA AA AA AA AA AA AA AA AA FE E7 FF FF FF FF ................0310 FF FF FF FF FF FF 00 00 00 00 00 00 FE 00 00 0D ................0320 00 97 AE FF FF FF FF FF FF FF FF FF FF FF 00 00 ................0330 00 00 00 00 FB AA AA AA AA AA AA AA AA AA AA AA ................0340 AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ................0350 AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ................0360 AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ................0370 AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ................0380 AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ................0390 AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ................03A0 AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ................03B0 AA AA AA AA AA FE E7 FF FF FF FF FF FF FF FF FF ................03C0 FF 00 00 00 00 00 00 FE 00 00 0E 00 C2 FD FF FF ................03D0 FF FF FF FF FF FF FF FF FF 00 00 00 00 00 00 FB ................03E0 AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ................03F0 AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ................0400 AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ................0410 AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ................0420 AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ................0430 AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ................0440 AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ................0450 AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ................0460 FE E7 FF FF FF FF FF FF FF FF FF FF 00 00 00 00 ................0470 00 00 FE 00 00 0F 00 F1 CC FF FF FF FF FF FF FF ................0480 FF FF FF FF 00 00 00 00 00 00 FB AA AA AA AA AA ................0490 AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ................04A0 AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ................04B0 AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ................04C0 AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ................04D0 AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ................04E0 AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ................04F0 AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ................0500 AA AA AA AA AA AA AA AA AA AA AA FE E7 FF FF FF ................0510 FF FF FF FF FF FF FF 00 00 00 00 00 00 FE 00 00 ................0520 10 00 E2 81 FF FF FF FF FF FF FF FF FF FF FF 00 ................0530 00 00 00 00 00 FB AA AA AA AA AA AA AA AA AA AA ................0540 AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ................0550 AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ................0560 AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ................0570 AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ................0580 AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ................0590 AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ................05A0 AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ................05B0 AA AA AA AA AA AA FE E7 FF FF FF FF FF FF FF FF ................05C0 FF FF E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................05D0 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................05E0 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................05F0 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0600 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0610 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0620 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0630 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0640 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0650 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 F7 E5 F5 E5 ................0660 F7 E5 F5 E5 F5 E5 E5 E5 E5 E5 E5 E5 E5 E5 C0 80 ................0670 00 00 00 00 05 ED E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0680 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0690 E5 E5 E5 E5 E5 E5 E5 E5 E7 ED E4 80 00 00 03 6D ...............m06A0 F7 ED F5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................06B0 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................06C0 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................06D0 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................06E0 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................06F0 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0700 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0710 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0720 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0730 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0740 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0750 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0760 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0770 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0780 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0790 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................07A0 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................07B0 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................07C0 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................07D0 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................07E0 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................07F0 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0800 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0810 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0820 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0830 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0840 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0850 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0860 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0870 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0880 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0890 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................08A0 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................08B0 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................08C0 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................08D0 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................08E0 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................08F0 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0900 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0910 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0920 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0930 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0940 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0950 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0960 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0970 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0980 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0990 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................09A0 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................09B0 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................09C0 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................09D0 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................09E0 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................09F0 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0A00 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0A10 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0A20 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0A30 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0A40 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0A50 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0A60 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0A70 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0A80 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0A90 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0AA0 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0AB0 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0AC0 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0AD0 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0AE0 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0AF0 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0B00 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0B10 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0B20 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0B30 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0B40 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0B50 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0B60 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0B70 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0B80 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0B90 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0BA0 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0BB0 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0BC0 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0BD0 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0BE0 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0BF0 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................Read track 2:Code:0000 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0010 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0020 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0030 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0040 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0050 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0060 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0070 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0080 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0090 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................00A0 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................00B0 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................00C0 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................00D0 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................00E0 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................00F0 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0100 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0110 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0120 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0130 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0140 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0150 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0160 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0170 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0180 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0190 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................01A0 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................01B0 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................01C0 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................01D0 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................01E0 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................01F0 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0200 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0210 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0220 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0230 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0240 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0250 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0260 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0270 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0280 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0290 E5 FE 00 00 00 00 00 00 FE 00 00 0C 00 A4 9F FF ................02A0 FF FF FF FF FF FF FF FF FF FF 00 00 00 00 00 00 ................02B0 FB AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ................02C0 AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ................02D0 AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ................02E0 AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ................02F0 AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ................0300 AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ................0310 AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ................0320 AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ................0330 AA FE E7 FF FF FF FF FF FF FF FF FF FF 00 00 00 ................0340 00 00 00 FE 00 00 0D 00 97 AE FF FF FF FF FF FF ................0350 FF FF FF FF FF 00 00 00 00 00 00 FB AA AA AA AA ................0360 AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ................0370 AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ................0380 AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ................0390 AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ................03A0 AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ................03B0 AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ................03C0 AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ................03D0 AA AA AA AA AA AA AA AA AA AA AA AA FE E7 FF FF ................03E0 FF FF FF FF FF FF FF FF 00 00 00 00 00 00 FE 00 ................03F0 00 0E 00 C2 FD FF FF FF FF FF FF FF FF FF FF FF ................0400 00 00 00 00 00 00 FB AA AA AA AA AA AA AA AA AA ................0410 AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ................0420 AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ................0430 AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ................0440 AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ................0450 AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ................0460 AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ................0470 AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ................0480 AA AA AA AA AA AA AA FE E7 FF FF FF FF FF FF FF ................0490 FF FF FF 00 00 00 00 00 00 FE 00 00 0F 00 F1 CC ................04A0 FF FF FF FF FF FF FF FF FF FF FF 00 00 00 00 00 ................04B0 00 FB AA AA AA AA AA AA AA AA AA AA AA AA AA AA ................04C0 AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ................04D0 AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ................04E0 AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ................04F0 AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ................0500 AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ................0510 AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ................0520 AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ................0530 AA AA FE E7 FF FF FF FF FF FF FF FF FF FF 00 00 ................0540 00 00 00 00 FE 00 00 10 00 E2 81 FF FF FF FF FF ................0550 FF FF FF FF FF FF 00 00 00 00 00 00 FB AA AA AA ................0560 AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ................0570 AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ................0580 AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ................0590 AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ................05A0 AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ................05B0 AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ................05C0 AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ................05D0 AA AA AA AA AA AA AA AA AA AA AA AA AA FE E7 FF ................05E0 FF FF FF FF FF FF FF FF FF E5 E5 E5 E5 E5 E5 E5 ................05F0 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0600 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0610 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0620 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0630 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0640 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0650 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0660 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0670 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0680 E5 E5 E5 E5 E5 F5 ED F7 E5 F5 E5 F5 E5 E5 E5 E5 ................0690 E5 E5 E5 E5 ED B5 04 00 00 00 00 00 7F F7 FF FF ................06A0 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................06B0 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FD ................06C0 FF EC 00 00 02 00 96 FB F2 F2 F2 F2 F2 F2 F2 F2 ................06D0 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 ................06E0 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 ................06F0 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 ................0700 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 ................0710 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 ................0720 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 ................0730 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 ................0740 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 ................0750 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 ................0760 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 ................0770 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 ................0780 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 ................0790 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 ................07A0 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 ................07B0 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 ................07C0 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 ................07D0 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 ................07E0 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 ................07F0 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 ................0800 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 ................0810 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 ................0820 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 ................0830 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 ................0840 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 ................0850 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 ................0860 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 ................0870 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 ................0880 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 ................0890 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 ................08A0 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 ................08B0 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 ................08C0 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 ................08D0 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 ................08E0 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 ................08F0 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 ................0900 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 ................0910 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 ................0920 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 ................0930 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 ................0940 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 ................0950 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 ................0960 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 ................0970 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 ................0980 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 ................0990 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 ................09A0 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 ................09B0 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 ................09C0 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 ................09D0 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 ................09E0 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 ................09F0 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 ................0A00 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 ................0A10 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 ................0A20 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 ................0A30 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 ................0A40 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 ................0A50 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 ................0A60 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 ................0A70 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 ................0A80 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 ................0A90 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 ................0AA0 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 ................0AB0 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 ................0AC0 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 ................0AD0 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 ................0AE0 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 ................0AF0 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 ................0B00 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 ................0B10 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 ................0B20 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 ................0B30 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 ................0B40 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 ................0B50 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 ................0B60 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 ................0B70 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 ................0B80 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 ................0B90 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 ................0BA0 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 ................0BB0 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 ................0BC0 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 ................0BD0 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 ................0BE0 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 ................0BF0 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 F2 ................

author: radiolistener
author_rank: Super Contributor
timestamp: June 23, 2025, 06:43:44 pm
content: Quote from: bitwise_ on June 23, 2025, 05:53:09 pmYou can't read the same bytes with read track command, due to synchronization issues. This command is intended just for inspection purposes.Regarding to your structure, I don't remember all details, because I worked with it many years ago, but as I can see, you missed to add GAP bytes and marker bytes after synchro bytes in your format.If I remember correctly, it should be something like that:Code:; data for formatting a floppy drive in single density mode (128 bytes per sector):; GAP4A (GAP at beginning of track).fill 80, $4e; Syncho-space.fill 12, $00; IAM (track address marker, may be skipped).fill 3, $c2 ; marker byte, can be different size, longer leads to better synchronization, standard size 3 bytes.fill 1, $fc; GAP1.fill 50, $4e; Syncho-space.fill 12, $00; IDAM (sector header address marker).fill 3, $a1 ; marker byte, can be different size, longer leads to better synchronization, standard size 3 bytes.fill 1, $fe; Sector ID.fill 1, $00 ; Cylynder Number.fill 1, $00 ; Head Number 0,1,....fill 1, $01 ; Sector Number 1,2,3,....fill 1, $00 ; Sector Length.fill 1, $f7 ; 2 CRC16 bytes; GAP2.fill 22, $4e; Syncho-space.fill 12, $00; DAM (sector data address marker).fill 3, $a1 ; marker byte, can be different size, longer leads to better synchronization, standard size 3 bytes.fill 1, $fb ; 0xf8 - deleted sector, 0xfb - normal sector; Sector Data.fill 128, $00.fill 1, $f7 ; 2 CRC16 bytes; GAP3.fill 50, $4e; Syncho-space.fill 12, $00; IDAM (sector header address marker).fill 3, $a1 ; marker byte, can be different size, longer leads to better synchronization, standard size 3 bytes.fill 1, $fe; Sector ID.fill 1, $00 ; Cylynder Number.fill 1, $00 ; Head Number 0,1,....fill 1, $02 ; Sector Number 1,2,3,....fill 1, $00 ; Sector Length.fill 1, $f7 ; 2 CRC16 bytes......; GAP4B (GAP at end of track).fill 8192, $4e ; track tail GAP till the end of track (write until index mark is detected)this part:Code:; Syncho-space.fill 12, $00; IAM (track address marker, may be skipped).fill 3, $c2 ; marker byte, can be different size, longer leads to better synchronization, standard size 3 bytes.fill 1, $fcshould be written only once at the beginning of track.You can skip it, many FDC controller can work without it, but some may have issue if its missing.

author: mikeselectricstuff
author_rank: Super Contributor
timestamp: June 23, 2025, 07:06:35 pm
content: I have no direct experience but recall on the BBC micro's 1770 disc interface ( 400k discs, 2MHz 6502, NMI interrupt for DRQ), the original Acorn formatter had to generate a full track's worth of data in memory for the format command.Some clever people subequently managed an implementation which generated the data in real-time (to avoid overwriting RAM) but had to do all sorts of oddball tricks to make it work.You may be able to find some code online from this era which may give you some clues.

author: radiolistener
author_rank: Super Contributor
timestamp: June 23, 2025, 07:19:38 pm
content: Be aware that when using the Write Track command, the bytes $a1 and $c2 are treated specially and written with a unique synchronization bit pattern. Therefore, they should not be used within the data block within Write Track command, as this may lead to unintended behavior. Similarly, avoid using $f7 within the data block within Write Track command, as it is automatically replaced by a two-byte CRC16 value during writing.

author: grumpydoc
author_rank: Super Contributor
timestamp: June 23, 2025, 07:41:43 pm
content: Quote from: radiolistener on June 23, 2025, 06:43:44 pmYou should be able to mostly get the data you wrote - gap bytes can be corrupted by subsequent sector writes and can be read incorrectly but if you never did a sector write they should be pristine.Quote from: radiolistener on June 23, 2025, 06:43:44 pmNot sure - the data bitwise_ is writing seems to be per the datasheetIt might be useful (if you have one) to hook up a logic analyser to the WD1770 and see exactly what you are writing, it will help figure out whether your write code or your read code is broken.

author: grumpydoc
author_rank: Super Contributor
timestamp: June 23, 2025, 07:47:31 pm
content: Quote from: mikeselectricstuff on June 23, 2025, 07:06:35 pmWouldn't surprise me. I did it on a 4MHz Z80 for "double density" (i.e MFM) recording and i recall the timing is fairly easy to achieve, but it is impossible to do on a 2MHz chip at 250kHz/32us a byte.

author: radiolistener
author_rank: Super Contributor
timestamp: June 23, 2025, 07:57:03 pm
content: Quote from: grumpydoc on June 23, 2025, 07:41:43 pmYes, in some rare cases it is possible to read the data almost with no errors, but this is rare and dependent on FDC chip. In most cases the synchronization will be lost at some point and you will see some garbage, then it can resync again and you can see good data again.There are some tricks that allows to restore data with using special tricks and analyzing data. It was used in software which was able to copy copy-protected disks and take low level disk images.Quote from: grumpydoc on June 23, 2025, 07:41:43 pmIt may be specific for WD1770, I was worked with WD1793, so there is possible some difference in write track command implementation.

author: grumpydoc
author_rank: Super Contributor
timestamp: June 23, 2025, 08:52:33 pm
content: Quote from: radiolistener on June 23, 2025, 07:57:03 pmYes, once a sector write has been done it's likely to loose sync but it should regain sync at the start of the sector - after all that's what happens when you are searching for a specific sector.In this case, however, no data has been written to the track since the format.Quote from: radiolistener on June 23, 2025, 07:57:03 pmThat's pretty similar for 128byte single density sectors, the format bytes you described correspond to the 256byte double density format for the 1793 (the 1770 can do 256byte double density but the pattern is very slightly different).Datasheets:WD177X -https://cdn.hackaday.io/files/256641098008576/WD177x-00.pdfWD179X -https://www.retrotechnology.com/herbs_stuff/WD179X.PDF

author: bitwise_
author_rank: Contributor
timestamp: June 23, 2025, 09:02:15 pm
content: My format data is per the datasheet yes....Also the datasheet says that the read track command is perfect for debuging as it gives you pretty much the data back except for the gap bytes....But before I can even read it back, I am concerned with the fact I keep writing over the 369 filler bytes at the end of track. The WD goes on and on until I've written 1700 bytes of filler. This is not right.Basically it keeps setting DRQ high, and it keeps BUSY high, which my CPU sees and thus continues writing. So it goes overboard with 1700 bytes.I managed to read back some sectors, about 9. They contain E5 which is the data, plus some more or less correct format bytes. But there is a lot of filler at the beginning of the track as well. So I guess when it goes overboard at the end, it overwrites the beginning as well.It looks like the index mark is being missed perhaps? I checked the index signal and it seems OK....

author: bitwise_
author_rank: Contributor
timestamp: June 23, 2025, 09:06:20 pm
content: Can you understand anything can this track read below. You can see it writes a lot of filler bytes FF to the beginning of the track, not only at the end. I think this is overwriting some data sectors. But also the sectors are read in a corrupted manner. It's not correct.... Is my CPU too slow for this and is missing pulses?Code:0000 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................0010 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................0020 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................0030 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................0040 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................0050 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................0060 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................0070 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................0080 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................0090 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................00A0 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................00B0 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................00C0 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................00D0 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................00E0 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................00F0 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................0100 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................0110 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................0120 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................0130 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................0140 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................0150 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................0160 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................0170 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................0180 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................0190 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................01A0 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................01B0 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................01C0 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................01D0 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................01E0 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................01F0 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................0200 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................0210 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................0220 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................0230 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................0240 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................0250 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................0260 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................0270 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................0280 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................0290 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................02A0 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................02B0 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................02C0 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................02D0 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................02E0 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................02F0 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................0300 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................0310 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................0320 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................0330 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................0340 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................0350 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................0360 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................0370 FF FF FF CF 00 00 9F 00 E9 27 FF FF FF FF FF FF .........'......0380 FF FF FF FF FF 00 00 00 00 00 00 FB E5 E5 E5 E5 ................0390 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................03A0 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................03B0 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................03C0 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................03D0 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................03E0 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................03F0 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0400 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 5D 30 FF FF ............]0..0410 FF FF FF FF FF FF FF FF 00 00 00 00 00 00 FE 00 ................0420 00 9F 00 E9 27 FF FF FF FF FF FF FF FF FF FF FF ....'...........0430 00 00 00 00 00 00 FB E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0440 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0450 E5 E5 E5 E5 E5 E5 E7 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0460 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0470 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E7 E5 E5 ................0480 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0490 E5 E5 E5 E7 E5 E7 E5 E7 E5 E5 E5 E5 E5 E5 E5 E5 ................04A0 E5 E5 E7 E5 E5 E5 E5 E5 E7 E5 E7 E5 E5 E5 E5 E5 ................04B0 E5 E5 E5 E5 E5 E5 E5 5D 30 FF FF FF FF FF FF FF .......]0.......04C0 FF FF FF 00 00 00 00 00 00 FE 00 00 9F 00 E9 27 ...............'04D0 FF FF FF FF FF FF FF FF FF FF FF 00 00 00 00 00 ................04E0 00 FB E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................04F0 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0500 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0510 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0520 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0530 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0540 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0550 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0560 F5 E5 DF 75 FF FF FF FF FF FF FF FF FF FF 00 00 ...u............0570 00 00 00 00 FF 00 00 9F 80 E9 27 FF FF FF FF FF ..........'.....0580 FF FF FF FF FF FF 00 00 00 00 00 00 FB E5 E5 E5 ................0590 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................05A0 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................05B0 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................05C0 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................05D0 E5 E5 E5 E5 E5 E5 E7 E5 E7 E5 E7 E5 E7 E5 E5 E5 ................05E0 E7 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................05F0 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0600 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 5D 30 FF .............]0.0610 FF FF FF FF FF FF FF FF FF 00 00 00 00 00 00 FE ................0620 00 00 9F 00 E9 27 FF FF FF FF FF FF FF FF FF FF .....'..........0630 FF 00 00 00 00 00 00 FB E5 E5 E5 E5 E5 E5 E5 E5 ................0640 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0650 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0660 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0670 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0680 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0690 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................06A0 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................06B0 E5 E5 E5 E5 E5 E5 F5 E5 DD 35 FF FF FF FF FF FF .........5......06C0 FF FF FF FF 00 00 00 00 00 00 FE 00 00 9F 80 E9 ................06D0 27 FF FF FF FF FF FF FF FF FF FF FF 00 00 00 00 '...............06E0 00 00 FB E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................06F0 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0700 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0710 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0720 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0730 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0740 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0750 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0760 E5 E5 E5 5D 30 FF FF FF FF FF FF FF FF FF FF 00 ...]0...........0770 00 00 00 00 00 FE 00 00 9F 00 E9 27 FF FF FF FF ...........'....0780 FF FF FF FF FF FF FF 00 00 00 00 00 00 FB E5 E5 ................0790 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................07A0 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................07B0 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................07C0 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................07D0 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................07E0 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................07F0 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0800 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 F5 E5 DF 75 ...............u0810 FF FF FF FF FF FF FF FF FF FF 00 00 00 00 00 00 ................0820 FF 00 40 9F 00 E9 27 FF FF FF FF FF FF FF FF FF ..@...'.........0830 FF FF 00 00 00 00 00 00 FB E5 E5 E5 E5 E5 E5 E5 ................0840 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0850 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0860 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0870 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0880 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0890 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................08A0 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................08B0 E5 E5 E5 E5 E5 E5 E5 E5 E5 5D 30 FF FF FF FF FF .........]0.....08C0 FF FF FF FF FF 00 00 00 00 00 00 FE 00 00 9F 00 ................08D0 E9 27 FF FF FF FF FF FF FF FF FF FF FF 00 00 00 .'..............08E0 00 00 00 FB E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................08F0 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0900 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0910 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0920 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0930 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0940 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0950 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0960 E5 E5 F5 E5 DD 31 FF FF FF FF FF FF FF FF FF FF .....1..........0970 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................0980 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................0990 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................09A0 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................09B0 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................09C0 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................09D0 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................09E0 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................09F0 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................0A00 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................0A10 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................0A20 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................0A30 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................0A40 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................0A50 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................0A60 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................0A70 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................0A80 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................0A90 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................0AA0 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................0AB0 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................0AC0 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................0AD0 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................0AE0 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................0AF0 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................0B00 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................0B10 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................0B20 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................0B30 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................0B40 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................0B50 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................0B60 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................0B70 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................0B80 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................0B90 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................0BA0 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................0BB0 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................0BC0 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................0BD0 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................0BE0 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................0BF0 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................

author: bitwise_
author_rank: Contributor
timestamp: June 23, 2025, 09:16:14 pm
content: Code:0350 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................0360 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................0370 FF FF FF CF 00 00 9F 00 E9 27 FF FF FF FF FF FF .........'......0380 FF FF FF FF FF 00 00 00 00 00 00 FB E5 E5 E5 E5 ................0390 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................03A0 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................03B0 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................03C0 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................03D0 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................03E0 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................03F0 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0400 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 5D 30 FF FF ............]0..0410 FF FF FF FF FF FF FF FF 00 00 00 00 00 00 FE 00 ................0420 00 9F 00 E9 27 FF FF FF FF FF FF FF FF FF FF FF ....'...........0430 00 00 00 00 00 00 FB E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0440 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0450 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5Look at this part please. Much of it is written perfectly. As the datasheet says! But there are some errors. Mainly the biggest issue seems to be the large amount of FF bytes when I begin reading the track and also at the end. I get around 800 bytes each side. It's supposed to be just 40 at the beginning, and 369 at the end....

author: grumpydoc
author_rank: Super Contributor
timestamp: June 23, 2025, 10:11:35 pm
content: You haven't posted the code to write the track, nor shown us any timing analysis and we can't check it because you have a "homebrew" CPUAt this point I think the best suggestion for you to understand what is happening is to get get a logic analyser - ideally a 16 channel one so that you can monitor CS, RW, DRQ, INTRQ, A0/1 and the data bus - if you can't afford a 16 channel LA the 8 channel Saleae clones on eBay are ten a penny and work well enough with PulseView - you can probably get enough info by monitoring CS, RW, DRQ, INTRQ and the low nibble of the data bus.Given that you are writing much more lead out data than you should be I would prove your write code is correct before worrying about your read code.

author: bitwise_
author_rank: Contributor
timestamp: June 23, 2025, 10:25:37 pm
content: I apologise. The code is below. The asm is very similar to 8088. Please do not mind the comments as they are copy pasted a lot and many are wrong.Thanks for your help with this. I really want to get this working.Code:;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; floppy drive system calls;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; data for formatting a floppy drive in single density mode (128 bytes per sector):; fdc_40_FF:; .fill 40, $FF ; or 00; fdc_128_format_inner:; .fill 6, $00 ; <--|; .fill 1, $FE ; ID Address Mark |; .fill 1, $00 ; Track Number 0 thru 39 |; .fill 1, $00 ; Side Number 00 or 01 |; .fill 1, $01 ; Sector Number 0x01 through 0x10 |; .fill 1, $00 ; Sector Length |; .fill 1, $F7 ; 2 CRC's Written | Write 16 times; .fill 11, $FF ; or 00 |; .fill 6, $00 ; |; .fill 1, $FB ; Data Address Mark |; .fill 128, $E5 ; Data (IBM uses E5) |; .fill 1, $F7 ; 2 CRC's Written |; .fill 10, $FF ; or 00 <--|; fdc_128_format_end:; .fill 369, $FF ; or 00. Continue writing until wd1770 interrupts out. approx 369 bytes.;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; _FDC_CONFIG .equ $FFC0; _FDC_STATUS_1 .equ $FFC1; _FDC_WD_STAT_CMD .equ $FFC8; _FDC_WD_TRACK .equ $FFC9; _FDC_WD_SECTOR .equ $FFCA; _FDC_WD_DATA .equ $FFCB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;syscall_fdc_read:mov al,  ; read data register to clear any errorsmov al,  ; read status register to clear any errorsmov al, %11100000mov , alcall fdc_wait_64usfdc_wait_busy_high1:mov al,  ;and al, $01 ;jz fdc_wait_busy_high1mov di, transient_areafdc_read_loop: ; for each byte, we need to wait for DRQ to be highmov al,  ; read lost data flag 10+3+5+8+5+8mov bl, aland bl, $01 ; check drq bitjz fdc_read_endand al, $02 ; check drq bitjz fdc_read_loopmov al,  ;stosbjmp fdc_read_loopmov a, disub a, transient_area;we need to check if writing to data reg causes a spurious read. so lets check inside the writing loop, how many times we actually write the bytes;say the 40 byte loop. if we find that we only write ~20 times, then this indcates this problem.;because for every write, if it also reads, then that clears DRQ, so we need to wait for next DRQ.fdc_read_end:mov d, ssscall _putscall print_u16dcall printnlcall cmd_hexdsysretsss:.db "\ntrack read\n", 0syscall_fdc:; bl: track numbersyscall_fdc_format:mov al, blmov , al ; write track number to formatting data blockmov al, 1mov , al ; reset sector variable to 1mov al, 0mov , almov d, s_format_begincall _putsmov al,  ; read data register to clear any errorsmov al,  ; read status register to clear any errorsmov bl, alcall print_u8xcall printnlmov a, 0mov , afdc_header_loop_start:mov al, %11110110 ; Write Track Command: {1111, 0: Enable Spin-up Seq, 1: Settling Delay, 1: No Write Precompensation, 0}mov , al; write the first data block for formatting which is 40 bytes of 0xFF:call fdc_wait_64usmov d, 1fdc_wait_busy_high:mov al,  ;and al, $01 ;jz fdc_wait_busy_highmov cl, 40fdc_drq_loop: ; for each byte, we need to wait for DRQ to be highmov al,  ; read lost data flagand al, $02 ; check drq bitjz fdc_drq_loopmov byte , $FF ; send data byte to wd1770dec cljnz fdc_drq_loop; start inner data block loop. this block is written 16 timesfdc_inner_loop:mov cl, 6fdc_l1:mov al,  ; read lost data flagand al, $02 ; check drq bitjz fdc_l1mov byte , $00 ; send data byte to wd1770dec cljnz fdc_l1; address markfdc_l2:mov al,  ; read lost data flagand al, $02 ; check drq bitjz fdc_l2mov byte , $FE ; send data byte to wd1770; track numberfdc_l3:mov al,  ; read lost data flagand al, $02 ; check drq bitjz fdc_l3mov byte , $00 ; send data byte to wd1770; side numberfdc_l4:mov al,  ; read lost data flagand al, $02 ; check drq bitjz fdc_l4mov byte , $00 ; send data byte to wd1770; sector numberfdc_l5:mov al,  ; read lost data flagand al, $02 ; check drq bitjz fdc_l5mov al, glmov , al ; send data byte to wd1770; sector lengthfdc_l6:mov al,  ; read lost data flagand al, $02 ; check drq bitjz fdc_l6mov byte , $00 ; send data byte to wd1770; 2 crc'sfdc_l7:mov al,  ; read lost data flagand al, $02 ; check drq bitjz fdc_l7mov byte , $F7 ; send data byte to wd1770; 11 times $FFmov cl, 11fdc_l8:mov al,  ; read lost data flagand al, $02 ; check drq bitjz fdc_l8mov byte , $FF ; send data byte to wd1770dec cljnz fdc_l8; 6 times 00mov cl, 6fdc_l9:mov al,  ; read lost data flagand al, $02 ; check drq bitjz fdc_l9mov byte , $00 ; send data byte to wd1770dec cljnz fdc_l9; data address markfdc_l10:mov al,  ; read lost data flagand al, $02 ; check drq bitjz fdc_l10mov byte , $FB ; send data byte to wd1770; sector datamov cl, 128mov bl, $E5fdc_l11:mov al,  ; read lost data flagand al, $02 ; check drq bitjz fdc_l11mov , bl ; send data byte to wd1770dec cljnz fdc_l11; 2 crc'sfdc_l12:mov al,  ; read lost data flagand al, $02 ; check drq bitjz fdc_l12mov byte , $F7 ; send data byte to wd1770; 10 times $FFmov cl, 10fdc_l13:mov al,  ; read lost data flagand al, $02 ; check drq bitjz fdc_l13mov byte , $FF ; send data byte to wd1770dec cljnz fdc_l13; check whether we did this 16 timesinc dcmp d, 17jne fdc_inner_loop; loop ~369 timesfdc_format_footer:fdc_footer_drq_loop:mov al,  ; read lost data flagmov bl, aland bl, $01 ; check busy bitjz fdc_format_doneand al, $02 ; check drq bitjz fdc_footer_drq_loopmov byte , $FF ; send data byte to wd1770jmp fdc_footer_drq_loopfdc_format_done:sysret; fetch is 2 cycles long when 'display_reg_load' is false.; mov cl, 14 is 5 cycles long (2 to fetch, and 3 execution); 64us amounts to 160 cycles of the 2.5MHz clock; so we need to wait for 155 cycles after mov cl, 14; and since dec cl, and jnz amount to 11 cycles, we need to loop there 14 times: 14*11 = 154; and 154 + 5 = 159fdc_wait_64us:mov cl, 20 ; 5 cyclesfdc_wait_64_loop:dec cl ; 3 cyclesjnz fdc_wait_64_loop ; 8 cyclesretAnd just for completion, this is the entire kernel code. It's been simplified to the point of pretty much only containing code for dealing with the floppy.Code:; ------------------------------------------------------------------------------------------------------------------;; Solarium - Sol-1 Homebrew Minicomputer Operating System Kernel.; ------------------------------------------------------------------------------------------------------------------;; Memory Map; ------------------------------------------------------------------------------------------------------------------;; 0000 ... 7FFF - ROM SPACE; 8000 ... F7FF - RAM SPACE; F7FF - Stack root; I/O MAP; ------------------------------------------------------------------------------------------------------------------;; FF80 - UART 0 (16550); FF90 - UART 1 (16550); FFA0 - RTC (M48T02); FFB0 - PIO 0 (8255); FFC0 - FDD (5.25" Floppy Drive Block); - FFC0 Output Port (377 Flip-Flop); - FFC1 Input Port (244 Buffer); - FFC8 WD1770 Status/Command; - FFC9 WD1770 Track Register; - FFCA WD1770 Sector Register; - FFCB WD1770 Data Register;; FFD0 - IDE (Compact Flash / PATA); FFE0 - Timer (8253); FFF0 - BIOS CONFIGURATION NV-RAM STORE AREA; ------------------------------------------------------------------------------------------------------------------;; ------------------------------------------------------------------------------------------------------------------;; System Constants; ------------------------------------------------------------------------------------------------------------------;_UART0_DATA .equ $FF80 ; data_UART0_DLAB_0 .equ $FF80 ; divisor latch low byte_UART0_DLAB_1 .equ $FF81 ; divisor latch high byte_UART0_IER .equ $FF81 ; Interrupt enable register_UART0_FCR .equ $FF82 ; FIFO control register_UART0_LCR .equ $FF83 ; line control register_UART0_LSR .equ $FF85 ; line status register_UART1_DATA .equ $FF90 ; data_UART1_DLAB_0 .equ $FF90 ; divisor latch low byte_UART1_DLAB_1 .equ $FF91 ; divisor latch high byte_UART1_IER .equ $FF91 ; Interrupt enable register_UART1_FCR .equ $FF92 ; FIFO control register_UART1_LCR .equ $FF93 ; line control register_UART1_LSR .equ $FF95 ; line status register_ide_BASE .equ $FFD0 ; ide base_ide_R0 .equ _ide_BASE + 0 ; data port_ide_R1 .equ _ide_BASE + 1 ; read: error code, write: feature_ide_R2 .equ _ide_BASE + 2 ; number of sectors to transfer_ide_R3 .equ _ide_BASE + 3 ; sector address lba 0 [0:7]_ide_R4 .equ _ide_BASE + 4 ; sector address lba 1 [8:15]_ide_R5 .equ _ide_BASE + 5 ; sector address lba 2 [16:23]_ide_R6 .equ _ide_BASE + 6 ; sector address lba 3 [24:27 (lsb)]_ide_R7 .equ _ide_BASE + 7 ; read: status, write: command_7SEG_DISPLAY .equ $FFB0 ; bios post code hex display (2 digits) (connected to pio a)_BIOS_POST_CTRL .equ $FFB3 ; bios post display control register, 80h = as output_PIO_A .equ $FFB0_PIO_B .equ $FFB1_PIO_C .equ $FFB2_PIO_CONTROL .equ $FFB3 ; pio control port_FDC_CONFIG .equ $FFC0 ; 0 = select_0, 1 = select_1, 2 = side_select, 3 = dden, 4 = in_use_or_head_load, 5 = wd1770_rst_FDC_STATUS_1 .equ $FFC1 ; 0 = drq, 1 = ready_FDC_WD_STAT_CMD .equ $FFC8 ; status / command register_FDC_WD_TRACK .equ $FFC9 ; track register_FDC_WD_SECTOR .equ $FFCA ; sector register_FDC_WD_DATA .equ $FFCB ; data register_TIMER_C_0 .equ $FFE0 ; timer counter 0_TIMER_C_1 .equ $FFE1 ; timer counter 1_TIMER_C_2 .equ $FFE2 ; timer counter 2_TIMER_CTRL .equ $FFE3 ; timer control registerSTACK_BEGIN .equ $F7FF ; beginning of stackFIFO_SIZE .equ 1024text_org .equ $400 ; code origin address for all user processes; ------------------------------------------------------------------------------------------------------------------;; GLOBAL SYSTEM VARIABLES; ------------------------------------------------------------------------------------------------------------------;; ------------------------------------------------------------------------------------------------------------------;; IRQ table; highest priority at lowest address; ------------------------------------------------------------------------------------------------------------------;.dw int_0_fdc.dw int_1.dw int_2.dw int_3.dw int_4.dw int_5.dw int_6.dw int_7_uart0; ------------------------------------------------------------------------------------------------------------------;; kernel reset vector; ------------------------------------------------------------------------------------------------------------------;.dw kernel_reset_vector; ------------------------------------------------------------------------------------------------------------------;; exception vector table; total of 7 entries, starting at address $0012; ------------------------------------------------------------------------------------------------------------------;.dw trap_privilege.dw trap_div_zero.dw trap_undef_opcode.dw 0.dw 0.dw 0.dw 0; ------------------------------------------------------------------------------------------------------------------;; system call vector table; starts at address $0020; ------------------------------------------------------------------------------------------------------------------;.dw syscall_io.dw syscall_reboot.dw syscall_fdc.dw syscall_fdc_read; ------------------------------------------------------------------------------------------------------------------;; system call aliases; ------------------------------------------------------------------------------------------------------------------;sys_io .equ 0sys_reboot .equ 1sys_fdc .equ 2sys_fdc_read .equ 3; ------------------------------------------------------------------------------------------------------------------;; IRQs' code block; ------------------------------------------------------------------------------------------------------------------;; 5.25" Floppy Drive Controller IRQint_0_fdc:sysretint_1:sysretint_2:sysretint_3:sysretint_4:sysretint_5:sysret; ------------------------------------------------------------------------------------------------------------------;; process swapping; ------------------------------------------------------------------------------------------------------------------;int_6:sysret; ------------------------------------------------------------------------------------------------------------------;; UART0 Interrupt; ------------------------------------------------------------------------------------------------------------------;int_7_uart0:push apush dpushfmov a, mov d, amov al,  ; get charactermov , al ; add to fifomov a, inc acmp a, fifo + FIFO_SIZE ; check if pointer reached the end of the fifojne int_7_continuemov a, fifoint_7_continue:mov , a ; update fifo pointerpopfpop dpop asysret;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; floppy drive system calls;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; data for formatting a floppy drive in single density mode (128 bytes per sector):; fdc_40_FF:; .fill 40, $FF ; or 00; fdc_128_format_inner:; .fill 6, $00 ; <--|; .fill 1, $FE ; ID Address Mark |; .fill 1, $00 ; Track Number 0 thru 39 |; .fill 1, $00 ; Side Number 00 or 01 |; .fill 1, $01 ; Sector Number 0x01 through 0x10 |; .fill 1, $00 ; Sector Length |; .fill 1, $F7 ; 2 CRC's Written | Write 16 times; .fill 11, $FF ; or 00 |; .fill 6, $00 ; |; .fill 1, $FB ; Data Address Mark |; .fill 128, $E5 ; Data (IBM uses E5) |; .fill 1, $F7 ; 2 CRC's Written |; .fill 10, $FF ; or 00 <--|; fdc_128_format_end:; .fill 369, $FF ; or 00. Continue writing until wd1770 interrupts out. approx 369 bytes.;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; _FDC_CONFIG .equ $FFC0; _FDC_STATUS_1 .equ $FFC1; _FDC_WD_STAT_CMD .equ $FFC8; _FDC_WD_TRACK .equ $FFC9; _FDC_WD_SECTOR .equ $FFCA; _FDC_WD_DATA .equ $FFCB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;syscall_fdc_read:mov al,  ; read data register to clear any errorsmov al,  ; read status register to clear any errorsmov al, %11100000mov , alcall fdc_wait_64usfdc_wait_busy_high1:mov al,  ;and al, $01 ;jz fdc_wait_busy_high1mov di, transient_areafdc_read_loop: ; for each byte, we need to wait for DRQ to be highmov al,  ; read lost data flag 10+3+5+8+5+8mov bl, aland bl, $01 ; check drq bitjz fdc_read_endand al, $02 ; check drq bitjz fdc_read_loopmov al,  ;stosbjmp fdc_read_loopmov a, disub a, transient_area;we need to check if writing to data reg causes a spurious read. so lets check inside the writing loop, how many times we actually write the bytes;say the 40 byte loop. if we find that we only write ~20 times, then this indcates this problem.;because for every write, if it also reads, then that clears DRQ, so we need to wait for next DRQ.fdc_read_end:mov d, ssscall _putscall print_u16dcall printnlcall cmd_hexdsysretsss:.db "\ntrack read\n", 0syscall_fdc:; bl: track numbersyscall_fdc_format:mov al, blmov , al ; write track number to formatting data blockmov al, 1mov , al ; reset sector variable to 1mov al, 0mov , almov d, s_format_begincall _putsmov al,  ; read data register to clear any errorsmov al,  ; read status register to clear any errorsmov bl, alcall print_u8xcall printnlmov a, 0mov , afdc_header_loop_start:mov al, %11110110 ; Write Track Command: {1111, 0: Enable Spin-up Seq, 1: Settling Delay, 1: No Write Precompensation, 0}mov , al; write the first data block for formatting which is 40 bytes of 0xFF:call fdc_wait_64usmov d, 1fdc_wait_busy_high:mov al,  ;and al, $01 ;jz fdc_wait_busy_highmov cl, 40fdc_drq_loop: ; for each byte, we need to wait for DRQ to be highmov al,  ; read lost data flagand al, $02 ; check drq bitjz fdc_drq_loopmov byte , $FF ; send data byte to wd1770dec cljnz fdc_drq_loop; start inner data block loop. this block is written 16 timesfdc_inner_loop:mov cl, 6fdc_l1:mov al,  ; read lost data flagand al, $02 ; check drq bitjz fdc_l1mov byte , $00 ; send data byte to wd1770dec cljnz fdc_l1; address markfdc_l2:mov al,  ; read lost data flagand al, $02 ; check drq bitjz fdc_l2mov byte , $FE ; send data byte to wd1770; track numberfdc_l3:mov al,  ; read lost data flagand al, $02 ; check drq bitjz fdc_l3mov byte , $00 ; send data byte to wd1770; side numberfdc_l4:mov al,  ; read lost data flagand al, $02 ; check drq bitjz fdc_l4mov byte , $00 ; send data byte to wd1770; sector numberfdc_l5:mov al,  ; read lost data flagand al, $02 ; check drq bitjz fdc_l5mov al, glmov , al ; send data byte to wd1770; sector lengthfdc_l6:mov al,  ; read lost data flagand al, $02 ; check drq bitjz fdc_l6mov byte , $00 ; send data byte to wd1770; 2 crc'sfdc_l7:mov al,  ; read lost data flagand al, $02 ; check drq bitjz fdc_l7mov byte , $F7 ; send data byte to wd1770; 11 times $FFmov cl, 11fdc_l8:mov al,  ; read lost data flagand al, $02 ; check drq bitjz fdc_l8mov byte , $FF ; send data byte to wd1770dec cljnz fdc_l8; 6 times 00mov cl, 6fdc_l9:mov al,  ; read lost data flagand al, $02 ; check drq bitjz fdc_l9mov byte , $00 ; send data byte to wd1770dec cljnz fdc_l9; data address markfdc_l10:mov al,  ; read lost data flagand al, $02 ; check drq bitjz fdc_l10mov byte , $FB ; send data byte to wd1770; sector datamov cl, 128mov bl, $E5fdc_l11:mov al,  ; read lost data flagand al, $02 ; check drq bitjz fdc_l11mov , bl ; send data byte to wd1770dec cljnz fdc_l11; 2 crc'sfdc_l12:mov al,  ; read lost data flagand al, $02 ; check drq bitjz fdc_l12mov byte , $F7 ; send data byte to wd1770; 10 times $FFmov cl, 10fdc_l13:mov al,  ; read lost data flagand al, $02 ; check drq bitjz fdc_l13mov byte , $FF ; send data byte to wd1770dec cljnz fdc_l13; check whether we did this 16 timesinc dcmp d, 17jne fdc_inner_loop; loop ~369 timesfdc_format_footer:fdc_footer_drq_loop:mov al,  ; read lost data flagmov bl, aland bl, $01 ; check busy bitjz fdc_format_doneand al, $02 ; check drq bitjz fdc_footer_drq_loopmov byte , $FF ; send data byte to wd1770jmp fdc_footer_drq_loopfdc_format_done:sysret; fetch is 2 cycles long when 'display_reg_load' is false.; mov cl, 14 is 5 cycles long (2 to fetch, and 3 execution); 64us amounts to 160 cycles of the 2.5MHz clock; so we need to wait for 155 cycles after mov cl, 14; and since dec cl, and jnz amount to 11 cycles, we need to loop there 14 times: 14*11 = 154; and 154 + 5 = 159fdc_wait_64us:mov cl, 20 ; 5 cyclesfdc_wait_64_loop:dec cl ; 3 cyclesjnz fdc_wait_64_loop ; 8 cyclesretfdc_count: .dw 0fdc_irq: .db 0s_format_begin: .db "\nformatting starting...\n", 0s_format_done: .db "\nformatting done.\n", 0s_fdc_status: .db "\nfdc status: ", 0; REBOOT SYSTEMsyscall_reboot:push word $FFFFpush byte %00000000 ; dma_ack = 0, interrupts disabled, mode = supervisor, paging = off, halt=0, display_reg_load=0, dir=0push word BIOS_RESET_VECTOR ; and then push RESET VECTOR of the shell to the stacksysret; ------------------------------------------------------------------------------------------------------------------;; exceptions code block; ------------------------------------------------------------------------------------------------------------------;; privilege exception; ------------------------------------------------------------------------------------------------------------------;trap_privilege:jmp syscall_rebootpush dmov d, s_priviledgecall _putspop dsysret; ------------------------------------------------------------------------------------------------------------------;; divide by zero exception; ------------------------------------------------------------------------------------------------------------------;trap_div_zero:push apush dpushfmov d, s_divzerocall _putspopfpop dpop asysret ; enable interrupts; ------------------------------------------------------------------------------------------------------------------;; undefined opcode exception; ------------------------------------------------------------------------------------------------------------------;trap_undef_opcode:sysret;----------------------------------------------------------------------------------------------------;; IO Syscall;----------------------------------------------------------------------------------------------------;; Baud Divisor; 50 2304; 110 1047; 300 384; 600 192; 1200 96; 9600 12; 19200 6; 38400 3syscall_io_jmp:.dw syscall_io_putchar.dw syscall_io_getch.dw syscall_io_uart_setupsyscall_io:jmp [syscall_io_jmp + al]; bit7 is the Divisor Latch Access Bit (DLAB). It must be set high (logic 1) to access the Divisor Latches; of the Baud Generator during a Read or Write operation. It must be set low (logic 0) to access the Receiver; Buffer, the Transmitter Holding Register, or the Interrupt Enable Register.syscall_io_uart_setup:mov al, or al, $80 ; set DLAB access bitmov , al ; 8 data, 2 stop, no parity by defaultmov al, mov , al ; divisor latch byte 0mov al, mov , al ; divisor latch byte 1mov al, and al, $7F ; clear DLAB access bitmov , almov al, mov , al ; interruptsmov al, mov , al ; FIFO controlsysret; char in ahsyscall_io_putchar:syscall_io_putchar_L0:mov al,  ; read Line Status Registerand al, $20jz syscall_io_putchar_L0mov al, ahmov , al ; write char to Transmitter Holding Registersysret; char in ah; al = sucess codesyscall_io_getch:push bpush dstisyscall_io_getch_L0:mov a, mov b, cmp a, bje syscall_io_getch_L0mov d, ainc acmp a, fifo + FIFO_SIZE ; check if pointer reached the end of the fifojne syscall_io_getch_contmov a, fifosyscall_io_getch_cont:mov , a ; update fifo pointermov al,  ; get charmov ah, almov al, cmp al, 1jne syscall_io_getch_noecho; here we just echo the char back to the consolesyscall_io_getch_echo_L0:mov al,  ; read Line Status Registerand al, $20 ; isolate Transmitter Emptyjz syscall_io_getch_echo_L0mov al, ahmov , al ; write char to Transmitter Holding Registersyscall_io_getch_noecho:mov al, 1 ; AL = 1 means a char successfully receivedpop dpop bsysret; ---------------------------------------------------------------------; kernel reset vector; ---------------------------------------------------------------------kernel_reset_vector:mov bp, STACK_BEGINmov sp, STACK_BEGINmov al, %10000000 ; mask out timer interruptstomskstilodstatand al, %11011111 ; disable display register loadingstostat; reset fifo pointersmov a, fifomov d, fifo_inmov , amov d, fifo_outmov , amov al, 2syscall sys_io ; enable uart in interrupt modemov d, s_kernel_startedcall _putsmov d, str0call _puts; First, select drive 1 and de-select drive 0mov d, $FFC0mov bl, %00001101 ; %00001001 : turn LED on, disable double density, select side 0, select drive 0, do not select drive 1mov , blmenu:mov d, s_menucall _putscall getchcmp ah, '0'je step_incmp ah, '1'je step_outcmp ah, '2'je restorecmp ah, '3'je status1cmp ah, '4'je status2cmp ah, '5'je formatcmp ah, '6'je readjmp menustep_in:mov d, $FFC8 ; wd1770mov al, 2 ; setparam callmov bl, %01010011 ; step inmov , bljmp menurestore:; send restore commandmov d, $FFC8 ; wd1770mov al, 2 ; setparam callmov bl, $03 ; restore command, 30ms ratemov , bljmp menustep_out:mov d, $FFC8 ; wd1770mov al, 2 ; setparam callmov bl, %01110011 ; step outmov , bljmp menustatus1:call printnlmov d, $FFC1 ; wd1770 status 1mov al, 4 ; getparam callmov bl, call print_u8x ; print blcall printnljmp menustatus2:call printnlmov d, $FFC8 ; wd1770 statusmov al, 4 ; getparam callmov bl, call print_u8x ; print blcall printnljmp menuformat:mov d, s_trackcall _putscall scan_u8x ; in almov bl, al ; track needs to be in blmov al, 0 ; 0 = formatsyscall sys_fdcmov d, s_format_donecall _putsjmp menuread:syscall sys_fdc_readjmp menucmd_hexd:mov a, transient_areamov , amov a, 3073mov , amov a, mov d, a ; dump pointer in dmov c, 0dump_loop:mov al, cland al, $0Fjz print_baseback:mov al,  ; read bytemov bl, alcall print_u8xmov a, $2000syscall sys_io ; spacemov al, cland al, $0Fcmp al, $0Fje print_asciiback1:inc dinc cmov a, cmp a, cjne dump_loopmov a, $0A00syscall sys_iomov a, $0D00syscall sys_io;call printnlretprint_ascii:sub d, 16mov b, 16print_ascii_L:inc dmov al,  ; read bytecmp al, $20jlu dotcmp al, $7Ejleu asciidot:mov a, $2E00syscall sys_iojmp ascii_continueascii:mov ah, almov al, 0syscall sys_ioascii_continue:loopb print_ascii_Ljmp back1print_base:mov a, $0A00syscall sys_iomov a, $0D00syscall sys_iomov b, dsub b, transient_areacall print_u16x ; display rowadd b, transient_areamov a, $2000syscall sys_iojmp backretstart: .dw 0length: .dw 1024s_track: .db "\ntrack: ", 0s_menu: .db "\n0. step in\n".db "1. step out\n",.db "2. restore\n",.db "3. read status 1\n",.db "4. read status 2\n",.db "5. format track\n",.db "6. read track\n",.db "\nselect option: ", 0str0: .db "\nselecting drive 1...\n", 0str1: .db "\nwaiting...\n", 0; FILE INCLUDES.include "bios.exp" ; to obtain the BIOS_RESET_VECTOR location (for reboots).include "lib/stdio.asm".include "lib/ctype.asm"; kernel parameterssys_echo_on:.db 1sys_uart0_lcr:.db $07 ; 8 data bits, 2 stop bit, no paritysys_uart0_inten:.db 1sys_uart0_fifoen:.db 0sys_uart0_div0:.db 12 ;sys_uart0_div1:.db 0 ; default baud = 9600; Baud Divisor; 50 2304; 110 1047; 300 384; 600 192; 1200 96; 9600 12; 19200 6; 38400 3fifo_in:.dw fifofifo_out:.dw fifos_kernel_started:.db "kernel started(version 1.0)\n", 0s_priviledge:.db "\nexception: privilege\n", 0s_divzero:.db "\nexception: zero division\n", 0; This is the format of a sector for the 128 byte per sector format.; Write the bracketed data 16 times per track.; The recommended single-density format with 128; bytes/sector is shown. In order to format a diskette,; the user issues the Write Track Command, and loads; the Data Register with the following values. For every; byte to be written, there is one Data Request.fdc_irq_event:.fill 1, $00 ; keeps status of fdc irq eventfdc_128_format:fdc_40_FF:.fill 40, $FF ; or 00fdc_128_format_inner:.fill 6, $00 ; <--|.fill 1, $FE ; ID Address Mark |fdc_128_format_track:.fill 1, $00 ; Track Number 0 thru 39 |.fill 1, $00 ; Side Number 00 or 01 |fdc_128_format_sect:.fill 1, $01 ; Sector Number 0x01 through 0x10 |.fill 1, $00 ; Sector Length |.fill 1, $F7 ; 2 CRC's Written | Write 16 times.fill 11, $FF ; or 00 |.fill 6, $00 ; |.fill 1, $FB ; Data Address Mark |.fill 128, $E5 ; Data (IBM uses E5) |.fill 1, $F7 ; 2 CRC's Written |.fill 10, $FF ; or 00 <--|fdc_128_format_end:.fill 369, $FF ; or 00. Continue writing until wd1770 interrupts out. approx 369 bytes.fifo:.fill FIFO_SIZEscrap_sector:.fill 512 ; scrap sectortransient_area:.db 0 ; beginning of the transient memory area. used for disk reads and other purposes.end

author: amyk
author_rank: Super Contributor
timestamp: June 24, 2025, 01:54:10 am
content: Quote from: grumpydoc on June 23, 2025, 10:11:35 pmTook 19 replies for this to be mentioned, agree 100%. I'd go one step further and say that you should stress your CPU a bit more first to prove that it is working correctly before tackling the floppy controller. There may be something marginal in your CPU that's causing this.I've seen many cases where someone thinks they've gotten something working and proceed to the next stage of their project, and the next, etc. until they hit that marginal case and now they have to go back to the beginning and test everything carefully.

author: radiolistener
author_rank: Super Contributor
timestamp: June 24, 2025, 03:19:20 am
content: At the beginning of a track, there must be a gap, often quite large. This is very important because the index pulse may occur with varying timing across different drives, so a delay after the index is very necessary to ensure reliable synchronization before the first sector.If you're seeing a large gap block at the start of track and you're not explicitly writing them, it's likely that your controller is automatically inserting this gap. This is normal behavior for some FDCs to ensure the required lead-in timing.Just insert large gap before writing first sector.Regarding the corrupted sectors: this is expected behavior when using the Read Track command. As explained earlier, raw track data may contain discontinuities or phase misalignments. While the controller typically resynchronizes just before each sector when using Read Sector, such synchronization may not occur reliably during Read Track, depending on the controller and FDD type. This can lead to loss of sync and misread data.Additionally, your sync spaces (the sequences of 0x00) appear to be too short - just 6 bytes, which can also contribute to read errors. Make sure to provide sufficiently long sync fields to allow proper timing and bit alignment during reading. Try to use 12 zeros for sync (as in my example) instead of 6.Also try to increase gap sizes. Gap of just 11 bytes may not be enough, it should be about 20-80 bytes. Try to use 80 bytes GAP at the beginning of track, 50 bytes GAP before ID address mark and 22 bytes GAP before DATA address mark.

author: grumpydoc
author_rank: Super Contributor
timestamp: June 24, 2025, 07:45:34 am
content: Quote from: bitwise_ on June 23, 2025, 10:25:37 pmBut the CPU isn't - from the comment in the listing I assume it is this?https://github.com/Pconst167/sol-1/tree/main

author: bitwise_
author_rank: Contributor
timestamp: June 24, 2025, 08:12:29 am
content: Quote from: grumpydoc on June 24, 2025, 07:45:34 amYes that's correct. Please let me know if you need anything in specific and I can point you to that.The schematics are in hardware/schematics/kicad/main.kicad_schI have tested and used the CPU for about 4 years now and I've never seen a serious bug with it, so I don't believe this is a bug I don't already know in the CPU itself, or at least not a bug that's causing issues in this specific code block. If there is a hardware bug its in the way I communicate with the older WD1770 chip.One thing though is that the read cycle on my CPU is 200ns, and this is the exact minimum time for reading the WD1770 registers. I can change the read cycle by reprogramming the microcode. Could this exact borderline case be corrupting the reads?

author: radiolistener
author_rank: Super Contributor
timestamp: June 24, 2025, 08:20:25 am
content: Quote from: bitwise_ on June 24, 2025, 08:12:29 amNo, even if the port access took as long as 1 µs, it would still be sufficient - 200 ns is not a problem. You didn’t mention whether the problematic sectors are being read using the Read Sector command. If sectors are read successfully and the issue only occurs with Read Track returning corrupted data, that’s not a fault but expected behavior, as previously explained. However, if the Read Sector command also fails to read the data, then there may be an error in the track formatting or a problem with the drive itself.Have you confirmed that the drive works properly with a standard system?Also, verify that the index pulse is being generated by the drive, it’s entirely possible that there is a fault in the drive itself.Ensure that within your data transfer loop for the Write Track command, you are correctly monitoring the index marker status and terminating the write operation as soon as the index pulse is detected.

author: m k
author_rank: Super Contributor
timestamp: June 24, 2025, 08:24:57 am
content: Your loop can only hang if bl is not valid.It's a same source as your too long filler.Start and end fillers are just that, fillers.Start for so long that previous index overlap is gone.End is as long as it takes until index appears, so it can be a bit longer, but not that long.Start of #17 is written over.After that sector info is wrong, 00 00/40 9F 00/80.Keep in mind that sector data must be processed.Early disks had heavy interleave, one was so that next sector was previous.So a disk rotated almost a full circle before next sector became available.For the code.Check if some other commands are faster.mov bl, mov bh, FDC_loop:mov al, FDC_loop_2:and al, bljz FDC_loopmov al, stosbmov al, and al, bhjnz FDC_loop_2Assumption is that DR becomes empty and DRQ goes up.If new index happens updated DR goes nowhere and then it's not busy anymore.

author: bitwise_
author_rank: Contributor
timestamp: June 24, 2025, 08:27:41 am
content: Quote from: radiolistener on June 24, 2025, 03:19:20 amThank you again for your time and help with this.So you think that the huge gaps at the beginning and end of the disc are normal? They are so large and take half the track in size. The chip reccommends 40 x FF at the beginning and ~369 x FF at the end. But I get way too many...And also there is something deeply wrong because I am writing 16 sectors there, and when I read back I only see 9 sectors written. The amazing thing is that many sectors have correct data written. But the big picture is incorrect.It almost looks to me like the index pulses are not being recognized, but a scope probe shows them to me.Someone mentioned to me that HD discs do not work with SD drives. I am using the chip in SD mode, but the drive itself can do DD. But my discs are HD. It's impossible to find SD discs nowadays. But is this true that HD discs would not work in SD mode?I will also try adding a bunch of NOP's into my loops to see the behaviour change. This could tell me if my timings are the problem. I also want to try writing the entire format to RAM and then just reading RAM with a tighter loop and see if that fixes any timing issues.Apart from this, my read cycle is just 200ns. 200ns is the exact minimum for reading the WD1770. Could this be the cause? It's very close.Other than that, the WD is selected when my RD or WR lines go low and the chip is decoded. My WR line is connected to the RD/WR line of the WD, so this means that for a write, the CS and the RD/WR line go low at the same time. The datasheet says the hold time for the RD/WR line before CS goes low is 0, so I don't think this is an issue? For reads I think there is no issue because the RD/WR line will be high before the CS goes low anyhow.

author: grumpydoc
author_rank: Super Contributor
timestamp: June 24, 2025, 08:32:32 am
content: Quote from: bitwise_ on June 24, 2025, 08:12:29 amDepends how that translates to the WD1770 control signals - from the datasheet CS should be low for a minimum of 200ns, the actual "access time" (time for read data to be stable on the WD1770 data bus) is 100ns, there is a 150ns data hold time after CS goes high (inactive) so if you are latching data on that rising edge you are not going to hit any problems.

author: bitwise_
author_rank: Contributor
timestamp: June 24, 2025, 08:33:19 am
content: Quote from: radiolistener on June 24, 2025, 08:20:25 amI have not yet tried a Read Sector command. I can try that. However, all the sector numbers shown by Read Track are completely wrong. They are also often all the same number, 0x9F at the moment.I could try reading 9F and see what happens? I didn't try reading a single sector yet because I am concerned with how the read track looked. But I will try.I have not a machine where I can test the drive, however I have tried this code with 3 different drives, and two different WD1770 chips with the same problems.A scope on the index pulses does show low active pulses... I sent written you another reply before this one.

author: radiolistener
author_rank: Super Contributor
timestamp: June 24, 2025, 08:38:49 am
content: Quote from: bitwise_ on June 24, 2025, 08:27:41 ama large gap at the beginning of the track is normal, as different drives can have varying delays between the index pulse and the actual start of data processing. A generous initial gap helps ensure the track can be reliably read across different drives and controllers. Some controllers are simply unable to read a sector that is recorded too close to the index hole this is a well-known issue. To read protected disks or disks with specific format layout that contain critical data near the index area, it was common practice for such controllers to punch an additional index hole and cover the original one, allowing the drive to align differently during reading.However, if the gap occupies half the track, that is not normal. Typically, the initial gap should be around 50 to 100 bytes, which is just about 1-2% of the track size.

author: grumpydoc
author_rank: Super Contributor
timestamp: June 24, 2025, 08:54:47 am
content: Quote from: bitwise_ on June 24, 2025, 08:27:41 amCan't imagine why - single density disks might not work in double density mode but the other way round should be fine.QuoteNot that I haven't been there myself but this sounds like thrashing around trying things at random without understanding why it's not working.QuoteAs has already been mentioned, probably not - but without some timing diagrams for what you *think* the write/read timing is that you are generating it is impossible to say.QuoteYeah, that sounds OK - but what really matters is when the data is actually read by the CPU - if within 100ns of CS going low (with RW stable) that's too soon.Seriously, one of the little 8 channel 24MHz logic probes from eBay is going to set you back less than a tenner - OK 24MHz sampling is a little coarse to get the precise signal relationship but it should be good enough to broadly confirm you are driving the WD1770 correctly. Some claim to be pushable to 48MHz but IIRC I never had much luck with that (it's right at the limit for USB 2).

author: radiolistener
author_rank: Super Contributor
timestamp: June 24, 2025, 09:00:19 am
content: Also, as I remember, WD17xx series controllers did not include an internal data separator. As a result, the quality and reliability of data synchronization depended entirely on the design and performance of the external data separator circuitry. This external implementation, typically based on PLL or analog timing components, played a critical role in correctly recovering clock and data signals from the encoded bitstream. Poorly designed or unstable separator circuits could lead to read errors, particularly with some types of drive or disks.This could explain the easy loss of synchronization during the Read Track command. Your primary task should be to verify whether the sector read/write commands function correctly on a known properly formatted disk. If these commands also fail, it is likely that there is an issue with the drive itself or the controller circuitry - most notably the data separator. Ensuring the integrity of the data separator and related hardware is critical for reliable disk operations.

author: grumpydoc
author_rank: Super Contributor
timestamp: June 24, 2025, 09:20:04 am
content: True but that doesn't explain the overrun on the lead out section of write track.If a pre-formatted disk could be acquired that would be useful as a separate check of the read logic/code but I still think the write side needs sorting.

author: bitwise_
author_rank: Contributor
timestamp: June 24, 2025, 09:41:47 am
content: Quote from: radiolistener on June 24, 2025, 09:00:19 amThe WD1770 has an internal data separator. It has everything built in. I chose it because it was the simplest chip that also contained everything needed inside.I have disks with data in them, but they are HD disks and were probably written in HD, I can't use HD on my CPU because it would require a faster clock than it is capable of...

author: bitwise_
author_rank: Contributor
timestamp: June 24, 2025, 09:31:52 pm
content: My drive specifies 16 sectors per track, but 256 bytes per sector. Does this mean I cannot actually write 128 bytes per sector? Or does it not matter? The drive datasheet TEC-FB-501, specifies the number 256 bytes per sector only, but I dont know if its just a recommendation. If it cannot actually do 128 byte sectors then this could be the problem too?

author: amyk
author_rank: Super Contributor
timestamp: June 25, 2025, 03:55:08 am
content: Quote from: bitwise_ on June 24, 2025, 09:31:52 pmI think they just advertised support for widely-used floppy formats of the time; but otherwise, floppy drives with the standard interface are rather dumb devices, and as long as the raw data rate is within limits they should work.

author: radiolistener
author_rank: Super Contributor
timestamp: June 25, 2025, 04:32:30 am
content: If you're using a real mechanical floppy drive, it doesn't care what sector size you choose - the drive itself simply reads and writes magnetic flux transitions, the sector size is entirely handled by the controller. However, if you're working with a floppy drive emulator, non-standard sector sizes or custom disk formats can cause compatibility issues, depending on how faithfully the emulator replicates low-level behavior.

author: bitwise_
author_rank: Contributor
timestamp: June 25, 2025, 10:05:21 am
content: Quote from: radiolistener on June 25, 2025, 04:32:30 amI am using a real mechanical one yes... I will test some new code today to try and make the loop tighter to see if it is a timing issue which I suspect it is... I will let you know the results soon...

author: bitwise_
author_rank: Contributor
timestamp: June 25, 2025, 11:32:58 am
content: I made some progress by rewriting the formatting code by first writing it all to RAM and then reading RAM and sending to the WD.Now I get the right sector numbers as well as many correct sectors, but there is a problem at the beginning of the track. It's not writing the beginning of the track correctly it seems.I tried to check the CRC bytes but I do not know how to calculate them. I tried online but I don't get the right answers. Could anyone please let me know if the CRCs are correct?Thanks a lot everyone and sorry for the trouble.Code:0000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................0010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................0020 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................0030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................0040 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................0050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................0060 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................0070 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................0080 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................0090 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................00A0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................00B0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................00C0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................00D0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................00E0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................00F0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................0100 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................0110 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................0120 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................0130 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................0140 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................0150 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................0160 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................0170 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................0180 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................0190 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................01A0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................01B0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................01C0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................01D0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................01E0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................01F0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................0200 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................0210 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................0220 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................0230 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................0240 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................0250 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................0260 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................0270 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................0280 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................0290 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................02A0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................02B0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................02C0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................02D0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................02E0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................02F0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................0300 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................0310 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................0320 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................0330 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................0340 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................0350 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................0360 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................0370 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................0380 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................0390 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................03A0 00 00 00 00 00 00 00 00 00 0B FF FF FF FF FF FF ................03B0 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................03C0 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................03D0 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................03E0 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................03F0 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................0400 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................0410 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................0420 FF FF FF FF FF CE 00 00 07 00 78 65 FF FF FF FF ..........xe....0430 FF FF FF FF FF FF FF 00 00 00 00 00 00 FB E5 E5 ................0440 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0450 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0460 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0470 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0480 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0490 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................04A0 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................04B0 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 5D 30 ..............]004C0 FF FF FF FF FF FF FF FF FF FF 00 00 00 00 00 00 ................04D0 FE 00 00 08 00 68 5B FF FF FF FF FF FF FF FF FF .....h[.........04E0 FF FF 00 00 00 00 00 00 FB E5 E5 E5 E5 E5 E5 E5 ................04F0 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0500 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0510 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0520 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0530 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0540 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0550 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0560 E5 E5 E5 E5 E5 E5 E5 E5 E5 5D 30 FF FF FF FF FF .........]0.....0570 FF FF FF FF FF 00 00 00 00 00 00 FE 00 00 09 00 ................0580 5B 6A FF FF FF FF FF FF FF FF FF FF FF 00 00 00 [j..............0590 00 00 00 FB E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................05A0 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................05B0 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................05C0 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................05D0 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................05E0 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................05F0 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0600 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0610 E5 E5 E5 E5 5D 30 FF FF FF FF FF FF FF FF FF FF ....]0..........0620 00 00 00 00 00 00 FE 00 00 0A 00 0E 39 FF FF FF ............9...0630 FF FF FF FF FF FF FF FF 00 00 00 00 00 00 FB E5 ................0640 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0650 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0660 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0670 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0680 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0690 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................06A0 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................06B0 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 5D ...............]06C0 30 FF FF FF FF FF FF FF FF FF FF 00 00 00 00 00 0...............06D0 00 FE 00 00 0B 00 3D 08 FF FF FF FF FF FF FF FF ......=.........06E0 FF FF FF 00 00 00 00 00 00 FB E5 E5 E5 E5 E5 E5 ................06F0 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0700 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0710 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0720 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0730 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0740 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0750 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0760 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 5D 30 FF FF FF FF ..........]0....0770 FF FF FF FF FF FF 00 00 00 00 00 00 FE 00 00 0C ................0780 00 A4 9F FF FF FF FF FF FF FF FF FF FF FF 00 00 ................0790 00 00 00 00 FB E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................07A0 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................07B0 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................07C0 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................07D0 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................07E0 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................07F0 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0800 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0810 E5 E5 E5 E5 E5 5D 38 FF FF FF FF FF FF FF FF FF .....]8.........0820 FF 00 00 00 00 00 00 FE 00 00 0D 00 97 AE FF FF ................0830 FF FF FF FF FF FF FF FF FF 00 00 00 00 00 00 FB ................0840 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0850 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0860 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0870 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0880 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0890 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................08A0 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................08B0 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................08C0 5D 30 FF FF FF FF FF FF FF FF FF FF 00 00 00 00 ]0..............08D0 00 00 FE 00 00 0E 00 C2 FD FF FF FF FF FF FF FF ................08E0 FF FF FF FF 00 00 00 00 00 00 FB E5 E5 E5 E5 E5 ................08F0 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0900 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0910 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0920 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0930 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0940 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0950 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0960 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 5D 30 FF FF FF ...........]0...0970 FF FF FF FF FF FF FF 00 00 00 00 00 00 FE 00 00 ................0980 0F 00 F1 CC FF FF FF FF FF FF FF FF FF FF FF 00 ................0990 00 00 00 00 00 FB E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................09A0 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................09B0 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................09C0 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................09D0 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................09E0 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................09F0 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0A00 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0A10 E5 E5 E5 E5 E5 E5 5D 30 FF FF FF FF FF FF FF FF ......]0........0A20 FF FF 00 00 00 00 00 00 FE 00 00 10 00 E3 81 FF ................0A30 FF FF FF FF FF FF FF FF FF FF 00 00 00 00 00 00 ................0A40 FB E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0A50 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0A60 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0A70 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0A80 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0A90 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0AA0 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0AB0 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0AC0 E5 5D 30 FF FF FF FF FF FF FF FF FF FF FF FF FF .]0.............0AD0 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................0AE0 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................0AF0 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................0B00 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................0B10 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................0B20 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................0B30 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................0B40 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................0B50 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................0B60 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................0B70 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................0B80 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................0B90 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................0BA0 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................0BB0 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................0BC0 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................0BD0 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................0BE0 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................0BF0 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................0C00 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................0C10 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................0C20 FF FF FF FF FF FF FF FF FF

author: grumpydoc
author_rank: Super Contributor
timestamp: June 25, 2025, 11:42:58 am
content: Quote from: bitwise_ on June 25, 2025, 11:32:58 amIf you can see the first sector don't worry that the beginning of the track is not exactly the bytes that you wrote.Use the WD read sector command - that will calculate and check the CRCs for you.

author: bitwise_
author_rank: Contributor
timestamp: June 25, 2025, 12:29:27 pm
content: Quote from: grumpydoc on June 25, 2025, 11:42:58 amThe first sector I see is sector #07 instead of sector #01. I assumed I should see sector #01 first being read? It looks like it's not able to synchronize at the beginning of the track and keeps outputting 00's...

author: grumpydoc
author_rank: Super Contributor
timestamp: June 25, 2025, 02:25:04 pm
content: I still think you need to hook up a logic probe....

author: m k
author_rank: Super Contributor
timestamp: June 25, 2025, 04:22:30 pm
content: The beginning of read of #39 is at least partially incorrect.FirstID sync (6x 00) andID address Mark are actually there, says the CRC.Can't say why it starts from sector 7.Seems that the system is doing something else for quite some time after busy.E,ID field sync is excludes from calculation.

author: bitwise_
author_rank: Contributor
timestamp: June 25, 2025, 04:57:36 pm
content: Thanks for the suggestion. That is definitely true. I will get a USB one.

author: bitwise_
author_rank: Contributor
timestamp: June 25, 2025, 05:01:50 pm
content: I have an update.......... It feels like everyday I am 5% closer to getting it to work.I decided to turn off one of the configuration bits that enables the "spinup sequence" for the drive. This bit makes the disc spin until 6 index pulses have passed by. I thought this would do no harm so I mostly left it on. But turning it off when I send the read track command, now I see the sectors where they should be!!So leaving that bit on somehow is not compatible with this drive. I think the WD chip loses track of the index, or it starts the process middleway. But either way it fails with that ON.Now I can get something that looks more like a correct track. But there are still errors in some of the bytes, and that I am still not sure why,,,But here is an example track that is working better:Code:0000 0B FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................0010 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................0020 FF FF FF FF FF FF FF FF FC 00 00 00 00 00 03 FE ................0030 00 00 01 00 D2 C3 FF FF FF FF FF FF FF FF FF FF ................0040 FF 00 00 00 00 00 00 FB E5 E5 E5 E5 E5 E5 E5 E5 ................0050 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0060 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0070 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0080 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0090 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................00A0 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................00B0 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................00C0 E5 E5 E5 E5 E5 E5 E5 E5 5D 30 FF FF FF FF FF FF ........]0......00D0 FF FF FF FF 00 00 00 00 00 00 FE 00 00 02 00 87 ................00E0 90 FF FF FF FF FF FF FF FF FF FF FF 00 00 00 00 ................00F0 00 00 FB E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0100 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0110 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0120 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0130 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0140 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0150 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0160 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0170 E5 E5 E5 5D 30 FF FF FF FF FF FF FF FF FF FF 00 ...]0...........0180 00 00 00 00 00 FE 00 00 03 00 B4 A1 FF FF FF FF ................0190 FF FF FF FF FF FF FF 00 00 00 00 00 00 FB E5 E5 ................01A0 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................01B0 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................01C0 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................01D0 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................01E0 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................01F0 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0200 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0210 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 5D 30 ..............]00220 FF FF FF FF FF FF FF FF FF FF 00 00 00 00 00 00 ................0230 FE 00 00 04 00 2D 36 FF FF FF FF FF FF FF FF FF .....-6.........0240 FF FF 00 00 00 00 00 00 FB E5 E5 E5 E5 E5 E5 E5 ................0250 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0260 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0270 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0280 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0290 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................02A0 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................02B0 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................02C0 E5 E5 E5 E5 E5 E5 E5 E5 E5 5D 30 FF FF FF FF FF .........]0.....02D0 FF FF FF FF FF 00 00 00 00 00 00 FE 00 00 05 00 ................02E0 1E 07 FF FF FF FF FF FF FF FF FF FF FF 00 00 00 ................02F0 00 00 00 FB E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0300 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0310 E5 E7 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E7 F5 ................0320 E7 E5 E5 E5 E5 E7 E5 E7 E5 E7 E5 E5 E5 E5 E5 E7 ................0330 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0340 E5 E5 E5 F5 F5 F5 F5 F7 F5 F5 F5 F5 F5 F5 F5 F5 ................0350 F7 F5 F7 F5 F5 F5 F5 F5 F5 F7 F5 F5 F5 F5 F5 F7 ................0360 F5 F7 F5 F5 F5 F5 F7 F5 F7 F5 F7 F7 F7 F7 F5 F7 ................0370 F5 F7 F5 F7 5F 38 FF FF FF FF FF FF FF FF FF FF ...._8..........0380 80 00 00 00 00 00 FE 00 00 06 00 4B F4 FF FF FF ...........K....0390 FF FF FF FF FF FF FF FF 00 00 00 00 00 00 FB E5 ................03A0 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................03B0 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................03C0 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................03D0 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................03E0 E5 F5 E5 F5 E7 E5 E5 F5 E5 E5 E5 E5 E5 E5 E5 E5 ................03F0 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0400 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0410 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 FD ................0420 B0 FF FF FF FF FF FF FF FF FF FF 00 00 00 00 00 ................0430 00 FF 00 00 07 80 78 77 FF FF FF FF FF FF FF FF ......xw........0440 FF FF FF 80 00 00 00 00 00 FF F5 F7 F5 F7 F5 F7 ................0450 F5 F7 F5 F7 F5 F7 F5 F7 F5 F5 E5 F5 E5 F5 E5 F7 ................0460 E5 F7 E5 F5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0470 E5 E5 E7 E5 E7 E5 E7 E5 E7 E5 E5 E5 E5 E5 E5 E5 ................0480 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0490 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................04A0 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................04B0 E5 E5 E5 E5 E5 E7 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................04C0 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 5D 30 FF FF FF FF ..........]0....04D0 FF FF FF FF FF FF 00 00 00 00 00 00 FE 00 00 08 ................04E0 00 68 5B FF FF FF FF FF FF FF FF FF FF FF 00 00 .h[.............04F0 00 00 00 00 FB E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0500 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0510 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0520 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0530 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0540 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0550 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0560 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0570 E5 E5 E5 E5 E5 5D 30 FF FF FF FF FF FF FF FF FF .....]0.........0580 FF 00 00 00 00 00 00 FE 00 00 09 00 5B 6A FF FF ............[j..0590 FF FF FF FF FF FF FF FF FF 00 00 00 00 00 00 FB ................05A0 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................05B0 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................05C0 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................05D0 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................05E0 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................05F0 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0600 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0610 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0620 5D 30 FF FF FF FF FF FF FF FF FF FF 00 00 00 00 ]0..............0630 00 00 FE 00 00 0A 00 0E 39 FF FF FF FF FF FF FF ........9.......0640 FF FF FF FF 00 00 00 00 00 00 FB E5 E5 E5 E5 E5 ................0650 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0660 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0670 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0680 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0690 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................06A0 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................06B0 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................06C0 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 5D 30 FF FF FF ...........]0...06D0 FF FF FF FF FF FF FF 00 00 00 00 00 00 FE 00 00 ................06E0 0B 00 3D 08 FF FF FF FF FF FF FF FF FF FF FF 00 ..=.............06F0 00 00 00 00 00 FB E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0700 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0710 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0720 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0730 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0740 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0750 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0760 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0770 E5 E5 E5 E5 E5 E5 5D 30 FF FF FF FF FF FF FF FF ......]0........0780 FF FF 00 00 00 00 00 00 FE 00 00 0C 00 A4 9F FF ................0790 FF FF FF FF FF FF FF FF FF FF 00 00 00 00 00 00 ................07A0 FB E5 F7 E5 F5 E5 F5 E5 F5 E5 F5 E5 F5 E5 F5 E5 ................07B0 F5 E5 F5 E5 F5 E5 F5 E5 F5 E5 E5 E5 F5 E5 E5 E5 ................07C0 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 F5 E5 F5 E5 F5 E5 ................07D0 F5 E5 E5 E5 F5 E5 F5 E5 F5 E5 F5 E5 E5 E5 E5 E5 ................07E0 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 F5 E5 F5 E5 ................07F0 F5 E5 E5 E5 E5 E5 E5 E5 E5 F5 E5 F5 E5 F5 E5 E5 ................0800 E5 E5 E5 E5 E5 E5 F5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0810 E5 E5 E5 F5 E5 F5 E5 F5 E5 F5 E5 F5 E5 E5 E5 E5 ................0820 E5 5D 30 FF FF FF FF FF FF FF FF FF FF 00 00 00 .]0.............0830 00 00 00 FF 00 00 0D 00 97 AE FF FF FF FF FF FF ................0840 FF FF FF FF FF 80 00 00 00 00 00 FB F5 E5 F5 E5 ................0850 F5 E5 F5 E5 F5 E5 F5 E5 F5 E5 F5 E5 F5 E5 F5 E5 ................0860 F5 E5 F5 E5 F5 E5 F5 E5 F5 E5 F5 E5 F5 E5 E5 E5 ................0870 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0880 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0890 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................08A0 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................08B0 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................08C0 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 5D 30 FF FF ............]0..08D0 FF FF FF FF FF FF FF FF 00 00 00 00 00 00 FE 00 ................08E0 00 0E 00 C2 FD FF FF FF FF FF FF FF FF FF FF FF ................08F0 00 00 00 00 00 00 FB E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0900 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0910 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0920 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0930 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0940 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0950 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0960 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0970 E5 E5 E5 E5 E5 E5 E5 5D 30 FF FF FF FF FF FF FF .......]0.......0980 FF FF FF 00 00 00 00 00 00 FE 80 00 0F 00 F1 CC ................0990 FF FF FF FF FF FF FF FF FF FF FF 00 00 00 00 00 ................09A0 00 FB E5 E5 E5 E5 E5 E5 ED E7 ED E5 ED E5 ED E5 ................09B0 ED E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................09C0 ED E5 ED E5 ED E7 ED E7 ED E5 E5 E5 E5 E5 E5 E5 ................09D0 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................09E0 E5 E5 E5 E5 ED E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................09F0 E5 E5 E5 E5 E5 E5 ED E7 ED E7 ED E5 ED E5 ED E7 ................0A00 ED E7 ED E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0A10 ED E7 ED E5 ED E5 ED E5 ED E5 ED E5 E5 E5 E5 E5 ................0A20 E5 E5 5D 30 FF FF FF FF FF FF FF FF FF FF 00 00 ..]0............0A30 00 00 00 00 FE 00 00 10 00 E2 81 FF FF FF FF FF ................0A40 FF FF FF FF FF FF 00 00 00 00 00 00 FB E5 E5 ED ................0A50 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0A60 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0A70 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0A80 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0A90 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0AA0 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0AB0 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0AC0 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 5D 30 FF .............]0.0AD0 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................0AE0 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................0AF0 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................0B00 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................0B10 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................0B20 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................0B30 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................0B40 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................0B50 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................0B60 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................0B70 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................0B80 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................0B90 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................0BA0 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................0BB0 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................0BC0 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................0BD0 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................0BE0 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................0BF0 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................0C00 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................0C10 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................0C20 FF FF FF FF FF FF FF FF FF

author: grumpydoc
author_rank: Super Contributor
timestamp: June 25, 2025, 05:36:14 pm
content: When you get this all working remember that the fastest disk performance might be to write sectors out of order - eg 1,6,11,16,2,7,12,3,8,13,4,9,14,5,10,15This is known as "interleave" and allows some time for processing between consecutive sectors - otherwise you might effectively be reduced to processing one sector per revolution, which is rather slow.

author: bitwise_
author_rank: Contributor
timestamp: June 25, 2025, 07:00:54 pm
content: So someone also told me that I should not use HD disks in single density mode because the coercivity for HD is 600oe whereas for single density the drive writes in 300oe. So I took a few old disks I had that are SD, and played a bit with them.It seems to me it works now, but there are occasional errors in a few bytes. THere's this thing called write splicing, but I do not know what that is...Here is the last read I did below. Does it look like it is working now? Thanks again for your input.Code:0000 03 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................0010 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................0020 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF CE ................0030 00 00 01 00 D2 C3 FF FF FF FF FF FF FF FF FF FF ................0040 FF 00 00 00 00 00 00 FB E5 E5 E5 E5 E5 E5 E5 E5 ................0050 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0060 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0070 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0080 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0090 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................00A0 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................00B0 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................00C0 E5 E5 E5 E5 E5 E5 E5 E5 5D 30 FF FF FF FF FF FF ........]0......00D0 FF FF FF FF 00 00 00 00 00 00 FE 00 00 02 00 87 ................00E0 90 FF FF FF FF FF FF FF FF FF FF FF 00 00 00 00 ................00F0 00 00 FB E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0100 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0110 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0120 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0130 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0140 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0150 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0160 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0170 E5 E5 E5 5D 30 FF FF FF FF FF FF FF FF FF FF 00 ...]0...........0180 00 00 00 00 00 FE 00 00 03 00 B4 A1 FF FF FF FF ................0190 FF FF FF FF FF FF FF 00 00 00 00 00 00 FB E5 E5 ................01A0 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................01B0 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................01C0 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................01D0 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................01E0 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................01F0 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0200 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0210 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 5D 30 ..............]00220 FF FF FF FF FF FF FF FF FF FF 00 00 00 00 00 00 ................0230 FE 00 00 04 00 2D 36 FF FF FF FF FF FF FF FF FF .....-6.........0240 FF FF 00 00 00 00 00 00 FB E5 E5 E5 E5 E5 E5 E5 ................0250 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0260 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0270 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0280 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0290 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................02A0 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................02B0 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................02C0 E5 E5 E5 E5 E5 E5 E5 E5 E5 5D 30 FF FF FF FF FF .........]0.....02D0 FF FF FF FF FF 00 00 00 00 00 00 FE 00 00 05 00 ................02E0 1E 07 FF FF FF FF FF FF FF FF FF FF FF 00 00 00 ................02F0 00 00 00 FB E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0300 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0310 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0320 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0330 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0340 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0350 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0360 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0370 E5 E5 E5 E5 5D 30 FF FF FF FF FF FF FF FF FF FF ....]0..........0380 00 00 00 00 00 00 FE 00 00 06 00 4B 54 FF FF FF ...........KT...0390 FF FF FF FF FF FF FF FF 00 00 00 00 00 00 FB E5 ................03A0 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................03B0 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................03C0 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................03D0 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................03E0 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................03F0 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0400 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0410 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 5D ...............]0420 30 FF FF FF FF FF FF FF FF FF FF 00 00 00 00 00 0...............0430 00 FE 00 00 07 00 78 65 FF FF FF FF FF FF FF FF ......xe........0440 FF FF FF 00 00 00 00 00 00 FB E5 E5 E5 E5 E5 E5 ................0450 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0460 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0470 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0480 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0490 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................04A0 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................04B0 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................04C0 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 5D 30 FF FF FF FF ..........]0....04D0 FF FF FF FF FF FF 00 00 00 00 00 00 FE 00 00 08 ................04E0 00 68 5B FF FF FF FF FF FF FF FF FF FF FF 00 00 .h[.............04F0 00 00 00 00 FB E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0500 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0510 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0520 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0530 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0540 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0550 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0560 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0570 E5 E5 E5 E5 E5 5D 30 FF FF FF FF FF FF FF FF FF .....]0.........0580 FF 00 00 00 00 00 00 FE 00 00 09 00 5B 6A FF FF ............[j..0590 FF FF FF FF FF FF FF FF FF 00 00 00 00 00 00 FB ................05A0 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................05B0 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................05C0 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................05D0 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................05E0 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................05F0 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0600 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0610 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0620 5D 30 FF FF FF FF FF FF FF FF FF FF 00 00 00 00 ]0..............0630 00 00 FE 00 00 0A 00 0E 39 FF FF FF FF FF FF FF ........9.......0640 FF FF FF FF 00 00 00 00 00 00 FB E5 E5 E5 E5 E5 ................0650 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0660 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0670 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0680 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0690 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................06A0 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................06B0 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................06C0 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 5D 30 FF FF FF ...........]0...06D0 FF FF FF FF FF FF FF 00 00 00 00 00 00 FE 00 00 ................06E0 0B 00 3D 08 FF FF FF FF FF FF FF FF FF FF FF 00 ..=.............06F0 00 00 00 00 00 FB E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0700 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0710 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0720 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0730 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0740 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0750 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0760 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0770 E5 E5 E5 E5 E5 E5 5D 30 FF FF FF FF FF FF FF FF ......]0........0780 FF FF 00 00 00 00 00 00 FE 00 00 0C 00 A4 9F FF ................0790 FF FF FF FF FF FF FF FF FF FF 00 00 00 00 00 00 ................07A0 FB E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................07B0 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................07C0 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................07D0 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................07E0 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................07F0 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0800 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0810 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0820 E5 5D 30 FF FF FF FF FF FF FF FF FF FF 00 00 00 .]0.............0830 00 00 00 FE 00 00 0D 00 97 AE FF FF FF FF FF FF ................0840 FF FF FF FF FF 00 00 00 00 00 00 FB E5 E5 E5 E5 ................0850 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0860 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0870 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0880 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0890 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................08A0 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................08B0 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................08C0 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 5D 30 FF FF ............]0..08D0 FF FF FF FF FF FF FF FF 00 00 00 00 00 00 FE 00 ................08E0 00 0E 00 C2 FD FF FF FF FF FF FF FF FF FF FF FF ................08F0 00 00 00 00 00 00 FB E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0900 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0910 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0920 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0930 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0940 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0950 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0960 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0970 E5 E5 E5 E5 E5 E5 E5 5D 30 FF FF FF FF FF FF FF .......]0.......0980 FF FF FF 00 00 00 00 00 00 FE 00 00 0F 00 F1 CC ................0990 FF FF FF FF FF FF FF FF FF FF FF 00 00 00 00 00 ................09A0 00 FB E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................09B0 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................09C0 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................09D0 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................09E0 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................09F0 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0A00 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0A10 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0A20 E5 E5 5D 30 FF FF FF FF FF FF FF FF FF FF 00 00 ..]0............0A30 00 00 00 00 FE 00 00 10 00 E2 81 FF FF FF FF FF ................0A40 FF FF FF FF FF FF 00 00 00 00 00 00 FB E5 E5 E5 ................0A50 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0A60 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0A70 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0A80 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0A90 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0AA0 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0AB0 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 ................0AC0 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 E5 5D 30 FF .............]0.0AD0 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................0AE0 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................0AF0 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................0B00 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................0B10 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................0B20 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................0B30 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................0B40 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................0B50 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................0B60 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................0B70 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................0B80 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................0B90 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................0BA0 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................0BB0 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................0BC0 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................0BD0 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................0BE0 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................0BF0 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................0C00 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................0C10 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................0C20 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................0C30 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................0C40 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................0C50 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................0C60 FF FF FF FF FF FF FF FF FF 00 00 00 00 00 00 00 ................

author: helius
author_rank: Super Contributor
timestamp: June 25, 2025, 08:54:31 pm
content: A write splice is what happens to the magnetic media when the head's write winding turns on. You can't turn on a magnetic field without corrupting whatever is under the head at that moment. That is why the self-sync pattern must be written at the beginning of both the sector address and the sector data areas. There is no data synchronization between them. This is the reason why a Track Read commandcannotproduce a "correct track".It seems to me that this was already explained to you, but you persist in not looking up the most basic principles of disk theory of operations.

author: bitwise_
author_rank: Contributor
timestamp: June 26, 2025, 12:33:40 am
content: Guys I think I have it working now.So what happened was a series of problems.Firstly the first drives I used were probably bad.Then I switched to a new drive and that one is fine (I know now), but there were settings that needed adjusting, as well as an adjustment to my circuit that selected and signalled the WD1770 CS and RD/WR lines.The WD has this setting that adds a delay before any command. It waits for 6 index pulses. For some reason this flag was making my read and write commands totally lose synch.When I disabled this flag, it made a huge difference and the sector data was not only correct but also in the right places.There was also a setting for head select, which also if not correct will not work.I also rewrote my code to remove quite a few cycles, and that also helped. It's been a week of pain.Ah and finally, I was using HD disks in single density mode. After I switched to DD disks, most of the corruption went away.So right now I can format the disk and read back the entire track. The track is about 98% correct. Only the first very few bytes of the read are wrong, but after those everything looks right.I can also read individual sectors without errors.I am only thinking now, why are the first few bytes not right? Is this to do with synchronization?

author: radiolistener
author_rank: Super Contributor
timestamp: June 26, 2025, 08:17:50 am
content: Quote from: bitwise_ on June 26, 2025, 12:33:40 amYes, this behavior is indeed related to synchronization. The initial bytes often appear incorrect because the controller has not yet fully synchronized with the data stream at the start of the track.However, it's important not to assume that similarly clean reads will occur on all drives or with all controllers. In practice, the Read Track command frequently encounters synchronization issues, resulting in partial or corrupted data. For this reason, tools designed to create raw track images typically read the same track multiple times, analyzing and comparing the results to reconstruct all data regions reliably. In some cases, recovering a complete and accurate track image could take a significant amount of time due to these synchronization challenges.

author: m k
author_rank: Super Contributor
timestamp: June 26, 2025, 11:32:29 am
content: Quote from: bitwise_ on June 25, 2025, 07:00:54 pmFirst byte is something else.First ID Address Mark CE is still equally wrong.So it is not random.Earlier mentioned CRC included ID field sync was wrong, actually it is excludes from calculation.So presence of first ID field sync is unknown.But length of initial FF part indicates that at least space for ID field sync is there.If sector read can read first sector you know that the problem is read track.Spin-up delay must be there if command is right after motor on.

author: bitwise_
author_rank: Contributor
timestamp: June 26, 2025, 11:53:43 am
content: Quote from: m k on June 26, 2025, 11:32:29 amHi MK thank you for your time looking at this. That ID address Mark sometimes is CE and sometimes is FE, it varies between the two randomly. The number of FF before the first sector also varies in number.What CRC field do you say is wrong now please? The sector read command is working now, it can find the sector and read back the data. I should really now write different data in each sector so I can be sure it is actually giving me back the right sector, but at least now I can read the data back without it reporting any errors... It seems to be working fine now, apart from the very first few bytes.... As for the CRC's I need to learn how to calculate them to check, but the CRC error flag is not being raised at any time which is good....

author: m k
author_rank: Super Contributor
timestamp: June 26, 2025, 07:29:18 pm
content: That very first ID Address Mark and 6x 00 before it are the problem, so start of sector 1.but it's irrelevant if you can read the sector using sector read command.ID field CRC includes ID Address Mark plus four next bytes.Data field CRC includes Data Address Mark plus data bytes.https://www.lammertbies.nl/comm/info/crc-calculation

author: radiolistener
author_rank: Super Contributor
timestamp: June 27, 2025, 01:11:00 am
content: Quote from: m k on June 26, 2025, 07:29:18 pmIt worth to note - if there are several Address Marks in a row, they all included in CRC calculationIn other words - everything that comes after the synchro space (series of 0x00) is included in the crc calculation

author: bitwise_
author_rank: Contributor
timestamp: June 27, 2025, 11:08:09 am
content: If I use the write sector command, then it messes up all the synchronization bytes, when I read the entire track back to inspect. But the strange thing is that if I use read sector it can find the sectors and read them back without errors. Totally crazy. The data itself is never corrupted though, only the gaps and ID fields have a few different bytes, but they seem constant and do not change.... I will try my other drive to see if I get the same result but I suspect so... But the write track command itself perfectly writes everything. Its just the write sector command that messes up the headers... What do you think is happening?

author: grumpydoc
author_rank: Super Contributor
timestamp: June 27, 2025, 11:59:47 am
content: Quote from: bitwise_ on June 27, 2025, 11:08:09 amWhen you write a track the controller reads sector headers looking for the sector to be written, assuming it finds it and the CRC is OK it switches the head from read to write and writes the sector - this swap from read to write should occur in the area you set up with 11 FF/00 bytes (known as the write splice area). It's normal for sync to be lost there for a short time.

author: radiolistener
author_rank: Super Contributor
timestamp: June 27, 2025, 12:07:22 pm
content: Quote from: bitwise_ on June 27, 2025, 11:08:09 amNothing crazy. This is very expected behavior, as explained above. This is ok.

author: bitwise_
author_rank: Contributor
timestamp: June 27, 2025, 12:26:10 pm
content: So are you saying that writing a sector will predictably corrupt the headers? When I use the Write Track command, it perfectly writes all the headers. But if the Write Sector command corrupts the headers, then how does it manage to find them again?For example some of the 0xFE bytes are not 0xFE at all. Also the number of 00 or FF bytes vary.This is a read track result, as you can see many fields are not exactly right. But using the read sector command still finds them. I don't get it....Code:0000 DB 36 6F FF FF FF FF FF FF FF FF FF FF FF FF FF .6o.............0010 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................0020 FF FF FF FF FF FF FF FF FF C0 00 00 00 00 00 FE ................0030 00 00 01 00 D2 C3 FF FF FF FF FF FF FF FF FF FF ................0040 FF 04 00 00 00 00 00 03 FB FF EE E0 55 66 33 42 ............Uf3B0050 AA AE 67 23 11 23 56 88 99 1F 2E 40 53 63 43 52 ..g#.#V....@ScCR0060 1A A4 67 03 31 43 56 48 F9 2F 3E 50 57 62 53 21 ..g.1CVH./>PWbS!0070 2A A3 17 73 41 53 46 38 B9 6F 4E 20 56 67 63 20 *..sASF8.oN Vgc0080 6A A2 27 53 61 23 16 28 E9 AF 7E 10 52 62 73 18 j.'Sa#.(..~.Rbs.0090 5A A1 37 43 51 13 26 18 A9 6F 3E 90 51 63 03 18 Z.7CQ.&..o>.Qc..00A0 4A A5 67 33 41 43 36 68 C9 8F 5E 60 55 68 23 18 J.g3AC6h..^`Uh#.00B0 3A A3 57 23 31 73 36 48 B9 2F 1E 40 53 69 13 19 :.W#1s6H./.@Si..00C0 3A A1 48 23 21 53 46 38 A9 15 36 FE 7F FF FF FF :.H#!SF8..6.....00D0 FF FF FF FF FF E0 00 00 00 00 00 1F 00 00 02 00 ................00E0 87 90 FF FF FF FF FF FF FF FF FF FF FF 00 00 00 ................00F0 00 00 00 FB 00 01 02 03 04 05 06 07 08 09 0A 0B ................0100 0C 0D 0E 0F 10 11 12 13 14 15 16 17 18 19 1A 1B ................0110 1C 1D 1E 1F 20 21 22 23 24 25 26 27 28 29 2A 2B .... !"#$%&'()*+0120 2C 2D 2E 2F 30 31 32 33 34 35 36 37 38 39 3A 3B ,-./0123456789:;0130 3C 3D 3E 3F 40 41 42 43 44 45 46 47 48 49 4A 4B <=>?@ABCDEFGHIJK0140 4C 4D 4E 4F 50 51 52 53 54 55 56 57 58 59 5A 5B LMNOPQRSTUVWXYZ[0150 5C 5D 5E 5F 60 61 62 63 64 65 66 67 68 69 6A 6B \]^_`abcdefghijk0160 6C 6D 6E 6F 70 71 72 73 74 75 76 77 78 79 7A 7B lmnopqrstuvwxyz{0170 7C 7D 7E 7F A0 23 FF FF FF FF FF FF FF FF FF FF |}~..#..........0180 00 00 00 00 00 00 FE 00 00 03 00 B4 A1 FF FF FF ................0190 FF FF FF FF FF FF FF FF 03 FF FF FF FF FF FF CB ................01A0 FF EE E0 55 66 33 42 AA AE 67 23 11 23 56 88 99 ...Uf3B..g#.#V..01B0 1F 2E 40 53 63 43 52 1A A4 67 03 31 43 56 48 F9 ..@ScCR..g.1CVH.01C0 2F 3E 50 57 62 53 21 2A A3 17 73 41 53 46 38 B9 />PWbS!*..sASF8.01D0 6F 4E 20 56 67 63 20 6A A2 27 53 61 23 16 28 E9 oN Vgc j.'Sa#.(.01E0 AF 7E 10 52 62 73 18 5A A1 37 43 51 13 26 18 A9 .~.Rbs.Z.7CQ.&..01F0 6F 3E 90 51 63 03 18 4A A5 67 33 41 43 36 68 C9 o>.Qc..J.g3AC6h.0200 8F 5E 60 55 68 23 18 3A A3 57 23 31 73 36 48 B9 .^`Uh#.:.W#1s6H.0210 2F 1E 40 53 69 13 19 3A A1 48 23 21 53 46 38 A9 /.@Si..:.H#!SF8.0220 15 36 FE FF FF FF FF FF FF FF FF E0 00 00 00 00 .6..............0230 00 1F 00 00 04 00 2D 36 FF FF FF FF FF FF FF FF ......-6........0240 FF FF FF 00 00 00 00 00 00 FB 00 01 02 03 04 05 ................0250 06 07 08 09 0A 0B 0C 0D 0E 0F 10 11 12 13 14 15 ................0260 16 17 18 19 1A 1B 1C 1D 1E 1F 20 21 22 23 24 25 .......... !"#$%0270 26 27 28 29 2A 2B 2C 2D 2E 2F 30 31 32 33 34 35 &'()*+,-./0123450280 36 37 38 39 3A 3B 3C 3D 3E 3F 40 41 42 43 44 45 6789:;<=>?@ABCDE0290 46 47 48 49 4A 4B 4C 4D 4E 4F 50 51 52 53 54 55 FGHIJKLMNOPQRSTU02A0 56 57 58 59 5A 5B 5C 5D 5E 5F 60 61 62 63 64 65 VWXYZ[\]^_`abcde02B0 66 67 68 69 6A 6B 6C 6D 6E 6F 70 71 72 73 74 75 fghijklmnopqrstu02C0 76 77 78 79 7A 7B 7C 7D 7E 7F A0 23 FF FF FF FF vwxyz{|}~..#....02D0 FF FF FF FF FF FF 00 00 00 00 00 00 FE 00 00 05 ................02E0 00 1E 07 FF FF FF FF FF FF FF FF FF FF FF 04 00 ................02F0 00 00 00 00 03 FB FF EE E0 55 66 33 42 AA AE 67 .........Uf3B..g0300 23 11 23 56 88 99 1F 2E 40 53 63 43 52 1A A4 67 #.#V....@ScCR..g0310 03 31 43 56 48 F9 2F 3E 50 57 62 53 21 2A A3 17 .1CVH./>PWbS!*..0320 73 41 53 46 38 B9 6F 4E 20 56 67 63 20 6A A2 27 sASF8.oN Vgc j.'0330 53 61 23 16 28 E9 AF 7E 10 52 62 73 18 5A A1 37 Sa#.(..~.Rbs.Z.70340 43 51 13 26 18 A9 6F 3E 90 51 63 03 18 4A A5 67 CQ.&..o>.Qc..J.g0350 33 41 43 36 68 C9 8F 5E 60 55 68 23 18 3A A3 57 3AC6h..^`Uh#.:.W0360 23 31 73 36 48 B9 2F 1E 40 53 69 13 19 3A A1 48 #1s6H./.@Si..:.H0370 23 21 53 46 38 A9 15 36 FE FF FF FF FF FF FF FF #!SF8..6........0380 FF FF FF FF FF FF FF FF FC CE 00 00 06 00 4B 54 ..............KT0390 FF FF FF FF FF FF FF FF FF FF FF 00 00 00 00 00 ................03A0 00 FB 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D ................03B0 0E 0F 10 11 12 13 14 15 16 17 18 19 1A 1B 1C 1D ................03C0 1E 1F 20 21 22 23 24 25 26 27 28 29 2A 2B 2C 2D .. !"#$%&'()*+,-03D0 2E 2F 30 31 32 33 34 35 36 37 38 39 3A 3B 3C 3D ./0123456789:;<=03E0 3E 3F 40 41 42 43 44 45 46 47 48 49 4A 4B 4C 4D >?@ABCDEFGHIJKLM03F0 4E 4F 50 51 52 53 54 55 56 57 58 59 5A 5B 5C 5D NOPQRSTUVWXYZ[\]0400 5E 5F 60 61 62 63 64 65 66 67 68 69 6A 6B 6C 6D ^_`abcdefghijklm0410 6E 6F 70 71 72 73 74 75 76 77 78 79 7A 7B 7C 7D nopqrstuvwxyz{|}0420 7E 7F A0 23 FF FF FF FF FF FF FF FF FF FF 00 00 ~..#............0430 00 00 00 00 FE 00 00 07 00 78 65 FF FF FF FF FF .........xe.....0440 FF FF FF FF FF FF 07 FF FF FF FF FF FE CB FF EE ................0450 E0 55 66 33 42 AA AE 67 23 11 23 56 88 99 1F 2E .Uf3B..g#.#V....0460 40 53 63 43 52 1A A4 67 03 31 43 56 48 F9 2F 3E @ScCR..g.1CVH./>0470 50 57 62 53 21 2A A3 17 73 41 53 46 38 B9 6F 4E PWbS!*..sASF8.oN0480 20 56 67 63 20 6A A2 27 53 61 23 16 28 E9 AF 7E Vgc j.'Sa#.(..~0490 10 52 62 73 18 5A A1 37 43 51 13 26 18 A9 6F 3E .Rbs.Z.7CQ.&..o>04A0 90 51 63 03 18 4A A5 67 33 41 43 36 68 C9 8F 5E .Qc..J.g3AC6h..^04B0 60 55 68 23 18 3A A3 57 23 31 73 36 48 B9 2F 1E `Uh#.:.W#1s6H./.04C0 40 53 69 13 19 3A A1 48 23 21 53 46 38 A9 15 36 @Si..:.H#!SF8..604D0 FE FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................04E0 FF CE 00 00 08 00 68 5B FF FF FF FF FF FF FF FF ......h[........04F0 FF FF FF 00 00 00 00 00 00 FB 00 01 02 03 04 05 ................0500 06 07 08 09 0A 0B 0C 0D 0E 0F 10 11 12 13 14 15 ................0510 16 17 18 19 1A 1B 1C 1D 1E 1F 20 21 22 23 24 25 .......... !"#$%0520 26 27 28 29 2A 2B 2C 2D 2E 2F 30 31 32 33 34 35 &'()*+,-./0123450530 36 37 38 39 3A 3B 3C 3D 3E 3F 40 41 42 43 44 45 6789:;<=>?@ABCDE0540 46 47 48 49 4A 4B 4C 4D 4E 4F 50 51 52 53 54 55 FGHIJKLMNOPQRSTU0550 56 57 58 59 5A 5B 5C 5D 5E 5F 60 61 62 63 64 65 VWXYZ[\]^_`abcde0560 66 67 68 69 6A 6B 6C 6D 6E 6F 70 71 72 73 74 75 fghijklmnopqrstu0570 76 77 78 79 7A 7B 7C 7D 7E 7F A0 23 FF FF FF FF vwxyz{|}~..#....0580 FF FF FF FF FF FF 00 00 00 00 00 00 FE 00 00 09 ................0590 00 5B 6A FF FF FF FF FF FF FF FF FF FF FF 03 FF .[j.............05A0 FF FF FF FF FE CB FF EE E0 55 66 33 42 AA AE 67 .........Uf3B..g05B0 23 11 23 56 88 99 1F 2E 40 53 63 43 52 1A A4 67 #.#V....@ScCR..g05C0 03 31 43 56 48 F9 2F 3E 50 57 62 53 21 2A A3 17 .1CVH./>PWbS!*..05D0 73 41 53 46 38 B9 6F 4E 20 56 67 63 20 6A A2 27 sASF8.oN Vgc j.'05E0 53 61 23 16 28 E9 AF 7E 10 52 62 73 18 5A A1 37 Sa#.(..~.Rbs.Z.705F0 43 51 13 26 18 A9 6F 3E 90 51 63 03 18 4A A5 67 CQ.&..o>.Qc..J.g0600 33 41 43 36 68 C9 8F 5E 60 55 68 23 18 3A A3 57 3AC6h..^`Uh#.:.W0610 23 31 73 36 48 B9 2F 1E 40 53 69 13 19 3A A1 48 #1s6H./.@Si..:.H0620 23 21 53 46 38 A9 15 36 FE FF FF FF FF FF FF FF #!SF8..6........0630 FF FF FF FF FF FF FF FF FE CE 00 00 0A 00 0E 39 ...............90640 FF FF FF FF FF FF FF FF FF FF FF 00 00 00 00 00 ................0650 00 FB 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D ................0660 0E 0F 10 11 12 13 14 15 16 17 18 19 1A 1B 1C 1D ................0670 1E 1F 20 21 22 23 24 25 26 27 28 29 2A 2B 2C 2D .. !"#$%&'()*+,-0680 2E 2F 30 31 32 33 34 35 36 37 38 39 3A 3B 3C 3D ./0123456789:;<=0690 3E 3F 40 41 42 43 44 45 46 47 48 49 4A 4B 4C 4D >?@ABCDEFGHIJKLM06A0 4E 4F 50 51 52 53 54 55 56 57 58 59 5A 5B 5C 5D NOPQRSTUVWXYZ[\]06B0 5E 5F 60 61 62 63 64 65 66 67 68 69 6A 6B 6C 6D ^_`abcdefghijklm06C0 6E 6F 70 71 72 73 74 75 76 77 78 79 7A 7B 7C 7D nopqrstuvwxyz{|}06D0 7E 7F A0 23 FF FF FF FF FF FF FF FF FF FF 00 00 ~..#............06E0 00 00 00 00 FE 00 00 0B 00 3D 08 FF FF FF FF FF .........=......06F0 FF FF FF FF FF FF 07 FF FF FF FF FF FE CB FF EE ................0700 E0 55 66 33 42 AA AE 67 23 11 23 56 88 99 1F 2E .Uf3B..g#.#V....0710 40 53 63 43 52 1A A4 67 03 31 43 56 48 F9 2F 3E @ScCR..g.1CVH./>0720 50 57 62 53 21 2A A3 17 73 41 53 46 38 B9 6F 4E PWbS!*..sASF8.oN0730 20 56 67 63 20 6A A2 27 53 61 23 16 28 E9 AF 7E Vgc j.'Sa#.(..~0740 10 52 62 73 18 5A A1 37 43 51 13 26 18 A9 6F 3E .Rbs.Z.7CQ.&..o>0750 90 51 63 03 18 4A A5 67 33 41 43 36 68 C9 8F 5E .Qc..J.g3AC6h..^0760 60 55 68 23 18 3A A3 57 23 31 73 36 48 B9 2F 1E `Uh#.:.W#1s6H./.0770 40 53 69 13 19 3A A1 48 23 21 53 46 38 A9 15 36 @Si..:.H#!SF8..60780 FE FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................0790 FF CE 00 00 0C 00 A4 9F FF FF FF FF FF FF FF FF ................07A0 FF FF FF 00 00 00 00 00 00 FB 00 01 02 03 04 05 ................07B0 06 07 08 09 0A 0B 0C 0D 0E 0F 10 11 12 13 14 15 ................07C0 16 17 18 19 1A 1B 1C 1D 1E 1F 20 21 22 23 24 25 .......... !"#$%07D0 26 27 28 29 2A 2B 2C 2D 2E 2F 30 31 32 33 34 35 &'()*+,-./01234507E0 36 37 38 39 3A 3B 3C 3D 3E 3F 40 41 42 43 44 45 6789:;<=>?@ABCDE07F0 46 47 48 49 4A 4B 4C 4D 4E 4F 50 51 52 53 54 55 FGHIJKLMNOPQRSTU0800 56 57 58 59 5A 5B 5C 5D 5E 5F 60 61 62 63 64 65 VWXYZ[\]^_`abcde0810 66 67 68 69 6A 6B 6C 6D 6E 6F 70 71 72 73 74 75 fghijklmnopqrstu0820 76 77 78 79 7A 7B 7C 7D 7E 7F A0 23 FF FF FF FF vwxyz{|}~..#....0830 FF FF FF FF FF FF 00 00 00 00 00 00 FE 00 00 0D ................0840 00 97 AE FF FF FF FF FF FF FF FF FF FF FF 07 FF ................0850 FF FF FF FF FE CB FF EE E0 55 66 33 42 AA AE 67 .........Uf3B..g0860 23 11 23 56 88 99 1F 2E 40 53 63 43 52 1A A4 67 #.#V....@ScCR..g0870 03 31 43 56 48 F9 2F 3E 50 57 62 53 21 2A A3 17 .1CVH./>PWbS!*..0880 73 41 53 46 38 B9 6F 4E 20 56 67 63 20 6A A2 27 sASF8.oN Vgc j.'0890 53 61 23 16 28 E9 AF 7E 10 52 62 73 18 5A A1 37 Sa#.(..~.Rbs.Z.708A0 43 51 13 26 18 A9 6F 3E 90 51 63 03 18 4A A5 67 CQ.&..o>.Qc..J.g08B0 33 41 43 36 68 C9 8F 5E 60 55 68 23 18 3A A3 57 3AC6h..^`Uh#.:.W08C0 23 31 73 36 48 B9 2F 1E 40 53 69 13 19 3A A1 48 #1s6H./.@Si..:.H08D0 23 21 53 46 38 A9 15 36 FE FF FF FF FF FF FF FF #!SF8..6........08E0 FF FF FF FF FF FF FF FF FF CE 00 00 0E 00 C2 FD ................08F0 FF FF FF FF FF FF FF FF FF FF FF 00 00 00 00 00 ................0900 00 FB 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D ................0910 0E 0F 10 11 12 13 14 15 16 17 18 19 1A 1B 1C 1D ................0920 1E 1F 20 21 22 23 24 25 26 27 28 29 2A 2B 2C 2D .. !"#$%&'()*+,-0930 2E 2F 30 31 32 33 34 35 36 37 38 39 3A 3B 3C 3D ./0123456789:;<=0940 3E 3F 40 41 42 43 44 45 46 47 48 49 4A 4B 4C 4D >?@ABCDEFGHIJKLM0950 4E 4F 50 51 52 53 54 55 56 57 58 59 5A 5B 5C 5D NOPQRSTUVWXYZ[\]0960 5E 5F 60 61 62 63 64 65 66 67 68 69 6A 6B 6C 6D ^_`abcdefghijklm0970 6E 6F 70 71 72 73 74 75 76 77 78 79 7A 7B 7C 7D nopqrstuvwxyz{|}0980 7E 7F A0 23 FF FF FF FF FF FF FF FF FF FF 00 00 ~..#............0990 00 00 00 00 FE 00 00 0F 00 F1 CC FF FF FF FF FF ................09A0 FF FF FF FF FF FF 07 FF FF FF FF FF FE CB FF EE ................09B0 E0 55 66 33 42 AA AE 67 23 11 23 56 88 99 1F 2E .Uf3B..g#.#V....09C0 40 53 63 43 52 1A A4 67 03 31 43 56 48 F9 2F 3E @ScCR..g.1CVH./>09D0 50 57 62 53 21 2A A3 17 73 41 53 46 38 B9 6F 4E PWbS!*..sASF8.oN09E0 20 56 67 63 20 6A A2 27 53 61 23 16 28 E9 AF 7E Vgc j.'Sa#.(..~09F0 10 52 62 73 18 5A A1 37 43 51 13 26 18 A9 6F 3E .Rbs.Z.7CQ.&..o>0A00 90 51 63 03 18 4A A5 67 33 41 43 36 68 C9 8F 5E .Qc..J.g3AC6h..^0A10 60 55 68 23 18 3A A3 57 23 31 73 36 48 B9 2F 1E `Uh#.:.W#1s6H./.0A20 40 53 69 13 19 3A A1 48 23 21 53 46 38 A9 15 36 @Si..:.H#!SF8..60A30 FE FF FF FF FF FF FF FF FF FF FF 80 00 00 00 00 ................0A40 00 FE 00 00 10 00 E2 81 FF FF FF FF FF FF FF FF ................0A50 FF FF FF 00 00 00 00 00 00 FB 00 01 02 03 04 05 ................0A60 06 07 08 09 0A 0B 0C 0D 0E 0F 10 11 12 13 14 15 ................0A70 16 17 18 19 1A 1B 1C 1D 1E 1F 20 21 22 23 24 25 .......... !"#$%0A80 26 27 28 29 2A 2B 2C 2D 2E 2F 30 31 32 33 34 35 &'()*+,-./0123450A90 36 37 38 39 3A 3B 3C 3D 3E 3F 40 41 42 43 44 45 6789:;<=>?@ABCDE0AA0 46 47 48 49 4A 4B 4C 4D 4E 4F 50 51 52 53 54 55 FGHIJKLMNOPQRSTU0AB0 56 57 58 59 5A 5B 5C 5D 5E 5F 60 61 62 63 64 65 VWXYZ[\]^_`abcde0AC0 66 67 68 69 6A 6B 6C 6D 6E 6F 70 71 72 73 74 75 fghijklmnopqrstu0AD0 76 77 78 79 7A 7B 7C 7D 7E 7F A0 23 FF FF FF FF vwxyz{|}~..#....0AE0 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................0AF0 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................0B00 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................0B10 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................0B20 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................0B30 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................0B40 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................0B50 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................0B60 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................0B70 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................0B80 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................0B90 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................0BA0 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................0BB0 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................0BC0 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................0BD0 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................0BE0 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................0BF0 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................0C00 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................

author: grumpydoc
author_rank: Super Contributor
timestamp: June 27, 2025, 12:56:25 pm
content: Quote from: bitwise_ on June 27, 2025, 12:26:10 pmDepends what you think of as the header.If you go back to the pattern that you write for each sectorI would refer to the address ID mark through to the CRC as the sector header, the 11 FF/00 bytes are the write splice area, the 6x 00 bytes then guarantee sync and the data ID mark through to the data CRC is the sector itself.So by that definition, no, the header should not be corrupted.But it's impossible to switch from read to write and keep perfect bit level synchronisation, hence allowing a "scratch" area to do it in.It's also why people early on in the thread were warning you that read track might not read exactly the data that you wrote.

author: radiolistener
author_rank: Super Contributor
timestamp: June 27, 2025, 02:20:12 pm
content: Quote from: bitwise_ on June 27, 2025, 12:26:10 pmNo, writing a sector does not corrupt the headers. It simply introduces phase discontinuities on the track between sectors, which can disrupt synchronization during a Read Track operation. However, the Read Sector command does not rely on reading the entire track - it searches specifically for the desired sector.During Read Sector, the controller scans the track for a synchro-space followed by an address mark. It uses this for phase synchronization and to locate sector headers. Once the correct sector header is found, it continues looking for the next synchro-space followed by a data address mark and begins reading the sector data.At the point immediately following the synchro-space, the controller performs phase synchronization using the address mark bits sequence, which is written in a special way to make it easily distinguishable from regular data. Once synchronization is established, it reads the corresponding sector header or sector data block.Therefore, phase discontinuities introduced during sector writing do not affect Read Sector operations, as they occur between sectors and are not part of the synchronized data stream the controller locks onto.Strictly speaking, any garbage data can exist between sectors. These inter-sector gaps were often intentionally used to store hidden or non-standard data as part of copy protection schemes. It was also common practice to use unconventional track layouts that the controller could not interpret on its own. Reading such formats often required precise timing tricks - interrupting a command at specific points on the disk and immediately issuing a new command without delay to successfully access the secret data.As far as I recall from reverse engineering studies of the controller die, synchronization is handled internally using a 32-bit delay line. This means that writing three consecutive address marks can significantly improve synchronization accuracy, giving the controller more opportunity to lock onto the correct phase and reliably read the subsequent data.Essentially, the floppy disk controller internally implements a state machine driven by specialized microcode.

author: bitwise_
author_rank: Contributor
timestamp: June 28, 2025, 12:54:26 pm
content: Quote from: radiolistener on June 27, 2025, 02:20:12 pmThere must be something wrong with my setup then. Writing single sectors seems to corrupt the ID marks themselves. FE can become CE for example. FB becomes CB. How can it still find the correct sectors when these look incorrect? Or do they show incorrectly only to Read Track? Still, when I use the Write Track command to format the disk, I don't see any of those errors, everything looks perfect...Now have FE become CE and FB becoming CB, when writing a sector, looks strange to me. If it writes them correctly with the Write Track command, why would it not also write them correctly with Write Sector...I think this may have to do with my CPU's read timing which is 200ns, whereas the DataValid from RE for the WD is 200ns max.

author: helius
author_rank: Super Contributor
timestamp: June 28, 2025, 05:59:46 pm
content: Your repeated use of words like "correct" points to a continued fundamental misunderstanding of how data is stored on magnetic media. The bytes that you see don't, in fact, exist on the media at all, so this idea of "correct track data" needs to be completely and totally thrown away. If you repeat it one more time, then I despair that you will ever get your system to work. The problem is between the chair and keyboard.The way that magnetic media stores information is by magnetic flux reversals. The magnetic particles are aligned in one of two polarities, and the head writes strips of these fields onto the media, swapping between polarities. If you took an image of the disk using a Kerr magnetometer, you would see regions of the two polarities swapping back and forth around the circular tracks. But this isnotsufficient to recover the data that was stored by the user; the size of each magnetic region is not a digital quantity.To recover the data, the electronics must use a phase locked loop (PLL) to synchronize with the stream of magnetic flux reversals coming from the head. Each address and data in a sector is synchronized separately, using the self-sync pattern which repeats dozens of times to lock-in the PLL. Without PLL lock, there is no data to read. Each address and data must be locked-in separately because they can be written at different times.To fully represent the way the data on the disk is stored, requires what is called a flux image: a series of timings of each flux reversal using a high fidelity sampler at several Mhz, or >20 times the bit rate. An image of the track data is a poor substitute and can never be "correct" as it has no way to represent the timing differences of separately written sectors. There are algorithms that can (slowly) recover data from a flux image by applying software PLL techniques.

author: radiolistener
author_rank: Super Contributor
timestamp: June 28, 2025, 06:02:43 pm
content: Quote from: bitwise_ on June 28, 2025, 12:54:26 pmWriting a sector does not corrupt the address or data marks themselves, it remains the same. However, it does introduce phase discontinuities on the track between sectors, which can interfere with correct bit decoding during a Read Track operation. This may cause bytes to appear distorted, shifted, etc.In contrast, the Read Sector command does not simply read the entire track. Instead, it actively synchronizes on marker patterns, allowing the controller to lock onto the correct phase and reliably read the data that follows. That’s why Read Sector can function correctly even when Read Track appears to show corrupted data.Quote from: helius on June 28, 2025, 05:59:46 pmYou're absolutely right - actual bytes do not exist on the disk. What’s physically recorded on the track is an analog waveform representing magnetic transitions between logical 1 and 0. The controller’s role is to recover a bitstream from this signal and synchronize on specific patterns, such as address marks, to interpret the data correctly.When a sector is written, the write process leaves a tail at the end of data block which is a phase discontinuity. This fragment of signal can disrupt synchronization, especially during raw track reads. To correctly read the next sector, the controller must re-establish synchronization using known marker patterns in the bitstream. Without this step, the recovered data may appear corrupted or misaligned.Each bit is encoded using a pair of binary values. However, address and data marks are written using special encoding patterns that are not used for regular data bits. This allows the controller to reliably identify these marks within the bitstream and use them as synchronization points.

author: bitwise_
author_rank: Contributor
timestamp: June 28, 2025, 06:45:24 pm
content: Quote from: helius on June 28, 2025, 05:59:46 pmYou know what, if you do not know how to talk to other people, then don't waste your time replying. I'm not even reading what you wrote after your first sentence. You don't even know me, so don't you dare speak to me in that way.Go learn some manners you despicable thing.

author: bitwise_
author_rank: Contributor
timestamp: June 28, 2025, 06:46:52 pm
content: Quote from: radiolistener on June 28, 2025, 06:02:43 pmWhatever.

author: m k
author_rank: Super Contributor
timestamp: June 29, 2025, 04:03:32 pm
content: Quote from: bitwise_ on June 28, 2025, 12:54:26 pmIt's not parallel, it's serial and analog, so timing of a byte is not exact.That's why you have gaps, to allow that timing difference.Write track in a sense is not writing, it's formatting.Write is what happens inside that format, so between gaps and by write sector.FM signaling is possible in two ways, RZ and NRZ stylish, with 50% pulse ratio or not.(Z here is not necessary a real zero)Less than 50% pulse ratio is usual with logic chip signaling.There active pulse can be short since the actual happening is the edge, up or down.From that you do FM so that first you have a clock frequency and it's pulsing at the beginning of a bit.If the bit is one you add a pulse between clock pulses, and without that extra pulse the bit is zero.For magnetic media the above would be a waste of space.(it's also so with FM coding in general, but that's different)If that short pulse is recognizable then the rest can be equally short, so for magnetic media and FM a pulse ratio is 50% and a bit is defined in the middle of a bit time (was pulse), after that time its polarity changes.It is Zero if bit time's polarity is the same before and after a middle point and one if polarity changes, so direction can be different, but the bit value is still the same.So on a floppy it is up up down down of clock period for two zero bits, or down down up up.For two one bits it's up down up down or down up down up.The previous bit defines the initial polarity.So after write over something old the polarity of magnetic flux can change in wrong time at the beginning or end, but not in the middle of the operation.That is why there is a gap before next informative area and all informative areas must be written in full.If whole data area is not needed it must be filled.Write sector does not touch ID field, but it must write 6x zero bytes of data sync, so data address mark should be correct since its position is in the middle of the operation.Same with write track, if there are no hiccups there shouldn't be any errors, but that's only before any write sectors.Magnetic media's write hiccup is also a bit different than logic hiccup.When logic is edge* activated the magnetic thing is level activated, so short hiccup that is recognized as an edge by logic circuit can be no problem for magnetic thing.(*logic is also level activated when it's fast enough, but that's much faster than this case)Technically it's also possible to write an ID field only, but changing its content would be overly complicated compared to just reformat and rewrite.(WD can't do that, no such command as write address)E,definition of a pulse was a bit mixed, its time flipped from one to two.

author: amyk
author_rank: Super Contributor
timestamp: June 30, 2025, 05:14:27 am
content: Quote from: bitwise_ on June 28, 2025, 06:45:24 pmYou have already been told, that you need a scope or at the minimum a LA to debug stuff like this, yet you keep ignoring the advice and continue to fumble around with your misunderstandings. We aren't the ones who are asking for help here; bite the hand that feeds you, at your own peril.

author: Halcyon
author_rank: Unknown
timestamp: June 30, 2025, 07:57:37 am
content: Quote from: bitwise_ on June 28, 2025, 06:45:24 pmHelius was literally trying to help you. Perhaps consider the way you talk to others. If the roles were reversed, I'm sure you wouldn't be pleased getting that kind of response.Quote from: bitwise_ on June 28, 2025, 06:46:52 pmChildish crap like this won't help you either, take your own advice and think before typing. I'd have a few choice words for you too if you said that to me. Perhaps check your attitude at the door and consider how you come across to others.