corrupted CHR ram (SOLVED)

Discuss hardware-related topics, such as development cartridges, CopyNES, PowerPak, EPROMs, or whatever.

Moderator: Moderators

User avatar
norill
Posts: 26
Joined: Wed Dec 07, 2016 12:05 am
Location: PAL

corrupted CHR ram (SOLVED)

Post by norill »

heya, i need some help. i've replaced PRG ROM on a 168-in-1 Contra Function cart with a DIP-32 socket, but it didn't end well. when i insert the original ROM in that socket the picture is corrupted. palettes and nametables work fine and the game is kinda functional, but all tiles are borked. after disconnecting the 4,5k resistor that is on cart it works fine ~9 out of 10 hard resets. but when i insert my custom W27E040 EEPROM it doesn't start at all (blank screen) 9/10 times and is corrupted 1/10 times. with that resistor disconnected it is corrupted more often than blank, but never works fine. i'm using a slightly modded Pegasus MT777DX (famiclone).

cart layout and "screen shot"

at first i thought i might have shorted some tracks or disconnected some pins from pads while desoldering the ROM, especially that the soldering work on that SRAM was extremely janky. but i have arduously verified that all connections on the pcb are fine. i don't know what else can i do to make it work :(

cart components:

Code: Select all

GD74LS00	9137				OCTAL BUS TRANSCEIVER NON-INVERTED 3-STATE OUTPUTS
GD74LS174	9216				OCTAL BUS TRANSCEIVER NON-INVERTED 3-STATE OUTPUTS
T74LS273B1	99144				Octal bus transceiver
PAL16L8ACN	152JTBE				Fuse-Programmable PLD
LH5160N-10L	9103 1 DC			64K-Bit SRAM
SS 8001	HN62328BP Y55 2E1		x8 ROM Mask Programmable 

edit: for posterity - the problem was that the cart mapper 15 disables CHR ROM writes in banking mode 0 and emulators didnt emulate this behavior. so this was mostly a software issue
Last edited by norill on Fri Oct 11, 2019 2:46 am, edited 2 times in total.
User avatar
Memblers
Site Admin
Posts: 3995
Joined: Mon Sep 20, 2004 6:04 am
Location: Indianapolis
Contact:

Re: corrupted CHR ram

Post by Memblers »

Did you check the connections from the ROM pin (not the socket) to both the mapper and cart edge?
Is pin 1 (VPP) connected to 5V? Can't exactly tell in the picture.
Looks like there are no bypass capacitors? I'd try adding some, like a 4.7uF or 10uF, and maybe a couple 0.1uF on the chips.
Ice Man
Posts: 547
Joined: Fri Jul 04, 2014 2:34 pm

Re: corrupted CHR ram

Post by Ice Man »

Did you try the game on original consoles?

I'd also try replace the CHR-RAM by a standard 8KB RAM (HY6264 for example).
User avatar
norill
Posts: 26
Joined: Wed Dec 07, 2016 12:05 am
Location: PAL

Re: corrupted CHR ram

Post by norill »

Memblers wrote:Did you check the connections from the ROM pin (not the socket) to both the mapper and cart edge?
Is pin 1 (VPP) connected to 5V? Can't exactly tell in the picture.
Looks like there are no bypass capacitors? I'd try adding some, like a 4.7uF or 10uF, and maybe a couple 0.1uF on the chips.
i've tested all connections ROM-socket and socket-edge as well as pin-edge connections of all other ICs and they are all fine. sorry for potato quality pics (they are scans actually xD) i dont have a good camera atm.

can you elaborate on capacitors? there is only one ceramic cap next to the only resistor on cart (right side on front picture). it's connected to VCC (cart connector pin 30) on one side. on the other side it's connected to pin 1 (bottom left corner) of GD74LS174 and the 4,5k resistor, that is in turn connected to ground. i never heard of bypass capacitors before being a simple programmer that has no idea what he's doing when it comes to electronics. where should i put them?
Ice Man wrote:Did you try the game on original consoles?

I'd also try replace the CHR-RAM by a standard 8KB RAM (HY6264 for example).
i don't have original consoles, so can't test. i only tested it on emulators, and had no problems with it. i bet the problem is with pcb, most likely something to do with character memory
lidnariq
Posts: 11320
Joined: Sun Apr 13, 2008 11:12 am
Location: Seattle

Re: corrupted CHR ram

Post by lidnariq »

Well, you've already got a socket. Why not try running some other software? Nocash's Magic Floor would be an obvious trivial test.

Have you tried dumping the original ROM? Does it match the image in goodNES? It apparently should be 1 MiB, the largest you can fit in a 32-pin socket, so make sure the pinout on the board matches that of the 'PROM you're trying to use. If the 'PROM you're trying to use won't work without Vpp high, you might need to do some rework for that, or else scrounge up a 27C080.

Have you tried continuity testing with the original ROM in the socket?
User avatar
norill
Posts: 26
Joined: Wed Dec 07, 2016 12:05 am
Location: PAL

Re: corrupted CHR ram

Post by norill »

lidnariq wrote:Well, you've already got a socket. Why not try running some other software? Nocash's Magic Floor would be an obvious trivial test.

Have you tried dumping the original ROM? Does it match the image in goodNES? It apparently should be 1 MiB, the largest you can fit in a 32-pin socket, so make sure the pinout on the board matches that of the 'PROM you're trying to use. If the 'PROM you're trying to use won't work without Vpp high, you might need to do some rework for that, or else scrounge up a 27C080.

Have you tried continuity testing with the original ROM in the socket?
i'm gonna try that Magic Floor thing, thanks.

