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

Fix RDRAM initialization #1111

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Rosalie241
Copy link
Contributor

@Rosalie241 Rosalie241 commented Jan 14, 2025

This patch does the following:

  1. It changes the corrupt handler's toggle by checking all modules its CC value
  2. It fixes the idfield_value function which incorrectly captured the 16-24th bits instead of the 8-16th bits
  3. It only captures the first 15 bits instead of the full 16 bits for comparison
  4. It adds support for the swapfield value of the AddressSelect register
  5. It adds a bounds check to read_rdram_dram_corrupted for the dram address like read_rdram_dram has
  6. It fixes the mapping.end value in map_corrupt_rdram to match the one in device.c

This patch allows the libdragon IPL to boot without using hacks like setting the RI_SELECT register to a nonzero value or checking which register is targeted by a broadcast.

I want to thank @rasky for helping me debug some issues.

You can test this code using a simple n64-systemtest build with the libdragon IPL which only runs 1 test: n64-systemtest.zip

You can view the documentation here:

@Rosalie241 Rosalie241 marked this pull request as draft January 14, 2025 23:10
@Rosalie241 Rosalie241 force-pushed the rdram-init branch 2 times, most recently from 852bace to 32f4497 Compare January 14, 2025 23:59
@Rosalie241 Rosalie241 changed the title Implement RDRAM initialization without corrupted handler Fix RDRAM initialization Jan 14, 2025
@Rosalie241 Rosalie241 force-pushed the rdram-init branch 3 times, most recently from 0c61914 to 778b543 Compare January 15, 2025 00:34
@Rosalie241 Rosalie241 marked this pull request as ready for review January 15, 2025 12:51
@kapstok
Copy link

kapstok commented Feb 19, 2025

Maybe this is not the right place to post this, but I tried to compile and run your version and a new version from ui console and sdl input. This version froze on running the n64-systemtest rom and other roms that use libdragon. Are there also other dependencies that have to be built first? I downloaded and installed the 2.6.0 release as base for the other dependencies.

@Rosalie241
Copy link
Contributor Author

Rosalie241 commented Feb 19, 2025

Maybe this is not the right place to post this, but I tried to compile and run your version and a new version from ui console and sdl input. This version froze on running the n64-systemtest rom and other roms that use libdragon. Are there also other dependencies that have to be built first? I downloaded and installed the 2.6.0 release as base for the other dependencies.

Please read the PR carefully:

This patch allows the libdragon IPL to boot without using hacks like setting the RI_SELECT register to a nonzero value or checking which register is targeted by a broadcast.

this patch only allows the libdragon IPL to boot, it doesn't make n64-systemtest fully pass or make libdragon games run properly, the latter requires RSP accuracy improvements which I might try to do sometime by backporting some simple64 patches and upstreaming those.

I'd also like to mention that a LLE RSP and video plugin will be required regardless (for example parallel-rsp and angrylion-rdp-plus or parallel-rdp) alongside using the cached or pure interpreter, the dynamic recompiler has many issues.

@kapstok
Copy link

kapstok commented Feb 20, 2025

Ah, thank you for clarifying :)

Thought that the boot of the libdragon IPL was the only obstacle that prevented mupen from fully running libdragon roms.

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

Successfully merging this pull request may close these issues.

2 participants