Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ZX Spectrum Opus Discovery disk config #330

Open
gnulnulf opened this issue Jun 24, 2023 · 22 comments
Open

Add ZX Spectrum Opus Discovery disk config #330

gnulnulf opened this issue Jun 24, 2023 · 22 comments

Comments

@gnulnulf
Copy link

gnulnulf commented Jun 24, 2023

The img file is normally called "OPD".
The single sided drive: 40T/18S(0-17)/256ss -> 180k
The double sided drive: 80T/18S(0-17)/256ss -> 720k
I'm not sure if I got the gaps right.

Main difference from other formats is the usage of sector 0.
My addition to the diskdefs.cfg config is:

disk zx.opus.ss
    cyls = 40
    heads = 1
    tracks * ibm.mfm 
	    rate = 250
        secs = 18
        bps = 256
        id = 0
        gap2 = 22
        gap3 = 24
        gap4a = 32
        interleave = 7
        iam = no
    end
end

disk zx.opus.dd
    cyls = 80
    heads = 2
    tracks * ibm.mfm 
	    rate = 250
        secs = 18
        bps = 256
        id = 0
        gap2 = 22
        gap3 = 24
        gap4a = 32
        interleave = 7
        iam = no
    end
end
@keirf
Copy link
Owner

keirf commented Aug 17, 2023

Names maybe would be better as zx.opus.sd and zx.opus.dd? Or do you really need opus1 rather than opus?

@gnulnulf
Copy link
Author

I know there is Opus1 and Opus2 hardware, we can expect it to work alike. zx.opus.sd and zx.opus.dd sound great.

@mitchelln
Copy link

Hi. Does this work yet please, or does it need code changes to be implemented? Thanks.

@gnulnulf
Copy link
Author

gnulnulf commented Feb 1, 2024

You only need the profile in your diskdefs.cfg

@mitchelln
Copy link

Thanks. That's sorted it. I tried to add an opd.py file as well, but it didn't pick that up.

@gnulnulf
Copy link
Author

gnulnulf commented Feb 2, 2024

@mitchelln , it now works for you? I think the diskdefs on linux is src/greaseweazle/data/diskdefs.cfg

I editted the initial comment to be more readable.

@Michielhimself
Copy link

Michielhimself commented May 13, 2024

How do I use this without an opd.py file? gw.exe complains that it doesn't recognise the OPD input file I am trying to write to a physical disk. I added the config entries to diskdefs.cfg and the -h option reports zx.opus.ss and zx.opus.dd among the supported formats now.

@keirf
Copy link
Owner

keirf commented May 13, 2024

Rename *.opd file to *.img and try again.

@Michielhimself
Copy link

Michielhimself commented May 13, 2024

That worked and using the single sided format, delivers something on to disk that gives a readable directory entry on Opus but it doesn't lead to a loadable program (Wrong File Type error). Are the gaps certain to be correct for a stock Opus with a single-sided single density drive? When I copy the OPD file content from my GoTek secondary drive to my stock primary drive to the same physical disk in Opus itself, it does work.

@keirf
Copy link
Owner

keirf commented May 13, 2024

Gaps don't really need to be specified. Try removing them all from your diskdefs.

@keirf
Copy link
Owner

keirf commented May 13, 2024

Also interleave should be 13 and cskew should be 13 also. So be sure to fix interleave and specify cskew. And then see how you get on.

@keirf
Copy link
Owner

keirf commented May 13, 2024

If that doesn't work, only then additionally try gap3=12

@Michielhimself
Copy link

If that doesn't work, only then additionally try gap3=12

still no, including with interleave = 13 and cskew =13. The Disk index "CAT 1's" on Opus / ZX Spectrum, but no files load. "m Wrong file type, 0:1"

@Michielhimself
Copy link

I know there is Opus1 and Opus2 hardware, we can expect it to work alike. zx.opus.sd and zx.opus.dd sound great.

Opus 2 is simply an Opus Discovery 1 with the 2nd drive slot populated.
The drives are sometimes identical, sometimes a stock sssd (180k) drive in slot 1 and sssd (180k) or dsdd (720k) in slot 2 (requires different ROM to support), or other permutations (GoTek in slot 1 or 2) depending on modder preference.

