SuperCIC for PIC10F322

Discussion of hardware and software development for Super NES and Super Famicom.

Moderator: Moderators

Forum rules
  • For making cartridges of your Super NES games, see Reproduction.
User avatar
getafixx
Posts: 370
Joined: Tue Dec 04, 2012 3:28 pm
Location: Canada

Re: SuperCIC for PIC10F322

Post by getafixx » Mon Aug 24, 2020 9:06 pm

Like Mark's findings, I had a similar issue with one of my old designs that used the 27C322 chips.

It turned out that using 74LS257 instead of 74HCT257 fixed it for the consoles that were picky. It worked on any console, 100% of the time, if using the LS branded chips. With the HCT it was fine on all SNESjr consoles and clones, but hit and miss on original models.

User avatar
poorstudenthobbyist
Posts: 119
Joined: Fri Jun 24, 2016 4:20 pm

Re: SuperCIC for PIC10F322

Post by poorstudenthobbyist » Mon Aug 24, 2020 9:23 pm

lidnariq wrote:
Mon Aug 24, 2020 8:48 pm
I imagine that an oscilloscope triggering on the "lock" CIC asserting /RESET would show something arriving late on one side or the other. Maybe an RC curve, maybe crosstalk...
Ok, I'm going to take a break tonight, but I can try to take some scope traces tomorrow. Lock CIC and /RESET? Any other channels? (I have a 4-ch oscilloscope). I'm very fuzzy on how the CIC works (one of my biggest areas for improvement) so I'm not sure what's important to check.
Markfrizb wrote:
Mon Aug 24, 2020 8:52 pm
I had a similar issue years ago where a pcb I made worked perfectly on most consoles but there were a few consoles that it crashed on (CIC related both 10F322 and 629). I had managed to acquire most of the snes consoles revisions to test on. There were definitely consoles that were more forgiving than others for sure. Because of this lack of complete and full compatibility, I literally trash canned the entire lot (an expensive lesson). I would guess that your test rom worked fine because it didn’t use the multiplexers and the failure is because of the multiplexers. Maybe you can quiet the noise with some added caps, but I fear your may have a trash can moment like I did. If it’s not 100% compatible, you shouldn’t offer it to the public IMHO. That was my decision anyway.
I wish you luck. Maybe some variety of caps might work. I don’t know.
This is my exact worry, that it won't work in all situations. But I've had this worry for literally everything I've ever made and sold (I'm a paranoid perfectionist to a fault on most things). I made SNES-to-27C322 adapter boards that I found do not fit in a specific board type, so I went and redesigned the entire board, and put a disclaimer out that if anyone has any problems fitting the boards inside the carts to let me know (no one has told me yet in the months after discontinuing the old design, and the new design takes care of the issue).

I can't start worrying about the CIC not working in my other proven boards too much, since those boards have been out for a long time, and I'm sure someone would have asked by now. Of course I test every design before I offer it to sell, but I didn't even think about testing the CIC in different console revisions! It's not something you'd immediately think of. My site has a reputation for going into (painstaking) detail with customers to help solve their issues, but I and whoever emailed me have always been able to figure out a solution. When dealing with such old tech, road bumps are to be expected.

I try to be transparent about everything I sell, and I'm going to always offer refunds for things that don't work out (I even have my automated message after a purchase to mention that they can message or email me for support), but in the past year of running my store I've never had anyone have to return something because it didn't work. If they have a problem, they email, and we take care of it. I'm never gonna be 100% positive that everything I sell works in every situation, because I can't test every situation! All I can do is test in as many configurations as is possible, which is what I've been doing, and help anyone who runs into problems.

So I think at this point, unless the oscilloscope traces bring anything apparent to light, I might just revert back to the 629s instead until I can get the 10F322s working, since I've never had an issue with the 629s. I even just took this board that doesn't work with 10F322s and soldered six three-inch wires out of the socket to a 629 floating in the air, and it worked perfectly. Those long wires acting like antennas, coupled with the existing proximity to the multiplexers, would be enough to break it if it was going to. I have 100nF bypass caps on everything already, and I don't think adding a bunch of random cap values until it works is a good fix anyway. Maybe I'll just try moving the multiplexers elsewhere on the board. I dunno. In the meantime a tiny little adapter board is probably what I'm stuck with.

