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
|
|
|
}
|
|
|
|
|
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
|
|
|
|
Update to v091r05 release.
[No prior releases were posted to the WIP thread. -Ed.]
byuu says:
Super Famicom mapping system has been reworked as discussed with the
mask= changes. offset becomes base, mode is gone. Also added support for
comma-separated fields in the address fields, to reduce the number of
map lines needed.
<?xml version="1.0" encoding="UTF-8"?>
<cartridge region="NTSC">
<superfx revision="2">
<rom name="program.rom" size="0x200000"/>
<ram name="save.rwm" size="0x8000"/>
<map id="io" address="00-3f,80-bf:3000-32ff"/>
<map id="rom" address="00-3f:8000-ffff" mask="0x8000"/>
<map id="rom" address="40-5f:0000-ffff"/>
<map id="ram" address="00-3f,80-bf:6000-7fff" size="0x2000"/>
<map id="ram" address="70-71:0000-ffff"/>
</superfx>
</cartridge>
Or in BML:
cartridge region=NTSC
superfx revision=2
rom name=program.rom size=0x200000
ram name=save.rwm size=0x8000
map id=io address=00-3f,80-bf:3000-32ff
map id=rom address=00-3f:8000-ffff mask=0x8000
map id=rom address=40-5f:0000-ffff
map id=ram address=00-3f,80-bf:6000-7fff size=0x2000
map id=ram address=70-71:0000-ffff
As a result of the changes, old mappings will no longer work. The above
XML example will run Super Mario World 2: Yoshi's Island. Otherwise,
you'll have to write your own.
All that's left now is to work some sort of database mapping system in,
so I can start dumping carts en masse.
The NES changes that FitzRoy asked for are mostly in as well.
Also, part of the reason I haven't released a WIP ... but fuck it, I'm
not going to wait forever to post a new WIP.
I've added a skeleton driver to emulate Campus Challenge '92 and
Powerfest '94. There's no actual emulation, except for the stuff I can
glean from looking at the pictures of the board. It has a DSP-1 (so
SR/DR registers), four ROMs that map in and out, RAM, etc.
I've also added preliminary mapping to upload high scores to a website,
but obviously I need the ROMs first.
2012-10-09 08:25:32 +00:00
|
|
|
Board::Board(Markup::Node &document) {
|
2012-05-26 08:18:42 +00:00
|
|
|
cartridge.board = this;
|
2012-04-20 12:48:09 +00:00
|
|
|
auto &cartridge = document["cartridge"];
|
2011-09-29 12:44:49 +00:00
|
|
|
|
2012-04-20 12:48:09 +00:00
|
|
|
information.type = cartridge["board"]["type"].data;
|
|
|
|
information.battery = cartridge["prg"]["ram"]["nonvolatile"].data == "true";
|
|
|
|
|
2012-05-26 08:18:42 +00:00
|
|
|
auto &prom = cartridge["prg"]["rom"];
|
|
|
|
auto &pram = cartridge["prg"]["ram"];
|
|
|
|
auto &crom = cartridge["chr"]["rom"];
|
|
|
|
auto &cram = cartridge["chr"]["ram"];
|
|
|
|
|
|
|
|
prgrom.size = numeral(prom["size"].data);
|
|
|
|
prgram.size = numeral(pram["size"].data);
|
|
|
|
chrrom.size = numeral(crom["size"].data);
|
|
|
|
chrram.size = numeral(cram["size"].data);
|
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]();
|
|
|
|
|
2012-05-26 08:18:42 +00:00
|
|
|
if(prom["name"].data) interface->loadRequest(ID::ProgramROM, prom["name"].data);
|
|
|
|
if(pram["name"].data) interface->loadRequest(ID::ProgramRAM, pram["name"].data);
|
|
|
|
if(crom["name"].data) interface->loadRequest(ID::CharacterROM, crom["name"].data);
|
|
|
|
if(cram["name"].data) interface->loadRequest(ID::CharacterRAM, cram["name"].data);
|
|
|
|
|
|
|
|
if(pram["name"].data) Famicom::cartridge.memory.append({ID::ProgramRAM, pram["name"].data});
|
|
|
|
if(cram["name"].data) Famicom::cartridge.memory.append({ID::CharacterRAM, cram["name"].data});
|
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
|
|
|
|
2012-05-26 08:18:42 +00:00
|
|
|
Board* Board::load(const string &manifest) {
|
Update to v091r05 release.
[No prior releases were posted to the WIP thread. -Ed.]
byuu says:
Super Famicom mapping system has been reworked as discussed with the
mask= changes. offset becomes base, mode is gone. Also added support for
comma-separated fields in the address fields, to reduce the number of
map lines needed.
<?xml version="1.0" encoding="UTF-8"?>
<cartridge region="NTSC">
<superfx revision="2">
<rom name="program.rom" size="0x200000"/>
<ram name="save.rwm" size="0x8000"/>
<map id="io" address="00-3f,80-bf:3000-32ff"/>
<map id="rom" address="00-3f:8000-ffff" mask="0x8000"/>
<map id="rom" address="40-5f:0000-ffff"/>
<map id="ram" address="00-3f,80-bf:6000-7fff" size="0x2000"/>
<map id="ram" address="70-71:0000-ffff"/>
</superfx>
</cartridge>
Or in BML:
cartridge region=NTSC
superfx revision=2
rom name=program.rom size=0x200000
ram name=save.rwm size=0x8000
map id=io address=00-3f,80-bf:3000-32ff
map id=rom address=00-3f:8000-ffff mask=0x8000
map id=rom address=40-5f:0000-ffff
map id=ram address=00-3f,80-bf:6000-7fff size=0x2000
map id=ram address=70-71:0000-ffff
As a result of the changes, old mappings will no longer work. The above
XML example will run Super Mario World 2: Yoshi's Island. Otherwise,
you'll have to write your own.
All that's left now is to work some sort of database mapping system in,
so I can start dumping carts en masse.
The NES changes that FitzRoy asked for are mostly in as well.
Also, part of the reason I haven't released a WIP ... but fuck it, I'm
not going to wait forever to post a new WIP.
I've added a skeleton driver to emulate Campus Challenge '92 and
Powerfest '94. There's no actual emulation, except for the stuff I can
glean from looking at the pictures of the board. It has a DSP-1 (so
SR/DR registers), four ROMs that map in and out, RAM, etc.
I've also added preliminary mapping to upload high scores to a website,
but obviously I need the ROMs first.
2012-10-09 08:25:32 +00:00
|
|
|
auto document = Markup::Document(manifest);
|
2012-04-20 12:48:09 +00:00
|
|
|
string type = document["cartridge"]["board"]["type"].data;
|
2011-09-29 12:08:22 +00:00
|
|
|
|
2012-05-26 08:18:42 +00:00
|
|
|
if(type == "BANDAI-FCG" ) return new BandaiFCG(document);
|
2011-10-01 12:06:48 +00:00
|
|
|
|
2012-05-26 08:18:42 +00:00
|
|
|
if(type == "KONAMI-VRC-1") return new KonamiVRC1(document);
|
|
|
|
if(type == "KONAMI-VRC-2") return new KonamiVRC2(document);
|
|
|
|
if(type == "KONAMI-VRC-3") return new KonamiVRC3(document);
|
|
|
|
if(type == "KONAMI-VRC-4") return new KonamiVRC4(document);
|
|
|
|
if(type == "KONAMI-VRC-6") return new KonamiVRC6(document);
|
|
|
|
if(type == "KONAMI-VRC-7") return new KonamiVRC7(document);
|
2011-10-01 12:06:48 +00:00
|
|
|
|
2012-05-26 08:18:42 +00:00
|
|
|
if(type == "NES-AMROM" ) return new NES_AxROM(document);
|
|
|
|
if(type == "NES-ANROM" ) return new NES_AxROM(document);
|
|
|
|
if(type == "NES-AN1ROM" ) return new NES_AxROM(document);
|
|
|
|
if(type == "NES-AOROM" ) return new NES_AxROM(document);
|
2011-10-02 10:05:45 +00:00
|
|
|
|
2012-05-26 08:18:42 +00:00
|
|
|
if(type == "NES-BNROM" ) return new NES_BNROM(document);
|
2011-10-02 10:05:45 +00:00
|
|
|
|
2012-05-26 08:18:42 +00:00
|
|
|
if(type == "NES-CNROM" ) return new NES_CNROM(document);
|
2011-10-02 10:05:45 +00:00
|
|
|
|
2012-05-26 08:18:42 +00:00
|
|
|
if(type == "NES-EKROM" ) return new NES_ExROM(document);
|
|
|
|
if(type == "NES-ELROM" ) return new NES_ExROM(document);
|
|
|
|
if(type == "NES-ETROM" ) return new NES_ExROM(document);
|
|
|
|
if(type == "NES-EWROM" ) return new NES_ExROM(document);
|
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
|
|
|
|
2012-05-26 08:18:42 +00:00
|
|
|
if(type == "NES-FJROM" ) return new NES_FxROM(document);
|
|
|
|
if(type == "NES-FKROM" ) return new NES_FxROM(document);
|
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
|
|
|
|
2012-05-26 08:18:42 +00:00
|
|
|
if(type == "NES-GNROM" ) return new NES_GxROM(document);
|
|
|
|
if(type == "NES-MHROM" ) return new NES_GxROM(document);
|
2011-10-02 10:05:45 +00:00
|
|
|
|
2012-05-26 08:18:42 +00:00
|
|
|
if(type == "NES-HKROM" ) return new NES_HKROM(document);
|
2011-11-04 11:57:54 +00:00
|
|
|
|
Update to v091r05 release.
[No prior releases were posted to the WIP thread. -Ed.]
byuu says:
Super Famicom mapping system has been reworked as discussed with the
mask= changes. offset becomes base, mode is gone. Also added support for
comma-separated fields in the address fields, to reduce the number of
map lines needed.
<?xml version="1.0" encoding="UTF-8"?>
<cartridge region="NTSC">
<superfx revision="2">
<rom name="program.rom" size="0x200000"/>
<ram name="save.rwm" size="0x8000"/>
<map id="io" address="00-3f,80-bf:3000-32ff"/>
<map id="rom" address="00-3f:8000-ffff" mask="0x8000"/>
<map id="rom" address="40-5f:0000-ffff"/>
<map id="ram" address="00-3f,80-bf:6000-7fff" size="0x2000"/>
<map id="ram" address="70-71:0000-ffff"/>
</superfx>
</cartridge>
Or in BML:
cartridge region=NTSC
superfx revision=2
rom name=program.rom size=0x200000
ram name=save.rwm size=0x8000
map id=io address=00-3f,80-bf:3000-32ff
map id=rom address=00-3f:8000-ffff mask=0x8000
map id=rom address=40-5f:0000-ffff
map id=ram address=00-3f,80-bf:6000-7fff size=0x2000
map id=ram address=70-71:0000-ffff
As a result of the changes, old mappings will no longer work. The above
XML example will run Super Mario World 2: Yoshi's Island. Otherwise,
you'll have to write your own.
All that's left now is to work some sort of database mapping system in,
so I can start dumping carts en masse.
The NES changes that FitzRoy asked for are mostly in as well.
Also, part of the reason I haven't released a WIP ... but fuck it, I'm
not going to wait forever to post a new WIP.
I've added a skeleton driver to emulate Campus Challenge '92 and
Powerfest '94. There's no actual emulation, except for the stuff I can
glean from looking at the pictures of the board. It has a DSP-1 (so
SR/DR registers), four ROMs that map in and out, RAM, etc.
I've also added preliminary mapping to upload high scores to a website,
but obviously I need the ROMs first.
2012-10-09 08:25:32 +00:00
|
|
|
if(type == "NES-NROM" ) return new NES_NROM(document);
|
2012-05-26 08:18:42 +00:00
|
|
|
if(type == "NES-NROM-128") return new NES_NROM(document);
|
|
|
|
if(type == "NES-NROM-256") return new NES_NROM(document);
|
2011-10-02 10:05:45 +00:00
|
|
|
|
2012-05-26 08:18:42 +00:00
|
|
|
if(type == "NES-PEEOROM" ) return new NES_PxROM(document);
|
|
|
|
if(type == "NES-PNROM" ) return new NES_PxROM(document);
|
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
|
|
|
|
Update to v091r05 release.
[No prior releases were posted to the WIP thread. -Ed.]
byuu says:
Super Famicom mapping system has been reworked as discussed with the
mask= changes. offset becomes base, mode is gone. Also added support for
comma-separated fields in the address fields, to reduce the number of
map lines needed.
<?xml version="1.0" encoding="UTF-8"?>
<cartridge region="NTSC">
<superfx revision="2">
<rom name="program.rom" size="0x200000"/>
<ram name="save.rwm" size="0x8000"/>
<map id="io" address="00-3f,80-bf:3000-32ff"/>
<map id="rom" address="00-3f:8000-ffff" mask="0x8000"/>
<map id="rom" address="40-5f:0000-ffff"/>
<map id="ram" address="00-3f,80-bf:6000-7fff" size="0x2000"/>
<map id="ram" address="70-71:0000-ffff"/>
</superfx>
</cartridge>
Or in BML:
cartridge region=NTSC
superfx revision=2
rom name=program.rom size=0x200000
ram name=save.rwm size=0x8000
map id=io address=00-3f,80-bf:3000-32ff
map id=rom address=00-3f:8000-ffff mask=0x8000
map id=rom address=40-5f:0000-ffff
map id=ram address=00-3f,80-bf:6000-7fff size=0x2000
map id=ram address=70-71:0000-ffff
As a result of the changes, old mappings will no longer work. The above
XML example will run Super Mario World 2: Yoshi's Island. Otherwise,
you'll have to write your own.
All that's left now is to work some sort of database mapping system in,
so I can start dumping carts en masse.
The NES changes that FitzRoy asked for are mostly in as well.
Also, part of the reason I haven't released a WIP ... but fuck it, I'm
not going to wait forever to post a new WIP.
I've added a skeleton driver to emulate Campus Challenge '92 and
Powerfest '94. There's no actual emulation, except for the stuff I can
glean from looking at the pictures of the board. It has a DSP-1 (so
SR/DR registers), four ROMs that map in and out, RAM, etc.
I've also added preliminary mapping to upload high scores to a website,
but obviously I need the ROMs first.
2012-10-09 08:25:32 +00:00
|
|
|
if(type == "NES-SAROM" ) return new NES_SxROM(document);
|
|
|
|
if(type == "NES-SBROM" ) return new NES_SxROM(document);
|
|
|
|
if(type == "NES-SCROM" ) return new NES_SxROM(document);
|
|
|
|
if(type == "NES-SC1ROM" ) return new NES_SxROM(document);
|
|
|
|
if(type == "NES-SEROM" ) return new NES_SxROM(document);
|
|
|
|
if(type == "NES-SFROM" ) return new NES_SxROM(document);
|
|
|
|
if(type == "NES-SFEXPROM") return new NES_SxROM(document);
|
|
|
|
if(type == "NES-SGROM" ) return new NES_SxROM(document);
|
|
|
|
if(type == "NES-SHROM" ) return new NES_SxROM(document);
|
|
|
|
if(type == "NES-SH1ROM" ) return new NES_SxROM(document);
|
|
|
|
if(type == "NES-SIROM" ) return new NES_SxROM(document);
|
|
|
|
if(type == "NES-SJROM" ) return new NES_SxROM(document);
|
|
|
|
if(type == "NES-SKROM" ) return new NES_SxROM(document);
|
|
|
|
if(type == "NES-SLROM" ) return new NES_SxROM(document);
|
|
|
|
if(type == "NES-SL1ROM" ) return new NES_SxROM(document);
|
|
|
|
if(type == "NES-SL2ROM" ) return new NES_SxROM(document);
|
|
|
|
if(type == "NES-SL3ROM" ) return new NES_SxROM(document);
|
|
|
|
if(type == "NES-SLRROM" ) return new NES_SxROM(document);
|
|
|
|
if(type == "NES-SMROM" ) return new NES_SxROM(document);
|
2012-05-26 08:18:42 +00:00
|
|
|
if(type == "NES-SNROM" ) return new NES_SxROM(document);
|
Update to v091r05 release.
[No prior releases were posted to the WIP thread. -Ed.]
byuu says:
Super Famicom mapping system has been reworked as discussed with the
mask= changes. offset becomes base, mode is gone. Also added support for
comma-separated fields in the address fields, to reduce the number of
map lines needed.
<?xml version="1.0" encoding="UTF-8"?>
<cartridge region="NTSC">
<superfx revision="2">
<rom name="program.rom" size="0x200000"/>
<ram name="save.rwm" size="0x8000"/>
<map id="io" address="00-3f,80-bf:3000-32ff"/>
<map id="rom" address="00-3f:8000-ffff" mask="0x8000"/>
<map id="rom" address="40-5f:0000-ffff"/>
<map id="ram" address="00-3f,80-bf:6000-7fff" size="0x2000"/>
<map id="ram" address="70-71:0000-ffff"/>
</superfx>
</cartridge>
Or in BML:
cartridge region=NTSC
superfx revision=2
rom name=program.rom size=0x200000
ram name=save.rwm size=0x8000
map id=io address=00-3f,80-bf:3000-32ff
map id=rom address=00-3f:8000-ffff mask=0x8000
map id=rom address=40-5f:0000-ffff
map id=ram address=00-3f,80-bf:6000-7fff size=0x2000
map id=ram address=70-71:0000-ffff
As a result of the changes, old mappings will no longer work. The above
XML example will run Super Mario World 2: Yoshi's Island. Otherwise,
you'll have to write your own.
All that's left now is to work some sort of database mapping system in,
so I can start dumping carts en masse.
The NES changes that FitzRoy asked for are mostly in as well.
Also, part of the reason I haven't released a WIP ... but fuck it, I'm
not going to wait forever to post a new WIP.
I've added a skeleton driver to emulate Campus Challenge '92 and
Powerfest '94. There's no actual emulation, except for the stuff I can
glean from looking at the pictures of the board. It has a DSP-1 (so
SR/DR registers), four ROMs that map in and out, RAM, etc.
I've also added preliminary mapping to upload high scores to a website,
but obviously I need the ROMs first.
2012-10-09 08:25:32 +00:00
|
|
|
if(type == "NES-SOROM" ) return new NES_SxROM(document);
|
|
|
|
if(type == "NES-SUROM" ) return new NES_SxROM(document);
|
2012-05-26 08:18:42 +00:00
|
|
|
if(type == "NES-SXROM" ) return new NES_SxROM(document);
|
2011-10-02 10:05:45 +00:00
|
|
|
|
Update to v091r05 release.
[No prior releases were posted to the WIP thread. -Ed.]
byuu says:
Super Famicom mapping system has been reworked as discussed with the
mask= changes. offset becomes base, mode is gone. Also added support for
comma-separated fields in the address fields, to reduce the number of
map lines needed.
<?xml version="1.0" encoding="UTF-8"?>
<cartridge region="NTSC">
<superfx revision="2">
<rom name="program.rom" size="0x200000"/>
<ram name="save.rwm" size="0x8000"/>
<map id="io" address="00-3f,80-bf:3000-32ff"/>
<map id="rom" address="00-3f:8000-ffff" mask="0x8000"/>
<map id="rom" address="40-5f:0000-ffff"/>
<map id="ram" address="00-3f,80-bf:6000-7fff" size="0x2000"/>
<map id="ram" address="70-71:0000-ffff"/>
</superfx>
</cartridge>
Or in BML:
cartridge region=NTSC
superfx revision=2
rom name=program.rom size=0x200000
ram name=save.rwm size=0x8000
map id=io address=00-3f,80-bf:3000-32ff
map id=rom address=00-3f:8000-ffff mask=0x8000
map id=rom address=40-5f:0000-ffff
map id=ram address=00-3f,80-bf:6000-7fff size=0x2000
map id=ram address=70-71:0000-ffff
As a result of the changes, old mappings will no longer work. The above
XML example will run Super Mario World 2: Yoshi's Island. Otherwise,
you'll have to write your own.
All that's left now is to work some sort of database mapping system in,
so I can start dumping carts en masse.
The NES changes that FitzRoy asked for are mostly in as well.
Also, part of the reason I haven't released a WIP ... but fuck it, I'm
not going to wait forever to post a new WIP.
I've added a skeleton driver to emulate Campus Challenge '92 and
Powerfest '94. There's no actual emulation, except for the stuff I can
glean from looking at the pictures of the board. It has a DSP-1 (so
SR/DR registers), four ROMs that map in and out, RAM, etc.
I've also added preliminary mapping to upload high scores to a website,
but obviously I need the ROMs first.
2012-10-09 08:25:32 +00:00
|
|
|
if(type == "NES-TBROM" ) return new NES_TxROM(document);
|
|
|
|
if(type == "NES-TEROM" ) return new NES_TxROM(document);
|
|
|
|
if(type == "NES-TFROM" ) return new NES_TxROM(document);
|
|
|
|
if(type == "NES-TGROM" ) return new NES_TxROM(document);
|
|
|
|
if(type == "NES-TKROM" ) return new NES_TxROM(document);
|
|
|
|
if(type == "NES-TKSROM" ) return new NES_TxROM(document);
|
2012-05-26 08:18:42 +00:00
|
|
|
if(type == "NES-TLROM" ) return new NES_TxROM(document);
|
Update to v091r05 release.
[No prior releases were posted to the WIP thread. -Ed.]
byuu says:
Super Famicom mapping system has been reworked as discussed with the
mask= changes. offset becomes base, mode is gone. Also added support for
comma-separated fields in the address fields, to reduce the number of
map lines needed.
<?xml version="1.0" encoding="UTF-8"?>
<cartridge region="NTSC">
<superfx revision="2">
<rom name="program.rom" size="0x200000"/>
<ram name="save.rwm" size="0x8000"/>
<map id="io" address="00-3f,80-bf:3000-32ff"/>
<map id="rom" address="00-3f:8000-ffff" mask="0x8000"/>
<map id="rom" address="40-5f:0000-ffff"/>
<map id="ram" address="00-3f,80-bf:6000-7fff" size="0x2000"/>
<map id="ram" address="70-71:0000-ffff"/>
</superfx>
</cartridge>
Or in BML:
cartridge region=NTSC
superfx revision=2
rom name=program.rom size=0x200000
ram name=save.rwm size=0x8000
map id=io address=00-3f,80-bf:3000-32ff
map id=rom address=00-3f:8000-ffff mask=0x8000
map id=rom address=40-5f:0000-ffff
map id=ram address=00-3f,80-bf:6000-7fff size=0x2000
map id=ram address=70-71:0000-ffff
As a result of the changes, old mappings will no longer work. The above
XML example will run Super Mario World 2: Yoshi's Island. Otherwise,
you'll have to write your own.
All that's left now is to work some sort of database mapping system in,
so I can start dumping carts en masse.
The NES changes that FitzRoy asked for are mostly in as well.
Also, part of the reason I haven't released a WIP ... but fuck it, I'm
not going to wait forever to post a new WIP.
I've added a skeleton driver to emulate Campus Challenge '92 and
Powerfest '94. There's no actual emulation, except for the stuff I can
glean from looking at the pictures of the board. It has a DSP-1 (so
SR/DR registers), four ROMs that map in and out, RAM, etc.
I've also added preliminary mapping to upload high scores to a website,
but obviously I need the ROMs first.
2012-10-09 08:25:32 +00:00
|
|
|
if(type == "NES-TL1ROM" ) return new NES_TxROM(document);
|
|
|
|
if(type == "NES-TL2ROM" ) return new NES_TxROM(document);
|
|
|
|
if(type == "NES-TLSROM" ) return new NES_TxROM(document);
|
|
|
|
if(type == "NES-TNROM" ) return new NES_TxROM(document);
|
|
|
|
if(type == "NES-TQROM" ) return new NES_TxROM(document);
|
|
|
|
if(type == "NES-TR1ROM" ) return new NES_TxROM(document);
|
|
|
|
if(type == "NES-TSROM" ) return new NES_TxROM(document);
|
|
|
|
if(type == "NES-TVROM" ) return new NES_TxROM(document);
|
2011-10-02 10:05:45 +00:00
|
|
|
|
2012-05-26 08:18:42 +00:00
|
|
|
if(type == "NES-UNROM" ) return new NES_UxROM(document);
|
|
|
|
if(type == "NES-UOROM" ) return new NES_UxROM(document);
|
2011-10-02 10:05:45 +00:00
|
|
|
|
2012-05-26 08:18:42 +00:00
|
|
|
if(type == "SUNSOFT-5B" ) return new Sunsoft5B(document);
|
2011-10-05 09:37:00 +00:00
|
|
|
|
2011-09-29 12:44:49 +00:00
|
|
|
return nullptr;
|
2011-09-29 12:08:22 +00:00
|
|
|
}
|