Dreamdisk lives!

Discussion group for the Dreamdisk FDC recreation project
User avatar
jltursan
Posts: 28
Joined: Tue Feb 06, 2024 5:43 pm

Re: Dreamdisk lives!

Post by jltursan »

I've just tested the "no jumper" scenario in my Dreamdisk; but sadly, without BUSDIR jumper, the drive seems to be not recognized by the Sorcerer or at least, it doesn't boots.

So, as I have installed a switch to easily change the jumper, in the old position the drive boots and reads as usual; but writing is indeed not allowed, it fails.

Just to be sure...is this the right command to duplicate a file changing its name?:

Code: Select all

CP -VN A:OLDFILE.COM A:OLDFILE.BAK
johnhalk
Site Admin
Posts: 67
Joined: Thu Jan 18, 2024 1:28 pm
Location: Melbourne Australia

Re: Dreamdisk lives!

Post by johnhalk »

Hi Jltursan,

When you load the existing Dreamdisk disk image into MAME it’s write protected / read only.

Please try converting the existing Dreamdisk image to .HFE format using the hxc windows disk utility tool and load the HFE image into your gotek usb stick.

https://hxc2001.com/download/floppy_dri ... al_ENG.pdf

I use PIP CP/M utility to copy files.

PIP A:STAT.BAK=A:STAT.COM
Copy the file "STAT.COM" on the disk device "A" to a new file called "STAT.BAK" on the disk device "A".

https://www.shaels.net/index.php/cpm80- ... ip-utility


Regards,
John
jltursan wrote: Mon Mar 17, 2025 8:39 pm I've just tested the "no jumper" scenario in my Dreamdisk; but sadly, without BUSDIR jumper, the drive seems to be not recognized by the Sorcerer or at least, it doesn't boots.

So, as I have installed a switch to easily change the jumper, in the old position the drive boots and reads as usual; but writing is indeed not allowed, it fails.

Just to be sure...is this the right command to duplicate a file changing its name?:

Code: Select all

CP -VN A:OLDFILE.COM A:OLDFILE.BAK
:D
User avatar
jltursan
Posts: 28
Joined: Tue Feb 06, 2024 5:43 pm

Re: Dreamdisk lives!

Post by jltursan »

Mmmm, I see...thanks John.

I'm using the dreamdisk_masterdisk that loads something that's not really CP/M. If I try to use PIP an error appears telling me that "PIP" is not available; so after checking Dreamdisk ROM manual, I found the command "CP" that seems close enough to the PIP command. That's what I'm using now to check the writing capabilities.

I'll try again with the CP/M image and will double-check the HFE conversion...
exidyboy
Posts: 13
Joined: Thu Feb 29, 2024 11:39 am

Re: Dreamdisk lives!

Post by exidyboy »

I have images of about 5 different Dreamdisk floppies obtained from the owner of the only known remaining Sorcerer/Dreamdisk setup.
These were made with a device called a FloppyIO created by Microbee Software Preservation Project as .DSK files in CPCEMU flavour. Because most of the images contain personal files there is only one, the "master", currently in circulation.

This is where I have got to with about a week or investigating why the recreated board isn't writing to disks, or at least to Goteks.

1. On one (only) of the images I got a BDOS error "disk is read only error" or similar. I looked this up and found that the STAT command can tell you if a disk is RO. None of the Dreamdisk floppies have STAT but I have it only some images for a Sorcerer with a Digitrio controller. According to STAT the disk is mounted? R/W.

2. Does CP/M think the disk is write protected? A: I don't see the Write Protect signal from the drive going active low. It stays pulled high by the resistor array (which is not on the schematic of the original board BTW but shouldn't matter).

3. I thought perhaps there is a difference between the original board and the recreation that was blocking writing. With an MSO connected to some of the more interesting lines on the buffers between the Dreamdisk and the Gotek I can see that the board is in fact trying to write data to the Gotek. The Write Gate goes low and you can see data flicker on the Write Data line if you do something like:

Code: Select all

SAVE 4 MIKE
(write 4 blocks of data to the disk with the filename MIKE).

The signal on write does look a little different to read so I thought perhaps some schematic or layout issue is causing data to be read at 5.25 inch data rate but written at 8 inch rate. However looking at the various lines which control the write bitrate I can't see anything changing between read and write. From what I understand of how the WD2793 works the variable capacitor and the trimpots do not affect the writing of data they only control the PLL used in read. So it shouldn't matter what position these are in. It is my understanding that Write Precompensation wouldn't be getting used on 5.25 inch floppies.

4. It does seem that the Drive Select lines are not changing when you use SETDISK to configure multiple drives. The Drive Select lines A, B, C, D all stay low. So if you have two Goteks they both try and put data on the Read Data line. I may not be fully understanding how SETDISK works but I would have thought that if I told CP/M that Drive A is the first unit and B the second and then I do a DIR: that the drive select lines should change. Even so I can't see why, if this is actually inappropriate behaviour, the it could affect writing to disk when you only have one Gotek on the 34 way ribbon cable. The SIDE line does toggle a bit as the different areas of the disk are read so this contradicts the idea that these signals on Port48 aren't being correctly decoded. This observation is however what led me to dig into the 5/8 select logic.

5. When testing with the SAVE command it never completes - the Sorcerer freezes. If I RESET the machine I can no longer boot off that .HFE image and I need to select a different one off the stick. Trying to write to any of the disk images results in that image becoming unbootable and you get a BDOS error. You need to copy fresh files over before you can boot again and continue testing. I don't know if this is what jl was seeing?

Tonight I had a brainwave and decided to inspect the .HFE files that no longer boot in the HxC floppy emulator software. I expected to see them messed up. I was surprised to see no evidence of corruption in the form of CRC errors. If I am using the software correctly there are no bad blocks being shown on any of the images but the images are being changed in a way that prevents booting. (I should try using SETDISK to overlay a B: drive on the first Gotek and by swapping sticks see if I can still get a directory on the these altered HFE files).

Conclusion

So apart from the drive select symptom which could simply be misdiagnosis on my part (I have not yet tried to directly write to the latch using monitor or BASIC commands) I can't see evidence of anything at the electronic level causing a problem. This makes me suspect the disk images themselves. Do they have some pathology that when CP/M tries to find empty space to write a sector it writes in the wrong place (on the system or directory track?) and this clobbers the disk. Or when updating the directory after writing the sector(s) it messes it up.

As mentioned the images were created with the Floppyio and the disk definition arrived at by trial and error. Success being defined as it works in MAME and you can extract sane directory listing via cpmtools and extract large text files (.MAC .PRN) etc that appear intact. It is possible that there is some subtle issue in the disk definition that only shows up when trying to write to these .DSK files. jl and CM have both been successful in writing to the disk images using cpmtools to put new files on them which suggests they are fine but is it possible that the .DSK files and slightly funky and the cpmtools definition is undoing that funkiness leading to clean directory listings and text files.

Some next steps:
1. Image the physical media again, this time using a Kryoflux, as this is the reference standard. Create new HFEs and see what happens.
2. Convert .DSK to .MFI and trying writing to these disk images in MAME.
3. Try connecting a real floppy drive. Unfortunately I don't have any backup copies of Dreamdisk disks on physical media and I don't want to risk those originals that have not been returned to their owner.

P.S. if you try and SAVE only 1 or 2 blocks you don't get a BDOS error but neither do you get your file on disk. Perhaps CP/M only verifies larger transfers.
exidyboy
Posts: 13
Joined: Thu Feb 29, 2024 11:39 am

Re: Dreamdisk lives!

Post by exidyboy »

Further testing tonight.
I tried using a Gotek with FlashFloppy firmware and .HFE images and the same thing happens. The image can no longer be used to boot the machine.

