martypc README

The project's README from github.com/dbalsom/martypc. As one markdown file: README.md.

oo

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.

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.

8008mph01

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)

8008mph01

Features

Currently, MartyPC can emulate the following systems:

Device Support

MartyPC emulates the following devices:

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.

dualhead

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.

debugger01

Shader support

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

shaders01

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).

Thanks to Jetbrains for providing MartyPC with licenses for Jetbrains products.

JetBrains logo.

martypc (dbalsom/martypc)

Searching Database…

Что это такое?MartyPC — это эмулятор ранних IBM PC и совместимых машин с точностью до такта, написанный на Rust. Он воссоздаёт оригинальные IBM PC, XT, PCjr и Tandy 1000 вплоть до отдельных тактов процессора.
Какие машины он умеет эмулировать?Пять систем: IBM Model 5150 (PC), Model 5160 (XT), обычные клоны Turbo XT, IBM PCjr и Tandy 1000 — с эмуляцией их процессоров, видео-, звуковых чипов и накопителей на уровне устройств.
Как его запустить?Скачайте сборку из периодических GitHub-релизов (свежие автоматические сборки лежат во вкладке Actions в виде артефактов) или попробуйте прямо в веб-браузере. На системах, отличных от Windows, а также чтобы получить самые последние изменения, соберите программу из исходников по руководству из вики.
Он пойдёт на обычном компьютере или эмуляция съест весь процессор?Как правило, нет, но эмуляция чипа OPL2 музыкальной карты Adlib нагружает процессор, так что если включите эту звуковую карту, понадобится быстрый компьютер.
Его просто настроить, или придётся возиться с конфигами?Готовьтесь править файлы конфигурации: автор признаёт, что по удобству настройки MartyPC уступает другим эмуляторам, хотя базовые профили машин плюс необязательные расширения-'overlay' (по сути карты расширения) делают задачу посильной.
Он для игры в старые DOS-игры или это скорее инструмент для разработчиков?Подходит и то и другое, но его основная ниша — подспорье для разработки под ретро-ПК: программа напичкана средствами отладки и логирования, а программисты, пишущие софт под 8088, могут измерять точное выполнение своего кода такт за тактом.
Что «точность до такта» означает на практике?Эмуляцию процессора 8088 проверяли против настоящего 8088, подключённого к Arduino, сравнивая результаты такт за тактом. MartyPC проходит тестовый набор 8088 V2 с точностью 99,9997% и может запускать требовательные демо вроде 8088 MPH и Area 5150 — в мае 2023 года он стал первым эмулятором ПК, воспроизведшим все эффекты последнего.
Он реально может загрузить DOS и запустить старые программы?Да — контроллер гибких дисков достаточно надёжен, чтобы загрузить DOS и Minix, а через библиотеку образов дисков fluxfox он работает со многими форматами, включая некоторые защищённые от копирования игры. Жёсткие диски работают через контроллер IBM/Xebec на 20 МБ (VHD) или XT-IDE, а картриджи ROM для PCjr загружаются из файлов .JRC.
Какие видео- и звуковые карты он эмулирует?Видео: CGA (с композитным выходом и симуляцией монитора), MDA, Hercules, EGA с переопределяемыми шрифтами и плавной прокруткой, PCjr/Tandy TGA, а также VGA, где уже работают Mode 13h и Mode X. Звук: PC speaker, Adlib OPL2, Tandy/PCjr SN76489 и Disney Sound Source. Поддерживаются две видеокарты сразу — даже в виде двух областей просмотра в одном окне.
Какие инструменты отладки в него встроены?Отладочный GUI с дизассемблером инструкций, состоянием процессора, просмотром памяти и состоянием периферии, плюс точки останова по коду и памяти, а также логирование по инструкциям и тактам — этого достаточно, чтобы наблюдать за выполнением кода 8088 по одному такту за раз.
What are similar projects?v86, exodium, pcsx2, ra2, mame, RetroPie-Setup, OpenEmu, frank-386
Creator
dbalsom
Size
20.8 MB
Stars
946
Age
4y
Commits · 90 Days