Contents

All building blocks of this system are either developed by me, or are IP cores provided by Xilinx ISE.

CPU: Next186 core, (C) Nicolae Dumitrache, available on OpenCores.
VGA: A custom VGA core which implements the text mode 3h 80x25x256, the MCGA graphic mode 13h 320x200x256 and the VESA graphic mode 101h 640x480x256. The other CGA/EGA/VGA planar modes were of no interest for me, as the CPU and RAM are fast enough to support a decent linear 256 colors palette graphic mode. Unlike the standard VGA, the mode 13h can support 8 hardware pages.
TIMER: a simplified 8253
PIC: a simplified 8259 programmable interrupt controller
Kb, Mouse: a simplified 8042 PS2 controller
Hard Disk - a SD HC 4GB external memory card is used as HD. For simplicity, I access it in SPI mode, being able to get a transfer rate up to 2 MB/s. All the transfer work is done by the CPU, with a minimal hardware interface.
RS232: software driven interface, 1bit in and 1 bit out
Speaker sound
Reset button
NMI button (useful for debugging, see Turbo Debugger)
HALT LED
No DMA is necessary, as Next186 CPU is able to transfer up to 33MB/s with REP MOVSW.

More details are commented in the Verilog sources and in the BIOS code.

The CPU clock is independent from DDRAM clock (133MHz), and it can be adjusted from the CPU DCM. I managed to make it work stable at 33.3333Mhz on Spartan3AN FPGA (up to 33MIPS). The bus interface between CPU and the cache memory is 32bit width and it is working at double the CPU frequency (66.6666MHz). All 8/16bit I/O CPU operations are done at 33.33333 MOP/s.

Booting

The system have no ROM, only 64MB of dynamic RAM and 4KB of code/data cache (8 lines of 256 bytes). In order to be able to boot, the cache is preloaded with the bootstrap code and marked as "dirty". At the first flush, the cache content will be transferred to RAM.
The bootstrap code tries to load the BIOS (8KB) from the latest 16 sectors of the SD card, at 0F000h:0E000h. If the SD card is not present, or BIOS is unavailable, the bootstrap code waits on RS232 (115200bps) an executable, loads it at 0f000h:100h and executes it.

'

Memory

The system uses all the dynamic RAM available on the Spartan3AN FPGA board (64MB at 133MHz). The memory is split as follows:
640KB low DOS memory
512KB video memory (which can be mapped over segments 0a000h and 0b000h)
224KB upper memory, available to DOS through the XMM manager
32KB ROM area, from which only the latest 8KB are actually used by the BIOS code.
2MB available for the old INT15h extended memory mechanism

The rest ~61MB is available as extended memory (XMM), and in my DOS configuration, is used as follows:
2MB for smartdrv (increases a lot the disk access)
28MB RAM disk (not really necessary, as the SD hard disk + smartdrv is fast enough, but 64MB RAM is too much for DOS)
16MB EMM (I use a LIMulator for 286)
15MB XMM

The RAM is accessed in parallel by the CPU and the VGA. VGA uses a 2KB FIFO and have priority over CPU when the FIFO is empty. When the FIFO is not empty, the CPU have priority.
The VGA bandwidth occupy max ~7% of DRAM transfer capacity (in 640*480 resolution), allowing the CPU to access the RAM (including video RAM) with almost no penalty. The effective RAM (including video) CPU transfer rate is 20-30MB/s (and 40-60MB/s fill rate).
The RAM is divided in 64Kb pages. Each page can be mapped over each of the first 16 64Kb segment addresses. This mechanism is used for accessing the video memory in mode 13h (8 pages) and mode 101h VESA, and also for the extended/expanded memory access.

Software

I provided in the package the assembler source code for the boot loader and for the BIOS.
The BIOS code is quite small, taking only 8KB beginning with 0f000h:0e000h. All the rest of the RAM upper memory is available for DOS.
The VESA VBE interface and all required paged memory access code for XMM is contained inside the BIOS.
A RS232 communication application executable is also provided (SerialComm.exe). It can be used to transfer applications or files from a PC to the Next186 SoC through a serial link.

Lately I installed GEOS (Geoworks Ensemble v2.0 and Breadbox Ensemble v4.1.2). With 16MB XMS swap space, almost 900KB global heap (in the first megabyte), and a CPU ~80 times faster than standard XT, it's working like a charm in VESA 640x480x256 colors.