IVBeatz / genplus-gx

Automatically exported from code.google.com/p/genplus-gx
Other
0 stars 0 forks source link

Exception Error in "Blue Sphere" Special Stages #102

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Play any version of the Sonic "Blue Sphere" special stages- in Sonic 3, 
Sonic and Knuckles, or with S&K lock-on.
2. Run around for a bit
3. Error

What version of the emulator are you using (official, SVN revision,...)?
The compiled binary (r467) on the Downloads page

Please provide any additional information below (Video settings, Console
region,...)
Seems to happen regardless of emulator settings. The game's region is Automatic 
(USA)

Original issue reported on code.google.com by Ice...@gmail.com on 2 Jul 2010 at 5:46

GoogleCodeExporter commented 9 years ago
Indeed, this is weird (and new). Do you know in which revision it started to 
happen ?

Original comment by ekeeke31@gmail.com on 2 Jul 2010 at 7:33

GoogleCodeExporter commented 9 years ago
Happens as soon as the message "get blue sphere" is disappearing.

Original comment by ekeeke31@gmail.com on 2 Jul 2010 at 7:40

GoogleCodeExporter commented 9 years ago
Ok, this is now fixed in r471

For further technical reference, it was a strange bug introduced by recent 
changes I made into the sprite rendering engine. It seems the devkitppc 
compiler does not handle a comparison test like I thought it logically should 
(it works fine on the win32 compiled version).

More specifically, the following test:

int a = -48;
unsigned int b = 16;
if ((a + b) > 0) return TRUE;

is oddly returning TRUE when it definitvely should not (a + b = -32).

Declaring b as signed int fixes this issue.

Original comment by ekeeke31@gmail.com on 2 Jul 2010 at 1:42