Modules/psg

From MSX Game Library

Revision as of 23:08, 15 January 2024 by Aoineko (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

< Modules

psg

Code: psg.h

Category: Audio

Dependencies: None

Samples:

The psg module provides direct access to the functions of the PSG sound processor (AY-3-8910, YM2149 or T7766A).

Usage

To use this module, include "psg.h" in your source code, and add "psg" 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):

// PSG options
// - PSG_INTERNAL ................. Use internal PSG chip (port A0-A2)
// - PSG_EXTERNAL ................. Use external PSG chip (port 10-12)
// - PSG_BOTH ..................... Use both internal and external PSG chips
#define PSG_CHIP					PSG_INTERNAL
// - PSG_DIRECT ................... Function set directly the PSG registers
// - PSG_INDIRECT ................. Function set a buffer (Apply() function must be call once a frame)
#define PSG_ACCESS					PSG_INDIRECT
#define PSG_USE_NOTES				FALSE	// Add notes table to convert note to tone
#define PSG_USE_EXTRA				TRUE	// Add helper functions to handle PSG settings
#define PSG_USE_RESUME

Dependencies

Dependency on other modules: None

Documentation