Notices
For all updates, view the main page.

Research & Development Got a well-founded knack with ROM hacking? Love reverse-engineering the Pokémon games? Or perhaps you love your assembly language. This is the spot for polling and gathering your ideas, and then implementing them! Share your hypothesis, get ideas from others, and collaborate to create!
Research & Development programs in this forum are subject to moderator approval before they are displayed.

Reply
 
Thread Tools
  #51    
Old October 2nd, 2015 (7:36 AM).
Pokemon_XY Pokemon_XY is offline
 
Join Date: Aug 2015
Posts: 58
Quote:
Originally Posted by TheZoroark007 View Post
I really want to do this on my hack, but really would need a tutorial!

I don't get what I have to do.
I know, I have to compile + insert the ASM Routines, but how/where do I have to inject the single pictures for the animation?
Follow my post and you will find that it requires a table, which is partially composed of image pointers. (You can follow Karatekid552's reply to get the accurate structure of the table)
Reply With Quote

Relevant Advertising!

  #52    
Old October 7th, 2015 (2:44 AM). Edited October 8th, 2015 by TheZoroark007.
TheZoroark007 TheZoroark007 is offline
 
Join Date: Jul 2013
Gender: Male
Posts: 94
So if I insert picture one at 0x800000 und picture two at 0x800020
The Table has to look like 00 00 80 08 (first image) 0 (the pause leng) 20 00 80 08 (second image) and repeat this? Or is this wrong?
Reply With Quote
  #53    
Old October 9th, 2015 (12:46 AM). Edited October 9th, 2015 by Deokishisu.
Deokishisu's Avatar
Deokishisu Deokishisu is offline
Mr. Magius
 
Join Date: Feb 2006
Location: If I'm online, it's a safe bet I'm at a computer.
Gender: Male
Nature: Relaxed
Posts: 770
Quote:
Originally Posted by TheZoroark007 View Post
So if I insert picture one at 0x800000 und picture two at 0x800020
The Table has to look like 00 00 80 08 (first image) 0 (the pause leng) 20 00 80 08 (second image) and repeat this? Or is this wrong?
I hope that these are just really bad example offsets, because there's no way your pictures are only 20 bytes long. You should search for freespace, insert your first picture, and then search for freespace again, insert the second image, etc.

Quote:
Word [Pointer to Image]; Byte [Pause Length]; Byte [Next Frame]
This is the format the table should be in. I haven't done this myself, but I would assume that the third on is the pointer to the next image in the sequence. Other than your example offsets, it seems like everything should be working. Are all of your images using the same .RAW? Are you (not) compressing the images when you should(n't) be? You're being so vague that no one can really help you.

EDIT: Wait, after rereading the format (had a bit of a reading comprehension fail) the third field is a byte and not a word. In this case, I think your table would be 00 00 80 08 (first image) 00 (the pause length) 01 (the next frame), 20 00 80 08 (second image) 00 (pause length) 02 (the next frame), etc. It seems you can populate the table and skip frames if you want, which is a weird way to structure it, imo. Why not just chop off the third field and have the table in order?
Reply With Quote
  #54    
Old October 9th, 2015 (2:58 AM).
TheZoroark007 TheZoroark007 is offline
 
Join Date: Jul 2013
Gender: Male
Posts: 94
Yes, it just where examples. I haven't inserted anything yet, I just said some random offsets to see how they have to be.
And thanks for the answer. It's a loz clearer for me now! I will try it later!
Reply With Quote
  #55    
Old October 9th, 2015 (5:56 AM).
FBI's Avatar
FBI FBI is offline
Free supporter
Silver Tier
 
Join Date: Jan 2013
Location: Unknown Island
Gender: Male
Posts: 1,618
Quote:
Originally Posted by Deokishisu View Post
I hope that these are just really bad example offsets, because there's no way your pictures are only 20 bytes long. You should search for freespace, insert your first picture, and then search for freespace again, insert the second image, etc.



This is the format the table should be in. I haven't done this myself, but I would assume that the third on is the pointer to the next image in the sequence. Other than your example offsets, it seems like everything should be working. Are all of your images using the same .RAW? Are you (not) compressing the images when you should(n't) be? You're being so vague that no one can really help you.

EDIT: Wait, after rereading the format (had a bit of a reading comprehension fail) the third field is a byte and not a word. In this case, I think your table would be 00 00 80 08 (first image) 00 (the pause length) 01 (the next frame), 20 00 80 08 (second image) 00 (pause length) 02 (the next frame), etc. It seems you can populate the table and skip frames if you want, which is a weird way to structure it, imo. Why not just chop off the third field and have the table in order?
Well, to clarify, this is animating an OAM, so there is no .raw file. As for the merit for the third field, it is so the last field (or other fields) can jump to a frame which isn't in the original frames for the first iteration, later moving on the the original frames. While you can make a linear table, you'd make it much larger than it has to be by not having the third field.
__________________
...
Reply With Quote
  #56    
Old October 12th, 2015 (7:39 AM).
Pokemon_XY Pokemon_XY is offline
 
