Simple(?) NES-UNROM-09 wiring help

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
barbeque
Posts: 5
Joined: Tue May 19, 2020 9:08 pm
Location: Canada
Contact:

Simple(?) NES-UNROM-09 wiring help

Post by barbeque » Sun Jul 12, 2020 5:45 pm

Hi all,

I know there are a few other posts like this already, but I've read a few of them and I'm not exactly sure what I'm doing wrong. I'm trying to write lidnariq's UNROM conversion of the Portopia translation to UV 27c512s (ST M27C512) so I can put them into a copy of Casino Kid that uses an NES-UNROM-09 PCB.

This is my first time making a reproduction of any kind, but I had assumed UNROM would be pretty easy (easier than the original translation's Sunsoft-4, at least) since I'm replacing a 28-pin ROM with a 28-pin EPROM. It's not going exactly to plan.

I believe all the patches are applied properly because I can play the converted game in FCEUX for quite a while without any obvious crashes, incorrect text or other problems.

Here's what I've done so far:
  1. Split up the patched ROM using rom.solutions with the output ROMs both set to 27c512. As far as I can tell, this handled the auto-repeating padding for the CHR ROM as needed.
  2. Desoldered the CHR RAM and PRG ROM from the original PCB.
  3. Soldered in the 28-pin 27c512s in their place (CHR ROM in the CHR spot, PRG ROM in the PRG spot)
  4. Switched from the "V" to the "H" jumper on the cartridge. Casino Kid is horizontally mirrored, Portopia vertical.
  5. Cut the trace going to pin 22 of the PRG ROM from pin 8 of the 7432 (originally A16, now /OE); wired the pin of the PRG ROM to ground (negative cap leg) so that /OE is always enabled. At first I made a mistake here and accidentally wired pin 21 (A10) to ground, but I caught that after a few attempts to boot and I don't think that would have caused any damage.
The game doesn't boot; although my NES has a fairly dirty cartridge slot, if I hold my tongue just right when putting it in, the cartridge will reliably get out of the CIC reset loop and into a solid blue screen. Sometimes immediately after inserting the cartridge I can get a couple tiles of garbage on the screen, but nothing that looks like the start of the game. The siren sound at the start of the game doesn't emit; it seems like it's not running at all.

I'm guessing - but not sure - that the problem is that the NES can't reach $FFFC to get the reset vector to begin execution.

Here's the things that I've checked to diagnose the problem:
  • The Casino Kid game, and the NES, worked before I removed the original components. I don't have any other NES games on hand, but I do have a Famicom converter and some Famicom games (including a legit Japanese copy of Portopia) and the NES still boots those.
  • Scrubbed the pins on the cartridge very thoroughly with isopropyl alcohol in case I got gunk or flux on them during the desoldering.
  • Checked my solder joints (and obviously, resoldered it a whole bunch taking the ROMs back out to test)
  • Rechecked the M27C512 pinout against the original Ricoh mask ROM pinout
  • PRG ROM and CHR ROM are in the right way (notch pointing towards 'silkscreen' notch on the PCB) and on the right side of the board
  • Verified the PRG ROM and the CHR ROM with my burner (TL866II+ using minipro) to make sure I didn't accidentally swap or corrupt them. They both passed.
  • Buzzed out all the pins on the PRG ROM; they all connect to at least one other point on the board.
  • Made sure pin 8 on the 7432 isn't still driving pin 22 somehow (I even pulled the ROM's pin out of the board to be 100% sure.) I didn't want to leave the 7432 connected because I assume making it drive into a ground is not great for the output transistors on it;
  • Specifically buzzed out pin 22 to multiple grounds; continuous.
  • Tried wiring pin 22 (/OE or /G,Vpp) to pin 20 (/CS or /E) directly; no change.
  • Tried splitting the patched ROM using a different utility (ReadNES3); the resulting PRG ROM and CHR ROM matched those produced by rom.solutions when compared with `diff`.
  • Traced back the 7432 in case this PCB used something different than I would expect; that mini-schematic is attached and seems to still make sane sense to me after removing the A16 connection.
I'm sort of out of ideas. In my searches, nobody seems to have mentioned something like having to burn the ROM in reverse-page order or anything weird like that, and I would assume if that was the case the emulator wouldn't load it properly either and the splitter tools would take care of shuffling the pages around automatically.

I think my next step will be taking the top of the NES off so I can try to logic-probe the cartridge PCB at runtime to figure out what's going on. I might also try burning another 64k UNROM game to see if it's just something with this specific ROM that is weird.

Any advice or hints for what to look at would be greatly appreciated, thanks!
Attachments
nes-unrom-09-or-gates.png
Last edited by barbeque on Sun Jul 12, 2020 8:51 pm, edited 1 time in total.

