You are not logged in.
This is a question about a problem I'm encoutering after a small amout of tinkering with pokecrystal. Immediately after talking to Elm about the mystery egg, the event for running out of time at the bug catching contest triggers. "Times up!", all of that. The problem is coming from CheckBugContestTimer, and in particular the fact that [wCurDay], and therefore [wDaysSince], are non-zero. But they should be. The source of my problem is that I have fiddled a bit (really, a minimal amount) with WRAM, and added a couple of bytes to WRAM0. I know the game clears the WRAM at the start, in ResetWRAM in intro_menu.asm, using hardcoded addresses like WRAM1_Begin, and it seems reasonable to guess that by adding some bytes I have left some parts out, or brought some parts in, to the bit that gets wiped. It have shifted everything by a few bytes at most, but since wDaysSince and the rest are immediately above WRAM 1 I guess that would be enough.
My question is must these hardware constants be hard-coded? Have you all run into similar things, and found work-arounds? I'd rather not have to recalculate the value given in hardware_constants every time I change something in WRAM, assuming that's even possible. Thanks in advance for any interest in my dumbass question!
Update: the problem is that PlayerEvents is allowing CheckTimeEvents to be called. We just shouldn't be there at this point. A cascade of checks not catching me lead to the bug contest shenanigans. I now need to figure out which of the checks in PlayerEvents should be activated, and why that's not happening.
Update 2: Believe it or not I was wrong again. We were supposed to be there. The problem is that the flag STATUSFLAGS2_BUG_CONTEST_TIMER_F was being set, because I had commented out
> engine_flag wUnusedTwoDayTimerOn, 0
in engline flags.asm, as well as the correpsonding wram byte. I can't truthfully be bothered to figure out why it took until this point in the game for that problem to surface. I'll uncomment it for now, it's a loss of one byte.