The PokéCommunity Forums

The PokéCommunity Forums (https://www.pokecommunity.com/index.php)
-   Binary ROM Hacking (https://www.pokecommunity.com/forumdisplay.php?f=284)
-   -   Other Extended diploma screens problems ! (https://www.pokecommunity.com/showthread.php?t=356894)

TheZoroark007 October 23rd, 2015 10:24 PM

Quote:

Originally Posted by FBI (Post 8967373)
This isn't going to help you. You're messing up somewhere along the line, the routine works fine. I'm not really down to sit here and debug basic insertion with you.

If it helps you understand better, here are the files I used for my Latias.
http://www.mediafire.com/download/669bfv14ydb94sw/latiosTileMap.raw
http://www.mediafire.com/view/6dzljpkk3o35pol/latiosIndexed.png
http://www.mediafire.com/download/lqgyu1vgcc3p1d8/latiosPal.gpl

Ok. I now used a stock Firered, your files (picture,raw,pal),inserted them where you did (everything with UnLz GBA and fix pointers),inserted the original routine at 0x800050 ( also tried the
mov r0, #0x1
mov r2, #0x0
mov r3, #0x0
str r0, [SP]
mov r0, r2
ldr r4, gpu_tilemap_config_and_commit
thing)
and this script: '-----------------------
#org 0x71A38D
callasm 0x8800051
waitstate
end

Now everything locks up! Music hungs, the screen freezes, everything! I really don´t know whats wrong...
I tried inserted the Pal one time with APE and one time with UnLZ GBA.
Eventually it would help if you could sent me your script + already compiled routine ?

TheZoroark007 November 8th, 2015 5:14 AM

Since no one knows why it isn´t working on my hack, I will simply not use pictures in my intro. Sad, but acceptable...

Lance32497 December 11th, 2015 7:40 AM

Quote:

Originally Posted by FBI (Post 8961009)
You are better off making your own routines for this I'd say. Just build a good framework routine, then call a generic BG display one. It'd be much better than hacking the diploma screen in my eyes.


No. "08" means it's in the ROM, while "02" would mean RAM. Though when dealing with BGs and Pals these regions are not used (you get 05 and 06).

You can run a routine to do 256 colored BGs. From there making animating OAMs has already been documented. I've written a "Show BG" routine before for my titlescreen's Latios. I'll share for the uninitiated:

Code:

.text
.align 2
.thumb
.thumb_func

main:
        push {r4-r6, lr}
        sub SP, SP, #0x4
        ldr r4, bg_positions_reset
        bl linker

loadTileSet:
        @tileset doesn't require updating
        ldr r1, image
        mov r0, #0x0
        str r0, [sp]
        mov r0, #0x0
        mov r2, #0x0
        mov r3, #0x0
        ldr r4, decompress_with_fallback
        bl linker

loadPal:
        ldr r0, new_pal
        mov r1, #0xD0 @slot
        mov r2, #0x20 @size
        ldr r4, gpu_pal_apply
        bl linker
        ldr r0, new_pal
        ldr r4, gpu_pal_obj_alloc_tag_and_apply
        bl linker

loadTileMap:
        ldr r1, tilemap
        mov r0, #0x0
        mov r2, #0x0
        mov r3, #0x0
        ldr r4, gpu_tilemap_config_and_commit
        bl linker
        mov r0, #0x0
        ldr r4, bgid_send_tilemap
        bl linker
        ldr r0, tilemap
        ldr r4, gpu_tile_obj_alloc_tag_and_upload
        bl linker

showBG:
        mov r0, #0x0
        ldr r4, =(0x80019BC +1)
        bl linker

end:
        add SP, SP, #0x4
        pop {r4-r6, pc}

linker:
        bx r4

.align 2

@resources:
new_pal:
        .word 0x8EAD5E8

image:
        .word 0x8B03DE0

tilemap:
        .word 0x8B04660

@Functions:
gpu_pal_obj_alloc_tag_and_apply:
        .word 0x8008928 +1

gpu_tilemap_config_and_commit:
        .word 0x8002040 +1

gpu_tile_obj_alloc_tag_and_upload:
        .word 0x80086DC +1

bgid_send_tilemap:
        .word 0x80020BC +1

decompress_with_fallback:
        .word 0x80F6878 +1

gpu_pal_apply:
        .word 0x80703EC +1

bg_positions_reset:
        .word 0x812D594 +1


This Routine requires a set-up routine to fade the screen, and delete existing BGs and OAs. Otherwise it will just overwrite the BG defined by the BG slot in the routine (in this case 0) and just take up your screen.
You will need to change the "Resources" data and the slot/size field of the loadPal section to match the total amount of colors. Finally, depending on which BG you are planning to use, you must also edit the BG slot. It does support 256 colors.

Once again, I recommend that you first build your own BG calling framework to call a modified version of this routine. That way you can support as many BGs as you want in an efficient manner.
After all of that, make sure you credit me if you use my research or routine!

well, I got it working, but I dunno how to hide the OAM after it is executed

TheZoroark007 February 23rd, 2016 9:55 PM

Quote:

Originally Posted by Lance32497 (Post 9030444)
well, I got it working, but I dunno how to hide the OAM after it is executed

How did you got it working ? Can you tell me the exact steps you did ?

Lance32497 February 24th, 2016 5:33 AM

Quote:

Originally Posted by TheZoroark007 (Post 9131522)
How did you got it working ? Can you tell me the exact steps you did ?

I just did what FBI said

TheZoroark007 February 24th, 2016 5:40 AM

Quote:

Originally Posted by Lance32497 (Post 9131809)
I just did what FBI said

Ok. But could you tell me what you inserted where/how and how your script looks like ? I also tried it as he said, but only a blackscreen was the result for me

Lance32497 February 25th, 2016 10:30 PM

Quote:

Originally Posted by TheZoroark007 (Post 9131815)
Ok. But could you tell me what you inserted where/how and how your script looks like ? I also tried it as he said, but only a blackscreen was the result for me

Just follow what he had said, I forgot where the rom is so I can't check it right now, if I will have a spare time, I'll redo that and tell to you the procedure

TheZoroark007 February 28th, 2016 8:44 AM

Quote:

Originally Posted by Lance32497 (Post 9134411)
Just follow what he had said, I forgot where the rom is so I can't check it right now, if I will have a spare time, I'll redo that and tell to you the procedure

Well, I followed what he said, but he didn't said how to insert the picture,tilemap and palette... I inserted them with UnlZ Gba and did he rest like he said. But as you see in this thread, that was not working... But take your time. There is no need to hurry.

Blah February 28th, 2016 1:27 PM

It matters where you are coming into the BG from. If it's from the Overworld it should work fine. Somewhere like the Bag, or name selection or something, it'd require more work to setup the IOregs.

Please first verify it's working for a normal 16 color indexed image before you try the 256 one.

Lance32497 March 13th, 2016 3:29 AM

Quote:

Originally Posted by TheZoroark007 (Post 9139275)
Well, I followed what he said, but he didn't said how to insert the picture,tilemap and palette... I inserted them with UnlZ Gba and did he rest like he said. But as you see in this thread, that was not working... But take your time. There is no need to hurry.

I do not know what's wrong with FBI's code, it works for me. As for the Picture, I think the palette number of tilemap is wrong, or you had inserted the image incorrectly, it's either the tileset or the tilemap. I'm currently busy on the school, thus if I have a free time, I will try to reinsert it on the rom and tell you the step-by-step procedure. But for now, keep on trying until you figure out what bugs the code.


All times are GMT -8. The time now is 2:30 AM.


Like our Facebook Page Follow us on Twitter © 2002 - 2018 The PokéCommunity™, pokecommunity.com.
Pokémon characters and images belong to The Pokémon Company International and Nintendo. This website is in no way affiliated with or endorsed by Nintendo, Creatures, GAMEFREAK, The Pokémon Company or The Pokémon Company International. We just love Pokémon.
All forum styles, their images (unless noted otherwise) and site designs are © 2002 - 2016 The PokéCommunity / PokéCommunity.com.
PokéCommunity™ is a trademark of The PokéCommunity. All rights reserved. Sponsor advertisements do not imply our endorsement of that product or service. User generated content remains the property of its creator.

Acknowledgements
Use of PokéCommunity Assets
vB Optimise by DragonByte Technologies Ltd © 2023.