lidnariq
Posts: 9491
Joined: Sun Apr 13, 2008 11:12 am
Location: Seattle

Re: Simple(?) NES-UNROM-09 wiring help

Post by lidnariq » Sun Jul 12, 2020 5:54 pm

There's nothing obviously wrong with what you've described. I'd check that the UV EPROM is fast enough.

Do you know if these ROMs are New Old Stock or part pulls?

You don't need to have the NES open when you do the test; if you have a few LEDs lying around you could permanently attach them to A0 on the ROM instead. (schematic).


(P.S. which barbecue :D )

barbeque
Posts: 5
Joined: Tue May 19, 2020 9:08 pm
Location: Canada
Contact:

Re: Simple(?) NES-UNROM-09 wiring help

Post by barbeque » Sun Jul 12, 2020 6:00 pm

These are part-pull UV EPROMs that a friend yanked out of some kind of flight-navigation computer that was being decommissioned. They don't seem to be blacktopped counterfeits, though I wasn't present at the original purchase.

ST's datasheet claims 45ns; how fast does the NES want it to be?

That little logic probe LED is clever, thanks for the link and for the super-quick reply. I will try that.

(all barbeque, please)

lidnariq
Posts: 9491
Joined: Sun Apr 13, 2008 11:12 am
Location: Seattle

Re: Simple(?) NES-UNROM-09 wiring help

Post by lidnariq » Sun Jul 12, 2020 6:20 pm

If they've been in a single device for their entire life, then they won't have aged and slowed down. (UVEPROMs that have been erased way too many times can start getting slow). So I don't think it's that. (The NES is really tolerant of slow ROMs. For standard wiring, CPU needs a 350ns ROM (/ROMSEL=/CE and ground=/OE) and PPU needs 370ns (A13=/CE and /RD=/OE). It's an unlikely failure mode).

I did identify a problem in the thread you linked that if the 74'161 boots into the last bank, it'll crash, but I think this is unlikely. They usually start either random or 0, so it's not likely that you'll get a reliable failure like that.

barbeque
Posts: 5
Joined: Tue May 19, 2020 9:08 pm
Location: Canada
Contact:

Re: Simple(?) NES-UNROM-09 wiring help

Post by barbeque » Sun Jul 12, 2020 7:18 pm

Yes, I also thought it might be something with the '161 being in the "wrong mode" on startup, so I tried a bunch of resets and cold starts in the vain hope that it would work ;)

I assume you put trampolines into the patch so that if it starts on the wrong 'page' it can still switch modes to where it has to be? I don't really understand how that looks from the software side yet, so maybe it just doesn't matter since the last page is always mapped into high memory anyway.

lidnariq
Posts: 9491
Joined: Sun Apr 13, 2008 11:12 am
Location: Seattle

Re: Simple(?) NES-UNROM-09 wiring help

Post by lidnariq » Sun Jul 12, 2020 9:25 pm

I actually did very little engineering in my patch—just identifying what the original author had done and being familiar with what other hardware options exist. Hence why my patch is only 10 bytes changed—I basically just tell it to use the UNROM API instead of the Sunsoft 4 API. So it's a flaw I inherited, and it seemed to be rare enough to not be a problem.

If it is a problem for you, you'll be able to measure if the two pins on the output of the latch and see if they're both high.

barbeque
Posts: 5
Joined: Tue May 19, 2020 9:08 pm
Location: Canada
Contact:

Re: Simple(?) NES-UNROM-09 wiring help

Post by barbeque » Sun Jul 12, 2020 10:56 pm

Ah, that makes sense, thank you. I was wondering how you managed to produce a patch so quickly, but I guess the Sunsoft mapper's bank switching is sort of analogous to the UNROM bank switching (which of course it must be).

I'll check it out tomorrow - thanks for all the help so far and for the patch!

barbeque
Posts: 5
Joined: Tue May 19, 2020 9:08 pm
Location: Canada
Contact:

Re: Simple(?) NES-UNROM-09 wiring help

Post by barbeque » Mon Jul 13, 2020 10:32 am

Well, that was an easy solution.

Two big mistakes on my part:
  1. The first time I rigged up the cart, the NES' cartridge slot apparently must have been pretty filthy (or I contaminated it with a bit of leftover flux off the fingers.) Filthy enough that it would pass CIC but not actually load the cartridge even though it loaded Casino Kid just fine minutes before. I did it right the first time! Once I took the top off the NES, it was pretty obvious that the bare PCB wasn't making good contact.
  2. I tied pin 22 to the positive side of the capacitor when I tried the "chip-leg-pull" solution. It turns out when you flip the board over, the left side becomes the right side and vice versa!
So now it's working! Thank you for your gracious (and speedy) responses. Looking forward to finally beating this game.
Attachments
2020-07-13.jpeg

Post Reply