Hello all. So I'm planning on building myself a MMC5 cart and I'm having trouble finding out the best option as far as the eeprom I should get for it. The rewiring guide I found for the MMC5 boards was likely using a 27c040 or above cause it labeled pin 31 as A18. Whilst looking at some pinouts I discovered some of the smaller memory ones have this pin as PGM.
What I'm wondering is this.... My rom will only have a 32k PRG and an 8K CHR. What is the smallest possible EEPROM I can use for the MMC5 Boards?. For reference I'm currently using the NES-ELROM-01 from the Lazar Invasion carts. (I even populated the missing audio caps and resistors)
I'm assuming a 32-pin EEPROM is required, and I'm also thinking that 27c040 will be my best option but I want to really make sure before I go forward. I also just want to minimise the amount of time I will have to copy my data using 'copy /b' to fill up the rom chip.
Thanks in advance.
Here is my idea :
1. 27C040 is an EPROM and not EEPROM (rewritable)
2. Buy 29F040 (EEPROM) and you will not regret it
I'm confused cause I have a chip on it that says 27c040 on it, and it has a window to the wafer as well. The one you stated with the 'F' instead of 'C' does not have one. I'm guessing it's a flash chip instead of a UV erasable EEPROM. Plus, the pinout is different.
EDIT: I see my mistake. I originally wrote "EEPROM". I guess I just meant "EPROM". Sorry for the confusion.
I have a UV eraser and a EPROM programmer. I don't even know if flash chips are supported on my particular programmer.
I still would like to find out if there is any alternatives to the 27c040, cause it's rather large for my purposes.
Septr wrote:
What is the smallest possible EEPROM I can use for the MMC5 Boards?
1 byte.
You can always use a smaller EPROM. You only have to connect the address lines that exist on the EPROM. If your EPROM doesn't have an A18, then you don't connect A18.
However, you do need to connect all of the EPROM's address lines. If you're using a very large EPROM that has A24, you can't leave that pin unconnected - you must connect it to ground.
Why do you want to use such a small EPROM? Wouldn't it be better to use the largest supported by the MMC5? (If extending your file to fill the whole chip is the only reason you want such a small EPROM, you are asking the wrong questions.)
EEPROMs are simpler to program than UVEPROMs. (They usually can be programmed with just one voltage, and it's often 5V, instead of UVEPROMs often taking both 12-15V and 5.5-6.5V). It seems likely that your programmer will support them, unless you picked up something free and ancient from before the time of EEPROMs.
Perhaps someone likes UV because pulls and NOS are so cheap.
I want to use a small eprom cause my PRG will only be 32K. and my CHR only 8k. I'm using a modified version of vegaplay. I'm unsure if I can even assemble a rom bigger then the default size. If there is a way I would love to hear how I can achieve this. It would give me more room for music. And yes the copy /b process is a bit annoying but also smaller eproms are more readily available to me and cheaper.
So If you are saying I can use something like a 27c256, how do I connect it up? just match the pins that are present and ignore any the chip doesn't provide? I'm going to be making a socketed cart, so I want to get the wiring right on the sockets for the chips I will ultimately be choosing to use.
Septr wrote:
I want to use a small eprom cause my PRG will only be 32K. and my CHR only 8k. I'm using a modified version of vegaplay.
This is
my modified version of Vegaplay?
You'll need to do some things to coax the MMC5 into booting up correctly, that you wouldn't have had to on a plain NROM cartridge. (The MMC5 only "wouldn't" need initialization if you had only 8 KiB of PRG and 1 KiB of CHR, so ...) So you may as well use a larger ROM at that point and take advantage of it... unless the cost difference is really noticeable.
What are you using to write the music in the first place?
Yes, it's that version, except I added this right before the ClearMemory section
Code:
SetMMC5:
lda #$ff
sta $5117
lda #$00
sta $5100 ;set mmc5 to 32k PRG bankswitch mode
And I made the header correct for mapper 05.
Also I use MML/ppMCK to write my nsfs
There is one other modified version of vegaplay that I use a fair bit too by Heavyweight Bit called 'Famislayer'. It's a syncable nsf player.
Well, once you have the MMC5 configured to 32k-at-a-time mode, you could just staple together a series of independent 32k programs into the same ROM. You'll need to include a little stub to take care of switching between them all, but that shouldn't be very difficult. (The stub would be something like STA $5117; JMP ($FFFC), and it would need to be at the same address in each 32K bank)
wow, is it really that little bit of code that allows such a thing? thats cool! How would this stapling of programs work exactly? like combining with 'copy /b' or some other method within the ASM?
Well, I glossed over a lot of other glue code. You probably recognize the write to $5117. The other just tells the NES CPU "pretend you rebooted, but leave the PPU and mapper untouched".
In practice, you'd also have to add an option in the menu to let the user switch between banks.
There's no point in buying small chips, since you can simulate smaller chips with the larger ones. You just have to ground the address lines you'll not be using. For example if you take a 27C040, you can connect A18 to GND and it will function exactly like a 27C020. You don't even have to replicate the data with copy /b, you can simply program the lower 256KB of the chip.
So, if all you want is 32KB, you can connect A15, A16, A17 and A18 to GND. The only problem with this is that it becomes impossible to use the chips for more data if you decide to do so in the future, this wiring will permanently lock you to 32KB. If instead you connect all the address lines properly and use the copy /b trick, you can make use of the full capacity of the chip later on without hardware modifications.
Ok, I think I'm understanding things a bit better now. Lets say I have a 32 pin socket wired up with all the appropriate Pins going to their proper vias, based on
this guide I could put in a dip switch to redirect power to pin 30 on the socket for using dip28 packages, and install them shifted down two pins. Then, for using dip32's I'd just fill it up with redundant code.
tokumaru wrote:
There's no point in buying small chips, since you can simulate smaller chips with the larger ones. You just have to ground the address lines you'll not be using. For example if you take a 27C040, you can connect A18 to GND and it will function exactly like a 27C020. You don't even have to replicate the data with copy /b, you can simply program the lower 256KB of the chip.
So, if all you want is 32KB, you can connect A15, A16, A17 and A18 to GND. The only problem with this is that it becomes impossible to use the chips for more data if you decide to do so in the future, this wiring will permanently lock you to 32KB. If instead you connect all the address lines properly and use the copy /b trick, you can make use of the full capacity of the chip later on without hardware modifications.
I am not agree with your red line
When I wanted to program 27C322 (A0~A20) for Rockman 6 in 1 project, I had to program it two times in 27C080 mode :
First time --> A20 --> GND --> programming the first 1024KB
Second time --> A20 --> 5V --> programming the second 1024KB
So if you want to get it back to the original state you can always disconnect them from GND (or 5v) and use it normally
I think the implication was
as long as you have the socket wired this way, it will only allow 32k
Cause some dev carts that require rewiring like this aren't exactly very fun to keep opening up and rewiring every time a new size of memory is desired. I'm using ribbon cable to move the socket locations so it'll be a bit easer for me to just desolder and swap a wire or two later down the line. but I think a dip switch will be a good idea in my case.
Ok got one more question. You say to ground the higher numbered A pins for using it as a smaller eprom. what if I use a 28 pin eprom like a 27c256, are those floating pins on my socket going to be an obstacle, or will the mapper even care that they are floating? I think you mean that when grounding thos pins I would be lifting the eprom pins away from the socket and grounding them leaving the vias on the circuit board floating, but then I have started second guessing myself and maybe you mean ground the pin on the actual board. Just need to be sure before I got on soldering the rest of my board up.
Whenever you want to make the EPROM smaller you must bend the high address lines and tie them to either GND or 5V
For example :
27C080 is 1024KB EPROM :
A19 --> GND (0) --> you can use its first half (512KB)
A19 --> 5V (1) --> you can use its second half (512KB)
A19 A18
0 0 --> 256KB
0 1 --> 256KB
1 0 --> 256KB
1 1 --> 256KB
A19 A18 A17
0 0 0 --> 128KB
0 0 1 --> 128KB
0 1 0 --> 128KB
0 1 1 --> 128KB
1 0 0 --> 128KB
1 0 1 --> 128KB
1 1 0 --> 128KB
1 1 1 --> 128KB
and so on ...
1 is 5V and 0 is GND
Septr wrote:
what if I use a 28 pin eprom like a 27c256, are those floating pins on my socket going to be an obstacle, or will the mapper even care that they are floating? I think you mean that when grounding thos pins I would be lifting the eprom pins away from the socket and grounding them leaving the vias on the circuit board floating
When putting a square peg into a round hole:
* Leave outputs floating (such as the higher address lines out of the MMC5)
* Tie inputs to ground or Vcc (unused high address lines going into the ROM)
Failure to do the former will damage the MMC5; failure to do the latter will result in erratic computation (and software crashes).
Thanks for trying to help, but I don't quite understand. What is needed to be done to pins 1,2,3, 30, 31 and 32 on my socket if I want to use a 28pin eprom or even just a larger one with grounded A pins? Are those the inputs and output you speak of? Do I ground the A pin and leave the socket floating or ground the socket location?
I looked up the mmc5 pinout but all the labels are named stuff like CHR A12, PPU A1, and so on. How do I know what is input and what is output in regards to your instruction?
EDIT: Ok, I think something just clicked. Tell me if this is right....
The outputs you speak of that I'm sposed to leave floating are my socket pins, and the inputs you mentioned are the pins on the rom chip itself that need to be tied to either high or low depending on the desired half of the memory I want to access.
You only need to think about this:
The address lines are just a binary representation of a numeric address in the memory range.
Therefore while people are bombarding you with a lot of useful suggestions, in fact all you have to do is decide what you want to do with your memory chip.
Do you want to partition it ? Do you want to use just the beginning of it ? Want to use just the end of it ?
So, all the address lines you don't use must be connected to either +5v ( logic 1) or to GND (logic 0). lindariq just mentioned you should not leave them disconnected (floating) as they can receive static electricity and detect it as if it was a state change, crashing your program as the ROM will change what is being served to the CPU without the CPU requesting the said change.
Hope this is of help.