How easy is it to kill an NES CPU?

Are you new to 6502, NES, or even programming in general? Post any of your questions here. Remember - the only dumb question is the question that remains unasked.

Moderator: Moderators

Post Reply
quartzhunter
Posts: 4
Joined: Fri Jan 15, 2021 12:27 pm

How easy is it to kill an NES CPU?

Post by quartzhunter » Tue Jan 19, 2021 3:19 pm

Hi all,

I'm working on creating a synthesizer using an RP2A03 from the NES. I'm roughly modifying the project called NESizer2. I got my introduction to the 6502 with Ben Eater's computer kit. I first tried to approach the RP2A03 with a slow clock just to make sure that the chip wasn't dead. When that didn't work, I connected it up in place of the 6502 to see if it could even run a "Hello, world!" program. Surprisingly, it did! I put the 2A03 back into the circuit I made for it and continued to try to get the APU to work. Now, putting it back in the 6502's place to test something else, it no longer runs the hello world program.

To my point:

How easy is it to kill an RP2A03? Are there behaviors that I can look for that indicate it's dead, besides it not working?

I know that CMOS is more sensitive to static than TTL, but I haven't been able to find what was used for the NES. I'm guessing CMOS? In any case, I've only been working with 5V, and I haven't had any "oopsie" moments besides connecting an ISP connector backward, but shouldn't have had any ill effects except on the ATMEGA328P that I'm using (which is totally fine).

Any help or insights would be greatly appreciated.

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

Re: How easy is it to kill an NES CPU?

Post by lidnariq » Tue Jan 19, 2021 3:30 pm

The NES is an NMOS device. Both the 2A03 and 6502 have dynamic logic inside, and will cease to operate correctly if given too slow of a clock. The 2A03 has a 1/12th divider on its input, so while the 6502 can theoretically run as slow as 10kHz, the 2A03 requires a 120kHz clock.

Check 2A03 pin 3 (/RESET): make sure it's high. Check pin 31: it should be 1/12th of the clock you put in on pin 29.

I don't actually know how fragile 2A03s are.

quartzhunter
Posts: 4
Joined: Fri Jan 15, 2021 12:27 pm

Re: How easy is it to kill an NES CPU?

Post by quartzhunter » Tue Jan 19, 2021 5:05 pm

I figured that it had that the same clock issue as the original 6502s, but I didn't know what speed it required. I'm currently feeding it a 20 MHz clock and using the M2 output to clock the chips attached to the bus. I'll try feeding it a 1 MHz clock and see if the divided clock output is slow enough for an Arduino to take a reading each tick. Unfortunately, I don't have an oscilloscope so I can't check the clock output but I'll see if I know someone who has one.

I have the reset pin tied high with a resistor, and then connected to a button to ground it when I want to reset it.

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

Re: How easy is it to kill an NES CPU?

Post by lidnariq » Tue Jan 19, 2021 5:24 pm

The clock divider itself can run at any speed, but the CPU will crash at sufficiently slow speeds. But to just verify that M2 is doing anything, you can even get away with just manually toggling the clock input high and low (twelve times per output).

quartzhunter
Posts: 4
Joined: Fri Jan 15, 2021 12:27 pm

Re: How easy is it to kill an NES CPU?

Post by quartzhunter » Sat Jan 23, 2021 9:45 am

I bought a cheap logic analyzer. Sampling at 1MHz, the clock divider is definitely still working because I get 12 samples per output change. I'm not sure how many clock cycles the RP2A03 takes to reset, but I think the chip is dead, unfortunately. With the 6502 I expect to see the reset vector 0xFFFC after 7 clock cycles, and I saw nothing close to resembling that after about 20 CPU clock cycles. Bummer.

Oziphantom
Posts: 1074
Joined: Tue Feb 07, 2017 2:03 am

Re: How easy is it to kill an NES CPU?

Post by Oziphantom » Sun Jan 24, 2021 1:02 am

how are you swapping between a 6502 and 2A03 ? do you have two sockets set up on the board?

quartzhunter
Posts: 4
Joined: Fri Jan 15, 2021 12:27 pm

Re: How easy is it to kill an NES CPU?

Post by quartzhunter » Sun Jan 24, 2021 6:25 am

Oziphantom wrote:
Sun Jan 24, 2021 1:02 am
how are you swapping between a 6502 and 2A03 ? do you have two sockets set up on the board?
Yeah, I have one breadboard setup for the 6502 and one setup for the 2A03. The one for the 2A03 has jumpers that just remaps its pins into the 6502 socket, but I only have one chip in at a time. (although a multiprocessor system with 2A03's would be pretty cool)

Post Reply