WinUAE icon indicating copy to clipboard operation
WinUAE copied to clipboard

[ENHANCEMENT] Change the x86 emulation to 86Box's

Open fuel-pcbox opened this issue 5 years ago • 8 comments

86Box is a fork of PCem that has far more accurate 8086/8088 emulation, as well as just more accurate emulation all around.

fuel-pcbox avatar Oct 21 '19 15:10 fuel-pcbox

Next version uses latest PCem v16, was updated because bridgeboard FPU support was requested.

I don't consider perfect accuracy important when emulating expansion boards, especially because bridgeboard shared RAM and other bridgeboard special hardware timing is unknown. (and without bridgboard stuff "normal" pc emulator is better choice anyway)

tonioni avatar Aug 29 '20 09:08 tonioni

"normal"? 86Box is literally better than PCem in almost every way! Also, isn't it kind of unprofessional for you to have completely ignored this issue for almost a year?

fuel-pcbox avatar Sep 28 '20 21:09 fuel-pcbox

Perhaps it is but I don't trust anyone without hard facts. For example I was said that 86box Cirrus Logic emulation is supposedly better but in reality it looks it is from QEMU (which was full of missing features and bugs) and I refuse to have anything to do with QEMU anymore.

Also when did this become issue and when did I become "professional"? (if you want quick answers, post to eab) Almost no one cares about x86 bridgeboards, it really isn't worth the trouble to keep it up to date. It is far too time consuing, just like PPC emulation. No one wants to maintain it. Big project, very little "value" in Amiga emulator.

Perhaps in summer 2022..

EDIT: Of course, if 86Box implements Voodoo 3 first, I'll switch it to almost instantly :)

tonioni avatar Oct 07 '20 15:10 tonioni

86Box's Cirrus emulation isn't from QEMU anymore, and it works just fine now... >.>

fuel-pcbox avatar Oct 11 '20 01:10 fuel-pcbox

Hello, I'm the maintainer of 86Box.

Our Cirrus Logic emulation is definitely not from QEMU, it used to be, but it's long since been replaced. It currently is better than PCem's which is proven by the fact there's things that work on our Cirrus Logic emulation that don't work on theirs, for example Win-OS/2. We also emulate the CL-GD 5436/46 that PCem does not, complete with all the aperture trickery that I don't even see QEMU emulating.

Our 808x emulation is also more accurate than PCem's, proven by the fact 8088 MPH runs almost perfectly on 86Box while it has noticable problems on PCem. But that's the CPU - the FPU is still pretty much PCem's, so really inaccurate (and stuff like Lotus 1-2-3 just gets some calculations completely wrong), but I'm planning to replace it (for 808x to 486 at least) with some sort of SoftFPU during the development of the 86Box version following the one that is currently in development, then it should work better.

Edit: Also, please forgive qeeg's tactlessness, she's being reprimanded as we speak.

OBattler avatar Oct 11 '20 17:10 OBattler

Ok, I'll try your CL emulation (What do I win if I find a bug/missing feature? :)).

It looks like vsync support is missing (interrupt and status bits). And overlay too. But both was missing from pcem version too. I added overlay support to qemu version first, then merged it to pcem version.

x86 CPU/FPU side is not that important for me.

btw, here is obvious tiny patch for S3 Virge that fixes 3D clipping (VRAM corruption and corrupted texture if y-coordinate is outside of clipping limits. How did this ever work? No PC program required vertical clipping?)

diff --git a/pcem/vid_s3_virge.cpp b/pcem/vid_s3_virge.cpp
index b029b991..e8d2dae4 100644
--- a/pcem/vid_s3_virge.cpp
+++ b/pcem/vid_s3_virge.cpp
@@ -3039,7 +3039,7 @@ static void tri(virge_t *virge, s3d_t *s3d_tri, s3d_state_t *state, int yc, int3
                         state->x1 += (dx1 * diff_y);
                         state->x2 += (dx2 * diff_y);
                         state->y -= diff_y;
-                        dest_offset -= s3d_tri->dest_str;
+                        dest_offset -= s3d_tri->dest_str * diff_y;
                         z_offset -= s3d_tri->z_str;
                         y_count -= diff_y;
                 }

image

image

tonioni avatar Oct 12 '20 17:10 tonioni

Of course there's still missing features, mostly ones that I haven't seen any PC software require, as well as some that appear to be only documented by the 1993 Cirrus Logic technical reference that I can't find anywhere (I can only find the 1994 and 1995 ones, though already the 1994 ones documents stuff like mem sys dest blits that the 1995 one omits, which I implemented). Would you be able to tell me what changes I need to make to add VSYNC support?

Also, thanks for the S3 ViRGE patch, I have just applied and committed it.

OBattler avatar Oct 13 '20 16:10 OBattler

I'll create patches for vsync stuff later.

tonioni avatar Oct 17 '20 17:10 tonioni