Yes, the dumped original ROM is 1 MiB and matches the one in database. The pinout of HN62328BP matches that of W27E040 (except A19). I also tried using M27C801 with the same result.

the cart was fully operational before i installed a socket. when i put the original ROM into the socket it either doesn't work at all or has corrupted picture. i blindly disconnected a resistor on cart and it started to work, but only with the original ROM - my ROM still has corrupted picture.
User avatar
norill
Posts: 26
Joined: Wed Dec 07, 2016 12:05 am
Location: PAL

Re: corrupted CHR ram

Post by norill »

today i programmed a W27E040 eeprom with Nocash's Magic Floor, put it in the socket on that cartridge and tried running it. it didn't start at first, but after many, many hard resets it started, though it had glitchy tiles too, just like my rom. :(

i also tried replacing the capacitor on cart with a bigger one and putting more capacitors in mostly random places. it didnt fix corrupted chars, but at least the cart is starting up more reliably - no need to reset it a thousand times to run.

i dont know what to try now, can you guys give me some pointers? i also wanted to draw the schematic of that cart, but i don't know any good software for this, can you recommend some?
User avatar
krzysiobal
Posts: 991
Joined: Sun Jun 12, 2011 12:06 pm
Location: Poland
Contact:

Re: corrupted CHR ram

Post by krzysiobal »

Here is the schematics. Please check all connections.
Image
Because the PAL chip might block PPU from writing to CHR-RAM, please check especially all connections to the PAL chip, and do it on top - check continuity touching to chip legs at top of PCB, not bottom.

R+C+Diode is !RESET detector from M2. Check if C is at least 1nF and if diode is not broken.
User avatar
norill
Posts: 26
Joined: Wed Dec 07, 2016 12:05 am
Location: PAL

Re: corrupted CHR ram

Post by norill »

krzysiobal wrote:Here is the schematics. Please check all connections.
Image
Because the PAL chip might block PPU from writing to CHR-RAM, please check especially all connections to the PAL chip, and do it on top - check continuity touching to chip legs at top of PCB, not bottom.

R+C+Diode is !RESET detector from M2. Check if C is at least 1nF and if diode is not broken.
just checked and all connections from array logic chip look good. now i'm checking other chips once again.

there was no diode on my pcb, just empty space with diode symbol. i'll add it and check if it helps. dzięki za pomoc :)
Last edited by norill on Sun Apr 09, 2017 11:44 am, edited 1 time in total.
User avatar
norill
Posts: 26
Joined: Wed Dec 07, 2016 12:05 am
Location: PAL

Re: corrupted CHR ram

Post by norill »

i did continuity testing of ALL connections on the pcb again and they are all ok.

i also added a diode and now resetting works like a charm, both on my rom and original rom. but my rom still has corrupted chars. without the diode the original rom has corrupted chars too
User avatar
krzysiobal
Posts: 991
Joined: Sun Jun 12, 2011 12:06 pm
Location: Poland
Contact:

Re: corrupted CHR ram

Post by krzysiobal »

This cart has solder-jumper on back side which allows !CPU_ROMSEL to be connected to ROM_!OE and GND to ROM_!CE (default settings) or vice-versa. Try connecting them in reverse order.
Image

Also, try connecting around 68pF capactitor betweetn CHR-RAM's !WE and gnd.
User avatar
norill
Posts: 26
Joined: Wed Dec 07, 2016 12:05 am
Location: PAL

Re: corrupted CHR ram

Post by norill »

krzysiobal wrote:This cart has solder-jumper on back side which allows !CPU_ROMSEL to be connected to ROM_!OE and GND to ROM_!CE (default settings) or vice-versa. Try connecting them in reverse order.
Image

Also, try connecting around 68pF capactitor betweetn CHR-RAM's !WE and gnd.
that jumper wasn't just solder - those were uninsulated tracks so i had to cut them. but seems that connecting them in reverse (!ROMSEL to !CE, GND to !OE) didn't change anything. i tried connecting !CHR_WE and GND using a 100nF ceramic cap, didn't help either

i had an idea that maybe PAL chip is broken and it's outputting wrong signal for !CHR_WE, but that can't be the case because it works fine with original rom
User avatar
krzysiobal
Posts: 991
Joined: Sun Jun 12, 2011 12:06 pm
Location: Poland
Contact:

Re: corrupted CHR ram

Post by krzysiobal »

I dont quite understand you - what is original ROM that is working fine? 8 Mbit MASK ROM?
What ROM is causing graphic glitches? 27C801 EPROM?
User avatar
norill
Posts: 26
Joined: Wed Dec 07, 2016 12:05 am
Location: PAL

Re: corrupted CHR ram

Post by norill »

krzysiobal wrote:I dont quite understand you - what is original ROM that is working fine? 8 Mbit MASK ROM?
What ROM is causing graphic glitches? 27C801 EPROM?
yes, the original 8 Mbit MASK ROM is working. both 27C801 and 27E040 are causing glitches.
User avatar
norill
Posts: 26
Joined: Wed Dec 07, 2016 12:05 am
Location: PAL

Re: corrupted CHR ram

Post by norill »

MEGANECRO

i started working on this project again. i managed to determine that the direct cause of the corrupted tiles is the CHR-RAM write-protection circuit. i wasn't aware of it when developing my custom rom, so no wonder it doesn't work. but i still have no idea why it suddenly became a problem when i place the original mask rom chip in the DIP-32 socket. and why tinkering with seemingly unrelated !reset detection circuit helped with that issue. i'm trying to think what kinds of tests can i put on my rom to try and debug this issue
Post Reply