kbeckmann/PicoDVI-N64

Bootloader and flash partitioning

kbeckmann opened this issue · 2 comments

Bootloader and flash partitioning

Hej,

The bootloader I'm working on (https://github.com/marian-m12l/PicoDVI-N64/tree/ota) is starting to be usable.

The idea is as follow: bootloader/upgrader (ota application) is the primary firmware on the pico. PicoDVI-N64 (n64 application) is flashed at a fixed offset (0x100000) and needs to be built with a custom linker script. This is optional and the default build for n64 can still be flashed as the lone firmware.

Feature-wise here's what's supported:

  • If a n64 firmware is installed in flash (binary_info can be read), the bootloader hands over asap
  • If no firmware is installed, the bootloader is fully booted
  • If Z + Start are held on the controller at boot time (the firmware actively sends a "controller status" command on startup because the console/game will usually only initialize the controller after a few seconds), the bootloader is fully booted
  • The bootloader starts:
    • DVI output with a text console
    • Wi-Fi access point (SSID ota)
    • DHCP and DNS servers
    • HTTP server with a form to upload a firmware binary
  • Upon connecting to the access point, the user should be directed to http://192.168.4.1/ota (tried to move it to 192.168.64.1 as it felt more appropriate :-D, but something must be broken)
  • The web interface shows the currently installed firmware, and a form to upload a new firmware .bin file (there's no support for .uf2 files)

I'm willing to open a PR, but I you prefer making your own bootloader, feel free to take anything that can save you some time :-)