Skip to content

MartyPC v0.2.0

Compare
Choose a tag to compare
@dbalsom dbalsom released this 02 Apr 02:19
· 69 commits to version_0_2_1 since this release
72f3336

It's been nearly 9 months since the last release of MartyPC. During that time I have rewritten or refactored much of the emulator. Check out this enormous changelog!

Lots of new features mean lots of new bugs, though. I expect a bugfix 0.2.1 will follow shortly. Hopefully, MartyPC now has a much better framework for more frequent releases going forward.

New Features

  • New Display Manager Framework

    • New graphics backend abstraction layer will eventually allow frontends built for other graphics backends such as
      SDL
    • New scaling modes: Choose from Fixed, Integer, Fit and Stretch scaling options
    • Display Apertures: Choose how much of the emulated display field you wish to see:
      • No overscan
      • 'Monitor-accurate' overscan
      • Full overscan
      • Full display field including hblank and vblank periods (for debugging)
    • Hardware aspect correction: Aspect correction is now performed in the shader for reduced CPU load
    • Multi-window support: Define additional output windows in the configuration file
      • Multiple windows can display the same video card, with different display options
      • Windows can be set to a fixed size or scale factor, or made completely resizable
      • Windows can be pinned 'always on top'
      • Windows can be toggled full-screen via CONTROL-ALT-ENTER hotkey
    • Shader support: A basic CRT shader is built into the new display scaler
      • Internal shader features:
        • Barrel distortion
        • Corner radius (rounded corners)
        • Monochrome phosphor simulation
        • Scanline emulation synchronized to emulated video resolution
      • Presets for the internal scaler can be defined in configuration and applied to different windows
  • New ROM Definition Framework

    • ROM set definitions are no longer hardcoded. They will be read from ROM set definition TOML files in the ROM
      directory.
    • Add your own custom ROM sets or contribute missing ROM definitions to MartyPC!
  • New Machine Configuration Framework

    • Define multiple Machine hardware configurations, name them, select them in the main config or via command line
      argument.
    • Configure the amount of conventional memory, the number and type of floppy drives, video cards, serial ports and
      more!
  • New Resource Manager Framework

    • Paths are to 'resource ids' are now fully configurable, and facilities to build file trees are provided.
      MartyPC can create needed directories on startup. The Floppy and VHD browsers have been rewritten to take
      advantage of this new system, and so now you can organize your media directories into subdirectories for
      convenience.
  • EGA Video Card

    • EGA is back! A character-clocked EGA implementation is here, although it may still be a bit rough around the
      edges.
      EGA will continue to be polished in upcoming releases.
    • Features:
      • Functional emulation of each of the 5 LSI chips on the EGA
      • Per-scanline Pel panning - effects like the wibble in Beverly Hills Cop work
      • Line compare register - See the status bar in Catacombs 3d!
      • CGA compatibility mode - Play Alleycat!
      • Software fonts - change your DOS font, or see a graphical mouse cursor in text mode (Norton Utilities 6.0)
    • Known issues:
      • Visual glitches with n0p's Windows 3.0 EGA driver patched for 8088
      • Some more obscure registers not properly emulated / investigated (SOM, etc.)
      • Aperture definitions / adjustments not final
      • Implementation may be slow in parts - more optimization needed (SIMD?)
  • MDA Video Card

    • Not quite as a flashy as EGA, but the MDA card type is now also supported, and moreover, you can install an MDA
      alongside a CGA or EGA card for a dual head display.
    • 9th column rendering and underline attributes supported
    • Includes the framework for a LPT port, which will now be detected
    • Known issues:
      • Needs optimization - due to the 9-dot character clock making 64-bit aligned writes impossible, MDA is
        currently slower to emulate than EGA.
  • New Keyboard System

    • MartyPC now performs low-level emulation of a Model F keyboard instead of directly translating OS input events to
      the core
      • Model M emulation to come
    • Configurable typematic rate and delay
    • International keyboard layouts are now supported via translation files.
      • Translation files support all keycode names defined by w3c: https://w3c.github.io/uievents-code/#code-value-tables
      • Translation files can define direct scancode mappings or full macros
      • Initial translation files include US, UK and IT layouts. More to come. Help appreciated!
    • Configurable hotkey support

Debugger/GUI Improvements

  • Reorganized Debug menu
  • Improved appearance of CPU State display
  • Instruction Trace: In Csv trace mode, instruction trace now has a scrolling table with optional columns
  • Memory Viewer: Fixed scrolling issues, disassembly popup now uses fixed-width font
  • IVT Viewer: Fixed scrolling, IVT entries now animate on change, added annotations
  • Instruction History - fields now align with Disassembly View, and cycle counts have been moved to the right
  • Memory Viewer will now show values for memory mapped regions
  • Improved VHD creator - should no longer be confusing to use
  • Text Mode Viewer - View ASCII contents of video memory, which you can select and copy to clipboard
  • New themes courtesy of egui-themer crate
  • New notification system courtesy of egui-notify crate.
    • Implemented success/error notifications for disk and file operations, screenshots, etc.

Frontend Bug Fixes / Improvements

  • Implemented configurable CPU halt behaviors
  • Re-added CTRL-ALT-DEL menu option
  • New benchmark mode (enable in martypc.toml, or use --benchmark-mode)
  • Floppy and HDD browsers now support subdirectories
  • Write protection can be toggled for floppy drives with configurable default
  • Sound initialization is now optional
  • Added 8088 JSON CPU test generator and validator
  • Added debug_keyboard config flag - this will print keyboard event info to the console for support

Core Bug Fixes / Improvements

  • CPU: Refactored general registers to union types (not any faster, but code is somewhat cleaner)
  • CPU: Refactor PC from u32 to u16 to address segment wrapping issues, implement ip() in terms of PC
  • CPU: Instruction counts properly increment even when instruction history is off
  • CPU: Fixed device ticks after interrupts
  • CPU: Improved Halt/Resume logic and cycle timings (Thanks Ken Shirriff)
  • CPU: New sigrok cycle log format for viewing cycle logs in sigrok PulseView logic analyzer
  • CPU: Updated disassembler to normalize output against iced-x86. Now resolves negative immediates and displacements
  • CPU: Fixed typo for 'bp+di+DISP' in both disassemblers (Thanks Tom Harte)
  • CPU: Brand new, simplified BIU state logic (which now needs to be rewritten, again...)
  • CPU: Fixed & Improved DMA refresh scheduling. (Fixes 8088MPH CPU test)
  • CPU: Fixed issue where Call Stack could grow uncontrollably with recursive code or interrupts
  • CPU: Fixed CS:IP reporting in Instruction trace mode logs
  • CPU: Fixed memory leak in Instruction trace mode (thanks Folkert)
  • CPU: Fixed CPU cycle timings for LES and LDS instructions
  • CPU: Fixed CPU issue where incorrect microcode jump was listed for fixed word displacements
  • CPU: Fixed CPU issue where a prefetch abort would not properly override a prefetch delay
  • PIC: Revised edge-triggered mode to lower INTR if last unmasked IR line goes low
  • PIC: Ignore IMR during INTA pulse
  • PIC: Handle multiple IRR bits being unmasked at the same time
  • PIC: Honor IRQ offset specified in IWC2 to PIC (Thanks Folkert)
  • PIT: Simulate counter write latency. A delay tick will be inserted if a write occurs too close to falling edge of
    clock
  • PIT: Revised count register loading logic. Counting element uses internal reload value
  • CGA: Properly model CRTC last-line flag when hcc < 2
  • CGA: Preliminary CGA snow emulation. Not yet 100% accurate
  • CGA: Properly disable cursor if cursor start > maximum scanline
  • CGA: Reverted color palette entry for black from dark gray to true black
  • CGA: Fully reset the CGA device on reboot. May(?) fix issue with black screens in 8088MPH. (Thanks hirudov)
  • CGA: Don't recalculate composite parameters if mode change was enable bit only
  • Xebec HDC: Proceed from Reset state to WaitngForCommand after a delay (Fixes Minix boot issue)
  • Xebec HDC: Implemented missing Read Sector Buffer command (Fixes panic in IBM diagnostics)