Go Back   The PokéCommunity Forums > ROM Hacking > Tools, Tutorials & Resources
Reload this Page [Tutorial] GBA ASM Programming

Notices
For all updates, view the main page.

Tools, Tutorials & Resources Various tools to help you develop your hacks can be found here.
New threads in this forum are to be approved by a moderator before they are displayed.



Reply
 
Thread Tools
  #51    
Old October 23rd, 2014 (10:33 AM).
eugarps eugarps is offline
 
Join Date: Oct 2014
Posts: 2
The Dropbox link seems to be broken. Could I get a mirror/email ([email protected])with the files? Thank you
Reply With Quote
  #53    
Old November 24th, 2014 (07:20 AM).
Volt-Ikazuchi Volt-Ikazuchi is offline
 
Join Date: Dec 2013
Gender: Male
Posts: 15
Just curious here, I would need to use ASM to block players from challenging certain trainers (Gym Leaders, Rivals) with pokémons above a certain level, right?
What if I need to block items during a certain battle?

I'm just starting out, so I wanted to make my first hack more simple to understand mapping and scripting better, but if I need ASM to get some level and item caps then I'll have to learn it as well.

Thanks for the tutorial, looks very interesting, I'll definitely read it later.
Reply With Quote
  #54    
Old November 24th, 2014 (08:27 AM).
FBI agent's Avatar
FBI agent FBI agent is offline
If my PM box is full, VM instead :x
 
Join Date: Jan 2013
Location: Unknown Island
Gender: Male
Posts: 814
Quote originally posted by Volt-Ikazuchi:
Just curious here, I would need to use ASM to block players from challenging certain trainers (Gym Leaders, Rivals) with pokémons above a certain level, right?
What if I need to block items during a certain battle?

I'm just starting out, so I wanted to make my first hack more simple to understand mapping and scripting better, but if I need ASM to get some level and item caps then I'll have to learn it as well.

Thanks for the tutorial, looks very interesting, I'll definitely read it later.
For blocking players from challenging certain trainers depending on party pokemon level you need some asm, but it's just function calls, nothing down and dirty.

For the item one, you'd need a battle script (look up Jambo's battle script tutorial/tool). Though admittedly, battle scripts are also very technical P:
__________________
...

My name forum name is FBI Agent, though you can call me FBI because it's shorter.

Some of my stuff:
ASM request/resource thread
ASM tutorials thread
ASM Workshop
Reply With Quote
  #55    
Old November 26th, 2014 (07:48 AM).
Volt-Ikazuchi Volt-Ikazuchi is offline
 
Join Date: Dec 2013
Gender: Male
Posts: 15
Quote originally posted by FBI agent:
For blocking players from challenging certain trainers depending on party pokemon level you need some asm, but it's just function calls, nothing down and dirty.

For the item one, you'd need a battle script (look up Jambo's battle script tutorial/tool). Though admittedly, battle scripts are also very technical P:
Really? That's great news!

Mind to elaborate what asm routines I would need to do the level caps?
I really don't want to go in blind and break the game.
And are you saying that locking the items mid-battle require just some scripting? Can it be done in XSE or would I need Jambo's tool?

Thanks for the answers. Really helped.
Reply With Quote
  #56    
Old November 26th, 2014 (08:11 AM).
FBI agent's Avatar
FBI agent FBI agent is offline
If my PM box is full, VM instead :x
 
Join Date: Jan 2013
Location: Unknown Island
Gender: Male
Posts: 814
Quote originally posted by Volt-Ikazuchi:
Really? That's great news!

Mind to elaborate what asm routines I would need to do the level caps?
I really don't want to go in blind and break the game.
And are you saying that locking the items mid-battle require just some scripting? Can it be done in XSE or would I need Jambo's tool?

Thanks for the answers. Really helped.
Sure, for the prevention of player challenging trainers, it's 90% handled by the trainer script.

I would do this:
Code:
#dyn 0x740000
#org @start
lock
faceplayer
setvar 0x4011 0x[max level of trainer]
callasm 0x[asm that returns max pokemon level in party]
compare 0x4001 LASTRESULT
if > jump @ignore
trainerbattle 0x0 0xID 0x0 @intro @defeat
msgbox @afterwards
callstd MSG_NORMAL
release
end

#org @ignore
msgbox @noThanks
callstd MSG_NORMAL
release
end

#org @noThanks
= Sorry, you wouldn't be a\nchallenge to me!

#org @intro
= Battle started, say something

#org @defeat
= defeat text

#org @afterwards
= Nice battle.
For the item blocking, I have no idea. I think Jambo's tutorial on Battle scripts covers it iirc.
__________________
...

My name forum name is FBI Agent, though you can call me FBI because it's shorter.

Some of my stuff:
ASM request/resource thread
ASM tutorials thread
ASM Workshop
Reply With Quote
  #57    
Old December 30th, 2014 (10:56 AM).
DizzyEgg's Avatar
DizzyEgg DizzyEgg is online now
 
Join Date: Feb 2014
Age: 17
Gender: Male
Nature: Quiet
Posts: 57
Some images in the tutorial are missing. Could someone upload them?
__________________
Please excuse my poor English. I'm still learning
Reply With Quote
  #58    
Old January 2nd, 2015 (01:19 AM).
ZapdosMan's Avatar
ZapdosMan ZapdosMan is offline
The Principality
 
Join Date: Jun 2014
Gender: Male
Posts: 43
Wow I think this is a really good tutorial
though i find it hard to understand but finally someone posted a tutorial on this

Thanks

ZapdosMan
__________________
Feel free to add me to your friends list! Just send me a request :D
If anyone needs help with his or her hack, PM me, I will see to your request :0
Also i am making hack banners for people as long as they put me in their team as the "Banner Artist". I might not make the best banners but i put my heart and soul into it.

Hacks I am supporti:
Reply With Quote
  #59    
Old February 16th, 2015 (12:02 AM).
Sounak's Avatar
Sounak Sounak is offline
Black Charizard
 
Join Date: Oct 2014
Gender: Male
Nature: Careful
Posts: 6
The download link to your ASM pack is not working.
Can you re-upload it please.
Reply With Quote
  #60    
Old February 20th, 2015 (11:42 AM).
DizzyEgg's Avatar
DizzyEgg DizzyEgg is online now
 
Join Date: Feb 2014
Age: 17
Gender: Male
Nature: Quiet
Posts: 57
I have a problem with your first routine. Here's what I got http://i.imgur.com/obuckLm.png
My code:
Spoiler:
.align 2
.thumb
main:
push {r0-r1,lr}
ldr r0, pokemon_data
ldrh r0, [r0]
ldr r1, var
strh r0, [r1]
pop {r0-r1, pc}

.align 2
pokemon_data: .word 0x02024284 + 0x54
var: .word 0x20370D0

I also tried those ( 03 B5 02 48 80 88 02 49 08 80 03 BD 84 42 02 02 D0 70 03 02 ) assembled numbers and still got the same result. Why is this happening?
__________________
Please excuse my poor English. I'm still learning
Reply With Quote
  #61    
Old February 20th, 2015 (01:15 PM).
GoGoJJTech's Avatar
GoGoJJTech GoGoJJTech is offline
http://GoGoJJTech.com (WIP!)
Silver Tier
 
Join Date: Nov 2012
Location: Earth
Age: 16
Gender: Male
Nature: Quiet
Posts: 1,965
Quote originally posted by DizzyEgg:
I have a problem with your first routine. Here's what I got http://i.imgur.com/obuckLm.png
My code:
Spoiler:
.align 2
.thumb
main:
push {r0-r1,lr}
ldr r0, pokemon_data
ldrh r0, [r0]
ldr r1, var
strh r0, [r1]
pop {r0-r1, pc}

.align 2
pokemon_data: .word 0x02024284 + 0x54
var: .word 0x20370D0

