feat(): Add Writing system for Batocera #213
Merged
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 PR does a bunch of things:
It adds 2 new http rest endpoint ( to be discussed ):
Those endpoint are designed in get to make interoperability with curl easy.
They are supposed to work on SD card distribution saving a string into a state variable without using they file system.
To be honest the same could have been done doing something like
and using cat for the opposite
I'm open to both approaches if we know we are not hammering the sd card.
This command runs every time you move in the batocera UI from a game to another.
This PR also wrap the
-write
API with the disable run script wrapper.It was happening to me i wasn't able to write on an already written tag otherwise.
(@wizzomafizzo is this possible? a batocera issue? a my issue? an old bug?)
Then this pr adds 2 scripts for batocera to work:
zaparoo_write_game.sh
goes into/userdata/system
while
zaparoo_game_select.sh
goes into/userdata/system/configs/emulationstation/scripts/game-selected
Finally there is the last file
multimedia_keys.conf
this one goes into/userdata/system/configs
I think that probably the best thing to do here would be create a folder structure that reflect those paths so that we can use a zip to deploy them into batocera easily.
Each game selection the zaparoo_game_select script will write in a state variable the current rom path, pressing META + W will trigger writing, with messaging on the screen to place a card on the reader.
Overall i m pretty much happy with the result, but we need to discuss the implementation details.