llvm-mos-sdk
Macros | Variables
mapper.h File Reference
#include <ines.h>
Include dependency graph for mapper.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define MAPPER_USE_1_SCREEN   asm(".globl __mirroring\n.globl __four_screen\n__mirroring = 0\n__four_screen = 1\n")
 Define this in a .c file to use 1-screen switchable mirroring. More...
 
#define MAPPER_USE_4_SCREEN_NAMETABLE   asm(".globl __mirroring\n.globl __four_screen\n__mirroring = 1\n__four_screen = 1\n")
 Define this in a .c file to use 4-screen mirroring, with the last 8 KB of CHR-RAM dedicated to storing the four name tables. More...
 
#define MAPPER_USE_SELF_FLASHABLE_BOARD   asm(".globl __battery\n__battery = 1\n")
 Define this in a .c file to use the self-flashable board. More...
 
#define PRG_BANK_MASK   0x1F
 
#define PRG_BANK_SHIFT   0
 
#define CHR_BANK_MASK   0x60
 
#define CHR_BANK_SHIFT   5
 
#define CHR_BANK(n)   ((n) << 5)
 
#define CHR_BANK_0   CHR_BANK(0)
 
#define CHR_BANK_1   CHR_BANK(1)
 
#define CHR_BANK_2   CHR_BANK(2)
 
#define CHR_BANK_3   CHR_BANK(3)
 
#define MIRROR_SCREEN_MASK   0x80
 
#define MIRROR_SCREEN_SHIFT   7
 
#define MIRROR_SCREEN_1   0x00
 
#define MIRROR_SCREEN_2   0x80
 

Variables

void(* method )(void))
 

Macro Definition Documentation

◆ CHR_BANK

#define CHR_BANK (   n)    ((n) << 5)

◆ CHR_BANK_0

#define CHR_BANK_0   CHR_BANK(0)

◆ CHR_BANK_1

#define CHR_BANK_1   CHR_BANK(1)

◆ CHR_BANK_2

#define CHR_BANK_2   CHR_BANK(2)

◆ CHR_BANK_3

#define CHR_BANK_3   CHR_BANK(3)

◆ CHR_BANK_MASK

#define CHR_BANK_MASK   0x60

◆ CHR_BANK_SHIFT

#define CHR_BANK_SHIFT   5

◆ MAPPER_USE_1_SCREEN

#define MAPPER_USE_1_SCREEN   asm(".globl __mirroring\n.globl __four_screen\n__mirroring = 0\n__four_screen = 1\n")

Define this in a .c file to use 1-screen switchable mirroring.

◆ MAPPER_USE_4_SCREEN_NAMETABLE

#define MAPPER_USE_4_SCREEN_NAMETABLE   asm(".globl __mirroring\n.globl __four_screen\n__mirroring = 1\n__four_screen = 1\n")

Define this in a .c file to use 4-screen mirroring, with the last 8 KB of CHR-RAM dedicated to storing the four name tables.

In this mode, only banks 0-2 of CHR-RAM are fully safe to use for pattern table data.

◆ MAPPER_USE_SELF_FLASHABLE_BOARD

#define MAPPER_USE_SELF_FLASHABLE_BOARD   asm(".globl __battery\n__battery = 1\n")

Define this in a .c file to use the self-flashable board.

This also protects against bus conflicts, removing the bus conflict table from the fixed ROM bank.

◆ MIRROR_SCREEN_1

#define MIRROR_SCREEN_1   0x00

◆ MIRROR_SCREEN_2

#define MIRROR_SCREEN_2   0x80

◆ MIRROR_SCREEN_MASK

#define MIRROR_SCREEN_MASK   0x80

◆ MIRROR_SCREEN_SHIFT

#define MIRROR_SCREEN_SHIFT   7

◆ PRG_BANK_MASK

#define PRG_BANK_MASK   0x1F

◆ PRG_BANK_SHIFT

#define PRG_BANK_SHIFT   0

Variable Documentation

◆ method

void(* method) (void))