2011-10-01 12:06:48 +00:00
|
|
|
#include "bandai-fcg.cpp"
|
2011-11-04 11:57:54 +00:00
|
|
|
#include "konami-vrc1.cpp"
|
|
|
|
#include "konami-vrc2.cpp"
|
|
|
|
#include "konami-vrc3.cpp"
|
Update to v082r33 release.
byuu says:
Added MMC2, MMC4, VRC4, VRC7 (no audio.)
Split NES audio code up into individual modules.
Fixed libsnes to compile: Themaister, can you please test to make sure
it works? I don't have a libsnes client on my work PC to test it.
Added about / license information to bottom of advanced settings screen
for now (better than nothing, I guess.)
Blocked PPU reads/writes while rendering for now, easier than coming up
with a bus address locking thing :/
I can't seem to fix MMC5 graphics during the intro to Uchuu Keibitai.
Without that, trying to implement vertical-split screen mode doesn't
make sense.
So as far as special audio chips go ...
* VRC6 is completed
* Sunsoft 5B has everything the only game to use it uses, but there are
more unused channels I'd like to support anyway (they aren't
documented, though.)
* MMC5 audio unsupported for now
* VRC7 audio unsupported, probably for a long time (hardest audio driver
of all. More complex than core NES APU.)
* audio PCM games (Moero Pro Yakyuu!) I probably won't ever support
(they require external WAV packs.)
2011-10-12 12:03:58 +00:00
|
|
|
#include "konami-vrc4.cpp"
|
2011-10-01 12:06:48 +00:00
|
|
|
#include "konami-vrc6.cpp"
|
Update to v082r33 release.
byuu says:
Added MMC2, MMC4, VRC4, VRC7 (no audio.)
Split NES audio code up into individual modules.
Fixed libsnes to compile: Themaister, can you please test to make sure
it works? I don't have a libsnes client on my work PC to test it.
Added about / license information to bottom of advanced settings screen
for now (better than nothing, I guess.)
Blocked PPU reads/writes while rendering for now, easier than coming up
with a bus address locking thing :/
I can't seem to fix MMC5 graphics during the intro to Uchuu Keibitai.
Without that, trying to implement vertical-split screen mode doesn't
make sense.
So as far as special audio chips go ...
* VRC6 is completed
* Sunsoft 5B has everything the only game to use it uses, but there are
more unused channels I'd like to support anyway (they aren't
documented, though.)
* MMC5 audio unsupported for now
* VRC7 audio unsupported, probably for a long time (hardest audio driver
of all. More complex than core NES APU.)
* audio PCM games (Moero Pro Yakyuu!) I probably won't ever support
(they require external WAV packs.)
2011-10-12 12:03:58 +00:00
|
|
|
#include "konami-vrc7.cpp"
|
2011-10-02 10:05:45 +00:00
|
|
|
#include "nes-axrom.cpp"
|
|
|
|
#include "nes-bnrom.cpp"
|
|
|
|
#include "nes-cnrom.cpp"
|
Update to v082r31 release.
byuu says:
Enable Overscan->Mask Overscan [best I'm doing]
Video settings -> Overscan mask: (horizontal, vertical: 0-16 on each
side) [only works on NES+SNES]
BPS patching works for NES+SNES+GB; note that long-term I want BPS to
only patch headerless PRG+CHR files, but we'll need a database
/ completed board mapping system first.
MMC1 splits the board/chip markups a bit better. My attempts to emulate
the extra CHR bits per hardware fail repeatedly. Docs do not explain how
it works at all.
Emulated enough of the MMC5 to play Castlevania 3.
The MMC5 is easily the most complicated mapper the NES has to offer, and
of course, has the most pitifully vague and difficult documentation of
any mapper around.
It seems the only way anyone is able to emulate this chip is
empirically.
Everyone else apparently hooks the MMC5 right into the PPU core, which
I of course cannot do. So I had to come up with my own (probably wrong)
way to synchronize the PPU simply by observing CHR bus accesses.
I must say, I over-estimated how well fleshed out the NES hardware
documentation was. Shit hits the fan right after MMC3.
It's miles beyond the GB scene, but I find myself wanting for someone
with the technical writing ability of anomie.
I can't find anything at all on how we're supposed to support the $2007
port reads/writes without it extra-clocking the PPU's bus, which could
throw off mapper timing.
Absolutely nothing at all on the subject anywhere, something everybody
is required to do for all cycle-based emulators and ... nada.
Anyway, I'd like to refine the MMC5 a bit, getting Just Breed playable
even without sound would be really nice (it's a fun game.)
Then we need to get libsnes building again (ugh, getting worn out in
backporting changes to it.)
Once v083 is public, we can start discussing a new API for multiple
emulators.
2011-10-06 09:53:16 +00:00
|
|
|
#include "nes-exrom.cpp"
|
Update to v082r33 release.
byuu says:
Added MMC2, MMC4, VRC4, VRC7 (no audio.)
Split NES audio code up into individual modules.
Fixed libsnes to compile: Themaister, can you please test to make sure
it works? I don't have a libsnes client on my work PC to test it.
Added about / license information to bottom of advanced settings screen
for now (better than nothing, I guess.)
Blocked PPU reads/writes while rendering for now, easier than coming up
with a bus address locking thing :/
I can't seem to fix MMC5 graphics during the intro to Uchuu Keibitai.
Without that, trying to implement vertical-split screen mode doesn't
make sense.
So as far as special audio chips go ...
* VRC6 is completed
* Sunsoft 5B has everything the only game to use it uses, but there are
more unused channels I'd like to support anyway (they aren't
documented, though.)
* MMC5 audio unsupported for now
* VRC7 audio unsupported, probably for a long time (hardest audio driver
of all. More complex than core NES APU.)
* audio PCM games (Moero Pro Yakyuu!) I probably won't ever support
(they require external WAV packs.)
2011-10-12 12:03:58 +00:00
|
|
|
#include "nes-fxrom.cpp"
|
2011-10-02 10:05:45 +00:00
|
|
|
#include "nes-gxrom.cpp"
|
2011-11-04 11:57:54 +00:00
|
|
|
#include "nes-hkrom.cpp"
|
2011-10-02 10:05:45 +00:00
|
|
|
#include "nes-nrom.cpp"
|
Update to v082r33 release.
byuu says:
Added MMC2, MMC4, VRC4, VRC7 (no audio.)
Split NES audio code up into individual modules.
Fixed libsnes to compile: Themaister, can you please test to make sure
it works? I don't have a libsnes client on my work PC to test it.
Added about / license information to bottom of advanced settings screen
for now (better than nothing, I guess.)
Blocked PPU reads/writes while rendering for now, easier than coming up
with a bus address locking thing :/
I can't seem to fix MMC5 graphics during the intro to Uchuu Keibitai.
Without that, trying to implement vertical-split screen mode doesn't
make sense.
So as far as special audio chips go ...
* VRC6 is completed
* Sunsoft 5B has everything the only game to use it uses, but there are
more unused channels I'd like to support anyway (they aren't
documented, though.)
* MMC5 audio unsupported for now
* VRC7 audio unsupported, probably for a long time (hardest audio driver
of all. More complex than core NES APU.)
* audio PCM games (Moero Pro Yakyuu!) I probably won't ever support
(they require external WAV packs.)
2011-10-12 12:03:58 +00:00
|
|
|
#include "nes-pxrom.cpp"
|
2011-10-02 10:05:45 +00:00
|
|
|
#include "nes-sxrom.cpp"
|
|
|
|
#include "nes-txrom.cpp"
|
|
|
|
#include "nes-uxrom.cpp"
|
2011-10-05 09:37:00 +00:00
|
|
|
#include "sunsoft-5b.cpp"
|
2011-09-29 12:08:22 +00:00
|
|
|
|
Update to v082r31 release.
byuu says:
Enable Overscan->Mask Overscan [best I'm doing]
Video settings -> Overscan mask: (horizontal, vertical: 0-16 on each
side) [only works on NES+SNES]
BPS patching works for NES+SNES+GB; note that long-term I want BPS to
only patch headerless PRG+CHR files, but we'll need a database
/ completed board mapping system first.
MMC1 splits the board/chip markups a bit better. My attempts to emulate
the extra CHR bits per hardware fail repeatedly. Docs do not explain how
it works at all.
Emulated enough of the MMC5 to play Castlevania 3.
The MMC5 is easily the most complicated mapper the NES has to offer, and
of course, has the most pitifully vague and difficult documentation of
any mapper around.
It seems the only way anyone is able to emulate this chip is
empirically.
Everyone else apparently hooks the MMC5 right into the PPU core, which
I of course cannot do. So I had to come up with my own (probably wrong)
way to synchronize the PPU simply by observing CHR bus accesses.
I must say, I over-estimated how well fleshed out the NES hardware
documentation was. Shit hits the fan right after MMC3.
It's miles beyond the GB scene, but I find myself wanting for someone
with the technical writing ability of anomie.
I can't find anything at all on how we're supposed to support the $2007
port reads/writes without it extra-clocking the PPU's bus, which could
throw off mapper timing.
Absolutely nothing at all on the subject anywhere, something everybody
is required to do for all cycle-based emulators and ... nada.
Anyway, I'd like to refine the MMC5 a bit, getting Just Breed playable
even without sound would be really nice (it's a fun game.)
Then we need to get libsnes building again (ugh, getting worn out in
backporting changes to it.)
Once v083 is public, we can start discussing a new API for multiple
emulators.
2011-10-06 09:53:16 +00:00
|
|
|
uint8 Board::Memory::read(unsigned addr) const {
|
|
|
|
return data[mirror(addr, size)];
|
|
|
|
}
|
|
|
|
|
|
|
|
void Board::Memory::write(unsigned addr, uint8 byte) {
|
Update to v082r33 release.
byuu says:
Added MMC2, MMC4, VRC4, VRC7 (no audio.)
Split NES audio code up into individual modules.
Fixed libsnes to compile: Themaister, can you please test to make sure
it works? I don't have a libsnes client on my work PC to test it.
Added about / license information to bottom of advanced settings screen
for now (better than nothing, I guess.)
Blocked PPU reads/writes while rendering for now, easier than coming up
with a bus address locking thing :/
I can't seem to fix MMC5 graphics during the intro to Uchuu Keibitai.
Without that, trying to implement vertical-split screen mode doesn't
make sense.
So as far as special audio chips go ...
* VRC6 is completed
* Sunsoft 5B has everything the only game to use it uses, but there are
more unused channels I'd like to support anyway (they aren't
documented, though.)
* MMC5 audio unsupported for now
* VRC7 audio unsupported, probably for a long time (hardest audio driver
of all. More complex than core NES APU.)
* audio PCM games (Moero Pro Yakyuu!) I probably won't ever support
(they require external WAV packs.)
2011-10-12 12:03:58 +00:00
|
|
|
if(writable) data[mirror(addr, size)] = byte;
|
Update to v082r31 release.
byuu says:
Enable Overscan->Mask Overscan [best I'm doing]
Video settings -> Overscan mask: (horizontal, vertical: 0-16 on each
side) [only works on NES+SNES]
BPS patching works for NES+SNES+GB; note that long-term I want BPS to
only patch headerless PRG+CHR files, but we'll need a database
/ completed board mapping system first.
MMC1 splits the board/chip markups a bit better. My attempts to emulate
the extra CHR bits per hardware fail repeatedly. Docs do not explain how
it works at all.
Emulated enough of the MMC5 to play Castlevania 3.
The MMC5 is easily the most complicated mapper the NES has to offer, and
of course, has the most pitifully vague and difficult documentation of
any mapper around.
It seems the only way anyone is able to emulate this chip is
empirically.
Everyone else apparently hooks the MMC5 right into the PPU core, which
I of course cannot do. So I had to come up with my own (probably wrong)
way to synchronize the PPU simply by observing CHR bus accesses.
I must say, I over-estimated how well fleshed out the NES hardware
documentation was. Shit hits the fan right after MMC3.
It's miles beyond the GB scene, but I find myself wanting for someone
with the technical writing ability of anomie.
I can't find anything at all on how we're supposed to support the $2007
port reads/writes without it extra-clocking the PPU's bus, which could
throw off mapper timing.
Absolutely nothing at all on the subject anywhere, something everybody
is required to do for all cycle-based emulators and ... nada.
Anyway, I'd like to refine the MMC5 a bit, getting Just Breed playable
even without sound would be really nice (it's a fun game.)
Then we need to get libsnes building again (ugh, getting worn out in
backporting changes to it.)
Once v083 is public, we can start discussing a new API for multiple
emulators.
2011-10-06 09:53:16 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
unsigned Board::mirror(unsigned addr, unsigned size) {
|
2011-09-29 12:08:22 +00:00
|
|
|
unsigned base = 0;
|
|
|
|
if(size) {
|
|
|
|
unsigned mask = 1 << 23;
|
|
|
|
while(addr >= size) {
|
|
|
|
while(!(addr & mask)) mask >>= 1;
|
|
|
|
addr -= mask;
|
|
|
|
if(size > mask) {
|
|
|
|
size -= mask;
|
|
|
|
base += mask;
|
|
|
|
}
|
|
|
|
mask >>= 1;
|
|
|
|
}
|
|
|
|
base += addr;
|
|
|
|
}
|
|
|
|
return base;
|
|
|
|
}
|
|
|
|
|
2011-09-29 12:44:49 +00:00
|
|
|
void Board::main() {
|
|
|
|
while(true) {
|
|
|
|
if(scheduler.sync == Scheduler::SynchronizeMode::All) {
|
|
|
|
scheduler.exit(Scheduler::ExitReason::SynchronizeEvent);
|
|
|
|
}
|
|
|
|
|
|
|
|
cartridge.clock += 12 * 4095;
|
|
|
|
tick();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void Board::tick() {
|
|
|
|
cartridge.clock += 12;
|
|
|
|
if(cartridge.clock >= 0 && scheduler.sync != Scheduler::SynchronizeMode::All) co_switch(cpu.thread);
|
|
|
|
}
|
|
|
|
|
2011-09-29 12:08:22 +00:00
|
|
|
uint8 Board::chr_read(unsigned addr) {
|
2011-09-29 12:44:49 +00:00
|
|
|
if(chrram.size) return chrram.data[mirror(addr, chrram.size)];
|
Update to v082r33 release.
byuu says:
Added MMC2, MMC4, VRC4, VRC7 (no audio.)
Split NES audio code up into individual modules.
Fixed libsnes to compile: Themaister, can you please test to make sure
it works? I don't have a libsnes client on my work PC to test it.
Added about / license information to bottom of advanced settings screen
for now (better than nothing, I guess.)
Blocked PPU reads/writes while rendering for now, easier than coming up
with a bus address locking thing :/
I can't seem to fix MMC5 graphics during the intro to Uchuu Keibitai.
Without that, trying to implement vertical-split screen mode doesn't
make sense.
So as far as special audio chips go ...
* VRC6 is completed
* Sunsoft 5B has everything the only game to use it uses, but there are
more unused channels I'd like to support anyway (they aren't
documented, though.)
* MMC5 audio unsupported for now
* VRC7 audio unsupported, probably for a long time (hardest audio driver
of all. More complex than core NES APU.)
* audio PCM games (Moero Pro Yakyuu!) I probably won't ever support
(they require external WAV packs.)
2011-10-12 12:03:58 +00:00
|
|
|
if(chrrom.size) return chrrom.data[mirror(addr, chrrom.size)];
|
2011-09-29 12:44:49 +00:00
|
|
|
return 0u;
|
2011-09-29 12:08:22 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void Board::chr_write(unsigned addr, uint8 data) {
|
2011-09-29 12:44:49 +00:00
|
|
|
if(chrram.size) chrram.data[mirror(addr, chrram.size)] = data;
|
2011-09-29 12:08:22 +00:00
|
|
|
}
|
|
|
|
|
Update to v082r33 release.
byuu says:
Added MMC2, MMC4, VRC4, VRC7 (no audio.)
Split NES audio code up into individual modules.
Fixed libsnes to compile: Themaister, can you please test to make sure
it works? I don't have a libsnes client on my work PC to test it.
Added about / license information to bottom of advanced settings screen
for now (better than nothing, I guess.)
Blocked PPU reads/writes while rendering for now, easier than coming up
with a bus address locking thing :/
I can't seem to fix MMC5 graphics during the intro to Uchuu Keibitai.
Without that, trying to implement vertical-split screen mode doesn't
make sense.
So as far as special audio chips go ...
* VRC6 is completed
* Sunsoft 5B has everything the only game to use it uses, but there are
more unused channels I'd like to support anyway (they aren't
documented, though.)
* MMC5 audio unsupported for now
* VRC7 audio unsupported, probably for a long time (hardest audio driver
of all. More complex than core NES APU.)
* audio PCM games (Moero Pro Yakyuu!) I probably won't ever support
(they require external WAV packs.)
2011-10-12 12:03:58 +00:00
|
|
|
Board::Memory& Board::memory() {
|
2011-09-29 12:44:49 +00:00
|
|
|
return prgram;
|
|
|
|
}
|
2011-09-29 12:08:22 +00:00
|
|
|
|
2011-09-29 12:44:49 +00:00
|
|
|
void Board::power() {
|
|
|
|
}
|
|
|
|
|
|
|
|
void Board::reset() {
|
|
|
|
}
|
|
|
|
|
|
|
|
void Board::serialize(serializer &s) {
|
|
|
|
if(prgram.size) s.array(prgram.data, prgram.size);
|
|
|
|
if(chrram.size) s.array(chrram.data, chrram.size);
|
|
|
|
}
|
2011-09-29 12:08:22 +00:00
|
|
|
|
2011-09-29 12:44:49 +00:00
|
|
|
Board::Board(BML::Node &board, const uint8_t *data, unsigned size) {
|
2011-10-02 10:05:45 +00:00
|
|
|
information.type = board["type"].value;
|
|
|
|
information.battery = board["prg"]["battery"].value;
|
2011-09-29 12:44:49 +00:00
|
|
|
|
2011-10-02 10:05:45 +00:00
|
|
|
prgrom.size = decimal(board["prg"]["rom"].value);
|
|
|
|
prgram.size = decimal(board["prg"]["ram"].value);
|
|
|
|
chrrom.size = decimal(board["chr"]["rom"].value);
|
|
|
|
chrram.size = decimal(board["chr"]["ram"].value);
|
2011-09-29 12:44:49 +00:00
|
|
|
|
|
|
|
if(prgrom.size) prgrom.data = new uint8[prgrom.size]();
|
|
|
|
if(prgram.size) prgram.data = new uint8[prgram.size]();
|
|
|
|
if(chrrom.size) chrrom.data = new uint8[chrrom.size]();
|
|
|
|
if(chrram.size) chrram.data = new uint8[chrram.size]();
|
|
|
|
|
|
|
|
if(prgrom.size) memcpy(prgrom.data, data, prgrom.size);
|
|
|
|
if(chrrom.size) memcpy(chrrom.data, data + prgrom.size, chrrom.size);
|
Update to v082r33 release.
byuu says:
Added MMC2, MMC4, VRC4, VRC7 (no audio.)
Split NES audio code up into individual modules.
Fixed libsnes to compile: Themaister, can you please test to make sure
it works? I don't have a libsnes client on my work PC to test it.
Added about / license information to bottom of advanced settings screen
for now (better than nothing, I guess.)
Blocked PPU reads/writes while rendering for now, easier than coming up
with a bus address locking thing :/
I can't seem to fix MMC5 graphics during the intro to Uchuu Keibitai.
Without that, trying to implement vertical-split screen mode doesn't
make sense.
So as far as special audio chips go ...
* VRC6 is completed
* Sunsoft 5B has everything the only game to use it uses, but there are
more unused channels I'd like to support anyway (they aren't
documented, though.)
* MMC5 audio unsupported for now
* VRC7 audio unsupported, probably for a long time (hardest audio driver
of all. More complex than core NES APU.)
* audio PCM games (Moero Pro Yakyuu!) I probably won't ever support
(they require external WAV packs.)
2011-10-12 12:03:58 +00:00
|
|
|
|
|
|
|
prgram.writable = true;
|
|
|
|
chrram.writable = true;
|
2011-09-29 12:44:49 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
Board::~Board() {
|
|
|
|
}
|
2011-09-29 12:08:22 +00:00
|
|
|
|
2011-09-29 12:44:49 +00:00
|
|
|
Board* Board::load(const string &markup, const uint8_t *data, unsigned size) {
|
Update to v082r29 release.
byuu says:
I doubt anyone is going to like these changes, but oh well.
The base height output for NES+SNES is now always 256x240. The Enable
Overscan option blanks out borders around the screen. This eliminates
the need for an overscan software filter. For NES, it's 16px from the
top and bottom, and 8px from the left and right. Anything less and you
get scrolling artifacts in countless games. For the SNES, it's only 16px
from the top and bottom. Main point is that most NTSC SNES games are
224-height games, so you'll have black borders. Oh well, hack the source
if you want. Game Boy overscan option does nothing.
Everything except for the cheats.xml file now uses BML markup. I need to
write a converter for cheats.xml still. Cut the SNES board parsing code
in half, 30KB->16KB. Much cleaner now.
Took the opportunity to fix a mistake I made back with the XML spec: all
numbers are integers, but can be prefixed with 0x to become hexadecimal.
Before, offset/size values defaulted to hex-mode even without a prefix,
unlike frequency/etc values.
The XML shaders have gone in their own direction anyway, with most being
multi-pass and incompatible with bsnes. So that said, please don't
extend the BML functionality from your end. But f eel free to add to the
XML spec, since other emulators now use that as well. And don't
misunderstand, I love the work that's being done there. It's pretty
awesome to see multi-pass shader capabilities, and the RAM watching
stuff is just amazing.
If there are any really awesome single-pass shaders that people would
like, I can convert it from XML and include it with future releases.
On that topic, I removed the watercolor/hdr-tv ones from the binary
packages (still in the source archive) ... they are neat, but not very
useful for actual gaming.
If we had more than one, I'd remove the Direct3D sepia one. Not going to
use shaders from a certain bipolar manic, because I'd never hear the end
of it if I did :/
Oh, one change I think people will like: MSU1 no longer requires
a memory map specification, so MSU1 authors won't have to keep updating
to my newer revisions of board markups. Basically, if there's not
a board with an msu1 section, it'll check if "gamename.msu" exists. If
it does, MSU1 gets mapped to 00-3f,80-bf:2000-2007. If all you want is
music, make a blank, zero-byte gamename.msu file.
2011-10-04 11:55:39 +00:00
|
|
|
BML::Document document(markup);
|
2011-09-29 12:44:49 +00:00
|
|
|
auto &board = document["cartridge"]["board"];
|
2011-10-02 10:05:45 +00:00
|
|
|
string type = board["type"].value;
|
2011-09-29 12:08:22 +00:00
|
|
|
|
2011-10-01 12:06:48 +00:00
|
|
|
if(type == "BANDAI-FCG") return new BandaiFCG(board, data, size);
|
|
|
|
|
2011-11-04 11:57:54 +00:00
|
|
|
if(type == "KONAMI-VRC-1") return new KonamiVRC1(board, data, size);
|
|
|
|
if(type == "KONAMI-VRC-2") return new KonamiVRC2(board, data, size);
|
|
|
|
if(type == "KONAMI-VRC-3") return new KonamiVRC3(board, data, size);
|
Update to v082r33 release.
byuu says:
Added MMC2, MMC4, VRC4, VRC7 (no audio.)
Split NES audio code up into individual modules.
Fixed libsnes to compile: Themaister, can you please test to make sure
it works? I don't have a libsnes client on my work PC to test it.
Added about / license information to bottom of advanced settings screen
for now (better than nothing, I guess.)
Blocked PPU reads/writes while rendering for now, easier than coming up
with a bus address locking thing :/
I can't seem to fix MMC5 graphics during the intro to Uchuu Keibitai.
Without that, trying to implement vertical-split screen mode doesn't
make sense.
So as far as special audio chips go ...
* VRC6 is completed
* Sunsoft 5B has everything the only game to use it uses, but there are
more unused channels I'd like to support anyway (they aren't
documented, though.)
* MMC5 audio unsupported for now
* VRC7 audio unsupported, probably for a long time (hardest audio driver
of all. More complex than core NES APU.)
* audio PCM games (Moero Pro Yakyuu!) I probably won't ever support
(they require external WAV packs.)
2011-10-12 12:03:58 +00:00
|
|
|
if(type == "KONAMI-VRC-4") return new KonamiVRC4(board, data, size);
|
2011-10-01 12:06:48 +00:00
|
|
|
if(type == "KONAMI-VRC-6") return new KonamiVRC6(board, data, size);
|
Update to v082r33 release.
byuu says:
Added MMC2, MMC4, VRC4, VRC7 (no audio.)
Split NES audio code up into individual modules.
Fixed libsnes to compile: Themaister, can you please test to make sure
it works? I don't have a libsnes client on my work PC to test it.
Added about / license information to bottom of advanced settings screen
for now (better than nothing, I guess.)
Blocked PPU reads/writes while rendering for now, easier than coming up
with a bus address locking thing :/
I can't seem to fix MMC5 graphics during the intro to Uchuu Keibitai.
Without that, trying to implement vertical-split screen mode doesn't
make sense.
So as far as special audio chips go ...
* VRC6 is completed
* Sunsoft 5B has everything the only game to use it uses, but there are
more unused channels I'd like to support anyway (they aren't
documented, though.)
* MMC5 audio unsupported for now
* VRC7 audio unsupported, probably for a long time (hardest audio driver
of all. More complex than core NES APU.)
* audio PCM games (Moero Pro Yakyuu!) I probably won't ever support
(they require external WAV packs.)
2011-10-12 12:03:58 +00:00
|
|
|
if(type == "KONAMI-VRC-7") return new KonamiVRC7(board, data, size);
|
2011-10-01 12:06:48 +00:00
|
|
|
|
2011-10-02 10:05:45 +00:00
|
|
|
if(type == "NES-AMROM" ) return new NES_AxROM(board, data, size);
|
|
|
|
if(type == "NES-ANROM" ) return new NES_AxROM(board, data, size);
|
|
|
|
if(type == "NES-AN1ROM" ) return new NES_AxROM(board, data, size);
|
|
|
|
if(type == "NES-AOROM" ) return new NES_AxROM(board, data, size);
|
|
|
|
|
|
|
|
if(type == "NES-BNROM" ) return new NES_BNROM(board, data, size);
|
|
|
|
|
|
|
|
if(type == "NES-CNROM" ) return new NES_CNROM(board, data, size);
|
|
|
|
|
Update to v082r31 release.
byuu says:
Enable Overscan->Mask Overscan [best I'm doing]
Video settings -> Overscan mask: (horizontal, vertical: 0-16 on each
side) [only works on NES+SNES]
BPS patching works for NES+SNES+GB; note that long-term I want BPS to
only patch headerless PRG+CHR files, but we'll need a database
/ completed board mapping system first.
MMC1 splits the board/chip markups a bit better. My attempts to emulate
the extra CHR bits per hardware fail repeatedly. Docs do not explain how
it works at all.
Emulated enough of the MMC5 to play Castlevania 3.
The MMC5 is easily the most complicated mapper the NES has to offer, and
of course, has the most pitifully vague and difficult documentation of
any mapper around.
It seems the only way anyone is able to emulate this chip is
empirically.
Everyone else apparently hooks the MMC5 right into the PPU core, which
I of course cannot do. So I had to come up with my own (probably wrong)
way to synchronize the PPU simply by observing CHR bus accesses.
I must say, I over-estimated how well fleshed out the NES hardware
documentation was. Shit hits the fan right after MMC3.
It's miles beyond the GB scene, but I find myself wanting for someone
with the technical writing ability of anomie.
I can't find anything at all on how we're supposed to support the $2007
port reads/writes without it extra-clocking the PPU's bus, which could
throw off mapper timing.
Absolutely nothing at all on the subject anywhere, something everybody
is required to do for all cycle-based emulators and ... nada.
Anyway, I'd like to refine the MMC5 a bit, getting Just Breed playable
even without sound would be really nice (it's a fun game.)
Then we need to get libsnes building again (ugh, getting worn out in
backporting changes to it.)
Once v083 is public, we can start discussing a new API for multiple
emulators.
2011-10-06 09:53:16 +00:00
|
|
|
if(type == "NES-EKROM" ) return new NES_ExROM(board, data, size);
|
|
|
|
if(type == "NES-ELROM" ) return new NES_ExROM(board, data, size);
|
|
|
|
if(type == "NES-ETROM" ) return new NES_ExROM(board, data, size);
|
|
|
|
if(type == "NES-EWROM" ) return new NES_ExROM(board, data, size);
|
|
|
|
|
Update to v082r33 release.
byuu says:
Added MMC2, MMC4, VRC4, VRC7 (no audio.)
Split NES audio code up into individual modules.
Fixed libsnes to compile: Themaister, can you please test to make sure
it works? I don't have a libsnes client on my work PC to test it.
Added about / license information to bottom of advanced settings screen
for now (better than nothing, I guess.)
Blocked PPU reads/writes while rendering for now, easier than coming up
with a bus address locking thing :/
I can't seem to fix MMC5 graphics during the intro to Uchuu Keibitai.
Without that, trying to implement vertical-split screen mode doesn't
make sense.
So as far as special audio chips go ...
* VRC6 is completed
* Sunsoft 5B has everything the only game to use it uses, but there are
more unused channels I'd like to support anyway (they aren't
documented, though.)
* MMC5 audio unsupported for now
* VRC7 audio unsupported, probably for a long time (hardest audio driver
of all. More complex than core NES APU.)
* audio PCM games (Moero Pro Yakyuu!) I probably won't ever support
(they require external WAV packs.)
2011-10-12 12:03:58 +00:00
|
|
|
if(type == "NES-FJROM" ) return new NES_FxROM(board, data, size);
|
|
|
|
if(type == "NES-FKROM" ) return new NES_FxROM(board, data, size);
|
|
|
|
|
2011-10-02 10:05:45 +00:00
|
|
|
if(type == "NES-GNROM" ) return new NES_GxROM(board, data, size);
|
|
|
|
if(type == "NES-MHROM" ) return new NES_GxROM(board, data, size);
|
|
|
|
|
2011-11-04 11:57:54 +00:00
|
|
|
if(type == "NES-HKROM" ) return new NES_HKROM(board, data, size);
|
|
|
|
|
2011-10-02 10:05:45 +00:00
|
|
|
if(type == "NES-NROM-128") return new NES_NROM(board, data, size);
|
|
|
|
if(type == "NES-NROM-256") return new NES_NROM(board, data, size);
|
|
|
|
|
Update to v082r33 release.
byuu says:
Added MMC2, MMC4, VRC4, VRC7 (no audio.)
Split NES audio code up into individual modules.
Fixed libsnes to compile: Themaister, can you please test to make sure
it works? I don't have a libsnes client on my work PC to test it.
Added about / license information to bottom of advanced settings screen
for now (better than nothing, I guess.)
Blocked PPU reads/writes while rendering for now, easier than coming up
with a bus address locking thing :/
I can't seem to fix MMC5 graphics during the intro to Uchuu Keibitai.
Without that, trying to implement vertical-split screen mode doesn't
make sense.
So as far as special audio chips go ...
* VRC6 is completed
* Sunsoft 5B has everything the only game to use it uses, but there are
more unused channels I'd like to support anyway (they aren't
documented, though.)
* MMC5 audio unsupported for now
* VRC7 audio unsupported, probably for a long time (hardest audio driver
of all. More complex than core NES APU.)
* audio PCM games (Moero Pro Yakyuu!) I probably won't ever support
(they require external WAV packs.)
2011-10-12 12:03:58 +00:00
|
|
|
if(type == "NES-PEEOROM" ) return new NES_PxROM(board, data, size);
|
|
|
|
if(type == "NES-PNROM" ) return new NES_PxROM(board, data, size);
|
|
|
|
|
2011-10-02 10:05:45 +00:00
|
|
|
if(type == "NES-SNROM" ) return new NES_SxROM(board, data, size);
|
|
|
|
if(type == "NES-SXROM" ) return new NES_SxROM(board, data, size);
|
|
|
|
|
|
|
|
if(type == "NES-TLROM" ) return new NES_TxROM(board, data, size);
|
|
|
|
|
|
|
|
if(type == "NES-UNROM" ) return new NES_UxROM(board, data, size);
|
|
|
|
if(type == "NES-UOROM" ) return new NES_UxROM(board, data, size);
|
|
|
|
|
2011-10-05 09:37:00 +00:00
|
|
|
if(type == "SUNSOFT-5B" ) return new Sunsoft5B(board, data, size);
|
|
|
|
|
2011-09-29 12:44:49 +00:00
|
|
|
return nullptr;
|
2011-09-29 12:08:22 +00:00
|
|
|
}
|