It really sucks too, because I spent a lot of time getting these programming boards working and got really excited when it all seemed to click into place. Stupid CIC.

Thanks for all the help though and letting me rant a bit haha. If y'all think of anything else, I'd be eternally grateful!
Last edited by poorstudenthobbyist on Tue Aug 25, 2020 12:19 pm, edited 3 times in total.

User avatar
poorstudenthobbyist
Posts: 119
Joined: Fri Jun 24, 2016 4:20 pm

Re: SuperCIC for PIC10F322

Post by poorstudenthobbyist » Mon Aug 24, 2020 9:26 pm

getafixx wrote:
Mon Aug 24, 2020 9:06 pm
Like Mark's findings, I had a similar issue with one of my old designs that used the 27C322 chips.

It turned out that using 74LS257 instead of 74HCT257 fixed it for the consoles that were picky. It worked on any console, 100% of the time, if using the LS branded chips. With the HCT it was fine on all SNESjr consoles and clones, but hit and miss on original models.
Seriously?? I don't think I have any LS chips around here, but I've been using HC (not HCT) for the past six months or so exclusively and hadn't had any problems literally until just today.

You know I was just starting to feel confident that my designs were nearing a final revision and that I wouldn't have to touch them again. I guess it'll never end...

Markfrizb
Posts: 532
Joined: Sun Dec 02, 2012 8:17 am
Location: East Texas

Re: SuperCIC for PIC10F322

Post by Markfrizb » Mon Aug 24, 2020 9:42 pm

You know I was just starting to feel confident that my designs were nearing a final revision and that I wouldn't have to touch them again. I guess it'll never end...
That never ends.... lol. I’m rapidly approaching the end of the alphabet for revisions on a few designs...
Keep the CIC traces far away from the 257’s with lots of ground plane. Move the CIC closer to the edge too.

Good luck!

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

Re: SuperCIC for PIC10F322

Post by lidnariq » Mon Aug 24, 2020 10:34 pm

poorstudenthobbyist wrote:
Mon Aug 24, 2020 9:23 pm
lidnariq wrote:
Mon Aug 24, 2020 8:48 pm
I imagine that an oscilloscope triggering on the "lock" CIC asserting /RESET would show something arriving late on one side or the other. Maybe an RC curve, maybe crosstalk...
I can try to take some scope traces tomorrow. Lock CIC and /RESET? Any other channels? (I have a 4-ch oscilloscope). I'm very fuzzy on how the CIC works (one of my biggest areas for improvement) so I'm not sure what's important to check.
There's four signals between the two CICs. I/O55, I/O24, CLK56, and +RESET25. The separate /RESET26 is generated by the CIC lock for the rest of the system, but you should be able to use it to indicate when communication got lost. So trigger on a falling edge of /RESET26, and check ... probably just I/O55 and I/O24 ? Theoretically the other two signals shouldn't matter.

User avatar
poorstudenthobbyist
Posts: 119
Joined: Fri Jun 24, 2016 4:20 pm

Re: SuperCIC for PIC10F322

Post by poorstudenthobbyist » Tue Aug 25, 2020 5:43 am

lidnariq wrote:
Mon Aug 24, 2020 10:34 pm
poorstudenthobbyist wrote:
Mon Aug 24, 2020 9:23 pm
lidnariq wrote:
Mon Aug 24, 2020 8:48 pm
I imagine that an oscilloscope triggering on the "lock" CIC asserting /RESET would show something arriving late on one side or the other. Maybe an RC curve, maybe crosstalk...
I can try to take some scope traces tomorrow. Lock CIC and /RESET? Any other channels? (I have a 4-ch oscilloscope). I'm very fuzzy on how the CIC works (one of my biggest areas for improvement) so I'm not sure what's important to check.
There's four signals between the two CICs. I/O55, I/O24, CLK56, and +RESET25. The separate /RESET26 is generated by the CIC lock for the rest of the system, but you should be able to use it to indicate when communication got lost. So trigger on a falling edge of /RESET26, and check ... probably just I/O55 and I/O24 ? Theoretically the other two signals shouldn't matter.
Ch1 (yellow) = Pin 26
Ch2 (blue) = Pin 55
Ch3 (purple) = Pin 24

