VOGONS


0.70 for Mac Freezing

Topic actions

Reply 80 of 141, by yerejm

User metadata
Rank Newbie
Rank
Newbie

Yeah, mostly sure (except the vr field wasn't 0?), but let's say I changed functionality and the outcome was therefore questionable...

Separated logging as suggested. +-0.05 did not log anything after vga hang. Made it +-0.1 and logging occurred. Got the following:

...
timeInFrame: 13.000, vrstart: 13.092, vrend: 13.156
timeInFrame: 13.250, vrstart: 13.092, vrend: 13.156
...

It alternates between these two, though not immediately. They each run for several hundred lines before flipping.

What kind of code should I put in for the CPU cycle logging? What I put in doesn't seem to output what I'd expect (e.g. CycleMax 0).

Reply 82 of 141, by yerejm

User metadata
Rank Newbie
Rank
Newbie

More logging of a vga freeze with cpu stuff thanks to h-a-l

...
timeInFrame: 13.000, vrstart: 13.092, vrend: 13.156
cyclemax: 10000, cycleleft: 0, cycles: 1299, picticks: 1610612736
timeInFrame: 13.000, vrstart: 13.092, vrend: 13.156
cyclemax: 10000, cycleleft: 0, cycles: 1287, picticks: 1610612736
timeInFrame: 13.000, vrstart: 13.092, vrend: 13.156
cyclemax: 10000, cycleleft: 0, cycles: 1275, picticks: 1610612736
timeInFrame: 13.000, vrstart: 13.092, vrend: 13.156
cyclemax: 10000, cycleleft: 0, cycles: 1263, picticks: 1610612736
timeInFrame: 13.000, vrstart: 13.092, vrend: 13.156
cyclemax: 10000, cycleleft: 0, cycles: 1251, picticks: 1610612736
timeInFrame: 13.250, vrstart: 13.092, vrend: 13.156
cyclemax: 10000, cycleleft: 0, cycles: 1239, picticks: -2147483648
timeInFrame: 13.250, vrstart: 13.092, vrend: 13.156
cyclemax: 10000, cycleleft: 0, cycles: 1227, picticks: -2147483648
timeInFrame: 13.250, vrstart: 13.092, vrend: 13.156
cyclemax: 10000, cycleleft: 0, cycles: 1215, picticks: -2147483648
timeInFrame: 13.250, vrstart: 13.092, vrend: 13.156
cyclemax: 10000, cycleleft: 0, cycles: 1203, picticks: -2147483648
timeInFrame: 13.250, vrstart: 13.092, vrend: 13.156
cyclemax: 10000, cycleleft: 0, cycles: 1191, picticks: -2147483648
timeInFrame: 13.250, vrstart: 13.092, vrend: 13.156
cyclemax: 10000, cycleleft: 0, cycles: 1179, picticks: -2147483648
timeInFrame: 13.250, vrstart: 13.092, vrend: 13.156
cyclemax: 10000, cycleleft: 0, cycles: 1167, picticks: -2147483648
timeInFrame: 13.250, vrstart: 13.092, vrend: 13.156
cyclemax: 10000, cycleleft: 0, cycles: 1155, picticks: -2147483648
timeInFrame: 13.250, vrstart: 13.092, vrend: 13.156
cyclemax: 10000, cycleleft: 0, cycles: 1143, picticks: -2147483648
timeInFrame: 13.250, vrstart: 13.092, vrend: 13.156
cyclemax: 10000, cycleleft: 0, cycles: 1131, picticks: -2147483648
...
timeInFrame: 13.000, vrstart: 13.092, vrend: 13.156
cyclemax: 10000, cycleleft: 0, cycles: 3797, picticks: 1073741824
timeInFrame: 13.000, vrstart: 13.092, vrend: 13.156
cyclemax: 10000, cycleleft: 0, cycles: 3785, picticks: 1073741824
timeInFrame: 13.000, vrstart: 13.092, vrend: 13.156
cyclemax: 10000, cycleleft: 0, cycles: 3773, picticks: 1073741824
timeInFrame: 13.000, vrstart: 13.092, vrend: 13.156
cyclemax: 10000, cycleleft: 0, cycles: 3761, picticks: 1073741824
timeInFrame: 13.250, vrstart: 13.092, vrend: 13.156
cyclemax: 10000, cycleleft: 0, cycles: 3749, picticks: 1610612736
timeInFrame: 13.250, vrstart: 13.092, vrend: 13.156
cyclemax: 10000, cycleleft: 0, cycles: 3737, picticks: 1610612736
timeInFrame: 13.250, vrstart: 13.092, vrend: 13.156
cyclemax: 10000, cycleleft: 0, cycles: 3725, picticks: 1610612736
timeInFrame: 13.250, vrstart: 13.092, vrend: 13.156
cyclemax: 10000, cycleleft: 0, cycles: 3713, picticks: 1610612736
timeInFrame: 13.250, vrstart: 13.092, vrend: 13.156
cyclemax: 10000, cycleleft: 0, cycles: 3701, picticks: 1610612736
...

Reply 83 of 141, by Qbix

User metadata
Rank DOSBox Author
Rank
DOSBox Author

this patch might help
https://sourceforge.net/tracker/?func=detail& … &group_id=52551

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

Reply 87 of 141, by h-a-l-9000

User metadata
Rank DOSBox Author
Rank
DOSBox Author

1610612736 = 60000000h
-2147483648 = 80000000h
1073741824 = 40000000h

What's going on there? Those values are nonsense.
With the precision bug it also makes no sense that some games lock up earlier and some later.

1+1=10

Reply 88 of 141, by yerejm

User metadata
Rank Newbie
Rank
Newbie

Played Dune adventure for about 4 hours to completion. Things look ok. I'll try the other game (Albion) I had issue with and see what happens.

I don't know about those values. I've seen consistent weirdness with the logging of those CPU cycle related values. As for the early or late video lock, whatever causes it seems at least a lot less likely with the patch applied.

The most weird is that I'm guessing the patch was for those games when played on a win32 platform and the games with troubles on Mac are fine on win32.

Maybe someone else on Mac can double check the patch?

Reply 89 of 141, by darkgamorck

User metadata
Rank Member
Rank
Member

I just finished double checking it. I played Dune 2 for an hour and a half with zero issues (one mission - guess I'm a little slow). This patch definitely appears to resolve the issue.

Is there any chance we can get a rerelease of the OSX distribution with this patch applied? It applies cleanly to the dosbox 0.70 source code distribution.

As for the inconsistency between platforms - I would guess compiler differences are too blame. Apple uses it's own version of GCC IIRC and I assume that is what we are using as that is what comes with Apple's Dev tools. Perhaps the percision of certain datatypes differs between Apple's GCC and the slimmed down GCC environment used in MingW (or whatever you guys use to compile the win32 builds).

Reply 90 of 141, by Qbix

User metadata
Rank DOSBox Author
Rank
DOSBox Author
h-a-l-9000 wrote:
1610612736 = 60000000h -2147483648 = 80000000h 1073741824 = 40000000h […]
Show full quote

1610612736 = 60000000h
-2147483648 = 80000000h
1073741824 = 40000000h

What's going on there? Those values are nonsense.
With the precision bug it also makes no sense that some games lock up earlier and some later.

Stack corruption ?
Those cycles=0 make little sense as well. (unlikely that they are always zero)

Is there any chance we can get a rerelease of the OSX distribution with this patch applied? It applies cleanly to the dosbox 0.70 source code distribution.

Depends on the rhoenie, but personally I think 0.71 is more likely to come out. There were some more small bugs that could use fixing.

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

Reply 91 of 141, by Qbix

User metadata
Rank DOSBox Author
Rank
DOSBox Author

Info from submitter of the patch:

on the logging
on 64 bit systems Bitu is 64 bit. printf %d with 64 bit gives those 2/4/8 000000h values.
the 64 bit might be why the macs are affected mainly. (core2duo is 64 bit)

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

Reply 92 of 141, by wd

User metadata
Rank DOSBox Author
Rank
DOSBox Author

I can't provocate any (significant) precision issues if the integer value
stays in the 32bit range, even if using Bit64u+float.
It DOES result in a precision loss in the range that is critical for the vret
timing if the integer value is about 10^3 times the maximal value of the
32bit unsigned integers, but that's not what PIC_Ticks should be.

So is this special to 64bit systems/gcc or something that can't be
reproduced on 32bit systems? Or is there an overflow/unsigned underflow
for the PIC_Ticks somewhere?

Reply 93 of 141, by Qbix

User metadata
Rank DOSBox Author
Rank
DOSBox Author

the precission part in a float is 23 bits. so when using the full 32 bits of an int, it should be possible to get an precission error.
2^23 <= 10^7

Maybe the conversions are done differently on a 64 system ?

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

Reply 95 of 141, by h-a-l-9000

User metadata
Rank DOSBox Author
Rank
DOSBox Author
LOG_MSG("cyclemax: %d, cycleleft: %d, cycles: %d, picticks: %lu", CPU_CycleMax,CPU_CycleLeft,CPU_Cycles,PIC_Ticks); 

This should produce correct logging results?

Reply 96 of 141, by Qbix

User metadata
Rank DOSBox Author
Rank
DOSBox Author

stepsize: 0.25 =>1/2*2
so 21 bits available before the dot/comma = 2097152

pic_ticks 1000 a second => 2097 second => 35 minutes

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

Reply 97 of 141, by wjp

User metadata
Rank Newbie
Rank
Newbie

The conversion is indeed done differently on 32 bit and 64 architectures.

On ia32, adding a long int and a float is done as doubles internally.
On amd64, adding a long int and a float is done as floats internally.
(Tested with gcc 4.1 in linux.)

A double has 52 bits of precision, which is more than enough. A float has only 23 bits of precision, which is not sufficient, as Qbix showed above.