Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vAmiga crash after exiting intro of Brataccas (1990)(Psygnosis) #104

Closed
Alessandro1970 opened this issue Jul 17, 2019 · 8 comments
Closed
Labels
Bug Something isn't working

Comments

@Alessandro1970
Copy link

vAmiga crash after exiting intro of Brataccas (1990)(Psygnosis).

Report:
report.txt

Game:
Brataccas (1990)(Psygnosis)[cr Rectum Research].adf.zip

@dirkwhoffmann dirkwhoffmann added the Bug Something isn't working label Jul 18, 2019
@dirkwhoffmann
Copy link
Owner

Crash was easy to fix.

However, it now hangs in an infinite loop. The game does not detect any key press 😖. I didn't find out yet how exactly it polls the keyboard.

Screenshot 2019-07-18 at 10 52 47

In SAE, I can run it up to this screen, but I don't know what to do next. Either the game is frozen or I am not smart enough to get it startet 🤔.

Screenshot 2019-07-18 at 11 01 33

@Alessandro1970
Copy link
Author

In that place the main character must be seen on the left...something hangs

@dirkwhoffmann
Copy link
Owner

OK, I'll let Rupert know.

@Alessandro1970
Copy link
Author

Brataccas - Manual

READ ME FIRST
INTRODUCTION

Welcome to Brataccas the first Interactive Video. This product will work on
the Atari 520ST, the Commodore 512K Amiga and the Apple 512K Fat Mac. The
sticker on the front of the package indicates which you have purchased.

QUICK LOADING INSTRUCTIONS

To participate immediately in the Interactive Video, please follow these
instructions:
If you have difficulty at any stage, please refer to inside Brataccas for
more detailed instructions.

  1. Set up your computer but leave the power off.
  2. Insert the disk into your main or internal disk drive (Amiga owners
    Kickstart first).
  3. You can now turn your system on.
  4. Brataccas will load automatically.
  5. The title screen will load, you should then wait for the main program
    to load and the message "PRESS ANY KEY" to appear, if you do so, the main
    program will load and run automatically.
  6. You can now control the hero Kyne, with the mouse on your computer and
    begin your journey into Brataccas.

Note: a DOOR on the right is missing...

@dirkwhoffmann
Copy link
Owner

I also found out why vAmiga hangs...

When a key is pressed or released, the keyboard handler calls CIAA::setKeyCode(uint8_t keyCode) which is implemented as follows:

void
CIAA::setKeyCode(uint8_t keyCode)
{
    debug(CIA_DEBUG, "setKeyCode: %X\n", keyCode);

    // Put the key code into the serial data register
    SDR = keyCode;

    // Trigger a serial data interrupt
    delay |= CIASerInt0;    
}

However, I forgot to tell the CIA to wake up. If it is idle (sleeping), it simply ignores what we do here. And indeed, the event inspector shows that both CIAs are sleeping for a while. The bug is shielded most of the time, because CIA A is usually woken up by the VSYNC handler.

Screenshot 2019-07-18 at 12 23 23

@dirkwhoffmann
Copy link
Owner

Once found, it was really easy to fix:

void
CIAA::setKeyCode(uint8_t keyCode)
{
debug(CIA_DEBUG, "setKeyCode: %X\n", keyCode);

// Put the key code into the serial data register
SDR = keyCode;

// Trigger a serial data interrupt
delay |= CIASerInt0;

// Wake up the CIA
wakeUp();
}

Now the game loads and I do see the main character.

Screenshot 2019-07-18 at 12 58 08

However, the guy immediately starts doing all kind of stuff by itself 😳. How can I get him under control? In UAE, he is also running around like crazy.

@Alessandro1970
Copy link
Author

Oh yes, I have choose this game ti test becouse mouse control movements... 🤪. Very difficult.... but it’s only a test for the emulator. Like black lamp

@dirkwhoffmann
Copy link
Owner

I have choose this game ti test becouse mouse control movements... 🤪. Very difficult.

OK, the weird character movement is a feature and not a bug, then. Another issue solved 😀.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants