fix Tang onboard BL616 SDcard / USB pendrive SRAM core loader
BL616 Tang onboard MPU mass storage FPGA SRAM loader
- FPGA SRAM loader for Console 60k / 138k SDcard slot and USB memory stick. SD served first
- FPGA SRAM loader for Nano 20k, Mega138kPro, Primer 25k, Mega 60k NEO from USB memory stick
- support of on the fly FPGA pin change from SPI to JTAG (V_JTAGSELN) to download a new core (for enhanced cores only)
- support of BL616 debug console output forwarding to core (for enhanced cores only)
- ease of FLASH programming in PC connected mode (for enhanced cores only)
TN20K: You need to press and keep Tang S2 button during power-up (release after) in order to invoke the loader in case no MiSTle blank image already burned to FLASH. USB pendrive need to contain core.bin (or core.fs)
Console60K/138K Mega60k / Mega138kPro / Primer25k:
You need to press and keep Tang S1 button longer than 5sec pressed during power-up in order to invoke the loader in case no MiSTle blank image already burned to FLASH.
SD Card need to contain core.bin (or core.fs) or alternatively
USB Stick need to contain core.bin (or core.fs)
Lid RECONFIG button can also be used to prevent loading from FLASH and usage of mass storage loaded cores.
Note
Cores that support prevention of automatic FLASH load at power-up (by S1 button) are not yet in full scale released. As back-up you have to burn to FLASH Console 60k MiSTle blank image. MiSTle-dev image will be shown for 5 sec and then core from mass storage loaded. Similar Nano20k MiSTle blank image.
For other boards you can write some arbitrary garbish (e.g. a ROM) at FLASH Location 0x0 to always load from storage. Use for that the exFLASH C bin Erase/Program function.
The .bin can be generated from the .fs file using the gowin programmer in case not yet available.
programmer_cli --filestransform 1 --files C64Nano_Console60k.fs
rename the output of the tool (merged.bin) to core.bin and copy to your SDcard
During download screen will blank.
You need to release the Tang S1 button now.
load time for a core in binary format (core.bin) from SDcard or USB pendrive
tn20k 0.83 sec
tc60k 1.3 sec
tp25k 0.5 sec
tm138kpro 4.3sec
Presently core.fs load is not accelerated and it takes about 45sec to download on a tn20k.
You can easily now keep two core images at a time. One core FLASH'ed and one as file from SD / USB.
Keep during power-up Nano20k S2 button pressed or e.g. Console S1 button pressed for 5sec and core will be loaded from disk otherwise the FLASH'ed one will be taken into use.
for a build:
pull SDK update ! https://github.com/MiSTle-Dev/bouffalo_sdk/tree/cherryupd3
SDK was buggy related to USB fatfs operation
A code fragment from TangCore had been taken into use to accelerate download time especially for BL616 use. All generic JTAG routines are from Till or adapted from openFPGALoader. SRAM erase sequence had been experimental adjusted based on consulting different Gowin manuals and differs sigificantly from openFPGA loader.
Important
The Companion JTAG control signal polarity changed in this release. Use latest enhanced C64 core for proper function.