Author Topic: N64 CPU Upgrade  (Read 27616 times)

Offline RobIvy64

  • MassiveMember
  • ****
  • Posts: 469
  • Texas!
N64 CPU Upgrade
« on: January 04, 2014, 01:20:41 PM »
Oh boy, I'm bored again and my soldering iron has been cold for far too long.

I've recently taken a renewed interest in the N64, specifically it's hardware.

Years ago, I enjoyed experimenting with overclocking the N64. Now, I want to take this a step further by upgrading the CPU.

The specific details on the CPU in the N64 have always been conflicting. We know it's an NEC VR4300, but the question is, is it a custom chip or just a stock VR4300 with the Nintendo logo branded onto it.

Early N64 SDKs running in the SGI Indy workstation used a stock NEC VR4300. This makes me think it's just an off-the-shelf CPU with the Nintendo logo etched in.

Here is a comparison of the Nintendo 64's CPU and the NEC VR4300.


How would swapping one VR4300 CPU with another be considered an "upgrade"? I've managed to source a 133 MHz-rated NEC VR4300 CPU in the same 120-pin QFP as the N64's CPU. My goal is to finally achieve the currently unattainable 3X multiplier setting. If successful, the CPU would be clocked at around 187 MHz, two times the normal speed.

Any thoughts? Maybe I have too much idle time.
« Last Edit: January 04, 2014, 01:24:06 PM by RobIvy64 »
"Console Mods" lurker

Offline NFG

  • Runs the place
  • Administrator
  • ThrobbingMember
  • *****
  • Posts: 3408
    • NFGgames
Re: N64 CPU Upgrade
« Reply #1 on: January 04, 2014, 03:44:52 PM »
Idle time is how great things get done.  =D

Offline RobIvy64

  • MassiveMember
  • ****
  • Posts: 469
  • Texas!
Re: N64 CPU Upgrade
« Reply #2 on: January 05, 2014, 01:39:58 AM »
After thumbing through the 268 page VR4300 series manual, I have learned a few new things that will help me to achieve new speeds without altering the bus.

I have also decided to install the VR4310. The main differences are the addition of new internal multipliers, along with a 167 MHz maximum clock rating.

Below is a snippet of the chart outlining the differences between the  VR4300, VR4305, and VR4310. Note that the 1.5x multiplier, as used in the stock N64, is only available with the 100 MHz-rated VR4300.



The VR4310 uses 3 pins to determine the internal multiplier (marked as DivMode0,1,2 respectively, see below). Installing the VR4310 in place of the stock N64 CPU, lifting pin 15 and pulling that to ground, should set the internal CPU speed to 156.25 MHz. This will be a good starting point!



« Last Edit: January 05, 2014, 03:12:18 AM by RobIvy64 »
"Console Mods" lurker

Offline RobIvy64

  • MassiveMember
  • ****
  • Posts: 469
  • Texas!
Re: N64 CPU Upgrade
« Reply #3 on: January 05, 2014, 01:41:31 AM »
A VR4310 CPU can be harvested from an HP Laserjet 8100 formatter board, which can be had for about $20.

From pushing 17 PPM B&W copies, to running Super Mario 64! These old HP Laserjet logic boards are the best source for the VR4300 and 4310 CPUs.

I have one of these boards on the way! Now I just need an extra N64 to operate on!


« Last Edit: January 05, 2014, 04:03:16 AM by RobIvy64 »
"Console Mods" lurker

Offline public-pervert

  • MassiveMember
  • ****
  • Posts: 106
Re: N64 CPU Upgrade
« Reply #4 on: January 08, 2014, 10:47:46 PM »
I'm super excited to see where you'll get!

Offline RobIvy64

  • MassiveMember
  • ****
  • Posts: 469
  • Texas!
Re: N64 CPU Upgrade
« Reply #5 on: January 09, 2014, 09:06:53 AM »
Unfortunately, I have bad news to report :(.

It appears there IS some type of glue logic between the CPU and other components. Possibly some additional security.

I performed the CPU swap (which was a BITCH!) and soldered in a stock NEC VR4300-100. Checked continuity on all 120 pins (see part about it being a bitch), and got nothing. Blank screen. Put this one to bed, folks. :(



« Last Edit: January 09, 2014, 02:10:24 PM by RobIvy64 »
"Console Mods" lurker

Offline RobIvy64

  • MassiveMember
  • ****
  • Posts: 469
  • Texas!
Re: N64 CPU Upgrade
« Reply #6 on: January 09, 2014, 12:48:41 PM »
Here is a scan of the Ultra 64 development board. Notice the stock VR4300 CPU. There is a small EEPROM between the CPU and GPU that is interesting. Maybe some of you will have some ideas.

« Last Edit: January 09, 2014, 02:15:27 PM by RobIvy64 »
"Console Mods" lurker

Offline NFG

  • Runs the place
  • Administrator
  • ThrobbingMember
  • *****
  • Posts: 3408
    • NFGgames
Re: N64 CPU Upgrade
« Reply #7 on: January 09, 2014, 02:19:40 PM »
That's a shame, I hoped this would turn out to be more exciting.

Hehe, 'developmnet board'.

Offline public-pervert

  • MassiveMember
  • ****
  • Posts: 106
Re: N64 CPU Upgrade
« Reply #8 on: January 10, 2014, 11:26:04 AM »
Maybe the right guy to clarify things about the N64 hardware, is Marshallh. Try contact him over the Benheck forums.
I really believe that what you're trying, can be done  :D

Offline sonyqrio

  • SmallMember
  • **
  • Posts: 6
Re: N64 CPU Upgrade
« Reply #9 on: February 14, 2014, 12:11:29 PM »
I think that this project is spectacular. So much so that I just had to register to post this comment.

I know what's wrong - why it doesn't work.

As is the case with many embedded CPUs, a small operating system is required to get the chip to do anything useful. In the case of the Nintendo 64, the operating system checks to see if a cartridge is connected and, if one is, starts loading the game by coping the program's data into RAM and jumping to the code for execution.

I'm almost 100% confident that N64s ship with stock NEC VR4300-100s (with a Nintendo branded logo on), as you have suspected, but you're going to have to rip the firmware out of the old chip and flash it to the new one.

If you look at the datasheet you've provided, you can see that the chip has a JTAG bus (JTDI, JTDO, JTCK, etc.) This is exceedingly convenient and will make this process easy. If you've had experience ripping firmware from CPUs before, you are at a major advantage. If not, no sweat. It's not that difficult, you just need the right tools. If you're interested in carrying this further, get yourself some JTAGing software, a JTAG programmer, connect the pins on the programmer to the respective pins on the CPU, and see if you get anything out of the chip. If not, there may be some enable line hiding somewhere that you may have to tie to 5v. You're going to have to use an unmodified N64 for this, as there's no way you're going to get the chip you removed powered up properly (or at least you shouldn't waste your time trying to get it to.) Make sure that when you're JTAGing you don't have any expansion pack inserted in the N64.

Once you've successfully ripped the firmware from an unmodified N64, getting it onto the modified one should be a breeze. Just do the process backwards. Feel free to email me if you have any questions. I'd love to see this work out. (My email is sonyqrio(at)me(dot)com).

Also, hey public-pervert. It's me, SonyQrio, from ModRetro.

Offline public-pervert

  • MassiveMember
  • ****
  • Posts: 106
Re: N64 CPU Upgrade
« Reply #10 on: February 15, 2014, 11:53:12 AM »
Hey Qrio!
I remember following obsessively your worklog for the uGC. Good work! :)

Welcome to the forums btw  ;)

Offline RobIvy64

  • MassiveMember
  • ****
  • Posts: 469
  • Texas!
Re: N64 CPU Upgrade
« Reply #11 on: February 18, 2014, 01:36:42 PM »
Interesting find. This would be beyond my capabilities. Maybe someone else can carry the torch. I'd be happy to sell the motherboard with new CPU at cost :)
"Console Mods" lurker

Offline sonyqrio

  • SmallMember
  • **
  • Posts: 6
Re: N64 CPU Upgrade
« Reply #12 on: February 18, 2014, 01:59:46 PM »
Awh. It's really not that hard! Programmers are really cheap. You've already gone this far, why not finish it up.

If you really decide you don't want to, I'd be willing to buy the board at a reasonable price.

Offline public-pervert

  • MassiveMember
  • ****
  • Posts: 106
Re: N64 CPU Upgrade
« Reply #13 on: February 18, 2014, 11:40:11 PM »
I doubt Nintendo doesn't implemented any FW dump protection, but I still believe this can be done  ;)

Offline RobIvy64

  • MassiveMember
  • ****
  • Posts: 469
  • Texas!
Re: N64 CPU Upgrade
« Reply #14 on: February 18, 2014, 11:46:45 PM »
I have about $30 invested in the N64 and CPU. If you want it for that it is yours.
"Console Mods" lurker

Offline sonyqrio

  • SmallMember
  • **
  • Posts: 6
Re: N64 CPU Upgrade
« Reply #15 on: February 19, 2014, 12:47:19 AM »
Sounds good. PM me your PayPal info.

Offline RobIvy64

  • MassiveMember
  • ****
  • Posts: 469
  • Texas!
Re: N64 CPU Upgrade
« Reply #16 on: February 19, 2014, 01:17:42 AM »
PM sent. Let's keep this project alive!
"Console Mods" lurker

Offline Justin566

  • SmallMember
  • **
  • Posts: 8
Re: N64 CPU Upgrade
« Reply #17 on: February 20, 2014, 10:44:14 AM »
Please post your progress!!

Offline sonyqrio

  • SmallMember
  • **
  • Posts: 6
Re: N64 CPU Upgrade
« Reply #18 on: February 20, 2014, 10:46:35 AM »
I certainly will! RobIvy just sent me the board. It should be here by Saturday. Hopefully I'll have some time to mess around with it.

RobIvy, would you mind posting links to the resources you used during the swap? Eg. The datasheet for the processor and any other information that may have been useful to you?

Offline RobIvy64

  • MassiveMember
  • ****
  • Posts: 469
  • Texas!
Re: N64 CPU Upgrade
« Reply #19 on: February 20, 2014, 12:05:10 PM »
If you are successful, I might swap this VR4310 into an N64 and send it to you for programming :)
"Console Mods" lurker

Offline public-pervert

  • MassiveMember
  • ****
  • Posts: 106
Re: N64 CPU Upgrade
« Reply #20 on: February 21, 2014, 11:45:54 AM »
Can't wait to see where you'll get, Sonyqrio. Please keep us updated  ;D

Offline sonyqrio

  • SmallMember
  • **
  • Posts: 6
Re: N64 CPU Upgrade
« Reply #21 on: February 24, 2014, 03:55:37 AM »
Okay, so...

I got the board in from RobIvy. I also picked up an unmodified board to rip the firmware from which has arrived.

I'm using an AVR Dragon as my JTAG programmer alongside AVRDUDE to dump the firmware. I haven't had a chance to do any tests yet, but I will soon.

Offline RobIvy64

  • MassiveMember
  • ****
  • Posts: 469
  • Texas!
Re: N64 CPU Upgrade
« Reply #22 on: February 24, 2014, 02:07:39 PM »
The CPU in the modified board probably has some sort of HP Laserjet boot software  8)
"Console Mods" lurker

Offline RobIvy64

  • MassiveMember
  • ****
  • Posts: 469
  • Texas!
Re: N64 CPU Upgrade
« Reply #23 on: March 10, 2014, 11:19:10 PM »
sonyqrio is probably too busy enjoying his ultra-fast N64 to be able to post an update  8)
"Console Mods" lurker

Offline public-pervert

  • MassiveMember
  • ****
  • Posts: 106
Re: N64 CPU Upgrade
« Reply #24 on: April 12, 2014, 02:22:43 AM »
He probably loose the interest  :-\

Offline emu_kidid

  • Newbie
  • *
  • Posts: 1
Re: N64 CPU Upgrade
« Reply #25 on: April 16, 2014, 08:32:53 AM »
From #n64dev regarding the "firmware" programmed into the logic:
<marshallh> he needs to read the mips datasheet and learn why that makes no snese
<marshallh> it boots from the pif
<marshallh> it probably didn't work most likely because the solder job was slightly botched
<marshallh> or maybe one of the mode pins was strapped differently in the chip revisions
<marshallh> but yes it should be able to drop right in

Offline RobIvy64

  • MassiveMember
  • ****
  • Posts: 469
  • Texas!
