October 4th, 2010, 00:18 Posted By: wraggster
More Dos Emulator for DS WIP News from Pate:
The last week, and especially this weekend, has been very frustrating when working on DS2x86. It behaves very erratically, mostly hanging randomly, and when I try to add some debug output to pinpoint the problem location, it suddenly runs fine! Then I remove the debug strings, and it hangs again, but in a different location! Extremely frustrating. There is probably something seriously wrong in my IRQ handling, or perhaps I have misunderstood something about the underlying hardware.
Everything seems to work fine as long as I stay in the 4DOS command prompt. My first goal is to get Norton Sysinfo running, but that has proven to be much more difficult than I have anticipated. Yesterday I got it to run up to the main screen (where it shows the overview of the system), but even that happened only in about once every 5 tries, the other four tries it hanged before reaching that far.
This morning I then removed some of the debug printing I had used to try to pinpoint the location, and then it suddenly reached the CPU speed test part without hanging! So, here is the first test result of the DS2x86 speed.
After that I tried to test with the fastest CPU speed of 396MHz, but could not get into the CPU speed test page without the system hanging. I then reverted back to the default 120MHz speed, but then everything started running in slow motion, and the one time that I got up to the CPU speed test page the speed showed something less than 4 times original PC!
I made some more changes to the code but was not able to get back to the CPU speed test page. After a lot of tracing and debugging it finally began to look like the self-modifying code I use to handle IRQs might be the problem (or at least one reason for the hangs). I changed the code to use a normal variable to determine when to handle an IRQ, and finally got rid of the SysInfo hanging before the main screen. I made some more speed tests, the first one is with the CPU running at 396MHz and the second is with the 120MHz speed.
As you can see, there is not much sense in the results. The first result above with the 14.2 times original PC (when I had not specifically set the MIPS CPU speed), along with the results from 396MHz speed make sort of sense, but the result after setting the CPU speed to 120MHz is really weird. That would mean the DS2x86 would run at less than half the speed of the original DSx86. Anyways, I'll continue fighting with this and try to make some sense to the constant weird behaviour.
For more information and downloads, click here!
There are 0 comments - Join In and Discuss Here