All posts by fash

Upgraded my mattermost server 4 days ago.

If you are a old friend/colleage/whatever .. give me a ping to get you connected.

I’ve been using IRC a long time, we even had our own interconnected servers with our group ICE.
Lipperkerk, GMC and Pixnet.
Overkill I know, but we could so we did.

Last few years i’ve been using Mattermost. After testing many alternatives.

  • Whatsapp – not own hosted, hate it, and was not allowed for work.
  • Zulip – tested this for a long time
  • IRC at work, implemented this at 2 places i’ve worked. Once using a web gui.
  • A ajax chat server
  • ??
  • ??

After installing this in my Lab, a few colleages from work used it. After that the whole department and more.
Running for more than a year, it was time got get this running on the servers at work.
I’ve reinstalled a server for my friends.

Last update gave me a nice insights desktop. Quiet days in june.

I love the webhooks and plugins.

In the past i’ve implemented a whatsapp to mattermost bridge, i will post about this .. sometime.

Below a implementation using a arduino and a 3D printed flag.

ISA prototyping board – IO chips

Followup on

UPDATE 20230702 20230703 20230714

While working on a Lidar project, my mouser components came in.

Now I have to find a IO address decoder schematic I made a while ago.

This ISA board is going to have a Wirewrapped setup. There is a 8255 IO chip, and uses 3x 74138 for IO address decoding, OR i will use a setup i’ve made for my 6502 using an atf22v10.

What to controll using this 8255? First some Leds, later a LCD display.

Below the 3 mentioned IC’s

The 8255 is a chip like the 6522 used in my DIY 6502 elsewhere on my site.

Overview of comparable IO chips. ( Not interchangeable due to bus timing!)
Most of them have 8 data lines and 2x 8 IO bi-directional lines.

CHIPNOTES
65226502 based machines
82558088/8068 based machines
Z84C2008Z80 (called PIO)
81558085 / 8088
852068000 amiga
68216800

6821 example

UPDATE 20230702

Started wirewrapping, luckily i’ve got a big choice of colors. That makes finding the right signals a breeze.

UPDATE 20230703

Found my schematic

Above uses 3 74138 decoders, address can be “programmed” using jumpers (not used on my prototype board) . Address 0400h in above example.

A15 – 0
A14,13,12 – decodes to OUT-0
A11 – 0
A10,9,8 – decodes to OUT-4
A7 – 0
A6,5,4 – decodes to OUT-0
A3 and A2 are not used (see note)
A1 and A0 are register select on the 8255

Address 0000,0100,0000,xxrr
xx can be a 0 or 1
the 8255 can be controlled using
0400h 0401h 0402h
but also
0404h 0405h 0406h
0408h 0409h ….
040Ch ……

UPDATE 20230714 – Alternative address decode test with ATF22V10

UPDATE 20230803

UPDATE

Miswired second 74138.
Tested with below code

mov dx,503h # control register
mov al,80h # output port a,b,c as standard IO/output
out dx,al # 16 bit IO mapped IO out
mov dx,500h # data register
mov al,0  # 0/ff all on/all off
out dx,al

Pre 40’s movies that surprised me

(These are only movies 1900-1939)

UPDATE 20230830

I’m not talking about the well known movies like:

  • King kong (1933)
  • The Wizard of Oz (1939)
  • Mr. Smith Goes to Washington (1939)
  • The Gold Rush (1925)
  • Frankenstein (1931)
  • Modern Times (1936)

I’ve seen many more, maybe i’ll add above and more to below list.

These are also very good, just watch them!

Things to come (1936)

H.G.Wells sci-fi movie ‘predicting’ WWII and a trip to the moon (predicted 1970 instead of 1969)
Special effects using Matte painting, double exposure and miniature models.

It’s Christmas 1940, and Everytown resident John Cabal fears that war is imminent. When it breaks out, the war lasts 30 years, destroying the city and ushering in a new dark age of plagues and petty despots. But there is hope in the form of Wings Over the World, a group of pacifist scientists and thinkers lead by Cabal. Their dream is to build a utopian society on the ruins of the old. But first they’ll have to unseat the latest ruling tyrant.

