Page 1 of 1

Inspired to extract my old code from a floppy.

Posted: Fri May 11, 2018 9:17 pm
by stephen_usher
The starting assembly programming thread inspired me last night to try to extract my code for the terminal emulator I wrote in 1988/89 from the development floppy.

First I had to get an image and I managed to do this via macOS using 'dd' in a terminal. That was the easy bit.

Finding a useful emulator which can both access floppy image files and the native operating system without spending lots of money (as this is merely a quick conversion job) was "fun". I tried compiling the latest uQLx using the MacPorts GCC 8 compiler and it barfed on one of the files saying that a union was invalid. I tried Q-Emulator, but this can't access anything unless paid for. In the end I used SMSQmulator, but this meant finding and installing the Java JDK from Oracle.

Anyway, in the end I managed it and today I've set up a web page to display the results: http://www.earth.ox.ac.uk/~steve/software/terminal/

You can download or browse the full source from there, along with the manual. If you want to create an executable you'll need the Computer One assembler suite.

Anyway, here's a screenshot:

Image

Re: Inspired to extract my old code from a floppy.

Posted: Fri May 11, 2018 10:34 pm
by NormanDunbar
Well done. I lost about 300 of my floppies recently. None would spin anymore. Originals and backups, all gone. :(

Have you tried compiling QLTools on your Mac? I use it from time to time occasionally on Linux on images of my 12 remaining floppies. It works on real floppies and dd'd images too. Very useful.

Source code is on github at https://github.com/SinclairQL/qltools and might/should work on your Mac.


Cheers,
Norm.

Re: Inspired to extract my old code from a floppy.

Posted: Fri May 11, 2018 11:00 pm
by stephen_usher
Thanks! I'll look into it.

With regard to your floppies, did you try soaking them in isopropyl alcohol? I've managed to recover quite a few that way. Sometimes the old lubricant just gets too sticky and the platter gets stuck. Sometimes it's the coating itself.

Sometimes I can only read them when the platter is still wet as for some unknown reason the dodgy sectors seem slightly less dodgy then.

I've even recovered floppies which have been attacked by fungus this way by keep running them whilst keeping the platter "damp" with alcohol, which polished off most of the fungus and left a readable sector beneath.

Re: Inspired to extract my old code from a floppy.

Posted: Fri May 11, 2018 11:40 pm
by NormanDunbar
Hmm, interesting solution. Sadly, no, I never did try that method, it might have worked.

Next time, perhaps!
Thanks.

Cheers,
Norm.

Re: Inspired to extract my old code from a floppy.

Posted: Sat May 12, 2018 10:26 am
by Martin_Head
stephen_usher wrote:Finding a useful emulator which can both access floppy image files and the native operating system without spending lots of money (as this is merely a quick conversion job) was "fun". I tried compiling the latest uQLx using the MacPorts GCC 8 compiler and it barfed on one of the files saying that a union was invalid. I tried Q-Emulator, but this can't access anything unless paid for. In the end I used SMSQmulator, but this meant finding and installing the Java JDK from Oracle.
I assume you are not using Windows which you could have used QPC2 for the images.
You can use the FDI Floppy disk image driver http://www.dilwyn.me.uk/utils/index.html in the Shareware Windows version of Qemulator. I don't see why it would not work in the Mac version as well.

Re: Inspired to extract my old code from a floppy.

Posted: Sat May 12, 2018 10:30 am
by tofro
Free QPC2 (which has elaborate support for floppy disk images) works quite well on Mac Parallels (in case you have that).

There is a wineified/macified version of QPC2 done by Peta Jäger (I think it's available from Marcel's site) that should work with non-paralleled Macs.

Tobias