68K/OS "ROM" based disk attempt

Anything QL Software or Programming Related.
User avatar
Sparrowhawk
Super Gold Card
Posts: 659
Joined: Wed Dec 15, 2010 12:33 pm
Location: @131072
Contact:

Re: 68K/OS "ROM" based disk attempt

Post by Sparrowhawk »

Just wanted to chip in to say great job with the digital archealogy, Tony! Keep at it :)


a.k.a. Jean-Yves
User avatar
M68008
Trump Card
Posts: 234
Joined: Sat Jan 29, 2011 1:55 am
Contact:

Re: 68K/OS "ROM" based disk attempt

Post by M68008 »

t0nyt wrote: Wed May 08, 2024 5:08 pm I now have these items:
Not sure if on Mac it's the same, but on Windows often the logic analyzer won't immediately be seen by PulseView (try using fx2lafw type). When that happens, the Zadig utility (comes with PulseView) can be used to install the proper firmware. After that, it should then show as "saleae" in PulseView.

Here is how I connect to the mdv data tracks using a microdrive cable:
MdvConnector.jpg
The connector at the end of the cable has eight contacts on each side, but the third from right is not connected as it corresponds to the indentation on the edge PCB connector of the QL.

The first contacts on the right (blue and red, upper and lower) are the microdrive data lines, I connected the lower one (first track) to channel 0 of the logic analyzer, and the other one to channel 1. Also connect GND (green) to either one of the contacts on the left. No other connections are needed.

Here is a SuperBASIC extension with MDV_ON <drive_num> and MDV_OFF commands to turn the motor on and off. They actually didn't work that well on my QL, but it could be my configuration (gold card, vMap, faulty ULA)... hope they work for you:
http://www.terdina.net/ql/soft/motor_bin

Set pulseview to 1 G samples and 24 MHz, use MDV_ON, then click 'run' in pulse view, wait for the capture to complete (less than one minute), check that the trace shows some variable signals on both channels and save it as .sr file.

Thanks,
Daniele


User avatar
t0nyt
Gold Card
Posts: 438
Joined: Wed Nov 22, 2023 6:46 pm
Location: UK

Re: 68K/OS "ROM" based disk attempt

Post by t0nyt »

M68008 wrote: Fri May 10, 2024 6:59 am
t0nyt wrote: Wed May 08, 2024 5:08 pm I now have these items:
Not sure if on Mac it's the same, but on Windows often the logic analyzer won't immediately be seen by PulseView (try using fx2lafw type). When that happens, the Zadig utility (comes with PulseView) can be used to install the proper firmware. After that, it should then show as "saleae" in PulseView.

Here is how I connect to the mdv data tracks using a microdrive cable:
MdvConnector.jpg

The connector at the end of the cable has eight contacts on each side, but the third from right is not connected as it corresponds to the indentation on the edge PCB connector of the QL.

The first contacts on the right (blue and red, upper and lower) are the microdrive data lines, I connected the lower one (first track) to channel 0 of the logic analyzer, and the other one to channel 1. Also connect GND (green) to either one of the contacts on the left. No other connections are needed.

Here is a SuperBASIC extension with MDV_ON <drive_num> and MDV_OFF commands to turn the motor on and off. They actually didn't work that well on my QL, but it could be my configuration (gold card, vMap, faulty ULA)... hope they work for you:
http://www.terdina.net/ql/soft/motor_bin

Set pulseview to 1 G samples and 24 MHz, use MDV_ON, then click 'run' in pulse view, wait for the capture to complete (less than one minute), check that the trace shows some variable signals on both channels and save it as .sr file.

Thanks,
Daniele
Hi Daniele,

Thanks for the info, will give it a try when I can

I didn't see a build of Pulseview for M1 MacBook (or ARM W11), so will try and use a small W10 PC I have recently acquired (mainly for updating my Atari 2600+)

Will report back when I have an output to send to you

Many thanks


User avatar
t0nyt
Gold Card
Posts: 438
Joined: Wed Nov 22, 2023 6:46 pm
Location: UK

Re: 68K/OS "ROM" based disk attempt

Post by t0nyt »

Hi Daniele,

I think I have all the Hardware & Software ready to go BUT I can't get the "hooks" to latch onto the MD cable

Any thoughts on what else I can do please?

Many thanks


User avatar
M68008
Trump Card
Posts: 234
Joined: Sat Jan 29, 2011 1:55 am
Contact:

