Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

User configurable setting for N64 Controller Pak size #1876

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

rasky
Copy link
Collaborator

@rasky rasky commented Mar 3, 2025

Continuation of #1664 by @Cuyler36

This PR adds support for user configurable N64 Controller Pak bank sizes. The motivation for this comes from Doubutsu no Mori. A NES emulator is included which can load Famicom/NES ROM images from the Controller Pak. The standard 1 bank 32KB Controller Pak is far too small for most games. Ares is the only N64 emulator that I've found which both runs the NES emulator and can load data off of the Controller Pak.

The N64 Controller Pak can support up to 62 banks of 32KB each. Nintendo did not utilize this feature as far as I'm aware, but Datel did make a 128KB 4-bank Controller Pak. Bank switching is done by writing to the Controller Pak with address line 15 enabled. The desired bank is sent to an IC on the Controller Pak as one block of bytes (32 bytes). The IC keeps track of the selected bank when further reads and writes happen.

The default should be 1 bank or 32KB of space which preserves compatibility with existing Controller Pak files.

@rasky
Copy link
Collaborator Author

rasky commented Mar 3, 2025

I've tested the PR and it appears to work correctly. I've fixed one bug related to the reply of standard cpaks to bank switching commands (it should be ignored without reporting an error).

I'm going to test it further for some dev work I'm doing, but I think this is still a good start that could be merged as-is.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants