Inspired to extract my old code from a floppy.

Anything QL Software or Programming Related.
Post Reply
stephen_usher
Gold Card
Posts: 429
Joined: Tue Mar 11, 2014 8:00 pm
Location: Oxford, UK.
Contact:

Inspired to extract my old code from a floppy.

Post 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


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

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

Post 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.


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.
stephen_usher
Gold Card
Posts: 429
Joined: Tue Mar 11, 2014 8:00 pm
Location: Oxford, UK.
Contact:

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

Post 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.


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

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

Post by NormanDunbar »

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?
Author of Arduino Software Internals
Author of Arduino Interrupts

No longer on Twitter, find me on https://mastodon.scot/@NormanDunbar.
Martin_Head
Aurora
Posts: 847
Joined: Tue Dec 17, 2013 1:17 pm

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

Post 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.


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

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

Post 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


ʎɐqǝ ɯoɹɟ ǝq oʇ ƃuᴉoƃ ʇou sᴉ pɹɐoqʎǝʞ ʇxǝu ʎɯ 'ɹɐǝp ɥO
Post Reply