Advertiser Content

Darthatron

巨大なトロール。

Age 28
Male
Melbourne, Australia
Seen February 2nd, 2015
Posted October 28th, 2014
1,152 posts
13.8 Years
While browsing this section I found a post by colcolstyles (see below) about the amount of frames that the titlescreen in FireRed is displayed for. I then thought to myself "That'd be a good way to add an animation to the titlescreen!" and then I posted this thread.

For anyone who's interested, at '0x078c1c' there is a 32-bit number (the default value is '0x00000a8b') which dictates the number of frames for which the titlescreen is displayed before resetting. The GBA operates at roughly 60 frames per second and '0xa8b' divided by 60 is 45 so the unedited titlescreen is displayed for 45 seconds. You can change that number (remember to reverse it) to lengthen or shorten the amount of time it takes for the titlescreen to reset.

This is for Fire Red, by the way.
Anyway, my idea is to inject a routine just before that check to change the tileset/tilemap of the Charizard on the titlescreen, based on the amount of frames passed, allowing for animations to be used.

This would be a much better way of having an animated titlescreen than anything done before now(I think), since more than 2 frames will be able to be used.

I'll let you all know how it goes!!

EDIT:
http://www.youtube.com/watch?v=SA95KzAgb48
Success has been had.

EDIT2:
It now works by using a data array that works as such:
word:   Pointer to image
byte:   Pause Length
byte:   Next Frame
hword:  Buffer
...so a simple endless-loop animation (like in the video) would be possible, or you could play the first few frames once, then loop to a frame somewhere in the middle. Or you can stop the animation at the end by pointing to its own frame. The animation can be up to 255 frames. ^_^

So yeah, it just changes the tiles, not the tilemap, as that seems to suffice.

Any other ideas?

EDIT:
Zapdos in the animation: http://www.youtube.com/watch?v=rnm4SkwE22I
あなた は しきしゃ です
わたし は ばか です

Diegoisawesome

Oh god the bees

Age 22
Male
:noitacoL
Seen 4 Weeks Ago
Posted August 25th, 2019
1,056 posts
11.8 Years
Nice work! Now we only need to be able to 'pull' tilemaps across the screen...
And make this work in Emerald too, as it just resets on the end of the song.

Darthatron

巨大なトロール。

Age 28
Male
Melbourne, Australia
Seen February 2nd, 2015
Posted October 28th, 2014
1,152 posts
13.8 Years
For Emerald, I think it would be better to use an OAM. Of course, this would make moving of the animation a lot easier as well. But it would limit the size of the animation to 64x64. :\
あなた は しきしゃ です
わたし は ばか です

Diegoisawesome

Oh god the bees

Age 22
Male
:noitacoL
Seen 4 Weeks Ago
Posted August 25th, 2019
1,056 posts
11.8 Years
I wouldn't know, exactly, how to get the game to load a new OAM to the title screen, or how to have it animate... well, that would probably just use the frame system we've already found. But I wouldn't know how to make it, say, go across the screen. Then again, I don't know how to do that with tilemaps either...

Darthatron

巨大なトロール。

Age 28
Male
Melbourne, Australia
Seen February 2nd, 2015
Posted October 28th, 2014
1,152 posts
13.8 Years
Yeah, but not with the way they are stored in the B/W ROM, since they are stored as "parts" rather than full frames. But if you make/find full frames, and give me the order, I can make a video showing it.

EDIT: I got bored an put in Zapdos' animation. Well... kind of. Just the frames. Not the FULL animation, though that is very possible.

http://www.youtube.com/watch?v=rnm4SkwE22I

There is a downside to this hack, though. It takes quite a bit of space. The entire Zapdos animation (frames, tilemap and routine) take up 11.55kb (11,828 bytes) in the ROM. Which only works out to about 0.0007% of the entire (un-expanded) ROM, but it's still quite a bit.
あなた は しきしゃ です
わたし は ばか です

war rock exe

Pokemon Colosseum Remaker!!

Age 22
Male
wouldn't you like to know?
Seen February 18th, 2019
Posted December 29th, 2018
826 posts
9.8 Years
Yeah, but not with the way they are stored in the B/W ROM, since they are stored as "parts" rather than full frames. But if you make/find full frames, and give me the order, I can make a video showing it.

EDIT: I got bored an put in Zapdos' animation. Well... kind of. Just the frames. Not the FULL animation, though that is very possible.

http://www.youtube.com/watch?v=rnm4SkwE22I

There is a downside to this hack, though. It takes quite a bit of space. The entire Zapdos animation (frames, tilemap and routine) take up 11.55kb (11,828 bytes) in the ROM. Which only works out to about 0.0007% of the entire (un-expanded) ROM, but it's still quite a bit.


nice vid man

i'm guessing that you should probably complete the hack before you input the titlescreen...
POKÈMON COLOSSEUM TRILOGY FOR RMXP!! COMING THIS SUMMER!
STATUS; BETA 1 70%

Full Metal

C(++) Developer.

Age 24
Male
In my mind.
Seen August 19th, 2018
Posted May 27th, 2017
806 posts
11.8 Years
^ He's not actually making a hack. He's hacking. you know, learning, experimenting in areas others haven't really abused much. It's pretty cool and fun. ;)
ANYWAYS, what I *really* came here with.
I tried bpr 08078C1C 2
and nothing ever came up. :(
But it's okay, I followed that post link, and read down on that thread a bit further where Knizz ( Reference ) posted the offset of the comparison. I looked up the point where r0 is loaded with the value.
Spoiler:

08078bf8 4907 ldr r1, [$08078c18] (=$03005098)
08078bfa 1840 add r0, r0, r1
08078bfc 2300 mov r3, #0x0
08078bfe 5ec1 ldsh r1, [r0, r3]
08078c00 4806 ldr r0, [$08078c1c] (=$00000a8b)
08078c02 4281 cmp r1, r0
08078c04 dd05 ble $08078c12

And I was wondering, is the bpr not triggering because it's not ldr-ing a constant value? :\

★ full metal.

I like to push it,
and push it,
until my luck is over.

Darthatron

巨大なトロール。

Age 28
Male
Melbourne, Australia
Seen February 2nd, 2015
Posted October 28th, 2014
1,152 posts
13.8 Years
^ He's not actually making a hack. He's hacking. you know, learning, experimenting in areas others haven't really abused much. It's pretty cool and fun. ;)
ANYWAYS, what I *really* came here with.
I tried bpr 08078C1C 2
and nothing ever came up. :(
But it's okay, I followed that post link, and read down on that thread a bit further where Knizz ( Reference ) posted the offset of the comparison. I looked up the point where r0 is loaded with the value.
Spoiler:

08078bf8 4907 ldr r1, [$08078c18] (=$03005098)
08078bfa 1840 add r0, r0, r1
08078bfc 2300 mov r3, #0x0
08078bfe 5ec1 ldsh r1, [r0, r3]
08078c00 4806 ldr r0, [$08078c1c] (=$00000a8b)
08078c02 4281 cmp r1, r0
08078c04 dd05 ble $08078c12

And I was wondering, is the bpr not triggering because it's not ldr-ing a constant value? :\
I had the same problem, I think. I had to manually go to the offset and look for the part that loaded it. :\ I have no idea why, though. Sorry.

I use No$GBA to debug, though. Not VBA.



Anyway, if anyone wants the routine as is, PM me for it. I'm sure it can be optimized, but I don't have much free time to do so.
あなた は しきしゃ です
わたし は ばか です

Darthatron

巨大なトロール。

Age 28
Male
Melbourne, Australia
Seen February 2nd, 2015
Posted October 28th, 2014
1,152 posts
13.8 Years
Nice work! Now we only need to be able to 'pull' tilemaps across the screen...
And make this work in Emerald too, as it just resets on the end of the song.
In regards to this, I looked in to it, and it's a LOT easier to move the tilemap than I thought it would be. ^_^ Infact, I implemented it and it seems to work fine. Except when moving it from the X-axis, from off the screen, since the GBA hardware "wraps" the tilemap, which makes it come from left if moved off the right, and visa versa. :\ I can't see an easy way around this... Y-axis has no problem at all, though.

EDIT: Source off all knowledge: http://nocash.emubase.de/gbatek.htm#lcdiobgscrolling

EDIT2: http://www.youtube.com/watch?v=NuetDQEUqKQ
あなた は しきしゃ です
わたし は ばか です

Diegoisawesome

Oh god the bees

Age 22
Male
:noitacoL
Seen 4 Weeks Ago
Posted August 25th, 2019
1,056 posts
11.8 Years
There's an I/O flag for the BG layer that checks for wrapping.
Disable it and you're good to go.

Darthatron

巨大なトロール。

Age 28
Male
Melbourne, Australia
Seen February 2nd, 2015
Posted October 28th, 2014
1,152 posts
13.8 Years
There's an I/O flag for the BG layer that checks for wrapping.
Disable it and you're good to go.
Yeah, I tried that, but I couldn't get it working. I'll have another go later. ^_^
あなた は しきしゃ です
わたし は ばか です

Full Metal

C(++) Developer.

Age 24
Male
In my mind.
Seen August 19th, 2018
Posted May 27th, 2017
806 posts
11.8 Years
Hey, I tried that routine.
I think I did a nice job at understanding it. :)
You load a pointer to an array of those structures
Then, you load a pointer to the image and copy it.
Then you wait until the frame count for that image passes
Then you load the next and continue. { you store the fc and the current frame in that RAM_ADDRESS location thing. }
But one question, how do you know when to reset back to the first image?
{ I still haven't actually gotten this thing to work btw. I probably just need to start with a fresh ROM and go from there. }
Also, some other questions.
For that routine, does it use a tilemap? What about the graphics, should they be compressed, or decompressed?
*edit*
NVM on the knowing when to restart. You just set the `next frame` value to 0. :P
I FEEL SILLY now. But the questions of tilemaps uncompressed/compressed still remains.
Although I have a feeling it's uncompressed with a tilemap...(GbaTek doesn't say swi 0xC uncompresses any data )

★ full metal.

I like to push it,
and push it,
until my luck is over.

Darthatron

巨大なトロール。

Age 28
Male
Melbourne, Australia
Seen February 2nd, 2015
Posted October 28th, 2014
1,152 posts
13.8 Years
Hey, I tried that routine.
I think I did a nice job at understanding it. :)
You load a pointer to an array of those structures
Then, you load a pointer to the image and copy it.
Then you wait until the frame count for that image passes
Then you load the next and continue. { you store the fc and the current frame in that RAM_ADDRESS location thing. }
But one question, how do you know when to reset back to the first image?
{ I still haven't actually gotten this thing to work btw. I probably just need to start with a fresh ROM and go from there. }
Also, some other questions.
For that routine, does it use a tilemap? What about the graphics, should they be compressed, or decompressed?
*edit*
NVM on the knowing when to restart. You just set the `next frame` value to 0. :P
I FEEL SILLY now. But the questions of tilemaps uncompressed/compressed still remains.
Although I have a feeling it's uncompressed with a tilemap...(GbaTek doesn't say swi 0xC uncompresses any data )
The routine I gave you doesn't load any tilemap, it just uses the one in the original titlescreen, so you can replace that one. All graphics are compressed. ^_^

EDIT: Also, I don't know where you got SWI 0xC from? The only SWI used is 0x12 (LZ77UnCompVram.)
あなた は しきしゃ です
わたし は ばか です

Full Metal

C(++) Developer.

Age 24
Male
In my mind.
Seen August 19th, 2018
Posted May 27th, 2017
806 posts
11.8 Years
OH! I thought that was a decimal twelve, which I thought was odd. Awesome, thanks.

Okay...I must be doing something wrong.
I inserted my routine, and adjusted the original as you recommended ( I remembered to add 1 to the offset ) and I can view the titlescreen, and continue to the continue/new game screen. However...the swi function I think is causing some issues. It's copying *way* too much data, and it looks corrupt in the tile-viewer. ( I did insert two frames using unlz.GBA )



The Title Screen as it appears now.


Tile Viewer.

★ full metal.

I like to push it,
and push it,
until my luck is over.

esperance

Age 22
Male
Ohio
Seen 4 Days Ago
Posted June 23rd, 2019
3,827 posts
9.6 Years
Nice. Is it possible to get objects moving left to fight ie: fireballs going left and right rather than up and down?
I would think so, you would just have to find where their animation is controlled.

Also, will you ever release your ASM on this?
What are you so afraid of?

Darthatron

巨大なトロール。

Age 28
Male
Melbourne, Australia
Seen February 2nd, 2015
Posted October 28th, 2014
1,152 posts
13.8 Years
It's finished. But there is still no commented version. Since I am lazy. This is complex for something to start with, though. I suggest following some tutorials first.
あなた は しきしゃ です
わたし は ばか です
Advertiser Content