How much fun …. just wanted to share my recording
I’ve written some tools for my keyboard like a mqtt client, but this is someone else’s. But it gave me some ideas …
My keyboard is a Razer BlackWidow V3
How much fun …. just wanted to share my recording
I’ve written some tools for my keyboard like a mqtt client, but this is someone else’s. But it gave me some ideas …
My keyboard is a Razer BlackWidow V3
As previously posted, i had an idea to create a dual matrix keyboard mashup using available components.
I mentioned that “it should theoretically work”. But only being using atf22v10c for a couple of days. It was a long shot.
I’ve put it to the test .. and it worked first time.
I can use above, to connect my extended matrix keyboard to a 6522 VIA chip using 5 pins and sending a data available signal to CA1.
Nice .. you can request a data export from spotify, much like google’s takeout.
I wil export your streaming history, playlists, library and more.
Login spotify on a desktop, goto privacy settings and request data.
Nice to generate some statistics from this data.
For now the top 50 played artists (nr of times, artist)
790 "Rammstein" 507 "Fred Morrison" 478 "Lincoln Hilton" 437 "Avicii" 420 "Shooglenifty" 347 "Treacherous Orchestra" 323 "Battlefield Band" 321 "Breabach" 295 "Nightwish" 254 "The Fraser Shaw Trust" 236 "Michael McGoldrick" 207 "Peatbog Faeries" 207 "Calum Stewart" 203 "Lúnasa" 197 "Martyn Bennett" 194 "Jeff Wayne" 193 "The Prodigy" 173 "Kíla" 172 "Ross Ainslie and Jarlath Henderson" 170 "Buena Vista Social Club" 153 "Ross Ainslie" 150 "Dàimh" 138 "Bliss" 125 "Hans Zimmer" 124 "Rare Air" 118 "Michael McCann" 107 "Kyle Tuttle" 107 "Beinn Lee" 105 "Bourne & Macleod" 89 "Wolfstone" 88 "Ímar" 83 "Afro Celt Sound System" 81 "Gordon Duncan" 81 "Armin van Buuren" 80 "Face The West" 79 "Tyurgen Kam" 79 "Aly Bain" 72 "Keltik Elektrik" 71 "Duncan Chisholm" 66 "Liz Carroll" 63 "Project Smok" 63 "Blazin' Fiddles" 62 "Dagda" 61 "Trail West" 59 "Julian Winding" 57 "Solar Fields" 57 "Dougie McCance" 56 "John McSherry" 56 "AES DANA" 52 "Gaelic Storm"
Get top 50 script
cat *json | grep artistName | sort | uniq -c | sort -nr | head -50 | cut -f1,4,5 -d\" | sed s/,$//g
In this case designed for my 6502, but it is a generic setup.
I it just a dual 16key matrix decoder merged together. You can probably use this with raspberries, arduinos etc.
I wanted to use 74C923 but these are nowhere to be found. And even then, the number of keys wil be 20.
So i am tying together two 74C922 using some logic in a PLD.
It wil be something like above. Using the data availabe signal i can combine both 16key matrixes. (In theory .. it is all untested)
PLD Code
GAL22V10 Address Decoder PHI2 DA0 DA1 D01 D02 D03 D04 D11 D12 D13 D14 GND NC D0 D1 D2 D3 D4 DA NC NC NC NC VCC DA = DA0 + DA1 D0 = D01 & DA0 + D11 & DA1 D1 = D02 & DA0 + D12 & DA1 D2 = D03 & DA0 + D13 & DA1 D3 = D04 & DA0 + D14 & DA1 D4 = DA1 DESCRIPTION Key matrix merger
I’ve got my new keys of the keyboard in today!
My inkscape template (keys are 10/10mm)
Printed on white and red paper
https://media.henriaanstoot.nl/keyboardmatrix.svg
Next to try is a VR setup.
Another blender project i’m planning to do this week is a movie displaying my logo to overlay on my videos.
So i have to render a transparent movie for this.
Howto:
Open a scene, i took the liberty to get one from blenderkit.
Change output to cycles, eevee doesn’t work
Make x/y large enough in output tab. X = 2 * Y !
Next select your camera, and open camera tab
Change Type to panoramic and then you can change panorama type to Equirectangular
Position your camera and hit F12, it wil take a long time!
You get something like this
Use a proper plugin for your website, or view with your VR glasses!
New address decoder in place!
Connected RAM/ROM/SID/VIA1/VIA2 and ACIA
| ROM | 8000-FFFF |
| SID | 7000-700F (sound) |
| VIA1 | 6000-60xx (Hex key matrix) |
| ACIA | 6800-68xx (serial) |
| VIA2 | 5000-50xx (led test at the moment) |
| RAM | 0000-3FFF |
To plan: Bigger maxtrix keyboard and other displays
Got a serial connection working between the 6502 and my linux machine!