Nice transition i found from real footage to model being blown up. (These are some sloweddown screenshots, it was hardly notisable in the movie)


M (1931)

Good story with superb acting by Peter Lorre.

M is a 1931 German mystery suspense thriller film directed by Fritz Lang and starring Peter Lorre in his third screen role as Hans Beckert, a serial killer of children. An early example of a procedural drama, the film centers on the manhunt for Lorre’s character, conducted by both the police and the criminal underworld.

Metropolis (1927)

Silent Sci-Fy movie, using some special effects never seen before.
It is a long movie, and shows some nice dystopian scenes.

This influential German science-fiction film presents a highly stylized futuristic city where a beautiful and cultured utopia exists above a bleak underworld populated by mistreated workers. When the privileged youth Freder discovers the grim scene under the city, he becomes intent on helping the workers. He befriends the rebellious teacher Maria , but this puts him at odds with his authoritative father, leading to greater conflict.

Freaks (1932)

What can I say, can’t be made anymore. Shocking to see what sideshows looked like 100 years ago.
Still they managed to tell a story about relations and greed.

When trapeze artist Cleopatra learns that circus midget Hans has an inheritance, she marries the lovesick, diminutive performer, all the while planning to steal his fortune and run off with her lover, strong man Hercules. When Hans’ friends and fellow performers discover what is going on, they band together and carry out a brutal revenge that leaves Hercules and Cleopatra knowing what it truly means to be a “freak.”

Nosferatu, eine Symphonie des Grauens (1922)

While almost at the end of our 250 best movies journey, this movie popped up.
Almost the oldest in our collection.
The Kid is one year older (charlie chaplin)

This one has a history.
Al copies had to be destroyed ( Stokers Widow ordered it, because it was not authorized https://rosenbach.org/blog/the-destruction-of-nosferatu/ )
So this version I saw, was put together using multiple sources. Like a Frankensteins monster.
But is it a well made movie, which had a great influence on dracula movies to come.

Max Schreck as Orlok is amazing! There is something in his statue/movement.

Micro cassettes with computer programs.

I’ve got some micro cassettes with programs for P2000 and the Microtrainer (SDK-85).

Lets try to get this into executable code again.

(I sold my Philips P2000 last year before I found these tapes)

I bought a Cassette player (voice memo recorder) from Marktplaats (dutch ebay), and a mini jack cable (2.5mm to 3.5mm)

There are two things i’m going to try.

Converting the recorded audio into executable code using python or Puredata.
And making a print to connect the tape player to the SDK-85.

Connecting the player to a soundcard gave me:
Signed 16bit 44.1 kHz

(there are simular projects like this for C64 tapes and alike)
So there will be FFT tricks involved.

While browsing though this book:

I found this schematic: (page A1-39)

So that’s next to build

Python Spotify Genre Cube v2

Spotify version

Next to do: Lasercut a wooden cube with better lettering.

Run the python part on a server

and

First export some API credentials

export SPOTIPY_CLIENT_ID=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
export SPOTIPY_CLIENT_SECRET=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
export SPOTIPY_REDIRECT_URI="http://localhost:8080/callback"

Code below:

from flask import Flask, request, redirect
from requests_oauthlib import OAuth2Session
from requests.auth import HTTPBasicAuth
import requests
import json
import spotipy
from spotipy.oauth2 import SpotifyOAuth
from pprint import pprint
from time import sleep
import spotipy.util as util
import sys
import paho.mqtt.client as mqttClient
import time
import os
import subprocess

Connected = False


broker_address = "MQTTSERVER"
port = 1883


def on_connect(client, userdata, flags, rc):
    if rc == 0:
        print("Connected to broker")
        global Connected
        Connected =True
    else:
        print("Connection failed")

def on_message(client, userdata, message):
    print (message.payload)
    myurl = 'spotify:playlist:' + str(message.payload.decode())

    results = sp.start_playback(context_uri=myurl, offset={"position": 1})

client = mqttClient.Client("PythonSpotifyGenreCube")
client.on_connect = on_connect
client.on_message = on_message

client.connect(broker_address, port=port,keepalive=60 )
client.loop_start()
time.sleep(4) # Wait for connection setup to complete
client.subscribe('spotify/playlist')
#client.loop_stop()    #Stop loop

#while Connected != True:
#    client.loop()
#    time.sleep(0.1)
#    print("test")
#    client.subscribe('spotify/playlist')



app = Flask(__name__)

AUTH_URL = 'https://accounts.spotify.com/authorize'
TOKEN_URL = 'https://accounts.spotify.com/api/token'
REDIRECT_URI = 'http://localhost:8080/callback'
CLIENT_ID = "xxxxxxxxxxxxxxxxxx"
CLIENT_SECRET = "xxxxxxxxxxxxxxxxxxxxx"
SCOPE = [
    "user-read-email",
    "playlist-read-collaborative"
]

@app.route("/login")
def login():
    spotify = OAuth2Session(CLIENT_ID, scope=SCOPE, redirect_uri=REDIRECT_URI)
    authorization_url, state = spotify.authorization_url(AUTH_URL)
    return redirect(authorization_url)

@app.route("/callback", methods=['GET'])
def callback():
    code = request.args.get('code')
    res = requests.post(TOKEN_URL,
        auth=HTTPBasicAuth(CLIENT_ID, CLIENT_SECRET),
        data={
            'grant_type': 'authorization_code',
            'code': code,
            'redirect_uri': REDIRECT_URI
        })
    return json.dumps(res.json())


username = "fashice"
scope = "user-read-playback-state,user-modify-playback-state,playlist-read-private"
util.prompt_for_user_token(username,scope,client_id='xxxxxxxxxxxxxxxxxxxxx',client_secret='xxxxxxxxxxxxxxxxxxxxxxxxxxxx',redirect_uri='http://localhost:8080/callback')

sp = spotipy.Spotify(client_credentials_manager=SpotifyOAuth(scope=scope))

# Shows playing devices
res = sp.devices()
pprint(res)


# Change track
#sp.start_playback(uris=['spotify:track:6gdLoMygxxxxxxxxxxxxxxx'])
#results = sp.start_playback(context_uri=myurl, offset={"position": 1})


## Change volume
#sp.volume(100)
#sleep(2)
#sp.volume(50)
#sleep(2)
#sp.volume(100)
#


playlists = sp.user_playlists(username)

#for playlist in playlists['items']:
#    print(playlist['name'])


playlists = sp.current_user_playlists()
#print (playlists)
for playlist in playlists['items']:
    print(playlist['id'] + ' ' +  playlist['name'])



#if __name__ == '__main__':
#   app.run(port=8080,debug=True)


while Connected != True:
    time.sleep(0.1)
    client.subscribe('spotify/playlist')

try:
    while True:
        time.sleep(1)


except KeyboardInterrupt:
    print ("exiting")
    client.disconnect()
    client.loop_stop()

ISA Prototyping print

Got a delivery today …
Woot .. let the 8088/v20 hardware hacking commence!

https://www.pcbway.com/project/shareproject/PC_XT_ISA_8_bit_retro_Protoboard.html

First to do: LEDs, everybody loves blinking leds.
Next: Probably a address decoder with a VIA/CIA and a LCD Display.

Now I have to wait for my mouser order to be delivered.

Stop doing this in posts!

See what I did?

Part x in my .. in don’t like series haha

Post topic: My life changed when changing this one setting.
Answer: Congratulations, you have a boring life.

Post topic: You are using this and that wrong!
Answer: No I don’t

Post topic: Only 1% see this optical illusion/What you see first tells you what kind of person you are./You are a genius when you find the numbers in this illusion.
Answer: No it doesn’t

Post topic: This setting is ruining your experience.
Answer: No I like it in the current setting

Post topic: Creepy HIDDEN map tracks .. blah blah.
Answer: No its not hidden, and it there by default and can be toggled using the settings menu.

Post topic: Do this now! You will be happy you did.
Answer: No I don’t, didn´t and never will

Post topic: Expect has cracked the code for a happy life.
Answer: Suuure..

Post topic: The BEST recipe for …
Answer: Depends what you like, maybe its a GOOD recipe, liked by more people.

Post topic: The top 10/best .. you have to own.
Answer: My top 10 is different, shutup.

Also .. this Popup over popup ….

Machine code Monitor in ROM on real BBC Acorn Hardware

My BBC Acorn model B is working again. The original monitor is still dead.

Time to play with some machine code and ROMs.

My machine has a NFS rom installed. (NetFS)

Econet was Acorn Computers’s low-cost local area network system, intended for use by schools and small businesses. It was widely used in those areas, and was supported by a large number of different computer and server systems produced both by Acorn and by other companies.

I found a ROM online called Gremlin. It is a 16K rom file. But at the moment I only got some 28C64 (8k) or 28C256 (32k) eeproms.

32k it is. But de beeb having address line A14 floating high, I need to flash the upper 16k of the 32k ROM.

So I made the 16K rom into a 32K using cat

cp Gremlin\ v1.21\ \(1983\)\(Computer\ Concepts\).rom 16k.rom
cat Gremlin\ v1.21\ \(1983\)\(Computer\ Concepts\).rom >> 16k.rom

minipro -w 16k.rom -p AT28C256

I got the rom from this page:
https://acorn.huininga.nl/pub/unsorted/roms/Gremlin%20v1.21%20(1983)(Computer%20Concepts).rom

Below booting straight into the monitor program.

Manual:

6502 and Wozmon

Ben posted a youtube about Wozmon running on his 6502.

In 1976, Steve Wozniac wrote what’s commonly known simply as Wozmon.

Wozmon is a machine-code monitor program written by Wozniak for the Apple 1. In Only 256 bytes ! Being pure 6502 code easily adaptable.
A monitor program allows you to view/edit and run machine code using simple commands.

I’ve got a different setup as Ben’s computer.
But changing the necessary, and it will run on my 6502.

I’m not using rs232 voltage levels (-7 till -25 and +7 till +25 volts).
I’m using a usb serial uart standard 5v leveling stick …

For address decoder see other post

Simplified schematic of my UART/ACIA

Compiling the Wosmon gave me an error, DEC is not a valid opcode for a bare 6502 .. but we have a 65c02.
Solution: Add -c02 extra opcodes

error 1 in line 187 of "wozmon.s": illegal operand types
>                DEC                    ; Decrement A.

# fix .. add -c02
vasm6502_oldstyle -c02 -Fbin -dotdir wozmon.s

Below Apple I Manual with the sourcecode for Wozmon

Debugging a cool robot

A friend bought a mini robot for his son.
But it didn’t work as it should.

No way i let this opportunity pass to play with it!

This is the one:
https://elektronicavoorjou.nl/product/maqueen-plus-v2/
Maqueen Plus V2 – Geavanceerde STEM Educatie Robot voor micro:bit

https://wiki.dfrobot.com/SKU_MBT0021-EN_Maqueen_Plus_STEAM_Programming_Educational_Robot#target_0

So you can program this in a blockly like manner.

Problems we encountered:

  • Uploading didn’t work
    Solution: Using chrome it had access to the usb port to upload, firefox didn’t work
  • The program didn’t compile, faulty or zero size hex file.
    Solution: Wrong Maqueen library was in the examples
    (After changing, needed version update also, see below)
  • Not everything is in Dutch (I like English, but this is for the boy), maqueen V2 needed a lot of translation.
    (So we joined https://crowdin.com/project/makecode/nl to help translating the libraries)

Apparently my AI camera can be connected to this robot!