-
Notifications
You must be signed in to change notification settings - Fork 3
List of known modules
Modules is the term used to describe blocks of system calls found within the Majiro engine's assembly. There are many interesting aspects to these modules that have made it infinitely easier to determine functionality and names.
- In assembly, system call functions appear in alphabetical order (by address), in relation to their unhashed name.
- This is only true on a per-module basis.
- Generally, there is a noticeable address gap between the functions defined in a previous module, and the current module.
- Be aware that monolithic functions could make distinguishing this boundary more difficult.
- Many system call functions with inline implementations in the Syscall handler switch, will still have full function definitions existing elsewhere in executable.
A large set of general-use and I/O functions. This includes functions for: math, string handling, array creation, RNG, file I/O, clipboard (clipbord) I/O, dialog boxes, window focus, drag/drop, system locale, windows registry I/O, etc.
Many functions in this module are defined similarly to many C standard library functions (especially for string handling).
A small collection of functions that handle everything revolving around running script-defined functions, event callback registration and firing, etc.
A small module of just 2 function definitions: bool $is_auto_mode()
and bool $is_fast_mode()
.
A large collection of system functions that handle aspects like thread creation, timing/waiting, VN fast/skip mode, screen mode, UI loops, exiting, etc.
Note: In Majiro, the term "Console" refers to the VN message window.
ADV (and NVL?) visual novel message window handling. This includes handling of all related functionalities, text speed configurations, auto mode, message history, voice replay, and the console menu items.
Base graphics events.
Keyboard and joystick input events.
Handling of game loading and saving. Create save points, get/set save info and flags, and create thumbnails.
UI mouse input events.
Potentially part of the Config module. This contains a standalone function that runs the program checker.exe
. It's possible this could be handling the CHECK
/CHK
keywords encountered in many of the .cfg
configuration files, making a definite part of the Config module.
Get or set persistent configuration settings from variables or from the Windows registry.
Play, pause, loop, resume, and all handling for music/sound/voice playback.
Known dependencies: Graphics module
More advanced graphics functions that handle sprites, with animations, movements, etc.
The remaining functions in this "module" potentially have no real module. These are only defined inline in the Syscall handler switch.
The Majiro engine was originally created for the Mahjong visual novel (it even sounds similar to the engine name). This is why many Mahjong logic system calls are still found baked right in to the engine.
A small module of only 3 functions, possibly because the last one is monolithic in size: int $get_game_speed();
, int $get_nanido();
and int $269bda78();
mahjong_ai_move?()
A large block of Mahjong logic handling functions, none of which have had their names unhashed.
Two system call functions that are exclusive to the original Mahjong game. These syscalls no longer appear in later engines for other games.