MFM emulator - error trying to initialize

187 views
Skip to first unread message

PC-maniak

unread,
Aug 1, 2021, 11:25:01 AM8/1/21
to MFM Discuss
Hi, I built your a reader / emulator .. I installed a bare minimum for emulating a single disk without reading a real disk...

everything seems to be fine but when trying to initialize the disk using SpeedStor 6.5 (SSTOR) - my controller does not support initialization itself -

so there is error 0X80 - controller not response after about 20sec (it's all stuck on one sector) 

controller works fine with real mfm disk

I create disk (ST-251) cyl 820 head 6 ..

please any ideas i could try? I checked my work several times while soldering the board, no short circuit or badly soldered place .. I don't know how he gave

- Board C with BBG

Thanks Tomas (Tom / Thomas)

David Gesswein

unread,
Aug 1, 2021, 3:13:43 PM8/1/21
to mfm-d...@googlegroups.com
On Sun, Aug 01, 2021 at 08:25:01AM -0700, PC-maniak wrote:
> Hi, I built your a reader / emulator .. I installed a bare minimum for
>
> everything seems to be fine but when trying to initialize the disk using
> SpeedStor 6.5 (SSTOR) - my controller does not support initialization
> itself -
>
> so there is error 0X80 - controller not response after about 20sec (it's
> all stuck on one sector)
>

I would check if the emulator thinks its being selected. Best would be
checking selected on the 20 pin. The printouts give some information also.
You didn't send the output. If you hooked up LED's to J7 they also give
indication.

PC-maniak

unread,
Aug 4, 2021, 11:01:10 AM8/4/21
to MFM Discuss
Hi, I connected the led to pin 16 (-) and pin1 (+ / 300ohm) and it still solid lights on.. after start the emulator..

pin 20 do you think on MFM connector? or on BBG?

printouts ->

Create empty HDD:

.root@beaglebone:~/emu# ./mfm_emu  --drive 1 --file ../emufile_a --initialize --quiet 0 --cylinders 820 --heads 6
Board revision C detected
Emulated drive RPM 3600
Drive 0 num cyl 820 num head 6 track len 20836 begin_time 0
PRU clock 200000000
  Waiting, seek time 0.0 ms max 0.0 min free buffers 75
bad pattern count 0
Read queue underrun 0
Write queue overrun 0
Ecapture overrun 0
glitch count 0
glitch value 0
0:test 0 0
0:test 1 0
0:test 2 0
0:test 3 0
0:test 4 0
1:test 0 0
1:test 1 0
1:test 2 0
1:test 3 0
1:test 4 0
select 1 head 0
^C  Drive 0 Cyl 0->-1 select 1, head 0 dirty 0
####################################################

Start emulate :

root@beaglebone:~/emu# ./mfm_emu  --drive 1 --file ../emufile_a  --quiet 0
Board revision C detected
Drive 0 num cyl 820 num head 6 track len 20836 begin_time 0
PRU clock 200000000
  Waiting, seek time 0.0 ms max 0.0 min free buffers 75
bad pattern count 0
Read queue underrun 0
Write queue overrun 0
Ecapture overrun 0
glitch count 0
glitch value 0
0:test 0 0
0:test 1 0
0:test 2 0
0:test 3 0
0:test 4 0
1:test 0 0
1:test 1 0
1:test 2 0
1:test 3 0
1:test 4 0
select 1 head 0
####################################################
in SpeedStor 6.5 test seeking (that one working) all passed
select 1 head 0
  Waiting, seek time 0.0 ms max 0.1 min free buffers 75
  Waiting, seek time 0.0 ms max 0.1 min free buffers 75
  Waiting, seek time 0.0 ms max 0.1 min free buffers 75
  Waiting, seek time 0.0 ms max 0.1 min free buffers 75
  Waiting, seek time 0.0 ms max 0.1 min free buffers 75
  Waiting, seek time 0.0 ms max 0.1 min free buffers 75
  Waiting, seek time 0.0 ms max 0.1 min free buffers 75
  Waiting, seek time 0.0 ms max 0.1 min free buffers 75
  Waiting, seek time 0.0 ms max 0.1 min free buffers 75
  Waiting, seek time 0.0 ms max 0.1 min free buffers 75
  Waiting, seek time 0.0 ms max 0.1 min free buffers 75
  Waiting, seek time 0.0 ms max 0.1 min free buffers 75
  Waiting, seek time 0.0 ms max 0.1 min free buffers 75
  Waiting, seek time 0.0 ms max 0.1 min free buffers 75
  Waiting, seek time 0.0 ms max 0.1 min free buffers 75
  Waiting, seek time 0.0 ms max 0.1 min free buffers 75
and more same text...
###################################################
 
standart initialize in SpeedStor 6.5
select 1 head 0
select 1 head 7
select 1 head 5
select 1 head 0
select 1 head 5
select 1 head 0

select 1 head 7
glitch count 1
glitch value 800
select 1 head 5
and nothing else ..
SpeedStor 6.5 says error (0x80) controller fails to respond

the led still solid light (no activity .. still solid light on)
Dne neděle 1. srpna 2021 v 21:13:43 UTC+2 uživatel d...@pdp8online.com napsal:

David Gesswein

unread,
Aug 4, 2021, 9:36:45 PM8/4/21
to mfm-d...@googlegroups.com
> Hi, I connected the led to pin 16 (-) and pin1 (+ / 300ohm) and it still
> solid lights on.. after start the emulator..
>

That LED behavior is wrong. Start with the drive cables not connected to the
emulator board. It sounds like the LED is off until you run mfm_emu.
It it comes on without the cables connected something is wrong with the
select line path from the connector to the beaglebone. If it doesn't come on
but does when you connect it to the controller then something is wrong their.

The select line at the connector low is selected. The board has a pullup
on the board to keep it high with nothing connected.

Can you read schematics to do further troubleshooting yourself? I assume
you found the link to the schematics.

PC-maniak

unread,
Aug 4, 2021, 9:48:36 PM8/4/21
to mfm-d...@googlegroups.com
hello it's exactly how you write .. until the emu is started so it's LED off and as soon as I start the emu it's on


try the behavior without a cable as soon as I get to it thank you :)

