libmsx
C library for MSX
Loading...
Searching...
No Matches

SM2 (Sprite Mode 2) Runtime configuration. More...

#include <vmem.h>
+ Include dependency graph for sm2_cfg.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  sm2_Config
 SM2 Runtime configuration. More...
 
struct  sm2_Config.vmem
 

Typedefs

typedef struct sm2_Config sm2_Config
 SM2 Runtime configuration.
 

Functions

void sm2_cfg_set_sprite_pattern_table (vmemptr_t spt)
 MSX2 Set VRAM address of the working sprite pattern generator table.
 
void sm2_cfg_set_sprite_attribute_table (vmemptr_t sat)
 MSX2 Set VRAM address of the working sprite attribute table.
 

Variables

sm2_Config sm2_cfg
 

Detailed Description

SM2 (Sprite Mode 2) Runtime configuration.

Definition in file sm2_cfg.h.


Data Structure Documentation

◆ sm2_Config

struct sm2_Config

SM2 Runtime configuration.

Definition at line 25 of file sm2_cfg.h.

Data Fields
struct sm2_Config.vmem vmem

◆ sm2_Config.vmem

struct sm2_Config.vmem

Definition at line 26 of file sm2_cfg.h.

Data Fields
vmemptr_t spt Sprite pattern generator table base address.
vmemptr_t sat Sprite attribute table base address.

Typedef Documentation

◆ sm2_Config

typedef struct sm2_Config sm2_Config

SM2 Runtime configuration.

Function Documentation

◆ sm2_cfg_set_sprite_pattern_table()

void sm2_cfg_set_sprite_pattern_table ( vmemptr_t spt)
inline

MSX2 Set VRAM address of the working sprite pattern generator table.

Parameters
sptVRAM address of the sprite pattern generator table.
Note
This function does not set the VDP's VRAM memory map, but only sets the base address of the sprite pattern generator table (SPT) in the VRAM to which the SM2 module writes sprite patterns. To set the SPT base address of the VDP's VRAM memory map, use vdp_set_sprite_pattern_table() as needed.
Since sm2_init() initializes the SM2 module according to the current VRAM memory map settings, it is usually not necessary to call this function. Therefore, use sm2_init() instead of this function unless there is a special reason.

Definition at line 53 of file sm2_cfg.h.

◆ sm2_cfg_set_sprite_attribute_table()

void sm2_cfg_set_sprite_attribute_table ( vmemptr_t sat)
inline

MSX2 Set VRAM address of the working sprite attribute table.

Parameters
satVRAM address of the sprite attribute table.
Note
This function does not set the VDP's VRAM memory map, but only sets the base address of the sprite pattern generator table (SAT) in the VRAM to which the SM2 module writes sprite patterns. To set the SAT base address of the VDP's VRAM memory map, use vdp_set_sprite_attribute_table() as needed.
Since sm2_init() initializes the SM2 module according to the current VRAM memory map settings, it is usually not necessary to call this function. Therefore, use sm2_init() instead of this function unless there is a special reason.

Definition at line 74 of file sm2_cfg.h.

Variable Documentation

◆ sm2_cfg

sm2_Config sm2_cfg
extern