Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add macros for MMC3 four-screen nametables #211

Merged
merged 1 commit into from
Sep 20, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions mos-platform/nes-mmc3/bank.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,25 @@
extern "C" {
#endif

/**
* @brief 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.
*/
#define MAPPER_USE_MIRRORED_NAMETABLE \
asm(".global __four_screen\n __four_screen = 0\n")

/**
* @brief 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.
*/
#define MAPPER_USE_4_SCREEN_NAMETABLE \
asm(".global __four_screen\n __four_screen = 1\n")

// Contains functions to help with working with multiple PRG/CHR banks
// For MMC3 code.

Expand Down