Inspired to extract my old code from a floppy.

Anything QL Software or Programming Related.
stephen_usher
ROM Dongle
Posts: 29
Joined: Tue Mar 11, 2014 8:00 pm

Inspired to extract my old code from a floppy.

Postby stephen_usher » Fri May 11, 2018 9:17 pm

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


User avatar
NormanDunbar
Gold Card
Posts: 482
Joined: Tue Dec 14, 2010 9:04 am
Location: Leeds, West Yorkshire, UK
Contact:

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

Postby NormanDunbar » Fri May 11, 2018 10:34 pm

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.


Why do they put lightning conductors on churches?
How come Tarzan never grew a beard?
If at first you don't succeed, don't take up skydiving!
stephen_usher
ROM Dongle
Posts: 29
Joined: Tue Mar 11, 2014 8:00 pm

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

Postby stephen_usher » Fri May 11, 2018 11:00 pm

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.


User avatar
NormanDunbar
Gold Card
Posts: 482
Joined: Tue Dec 14, 2010 9:04 am
Location: Leeds, West Yorkshire, UK
Contact:

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

Postby NormanDunbar » Fri May 11, 2018 11:40 pm

Hmm, interesting solution. Sadly, no, I never did try that method, it might have worked.

Next time, perhaps!
Thanks.

Cheers,
Norm.


Why do they put lightning conductors on churches?
How come Tarzan never grew a beard?
If at first you don't succeed, don't take up skydiving!
Martin_Head
Gold Card
Posts: 318
Joined: Tue Dec 17, 2013 1:17 pm

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

Postby Martin_Head » Sat May 12, 2018 10:26 am

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.


User avatar
tofro
QL Wafer Drive
Posts: 1390
Joined: Sun Feb 13, 2011 10:53 pm
Location: SW Germany

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

Postby tofro » Sat May 12, 2018 10:30 am

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



Return to “Software & Programming”

Who is online

Users browsing this forum: No registered users and 3 guests