Merge down to trunk
Several requests to get some of these features back up and running on the mist.
- Status changed from New to In Progress
Made an svn copy of existing trunk (branches/releases/trunk_20181013_premerge)
Also made a backup of lots of random local stuff on my trunk checkout!
Going to merge down the entire eclaireXL branch and start working on trunk.
This will break a lot, since there are a lot of specific eclaire firmware features for instance.
5200 ntsc is working on mcc.
Trying to merge the two firmwares...
So menu structure is different, flash support and pll support. Commenting those and it builds, except its too large for some targets (>32k).
Probably need to write a simple generic menu thing and use it instead of this massive hack.
freezer 1024 1
antic 1536 1
scandoubler1 14600 2
scandoubler2 14600 2
zpu rom 327680 40
zpu ram 16384 2
" 16384 2
" 16384 2
" 16384 2
sio fifo rx 3840 1
sio fifo tx 2048 1
usb fifo rx 512 1
usb fifo tx 512 1
total ... 58. Perhaps I can specify the fifo to use logic elements instead. Or back to shrinking that zpu rom... Really should be able to get it into 32k!
Probably split into too many functions, adding function call overhead...
Anyway should probably target some of these big items:
nm --print-size --size-sort --radix=d ECLAIREXL.elf | less
0007457 00000527 T tfp_format
00012850 00000571 T flash_rpd
00003149 00000617 t follow_path
00003760 00000627 T pf_mount
00032220 00000633 T usb_dispatchPktWithData
00018367 00000656 T handleRead
00009291 00000685 T display_menu
00005062 00000720 T pf_readdir
00033905 00000769 T usb_poll
00016633 00000915 T set_drive_status
00006091 00001083 T file_selector
00019667 00001179 T loadAtxSector
00029689 00001464 T parse_report_descriptor
00058972 00001568 B devices
00021992 00001880 t usb_hid_parse_conf
00023478 00003296 t usb_hid_init
00026289 00004307 t usb_hid_poll
Need to save 6k. Lots of complexity in the USB, largely for supporting the custom mcc joysticks. I could comment them but its mostly for the MCC that I have memory issues so I want to support the official joypads!
Idea: Really USB pollling is simple, send an in request then a byte stream is returned with some bits set/unset (buttons) and signed/unsigned values (axes). Could store a file with a mapping in per vid/iid and have simple code to apply. So we simplify structure and use files for custom devices.
Perhaps I could even write byte stream to a hardware buffer and have regs for axis offset, axis type (signed/unsigned), button offset. Then poll becomes just sending an in request and writing to this hardware buffer. init becomes initializing these regs from a vid named file (optional) or decoding HID.
That is really the main existing boards that worked well. Might do a release build with this state.After which these remain...
- papilio duo - simple port. Since its xilinx will need to fix the fifo (using Intel IP...)
- fpgaarcade - never did a decent port but am keen to wire it up properly
- de1 - will probably limit to: pure de1, de1 with 'standard' joystick ports and skip my breakout boards. I imagine anyone who has them not has the real deal (i.e. eclaireXL).
- sockit - keen to try the ddr3 ram and also the hps->fpga pin rererouting stuff.
- aeon lite - if my soldering still works!
#38 Updated by foft about 2 months ago
Freezing/restarting all the clocks with my state machine works just fine. I wonder if the reconfig somehow destroys the phase relationship between the clocks or something.
i) Create another high frequency clock with the USB PLL (not reconfigured)
ii) Delete the non-pll stuff to make space
iii) Add a signal tap logic analyzer to look at the clocks
#40 Updated by foft about 2 months ago
OK, don't think it was that.
Wrote a much better state machine, configure pll 1 while pll 2 is in reset, wait for it to no longer be busy, wait for it to sync, wait a bit longer for luck, then onto the same for pll 2. Didn't work...
Then messed around a lot and got something working. I do not actually need to reconfigure pll2 (downstream pll) and just re-configuring upstream while resetting downstream works!! I do not understand it but am happy to have a solution.
Trying to wire it up to pal signal so I can switch back and forth.