Modules/device/pac

From MSX Game Library

Revision as of 19:08, 14 January 2024 by Aoineko (talk | contribs) (Created page with "{{MODULE |name=device/pac |category=Device |image=raw.githubusercontent.com/aoineko-fr/MSXgl/main/engine/doc/img/sample_pac.png |dependency1= |dependency2= |dependency3= |samp...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

< Modules

device/pac

Code: device/pac.h

Category: Device

Dependencies: None

Samples:

The device/pac module provides access to the SRAM of PAC or compatible cartridges (such as FM-PAC) for reading or writing data. PAC cartridges were used to store saves for MSX games.

Compatible cartridges:

Usage

To use this module, include "device/pac.h" in your source code, and add "device/pac" to the modules list (LibModules) in your project's configuration file (project_config.js).


Samples

See module use cases in the sample programs:

Settings

Library configuration (msxgl_config.h):

#define PAC_USE_SIGNATURE			TRUE	// Handle application signature to validate saved data
#define PAC_USE_VALIDATOR			TRUE	// Add code to validate input parameters 
#define PAC_DEVICE_MAX				4		// Maximum number of supported PAC devices
// SRAM access method
// - PAC_ACCESS_DIRECT ............ Direct access to SRAM (must be selected in page 1)
// - PAC_ACCESS_BIOS .............. Access through BIOS routines
// - PAC_ACCESS_SWITCH_BIOS ....... Access through BIOS routines with BIOS switched in
// - PAC_ACCESS_SYSTEM ............ Access through MSXgl routine (no need BIOS)
#define PAC_ACCESS					PAC_ACCESS_BIOS

Dependencies

Dependency on other modules: None

Documentation