yes I have a link to the schematic :) and I can read it :)


thank you for the guidance :)

Tom

Dne čt 5. 8. 2021 3:36 uživatel David Gesswein <d...@pdp8online.com> napsal:
--
You received this message because you are subscribed to the Google Groups "MFM Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mfm-discuss...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mfm-discuss/20210805013644.GB1095792%40hugin3.

PC-maniak

unread,
Aug 5, 2021, 12:36:10 PM8/5/21
to mfm-d...@googlegroups.com
Hi, I tried how it behaves without a cable :

without both cable the led is off .. with 20pin cable the led is off and if i connect the big34pin cable the led is on (if i run the emulator)

I don't know which way to go here :-/  I don't understand MFM disk at all

I have an oscilloscope and a multimeter if you direct me what to measure .. so I would give the result =)



čt 5. 8. 2021 v 3:48 odesílatel PC-maniak <tomas....@gmail.com> napsal:

David Gesswein

unread,
Aug 5, 2021, 7:14:32 PM8/5/21
to mfm-d...@googlegroups.com
On Thu, Aug 05, 2021 at 06:35:59PM +0200, PC-maniak wrote:
>
> I have an oscilloscope and a multimeter if you direct me what to measure ..
> so I would give the result =)
>

The select line coming from the controller is on pin 26.
https://en.wikipedia.org/wiki/ST506/ST412
If you flip the cable it grounds all the signals. Probably not the problem
the code prints an error if it sees that.

What do you see on that pin on emulator and with real drive connected?
Also do the same with the 20 pin cable disconnected. The controller may
leave the drive selected if it doesn't see the select or data back on the
20 pin cable.
> To view this discussion on the web visit https://groups.google.com/d/msgid/mfm-discuss/CAMwuOBZaoDSAA6fi-bFGbA5RLi2hy-SS1cLd_rJ-qSOZUFPPeQ%40mail.gmail.com.

PC-maniak

unread,
Aug 8, 2021, 4:32:17 PM8/8/21
to mfm-d...@googlegroups.com
hi,

Emulator:
all the time : 0 (0.147mA - 0.152mA)🤔

real hdd:
all the time : 0 (0.147mA - 0.152mA) 🤔

I tried to have 20 pins disconnected .. I tried to initialize the disk .. disk access (disk access only for real disk ..) 😒 .... I didn't even turn on the oscilloscope it didn't make sense

is it possible that it would be damaged (counterfeit) U4? could he do it? I have it from China

pá 6. 8. 2021 v 1:14 odesílatel David Gesswein <d...@pdp8online.com> napsal:

David Gesswein

unread,
Aug 9, 2021, 7:55:24 AM8/9/21
to mfm-d...@googlegroups.com
On Sun, Aug 08, 2021 at 10:32:05PM +0200, PC-maniak wrote:
> hi,
>
> Emulator:
> all the time : 0 (0.147mA - 0.152mA)🤔
>
> real hdd:
> all the time : 0 (0.147mA - 0.152mA) 🤔
>

