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

(RetroArch) Real Time Clock appears broken in 0.7-WIP #1134

Open
FoetusSheldon opened this issue Jul 21, 2018 · 13 comments

Comments

@FoetusSheldon
Copy link

commented Jul 21, 2018

(Crosspost as I wasn't sure wether to post this here or at https://github.com/libretro/mgba/.)

The Real Time Clock displays an incorrect time in Pokemon Liquid Crystal (romhack).

The RTC functions correctly in VBA Next, provided the cart ID is changed to that of Pokemon Ruby using a hex editor (as the hack is based on FireRed, which did not use RTC).

The time displayed should be that of the system clock - instead it is always Thursday, 22:105, and 0:00 if the game ID is not changed to that of Pokemon Ruby.

To reproduce the bug:

  • Start a new game
  • Proceed through the initial dialog, naming the player
  • After this, there will be a dialog to set up the time. Proceeding through this dialog shows that it is incorrect (Either thursday or friday, 22:105).

@JMC47 JMC47 added the port:libretro label Sep 5, 2018

@JMC47

This comment has been minimized.

Copy link

commented Sep 5, 2018

Does the issue happen in the latest builds of mGBA proper?

Try the development downloads. Does changing the GameID fix it here as well?

https://mgba.io/downloads.html

@fennectech

This comment has been minimized.

Copy link

commented Oct 29, 2018

I can confirm this on vanilla retroarch (for switch)

@TurdPooCharger

This comment has been minimized.

Copy link

commented Nov 3, 2018

I did testing of liquid-crystal-b3.3.00512.gba (CRC32 hash: 6A761D9F) on the major releases of mGBA (Windows build).

mGBA v0.6.1 was the last known version with working RTC for the game. Hope this helps in tracking down where the bug might have occurred.

@richteer

This comment has been minimized.

Copy link

commented Nov 3, 2018

Did some digging myself after running into this exact problem.
0.6.1 had the correct time, 0.6.2 was incorrect, thinking it was Sunday 00:00, and master had the same behavior as described in the OP (Thursday, 22:105).

After some bisecting between 0.6.1 and 0.6.2, I found the issue first appears in commit e112271 " GBA Hardware: More RTC fixes". Reverting this patch on master with git revert e112271 seems to fix it for me.

I have literally no idea what the implications are of reverting that patch, but hopefully that's helpful information.

@fennectech

This comment has been minimized.

Copy link

commented Nov 3, 2018

Changing the games TITLE ID to that of ruby fixes it.

@TurdPooCharger

This comment has been minimized.

Copy link

commented Nov 3, 2018

@fennectech, that BPREAXVE trick in hex editor didn't work for the 0.7 beta 1 release when checked in the Windows and 3DS builds (and subsequent nighties before and after til this point). I came here after finding out that Liquid Crystal can be played with RTC as a GBA VC injection from this thread here.

This lead back to the question whether this game's RTC functions because of hacky rom patch work, or that it's supposed work on real hardware if we go by 3DS ≃ DSi ≃ NDS ≃ GBA.

@endrift, thanks for fixing this. Gonna giddity share the news back at GBAtemp. 😄

@fennectech

This comment has been minimized.

Copy link

commented Nov 3, 2018

Also changed fire to ruby.

@fennectech

This comment has been minimized.

Copy link

commented Nov 3, 2018

This works
I
image

@TurdPooCharger

This comment has been minimized.

Copy link

commented Nov 3, 2018

@fennectech, I tried the RUBYAXVE hex edit you suggested on 0.7 beta 1, and that also didn't work. I think that trick was for a previous older mGBA version. Any case, more PKMN-LC for everyone. :)

@fennectech

This comment has been minimized.

Copy link

commented Nov 4, 2018

Well. With this it works properly in RA

@rzumer

This comment has been minimized.

Copy link

commented Mar 29, 2019

I think this should be reopened, as the latest Windows build (based on 06e7d3f) still has issues on my PC. In my experience it is a 2 hour delay.

@endrift endrift reopened this Apr 4, 2019

@endrift

This comment has been minimized.

Copy link
Member

commented Apr 4, 2019

@rzumer is your computer time zone set to UTC+2?

@rzumer

This comment has been minimized.

Copy link

commented Apr 4, 2019

@endrift UTC-4 currently (EST).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
7 participants
You can’t perform that action at this time.