Skeetendo

’Cause all games were better on the GBC

You are not logged in.

#1 2017-10-10 08:47:04

coraldev
Member
Registered: 2017-07-08
Post 11/12

Real Time Clock Problem [pokecrystal]

So I've run into a problem with the real time clock in my hack. I don't know when this problem cropped up, but I just noticed it today. 15 seconds into every minute, the clock jumps back to the previous minute for only one second. After the second passes, the clock jumps back forward to the correct time. This doesn't throw the clock off at all and does not effect when the time rolls over to a new minute.

The only time this is even an issue is when the overworld color palette changes from day to nite to morning. 15 seconds after the transition, the game flashes back to the previous color palette for a second and then back to the correct palette.

Here is a video of the in game clock synced up with my PC's clock to demonstrate the issue:
https://www.youtube.com/watch?v=SfGbs_nfFtw

I thought it could be something to do with wram, but the only thing I've added is a value to keep track of the player's sprite color. I replaced "wram.asm" with a clean version and the problem still persists.

Anyone have any idea what could be causing this?

Last edited by coraldev (2017-10-10 08:47:34)

Offline

#2 2017-10-10 14:24:35

Rangi
Member
Registered: 2016-05-09
Post 814/870

Re: Real Time Clock Problem [pokecrystal]

First of all, start with a new save file, and use the latest version of BGB if you aren't already. Ideally the problem will go away.

Have you made changes to hram.asm? Maybe something is overflowing into the clock data. Also check the file history for clock-related files--home/rtc.asm and engine/rtc.asm, for instance.

Is this immediately reproducible from the start of the game? If so, you can use git bisect to narrow down the commit that introduced the bug: every time git bisect checks out a new commit, recompile, restart, and say "git bisect good" or "git bisect bad" if the bug isn't or is present.


Pokémon Polished Crystal (GitHub) — version 2.2.0 released
Pokémon Red★ and Blue★: Space World Edition (GitHub) — updated August 19!
Polished Map: pokered+pokecrystal map, tileset, and palette editor — version 3.5.1 released!

Offline

#3 2017-10-10 15:21:50

coraldev
Member
Registered: 2017-07-08
Post 12/12

Re: Real Time Clock Problem [pokecrystal]

Rangi wrote:

First of all, start with a new save file, and use the latest version of BGB if you aren't already. Ideally the problem will go away.

Ok, so I started a new file and the bug was present. Then I deleted every file created by the emulator associated with the rom (so the .sav, .rtc, etc) and tried again, and it seems to be resolved. I guess it was the .rtc file? I mainly test on Gamebette, but sometimes use BGB for debug features. Whenever I load the save with the other emulator, it asks me to reset the clock. I guess it got messed up somehow during that process.

Either way, problem seemingly solved. Crisis averted. Thanks, Rangi.

Offline

Board footer

Powered by FluxBB