非 Windows 平台或需要最新开发版时需从源码构建,构建步骤见 Wiki 的 Building MartyPC 指南;README 未说明是否需额外下载 BIOS/磁盘镜像;Adlib 模拟 CPU 占用较高,慢机器上可能卡顿。

cargo build --releaseREADME 未说明具体显存或 CPU 要求;Adlib OPL2 模拟较吃 CPU,需要较快的电脑;支持 Windows、Linux、macOS。
周期精确的 IBM PC/XT/Jr/Tandy 模拟器,面向复古 PC 开发调试
用 Rust 写的 IBM PC/XT/Jr 和 Tandy 模拟器,主打周期精确,能忠实还原老机器上软件和游戏的运行时序。
核心能力
- 8088 CPU 周期精确模拟,通过 8088 V2 测试套件 99.9997% 周期准确
- 内置调试 GUI,支持反汇编、CPU 状态、内存查看和断点
- 支持 CGA/MDA/Hercules/EGA 及开发中的 VGA 显卡模拟
- 模拟 8253 定时器、8259 中断、8237 DMA 等外设芯片
- 支持双显卡多显示器配置与可配置 CRT 着色器
容易踩的坑
- 0.4.1MartyPC v0.4.1最新正式版2025-05-31 · 2025-05-31 22:21 UTC
MartyPC 0.4.1
This is mostly a bugfix release, although there is one new feature: the V20's 8080 emulation mode is now supported. This hasn't been as rigorously tested as I'd like, so please report any issues you may encounter.
Frontend Bug Fixes / Improvements
- Added 'custom' ROM feature flag to make it easier to load custom ROM extensions.
- Removed bad IBM ROM definition file
- Added 'repeat' field to ROM definitions and changed IBM ROM definitions to use it - fixes 1982 5160 BIOSes
- Fixed CPU Status window updating when paused/stepping
- Fixed PIQ flush on V20 CPU
- Added Mode flag to CPU Status Window when using a V20 CPU
- Fixed --machinescan option
- Improved unique filename generation function - avoids O(n) behavior as file list grows (now O(log N), O(1) with hint)
Core Bug Fixes / Improvements
- Preliminary support for the V20's 8080 emulation mode
- Fixed VGA cursor disable bit (Ferraro reference had it backwards)
- Fixed controller support on Windows 7
- Added additional hard disk geometries to Xebec controller
- 0.4.0MartyPC v0.4.02025-05-12 · 2025-05-12 01:28 UTC
查看更新说明
0.4.0 (2025-05-11)
This update brings a massive list of new features, so here's a quick summary:
- New sound system and sound devices including Adlib, Disney Sound Source, and SN76489 3-voice sound
- New floppy disk image library enabling a ton of new floppy disk image types and support for several copy protections
- New frontend supporting both native and WASM, support for native file dialogs
- ATA device emulation, supported by XT-IDE and jr-IDE devices for larger hard disk support
- VGA support and improved PCjr and TGA video emulation
- Memory and register editing
New
eframeFrontendSome dependency API changes prompted me to switch window frameworks. The active Desktop frontend for MartyPC is now based on a customized fork of eframe.
Native File Dialogs
- The RFD crate provides access to native file dialogs for your particular OS, including File Open and Save dialogs.
- Startup errors are now reported via a system MessageBox. You should no longer have to rely on the command line output to tell why MartyPC didn't start.
New Devices
-
VGA
- The IBM VGA card is emulated at last. MartyPC's VGA is based off its EGA implementation, with appropriate changes and additions. Clocked up to 28Mhz, the VGA is an expensive device to run at a character-clock accurate rate, so you may need a fast computer. Mode 13h and ModeX/Y are supported (Wolfenstein 3D's 'ModeY' works!).
- The Video Card debugger window will show you the VGA's register state, including the current palette in realtime.
-
XTIDE Hard Disk Controller
- An XTIDE Rev 2 device can now be emulated. Since this BIOS is open-source, a machine configuration that includes hard drive support is now the default:
ibm5160_xtide. - If you want the 'authentic retro' experience, the IBM/Xebec controller is still available as
ibm5160_hddas usual. - The VHD creator has been updated to support the wide selection of common hard drive geometries that the XTIDE can support. You'll need to be running a machine with the XTIDE configured to see them.
- It is now possible to take a VHD file from 86Box (assuming you created it as a 'fixed' VHD) and use it in MartyPC (and vice versa!).
- An XTIDE Rev 2 device can now be emulated. Since this BIOS is open-source, a machine configuration that includes hard drive support is now the default:
-
jr-IDE Hard Disk Controller
- To go along with the XTIDE, you can now emulate the jr-IDE. This gives you LBA-enabled ATA hard disk support and 736k of conventional memory backfill for your PCjr.
-
Adlib Music Card
- The first audio device in MartyPC besides the PC speaker is the Adlib Music Card. OPL2 emulation is provided by the highly-accurate nuked-opl3 library.
-
SN76489
- The 3-voice sound chip found in the IBM PCjr and Tandy 1000 will be automatically installed on these machines.
-
Disney Sound Source
- If you have a parallel adapter specified, you can attach a Disney Sound Source, and enjoy various squawky digitized sounds in games that support it (Mostly Disney titles, Wolf 3d, Prince of Persia, and a few others. See Mobygames for a list of supported titles).
-
Memory Expansion Cards
- Conventional memory expansion cards can now be specified, at any address and with any capacity. It is possible to have non-contiguous memory regions if you decide to do so, but caveat emptor.
- An overlay for the IBM PCjr called 'pcjr_memory_sidecar' will provide an extra 512k to bring your PCjr up to 640k.
Bitstream-level Disk Image Emulation
The inclusion of the fluxfox disk image library has greatly expanded MartyPC's floppy disk image support, and enabled support for several copy protection schemes.
Disk Image Support
Fluxfox supports reading a wide array of disk image formats:
- TD0 (TeleDisk)
- IMD (ImageDisk)
- PSI (PCE Sector Image)
- TC (TransCopy Image)
- PRI (P
- 0.2.2MartyPC 0.2.22024-06-22 · 2024-06-22 16:32 UTC
查看更新说明
MartyPC 0.2.2 is here!
Known Issues
-
You may get a Windows SmartScreen notification that this application is 'unknown'. You will need to click 'run anyway'. The MartyPC Windows executable is signed via Sectigo; I have done all I can think of to appease Microsoft, and not sure what else to do. This is NOT a malware warning.
-
WGPU support for older GPUs has moved from DirectX to OpenGL. If you are running an older graphics card or integrated graphics adapter and experience poor performance, please set the following user environment variable:
WGPU_BACKEND=gl- macOS users on Intel may experience colored stripes on the screen in fullscreen mode. Enable
macos_stripe_fixin the configuration to resolve this.
New devices
-
LoTech 2MB EMS Board
- Added emulation of the LoTech 2MB EMS Card
This card can be added to any machine configuration via the
lotech_emsoverlay. You can specify the window segment and IO base address. However, these values must match one of the values supported by the real hardware or the driver won't work with it.
- Added emulation of the LoTech 2MB EMS Card
This card can be added to any machine configuration via the
-
Game Port and Joystick
- Added emulation of the IBM game port card, and basic keyboard-based joystick emulation. There is a new keyboard
hotkey (
JoyToggle) to turn this on and off (provisionally defined as Ctrl-F9), as well as configurablejoystick_keysin the configuration you can use to define what keys control the joystick. - PCJr and Tandy 1000 machines will have a game port installed automatically. You can add a game port to any PC or XT
configuration via the
game_portoverlay. - Two two-button, two-axis joysticks are assumed to be connected when you specify a game port. Different joystick configurations may be supported in the future.
- Added emulation of the IBM game port card, and basic keyboard-based joystick emulation. There is a new keyboard
hotkey (
-
PCJr Cartridge Slots
- Added support in the core, frontend and GUI for PCJr cartridges in JRipCart format. Inserting or removing a cart will reboot the machine. You will only see the cartridge slots when using the PCJr machine.
Frontend Bug Fixes / Improvements
- Added a new resource type 'cartridge' and menu interface to browse and select PCJr Cartridges.
Core Bug Fixes / Improvements
- SERIAL: Fixed many issues in MartyPC's 8250 UART emulation. PCjr now boots without error code 'D' and Checkit2 serial diagnostics also pass.
- BUS: Implemented a
terminal_portconfiguration option under[machine]in the main configuration. Writes to this port will be printed to the host's terminal. - MC6845: Fixed an issue preventing entering vertical total adjust period if vertical total was 127. Fixes some Hercules display issues.
- HERCULES: Increased the size of the Hercules' display field to accomodate some CGA emulators that drive the MDA monitor slightly out of sync (Fixes BBSIMCGA)
- CGA: Added CGA's external mode register to debug output
- MACHINE: Added a facility to record disassembly listings from running code. The output filename is set by
disassembly_fileunder[machine]in the main configuration. Basically, this feature saves instruction disassembly to a hash table by CS:IP. Modification of code segments will override previous disassembly, so it is most useful to toggle this feature on and off for specified periods.
Debugger Bug Fixes / Improvements
- Serial Status window: Displays serial port registers and statistics.
- IO Status Window
- Added a 'reset' button to reset all the port counters.
- Added the last read byte value for each port
- Fixed panic/crash when resetting machine with the IO Stats window open and scrolled.
Distribution Changes
- Added a SvarDOS-based MartyPC boot diskette to media/floppies/boot. This disk will load the LoTech EMS driver and CTmouse driver.
- Moved FreeDOS to media/floppies/DOS
- Added SvarDOS build 20240201 diskettes to media/floppies/DOS
- Added ctmouse
-
- 0.2.1MartyPC v0.2.12024-06-09 · 2024-06-09 15:50 UTC
查看更新说明
MartyPC v0.2.1
MartyPC v0.2.1 contains dozens of bugfixes, accuracy improvements, new debugger features, a new CPU (NEC V20), new video cards, machine types and more!
New BIU logic
-
0.2.0 introduced new BIU logic. Unfortunately, 0.2.0 took so long that this 'new' logic already needed replacement. With the discovery of the 8088's 7-cycle bus access time, far simpler BIU logic is possible and has been implemented in 0.2.1. For more information, see my corresponding blog post.
-
Along with this new logic comes a slightly different cycle log format; I'm probably the only person on earth that reads these logs, but it's worth mentioning. Several old state columns are gone, and now bus and T-cycles are displayed within two separate 'pipeline slots'.
New CPU Framework
- MartyPC now has a framework to support multiple CPU types, so we can have CPUs other than the Intel 8088. There is a slight performance hit involved in not hardcoding a specific CPU, but I believe there are some strategies I can use to mitigate this.
New CPU Type
- An initial implementation of the NEC V20 has been added. All native-mode V20 instructions are implemented (except BRKEM). This is not cycle-accurate yet, as it was copied and modified from the 8088.
- The Arduino8088 project and the test generation engine of MartyPC were refactored and improved to enable generation of a CPU test suite for the V20, which will be used to incrementally improve V20 emulation accuracy over time. 8080 emulation mode will be added in the future. The V20 test suite can be found here.
- You can add a V20 to any 8088-based machine by adding the
cpu_v20overlay.
New Machines
- Added Tandy 1000 and IBM PCJr machine types and ROM definitions. These are still very much a work in progress.
- Tandy 1000 is mostly functional, and can accept a ibm_xebec hard disk controller (I will eventually dump the Tandy hard disk controller ROM, but it is a Xebec controller).
- IBM PCJr needs cartridge browser support and PIO mode implemented for the floppy disk controller.
- RAW cartridge images can be loaded as ROMs using the standard ROM definitions; however this is less than ideal. I will be adding support for standard PCJr ROM dump formats.
New Video Types
-
To go with these new systems, there is now a TGA graphics type. Again, a work in progress.
- Tandy BIOS identifies the TGA and will boot into 8x9 text mode. Display apertures were tweaked for TGA to support this "tall" mode.
- TGA adapter operates very differently from other adapter types as it does not have its own VRAM.
- New core functionality was required to allow mapping of MMIO reads and writes back to system memory.
- High-resolution 640x200 2bpp mode not yet implemented.
-
PCJr graphics are implemented as a subtype of TGA adapter
-
Initial support for Hercules graphics card as a subtype of MDA adapter. Still a bit glitchy.
Frontend Bug Fixes / Improvements
- Added missing overlay for dual 360k floppy configuration (thanks DragomirPazura)
- Fixed loading of keyboard mapping files
- Added CPI (Cycles Per Instruction) to benchmark mode.
Debugger Bug Fixes / Improvements
- Added cycle stopwatch UI to CPU Control window. The stopwatch allows you to set two 'breakpoints' and measure execution time between them.
- 'Step-over' logic overhauled. Step-over cycle timeout removed. A step over may not terminate, but this is in line with
other debuggers. On further feedback, dropping you off in a random location after timeout was not useful.
- The expected return address will be displayed in the CPU Control window in the event a step over does not return.
- You can now step-over
repstring operations. - Re-entrant instructions such as
repstring
-
- 0.2.0bMartyPC v0.2.02024-04-02 · 2024-04-02 02:19 UTC
查看更新说明
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
- Internal shader features:
-
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 attr
-
用户点评
登录用户的真实使用记录,可按版本和硬件筛选还没有人点评。第一个说出真实体验的人最有价值。

MartyPC is an emulator of early IBM PCs and compatibles. It supports Windows, Linux and macOS.
Try MartyPC in your web browser!
User Guide
Click here to access the MartyPC User Guide
Downloading MartyPC
Builds are available through periodic releases. Newer, automatic builds are available via the Actions tab under the Artifacts for each workflow run. (You will need to be logged in to GitHub to download Artifacts).
Building MartyPC
If you're not on Windows, or you want the latest bleeding-edge version, you'll need to build MartyPC from source.
- Last Released Version:
0.4.1 - Current Developement Version:
0.5.0
See the Building MartyPC guide on the MartyPC Wiki for build instructions.
Why another PC emulator?
MartyPC began as a hobby project to see if I could write an emulator from scratch while learning the Rust programming language. My original goals for MartyPC were modest, but it has reached a level of functionality that I could have never imagined.
MartyPC's intended niche in the emulation world is an aide for retro PC development. It is packed with debugging tools and logging facilities, with many more planned. It may not be as user-friendly to set up as other emulators, but if you are familiar with editing configuration files you shouldn't have any major problems. Programmers writing software for the Intel 8088 can see and measure the exact cycle-by-cycle execution of their code.
Accuracy
Development of MartyPC started in April 2022. I began work on making MartyPC's 8088 CPU emulation cycle-accurate in November 2022. To do so, I validated the operation of the CPU against a real 8088 CPU connected to an Arduino MEGA microcontroller. See my Arduino8088 project for more details. This allows an instruction to be simultaneously executed on the emulator and a real CPU and the execution results compared, cycle-by-cycle. More info on this process is described on my blog.
In June 2024 I updated the 8088 test suite once again to support exercising of the 8088's prefetch queue. Many more cycle inaccuracies were found and corrected. MartyPC passes the 8088 V2 Test Suite with 99.9997% cycle-accuracy.
Extensive hardware research has been performed to improve MartyPC's peripheral emulation as well, including investigating the 8253 timer chip with an Arduino, investigating DMA timings with an oscilloscope, and ultimately, building a bus sniffer using a logic analyzer.
In April 2023, MartyPC became accurate enough to run the infamous PC demo, 8088 MPH.

In May 2023, MartyPC became the first PC emulator capable of emulating every effect in the PC demo Area 5150. (See video here: https://www.youtube.com/watch?v=zADeLm9g0Zg)

Features
Currently, MartyPC can emulate the following systems:
- The IBM Model 5150 (PC)
- The IBM Model 5160 (XT)
- Generic Turbo XT
- The IBM PCjr
- The Tandy 1000
Device Support
MartyPC emulates the following devices:
-
CPUs:
- Intel 8088 - A cycle-accurate implementation of the Intel 8088 including the asynchronous BIU, processor instruction queue and prefetch logic. Tested for correctness and cycle-accuracy against hardware.
- NEC V20 - A preliminary implementation of the NEC V20 CPU. Cycle-based, but not fully cycle-accurate or as performant as the real thing, as timings have not been adjusted from the 8088 that was used as a base. All native-mode V20 instructions are implemented and tested for correctness against hardware.
-
System Hardware:
- 8255 PPI - Low-level keyboard emulation is supported via the PPI and keyboard shift register. Supports the 'turbo bit' found in TurboXT clones.
- 8259 PIC - Mostly complete, but still missing advanced features such as priority rotation and nested modes.
- 8253 PIT - Highly accurate, supporting PCM audio.
- 8237 DMAC - Mostly implemented, but DMA transfers are currently "faked". DRAM refresh DMA is simulated using a scheduling system.
- 8250 UART - Supports serial passthrough or mouse emulation.
- Game Port - Supports two analog joysticks with two buttons each.
- Parallel Port - Enough of a basic parallel port is emulated to be detected, but is not really functional for any purpose yet.
-
Video Devices:
- CGA - A dynamic, cycle-or-character clocked implementation of the IBM CGA including the Motorola MC6845 CRTC controller allows MartyPC to run demanding PC demos like 8088MPH and Area5150. MartyPC takes a unique approach to PC video card emulation by simulating the entire display field - including overscan. Composite output and monitor simulation is supported, via reenigne's excellent composite conversion code (also used by DOSBox and 86Box)
- TGA - A character-clocked implementation of the PCJr and Tandy Graphics Video Gate Array. Work in progress.
- MDA - A character-clocked implementation of the IBM MDA card built on the Motorola MC6845 CRTC controller.
- Hercules - The MDA device optionally supports emulation of the Hercules Graphics Adapter.
- EGA - A character-clocked implementation of the IBM EGA builds on the techniques used developing the CGA. It is structured to replicate the logical functions of each of the LSI chips on the original hardware. It supports redefinable fonts, vsync interrupts and per-scanline pel-panning for smooth scrolling.
- VGA - IBM VGA card emulation is in development, but graphics modes such as Mode 13h and Mode X are working.
-
Sound Devices:
- PC Speaker - Not really its own sound device, the PC speaker is driven by MartyPC's timer chip emulation. It can produce reasonable quality PWM audio in demos such as 8088MPH, Area5150, and Magic Mushroom.
- Adlib - The original Adlib Music Synthesizer is emulated, with OPL2 emulation provided by nuked-opl3, via my opl3-rs bidings. This is a bit CPU heavy, so you'll need a fast computer.
- SN76489 - The 3-voice sound chip found in the Tandy 10000 model line and the IBM PCjr is emulated - with a neat debug display that provides UV meters and oscilloscope views of each channel.
- Disney Sound Source - The Disney Sound Source was an inexpensive parallel DAC with a 16-sample FIFO and volume knob. Not a lot of games support it, but it works well in the few titles that do.
-
Storage Devices:
- µPD765 FDC - Currently robust enough to support both DOS and Minix operating systems. MartyPC uses my disk image library, fluxfox, which allows it to support a wide variety of PC disk image formats. MartyPC's FDC emulation is still not as accurate as I'd like it to be, but it can support a number of copy-protected titles, given a disk image of the appropriate format.
- IBM/Xebec 20MB HDC - Emulated with basic VHD support. MartyPC currently supports a single disk geometry of 20MB when using this controller.
- XT-IDE - Emulation of the XT-IDE Rev 2 board allows MartyPC to support a wide range of hard disk formats. This emulation is still in early stages, and may be a bit rough around the edges. Not all ATA commands are implemented.
- jr-IDE - Emulation of the jr-IDE provides the IBM PCjr machine with IDE hard disk support and 736K of memory backfill. Other features such as the RTC and flash are not yet implemented.
- PCjr Cartridges - PCjr cartridge ROMs are supported, in JrRipCart (.JRC) format
-
Memory Expansion Devices:
- LoTech 2MB EMS Card - 2MB of EMS memory is made available via the LoTech EMS board.
- Generic Memory Expansion Cards - Memory expansion cards can be defined for either the ISA bus or PCjr SideCar expansion slot.
-
Input Devices:
- Keyboard Support - IBM Model F, Tandy 1000, and PCjr keyboards are emulated.
- Serial Mouse - A standard Microsoft serial mouse can be connected to the COM port of your choice.
- Joystick - Game port joysticks are emulated via configurable keyboard controls.
- Light Pen - A light pen is emulated for the CGA card and the PCjr.
Dual-Head Support
MartyPC supports dual-video card and multi-monitor configurations, so you can run a secondary monitor powered by an MDA or Hercules adapter - even in the same window. Each display viewport can receive independent shader configurations.

Configuration Support
MartyPC supports custom machine configurations via base machine configuration profiles plus optional extensions called 'overlays', analagous to installing extension cards or other upgrades.
Debugging Support
MartyPC has an extensive debugging GUI with several useful displays including instruction disassembly, CPU state, memory viewer, and various peripheral states. Code and memory breakpoints are supported. MartyPC also supports instruction and cycle-based logging.

Shader support
A basic, configurable CRT shader is included with more to come (LibraShader support is planned)

Screenshots
For more, check out the Screenshot Gallery section of the Wiki!
Special Thanks
I have a long list of people to thank (See the About box!), but I would especially like to mention the contributions made by reenigne. Without his work reverse-engineering the 8088 microcode, this emulator would never have been possible. I would also like to thank Ken Shirriff and his excellent blog, covering much of the silicon logic of the 8086 (and 8088 by extension).