Writing Gotek QL Image Disks

Anything QL Software or Programming Related.
spkr
Bent Pin Expansion Port
Posts: 98
Joined: Tue May 04, 2021 6:52 pm

Writing Gotek QL Image Disks

Post by spkr »

Hi there guys,

With some great help with people from the forum, I was able to get a gotek hooped up with the tetroid disk interface and load a disk image on the QL! So awesome, yet I was so busy that I have not been able yet to explore the programs library for the QL.

Instead I have the following question regarding making disk images; and Im thinking aloud here...

I am looking to be able to generate a .img file directly from my build script. So when I assemble my source, it creates a binary and I would like to wrap that binary inside a .img file; such that I could put that directly to the USB and use it with the gotek.

Considering Im a novice here, I was wondering if anyone has an idea how to approach this. So far I have found https://soulsphere.org/hacks/ql/fs.html and I suppose I need to figure out how the .img format is for the flash floppy software. Considering the size of the disk images, which is close (or equal?) to the DD-disk-size, I assume that its the binary data with some possible headers...

Anyone that looked into this, or got some ideas?

Kind regards,
Wietze


Derek_Stewart
Font of All Knowledge
Posts: 3953
Joined: Mon Dec 20, 2010 11:40 am
Location: Sunny Runcorn, Cheshire, UK

Re: Writing Gotek QL Image Disks

Post by Derek_Stewart »

Hi,

I tend to use a QL emulator QPC2 or SMSQmulator and use FDI for floppy disk images and MDI for MIcrodrive images, by Martin Head.

The FDI floppy disk images are fairly standard and be used all on QL emulators, or other QL hardware with FDI installed.

The scripting part of the Floppy DIsk images with FDIis used in S*Basic, so that's easy as we can all programme in basic...

I have been put down here are suggesting that the a QL solution to generate a Floppy Disk image using QPC2 DOS device, SMSQmulator FLP device or QEMulator FLP device. But I do not seem the point is struggling to write something new when it already exists in many different solutions.


Regards,

Derek
spkr
Bent Pin Expansion Port
Posts: 98
Joined: Tue May 04, 2021 6:52 pm

Re: Writing Gotek QL Image Disks

Post by spkr »

Hi there and thanks for your reply!

I guess your approach makes a good alternative to the direct approach. I will learn some basic so I can automate some of the tasks inside emulation, I have never coded basic before, but it should be basic, right :D . I found myself lacking even the basic knowledge to copy stuff from a to b in a script.

However, I'm still interested in the used .img image format data structure. Assembling code and directly writing an image file to USB in one go will still be the minimal amount of waste when doing testing cycles.

If anyone has experience/knowledge about this, please let me know.

Kind regards
Wietze


spkr
Bent Pin Expansion Port
Posts: 98
Joined: Tue May 04, 2021 6:52 pm

Re: Writing Gotek QL Image Disks

Post by spkr »

Out of curiosity, has anyone tried qltools? I'll have a look into it.
https://github.com/NormanDunbar/qltools


User avatar
tofro
Font of All Knowledge
Posts: 2699
Joined: Sun Feb 13, 2011 10:53 pm
Location: SW Germany

Re: Writing Gotek QL Image Disks

Post by tofro »

Qltools is probably your best bid to get files to and fro an existing disk image. With a few minor modifications, it seems to work nicely on my Mac.


ʎɐqǝ ɯoɹɟ ǝq oʇ ƃuᴉoƃ ʇou sᴉ pɹɐoqʎǝʞ ʇxǝu ʎɯ 'ɹɐǝp ɥO
spkr
Bent Pin Expansion Port
Posts: 98
Joined: Tue May 04, 2021 6:52 pm

Re: Writing Gotek QL Image Disks

Post by spkr »

tofro wrote:Qltools is probably your best bid to get files to and fro an existing disk image. With a few minor modifications, it seems to work nicely on my Mac.
Hola. I tried the qltools on linux, and they work splendidly. Then I found that the Unix build target doesnt work, without additional effort.

To make it work I had to add an -arch flag to the Makefile, and I commented out some confirmation when overwriting files. Did you manage to implement/rework the getch() without altering behaviour?

It seems qltools suits my need perfectly to generate a floppy image file straight from assembling code; for use in gotek!


User avatar
tofro
Font of All Knowledge
Posts: 2699
Joined: Sun Feb 13, 2011 10:53 pm
Location: SW Germany

Re: Writing Gotek QL Image Disks

Post by tofro »

spkr wrote: Did you manage to implement/rework the getch() without altering behaviour?
Simply replaced the whole getch() thing with getchar(). I think modern Lunuxes could do the same.


ʎɐqǝ ɯoɹɟ ǝq oʇ ƃuᴉoƃ ʇou sᴉ pɹɐoqʎǝʞ ʇxǝu ʎɯ 'ɹɐǝp ɥO
Derek_Stewart
Font of All Knowledge
Posts: 3953
Joined: Mon Dec 20, 2010 11:40 am
Location: Sunny Runcorn, Cheshire, UK

Re: Writing Gotek QL Image Disks

Post by Derek_Stewart »

Hi,

I must admit to not keeping up with the qltools develpment. Which looks really good solution.


Regards,

Derek
User avatar
NormanDunbar
Forum Moderator
Posts: 2271
Joined: Tue Dec 14, 2010 9:04 am
Location: Leeds, West Yorkshire, UK
Contact:

Re: Writing Gotek QL Image Disks

Post by NormanDunbar »

spkr wrote:Then I found that the Unix build target doesnt work, without additional effort.
Which source did you use? I did a lot of work on qltools some time back, all on Linux.

Cheers,
Norm.


Why do they put lightning conductors on churches?
Author of Arduino Software Internals
Author of Arduino Interrupts

No longer on Twitter, find me on https://mastodon.scot/@NormanDunbar.
spkr
Bent Pin Expansion Port
Posts: 98
Joined: Tue May 04, 2021 6:52 pm

Re: Writing Gotek QL Image Disks

Post by spkr »

NormanDunbar wrote:
spkr wrote:Then I found that the Unix build target doesnt work, without additional effort.
Which source did you use? I did a lot of work on qltools some time back, all on Linux.

Cheers,
Norm.
Ah, I may not have been specitic. I downloaded the latest, and was compiling for osx. I think I mailed you about it.


Post Reply