@keirf
Copy link
Owner

keirf commented May 13, 2024

I don't know then I'm afraid. I assume the OPD is known good? It sounds more like a filesystem error than a sector/track level issue.

@Michielhimself
Copy link

Michielhimself commented May 13, 2024

Yeah, all the OPD I'm using are the original 180K format and mount + load fine in an actual Opus via the GoTek, including copying them to physical disk (in the ZX Spectrum / Opus) and then running from the physical disk. Only factor I haven't been able to exclude yet is the floppy drive I'm using for the Greaseweazle based imaging. It runs pretty much error-free on the greaseweazle but that's still a drive verifying it's own sectors - if it's out of whack a bit it's not going to produce something the Opus can read.
I have another way of writing OPD to physical media, using a Spectrum HW accurate emulator on older PC hardware, but really wanted to have the Greaseweazle option working to not have to rely on older hardware anymore, so I'll look around for another 3.5" drive to use here in my cave-o-parts and see if that changes things.

Many thanks for the help with the attempts so far!

@gnulnulf
Copy link
Author

The reason I played with the gaps was to keep it within the maximum tracksize.
full track = 6250
index ->gap4->trackheader-> gap1 -> ( sectorheader -> gap2 -> sector data -> gap3 ) * 18 ->gap4b

Are you using a 40 track drive or a 80 track with double steps? You can try to create a scp and look at it with hxc-> track analyzer.

I used this to write:
gw.exe write --drive=1 --tracks=step=1:c=0-39:h=0 "D:\zxspectrum\d6.img" --format=opus1.ss --diskdefs=diskdefs.cfg

If you like I can try to reproduce it on my side.

@keirf
Copy link
Owner

keirf commented May 13, 2024

Greaseweazle will automatically mess with all gaps (except gap2) to fit sectors in. Of course if you do know the correct gap values from a real disk, that is best of all.

@Michielhimself
Copy link

Trying to use an 80-track drive.
Should I use step = 1? I guess that's not handled automagically.
The 40-track I have has been modded (I keep as a spare for when the one in Opus dies) so doesn't take signal or voltage using standard cabling from the Greaseweazle.

@Michielhimself
Copy link

Michielhimself commented May 14, 2024

Success!!
Using --tracks=step=2 (using an 80-track HD drive) and Keirf's suggested settings in diskdefs.cfg has delivered me a disk that loads in Opus Discovery 1 physical hardware and a Toastrack 128K ZX Spectrum+ !!
(With some retries on track 29, my DSDD disks are OLD :-) )
I'll now give a try removing the gap3=12 from the config.

Command: .\gw.exe write --tracks=step=2:c=0-39:h=0 .\GreatEscape.IMG --format=zx.opus.ss

Config file in use (relevant section):
`disk zx.opus.ss
cyls = 40
heads = 1
tracks * ibm.mfm
rate = 250
secs = 18
bps = 256
gap3 = 12
id = 0
cskew = 13
interleave = 13
iam = no
end
end

disk zx.opus.dd
cyls = 80
heads = 2
tracks * ibm.mfm
rate = 250
secs = 18
bps = 256
gap3 = 12
id = 0
cskew = 13
interleave = 13
iam = no
end
end`

@Michielhimself
Copy link

Using same command options and the settings from gnulnulf's original post at the top of this thread in diskdefs.cfg, and using a different OPD image, I made another succesfully readable opus phsyical disk (used blank media to start, so not an accidental residue from an earlier attempt).

@Michielhimself
Copy link

Update: one one of the disks I imaged with gnulnulf's settngs, some games loaded and others (higher numbered tracks) did not. I now imaged it again using the settings recommended by Keirf without the gap3=12 and that rewritten disk (from same image) now works fine for all programs on the image.

`disk zx.opus.ss
cyls = 40
heads = 1
tracks * ibm.mfm
rate = 250
secs = 18
bps = 256
id = 0
cskew = 13
interleave = 13
iam = no
end
end

disk zx.opus.dd
cyls = 80
heads = 2
tracks * ibm.mfm
rate = 250
secs = 18
bps = 256
id = 0
cskew = 13
interleave = 13
iam = no
end
end
`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants