Quick Research & Development Thread Page 32

Started by Spherical Ice January 9th, 2010 2:23 AM
  • 478239 views
  • 1138 replies

C me

Creator of Pokemon League Of Legends

Age 23
Male
Seen February 2nd, 2019
Posted September 9th, 2018
683 posts
6.3 Years
I'm going to post this here because I'm sick of working on it and it should be so simple.

I have been trying to find the location of the routine called when you use fly from the pokemon menu in Emerald. FBI found it at 0xC4EF8 in FireRed and a simple callasm script makes it work perfectly.

After spending hours looking for byte similarities between FireRed and Emerald I found nothing of value.
So then I moved on to making breakpoints for 'FLY', 'FLY to where?' and for cities names as well as breakpoints for the map tilesets and tilemaps, after hours the thing I keep getting is that it's around 0x124600.

KDS spent some time helping me out and he pointed out the routine at 0x124690.

Callasming 0x124691 produces a black screen, every other routine I've tried does nothing. Maybe something has to be set before the callasm?

That's all the information I have, I would really appreciate help. Thank You

FBI

Free supporter

Male
Unknown Island
Seen 1 Day Ago
Posted December 17th, 2019
1,910 posts
7.4 Years
I'm going to post this here because I'm sick of working on it and it should be so simple.

I have been trying to find the location of the routine called when you use fly from the pokemon menu in Emerald. FBI found it at 0xC4EF8 in FireRed and a simple callasm script makes it work perfectly.

After spending hours looking for byte similarities between FireRed and Emerald I found nothing of value.
So then I moved on to making breakpoints for 'FLY', 'FLY to where?' and for cities names as well as breakpoints for the map tilesets and tilemaps, after hours the thing I keep getting is that it's around 0x124600.

KDS spent some time helping me out and he pointed out the routine at 0x124690.

Callasming 0x124691 produces a black screen, every other routine I've tried does nothing. Maybe something has to be set before the callasm?

That's all the information I have, I would really appreciate help. Thank You
I don't have an EM ROM so I can't confirm some of the ROM data, but have you tried calling it's parent 081B5470? The one you seemed to try callasm-ing is a task.
...

C me

Creator of Pokemon League Of Legends

Age 23
Male
Seen February 2nd, 2019
Posted September 9th, 2018
683 posts
6.3 Years
I don't have an EM ROM so I can't confirm some of the ROM data, but have you tried calling it's parent 081B5470? The one you seemed to try callasm-ing is a task.
It justs freezes the game, sadly that doesn't work.

Edit: Don't know why it never occured to me to find a pointer to the routine, there is a pointer for 0x124691 at 0x1B5620.
Oh that's where 081B5470 came from, didn't think the routine would be that big.

Edit2: If I set a breakpoint at 08124691, 081B5620 or 081B5470 the game doesn't break when I use fly. Am I doing it wrong or does that mean it's not there?

Spherical Ice

Age 22
Bristol, UK
Seen 9 Hours Ago
Posted March 11th, 2020
5,259 posts
12.5 Years
The series of checks at x5613C check if the player is in a map with the name VICTORY ROAD (map name ID 0x84), ROUTE 23 (map name ID 0x7B) or INDIGO PLATEAU (map name ID 0x61). If they are, then the SURFing music will not play.

This becomes an issue, though, if you have maps on there that aren't supposed to be climactic or whatever; just change the map name IDs at that location to whichever map name you want to prevent SURFing music from playing on, or simply paste 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 to nop that entire series of checks out at x5613C.

This is for FireRed.

Spherical Ice

Age 22
Bristol, UK
Seen 9 Hours Ago
Posted March 11th, 2020
5,259 posts
12.5 Years
Unsure if this has been done already, but whatever. If you want Pokémon to not show their Pokédex number as ??? on the summary screen before getting the National Pokédex, make the following changes:

0x6E272: 00 00 00 00
0x6E280: 00 00 00 00
0x1360F7: E0
EDIT: also this 0x43FA6: 00 00 04 E0

This is for FireRed.

Lance32497

LanceKoijer of Pokemon_Addicts

Male
Criscanto town-Ginoa Region xD
Seen August 13th, 2017
Posted January 1st, 2017
793 posts
5.8 Years
Unsure if this has been done already, but whatever. If you want Pokémon to not show their Pokédex number as ??? on the summary screen before getting the National Pokédex, make the following changes:

0x6E272: 00 00 00 00
0x6E280: 00 00 00 00
0x1360F7: E0

This is for FireRed.
I have one problem though, Instead of showing the correct dex number, it only shows ?35
This signature has been disabled.
Scrollbar appears
Please review and fix the issues by reading the signature rules.

You must edit it to meet the limits set by the rules before you may remove the [sig-reason] code from your signature. Removing this tag will re-enable it.

Do not remove the tag until you fix the issues in your signature. You may be infracted for removing this tag if you do not fix the specified issues. Do not use this tag for decoration purposes.

Spherical Ice

Age 22
Bristol, UK
Seen 9 Hours Ago
Posted March 11th, 2020
5,259 posts
12.5 Years
I have one problem though, Instead of showing the correct dex number, it only shows ?35
Oh, my bad, I forgot to include this:

0x43FA6: 00 00 04 E0

Spherical Ice

Age 22
Bristol, UK
Seen 9 Hours Ago
Posted March 11th, 2020
5,259 posts
12.5 Years
To fix the broken sprite behaviour 0xC, which Advance Map labels as Face Down, you can put B5 FF 05 08 at x39fbf8, and the sprite behaviour will then actually make the sprite face down and not risk the game crashing etc. If you want to make it hide the NPC like it does in RSE, put F1 31 06 08 there instead.

GoGoJJTech

(☞゚ヮ゚)☞ http://GoGoJJTech.com ☜(゚ヮ゚☜)

Age 21
Female
Earth
Seen December 9th, 2016
Posted December 5th, 2016
2,473 posts
7.6 Years
Changing the second byte in the battle flags in Emerald (02022FEC) to 02 will activate the Wally AI. This means Wally can go against trainers..

I'm not posting this so it goes anywhere or develops further, I just thought it was funny
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 HGSS Music Patch - The BW/2 Music Patch - ASM: Switch Music Based on Seasons
Romhack.me Profile - Pokecommunity Profile - Youtube Channel

Support me at my site!
Pokémon Platinum Red and Blue

Deokishisu

Mr. Magius

Male
If I'm online, it's a safe bet I'm at a computer.
Seen March 15th, 2020
Posted March 4th, 2018
859 posts
14.3 Years
This is kinda useless to everyone, but I'm posting it so that I don't lose this info. This is all for FireRed.

When the player enters a battle, the player's backsprite slides in from the right and stops. To change the position from which the backsprite starts sliding (that is, the sprite's initial position as the screen fades in) change the byte at 0x0323C0. By default, it's F0. Higher than F0 will start the sprite further to the right (depending on how high you put the value, the player may wrap around to the other side of the screen). Lower than F0 will start the sprite further to the left. Regardless, the sprite will stop at the same position. If I can find how to edit this position, or other battle intro stuff, I'll edit this post.

EDIT: To disable the showing of map names when crossing to a new map regardless of the setting in AMap, write 00 00 00 00 to 0x055910. As an aside, the function knizz's idb labelled "show_new_mapname", located at 0x098110, is probably the key to getting unique graphics to show for each map name. Some of the function calls look promising (to my untrained eye) for messing with what bg is loaded. EDIT3: It appears that you still have to set A-Map to not show the name. Granted, in FireRed, the names showed even with that set for me, and nulling out that function call finally stopped them from popping down.

EDIT2: To disable the descriptions of items on the start menu (that little blue box that spans the bottom of the screen) regardless of your options settings, write 00 00 00 00 to 0x113034.

DizzyEgg

Age 22
Male
Poland
Seen 2 Days Ago
Posted 4 Weeks Ago
795 posts
6.3 Years
Emerald Wally battle

Spoiler:
At the beginning of script special 0x28 saves your whole party and then special 0x12F replaces it with a Zigzagoon at lvl7.
To change Pokemon's data:
at 0x139472 index of new Poke / 2 ;has to be an even number and not higher than 510
at 0x139482 level of new Poke
at 0x13949C index of first move
Whole routine is at 0x0813946C.

Special 0xA0 generates Wally's opponent.
To change it:
at 0x0B0870 index of new Poke / 2 ;has to be an even number and not higher than 510
at 0x0B0874 level of new Poke
Wally's Ralts is always generated to be male. If you want its gender random place 00 00 00 00 at 0x068038.
If you want it to always be female place D0 at 0x06803B.

