Category Archives: Computer

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!

GLaBios and own code

Altered glabios to run code at F600:0000 instead of basic rom.
(Needs to have code to check if rom exists)

My test code and generating rom is below:
It should set leds on the keyboard to on .. we will see tomorrow.

NAME mycode
.model small
ORG 0h

.code
start:	mov al, 11000000b
        out 80h, al
loop1:  nop
	jmp loop1
ORG 1fffh ; end of rom
	db 0
END

makefile is:

@ECHO OFF
MASM /DARCH_TYPE="T" /DCPU_TYPE="V" MYROM;
LINK MYROM;
EXE2COM MYROM.EXE
REN MYROM.COM MYROM.ROM

That looks okay!

MOV AL = B0
C0 = 11000000
OUT = E6
80h = 80h
90 = NOP
EB = relative jump
FD = -3 to NOP instruction

Shelly Dimmer and NodeRed an update ..

Our bedroom has a shelly dimmer, this one is connected with a wall switch and is being controlled by Domoticz, Home Assistant and NodeRed.

I had to fix some stuff, so this was a perfect time to jot down some notes.

I’ve wired it up like this:
(I’ve got a Line wire in my ceiling socket, so i placed the module there instead of the wall socket)

Configure the Shelly as mentioned in the manual. After that do the following:
Advance > Developer settings :
(Enable CoIot if you want a easy auto detect for Home Assistant)
Enable MQTT (This will DISABLE cloud ! )
Server: the ip number of your Mqtt Broker

Next I did was:

Now the wall switch will change/toggle what the current state is.
(If the light is off, and you switch it on using Mqtt, you probably needed to hit the switch two times to turn it off again. Not so with this setting.)

My Nodered Flow ( Not using the Shelly palette nodes in this example)

The Mqtt IN node sets the state of the switch when you use the wall switch!
Cozy turns light on at a specific level.
The slider send an off command when 0% selected, else an on command and the sliders value.

# Cozy function
msg.payload = {};
msg.payload.turn="on";
msg.payload.brightness=30;
return msg;

# Slider function
var varlevel = msg.payload;
msg.payload = {};
if(varlevel == 0){ 
msg.payload.turn="off";
} else
{
    msg.payload.turn="on";
}
msg.payload.brightness=varlevel;
return msg;

DashBoard

The Flow