Re: 68K/OS "ROM" based disk attempt

Post by M68008 »

t0nyt wrote: Fri May 10, 2024 9:06 am Hi Daniele,

I think I have all the Hardware & Software ready to go BUT I can't get the "hooks" to latch onto the MD cable

Any thoughts on what else I can do please?

Many thanks
For outside, you can get some kind of edge connector and connect the probe to it. Or if you are opening your QL anyways, we could find the ULA pinout.

In my case, I inserted the hooks this way, but I guess your connector has a different geometry that prevents it:
_DSC3447.jpg


User avatar
t0nyt
Gold Card
Posts: 438
Joined: Wed Nov 22, 2023 6:46 pm
Location: UK

Re: 68K/OS "ROM" based disk attempt

Post by t0nyt »

M68008 wrote: Fri May 10, 2024 4:46 pm
t0nyt wrote: Fri May 10, 2024 9:06 am Hi Daniele,

I think I have all the Hardware & Software ready to go BUT I can't get the "hooks" to latch onto the MD cable

Any thoughts on what else I can do please?

Many thanks
For outside, you can get some kind of edge connector and connect the probe to it. Or if you are opening your QL anyways, we could find the ULA pinout.

In my case, I inserted the hooks this way, but I guess your connector has a different geometry that prevents it:
_DSC3447.jpg
My hook ends look much thinner than yours, I think that might be the problem

I’ll take a look on Amazon for a different set


User avatar
t0nyt
Gold Card
Posts: 438
Joined: Wed Nov 22, 2023 6:46 pm
Location: UK

Re: 68K/OS "ROM" based disk attempt

Post by t0nyt »

I had a spare mdv cable so I decided to sacrifice it

Tried doing the capture but only got signal on 1 channel

After a bit of testing I’ve found one of the hook cables I was using has no continuity

Will try again this weekend with a different cable

Many thanks


User avatar
t0nyt
Gold Card
Posts: 438
Joined: Wed Nov 22, 2023 6:46 pm
Location: UK

Re: 68K/OS "ROM" based disk attempt

Post by t0nyt »

Hi Daniele,

I now have the capture file (no idea if it's got valid data) and it's 11.3mb (or 10.7mb zipped)

How do you want me to get the file to you please?

Many thanks
Tony


User avatar
M68008
Trump Card
Posts: 234
Joined: Sat Jan 29, 2011 1:55 am
Contact:

Re: 68K/OS "ROM" based disk attempt

Post by M68008 »

t0nyt wrote: Fri May 10, 2024 6:38 pm How do you want me to get the file to you please?
I'll PM an upload link


User avatar
M68008
Trump Card
Posts: 234
Joined: Sat Jan 29, 2011 1:55 am
Contact:

Re: 68K/OS "ROM" based disk attempt

Post by M68008 »

I'm thinking about what format to use for the resulting microdrive image. QLay's MDV image looks general on the surface, but it's not, it only works because emulators know the image format and that is specific to QDOS (512-byte sectors, etc.). Another issue is that it doesn't explicitly store the microdrive gaps and their locations, which are necessary to generate the ZX8302 gap interrupts.
So, as painful as that is (there are already two different MDV formats, the QLay one, and the mdump_task one that stores extra copies of damaged sectors to help recovery), I think that a lower-level image file format may be needed.

Existing formats like .scp that record all magnetic transitions should be able to store the information, but they are too low level to be practical for tools and emulators.
I have also looked at some of the tape and mdv formats for the Spectrum, but they don't seem suitable for one reason or another. Some of them also seem to be conceived for read-only playback, but it would be hard to support low-level format operations with them. Perhaps someone knows of simple but more generic tape formats devised for other machines?
Another option would be to have a QLay format variant specific to 68K/OS (1 KB sectors, etc.), then in case another way of formatting microdrives is ever discovered or devised, create yet another variant, and so on.

Currently, my plan is to create a new .mdvraw format that is generic enough to support any potential QL formats. It would consist of a QLay-image-style stream of bytes, but also include space for the gaps, and a separate 'gap map' section that indicates whether each byte or word is actual data vs. gap (i.e. no magnetic transitions).
It would still be a relatively simple format and allow writing or even reformatting in different formats without changing the size and structure of the image. Approximate image size to store 7.5 seconds of tape would be 105 KB.


Post Reply