Share your projects


Long story short I found my first computer in my Parent's attic when helping clean a little while ago, or should I say most of it...

It's a Timex Sinclair TS1000 or a ZX81 known everywhere outside North America. I found it in a bunch of parts, sans case and keyboard, wasn't even sure what it was at first until I looked closer. Not sure what happened to the original casing, but all I can say I was a pretty destructive kid, always taking apart everything when I was young. Honestly these computers are so cheap I could get another working one for 24 US dollars off ebay, but I just felt the need to bring the thing back to life, this was literally the computer that sparked my interest in computers and electronics back when I was a young kid, I wasn't old enough to appreciate it fully. This isn't a restoration, but putting it back into a working order and doing some improvements along the way.

I took it home, hitched it up and powered it on and sure enough I could see the BASIC command prompt on the TV. not bad as it likely hasn't been turned on in around 35 years.

Next step was I replaced the inefficient 7805 with a modern switching regulator, this allowed me to shed the huge aluminium heat sink, which will allow the board to fit into a smaller 3D printed casing I'm still working on. I also put some heat sinks on the ULA chip as it gets pretty warm. As the computer only had RF, I found some pre-made solution that allows proper composite output off of some retro computer site I found.

Then there was the issue of the keyboard it was missing all together, finding a replacement is fairly easy, but the ZX81 and the ts1000 keyboards were those horrendous flat membrane keyboard, so I decided to make my own. Using a bit of Openscad and finishing it Tinkercad I was able to design a simple keyboard plate that allowed MX Cherry key switches to be used, which luckily I have a ton laying around thanks to another unfinished project. I replace the keyboard flex ribbon cable sockets on the motherboard with standard .1 pitch headers which was a lot easier to deal with.

I still need to design the rest of the casing, but it's functionally working now. it may end up being a bit thicker than the original system, but it will have a lot better keyboard.


20201109_162951.jpg20201109_163142.jpg20201109_162935.jpg20201109_162939.jpg20201112_183146.jpg20201112_183133.jpg20201113_014934.jpg
 
Last edited:
Nice, you're missing the BASIC keywords on those keycaps those though as well as the block characters. I don't like using these systems for BASIC coding on modern emulators since I can't look at the keyboard and work out what to press to get INPUT or PRINT to appear. Perhaps your muscle memory was better trained back in the day and has persisted better than mine has though.
 
Nice, you're missing the BASIC keywords on those keycaps those though as well as the block characters. I don't like using these systems for BASIC coding on modern emulators since I can't look at the keyboard and work out what to press to get INPUT or PRINT to appear. Perhaps your muscle memory was better trained back in the day and has persisted better than mine has though.
Right now I have a cheat sheet, I plan on trying to get some key cap labels printed out somehow....
 
Some of my sources for the modifications I've done. I'll likely attempt the 16k modification too in the future.

Also found some stickers for the keycaps, the page says Spectrum, but if you look at the actual product it includes keycap stickers for the ZX80,ZX81 and Spectrum.
 
Last edited:
Have completed the 16k memory upgrade, playing a 16k version of 3d Skeleton Maze. Also the keycap stickers came in, a bit more glossy than I'd like, but may be able to do something about that. Going to complete the casing in the next few days and call this project closed.

I'll likely go back and make those patch leads on the SRAM a little more clean, I just wanted to see it work.

20201121_204336.jpg20201121_204345.jpg20201118_181538.jpg
 
Last edited:
Just about finished this, wanted a more elaborate design, but after a bit of frustration just went with a plain box design and will use some rubber feet or 3D printed legs to give it a bit of an angle. I decided not to expose the expansion slot, I have the 16k expansion done on board and won't need an external memory pack. I've added a switch to change the composite output from the normal white with black lettering to inverted black background with white lettering. Only changes I had to make was switch the keyboard .1 pitch headers to right angle ones as the cables sit too high to close the case. To hold the ZX81 board in I used rivnuts, but didn't actually rivet them in the plastic as that would likely break the plastic. I drilled the holes slightly smaller than the rivnut and pushed them through, then applied some glue on both sides to keep it in place.

It's not perfect, but it will do.

20201126_124029.jpg20201126_124017.jpg20201126_124005.jpg20201126_124800.jpg
 
Last edited:
I fight with another problem preventing the release of my project as open source.
The thingy for Linux which allows to insert non-keyboard characters. I could not find any good character selector, i.e. better than Windows 98 "Character table". To enter foreign characters, you can use overly complicated (and almost uncustomizable) input drivers/buses or, which is the most reliable, clipboard. And most desktop-independent character pickers work with the clipboard.
So I decided to make a simple character selector in Qt and X, and quickly seen why it's so complicated. Theoretically, it looks simple:

2020-12-18_01-45.png


I type text. I press a key combination, this thing pops and I can select character with cursors, I can press / and then type, then select with cursors or just press return to insert character.
I can also run it in "mouse mode" in which it doesn't intercept keyboard so I can use it as on-screen keyboard:

2020-12-18_02-26.png


But this is very complicated inside.

Problem 1. It should pop under the cursor (i.e. caret).
Solution: It will not. It is not possible in X applications to get caret position. I did a trick to make Qt divulge it, I did an awful memory-whacking mod to tear it from GTK, but no way to make it work in WxWidgets as their caret is... I have no idea how is it made. In MOTIF it is not only graphically not there, but it seems like programmatically too! I think there is a separate set of routines writing this awful ^ in MOTIF. I decided to make it pop in the center of active window as a compromise. So I found myself at Problem 1a.

Problem 1a. All GTK windows are 1pix*1pix in size.
Yes, even when you see otherwise. This is made intentionally, probably to draw all windows in some other place of the screen, make non-rectangular windows or make them transparent, and the transparency explanation sounds reasonable. The size can be obtained by moving downwards in the hierarchy (This is X11, everything is a window!), it will have the proper size but now it will be at the left-top corner of the screen. So position from 1x1px, size from the window iterated next. WORKS.

Problem 2. Character insertion
It should operate this way: I scroll through the keycode list to find a free one, I assign keysym to it and press the non-existent key by sending the event. Press, Release. Then I free the code to make it usable in the next call. Simple? It is not. For some reason, I have to pass TWO keysyms to the code: Shifted and unshifted, or it will shift everything. It is just funny seeing how it shifts higher Unicode by adding ASCII constant to it. Passing two same keysyms should work.
Well, so it will work, but only up to U+FFFF! And forget about composite characters. The U+FFFF limitation is present only in Qt applications (all Qt 5 applications) and nobody in Qt forums knows why. The composite characters will not work this way at all. And the trick that you can pass the codepoint to keysym by converting it to char* and passing "like that" seems to be not well documented too.

Problem 2a. No higher (in Qt) or composite characters
Something had to be done. My first idea was to implement the check is the application in Qt5 and then act, but I found my memory trick suddenly stopped working when I updated Qt to a slightly patched version. And by default user's programs should not do things which usually end with segfault, but do not as I route the call through a library and a daemon running on higher permissions. So I decided to pass all higher UTF and composites through another method. The method is... the PRIMARY.
The Primary is the "non-clipboard" in X. Everything selected can be pasted, and when the "paste" command (Shift-Ins or middle mouse click) is made, it is copied. So I just save my primary in the program, copy the characters there, pass Shift-Ins into the target and restore the primary. Simple?

Problem 2b. Primary support is sometimes locking.
This mostly works. Mostly, because, what I wrote, Primary is a "non-clipboard". It should never be considered as a buffer (What I found in ICCCM there are real buffers, but they are fortunately not used anymore). So if I rip the Primary and write to it through another process, pass the Primary and end this child process, I will end not supplying the Primary from my program, but locked, I will not be able to mess with it again. This required me to spawn separate process working only as a source of Primary during character insertion.
OK, but is it fixed now? NOT.
The problem is that when the process quits, there is nothing to handle the Primary! I cannot just direct another window and point it like "Hey, you play with Primary now". Now there is a very ugly hack, it uses calling external X11 tool, but it is even acceptable now.

So, what's wrong with the program? I decided to implement another feature. In the screen above, you can see that I configured Sigma character as "Stress" as it is in mechanics. When the program is called with specific parameter, it searches characters by description, and the description is fed from Primary. The character found is inserted, depending on another parameter: without any processing, with right arrow key spoofed before or with right arrow and then space. If I write something like "In the formula, the degradation W is proportional to normal stress", select last word and press activation key, the program launches, seeks and inserts nice space and sigma after.
But it does not always work too!
I found that when I use LibreOffice with generic X11 frontend as I always do, it works well. But in many Qt applications and some GTK3 it looks like that keyboard does not cause Primary to operate! The copied characters must be selected by the mouse.

Is there any X11 mage who knows is it possible to configure Primary to operate with keyboard in these toolkits?