[
    {
        "id": "32d1c58277d38408",
        "type": "ui_switch",
        "z": "746c372deb597681",
        "name": "",
        "label": "Bedroom lights2",
        "tooltip": "",
        "group": "c387df0cfc06c60e",
        "order": 3,
        "width": 0,
        "height": 0,
        "passthru": false,
        "decouple": "true",
        "topic": "",
        "topicType": "str",
        "style": "",
        "onvalue": "on",
        "onvalueType": "str",
        "onicon": "",
        "oncolor": "",
        "offvalue": "off",
        "offvalueType": "str",
        "officon": "",
        "offcolor": "",
        "animate": true,
        "className": "",
        "x": 220,
        "y": 940,
        "wires": [
            [
                "df432d3faea35f38"
            ]
        ]
    },
    {
        "id": "fb12eddd50d3013e",
        "type": "ui_slider",
        "z": "746c372deb597681",
        "name": "",
        "label": "Bedroom Lights2",
        "tooltip": "",
        "group": "c387df0cfc06c60e",
        "order": 4,
        "width": 0,
        "height": 0,
        "passthru": true,
        "outs": "end",
        "topic": "",
        "topicType": "str",
        "min": 0,
        "max": "100",
        "step": 1,
        "className": "",
        "x": 230,
        "y": 900,
        "wires": [
            [
                "d9c299ec7c0c82b0"
            ]
        ]
    },
    {
        "id": "d9c299ec7c0c82b0",
        "type": "function",
        "z": "746c372deb597681",
        "name": "Get level",
        "func": "var varlevel = msg.payload;\nmsg.payload = {};\n\nif(varlevel == 0){ \nmsg.payload.turn=\"off\";\n} else\n{\n    msg.payload.turn=\"on\";\n}\n\nmsg.payload.brightness=varlevel;\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 460,
        "y": 900,
        "wires": [
            [
                "315ffbe441467c10"
            ]
        ]
    },
    {
        "id": "df432d3faea35f38",
        "type": "mqtt out",
        "z": "746c372deb597681",
        "name": "",
        "topic": "shellies/shellydimmer-CFE204/light/0/command",
        "qos": "",
        "retain": "",
        "respTopic": "",
        "contentType": "",
        "userProps": "",
        "correl": "",
        "expiry": "",
        "broker": "8c74c5f6.9a7a48",
        "x": 800,
        "y": 940,
        "wires": []
    },
    {
        "id": "315ffbe441467c10",
        "type": "mqtt out",
        "z": "746c372deb597681",
        "name": "",
        "topic": "shellies/shellydimmer-CFE204/light/0/set",
        "qos": "",
        "retain": "",
        "respTopic": "",
        "contentType": "",
        "userProps": "",
        "correl": "",
        "expiry": "",
        "broker": "8c74c5f6.9a7a48",
        "x": 780,
        "y": 900,
        "wires": []
    },
    {
        "id": "15f1c904607a0adc",
        "type": "function",
        "z": "746c372deb597681",
        "name": "Cozy",
        "func": "msg.payload = {};\n\nmsg.payload.turn=\"on\";\n\nmsg.payload.brightness=30;\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 450,
        "y": 860,
        "wires": [
            [
                "315ffbe441467c10"
            ]
        ]
    },
    {
        "id": "57fb1210d37e5325",
        "type": "ui_button",
        "z": "746c372deb597681",
        "name": "",
        "group": "c387df0cfc06c60e",
        "order": 5,
        "width": 0,
        "height": 0,
        "passthru": false,
        "label": "Bedroom lights2 Cozy",
        "tooltip": "",
        "color": "",
        "bgcolor": "",
        "className": "",
        "icon": "",
        "payload": "",
        "payloadType": "str",
        "topic": "topic",
        "topicType": "msg",
        "x": 240,
        "y": 860,
        "wires": [
            [
                "15f1c904607a0adc"
            ]
        ]
    },
    {
        "id": "30cba96b08f3b830",
        "type": "mqtt in",
        "z": "746c372deb597681",
        "name": "",
        "topic": "shellies/shellydimmer-CFE204/light/0",
        "qos": "2",
        "datatype": "auto-detect",
        "broker": "8c74c5f6.9a7a48",
        "nl": false,
        "rap": true,
        "rh": 0,
        "inputs": 0,
        "x": 240,
        "y": 1000,
        "wires": [
            [
                "32d1c58277d38408"
            ]
        ]
    },
    {
        "id": "c387df0cfc06c60e",
        "type": "ui_group",
        "name": "Bedroom",
        "tab": "f177532a78f3f1d2",
        "order": 3,
        "disp": true,
        "width": "6",
        "collapse": true,
        "className": ""
    },
    {
        "id": "8c74c5f6.9a7a48",
        "type": "mqtt-broker",
        "name": "IPBROKER",
        "broker": "IPBROKER",
        "port": "1883",
        "clientid": "",
        "usetls": false,
        "compatmode": true,
        "keepalive": "15",
        "cleansession": true,
        "birthTopic": "",
        "birthQos": "0",
        "birthPayload": "",
        "closeTopic": "",
        "closePayload": "",
        "willTopic": "",
        "willQos": "0",
        "willPayload": ""
    },
    {
        "id": "f177532a78f3f1d2",
        "type": "ui_tab",
        "name": "House",
        "icon": "dashboard",
        "order": 1,
        "disabled": false,
        "hidden": false
    }
]

Bios hacking

Followup on :

I wrote a little python script which checks the checksum of a Bios.

In a previous post i used hexedit to play around changing a Bios dump.

Below posted python script calculates the checkum using the following:

Add all bytes in the file and do a modulo 256 on this number. The output should be 0.

My previous edit gave me a output of C2, so I changed an unused byte FF into (FF-C2) 3D.
No more checksum errors when booting!

Next to do, get a Bios like Glabios or PcXtBios to start my own code from a secondary Eeprom.

import sys

# Bios sum modulo should be 0
# edit  last or unused byte to fix
# python bios-checksum-test.py MYROM.edit.checksum
# 0

f = open(sys.argv[1],'rb')
m = f.read()
print  '%x' % ( ( sum(ord(c) for c in m) & 0xFFFFFFFF ) % 256 )

Python3

import sys

# Bios sum modulo should be 0
# edit  last or unused byte to fix
# python bios-checksum-test.py MYROM.edit.checksum
# 0

