EvilJagaGenius / jagoombacolor

Jaga's Goomba Color fork
102 stars 9 forks source link

Just curious about the RTC #11

Open tomexplodes opened 2 years ago

tomexplodes commented 2 years ago

Is it (even remotely) within the scope of this fork to make it so the Goomba RTC can utilize the RTC on the Everdrive GBA X5 Mini? This is the only version I can find being worked on at all anymore, and since you made Crystal actually work, I was just very curious about this. I don't know how else to contact you, hence posting an "issue" here. This fork is great, though, so thanks either way!

EvilJagaGenius commented 2 years ago

I think it's possible, but I don't have an Everdrive to test with, just my EZ-Flash Omega. Out of curiosity, do the Omega-specific builds work with the Everdrive's RTC?

ghost commented 2 years ago

RTC works fine actually, on phat X5 at least.

Set Hide GBASYS to OFF in the Options, then go into /GBASYS/emu/ and on Rom Settings for gbc.gba, set RTC to ON.

On 1.12 OS and lower you could enable RTC for the emulator directly when selecting a gb/gbc rom, but they kinda broke that menu in 1.13 and later, so you have to enable RTC on the gbc.gba file directly instead as a workaround.

![IMG_20220424_084013](https://user-images.githubusercontent.com/101985268/164977296-cccc286f-2859-4074-a1a6-17e54eacf09b.jpg)
tomexplodes commented 2 years ago

May I be kicked to death by grasshoppers. It works! I did that, in fact when I went in to check it was already set that way, and I SWEAR it wasn't working, but now, in Pokemon Crystal, at least, it's fully functioning. I have an X5 mini. Apparently it's one of the problems that only exists until the operator shows up to look at it. Thanks!

Quick update: I found that I have to go into the emulator menu and hit Restart before I turn off my GBA, otherwise the save doesn't stick. That might be the problem I was having. So if anyone else has this issue, make sure to hit Restart before turning it off!

ghost commented 2 years ago

Note: Goomba can read from the RTC, but it cannot write to it. That shouldn't matter for Pokémon because it only reads from it (in-game clock is relative, using a time offset), but some games set the in-game time by directly writing to the RTC. As a workaround, you can use rtcread to set the time, but be aware that doing so will mess with the in-game time for any other games that may be using RTC.

tomexplodes commented 2 years ago

Since the few Pokemon games are the only ones I really care about, (or am even aware of haha,) this is fine by me.

ghost commented 2 years ago

An addendum: it would appear that the rtc on the everdrive may be isolated per-game, the same way as is advertised for the GB everdrive X7. The store page for it does not mention it but this appears to be the case?

In which case, rtcread cannot be used to adjust goomba rtc, because when I run rtcread it thinks that the rtc just started that instant at Jan 1 2000 00:00, which tells me that it's getting fed its own isolated rtc (via offsets?) and that rtc adjustments done in it will not affect goomba (or any other game.)

I'll have to check the DS version of rtcread later, chances are that one will be able to read/write the actual everdrive rtc without rtc isolation getting in the way. It seems a ds flashcart + DS/Lite will be required if one wanted to adjust the rtc for their games... would be nice if everdrive OS could let you adjust the rtc on-cart and per-game directly, though I do believe krikzz may be having better things to do right now. Maybe one day in the future though, that would be a worthwhile suggestion to make.

It might be nice in the meantime if goomba could somehow be updated to support writing to the rtc, I'm not sure if it already should be able to though, and everdrive might be the problem there? I don't think everdrive blocks rtc writes as rtcread seems to write just fine, but it might need to be done in a way that goomba can't properly do yet.

This is what rtcread does, in case this is useful: https://github.com/megaboyexe/GBA_RTCRead/blob/master/rtcread/source/rtcread.c

One game which relies on being able to write to the rtc being Keitai Denjuu Telefang (either version), for testing purposes. I know @EvilJagaGenius doesn't have an everdrive to test, but if writing to the rtc also doesn't work on the ez-flash omega, then it could at least be tested on there first.

Either way though, letting a game write to the rtc will most likely affect the clock for every other gameboy/color game you're using goomba for, because for all intents and purposes the everdrive treats every .gb and .gbc as being the same game (due to the same goomba.gba being used as the base for every game.) One might be able to get past that limitation by bundling each game with its own copy of goomba beforehand and running those .gba files instead of letting the everdrive handle raw .gb/.gbc roms, then each game would be separate.

edit: I just tried the DS version of rtcread... it's not even able to read the everdrive's rtc, so there's that.

KuestenKeks commented 1 year ago

RTC works fine actually, on phat X5 at least.

Set Hide GBASYS to OFF in the Options, then go into /GBASYS/emu/ and on Rom Settings for gbc.gba, set RTC to ON.

On 1.12 OS and lower you could enable RTC for the emulator directly when selecting a gb/gbc rom, but they kinda broke that menu in 1.13 and later, so you have to enable RTC on the gbc.gba file directly instead as a workaround.

thanks, this also worked for my X5 Mini! This is really awesome, now I can play Pokémon games on my GB Micro! :)

That's with the regular ROM "jagoombacolor_v0.5.gba" and not the "v0.5_ezo.gba" variant.