kr260-pc · part 5 of 7
The 386: caches, a local bus and a VGA
The AT board with a 386 in place of the 286: nand2mario’s z386, which is built around the original Intel microcode, with its caches, a second-level cache in front of DDR, and a VGA.
The system
The CPU runs on the machine clock and isn’t held to a period speed; TopBench rated an earlier build at about a 386DX-40. ISA cards keep their 8 MHz timing.
Specs
| CPU | z386, an 80386 without x87, on the 57.27 MHz machine clock |
| Caches | 16 KB instruction, 16 KB data; 128 KB second level |
| Memory | up to about 16 MB: 640 KB + 1 MB in UltraRAM, the rest in DDR |
| BIOS | PhoenixBIOS A286 1.01 (IBM’s refuses the speed), XTIDE Universal BIOS |
| Video | VGA, 256 KB, Bochs VGABIOS |
| Sound | Sound Blaster Pro, OPL3, PC speaker |
| Disks | floppies, two IDE channels with disks and an ATAPI CD-ROM |
| Other | NE2000, serial mouse, real-time clock |
What we ran on it
- MS-DOS 6.22 and FreeDOS
- Windows for Workgroups 3.11 in 386 enhanced mode
- V86TEST, our own test of paging, V86 mode, protection and interrupts
Built from
| Part | From | Licence | What we changed |
|---|---|---|---|
| CPU | z386 (nand2mario) | Apache-2.0; Intel’s microcode, not redistributed | see below |
| OPL3 | Greg Taylor’s opl3_fpga, via ao486_MiSTer | LGPL-3.0 | runs on our machine clock |
| Floppy, PIC, timer, DMA | as on the AT | ||
| VGA reference | MartyPC, 86Box | MIT, GPL-2.0 | – |
| Vendor BIOS | PhoenixBIOS, from 86Box’s ROM collection | vendor, not redistributed | – |
What we changed in z386
- The caches write their arrays so that Vivado infers RAM: before that, the caches alone were bigger than the chip’s budget.
- Reset clears CR0, a triple fault shuts the CPU down, and the A20 gate masks addresses ahead of the caches: MS-DOS 6.22 needed the last two.
- Probing for a missing coprocessor leaves memory alone, and BSF’s result is its own: both found while getting Windows into enhanced mode.
- I/O permission checks, single stepping and the debug registers in V86 mode.
- A cache fill that a store races no longer installs stale code (found with the 486’s copy of the same cache and Second Reality).