-
Notifications
You must be signed in to change notification settings - Fork 69
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
Pico loader #877
Draft
Daft-Freak
wants to merge
68
commits into
32blit:master
Choose a base branch
from
Daft-Freak:pico-loader
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Pico loader #877
Conversation
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
Which currently doesn't happen
Right now it's just a BLIT header instead of boot2, built at a 512k offset to allow launching one thing without position independent code
Seems a bit weird, but needed to get the right framebuffer size
It's... not unusable
Launches the first thing it finds. has some fixed locations for API consts/data.
No update/tick, page-flipping doesn't work, firmware uses 130k RAM
Only builds one at a time, which causes less problems. Controlled by PICO_STANDALONE_UF2/PICO_BLIT in blit_executable or BLIT_EXECUTABLE_PICO_STANDALONE_UF2/BLIT_EXECUTABLE_PICO_BLIT globally
This reverts commit dd0fec9.
firmware now reserves 32k of RAM (may need less)
larger project for the future: share this code
So that it actually does the thing it's supposed to do
Instead of returning the loader's data
Thought I had a corrupt SD card, but it was just every game writing their saves to the same place
Technically it would work from the flash-based storage as well, but that seems a bit silly
This should be replaced with the auto-update logig from the STM32 firmware at some point
Another api wrapper
Now a class with some helpers instead of a global uint8_t array
Gets rid of a bunch of linker warnings
In the transpose case this'll fault hard... Instead of just messing up some DMA
We've got two incompatible devices here now
Will be useful when we're using address translation
This requires compiling them for a 4MB offset
I think this is it, doesn't seem to be any helpers in the SDK...
This has been broken since set_framebuffer...
This is the only way for switching between two double-buffered modes to work
It's all low-level stuff the loader should've done
Hopefully fixes random button presses at startup?
It does things we need to not crash and doesn't do any of the things that caused problems on 2350
Might fix that in short order! No controls tho... |
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.
I finally untangled this!
Building with
BLIT_EXECUTABLE_PICO_BLIT=1
creates .blit files instead of .uf2s, these are mostly portable between devices. (The framebuffer size is still set a compile time, so if you have the board set to PicoSystem (the default) the resulting .blit won't run on a device with a > 240x240 display. PicoVision is unaffected by this as its framebuffer is in the PSRAMs)Installing multiple blits requires manually building them for different offsets (
-DBLIT_EXECUTABLE_PICO_BLIT_OFFSET_KB=x
), the launcher is built at a lower offset be default. On RP2350-based devices address translation is used to support running blits from any offset. Not much hardware to try that on though...Some of the CDC API used by the tools is supported and can be used to flash blits onto a PicoSystem. This requires manually specifying the port as the tools don't recognise the VID/PID. (Which should probably be changed to something other than 0xCAFE first).
There's currently no menu but the "hold HOME to exit" feature is there. (If the device has a HOME button... Sorry PicoSystem users.)
Still a lot of missing bits and duplicated logic with the -stm32 port, I have some plans to clean that up a bit. Need to see what it looks like complete first though...
(May edit if I remember more details... Been working on this for > 1.5 years...)