-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- alpha-v1.3.1
- alpha-v1.3
- alpha-v1.2.8
- alpha-v1.2.7
- alpha-v1.2.6
- alpha-v1.2.5
- alpha-v1.2.4
- alpha-v1.2.3
- alpha-v1.2.2
- alpha-v1.2.1
- alpha-v1.2
- alpha-v1.1
- alpha-v1.0.7
- alpha-v1.0.6
- alpha-v1.0.5
- alpha-v1.0.4
- alpha-v1.0.3
- alpha-v1.0.2
- alpha-v1.0.1
- alpha-v1.0.0
- alpha-v0.9.8
- alpha-v0.9.7
- alpha-v0.9.6
- alpha-v0.9.5
- alpha-v0.9.4
- alpha-v0.9.3
- alpha-v0.9.2
- alpha-v0.9.1
- alpha-v0.9
- alpha-v0.8.3
- alpha-v0.8.2
- alpha-v0.8.1
- alpha-v0.8
- alpha-v0.7
- alpha-v0.6.3
- alpha-v0.6.2
- alpha-v0.6.1
- alpha-v0.6
- alpha-v0.5.7
- alpha-v0.5.6
- alpha-v0.5.5
- alpha-v0.5.4
- alpha-v0.5.3
- alpha-v0.5.2
- alpha-v0.5.1
- alpha-v0.5
- alpha-v0.4
Showing
36 changed files
with
1,234 additions
and
233 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
gcc -DWINDOWS_BUILD main.c apu.c audio.c alhelpers.c cpu.c ppu.c mem.c input.c mapper.c fm2play.c mapper/*.c -DFREEGLUT_STATIC -lfreeglut_static -lopenal32 -lopengl32 -lglu32 -lgdi32 -lwinmm -Wall -Wextra -O3 -s -o fixNES | ||
gcc -DWINDOWS_BUILD main.c apu.c audio.c alhelpers.c cpu.c ppu.c mem.c input.c mapper.c mapperList.c fm2play.c mapper/*.c -DFREEGLUT_STATIC -lfreeglut_static -lopenal32 -lopengl32 -lglu32 -lgdi32 -lwinmm -Wall -Wextra -O3 -s -o fixNES | ||
pause |
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,2 +1,2 @@ | ||
gcc -DWINDOWS_BUILD main.c apu.c audio.c alhelpers.c cpu.c ppu.c mem.c input.c mapper.c fm2play.c mapper/*.c -DFREEGLUT_STATIC -lfreeglut_static -lopenal32 -lopengl32 -lglu32 -lgdi32 -lwinmm -Wall -Wextra -O3 -s -o fixNES -Wl,--subsystem,windows | ||
gcc -DWINDOWS_BUILD main.c apu.c audio.c alhelpers.c cpu.c ppu.c mem.c input.c mapper.c mapperList.c fm2play.c mapper/*.c -DFREEGLUT_STATIC -lfreeglut_static -lopenal32 -lopengl32 -lglu32 -lgdi32 -lwinmm -Wall -Wextra -O3 -s -o fixNES -Wl,--subsystem,windows | ||
pause |
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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,62 @@ | ||
/* | ||
* Copyright (C) 2017 FIX94 | ||
* | ||
* This software may be modified and distributed under the terms | ||
* of the MIT license. See the LICENSE file for details. | ||
*/ | ||
|
||
#include <stdio.h> | ||
#include <inttypes.h> | ||
|
||
static uint8_t *m13_prgROM; | ||
static uint32_t m13_prgROMsize; | ||
static uint32_t m13_curCHRBank; | ||
static uint8_t m13_chrRAM[0x4000]; | ||
|
||
void m13init(uint8_t *prgROMin, uint32_t prgROMsizeIn, | ||
uint8_t *prgRAMin, uint32_t prgRAMsizeIn, | ||
uint8_t *chrROMin, uint32_t chrROMsizeIn) | ||
{ | ||
m13_prgROM = prgROMin; | ||
m13_prgROMsize = prgROMsizeIn; | ||
(void)prgRAMin; | ||
(void)prgRAMsizeIn; | ||
if(chrROMsizeIn > 0) | ||
printf("m13 ???\n"); | ||
(void)chrROMin; | ||
m13_curCHRBank = 0; | ||
memset(m13_chrRAM,0,0x4000); | ||
printf("Mapper 13 inited\n"); | ||
} | ||
|
||
uint8_t m13get8(uint16_t addr) | ||
{ | ||
if(addr < 0x8000) | ||
return 0; | ||
if(m13_prgROMsize == 0x8000) | ||
return m13_prgROM[addr&0x7FFF]; | ||
return m13_prgROM[addr&0x3FFF]; | ||
} | ||
|
||
|
||
void m13set8(uint16_t addr, uint8_t val) | ||
{ | ||
if(addr < 0x8000) | ||
return; | ||
m13_curCHRBank = ((val & 3)<<12); | ||
} | ||
|
||
uint8_t m13chrGet8(uint16_t addr) | ||
{ | ||
if(addr < 0x1000) | ||
return m13_chrRAM[addr&0xFFF]; | ||
return m13_chrRAM[(m13_curCHRBank&~0xFFF)+(addr&0xFFF)]; | ||
} | ||
|
||
void m13chrSet8(uint16_t addr, uint8_t val) | ||
{ | ||
if(addr < 0x1000) | ||
m13_chrRAM[addr&0xFFF] = val; | ||
else | ||
m13_chrRAM[(m13_curCHRBank&~0xFFF)+(addr&0xFFF)] = val; | ||
} |
Oops, something went wrong.