P.S. I have chosen to do it in X11, not Wayland because when I saw that there are at least 4 APIs for taking screenshots I though it will be too complicated to do it in Wayland. Better to handle ten edge cases in X than to handle >4 separate APIs in Wayland. What was that about Wayland being simpler? :)
 
I don't think there's much of my target audience on this forum, but I'm in the mood to share this project around right now so I'll leave it here.

For the past year or so I've been on and off working on a VR utility application to bring desktops (and recently also windows directly) into SteamVR. The project originally started when SteamVR's own desktop mirroring functionality was sluggish and buggy. Nowadays it's smooth... but still kind of quirky.
It has never been the only project of this kind, but I thought no one should have to pay to get decent desktop access in VR (nor did I want to), so I just made my own. Free and open-source.

Fast forwarding a little bit, the thing has grown to have quite the feature set and people wanted it on Steam so much, they threw enough money at me to do so. And I've just set the Steam version live here:

Sure, the truth is that being on Steam these days is just $100 away, but it still feels kind of neat to actually have released something there.
 
For the past year or so I've been on and off working on a VR utility application
Congrats! Does it do multiple windows (connect more than 1 system to the virtual reality system)?
 
It does multiple desktops/windows at once, but only on the same machine if you mean that by "more than 1 system". This is PCVR so it's not streaming or anything. Nothing stops you from streaming to your desktop and then mirroring that though.
 
@PCXT
i am currently working on a text editor based on my very own toolkit based on the Löve game framework.
I will have to write a char selector soon to i guess, its a helpful thing to have.
Anyway i too struggle with getting the primary buffer to work.
SDL has no options for it. I think i will just end up with calling the external x tool and call it a day.
 
  • Like
Reactions: rSl
I think i will just end up with calling the external x tool and call it a day.
K.I.S.S. I'm with you on this. Just make it work, then worry about it later. Remember Apache/A-patchy

It does multiple desktops/windows at once, but only on the same machine if you mean that by "more than 1 system". This is PCVR so it's not streaming or anything. Nothing stops you from streaming to your desktop and then mirroring that though.
No, I was meaning that you connect to 5 machines and start up an installation, and then in VR you could watch them. But I guess you could add virtual windows to windows, then rdp on each virtual screen to separate servers, then watch the installation progress in VR.
 
@PCXT
i am currently working on a text editor based on my very own toolkit based on the Löve game framework.
I will have to write a char selector soon to i guess, its a helpful thing to have.
Anyway i too struggle with getting the primary buffer to work.
SDL has no options for it. I think i will just end up with calling the external x tool and call it a day.
OK, after my experiments with X's Primary, there is the advise: Verify EVERYTHING.
If it works in GTK applications, check Qt. And Wx too. Maybe even FLTK.
There's also an X text editor named CoolEdit. Its GUI seems to be not made with any typical library (although looks MOTIF-ish), the authors probably rolled their own. Good for testing non-standard X solutions.
If it works by mouse, check does it work with keyboard. I found that Qt seems to ignore selections made with keyboard and doesn't mark them properly so they don't land in primary buffer from any Qt application. At least Qt5 in Debian 10.
And xclip is Your friend :). Especially the "-selection" parameter.

And with my projects:
- Finally built a Greaseweazle device, it's like KryoFlux floppy controller. Still I have no idea how to image double-density 5.25" disks not trying blindly to image them as high-density and finding the mistake when trying to extract useful data from it.
- Modified my disk image program to use my crooked DPI. I.e. made Qt resize windows to contents and contents to windows. As a side effect, it stopped looking strange on some Apple computers!
 
BUT, these toolkits are not necessary working _right_ themselves. The longer i look at stuff the more i am amazed that different toolkits can interact with each other at all.
 
This is the thing I had when trying to implement drag and drop between different programs.
Decades ago there were some draft standards, rather poor to be honest. Currently there are almost no standards, so the best thing they came with was sending mimetype and data. It works when sending some simple data, but... ooops, WxWidgets made it incompatible with some Qt versions on binary level! Then GTK modified it even more and I'm not sure how it works.
And moving files between programs with drag and drop is now "standardized" the way that it is now a security bug. Allows to overflow the system drive :).
 
The longer i look at stuff the more i am amazed that different toolkits can interact with each other at all.
That's because the don't really. You create a wxwidgets app, and it spawns a window, you create a gtk app and that spawns a different window, ditto for all of the others. They only really interact when they exist as X windows, and in that respect they can only really interact by being placed over the top of each other.
 
Gratuatus attempt to revive one of my corpses... I have written me a C64 sprite multiplexer
 
Back
Top