Re: N64 CPU Upgrade
« Reply #26 on: April 21, 2014, 03:37:16 AM »
100% confident it was not my soldering job. I checked each pin for continuity from pin to pad.
"Console Mods" lurker

Offline eb1560

  • SmallMember
  • **
  • Posts: 3
Re: N64 CPU Upgrade
« Reply #27 on: May 02, 2014, 05:45:53 AM »
I just joined the forum moments ago after seeing a thread like this actually existed on the internet.  A few days ago I purchased my own NEC VR4310 (167 MHz) CPU from a merchant on ebay located in Hong-Kong.  Obtaining the VR4310 (167 MHz) seems to be rather easy nowadays, if anyone is interested: http://www.ebay.com/itm/120921407701?ssPageName=STRK:MEWNX:IT&_trksid=p3984.m1497.l2649. I wonder how much the boundary scan can manipulate the console, and how high it can clock stably.

Offline Cybertronic

  • SmallMember
  • **
  • Posts: 2
Re: N64 CPU Upgrade
« Reply #28 on: May 11, 2014, 03:15:25 PM »
I was also under the impression that the N64 OS was indeed on the CPU and it was indeed a system on a chip.

Quote
3.5 N64 CPU
N64 CPU is part of the MIPS R4000 family of processors. The N64 CPU consists of the following components:
an execution unit with a 64-bit register file for integer and floating-point operations
a 16 KB instruction cache
an 8 KB writeback data cache
a 32-entry TLB (Translation Lookaside Buffer) for virtual address to physical address calculation
The Nintendo 64 game runs in kernel mode with 32-bit addressing. 64-bit integer operations are available in this mode. However, the 32-bit C calling convention is used to maximize performance.
For more information on the R4300 and the operating system control of the CPU, see the MIPS Microprocessor R4000 User's Manual, R4300 Specifications, and Chapter 6, "N64 Operating System Overview".
« Last Edit: May 11, 2014, 03:34:39 PM by Cybertronic »

Offline NFG

  • Runs the place
  • Administrator
  • ThrobbingMember
  • *****
  • Posts: 3408
    • NFGgames
Re: N64 CPU Upgrade
« Reply #29 on: May 11, 2014, 03:42:27 PM »
Quote from:    Cybertronic
I was also under the impression that the N64 OS was indeed on the CPU and it was indeed a system on a chip.
Certainly there's nothing in what you quoted that suggests it's a SoC design, and the image you included suggests exactly the opposite.  It clearly shows a CPU connected to the RCP chip by the MBUS.  I would guess that one of the following things is possible:

1. I don't know what a SoC is.
2. You don't know what a SoC is.
3. You're confusing the N64 with the iQue Player  which was a SoC N64 system released in China.

Offline Cybertronic

  • SmallMember
  • **
  • Posts: 2
Re: N64 CPU Upgrade
« Reply #30 on: May 12, 2014, 03:41:08 AM »
You didn't have to be so blunt about it.  :-\

So then the N64 OS is actually a thread loaded by the game pack when it loads the game possibly?

Every time I consult the manual its very sketchy about the NuSystem. I have been messing around with LibDragon and got things to boot but I still have no idea how the N64 actually operates. Mostly everything on the RCP is virtualized and is completely reconfigurable.
« Last Edit: May 12, 2014, 04:02:34 AM by Cybertronic »

Offline NFG

  • Runs the place
  • Administrator
  • ThrobbingMember
  • *****
  • Posts: 3408
    • NFGgames
Re: N64 CPU Upgrade
« Reply #31 on: May 12, 2014, 10:00:37 AM »
Quote
You didn't have to be so blunt about it.
I don't see anything particularly blunt in my reply, but Western society has developed a particular dislike of being corrected.  Perhaps you're inferring insult where none was implied.  I'm not sure how else I can tell someone "I think you're wrong, and here's why" but certainly if you have any suggestions you're welcome to PM me.  ;)

Offline eb1560

  • SmallMember
  • **
  • Posts: 3
« Last Edit: May 30, 2014, 07:53:29 AM by eb1560 »

Offline MRKane

  • SmallMember
  • **
  • Posts: 3
Re: N64 CPU Upgrade
« Reply #33 on: September 02, 2014, 10:54:55 AM »
Gidday,

