VOGONS


First post, by GloriousCow

User metadata
Rank Member
Rank
Member

I've done a lot of research into the PC over the past year in the process of building my emulator and I'd like to share some of that work, so I've put up a little blog where I have a few articles planned on different topics pertaining to PC emulation.

The first one I have published is a deep dive into DMA on the IBM 5150/5160.
https://martypc.blogspot.com/2023/05/explorin … -on-ibm-pc.html

Let me know if you have any comments/feedback!

MartyPC: A cycle-accurate IBM PC/XT emulator | https://github.com/dbalsom/martypc

Reply 1 of 11, by xcomcmdr

User metadata
Rank Oldbie
Rank
Oldbie

Thank you so much for this.

I have a very basic (but working) DMA implementation for this project, which has no wait state in the CPU regarding access to the memory bus, and magically performs any pending DMA Transfers in a dedicated thread. Plus, the DMA controller emulation is bare bone. It's only there so Sound Blaster PCM transfers can work (and they do).

Overall in the future, especially for floppy drives, this is not gonna cut it, and this will really help in the far future (once Dune is entirely rewritten) to guide a new implementation. 😀

Last edited by xcomcmdr on 2023-05-28, 16:19. Edited 1 time in total.

Reply 3 of 11, by GloriousCow

User metadata
Rank Member
Rank
Member

My next post covers CGA wait states, basically just a follow-up to and expounding on one of reenigne's blogs.

reenigne's original post: https://www.reenigne.org/blog/the-cga-wait-states/

https://martypc.blogspot.com/2023/05/explorin … ait-states.html

MartyPC: A cycle-accurate IBM PC/XT emulator | https://github.com/dbalsom/martypc

Reply 4 of 11, by Scali

User metadata
Rank l33t
Rank
l33t

Great work!
These blogs explain exactly what I've always been so critical about regarding PC emulators:
Firstly, cycle-exactness matters.
Secondly, cycle-exactness does not stop with the CPU alone. The CPU does not operate in a vacuum. It interacts with other devices on the bus, so any externally observable effects on the bus (mainly wait states) need to be emulated in a cycle-exact manner.

http://scalibq.wordpress.com/just-keeping-it- … ro-programming/

Reply 6 of 11, by GloriousCow

User metadata
Rank Member
Rank
Member

New post is up, on the topic of emulator hardware validation.

https://martypc.blogspot.com/2023/06/hardware … g-emulator.html

MartyPC: A cycle-accurate IBM PC/XT emulator | https://github.com/dbalsom/martypc

Reply 7 of 11, by TheMechanist

User metadata
Rank Newbie
Rank
Newbie

Saw the thread about running Area5150, awesome work, congrats!

And the built in debugger is what I was looking for a long time, excellent!

Could you please add Adlib / Soundblaster device?
How accurate is the VGA emulation?
Will it build under linux?

Unchained demo group
swap42

Reply 8 of 11, by digger

User metadata
Rank Oldbie
Rank
Oldbie

Just perused your DMA article. Scrolled through it a bit, haven't deeply dived into it yet. But all in all it looks well-writted and detailed, with good illustrations, and using understandable language.

Thanks for doing such extensive research, and sharing the fruits of it with the world. This is historically relevant. 🙂

Reply 9 of 11, by GloriousCow

User metadata
Rank Member
Rank
Member
TheMechanist wrote on 2023-06-10, 19:21:

Could you please add Adlib / Soundblaster device?

Eventually...

TheMechanist wrote on 2023-06-10, 19:21:

How accurate is the VGA emulation?

Not very; it is a "draw the VRAM every frame" sort of implementation, for speed, and there are many missing parts like CGA emulation, unchained modes, user-definable fonts, etc.
All the registers are present though, and there's a nice debug display for them all, including a live view of the palette color registers, which is neat to look at. My release builds will continue to be CGA only until I am happier with the EGA/VGA support.

TheMechanist wrote on 2023-06-10, 19:21:

Will it build under linux?

Yes, I use Ubuntu for profiling.

MartyPC: A cycle-accurate IBM PC/XT emulator | https://github.com/dbalsom/martypc