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 V Glitch Discussion

I don't know much about coding, but is it possible to remove the error handler? - Page 1

I don't know much about coding, but is it possible to remove the error handler?

Posted by: 0ErrorYT
Date: 2018-04-20 23:05:50
The error handler in Pokemon black shuts down glitch Pokemon and maps (and moves possibly, can't find a move modifier) Before any glitches can happen. Would it be possible to remove it? I'm sorry if it's a stupid question, I was just curious

Re: I don't know much about coding, but is it possible to remove the error handler?

Posted by: ISSOtm
Date: 2018-04-21 04:13:38
If you do a ROM hack, sure.

Re: I don't know much about coding, but is it possible to remove the error handler?

Posted by: 0ErrorYT
Date: 2018-04-21 10:50:03
Would that be difficult, or easy

Re: I don't know much about coding, but is it possible to remove the error handler?

Posted by: ISSOtm
Date: 2018-04-22 15:24:31
Can't tell.

Re: I don't know much about coding, but is it possible to remove the error handler?

Posted by: 0ErrorYT
Date: 2018-04-26 21:12:43
Would there be a way to search for the function somehow or just whatever calls it, and overwrite that? I have a hunch that what's calling it is null derefs, but I'm probably wrong

Re: I don't know much about coding, but is it possible to remove the error handler?

Posted by: ISSOtm
Date: 2018-04-27 00:12:05
Overwriting isn't that simple - a NULL deref means the game is crashing either way, and removing the error handler isn't going to change anything.

Re: I don't know much about coding, but is it possible to remove the error handler?

Posted by: 0ErrorYT
Date: 2018-05-08 22:27:33
Looking into it more, hex:0000 works just fine. I'm thinking it's just a code that triggers the error handler whenever a Pokemon's index number is higher then the last valid Pokemon, and not null derefs

Re: I don't know much about coding, but is it possible to remove the error handler?

Posted by: Parzival
Date: 2018-05-09 17:29:19
Just removing the function would cause them as well. You'd have to replace it with something.

Re: I don't know much about coding, but is it possible to remove the error handler?

Posted by: 0ErrorYT
Date: 2018-05-09 23:54:28
Could it be possible to replace it with the DS equivalent of a ret (sorry if this sounds dumb) or something like that? Or find what accesses it whenever it's activated (is there a ds emulator that has breakpoints?)

Re: I don't know much about coding, but is it possible to remove the error handler?

Posted by: Torchickens
Date: 2018-05-10 06:30:43

Could it be possible to replace it with the DS equivalent of a ret (sorry if this sounds dumb) or something like that? Or find what accesses it whenever it's activated (is there a ds emulator that has breakpoints?)


Likely yes.

There is a special version of No$GBA with a debugger. It supports GBA but apparently you can debug Nintendo DS games with it too. So that probably supports breakpoints.

I don't know how one would go about finding the routine and patching it out though, sorry.

Re: I don't know much about coding, but is it possible to remove the error handler?

Posted by: 0ErrorYT
Date: 2018-05-10 07:57:47
It would work amazing, but there is 1 problem. I open pokemon black with no$gba debugger, and i get a message on the screen "The save data can't be accessed." I looked it up and you need a code to fix it. I entered the code, and it didn't work.

Re: I don't know much about coding, but is it possible to remove the error handler?

Posted by: ISSOtm
Date: 2018-05-10 09:50:33
It's an emulation problem. The game has a different way of accessing the cartridge port, which triggers anti-piracy.