f = open(sys.argv[1],'rb')
m = f.read()
checksum =  ( ( sum((c) for c in m) & 0xFFFFFFFF ) % 256 )
print(checksum, 'in hex =', hex(checksum))

Spotify control using python

For usage in this project:

Goto https://developers.spotify.com and add a APP

Write down the Client_id Client_secret and Redirect URL (callback)

Create a bash and python script

#!/bin/bash
export SPOTIPY_CLIENT_ID=2f660e11e70743febdxxxxxxxxxxxxx
export SPOTIPY_CLIENT_SECRET=b0741452a4fe43xxxxxxxxxxxxx
export SPOTIPY_REDIRECT_URI="http://localhost:8080/callback"

python3 spot.py $1

spot.py

import spotipy
from spotipy.oauth2 import SpotifyOAuth
from pprint import pprint
from time import sleep
import spotipy.util as util
import sys

username = "username"
scope = "user-read-playback-state,user-modify-playback-state,playlist-read-private"
util.prompt_for_user_token(username,scope,client_id=SPOTIPY_CLIENT_ID,client_secret=SPOTIPY_CLIENT_SECRET,redirect_uri=SPOTIPY_REDIRECT_URI)

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

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

myurl = 'spotify:playlist:' + sys.argv[1]

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

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

playlists = sp.user_playlists(username)

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

Run bash script as follows.

playlistplayspotify.sh 0bJvpsn0TDxxxxxxxxxxxx
(0bJvpsn0TDxxxxxxxxxxxx – is playlist ID, as example below)

OUTPUT:

python3 spot.py 0bJvpsn0TDxxxxxxxxxxxx
{'devices': [{'id': 'e86eada2a91e29a396acxxxxxxxxxxxxxxxxxxxx',
              'is_active': True,
              'is_private_session': False,
              'is_restricted': False,
              'name': 'laptop',
              'type': 'Computer',
              'volume_percent': 100},
             {'id': '8571468b6c41973ccb0axxxxxxxxxxxxxxxxxxxx',
              'is_active': False,
              'is_private_session': False,
              'is_restricted': False,
              'name': 'DESKTOP-xxxxxxx',
              'type': 'Computer',
              'volume_percent': 76},
             {'id': '6c592503aa5a22b2fbdxxxxxxxxxxxxxxxxxxxxxx',
              'is_active': False,
              'is_private_session': False,
              'is_restricted': False,
              'name': 'TX-NR1030',
              'type': 'AVR',
              'volume_percent': 41}]}
0bJvpsn0TDxxxxxxxxxxxx Best Classical Music Of All Time
5aL9jeGMCAxxxxxxxxxxxx Programming music
37i9dQZEVCxxxxxxxxxxxx Discover Weekly
6pEJuA1UYJxxxxxxxxxxxx Highland/Small/Border Pipe Music
5p8Tabf5Zwxxxxxxxxxxxx Folk Instrumentals ( Celtic, Irish, Nordic, ... )
1oy8Ek4ddBxxxxxxxxxxxx Lounge
37i9dQZF1Dxxxxxxxxxxxx Irish Folk
etc etc

Checking faulty chips/hardware

When I fix old hardware I often use a flir camera.

My brother gave me his CAT S60 mobile phone. Which has a flir camera, he used it when he was a voluntary fireman.

Forward-looking infrared (FLIR) cameras, typically used on military and civilian aircraft, use a thermographic camera that senses infrared radiation

Soo .. when testing hardware. I do the following.

  • Clean the motherboard
  • Check chip pins
  • Press all chips/ic’s in their sockets
  • Test the power supply disconnected. ( Most will give a higher voltage when nothing is connected )
  • Measure the resistance of the board (sometimes)
  • Check if the machine can be started.

Now it gets interesting. Sometimes nothing happens. Sometimes the machine runs like it suppose to do.

But old hardware can be faulty or connections are bad. IC’s run hot and they stop working. ( Untill they are cooled enough or they stop forever 🙁 )

So I start monitoring the temperature when I boot the machine. Sometimes components heat up very fast. I use my finger and the flir camera.

These are pictures from my 8088. Nothing runs hot

Old mystery motherboard and Bios hacking – followup

The board seems to be a X Golden Board, except for the missing logo on the motherboard.

Downloaded pcxtbios and compiled the eproms native in linux. So i don´t have to use dosbox any more.
https://github.com/virtualxt/pcxtbios

cd pcxtbios
edit make_linux.sh if needed
./make_linux.sh

and you should end up with
eproms/27512/basicfc.rom
eproms/27512/basicf8.rom
eproms/27512/basicf6.rom
eproms/27512/pcxtbios.rom
eproms/27512/basicfa.rom
eproms/27128/basicfc.rom
eproms/27128/basicf8.rom
eproms/27128/basicf6.rom
eproms/27128/pcxtbios.rom
eproms/27128/basicfa.rom
eproms/27256/basicfc.rom
eproms/27256/basicf8.rom
eproms/27256/basicf6.rom
eproms/27256/pcxtbios.rom
eproms/27256/basicfa.rom
eproms/ibmxt/u18.rom
eproms/ibmxt/u19.rom
eproms/2764/basicfc.rom
eproms/2764/basicf8.rom
eproms/2764/basicf6.rom
eproms/2764/pcxtbios.rom
eproms/2764/basicfa.rom

I didn’t have enough 28C64, but the 28C256 has the same pinout. It just lacks A14 and A13

So I flashed the compiled ROMs for basic to different Eeproms

minipro -w ./2764/basicfc.rom -p AT28C64
minipro -w ./2764/basicf6.rom -p AT28C64
minipro -w ./27256/basicfa.rom -p AT28C256
minipro -w ./27256/basicf8.rom -p AT28C256

These roms need to be placed in sockets ROM6,5,4,3

ROM7 (BIOS)fe00:0-ffff:ffff
ROM6 Basicfc00:0000-fdff:ffff
ROM5 Basicfa00:0000-fbff:ffff
ROM4 Basicf800:0000-f9ff:ffff
ROM3 Basicf600:0000-f7ff:ffff

Machine Code monitor/editor

I tried to find a machine code monitor for 8088 rom, but did not have any luck there.

I tried mumon88, but that didn´t work.

PCem and bootdisks.

PCem (short for PC Emulator) is an IBM PC emulator for Windows and Linux that specializes in running old operating systems and software that are designed for IBM PC compatibles. Originally developed as an IBM PC XT emulator, it later added support for other IBM PC compatible computers as well.

The big difference with PCem and Dosbox is the fact that you can configure many systems from 8088 to pentium, soundcards and graphic cards (like hercules, CGA, EGA VGA and alike)
You won’t start in MS-DOS, you can boot from a virtual floppy, just what i needed!

Update : Typing boot disk.img in dosbox works

I’ve installed PCem using:

cd pcem/
sudo apt-get install libsdl2-dev
sudo apt-get install libopenal-dev
tar xzvf ../PCemV17Linux.tar.gz 
./configure 
make clean
make
# first start (complains about roms, but creates ~/.pcem/...
./pcem 
cd ~/.pcem/roms
# git clone roms
git clone https://github.com/BaRRaKudaRain/PCem-ROMs.git
mv PCem-ROMs/* ./
rm -rf PCem-ROMs

Below a simple example, booting a floppy with a custom made bootsector.
I’m still searching for our bootblock demo, which uses VGA graphics and a music loader using Soundblaster.
We made this around the 90’s, and i have never seen a demo then booting a demo without dos.
Scrollers, music, starfields etc.

NOTE: Dos calls can’t be used, that’s not loaded. So NO int 21h software functions!

Running a bootblock program, there is NO ms-dos being loaded.

The disk image I created using my real original 5.25″ floppy, and converted this with my Fluxengine.

One of the other bootblock thingy’s I made, An amiga guru meditation error. (below a old capture)
When a corrupted disk or faulty software was booted using a amiga you often could see an error like this, now you could have it on you PC!

Original screen capture of a Guru Meditation.
You can see, mine is a little different, because of the font spacing and color.

PCem info

Systems / motherboards emulated :
8088

    AMI XT clone
    Atari PC3
    Compaq Portable Plus
    DTK Clone XT
    (c)Anonymous Generic Turbo XT BIOS
    IBM PC
    IBM PCjr
    IBM XT
    Juko XT clone
    NCR PC4i
    Phoenix XT clone
    Schneider Euro PC
    Tandy 1000
    Tandy 1000HX
    Thomson TO16 PC
    Toshiba T1000
    VTech Laser Turbo XT
    Zenith Data SupersPort
    Xi8088

8086

    Amstrad PC1512
    Amstrad PC1640
    Amstrad PC2086
    Amstrad PC3086
    Amstrad PC5086
    Amstrad PPC512/640
    Compaq Deskpro
    Olivetti M24
    Sinclair PC200/Amstrad PC20
    Tandy 1000SL/2
    Toshiba T1200
    VTech Laser XT3

286

    AMI 286 clone
    Award 286 clone
    Bull Micral 45
    Commodore PC30-III
    Compaq Portable II
    Dell System 200
    Epson PC AX
    Epson PC AX2e
    GW-286CT GEAR
    IBM AT
    IBM PS/1 Model 2011
    IBM PS/2 Model 30-286
    IBM PS/2 Model 50
    IBM XT Model 286
    Samsung SPC-4200P
    Samsung SPC-4216P
    Toshiba T3100e
    Tulip AT Compact

386SX

    Acermate 386SX/25N
    AMI 386SX clone
    Amstrad MegaPC
    DTK 386SX clone
    Epson PC AX3
    IBM PS/1 Model 2121
    IBM PS/2 Model 55SX
    KMX-C-02
    Packard Bell Legend 300SX
    Samsung SPC-6033P

386DX

    AMI 386DX clone
    Compaq Deskpro 386
    IBM PS/2 Model 70 (type 3)
    IBM PS/2 Model 80
    MR 386DX clone
    Samsung SPC-6000A

486

    AMI 486 clone
    AMI WinBIOS 486 clone
    Award SiS 496/497
    Elonex PC-425X
    IBM PS/2 Model 70 (type 4)
    Packard Bell PB410A

Socket 4/5/7 (Pentium)

    ASUS P/I-P55TVP4
    ASUS P/I-P55T2P4
    Award 430VX PCI
    Epox P55-VA
    Intel Advanced/EV (Endeavor)
    Intel Advanced/ZP (Zappa)
    Intel Premiere/PCI (Batman's Revenge)
    Packard Bell PB520R (Robin LC)
    Packard Bell PB570 (Hillary)

Super Socket 7 (K6-2/III)

    FIC VA-503+

Socket 8 (Pentium Pro)

    Intel VS440FX

Slot 1 (Pentium II)

    Gigabyte GA-686BX

Graphics cards emulated :

    3DFX Voodoo Graphics
    3DFX Voodoo 2
    ATI Graphics Pro Turbo (Mach64 GX)
    ATI Video Xpression (Mach64 VT2)
    ATI VGA Edge-16 (ATI-18800)
    ATI VGA Charger (ATI-28800)
    CGA
    Cirrus Logic CL-GD5429
    Cirrus Logic CL-GD5430
    Cirrus Logic CL-GD5434
    Compaq CGA
    Diamond Stealth 32 (Tseng ET4000/w32p)
    Diamond Stealth 3D 2000 (S3 ViRGE/325)
    Hercules
    Hercules InColor
    IBM EGA
    IBM VGA
    MDA
    MDSI Genius
    Number Nine 9FX (S3 Trio64)
    OAK OTI-037
    OAK OTI-067
    Olivetti GO481 (Paradise PVGA1A)
    Paradise Bahamas 64 (S3 Vision864)
    Phoenix S3 Trio32
    Phoenix S3 Trio64
    Plantronics ColorPlus
    S3 ViRGE/DX
    Sigma Color 400
    Trident TVGA8900D
    Trident TGUI9400CXi
    Trident TGUI9440
    Trigem Korean VGA (Tseng ET4000AX)
    Tseng ET4000AX
    Wsye 700

Sound cards emulated :

    AdLib
    AdLib Gold
    Ensoniq AudioPCI
    GameBlaster
    Gravis UltraSound
    Sound Blaster v1.0
    Sound Blaster v1.5
    Sound Blaster MCV
    Sound Blaster v2.0
    Sound Blaster Pro v1
    Sound Blaster Pro v2
    Sound Blaster Pro MCV
    Sound Blaster 16
    Sound Blaster AWE32
    Sound Blaster PCI128
    Windows Sound System

Old mystery motherboard and Bios hacking

When selling a large part of my computer collection I kept a few odd pieces.

Amongst those was a 8088 DIY machine.

It is a 50PTX3 motherboard with a 8088 compatible CPU

  • Power light (Not LED) and connected to power adaptor, not motherboard
  • Reset button??? not connected
  • Power switch
  • Mid center, 5v gnd and 12v
  • 5.25″ drive not connected
Bottom

Tested the power adapter first, a nice 5V and 12V.
Then I plugged the power in the Motherboard add plugged a test ISA card in the slot.
After turning the machine on I saw the Address leds flashing

A NEC D70108C from 1984, which is 8088 pin compatible with Intel 8088 but faster, and has some extra functionality.
The empty socket is for the 8087 Co-processor.

Nec V20 versus 8088

Everything pretty dirty

Rom 2764 (8Kb) and a disconnected speaker wire.

Adding an 8bit Isa hercules/CGA card.

It starts! .. But there is no Floppy controller (yet)

I’ve dumped the Bios to a file and used a hexeditor to play around.
So that’s why there is a bad checksum.

Installing a ZIF socket (Zero Insertion Force) to make things easier to modify.

Burned GlaBios on the Eprom and now I can continue to play around.

So why? Why this all ..

I want to play around with old 8088 assembly code again, but not as I did before using a Dos machine, but hardcoded into Eproms.
I’ve got 8 banks for ROMs and the source code for GlaBios is available.

In the past Edk and me wrote a boot demo, so it was not utilizing Ms-Dos functions. Maybe i can get some graphical and sound stuff working straight from the Bios.

Some commands:

# Dump the bios to file
minipro -w original.rom -p AT2764A@DIP28

xxd and hexdump to view the dump

I've used ghex to alter the ROM

# Write a new bios to a 28C64 (same Eeprom i've used for the C64 Cartridges)
minipro -w /home/henri/Downloads/MYROM -p AT28C64
 

GlaBios source code:
https://github.com/640-KB/GLaBIOS/blob/main/src/GLABIOS.ASM

I was planning to disassemble the Phoenix Bios, but it’s quite hard to differentiate between code and data, there are no named pointers and you have to interpret every line of code.

So GlaBios it is ..

First code to look at:

This is after the whole post reset.
There is a reset pointer at ffff:fffe
Which points to the bootstrap routine, which ends in below machine code.
I'm going to plug my own code over here.

(See the funny remark about Monster as being displayed in one of above pictures)

;----------------------------------------------------------------------------;
; INT 18 - Unbootable IPL
;----------------------------------------------------------------------------;
; Display a disk boot failure message and wait for a key to cold reboot.
;
; This may be re-vectored to ROM BASIC, if present.
;
; Size: 18 bytes
;----------------------------------------------------------------------------;
INT_18 PROC
		ASSUME DS:_BDA_ABS
	PRINT_SZ  BOOT_FAIL			; print boot failure string
	XOR	AX, AX				; AH = 0 (wait for key)
	MOV	DS, AX				; DS = 0000
	MOV	WARM_FLAG_ABS, AX			; do a cold boot
	INT	16H					; wait for key press
	JMP	BOOT					; reboot
INT_18 ENDP

BOOT ENDP

;----------------------------------------------------------------------------;
;
; END OF BIOS POST/BOOTSTRAP
;
;----------------------------------------------------------------------------;

		ASSUME DS:_BDA
STRINGS PROC
;----------------------------------------------------------------------------;
; Banner Strings
;
BANNER_STRINGS PROC

					IF POST_GLADOS EQ 1
BOOT_BEGIN		DB	CR, LF
			DB	'Starting GLaDOS...'
NL2_Z			DB	LF				; two NL's, null term'd
					ENDIF
NL_Z			DB	CR, LF, 0			; one NL, null term'd
BOOT_FAIL		DB	'Disk Boot Fail.'
			DB	' You monster.'
NL2_ANY_KEY		DB	LF
NL_ANY_KEY		DB	CR, LF
ANY_KEY		DB	'Press the Any Key'
			DB	'...'

Assembly stuff

I’ve got Dosbox installed on my machine.

git clone https://github.com/640-KB/GLaBIOS.git
I copied MASM.EXE and LINK.EXE in the GLaBios src directory.

edit make.bat

change
MASM GLABIOS;
into
MASM /DVER_DATE=”05/24/23″ /DARCH_TYPE=”T” /DCPU_TYPE=”V” GLABIOS;

start dosbox

mount c: /home/henri/projects/

c:

cd glabios/src

make.bat