Mystery Cartridge C64

Last Updated or created 2022-07-17

As posted before, i found a cartridge in my collection a while ago. I don’t know where i’ve got this one from.

While searching on the internet for more information, i really couldn’t find anything about it.
Not even on collectors sites.

Where did it come from, what does it do?

It says: Data Manager 64 (1984) , Softworld and Handic.

I can find many cartridges by Handic. I’ve checked all database/filers i could find. Non looked like this.

Next to try ..
Dumping the cartridge to file. Probably by changing the way the C64 starts a autostart cartridge.
So i have to modify the cartridge port, and put a cross connection on the lines EXROM and GAME, this will change the memory addresses ($8000/$A000) where a cartridge is placed. Then the commodore will start normally, and i can dump the cartrige memory locations to a file.

So pins 8 and 9 have to be switched around.
The C64 autostarts a cartridge when it find certain data on $8000

Meanwhile i try to contact some collectors of cartridges.

I don’t think its a homebrew, but we will see.

Mini C64 for MCH2022

Last Updated or created 2022-10-13

Cool little C64 gadget for MCH2022

Next week i’ll be going to May Contain Hackers 2022, what to bring?
My old friend Bigred will be there, many others couldn’t make it …

What to bring and do:

  • Laptops
  • Arduino touch project?
  • My new 6502 breadboard computer?
  • The DVB-T / DAB / FM stick
  • Besides the emulators on my laptop, maybe i’ll bring this little thing
    (Or a real C64?)

Booting in 4 seconds!
Running Vice in 50 or 60 Hz
Low latency video!
Can emulate cartrides, floppy’s
When you connect joysticks or a real C64 keyboard to the GPIO pins it will use that.
SID sound using ReSid
CRT emulation
(look for BMC64 or combian)

C64/6502 and Assembly

Last Updated or created 2022-07-17

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.

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.

  • n – step x instructions
    n 100
  • m monitor
(C:$103e) m
>C:103e  cd 12 d0 d0  fb a2 00 bd  5c 10 bc 79  10 88 d0 fd   ........\..y....
>C:104e  8d 20 d0 8d  21 d0 e8 e0  1d d0 ec 4c  81 ea 06 00   . ..!......L....
>C:105e  0e 06 0e 0e  03 0e 03 03  01 03 01 01  01 01 03 01   ................
>C:106e  03 03 0e 03  0e 0e 06 0e  00 06 00 07  09 09 09 09   ................
>C:107e  09 09 09 07  09 09 09 09  09 09 09 07  09 09 09 09   ................
>C:108e  09 09 09 07  09 09 09 09  00 00 00 00  ff ff ff ff   ................
>C:109e  00 00 00 00  ff ff ff ff  00 00 00 00  ff ff ff ff   ................
>C:10ae  00 00 00 00  ff ff ff ff  00 00 00 00  ff ff ff ff   ................
>C:10be  00 00 00 00  ff ff ff ff  00 00 00 00  ff ff ff ff   ................
(C:$10ce) 
  • d -assemble
(C:$1041) d 1000
.C:1000  78          SEI
.C:1001  A5 00       LDA $00
.C:1003  8A          TXA
.C:1004  98          TYA
.C:1005  8D 20 D0    STA $D020
.C:1008  8D 21 D0    STA $D021
.C:100b  A0 7F       LDY #$7F
.C:100d  8C 0D DC    STY $DC0D
.C:1010  8C 0D DD    STY $DD0D
.C:1013  AD 0D DC    LDA $DC0D
.C:1016  AD 0D DD    LDA $DD0D
.C:1019  A9 01       LDA #$01
.C:101b  8D 1A D0    STA $D01A
.C:101e  A9 39       LDA #$39
.C:1020  A2 10       LDX #$10
.C:1022  8D 14 03    STA $0314
.C:1025  8E 15 03    STX $0315

Etc .. see https://vice-emu.sourceforge.io/vice_12.html

New 6502 DIY computer

Last Updated or created 2022-08-01

Started with a new Micro computer project.

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.

Workbench outside

