• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • Forum moderator applications are now open! Click here for details.
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

Development: Emerald Clock Fix!

Blah

Free supporter
1,924
Posts
11
Years
Cool, I'm glad you decided to post this for everyone. I personally don't hack Emerald, so I don't know much about the functionality and such.

Isn't this a counter? So if I were to say save at 4 hours 15 mins and 12 seconds, and then go do something else for from arbitrary amount of time, when I continue playing it will read as if no time has passed. I think in the FireRed RTC which ZodiacTheGreat and interdepth created, they used system time. Maybe you can try something like that?

Also, if you want people to help you with code efficiency, you should use meaningful variables and label names (as opposed to "something").
 

Gamer2020

Accept no Imitations!
1,062
Posts
15
Years
Cool, I'm glad you decided to post this for everyone. I personally don't hack Emerald, so I don't know much about the functionality and such.

Isn't this a counter? So if I were to say save at 4 hours 15 mins and 12 seconds, and then go do something else for from arbitrary amount of time, when I continue playing it will read as if no time has passed. I think in the FireRed RTC which ZodiacTheGreat and interdepth created, they used system time. Maybe you can try something like that?
This is intended for flash carts that don't have RTC chips so there is no "System time".

Also, if you want people to help you with code efficiency, you should use meaningful variables and label names (as opposed to "something").

You may remember that there was an rtc patch made for R/S that allowed the clock to be based on playtime. A patch like this was never made for Emerald. I took the one for Ruby, disassembled it, and made it work for Emerald.

Maybe you should read before posting. I didn't write this, I just ported it.
 

Blah

Free supporter
1,924
Posts
11
Years
Maybe you should read before posting. I didn't write this, I just ported it.

I don't see why you couldn't rename those "something"s into more meaningful names. Right now those might as well be hex offsets, since they give about the same information as "something".

The point is that if you are asking people for suggestions to optimize your code, you should not make them have to re-research everything themselves.

At the very least you could comment what you're trying to do. If you just changed some pointers at the end and don't really know whats going on, that's a different story.
 

Gamer2020

Accept no Imitations!
1,062
Posts
15
Years
I don't see why you couldn't rename those "something"s into more meaningful names. Right now those might as well be hex offsets, since they give about the same information as "something".

The point is that if you are asking people for suggestions to optimize your code, you should not make them have to re-research everything themselves.

At the very least you could comment what you're trying to do. If you just changed some pointers at the end and don't really know whats going on, that's a different story.

You keep saying it's my code. I told you that I ported it and that's it. I called those offsets "SOMETHING" because they needed a name for me to make it so it could be assembled. I only put the "suggestions to optimize" thing because there may be ways it can be improved, not because I am looking for ways to improve it.

It's people like you why I hate posting stuff on here. Either read and understand what you read or don't bother posting. Bye now. "Clicks on ignore."
 
35
Posts
13
Years
  • Seen Mar 31, 2024
Gamer2030, I don't understand how I'm suppose to assemble this, I mean you put "Offset 0200F024 may not be safe in emerald but this can be changed to anything desired." What is that suppose to even mean? If it's not safe, then why can be changed to anything 'desired'? I'm confused...
 

Gamer2020

Accept no Imitations!
1,062
Posts
15
Years
Gamer2020, I don't understand how I'm suppose to assemble this, I mean you put "Offset 0200F024 may not be safe in emerald but this can be changed to anything desired." What is that suppose to even mean? If it's not safe, then why can be changed to anything 'desired'? I'm confused...

Memory address 0x0200F024 may not be safe. It is the same one used in the Ruby routine. This can be changed without affecting functionality.


It means that if it turns out the offset isn't safe it can be changed to a different RAM offset and the routine will still work. The offset is the same one used in the Ruby fix but APPEARED to be free in Emerald.
 

dkp

18
Posts
11
Years
  • Seen Mar 15, 2016
Is there a DAN that is able to work with this, perchance? A flashcart friendly DAN would be a little more than perfectly awesome. Thanks for this port, by the way.

To be honest, I'm trying to see if there's a way to make primedialga's read this clock's status byte (with his tool installing the RTC, then the DAN, then uninstalling the RTC (which leaves the DAN in place) and compiling this to use the same status byte) - I'm pretty sure that the way interdpth's rtc (and thus primedialga's DAN) works though that it will be stuck at midnight forever this way. I lack the understanding to move beyond this point.
 

Gamer2020

Accept no Imitations!
1,062
Posts
15
Years
Interdpths RTC would not work properly on flash carts even if they did have RTC. The only exception would be if the flash cart let you set the time of the chip. I really wouldn't recommend trying to make this routine work with interdpth's since it wouldn't keep track of the date that way.
 

dkp

18
Posts
11
Years
  • Seen Mar 15, 2016
Not what I meant - I know that, quite well actually. There is no RTC because even in the one or two insane flashcarts that include it, it doesn't work the way interdpth's does. I'm not using interdpth's rtc at all at this point; I just felt the need to explain that I already know I can't wrap some random person's (in this case, primedialga's) day and night to this clock fix, by having it read the values this routine sets. And I lack the experience to write a dan from scratch that reads from the bytes this sets.

So, I take it there's no DAN that would be compatible with this?
 

Gamer2020

Accept no Imitations!
1,062
Posts
15
Years
Not what I meant - I know that, quite well actually. There is no RTC because even in the one or two insane flashcarts that include it, it doesn't work the way interdpth's does. I'm not using interdpth's rtc at all at this point; I just felt the need to explain that I already know I can't wrap some random person's (in this case, primedialga's) day and night to this clock fix, by having it read the values this routine sets. And I lack the experience to write a dan from scratch that reads from the bytes this sets.

So, I take it there's no DAN that would be compatible with this?
If by DAN you mean the changing of colors then no (At least not anything available publicly). If one were developed using the rtc Emerald already has then it would work with the clock fix.
 
Back
Top