llvm-mos-sdk
Macros | Functions | Variables
mapper.h File Reference
#include <ines.h>
Include dependency graph for mapper.h:

Go to the source code of this file.

Macros

#define MAPPER_USE_MIRRORED_NAMETABLE   asm(".global __four_screen\n __four_screen = 0\n")
 Define this in a .c file to use standard 2-screen mirrored nametables. This is the default for MMC3. More...
 
#define MAPPER_USE_4_SCREEN_NAMETABLE   asm(".global __four_screen\n __four_screen = 1\n")
 Define this in a .c file to use 4-screen mirroring, which uses 8 KiB of additional CHR-RAM to store the extra two nametables. More...
 
#define MIRROR_VERTICAL   0
 
#define MIRROR_HORIZONTAL   1
 
#define PRG_MODE_0   0
 
#define PRG_MODE_1   0x40
 
#define CHR_A12_STRAIGHT   0
 
#define CHR_A12_INVERT   0x80
 
#define WRAM_OFF   0x40
 
#define WRAM_ON   0x80
 
#define WRAM_READ_ONLY   0xC0
 

Functions

char get_prg_8000 (void)
 
char get_prg_a000 (void)
 
void set_chr_mode_0 (char chr_id)
 
void set_chr_mode_1 (char chr_id)
 
void set_chr_mode_2 (char chr_id)
 
void set_chr_mode_3 (char chr_id)
 
void set_chr_mode_4 (char chr_id)
 
void set_chr_mode_5 (char chr_id)
 
void set_prg_mode (char mode)
 
void set_chr_a12_inversion (char mode)
 

Variables

void(* method )(void))
 
char addr_hi
 
char bank_id
 

Macro Definition Documentation

◆ CHR_A12_INVERT

#define CHR_A12_INVERT   0x80

◆ CHR_A12_STRAIGHT

#define CHR_A12_STRAIGHT   0

◆ MAPPER_USE_4_SCREEN_NAMETABLE

#define MAPPER_USE_4_SCREEN_NAMETABLE   asm(".global __four_screen\n __four_screen = 1\n")

Define this in a .c file to use 4-screen mirroring, which uses 8 KiB of additional CHR-RAM to store the extra two nametables.

Other mirroring flags are ignored when this is set.

◆ MAPPER_USE_MIRRORED_NAMETABLE

#define MAPPER_USE_MIRRORED_NAMETABLE   asm(".global __four_screen\n __four_screen = 0\n")

Define this in a .c file to use standard 2-screen mirrored nametables. This is the default for MMC3.

Use MAPPER_USE_HORIZONTAL_MIRRORING or MAPPER_USE_VERTICAL_MIRRORING to set the mirror direction.

◆ MIRROR_HORIZONTAL

#define MIRROR_HORIZONTAL   1

◆ MIRROR_VERTICAL

#define MIRROR_VERTICAL   0

◆ PRG_MODE_0

#define PRG_MODE_0   0

◆ PRG_MODE_1

#define PRG_MODE_1   0x40

◆ WRAM_OFF

#define WRAM_OFF   0x40

◆ WRAM_ON

#define WRAM_ON   0x80

◆ WRAM_READ_ONLY

#define WRAM_READ_ONLY   0xC0

Function Documentation

◆ get_prg_8000()

char get_prg_8000 ( void  )

◆ get_prg_a000()

char get_prg_a000 ( void  )

◆ set_chr_a12_inversion()

void set_chr_a12_inversion ( char  mode)

◆ set_chr_mode_0()

void set_chr_mode_0 ( char  chr_id)

◆ set_chr_mode_1()

void set_chr_mode_1 ( char  chr_id)

◆ set_chr_mode_2()

void set_chr_mode_2 ( char  chr_id)

◆ set_chr_mode_3()

void set_chr_mode_3 ( char  chr_id)

◆ set_chr_mode_4()

void set_chr_mode_4 ( char  chr_id)

◆ set_chr_mode_5()

void set_chr_mode_5 ( char  chr_id)

◆ set_prg_mode()

void set_prg_mode ( char  mode)

Variable Documentation

◆ addr_hi

char addr_hi

◆ bank_id

char bank_id

◆ method

void(* method) (void))