Here are a few various traces I was able to capture, at varying levels of zoom. It doesn't look like there's much noise. I can check others, I'll just leave the o'scope set up.

Btw, is there a reason the 12F629 works, but the 10F322 doesn't?
Attachments
DS1Z_QuickPrint1.png
DS1Z_QuickPrint7.png
DS1Z_QuickPrint6.png
DS1Z_QuickPrint2.png

User avatar
poorstudenthobbyist
Posts: 119
Joined: Fri Jun 24, 2016 4:20 pm

Re: SuperCIC for PIC10F322

Post by poorstudenthobbyist » Tue Aug 25, 2020 10:06 am

Markfrizb wrote:
Mon Aug 24, 2020 8:52 pm
I had a similar issue years ago where a pcb I made worked perfectly on most consoles but there were a few consoles that it crashed on (CIC related both 10F322 and 629). I had managed to acquire most of the snes consoles revisions to test on. There were definitely consoles that were more forgiving than others for sure.
Ok, so I forgot I have an old SNES Jr. in my closet. I pulled it out, and the game booted up fine. So I'm having a problem similar to yours. The console I have that doesn't like the new boards is the 2-chip version - as far as I'm aware, there are only three main different SNES versions? These two and the 1-chip?

Do you by chance remember which model was the worst offender for this kind of problem? I think I have a third SNES somewhere in my closet that doesn't have a working sound chip in it that I could try too.

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

Re: SuperCIC for PIC10F322

Post by lidnariq » Tue Aug 25, 2020 11:08 am

poorstudenthobbyist wrote:
Tue Aug 25, 2020 5:43 am
Here are a few various traces I was able to capture, at varying levels of zoom. It doesn't look like there's much noise. I can check others, I'll just leave the o'scope set up.
The traces imply that the key did something wrong and the lock objected. I admit I'm confused about those places where the signal goes from 0V to 1V, however. That implies the key and lock are getting in a fight?
Btw, is there a reason the 12F629 works, but the 10F322 doesn't?
I could have made a mistake in translating the 12F629 implementation, but I did triple-check my work.

As far as I can tell, all of Microchip's 8-bit flash parts (10F, 12F, 16F, 18F) have been on the same 350nm process for decades. - https://siliconpr0n.org/archive/doku.ph ... :microchip

User avatar
poorstudenthobbyist
Posts: 119
Joined: Fri Jun 24, 2016 4:20 pm

Re: SuperCIC for PIC10F322

Post by poorstudenthobbyist » Tue Aug 25, 2020 11:14 am

I mean, I'd love it if it was a code issue, but I doubt that, especially cause this is the only board that gives an issue with the 10F322s. I tested on three other designs and they work fine (including ones with 27C322s). And it's not a surface mount vs through hole problem either. It's all very annoying. Maybe the added capacitance/inductance of the wires I added going to the 629 fixes the problem.

Any idea if the 2-chip SNES is the most problematic in this regard?

Markfrizb
Posts: 532
Joined: Sun Dec 02, 2012 8:17 am
Location: East Texas

Re: SuperCIC for PIC10F322

Post by Markfrizb » Tue Aug 25, 2020 1:38 pm

Iirc, there are about 8 snes OEM variants....
I sold all my unique consoles to HD Retrovision when he was testing his HD cable sets years ago.

User avatar
poorstudenthobbyist
Posts: 119
Joined: Fri Jun 24, 2016 4:20 pm

Re: SuperCIC for PIC10F322

Post by poorstudenthobbyist » Tue Aug 25, 2020 2:04 pm

