• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

Research: e-Reader based events, items, and trainers [FireRed alpha patch released, BPRE and BPEE support are WIP due to region errors!]

Deokishisu

Mr. Magius
990
Posts
18
Years
Okay, so this is the coolest thing ever. I didn't even think to use my flashcart as an E-Reader.

As far as I know, the Wireless Adapter games (so everything but R/S) had e-Reader support in Japan. I found leftover translated text somewhere in Emerald for e-Reader functionality when I was manually decapitalizing things with my hex editor. Perhaps there's a way to reenable the menu for it? Some of the Japanese cards would be useless, mainly everything related to the Trainer Tower, as some of the e-Reader stuff was just programmed in and unlocked natively for the localizations.

It'd also be nice to rip apart the saves and see if it's possible to easily change what flag is activated by the card/what item the card gives, allowing custom "cards" that unlock different things in a hack. It'd be cool for doing event distributions. Set a flag with the e-Reader and suddenly an event opens up, or extra storyline, or whatever.

Edit: Colosseum had e-Reader functionality which was translated but blocked off to the player in localized releases. Could be worth a look if anyone has the hardware. I bet a flashcart (for the e-Reader with the correct Japanese data) and a hacked Wii with a modified Colosseum iso/save file would be all you'd need to unlock the extra Shadow Pokemon.
 
3,830
Posts
14
Years
  • Age 27
  • OH
  • Seen Feb 26, 2024
This is really cool! It's pretty amazing that you've figured this all out.

Also, here are two better (in my opinion) ways of doing the checksum, assuming that I read how it was done correctly:

This first one is similar to what you've already got, but it uses bitwise operations:
Code:
uint doTrainerChecksum(byte[] data)
{
  // Check if data length is divisible by four
  if (data.Length % 4 != 0) throw new Exception("Data length must be divisible by 4!");
  
  // This is the same as what you have, except it uses bitwise operations
  uint sum = 0;
  for (int i = 0; i < data.Length - 4; i++)
  {
    sum += (uint)(data[i] << (8 * (i % 4)));
  }
  return sum;
}

This one uses a .NET helper class:
Code:
uint doTrainerChecksum(byte[] data)
{
  // Just change this if I got the format wrong
  if (data.Length != 0xB8) throw new Exception("Invalid data size!");
  
  // This is what's important
  uint sum = 0;
  for (int i = 0; i < data.Length / 4 - 1; i++)
  {
    sum += BitConverter.ToUInt32(data, i * 4);
  }
  return sum;
}

Hope that helps!
 

Touched

Resident ASMAGICIAN
625
Posts
9
Years
  • Age 122
  • Seen Feb 1, 2018
This one uses a .NET helper class:
Code:
uint doTrainerChecksum(byte[] data)
{
  // Just change this if I got the format wrong
  if (data.Length != 0xB8) throw new Exception("Invalid data size!");
  
  // This is what's important
  uint sum = 0;
  for (int i = 0; i < data.Length / 4 - 1; i++)
  {
    sum += BitConverter.ToUInt32(data, i * 4);
  }
  return sum;
}

Hope that helps!

Wouldn't changing that loop to increment by 4 instead of 1 make that more readable?
 
3,830
Posts
14
Years
  • Age 27
  • OH
  • Seen Feb 26, 2024
Wouldn't changing that loop to increment by 4 instead of 1 make that more readable?

Yes, it probably would.
But, from what I know of C#, making the loop increment by 1 as opposed to 4 seems to be just a tiny bit faster (as in a barely noticeable difference).

But, here's a version using your suggestion:
Code:
uint doTrainerChecksum(byte[] data)
{
  // Just change this if I got the format wrong
  if (data.Length != 0xB8) throw new Exception("Invalid data size!");
  
  // This is what's important
  uint sum = 0;
  for (int i = 0; i < data.Length - 4; i += 4)
  {
    sum += BitConverter.ToUInt32(data, i);
  }
  return sum;
}
 
1
Posts
8
Years
  • Age 34
  • Seen Sep 19, 2016
Wow this is amazing! I just read through this quickly so it's still a little bit confusing, because I have never been involved with any rom hacking.
But if I understand this correctly.. you manged to get working mystery events and possibly even patch a LEGIT version of the game?
 

sab

Now too much of a life.
999
Posts
15
Years
with the proper cheating devices (I really wish I had one of these) that support ROM-area writes...
I have two "broken" gamesharks sps and an action replay max duo. All the hardware works, but they were on the old firmware which broke when you ran multiple codes at once. Supposedly gamesharks can be updated to run the action replay firmware which supports rom patch slots, so that would work as well. There are also lists of the data structures and their capabilities that I have been using with my action replay to write rom patching codes for pokemon emerald on actual hardware. I can't give you the working action replay max duo, but if you think you might be able to flash one of the gameshark sps, or can tell me how to do so in a decent way, I would be happy to send you one. Also, if you want to know all the data structures for the codes and how the encoding works, let me know. I've got all the documents/software for that. I also have the necessary hardware to dump roms, saves, and the ability to dump ereader card codes if that's helpful. Also, I've found that you really need photo paper to print codes and use them on actual hardware. Normal printer paper is just too grainy. I'm really excited that someone is actually looking into this after all these years, and would be happy to assist if any of that sounds useful.
 
Last edited:

sab

Now too much of a life.
999
Posts
15
Years
I don't know if mine can be updated, actually...

You are correct, I was mistaken. It is only actual gamesharks that can be updated and not SPs. My post has been updated to reflect this. If you do come across one of the old game sharks, here's how you'd update it for anyone interested.
http://akadewboy.awardspace.com/gbacheats/mirror.htm
Sadly, the GBA Action Replays tend to go for around $50 on ebay, which is pretty painful.
 
Last edited:

Ammako

I hate you. You know who you are.
534
Posts
16
Years
  • Seen Feb 1, 2018
Hm, that's weird, I had been able to use my 3in1 to simulate an e-Reader with the Eon Ticket save file just fine a few years back.
3in1 supports 128KB save files so unless you had patched it wrong, it shouldn't have patched it to 64KB SRAM. Just patched it for the 3in1, added the Eon Ticket save file to it, and it worked fine.

Guess it doesn't really matter anymore, but I thought that was weird. :p
 

Deokishisu

Mr. Magius
990
Posts
18
Years
I know that this is probably a stupid question (because you probably have), but have you looked at GBATEK's e-Reader section? I was going through GBATEK out of boredom and came across something that may help with your region error issue.
Spoiler:
Taken from HERE. I rainbow'd the relevant parts. The problem you're facing could be as simple as changing the region bits in the card's data and recalculating the checksum. Not as great a solution as making the game accept Japanese cards in the first place, but by forcing the card to be non-Japanese, maybe you can get English Firered to accept it?

This spoiler is just to ping you:
 
Back
Top