I assume the above are mV not mA?

That is saying with a real hard drive the drive is selected all the time?
Does your drive have a LED and if it does I assume its on all the time?

> I tried to have 20 pins disconnected .. I tried to initialize the disk ..
> disk access (disk access only for real disk ..) 😒 .... I didn't even turn
> on the oscilloscope it didn't make sense
>
If the real disk when working is always selected this test is no longer
relavent?


> is it possible that it would be damaged (counterfeit) U4? could he do it? I
> have it from China
>

When emulator selected and not being written to does the data output look ok?
Should be positive and negative version of input.

PC-maniak

unread,
Aug 9, 2021, 9:37:09 AM8/9/21
to mfm-d...@googlegroups.com
Hi:) oooch yes mV sorry :)


yes the real disk has led and it ON state all the time

ok I'll look at the write signal data as soon as it's time thanks :)


Dne po 9. 8. 2021 13:55 uživatel David Gesswein <d...@pdp8online.com> napsal:
--
You received this message because you are subscribed to the Google Groups "MFM Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mfm-discuss...@googlegroups.com.

PC-maniak

unread,
Nov 13, 2021, 4:51:49 PM11/13/21
to mfm-d...@googlegroups.com
Hi sorry for my late reply but there was not much free time

update :
I replace the part at position U4 with purchased in the local store and the result is as follows

it works! .. ehm almost .. 
initialization will proceed without a problem .. 
but as it gets to the media scanning step, all the  cylinders  are unreadable (with head num.4(3in sstor 6.5), except for a few exceptions, it runs without a problem)
but otherwise 0,1,2 heads- all cylinders are "defective" and cannot be read

some idea which part could be semi-functional / dead ? ..

po 9. 8. 2021 v 15:36 odesílatel PC-maniak <tomas....@gmail.com> napsal:

David Gesswein

unread,
Nov 13, 2021, 8:08:12 PM11/13/21
to mfm-d...@googlegroups.com
To summarize to make sure I understand what you are saying.

Original email said you are trying to emulate a ST-251 with 820 cylinders
and 6 heads.

You initialize ok which I assume is low level formating each track.

When it tries to verify the track heads 0, 1, 2 are bad. I think you are
saying head 4 read at least mostly ok. Is 5 ok also? Is 3 bad?

If 0-3 are bad and 4-5 are good it may be the emulator is not properly reading
head select 2 line which selects head 4 & 5.

What heads are printed by the emulator while the formatting and reading are
occuring?
> To view this discussion on the web visit https://groups.google.com/d/msgid/mfm-discuss/CAMwuOBZ73Egh5VViOZVUhH-CPBzss0NCk8pOx2YdM1NnSkG%3DtA%40mail.gmail.com.

PC-maniak

unread,
Nov 14, 2021, 1:26:52 AM11/14/21
to mfm-d...@googlegroups.com
hi sorry i forgot to write that for the test I will create a tiny disk so I don't have to wait so long

50cyl 4head (+- 2mb) The emulator lists a lot of things and super fast unfortunately it is not possible to determine what the operation belongs to

so it doesn't work num.0-2heads and it works num.3head

which IC is responsible for selecting heads? I replacing it .. probably be damaged =(

David Gesswein

unread,
Nov 14, 2021, 8:55:21 AM11/14/21
to mfm-d...@googlegroups.com
Schematic is here if you can read them.
http://www.pdp8online.com/mfm/board/mfm_revc_pcb/pdf/top.pdf

The head selects go from J2 to U2 to the Beaglebone.

You can capture the messages with these commands

script
mfm_emu
control-c when done
exit
Messages saved to file typescript
> --
> You received this message because you are subscribed to the Google Groups "MFM Discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to mfm-discuss...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/mfm-discuss/CAMwuOBYJqrsG8f%2BHy9hgmtJSVEM_Vuw%2BxZrpRSu0jt1-dm6sjQ%40mail.gmail.com.

PC-maniak

unread,
Nov 14, 2021, 1:15:33 PM11/14/21
to mfm-d...@googlegroups.com
Thank you!  U2 was weird .. 
the oscilloscope on head3 (u2-> bbg) showed no data at all .. 
and after a while(2-3sec?) the data started and everything started to work normally!  all heads!(unplug oscilloscope stop working again..)  exchanged U2.... and hold me! .. same problem!  I was already lost here.. so I exchanged the C19 for 3000uF 16v(test i have on my desk :D ) and the board works absolutely perfectly!(if you.know why the cap exchange works please tells my )... maybe my problem will help others as well .. -> mfm board assembly only for emulator // old 286 + wd1003-wah mfm driver
IMG_20211114_191417.jpg
IMG_20211114_190139.jpg

David Gesswein

unread,
Nov 14, 2021, 1:29:12 PM11/14/21
to mfm-d...@googlegroups.com
Haven't had any similar reports.

C19 is bulk decoupling. I found 3.3V oscillated on some boards so added
it.

I'd also check RN9 connections and orientation. Its the pullup for the head
signals. The signals will float if the pullup isn't good which may match the
symptom you saw.
> --
> You received this message because you are subscribed to the Google Groups "MFM Discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to mfm-discuss...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/mfm-discuss/CAMwuOBY2h%3DpG%3DodNG_C22QssXnaC5JDXtS%3D0%2B2Yjd-MQ59B0Ng%40mail.gmail.com.



PC-maniak

unread,
Nov 14, 2021, 1:43:16 PM11/14/21
to mfm-d...@googlegroups.com
thanks now it works and if it starts to cause a problem I'll look into it :)

Dne ne 14. 11. 2021 19:29 uživatel David Gesswein <d...@pdp8online.com> napsal:
You received this message because you are subscribed to a topic in the Google Groups "MFM Discuss" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/mfm-discuss/b3xkDAbS4lo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to mfm-discuss...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mfm-discuss/20211114182911.GA2641501%40hugin3.

PC-maniak

unread,
Nov 14, 2021, 3:09:29 PM11/14/21
to mfm-d...@googlegroups.com
I don't know if I can write it here or should I make a new "theread" ... but some chance to put the RLL "format" into support?

I would like to make another board for my Megafile 30 for Atari machines - original drive ST-238R ( "standart" ST-251 can be formatted and used on the machine - emulator jump into panic dump)

megafile 30 info : Adaptec RLL controllers // Adaptec 4000/4070 

if it was necessary to make a backup of a formatted disk in a megafile 30 RLL (I can only ST-251) then I will add a read function to the board and make it .. =)

ne 14. 11. 2021 v 19:43 odesílatel PC-maniak <tomas....@gmail.com> napsal:

David Gesswein

unread,
Nov 14, 2021, 5:55:52 PM11/14/21
to mfm-d...@googlegroups.com
On Sun, Nov 14, 2021 at 09:09:16PM +0100, PC-maniak wrote:
> I don't know if I can write it here or should I make a new "theread" ...
> but some chance to put the RLL "format" into support?
>
It been on the todo list for quite a while but never has made it to the top.
Nobody else has been interested enough to try to add it.

Further discussion should be separate thread.

PC-maniak

unread,
Nov 15, 2021, 8:12:35 AM11/15/21
to MFM Discuss
Hi i have some free time now .. I test te board again with original capacitor and same error .. put back the "big mama cap" =) and working .. (maybe it's not important but I use BBG ->"green board")

I'm sorry I don't have any knowledge of MFM / RLL .. programming is not problem for me ..  but I don't know anything about these things

any good reading where can i learn more about the differences? MFM <-> RLL

that's all for this topic =) thank you very much!!! this project is amazing 
Dne neděle 14. listopadu 2021 v 23:55:52 UTC+1 uživatel d...@pdp8online.com napsal:

David Gesswein

unread,
Nov 16, 2021, 7:59:39 AM11/16/21
to mfm-d...@googlegroups.com
On Mon, Nov 15, 2021 at 05:12:35AM -0800, PC-maniak wrote:
> I'm sorry I don't have any knowledge of MFM / RLL .. programming is not
> problem for me .. but I don't know anything about these things
>
> any good reading where can i learn more about the differences? MFM <-> RLL
>

The data stream needs to be encoded so the clock can be recovered to extract
the data. Encoding schemes got more complex to reduce the overhead of
the clock encoding. RLL 2,7 which is the common RLL used for ST506 disks is
50% more efficent than MFM.

https://en.wikipedia.org/wiki/Modified_frequency_modulation
https://en.wikipedia.org/wiki/Run-length_limited

Looks like there are multiple RLL 2,7 encodings.

I did some modifications to the MFM emulator to try to support RLL. It didn't
work with a controller I tried and hadn't decided the best method to
troubleshoot before something higher priority came along. That code is pretty
old now but would be a good starting point for further work.

The emulator support and reading existing drives or decoding with mfm_util
are separate code.

If your intrested contact me directly. The list would like to hear the
results but probably not interested in all the details.

Reply all
Reply to author
Forward
0 new messages