Limit RDRAM initialization to 4 chips when Expansion Pak is marked as unused - #1009
marian-m12l wants to merge 3 commits into
Conversation
…s active and breaks the warm boot loop that measures memsize by testing each bank
|
Testing on hardware showed that writing/reading past 4MiB would still work. This was masked at first by limiting the warm boot path to 4 chips; leaving that loop alone reported 8MiB on a warm boot on hardware, and my rom had no issue using that extra RAM. Upon stopping initialization of the extra chip ( |
I think there is indeed some utility in having an n64tool option, so developers have the flexibility to use different interfaces to enable this feature, depending on their needs or workflows. Perhaps some comments in Also if this is accepted, a revision to Disclaimer: Definitely defer to more active contributors' feedback before implementing what I have suggested. This feature is interesting to me. I'm happy to see someone work on it. Happy to help test this on an NTSC console, e.g. with https://github.com/rasky/n64memtest or https://github.com/meauxdal/N64-Revision-Test, if you are interested. |
|
@gobbledygoober Thanks for the feedback. I decided to rely on I prepared an update to the readme but didn't push it because it mentions a revision and I'm not sure it's worth mentioning in the features: |
|
Since issue #425 was opened, the development situation has improved quite a bit. Ares now supports emulating a 4 MiB console; libdragon warns if more than 4 MiB are used without checking for expansion pak first. I've seen multiple developers targeting 4 MiB with the current tooling without further requests being made. So I wonder: do we still need this? What is the use case? |
|
I couldn't resist, so I gave this a try. Before the change Before the change
I believe meeq and others have mentioned the need for this recently with the intent of testing how their ROMs behave with and without Expansion Paks, without physically removing and swapping for a Jumper Pak. Aside from the manual work involved, we may not know for how many insertions the connector is rated. Edit: added link to recent Discord conversation |
I guess the use case is limited to testing / validating the 4MiB target on hardware with an Expansion Pak. I wanted to give this a try after the recent discussions mostly out of curiosity. I don't have a real need myself, but my second-hand N64 came with Expansion Pak only so I cannot swap it with a Jumper Pak, and I guess it's rather common for N64 owners to have ditched the useless Jumper Pak. |




This PR is an attempt at addressing issue #425.
It limits RDRAM chips discovery/initialization to 4 chips, essentially simulating running on a console with Jumper Pak only.
It currently relies on the Expansion Pak being marked as "unused" (value 0x01) in the Homebrew ROM header (bits 2-3 at offset 0x3f), but I can see how this may not be wanted (this header is informative, after all). As an alternative, the flag to ignore Expansion Pak could be added by n64tool in another unused header field (e.g. reserved field at offset 0x18), or even in the TOC maybe?
I've tested on real hardware (PAL N64) with a dev IPL3 (prod IPL3 signing underway). On ares it seems to always take the warm boot path?
I have yet to test writing/reading past the 4MiB threshold, but I expect it to fail on hardware, but not on ares (as evidenced by the need to limit the warm boot test loop to 4 chips).
I tried to keep the diff concise yet readable. I'm eager to hear your thoughts on this, especially regarding how to handle the iQue as I'm not familiar with its idiosyncrasies.