-
Notifications
You must be signed in to change notification settings - Fork 111
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
debug: add support for reading from SD to SDRAM in flashcarts
Normally, reading from SD cards involve first issuing a flashcart-specific command to read SD contents into SDRAM (which is mapped in PI space as "ROM"), and then run a PI DMA transfer to copy contents into RDRAM, just like the data was in ROM. There are use cases in which there is no need for the second half: the data can stay in SDRAM and be consumed from that. A common one is flashcart menus that want to load a ROM to boot, and don't need data to go into RDRAM (it wouldn't even fit). This commit adds support to this use case by simply checking if the pointer provided to disk_read (and thus, to fread() by the user) is in RDRAM or in a PI-mapped space, and calling a new flashcart hook in the latter case. This is implemented for now on 64drive and SC64.
- Loading branch information
Showing
3 changed files
with
57 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters