VOGONS


First post, by Marty2dos

User metadata
Rank Newbie
Rank
Newbie

Hello,

I Wonder. In the Compatibility Page of Dosbox it say it full supportet.I tried many Dosbox Version, down to version 71 and other Forks.
The Vector Grafic is damaged. The one and only where it works is Dosbox-X.

All Ports
aufnhame0898.png

Dosbox-X
aufnhame0899.png

Anyone has a Code Solution? Or to the Dosbox-X Author. Can you give me hint where did you fix this?

Reply 1 of 4, by ripsaw8080

User metadata
Rank DOSBox Author
Rank
DOSBox Author

Hello, sir! What are you up to?

This appears to be a CPU emulation issue in the normal core regarding undocumented (or at least poorly documented) behavior of certain flags for divide instructions; in this case the overflow flag for a word-size integer divide. It's somewhat related to an issue with a different game: The Perfect General I and DOSBox fail help

PCem and DOSBox-X unconditionally clear the overflow flag for divide instructions, and that does seem to make the game generally work okay. Still, it'd be pointless to check a flag that's always clear, but perhaps the game developer thought it means something when in fact it does not.

A possible workaround for the issue is to set core=dynamic; however, it probably depends on the build of DOSBox and the host system. The game works okay for me with core=dynamic and 32-bit builds of 0.74 and SVN on Win10 x64.

Reply 2 of 4, by Qbix

User metadata
Rank DOSBox Author
Rank
DOSBox Author

Ah, there are a few more flags worth fixing. I recall that our overflow is wrong for left shifts

https://c9x.me/x86/html/file_module_x86_id_285.html

The OF flag is affected only on 1-bit shifts. For left shifts, the OF flag is set to 0 if the most significant bit of the result is the same as the CF flag (that is, the top two bits of the original operand were the same); otherwise, it is set to 1. For the SAR instruction, the OF flag is cleared for all 1-bit shifts. For the SHR instruction, the OF flag is set to the most-significant bit of the original operand.

Although I don't know if a game is affected.

Water flows down the stream
How to ask questions the smart way!

Reply 3 of 4, by Marty2dos

User metadata
Rank Newbie
Rank
Newbie

Hello ripsaw8080,
thanks for your answer.
I tried with core=dynamic but the vector gfx is damage too??? 😕

hello Qbix,
thanks for your answer too. This is the keyword. i looked in the dosbox port and i changed 2 sources. in the flags.cpp and instructions.h
i added only the parity16/32 and SETFLAGBIT from "DOSBox-X-20150818_v0.801 Next B1" Port. (at this release Thalions Airbus A-320 Works). Now it works in my build 0.74 r4088. Core=auto/ cputype=auto 😊
aufnhame09321.png
aufnhame0933.png
aufnhame0934.png

Attachments

  • Filename
    instructions.h
    File size
    30.45 KiB
    Downloads
    85 downloads
    File license
    Fair use/fair dealing exception
  • Filename
    flags.cpp
    File size
    24.48 KiB
    Downloads
    85 downloads
    File license
    Fair use/fair dealing exception

Reply 4 of 4, by ripsaw8080

User metadata
Rank DOSBox Author
Rank
DOSBox Author

Well, as I said, the dynamic core workaround depends on the host system.

Also, if you follow my previous comment, one only need add a SETFLAGBIT(OF,false); for IDIVW in instructions.h to fix this particular game, but the flags should be fixed properly (as soon as it can be determined what is proper 😉 )