FlashFloppy provides a track display and after boot and reading from tracks 0, 1 and 2 to load CP/M the "head" sits at track 3. When I do a SAVE as discussed above the head doesn't seem to seek in towards the centre of the (virtual) disk a higher track to write the data. The head just stays on these low tracks and data is written.
I assume the sequence would be that CP/M would interrogate the directory track for the next empty sector, seek in to it, write the data then seek back out to the catalogue track to update the directory entry.

I still need to do the testing steps in my earlier post. Perhaps I will find time over the Easter break.
User avatar
RedskullDC
Posts: 7
Joined: Tue Jan 23, 2024 7:07 am
Location: Dorrigo, NSW, Australia

Re: Dreamdisk lives!

Post by RedskullDC »

Hi Exidyboy,
exidyboy wrote: Tue Apr 15, 2025 11:12 am .....
4. It does seem that the Drive Select lines are not changing when you use SETDISK to configure multiple drives. The Drive Select lines A, B, C, D all stay low. So if you have two Goteks they both try and put data on the Read Data line. I may not be fully understanding how SETDISK works but I would have thought that if I told CP/M that Drive A is the first unit and B the second and then I do a DIR: that the drive select lines should change. Even so I can't see why, if this is actually inappropriate behaviour, the it could affect writing to disk when you only have one Gotek on the 34 way ribbon cable. The SIDE line does toggle a bit as the different areas of the disk are read so this contradicts the idea that these signals on Port48 aren't being correctly decoded. This observation is however what led me to dig into the 5/8 select logic.
That suggests that maybe the 74LS06 which drives most of the outputs is bad?

74LS06 is an odd choice for an output buffer, IMHO. It can't source or sink too many TTL loads.

Better off with a 7406 or 7416 Open Collector buffer, just need to ensure the last drive on the cable has a terminator pack installed.

Regards,
Leslie
exidyboy
Posts: 13
Joined: Thu Feb 29, 2024 11:39 am

Re: Dreamdisk lives!

Post by exidyboy »

Thanks Leslie,

The 74LS06 that provides output for driving step, direction, write data and write gate tests OK using the chip test function in an XGecu Pro T48 Programmer.

Functionally step and direction (at least) seem to work fine to read data off the two built instances of the recreated board running against Goteks.

The 74LS07 that John has installed to drive the drive select and side select lines also tests OK according to the T48 for what is worth.
As noted above the side select does seem to work however although there is not much swapping between sides 0 and 1 as the Dreamdisk format writes side 0 first so I assume that only on disks that are more than half full would there be a lot of activity on the side select line. ChickenMan and I exchanged a lot of emails back in 2018 as we tried to work out the "sidedness" of the Dreamdisk format. It is possible that there is still something subtle lurking in all the parameters within the floppyio /cpmtools definitions ... and yet they seem OK in MAME's emulation of the Dreamdisk.

It is worth noting I think that the Dreamdisk schematic for the original version and the parts list for the second version (that has provision for hard disk support) explicitly call for a 7406 or 7416 at IC14 and call for a 7407 or 7417 at IC15 rather than the LS series parts installed by John on the board I am testing. All other logic ICs are explicitly specified as LS (or occasionally F) series to the original designers presumably saw this distinction as important.

As a note to myself as much as anything else, I should trace through the schematic of the recreated board just to make sure that any of the functions have been accidently swapped between gates in the packages.

Cheers,
Michael
johnhalk
Site Admin
Posts: 67
Joined: Thu Jan 18, 2024 1:28 pm
Location: Melbourne Australia

Re: Dreamdisk lives!

Post by johnhalk »

Hi Michael,

Great work - i am hopeful the R/W to the Dreamdisk images will be sorted.

After that we can explore hard disk support for Dreamdisk. Since we have the bios source for Dreamdisk sorcerer CP/M - maybe an option is to write bios drivers for the Z80 Uide ?

https://www.cpcwiki.eu/index.php/UIDE_U ... _computers

Regards,
John
:D
exidyboy
Posts: 13
Joined: Thu Feb 29, 2024 11:39 am

Re: Dreamdisk lives!

Post by exidyboy »

I have installed 7406 and 7407 parts in place of those from the LS family and saw activity on drive select.
However I realise that since the drive select lines (in fact all outputs) are open collector and so you need them pulled high by a drive jumpered at that "address" in order to see the lines toggle. As a Gotek can only be jumpered as A or B you can't test Drive Select C or D.
Armed with this better understanding I put the 74LS07 back in and could still see Drive B being pulled low after using SETDISK to assign B to Drive 1 AS LONG AS you also have the Gotek jumpered to be Drive 1. So I don't think there is anything wrong with Drive Select and even if there was I can't see how it would be significant in terms of the writing issue.

Going back to my original test plan I have re-imaged all the Dreamdisk floppies that I still have access to. These were imaged as Kryoflux preservation streams using the latest version of the Kryoflux client on Windows. Then I converted them to CPCEMU .DSK format using the latest version of the HxC Tools. This is to eliminate any possible funkiness with the original .DSK images created in 2018 that might only be emerging now that people are trying to write to these images.

I put those on a Gotek running the latest version of the FlashFloppy firmware with an FF.CFG file set to indexed mode as none of my Gotek's have OLED displays etc just the original 7 segment.

Of those images that boot I again tried to write by going SAVE 10 MIKE

I observed that the write appears to work ie no errors.

However when you to a DIR: you still don't see your file listed in the directory.
However if you try and save it again you get a BDOS error on A:
If you try and save a different filename ie SAVE 10 JOHN then that again appears to succeed but again no file appears in the directory.
If you try and save another file called JOHN with SAVE 10 JOHN then again you get a BDOS error presumably because CP/M at some level believes that this file already exists on the media.

I also note that if you use the L.COM program which shows empty space each time you save a file the amount of free space goes down.

Eventually you get to a point where you get a BDOS error on A: even with a novel filename as the disk is full.

If you look at the .DSK in a text editor you cannot find MIKE or JOHN written to disk.

So somehow even though Write Gate is going low and data is being output from the Write Data line it is never hitting the USB Stick. The LEDs on the Gotek that show which side is selected and that writing is happening all do what you would expect, but nothing actually changes.

If you try and format the .DSK image using FMT.COM with verify it will appear to succeed and yet you can warm boot and all your data is still there. This is very mysterious.

I then tried with a 5.25 inch floppy drive. I jumpered the drive as Drive 1 and booted off a Gotek with FlashFloppy firmware jumpered as Drive 0.
I tried to format a floppy using FMT.COM with verify. The formatter writes a track to the drive, then keeps attempting to verifying 10 times then moves to the next track. Afterwards it reports that all tracks failed to verify.

Capturing the signal on the Write Data output pin of U14 with an MSO it has a duration of about 210nS which is just within the 200nS to 300nS spec for the Write Pulse from WD2793 from the datasheet.

I find the datasheet a bit confusing as to whether there is indeed any user control over the width of this pulse. It would be good to adjust it to 250nS if this is indeed possible.
exidyboy
Posts: 13
Joined: Thu Feb 29, 2024 11:39 am

Re: Dreamdisk lives!

Post by exidyboy »

I have connected up an original DreamDisk and "Gender Bender" board that was given to me by Altomare in Paris last year.
I can read and write to a Gotek and successfully format a physical floppy with no errors. Pretty impressive considering no adjustments were made to any variable caps or pots.

The write pulses output by the original look really fat. I haven't captured one yet but a glimpse of the trace suggests they could be 400nS which is actually wider than the maximum spec for MFM format.

There are also some very tidy wire mods on the underside of the board which I will document.
Post Reply