My project for 2015

A place to discuss general QL issues.
Post Reply
User avatar
lostcarpark
ROM Dongle
Posts: 25
Joined: Thu Feb 19, 2015 6:08 pm
Contact:

My project for 2015

Post by lostcarpark »

Hi,

I'm new to the forum, so hope I'm posting in the right place.

I've had a QL since about 1985, and used it a lot back in the '80s and '90s, adding memory, disk drives, and expansions, and doing a fair bit of programming in various languages. However, it's probably been sitting in a box in my attic for over twenty years.

I have played with various emulators over the years, and have always had a great fondness for the QL, which is still one of the most beautiful computers ever build, in my opinion.

I've had an idea in the back of my head for a while now, of giving the QL a new lease of life, and I hope to make that happen this year, by putting a modern computer in the QL case. The Raspberry Pi seems the obvious choice, especially now that the Pi2 has been released.

I couldn't bring myself to destroy a working QL to achieve this, so last year I picked up a QL case on eBay (a £7 investment). It seems to be in good nick, and even the keyboard membrane looks okay.

Now the project would be pretty pointless if the QL keyboard can't be made work, so that's the first phase of the project. I've been looking at various options for doing this, and came up with a shortlist:
  1. Connect the keyboard connections to the IO ports on the Pi. This would be fairly easy to do, but the software on the Pi to interpret it and make it operate the computer would be tricky, and would require custom drivers, and would need me to use an external keyboard to develop and load the drivers in question.
  2. Use the controller board from a USB keyboard and connect the QL keyboard. I've seen this done on Spectrum and other retro keyboards, and it works well, but does require mappings to convert the keymap of the original keyboard to the target. Again an external keyboard would be needed to set this up. This approach seem preferable to 1, but still not ideal.
  3. Use a microcontroller development board to connect the QL keyboard connectors and remap the keystrokes into something the computer understands, preferably looking like a regular USB keyboard. This seemed like a pipe dream until I acme across the Teensy board. This is a USB connected board with a bunch of IO pins and a programmable microcontroller. Most importantly, there are toolkit libraries for many common functions, including emulating a USB keyboard. So it should be a relatively simple matter to make the QL keyboard behave as if it were an actual USB keyboard. And it should even be fairly easy to add functionality to interpret QL keystrokes such as CTRL+Left arrow and map them to the PC's backspace key. The Teensy 3.1 has an ARM chip, more than enough IO ports, and at under $20 is a very cost effective solution.
You can probably guess I'm going with option 3.

Once I have that working I'll look at adding the Pi. I want to map the Pi ports to equivalent ports, so the CTL and SER ports will become USB ports, the RGB port will be the HDMI, and one of the NET ports will have an RJ45 socket. The microdrive slots will, of course, house SD card readers.

Of course, once I have it working, I'm hoping I can get a QL emulator working on the Pi.

I'll post photos and report my progress here, and if any one is interested, I'll be happy to share my Teensy board code.

I'd love to hear comments or suggestions.

James


User avatar
XorA
Site Admin
Posts: 1359
Joined: Thu Jun 02, 2011 11:31 am
Location: Shotts, North Lanarkshire, Scotland, UK

Re: My project for 2015

Post by XorA »

lostcarpark wrote:
  1. Connect the keyboard connections to the IO ports on the Pi. This would be fairly easy to do, but the software on the Pi to interpret it and make it operate the computer would be tricky, and would require custom drivers, and would need me to use an external keyboard to develop and load the drivers in question.
This is not complex at all, the driver already exists for GPIO keyboards, it just needs to be taught the key matrix (quite possible thats in DT these days so not even coding). Development would be done over serial console/network in a sensible setup!


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

Re: My project for 2015

Post by tofro »

The most central thing would be to get the emulator working, but I happen to know someone whou got this working already for you :) . Look for uqlx for the RPi on Dilwyn's site - It still has a number of quirks, but runs reasonably well.

Tobias


ʎɐqǝ ɯoɹɟ ǝq oʇ ƃuᴉoƃ ʇou sᴉ pɹɐoqʎǝʞ ʇxǝu ʎɯ 'ɹɐǝp ɥO
User avatar
vanpeebles
Commissario Pebbli
Posts: 2816
Joined: Sat Nov 20, 2010 7:13 pm
Location: North East UK

Re: My project for 2015

Post by vanpeebles »

Welcome to the forum! :) Sounds like a good project. I always thought the pi could be made into some kind of companion server to the QL providing storage etc.


User avatar
Mr_Navigator
QL Fanatic
Posts: 782
Joined: Mon Dec 13, 2010 11:17 pm
Location: UK, Essex
Contact:

Re: My project for 2015

Post by Mr_Navigator »

Hi LostCarPark, you might find this useful as I have been tinkering with this same idea for awhile now.





http://www.deblauweschicht.nl/tinkering/qlkeys1.html

This is not me btw. :)


-----------------------------------------------------------------------------------
QLick here for the Back 2 the QL Blog http://backtotheql.blogspot.co.uk/
User avatar
lostcarpark
ROM Dongle
Posts: 25
Joined: Thu Feb 19, 2015 6:08 pm
Contact:

Re: My project for 2015

Post by lostcarpark »

Thanks for the comments.

XorA, that's useful to know, but I still think it's cleaner to have the QL keyboard wrapped up as a self contained device, and be able to use it to control anything if I want.

Yes, Tobias, I'm looking at uQLx as an emulator option. It only provides a base QL, doesn't it? It would be nice to have one that also includes higher video modes.

Mr Navigator, that looks similar to what I'm trying to do, and seems to take a similar approach, though I think the Teensy makes it a little easier than the Arduino.

James


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

Re: My project for 2015

Post by tofro »

lostcarpark wrote: Yes, Tobias, I'm looking at uQLx as an emulator option. It only provides a base QL, doesn't it? It would be nice to have one that also includes higher video modes.
James,
uqlx is actually able to emulate a kindof "super QL" - with the following extended features:
  • Up to 16MB of accessible emulated memory (will only work with Minerva ROM)
  • Ridiculously large screen resolutions possible (up to 8192 by like 6000 should be possible, in case you manage to find a screen that size ;) - So, full HDMI resolution is supported. Downside is - The image is not scalable, so 1 QL pixel is always 1 X pixel and on full HDMI resolution characters look ridiculously small. You should be scaling up the X Window display on the Linux side (I have mine typically set to 800 x something or 1024 x something, which is very usable). Will only work with Minerva ROMs as well. More than the original 4 or 8 colors are not supported, however.
  • The RPi mouse emulates a Quimi mouse, so QRAM or QPTR work fine.
  • Full access to the Linux filesystem. Offers the possibility of multi-megabyte micro drives ;) (That works with a JS or JM ROM as well). Also partial support for longer filenames is in there, which I don't normally use because I exchange a lot of files back and forth between uqlx, QPC and the real thing.
  • Partial support for QXL-WIn image drives (some stuff not currently implemented, like RENAME of files and MAKE_DIR to create directories. Apart from that, full directory support on such file systems.
  • Limited TCP/IP support through a tcp_ and udp_ device driver (compatible with QPC2)
Most of that "extended" stuff is, as said above, only supported when running on Minerva - As uqlx is limited to use stock QL ROMs it is limited to what those ROMs support. Minerva really is a much more modern OS in that respect as original QDOS. It has a lot of support implemented for hardware features you didn't even think of when it was developed.

Tobias


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