Wally fight uses a special battle flag: 0x200.
Seen November 20th, 2016
Posted November 20th, 2016
420 posts
5.2 Years
I don't know if this has been posted before, but whatevs. It came to my attention today that the bag in FireRed crashes if a "main" pocket has more than 42 items (the normal max for regular items). I had always assumed the malloc was done based on a multiple of the numbers inputted at the routine beginning 0x08099E44, because the TM pocket works fine even with over 100 items, but apparently the berry/TM cases mean they run off of something different. Anyhow, to allow for sufficient malloc requests, change ".equ largest_pocket_size" to your new max and insert this:
.equ largest_pocket_size,	CHANGE THIS LINE
.equ largest_pocket_size_plus_one, largest_pocket_size + 1
.equ strings_size,	largest_pocket_size_plus_one * 19

.org 0x08002B9C
malloc:
	push {lr}
	mov r1, r0

.org 0x081083F4
main:
	push {r4, lr}
	ldr r4, =(0x0203AD18)
	mov r0, #largest_pocket_size_plus_one
	lsl r0, r0, #0x3
	bl malloc
	str r0, [r4, #0x0]
	cmp r0, #0x0
	beq return
	ldr r0, =strings_size
	bl malloc
	str r0, [r4, #0x4]
	cmp r0, #0x0
	beq return
	mov r0, #0x1

return:
	pop {r4}
	pop {r1}
	bx r1
EDIT: I haven't done much testing. I've only thrown like 60 items into the general items pocket before I got bored & assumed this routine was the only problem.

Info on 0x08099E44: http://www.pokecommunity.com/showpost.php?p=9014911&postcount=2018

DizzyEgg

Age 22
Male
Poland
Seen 2 Days Ago
Posted 4 Weeks Ago
795 posts
6.3 Years
Pokemon Emerald Trading Information:
0x08338ED0 is a table with info related to trading. Each entry is 0x3C bytes, used as such:
Spoiler:
00000000 poke_nickname: .byte 12
0000000C trading_poke_index:.short
0000000E hp_ivs: .byte
0000000F attack_ivs: .byte
00000010 defense_ivs: .byte
00000011 speed_ivs: .byte
00000012 sp_attack_ivs: .byte
00000013 sp_def_ivs: .byte
00000014 ability_bit: .byte
00000015 field_15: .byte ?
00000016 field_16: .byte ?
00000017 field_17: .byte ?
00000018 trainer_ID: .long
0000001C coolness: .byte
0000001D beauty: .byte
0000001E cuteness: .byte
0000001F smartness: .byte
00000020 toughness: .byte
00000021 field_21: .byte ?
00000022 field_22: .byte ?
00000023 field_23: .byte ?
00000024 personality_value:.long
00000028 held_item: .short
0000002A mail_index*: .byte (0,1,2 or 0xFF)
0000002B ot_name: .byte 8 dup
00000033 field_33: .byte ?
00000034 field_34: .byte ?
00000035 field_35: .byte ?
00000036 gender: .byte
00000037 sheen: .byte
00000038 required_poke_index:.short
0000003A field_3A: .byte ?
0000003B field_3B: .byte ?
0000003C trading ends

Field values are unused.


There's also traded mail table. It starts at 0x08338FC0 and is 18 bytes long. Each entry is a halfword that's a word being displayed in Mail screen ending with 0x0000. Mail Index in the above struct is responsible for choosing correct entry in mails. FF is used when held item isn't a mail.

Spherical Ice

Age 22
Bristol, UK
Seen 9 Hours Ago
Posted March 11th, 2020
5,259 posts
12.5 Years
To remove the black bar animation, cry and Pokémon sprite and all, that shows when you use a HM, do the following:
FR: 00 00 00 00 00 00 00 00 00 00 00 00 at x860C2.
EM: 00 00 00 00 00 00 00 00 00 00 00 00 at xB8536.

Result: https://my.mixtape.moe/pmjmtn.webm
Posting this here in case anyone else wants it.

C me

Creator of Pokemon League Of Legends

Age 23
Male
Seen February 2nd, 2019
Posted September 9th, 2018
683 posts
6.3 Years
The RAM byte which checks for the current maps type is found at:

FR:0x02036E13 (credits to FBI)
Em:0x0203732F

Useful for custom scripts to check if the player is underwater/underground/secret base etc
Check out my hack: Pokemon League of Legends.
Join the subreddit: https://www.reddit.com/r/PokemonLoL/
If you would like to give me money for no reason you can do so here

GoGoJJTech

(☞゚ヮ゚)☞ http://GoGoJJTech.com ☜(゚ヮ゚☜)

Age 21
Female
Earth
Seen December 9th, 2016
Posted December 5th, 2016
2,473 posts
7.6 Years


I guess I'm just on a roll, huh?
I'll post the code to Github when I learn how to use it (and the code for follow me as well)
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 HGSS Music Patch - The BW/2 Music Patch - ASM: Switch Music Based on Seasons
Romhack.me Profile - Pokecommunity Profile - Youtube Channel

Support me at my site!
Pokémon Platinum Red and Blue

Epsilon

Shiny Scizor

Johto
Seen May 14th, 2019
Posted April 22nd, 2019
249 posts
13.9 Years
So I have been looking to make the various search categories (A to Z, Type, Lighest, Smallest) work for expanded Pokemon in Fire Red. This is what I found.

The 'lighest list' is from 4442f6 - 4449ef.
A to Z seems to be at 3e7d94, although it weirdly seems to skip some Pokemon.
Type is at 4448fe.
The Smallest list I can't find.

Now, taking the Lightest category, I found the pointer to it at 1037cc. Then at 1037D4 there's 81 01 (385, number of dex entries minus 1). Expanding and repointing the lighest table and changing the number at 1037D4 did seem to expand the list, but it only shows Gen III Pokemon in the slots I added.

So, with these findings, a smarter person than me might be able to figure out how to make the categories work for expanded Pokemon? I reckon there must be limiting bytes somewhere, just as with the National Dex list in the Pokedex Expanding tutorial.

Anyone? :)

Xencleamas

Suddenly lurking in the shadows...

Male
Asgard
Seen 6 Days Ago
Posted August 7th, 2018
460 posts
6.3 Years
So, I've gotten sick of being asked for this, so I figured it might be a good idea to share it. It's so short and easy that it definitely doesn't warrant having its own thread, so putting it here seems like a good compromise.

Extending the Number of Direct Sound Tracks on 3rd Gen Pokémon Games

It's as easy as this:
  1. Search for the hex string "00 C5 94 00" in your ROM
  2. Replace said string with "00 CX 94 00" where X stands for the number of maximum DS tracks

Now, there are limits here. Fire Red and Emerald (presumably Leaf Green too) can support a maximum of 12 (0xC) tracks, so you can put 00 CC 94 00 for these ROMs, however, Ruby (presumably Sapphire too) are different. RS can only support a maximum of 7!

BPR - 12
BPG - 12
BPE - 12
AXV - 7
AXP - 7
Here are the offsets for each game for those who care (I don't have Sapphire and Leaf Green. Sorry! :/ But, will sure find them soon):

Ruby: 0x081DDECC (if not, destinjagold or any other Ruby hackers, correct me)
FireRed: 0x081DD0C8
Emerald: 0x082E0104

If you just want to go where to replace C5, go to one byte after it. ;)

Xencleamas Untitled Pokémon Fan Game (Coming Soon!) Untitled Region (Coming Soon!)

Deokishisu

Mr. Magius

Male
If I'm online, it's a safe bet I'm at a computer.
Seen March 15th, 2020
Posted March 4th, 2018
859 posts
14.3 Years
Mods, just let me know if you want me to separate this post into multiple ones for easier archival in the first post.

This is not my research, but I stumbled upon it and thought that it would be useful for locating the Emerald equivalents, as well as tracking down where other Record Mixed data is stored in the save. This is all for Ruby and Sapphire.

Spoiler:
Battle Tower Data
When you challenge the battle tower, your party is recorded in your save file and transmitted to others when you mix records.
This data is almost identical to the Mossdeep Trainer data, except it seems there are no winning/losing quotes here.

Data Layout
0x0000 - Mystery Value (Word) (Deokishisu's edit: I have a hunch that this is what battle the player lost in the Tower, as position in the Tower is shared when Record Mixing.)
0x0004 - Trainer Name (7 Bytes)
0x000B - String Terminator (0xFF)
0x000C - Trainer ID (Word)
0x0010 - Introduction Phrases (6 Halfwords)
0x001C - Pokemon 1 (44 Bytes)
0x0048 - Pokemon 2 (44 Bytes)
0x0074 - Pokemon 3 (44 Bytes)
0x00A0 - Checksum (Word) This is just the sum of the 160 byte structure. I assume it is used to check for fiddled-with data.

Pokemon Pokemon are stored in 44 byte structures as follows:
0x00 - Species - Halfword
0x02 - Held Item - Halfword
0x04 - Move 1 - Halfword
0x06 - Move 2 - Halfword
0x08 - Move 3 - Halfword
0x0A - Move 4 - Halfword
0x0C - Level - Byte
0x0D - ?? (always 0x00) - Byte
0x0E - HP EV - Byte
0x0F - ATK EV - Byte
0x10 - DEF EV - Byte
0x11 - SPD EV - Byte
0x12 - SP.ATK EV - Byte
0x13 - SP.DEF EV - Byte
0x14 - Trainer ID - Word
0x18 - Poss. IVs - Word
0x1C - Personality - Word
0x20 - Nickname - 10 Bytes
0x2A - ?? (always 0x00) - Byte
0x2B - ?? (always 0xFF) - Byte
Source: This page on Furlock's Forest Wiki
Secret Base Data
Scattered around Hoenn are a number of hidden locations that players may make into their own secret hideout. These are known as Secret Bases and are transfered to other players when you mix records, allowing you to visit them and even battle them once you've beaten the Pokémon League.

If you have forgotten where you set up your own Secret Base, there is a boy in Mossdeep who will remind you.
Up to 20 bases are able to be stored per Ruby or Sapphire cart, and no two bases may share the same location.

Data Structure
Position in save data: 0x2988
160 byte structure x 20
0x0000 - Location - Halfword
0x0002 - Trainer Name - 7 Bytes
0x0009 - Trainer ID - Word
0x000D - Unknown - Byte
0x000E - Unknown - 2 Halfwords
0x0012 - Decorations in base - 16 Bytes
0x0022 - Decoration positions - 16 Bytes
0x0032 - Unknown - 2 Bytes
0x0034 - Pokemon Personalities - 4 Words
0x004C - Pokemon Moves - 24 Halfwords
0x007C - Pokemon Species - 6 Halfwords
0x0088 - Pokemon Held Items - 6 Halfwords
0x0094 - Pokemon Levels - 6 Bytes
0x009A - Unknown - 6 Bytes

(Deokishisu's Edit: One of these bytes might be the Trainer's gender, perhaps the one at 0x000D.)
Source: This page on Furlock's Forest Wiki
Mossdeep Trainer Data
In Pokémon Ruby & Sapphire, in Mossdeep, there is a house with a locked door. If you have previously scanned an e-Reader Pokémon Battle eCard then the old man who lives in the house will stand in front of the door and will tell you of a guest staying in his house that you may battle.

The trainer's data is quite basic and only consists of a name, type, 3 pokémon and 6 vocabulary words that are spoken when introducing themselves, winning and losing. It's basically the same as a Battle Tower trainer.

Data Map
MossDeep Trainer Battle E-Card
Data Structure - 188 Bytes
------------------------------
0x00 - Battle Tower Type - Byte
0x01 - Type eg. Camper - Byte
0x02 - Battle Tower Lvl -
Byte 0x03 - ?? - Byte

Type is 0x00 for lvl 50, 0x01 for lvl 100 Lvl is the level they will appear at battle tower These aren't set unless the ecard has a mark indicating that the trainer will appear in the battle tower.

0x04 - Name - 7 Bytes
0x0B - String terminator - Byte
0x0C - Trainer ID - Word
--------- This is usually 0x00000000
0x10 - Introduction - 6 Halfword
0x1C - Win Quote - 6 Halfword
0x28 - Lose Quote - 6 Shorts

These minor amounts of dialogue are made up using set phrases in the same manner as trainers in the Battle Tower.

0x34 - Pokemon 1 - 44 Bytes
0x60 - Pokemon 2 - 44 Bytes
0x8C - Pokemon 3 - 44 Bytes
See the below structure.
0xB8 - Checksum - Word

A sum of the 184 bytes that make up the trainer data, added together as words. 44 Byte Pokemon Structure
-------------------------
0x00 - Species - Halfword
0x02 - Held Item - Halfword
0x04 - Move 1 - Halfword
0x06 - Move 2 - Halfword
0x08 - Move 3 - Halfword
0x0A - Move 4 - Halfword
0x0C - Level - Byte
0x0D - ?? (always 0x00) - Byte
0x0E - HP EV - Byte
0x0F - ATK EV - Byte
0x10 - DEF EV - Byte
0x11 - SPD EV - Byte
0x12 - SP.ATK EV - Byte
0x13 - SP.DEF EV - Byte
0x14 - OT ID - Word
0x18 - Poss. IVs - Word
0x1C - Personality - Word
0x20 - Nickname - 10 Bytes
0x2A - ?? (always 0x00) - Byte
0x2B - ?? (always 0xFF) - Byte
Source: This page on Furlock's Forest Wiki


This wiki also has some interesting information on R/S/E's RTC chip, some of which we already have documented in various places, but some of the information is new to me, so it may be new to others as well. I'll leave links to what I've found:

First, a Glitch City Forum topic about the R/S Berry Glitch that sheds some light on how the RTC works internally.

Second, a page on Furlock's Forest Wiki which explains how the time is stored in the save, and why simply replacing your RTC battery will not restart time-based events. This link also includes a program that can be loaded up in a flashcart and used to modify the RTC of your retail R/S/E's internal time to whatever the user desires. The source for the program is included.

The wiki doesn't look maintained anymore, by the way, so someone may want to archive everything in the event that it's taken down.

GoGoJJTech

(☞゚ヮ゚)☞ http://GoGoJJTech.com ☜(゚ヮ゚☜)

Age 21
Female
Earth
Seen December 9th, 2016
Posted December 5th, 2016
2,473 posts
7.6 Years
The fanfare and waitfanfare commands in Pokémon Emerald (not sure about other games) work based on a table. The table is at 0x085248BC and works like this:


If you don't understand what's going on here, the table looks like this:

First halfword is the song, second halfword is the length that waitfanfare waits (in ticks or frames, I don't know the term).

The limiter for this table is at 0x080A310C. Change 0x11 to the new amount of fanfares if you're expanding this table.

Fanfare playing works like this if you're interested:

Basically it loops through the table and gets the first halfword each time, then checks if the song you're trying to play is in the table. If not, it just plays the first fanfare in the table (which by default, is the level-up theme)
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 HGSS Music Patch - The BW/2 Music Patch - ASM: Switch Music Based on Seasons
Romhack.me Profile - Pokecommunity Profile - Youtube Channel

Support me at my site!
Pokémon Platinum Red and Blue

GoGoJJTech

(☞゚ヮ゚)☞ http://GoGoJJTech.com ☜(゚ヮ゚☜)

Age 21
Female
Earth
Seen December 9th, 2016
Posted December 5th, 2016
2,473 posts
7.6 Years
I'm quite confused on how should I nop those bytes? Please enlighten me. Thanks :D
Nop, like 00 00
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 HGSS Music Patch - The BW/2 Music Patch - ASM: Switch Music Based on Seasons
Romhack.me Profile - Pokecommunity Profile - Youtube Channel

Support me at my site!
Pokémon Platinum Red and Blue

Telinc1

Weirdo Extraordinaire

Male
Sofia, Bulgaria
Seen April 3rd, 2020
Posted August 5th, 2018
168 posts
7 Years
I'm quite confused on how should I nop those bytes? Please enlighten me. Thanks :D
To clarify what GoGo said, basically type 8 00s (meaning, 16 0s) at that location. 00 actually corresponds to a THUMB instruction (pretty sure it's lsl r0,#0x0 or something like that) which shifts r0 zero bits to the left - practically nothing. You have to use this, as ARMv4 THUMB doesn't have a NOP instruction like 65816 ASM does (that's the ASM variant which the SNES uses).

Check out my hacks by clicking on the userbar!
Check out my new website (this link now works!)!

FBI

Free supporter

Male
Unknown Island
Seen 1 Day Ago
Posted December 17th, 2019
1,910 posts
7.4 Years
Actually the defined nop instruction in Thumb is mov r8, r8. Many other instructions raise something called flags.

The instruction lsl, for example, raises the Zero flag, Carry flag and Sign flag. In the case of lsl r0, r0, #0x0, you won't set the carry flag but the other two can be set. This kind of practice could create unexpected results, so it's much better to use mov r8, r8 instead. That's the bytes "C0 46 C0 46".
...