summaryrefslogtreecommitdiff
path: root/mappers
diff options
context:
space:
mode:
Diffstat (limited to 'mappers')
-rw-r--r--mappers/mapper.c2
-rw-r--r--mappers/mapper_000_0.c4
-rw-r--r--mappers/mapper_001_0.c12
-rw-r--r--mappers/mapper_002_2.c8
-rw-r--r--mappers/mapper_003_0.c6
-rw-r--r--mappers/mapper_003_1.c6
-rw-r--r--mappers/mapper_003_2.c6
-rw-r--r--mappers/mapper_007_2.c12
-rw-r--r--mappers/mapper_011_0.c6
-rw-r--r--mappers/mapper_066_0.c6
10 files changed, 34 insertions, 34 deletions
diff --git a/mappers/mapper.c b/mappers/mapper.c
index 71caff1..5636705 100644
--- a/mappers/mapper.c
+++ b/mappers/mapper.c
@@ -43,7 +43,7 @@ static void (*mapper_table[4096])(struct nes_state *state) = {
[MAPPER_ID( 3, 2)] = mapper_003_2_init,
[MAPPER_ID( 7, 2)] = mapper_007_2_init,
[MAPPER_ID(11, 0)] = mapper_011_0_init,
- [MAPPER_ID(66, 0)] = mapper_011_0_init,
+ [MAPPER_ID(66, 0)] = mapper_066_0_init,
};
static void mapper_reset(struct nes_state *state) {
diff --git a/mappers/mapper_000_0.c b/mappers/mapper_000_0.c
index 8e46090..cc7baf8 100644
--- a/mappers/mapper_000_0.c
+++ b/mappers/mapper_000_0.c
@@ -1,13 +1,13 @@
-__attribute__((section(".mapper_000_0"), hot))
+__attribute__((section(".mapper_000_0")))
static uint8_t mapper_000_0_prg_read(struct nes_state *state, uint32_t addr) {
struct mapper_000_0 *mapper = (struct mapper_000_0 *)&state->map;
return state->prg_rom[addr & mapper->mask];
}
-__attribute__((section(".mapper_000_0"), hot))
+__attribute__((section(".mapper_000_0")))
static uint8_t mapper_000_0_chr_read(struct nes_state *state, uint32_t addr) {
return state->chr_rom[addr];
}
diff --git a/mappers/mapper_001_0.c b/mappers/mapper_001_0.c
index 519738e..0a03a27 100644
--- a/mappers/mapper_001_0.c
+++ b/mappers/mapper_001_0.c
@@ -1,5 +1,5 @@
-__attribute__((section(".mapper_001_0"), hot))
+__attribute__((section(".mapper_001_0")))
static uint8_t mapper_001_0_prg_read(struct nes_state *state, uint32_t addr) {
struct mapper_001_0 *mapper = (struct mapper_001_0 *)&state->map;
if(addr >= 0x8000) {
@@ -12,7 +12,7 @@ static uint8_t mapper_001_0_prg_read(struct nes_state *state, uint32_t addr) {
return 0;
}
-__attribute__((section(".mapper_001_0"), hot))
+__attribute__((section(".mapper_001_0")))
static void mapper_001_0_prg_write(struct nes_state *state, uint32_t addr, uint8_t value) {
struct mapper_001_0 *mapper = (struct mapper_001_0 *)&state->map;
if(addr < 0x8000) return;
@@ -69,7 +69,7 @@ static void mapper_001_0_prg_write(struct nes_state *state, uint32_t addr, uint8
}
}
-__attribute__((section(".mapper_001_0"), hot))
+__attribute__((section(".mapper_001_0")))
static uint8_t mapper_001_0_chr_read(struct nes_state *state, uint32_t addr) {
struct mapper_001_0 *mapper = (struct mapper_001_0 *)&state->map;
if(mapper->control & 0x10) {
@@ -85,18 +85,18 @@ static uint8_t mapper_001_0_chr_read(struct nes_state *state, uint32_t addr) {
}
}
-__attribute__((section(".mapper_001_0"), hot))
+__attribute__((section(".mapper_001_0")))
static void mapper_001_0_chr_write(struct nes_state *state, uint32_t addr, uint8_t value) {
// CHR RAM write (if present)
state->chr_ram[addr] = value;
}
-__attribute__((section(".mapper_001_0"), hot))
+__attribute__((section(".mapper_001_0")))
static uint8_t mapper_001_0_ciram_read(struct nes_state *state, uint32_t addr) {
return state->ciram[addr & 0x3ff];
}
-__attribute__((section(".mapper_001_0"), hot))
+__attribute__((section(".mapper_001_0")))
static void mapper_001_0_ciram_write(struct nes_state *state, uint32_t addr, uint8_t value) {
state->ciram[addr & 0x3ff] = value;
}
diff --git a/mappers/mapper_002_2.c b/mappers/mapper_002_2.c
index b88c95b..4dbea85 100644
--- a/mappers/mapper_002_2.c
+++ b/mappers/mapper_002_2.c
@@ -1,6 +1,6 @@
-__attribute__((section(".mapper_002_2"), hot))
+__attribute__((section(".mapper_002_2")))
static uint8_t mapper_002_2_prg_read(struct nes_state *state, uint32_t addr) {
struct mapper_002_2 *mapper = (struct mapper_002_2 *)&state->map;
@@ -13,7 +13,7 @@ static uint8_t mapper_002_2_prg_read(struct nes_state *state, uint32_t addr) {
return 0;
}
-__attribute__((section(".mapper_002_2"), hot))
+__attribute__((section(".mapper_002_2")))
static void mapper_002_2_prg_write(struct nes_state *state, uint32_t addr, uint8_t value) {
struct mapper_002_2 *mapper = (struct mapper_002_2 *)&state->map;
@@ -22,12 +22,12 @@ static void mapper_002_2_prg_write(struct nes_state *state, uint32_t addr, uint8
}
}
-__attribute__((section(".mapper_002_2"), hot))
+__attribute__((section(".mapper_002_2")))
static uint8_t mapper_002_2_chr_read(struct nes_state *state, uint32_t addr) {
return state->chr_ram[addr];
}
-__attribute__((section(".mapper_002_2"), hot))
+__attribute__((section(".mapper_002_2")))
static void mapper_002_2_chr_write(struct nes_state *state, uint32_t addr, uint8_t value) {
state->chr_ram[addr] = value;
}
diff --git a/mappers/mapper_003_0.c b/mappers/mapper_003_0.c
index e85d995..ec38f35 100644
--- a/mappers/mapper_003_0.c
+++ b/mappers/mapper_003_0.c
@@ -1,10 +1,10 @@
-__attribute__((section(".mapper_003_0"), hot))
+__attribute__((section(".mapper_003_0")))
static uint8_t mapper_003_0_prg_read(struct nes_state *state, uint32_t addr) {
return state->prg_rom[addr & 0x7fff];
}
-__attribute__((section(".mapper_003_0"), hot))
+__attribute__((section(".mapper_003_0")))
static void mapper_003_0_prg_write(struct nes_state *state, uint32_t addr, uint8_t value) {
struct mapper_003_0 *mapper = (struct mapper_003_0 *)&state->map;
@@ -13,7 +13,7 @@ static void mapper_003_0_prg_write(struct nes_state *state, uint32_t addr, uint8
}
}
-__attribute__((section(".mapper_003_0"), hot))
+__attribute__((section(".mapper_003_0")))
static uint8_t mapper_003_0_chr_read(struct nes_state *state, uint32_t addr) {
struct mapper_003_0 *mapper = (struct mapper_003_0 *)&state->map;
return mapper->chr_ptr[addr];
diff --git a/mappers/mapper_003_1.c b/mappers/mapper_003_1.c
index fd7cd27..0032fbc 100644
--- a/mappers/mapper_003_1.c
+++ b/mappers/mapper_003_1.c
@@ -1,10 +1,10 @@
-__attribute__((section(".mapper_003_1"), hot))
+__attribute__((section(".mapper_003_1")))
static uint8_t mapper_003_1_prg_read(struct nes_state *state, uint32_t addr) {
return state->prg_rom[addr & 0x7fff];
}
-__attribute__((section(".mapper_003_1"), hot))
+__attribute__((section(".mapper_003_1")))
static void mapper_003_1_prg_write(struct nes_state *state, uint32_t addr, uint8_t value) {
struct mapper_003_1 *mapper = (struct mapper_003_1 *)&state->map;
@@ -13,7 +13,7 @@ static void mapper_003_1_prg_write(struct nes_state *state, uint32_t addr, uint8
}
}
-__attribute__((section(".mapper_003_1"), hot))
+__attribute__((section(".mapper_003_1")))
static uint8_t mapper_003_1_chr_read(struct nes_state *state, uint32_t addr) {
struct mapper_003_1 *mapper = (struct mapper_003_1 *)&state->map;
return mapper->chr_ptr[addr];
diff --git a/mappers/mapper_003_2.c b/mappers/mapper_003_2.c
index b780a8f..73cfdc6 100644
--- a/mappers/mapper_003_2.c
+++ b/mappers/mapper_003_2.c
@@ -1,10 +1,10 @@
-__attribute__((section(".mapper_003_2"), hot))
+__attribute__((section(".mapper_003_2")))
static uint8_t mapper_003_2_prg_read(struct nes_state *state, uint32_t addr) {
return state->prg_rom[addr & 0x7fff];
}
-__attribute__((section(".mapper_003_2"), hot))
+__attribute__((section(".mapper_003_2")))
static void mapper_003_2_prg_write(struct nes_state *state, uint32_t addr, uint8_t value) {
struct mapper_003_2 *mapper = (struct mapper_003_2 *)&state->map;
@@ -14,7 +14,7 @@ static void mapper_003_2_prg_write(struct nes_state *state, uint32_t addr, uint8
}
}
-__attribute__((section(".mapper_003_2"), hot))
+__attribute__((section(".mapper_003_2")))
static uint8_t mapper_003_2_chr_read(struct nes_state *state, uint32_t addr) {
struct mapper_003_2 *mapper = (struct mapper_003_2 *)&state->map;
return mapper->chr_ptr[addr];
diff --git a/mappers/mapper_007_2.c b/mappers/mapper_007_2.c
index 27125b9..c42bc62 100644
--- a/mappers/mapper_007_2.c
+++ b/mappers/mapper_007_2.c
@@ -1,5 +1,5 @@
-__attribute__((section(".mapper_007_2"), hot))
+__attribute__((section(".mapper_007_2")))
static uint8_t mapper_007_2_prg_read(struct nes_state *state, uint32_t addr) {
struct mapper_007_2 *mapper = (struct mapper_007_2 *)&state->map;
if(addr >= 0x8000) {
@@ -8,7 +8,7 @@ static uint8_t mapper_007_2_prg_read(struct nes_state *state, uint32_t addr) {
return 0;
}
-__attribute__((section(".mapper_007_2"), hot))
+__attribute__((section(".mapper_007_2")))
static void mapper_007_2_prg_write(struct nes_state *state, uint32_t addr, uint8_t value) {
struct mapper_007_2 *mapper = (struct mapper_007_2 *)&state->map;
if(addr >= 0x8000) {
@@ -22,23 +22,23 @@ static void mapper_007_2_prg_write(struct nes_state *state, uint32_t addr, uint8
}
}
-__attribute__((section(".mapper_007_2"), hot))
+__attribute__((section(".mapper_007_2")))
static uint8_t mapper_007_2_chr_read(struct nes_state *state, uint32_t addr) {
return state->chr_ram[addr];
}
-__attribute__((section(".mapper_007_2"), hot))
+__attribute__((section(".mapper_007_2")))
static void mapper_007_2_chr_write(struct nes_state *state, uint32_t addr, uint8_t value) {
state->chr_ram[addr] = value;
}
-__attribute__((section(".mapper_007_2"), hot))
+__attribute__((section(".mapper_007_2")))
static uint8_t mapper_007_2_ciram_read(struct nes_state *state, uint32_t addr) {
struct mapper_007_2 *mapper = (struct mapper_007_2 *)&state->map;
return mapper->ciram[addr & 0x3ff];
}
-__attribute__((section(".mapper_007_2"), hot))
+__attribute__((section(".mapper_007_2")))
static void mapper_007_2_ciram_write(struct nes_state *state, uint32_t addr, uint8_t value) {
struct mapper_007_2 *mapper = (struct mapper_007_2 *)&state->map;
mapper->ciram[addr & 0x3ff] = value;
diff --git a/mappers/mapper_011_0.c b/mappers/mapper_011_0.c
index d6d518c..e5db02c 100644
--- a/mappers/mapper_011_0.c
+++ b/mappers/mapper_011_0.c
@@ -1,5 +1,5 @@
-__attribute__((section(".mapper_011_0"), hot))
+__attribute__((section(".mapper_011_0")))
static uint8_t mapper_011_0_prg_read(struct nes_state *state, uint32_t addr) {
struct mapper_011_0 *mapper = (struct mapper_011_0 *)&state->map;
@@ -9,7 +9,7 @@ static uint8_t mapper_011_0_prg_read(struct nes_state *state, uint32_t addr) {
return 0;
}
-__attribute__((section(".mapper_011_0"), hot))
+__attribute__((section(".mapper_011_0")))
static void mapper_011_0_prg_write(struct nes_state *state, uint32_t addr, uint8_t value) {
struct mapper_011_0 *mapper = (struct mapper_011_0 *)&state->map;
@@ -19,7 +19,7 @@ static void mapper_011_0_prg_write(struct nes_state *state, uint32_t addr, uint8
}
}
-__attribute__((section(".mapper_011_0"), hot))
+__attribute__((section(".mapper_011_0")))
static uint8_t mapper_011_0_chr_read(struct nes_state *state, uint32_t addr) {
struct mapper_011_0 *mapper = (struct mapper_011_0 *)&state->map;
diff --git a/mappers/mapper_066_0.c b/mappers/mapper_066_0.c
index 7a8f49c..9629fb2 100644
--- a/mappers/mapper_066_0.c
+++ b/mappers/mapper_066_0.c
@@ -1,5 +1,5 @@
-__attribute__((section(".mapper_066_0"), hot))
+__attribute__((section(".mapper_066_0")))
static uint8_t mapper_066_0_prg_read(struct nes_state *state, uint32_t addr) {
struct mapper_066_0 *mapper = (struct mapper_066_0 *)&state->map;
@@ -9,7 +9,7 @@ static uint8_t mapper_066_0_prg_read(struct nes_state *state, uint32_t addr) {
return 0;
}
-__attribute__((section(".mapper_066_0"), hot))
+__attribute__((section(".mapper_066_0")))
static void mapper_066_0_prg_write(struct nes_state *state, uint32_t addr, uint8_t value) {
struct mapper_066_0 *mapper = (struct mapper_066_0 *)&state->map;
@@ -22,7 +22,7 @@ static void mapper_066_0_prg_write(struct nes_state *state, uint32_t addr, uint8
}
}
-__attribute__((section(".mapper_066_0"), hot))
+__attribute__((section(".mapper_066_0")))
static uint8_t mapper_066_0_chr_read(struct nes_state *state, uint32_t addr) {
struct mapper_066_0 *mapper = (struct mapper_066_0 *)&state->map;
return mapper->chr_offset[addr];