Glitch City Laboratories Archives

Glitch City Laboratories closed on 1 September 2020 (announcement). This is an archived copy of a thread from Glitch City Laboratories Forums.

You can join Glitch City Research Institute to ask questions or discuss current developments.

You may also download the archive of this forum in .tar.gz, .sql.gz, or .sqlite.gz formats.

Generation I Glitch Discussion

How to fix dry PC underflow - Page 1

How to fix dry PC underflow

Posted by: Dante
Date: 2016-06-26 09:35:54
I got the underflow and I exploited it but now it really bothers me.
First: when I deposit an item I have to scroll all the way down to get it back.
Second: since the items are stored beyond the limit i suppose that I'm actually changing random bytes and this thing bothers me. What kind of datas are stored after the PC items?

So… How do I fix it?
PS: On EU Pokemon Red.

Re: How to fix dry PC underflow

Posted by: Krys3000
Date: 2016-06-26 15:17:25
If you triggered the traditional underflow which makes your stored items number to be 255, I guess normally it should be fixed by storing several new items (which would make the counter to go to 1). Otherwise you could still withdraw/toss every extra item.

Re: How to fix dry PC underflow

Posted by: Dante
Date: 2016-06-26 15:52:32
I'll try.
By the way, could I use ACE in order to set the counter back to 50?

Edit: oh, i followed your method, by cutting the tree in the glitch city. So I guess I set that to be 109-ish

Re: How to fix dry PC underflow

Posted by: Dante
Date: 2016-06-28 04:57:52
I wasn't able to do that ):
The problem is that I would need way to much items to fill the PC and I can't find enough of them ):

Re: How to fix dry PC underflow

Posted by: Torchickens
Date: 2016-06-28 08:42:30
Dante, I worked on a code for this in French, Spanish, German and Italian Red.

Lemonsucco x50
Carburante x213
Precisione X x63
Pietraidrica x4
Precisione X x164
Repellente x255
Poké Ball x115
MT04 x1


ld a,32
ld h,D5
ld l,3F
ldi (hl),a
inc b
ld l,A4
ld e,FF
inc b
ld (hl),e
ret


3E 32 26 D5 2E 3F 22 04 2E A4 1E FF 04 73 C9

The code sets the number of PC items to 50 and adds an FF byte in item 51's slot. Hope this works out for you! :)

Re: How to fix dry PC underflow

Posted by: Krys3000
Date: 2016-06-28 10:07:15

Edit: oh, i followed your method, by cutting the tree in the glitch city. So I guess I set that to be 109-ish


Yes, that's what I wanted to know, that's why you can't use the traditional fix. Of course you can ACE your way out of this, as Torchickens demonstrated! :)

Re: How to fix dry PC underflow

Posted by: Dante
Date: 2016-06-28 12:06:18

Dante, I worked on a code for this in French, Spanish, German and Italian Red.

Lemonsucco x50
Carburante x213
Precisione X x63
Pietraidrica x4
Precisione X x164
Repellente x255
Poké Ball x115
MT04 x1


ld a,32
ld h,D5
ld l,3F
ldi (hl),a
inc b
ld l,A4
ld e,FF
inc b
ld (hl),e
ret


3E 32 26 D5 2E 3F 22 04 2E A4 1E FF 04 73 C9

The code sets the number of PC items to 50 and adds an FF byte in item 51's slot. Hope this works out for you! :)

Thank you very much! I'll test this as soon as the university allows me C:

Re: How to fix dry PC underflow

Posted by: Torchickens
Date: 2016-06-29 08:15:08
You're very welcome! :)

Re: How to fix dry PC underflow

Posted by: Dante
Date: 2016-07-15 03:05:53

Dante, I worked on a code for this in French, Spanish, German and Italian Red.

Lemonsucco x50
Carburante x213
Precisione X x63
Pietraidrica x4
Precisione X x164
Repellente x255
Poké Ball x115
MT04 x1


ld a,32
ld h,D5
ld l,3F
ldi (hl),a
inc b
ld l,A4
ld e,FF
inc b
ld (hl),e
ret


3E 32 26 D5 2E 3F 22 04 2E A4 1E FF 04 73 C9

The code sets the number of PC items to 50 and adds an FF byte in item 51's slot. Hope this works out for you! :)

Finally I was able to try this out, but it didn't worked ):


EDIT:
Eventually I swapped TM04 for TM01 and it worked :)

Re: How to fix dry PC underflow

Posted by: ISSOtm
Date: 2016-07-15 10:06:03
Yep, there was a mistranslation from hex to items, so the code would fail to properly terminate. TM04 had to be swapped with a TM01. Also, TM01's quantity doesn't matter ^^