Problems formatting a 5.25" floppy...
-
- Member
- Posts: 26
- Joined: Tue Feb 06, 2018 9:01 pm
Problems formatting a 5.25" floppy...
Hi there I am trying to format a 5.25" floppy via my own homebrew CPU and the loop is getting stuck trying to read the DRQ flag in the status register.
This is the WD1770 controller.
Could anyone PLEASE take a look at my code and tell me if you can see anything I am doing wrong?
Basically I issue the write track command, and then I am just waiting for DRQ in loops and when DRQ = 1 I write a byte to the data register. But it seems it never manages to read the DRQ == 1...
Here is my code:
syscall_fdc_format:
mov [fdc_128_format_track], bl ; write track number to formatting data block
mov al, 1
mov [fdc_128_format_sect], al ; reset sector variable to 1
mov d, s_format_begin
call _puts
mov bl, [_FDC_WD_STAT_CMD] ; read status register to clear any errors
call print_u8x
call printnl
fdc_header_loop_start:
mov al, %11110110 ; Write Track Command: {1111, 0: Enable Spin-up Seq, 1: Settling Delay, 1: No Write Precompensation, 0}
mov [_FDC_WD_STAT_CMD], al
; write the first data block for formatting which is 40 bytes of 0xFF:
call fdc_wait_64us ; after issuing write track command, need to wait 64us before reading the status register
mov bl, [_FDC_WD_STAT_CMD] ; read status flag
call print_u8x
call printnl
mov cl, 40
fdc_drq_loop: ; for each byte, we need to wait for DRQ to be high
mov al, [_FDC_WD_STAT_CMD] ; read lost data flag
and al, $02 ; check drq bit
jz fdc_drq_loop
mov bl, $FF ; load format byte
mov [_FDC_WD_DATA], bl ; send data byte to wd1770
dec cl
jnz fdc_drq_loop
; start inner data block loop. this block is written 16 times
fdc_inner_loop:
mov si, fdc_128_format_inner
mov cl, 169 ; the inner format data block has 169 bytes total
mov ah, 1
fdc_drq_loop1:
mov al, [_FDC_WD_STAT_CMD] ; read lost data flag
and al, $02 ; check drq bit
jz fdc_drq_loop1
lodsb ; load format byte
mov [_FDC_WD_DATA], al ; send data byte to wd1770
dec cl
jnz fdc_drq_loop1 ; test whether entire data block was written
mov al, ah
inc al
mov [fdc_128_format_sect], al ; update the sector number variable in the format data block
cmp al, 17
jne fdc_inner_loop ; test whether data block was written 16 times
; here all the sectors have been written. now fill in remaining of the track until wd1770 interrupts out
fdc_format_footer:
mov a, $6500
syscall sys_io ; char in AH
fdc_footer_drq_loop:
mov al, [_FDC_WD_STAT_CMD] ; read lost data flag
and al, $02 ; check drq bit
jz fdc_footer_drq_loop
mov bl, $FF ; load format byte
mov [_FDC_WD_DATA], bl ; send data byte to wd1770
mov al, [_FDC_WD_STAT_CMD]
and al, $01 ; check busy bit
jnz fdc_format_footer ; if busy == 1, command is not finished, so loop again
fdc_format_done:
mov d, s_format_done
call _puts
mov al, %10000001 ; re-enable uart and fdc irqs
stomsk
sysret
This is the WD1770 controller.
Could anyone PLEASE take a look at my code and tell me if you can see anything I am doing wrong?
Basically I issue the write track command, and then I am just waiting for DRQ in loops and when DRQ = 1 I write a byte to the data register. But it seems it never manages to read the DRQ == 1...
Here is my code:
syscall_fdc_format:
mov [fdc_128_format_track], bl ; write track number to formatting data block
mov al, 1
mov [fdc_128_format_sect], al ; reset sector variable to 1
mov d, s_format_begin
call _puts
mov bl, [_FDC_WD_STAT_CMD] ; read status register to clear any errors
call print_u8x
call printnl
fdc_header_loop_start:
mov al, %11110110 ; Write Track Command: {1111, 0: Enable Spin-up Seq, 1: Settling Delay, 1: No Write Precompensation, 0}
mov [_FDC_WD_STAT_CMD], al
; write the first data block for formatting which is 40 bytes of 0xFF:
call fdc_wait_64us ; after issuing write track command, need to wait 64us before reading the status register
mov bl, [_FDC_WD_STAT_CMD] ; read status flag
call print_u8x
call printnl
mov cl, 40
fdc_drq_loop: ; for each byte, we need to wait for DRQ to be high
mov al, [_FDC_WD_STAT_CMD] ; read lost data flag
and al, $02 ; check drq bit
jz fdc_drq_loop
mov bl, $FF ; load format byte
mov [_FDC_WD_DATA], bl ; send data byte to wd1770
dec cl
jnz fdc_drq_loop
; start inner data block loop. this block is written 16 times
fdc_inner_loop:
mov si, fdc_128_format_inner
mov cl, 169 ; the inner format data block has 169 bytes total
mov ah, 1
fdc_drq_loop1:
mov al, [_FDC_WD_STAT_CMD] ; read lost data flag
and al, $02 ; check drq bit
jz fdc_drq_loop1
lodsb ; load format byte
mov [_FDC_WD_DATA], al ; send data byte to wd1770
dec cl
jnz fdc_drq_loop1 ; test whether entire data block was written
mov al, ah
inc al
mov [fdc_128_format_sect], al ; update the sector number variable in the format data block
cmp al, 17
jne fdc_inner_loop ; test whether data block was written 16 times
; here all the sectors have been written. now fill in remaining of the track until wd1770 interrupts out
fdc_format_footer:
mov a, $6500
syscall sys_io ; char in AH
fdc_footer_drq_loop:
mov al, [_FDC_WD_STAT_CMD] ; read lost data flag
and al, $02 ; check drq bit
jz fdc_footer_drq_loop
mov bl, $FF ; load format byte
mov [_FDC_WD_DATA], bl ; send data byte to wd1770
mov al, [_FDC_WD_STAT_CMD]
and al, $01 ; check busy bit
jnz fdc_format_footer ; if busy == 1, command is not finished, so loop again
fdc_format_done:
mov d, s_format_done
call _puts
mov al, %10000001 ; re-enable uart and fdc irqs
stomsk
sysret
Re: Problems formatting a 5.25" floppy...
Is this a low-level format or are you just reformatting a disk that has already been low-level formatted?
It may be that unless the disk has already been low-level formatted in the same drive you need to do so before you can successfully do simple data writes. And if the disks haven't been formatted lately you may need to do this anyway; with time they will lose their formatting information.
It may be that unless the disk has already been low-level formatted in the same drive you need to do so before you can successfully do simple data writes. And if the disks haven't been formatted lately you may need to do this anyway; with time they will lose their formatting information.
-
- Member
- Posts: 26
- Joined: Tue Feb 06, 2018 9:01 pm
Re: Problems formatting a 5.25" floppy...
Hey there. I am formatting the disk. This is what the code attempts to do. But it gets stuck for some reason...I am not trying to write data sectors. I am writing to actualy format. This controller formats by writing data to all sectors.
Re: Problems formatting a 5.25" floppy...
A low-level format of a blank disk writes additional information so that the controller can locate the sectors. (Tracks are fixed by the stepper motor, but you need markers to locate sectors within a track - not universally true as the original 8 inch floppy disks had holes in the disk to locate sectors.)
The controller has a command to format a track, although you need to supply the appropriate data. This data sheet for a different, but compatible, controller provides details of what needs to be written to a disk to format it:
https://www.tim-mann.org/max80/Appendix_D_Updated.pdf
So the question remains, are you dealing with blank disks or pre-formatted ones? As I said before, even if pre-formatted, if they were formatted a long time ago and/or in a different drive the format may need refreshing. It’s even possible that disks that old are no longer viable. Have you tested them on another computer?
The controller has a command to format a track, although you need to supply the appropriate data. This data sheet for a different, but compatible, controller provides details of what needs to be written to a disk to format it:
https://www.tim-mann.org/max80/Appendix_D_Updated.pdf
So the question remains, are you dealing with blank disks or pre-formatted ones? As I said before, even if pre-formatted, if they were formatted a long time ago and/or in a different drive the format may need refreshing. It’s even possible that disks that old are no longer viable. Have you tested them on another computer?
-
- Member
- Posts: 26
- Joined: Tue Feb 06, 2018 9:01 pm
Re: Problems formatting a 5.25" floppy...
The disk was not formatted before. I do have the list of bytes that need to be written, I am following those exactly. The controller is WD1770 which is very simple one. It sets the DRQ flag high which my CPU waits for, and after that it accepts a byte and sets DRQ low. THis is the basic loop. But, something is going wrong in that my CPU waits for DRQ forever and gets stuck. There is a quick with this controller, the RD/WR line is a single line so if it is high it reads, and low writes. My CPU has separate lines for RD and WR, so I connected the WR line from my CPU to the RD/WR line of the controller.
When my CPU is about to write, it sets the address bus, which sets the CS pin of the WD low and selects it which causes a read request. I wonder if this read request could be setting the DRQ low before I can read it?
When my CPU is about to write, it sets the address bus, which sets the CS pin of the WD low and selects it which causes a read request. I wonder if this read request could be setting the DRQ low before I can read it?
-
- Member
- Posts: 5873
- Joined: Mon Mar 25, 2013 7:01 pm
Re: Problems formatting a 5.25" floppy...
That's possible. You're also violating the chip's timing requirements, since the datasheet seems to indicate that A0, A1, and R/W should all hold their values while /CS is low. Either of those can be enough to make it misbehave.AnalogChipDesigner wrote: ↑Sat Jun 21, 2025 10:31 amWhen my CPU is about to write, it sets the address bus, which sets the CS pin of the WD low and selects it which causes a read request. I wonder if this read request could be setting the DRQ low before I can read it?
-
- Member
- Posts: 26
- Joined: Tue Feb 06, 2018 9:01 pm
Re: Problems formatting a 5.25" floppy...
Thank you for your reply on this.Octocontrabass wrote: ↑Sat Jun 21, 2025 9:32 pmThat's possible. You're also violating the chip's timing requirements, since the datasheet seems to indicate that A0, A1, and R/W should all hold their values while /CS is low. Either of those can be enough to make it misbehave.AnalogChipDesigner wrote: ↑Sat Jun 21, 2025 10:31 amWhen my CPU is about to write, it sets the address bus, which sets the CS pin of the WD low and selects it which causes a read request. I wonder if this read request could be setting the DRQ low before I can read it?
Well my RD and WR lines are stable, they remain stable while CS is low.
I will try modifying the circuit a bit, and I will insert RD and WR into the CS selecting logic so that CS only goes low when either RD or WR go low. This way there won't be a spurious read right before a write. if this doesn't solve the problem then I will try something else...
This is very puzzling and very difficult to debug...
-
- Member
- Posts: 26
- Joined: Tue Feb 06, 2018 9:01 pm
Re: Problems formatting a 5.25" floppy...
I think I've made some progress on this.
I modified my circuit so that the CS pin of the WD has the logic:
fdc or (rd and wr) where fdc is the decoded signal to select the wd chip, and rd and wr are all active low.
So the WD is only selected if either RD or WR go low. This avoids spurious reads right before a write operation.
After this, when I issue the write track command to format the drive, it seems to do it till the end, and the status register has no errors in it.
I am still suspicious about it so will need to experiment more. But I think the issue was the CS line.
How can I make sure the format has completed successfully? This chip is simple but is hard to use because its so simple.
I modified my circuit so that the CS pin of the WD has the logic:
fdc or (rd and wr) where fdc is the decoded signal to select the wd chip, and rd and wr are all active low.
So the WD is only selected if either RD or WR go low. This avoids spurious reads right before a write operation.
After this, when I issue the write track command to format the drive, it seems to do it till the end, and the status register has no errors in it.
I am still suspicious about it so will need to experiment more. But I think the issue was the CS line.
How can I make sure the format has completed successfully? This chip is simple but is hard to use because its so simple.
-
- Member
- Posts: 5873
- Joined: Mon Mar 25, 2013 7:01 pm
Re: Problems formatting a 5.25" floppy...
If you have hardware capable of directly reading flux transitions off the disk surface (e.g. Greaseweazle), you can check what was written that way.
Otherwise... I guess try reading and writing the disk?
Otherwise... I guess try reading and writing the disk?
-
- Member
- Posts: 26
- Joined: Tue Feb 06, 2018 9:01 pm
Re: Problems formatting a 5.25" floppy...
I dont unfortunately.Octocontrabass wrote: ↑Sun Jun 22, 2025 6:29 pm If you have hardware capable of directly reading flux transitions off the disk surface (e.g. Greaseweazle), you can check what was written that way.
Otherwise... I guess try reading and writing the disk?
I wrote a routine to read from disk, and it reads junk. The RD lines from the floppy are sending data but whatever I get is junk,
It's puzzling. The only thing I can think of is that my CPU is too slow for it, but my clock is 2.5MHz so 0.4us period. I think I have around 47.5us to respond to the DRQ signal? For 125kbps data rate in FM its about 64us per byte. I think my code is well within limits.
Perhaps I need to go further and control the RD/WR line of the WD via a flip flop port to keep it more stable.
This is so frustrating and has drained my energy for days now.
Also, how does my floppy drive decide the data rate anyhow? It could do both 250 and 125, but which it is I dont know. Perhaps it is set to do 250 and I am trying to use it with 125? It's a TEC-501 drive. Or its the controller that does that by just writing faster or slower and the drive rotates at constant speed. yea I think that's it. There's no floppy configuration for this...
-
- Member
- Posts: 5873
- Joined: Mon Mar 25, 2013 7:01 pm
Re: Problems formatting a 5.25" floppy...
Got any other computers you could use to read (or write) the disk aside from the one you built?AnalogChipDesigner wrote: ↑Sun Jun 22, 2025 7:35 pmI wrote a routine to read from disk, and it reads junk.
It doesn't. Flux transitions are anywhere between 4 and 8 microseconds apart, and the data rate is determined by how the varying spaces between flux transitions are used to encode the data. Using 4-to-8-microsecond gaps, FM encodes 125 Kbps, and MFM encodes 250 Kbps.AnalogChipDesigner wrote: ↑Sun Jun 22, 2025 7:35 pmAlso, how does my floppy drive decide the data rate anyhow?
Do you mean a TEC FB-501?
-
- Member
- Posts: 26
- Joined: Tue Feb 06, 2018 9:01 pm
Re: Problems formatting a 5.25" floppy...
I don't have a computer to test it with, but issuing a read command at least "should" work. If I can get the read track command working that would be a great start.Octocontrabass wrote: ↑Sun Jun 22, 2025 11:07 pmGot any other computers you could use to read (or write) the disk aside from the one you built?AnalogChipDesigner wrote: ↑Sun Jun 22, 2025 7:35 pmI wrote a routine to read from disk, and it reads junk.
It doesn't. Flux transitions are anywhere between 4 and 8 microseconds apart, and the data rate is determined by how the varying spaces between flux transitions are used to encode the data. Using 4-to-8-microsecond gaps, FM encodes 125 Kbps, and MFM encodes 250 Kbps.AnalogChipDesigner wrote: ↑Sun Jun 22, 2025 7:35 pmAlso, how does my floppy drive decide the data rate anyhow?
Do you mean a TEC FB-501?
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. If you can help me with this I'll even pay you for that. 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, [_FDC_WD_DATA] ; read data register to clear any errors
mov al, [_FDC_WD_STAT_CMD] ; read status register to clear any errors
mov al, %11100000
mov [_FDC_WD_STAT_CMD], al
call fdc_wait_64us
mov di, transient_area
fdc_read_loop: ; for each byte, we need to wait for DRQ to be high
mov al, [_FDC_WD_STAT_CMD] ; read busy flag
mov bl, al
and bl, $01 ; busy bit
jz fdc_read_end
and al, $02 ; check drq bit
jz fdc_read_loop
mov al, [_FDC_WD_DATA] ; send data byte to wd1770
stosb
jmp fdc_read_loop
is anything wrong with this?
-
- Member
- Posts: 5873
- Joined: Mon Mar 25, 2013 7:01 pm
Re: Problems formatting a 5.25" floppy...
A copy of the data you're reading from the track may be helpful.AnalogChipDesigner wrote: ↑Mon Jun 23, 2025 8:44 amI get periods of say AAAAAAAAAAAAAAAAAAA follows by BBBBBBBBBBBBBBBBB or FFFFFFFFFFFFFFFFFF or whatever, and then some random chars.
It sounds like your drive may not be reaching full speed before the read begins. How many bytes of data do you end up reading before the controller decides you've read the whole track?AnalogChipDesigner wrote: ↑Mon Jun 23, 2025 8:44 amAt 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.
-
- Member
- Posts: 26
- Joined: Tue Feb 06, 2018 9:01 pm
Re: Problems formatting a 5.25" floppy...
Apologies for not showing the data earlier.Octocontrabass wrote: ↑Mon Jun 23, 2025 12:13 pmA copy of the data you're reading from the track may be helpful.AnalogChipDesigner wrote: ↑Mon Jun 23, 2025 8:44 amI get periods of say AAAAAAAAAAAAAAAAAAA follows by BBBBBBBBBBBBBBBBB or FFFFFFFFFFFFFFFFFF or whatever, and then some random chars.
It sounds like your drive may not be reaching full speed before the read begins. How many bytes of data do you end up reading before the controller decides you've read the whole track?AnalogChipDesigner wrote: ↑Mon Jun 23, 2025 8:44 amAt 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 the data I read, however, every time I read, the data seems to cycle and shift in position. I read a total of about 15,000 bytes for a track which is crazy. A counter in the read loop gives that number.
As for reaching full speed, the reading process ends seconds before the disc stops spinning. I found that weird as well. The CPU is already printing to the screen and the disc is still spinning. it spins for a few seconds and stops... But the read track process is finished very fast.
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 ...............m
06A0 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 ................
-
- Member
- Posts: 5873
- Joined: Mon Mar 25, 2013 7:01 pm
Re: Problems formatting a 5.25" floppy...
That's normal. The index pulse isn't perfectly aligned to the data, so it'll start at a different spot each time. Write splices also cause inconsistent reads, though on a newly-formatted track there should only be one splice near the index.AnalogChipDesigner wrote: ↑Mon Jun 23, 2025 12:45 pmThis is the data I read, however, every time I read, the data seems to cycle and shift in position.
You've only shared 3,072 bytes of data, which is pretty close to the nominal 3,125 that can fit in a track. If you're actually reading 15,000 bytes, something is wrong - either your drive is spinning a whole lot slower than 300 RPM or the index pulses are sometimes getting lost.AnalogChipDesigner wrote: ↑Mon Jun 23, 2025 12:45 pmI read a total of about 15,000 bytes for a track which is crazy.
That's also normal. Any time the drive stops, you have to wait for it to start again before you can access the disk. Leaving it on for a bit after the end of the command means you have time to send another command without needing to wait.AnalogChipDesigner wrote: ↑Mon Jun 23, 2025 12:45 pmAs for reaching full speed, the reading process ends seconds before the disc stops spinning. I found that weird as well.
This looks like it's supposed to be the ID field for CHS 0/0/12, but the ID address mark is corrupt.AnalogChipDesigner wrote: ↑Mon Jun 23, 2025 12:45 pm0270 FF CE 00 00 0C 00 A4 9F FF FF FF FF FF FF FF FF ................
This is the corresponding data. Every byte of this sector is 0xAA. The checksum is correct.AnalogChipDesigner wrote: ↑Mon Jun 23, 2025 12:45 pm0280 FF FF FF 00 00 00 00 00 00 FB AA AA AA AA AA AA ................
...
0300 AA AA AA AA AA AA AA AA AA AA FE E7 FF FF FF FF ................
This is the ID field for CHS 0/0/13.AnalogChipDesigner wrote: ↑Mon Jun 23, 2025 12:45 pm0310 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 ................
This is the corresponding data.AnalogChipDesigner wrote: ↑Mon Jun 23, 2025 12:45 pm0330 00 00 00 00 FB 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 ................
This continues for 0/0/14, 0/0/15, and 0/0/16, followed by what's apparently the end-of-track gap, though it looks like you're mistakenly using 0xE5 as the gap filler data.