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 9th, 2015 11:20 PM

Extended diploma screens problems !
 
Is there a way to use a 256 color palette on the expanded diploma screens?
(I know that there is this : http://www.pokecommunity.com/showthread.php?t=299559 ) but since he never released the source code, I think it can't be used now?
Also (While trying to insert the 255 diploma hack, tutorial here: http://www.pokecommunity.com/showthread.php?t=280558), How can I got to Offsets like 0x080F4FC8? The Hexeditor says: Cannot find position!
If I only use 0x080F4FC , the other hex string I have to insert at 0x080F4FE(E) will overwrite parts of the previous!
Edit: I now inserted them at 0x08F4FC and so on but if I now start the script, the screen goes black and the sound gets strange...Then nothing but this happens!

Crimnor October 10th, 2015 4:22 AM

If I remember correctly 08 states that the offset above is a ram offset. You might want to try 0x0F4FC8 instead or look for its data equivalent.

TheZoroark007 October 10th, 2015 5:37 AM

I tried it, now the game just hung up...

Blah October 10th, 2015 6:40 AM

Quote:

Originally Posted by TheZoroark007 (Post 8960670)
Is there a way to use a 256 color palette on the expanded diploma screens?
(I know that there is this : http://www.pokecommunity.com/showthread.php?t=299559 ) but since he never released the source code, I think it can't be used now?
Also (While trying to insert the 255 diploma hack, tutorial here: http://www.pokecommunity.com/showthread.php?t=280558), How can I got to Offsets like 0x080F4FC8? The Hexeditor says: Cannot find position!
If I only use 0x080F4FC , the other hex string I have to insert at 0x080F4FE(E) will overwrite parts of the previous!
Edit: I now inserted them at 0x08F4FC and so on but if I now start the script, the screen goes black and the sound gets strange...Then nothing but this happens!

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.

Quote:

Originally Posted by Crimnor (Post 8960856)
If I remember correctly 08 states that the offset above is a ram offset. You might want to try 0x0F4FC8 instead or look for its data equivalent.

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!

TheZoroark007 October 10th, 2015 7:22 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!

So if my Image is at 0x08EF13C , my palette at 0x08EBC44 , my Raw at 0x08EE908
I have to write:

@resources:
new_pal:
.word 0x8EBC44

image:
.word 0x8EF13C

tilemap:
.word 0x8EE908

Is that right? Also, I don´t get what I have to write at the slot/size field if my palette is 16 colors (or when its 256 colors), or how to edit the BG slot...
And I can´t write a routine to fade the screen, and delete existing BGs and OAs, because I don´t have the required ASM skills for that.
But if I get this to work, you will be te first one mentioned when I release the hack, I promise you!

Blah October 10th, 2015 8:28 AM

Quote:

Originally Posted by TheZoroark007 (Post 8961064)
So if my Image is at 0x08EF13C , my palette at 0x08EBC44 , my Raw at 0x08EE908
I have to write:

@resources:
new_pal:
.word 0x8EBC44

image:
.word 0x8EF13C

tilemap:
.word 0x8EE908

Is that right? Also, I don´t get what I have to write at the slot/size field if my palette is 16 colors (or when its 256 colors), or how to edit the BG slot...
And I can´t write a routine to fade the screen, and delete existing BGs and OAs, because I don´t have the required ASM skills for that.
But if I get this to work, you will be te first one mentioned when I release the hack, I promise you!

Yes, the way you modified the resources are correct. Makesure all of it is L7SS compressed. The routine works as a standalone, so even if you don't know how to setup it should still display the image (you might have to warp afterwards to clear it if you don't know how to clear it yourself). Ugh, I'll make a more detailed post in the resources thread some other time in the near future.

TheZoroark007 October 10th, 2015 8:31 AM

Quote:

Originally Posted by FBI (Post 8961146)
Yes, the way you modified the resources are correct. Makesure all of it is L7SS compressed. The routine works as a standalone, so even if you don't know how to setup it should still display the image (you might have to warp afterwards to clear it if you don't know how to clear it yourself). Ugh, I'll make a more detailed post in the resources thread some other time in the near future.

So I also have to insert the Palette with UnLZgba? I thought that I have to insert it with APE! Thanks for the info!
But I still need to know what exactly to change at the slot/size field if my palette is 16 colors (or when its 256 colors)...
Edit: I now compiled the code with the changed offsets and then I ran a script with callasm 0x88EBC81 (I inserted the Routine at 0x08EBC80). But when I now start the Script, nothing happens, but only the music plays. The rest of the game gots locked up!

TheZoroark007 October 11th, 2015 8:51 PM

Any idea how I can make it work, FBI?

Touched October 11th, 2015 9:05 PM

Quote:

Originally Posted by TheZoroark007 (Post 8962672)
Any idea how I can make it work, FBI?

I'm not FBI but

Quote:

Originally Posted by TheZoroark007 (Post 8961064)
So if my Image is at 0x08EF13C , my palette at 0x08EBC44 , my Raw at 0x08EE908
I have to write:

@resources:
new_pal:
.word 0x8EBC44

image:
.word 0x8EF13C

tilemap:
.word 0x8EE908

Is that right? Also, I don´t get what I have to write at the slot/size field if my palette is 16 colors (or when its 256 colors), or how to edit the BG slot...
And I can´t write a routine to fade the screen, and delete existing BGs and OAs, because I don´t have the required ASM skills for that.
But if I get this to work, you will be te first one mentioned when I release the hack, I promise you!

These values need to be addresses, not offsets, so you must add 0x08000000 otherwise they will be in an invalid address space. Offsets are never used in ASM

TheZoroark007 October 11th, 2015 9:26 PM

So I have to write 0x88EBC44 instead of 0x8EBC44 or what do you mean?

Blah October 12th, 2015 6:37 AM

Quote:

Originally Posted by TheZoroark007 (Post 8962698)
So I have to write 0x88EBC44 instead of 0x8EBC44 or what do you mean?

Yeah that's exactly it. I didn't notice you forgot the 08 because your offset started at 0x8something. As for the pal slot and size. When you make an image's tilemap, you assign the tiles a pal via whatever editor you're using. 0xD0 needs to change to whichever pal you assigned. And 0x20 = 32 = 16 colors. Change that if you wanted 256.

TheZoroark007 October 12th, 2015 7:23 AM

Quote:

Originally Posted by FBI (Post 8963053)
Yeah that's exactly it. I didn't notice you forgot the 08 because your offset started at 0x8something. As for the pal slot and size. When you make an image's tilemap, you assign the tiles a pal via whatever editor you're using. 0xD0 needs to change to whichever pal you assigned. And 0x20 = 32 = 16 colors. Change that if you wanted 256.

It still isn´t working.It now gives me a blackscreen and everything gets locked up.. I inserted the tileset,map and pal with UnLzGba at the Ofsets:
picture1: 8EBC34
palette1: 8EF288
tilemap: 8EE958
I then edited the routine:
Quote:

.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, #0xD6 @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 0x088EF288

image:
.word 0x088EBC34

tilemap:
.word 0x088EE958


@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 +

gpu_pal_apply:
.word 0x80703EC +1

bg_positions_reset:
.word 0x812D594 +1
Here is how I made the tileset:
https://i.imgur.com/8mKdAUw.png
I used PAL 6 [7]

If you want to check the files: https://www.dropbox.com/s/sgi4k5h2i1p1y7h/Project.rar?dl=0

I really don't know whats wrong this time

Blah October 12th, 2015 6:52 PM

Quote:

Originally Posted by TheZoroark007 (Post 8963134)
It still isn´t working.It now gives me a blackscreen and everything gets locked up.. I inserted the tileset,map and pal with UnLzGba at the Ofsets:
picture1: 8EBC34
palette1: 8EF288
tilemap: 8EE958
I then edited the routine:

Here is how I made the tileset:
https://i.imgur.com/8mKdAUw.png
I used PAL 6 [7]

If you want to check the files: https://www.dropbox.com/s/sgi4k5h2i1p1y7h/Project.rar?dl=0

I really don't know whats wrong this time

Check the pal map tab on ntme. Make sure it is filled with pal 06. Also,
mov r1, #0xD6 @slot
That line should be mov r1, #0x60 iirc.

TheZoroark007 October 12th, 2015 8:55 PM

Yes, it's filled with Pal 6 in the marked section. You can check it if you want by downloading the archive linked above.
I will test the 0x60 stuff later today when I get home from school!

TheZoroark007 October 13th, 2015 8:55 PM

Quote:

Originally Posted by FBI (Post 8963822)
Check the pal map tab on ntme. Make sure it is filled with pal 06. Also,
mov r1, #0xD6 @slot
That line should be mov r1, #0x60 iirc.

I did that.It still stucks at the blackscreen if use

Quote:

@resources:
new_pal:
.word 0x88EF288

image:
.word 0x88EBC34

tilemap:
.word 0x88EE958
and if I use

Quote:

@resources:
new_pal:
.word 0x088EF288

image:
.word 0x088EBC34

tilemap:
.word 0x088EE958
the screen isn´t going black, but nothing happens and the game isn´t recognicing any input...

Blah October 14th, 2015 4:52 AM

Can I see your script and the entire routine AFTER you've modified it?

TheZoroark007 October 14th, 2015 7:46 AM

Quote:

Originally Posted by FBI (Post 8965141)
Can I see your script and the entire routine AFTER you've modified it?

Yes you can!
Here is the modified routine:
Quote:

.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, #0x60 @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 0x88EF288

image:
.word 0x88EBC34

tilemap:
.word 0x88EE958


@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
Script:
Quote:

'-----------------------
#org 0x71A38D
callasm 0x88EF1A1
waitstate
end

Joexv October 14th, 2015 8:14 AM

Quote:

Originally Posted by TheZoroark007 (Post 8965330)
Yes you can!
Here is the modified routine:


Script:

Shouldnt there be a
Code:

waitstate


right after your callasm?

TheZoroark007 October 14th, 2015 8:26 AM

Quote:

Originally Posted by Joexv (Post 8965360)
Shouldnt there be a
Code:

waitstate


right after your callasm?

Oops, I forgot that.I fixed that. But it still freezes !

Blah October 14th, 2015 11:12 AM

Quote:

Originally Posted by Joexv (Post 8965360)
Shouldnt there be a
Code:

waitstate


right after your callasm?

Nah, you don't need it.

Quote:

Originally Posted by TheZoroark007 (Post 8965371)
Oops, I forgot that.I fixed that. But it still freezes !

mov r0, #0x0
mov r2, #0x0
mov r3, #0x0
ldr r4, gpu_tilemap_config_and_commit

change that to

mov r0, #0x1
mov r2, #0x0
mov r3, #0x0
str r0, [SP]
mov r0, r2
ldr r4, gpu_tilemap_config_and_commit


then check in VBA's map viewer if BG0 exists/the pals are actually being written to.

If that doesn't work, idk, it's your image. Remember you've set this up to be on pal 0x6 and a size of 16 colors.

TheZoroark007 October 14th, 2015 11:40 AM

Quote:

Originally Posted by FBI (Post 8965511)
Nah, you don't need it.



mov r0, #0x0
mov r2, #0x0
mov r3, #0x0
ldr r4, gpu_tilemap_config_and_commit

change that to

mov r0, #0x1
mov r2, #0x0
mov r3, #0x0
str r0, [SP]
mov r0, r2
ldr r4, gpu_tilemap_config_and_commit


then check in VBA's map viewer if BG0 exists/the pals are actually being written to.

If that doesn't work, idk, it's your image. Remember you've set this up to be on pal 0x6 and a size of 16 colors.

I checked the BG0 and:
https://i.imgur.com/hFyQEDH.png
But I don´t think it´s the picture. You can check it, I uploaded it with palette and tilemap: https://www.dropbox.com/s/sgi4k5h2i1p1y7h/Project.rar?dl=0

If it´s relevant, I inserted the Image and Pal with UnLz GBA by selecting export image and export pal and I inserted the .raw with load raw and import picture (also UnLz GBA)( I always selected auto fix pointers)

Blah October 14th, 2015 1:08 PM

Did you try the code revision I posted last post? I'm unsure why it didn't work for you, as the code is almost a direct RIP from my ROM.

TheZoroark007 October 14th, 2015 7:59 PM

Quote:

Originally Posted by FBI (Post 8965615)
Did you try the code revision I posted last post? I'm unsure why it didn't work for you, as the code is almost a direct RIP from my ROM.

Yes I did.Eventually my Raw is wrong. What size does it have to have? Same for the tileset?

You could sent me your Latios Sprite thing with the .raw so that I can check that. With them I could also try if it would work with them!

TheZoroark007 October 15th, 2015 8:55 PM

Quote:

Originally Posted by FBI (Post 8965615)
Did you try the code revision I posted last post? I'm unsure why it didn't work for you, as the code is almost a direct RIP from my ROM.

I now tried it with a clean new rom, it still just locks the game up!
So what size does the raw have? Same for the tileset?

You could sent me your Latios Sprite thing with the .raw so that I can check that. With them I could also try if it would work with them!

Blah October 16th, 2015 7:44 AM

1 Attachment(s)
Quote:

Originally Posted by TheZoroark007 (Post 8966958)
I now tried it with a clean new rom, it still just locks the game up!
So what size does the raw have? Same for the tileset?

You could sent me your Latios Sprite thing with the .raw so that I can check that. With them I could also try if it would work with them!

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

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.