Tag Archives: retro

Multiple computer systems in a carrying case.

Test picture of a multiprocessor computer setup.
Using buttons on the right, I want the possibility to change between systems and keyboard settings.
Also, multiple software/OS slots for SDCards will be on the right.

Mockup using a laptop display (eeepc) a bought display controller and a pi2 with Faux86

The lid containing the keyboard has a handle!

After laser cutting a nice front, it could become a nice road warrior hacking station.

I’m going to replace the wireless keyboard, probably with a touch display and a programmable layout for keyboards.
Something like below

Some layouts:

I’ll probably buy this one from waveshare

Info about Faux86

  • 8086/8088, V20, 80186 and limited 286 instruction set.
  • Configurable CPU speeds from 5Mhz up to 100Mhz.
  • Custom Hardware BIOS’s supported.
  • Supports bootable disk images in .img and .raw file format.
  • CGA / EGA / VGA Colour Video emulation, with most modes supported.
  • PC Speaker, Adlib, Soundblaster and Disney SoundSource.
  • UART Com Ports.
  • Standard PC XT Keyboard.
  • Serial Port 2-Button mouse.

C64 code re-learning stuff

Re-learning the little I knew (I never had a c64 as a kid).
Back to basics, welll machine code I mean.

Programming a little demo using acme.
Split screen bitmap and text mode plus sid music

Running a little demo in retrodebugger (missing the sid music in the recording)

Some useful commands

; Dump prg with offset 0x800 per byte and skip 00 00 lines
xxd -o 0x800 -g1 icecrew.prg | uniq -f10

; Write symbol list
acme -l icecrew.sym icecrew.asm

; png to kla (koala picture)
retropixels icecrew.png -o icecrew.kla

; relocate a sid address
sidreloc -r org.sid new.sid

Below code has some flaws:

Many empty gaps, creating a large file.
Exomizer could fix this, but better memory management should be the better solution.
The Koala file has many 0 bytes, the logo is small but the file is created for a full screen image.

Part of the program see $1000 of start of SID music


!cpu 6502
!to "icecrew1.prg",cbm

; Standard basic sys runner
basic_address   = $0801

; sid addresses
; address moved using 
; sidreloc -r Lameness_Since_1991.sid lame.sid
; addresses found using
;sidplay2 -v lame.sid 
;+------------------------------------------------------+
;|   SIDPLAY - Music Player and C64 SID Chip Emulator   |
;|          Sidplay V2.0.9, Libsidplay V2.1.1           |
;+------------------------------------------------------+
;| Title        : Lameness Since 1991                   |
;| Author       : Peter Siekmann (Devilock)             |
;| Released     : 2017 Oxyron                           |
;+------------------------------------------------------+
;| File format  : PlaySID one-file format (PSID)        |
;| Filename(s)  : lame.sid                              |
;| Condition    : No errors                             |
;| Playlist     : 1/1 (tune 1/1[1])                     |
;| Song Speed   : 50 Hz VBI (PAL)                       |
;| Song Length  : UNKNOWN                               |
;+------------------------------------------------------+
;| Addresses    : DRIVER = $1C00-$1CFF, INIT = $0FFF    |
;|              : LOAD   = $0FFF-$1B25, PLAY = $1003    |
;| SID Details  : Filter = Yes, Model = 8580            |
;| Environment  : Real C64                              |
;+------------------------------------------------------+
;
sid_address     = $0fff
sid_play        = $1003
sid_init        = $0fff
; Character 
char_address    = $3800
screen_mem      = $4400
; Koala address
bitmap_address  = $6000
bitmap_data     = $7f40
bitmap_color    = $8328
bitmap_bgcolor  = $8710
program_address = $c000
color_mem       = $d800

reg_d011	= $D011
; VIC register
;Bit 7 (weight 128) is the most significant bit of the VIC's nine-bit raster register (see address 53266).
;Bit 6 controls extended color mode
;Bit 5 selects either the text screen ("0") or high resolution graphics ("1").
;Bit 4 controls whether the screen area is visible or not.
;Bit 3 selects 25 (when set to "1") or 24 (when set to "0") visible character lines on the text screen.
;Bit 0–2 is used for vertical pixel-by-pixel scrolling of the text or high resolution graphics.

; Rom routine to clear screen ( slow ! )
; Better to do this yourself
clear_screen     = $e544

* = sid_address
    !bin "lame.sid",,$7c+2

; standard charset
* = char_address
    !bin "charset.chr"

; drawn with gimp converted using retropixel
; retropixels icecrew.png -o icecrew.kla
* = bitmap_address
    !bin "icecrew.kla",,$02

; sys 49152
* = basic_address
    !byte $0d,$08,$dc,$07,$9e,$20,$34,$39,$31,$35,$32,$00,$00,$00

* = program_address
    sei
    ; init
    lda #$00
    tax
    tay
    jsr sid_init
    jsr clear_screen
    jsr load_bitmap
    jsr init_text
    ldy #$7f
    sty $dc0d
    sty $dd0d
    lda $dc0d
    lda $dd0d
    lda #$01
    sta $d01a
    lda reg_d011
    and #$7f
    sta reg_d011
; move interrupt vector to bitmap
    lda #<interruptbitmap
    ldx #>interruptbitmap
    sta $314    ; Low Address part IRQ vector
    stx $315    ; High Address part IQR vector
    ldy #$1b
    sty reg_d011
    lda #$7f
    sta $dc0d
    lda #$01
    sta $d01a
; trigger interrupt at rasterline 0
    lda #$00
    sta $d012
    cli
    jmp *

interruptbitmap
    inc $d019
; trigger interrupt at rasterline 128
    lda #$80
    sta $d012
    lda #<interrupttxt
    ldx #>interrupttxt
    sta $314
    stx $315
    jsr bitmap_mode
    jmp $ea81

interrupttxt
; ack IRQ
    inc $d019
; IRQ at line 0
    lda #$00
    sta $d012
    lda #<interruptbitmap
    ldx #>interruptbitmap
    sta $314
    stx $315
    jsr text_mode
    jsr sid_play
    jmp $ea81

bitmap_mode
; bitmap graphics multicolor
    lda #$3b
    sta reg_d011
    lda #$18
    sta $d016
; switch to video bank 2 ($4000-$7FFF)
    lda $dd00
    and #$fc
    ora #$02
    sta $dd00
    lda #$18
    sta $d018
    rts

text_mode
; set text mode hires
    lda #$1b
    sta reg_d011
    lda #$08
    sta $d016
; switch to video bank 1 ($0000-$3FFF)
    lda $dd00
    and #$fc
    ora #$03
    sta $dd00
; set charset location
; 7 * 2048 = $3800, set in bits 1-3 of $d018
    lda $d018
    ora #$0e
    sta $d018
    rts

load_bitmap
    lda bitmap_bgcolor
    sta $d020
    sta $d021
    ldx #$00
copy_bmp
; screen memory
    lda bitmap_data,x
    sta screen_mem,x
    lda bitmap_data+256,x
    sta screen_mem+256,x
    lda bitmap_data+512,x
    sta screen_mem+512,x
    lda bitmap_data+768,x
    sta screen_mem+768,x
; color memory
    lda bitmap_color,x
    sta color_mem,x
    lda bitmap_color+256,x
    sta color_mem+256,x
    lda bitmap_color+512,x
    sta color_mem+512,x
    lda bitmap_color+768,x
    sta color_mem+768,x
    inx
    bne copy_bmp
    rts

init_text
    ldx #$00
copy_txt
    lda text1,x
    sta $0400+520,x
    lda text2,x
    sta $0400+640,x
    lda text3,x
    sta $0400+640+120,x
    lda #$06
    sta color_mem+520,x
    lda #$0e
    sta color_mem+640,x
    lda #$0e
    sta color_mem+640+120,x
    inx
    cpx #$28
    bne copy_txt
    rts


text1
    !scr  "     back to oldskool demos in 2024     "
text2
    !scr  "   greetings to bigred & tyrone & edk   "
text3
    !scr  "     a lot to relearn - keep coding!    "

C64 Multipart Loader

Today I tested part loading for a demo.

I wanted this to be a multipart loader, instead of a trackloader.
A trackloader can load sector parts which I would like more.
But the C64Pico can’t do disk images. (Mcume)

C64Pico based on MCUME see building of this in other posts.

2nd reason: While I’ve written a track loader for 8086, I never did it for C64. As a kid I didn’t have a C64, so all knowledge I have is from later years.
I’ve written only a few C64 machinecode programs.

See below explanation of what happens
  • Showing makefile
  • Showing first part assembly (without text Hello 2nd part)
  • Showing second part (no sysheader) needs to be loaded at $2000
  • Compile using Acme
  • make disk image
  • and run using autostart x64 (Vice emulator)

You see the first text from the 1st assemby code, then it will load the second at $2000 and does a jmp to this address.
Second text will but displayed.

While i’ve been using KickAss in the past and some other 6502 compilers, I manly use acme.

Makefile I created to compile, create a C64 diskimage and run the program is as below. (No exomizer tools in this Makefile)

all: acme disk run

acme:
	acme testloader.asm
	acme 2ndpart.asm

disk:
	c1541 -format diskname,id d64 my_diskimage.d64 -attach my_diskimage.d64 -write loader.prg loader.prg -write 2nd 2nd

run:
	x64 my_diskimage.d64 

C64Pico part 3

Today we worked on this project again. (Bigred and me)

There were some problems we needed to fix since last time:

  • It was quite hard to get the correct parts.
    Our display connector was only fitted with connection pins on the wrong side of the connector. (up/down)
    So I bought a connector with both positions populated.
    So we had to replace this hard to solder (40 pin) connector.
  • It was not clear what the orientation should be of the atmega328pb.
    We looked at the pinout, and followed the VCC/GND. But these are also available of the opposite side of the chip. (We missed that)
    Later, we saw a tiny line on the PCB, which showed the pin 1 placement.
    So we had to remove and replace the chip.
    When turning on the power, (with incorrect placement) probably fried R5 (10k resistor), on both our boards.
    Had to replace those also.
  • Programming the atmega328pb was not easy, see below fixes.
  • Compiling the pico firmware resulted in a black screen.
    Below the fixes I had to make to get the screen working.

Other things still to fix.

  • Bigreds screen.
  • atmega328p didn’t work for Bigred, so probably needs to replace with the pb version.
  • My battery controller is not charging.
    See bottom of page
  • Some of my buttons are working. The pewpew and some of the cursor keys (not as I expect, there are some up/down issues)
    And none of the other keys are working.

Some other things we noticed.

  • sdcard: remove partitions, format using mkfs.exfat
    Create a c64 directory on this filesystem where you can put the d64 files!
  • 0402 SMD is far too small for me.
    There is enough room on the board to use 0805 for example.
    Even THT is possible, there are only a few components.
  • Some components are TOO close together, removing a component resulted in other small parts disconnecting also.

My friend Bigred said: If I can see it, I can solder it.
But it is not easy. This probably keeps a lot of people from building it!

Below the diff from the source we got from:

https://github.com/silvervest/MCUME/tree/c64pico

UPDATE 20240501: We needed to clone the c64pico branch!

git clone -b c64pico https://github.com/silvervest/MCUME.git

Then it worked with the screen and keyboard!

Programming the atmega328pb using usbasp

https://www.henriaanstoot.nl/2022/06/30/morse-with-a-attiny85/
Link above shows the programmer.

To get your Arduino IDE up and running

  • Open the Arduino IDE.
  • Open the File > Preferences menu item.
  • Enter the following URL in Additional Boards Manager URLs:https://mcudude.github.io/MiniCore/package_MCUdude_MiniCore_index.json
  • Open the Tools > Board > Boards Manager… menu item.
  • Wait for the platform indexes to finish downloading.
  • Scroll down until you see the MiniCore entry and click on it.
  • Click Install.
  • After installation is complete close the Boards Manager window.

Above settings worked for me, maybe you can also try Programmer: usbasp (slow)

First install the bootloader.

When compiling the keyboard program of silvervest, you can find “Upload using programmer” in the Sketch menu!
(https://github.com/silvervest/c64pico/tree/master/keyboard)

CHARGING using BQ24230RGTT

Maybe I’ve got a problem with the ground plating of the charger.
Also very hard to solder the sides!

Amiga week

This week (while preparing for a mini retro party) I fixed some Amiga stuff.

I’ve bought a new gadget.

You place this PCB between the CPU IC socket and the CPU (68000) itself.

Now running a special floppy image, which loads a driver, I can use the 512MB sdcard as “harddisk”.

It at first ran into all kinds of hangups.
Checking everything, I found CIAB (8520) the culprit.
Timing errors I’ve never noticed before!

Switching this one with CIAA resolved the problem.
(I don’t use a printer anyway, but I have to remember that anything using the parallel port can have problems now.)

Meanwhile, I wanted to have a better control over the Amiga drives, so I’m planning to use a second switch to reassign drive numbers using a switch.

For switching Internal/External drive (df0/df1) I was using a Gotek boot switch. (Just press 3x ctrl-Amiga-Amiga)

See https://www.henriaanstoot.nl/2022/05/14/gotek-stuff/

But I have TWO external devices.
The Gotek virtual disk device and a real 5.24″ drive.

So I’m going to use a ON-ON double switch to toggle the external devices.

oppo_32

The internal switch toggles internal and external.
The secondary I’m going to build into the 5.25″ drive toggles df2 and the “df1”.
That way the internal drive can be 0 (boot) or 1.
The external drives can be 0,1 or 2.

NOTE: Switch pin 21 and 9 using the cross switch!

SO: Amiga with internal drive -> External 5.24″ which has a passthrough to the Gotek.

Another amiga thing fixed:
I re-installed Aros (on an old Laptop this time)

And third: I’ve bought the Amiga Forever cdrom.

When you get the ISO image from AmigaForever, and want to run it using Linux, do this to get it working

sudo apt install xkbfile1:i386
sudo apt install libxkbfile1:i386
mkdir -p /cdrom
sudo mount -t iso9660 ~/Downloads/AF.iso /cdrom
cd /cdrom/Private/Linux/e-uae/
./kxlight-start.sh

If you install Wine, you can use the windows gui in linux also.


Amiga samplers

Testing the sampler (demo for Tyrone)

Sampling the sound of a C64 on an Amiga.
Started (booted) the sampling program from second external drive using switch setup as above.

Even realtime echo works!

Amiga Action Replay

A long time ago I had an Action Replay II.

I modded it and was planning to rebuild this using pluggable eurocard-prints.
Then it got lost, somewhere.

Today I went to Almelo with Tyrone.
In the morning reverse engineering a lift controller print, and afternoon going to a guy selling a lot of Retro stuff.

And there it was, an Action Replay II for Amiga just catching dust.

I had to buy it, and got a sh*tload of 27256 Eproms for free!

Action Replay Mk I

This version is compatible with the A500/A1000 version only. It also plugs into the side expansion port. It introduces the following features:

1.0 Version

  • Shows and modifies registers (even read-only ones) and memory contents.
  • Trainer maker.
  • M68000 assembler / disassembler.
  • Copper assembler / disassembler.
  • Sprite editor.
  • Virus detector.
  • Picture / music (tracker format) / sample ripper.
  • Save computer memory (freezed programs) to disk.
  • Shows computer status (disk parameters, ChipRAM, FastRAM…).

Features added to the 1.5 Version

  • Mempeeker.
  • Ability to save freezed programs to RAM.
  • RAM testing.
  • Illegal opcode – jumps to freezer mode.

Action Replay Mk II

A special A2000 version is available for this particular revision. Instead of plugging into the side expansion port it plugs into the 86 pin CPU slot.

Features added since MK 1.5 version

  • Boot selector.
  • Picture editor.
  • Sound tracker.
  • Turbo fire manager (separately for both joysticks).
  • Disk encoder.
  • Start menu.
  • Disk monitor.
  • Integrated DOS commands (Dir, Format,…).
  • Diskcopy.
  • 80 characters display with two-way scrolling.
  • Calculator.
  • Notepad.
  • Memory and drive switch (enabling / disabling).
  • Music ripper now finds all tracker formats (SoundTracker, NoiseTracker, other formats with 32 samples).
  • Ripped music / pictures are saved in IFF format.

C64Pico Follow-up

Soldering almost done, except for the space bar all tactile buttons in place.

Using my USBasp programmer I tried to program the Atmega328pb.

Same one I used for:

I first needed to implement some udev rules to get the rights for the reader correct.

#/etc/udev/rules.d/99-usbasp.rules
SUBSYSTEM=="usb", ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="05dc", GROUP="dialout"

Next I tried to burn a bootloader.

Well, not as planned, back to the drawing board.

Hopefully I compiled at least the Pico part correctly.

Started working on C64Pico with Bigred

A week ago I got the last components delivered to my doorstep.

This project was made by Silvervest and it’s f*ckin awesome.

https://github.com/silvervest/c64pico

I was afraid to start this myself, SMD is on another level for me.
But my good friend Marco said … No problem!

So I ordered components online, which was not easy.
Selecting the correct parts, sizes and options.

These things are really really small

Using tweezers to place the components was even difficult.
The slippery tiny bastard got catapulted everywhere. (Or got stuck on fingers, soldering iron and alike)
Many small components got lost into the 7th dimension. Never to be found again.

Awesome to work on this together, but Marco said that I have to try it myself.
Welllll, I got 3/4 of the ATmega328PB-A perfectly soldered, then I notished that it was crooked.
Desoldering was a mess, and I heated the PCB TOO much with the heatgun.

My messed-up PCB, and f*cked-up IC. Leave it to the professionals.

Next step for me is soldering the 75 mini buttons!

Got a Trinitron display from him, I was looking for this for a long time.

A “new” sound chip for 6502

UPDATE: 20240225

I’ve written about General Instrument AY-3-8910 before, here is some work I did today.

This sound chip i wanted to implement in my amiga, and now it’s a alternative for my 6502 computer. ( As an alternative setup for the SID chip. )
Btw this is the same kind of chip used in the Atari ST.

A clean setup … I’ve got the sound chip and a Amplifier chip.

Above a Kicad drawing I made today, a little different from my design from the 90’s.

Below a movie clip I recorded today. Running a test setup using an Arduino nano and a sdcard reader.
The sound is bad, this is due to clipping and the absence of multiple resistors and capacitors.
Music is a register dump from a YM music file.
Amplifier is a bare LM386.

UPDATE: 20240225

I don’t like tying those three outputs together, and amplifying those.

So I’m going to use a LM324 i’ve got left from my 8085 interface, and make a 3-channel amplifier.

Something like this