-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Fixed zp section overlapping registers. - Fixed bank selection macros to accept macro parameters. - Better Stella signature.
- Loading branch information
Showing
7 changed files
with
39 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#ifndef _MAPPER_MACROS_H | ||
#define _MAPPER_MACROS_H | ||
|
||
#include <mapper.h> | ||
|
||
#define MAPPER_CART_ROM_KB(kb) \ | ||
asm(".globl __cart_rom_size\n__cart_rom_size = " #kb) | ||
|
||
#define _STRINGIFY(x) #x | ||
#define STRINGIFY(x) _STRINGIFY(x) | ||
|
||
#ifdef MAPPER_BANKED_ROM | ||
// section attribute doesn't seem to recognize C "concatenated" "strings" | ||
#define _CODE_BANK(index) __attribute__((section(".rom" index ".code"))) | ||
#define CODE_BANK(index) _CODE_BANK(STRINGIFY(index)) | ||
#define _RODATA_BANK(index) __attribute__((section(".rom" index ".rodata"))) | ||
#define RODATA_BANK(index) _RODATA_BANK(STRINGIFY(index)) | ||
#else | ||
#define CODE_BANK(index) | ||
#define RODATA_BANK(index) | ||
#endif | ||
|
||
#endif | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,11 @@ | ||
|
||
MEMORY { | ||
zp : ORIGIN = __rc31 + 1, LENGTH = 0x100 - (__rc31 + 1) | ||
|
||
pia_ram (w) : ORIGIN = 0x80, LENGTH = 0x80 | ||
} | ||
|
||
/* Provide imaginary (zero page) registers. */ | ||
__rc0 = 0x80; | ||
INCLUDE imag-regs.ld | ||
ASSERT(__rc31 == 0x9f, "Inconsistent zero page map.") | ||
|
||
REGION_ALIAS("c_writeable", pia_ram) | ||
REGION_ALIAS("c_writeable", zp) |