• 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?".
  • 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.

How to get Prime-Dialga's DNS to work (Seasons not included)

Criminon

Forever Spriting
265
Posts
11
Years
  • First of all, thanks to Prime for the amazing tool. It took a long time to understand it, so I decided to share what I learned in hopes that its going to save some people a lot of trouble!

    The tool can be found here -> http://www.pokecommunity.com/showthread.php?t=246089

    HOW TO GET THE PROGRAM WORKING
    Open the program "FSF" (free space finder)
    Open windows calculator and change it to programmer mode.
    Open the DNS program.

    In the DNS program, look where it says install RTC (on the left) it should have a # on how much free space it needs.
    Click the calculator and click hex mode.
    Type in that #.
    Click the decimal mode.
    Copy that # and paste it into FSF after opening the rom.
    Click search.
    Copy that # and paste it into the RTC and hit install.
    This will now install it to that offset.
    Now, do the same process with night and day, and seasons if you want those.

    The RTC is a clock based system. It basically makes variables in the game that will read off the time. Until you make it do something, you won't see a difference.
    The day and night system works on the REAL time of day and night. So if its still day outside where you are, you won't see a difference.
    Wait until night time or morning. Also make sure you have your emulator's real time clock enabled.
    Options -> Game emulator -> Game override -> Real time clock enabled. (This is for VBA)

    I haven't touched seasons and won't touch them. Too much spriting.


    USING NIGHT FUNCTIONS

    Since there are technically 3 slots for night, this is what you would want to use:
    Spoiler:

    if you look on the bottom right of the program, it says "status byte" these are the corresponding #s for night.


    TELLING WHAT DAY IT IS

    if you're looking to check what day it is, first you have to understand how the information reads. If you look on the DNS program at the RTC area. You're going to see the offset where the RTC is installed, and then you're going to see the time will be written to "0x0300553c"
    Now since it seems like there has been a lot of innacuracy on this specific offset throughout this thread, causing a lot of issues, we have to do this to confirm we're in the right spot:

    Open up VBA.
    Click tools -> memory viewer -> and type in your offset.

    You're going to see:

    DF 07 etc etc etc

    If you reverse DF 07 you get 07DF, and that's 2015 in hex. (Hey we found the year offset!)
    Now we know the corresponding days...
    0 is sunday 1 is monday 2 is tuesday etc... so which one of these #s lines up with what day it is?
    Click the one that does. At the bottom right you will see the offset for comparefarbytetobyte. Grats!

    Spoiler:



    TELLING THE TIME

    Code:
    .text
    .align 2
    .thumb
    .thumb_func
    
    main:
    	push {lr}
    	ldr r0, var_8000
    	ldr r1, date @loads the date address
    	ldrb r1, [r1] @loads the value
    	strb r1, [r0] @stores the date in variable 8000
    	ldrb r1, [r1, #0x2] @loads the hour value into r1
    	strb r1, [r0, #0x2] @stores the hour in variable 8001
    	ldrb r1, [r1, #0x3] @loads the minute value into r1
    	strb r1, [r0, #0x4] @stores the minute in variable 8002
    	pop {pc}
    
    
    .align 2
    	var_8000 	.word 0x020370B8
    	date		.word 0x03005540

    Now you should be able you buffernumber 0x8000, 8001, 8002 for your variable. Also a quick heads up you can do this without ASM (but it is less efficient) by copying the byte to 0x020370B8 (Last_Result 0x800D). Not sure about copy half word though... Anyway it should work now :)

    Hopefully this clears up confusion.
     
    Last edited:

    kearnseyboy6

    Aussie's Toughest Mudder
    300
    Posts
    15
    Years
    • Seen Jun 22, 2019
    Sorry to cram your super code but this will copy the time into variable 0x8000:

    Code:
    .text
    .align 2
    .thumb
    .thumb_func
    
    main:
    	push {lr}
    	ldr r0, var_8000
    	ldr r1, time
    	ldrb r1, [r1]
    	strb r1, [r0]
    	pop {pc}
    
    
    .align 2
    	var_8000 	.word 0x020370B8
    	time		.word 0x0300553c
     

    Criminon

    Forever Spriting
    265
    Posts
    11
    Years
  • Sorry to cram your super code but this will copy the time into variable 0x8000:

    Code:
    .text
    .align 2
    .thumb
    .thumb_func
    
    main:
    	push {lr}
    	ldr r0, var_8000
    	ldr r1, time
    	ldrb r1, [r1]
    	strb r1, [r0]
    	pop {pc}
    
    
    .align 2
    	var_8000 	.word 0x020370B8
    	time		.word 0x0300553c

    Haha, supercode... Yeah it was a pain in the ass writing that. I'm using JPAN's engine and I think 8000 is used. I would have much rather used ASM but at least it works.
     
    3,044
    Posts
    9
    Years
  • Haha, supercode... Yeah it was a pain in the ass writing that. I'm using JPAN's engine and I think 8000 is used. I would have much rather used ASM but at least it works.

    Well then, use LASTRESULT (0x800D) Let me modify the ASM.

    Code:
    .text
    .align 2
    .thumb
    .thumb_func
    
    main:
    	push {lr}
    	ldr r0, var_800D
    	ldr r1, time
    	ldrb r1, [r1]
    	strb r1, [r0]
    	pop {pc}
    
    
    .align 2
    	var_800D 	.word 0x020370D0
    	time		.word 0x0300553c

    And, Criminon, your script is so huge :0
     

    Criminon

    Forever Spriting
    265
    Posts
    11
    Years
  • Well then, use LASTRESULT (0x800D) Let me modify the ASM.

    Code:
    .text
    .align 2
    .thumb
    .thumb_func
    
    main:
    	push {lr}
    	ldr r0, var_800D
    	ldr r1, time
    	ldrb r1, [r1]
    	strb r1, [r0]
    	pop {pc}
    
    
    .align 2
    	var_800D 	.word 0x020370D0
    	time		.word 0x0300553c

    And, Criminon, your script is so huge :0

    lol it may not be the best, but it gets the job done, haha. Thanks. I figured it would be easy to edit the variable. I didn't look at the code. Was actually reading up on ASM programming now. Also with this ASM, (I haven't tried it yet) does it show the entire time when called? like 4:46? or 4? or 46?
     
    Last edited:
    3,044
    Posts
    9
    Years
  • lol it may not be the best, but it gets the job done, haha. Thanks. I figured it would be easy to edit the variable. I didn't look at the code. Was actually reading up on ASM programming now. Also with this ASM, (I haven't tried it yet) does it show the entire time when called? like 4:46? or 4? or 46?

    I'll test it once I have some free time. Studying atm.
     

    kearnseyboy6

    Aussie's Toughest Mudder
    300
    Posts
    15
    Years
    • Seen Jun 22, 2019
    Code:
    .text
    .align 2
    .thumb
    .thumb_func
    
    main:
    	push {lr}
    	ldr r0, var_8000
    	ldr r1, date @loads the date address
    	ldrb r1, [r1] @loads the value
    	strb r1, [r0] @stores the date in variable 8000
    	ldrb r1, [r1, #0x2] @loads the hour value into r1
    	strb r1, [r0, #0x2] @stores the hour in variable 8001
    	ldrb r1, [r1, #0x3] @loads the minute value into r1
    	strb r1, [r0, #0x4] @stores the minute in variable 8002
    	pop {pc}
    
    
    .align 2
    	var_8000 	.word 0x020370B8
    	date		.word 0x03005540

    Now you should be able you buffernumber 0x8000, 8001, 8002 for your variable. Also a quick heads up you can do this without ASM (but it is less efficient) by copying the byte to 0x020370B8 (Last_Result 0x800D). Not sure about copy half word though... Anyway it should work now :)
     

    Criminon

    Forever Spriting
    265
    Posts
    11
    Years
  • Code:
    .text
    .align 2
    .thumb
    .thumb_func
    
    main:
    	push {lr}
    	ldr r0, var_8000
    	ldr r1, date @loads the date address
    	ldrb r1, [r1] @loads the value
    	strb r1, [r0] @stores the date in variable 8000
    	ldrb r1, [r1, #0x2] @loads the hour value into r1
    	strb r1, [r0, #0x2] @stores the hour in variable 8001
    	ldrb r1, [r1, #0x3] @loads the minute value into r1
    	strb r1, [r0, #0x4] @stores the minute in variable 8002
    	pop {pc}
    
    
    .align 2
    	var_8000 	.word 0x020370B8
    	date		.word 0x03005540

    Now you should be able you buffernumber 0x8000, 8001, 8002 for your variable. Also a quick heads up you can do this without ASM (but it is less efficient) by copying the byte to 0x020370B8 (Last_Result 0x800D). Not sure about copy half word though... Anyway it should work now :)

    Hey thanks a bunch for this. I really appreciate you taking the time to make this. I've been reading up on asm since my last post. Lets hope I'll be able to contribute the same here soon.
     

    RichterSnipes

    Not even a nibble...
    513
    Posts
    12
    Years
  • This thread is a good primer for people wanting to use this for D/N events!

    You might want to add a disclaimer in the OP that this implementation of the RTC breaks in-game trading. Shiny Quagsire modified it to fix this issue among other things. Follow the instructions in it and insert it as you would with any other ASM. It seems to mostly works as it should, but I have issues with extra map lighting occasionally becoming disabled.
     

    Criminon

    Forever Spriting
    265
    Posts
    11
    Years
  • This thread is a good primer for people wanting to use this for D/N events!

    You might want to add a disclaimer in the OP that this implementation of the RTC breaks in-game trading. Shiny Quagsire modified it to fix this issue among other things. Follow the instructions in it and insert it as you would with any other ASM. It seems to mostly works as it should, but I have issues with extra map lighting occasionally becoming disabled.

    Wasn't there a fix for that?

    Fortunately it's not necessary.

    Some time ago i found the reason of the screen blinking while entering in a building or when you're selecting moves in battle. I don't know why, but the game stores a copy of the palette memory in WRAM and reloads it in these situations, causing a blink effect because the original palette is loaded for one frame. Replacing 0x70682 with 00 00 00 00 fixes the problem, but i haven't tested enough to say that it doesn't cause other glitches.
    This doesn't fix the warp-arrow glitch though.


    This fixed it for me with the standard DNS installed.
     

    RichterSnipes

    Not even a nibble...
    513
    Posts
    12
    Years
  • Wasn't there a fix for that?




    This fixed it for me with the standard DNS installed.
    Is this a complete fix, or more of a bandage for a bigger problem? The poster says that it doesn't fix one of the other issues from it. I assume the one I linked to fixes more than that, since it's less than a year old.
     

    Criminon

    Forever Spriting
    265
    Posts
    11
    Years
  • Is this a complete fix, or more of a bandage for a bigger problem? The poster says that it doesn't fix one of the other issues from it. I assume the one I linked to fixes more than that, since it's less than a year old.

    The fix I linked fixes the flickering. You said it still happens when you go places correct? I haven't had any problems with flickering using the above.

    Edit: sorry you said extra map lighting. I figured this was what you were reffering to.
     
    Back
    Top