shonumi / gbe-plus

DMG/GBC/GBA emulator and experimental NDS emulator.
GNU General Public License v2.0
524 stars 79 forks source link

Pokémon Crystal JP - Mobile Adapter GB isn't detected in game #106

Closed thomasnet-mc closed 5 years ago

thomasnet-mc commented 5 years ago

Pokémon Crystal shows the Mobile Adapter GB screen on boot and seems to detect it correctly: SIO::Mobile Adapter - Command ID 0x10 SIO::Mobile Adapter - Command ID 0x11 SIO::Mobile Adapter - Command ID 0x10 SIO::Mobile Adapter - Command ID 0x17 SIO::Mobile Adapter - Command ID 0x11

Though, I can't see the mobile option on the save loading menu and going inside the PCC shows that a person is in front of the trading counter. I can't download or check the news either.

Using a savefile which puts the player right in front of the trading counter, I can start the trade sequence but after the game reads the configuration (0x19), I get error 20-000. The Mobile Adapter GB configuration data works fine on Mobile Trainer, Net de Get and Mario Kart Advance (even if it stops at connecting to DION) and all that works on BGB, so I suspect the problem comes from the emulator itself.

shonumi commented 5 years ago

You need to make sure GBE+ emulates an MBC30 cartridge instead of the regular MBC3. The MBC30 has 2x SRAM on the cart that's specifically used for Mobile Adapter functions. If you're using GBE+ based on the very latest commits, you have to add the --mbc30 parameter via the command line, or from the GUI select Emulation -> General Settings -> Special ROM Type -> DMG - MBC30. Afterwards, the "Mobile" option appears in the main menu as so:

8401545320632

Then you can go to Goldenrod City's Pokemon Center and talk to the receptionist:

131882284432619

Please note that even with a complete Mobile Adapter configuration file (from Mobile Trainer), nothing in Crystal will work (e.g. you can talk to the receptionist and start a trade, but it will give you a 404). GBE+ runs off of an internal server. Any time a game requests something via HTTP, for example, GBE+ tries to read a local file and return the contents. If no file exists, the game does not receive a proper response.

In effect, full support for any Mobile Adapter game is done on a case-by-case basis. Only Net de Get and the Mobile Trainer are mostly supported (Mobile Trainer still freezes when trying to open a received mail, but that's a known timing issue that affects other games). You can add the files yourself, however by editing the gbma/server_list.txt file in the data folder. It's basically:

URL_TO_FIND
LOCAL_FILE

Best to put them in the gbma folder like the other examples. I have not gotten around to adding default files for Crystal, so it's untested for the moment for this game. BGB will get further because the script is specifically geared towards handling Crystal's online functionalities.

thomasnet-mc commented 5 years ago

Thanks! I added external server support myself, this works fine.