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

Incorrect Gyro Values In WarioWare Twisted #3141

Closed
CasualPokePlayer opened this issue Feb 14, 2024 · 8 comments
Closed

Incorrect Gyro Values In WarioWare Twisted #3141

CasualPokePlayer opened this issue Feb 14, 2024 · 8 comments

Comments

@CasualPokePlayer
Copy link
Contributor

The gyro values WarioWare Twisted receive appear to be half of their expected values. This results in TASers unable to do certain strategies RTA runners are able to do.

Example TAS Run: https://youtu.be/wDAfECnju24?t=326
Example RTA Run: https://youtu.be/fb40Vu8fVhc?t=324

Here is a pastebin noting the exact read/writes WarioWare Twisted uses to read out gyro state: https://pastebin.com/tgQfUhgx

I suspect the issue is that starting the ADC conversion process (or perhaps unsetting the ADC conversion process bit) should output bit 15 of the gyro state immediately, and subsquently triggering a serial clock afterwards should set bit 14 in the serial bit, not bit 15.

Attached are testroms (mb and cart variants both provided) to prove/disprove this theory.

adc_clear_test.zip
read_gyro_test.zip
src.zip

@endrift
Copy link
Member

endrift commented Feb 24, 2024

Did you get around to writing more test code? Or did you do that before filing this? I'm not clear on if you've finished gathering info for the report yet.

@CasualPokePlayer
Copy link
Contributor Author

The second link is the "more test code."

@endrift
Copy link
Member

endrift commented Apr 5, 2024

Confirmed. On a stationary GBA the values I get are roughly 702/703 for test 1, E0A/E0C for test 2 and 705/706 for test wario, compared with 360/6C0/360 in mGBA.

@CasualPokePlayer
Copy link
Contributor Author

What did the adc_clear_test show?

@endrift
Copy link
Member

endrift commented Apr 5, 2024

Didn't run it. You gave them the same filename and I was lazy. I can test that again in a bit.

@endrift
Copy link
Member

endrift commented Apr 5, 2024

Setting gyro ADC start cleared old serial data
Clearing gyro ADC start cleared old serial data

@CasualPokePlayer
Copy link
Contributor Author

The latter sentence is more meaningless given the result of the first sentence (kind of bad test on my part, but eh). The first sentence confirms my theory that starting the ADC conversion process should output bit 15 of the gyro state immediately.

@endrift
Copy link
Member

endrift commented Apr 5, 2024

I'm honestly wondering if the data is actually on rising edge, not falling edge, and the reset counts as a rising edge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants