RetroBrew Computers Forum
Discussion forum for the RetroBrew Computers community.

Home » RBC Forums » General Discussion » Generic RetroComputer project (Z80, 6502, 8085, 6809, 68008, 32008, oh my!)
Generic RetroComputer project [message #9772] Wed, 23 February 2022 07:10 Go to next message
plasmo is currently offline  plasmo
Messages: 916
Registered: March 2017
Location: New Mexico, USA
Senior Member
I'm thinking about a low-cost and modular processor-agnostic platform to explore 5V processors of 1970's and 1980's. The thoughts revolve around the idea of different retro processor boards but reuse memory and peripherals; I want these computers to be standalone, i.e., with its own keyboard and monitor; and finally, for once in my life, I'm going to put it in a box!

This is the features of Generic RetroComputer project:
* 5V 8-bit processors and some 5V 16-bit processors
* Reuse memory and peripherals
* Standalone computer
* Low cost
* Design for PacTec CM5-200 enclosure

Not a lot of specifics because different processor family have different end points. For Z80, ROMWBW is the goal; for 6502, it is DOS/65; for 8085, it is CP/M; for 68008, it is CP/M68K (lame! there must be a better goal!); for 6809 and NS32008, I don't know. For now I'll avoid processors that need multiple voltages like 8080.

It is obvious from the set of features that the design has a backplane for various boards to plug in. Low cost drives the pc board to no bigger than 100x100mm which is the backplane size. The PacTec CM5-200 enclosure means the board dimension is 1.6" tall by 4" wide. Boards of such dimension can step-and-repeat 3 times to fit in a 4"x4" panel, another cost-saving feature. There must be a backplane signal definition that can accommodate different processor families and there must be a programmable hardware to reuse the signals and adjust timings for different processors.

I've designed a few rev0 boards to explore the concept and I'm encouraged by the results. So I'm starting a design blog to document my journey in Generic RetroComputer. This is an ambitious project and I expect it to last several years so periodically I'll edit this first post for updated table of contents and progress report.
Bill
Re: Generic RetroComputer project [message #9773 is a reply to message #9772] Wed, 23 February 2022 07:13 Go to previous messageGo to next message
plasmo is currently offline  plasmo
Messages: 916
Registered: March 2017
Location: New Mexico, USA
Senior Member
Exploring the GRC concept with rev0 boards. Partially populated motherboard and how it fits in PacTec enclosure
Bill
/forum/index.php?t=getfile&id=2663&private=0
/forum/index.php?t=getfile&id=2664&private=0
Re: Generic RetroComputer project [message #9774 is a reply to message #9773] Wed, 23 February 2022 10:02 Go to previous messageGo to next message
lynchaj is currently offline  lynchaj
Messages: 1080
Registered: June 2016
Senior Member
Hi Bill
I think it is a neat idea but needs a larger board size and different case. 100x100mm is really the smallest size for any practical board especially if you use buffering circuitry to connect to the bus.

I recommend using buffering for each board because directly connecting primary components directly to the bus means if someone makes a mistake it can wipe out the whole system in one fell swoop.

Buffering protects the primary chips but also cleans up the signals inside the boards as well for more reliable operation. I consider the backplane a no-mans land and buffer all signals going in or out.

Maybe reorient the case so the boards insert horizontally and have a larger PCB or find a larger case to accommodate larger PCBs

Good luck! Andrew Lynch
Re: Generic RetroComputer project [message #9775 is a reply to message #9774] Wed, 23 February 2022 12:38 Go to previous messageGo to next message
plasmo is currently offline  plasmo
Messages: 916
Registered: March 2017
Location: New Mexico, USA
Senior Member
The retro components are used components and many (possibly most) are re-labelled parts, so the the concerns about inadvertently destroying rest of the computers with unknown CPU is a valid one. Buffering may be a solution, but it is also a question of the cost of insurance vs insured. By reducing the board count to minimum when new or unknown processor is added, the number of boards at risk is minimized. Because each board is simple and inexpensive, even if a few was destroyed, they can be built back up easily and inexpensively. The current design needs one board, the CPLD board, to test out a new, unknown processor. The CPLD is Altera EPM7128S equivalent to the $10 (Mouser) Atmel ATF1508, but used Altera CPLD is about 1/3 the price of new ATF1508, so the cost of risk taking is not much. The next board that's added to a new unknown processor is RAM/Flash board which is more expensive, about $8 for SST39SF040 + AS6C4008, but the new unknown processor has already been checkout with CPLD board, so risk to RAM+ROM is pretty low. After RAM/ROM, the risks to subsequent boards are insignificant.

In term of signal integrity, 4"x4" backplane is quite small so I expect CMOS processors to have sufficient drives. The NMOS processors potentially will have more problems; I don't know, I guess I'll find out soon enough.

Thanks for your feedback.
Bill

Re: Generic RetroComputer project [message #9779 is a reply to message #9775] Thu, 24 February 2022 08:22 Go to previous messageGo to next message
plasmo is currently offline  plasmo
Messages: 916
Registered: March 2017
Location: New Mexico, USA
Senior Member
GRC Backplane

The Generic RetroComputer's backplane is a 4"x4" pc board with passive components comprise of six 2x25 female sockets, a 44-pin IDE connector, power jack, and reset button. Its mounting holes are designed for PacTec's CM5-200 enclosure.
/forum/index.php?t=getfile&id=2668&private=0

Here are the signal definitions for the 2x25 female connectors.
* 16 addresses for 64KB memory space
* 4 banks to expand addressing up to 512KB
* 8 data
* 8 CPU controls where write strobe, interrupt, non-maskable interrupt, and wait state are assigned; other 4 controls are assigned based on processor family in use.
* Dedicated chip select for RAM.
* Dedicated chip select, write strobe, and read strobe for IDE device
* 5 general purpose chip selects.
/forum/index.php?t=getfile&id=2669&private=0

[Updated on: Thu, 24 February 2022 08:25]

Report message to a moderator

Re: Generic RetroComputer project [message #9781 is a reply to message #9779] Thu, 24 February 2022 13:02 Go to previous messageGo to next message
etchedpixels is currently offline  etchedpixels
Messages: 333
Registered: October 2015
Senior Member
4 bank bits is 1MB, so surely your limit is 1MB per slot ?

Also you have a \WR but no \RD or are you assuming a Motorola bus RW and E setup with E as your clock ?

Re: Generic RetroComputer project [message #9782 is a reply to message #9781] Thu, 24 February 2022 16:51 Go to previous messageGo to next message
plasmo is currently offline  plasmo
Messages: 916
Registered: March 2017
Location: New Mexico, USA
Senior Member
Each bank is 32K and there are 16 banks as represented by Bank0-Bank3, so that's 512K. A RAM/ROM board is in fact 1 meg (512K ROM/RAM), but use nCS1 as ROM chip select and nCSRAM as RAM chip select. 512K ROM/RAM can be strapped as 1meg RAM but I'm still trying to figure out how to connect processors capable of 1meg addressing to 1meg RAM.

Intel style processors have separate write strobe and read strobe, but Motorola style have read-high/write-low. So I figure nWR will always be there but "CPU control 3" may or may not be nRD. Different processors have different control signals, so I reserved 4 general control lines and hopefully that's enough.
Bill
Re: Generic RetroComputer project [message #9784 is a reply to message #9782] Fri, 25 February 2022 06:38 Go to previous messageGo to next message
plasmo is currently offline  plasmo
Messages: 916
Registered: March 2017
Location: New Mexico, USA
Senior Member
CPLD Board
/forum/index.php?t=getfile&id=2671&private=0

GRC bus is a "decoded bus" (please help me with a better term) where different processor-specific control signals are decoded into standard enable signals for the common memories and peripherals. The translation of different processor-specific signals into standard control signals is done in the CPLD board. The CPLD is user-programmable to handle different processors; it does not need to be complex, but needs sufficient I/O pins to receive and generate the many signals from the backplane. One 44-pin CPLD is not enough, but two CPLD in hobbyist friendly PLCC44 package may handle all the I/O. For greater flexibility I I picked the EPM7128S in 100-pin SMT package (I happened to have lots of it) to help me with the development of GRC concept. For hobbyist friendly design, dual 44-pin CPLD in through-hole sockets is the targeted final CPLD board.

Address decode and bank switching are trivial applications of CPLD, hardly use any macrocell resources. Since I am using a 128-macrocell CPLD for conceptual development, I will incorporate a serial port, small boot ROM, and diagnostic functions. The CPLD can be reprogrammed many times (datasheet says 100 times, minimum) for debugging unknown processors and new peripherals. In next posting I'll demonstrate how the CPLD board is used to test Z80 and 6502 processors and every subsequent new processors.
Bill

Re: Generic RetroComputer project [message #9787 is a reply to message #9784] Sat, 26 February 2022 11:14 Go to previous messageGo to next message
plasmo is currently offline  plasmo
Messages: 916
Registered: March 2017
Location: New Mexico, USA
Senior Member
Z80 Board

Since I'm most familiar with Zx80, I'll start with the Z80 CPU board.
/forum/index.php?t=getfile&id=2673&private=0

It is a simple board with most CPU signals go directly to the GRC bus. For Z80, the CPU-specific signals are assigned as follow:
Pin 28 CPU CTRL 1 == nM1
Pin 26 CPU CTRL 2 == nMREQ
Pin 22 CPU CTRL 3 == nRD
PIN 20 CPU CTRL 4 == nIORQ

CPLD for Z80 will take these signals into account and create separate memory space and I/O space. Each CPU board will have its own oscillator because different CPU have different rated maximum frequency. For the Z80 the clock is 14.7MHz which is lower than its max frequency of 20MHz (20MHz CMOS Z80 is actually good to about 30MHz), but the constraint here is speed of flash memory. I can add a wait state to flash memory access and raise Z80 clock to 20MHz, but for now 14.7MHz is a good starting point.

This is a new CPU board on a new GRC backplane, so it is a good idea to take baby steps first with a simple NOP test. NOP instruction for Z80 is 0x0 so tie all data lines to ground through 1K resistors. With that setup Z80 will always read 0x0 for instruction and start program execution from 0x0 and run all the way to 0xFFFF then roll over and over again. So I'd expect the addresses to increment from 0x0 to 0xFFFF continuously. Looking at addresses with a scope I do see them incrementing as expected. Address15 rolls over every 17.8mS so that translates to one NOP per 270nS or four 14.7MHz clocks to execute a NOP which is correct according to the datasheet. Good.
/forum/index.php?t=getfile&id=2674&private=0

NOP test is really really simple and also needs an oscilloscope to verify, so next post I'll program a small program and a serial transmitter in CPLD to perform slightly more complicated test.
Bill


Re: Generic RetroComputer project [message #9797 is a reply to message #9787] Mon, 28 February 2022 07:25 Go to previous messageGo to next message
plasmo is currently offline  plasmo
Messages: 916
Registered: March 2017
Location: New Mexico, USA
Senior Member
CPLD Tester for Z80

A generic tester for retro CPU is useful because most old CPU are used parts and many are re-labelled. The used markets like eBay, Aliexpress have excellent return policy but parts need to be tested timely to be covered by the return policy. Before inserting an unknown CPU into a full-up system, it is a good idea to check it out with minimal hardware.

The NOP test mentioned previously tests only one instruction and requires a scope to observe test outputs. Nevertheless it is a fair test to establish the part is at least the right CPU and will power up. This post describes a generic CPLD tester for CPU that can exercise more instructions and display output on terminal emulator. No tester can cover 100% of faults, but this test should provide sufficient confidence in the targeted CPU to install it in a full-up system.

This tester is based on the CPLD board. It consists of two major components; a small lookup table that serves as boot ROM, and a serial transmitter.

Verilog (and VHDL as well) has a construct for lookup table where multi-bit inputs are translated to multi-bit outputs. By assigning the inputs as addresses and outputs as 8-bit data, the lookup table may serve as a ROM. Unlike ROM, the translation are done with combinatorial logic so it take very little macrocell resources to implement a small ROM in CPLD.

Here is a small ROM program in Z80 assembly:

                             A        1 ;embedded ROM code in CPLD
                             A        2 ;keep it simple
                             A        3 ;no RAM, so no subroutine calls
                   000000F8  A        4 TX	equ 	0f8h
                             A        5 	org 0
00000000                     A        6 start:
00000000 D3 F8               A        7 	out (TX),a
00000002                     A        8 delay:
00000002 04                  A        9 	inc b
00000003 20 FD               A       10 	jr nz,delay
00000005 0C                  A       11 	inc c
00000006 20 FA               A       12 	jr nz,delay
00000008 3C                  A       13 	inc a
00000009 C3 00 00            A       14 	jp start

This simple program output a byte to serial port, wait a while, increment the byte and output it again and again. This is the same program in Verilog lookup table:

module Z80ROM( 
    input [3:0]addr, 
    output reg [7:0]ROMdata); 
    always @(*)
    begin
    //embedded Z80 instruction in ROM
        case(addr)
        4'b0000: ROMdata = 8'hd3; //out(TX),a
        4'b0001: ROMdata = 8'hf8; 
        4'b0010: ROMdata = 8'h04; //inc b
        4'b0011: ROMdata = 8'h20; //jr nz,delay 
        4'b0100: ROMdata = 8'hfd; //
        4'b0101: ROMdata = 8'h0c; //inc c
        4'b0110: ROMdata = 8'h20; //jr nz,delay
        4'b0111: ROMdata = 8'hfa; // 
        4'b1000: ROMdata = 8'h3c; //inc a 
        4'b1001: ROMdata = 8'hc3; //jp start 
        4'b1010: ROMdata = 8'h00; // 
        4'b1011: ROMdata = 8'h00; //  
        4'b1100: ROMdata = 8'h00; // 
        4'b1101: ROMdata = 8'h00; //  
        4'b1110: ROMdata = 8'h00; //  
        4'b1111: ROMdata = 8'h00; // 
        endcase
    end
endmodule

The program expects a serial transmitter at I/O address 0xf8, so we'll reuse a parallel-in serial out shift register (74165) from Quartus TTL library and modify the front end to generate START bit. A baud rate generator and decode for I/O address 0xf8 are also added. Please refer to the CPLD schematic below.

With Z80 board and CPLD board populated on the GRC backplane, this is the output displayed on TeraTerm serial terminal emulator.
/forum/index.php?t=getfile&id=2677&private=0

[Updated on: Mon, 28 February 2022 07:29]

Report message to a moderator

Re: Generic RetroComputer project [message #9803 is a reply to message #9797] Wed, 02 March 2022 20:44 Go to previous messageGo to next message
plasmo is currently offline  plasmo
Messages: 916
Registered: March 2017
Location: New Mexico, USA
Senior Member
6502 Board

While waiting for RAM/ROM pc board from JLCPCB, I assembled a 6502 CPU board.
/forum/index.php?t=getfile&id=2678&private=0

Like the Z80 board, it is a simple board with most signals go directly to GRC bus. The four CPU specific signals are not assigned at all because 6502 is a very simple CPU with no I/O space and uses high phase of clock (PHI2) to indicate valid addresses and data. The maximum clock for W65C02 is 14MHz but because the flash access time of 70nS, the nominal clock is 7.37MHz. The schematic for the 6502 is attached below.

Like Z80, I also constructed a "NOP" test plug; 6502 NOP instruction is 0xEA. Because NOP instruction is executed in 2 clocks, 6502's A15 also rolls over every 17.8mS, same timing as Z80 even though 6502 clock is half of Z80 clock.
/forum/index.php?t=getfile&id=2679&private=0


CPLD tester for 6502
/forum/index.php?t=getfile&id=2681&private=0
CPLD tester for 6502 is very similar to that of Z80. 6502 has no separate I/O space so transmitter is assigned to memory location $E400. The following is the ROM program in 6502 assembly for putting incrementing characters out to serial port. It is the same idea: wait a while, put out a byte to serial transmitter, increment the byte, repeat.

000000r 1               ;Transmit incrementing data to serial port
000000r 1               	.pc02
000000r 1               	.org $fff0
00FFF0  1               start:
00FFF0  1  CA           	DEX			;16-bit delay
00FFF1  1  D0 FD        	BNE start
00FFF3  1  88           	DEY
00FFF4  1  D0 FA        	BNE start
00FFF6  1  8D 00 E4     	STA $e400		;write to transmitter
00FFF9  1  1A           	INC
00FFFA  1  80 F4        	BRA start
00FFFC  1  F0 FF        	.word start

The corresponding Verilog Lookup table:

module CPLD_ROM( 
    input [3:0]A, 
    output reg [7:0]Dout); 
    always @(*)
    begin
//Boot ROM in CPLD
        case(A)
      
        4'b0000: Dout = 8'hCA; // DEX     
        4'b0001: Dout = 8'hD0; // BNE 
        4'b0010: Dout = 8'hFD; //  
        4'b0011: Dout = 8'h88; // DEY 
        4'b0100: Dout = 8'hD0; // BNE 
        4'b0101: Dout = 8'hFA; //  
        4'b0110: Dout = 8'h8D; // STA 
        4'b0111: Dout = 8'h00; //  
        4'b1000: Dout = 8'hE4; //      
        4'b1001: Dout = 8'h1A; // INC
        4'b1010: Dout = 8'h80; // BRA 
        4'b1011: Dout = 8'hF4; //  
        4'b1100: Dout = 8'hF0; //  
        4'b1101: Dout = 8'hFF; //  
        4'b1110: Dout = 8'h00; //  
        4'b1111: Dout = 8'h00; //  

        endcase
    end
endmodule

The serial output to TeraTerm terminal emulator looks exactly like Z80's
/forum/index.php?t=getfile&id=2682&private=0
Re: Generic RetroComputer project [message #9807 is a reply to message #9803] Sun, 06 March 2022 10:06 Go to previous messageGo to next message
plasmo is currently offline  plasmo
Messages: 916
Registered: March 2017
Location: New Mexico, USA
Senior Member
RAM/ROM board preparation for ROMWBW

/forum/index.php?t=getfile&id=2684&private=0

I am expecting the 512K RAM/ROM pc board early next week. It is a very simple design with just a 512K RAM (AS6C4008) and a 512K flash (SST39SF040). The banking registers and memory decodes are handled in CPLD. The schematic below shows the banking registers and memory decode design.
/forum/index.php?t=getfile&id=2683&private=0

There are sixteen 32KB RAM banks and sixteen 32KB ROM banks. The banking registers are located at I/O addresses 0x70-0x7F. When address A15 is high (0x8000-0xFFFF), it is always the highest RAM bank (bank 15); when A15 is low (0x0-0x7FFF), the content of bank registers selects the bank and content of RAM/ROM register selects whether it is RAM or flash. Both bank register and RAM/ROM register are initialized to 0 at reset so when power-up lower 32K is ROM bank 0 and upper 32K is RAM bank 15.

ROMWBW also expects to find a serial port as the console. The CPLD board has enough resource to emulate the simple MC6850 ACIA--not all features, but enough to 'fool' ROMWBW to use it as MC6850. Attached is the CPLD schematic for MC6850 emulation.

The I/O addresses for serial port are 0x80 or 0xA0 for status, 0x81 or 0xA1 for data. The serial baud is fixed to 115200. The receiver has one byte of receive hold register; the transmitter has no buffer register. The status register is the bare minimum with Receive Ready at D0 and Transmit Empty at D1. The control register implements reset command (D0=1, D1=1), CTS handshake (D6) and interrupt enable/disable (D7). These minimal features are sufficient to satisfy ROMWBW as a working console.

Now I wait for RAM/ROM board to show up.
Bill

Re: Generic RetroComputer project [message #9809 is a reply to message #9807] Tue, 08 March 2022 06:50 Go to previous messageGo to next message
plasmo is currently offline  plasmo
Messages: 916
Registered: March 2017
Location: New Mexico, USA
Senior Member
GRC RAM/ROM board

Received the RAM/ROM board from JLCPCB and built one up. Since decoding and register banking were all done in CPLD, the RAM board itself is just RAM and flash.
/forum/index.php?t=getfile&id=2689&private=0

The banking register scheme described previously is basically that of SBC V2 instead of RC2014's ROM/RAM512K module. So in order to generate the correct ROMWBW binary, I need to replace the memory manager of RCZ80 with that of SBC. So in ROMWBW-dev/Source/HBIOS/cfg_rcz80.asm I commented out the memory manager "MM_Z2" and replaced with "MM_SBC";. run "buildshared"; run "buildrom" with "rcz80" and "std" options. The resulting "RCZ80_std.rom" is programmed into the SST39SF040 flash.
(Wayne Warthen, if you are reading this, please suggest a better way of doing the modification of cfg_rcz80.asm.Wink

;MEMMGR		.EQU	MM_Z2		; MEMORY MANAGER: MM_[SBC|Z2|N8|Z180|Z280|MBC]
;MPGSEL_0	.EQU	$78		; Z2 MEM MGR BANK 0 PAGE SELECT REG (WRITE ONLY)
;MPGSEL_1	.EQU	$79		; Z2 MEM MGR BANK 1 PAGE SELECT REG (WRITE ONLY)
;MPGSEL_2	.EQU	$7A		; Z2 MEM MGR BANK 2 PAGE SELECT REG (WRITE ONLY)
;MPGSEL_3	.EQU	$7B		; Z2 MEM MGR BANK 3 PAGE SELECT REG (WRITE ONLY)
;MPGENA		.EQU	$7C		; Z2 MEM MGR PAGING ENABLE REGISTER (BIT 0, WRITE ONLY)
MEMMGR		.EQU	MM_SBC		; MEMORY MANAGER: MM_[SBC|Z2|N8|Z180|Z280|MBC]
MPCL_RAM	.EQU	$78		; SBC MEM MGR RAM PAGE SELECT REG (WRITE ONLY)
MPCL_ROM	.EQU	$7C		; SBC MEM MGR ROM PAGE SELECT REG (WRITE ONLY)

It booted nicely! The CPU clock is 14.7MHz even though it said 7.37MHz. It boots into CP/M and I'm able to do XMODEM file transfer with hardware handshake. The transfer rate is 4.1KB/s
Bill
/forum/index.php?t=getfile&id=2687&private=0

[Updated on: Tue, 08 March 2022 06:50]

Report message to a moderator

Re: Generic RetroComputer project [message #9813 is a reply to message #9809] Wed, 09 March 2022 18:14 Go to previous messageGo to next message
plasmo is currently offline  plasmo
Messages: 916
Registered: March 2017
Location: New Mexico, USA
Senior Member
I made two versions of GRC backplane, one for compact flash and another for disk-on-module. Electrically they are the same but mechanically the 44-pin connector is mirrored between CF and DOM. Furthermore, CF adapter is taller so it won't fit the PacTec CM5-200 enclosure without a slot cutout on top of the box. I like DOM better but because DOM reader is not easy to find, it is necessary to transfer files serially from PC to DOM whereas CF disk image can be transferred using tools like Win32diskimager. Cost wise there are no real difference; used 128MB DOM is about $5; used CF disk is $2 plus $5 for CF adapter. Pictures of GRC with CF disk, GRC with DOM, and GRC with DOM fitted inside CM5-200 enclosure.
Bill

/forum/index.php?t=getfile&id=2692&private=0

----------------Additional Info 3/12/22
Compact Flash and Disk-on-module decoding logic are the same. It is quite simple as shown in schematic below. The I/O addresses are 0x10 to 0x17 so it will be automatically recognized by ROMWBW. It is important to delay read and write strobes by one clock from the assertion of the chip select. Some brands of CF disks will work without the delay, but other brands may not. This is a common fault with many current CF board designs.
/forum/index.php?t=getfile&id=2693&private=0

The DOM is recognized by ROMWBW. Nominal power consumption for the system, DOM, Z80@14.7MHz, CPLD, RAM/ROM512K, is 140mA@5V.
/forum/index.php?t=getfile&id=2694&private=0

[Updated on: Sat, 12 March 2022 10:17]

Report message to a moderator

Re: Generic RetroComputer project [message #9815 is a reply to message #9813] Sat, 12 March 2022 10:23 Go to previous messageGo to next message
plasmo is currently offline  plasmo
Messages: 916
Registered: March 2017
Location: New Mexico, USA
Senior Member
A batch of GRC boards came in this week. These are what I'll be working on this year. My pace will slow down soon since gardening works are picking up with warmer weather.
Bill
/forum/index.php?t=getfile&id=2695&private=0
Re: Generic RetroComputer project [message #9817 is a reply to message #9815] Mon, 14 March 2022 07:47 Go to previous messageGo to next message
plasmo is currently offline  plasmo
Messages: 916
Registered: March 2017
Location: New Mexico, USA
Senior Member
GRC Quad Serial board

/forum/index.php?t=getfile&id=2696&private=0

I have a large number of OX16C954 in QFP-100 on hand so it is the logical device for multi-channel serial board. The simple serial port in CPLD is useful for bringing up new system but have served its purpose. it is being replaced with the OX16C954 based multi-channel serial board and CPLD's resources can be reused to develop other capabilities.

OX16C954 is designed for Motorola or Intel bus interface which is ideal for GRC that hosts both Motorola and Intel style retro processors. The picture shows the block of 8 jumpers in "Up" position which is the Intel bus interface. With Motorola bus interface the block of jumpers are placed in "Down" position. GRC requires 32 bytes of contiguous I/O or memory locations; nCS2 generated by CPLD is the base address chip select. To be compatible with ROMWBW, the default Z80 I/O addresses are 0xC0-0xDF. OX16C954 is very capable and very fast; it has 128-byte deep transmit and receive FIFO; and it can handle clock up to 60MHz. For GRC-Z80, the clock is same as Z80 CPU or 14.7456MHz. Schematic of GRC Quad Serial board is attached.

To generate ROMWBW ROM that detects the quad serial board and set appropriate baud rate I added this two lines to configuration file:

UART4           .SET    TRUE            ; UART: AUTO-DETECT 4UART UART
UARTOSC         .SET    3686400              ;clock source is 14.7MHz

This is ROMWBW booting up, found GRC quad serial board, and use UART0 as the console.

RomWBW HBIOS v3.1.1-pre.148, 2022-03-12

RC2014 Z80 @ 14.745MHz
0 MEM W/S, 1 I/O W/S, INT MODE 1, SBC MMU
512KB ROM, 512KB RAM
ROM VERIFY: 00 00 00 00 PASS

AY: MODE=RCZ80 IO=0xD8 NOT PRESENT

UART0: IO=0xC0 16650 MODE=115200,8,N,1 FIFO AFC
UART1: IO=0xC8 16650 MODE=115200,8,N,1 FIFO AFC
UART2: IO=0xD0 16650 MODE=115200,8,N,1 FIFO AFC
UART3: IO=0xD8 16650 MODE=115200,8,N,1 FIFO AFC
ACIA0: IO=0x80 ACIA MODE=115200,8,N,1

DSRTC: MODE=STD IO=0xC0 NOT PRESENT
MD: UNITS=2 ROMDISK=384KB RAMDISK=256KB

FD: MODE=RCWDC IO=0x50 NOT PRESENT
IDE: IO=0x10 MODE=RC
IDE0: 8-BIT LBA BLOCKS=0x0003E800 SIZE=125MB

IDE1: NO MEDIA
PPIDE: IO=0x20 PPI NOT PRESENT

Unit        Device      Type              Capacity/Mode
----------  ----------  ----------------  --------------------
Char 0      UART0:      RS-232            115200,8,N,1
Char 1      UART1:      RS-232            115200,8,N,1
Char 2      UART2:      RS-232            115200,8,N,1
Char 3      UART3:      RS-232            115200,8,N,1
Char 4      ACIA0:      RS-232            115200,8,N,1

Disk 0      MD0:        RAM Disk          256KB,LBA
Disk 1      MD1:        ROM Disk          384KB,LBA
Disk 2      IDE0:       Hard Disk         125MB,LBA
Disk 3      IDE1:       Hard Disk         --

It is not all working correctly, however. There are two problems so far:
1. Quad serial board is detected and boot MOST of the times but not every time.
2. As the console port it echos back characters twice (yes, I make sure local echo is disabled).

I'm investigating...
Bill

Re: Generic RetroComputer project [message #9825 is a reply to message #9809] Fri, 18 March 2022 20:01 Go to previous messageGo to next message
Wayne W is currently offline  Wayne W
Messages: 385
Registered: October 2015
Location: Fallbrook, California, US...
Senior Member
plasmo wrote on Tue, 08 March 2022 06:50
So in order to generate the correct ROMWBW binary, I need to replace the memory manager of RCZ80 with that of SBC. So in ROMWBW-dev/Source/HBIOS/cfg_rcz80.asm I commented out the memory manager "MM_Z2" and replaced with "MM_SBC";. run "buildshared"; run "buildrom" with "rcz80" and "std" options. The resulting "RCZ80_std.rom" is programmed into the SST39SF040 flash.
(Wayne Warthen, if you are reading this, please suggest a better way of doing the modification of cfg_rcz80.asm.Wink

Hi Bill,

The only thing I would do differently would be to create a config file in the Config directory. These config files inherit from the main config files like cfg_rcz80.asm. Take a look at RCZ80_zrc.asm in the Config directory. That is an example that overrides the memory manager using a .SET operator.

Thanks,

Wayne
Re: Generic RetroComputer project [message #9826 is a reply to message #9825] Sat, 19 March 2022 09:11 Go to previous messageGo to next message
plasmo is currently offline  plasmo
Messages: 916
Registered: March 2017
Location: New Mexico, USA
Senior Member
Wayne,
I stumbled around and found the same solution as you described. I created a new file called RCZ80_grc.asm in Source\HBIOS\Config; used ".SET" to override ".EQU" assignments. I've also stumbled upon the naming convention where RCZ80_xyz will create a "xyz" submenu under RCZ80 when running "BuildROM" power shell. The ".SET" directive and "_xyz" filename convention are perfect for me since I constantly create & modify new hardware configurations so I need a way to deal with configuration control. Your scheme works great. Thanks,

Bill

PS, solved the weird problems with QuadSer board so it is now booting consistently and not echoing back two characters. It was due to a floating write strobe. I'm still having problem with XMODEM transfer...
Re: Generic RetroComputer project [message #9827 is a reply to message #9826] Sun, 20 March 2022 13:41 Go to previous messageGo to next message
plasmo is currently offline  plasmo
Messages: 916
Registered: March 2017
Location: New Mexico, USA
Senior Member
There are two problems with the Quad Serial board. The first one is missing write strobe connection. This was due to a faulty library component for the newly created GRC bus connector. The second problem is ground; OX16C954 is fairly fast so needs good ground. I added 3 extra ground wires but a better solution is 4-layer pc board with dedicated power and ground planes.
/forum/index.php?t=getfile&id=2699&private=0
/forum/index.php?t=getfile&id=2700&private=0

ROMWBW automatically recognize Quad Serial as 16C650 which has 128-byte FIFO and automatic flow control. OX16C954 can emulate 16C950 which has additional enhancements over 16C650 but 16C650 capability is already very impressive; the deep FIFO means fast data transfer without interrupt and handshakes. XMODEM 1 megabyte file with Quad Serial took less than 2 minutes at about 8.5K/s transfer rate. Compare that to CPLD emulation of 6850 which needs interrupt and handshake resulting in 4.1K/s transfer rate. Since Quad Serial is superior to CPLD emulation of 6850, I will now remove the serial port design from CPLD thus freeing up resources for other functions. I have a wish list of functions such as I2C, SPI, PS2 keyboard, RTC, and SD card.
/forum/index.php?t=getfile&id=2701&private=0
Re: Generic RetroComputer project [message #9830 is a reply to message #9827] Mon, 21 March 2022 06:58 Go to previous messageGo to next message
plasmo is currently offline  plasmo
Messages: 916
Registered: March 2017
Location: New Mexico, USA
Senior Member
GRC VGA-PS2 board

The GRC VGA-PS2 board receives inputs from PS2 keyboard and displays 64-col, 48-row text on VGA monitor. GRC becomes a standalone computer with the addition of VGA-PS2 board while retains the ability to communicate/upload/download with the host computer using the Quad Serial board.
/forum/index.php?t=getfile&id=2703&private=0

The video outputs 8-pixel by 8-pixel monochrome texts as 64 columns by 48 rows display. The display format is 640x480 60Hz VGA with pixel clock of 25.175MHz. All video data (texts & fonts) are contained in a 4KB dual port RAM that's mapped somewhere in the memory space as a 4KB block of write-only memories. I said "somewhere" because I'm still working out the memory map details so not to conflict with ROMWBW's memory utilization. By using dual port RAM, texts and fonts can be updated anytime without causing "snowing" effects. Texts are in the first 3K of the dual-port RAM while fonts are in the last 1K of the DPRAM. Z80 has large 64K I/O space so it is possible to place the 4K dual port RAM in Z80's I/O space but I chose memory mapped scheme because I want to use the same board for Z80 as well as memory-mapped processors like 6502 and 68008.

VGA controller is a modest 64-macrocell CPLD, EPM7064S, that continuously reads text data from second port of DPRAM, looks up the associated fonts and drives the pixel output at 25.175MHz rate. The VGA controller runs independently in the background invisible to the processor; it has no control/status register and generates no interrupt.

PS2 controller is a dedicated CPLD state machine for PS2 keyboard. It polls the PS2 keyboard for available input, serially clocks in data, checks parity, and stores data in a hold register while keeping keyboard from sending more data until the current data in the hold register is read out. PS2 controller has status register but generates no interrupt.

Attached is the schematic of VGA-PS2 board. It is quite dense so it is implemented as 4-layer pc board.
Bill
Re: Generic RetroComputer project [message #9831 is a reply to message #9830] Mon, 21 March 2022 18:51 Go to previous messageGo to next message
Wayne W is currently offline  Wayne W
Messages: 385
Registered: October 2015
Location: Fallbrook, California, US...
Senior Member
plasmo wrote on Mon, 21 March 2022 06:58
The video outputs 8-pixel by 8-pixel monochrome texts as 64 columns by 48 rows display. The display format is 640x480 60Hz VGA with pixel clock of 25.175MHz. All video data (texts & fonts) are contained in a 4KB dual port RAM that's mapped somewhere in the memory space as a 4KB block of write-only memories. I said "somewhere" because I'm still working out the memory map details so not to conflict with ROMWBW's memory utilization.

Finding a good memory window for RomWBW is a little tricky. Ideally, the window would be in the same 32K bank as RomWBW's HBIOS because the HBIOS code is what will manipulate the display RAM. However, the HBIOS bank is one of the "middle" banks which may not be ideal for other CPUs and OSes. Is the display buffer at a fixed location in physical RAM or can it's location be set programmatically?

Thanks,

Wayne
Re: Generic RetroComputer project [message #9833 is a reply to message #9831] Tue, 22 March 2022 07:30 Go to previous messageGo to next message
plasmo is currently offline  plasmo
Messages: 916
Registered: March 2017
Location: New Mexico, USA
Senior Member
Wayne,
My original though was to place the VGA RAM at the top of RAM disk and reduce the RAM disk's Disk Parameter Block by 4K but finding a 4K block in HBIOS is a better solution. I'm not concerned about compatibility across different processor families; different processors will need different CPLD designs so memory map of VGA RAM can be changed as well. It is also possible to make the VGA RAM relocatable with the addition of a hardware configuration register in CPLD.

For testing purpose I map the VGA RAM to the same bank as the monitor in ROMWBW which is bank 'E', just below the common bank 'F'. Now I can use the monitor's load command to initialize the VGA RAM with the attached file and get this display. I also wrote a small program to read/write VGA RAM vigorously to prove VGA display won't flicker due to read/write access to the video RAM. I believe I have a functioning text VGA display, now let see what I can do with PS2 keyboard...
/forum/index.php?t=getfile&id=2706&private=0

Bill
PS, my, that's a dusty monitor!
Re: Generic RetroComputer project [message #9834 is a reply to message #9833] Tue, 22 March 2022 08:03 Go to previous messageGo to next message
plasmo is currently offline  plasmo
Messages: 916
Registered: March 2017
Location: New Mexico, USA
Senior Member
This is what GRC-Z80 looks like on my bench this morning. Six of its 7 slots are filled; it still all fits inside a CM5-200 box. The 7th slot will be a sound card based on YM2149.
Bill
/forum/index.php?t=getfile&id=2707&private=0
Re: Generic RetroComputer project [message #9840 is a reply to message #9833] Tue, 29 March 2022 17:23 Go to previous messageGo to next message
Wayne W is currently offline  Wayne W
Messages: 385
Registered: October 2015
Location: Fallbrook, California, US...
Senior Member
plasmo wrote on Tue, 22 March 2022 07:30
Wayne,
My original though was to place the VGA RAM at the top of RAM disk and reduce the RAM disk's Disk Parameter Block by 4K but finding a 4K block in HBIOS is a better solution. I'm not concerned about compatibility across different processor families; different processors will need different CPLD designs so memory map of VGA RAM can be changed as well. It is also possible to make the VGA RAM relocatable with the addition of a hardware configuration register in CPLD.

Hi Bill,

Sorry, just saw this message. I'm bad at monitoring this forum since it doesn't send emails yet.

So, yes, if you can map the display buffer to the top 4K of the HBIOS bank, that would probably be ideal. Note that the HBIOS bank is dependent on the size of RAM. Essentially, it is located at MAX BANK - 2. So, in this case it will be bank D.

Thanks,

Wayne
Re: Generic RetroComputer project [message #9841 is a reply to message #9840] Tue, 29 March 2022 21:14 Go to previous messageGo to next message
plasmo is currently offline  plasmo
Messages: 916
Registered: March 2017
Location: New Mexico, USA
Senior Member
Wayne,
No problem. Retrobrewcomputers.org is homepage for my designs; it is where I kept my design blogs so this is the place where I think out loud, not necessarily expecting feedbacks. If I have a burning question I'll email you directly. In any case, I don't have much time during the Spring and Summer time so I can only work on my projects a couple hours here and there. The area I'm concentrating on is 128K version of ROMWBW, PS2 interface, and text VGA display. I'm getting very fond of OX16C954 quad serial port and ROMWBW's support for it. Coalesce the hardware around small-memory ROMWBW, standalone retrocomputers, and multi-channel serial port should give me plenty to work on for next 6 months.
Bill
Re: Generic RetroComputer project [message #9981 is a reply to message #9772] Mon, 20 June 2022 14:47 Go to previous messageGo to next message
mikesmith is currently offline  mikesmith
Messages: 80
Registered: March 2018
Member
plasmo wrote on Wed, 23 February 2022 07:10
for 68008, it is CP/M68K (lame! there must be a better goal!Wink
OS-9. Needs a timer tick at a higher IPL than anything else due to the way serial interrupt coalescing works, so can't (easily, sensibly) be done with the DUART timer.

If I can stop getting distracted by everything else, I hope to have it up and running on the P90 emulator "soonish". Porting would be easier if they'd updated the documentation (it's actually pretty good, but describes something quite different from what's actually distributed).

The 1.2 developer kit (3.2.4) is not hard to find online. I'd be interested in the 1.3 kit (3.3.0) if someone has it, as I think that was the end of the line for OSK.

Re: Generic RetroComputer project [message #9982 is a reply to message #9981] Tue, 21 June 2022 11:47 Go to previous messageGo to next message
plasmo is currently offline  plasmo
Messages: 916
Registered: March 2017
Location: New Mexico, USA
Senior Member
OS-9 is definitely more interesting than CP/M68K. The CPLD board was for bringing up a new system to provide various diagnostic features. Once a system is up and running, the CPLD board is under utilized so adding a 100Hz interrupt source in CPLD should be well within its capability.
Bill
Re: Generic RetroComputer project [message #10296 is a reply to message #9982] Thu, 30 March 2023 06:48 Go to previous messageGo to next message
plasmo is currently offline  plasmo
Messages: 916
Registered: March 2017
Location: New Mexico, USA
Senior Member
Wayne Warthen has released version 3.2 of RomWBW so I'm testing it against my various RomWBW-capble hardware. I have not touched GRC for 6 months so this is a good opportunity to update and do more development on GRC. RomWBW 3.2 is working. I also attached the configuration file for GRC.
/forum/index.php?t=getfile&id=2858&private=0
I have been working on VGA and PS2 keyboard interface lately so I can apply lesson-learned to GRC's VGA/keyboard hardware and finally make it into a standalone computer.
Bill
Re: Generic RetroComputer project [message #10301 is a reply to message #10296] Sat, 01 April 2023 07:34 Go to previous message
plasmo is currently offline  plasmo
Messages: 916
Registered: March 2017
Location: New Mexico, USA
Senior Member
I now have a monitor software for GRC that can take input from either TeraTerm serial emulator on the PC or PS2 keyboard attached to GRC's video/keyboard board. The output is displayed on both TeraTerm on the PC and VGA video attached to GRC. So it is now a standalone computer, at least at the monitor level. The output to TeraTerm and VGA video are the same except in the case of display memory. Non-printable characters (0x0-0x1F, 0x80-0xFF) are displayed as dots (.) on TeraTerm but are displayed as the actual data supported by the corresponding fonts. See the screen capture of TeraTerm display vs picture of the VGA monitor. Note data 0x80 and above is displayed as reverse video. This was suggested by etchedpixels so to enable pseudo graphic character set for all possible permutations of 2x4 blocks.

The CPLD on video/keyboard board is not large enough to support hardware scroll so scrolling is done in software but it is fairly fast with 14.7MHz Z80. CPLD does have enough logic for generating 60Hz interrupt synchronous to video's vertical sync. Up to this point no software needed interrupt, including RomWBW, but 60Hz interrupt will provide a sense of elapsed time.

The last step for GRC-Z80 is implement video/keyboard functions for CP/M.
Bill

[Updated on: Sat, 01 April 2023 07:34]

Report message to a moderator

Previous Topic: HP2100A, maybe, no a PDP-8 first !
Next Topic: New DOS/65 Release - Version 3.20


Current Time: Wed Mar 19 02:51:51 PDT 2025

Total time taken to generate the page: 0.00701 seconds