superguideguy
New Member-
Posts
5 -
Joined
-
Last visited
Reputation
9 NeutralRecent Profile Visitors
The recent visitors block is disabled and is not being shown to other users.
-
As for why v0.8.0 is causing issues, it appears that the "A JNI error has occurred" is Java's unhelpful way of saying your Java is outdated. There was a function that relied on Java 11, but I can revert it to a Java 8 compliant counterpart. Should be done a few minutes after posting this. As for how to use v0.7.2 (or earlier), there was some documentation, but I got rid of it, since it didn't work for 0.8.0. Yes, the Event Creator wasn't developed then. Technically, it still isn't released; there's some files in the source code, but I wouldn't trust them too much. As for ROM Patcher, the patches are hardcoded into the program. I forget if that version is Emerald only or LeafGreen and Emerald; I know for a fact FireRed doesn't work. Version 0.8.0 fixed that however. I'll hopefully have v0.8.1 out in a few minutes. If there's anything else, let's keep it to GitHub or DMs - no need to clutter this thread anymore.
- 1284 replies
-
I’ll look into it when I get home. It should just be able to be executed like any other jar file. What was the error, if you don’t mind me asking? Alternatively, you can report it on the GitHub issues tab.
- 1284 replies
-
On the event side, it’s just a flag. (See first post in thread for which flag.) If the flag is set, the event can be redistributed to the same region. (FRLG can distribute to FRLG, and E can distribute to E.) As for if you want to distribute to both FRLG and E at the same time, you need a special distribution ROM. Luckily, any FRLG/E version can be turned into a distribution ROM with a simple patch. That is, if you know where the function is. I’ve been a bit busy with university, so I haven’t updated it in a while, but I actually have a patcher on my GitHub. As long as you have an English FireRed/LeafGreen v1.1 or English Emerald, you can make a distribution ROM from it. GitHub is here: https://github.com/superguideguy/gen-iii-event-patcher
- 1284 replies
-
Long-winded story in the spoiler tag. TL;DR: Rather than the games checking the compatibility header, the distribution ROM does. Patch instructions below. (If anyone wants to make an IPS/UPS/BPS patch, go ahead! I just don't feel like downloading one more program for this project to make one.) Due to space constraints, it is impossible to patch a fix in to the same location. However, it is possible to patch out the check completely. Replacing 0x714C through 0x7173 (inclusive) with 0x00 patches out the region, game, and language checks. It leaves the sanity check, however. (Also, see below regarding the language check.) Why does this matter? Using direct injection, I already knew that it is possible to use "comparefarbytetobyte 0x80000AE 'E'" (ASCII 'E', not the proprietary encoding 'E') to check for whether a game is Emerald or not. "comparefarbytetobyte 0x80000AF" can also be used to check for language. Thus, while scripts for both versions - and texts for all languages - would need to fit into 1000 bytes, it is now possible to make a multi-version multi-language distribution ROM. One last thing. I found a glitchcity forum post (Reply #35 at https://forums.glitchcity.info/index.php?topic=7114.30) that confirmed my suspicions regarding the CheckCompatibility function. FireRed, LeafGreen, and Emerald act as Japanese cartridges, regardless of their actual language. This carries over to ValidateMEventClientHeader. Thus, all games can receive the Mystery Gift, regardless of the language of the distribution. This does leave a question as to how the European distribution ROM knew which version to send. It may be the case that only English carts act as Japanese carts. However, without a European decompilation, and without a European cart of my own, I'm left without means to test this hypothesis.
- 1284 replies
-
- 2
-
I've been lurking for a while now, but I think I'm finally ready to add what information I know about the distribution ROM. I apologize if I repeat something that was already known, but I checked the last 5 or so pages, and I didn't find the information I have. The actual script data for the Aurora Ticket distribution starts at 0x12728. It is the raw data - unencrypted and uncompressed. Noteworthy is the fact that the checksum and header are not stored here. I edited the script to give me both the Aurora Ticket and Mystic Ticket, and it worked! This means the checksum is calculated dynamically, rather than stored elsewhere on the ROM. The Wonder Card starts at 0x14FB8. At least, that is where the checksum would be. I haven't confirmed if the checksum is calculated dynamically, but I can't find it stored anywhere in the ROM, so I'm assuming it's dynamic. I tried my hand at disassembly. Here's what I've learned: The disassemblers designed for generic ARM7-TDMI code don't like disassembling THUMB code. The disassemblers designed specifically for the GBA (e.g. luvdis) don't like disassembling ARM code. Overall, I'm bad at reading assembly code. Something (maybe) useful: the Wireless Adapter uses the 32-bit "normal" serial communication mode. (It sends data by writing to register 0x04000120.) Not strictly about the distribution ROM, but the "virtual" script functions (opcodes B8 through BF) can access data in the Wonder Card and Wonder News sections. Thus, a properly crafted Wonder Card could add an additional 320 bytes of script data. Finding a way to distribute Wonder News would add another 440 bytes of usable script data. I've been doing some digging into the decompilation projects, and I've found two functions that might be responsible for Emerald rejecting the distribution: "ValidateMEventClientHeader" / "sub_801B6A0" FireRed: https://github.com/pret/pokefirered/blob/2880cf2a51ea36fa36f00d9ecf07177e5955c882/src/mevent.c#L788 Emerald: https://github.com/pret/pokeemerald/blob/4dd3cc7b7691afb8ecd2e8af8b2ebfa717dd2414/src/mevent2.c#L380 "CheckCompatibility" Ruby: https://github.com/pret/pokeruby/blob/f839afb24aa2c7b70e9c28a5c069aacc46993099/src/mystery_event_script.c#L38 FireRed: https://github.com/pret/pokefirered/blob/2880cf2a51ea36fa36f00d9ecf07177e5955c882/src/mystery_event_script.c#L30 Emerald: https://github.com/pret/pokeemerald/blob/4dd3cc7b7691afb8ecd2e8af8b2ebfa717dd2414/src/mystery_event_script.c#L28 Given that "ValidateMEventClientHeader" appears in FRLG and Emerald, but not RS, I suspect it is this function that is used for the Wireless Adapter, while "CheckCompatibility" is used for the eReader. Regardless, as long as it is one of these two functions, the remedy is the same. Replace a 0x1 somewhere with 0x5, and replace a 0xF with 0x20F or 0x38F. Unfortunately, like the checksums, these values do not appear to be stored directly on the ROM. They are likely caused by MOVS or ADDS instructions, instead. I hope this helps, and let me know if there's anything else I can do to help.
- 1284 replies
-
- 5