Settings

Theme

MartyPC, cycle accurate IBM PC/XT emulator

vogons.org

144 points by nbaksalyar 2 years ago · 17 comments

Reader

mmastrac 2 years ago

I was curious about this...

"8253 PIT - Recently rewritten after microcontroller-based research. At least one previously undocumented feature discovered. Accurate enough for PCM audio."

... and it turns out that it's this ...

https://github.com/dbalsom/martypc/blob/main/core/src/device...

                        // If the counting element was reloaded between load of LSB and MSB, it is an incomplete load.
                        // Reload the counting element again when we get the MSB.
                        // Note: This is completely undocumented behavior
viler 2 years ago

The author has done a superb job here. Not only does it have a cycle-exact Intel 8088 implementation (matched with disassembled microcode timings and hardware-verified) - it does the same for the CGA, where the dot clock is 3 times the CPU clock frequency... and it correctly represents the monitor's output, overscan included, which most other PC emulators have never bothered to do.

And those debugging tools are something else, too!

wkat4242 2 years ago

It was even more impressive when I read that he only started work on this less than a year ago. Wow.

autoexec 2 years ago

My first computer was a hand me down IBM XT. No hard drive, but two 5.25 floppy drives. I never tried running The Secret of Monkey Island on it, but it did run games like Night Mission Pinball. Paratrooper. and JBIRD.

dirkderkdurk 2 years ago

This is so neat! I'll have to incorporate it into my Unreal Engine x86 emulator plugin menagerie!

https://youtu.be/yVO2VDPnI0Y (the first 1.5 minutes are fine to watch, the rest is of dubious worth)

mrlonglong 2 years ago

There seems to be an issue with keys such as !"£$%%^&*():{} with this emulator, I can't even type in D: to change drive as the colon does not get sent. It might be that I am on an UK keyboard? Otherwise, it works very well, if a bit slowly.

  • mrlonglong 2 years ago

    As a follow-up to myself. This bug is now fixed in git branch tag version_0_1_3.

qingcharles 2 years ago

This is a fantastic piece of work.

Are there any cycle-accurate like this for 8-bit consoles?

  • r3jjs 2 years ago

    By definition, all Atari 2600/VCS emulators are cycle accurate.

    That machine required very precise timing of the CPU to drive the video output.

    There are a number of other cycle-accurate emulators, including some you woudln't expect, like a cycle-accurate emulator for the C64 floppy disk (needed for anti-piracy and some high-end demos that use the floppy like a co-processor).

    • tadfisher 2 years ago

      For the uninitiated, the Commodore 1541 (and later 1570) are external floppy drives that contain their own 6502 CPU and work RAM. In fact, you could daisy-chain two of them with a C64, tell one to copy a whole disk from the other, and disconnect the C64; the drives would continue to work as they do not rely on the C64 at all.

  • takantri 2 years ago

    I know the NES has many cycle-accurate emulators[0].

    [0] - https://emulation.gametechwiki.com/index.php/Nintendo_Entert...

  • mmastrac 2 years ago

    Quite a few. At least one for each of the major consoles.

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection