<< Previous Topic | Next Topic >>Return to Index  

Error in ABCD instruction

August 20 2006 at 4:14 PM
Barry 
from IP address 68.170.210.187

 
I found an error in the ABCD instruction. In the file cpu68k/gen68k.c:

Change at or around line 925:

OUT(" if (outdata_tmp > 0x90) {\n");

to

OUT(" if (outdata_tmp >= 0xa0) {\n");

In the unfixed state, the check for an overflow condition is determined to be true for BCD numbers in the range 90 to 99, even though the overflow shouldn't happen unless the sum exceeds 99. This modification fixes that error.

This will fix a variety of probably uncommon errors in emulation of games that use BCD numbers. In particular, Phantasy Star III uses BCDs all over the place, and various numbers will sometimes give incorrect displayed values.

Anyway, thanks for a great emulator :)

 
 Respond to this message   
AuthorReply


82.141.49.105

Re: Error in ABCD instruction

October 20 2006, 4:44 PM 

The code in my patched versions looks a bit different for this instruction. I'm not sure whether it suffers from this bug. Could you point out a specific scene in whatever game that is easy to reach to check for this bug? I don't want to play PSIII just to search for this issue.

 
 Respond to this message   
bootsector

201.38.235.5

Re: Error in ABCD instruction

January 10 2007, 5:36 PM 

I think this is the bug suffered by "Streets of Rage"!

Its score just get crazy after you pass stage (score count) and even during the game (you have mixed characters among the numbers).

I will try to put this fix on the PGen (Generator for Playstation 2 and see what happen)!

If this work, then Barry you are my hero! :D

Regards

bootsector

 
 Respond to this message   


82.141.49.122

Re: Error in ABCD instruction

January 14 2007, 12:31 PM 

Yes, indeed, it fixes the odd characters in the score count in Streets of Rage.

 
 Respond to this message   


82.141.60.139

Re: Error in ABCD instruction

January 18 2007, 12:45 AM 

Thanks, I've integrated your fix into my patched version:
http://ghostwhitecrab.com/generator/

 
 Respond to this message   
bootsector

201.38.235.5

Re: Error in ABCD instruction

March 15 2007, 6:04 PM 

I have fixed PGEN (Playstation2 port) as well:

http://www.brunofreitas.com/portal/?q=node/20

Best regards,

bootsector

 
 Respond to this message   
Current Topic - Error in ABCD instruction
  << Previous Topic | Next Topic >>Return to Index  
 Copyright © 1999-2009 Network54. All rights reserved.   Terms of Use   Privacy Statement