Last Updated or created 2022-07-14

One of the first designs of the workbench i made in blender.

I wanted to have a big workbench outside, which must at least have:

  • Wheels to move it around
  • Storage space
  • Place to put my tablesaw and miter saw
  • Electrical outlets
  • Adjustable in height, using a car-jack!
  • Large working space
    • Without holes, because it would be nice to use the table for boardgames!

So in 2021 i came up with this:

Got some wood deliverd and start working on it in may 2022

Today

Wooden structure below i can put stuff on i don’t use. It can be used as separate low working space.

Wanted to make a videowall for a video project

Last Updated or created 2022-07-13

I’ve seen some commercial solutions, and some free blender solutions which where too complex or too much hassle.

I’m not paying anything when you can do it yourself for free.
And i wanted a easy to setup wall, using movieclips or pictures.

So below is a blender howto

Above also shows howto enable displaying keypresses for making howto movies and a plugin for distributing objects.

Little example using method above

Screens and DIY projects

Last Updated or created 2023-01-19

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
Now (2023) it is 8 euros!
;LCD Display Module             Parallel port
;        1 Vss                  20 GND
;        2 Vdd                  14 +5V
;        3 Vlc                  20 GND (contrast LCD display)
;        4 RS (register select) 11 BUSY
;        5 R/W                  12 POUT
;        6 E (enable)           13 SEL
;        7 DB0                   2 D0
;        8 DB1                   3 D1
;        9 DB2                   4 D2
;       10 DB3                   5 D3
;       11 DB4                   6 D4
;       12 DB5                   7 D5
;       13 DB6                   8 D6
;       14 DB7                   9 D7
Amiga code part
        bsr     initprt         ; CIA 8520 init
        bsr     initlcd         ; init lcd display module
        move.l  #0,d0
        rts

initprt:move.b  #$ff,$bfe301    ; parallel port is output
        move.b  $bfd200,d0
        ori.b   #$07,d0         ; select, p-out and busy
        move.b  d0,$bfd200      
        rts

initlcd:move.w  #$38,d0         ; multiple reset
        bsr     send
        bsr     delay2
        move.w  #$38,d0
        bsr     send
        bsr     delay2
        move.w  #$38,d0         ; 2*8 lines
        bsr     send
        bsr     delay2
        move.w  #$01,d0         ; clear display
        bsr     send
        bsr     delay2          ; wait
        move.w  #$0c,d0         ; display on
        bsr     send
        move.w  #$06,d0         ; Entry Mode Set
        bsr     send
        rts

send:   bsr     delay
        btst    #8,d0           ; test rs bit
        beq     reg0
        bsr     rs1             ; select register 1
        bra     skip
reg0:   bsr     rs0             ; select register 0
skip:
        bsr     delay
        bsr     rw0             ; read/write=0 
        bsr     delay
        bsr     e1              ; enable = 1
        bsr     delay
        move.b  d0,$bfe101      ; push data
        bsr     delay
        bsr     e0              
        bsr     delay
        rts

delay:  move.w  #$20,d1
dloop:  subi    #1,d1
        bne     dloop
        rts

delay2: move.w  #$800,d1
dloop2: subi    #1,d1
        bne     dloop2
        rts
Part of my MQTT display alarm thingy
#include <ESP8266WiFi.h>
#include <PubSubClient.h>
#include <Wire.h> 
#include <LiquidCrystal_I2C.h>  
LiquidCrystal_I2C lcd(0x27, 20, 4);
const char* ssid = "MYACCESSPOINT";
const char* password = "MYPASSWORD";
const char* mqtt_server = "mymqttserver";
const byte ledRed = 12;
const byte horn = 13;
int button = 2;
int press = 0;
boolean buttonToggle = true;


// Todo : DISPLAY 2ND LINE, DISPLAY SILENT, ...