At the moment when a reset occurs , hello is being printed.
Text typed in the minicom terminal, is echo-ed back and displayed on the LCD display.
Things learned: Do not trust internet schematics blindly!
The crystal used for the ACIA (pin 6/7 1.8432Mhz needs a 1M ohm resistor parallel over the crystal, and a 30nF capacitor from pin 7 to GND
When using a terminal emulator, and using 3 wires. Disable hardware handshake.
What didn´t work as planned:
New amplifier schematic for the SID. There is too much noise.

Bought a dual power supply (5V and 12V). But this one has a lot of signal noise on the SID part and even my battlestation speakers!
LED test 2nd via
PORTB = $5000 ; VIA PORTB PORTA = $5001 ; VIA PORTA DDRB = $5002 ; Data direction register DDRA = $5003 ; Data direction register LED = %10000000 .org $8000 reset: lda #%11100000 ; Set top 3 pins on port A to output sta DDRA lda LED sta PORTA loop: ; done loop until doomsday jmp loop irq: nmi: .org $fffa .word nmi .word reset .word irq
ACIA part
ACIA_RX = $6800
ACIA_TX = $6800
ACIA_STATUS = $6801
ACIA_COMMAND = $6802
ACIA_CONTROL = $6803
lda #$00
sta ACIA_STATUS
lda #$0b
sta ACIA_COMMAND
lda #$1f
sta ACIA_CONTROL
I like to work on mini models and diorama’s.
The fine miniature work helps me relax, it’s a zen moment for me.
Whereas i needed to use several logical components to make a address decoder, below i only need one!
cat addressdecoder-fash.PLD
ATF22V10 (GAL22V10)
Address Decoder
PHI2 A15 A14 A13 A12 A11 A10 A9 A8 A7 A6 GND
xx xx RAM ROM SID ACIA VIA1 VIA2 DEV0 DEV1 BANK VCC
/RAM = PHI2 * /A15 * /A14
/ROM = A15 * BANK
/SID = /A15 * A14 * A13 * A12
/VIA1 = /A15 * A14 * A13 * /A12 * /A11
/ACIA = /A15 * A14 * A13 * /A12 * A11
/VIA2 = /A15 * A14 * /A13 * A12
/DEV0 = A15 * /BANK
DESCRIPTION
Address decoder
galasm addressdecoder-fash.PLD # Generates below file which i can flash into the PLD
cat addressdecoder-fash.jed
Used Program: GALasm 2.1
GAL-Assembler: GALasm 2.1
Device: GAL22V10
*F0
*G0
*QF5892
*L0924 11111111111111111111111111111111111111111111
*L0968 11100111111111111111111111111111111111111111
*L1496 11111111111111111111111111111111111111111111
*L1540 11111011011110110111111111111111111111111111
*L2156 11111111111111111111111111111111111111111111
*L2200 11111011011101111011101111111111111111111111
*L2904 11111111111111111111111111111111111111111111
*L2948 11111011011101111011011111111111111111111111
*L3652 11111111111111111111111111111111111111111111
*L3696 11111011011101110111111111111111111111111111
*L4312 11111111111111111111111111111111111111111111
*L4356 11010111111111111111111111111111111111111111
*L4884 11111111111111111111111111111111111111111111
*L4928 01111011101111111111111111111111111111111111
*L5808 01000101010101010100
*L5828 0100000101100100011001000111001001100101011100110111001100100000
*C50fa
*
b734
So one chip replaces schematic below!
I was using zevv’s bucklespring way back since he was beta testing.
https://github.com/zevv/bucklespring
Also cool-retro-term, i used whenever i felt nostalgic.
But both at the same time, how much fun is that!
(Both newly installed on my laptop, which i had to reinstall, because i f*cked it up beyond repair. installing openxr stuff. OpenXR is an open, royalty-free standard for access to virtual reality and augmented reality platforms and devices. )
The ATF22V10 is a Programmable Logic Device. This means you can program the logic in the chip.
Internally it looks like a big matrix of connections which you can program to connect/disconnect from certain logic.
It has just a bunch of inputs/outputs
So if we want to have a 7 Segment decoder (you can easily buy a BCD decoder .. but these only work for displaying 0-9 and not 0-9A-F for displaying HEX numbers)
| Binary IN | 7 Segment decoded | Displays |
| D C B A | A B C D E F G | |
| 0 0 0 0 | 1 1 1 1 1 1 0 | 0 |
| 0 0 0 1 | 0 1 1 0 0 0 0 | 1 |
| 0 0 1 0 | 1 1 0 1 1 0 1 | 2 |
| 0 0 1 1 | 1 1 1 1 0 0 1 | 3 |
| 0 1 0 0 | 0 1 1 0 0 1 1 | 4 |
| 0 1 0 1 | 1 0 1 1 0 1 1 | 5 |
| 0 1 1 0 | 1 0 1 1 1 1 1 | 6 |
| 0 1 1 1 | 1 1 1 0 0 0 0 | 7 |
| 1 0 0 0 | 1 1 1 1 1 1 1 | 8 |
| 1 0 0 1 | 1 1 1 1 0 1 1 | 9 |
| 1 0 1 0 | 1 1 1 0 1 1 1 | A |
| 1 0 1 1 | 0 0 1 1 1 1 1 | B |
| 1 1 0 0 | 1 0 0 1 1 1 0 | C |
| 1 1 0 1 | 0 1 1 1 1 0 1 | D |
| 1 1 1 0 | 1 0 0 1 1 1 1 | E |
| 1 1 1 1 | 1 0 0 0 1 1 1 | F |
Now we see that segment A is 1 in the case of (0,2,3,5,6,7,8,9,A,C,E,F)
When programming the PLD we can write that as: (note / means inverted a plus is OR, and * is AND)
So A is 0 in case of input being (1,4,B,D)
/QA = /D1 * /C1 * /B1 * A1
+ /D1 * C1 * /B1 * /A1
+ D1 * /C1 * B1 * A1
+ D1 * C1 * /B1 * A1
Complete code for galasm
Compiling and burning
GAL22V10
7SEGMENT
Clock D1 C1 B1 A1 D2 C2 B2 A2 NC NC GND
/OE NC NC NC QG QF QE QD QC QB QA VCC
/QA = /D1 * /C1 * /B1 * A1
+ /D1 * C1 * /B1 * /A1
+ D1 * /C1 * B1 * A1
+ D1 * C1 * /B1 * A1
/QB= /D1 * C1 * /B1 * A1
+ /D1 * C1 * B1 * /A1
+ D1 * /C1 * B1 * A1
+ D1 * C1 * /B1 * /A1
+ D1 * C1 * B1 * /A1
+ D1 * C1 * B1 * A1
/QC = /D1 * /C1 * B1 * /A1
+ D1 * C1 * /B1 * /A1
+ D1 * C1 * B1 * /A1
+ D1 * C1 * B1 * A1
/QD= /D1 * /C1* /B1 * A1
+ /D1 * C1 * /B1 * /A1
+ /D1 * C1 * B1 * A1
+ D1 * /C1 * B1 * /A1
+ D1 * C1 * B1 * A1
/QE = /D1 * /C1 * /B1 * A1
+ /D1 * /C1 * B1 * A1
+ /D1 * C1 * /B1 * /A1
+ /D1 * C1 * /B1 * A1
+ /D1 * C1 * B1 * A1
+ D1 * /C1 * /B1 * A1
/QF = /D1 * /C1 * /B1 * A1
+ /D1 * /C1 * B1 * /A1
+ /D1 * /C1 * B1 * A1
+ /D1 * C1 * B1 * A1
+ D1 * C1 * /B1 * A1
/QG = /D1 * /C1 * /B1 * /A1
+ /D1 * /C1 * /B1 * A1
+ /D1 * C1 * B1 * A1
+ D1 * C1 * /B1 * /A1
DESCRIPTION
A 7 segment hex decoder
galasm 7seghex.gal
minipro -p ATF22V10CQZ -w 7seghex.jed
minipro -p ATF22V10CQZ -w 7seghex.jed Found TL866II+ 04.2.129 (0x281) Warning: Firmware is newer than expected. Expected 04.2.128 (0x280) Found 04.2.129 (0x281) VPP=12V Warning! JED file doesn't match the selected device! Declared fuse checksum: 0x98D5 Calculated: 0x98D5 ... OK Declared file checksum: 0x40B3 Calculated: 0x41A8 ... Mismatch! JED file parsed OK Use -P to skip write protect Erasing... 0.33Sec OK Writing jedec file... 5.01Sec OK Reading device... 0.32Sec OK Writing lock bit... 0.35Sec OK Verification failed at address 0x16C6: File=0x01, Device=0x00 < ------------------ Gives error, but burning seems okay henri@zspot:~/projects/galasm$ minipro -p ATF22V10CQZ -r 7seghex.out Found TL866II+ 04.2.129 (0x281) Warning: Firmware is newer than expected. Expected 04.2.128 (0x280) Found 04.2.129 (0x281) Reading device... 0.32Sec OK Gives all zeros as output, but device works!

