On Thursday 18 March 2004 11:54 am, Doug Holland wrote:
> I just upgraded to xmame 0.80.1, and I'm still running into the bug where
> if I run starwars, start the game, select medium or hard difficulty, and
> play through the tie-fighter stage, the game does not zoom into the Death
> Star and move to the next stage.
>
> After googling and reading the last thread on this topic, it was mentioned
> that there was some sort of kludge to work around this.
>
> Could somebody post the kludge or tell me where I can go to find a fix?
>
> Doug

HAH!  Found the fix for the infamous Death Star bug!

Go to src/machine/starwars.c.  On or about line 294, you should find the line

                        ACC=ACC+(  ( (long)((A-B)*C) )>>14  );

Replace it with
                        ACC += ((((long)((A - B) * C)) >> 13) + 1) >> 1;

I found this in an older version of that file (from version 0.69).

The code there read

if (IP15_8 & LDC)
                {
                        C = RAMWORD;
                        /* TODO: this next line is accurate to the schematics, 
but doesn't seem to work right */
                        /* ACC=ACC+(  ( (long)((A-B)*C) )>>14  ); */
                        /* round the result - this fixes bad trench vectors in 
Star Wars */
                        ACC += ((((long)((A - B) * C)) >> 13) + 1) >> 1;
                }

Please test this and make sure this hack works.

Attachment: pgp00000.pgp
Description: signature

Reply via email to