Oversize BNROM Board (Solved)

A place that you can discuss reproduction of classic titles or "licensed-for-reproduction" homebrew for personal use.

Moderators: B00daW, Moderators

Forum rules
1. NO BLATANT PIRACY. This includes reproducing homebrew less than 10 years old, with the exception of free software.
2. No advertising your reproductions, with the exception of free software.
3. Be nice. See RFC 1855 if you aren't sure what this means.
Post Reply
Ice Man
Posts: 547
Joined: Fri Jul 04, 2014 2:34 pm

Oversize BNROM Board (Solved)

Post by Ice Man »

Hi,
I'm trying to make 512KB BNROM board using Mashou as a donor.

The cart have 74'161 IC and I was wondering how I can rewire it to support 512KB since the last 2 upper bank bits are not connected. I was able to get at least 256KB supported but then I got stuck.
Here's the wiring diagram for 256KB:

Code: Select all

              .--\/--.
        +5V -o|01  16|-- +5V
    PRG /CE --|02  15|-- NC
     PRG D0 --|03  14|-- PRG A15
     PRG D1 --|04  13|-- PRG A16
     PRG D2 --|05  12|-- PRG A17
     PRG D3 --|06  11|-- PRG /OE
	     GND --|07  10|-- GND
        GND --|08  09|o- PRG R/W
              `------'

Any help to make this 512KB appreciated.
Last edited by Ice Man on Sun May 08, 2016 7:48 am, edited 1 time in total.
User avatar
rainwarrior
Posts: 8732
Joined: Sun Jan 22, 2012 12:03 pm
Location: Canada
Contact:

Re: Oversize BNROM Board

Post by rainwarrior »

Why are you controlling PRG /OE with the latch?
Ice Man
Posts: 547
Joined: Fri Jul 04, 2014 2:34 pm

Re: Oversize BNROM Board

Post by Ice Man »

The original pinout did this as well.

Taken from IREM-BNROM:

Code: Select all

              .--\/--.
        +5V -o|01  16|-- +5V
    PRG /CE --|02  15|-- NC
     PRG D0 --|03  14|-- PRG A15
     PRG D1 --|04  13|-- PRG /OE
        GND --|05  12|-- NC
        GND --|06  11|-- NC
	     GND --|07  10|-- GND
        GND --|08  09|o- PRG R/W
              `------'
I just don't know where to put A18 or how to make it support 512KB. Will I need another decoder or will this work with just one?
tepples
Posts: 22708
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: Oversize BNROM Board

Post by tepples »

Connect PRG ROM's /OE to either ground or its /CE, and connect A18 to the output corresponding to D3. I don't know why IREM's board connects the latch to /OE. Or did you miscount pins?

If your PRG ROM is socketed, or you're making the board flashable in circuit, you can test your work using BNTest. But I'm curious as to what you're making. Lizard? Haunted? Multicart using the Action 53 engine, which I think still has a compile-time option to support BNROM instead of the Action 53 mapper?
Ice Man
Posts: 547
Joined: Fri Jul 04, 2014 2:34 pm

Re: Oversize BNROM Board

Post by Ice Man »

I'm trying to make a Darkseed, which should use BNROM512 if I'm not wrong.

Well, it is pin 22 of the MaskROM (DIP28) (usually A16 though so I might've been mistaken).

EDIT: I was indeed thinking of regular JEDEC Pinout instead of Nintendo/IREM pinout. Here's the wiring for the 74'161.

Code: Select all

	  
              .--\/--.
        +5V -o|01  16|-- +5V
    PRG /CE --|02  15|-- NC
     PRG D0 --|03  14|-- PRG A15
     PRG D1 --|04  13|-- PRG A16
     PRG D2 --|05  12|-- PRG A17
     PRG D3 --|06  11|-- PRG A18
	     GND --|07  10|-- GND
        GND --|08  09|o- PRG R/W
              `------'
However, while I can dump the game perfect with kazzo it doesn't work on the hardware.
Game loads with FC to NES Adapter inside my NES but gets stuck at intro. Doesn't load in FC at all.
I checked Mapper 241 and it needs to return x50 for EXP Bus. How would I do that, if it was the case?
lidnariq
Posts: 11432
Joined: Sun Apr 13, 2008 11:12 am

Re: Oversize BNROM Board

Post by lidnariq »

I'd recommend the mapper hack to mapper 34 (GoodNES calls it "[p1]") instead of trying to figure out what's going on without a debugger.
Ice Man
Posts: 547
Joined: Fri Jul 04, 2014 2:34 pm

Re: Oversize BNROM Board

Post by Ice Man »

That's the version I'm using (Mapper 34) actually. FCEUX just tell me that the header is wrong and should be Mapper 241.

The donor cart was a Mashou (J).
lidnariq
Posts: 11432
Joined: Sun Apr 13, 2008 11:12 am

Re: Oversize BNROM Board

Post by lidnariq »

Ooh, I wonder if there are bus conflicts.

(checks) Yup. I bet that's why it's not working on hardware.

Ok, depending on the kind of PRG ROM you're using, there are two things to try:

1- Add an inverter (or any other gate that can serve as one) to convert R/W into /RD, and connect that to whichever of PRG ROM /OE and /CE that /ROMSEL isn't connected to

2- In the specific case of SST39 series flash, just connect /ROMSEL to PRG ROM /CE; R/W to PRG ROM /WE; and ground PRG ROM /OE. The SST39 has a funny property where it will disable the output drivers while /WE is low, but it doesn't count as a write cycle if both /WE and /OE are low. Other flash might also work this way too, but I don't know if all does.


edit:
FCEUX just tell me that the header is wrong and should be Mapper 241.
That's ... fascinating. It showed up in fceumm rev118 with just a cryptic "fix mapper 34", and FCEUX's explanation of what's going on in the Mapper241 implementation is actively terrible:

Code: Select all

// Mapper 7 mostly, but with SRAM or maybe prot circuit
// figure out, which games do need 5xxx area reading

static void M241Sync(void) {
	setchr8(0);
	setprg8r(0x10, 0x6000, 0);
	if (latche & 0x80)
		setprg32(0x8000, latche | 8);	// no 241 actually, but why not afterall?
	else
		setprg32(0x8000, latche);
}
In other words ... it's BNROM, except sometimes it's not. Why not? Who knows! We don't have the hardware, so we can't say anything authoritative, and cah4e3 doesn't seem to believe in mentioning what specific thing led to a structural change like that.
Ice Man
Posts: 547
Joined: Fri Jul 04, 2014 2:34 pm

Re: Oversize BNROM Board

Post by Ice Man »

I'm using a 27c040 EPROM for PRG.

For an inverter, what would be the best IC to use? And how exactly would I connect it.

Thanks for the help!
lidnariq
Posts: 11432
Joined: Sun Apr 13, 2008 11:12 am

Re: Oversize BNROM Board

Post by lidnariq »

Vast swathes of 74-series IC can serve as an inverter. 74'00, 74'02, 74'04, '10, '13, '14, '20, '27, '30 ... '42, '74, '86...

Tell me what you can get your hands on cheaply and I'll tell you how to wire it.
Ice Man
Posts: 547
Joined: Fri Jul 04, 2014 2:34 pm

Re: Oversize BNROM Board

Post by Ice Man »

I got a 74LS04 laying around, which I could use.
lidnariq
Posts: 11432
Joined: Sun Apr 13, 2008 11:12 am

Re: Oversize BNROM Board

Post by lidnariq »

Vcc to 5V, Gnd to 0V, 1A to R/W, 1Y to ROM /OE, 2A, 3A, 4A, 5A, 6A to ground or Vcc (to prevent oscillation)
Ice Man
Posts: 547
Joined: Fri Jul 04, 2014 2:34 pm

Re: Oversize BNROM Board

Post by Ice Man »

Sweet, it works. Thanks alot!

Here's the wiring for anyone who wants to try themself.

Code: Select all

  
			BNROM512 74'161  

              .--\/--.
        +5V --|01  16|-- +5V
    PRG /CE --|02  15|-- NC
     PRG D0 --|03  14|-- PRG A15
     PRG D1 --|04  13|-- PRG A16
     PRG D2 --|05  12|-- PRG A17
     PRG D3 --|06  11|-- PRG A18
	     GND --|07  10|-- GND
        GND --|08  09|-- PRG R/W
              `------'
			  
		BNROM512 74'04	(Bus Conflict)
			
              .--\/--.
    PRG R/W --|01  14|-- +5V
    PRG /OE --|02  13|-- GND
        GND --|03  12|-- NC
         NC --|04  11|-- GND
        GND --|05  10|-- NC
         NC --|06  09|-- GND
        GND --|07  08|-- NC
              `------'
Again, thank you!
Post Reply