Main Menu
Main Page
Forums
Recent changes
Random page
Help

Databases
GlitchDex
AreaDex
AttackDex
DexDex
ItemDex
StatDex
TMHMDex
TrainerDex
TypeDex
UnownDex
More

Major Glitches
Trainer escape glitch
Old man trick
Celebi Egg trick
Select glitches (Japan)
SRAM glitch
CoolTrainer♀ corruption
LOL glitch
Rival LOL glitch
Super Glitch
ZZAZZ glitch
Pomeg data corruption glitch (Glitzer Popping)
Tweaking
Elite Four door glitch (Japan)
Pokémon merge glitch
Pokémon cloning
Time Capsule exploit
Arbitrary code execution
Coin Case glitches
More

Other Glitch Categories
Glitches by generation
Glitches between two generations
Japan-only/language specific glitches
Music glitches
Natural glitches
Non-core series glitches
Non-Pokémon glitches
Officially acknowledged glitches
Recurring glitches
Dead glitches

References
Pokémon GameShark codes
The Big HEX List
Glitch Pokémon cries
GB programming
Curiosities
Debugging features
Easter eggs
Error traps
Glitch areas
Glitch myths
Non-glitch exploits
Placeholder texts
Pokémon glitch terminology
Unused content and prerelease information

Useful Tools
8F Helper
GBz80 to Items
Old man trick name generator
PATH (Prama's Advanced Tweaking Heaven)
Save file editors
Special stat/Pokémon converter
Trainer escape Trainer Pokémon finder

Affiliates
Legendary Star Blob 2 (Hakuda)
Pokémon Speedruns wiki
PRAMA Initiative
Become an affiliate!

Technical
Site Source Code

Search Wiki

 

Search Forums

 

Author Topic: Safe code for ace  (Read 147 times)

0 Members and 1 Guest are viewing this topic.

DocB

  • GCLF Member
  • Offline Offline
  • Gender: Male
  • ws & m user
    • View Profile
Safe code for ace
« on: March 20, 2018, 04:51:22 pm »
What kind of instruction can be used just like a nop in an ace with the ws m?
Tere are some register that you can edit without any impact? There are some instructions that do nothing?
I noticed that
Code: [Select]
inc e could be pretty harmless but I didn't test it properly...
What about
Code: [Select]
ld b,b ?

Any help?
« Last Edit: March 20, 2018, 05:50:56 pm by DocB »

ISSOtm

  • The French Lord of Laziness (and a huge The Legend Of Zelda fan)
  • Staff
  • *****
  • Online Online
  • Gender: Male
  • Pewter City (B)rocks !
    • View Profile
    • My Little Website
Re: Safe code for ace
« Reply #1 on: March 20, 2018, 08:20:24 pm »
It simply depends on what registers are clobbered at a given time.
`ld b,b` is always safe, and `inc e` is, as long as the value of E when it's executed isn't meaningful. (Or you can cancel it out with a `dec e`)
"THOU SHALL NOT PASS !!"  RIVAL's effect, Gandalf.

Proudly glitching Pokémon Red and Yellow on a Black & White GB, Pocket GB, GB Color, GBA SP and new 3DS.

My Twitter (beware, I'm French)
My YouTube (same warning)

Here is an online tool to build 8F setups : GBz80 to Items !

They see me layzin', they ha-tin'...
Heavy contributor of the global augmentation of entropy (my room's is too damn high !)

Krys3000

  • The frenchie
  • Distinguished Member
  • *
  • Offline Offline
  • Gender: Male
  • Head admin of the PRAMA Initiative
    • View Profile
    • PRAMA Initiative - Main french Pokémon glitch website
Re: Safe code for ace
« Reply #2 on: March 21, 2018, 02:37:10 am »
I never use b in any code so I Inc b dec b etc. a lot

Admin of the PRAMA Initiative, the main french Pokémon glitch website
http://www.prama-initiative.com
“Anti-intellectualism has been a constant thread winding its way through our political and cultural life, nurtured by the false notion that democracy means that 'my ignorance is just as good as your knowledge.'” - Isaac Asimov

DocB

  • GCLF Member
  • Offline Offline
  • Gender: Male
  • ws & m user
    • View Profile
Re: Safe code for ace
« Reply #3 on: March 21, 2018, 04:09:31 am »
Well ld b,b is very useful for odd code shorter than 8 byte, instead of use 201 amount of the final iteam for the ret you can use x64 of that iteam and a TM 01

If you use the ws m/8F for the first time you don't have to meet another missing no
« Last Edit: March 21, 2018, 04:21:21 am by DocB »

ISSOtm

  • The French Lord of Laziness (and a huge The Legend Of Zelda fan)
  • Staff
  • *****
  • Online Online
  • Gender: Male
  • Pewter City (B)rocks !
    • View Profile
    • My Little Website
Re: Safe code for ace
« Reply #4 on: March 21, 2018, 05:25:48 am »
The problem with `ld b, b` is that it maps to the Gold Tooth item, the quantity of which you can't modify. So that removes most of its usefulness.

And if you're trying to pad the tailing `ret`, it's better to use 3 of that item which maps to `inc bc` - but since you're RET-ing right after, BC doesn't matter anymore by that point.
3 items is better than 64.
"THOU SHALL NOT PASS !!"  RIVAL's effect, Gandalf.

Proudly glitching Pokémon Red and Yellow on a Black & White GB, Pocket GB, GB Color, GBA SP and new 3DS.

My Twitter (beware, I'm French)
My YouTube (same warning)

Here is an online tool to build 8F setups : GBz80 to Items !

They see me layzin', they ha-tin'...
Heavy contributor of the global augmentation of entropy (my room's is too damn high !)

DocB

  • GCLF Member
  • Offline Offline
  • Gender: Male
  • ws & m user
    • View Profile
Re: Safe code for ace
« Reply #5 on: March 22, 2018, 04:10:37 am »
The problem with `ld b, b` is that it maps to the Gold Tooth item, the quantity of which you can't modify. So that removes most of its usefulness.

In wich way? ld b,b desn't simply put the value of the b semiregister in the b semiregister
« Last Edit: March 22, 2018, 09:31:52 am by DocB »

Krys3000

  • The frenchie
  • Distinguished Member
  • *
  • Offline Offline
  • Gender: Male
  • Head admin of the PRAMA Initiative
    • View Profile
    • PRAMA Initiative - Main french Pokémon glitch website
Re: Safe code for ace
« Reply #6 on: March 22, 2018, 04:57:54 am »
He's talking about the item matching the hex ID for ld b,b.

Inc b/d and dec b/d are better placeholders because they match cheap items and low quantities.

Admin of the PRAMA Initiative, the main french Pokémon glitch website
http://www.prama-initiative.com
“Anti-intellectualism has been a constant thread winding its way through our political and cultural life, nurtured by the false notion that democracy means that 'my ignorance is just as good as your knowledge.'” - Isaac Asimov

DocB

  • GCLF Member
  • Offline Offline
  • Gender: Male
  • ws & m user
    • View Profile
Re: Safe code for ace
« Reply #7 on: March 22, 2018, 09:32:54 am »
Oh yeah, I misunderstood.
Thank you for the replies

ISSOtm

  • The French Lord of Laziness (and a huge The Legend Of Zelda fan)
  • Staff
  • *****
  • Online Online
  • Gender: Male
  • Pewter City (B)rocks !
    • View Profile
    • My Little Website
Re: Safe code for ace
« Reply #8 on: March 22, 2018, 04:14:38 pm »
Btw, b is a register, not a semiregister.
"THOU SHALL NOT PASS !!"  RIVAL's effect, Gandalf.

Proudly glitching Pokémon Red and Yellow on a Black & White GB, Pocket GB, GB Color, GBA SP and new 3DS.

My Twitter (beware, I'm French)
My YouTube (same warning)

Here is an online tool to build 8F setups : GBz80 to Items !

They see me layzin', they ha-tin'...
Heavy contributor of the global augmentation of entropy (my room's is too damn high !)

DocB

  • GCLF Member
  • Offline Offline
  • Gender: Male
  • ws & m user
    • View Profile
Re: Safe code for ace
« Reply #9 on: March 23, 2018, 07:40:28 am »
isn't bc the register and b and c the semiregisters?
« Last Edit: March 23, 2018, 07:58:41 am by DocB »

ISSOtm

  • The French Lord of Laziness (and a huge The Legend Of Zelda fan)
  • Staff
  • *****
  • Online Online
  • Gender: Male
  • Pewter City (B)rocks !
    • View Profile
    • My Little Website
Re: Safe code for ace
« Reply #10 on: March 23, 2018, 11:11:21 am »
No, b and c are registers, bc is a register, although a register pair.
"THOU SHALL NOT PASS !!"  RIVAL's effect, Gandalf.

Proudly glitching Pokémon Red and Yellow on a Black & White GB, Pocket GB, GB Color, GBA SP and new 3DS.

My Twitter (beware, I'm French)
My YouTube (same warning)

Here is an online tool to build 8F setups : GBz80 to Items !

They see me layzin', they ha-tin'...
Heavy contributor of the global augmentation of entropy (my room's is too damn high !)

DocB

  • GCLF Member
  • Offline Offline
  • Gender: Male
  • ws & m user
    • View Profile
Re: Safe code for ace
« Reply #11 on: March 23, 2018, 11:43:15 am »
Man Z80 makes me perplexed sometimes!
Thanks for the explanation
« Last Edit: March 23, 2018, 11:43:29 am by DocB »