Main Menu
Main Page
Forums
New pages
Recent changes
Random page
Help

Glitches
Arbitrary code execution
Pokémon cloning
Pomeg glitch and Glitzer Popping
Tweaking and voiding
Glitches by generation
Other glitch categories

References/Resources
Databases
Disassembly projects
The Big HEX List
Interactive tools
Reference documents
Terminology

Affiliates
Legendary Star Blob 2 (Hakuda) (日本語/Japanese)
Pokémon Speedruns wiki (English)
PRAMA Initiative (Français/French)
MissingNo. Glitch City (Italiano/Italian)
Become an affiliate!

Technical
Site source code

Search Wiki

 

Search Forums

 

Author Topic: Game crashes when using 8F  (Read 149 times)

0 Members and 1 Guest are viewing this topic.

Blendy

  • GCLF Member
  • Offline Offline
  • Gender: Male
  • In the 8th floor
    • View Profile
Game crashes when using 8F
« on: February 01, 2020, 05:27:15 pm »
Im using this setup:

Pokemon Red (English)
Party pokemon:
Kanghaskan
223 HP Pidgey
Parasect
Onix
Tentacool
Arbok

And code:
8f
Lemonade x25
TM34 x39
TM11 x1
Burn Heal x1

I used https://eldred.fr/gbz80toitems3/ to convert the asm code to items, (im new to gbz80 coding) my original code was:
ld A, 25
ld ($D327), A

And I was trying to convert the amount of Burn heals to 25

Any clue on why that happens?

Edit: I changed TM11 x1 to TM11 x201 to add ret at the end of the asm code, like this:
ld A, 25
ld ($D327), A
ret

Edit2: As I used $D322 (default in converter) to write the data i added an item at the top of the bag so it starts executing at the 3rd item(lemonade not tm34)
« Last Edit: February 01, 2020, 05:45:55 pm by Blendy »

Parzival

  • The Laziest Malware Enthusiast
  • Banned
  • *
  • Offline Offline
  • Gender: Male
  • who posted nudes in upstream
    • View Profile
    • (null)
Re: Game crashes when using 8F
« Reply #1 on: February 01, 2020, 05:54:14 pm »
Are you using 3DS VC?

i'm also on keybase and bitchute but i don't have nifty buttons for those. Bitchute isn't ready yet, but will be eventually.

mood

Blendy

  • GCLF Member
  • Offline Offline
  • Gender: Male
  • In the 8th floor
    • View Profile
Re: Game crashes when using 8F
« Reply #2 on: February 01, 2020, 06:11:45 pm »
No, im in vba link 1.8 (i can transfer the sav to 3dsvc if necessary)

Parzival

  • The Laziest Malware Enthusiast
  • Banned
  • *
  • Offline Offline
  • Gender: Male
  • who posted nudes in upstream
    • View Profile
    • (null)
Re: Game crashes when using 8F
« Reply #3 on: February 02, 2020, 10:27:01 am »
No, im in vba link 1.8 (i can transfer the sav to 3dsvc if necessary)
VBA is very bad for people doing anything outside casual play, as the codebase is way less accurate than other emulators. I'd suggest BGB if you want a debugger, or Sameboy if you like RetroArch.

i'm also on keybase and bitchute but i don't have nifty buttons for those. Bitchute isn't ready yet, but will be eventually.

mood

Blendy

  • GCLF Member
  • Offline Offline
  • Gender: Male
  • In the 8th floor
    • View Profile
Re: Game crashes when using 8F
« Reply #4 on: February 02, 2020, 10:56:02 am »
Oh ok and is there any Code diference between european english ver and non-european english?

Parzival

  • The Laziest Malware Enthusiast
  • Banned
  • *
  • Offline Offline
  • Gender: Male
  • who posted nudes in upstream
    • View Profile
    • (null)
Re: Game crashes when using 8F
« Reply #5 on: February 02, 2020, 12:41:16 pm »
Oh ok and is there any Code diference between european english ver and non-european english?
Not that I can tell.

i'm also on keybase and bitchute but i don't have nifty buttons for those. Bitchute isn't ready yet, but will be eventually.

mood

iTNZ

  • GCLF Member
  • Offline Offline
  • Gender: Male
  • i encountered 4 4 and caught it first try.
    • View Profile
    • My YT Channel
Re: Game crashes when using 8F
« Reply #6 on: February 02, 2020, 12:43:58 pm »
A 223 pidgey? you mean 233?
MY UNCLE WORKS AT NINTENDO AND I CAUGHT YOSHI MY POKEYMAN GAME