WiFiClient espClient;
PubSubClient client(espClient);
bool toggle = false;
void setup_wifi() {
  delay(100);

  Serial.print("Connecting to ");
  Serial.println(ssid);
  WiFi.begin(ssid, password);
  while (WiFi.status() != WL_CONNECTED)
  {
    delay(500);
    Serial.print(".");
  }
  randomSeed(micros());
  Serial.println("");
  Serial.println("WiFi connected");
  Serial.println("IP address: ");
  Serial.println(WiFi.localIP());
}

void callback(char* topic, byte* payload, unsigned int length)
{
  if (length > 0) {
    toggle = true;
  }

  if (length == 0) {
    toggle = false;
  }

  Serial.print("Command from MQTT broker is : [");
  Serial.print(topic);

  Serial.println();
  Serial.print(" publish data is:");
  lcd.clear();
  lcd.backlight(); // turn off backlight

  {
  
    for (int i = 0; i < length; i++)
    {
      Serial.print((char)payload[i]);
      if (i < 16){
      lcd.setCursor(0, 0);
      lcd.setCursor(i, 0);
      } else {
      lcd.setCursor(0, 1);
      lcd.setCursor(i-16, 1);
      }
      lcd.write((char)payload[i]);
    }
  }


  Serial.println();
} 

void reconnect() {
  
  while (!client.connected())
  {
    Serial.print("Attempting MQTT connection...");
    
    String clientId = "mqttlcd";
    clientId += String(random(0xffff), HEX);

    if (client.connect(clientId.c_str()))
    {
      Serial.println("connected");

      client.subscribe("mqttlcd/message");
    } else {
      Serial.print("failed, rc=");
      Serial.print(client.state());
      Serial.println(" try again in 5 seconds");
      delay(6000);
    }
  }
} 

void setup() {
  Serial.begin(115200);
  pinMode(button, INPUT);
  digitalWrite(2, HIGH);
  pinMode(ledRed, OUTPUT);
  digitalWrite(ledRed, LOW);
  pinMode(horn, OUTPUT);
  digitalWrite(horn, LOW);
  setup_wifi();
  client.setServer(mqtt_server, 1883);
  lcd.init(); 
  lcd.backlight();
}

void loop() {

  
  if (!client.connected()) {
    reconnect();
  }
  if (toggle == true) {
    digitalWrite(ledRed, HIGH);
    digitalWrite(horn, HIGH);
    delay(200);
    digitalWrite(ledRed, LOW);
    digitalWrite(horn, LOW);
    delay(200);
  }
  if (toggle == false) {
    digitalWrite(ledRed, LOW);
    digitalWrite(horn, LOW);

  }

  client.setCallback(callback);
  client.loop();

  press = digitalRead(button);
  if (press == LOW)
  {
    if (buttonToggle)
    {
      digitalWrite(ledRed, HIGH);
      digitalWrite(horn, HIGH);
      buttonToggle = !buttonToggle;
    }
    else
    {
      digitalWrite(ledRed, LOW); 
      digitalWrite(horn, LOW);
      buttonToggle = !buttonToggle;
      toggle = false;
      client.publish("mqttlcd/button","pressed");
      lcd.clear();
      lcd.noBacklight(); // turn off backlight
    }
  }
  delay(500);  //delay for debounce
}

Oled

There are several oled displays, mostly controllable with i2c but some of them are SPI

SSD1306 – I2c connected

Using a wemos – Octoprint project for example
Octoprint (Note: this is NOT a multicolor display 1/4 of the display is yellow. )
My notification watch. Runs on a ESP12F connects to Wifi, has a piezo sound element
Using a raspberry (Part of my Lab Sensors Project)
pip3 install adafruit-circuitpython-ssd1306
git clone https://github.com/adafruit/Adafruit_Python_SSD1306 (old)
Edit file - comment SPI section

Some arduino’s have embedded displays like those i’ve used for a Lora project.

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.

My nextion domoticz box, tilt to wakeup
Domoticz controller

My biltong box using a Nextion

Raspberry displays

 3.5inch RPi Display – 480×320 Pixel – XPT2046 Touch Controller
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 .

inmp441 digital microphone

Using OSB to record screens

Last Updated or created 2022-11-02

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:

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)
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

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