[Suggestion] Add syntax for uploading a portion of a file in UNFLoader. #111
Labels
UNFLoader
This is related to the UNFLoader tool
USB Library
This is related to the USB library (usb.c)
Expected Behavior
Currently, you can only upload an entire binary file by surrounding a path with
@
symbols when you send a command through UNFLoader. I'd like to be able to send a range of bytes of the file.Possible Solution
I'm thinking it could be implemented like:
@file.bin[start:end]@
. The actual syntax doesn't really matter to me, just having the feature would be nice.Context (Environment)
I recently added hot-reloading support to Diddy Kong Racing, in which I only reload the first megabyte of the ROM instead of the entire thing. During the building of the ROM, I added an extra step at the end to create a new file that contains only the first megabyte of the ROM to upload. I'm not actually monitoring if the ROM itself has changed for the hot reload, but instead I'm monitoring that copy.
Possible Implementation
debug_send()
inUNFLoader/debug.c
would need to be modified just before the fopen.I made a function that can parse the range and should be easy to slot in:
Here are a few examples of it's usage:
Note that
file.bin[:]
would have the same output asfile.bin
.You would need to check the bounds to the size of the file. if
end
is larger than the size of the file, which it is by default, then you'd need to overwriteend
with the size of the file.The text was updated successfully, but these errors were encountered: