Page 1 of 1
Converting S*ROM board into SUROM
Posted: Sun Nov 18, 2007 6:49 pm
by tokumaru
OK, guys... I'm considering the SUROM idea... It's possible to make new boards with your parts, right bunnyboy? I don't have to use the battery, right?
Now just answer me something about SUROM: It uses the highest CHR address line (since it's not used for CHR) to control the highest PRG address line, right? With that you select which 256KB half of the 512KB chip you see, right? That's not perfect, but could work for my game. One of the 256KB halves could contain mostly graphics, and maybe music.
If I'm gonna use it, I'd like to have a devcart... Is there any other more common MMC1 cart that could be transformed into SUROM, minus the battery? Can anyone list games that use the SUROM board (or boards that could possibly be turned into SUROM)? The "boardtable.txt" file doesn't seem to list any...
From what I've seen, SJROM and SNROM seem close enough to what I want, I'd just have to do the 512KB trick. I thinkI *might* have a SNROM at home. I'll check next time I go there.
Posted: Sun Nov 18, 2007 11:27 pm
by bunnyboy
tepples wrote:I notice that the chip on the
ReproPak MMC1 from RetroZone looks like a CPLD. But how big of a mapper can we fit into a CPLD? What MMC3 features would have to be cut?
The NWC (MMC1 plus some timer stuff) is about the biggest that fits in a cheap 5v CPLD. MMC3 just has too many registers, even without the IRQ counter. Any chip I have found that is big enough is more expensive and needs voltage reg (3.3v or 1.8v).
tokumaru wrote:And bunnyboy, it's not like the MMC3 makes the game more complex. In fact, it's making the code much simpler.
I was trying to say complex game features, stuff that would have to be removed for a more simple mapper. Maybe the game has to run slightly slower or with fewer graphics with the MMC1. Yes the MMC3 would make the code easier, but so would MMC5
tokumaru wrote:But what difference does it make if it's easy to create a 512KB UOROM board if no emulators will support it? how will I code a game like this?
As I found out for the game I am writing, editing mapper source is relatively easy without knowing what the rest of the emulator is doing. Of course getting the new mapper info out there is the harder part. Otherwise its an extra incentive for people to buy the physical game!
tokumaru wrote:OK, guys... I'm considering the SUROM idea... It's possible to make new boards with your parts, right bunnyboy? I don't have to use the battery, right? Now just answer me something about SUROM: It uses the highest CHR address line (since it's not used for CHR) to control the highest PRG address line, right?
The only USA games that used SUROM are Dragon Warrior 3 and Dragon Warrior 4.
Bootgods awesome site is much more complete (and correct) than the boardtable.txt. You should be able to take the SNROM board, reroute the unused CHR A16 to the PRG A18. A18 is likely tied to gnd on the pcb so you can bend that pin up or cut the trace. Battery isn't required so cut it off or just leave it there.
Also make sure in your code to set the CHR A16 of BOTH banks to the correct value, or the PRG could be switched while rendering.
Posted: Mon Nov 19, 2007 11:00 am
by Bregalad
- You said you hate the MMC1, but it's just a slightly enhanced UNROM like mapper if you look it that way. If you managed to avoid bus conflicts on UOROM, I don't see why you couldn't just make 5 switches to writes to the mapper. Just make a routine that does this for you (like you probably already did to avoid bus conflicts on UOROM) so this really is simple. The only difference is that you will have to manage more registers. Yes, 4KB bankswitching is poor (depending on the usage) but it doesn't matter if you use CHRRAM. Just write $0e/$0f (UxROM mode) to the control register and $00 to both CHR bankswitching registers at reset and you're done. In the case of SUROM, you'll want to bankswitch the main 2 sides of the ROM with the first CHR bankswitching register. The NESdev wiki says all there is to say about it.
- It's not hard to make a 512 kB mapper 2 ROM run in any emulator. However, what is hard, is to reproduce it in hardware, you'll need one more '161 and one more '32 in order to make it work. You certainly cannot do this by simply modifying a existing UNROM board.
- While only DW3 and DW4 uses SUROM in the United States (and a couple of more games in japan), any SNROM board can be converted to SUROM by changing ONE wire, wich is less than the number of wires you should change to make a SNROM board accept regular EPROMs. Just tie A18 to CHR A16 (the pin is originally on PRG R/W for some reason, SNROM have 2 pins connected to it). I guess Nintendo could have mande only SUROM boards and used them for all SNROM games as well, but for some reason they did just not do that.
- I don't know if you will be able to sell repros if your game is labelled Sonic, so I don't think you will want to avoid MMC3 just for that. I may be wrong tough.
- If you already made complex routines with CHRRAM, think again before to switch to (usually more limited) CHRROM. That doesn't mean you should avoid this, if you feel like doing this, do it but be sure of what you're doing.
Posted: Mon Nov 19, 2007 12:36 pm
by tepples
Bregalad wrote:- It's not hard to make a 512 kB mapper 2 ROM run in any emulator. However, what is hard, is to reproduce it in hardware, you'll need one more '161 and one more '32 in order to make it work.
Do they still make 74HC373 (8-bit D latch)? Then you'd need only that and two '32s. Or you could wire it up SUROM style with only one '32.
- I don't know if you will be able to sell repros if your game is labelled Sonic
So redraw all the characters not to look like Sega's characters. Follow the example of Vic Tokai, which sold a
Mega Man clone called The Krion Conquest.
Posted: Mon Nov 19, 2007 5:46 pm
by tokumaru
bunnyboy wrote:Of course getting the new mapper info out there is the harder part. Otherwise its an extra incentive for people to buy the physical game!
Hum... I'd rather have it be easy to run... don't ask me why! =)
bunnyboy wrote:The only USA games that used SUROM are Dragon Warrior 3 and Dragon Warrior 4.
Bootgods awesome site is much more complete (and correct) than the boardtable.txt. You should be able to take the SNROM board, reroute the unused CHR A16 to the PRG A18. A18 is likely tied to gnd on the pcb so you can bend that pin up or cut the trace. Battery isn't required so cut it off or just leave it there.
I just found my Hatris cart. I'll do the conversion now and see what happens. I'll probably just leave the battery... Although I don't need it, it's presence does not bother me, and I might break the cart while trying to remove it. When you say "cut it off", what do you mean exactly? What would be the correct procedure for removing the battery?
bunnyboy wrote:Also make sure in your code to set the CHR A16 of BOTH banks to the correct value, or the PRG could be switched while rendering.
I understand the reason for that, but I recently read this from the wiki:
wiki wrote:In 4KB CHR bank mode, the P bits in both CHR bank registers must be set to the same value, or the PRG ROM will be bankswitched as the PPU renders, causing disastrous results. As there is not much of a reason to use 4 KB bankswitching with CHR RAM, it is wise for programs to just set 8 KB bankswitching mode in the Control register.
So I though I was safe by using 8KB CHR bankswitching. Man, I already find the way registers are written a pain in the ass, if I had to do it
twice to switch between the 256KB parts that would really suck.
Bregalad wrote:- You said you hate the MMC1, but it's just a slightly enhanced UNROM like mapper if you look it that way.
What I hate is the way the registers are written to, one bit at a time. Each swap will require at least 30 CPU cycles worth of code. That's just too much when you need a lot of bankswitching. I have however been able to think of a way to cut down on the ammount of bankswitching during the processing of the frame by rearranging some of the data in the ROM and by copying some data to WRAM. I'm not a big fan of the 4KB CHR bankswitching either, but that will not matter as long as I use CHR-RAM.
Bregalad wrote:- While only DW3 and DW4 uses SUROM in the United States (and a couple of more games in japan), any SNROM board can be converted to SUROM by changing ONE wire, wich is less than the number of wires you should change to make a SNROM board accept regular EPROMs. Just tie A18 to CHR A16 (the pin is originally on PRG R/W for some reason, SNROM have 2 pins connected to it).
I'll do this to my Hatris cart. I'm a bit confused about what you said about the pin being connect to PRG R/W. Could you explain it a bit better?
Bregalad wrote:- I don't know if you will be able to sell repros if your game is labelled Sonic, so I don't think you will want to avoid MMC3 just for that. I may be wrong tough.
I know. That's one of the reasons I don't plan on selling it. But I don't want to make it hard to reproduce either. I'm all for breaking loose from the need of Nintendo-made boards... so that should be incentive enough, no?
Bregalad wrote:- If you already made complex routines with CHRRAM, think again before to switch to (usually more limited) CHRROM. That doesn't mean you should avoid this, if you feel like doing this, do it but be sure of what you're doing.
If I use the MMC1 I'll sure stick to CHR-RAM. I have almost made my mind. The final product will be closer to the original design if I do it like this.
Posted: Mon Nov 19, 2007 9:09 pm
by tokumaru
Hey guys, turns out that the pin referent to CHR A16 on the MMC1 is connected to WRAM /CE. Can you tell me if I can just undo this connection and use it for PRG A18? Or is the MMC1 providing this /CE to the WRAM chip? I'm lost with this one, can anyone help me out?
EDIT: I'm finding very weird the fact that this pin is connected to WRAM /CE. Does that mean you can enable or disable the WRAM chip using the bit that would otherwise be CHR A16? I have never heard of this, because the MMC1 has other means of enabling and disabling WRAM, right? And if I do cut this connection and connect the pin to PRG A18, what should I do about the WRAM /CE? Connect it to GND?
EDIT 2: Can a mod split this thread? We've been talking about the MMC1 for a while... so the title could be something like "Converting SNROM board into SUROM". Thanks.
Posted: Tue Nov 20, 2007 8:34 am
by Bregalad
I'm pretty sure you're mistaking and that the WRAM CE pin is connected to WRAM only, not CHRRAM on SNROM. The only difference between SNROM and SUROM is that PRG A18 uses MMC1's CHR A16, and that the pin used for PRG A18 is connected to PRG R/W (or PRG /CE) on the MMC1 (just like the true PRG /CE pin).
A doccument by drk141 already doccuments this. I have no real SUROM board to test details, however it's not hard figuring out how it is.
And also, everything is on the wiki when it comes to adding/removing the battery in a clean way, and there is starts of ROM pinouts, so you should be able to convert SNROM -> SUROM yourself.
Posted: Tue Nov 20, 2007 9:16 am
by tokumaru
Bregalad wrote:I'm pretty sure you're mistaking and that the WRAM CE pin is connected to WRAM only, not CHRRAM on SNROM. The only difference between SNROM and SUROM is that PRG A18 uses MMC1's CHR A16, and that the pin used for PRG A18 is connected to PRG R/W (or PRG /CE) on the MMC1 (just like the true PRG /CE pin).
Seriously, you are confusing me a LOT. Pin 11 of the MMC1 is connected to WRAM /CE,
as shown in this document, I verified it.
A doccument by drk141 already doccuments this.
Now that you mentioned, I noticed he wrote this:
drk421 wrote:SNROM -> SVROM Conversion (mapper 1):
Bend up pins 1, 2, 24, 30, and 31 (or cut tracks 2, 24, 30 and 31)
Solder pin 2 to hole 24 (A16)
Solder pin 24 to GND (OE)
Solder pin 30 to hole 1
Cut track from MMC1 pin 11 to WRAM pin 20
Solder pin 31 to pin 11 of MMC1 chip (A18)
Solder pin 20 of WRAM to Ground (CE (E1) or CHR /A13)
and there is starts of ROM pinouts, so you should be able to convert SNROM -> SUROM yourself.
I had figured most of it out, but this connection between MMC1 pin 11 and WRAM pin 20 got me confused. But drk421 just confirmed what I asked in my last post, saying that i should cut this connection, conect MMC1 pin 11 to the ROM, and connect the WRAM to GND. Although I'm a bit confused about the "(CE (E1) or CHR /A13)" part... what the hell is E1? And what does WRAM have to do with CHR?
And also, everything is on the wiki when it comes to adding/removing the battery in a clean way
I didn't know the battery was optional... Hatris doesn't have one.
Posted: Tue Nov 20, 2007 12:16 pm
by Bregalad
Battery is always optionnal. I haven't seen a single official Nintendo board that doesn't have solder pads to make it work without one (at least not on all scans on Bootgod's site), expet maybe for 3rd party board (such as the one used in Overlord).
I trought the pin 11 of MMC1 was called CHR A16 / WRAM /CE because it is the /CE of the WRAM on SOROM board (because this bit selects between two RAM chips), but maybe this is wrong, because this should be CHR A15 (I have no SOROM board to verify). The WRAM is normally enabled only by CE (pin 6), and the negative chip enable is unused (so I guess it's grounded). Maybe that's not the case on SNROM, tough, I haven't checked. If so setting this bit will disable SRAM, wich is weird. Maybe only older or newer board have this ? Because on SKROM, you just KNOW this bit can only be used to bankswitch the CHRROM, but things may be different on SAROM, SJROM (smaller CHR sizes), and SNROM (CHR RAM). I think the inverted /CE is used to chose the active RAM chip on SOROM.
Posted: Tue Nov 20, 2007 12:40 pm
by tokumaru
Oh well... I'll just ground the /CE of the WRAM chip and see what happens. I'll do this in a few minutes or hours, but today for sure.
Posted: Tue Nov 20, 2007 5:16 pm
by tokumaru
OK, I did the mod and it worked fine. I just connected the /CE of the WRAM chip to GND. I tried it with Dragon Warrior IV, which ran just fine. I took some pics. First, the front of the cart:
The back of it:
The game running:
My box of devcarts is growing! =)
Although the game worked, I don't know if it used the special switching thing up to the point I played. I should probably debug the game in an emulator to verify that.
EDIT: Yeah, the game seems to switch a lot between the 2 256KB ROM banks right from the start. I can now safely say that the cart works.
Posted: Wed Nov 21, 2007 11:17 am
by Bregalad
Wow, you rock. I cannot wait to see your game released.