Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Identify more mobile data and code, including PCC facilities #977

Open
Rangi42 opened this issue Jul 23, 2022 · 2 comments
Open

Identify more mobile data and code, including PCC facilities #977

Rangi42 opened this issue Jul 23, 2022 · 2 comments

Comments

@Rangi42
Copy link
Member

Rangi42 commented Jul 23, 2022

See https://github.com/Sudel-Matze/pokecrystal (mobile restoration and localization, contains code disassembled from the Japanese ROM) and https://github.com/Sudel-Matze/pokemon-news (one of four issues so far).

(Re: Pokémon News, I think we should have a news_ prefix for all the script+text macros, or even a single macro that directly refers to label values (like tradeanim, mobiletradeanim, setup_command, stdscript, predef).

@mid-kid
Copy link
Member

mid-kid commented Jul 23, 2022

For the low-level mobile adapter stuff, there's comprehensive documentation at https://shonumi.github.io/dandocs.html#magb and a decompilation of the GBA library at https://github.com/mid-kid/libma.
There's an emulator for the mobile adapter at https://github.com/REONTeam/libmobile-bgb which you can use right now to connect to whatever HTTP and SMTP/POP servers you may have and intercept the connection/implement dummy responses to document the server communications. https://github.com/REONTeam/reon holds a few proof of concepts for server implementations. This old thread on the glitch city forums has some outdated and incomplete but still useful information on the HTTP requests the game makes for some functions: https://archives.glitchcity.info/forums/board-76/thread-7509/page-0.html (archive.org link for readability)

@mid-kid
Copy link
Member

mid-kid commented Jul 23, 2022

Also speaking of the low level library, the GBA SDK splits it up in two parts: libma and libml. libma handles the communication with the adapters as well as the HTTP, POP3 and SMTP protocols, and was shipped as a precompiled library, while libml handles creating and parsing mail messages, and was shipped as a source code file (which is why there's no need to decompile it). This is the case with the GBC SDK as well, where libma is lib/mobile/main.asm, and mobile/mobile_45.asm is the equivalent of libml. I think the latter should be moved into lib/mobile/.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants