PDA

View Full Version : rpix86 version 0.10 released!



wraggster
July 21st, 2013, 22:33
Here is a list of the changes in this version:


Added support for the second serial port COM2. Originally I had used the IRQ3 line (which COM2 uses) for mouse emulation, so before I could start working on the actual COM2 support I needed to change the mouse emulation. I had used IRQ12 for PS/2 pointer device emulation, and in this version I made IRQ12 to handle the emulation of both, depending on whether the DOS software uses INT33 (serial mouse) or INT15 (PS/2 mouse) routines. This may cause some problems in the mouse emulation in case the new system does not handle all situations properly.
The way the new support for multiple serial ports work is that you can give several -s? parameters on the command line. The first one will be emulated as COM1, and the second one as COM2. In theory it would be possible to emulate two more COM ports as well, but this is not implemented yet. Let me know if you need me to add support for COM3 and COM4.

Implemented 32-bit version of opcode 0x9A (CALL FAR). This was used by BC Racers game. It is a bit strange that no other game or software has so far used the immediate far call, but it looks like most games either call near routines or call far routines via a jump table instead of hard-coded addresses. In any case, this allowed BC Racers to start up.

I also fixed another problem in BC Racers, it seems to use the standard VGA graphics mode, but it sets the horizontal screen size (pitch) to a non-standard value. I fixed this simply so that the active area looks correct, but I did not change the actual screen width that gets shown. You may need to give the CLR command, or start the game with a batch file that sets echo off to clear the screen before starting the game. This would get rid of some extra garbage on the right side of the game screen.

BC Racers also ettempted to use an undocumented Sound Blaster command 0xE7, which I now silently ignore.

Sid Meyer's Covert Action game used EGA features in a way that assumed the graphics mode change to have reset the EGA registers in a certain way. I noticed that such a reset was missing in my code, and I implemented that. This got rid of the graphics glitches when selecting menu items. This may have caused also problems running different EGA games after one other, as the graphics registers were not reset properly between the games.

I also fixed a hang in Syndicate intro. This was caused by a somewhat strange code in the game. It goes through all interrupt vectors, looking for two adjacent vectors that point to the same routine. In rpix86 I have coded every interrupt vector to point to it's own location, which is how I keep track of unimplemented interrupts that games may need. The Syndicate intro did not handle a situation where such vectors were not found, and kept looping trying to find those vectors. I fixed this by zeroing the couple of vectors where the game begins looking for such (as I noticed that those vectors are zeroed in DOSBox). I have no idea what the game uses these vectors for, though.

After I fixed the intro hang in Syndicate I spent some time trying to debug the crash in the beginning of the actual game. It crashes because the protected mode descriptor table contains an invalid descriptor. This however is caused by the game for some reason clearing a single byte from the descriptor, thus actively making it invalid. So, the actual cause is probably somewhere around the code that writes this invalid zero byte to the decriptor, but since fixing this requires me to debug and understand the actual game code, I have not yet had sufficient time to do this. I will try to continue this during the following weeks.
I have also some other games to test and debug, thanks for letting me know of the bugs you find! Some problems are reasonably easy to fix, but some will take quite a lot of debugging to determine the root cause of the problem, so it is quite difficult to estimate how long will it take me to fix a certain game. I am also still on vacation and have had some other plans for spending my vacation besides working on rpix86, so that will also make the progress slower.
Thanks again for your interest in rpix86!

http://rpix86.patrickaalto.com/rblog.html

http://rpix86.patrickaalto.com/rpix86.zip