I’ve used a basic program on C64 in the past and a Cartridge machinecode monitor in the past. I’ve really forgotten how, what i’ve used and what i’ve done with it. Not nearly as much as my friends at that time. I started with a Vic-20 and played around with machinecode on a 6502. I didn’t have a C64 for many years.
How much funit this!
I’ve recently started to build a 6502 computer again, and programming on 65xx again (Generic 6502 and C64). (2022)
Below is my setup on linux, to write assembly code, compiling and running the code in a emulator.
I have installed the Acme compiler and Vice as a emulator. Both can compile/run machinecode for multiple computer emulations. So maybe i can run my old Vic-20 machine code or the few C64 programs i’ve written.
I’ve only made the bash script, the included asm files i copied from someone on the internet. ( Credit lookup )
makeprg bash file:
#!/bin/bash
set -x
f=""
if [ "$2" == "f" ] ; then f="-fullscreen" ; fi
if [ ! -f $1.asm ] ; then
cp template.asm $1.asm
fi
vi $1.asm
acme --cpu 6510 --format cbm --outfile $1.prg $1.asm
if [ ! $? -eq 0 ] ; then exit 1 ; fi
c1541 -format foo,id d64 $1.d64 -write $1.prg
if [ ! $? -eq 0 ] ; then exit 1 ; fi
x64 $f $1.prg
template.asm
!source "basic-boot.asm"
+start_at $0900
; Set background and border to black
ldx #$00
stx bgcol
stx bocol
; Flicker border and background
.loop
inc bgcol
inc bocol
jmp .loop
basic-boot.asm
; A BASIC booter, encodes `10 SYS <address>`.
; Macroified from http://www.pouet.net/topic.php?which=6541
!source "constants.asm"
!macro start_at .address {
* = basic
!byte $0c,$08,$00,$00,$9e
!if .address >= 10000 { !byte 48 + ((.address / 10000) % 10) }
!if .address >= 1000 { !byte 48 + ((.address / 1000) % 10) }
!if .address >= 100 { !byte 48 + ((.address / 100) % 10) }
!if .address >= 10 { !byte 48 + ((.address / 10) % 10) }
!byte $30 + (.address % 10), $00, $00, $00
* = .address
}
; A cooler example is to write
;
; 10 SYS <address>: REM <backspaces>Your comment
;
; When the user types LIST, he will just see
;
; 10 Your comment
;
; but still be able to run it.
; For this, see http://codebase64.org/doku.php?id=base:acme-macro-tu
When running above bash script. it will open the file if it exists, else it will take a template file. After opening it with vi, and editing it, it starts a the compiler and creates a C64 d64 disk. This is going to be autorun/started with the VIce emulator. Appending -f to the bash script will start it in fullscreen mode. ./makeprg myawesomedemo.asm -f
Below it is running without the fullscreen option. but is shows how to start the interactive monitor in vice.
Update: 20220721 .. VIA chip installed Update: 20220801 .. changed layout, addressing and added rom, see below post.
Such a influencial little processor … Apple, Vic-20, C64 (with modifications), PET, BBC Micro, Oric, Atari and Nintendo.
Another (big brother) influencial CPU is the 68000. (Amiga/Atari ST/ Macintosh/Sinclair)
I’ve made a 680x computer in the past, and i want to make another one.
This one will be based on a 6502, because i used to program on this cpu when i got my Vic-20.
Goals of this project:
6502 Cpu
Memory and Rom
Rom must contain a good machinecode monitor
Adjustable clock
Now using Ben Eatons clock diagram, but i will move this to a programmable arduino, with a display which shows the clock rate
Hex keyboard ro program the machine, just like picture below
Display which was a resolution of at least 640×480
It will be a slow screen, character printing and a gfx mode?
First probably a SPLC780 HD44780, so i can enter/edit machine code.
Hopefully using a SID chip
Hardware monitoring of the address and data lines like movie below
Programming via serial/usb, by halting the 6502 cpu and pushing data into memory or fake-eprom with a arduino
Save/restore by modifying memory
Small
Example of Hex keyboard
Update 20220721
Via chip is on the board. For now i’m using a old display, like this one
I was planning to use this one
The graphic capable 12864 display (128 x 64 pixels)
I will reuse the schematics i’ve used for the 680x computer. (Posted above)
Update: 20220801
Added ROM, and changed layout. Every breadboard has a function now.
Upper left, Ben’s Clock module (this is going to be changed to a arduino with display which shows frequency) Upper right, power-on reset (Reused part of C64 schematic) Second row left, the 6502 On the right the ROM, RAM i also going to install here. 3rd Row, Address decoding, this is going to be a dynamic setup using dip switches and a eeprom for decoding (i know, this kind of decoding is slow, but i don’t need speed), on the right probably the hex keyboard with its own 6522. 4rd row left, a temporary display 16X2 connected via a 6522. Here i want to have a graphical display. 4rd row right (not started this part yet) a sound device. SID or a Yamaha sound chip i still have.
Below some examples and connection diagrams to control displays. More code and complete schematics will be added on this page or on a separate projects page.
UPDATE 20230119 Cost of 20×4 display in 1998
LCD
I’ve used a LCD display like this (HITACHI HD44780) on my PC in the 90s, and also written code to use this as a monitoring device on my amiga.
On Linux i used LcdProc – This module also was equiped with a serial connector
Some arduino’s have embedded displays like those i’ve used for a Lora project.
No usedWifi packet monitorLora test
Other means of connecting : SPI
SPI connected display
Nextion
Nextion is a Human Machine Interface (HMI) solution combining an onboard processor and memory touch display with Nextion Editor software for HMI GUI project development.
Using the Nextion Editor software, you can quickly develop the HMI GUI by drag-and-drop components (graphics, text, button, slider, etc.) and ASCII text-based instructions for coding how components interact on the display side.
Nextion HMI display connects to peripheral MCU via TTL Serial (5V, TX, RX, GND) to provide event notifications that peripheral MCU can act on, the peripheral MCU can easily update progress, and status back to Nextion display utilizing simple ASCII text-based instructions.
edit cmdline.txt
add "fbcon=map:10 fbcon=font:ProFont6x11 logo.nologo"
at the end
edit config.txt
add between custom comments at the bottom
dtoverlay=piscreen,speed=24000000,rotate=90
# Or check http://www.lcdwiki.com/3.5inch_RPi_Display
Above display’s i’ve used for Picore Players and the Lidar POC
To try: Getting above display running with a arduino https://github.com/PaulStoffregen/XPT2046_Touchscreen
Raspberry HDMI display
Easiest of them all, just connect with HDMI, there is a adaptor for hdmi-hdmi (versions 1,2,3) and hdmi-mini-hdmi for RPi4 variants.
Epaper and 7-Segment displays
Other means of displaying information are for example
Epaper
ESP with epaper module, disconnected power for a while, artifacts appear.
7 Segment displays
I used a lot of 7-Segment display’s in the past. They look cool and are hardcore.
My homebrew computer uses this
Nixie tubes!
And there are https://en.wikipedia.org/wiki/Nixie_tube .. I’ve never had those
Above bigger 2D display i used with Wled and a digital microphone, so its sound reactive. The lower part i got in recently .
While you can use screencapture to record virtual machines, to real machines it is a different story.
Virtual machines running locally or remote can be accessed with spice/vnc or rdesktop. So you have a window displaying the remote screen, which you can capture using window capture.
There are also emulators which you can window-capture. But i want the real thing when available. Emulators give a too crisp screen output. And you want to have the real SID chip sound.
Hardware capturing:
Recording Virtual machines
I’ve got two capturing usb sticks:
Camlink 4K for hdmi capturing (Which i use mainly for my nikon)
Basetech BR116 RCA and S-Video capture (NTSC 720 x 480 , 30 FPS/PAL 720 x 576 , 25 FPS)
Devices and recording:
C64 – Use Basetech, and the DIN to RCA cable
Vic-20 – same as above
Raspberry – Use a HDMI and Camlink
Amiga – I use the basetech and grab the composite signal from the Scart connector, another solution is to use a A520 Modulator, which has Composite out. (There are schematics on the internet to connect hdmi to your amiga)
C64 DIN RCA cableC64 connectedAdd video capture deviceRaspberry HDMIRaspberry bootingC64 settings
Amiga A520 Modulator
The 520 Modulator connects to the amiga using a DB23 connector, and a Y cable for the 2 rca audio jacks. It outputs a composite video signal, and RF modulated signal to connect to a old Tube/Crt monitor
How i connected my amigaSubD23 to Scart plus audio
When recording video from those screens, i configure my OBS file format to MP4. This makes it easier to embed into websites. Only downside on writing to MP4 instead of mkv is the fact that the file probably isn’t recoverable when something crashes.
Audio capturing :
When capturing your movie don’t forget to add a audio source to your OBS sources. Use Audio input capture, or you can use Audio output capture when sound is playing by your system.
Demo a friend made using a demomaker (Music starts half way)
Flightsim on a Amiga (See more on flightsims)C64 Hellraiser (part 1) no de-comb/de-interlace filter
Note: check your output/cables https://www.youtube.com/watch?v=entQosOLjEI
Instead of saying PPM is parts per million, i say Peats per minute! Henri
3 – 26 Juni zijn we op vakantie geweest in Schotland. Daarbij hebben we met name de western isles bezocht.
Henri
Hieronder heb ik stukken uit ons logboek geplakt aangaande bezoeken aan whisky distillers.
Naast de vele distillers op Islay, hebben we nog wat andere bezocht op de andere eilanden.
Isle of Islay
7 Juni – Arran distiller (Isle of Arran)
Hier een fles whisky gekocht en een kiltpin (van beide kun je er nooit genoeg hebben)
8 Juni – Laphroaig, Ardbeg, Lagavullin distillers (Isle of Islay)
Na een ontbijt van 2 chokolade koekjes en een banaan, de eerste destileerderij Laphroaig bezocht. We zijn door het mini-museumpje gelopen met hierin een aantal informatieborden met hierop de geschiedenis van de distilleerderij. Vervolgens hebben we een taster genomen met 4 whisky’s. We hebben een andere taster in driver’s flesjes meegenomen, en de complimentary drink uit de festival fles. Hier een boek over distillers gekocht.
Rond 13en kwamen we aan bij de Ardbeg destileerderij, 7km verderop. Ook hier zijn we eerst door het shopje gelopen. We hebben hier een CD en tunebook van Fraser Shaw gekocht. Vervolgens hebben we een broodje gehaald bij de foodtruck die buiten stond, en hebben we deze buiten opgegeten (gelukkig was het nog steeds droog). Ook hier hebben we weer een taster genomen van 5 whisky’s.
BBQ Smoker kokerSláinte !
Daarna zijn we weer 1.5km terug gereden naar de Lagavulin destileerderij. Nadat we weer even in de souveniershop hadden rondgekeken (een Lagavulin petje gekocht) meldde we ons voor de rondleiding. Om 15.30 ging de rondleiding van start een heeft Beth ons een uurtje door de distillery heengeleidt. De rondleiding eindigde met een tasting met 3 whisky’s: de 8 jaar, de 16 jaar, en de Festival fles van dit jaar. We waren het er over eens dat we deze laatste wel een beetje scherp in smaak vonden. Coline kon haar 3 tasters meenemen in driver’s flesjes (Zij was deze dag de BOB) . Na de rondleiding zijn we nog even naar de resten van Dunyvaig Castle gelopen. Vanaf hier had je namelijk een mooi uitzicht op de Lagavulin distillery, opnieuw met de naam in grote zwarte letters op de witte muur van het warehouse. We hebben de ruine beklommen, waarbij we een groot gat moesten overbruggen.
Savonds nog even fotos gemaakt van de Bowmore destileerderij.
9 Juni – Bruichladdich, Kilchoman, Ardnahoe, Bunnahabhain distillers (Isle of Islay)
Rond 11en zijn we vervolgens naar de Bruichladdich distillery gereden. Hier hebben we een bezoekje gebracht aan de shop. We hebben een kleine (gratis) tasting gedaan met 3 whisky’s: de bruchladdie, de 10 year Port Charlotte, en de Octomore 5th edition. Het meisje achter de sampling bar was erg enthousiast en vertelde veel. Later hebben we ook nog de botanist gin geproefd. we hebben een fles octomore (208ppm), een flesje Octomore-BBQ saus, een fles botanist gin, en een T-shirt gekocht.
We zijn doorgereden naar de Kilchoman distillery. Hier kwamen we rond 14.15 aan. Het was inmiddels wel lunchtijd, dus we waren blij verrast dat ze hier een groot visitors centre hadden met een restaurant gedeelte. Terwijl we wachtte op een vrij tafeltje hebben we ook een tasting gedaan met een core range met 4 samplers.
Vervolgens moesten we een beetje aanmaken om op tijd voor de rondleiding bij de Ardnahoe distillery te zijn, het was namelijk 15.15 en het was minstens nog een half uur rijden terwijl we onze rondleiding om 16 van start zou gaan. Na ons aangemeld te hebben, hadden we zelfs nog even tijd om door het shopje heen te lopen. Om 16 uur ging onze tour van start. Ardnahoe is de jongste distillery op Islay en is pas sinds 2018 in werking. Dit betekende dat we wel een rondleiding door de werkende distillery konden krijgen, maar nog niet hun eigen whisky konden proeven. Na rondgeleid te zijn, waarbij de stills het meest indrukwekkend waren oa door de ruimte waarin ze stonden met een prachtig uitzicht richting Jura, konden we kiezen uit 4 flessen van welke we een dram wilde proeven, 1 van de 2 mystery blends of 1 van de 2 mystery malts. Henri nam de Hepburn’s choice (Auchroisk 9yr) die gematureerd was op rode wijnvaten, en Coline heeft de andere malt meegenomen in een driver’s flesje. Hier mochten we de tasting glaasjes meenemen. Nadat we onze tasters op hadden zijn we er snel vandoor gegaan om nog net voor sluitingstijd bij de Bunnahabhain distillery het shopje in te kunnen duiken.
Bunnahabhain lag zo’n 2 km verderop dus we kwamen even voor 17en aan, en we konden inderdaad nog net even het shopje inlopen. We waren te laat om daar ter plekke nog een tasting te doen, maar we hebben van 3 whisky’s een 3cl tasting flesje meegenomen en nog een T-shirt gekocht. Eenmaal buiten zijn we nog even het terrein opgelopen en de pier, zodat we ook hier nog even het witte warehouse met de naam Bunnahabhain in zwarte letters konden fotograferen.
We wilden eigenlijk ook nog even langs de Caol Ila distillery rijden om ook hier een foto te maken van het witte warehouse met de naam Caol Ila in zwarte letters, maar we wisten dat deze gesloten was voor onderhoud. Maar de weg ernaartoe was ook afgesloten. We hebben het geprobeerd, maar de weg ernaartoe lag ook echt open, dus dat ging ‘m helaas echt niet worden.
10 Juni – Bowmore, Port Ellen distillers (Isle of Islay)
Een bezoekje gebracht aan de distillery shopje, waar we ook weer een kleine tasting hebben gedaan met de 10yr old (deze was complimentary), en Henri heeft nog een dram genomen uit de fles van het Fèis ìle festival van dit jaar.
In Port Ellen zijn we nog even langs de Port Ellen distillery gereden, die ergens dit jaar ook weer heropend zou moeten worden. Maar toen we er langs reden was het duidelijk dat ze nog vol in de bouw fase zitten. Het frame stond, de tanks en de stills stonden er ook al in, maar voor de rest miste er nog veel. Wel leuk om zo te zien!
Vanaf de boot hadden we nog een mooi uitzicht op Port Ellen en de Port Ellen distillery, waardoor we ook hier het witte warehouse met de naam Port Ellen in zwarte letters hebben kunnen fotograferen
11 juni: Oban distiller (Scottish Mainland)
Vandaag de shop van de Oban distillery binnengelopen. Helaas konden we hier geen tasting doen.
12 juni: Tobemory distiller (Isle of Mull)
In Tobermory zijn we ook nog even naar de Tobermory distillery (Ledaig => is niet uit te spreken) te gaan. Hier konden we de 2 whisky’s proeven, de 12 jaar Tobermory (is unpeated) en de 10 jaar Ledaig (is wel peated). Deze laatste hebben we thuis staan. Henri besloot om een flesje van de andere te kopen, ter vergelijk ook straks thuis.
16 Juni – Ardnamurchan
Even in de shop gekeken, en een inieminie klein glaasje kunnen proeven, nog een flesje gekocht en wat foto’s maken.
20 Juni – North Uist Distillery (Benbecula), Isle of Harris distillery (Isle of Harris
We hebben nog een korte stop gemaakt bij de North Uist Distillery, welke om 10 uur open zou gaan. Deze destilleerderij is nog maar net begonnen dus heeft nog geen Whisky, maar zoals zovele startende destillerderijen, mogen ze wel gin maken. Hier hebben we een bezoekje gebracht aan het shopje waar ze hun downpour gin verkochten (welke we bij de AirBnB van Isabel & Robert hadden geproefd). We hebben een fles gekocht (al was het vanwege de mooie fles)
Hier komt t dan 🙂
Hier hebben we een bezoekje gebracht aan de Isle of Harris distillery. Ook hier zijn ze nog te jong om al een whisky te hebben gebotteld. Maar ook hier zijn ze begonnen met een gin, deze bevat sugar kelp als speciaal extra ingrediënt.
23 Juni – Abhainn Dearg Distillery (Isle of Lewis)
24 Juni Edradour, Blair Atholl Distillery (Mainland)
Omdat we toch via Pitlochry naar het zuiden gingen, maar even lans de woonplaats van de helaas te vroeg overleden held van ons Gordon Duncan. Hier ligt het kleinste destillery van Scotland Edradour, maar deze is ‘temporarily closed’ Vanwege tijdgebrek van Blair Atholl alleen maar een foto gemaakt.