Tag Archives: old-computers

My dosbox assembly directory

Below you can find the files in a zip for writing assemby machine code in dosbox.

I’ve got mine extracted in ~/projects/dos

To automount this i’ve edited

~/.dosbox/dosbox-*.conf
;-------- bottom part
[autoexec]
# Lines in this section will be run at startup.
# You can put your MOUNT lines here.

mount c: /home/myusername/projects/dos
c:

The files

  • A.BAT – Runs editor, masm,linker (start with a<space>progname
  • DEBUG.COM – msdos debugger
  • EXE2BIN.EXE – exe to com (if segments allow)
  • GFX.ASM – example template (see below)
  • LINK.EXE – masm linker
  • MASM.EXE – masm compiler
  • Q* – editor stuff
  • Q.EXE – editor
  • SR.EXE – sourcer
  • SYMDEB.EXE
  • TASM.EXE – turbo assembler
  • TD.EXE – turbo debugger
  • TLINK.EXE – turbo linker

Template

; everything in 64k CS, DS, and SS are the same
.model small
; start pointer
.stack 100h
.code
start:
	; set mode 13 (320x200 * 265 colors palette)
    mov ah,0	
    mov al,13h
    int 10h

    ; set pixel in the middle color 2 (cyan)
    mov ah,0ch
    mov al,2
    mov cx,160
    mov dx,100
    int 10h

	; wait key input
    mov ah,0
    int 16h

	; set mode back to text
    mov ah,0
    mov al,3
    int 10h

	; exit to dos
    mov ax,4c00h
    int 21h
end start

Usage

start dosbox
a gfx (edit gfx.asm example)
esc, q, e
gfx (run program)

MartyPC

Perviously i’ve posted about PCem

But I wanted to have a emulator which could load extension biosses also.
This for my own tinkering.

I was told to look at MartyPC and PCE/ibmpc

I don´t like it being written in Rust, but it does the job.

Running the Basic Extension Rom
Running one of my own roms. I knew it didn’t work, now i can use the buildin debug to see why!
Another of my test roms, which is working!

ROM config part i’ve got in martypc.toml

rom_override = [
    { path = "./roms/BIOS_5160_09MAY86_U19_62X0819_68X4370_27256_F000.BIN", address = 0xF0000, offset=0, org="Normal" },
    { path = "./roms/BIOS_5160_09MAY86_U18_59X7268_62X0890_27256_F800.BIN", address = 0xF8000, offset=0, org="Normal" },
    { path = "./roms/myromextension.bin", address = 0xF6000, offset=0, org="Normal" }
]

GLABios for Laser XT/3

In previous post :

I mentioned a 2 ROM setup because the 8086 is 16bits instead of 8.
So I was wondering that maybe a recompile was needed, or the data being split over two roms (odd/even)

The guy from GLABios was so kind to build me two interleaved roms.

So while working on a padded bench, I tested the ROMs.

Working outside .. on the padded bench

Back to the roms, it didn’t work!

But I missed a detail in the technical manual (the bold text)

In Turbo XT /2 and Turbo XT /3, there are two 28-pin sockets for ROM,
both of them are occupied by 2764 which stored the BIOS. The contents
of the two 2764 are identical.
One of them contribute the ODD Byte to the system and the other EVEN Byte. Together they support 16 Bit BIOS
access.

I don’t know why this is how it works, but when I flashed two the same 28C64’s it worked!
(I also tought that is was strange that both original roms had the same markings.

It workes!

Only remarks/observations:

  • There was a longer wait time before the CF Card was detected/accessed
  • GLABios mentions 8088 in the splashscreen, but the machine is a 8086

UPDATE

GLABios was not updated for displaying 8086 yet.
Error 1701 was the (old spinning) harddisk not being connected.

Nice .. harddisk infomation like size, rom address and CHS

8086 sideway scroller ‘n stuff

Today I was working on my own brew ISA card (wirewrapping).
Did some mini modeling stuff.
Sorted some pipetunes.
And played around with my 8086.

Got it on a desk now, and replaced the harddisk with the CF card.
Also got an old SoundBlaster working, so i wanted to see what of my old code could still run.
Apparanty most code was compiled for 386/486 🙁
So i recompiled some stuff.
Below a horizontal scroller example.

Meanwhile i got my new fans in for my NUC (Kodi player, it was making a hell of a noise due to bad ball bearings.

WRITING A MINI INTRO WITH PICTURE AND SID TUNE (C64) PART 2

Adding a picture:
Most used is loading a koala picture.
Never done it like this before, luckily loads of retro lovers are posting code examples.
There are a lot of tools now available on PC. (Windows and Linux)

Acme : compiler i’ve used for this example
Retropixels : converting jpg into koala
Exomizer : packing/compressing the C64 prg (16k to 5.4k)
Sidreloc : relocator for SID files.

Exomizer command with effect:
(NOTE on linux you have to use single qoutes!)

retropixels -r 64 --format prg bottom.jpg ; for a prg (not used)
retropixels bottom.jpg ; for a koala picture

exomizer sfx 0x080d bottom.prg -x 'lda $fb eor #$01 sta $fb beq skip dec $d020 inc $d020 skip:'
# 0x080d is the starting address

Code

!to "bottomsm.prg",cbm
; start prg
* = $0801
; header for sys auto start
!byte $0b, $08, $00, $00, $9e, $32, $30, $36, $31, $00, $00, $00

PICTURE = $2000
BITMAP = PICTURE
VIDEO = PICTURE+$1f40
COLOR = PICTURE+$2328
BACKGROUND = PICTURE+$2710

* = $080d

	sei
	lda #<irq
	ldx #>irq
	sta $314
	stx $315
	lda #$1b
	ldx #$00
	ldy #$7f 
	sta $d011
	stx $d012
	sty $dc0d
	lda #$01
	sta $d01a
	sta $d019 ; ACK any raster IRQs
	lda #$00
	jsr $1000 ; Call music

	lda #$00
	sta $d020 ; Border Color
	lda BACKGROUND
	sta $d021 ; Screen Color

	; Transfer Video and Color
	ldx #$00
.LOOP
	; Transfers video data
	lda VIDEO,x
	sta $0400,x
	lda VIDEO+$100,x
	sta $0500,x
	lda VIDEO+$200,x
	sta $0600,x
	lda VIDEO+$2e8,x
	sta $06e8,x
	; Transfers color data
	lda COLOR,x
	sta $d800,x
	lda COLOR+$100,x
	sta $d900,x
	lda COLOR+$200,x
	sta $da00,x
	lda COLOR+$2e8,x
	sta $dae8,x
	inx
	bne .LOOP

	; Bitmap Mode On
	lda #$3b
	sta $d011

	; MultiColor On
	lda #$d8
	sta $d016
	; When bitmap adress is $2000 ; Screen at $0400 ; Value of $d018 is $18
	lda #$18
	sta $d018
	cli
	.MYLOOP
	jmp .MYLOOP

irq
	lda #$01
	sta $d019 ; ACK any raster IRQs
	jsr $1003 ;Play the music
	jmp $ea31
   
; Data parts with headers cut
	* = $1000
	!binary "bottom1000.sid" ,, $7c+2


	* = PICTURE
	!binary "bottom.kla",,2

Laser XT/3 Bios

As posted before

I really like GlaBios for my 8088, so today I got my Laser XT/3 8086 machine from the attic.

Mmm TWO ROM’s thats interesting

Looking futher in the schematics I found this. Apparantly there is a 8K ROM configured in a D0-D7 + D8-D15 setup. (16 bits)

Found a technical manual, this is a excerpt.

In Turbo XT, there are two 28-pin sockets for ROM, one of them is
occupied by a 2764 which stored the BIOS (Basic Input Output System).
The other empty socket is used to house a 32K ROM, such as the BASIC
ROM

And about the XT/3 version which I have.

In Turbo XT /2 and Turbo XT /3, there are two 28-pin sockets for ROM,
both of them are occupied by 2764 which stored the BIOS. The contents
of the two 2764 are identical. One of them contribute the ODD Byte to the system and the other EVEN Byte. Together they support 16 Bit BIOS
access.

This could be an interesting chat with Greg ..

Meanwhile i’m going to look how to split a rom into odd/even.
Maybe i have to write a little python program for this.

Well, thats enough for today.

Lets fix my Cat S60 Flir phone, so i can track the hedgehog in our garden. (Battery replacement and powerbutton fix)

I fixed several phones before, (broken screen. touch not working). But I hate how some manufacturers build them.

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.


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

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