Converting MHROM CHR 32k to 64k?

This is an archive of a topic from NESdev BBS, taken in mid-October 2019 before a server upgrade.
View original topic
Converting MHROM CHR 32k to 64k?
by on (#141238)
I have a couple of SMBs/DH MHROMS with chips and im looking to mod the CHR for 64k. Im trying to figure out where to wire the CHR A15 to the 74C161. Im trying to look at the pinout and it looks something like this:

MHROM '161:
1 5v
2 prg /ce (r)
3 prg d0
4 prg d1
5 prg d4
6 5v
7 gnd
8 gnd
9 prg r/w (n)
10 gnd
11 nc?
12 prg a15
13 chr a14
14 chr a13
15 nc?
16 5v

Im thinking pin 11 but not sure. Anyone have any info on this?
Re: Converting MHROM CHR 32k to 64k?
by on (#141241)
guitarzombie wrote:
6 5v

Assuming there really is a 74161 under the glop, pin 6 has to be connected to a PRG data pin (PRG D5 for GNROM) in order to get anything useful from pin 11.

Edit: Oh, they made non-gloptop MHROM boards? First time I've heard of that.
Re: Converting MHROM CHR 32k to 64k?
by on (#141246)
yup! So this is what you're saying:

PRG Pin 17 to 161 pin 6
CHR Pin 1 to 161 pin 11
Re: Converting MHROM CHR 32k to 64k?
by on (#141250)
guitarzombie wrote:
PRG Pin 17 to 161 pin 6
CHR Pin 1 to 161 pin 11

Make sure you also disconnect '161 pin 6 from +5v. Leaving it connected could damage the chips.

Which PRG data line you connect to '161 pin 6 determines which bit of the register controls CHR A15. Using D5 (PRG pin 17) gets you CHR bank selection that works like this:
Code:
7  bit  0
---- ----
xxCP xxCC
  |    ||
  +----++- Select 8 KB CHR ROM bank for PPU $0000-$1FFF

You could use D3 instead (PRG pin 15) to make CHR bank selection work like this:
Code:
7  bit  0
---- ----
xxxP xCCC
      |||
      +++- Select 8 KB CHR ROM bank for PPU $0000-$1FFF

That's basically a nybble-swapped Color Dreams mapper.
Re: Converting MHROM CHR 32k to 64k?
by on (#141256)
Of course. I learned something. Cool!
Re: Converting MHROM CHR 32k to 64k?
by on (#141653)
So I gave this a shot. I bent pins 6 and 11 on the 161, attached chr pin 1 to 161 pin 11 and pin 6 to prg pin 17 and garbled graphics, when I hit start it freezes, same with when I connected it to pin 15.

I had better luck connecting it to D1 (no garble graphics on that title screen) but just wouldn't run.


Also having problems using a CNROM 256-LS161 variant. Ive used this format for the CNROM-07 variant:

161: Bend pin 5
CHR: Bend pin 1

PRG:
Pin 14 (GND) to 161 pin 12
CHR:
Pin 1 (A15) to 161 pin 5.

When I tried that on the CNROM 256-LS161 variant it was all garbledy...
Re: Converting MHROM CHR 32k to 64k?
by on (#141655)
What exactly are you trying to do? It's hard to provide anything more than general rules of thumb without a better idea.

(For example: "All garbledy" probably means "wrong CHR bank or bad data in CHR")
Re: Converting MHROM CHR 32k to 64k?
by on (#141656)
Trying to make it work? I mean it says in the title, im trying to get my MHROM to accept a 64k chip instead of its socket-ed 32k slot.

Joe was kind enough to give a suggestion but both of his suggestions didnt work. The only thing I did different was lift pin 11 of the 161. Im pretty sure its not connected to anything so lifting it didnt seem like a big deal.

Garbled graphics for this mean a bad CHR bank, im not getting the 161 to bank switch it correctly and cant figure out how.

With the CNROM 256-LS161 I dont know the pinout off hand as it might be different from whats in the 161 document. I know the MHROM pinout is.
Re: Converting MHROM CHR 32k to 64k?
by on (#141657)
Where did you get the 64 KiB of data to put into the prom?
Re: Converting MHROM CHR 32k to 64k?
by on (#141659)
I dunno how that makes a difference? I was making some of the panesian games
Re: Converting MHROM CHR 32k to 64k?
by on (#141660)
Maybe I should try reading.

guitarzombie wrote:
pin 6 to prg pin 17 and garbled graphics, when I hit start it freezes, same with when I connected it to pin 15.

You want pin 13. (CPU D2)
Re: Converting MHROM CHR 32k to 64k?
by on (#141662)
Thanks ill try that right now. Is there any short hand I need to know in order to understand this better?

Like I said im having the same kinda problem with the CNROM-256 LS161 boards. I can get them working on the CNROM-07 boards with that above pinout I had but if this 161 board is different, if you tell me what I need to do I can figure it out with its pinout thanks!
Re: Converting MHROM CHR 32k to 64k?
by on (#141664)
Well the screen started up no problem, hit start and it froze in a black screen, no graphics.
Re: Converting MHROM CHR 32k to 64k?
by on (#141666)
Nintendo used the 74'161 in approximately the same way in all their boards: as a 4-bit register with an enable.

(See our pinout on the wiki)
In other words, they always connected pins 7 and 10 to ground, 9 to R/W, 1 to Vcc, and 2 to /ROMSEL.

The four inputs to this latch (pins 3-6) are called D0-D3 (or sometimes Da-Dd) and the four outputs (pins 14-11) are called Q0-Q3 (or Qa-Qd)

Despite the input names, Nintendo didn't necessarily connect CPU D0 through CPU D3 to 74161 D0 through 74161 D3. In fact, they almost never did:
GNROM and CNROM connected CPU D0, D1, D4, D5 in order.
AxROM connected CPU D0, D1, D2, and D4, in order.
BNROM looks like it only connected D0 and D1.

As to what the pins did varied by what the manufacturer wanted.
CNROM and GNROM connect Q0 and Q1 to CHR A13 and A14.
CNROM connects Q2 and Q3 to diodes to make a really pathetic form of copy protection.
GNROM connects Q2 and Q3 to PRG A15 and A16. (MHROM doesn't bother with Q3, hence why pin 11 was floating)
AxROM connects Q0-Q2 to PRG A15-A17, and Q3 to CIRAM A10.
Tengen 800008/Sachen Mahjong World connects Q0-Q2 to CHR A13-A15, and Q3 to PRG A15.

As to what pin goes to what is entirely arbitrary. It doesn't need to be in order; only the input and output sides need to match.
Re: Converting MHROM CHR 32k to 64k?
by on (#141667)
Then how is it this wiring diargram

PRG:
Pin 14 (GND) to 161 pin 12
CHR:
Pin 1 (A15) to 161 pin 5.

Works for CNROM-07s to make the CHR 64k when you're grounding the output pin of the 161 and a15 goes to the input? I know this cuz its worked for me.


EDIT! SUCCESS! (Kinda)

I took what you said and looked up the 161 and it made sense, so I did a check on the wiring diagram for the CNROM 256-161 and it seemed like D0 went to A13 and D1 when to A14, so using the 161 I connected D2 to A15 and boom! (I just had to set the mirroring). Great! Now ill get a better understanding of the MHROM.
Re: Converting MHROM CHR 32k to 64k?
by on (#141668)
You've got to be miscounting pins.
Re: Converting MHROM CHR 32k to 64k?
by on (#141672)
Im def not.

Anyway I tried another one with a CNROM 256-161 board, same diagram and got glitchy graphics again, even tho the mirroring is right too... hrm.
Re: Converting MHROM CHR 32k to 64k?
by on (#141674)
I tried switching the mirroring, and using D3, D4 and D5 and it was worse. So its def D2 and the graphics are all a mess. Im thinking the chip I got was over erased. Gonna chuck it and try again. I hate when i waste all that time for nothing.

And I gotta figure out how my Super Mario Unlimited is working but with NO sound at all (?!) AND i gotta figure out the MHROM 161 altho i have a feelling it just might not work at all, or i have to disconnect some stuff... at least i got a better understanding now.
Re: Converting MHROM CHR 32k to 64k?
by on (#141687)
Ok I got it. For the CNROM-161 board, I was right the CHR chip was bad straight from the package. Swapped it, and worked. Now for the MHROM board I couldn't figure out why so I checked the pinout of the 161 I did. I saw that it controls PRGs A15 even tho i wasn't using it. I lifted pin 1 of the prg and poof worked (after I set the mirroring)

Interesting that these games when the mirroring is wrong you get a LOT of glitchy graphics not like, lets say SMB where the game works with fine the graphics but 'loads' them to the screen wrong. So all this time I was thinking those bad graphics were from a bad chip or soldering or whatever.

Anyway I learned something and isn't that the most important? :) Thanks for the help.
Re: Converting MHROM CHR 32k to 64k?
by on (#172549)
guitarzombie wrote:
Then how is it this wiring diargram

PRG:
Pin 14 (GND) to 161 pin 12
CHR:
Pin 1 (A15) to 161 pin 5.

Works for CNROM-07s to make the CHR 64k when you're grounding the output pin of the 161 and a15 goes to the input? I know this cuz its worked for me.


EDIT! SUCCESS! (Kinda)

I took what you said and looked up the 161 and it made sense, so I did a check on the wiring diagram for the CNROM 256-161 and it seemed like D0 went to A13 and D1 when to A14, so using the 161 I connected D2 to A15 and boom! (I just had to set the mirroring). Great! Now ill get a better understanding of the MHROM.


I know the last post was over a year ago, but can you upload a wiring diagram of your work? I'm trying to build a Panesian game and i only got grafic garbage.
Re: Converting MHROM CHR 32k to 64k?
by on (#172571)
Panesian -> CNROM Conversion (mapper 3):
Bend up pin 5 and 12 of 74HC161
Connect pin 5 to D2 of PRG ROM
Connect pin 12 to A15 of CHR ROM