Issues with EGA emulation
Issues with EGA emulation
When I run pcem 12 on my desktop (Haswell i7) I can use EGA. It takes a long time to start up but then presents colour tests and boots.
But on my laptop (Kaby Lake i7) it freezes, and just shows an empty grey window and uses 100% CPU until killed. The config is identical in both cases and the rom files are identical. This is on Windows 10 64bit. There doesn't seem to be an issue with any other graphics emulation.
The other difference is that on my laptop it is HiDPI (3200x1800) so it could be to do with the scaling -- though disabling scaling doesn't help.
But on my laptop (Kaby Lake i7) it freezes, and just shows an empty grey window and uses 100% CPU until killed. The config is identical in both cases and the rom files are identical. This is on Windows 10 64bit. There doesn't seem to be an issue with any other graphics emulation.
The other difference is that on my laptop it is HiDPI (3200x1800) so it could be to do with the scaling -- though disabling scaling doesn't help.
Re: Issues with EGA emulation
Are you using Intel's graphics on both? I suspect either is a dedicated GPU
If that the case: try changing the output: Direct3D or Direct Draw.
If that the case: try changing the output: Direct3D or Direct Draw.
Re: Issues with EGA emulation
On the desktop (where it works) I have nvidia graphics. On the laptop where it freezes it is Intel integrated. I'll try switching them.
The thing is others work without issue - CGA, VGA are fine.
The thing is others work without issue - CGA, VGA are fine.
Re: Issues with EGA emulation
Ok, with Direct3D selected it will now boot on the IBM XT model, but on the IBM AT is still freezes forever. On other machines pcem just crashes.
-
- Posts: 183
- Joined: Wed 18 Mar, 2015 5:27 am
Re: Issues with EGA emulation
This is actually a very old bug--I reported it years ago, before this forum even existed. PCem's EGA support has always been semi-functional and lag/crash prone for me, whether using DirectDraw or Direct3D. As you point out, this is entirely exclusive to EGA and has never affected CGA, VGA, or any other emulated video card. I haven't had time to really dig into it, but something is clearly badly broken, and it must be something quite simple, like an improper pointer somewhere. Whatever it is must be somewhere in vid_ega.c or vid_ega.h, and shouldn't be too hard to track down.
Re: Issues with EGA emulation
It's not the emulation that's broken per se but the IBM EGA BIOS that does weird things to probe the card. I have tried implementing the Chips & Technology SuperEGA (with its own BIOS) on top of the same EGA emulation code, and it doesn't have the same problem.
-
- Posts: 183
- Joined: Wed 18 Mar, 2015 5:27 am
Re: Issues with EGA emulation
That's interesting, but still suggests something like an improper pointer or improperly defined/allocated memory or I/O somewhere in vid_ega.c or vid_ega.h, I would think. The weird probing that the IBM EGA BIOS does is likely hitting some rarely used port or memory edge case or something that the SuperEGA BIOS doesn't, thus making the IBM BIOS a more effective torture test of the underlying EGA emulation.
Re: Issues with EGA emulation
- ecksemmess: That's most probably the case, yes. IBM's BIOS'es liked probing undocumented or rarely used parts of the hardware.
Re: Issues with EGA emulation
Yeah I had more problems on both PCs so realised it wasn't just the OS/host system.
Hopefully the issues can be sorted out, but I guess it's low priority since VGA replaced it.
Hopefully the issues can be sorted out, but I guess it's low priority since VGA replaced it.
- SarahWalker
- Site Admin
- Posts: 2054
- Joined: Thu 24 Apr, 2014 4:18 pm
Re: Issues with EGA emulation
I think rev 801 should fix this.
Re: Issues with EGA emulation
I modified EGA monochrome palettes like this URL, palettes bring from HGC/MDA/CGA monochrome monitor type.
https://pcem-emulator.co.uk/phpBB3/view ... =723#p5478
before after Here is a patch.
https://pcem-emulator.co.uk/phpBB3/view ... =723#p5478
before after Here is a patch.
- SarahWalker
- Site Admin
- Posts: 2054
- Joined: Thu 24 Apr, 2014 4:18 pm
Re: Issues with EGA emulation
Committed at rev 807.