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

Bad comment in RTC-checking code #1059

Open
aaaaaa123456789 opened this issue Jul 21, 2023 · 4 comments
Open

Bad comment in RTC-checking code #1059

aaaaaa123456789 opened this issue Jul 21, 2023 · 4 comments
Assignees
Labels

Comments

@aaaaaa123456789
Copy link
Contributor

and %10000000 ; Day count exceeded 16383

This code here checks for the RTC overflow bit, which gets set when the RTC day count exceeds 512. However, since it is bit 6 of the control register, which also contains the upper portion of the day count, someone accidentally documented it as an actual check for $4000. (In actuality, bits 1-5 of that register are unmapped.)

This should just say it is checking whether the RTC overflow bit is set.

@mid-kid
Copy link
Member

mid-kid commented Jul 21, 2023

please consider making a PR instead
also, the RTC overflow bit may want to be defined in constants/hardware_constants.asm

@aaaaaa123456789
Copy link
Contributor Author

aaaaaa123456789 commented Jul 21, 2023

please consider making a PR instead

This is my "I don't want to fork the repo while I'm doing 200 other things, but I don't want to forget about the issue" contribution :P

By the way, if you're going to define bit 6 for overflow, you might also want to define bit 7 for on/off.

@mid-kid
Copy link
Member

mid-kid commented Jul 21, 2023

I don't want to fork the repo while I'm doing 200 other things

Maybe you'll find some use in the Github CLI. I find that the git clone → make changes → git commitgh pr create workflow is quite comfortable, it even forks the repo for you. It's so good that I literally only use gh for that command.
Alternatively, sometimes the web interface works for simple things.

@Rangi42
Copy link
Member

Rangi42 commented Oct 17, 2024

This was fixed as part of pret/pokegold#120, which will be ported to pokecrystal after review+merge.

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

Successfully merging a pull request may close this issue.

3 participants