Join Date: Aug 2015
Posts: 58
Quote:
Originally Posted by FBI View Post
Well, to clarify, this is animating an OAM, so there is no .raw file. As for the merit for the third field, it is so the last field (or other fields) can jump to a frame which isn't in the original frames for the first iteration, later moving on the the original frames. While you can make a linear table, you'd make it much larger than it has to be by not having the third field.
No, he uses BG to do the animation
Reply With Quote
  #57    
Old October 12th, 2015 (8:28 AM).
FBI's Avatar
FBI FBI is offline
Free supporter
Silver Tier
 
Join Date: Jan 2013
Location: Unknown Island
Gender: Male
Posts: 1,618
Quote:
Originally Posted by Pokemon_XY View Post
No, he uses BG to do the animation:)
Ah OK. It looked like the Zapdos Sprite from the game, so I drew conclusions without actually looking at the code. I apologize for the confusion!
__________________
...
Reply With Quote
  #58    
Old October 24th, 2015 (2:43 AM).
TheZoroark007 TheZoroark007 is offline
 
Join Date: Jul 2013
Gender: Male
Posts: 94
Quote:
Originally Posted by Pokemon_XY View Post
Follow my post and you will find that it requires a table, which is partially composed of image pointers. (You can follow Karatekid552's reply to get the accurate structure of the table)
I tried to compile the routine, but the compiler says :
animation.asm:23 : Error: Bad expression
animation.asm:23 : Error: Garbage following instruction

and no output file is created!
Reply With Quote
  #59    
Old October 28th, 2015 (7:27 AM).
Pokemon_XY Pokemon_XY is offline
 
Join Date: Aug 2015
Posts: 58
Quote:
Originally Posted by TheZoroark007 View Post
I tried to compile the routine, but the compiler says :
animation.asm:23 : Error: Bad expression
animation.asm:23 : Error: Garbage following instruction

and no output file is created!
idk what you meant. Could you post the routine you tried to compile?
Reply With Quote
  #60    
Old October 28th, 2015 (11:29 AM).
TheZoroark007 TheZoroark007 is offline
 
Join Date: Jul 2013
Gender: Male
Posts: 94
Quote:
Originally Posted by Pokemon_XY View Post
idk what you meant. Could you post the routine you tried to compile?
.thumb
Start:
push {r0-r3}
ldr r3, .RAM_Address
ldr r1, .Ani_Table
ldrb r2, [r3, #0x1]
lsl r2, #0x3
add r1, r2
ldrb r0, [r1, #0x4]
ldrb r2, [r3]
cmp r2, r0
bge LoadFrame
add r2, #0x1
strb r2, [r3]
b Finish
LoadFrame:
mov r2, #0x0
strb r2, [r3]
ldrb r2, [r1, #0x5]
strb r2, [r3, #0x1]
ldr r0, [r1]
ldr r1, .VRAM_Animated_Image
swi #0x12

Finish:
pop {r0-r3}
ExitRightNow:
ldr r1, [r0]
ldr r0, .Frame_Count
push {r3}
ldr r3, .Old_Routine
bx r3

.align 2
.Ani_Table:
.word 0x08YYYYYY @animation table offset
.RAM_Address:
.word 0x020370c0
.VRAM_Animated_Image:
.word 0x06004000
.Frame_Count:
.word 0x0000FFFF
.Old_Routine:
.word 0x08078C01
Reply With Quote
  #61    
Old October 29th, 2015 (3:20 AM).
Pokemon_XY Pokemon_XY is offline
 
Join Date: Aug 2015
Posts: 58
Quote:
Originally Posted by TheZoroark007 View Post
.thumb
Start:
push {r0-r3}
ldr r3, .RAM_Address
ldr r1, .Ani_Table
ldrb r2, [r3, #0x1]
lsl r2, #0x3
add r1, r2
ldrb r0, [r1, #0x4]
ldrb r2, [r3]
cmp r2, r0
bge LoadFrame
add r2, #0x1
strb r2, [r3]
b Finish
LoadFrame:
mov r2, #0x0
strb r2, [r3]
ldrb r2, [r1, #0x5]
strb r2, [r3, #0x1]
ldr r0, [r1]
ldr r1, .VRAM_Animated_Image
swi #0x12

Finish:
pop {r0-r3}
ExitRightNow:
ldr r1, [r0]
ldr r0, .Frame_Count
push {r3}
ldr r3, .Old_Routine
bx r3

.align 2
.Ani_Table:
.word 0x08YYYYYY @animation table offset
.RAM_Address:
.word 0x020370c0
.VRAM_Animated_Image:
.word 0x06004000
.Frame_Count:
.word 0x0000FFFF
.Old_Routine:
.word 0x08078C01
Have you changed YYYYYY to your table location?
Reply With Quote
  #62    
Old October 29th, 2015 (11:16 AM).
TheZoroark007 TheZoroark007 is offline
 
Join Date: Jul 2013
Gender: Male
Posts: 94
Yes
Reply With Quote
Reply
Quick Reply

Sponsored Links
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 5:27 PM.