Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - ISSOtm

Pages: [1] 2 3 ... 54
1
It's not mine, it's Crystal_'s, but thanks !
2
Crystal_ found the reason. Here's a quick summary :

  • When FIGHT is selected, the game parses all four PP slots, and if they are all zero, uses Struggle.
    Normally, an empty move's PP slot is zero, but we will see that there can be an edge case...
  • The active Pokémon is copied to a region of memory (so the game can use this instead having to constantly modify party data). For things such as HP, status, and PP, the game needs to also update the party data.
  • There is one exception to this : when a Pokémon is under Transform, the party data must not be updated. For example, PP is not subtracted from the party data.
  • When Mirror Move (or Metronome) is used, the game will decrement the PP of Mirror Move twice (once when it's actually used, and once when the move it represents is used). Thus, the game increments the PP of Mirror Move once, to compensate.
All of these make sense -- it's how the game works. But here's the catch : the "PP increment" function doesn't check for the Transformed status !

Here's how to trigger the glitch :
- Have any Pokémon with Transform (typically Ditto, but also Mew, or a Pokémon with Metronome)
- Face against a Pokémon knowing Mirror Move or Metronome

  • Transform into the Pokémon with Mirror Move;
  • Use the move;
  • The game will decrement Mirror Move's PP (but it won't because Transform);
  • (If the move fails, nothing else happens);
  • The game will increment Mirror Move's PP (thus, it will increment the PP in the corresponding slot);
  • The game will decrement Mirror Move's PP (but it won't because Transform)
Thus, the game increments a move's PP in the Pokémon's data. If the move is present, then it will just have incremented it, no biggie.

If it's not, this creates a slot that is empty, but with non-zero PP ! Thus, the game fails to use Struggle.


--

Disable
Disable first checks if there is a slot with non-zero PP, and if this fails, misses. With a Struggle-less Pokémon, this will always succeed, because of the glitched slot.
Then, Disable will attempt to pick a slot which must have a move AND non-zero PP. Assuming Transform has 0 PP, the game will never find such a slot (since the only slot with non-zero PP has no move).
Bam, infinite loop, and softlock.
3
Hey ! I went and optimized the script somewhat, also added a few comments, and fixed a bug with pressing L/R and A on the same frame. This comes with a total of 32 bytes cut down from the original setup.

This has been compiled for a base address of DA98, and the source has been attached to this post anyways !
Code: [Select]
F3 AF 4F E0 26 3C E0 D6 11 BC DA 21 BB C3 D5 06
0B 7A CD 69 DB 7B CD 69 DB 3E 25 22 1A CD 69 DB
13 7D C6 0D 6F 30 01 24 05 20 E6 21 BF C3 79 87
87 81 87 87 16 00 5F 19 36 ED CD 7A DB D1 F0 A5
47 17 30 08 79 FE 0A 28 02 0C FE 13 CB 70 28 07
79 A7 28 02 0D FE 1B CB 48 20 15 CB 68 20 09 CB
60 28 1E 21 10 00 18 03 21 F0 FF 19 54 5D 18 9B
3E FF E0 26 D9 AF E0 D6 3D E0 26 FB 26 00 69 19
E9 CB 50 20 F0 CB 58 C4 87 DB CB 40 CA A3 DA D5
AF 47 C5 3E EC 22 7B 81 5F 7A 88 57 1A 4F CD 7A
DB F0 A5 47 CB 6F 28 01 0D CB 67 28 01 0C CB 7F
28 04 79 D6 10 4F CB 70 28 04 79 C6 10 4F CB 48
20 08 79 CD 69 DB 2B 2B 18 D4 79 12 C1 D1 C3 A3
DA 47 CB 37 CD D8 00 78 E6 0F C6 F6 30 02 C6 80
22 C9 E5 C5 D5 CD BB 14 CD E6 08 D1 C1 E1 C9 C5
E5 3E 0E EA AB CE AF E0 DA FB 21 C0 7E 3E 38 CF
F3 0E 01 21 34 D9 CD B2 DB CB 37 47 CD B2 DB B0
53 5F 0D 28 F1 E1 C1 AF 4F C9 2A D6 F6 D0 D6 80
C9

I haven't been able to test the setup quite yet, so if you spot a problem, please tell me, and I will work on it.


Regarding the red characters, these exist because color palettes are stored in VRAM bank 1, independently from tile IDs. This doesn't affect anything, doesn't pose any issues, and for the sake of keeping the setup compact, not worth "fixing". (The letters could indeed be shifted 1 to the right, although this might cause the setup to break.)
4
Arbitrary Code Execution Discussion / Re: 8F script request
« on: February 12, 2018, 04:31:57 pm »
It's not possible to disable map connections.

A setup that triggers an encounter after N steps ? That's not possible with a 8F code, you would need heavier memory editing.
5
General Discussion / Re: The Glitchy Thread of Topiclessness (#3)
« on: February 11, 2018, 02:55:28 am »
Oh, cool, another story ! I liked Meganium Man quite a lot.
Also, no clue about your question.
6
Site Announcements / Re: Welcome to Glitch City Laboratories 18.02
« on: February 08, 2018, 12:04:10 am »
While I'm pretty glad an update came out, I'd like to report an issue I had : the exact moment I read "18.02", my nose started bleeding (and pretty hard, at that).
I'm running Human OS 19.02yo, can you reproduce ?
7
Generation V Glitch Discussion / Re: Transferring data from Gen 2 to Gen 5?
« on: February 07, 2018, 02:52:51 am »
Well, I don't know how works or what use Gen V's IR port have, but anyways ; it might be possible to send Pokémon via CGB homebrew.
I'm holding back because if the transfer rate is faster than what the CGB is capable of, then... lolnope

Not sure if there's documentation on the IR protocol.
8
Introductions / Re: Ahoy hoy Neighborinos!
« on: February 03, 2018, 01:44:05 am »
! o/ Sup' ! Enjoy your time, and make sure to fondly remember all 00 39 crashes you will encounter :D
9
Tech Help / Re: Where to get started
« on: February 03, 2018, 01:41:57 am »
If you want to learn ASM, you should look this up.
Also, you may want to join the GB Dev community, there's a Discord server link near the top of the page.
10
Generation II Glitch Discussion / Re: Odd Egg Event Flag Memory Adress?
« on: February 01, 2018, 11:41:59 am »
What are the side effects of setting this address to zero ? You're resetting 7 other bits, after all...
11
Yep, at least in theory. You'd just have to write to the party count instead of the box mon count.
12
General Discussion / Re: The Glitchy Thread of Topiclessness (#3)
« on: January 29, 2018, 04:49:12 pm »
Just olives ? Or with any seasoning ?
13
It depends. That's the best answer we can give you ; depending on how the code is built, you may need to change things that are non-obvious.
(Plus, sometimes you must change item IDs instead of quantities. Again, depending on the code)
14
Multimedia Discussion / Re: What song are you listening to right now?
« on: January 29, 2018, 12:08:23 pm »
https://www.youtube.com/watch?v=WcHQGiz6b8g
Click that link. Right now. I promise some Ryo Nagamatsu and Koji Kondo.
15
The Celebi thing is in the patches. It's just a very specific patch type that has been made specifically for this game, for the VC.
Pages: [1] 2 3 ... 54