Welp, that's not very feasible.

I suppose I'll have to stick to testing on my older consoles, and taking care of any issues others have if they ever come up. And meticulously lay out the CIC circuitry to make sure it's isolated from the switch-ier lines. I could do a better job at it, I didn't pay it close attention cause it's never been a problem before. I think just keeping all the traces separated from the other signals should be enough.

User avatar
poorstudenthobbyist
Posts: 119
Joined: Fri Jun 24, 2016 4:20 pm

Re: SuperCIC for PIC10F322

Post by poorstudenthobbyist » Tue Aug 25, 2020 2:58 pm

I just found a thread started by Ice Man back in March, he seemed to have the same problem as me!

Thanks everyone for the help. I'm gonna save these boards for my personal collection, or maybe I can send them to people to make some test games with for their clone consoles or something. I dunno yet. But I'm not gonna bother with using the 629 in this board, I can just see this causing more headaches than it's worth.

Like you Mark, I've learned an expensive lesson! Always order lower cost low volume unpopulated samples before ordering a fully assembled board. It figures the first time I break this personal rule of mine, it ends up biting me in the ass haha

Markfrizb
Posts: 532
Joined: Sun Dec 02, 2012 8:17 am
Location: East Texas

Re: SuperCIC for PIC10F322

Post by Markfrizb » Tue Aug 25, 2020 8:46 pm

Sorry about that. It does suck, I know. Prototypes are essential before any large order.
If you want, PM me and maybe you could send me a sample to tinker with. I’ve used the 10F322’s exclusively now for a few years. After that one hiccup I mentioned earlier, it’s been golden.

User avatar
poorstudenthobbyist
Posts: 119
Joined: Fri Jun 24, 2016 4:20 pm

Re: SuperCIC for PIC10F322

Post by poorstudenthobbyist » Tue Aug 25, 2020 9:13 pm

Markfrizb wrote:
Tue Aug 25, 2020 8:46 pm
Sorry about that. It does suck, I know. Prototypes are essential before any large order.
If you want, PM me and maybe you could send me a sample to tinker with. I’ve used the 10F322’s exclusively now for a few years. After that one hiccup I mentioned earlier, it’s been golden.
I was trying to get out some new stock of an older board I had quickly, since it's been out of stock for over a month now and I keep getting requests for it. But I wanted to implement new improvements to the board at the same time. Guess I just made them have to wait longer! I'm currently finishing up the new design, I doubled the thickness of all the traces for the CIC and put restrict layers around the CIC circuitry to keep any other traces from entering that area, except VCC and GND. So we'll see how it turns out. This is way above and beyond what I did with other designs that worked well, so I'm assuming this will all but guarantee the CIC works properly, and I can feel comfortable with it.

I am actually going to go ahead and try making some cheap DIP-to-DIP adapters so I can try using the 12F629s on this board after all. Since, even without the long wires, they seem to work? Can't hurt to try anyway. I might then offer these boards with the 629 adapter attached at a deep discount with a disclaimer that they should only be used for testing EPROMs in a socket or something. Not sure.

I'd gladly send you a board, if you're interested, but you don't gotta tinker with it on my behalf. Only if you want to mess around with it yourself!

Markfrizb
Posts: 532
Joined: Sun Dec 02, 2012 8:17 am
Location: East Texas

Re: SuperCIC for PIC10F322

Post by Markfrizb » Tue Aug 25, 2020 10:18 pm

I really believe your issues are all related to cross talk. I think if you isolate and ground plane those traces, you should be good.
I think the LS series chips help with noise, it’s been a looong time since I researched those so I could be wrong, but I think the SCHOTTKY process helps with noise. I don’t use the LS series. Mostly AHCT/AHC’s

It’s funny... since my early days, I designed an all SMT, multi functional, practically used the entire alphabet In revisions, all pick and place, easy to use pcb...but it’s oddly satisfying to make a game using my latest DIY pcb which has all DIP parts, no smt parts (except some caps), not multifunctional and a lot more work. Best of luck.

Post Reply