Configuration errors on model 70 type 4

Support and general discussion.
Post Reply
SA1988
Posts: 243
Joined: Wed 30 Apr, 2014 9:38 am

Configuration errors on model 70 type 4

Post by SA1988 » Thu 22 Mar, 2018 6:03 pm

Even after inserting the right reference disk and configuring its cmos, however, the bios still tells me error 2401 (video error), 8602 and 12903 (coprocessor error).
Are there any fixes to these?

User avatar
SarahWalker
Site Admin
Posts: 1714
Joined: Thu 24 Apr, 2014 4:18 pm

Re: Configuration errors on model 70 type 4

Post by SarahWalker » Thu 22 Mar, 2018 9:56 pm

The IBM coprocessor tests require bit accurate FPU emulation, which PCem doesn't have and probably never will have.

User avatar
ppgrainbow
Posts: 460
Joined: Thu 04 Sep, 2014 7:03 am
Contact:

Re: Configuration errors on model 70 type 4

Post by ppgrainbow » Fri 23 Mar, 2018 1:41 am

I'm just curious to ask. Why does the IBM coprocessor test require bit accurate floating-point unit (FPU) emulation and what are the reasons why PCem (and its variants) will never support that feature?

User avatar
SarahWalker
Site Admin
Posts: 1714
Joined: Thu 24 Apr, 2014 4:18 pm

Re: Configuration errors on model 70 type 4

Post by SarahWalker » Fri 23 Mar, 2018 8:43 pm

I never mentioned any 'variants', and frankly have zero interest in what they may or may not do.

Bit-accurate x87 emulation requires 80-bit floating point operations, as that's what x87 uses internally. If the host CPU's FPU was used to do this, this will destroy any chance of porting PCem to any architecture other than x86, because all other modern architectures support 64-bit as a maximum. There would also likely be a performance hit, as the emulator would have to keep the host x87 control register in sync with the emulated one, which is an expensive operation and would have to be changed every time control transfers between the CPU emulation and any other part of the emulator, which happens a lot.

Alternatively the FPU could be emulated using a softfloat library, which is what Bochs does. This would be more portable, but the performance hit would be much greater.

As neither solution is particularly good, I intend to stick with what PCem currently does; which is to use 64-bit floating point arithmetic throughout, with the occasional bodge for the rare application that actually needs more. The only applications that actually need 80-bit arithmetic are artificial hardware tests like the one in IBM's BIOS and in many maths coprocessor utilities, and actual scientific type stuff that has no business running in PCem anyway.

User avatar
SarahWalker
Site Admin
Posts: 1714
Joined: Thu 24 Apr, 2014 4:18 pm

Re: Configuration errors on model 70 type 4

Post by SarahWalker » Fri 23 Mar, 2018 8:46 pm

The other failure (the 2401 video error) is caused by changes to the VGA status register, which were required by the Oak OTI-037C. I _think_ the problem here is that Oak's VGA core is not 100% compatible, and has a different understanding of 'display enable' to everyone else, and hence the required changes should be limited to that one card. I need to do some more testing on this though.

User avatar
ppgrainbow
Posts: 460
Joined: Thu 04 Sep, 2014 7:03 am
Contact:

Re: Configuration errors on model 70 type 4

Post by ppgrainbow » Fri 23 Mar, 2018 9:58 pm

Thank you very much for explaining all of this.

User avatar
SarahWalker
Site Admin
Posts: 1714
Joined: Thu 24 Apr, 2014 4:18 pm

Re: Configuration errors on model 70 type 4

Post by SarahWalker » Sat 24 Mar, 2018 7:53 pm

Video error is fixed in rev 1131.

ecksemmess
Posts: 155
Joined: Wed 18 Mar, 2015 5:27 am

Re: Configuration errors on model 70 type 4

Post by ecksemmess » Tue 27 Mar, 2018 10:29 pm

SarahWalker wrote:
Fri 23 Mar, 2018 8:43 pm
Bit-accurate x87 emulation requires 80-bit floating point operations, as that's what x87 uses internally. If the host CPU's FPU was used to do this, this will destroy any chance of porting PCem to any architecture other than x86, because all other modern architectures support 64-bit as a maximum. There would also likely be a performance hit, as the emulator would have to keep the host x87 control register in sync with the emulated one, which is an expensive operation and would have to be changed every time control transfers between the CPU emulation and any other part of the emulator, which happens a lot.

Alternatively the FPU could be emulated using a softfloat library, which is what Bochs does. This would be more portable, but the performance hit would be much greater.

As neither solution is particularly good, I intend to stick with what PCem currently does; which is to use 64-bit floating point arithmetic throughout, with the occasional bodge for the rare application that actually needs more. The only applications that actually need 80-bit arithmetic are artificial hardware tests like the one in IBM's BIOS and in many maths coprocessor utilities, and actual scientific type stuff that has no business running in PCem anyway.
Thank you for the excellent explanation, I've always wondered about this. The "64-bit plus exceptions" approach does seem to make sense, all things considered. Question: would it ever be feasible to apply this same approach, which mostly seems to have been pretty successful for 486+ FPU emulation, to getting rudimentary 8087/287/387 emulation in place?

User avatar
SarahWalker
Site Admin
Posts: 1714
Joined: Thu 24 Apr, 2014 4:18 pm

Re: Configuration errors on model 70 type 4

Post by SarahWalker » Wed 28 Mar, 2018 4:21 pm

Absolutely - it's mainly due to lack of any real interest + other more interesting stuff to do on my part which has prevented this from happening.

ecksemmess
Posts: 155
Joined: Wed 18 Mar, 2015 5:27 am

Re: Configuration errors on model 70 type 4

Post by ecksemmess » Wed 28 Mar, 2018 7:11 pm

That's good to know. It'd be a nice addition, understandable that it wouldn't be a priority of course. Maybe someday... :)

Post Reply