Long time tinkerer, first time poster here. I've been working with replacing the RAM on the N64 board with something that has a lower latency as that appears to be the bottleneck in many of the higher aspect games. While the pinout seems simple enough it's the serial arrangement of the older board that are hampering my efforts. I noticed you swapped the ram out on yours for the NEC A60s, do you think that A50s would remove the latency issue while having the same speed as the original RDRAM chips? And do you have any suggestions on the ram replacement front? I'm also unsure as to how accurate the pinout information I've got is - might search this forum a bit deeper for that now that I've found it.

I hark from the GE/PD mod front, and did also wonder if the ROM header could be modified to offset the increase in overclock speed (kind of backwards to the suggestion earlier in the thread) so it'd remain at playspeed through the overclock - just a thought ;)

Offline public-pervert

  • MassiveMember
  • ****
  • Posts: 106
Re: N64 CPU Upgrade
« Reply #34 on: September 02, 2014, 09:20:10 PM »
You sound like a GE/PD speedrunner  ;)

Offline MRKane

  • SmallMember
  • **
  • Posts: 3
Re: N64 CPU Upgrade
« Reply #35 on: September 02, 2014, 09:27:56 PM »
LOL no! But I am part of the crowd that's been working on the editor for those two games, and it's always been the excessive use of transparents which pull PD down, which led me to wondering about the RAM, which led me to here. Another day of searching and I'm still no closer to finding a suitable replacement - getting close to a weeks worth of looking now, think I'm more at home inside code than hardware ;)

Offline eb1560

  • SmallMember
  • **
  • Posts: 3
Re: N64 CPU Upgrade
« Reply #36 on: September 09, 2014, 06:46:41 AM »
Quote
Gidday,

Long time tinkerer, first time poster here. I've been working with replacing the RAM on the N64 board with something that has a lower latency as that appears to be the bottleneck in many of the higher aspect games. While the pinout seems simple enough it's the serial arrangement of the older board that are hampering my efforts. I noticed you swapped the ram out on yours for the NEC A60s, do you think that A50s would remove the latency issue while having the same speed as the original RDRAM chips? And do you have any suggestions on the ram replacement front? I'm also unsure as to how accurate the pinout information I've got is - might search this forum a bit deeper for that now that I've found it.

I hark from the GE/PD mod front, and did also wonder if the ROM header could be modified to offset the increase in overclock speed (kind of backwards to the suggestion earlier in the thread) so it'd remain at playspeed through the overclock - just a thought ;)
« Last Edit: September 09, 2014, 07:18:30 AM by eb1560 »

Offline MRKane

  • SmallMember
  • **
  • Posts: 3
Re: N64 CPU Upgrade
« Reply #37 on: September 09, 2014, 08:26:35 AM »
Sorry for deviating off topic there - I felt it was kind of related, but feel free to [re]move my posts if need be.
Outstanding information there eb1560! Thanks for the information! Back to the drawing board for me it'd seem. :)

Offline sonyqrio

  • SmallMember
  • **
  • Posts: 6
Re: N64 CPU Upgrade
« Reply #38 on: March 20, 2018, 06:50:07 AM »
Sorry - I've been playing my ultra fast N64 non stop for 4 years. Really couldn't get enough of it.

Unfortunately, I was never able to dump anything from the chip. MarshallH is right, there is no ROM inside of the CPU that contains anything - the system boots from the PIF ROM which is memory mapped by the RCP. The head of this map is jumped to at reset by the MIPS CPU.

I'm still interested in continuing this project. I have a friend who got this to work by lifting some of the pins of the stock CPU on the N64 board and tying them low. I still have RobIvy's board and I might give that a shot in the upcoming month as I have some more free time now.

I also want to start investigating what it would take to get an N64 booting from a MIPS CPU they still actively make so that clones of the board could be produced with all new-stock components, with the exception of the RCP. Let me know if any of you know an P/Ns that might work for this.

- SQ

Offline RobIvy64

  • MassiveMember
  • ****
  • Posts: 469
  • Texas!
Re: N64 CPU Upgrade
« Reply #39 on: August 21, 2018, 09:10:13 AM »
RIP this topic.
"Console Mods" lurker