• Please review our updated Terms and Rules here

Looking for PC emulator with specific needs

Ruud

Veteran Member
Joined
Nov 30, 2009
Messages
1,397
Location
Heerlen, NL
Normally I use PCem to test my BIOSes. Now I have written a BIOS that also exchanges data over a COM port to support a stand-alone system w/o video card and keyboard. But AFAIK PCem is not able to emulate a COM port. And I just found out that Sarah Walker has decided to stop and shut down the forum; so I cannot ask there.
I know I cannot use VirtualBox and VMware because I cannot us my own BIOS (unless I'm wrong). Same for 86Box and DOSbox AFAIK.Bochs only supports 386+.

Does anybody know of a emulator where I can use my own BIOS and that can emulate a COM port?

Thank you very much!
 
Last year I started rewriting my old PC emulator (except the CPU code, still need to tackle that) and put it on GitHub. The old code was a mess that I wrote when I was still new to C. Many new/fixed features now.

https://github.com/mikechambers84/XTulator

It does support UARTs properly with either a virtual mouse or Hayes-ish compatible modem that uses TCP instead of phone lines (still a bit buggy) attached. I could pretty easily add dumb terminal support too if that would be useful. It's something I've actually been meaning to do.

Dynamic BIOS loading is also a feature I wanted to implement. Are we just talking standard 8 KB BIOS size like in an XT or clone? In that case, you could just replace the existing .bin file of the "generic_xt" machine with your own. If it's a different size, at the moment you'll have to define a new machine spec in machine.c with the memory map and filename then recompile.

However, don't expect this emu to provide the most accurate experience. For example, I don't actually have proper CPU cycle timing yet. You can make it approximate a CPU speed well enough for most needs, but it's not 100% accurate. Not sure if that's a concern in your situation! Also some part(s?) of my chipset are not perfect yet, because some BIOSes hang up or error out during init. IBM's stock BIOSes especially don't like it.

It does sound like you're only requiring 8086/8088 compatible CPU support, right? This supports up to the 80186 instruction set.
 
Last edited:
Hello Mike,

The main thing I want to test is the BIOS. The COM port is meant to attach a terminal to it so if you could support that, that would be great. Question out of curiosity: can you "attach" a terminal program like PuTTY to it, do you provide a dummy terminal or is the on board COM port used (which my laptop doesn't have)?

The size at this moment is more than 8 KB because at the moment it is a standard BIOS plus extras. But can be brought back to less than 8 KB quite easily: I just delete the internal graphical character set which will gain me 1 KB.

Although the intended CPU is a V20, this BIOS will only contain 8088 instructions. The speed is not important and neither if the emulator is not cycle exact.

I'm not a C man, I'm much more familiar with Pascal. I will certainly have a look at it and see if I can compile it under W10. If I can, I certainly will have a look at machine.c.

Many thanks in advance!

Edit: what about emulating a V20? This will also mean your emulator must be able to emulate an 8080. That is something PCem wasn't able to and lots of people saw that as a really miss.
 
Ruud, I'd be happy to recompile it for you with a special "Ruud" machine defined. I just need to know the size of your BIOS. You won't need to modify the size. Ideally, could you give me a build of it so I can make sure it boots?

And yes, you can attach PuTTy to it. That's how it works with the TCP "modem" - you can "dial" out to a remote server or listen for a "ring" from a connecting client. I can just remove the modem's brains to create a dumb terminal mode.

I actually do plan on full V20 support. The whole 80186 part is completed, and I've actually already written an 8080 emulator a few years ago. I just need to put them together. I need to read up more on the instructions in the V20 to enter and exit 8080 mode. I also need to find some software to test it once implemented.
 
Having been busy, an 8 KB sized BIOS is fine. So I'm looking forward to the result. Many thanks in advance!
 
Any preference for default hardware config for the machine? CGA, 4.77 MHz and a UART with a dumb terminal?

Do you have a sample build I can try? I think it's awesome that you're making a BIOS.
 
Many thanks in advance. I have one but it isn't tested at all. So I'll let you know.
 
I found a little time to make the modifications!

Here's a link to your custom build: https://drive.google.com/file/d/1TKG...ew?usp=sharing

I created a "ruud" machine definition, by default it sets up the system at 4.77 MHz with a CGA and a dumb terminal on the first UART.

Put your 8 KB BIOS at roms\machine\ruud\bios.bin and run XTulator.exe -machine ruud

Run XTulator.exe -h for a full listing of options, there are many...

With the new dumb terminal feature, if I connect to it with putty in raw mode and run Procomm Plus in DOS, I can communicate back and forth. It's just based on the existing TCP modem code, so I think it will be fine but let me know if you have any issues.

Something that may be an issue for you is that right now, the emulator always intercepts int 13h calls and runs it's own HLE disk functions, so unfortunately you won't be able to test any of your BIOS disk services as of yet. I haven't completed any full floppy or hard drive controller interfaces.

Edit: The UART interface is a standard old 8250.
 
Last edited:
Thank you very much! I sent you a PM including a ZIP with the 8 KB BIN and the ASM.
 
Just downloaded the file and gave it a quick test and I at least got a start-up message. Now I have to find some time to experiment things in combination with PuTTY.

Thank you again!
 
Back
Top