Skip to content

z486MEGA65 v0.2.2

Choose a tag to compare

@TiwazM TiwazM released this 14 Nov 20:58
· 11 commits to main since this release

A point release of z486, nand2mario's 486DX2-class PC from z486_MiSTer, on the MEGA65 R6.

v0.2.2 is about compatibility. OS/2 Warp 4 installs and runs, Linux finds its clock, its mouse and its hard disk, Chris's 3D Benchmark and SpeedSys run through, and the SD card controller now copes with what real cards do.

What's new

OS/2 Warp 4

  • Installs from its CD onto the hard disk and boots to its desktop. It took the CPU fixes below, and a BIOS that clears conventional memory at every start, so that OS/2's boot CD starts again after a reset (before: SYS02025).

Linux

  • The real-time clock starts in 24-hour mode, as on MiSTer. Linux's RTC driver refuses a 12-hour clock, and TinyCore waited for /dev/rtc0 for ever.
  • The PS/2 mouse is found: the keyboard controller now answers Linux's mouse port test while the mouse port is off. i8042.noloop is no longer needed.
  • The hard disk reports the usual 16 heads and 63 sectors per track instead of 256 sectors, which Linux 2.0 to 2.4 can't hold (Damn Small Linux stopped with a divide error). The BIOS sees existing disk images exactly as before, so their partitions and installed systems are unaffected.
  • Tested: TinyCore with CorePlus to its desktop with the mouse; Damn Small Linux 4.4.10 from its CD, and installed onto the hard disk, its X up to 800x600 in True Color.

CPU and FPU fixes

  • An FPU store waits for a busy FPU instead of taking its 386 routine. Chris's 3D Benchmark runs through: score 43.3, 25.9 fps (before: "Floating Point exception").
  • Setting CR0.PE keeps the CS selector, and the BIOS carries the dated ID string SpeedSys looks for: SpeedSys 4.78 runs through (CPU 23.19, hard drive 1902).
  • For OS/2: an interrupt taken right after an exception no longer pushes an error code; a call gate's own invalid-TSS fault pushes the error code OS/2 expects (its ring-2 stack switch); FNSAVE in 32-bit code on a 16-bit stack writes its whole image to the right place (OS/2's kernel took a page fault); a repeated microcode step no longer outlives its instruction (OS/2 froze at 0148:7E92 on its first boot from the hard disk).
  • For Linux: a queue flush no longer drops a microcode memory read (an oops in TinyCore's CorePlus); an FNSAVE that page-faults can run again (CorePlus crawled while handling signals).

Disks

  • A CD read while the hard disk is writing no longer stops both drives (Damn Small Linux's installer ended with I/O errors on both).
  • The SD card controller follows the MEGA65 team's notes on real cards (their 890-sdcard-native work): it first ends a read a card may still be in (after a JTAG load or a reset), tries native and SPI mode twice each, gives slow and late cards more time, and in SPI mode waits until the card is ready before every command. Both cards now start native, 4-bit at 50 MHz, after JTAG loads too, and SpeedSys's hard drive figure went from 1685 to 1902. SPI mode is tested on the board as well, at about 2 MB/s.

Tested

On an R6 with v0.2.2:

  • Windows 95, and in its DOS: Chris's 3D Benchmark, SpeedSys, the Superscape benchmark 49.5 fps, PC Player Benchmark 13.7 fps, and Quake timedemo demo2 8.0 fps with its CD music from a BIN/CUE while it loads from the hard disk
  • OS/2 Warp 4 from the hard disk
  • Damn Small Linux: installed onto the hard disk, and booted from it
  • FreeDOS from a floppy image, with a second image as B:
  • PIOTEST (24 MB without a wrong byte) and a copy-and-compare on the hard disk, with the card in native mode and in SPI mode
  • menu settings kept across core loads; the internal SD slot empty
  • this .cor flashed with MEGAFLASH as the default core, and started from flash

With the v0.2.2 test cores: the full OS/2 Warp 4 install, a Windows 98 SE install from its CD, and TinyCore's desktop with the mouse. Everything listed for v0.2.1 is unchanged.

Tips:

  • TinyCore / CorePlus: add rootfstype=ramfs to the boot line. Its default root filesystem may use only half of the 64 MB, and CorePlus's extensions run out of memory in it.
  • Damn Small Linux on the hard disk: pick the plain "DSL" entry in its boot menu. The "fb" entries need a linear framebuffer (see Known limits).
  • Windows 95: its boot menu's "Previous version of MS-DOS" swaps the start-up files. If that session ends early (a core load, the power), Windows 95 hangs at its next start until they're swapped back.

Getting started

  1. Copy z486-R6-v0.2.2.cor to the SD card and flash it with MEGAFLASH. It shows as "z486", version v0.2.2, and MEGAFLASH can now make its slot the default core. The .bit is the same core, for loading over JTAG.
  2. Put the BIOS files on the SD card. They're not included here: they come with z486_MiSTer in verilator/, the same files MiSTer users put in games/Z486.
/z486/boot0.rom    the system BIOS (required)
/z486/boot1.rom    the VGA BIOS (required)
/z486/hdd.img      optional: the hard disk at start-up (a raw disk image)
/z486/cdrom.cue    optional: the CD-ROM's disc at start-up (its files in /z486)
/z486/cdrom.iso    optional: the same as an ISO image
/z486/floppy.img   optional: drive A: at start-up
  1. Press HELP for the menu, to mount images and pick the HDMI mode.

Coming from v0.2.1: the menu is the same, so your settings are kept.

Known limits

  • A 486 at 66 MHz with a microcoded FPU: Pentium-era 3D games are slow.
  • The ET4000 has no linear framebuffer (the W32's linear window). Games that bring SciTech's UniVBE engine can show a black screen while they run (The Eleventh Hour), and Linux's VESA framebuffer (vga=791 and the like) stops with "undefined mode number".
  • OS/2's SVGA support finds 256 KB of video memory, so its desktop stays at 640x480 in 16 colours.
  • Windows draws the mouse pointer itself (the ET4000AX has no hardware cursor), so it can flicker when the picture under it changes.
  • In native HDMI mode the picture is measured one line short, so the top line can be missing.
  • With the internal SD slot empty, the MEGA65's own start-up reads the back card in SPI mode, and a card stays in SPI mode until it loses power. The PC's disks then run about 40 % slower. Take the card out and put it back in, or start the MEGA65 with a card in the internal slot.