Hacking NEC PC Games/Memory Layout of NEC PC Games
A NEC PC game's memory layout will tend to be ordered thusly.
Interrupt Service Table
[edit | edit source]A list of pointers to routines relied upon by the operating system for basic tasks like loading data from disk, responding to input from the player, and playing sounds and music. May also be used by the main executable and its overlays to exchange control between themselves. This table is the entry point for the operating system and is loaded from the beginning of the boot disk (called the boot sector) at startup by the computer.
Operating System
[edit | edit source]Also called the Initial Program Loader(IPL). Handles loading and closing of files, overlays, and drivers. Also loads the main executable.
Drivers
[edit | edit source]Drivers for the mouse and sound hardware are loaded by the operating system as TSR (terminate and stay resident). Setting the music and sound off in game setup can prevent these from being loaded.
Executable
[edit | edit source]The executable defines the game's basic memory layout and contains most of its code. Sometimes this will be mixed with the operating system. Typically the executable contains data for operating the main menu.
Overlays
[edit | edit source]Overlays are programs which specialize in particular modes of play. For each mode of play there is usually an overlay. They are loaded from disk by the main executable and unloaded as needed to conserve memory.
Current Level
[edit | edit source]The data which defines the area currently played in.
Media
[edit | edit source]Sounds, sprites, and imagery for the current level are loaded after its data.