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

[Bug] Control doesn't work in Gamera - Daikaijuu Kuuchuu Kessen #2202

Closed
SilverKnight-Z opened this issue Jun 2, 2021 · 5 comments
Closed
Labels
platform:GB/GBC Game Boy/Game Boy Color-related issues

Comments

@SilverKnight-Z
Copy link

SilverKnight-Z commented Jun 2, 2021

There is a bug in the control of the Original Game Boy game Gamera - Daikaijuu Kuuchuu Kessen (Japan) (SGB Enhanced) that I first discovered in version 0.7.3 and it varies depending on the version. It happens with both the translated ROM and the original from No-Intro set.

  • In 0.7.3 stable: Select doesn't work and I can't continue the game because in a later screen I'm asked to press it obligatory.

  • From 0.8.0 to 0.9.1 stable: None of the keys work, or Start doesn't work (I don't know how to tell). The game starts but as it asks to press Start I can't continue. This also happens in the latest dev build 0.10-7010-a507276e2 from 05-30-2021.

I attach the generated report files for the original and the translated ROM.
Original ROM bug report.zip
Translated ROM bug report.zip

EDIT 17/06/2021: Link for the translation patch: https://www.romhacking.net/translations/5995/

Thanks for your attention.

@endrift endrift added the platform:GB/GBC Game Boy/Game Boy Color-related issues label Jun 4, 2021
@CasualPokePlayer
Copy link
Contributor

I did some research into this game. A simple tracelog can pull up this game's joypad routine: https://pastebin.com/raw/Pqm1md4s

An interesting thing is this game does not write $30 to joyp between the player reads! It only does it once after both players are read out. This seems to imply that the docs saying that writing $30 to joyp to increment the player count is wrong. This might be the source of the bug.

@endrift
Copy link
Member

endrift commented Sep 5, 2021

I'm pretty sure I tested that...

@CasualPokePlayer
Copy link
Contributor

CasualPokePlayer commented Sep 5, 2021

I'm pretty sure I tested that...

I wrote a few testroms to test my theory (you probably saw them talked about in #research on gbdev), and my theory seems to be right. Writing $30 is unneeded to increment the joypad number. In fact, the tests seem to indicate that a simple P15 low to high will increment the joypad number (implementing such behavior still passes previous SGB tests anyways).

sgb-mlt-test.zip
https://github.com/CasualPokePlayer/test-roms/blob/sgb-mlt-test/src/intro.asm

@endrift
Copy link
Member

endrift commented Sep 5, 2021

I haven't checked Discord yet today, but I'm pretty sure my tests covered that. I will need to double check.

@endrift
Copy link
Member

endrift commented Sep 5, 2021

I see what I did wrong. I only incremented on P15 low to high if P14 was already high. It needs to work with P14 low as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
platform:GB/GBC Game Boy/Game Boy Color-related issues
Projects
None yet
Development

No branches or pull requests

3 participants