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.
Got some new roms in. These are for my 8088/8086 the 6502 computer and C64 cartridges.
While I seldom had any problem writing to these, now I could not write one! Erasing didn´t give me an error?!?
henri@zspot:~/projects/wozmon8088/mon8086$ minipro -w mon8086.rom -p AT28C64
Found TL866II+ 04.2.129 (0x281)
Warning: Firmware is newer than expected.
Expected 04.2.128 (0x280)
Found 04.2.129 (0x281)
Erasing... 0.02Sec OK
Writing Code... 9.57Sec OK
Reading Code... 0.12Sec OK
Verification failed at address 0x0001: File=0xAA, Device=0xFF
Whenever you get this, check the markings of the chip!
Mine are AT28C64b !!!!!!!!!!!
Change your command accordingly. Another thing to watchout for is write protect, look at the commands
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.)
;-------- 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.
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
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
My BBC Acorn model B is working again. The original monitor is still dead.
Time to play with some machine code and ROMs.
My machine has a NFS rom installed. (NetFS)
Econet was Acorn Computers’s low-cost local area network system, intended for use by schools and small businesses. It was widely used in those areas, and was supported by a large number of different computer and server systems produced both by Acorn and by other companies.
I found a ROM online called Gremlin. It is a 16K rom file. But at the moment I only got some 28C64 (8k) or 28C256 (32k) eeproms.
32k it is. But de beeb having address line A14 floating high, I need to flash the upper 16k of the 32k ROM.
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
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!