Ability to manually edit Wiimote/CC mappings#1240
Open
smdstudios wants to merge 2 commits into
Open
Conversation
Provides ability to load Wiimote/CC mappings from .ini file on USB/SD card
eku
suggested changes
Oct 15, 2024
| // Try to load Wiimote/Classic Controller bindings from ircc.ini | ||
| const char *filenames[2] = { | ||
| file_sd, file_usb, | ||
| "sd:/ircc.ini", |
There was a problem hiding this comment.
Why not in the app directory?
Cluttering up the root directory with all kinds of files is not nice.
| // File found, read the configuration | ||
| size_t fsize = f.obj.objsize; | ||
| UINT read; | ||
| f_read(&f, (void*)IR_CFG_FILE, fsize, &read); |
Author
There was a problem hiding this comment.
Yes, IR_CFG_FILE and IR_CFG_SIZE still need to be defined first with addresses. HID.c of course defines its equivalent terms, but I still need applicable addresses for Wiimotes/CC's: https://github.com/FIX94/Nintendont/blob/master/mem_map.txt
For now I've allocated 0x93005180 and 0x93005184 respectively.
| FIL f; | ||
| FRESULT res = FR_DISK_ERR; | ||
| for (i = 0; i < 2; i++) { | ||
| res = f_open_char(&f, filenames[i], FA_READ | FA_OPEN_EXISTING); |
Author
There was a problem hiding this comment.
Well, it's written the same way in the HID controller loader: https://github.com/FIX94/Nintendont/blob/a69f2f134daf0f06a1b01da4b5337a984ac6dcf1/loader/source/HID.c
define IR_CFG_FILE and IR_CFG_SIZE
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This changes the Wiimote/Classic Controller loader (BT.c) to attempt to load user-defined button mappings from an ircc.ini file located on the root of the USB/SD card; if this file is not found, then Nintendont will proceed with the default bindings undisturbed.
That said, I am unsure which file in the code defines all the bindings. As we know, by default the motion controls operate the C-stick, but BT.h didn't seem to control this. If I could find the relevant file(s), I could provide an example ircc.ini file pronto!