V40 Motherboard Project

Introduction:

This is a V40-70208 motherboard that is PC compatible built on an ISA card. The reason for using the V40 is that all the peripherals are integrated into the processor. Only the system memory, the keyboard port, and the hard drive have to be added.


Downloads:

BIOS V40 Bios 13 Feb 2021

Raspberry PI 32K ROM uploader RPI 32K ROM Writer 6 Feb 2021


This Manual is for a different PCB but it has a Section that covers the V40's integrated peripherals. I have found this to be the most helpful source.

ZT 8801/ZT 88CT01

Code:

To initialize the V40 processors integrated peripherals you write command bytes to specific IO ports. Ports 0xFFF0-0xFFFF

This is pulled right from my BIOS file;

INITIALIZE_70208:

;0XFFFF RES


MOV DX, 0XFFFE ;OPCN - INT SELECT

MOV AL, 0X00 ;BIT 3 = INT1, BIT 2 = INT2, BIT 1-0 = 10

OUT DX, AL


MOV DX, 0XFFFD ;OPSEL - ENABLE PERIPHERAL

MOV AL, 0X06 ;ONLY ENABLE THE INTERRUPT CONTROLLER AND TIMER

OUT DX, AL ;


MOV DX, 0XFFFC ;OPHA - ON CHIP PERIPHERAL HIGH ADDRESS REGISTER

MOV AL, 0X00 ;ANY 256K BLOCK EXCEPT OVERLAP WITH RESGISTERS

OUT DX, AL


MOV DX, 0XFFFB ;DULA - DMA LOWER ADDRESS REGISTER

MOV AL, 0X00

OUT DX, AL


MOV DX, 0XFFFA ;IULA - 8259 LOWER ADDRESS REGISTER

MOV AL, 0X20

OUT DX, AL


MOV DX, 0XFFF9 ;TULA - 8254 LOWER ADDRESS REGISTER

MOV AL, 0X40

OUT DX, AL


MOV DX, 0XFFF8 ;SULA - SERIAL PORT LOWER ADDRESS REGISTER

MOV AL, 0XD0

OUT DX, AL


;0XFFF7 RES


MOV DX, 0XFFF6 ;WCY2 - WAIT

MOV AL, 0X0F ;Sets the number of wait cycles for DMA and refresh cycles

OUT DX, AL


MOV DX, 0XFFF5 ;WCY1 - WAIT

MOV AL, 0XFF ;BITS 7-6 = IO, 5-4 = UPPER MEM, 3-2 = MIDDLE MEM, 1-0 LOWER MEM

;00 NO WAIT, 11 LONGEST WAIT

OUT DX, AL


MOV DX, 0XFFF4 ;WMB - MEMORY BOUNDARIES

MOV AL, 0X71 ;BITS 6-4 LOWEST MEMORY, BITS 2-0 HIGHEST MEMORY, MIDDLE IS EVERYTHING ELSE

OUT DX, AL ;


;0XFFF3 RES


MOV DX, 0XFFF2 ;RFC - REFRESH CONTROL

MOV AL, 0X00 ;NO REFRESH

OUT DX, AL


;0XFFF1 RES


MOV DX, 0XFFF0 ;TCKS - TIMER PIN SELECTION

MOV AL, 0X14 ;1=PIN, 0=INTERNAL, BITS 1-0 PRESCALE DIV FOR INTERNAL

OUT DX, AL


RET