I also tried those ( 03 B5 02 48 80 88 02 49 08 80 03 BD 84 42 02 02 D0 70 03 02 ) assembled numbers and still got the same result. Why is this happening?
That routine seems to be a failure. You're trying to load the level but you're loading a halfword (two bytes).
Change "ldrh r0, [r0]" to "ldrb r0, [r0]"
__________________
I believe in Jesus Christ my Savior. If you do too, and aren't scared to admit it, then copy and paste this into your signature.
The SoulSilver Music Patch - The Black Music Patch - Mega-Huge Sappy Tutorial
Romhack.me Profile - Pokecommunity Profile - Pokemonhackersonline Profile - Youtube Channel

Join us in the romhacking chat
Pokémon Platinum Red and Blue
Reply With Quote
  #62    
Old February 20th, 2015 (01:32 PM).
FBI agent's Avatar
FBI agent FBI agent is offline
If my PM box is full, VM instead :x
 
Join Date: Jan 2013
Location: Unknown Island
Gender: Male
Posts: 814
Quote originally posted by DizzyEgg:
I have a problem with your first routine. Here's what I got http://i.imgur.com/obuckLm.png
My code:
Spoiler:
.align 2
.thumb
main:
push {r0-r1,lr}
ldr r0, pokemon_data
ldrh r0, [r0]
ldr r1, var
strh r0, [r1]
pop {r0-r1, pc}

.align 2
pokemon_data: .word 0x02024284 + 0x54
var: .word 0x20370D0

I also tried those ( 03 B5 02 48 80 88 02 49 08 80 03 BD 84 42 02 02 D0 70 03 02 ) assembled numbers and still got the same result. Why is this happening?
Hi. If I'm understanding this correctly, you're trying to check the Pokemon's level (hence 0x02024284 + 0x54) ? Well a Pokemon's level is 0-100, which can be represented in hex as 1 byte (0x64 being 100)

Code:
    ldr r0, pokemon_data
    ldrh r0, [r0]
You're loading a half word (2 bytes) which is going to load something extra as well. Try ldrb instead of ldrh.
__________________
...

My name forum name is FBI Agent, though you can call me FBI because it's shorter.

Some of my stuff:
ASM request/resource thread
ASM tutorials thread
ASM Workshop
Reply With Quote
  #63    
Old February 21st, 2015 (12:14 AM).
DizzyEgg's Avatar
DizzyEgg DizzyEgg is online now
 
Join Date: Feb 2014
Age: 17
Gender: Male
Nature: Quiet
Posts: 57
Quote originally posted by FBI agent:
Hi. If I'm understanding this correctly, you're trying to check the Pokemon's level (hence 0x02024284 + 0x54) ? Well a Pokemon's level is 0-100, which can be represented in hex as 1 byte (0x64 being 100)

Code:
    ldr r0, pokemon_data
    ldrh r0, [r0]
You're loading a half word (2 bytes) which is going to load something extra as well. Try ldrb instead of ldrh.
Quote originally posted by GoGoJJTech:
That routine seems to be a failure. You're trying to load the level but you're loading a halfword (two bytes).
Change "ldrh r0, [r0]" to "ldrb r0, [r0]"
It worked perfectly. Thank you!
__________________
Please excuse my poor English. I'm still learning
Reply With Quote
  #64    
Old 4 Weeks Ago (11:20 AM).
WishMaker004 WishMaker004 is offline
Dragon WishMaker
 
Join Date: Feb 2015
Gender: Male
Posts: 1
The link is broken, I'd love to try this out, could somebody post a working link or file? I'll give you my email if I have to.
Reply With Quote
  #65    
Old 3 Weeks Ago (09:12 AM).
technickal's Avatar
technickal technickal is offline
 
Join Date: Sep 2014
Location: United States
Gender: Male
Nature: Relaxed
Posts: 69
To those talking about the broken link, I have a mirror for the compiler (but the compiler only):
https://cloud.openmailbox.org/public.php?service=files&t=39b08db949499c9f53021c95306a192e
__________________

Unova Pokémon are great. Got an Isshu with that?
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 UTC -8. The time now is 08:00 AM.