Category Archives: Computer

XT-CF-Mini Bootable 8-bit ISA CF Card Interface – XT-IDE

Today I got this card (I bought it on Ebay)

It’s fitted with a 64Mb card. Note: the XT at my parents place had a 20Mb harddisk!

It can boot / emulate a harddisk with MsDos installed.

Replace an old or dead hard drive in a vintage PC with a hassle-free, reliable CompactFlash card!
Plug-in and go! (well, as much as you can expect with these old machines)

Brand new!
Built and tested.

Open Source!

This bootable expansion card provides a Compact Flash card interface to 8-bit ISA systems such as PC/XT. Typically paired with a 64MB or 1GB CF card. Silent, and more reliable than an old mechanical hard drive.

By default the XT-IDE BIOS comes configured for:
XT(and higher)-compatible BIOS.
Use the XT-CF-Mini’s IDE interface at 300h, no IRQ.
Boot first hard drive unless user presses A for floppy.
Any of the above can be changed with the simple DOS utility and built-in switches.

Switches and jumpers control:
I/O port for the 8-bit IDE (CF) interface
I/O port for the Option ROM
Option ROM Enable
Option ROM Write-protect

Note: Not all CF cards will work. Most work, but some don’t adhere to the CF standard fully, and won’t work. The full size XT-IDE card with an IDE>CF adapter, is compatible with more CF cards.

https://github.com/Bluelavasystems/XT-IDE-CF-MINI
XT-CF-Mini Pcb designed by Monotech Pc’s and released opensource GNU General Public License v3.0

It is from Blue Lava Systems, who took the schematics from Sergey Kiselev, who took the design from James Pearce.

The harddisk extension is XT-IDE Universal BIOS.
And can be flashed.

Schematic below

ROM address D0000, and IO port 300h does not need a IRQ

After installing this on my 8088/v20 motherboard I tested this with GlaBIOS, but it gave me one beep, and after that it woukd reset the machine.

Testing with the original Phoenix Bios and PCXtBios worked for me.

UPDATE: Bad contacts and a eeprom I didn’t trust.
Greg gave me version 0.2.5 of Glabios, which I burned to a new eeprom. And I cleaned some contacts.
(Checksum rom changed with every reset)

The Card and my extension bios both run with all bios-ses

Amstrad/Sinclair PC200 dualscreen

While doing some wood work, routing and painting. I managed to have some time to experiment with my PC200.

The Amstrad PC20 / Sinclair PC200 was a home computer created by Amstrad in late 1988. The machine was available in two versions, Sinclair PC200 and Amstrad PC20. (US/UK?)

In addition to MS-DOS 3.3 and PPC Organiser (a memory-resident suite of utilities), the PC20/PC200 was supplied with GEM. (I do not have those disks)
https://en.wikipedia.org/wiki/GEM_(desktop_environment)

The limited CGA graphical capabilities and PC speaker sound output were greatly inferior compared to other home computers of the time.
I has a modulator to connect a TV and could do hercules graphics on a sub-9 interface.

I got this computer a long time ago. (I still have to post pictures of my collection and getting them out of storage)

Info about this machine:

Build in 1988, Intel 8086 @ 8Mhz 512KB memory 3.5″ Floppy drive
TV Modulator Pal 640×200 CGA and Hercules

PC200

It still had a floppy in its drive, NIMMO Disk Juli 1992

Apparently this machine was used with a modem to do some interviewing for the University Amsterdam using Telepanel/Interview!

The ROM has several language options which you could set with dipswitches.

Debug part of ROM

Besides the machine having a “amiga” like case, it has two ISA slots behind a little trapdoor! How cool is that!

Dirty view of the ISA slots (One containing a RTC card)

Enabling only CGA on the machine and plugging in a Hercules card, you can do Multiscreen!
CGA and MDA addresses don’t conflict!
And if the ROM supports it .. dual screens baby!

Left Hercules and Right CGA

I used a debug command to fill the right screen

f b800:0 1000 ‘f a s h’

Cool little machine

Running old masm/precompiled machine code crashes. I’ll have to look into that.


433mhz sensors and Home Assistant

I’ve got a lot of wifi sensors in my home automation.
But also the ones i’ve started with.
The 433mhz temperature,pir and doorsensors.

These are all connected to Domoticz via a rfxcom gateway.

I’ve previously posted about previous setups.
https://www.henriaanstoot.nl/2022/11/03/home-assistant-and-433-dimmers/
https://www.henriaanstoot.nl/2022/11/17/domoticz-nodered-homeassistant-mqtt/

The setup i’ve ended up with is this:

Under hardware in domoticz install the mqtt broker.
Configure your mqtt server (mine is mosquitto)
Add devices to floorplans to send these to Mosquitto

Now i can see the topics in MQTTExplorer

Install the home assistant websocket palette in NodeRed

Configure the nodes like above

These are some example flows (I’ll put the function code below)

Above are the NAMED entities in Home Assistant

CODE

//Code for NR temperature filtering on domoticz IDX
//A door censor uses nvalue instead of svalue1
//Humidity can be svalue2
//Check the Mqtt payload in MQTTExplorer which to use!
var varidx = msg.payload.idx;
var varnvalue = msg.payload.svalue1;
if(varidx == 3108)
{
msg.payload = {};
msg.payload = varnvalue;
return msg;
}

Example of the trigger node.
When a temperature sensor battery dies, and no new data arrives- in 1 hour, I get a pushover warning. (use pushbullet/email/TV notification whatever you want)

Compilers (mainly machinecode)

A compiler is a program that converts instructions into a machine-code or lower-level form so that they can be read and executed by a computer.

Below are some machinecode compilers i’ve used.

FOR X86

Masm – Used this in Msdos
Need linker (link), can use macro’s
Most of my old stuff was written using masm

Tasm – Used this in Msdos
Need linker (tlink)
Some of my old stuff was written using Tasm (our boot demo was)

Fasm – Used this to compile for 8086/8088 under linux
Does not need linker, Open Source, Fast!, Written in fasm

Nasm – Used this for some machinecode under linux
Cross platform, can use Macro’s, Open Source

FOR 65xx

Acme – Multi-platform cross assembler for 6502/6510/65816 CPU
Used for my DIY 6502

CC65 – cc65 – complete cross development package for 65(C)02 systems
Used for my DIY 6502

Kickassembler – Java but works okay

Other compilers are for example the Arduino IDE or PlatformIO, which comes with AVR compilers. (Mostly C based)

FOR AMIGA

Seka – assembler

And a really old skool one i’ve used : PL/M-86 Compiler

I’m not sure i’ve used compilers for 8085/680x

Starfield in a bootloader (No OS)

Here is the starfield running from a bootblock loader (No MSDOS)

I threw my back out last week, so I could not move the old 8086 to a better place. I wanted to prepare this machine to boot from floppy disk.

The starfield above boots into VGA mode 13h (320×200 256 colors)

This one also has a Sound Blaster, so I can test music in a boot sector also!

My 8088 (v40) board has VGA also now.
I’m waiting for my ISA-PCMCIA card as replacement for a harddisk/floppy

Another logic probe

I’ve build a logic probe a while ago. (Mentioned here)

Today I got the EIStar LP-1. Its just a cheap easy probe, but does the job.
My version is only TTL and this one is TTL/CMOS (cmos is better when measuring arduino’s outputs)
TTL – Logic 1 = 4.75 -> 5V
CMOS – Logic 1 = more around the 3.3/3.7V

Only thing my version has which i’m missing is a pulse detector.
One millisecond puls gets clocked into a latch and keeps a led on.

Schematic I found (some similarities can be seen with my version)

From freeshell website

Creating a new bootloader for old code

UPDATE 20230721 Bootdemo

I found some parts of our (Edk and Me) bootloader demo.

It was compiled using masm or tasm.
Encountering a problem converting the code into a raw bin, to put on a floppy I diverted to another setup to try to get things working.

Using old code (below) and a example from YT, I made the following setup.

Visual studio code, with the x64 assembly plugin.
xxd as hexviewer.
fasm as assembler (This makes things easier, because it is a native Linux x86 compiler. So no need for dosbox anymore.)

I’ve created a Makefile to automate things.

clean:
        rm -f *obj
        rm -f *.bin

exec:
        fasm demo.asm
        fasm boot.asm
        cat boot.bin loadpart.bin > demo.bin 
        qemu-system-x86_64 -boot a -fda demo.bin 

Some of our old demo code:

;-------- snip
Start:
    JMP     SHORT BootHere
    NOP
    DB      "FASH-EDK"
    DW      512
    DB      2
    DW      1
    DB      2
    DW      0070h
    DW      02d0h       ;max. aantal sectoren van volume A
    DB      0Fdh        ;media descriptor
    DW      0002h       ;aantal sectoren per FAT
    DW      0009h       ;aantal sectoren per spoor
    DW      2
    DW      0
BootHere:
    mov     bp,5
tryboot:
    push bp
    mov     bx,4000h
    mov     es,bx
    mov     bx,0
    mov     cx,2        ;vanaf sector 2
    mov     dx,0        ;drive A, kant 0
    mov     ah,02h
    MOV     AL,8
    int     13h         ;sector(en) lezen
    pop     bp
    jnc     bootok
    dec     bp
    jnz     tryboot
bootok:
    mov     bp,5
;---------- snap

New setup using fasm (bootloader) boot.asm

    org 0x7c00                  ;  still not sure about this, have not found this in our demo

    mov bx, 0x1000              ; load sector address 
    mov es, bx                  
    mov bx, 0x0                 

; Sector read function
    mov dh, 0x0                 ; head 0
    mov dl, 0x0                 ; drive 0
    mov ch, 0x0                 ; cylinder 0
    mov cl, 0x02                ; start sector 

readdisk:
    mov ah, 0x02                ; read sec
    mov al, 0x02                ; demo is > 512 so 2 sectors
    int 0x13                    ; call bios

    mov ax, 0x1000
    mov ds, ax                  
    mov es, ax                     
jmpcode:
    jmp 0x1000:0x0              ; far jmp demo

; Expand bin to 512 byte sector
    times 510-($-$$) db 0       
    dw 0xaa55                   ; Sector header (ROM as this at the start)

Graphics demo i wrote a long time ago, converted into fasm loadpart.asm

	mov ah,0
        mov ax, 4f02h   ; Set VESA video mode
        mov bx, 10dh    ; Your video mode number
	int 10h
	mov al,0
drawall:
	mov dx,0
	mov cx,0

drawloop:
	mov ah,0ch
	mov bh,0
	push ax
	int 10h
	pop ax
	inc al
	inc cx
	cmp cx,319
	jc drawloop
	mov cx,0
	inc dx
	cmp dx,199
	jmp drawloop
jmp drawall

; complete sector with zeros
    times 512-($-$$) db 0   

Booting the demo in milli seconds using qemu.
Next to do: Write this to floppy and test on real hardware.

A reset starts the virtual machine and boots from a virtual floppy.
The drawing of the pixels is slow, because I used a int 10h function for every pixel, instead of writing to screen memory directly.

ndisasm – disassemble binary

ndisasm loadpart.bin 
00000000  B400              mov ah,0x0
00000002  B8024F            mov ax,0x4f02
00000005  BB0D01            mov bx,0x10d
00000008  CD10              int 0x10
0000000A  B000              mov al,0x0
0000000C  BA0000            mov dx,0x0
0000000F  B90000            mov cx,0x0
00000012  B40C              mov ah,0xc
00000014  B700              mov bh,0x0
00000016  50                push ax
00000017  CD10              int 0x10
00000019  58                pop ax
0000001A  FEC0              inc al
0000001C  41                inc cx
0000001D  81F93F01          cmp cx,0x13f
00000021  72EF              jc 0x12
00000023  B90000            mov cx,0x0
00000026  42                inc dx
00000027  81FAC700          cmp dx,0xc7
0000002B  EBE5              jmp short 0x12
0000002D  EBDD              jmp short 0xc
0000002F  0000              add [bx+si],al
00000031  0000              add [bx+si],al
00000033  0000              add [bx+si],al
00000035  0000              add [bx+si],al

UPDATE 20230721 Bootdemo update

Got a part working again in PCem.
This is from our bootdemo.
A scroller and sector loader in a bootsector.
Needed some include files
masm, link, exe2com creates a 12- sector sized floppy.
And we’ve got a (little distorted but working) Scroller in boot sector with custom font!

font:   db 64 dup (0)       ;space
        db 0,0,2,2,0,0,0,0  ;!
        db 0,2,2,2,2,0,0,0
        db 0,2,2,2,2,0,0,0
        db 0,2,2,2,2,0,0,0
        db 0,0,2,2,0,0,0,0
        db 0,0,2,2,0,0,0,0
        db 0,0,0,0,0,0,0,0
        db 0,0,2,2,0,0,0,0

Bios Extension boot and bootsector programs.

Followup on

Today two boot projects.
One using a bios extension, so it chip based.
Second is a floppy disk boot program. (Creating a test situation to get our old Boot floppy demo working. ( That one without using an operatingsystem like ms-dos.

Creating a Secondary Bios ROM

NAME mycode
.model small
ORG 0h

.code
	dw 0AA55h ;  Magic header your bios is looking for
	db 16     ; lenght of this rom in 512 bytes == 8k
	jmp short clear ; jmp to program

ORG 20h                 ; start of program
	
clear:  mov cx,10       ; clear, set keyboard led and print 10 # chars
	mov ah,0ah
	mov al,31h
	int 10h
	mov bh,0
	mov cx,1
start:	mov al, 11000000b
        out 80h, al
print:  mov cx,10
	mov ah,0ah
	mov al,"#"
	int 10h
loop1:  nop           ; loop until doomsday
	jmp loop1
	db -68        ; This makes the checksum 0
                      ; steps to take: edit source, make this byte entry 0
                      ; compile using make.bat in dosbox
                      ; check checksum using my python script
                      ; output was 68 hex 0x44
                      ; edit asm file place -68 to make the checksum 0x00 again
                      ; compile and burn to ROM
ORG 2000h             ; create end of rom 0000h-1fffh = 8K
END

make.bat in dosbox

@ECHO OFF
MASM /DARCH_TYPE="T" /DCPU_TYPE="V" 1;
LINK 1;
EXE2COM 1.EXE

Python script here: https://www.henriaanstoot.nl/2023/06/20/bios-hacking/

Write EEprom

minipro -w 1.COM -p AT28C64

Part 2 – Bootsector program !

Allmost the same as above, but booting from a Floppy disk.

Video mode info : https://stanislavs.org/helppc/int_10-0.html

Assembly code

use16              ; 16 bits 
org 0x7c00         ; start address ( change? )

mov ah,0x0         ; ah 0h - video mode 
mov al,0x0         ; al 0h - mode 0 - 40x25 chars
int 10h            ; scree routines 
mov cx,11h         ; 11 chars
mov ah,0ah         ; ah 0ah - print char mode
mov al,'#'         ; choose char as #
int 10h            ; execute 


times 510 - ($-$$) db 0 ; fill rest 512 bytes sector

dw 0xaa55 ; magic bytes