Parzival

  • The Laziest Malware Enthusiast
  • Banned
  • *
  • Offline Offline
  • Gender: Male
  • who posted nudes in upstream
    • View Profile
    • (null)
Re: Game crashes when using 8F
« Reply #7 on: February 02, 2020, 12:52:38 pm »
A 223 pidgey? you mean 233?
I... damn how did i miss that, yeah that might do it

i'm also on keybase and bitchute but i don't have nifty buttons for those. Bitchute isn't ready yet, but will be eventually.

mood

Evie the Bird Mother 🌸 ☽

  • Veteran Contributor
  • *
  • Offline Offline
  • Gender: Female
    • View Profile
Re: Game crashes when using 8F
« Reply #8 on: February 02, 2020, 01:26:11 pm »
Hi :) hope this may help (your suspicions about item 3 are correct). ^^ I've marked what to change in blue.

Quote
Im using this setup:

Pokemon Red (English)
Party pokemon:  > Looks OK according to this 6 Pokémon setup
Kanghaskan
223 HP Pidgey   > Replace with 233 HP as iTNZ pointed out (if not typo)
Parasect
Onix
Tentacool
Arbok

And code:
8f
[Have any item 2 here]
Lemonade x25
TM34 x41  Unfortunately the reorganisation meant I changed x39 to x41, as the Burn Heal quantity stack is now at item 6 quantity. Hope that's OK, if you want it at item 5 quantity can try to rewrite the code
TM11 x1  The game is going to run the x1 as a ld bc,xxyy; which is convenient here as Burn Heal x1 is not run as code; the values are loaded for xx and yy. However (see addition of TM01 item)
Burn Heal x1
TM01 x(any) Ret (C9) is normally needed to end the code. After the end of the code (can be after a quantity or item, you'll need a x201 or TM01). We normally add a ret (C9 byte), because the game doesn't know where the end of the code is, so it will execute item 7 quantity, 8, and so on and when it encounters code like Cancels (0xFF) that is one way the game can freeze (the full story is more complex but unless you change "sp" rets can reliably mark the end for you). The code otherwise should change item 6 quantity to 25.

I think this code may need the Lemonade x25 stacks and below to begin at item 3. This is where most codes which use the 'D322' or 'to item 3' setup will start, except for codes that read other quantities as a feature etc. The code unmodified (but beginning at item 3 except 8F should stay at item 1) reads: ld a,19  ld (D327),a   ld bc, 010c. > it's now ld a,19 ld (D329),a ld bc,010c  ret
« Last Edit: February 02, 2020, 01:53:37 pm by Evie the Mother Hen ☽ ❤ »
✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿
Here have some free flowers on every post. ^^
✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿
Love, faith, hope are free. If all is lost friends save us.
Thanks fans for Torchic artwork. ♡ First image thanks Nyapon.

Blendy

  • GCLF Member
  • Offline Offline
  • Gender: Male
  • In the 8th floor
    • View Profile
Re: Game crashes when using 8F
« Reply #9 on: February 02, 2020, 01:34:48 pm »
Ow 233 .........
And if i add +2 items after 8f wouldn't It just start at the 2nd item i add? Because 8f is first and 2nd (any) item id third???
And yes i added ret.
Ty all

Edit: Yaaaaaay It works! Now I can start learning z80 being able to test!  :D
« Last Edit: February 02, 2020, 01:44:55 pm by Blendy »

Evie the Bird Mother 🌸 ☽

  • Veteran Contributor
  • *
  • Offline Offline
  • Gender: Female
    • View Profile
Re: Game crashes when using 8F
« Reply #10 on: February 02, 2020, 01:48:42 pm »
Ow 233 .........
And if i add +2 items after 8f wouldn't It just start at the 2nd item i add? Because 8f is first and 2nd (any) item id third???
And yes i added ret.
Ty all

In that case there would be a change of +2 only if 8F is item 1 (1+2>3), however if you had it at say item 2, it would be (2+1>3); because technically only item 3 and below's content matter for the code (other than for the stack you use 8F itself). In other words, here the item 3 is the absolute item 3 (not dependent on relatively where you are on the list). Physically you still need 8F at item 1, item 2, or somewhere outside of (in this case, items 3-7) to use the item. However, you could also have say items 3-7 contain the code and the rest of the inventory be anything (except for one slot to have 8F).

Pleasure to help. Happy it worked! ^^
« Last Edit: February 02, 2020, 01:50:37 pm by Evie the Mother Hen ☽ ❤ »
✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿
Here have some free flowers on every post. ^^
✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿
Love, faith, hope are free. If all is lost friends save us.
Thanks fans for Torchic artwork. ♡ First image thanks Nyapon.