Category Archives: Hobby

Bash-completion, C64 Pico Amplifier and Laser cutting

Worked on bash autocompletion for QP

source below script to get
qp <tab><tab> shortcode

Not happy with both versions yet …

#/usr/bin/env bash

# Version 0.1
qpcompl()
{
  COMPREPLY=($(compgen -W "$(qp | cut -f2 -d \' )" "${COMP_WORDS[1]}"))
}
complete -F qpcompl qp
--------------------------------------------------------------------------------------
# V 0.2
_qp_complete() {
    local cur prev opts
    COMPREPLY=()
    cur="${COMP_WORDS[COMP_CWORD]}"
    prev="${COMP_WORDS[COMP_CWORD-2]}"
    opts="add del"

    case "${prev}" in
        add)
            COMPREPLY=( $(compgen -d -- ${cur} ))
            return 0
            ;;
        del)
            COMPREPLY=( $(compgen -f -- ${cur}) )
            return 0
            ;;
        *)
            COMPREPLY=( $(compgen -W "$(echo add; echo del ;echo "" ; qp)" -- ${cur}) )
            return 0
            ;;
    esac
}

complete -F _qp_complete -o nospace qp

Game controllers : left into right setup

My Bus Manipulator

And a Jigsaw in progress (with our own made clock in the background)

C64 Pico Amplifier

My C64 had a problem with previous attached speaker.
It drew too much current to drive. And random characters where printed.
Choosing another speaker and a minimal amplifier solved the issue.
(Thanks to Bigred finding the problem at Bornhack 2024)

My minimal amplifier for:

Using below mini speaker:

QuickPath and laser cut designs

Today I made a Linux version of Tyrone’s QuickPath tool.

My friend Tyrone came up with a great idea.

A directory switching tool, to move around in often used directories.
You can use a keyword to move around. These keywords are configured in a config file.
Even starting Total Commander with preset directories.
Work/Private/Programming environments.
His version uses PowerShell, but he wanted a multiplatform version, so we have chosen to use Python on both environments.

My version uses Python and Bash.
(Bash is used for a change directory workaround on Linux and bash completion.)

Source will be in Tyrone’s git when finished.

Options:

  • qp – lists config items with number and short key
  • qp 1 or qp c64demo – changes directory to below example
  • qp add c64demo /data/store/git/projects/c64code2024 – add a entry
  • qp del 1 – removes entry
  • qp mc tmp c64demo – starts midnight commander with left and right directories

Tomorrow some laser cutting, so let’s design some things to cut.

  • Jigsaw test – using engraving and cutting
  • Make a front for my bus manipulator
  • Make some cases for the game controllers (These are beta, and will be 3D printed at a later stage. My old 3D printer is slow)

Leather straps for a painting easel

Doing a project using leather is something I do not often enough.
So I’m always looking for new ideas/projects.

This weekend, I made some straps for portable painting easels.
Keeping the poles of the tripod together with multiple straps and a longer leather strip allows for easy carrying on your back.

A simple project, I need some challenge next time!

My leather strip cutter I made in 2011.

Tiny animator for stop-motion

I was working on a RP2040 HID project, but I needed some components I didn’t have … right now .. again ..

So I made something else ..

A tiny animator for stop motion animations using my webcam, python and OpenCV.

For claymotion or lego or whatever.

The program displays your webcam with the previous snapshot overlayed, so you can position everything relative to your previous snapshot.

Difference between two shots.

Press B to take a frame.

Just a proof of concept using a (BAD) webcam. (Don’t look at my hand )

CODE (short but you need OpenCV)

import  cv2
from datetime import datetime
# black is just a start empty image .. 
img=cv2.imread("black.png");
cap = cv2.VideoCapture(0)

while True: 

    ret,vid=cap.read()
    dim = (800,600)
    img1 = cv2.resize(img, dim, interpolation = cv2.INTER_AREA)
    vid1 = cv2.resize(vid, dim, interpolation = cv2.INTER_AREA)

    result=cv2.addWeighted(img1,0.5,vid1,0.5,0)
    cv2.imshow('overlay', result)
    if(cv2.waitKey(10) & 0xFF == ord('b')):
            now = datetime.now()
            current_time = now.strftime("%d_%m_%Y_%H_%M_%S")
            filename = '%s.png' % current_time
            if not cv2.imwrite(filename, vid1):
                raise Exception("Could not write image")
            img=cv2.imread(filename);

Pressing B fills your directory with PNG’s
like 24_10_2023_00_01_01.png (date formatted)

convert to GIF

convert -delay 10 -loop 0 24*.png animation.gif

GLABios for Laser XT/3

In previous post :

I mentioned a 2 ROM setup because the 8086 is 16bits instead of 8.
So I was wondering that maybe a recompile was needed, or the data being split over two roms (odd/even)

The guy from GLABios was so kind to build me two interleaved roms.

So while working on a padded bench, I tested the ROMs.

Working outside .. on the padded bench

Back to the roms, it didn’t work!

But I missed a detail in the technical manual (the bold text)

In Turbo XT /2 and Turbo XT /3, there are two 28-pin sockets for ROM,
both of them are occupied by 2764 which stored the BIOS. The contents
of the two 2764 are identical.
One of them contribute the ODD Byte to the system and the other EVEN Byte. Together they support 16 Bit BIOS
access.

I don’t know why this is how it works, but when I flashed two the same 28C64’s it worked!
(I also tought that is was strange that both original roms had the same markings.

It workes!

Only remarks/observations:

  • There was a longer wait time before the CF Card was detected/accessed
  • GLABios mentions 8088 in the splashscreen, but the machine is a 8086

UPDATE

GLABios was not updated for displaying 8086 yet.
Error 1701 was the (old spinning) harddisk not being connected.

Nice .. harddisk infomation like size, rom address and CHS

8086 sideway scroller ‘n stuff

Today I was working on my own brew ISA card (wirewrapping).
Did some mini modeling stuff.
Sorted some pipetunes.
And played around with my 8086.

Got it on a desk now, and replaced the harddisk with the CF card.
Also got an old SoundBlaster working, so i wanted to see what of my old code could still run.
Apparanty most code was compiled for 386/486 🙁
So i recompiled some stuff.
Below a horizontal scroller example.

Meanwhile i got my new fans in for my NUC (Kodi player, it was making a hell of a noise due to bad ball bearings.