Complex mappers rebuilt with common chips

This is an archive of a topic from NESdev BBS, taken in mid-October 2019 before a server upgrade.
View original topic
Complex mappers rebuilt with common chips
by on (#78599)
In this post, SkinnyV posted a link with pictures of a pirate cart he owns, which implements the VRC4, a fairly complex mapper (it bankswitches CHR in 1KB chunks and has a pretty complex IRQ system), using a few (well, a lot of) discrete logic chips.

Do any of you hardware guys have any idea how this "clone" works? I looked for info about the chips used and I can't possibly understand how this board is able to even keep track of which banks are active!

Also, do you have any other examples of similar pirate boards? I'm interested in understanding how can such complex features be implemented with just a handful of chips...

by on (#78601)
I see no evidence that it implements the VRC4 mapper, it's a pirate cart of an FDS port, so it could be any mapper here. I'd guess something similar to mapper #42 with no other information.

by on (#78602)
After some research and cached link from old forum discussion, I think it might be Mapper 42.

Edit: After some more search, was able to track down a kevtris page about it, the original link was down but took me a few min to locate the new page at his new domain.

http://kevtris.org/mappers/single_pirates/BTL_BioMiracleA.html

by on (#78607)
They could have used far fewer chips if they knew the DMC IRQ tricks.

by on (#78611)
I have this one :

Punch-Out :

Image

bootgod :
http://bootgod.dyndns.org:7777/profile.php?id=3750

by on (#78614)
I'd say it's possible (and in fact highly probable) that the mappers were simplified and the ROMs were hacked so it was possible to work with less chips (as opposed to making an exact clone of the original mapper with 74xxx logic chips).

by on (#78632)
Based off what the mapper page explains my guess is it's just using a counter off the M2 to provide the IRQ. And then a bunch of logic to bank switch. If I got my hands on one I could reverse engineer the whole thing, but the circuitry sounds fairly simple for what their doing.

chips:
2x 4bit ctr
quad 2-1 mux
dual 2-4 decoder
counter?
dual D FF
2x quad NAND
quad OR

by on (#78634)
Here's a text file explainning the mapper:

http://kevtris.org/files/MarioBaby.txt

by on (#78636)
At one point someone posted about a pirate cartridge of FME7 made using a ton of discrete logic chips. It can be done. Just not necessarily efficient.

by on (#78637)
That's why it's more efficient to make a different mapper but with similar features that uses less 74xxx chips, and hack the original ROM.

You don't want to make a cartridge that is 1m tall especially if you are a cheap-ass pirate. (Also for carts in NES format the length is limited by the front loader's dimensions if you expect the user to push the cartridge down)

by on (#78639)
Or you just go with a CPLD instead of a boat load of discrete chips...

by on (#78647)
Nevertheless, I find fascinating to look at old pirate PCB and see what they came up with as solution to the different mapper problems! I almost want to desolder all the chip from that pirate cart and trace the PCB for fun. It sure would make for a cheap bio miracle bokutte upa repro.

by on (#78657)
Yeah, only $20 of parts...

Got a multimeter? Just trace the thing using the continuity tester.

Most mappers don't fit into 74 series chips well, and that's by design.

by on (#78677)
kyuusaku wrote:
Yeah, only $20 of parts...

Got a multimeter? Just trace the thing using the continuity tester.

Most mappers don't fit into 74 series chips well, and that's by design.
That's not quite true. After this thread started I started thinking about what parts of a mapper could have been implemented via a small number of 74 series parts. For example:
  • 74x670 (dual-ported 4x4b SRAM) and 74x32 (for glue) would provide 2kB chrrom banking or 8kB prgrom banking.
  • 74f219 (16x4b SRAM) could provide 512B or 1kB chrrom banking configured via writes via the PPU's address space. (but no one sells it any more)
  • a 74x161 and something like the 74x151 provides arbitrary nametable mirroring control
  • The 82c54 PIT would provide a enormously configurable interrupt source allowing interrupts anywhere from 1 to 65536 M2 cycles, PPU fetches, and a third unused channel that could be used for something else (increasing one of the counters to 2^32 or adding a sound channel)

by on (#78683)
lidnariq wrote:
74x670 (dual-ported 4x4b SRAM)

I thought about using a 670 too. Too bad that's out of production too. Or is it back in production?

by on (#78688)
Clarification: US$20 including ROMs, PCB in addition to the logic.

Clarification #2: it's really easy to design a NEW mapper from 74 series, but it's hard to fit existing mappers. I know, I've spent many many hours trying, and in the end I always add a 16L8 to save 3-5 chips.

Today it's almost entirely pointless* to go 74 series when small CPLD (~32 registers) can be had for <$1.50 which is enough to fit a MMC1/2/4 or a bootleg FDS hack.


*a transparent design may be an advantage depending on purpose of the board

by on (#78690)
I don't really care about implementing the exact same mappers, I'd be happy with new mappers that are just as capable. The features I miss the most are fine CHR bankswitching and IRQs (no matter what kind).

by on (#78692)
If you really want to build a discrete mapper with those features, I'd suggest either a Phi2 counter (4x '191, '74) or a sprite based IRQ ('134 -- 12 input NAND gate), and 5-6x '670 as the obvious choice for the register files. For decoding a couple '139 should do.

You're looking at US$10 minimum just for the '191 and '670s. $10 can *easily* buy a capable CPLD which will:
-save you money
-save you board space
-save you pins to solder
-allow you to fix design errors
-allow you to try new ideas
-allow you to use existing mapper designs if you wish

by on (#78696)
kyuusaku wrote:
$10 can *easily* buy a capable CPLD

What about the rest of the stuff I need in order to work with a CPLD? I don't suppose I could program them with my EPROM programmer? What about software? Not to mention knowledge of the language used to program them, which I have none...

I'm not exactly against CPLDs, it's just that the discrete chips are much more tangible for me.

by on (#78700)
If you have a $100+ programmer it may have JTAG functionality (with some additional cable), otherwise not likely.

A JTAG cable is all you need, and if your PC has a parallel port you can build a cable easily enough--the only active part in Xilinx and Altera cables is a buffer chip. Or you can buy one for ~$15. Or you can buy a USB JTAG clone for ~$30.

The major CPLD vendors all have free versions of their design software and AFAIK they also all have schematic capture which is analogous to designing with chips.

by on (#78703)
kyuusaku wrote:
If you have a $100+ programmer it may have JTAG functionality (with some additional cable), otherwise not likely.

My programmer cost me the equivalent to US$300, but with all the taxes and shit it's hard to tell what it's actually worth.

Quote:
A JTAG cable is all you need, and if your PC has a parallel port you can build a cable easily enough

Heh, the lack of a working parallel port was the reason I bought my new USB EPROM programmer... =)

I think the only way I would consider getting into CPLD's was if I didn't have to spend any major $$$. I'll check what my programmer can do and what the hell JTAG is.

EDIT: My programmer is a Wellon VP-280. Looks like it doesn't support any CPLDs. Bummer.

by on (#78704)
I recently posted up my new project the "all-in-one" dev cart. I was originally planning to just make my own version of something similar to the powerpak mostly just for the experience of making the cart.

My idea contains a CPLD, micro controller and SD card slot. I'm seriously considering moving the focus of my project towards the issues you guys are having here. If it was done properly you'd be able to design up your mapper with Xlinix/Altera's IDE which wouldn't be impossible to learn how to do if you already knew your way around programming. they even have gui so you could litterally "draw" up your mapper with gates and registers if you knew your way around digital design but not a hardware language.

Then you could just put your file on a SD card and slap it in the cart and have the microcontroller program the CPLD via JTAG. And bam! Done deal you have your own easily modified and customizable mapper.

The only real limitation it would have is that the capabilities of the CPLD. Especially for those looking for MMC5 capabilities. But there are lots of other problems revolving around the MMC5 issue. First off we don't know as much about it as we'd like making it difficult to reverse engineer and code up ourselves. But with it being opensource we might be able to team up and redo the MMC5 and upgrade the board to an FGPA.

The only real issue I would see is that upgrading the firmware on the microcontroller might not be as simple. There would have to be access to program it and a programmer available to do the job if you really needed the update.

It seems like this would be the best solution to what appears to be a fairly large problem. Would you guys agree?

by on (#78705)
If somebody is doing something above MMC5, I don't think a $20 chip will even cut it, will it? It'd be something of the PowerPak magnitude with a FPGA on board. I don't think we should let the idea of what could be made make us lose sight on what is probably going to be made. A MMC5 or equivelant cart would cost so much money. You're talking about a $60 cart to make, right? That's not even with profit added in. I don't think its worth thinking that far ahead unless your going to get chips made on a board. I mean, Retro City Rampage even was a NES game at first and was dropped because they wouldn't be able to make the mapper. If bunny wouldn't do a game as great as the RCR demo on MMC5, I don't think anyone should waste their time on it here either. Donor boards would work, but sadly even they aren't very cheap, either. But in the end, donors may be the cheapest option. At least you get a free shell and PCB. No CHR-RAM though, and that SUCKS.

by on (#78706)
Why does everyone have to bring the MMC5 up everytime we discuss mappers?

by on (#78707)
Because it's the best. Although I think MMC3 with a couple extras would be amazing, too. MMC6.8, anyone?

by on (#78708)
What I was thinking about doing up wouldn't incorporate an MMC5 at least to start off anyways. I really just wanted to point out what would need to happen in the future if MMC5 was to be added.

My thought was more to provide something that would allow someone to easily accomplish some of the things discussed in the post. A way to add and play around with mapper features while developing a game.

I'm kinda ignoring the $20 thing with my idea. It would have to be closer the the $60 like you were suggesting 3gengames.

However if someone developed a game with it that made use of the tool, it would be fairly easy and cheap to move the mapper over to a CPLD alone and slap it on a board like the retrozone MMC1. And the cost of the mapper could easily be under $10.

But yes MMC5 would be a whole different ball game.
Quote:
Although I think MMC3 with a couple extras would be amazing, too.
This would be the type of thing that I would be looking to incorporate.

I'm not a game developer though nor do I really plan to be. But it in the short time I've been following the forum I keep seeing the issue arise and people asking me about how to do something like this.

by on (#78710)
Well, here's a crazy idea.....cut and paste NES mapper. Do what they did with Frogger 2600 carts and make another connector to program the logic chip. You get the board, and then you select a list of mapper features and it will output the registers, what the bits do, and then program the chip on the board for those settings, and you go on your merry way. You could have 2 board, the $8 CPLD board. and then the powerful MMC5ish FPGA board to also program with whatever you want with more power if needed. I think everyone would be happy then. If it wasn't so hard deciding on what to add to mapper, there'd be lots of flexibility. But when you just add what you need when you need it, then you don't have to worry about not being able to have the "perfect" mapper for your needs.

by on (#78712)
3gengames wrote:
Well, here's a crazy idea.....cut and paste NES mapper. Do what they did with Frogger 2600 carts and make another connector to program the logic chip. You get the board, and then you select a list of mapper features and it will output the registers, what the bits do, and then program the chip on the board for those settings, and you go on your merry way.


I don't think I follow...

Are you saying just put the CPLD or FPGA alone on the cart and then just provide a connector to allow for programming the logic?

If so it seems more complicated and less appealing dealing with your own or a recommended programmer. Not to mention this would be even more complicated and expensive if you were using an FPGA.

If I'm understanding what you're saying my setup would be truer to the idea of "COPY-PASTE" via the SD card.

by on (#78715)
Well sure, do it like that. But at the same time....isn't this idea a powerpak? :wink: I'm sure if we all look into writing in Verilog, the powerpak is the only think that'd be needed.

by on (#78717)
Perhaps you're right. The powerpak doesn't seem to be setup to easily do something like this but if someone figured out how and gave a tutorial that may be the best option.

Maybe I should be asking somewhere else but why isn't the retropak compatible with clones and portable systems?

by on (#78719)
More than likely, I think it's just a RAM cart. And the powerpak mappers can be made. It'd be nice to have one "unused" mapper for this purpose. User-defined for development so that then you could put your own mapper file on the powerpak and it would load it up and play it fine.

by on (#78720)
infiniteneslives wrote:
Maybe I should be asking somewhere else but why isn't the retropak compatible with clones and portable systems?

I think the ReproPaks (you do mean "repro" instead of "retro", right?) work just fine, it's just the PowerPak that has issues with most clones.

3gengames wrote:
It'd be nice to have one "unused" mapper for this purpose. User-defined for development so that then you could put your own mapper file on the powerpak and it would load it up and play it fine.

AFAIK, you can use any mapper number you want, even used ones, as long as you give the PowerPak a corresponding mapper file. The PowerPak has no idea that the file "MAP04.MAP" is for the MMC3, so if you overwrite it with your own mapper and load your ROM set to mapper 4 it will play just fine. I think it works like this, please correct me if I'm wrong.

by on (#78721)
tokumaru wrote:
infiniteneslives wrote:
Maybe I should be asking somewhere else but why isn't the retropak compatible with clones and portable systems?

I think the ReproPaks (you do mean "repro" instead of "retro", right?) work just fine, it's just the PowerPak that has issues with most clones.


Yeah I meant the PowerPak. I apologize for my inattentiveness. What about the powerpak makes it incompatible with clones? It looks like the question has been brought up before but never explained why.

by on (#78722)
Clones may:

-have poor signal routing to the cart connector such as tying VRAM /CE to /CA13 on the PCB which will break "four-screen" games

-have differences in the PPU fetch logic or timing which would break some MMC5 features (Castlevania III would still work however)

-not have the same reset characteristics (Phi2 = Hi-Z) which IIRC is used for bootstrapping and resetting back to the menu

by on (#78731)
My Yobo clone (which I apparently can't stop talking about on these boards :D ) has some major issues with CV III, and I think it has something to do with the PPU timing. The screen will black out during the title, show correctly during the name selection screen, then black again during normal play. I think the PPU timing is just not accurate enough to support some of the PPU modes the MMC5 supports.

by on (#78743)
I don't get it. All this talk about new boards for complex mappers but nobody attempts to contact the guy who already has them? Is it the profit problem again? Or that he posts on that other Nintendo site more now?

by on (#78744)
ibeenew2 wrote:
I don't get it. All this talk about new boards for complex mappers but nobody attempts to contact the guy who already has them? Is it the profit problem again? Or that he posts on that other Nintendo site more now?


The what? I don't quite follow.

If you are referring to the fine products offered by RetroZone (here and here) I for one already have the MMC1 board. Now if I can get an EEPROM programmer that works :D

Or if you are talking about the Squweedo boards that Memblers made, those look awesome for music stuff but a lot of overkill for general game use.

Or the Munchousen cart, which from what I can tell is a dead project.

What we are discussing in this thread (and several others) is mapper capability above and beyond what is currently offered by any of those products / projects.

Not that I am terribly concerned with it all, I just want a cart that I can plug into USB to load my ROMs on that supports MMC1 (or MMC3, or UNROM, or FME7, or whatever).

by on (#78745)
qbradq wrote:
My Yobo clone (which I apparently can't stop talking about on these boards :D ) has some major issues with CV III, and I think it has something to do with the PPU timing. The screen will black out during the title, show correctly during the name selection screen, then black again during normal play. I think the PPU timing is just not accurate enough to support some of the PPU modes the MMC5 supports.
Castlevania III doesn't use any of MMC5's fancy features. If it has problems then the MMC5 could be decoding with /CA13 and multiplex VRAM A10 with CHR A10 to save a pin.

ibeenew2 wrote:
I don't get it. All this talk about new boards for complex mappers but nobody attempts to contact the guy who already has them? Is it the profit problem again? Or that he posts on that other Nintendo site more now?
Bunnyboy? I guess this thread is about making your own, not using his. The major difficulty in this project is getting boards made, not the mapper designs if that's what you mean.

by on (#78747)
I had issues with my NOAC and Castlevania 3. It worked well but had wrong tiles everywhere (CIRAM /A13 issue?)

by on (#78749)
But he already has boards made. Look at the site selling carts with new boards like Splatterhouse, Dragon Scroll, SMB2j, Buzz and Waldog. Think those are MMC1? The Splatterhouse mapper has IRQ and fine CHR banking so I would bet cash that board can do MMC3/FME7/VRC2/VRC4/whatever.

by on (#78750)
None of those boards are offered as an unpopulated PCB, which is a problem if you want a cartridge release. And if you don't want to do a cartridge release then all of this is moot anyway.

by on (#78751)
You could always do your cartridge release through RetroZone, where (I've heard) bunnyboy as producer takes 50% of what's left after replication cost is deducted. It worked for Sivak.

by on (#78752)
That was my question. Has anyone even bothered to ask him about the boards? Just because they aren't "offered" on the site right now doesn't mean he won't sell them. Maybe they aren't on the site because nobody ever contacted him with interest.

by on (#78759)
So the powerpak is compatible with clones with the exception of MMC5 then? All I really know is it's advertised that it does NOT work on clones, sounding like it doesn't work at all.

by on (#78762)
Clones won't work with it. But that doesn't matter to me, the mapper you put onto a CPLD would...errr, should.

by on (#78764)
Yeah my concern would be why it doesn't work. If it's something to do with how the roms are programmed through the CPU, I would have to figure out how to program the roms and avoid this problem.

One option would be to have the micro controller or an off board programmer handle the programming of the roms.

But I'm just guessing here. My board would be electrically equivalent to the original cart so a clone wouldn't care. But it would seem that the powerpak is too. So this is why I'm guessing that the issue is in the programming of the roms or an issue in the boot menu.

All I really know is there is something that needs to be done differently because the powerpak isn't capable and I'd like to be.

by on (#78765)
It doesn't start at all IIRC. So no worries about the ROM's not uploading incorrectly, although that still may happen. I don't think we know? Some clones also play it IIRC, but I think it's the retron 3. Also, I have heard most retron 3's or whatever don't play it. It varies on model. But still, clones aren't worth anything. Especially worrying about development on.

by on (#78768)
kyuusaku wrote:
Clones may:

-have poor signal routing to the cart connector such as tying VRAM /CE to /CA13 on the PCB which will break "four-screen" games

-have differences in the PPU fetch logic or timing which would break some MMC5 features (Castlevania III would still work however)

-not have the same reset characteristics (Phi2 = Hi-Z) which IIRC is used for bootstrapping and resetting back to the menu

by on (#78769)
Would Castlevania III really still work? Try playing it on the second quest, see if the new enemies (which did not exist in the Japanese version) work correctly.

by on (#78776)
kyuusaku wrote:
kyuusaku wrote:
Clones may:

-not have the same reset characteristics (Phi2 = Hi-Z) which IIRC is used for bootstrapping and resetting back to the menu


I can't find anything anywhere that tells me what IIRC and PHI2 are. Can you direct me to a resource on the matter or fill me in?

by on (#78777)
IIRC and PHI2:

http://www.6502.org/users/andre/icaphw/rdy.html See the signals section.

http://www.urbandictionary.com/define.php?term=iirc

by on (#78783)
Phi2 is pretty well known as M2 in these parts. Where M2 comes from I'm not sure since Phi2 is used in both 6502 and Nintendo's documentation. Basically it's the system clock and it coincides with external bus activity.

On a hard reset or long soft reset the PowerPak enters a boot state from which the FPGA is initially configured for loading the menu located on the CF. If the clone has different electrical characteristics it's my guess that this won't happen.

by on (#78784)
kyuusaku wrote:
Phi2 is pretty well known as M2 in these parts. Where M2 comes from I'm not sure since Phi2 is used in both 6502 and Nintendo's documentation. Basically it's the system clock and it coincides with external bus activity.

On a hard reset or long soft reset the PowerPak enters a boot state from which the FPGA is initially configured for loading the menu located on the CF. If the clone has different electrical characteristics it's my guess that this won't happen.


Thanks for the clarification. That makes a lot of sense.

Quote:
http://www.urbandictionary.com/define.php?term=iirc


I can never keep up with all these damn acronyms these days, it's almost as bad as the military...