[hatari-devel] Fire button freezes Hatari in the Downfall game

Thomas Huth huth at users.berlios.de
Fri Dec 24 01:51:48 CET 2010


On Thu, 23 Dec 2010 09:10:09 +0100
Thomas Huth <huth at users.berlios.de> wrote:

> On Wed, 22 Dec 2010 23:41:25 +0100
> Nicolas Pomarède <npomarede at corp.free.fr> wrote:
> 
> > 
> > I think the problem could come from a bad delay in :
> > 
> >          IKBD_AddKeyToKeyboardBufferWithDelay(0xFD, 35000);
> > 
> > I will try to give it a look later (unless Thomas got an idea on
> > this ?)
> 
> IIRC I once measured most IKBD timings on my real ST, so the problem
> might be something slightly different. But I also don't have a good
> clue what might be wrong right now...

Ok, I've fixed it now: As expected, the problem was not due to the
delay value there, but something different:
Since it continually issued this command during the title screen,
Hatari continually tried to put three bytes into the internal keyboard buffer.
But the game did not consume the bytes as fast as issuing the command,
so it finally flooded our Keyboard.Buffer ... in the end, we could not put the
whole packet into the buffer anymore, and the game hang due to these incomplete
answers.
To avoid this situation, I've put a check to only execute this command if there
is enough space left in our Keyboard.Buffer!

 Thomas



More information about the hatari-devel mailing list