Feature #76
openMerge down to trunk
Added by foft about 6 years ago. Updated about 3 years ago.
0%
Description
Several requests to get some of these features back up and running on the mist.
Updated by foft about 6 years ago
- Subject changed from MIST backport to Merge down to trunk
Updated by foft about 6 years ago
- Priority changed from Normal to High
Keen to get this work back on the mainline.
Updated by foft about 6 years ago
This will probably break many (other platform) core builds on trunk in the short term...
Updated by foft about 6 years ago
- 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.
Updated by foft about 6 years ago
Easy part done, merged down.
For now I branched firmware into firmware_eclairexl and firmware_legacy (for other platforms).
However common is probably incompatible with the other core builds to some degree... Probably nothing too major.
Updated by foft almost 6 years ago
György spurred me on by fixing the mist for 5200.
I've merged his changes.
I've also made a start at getting other cores building. So far mcc216 builds. Firmware is going to need merging to make these work though, but having them build is a good step...
Updated by foft over 5 years ago
Allowed targets without usb to build. The code expected the 48MHz clock to generate the 1MHz tick, which needed to be more accurate for atx support.
Updated by foft over 5 years ago
Got the legacy firmware to work against the new hardware. At least the mcc216 is working in a8 mode...
Unfortunately need to save a few hundred bytes to fit atx support.
Updated by foft over 5 years ago
Trying to program 5200 ntsc... getting there, but not quite!
Updated by foft over 5 years ago
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.
Updated by foft over 5 years ago
Trying to get the 40k eclaire rom working 'as is' on the mcc now.
All building ... but ...its erasing my sd card! Hmmm, what is going on here...
Updated by foft over 5 years ago
Now trying to get Chameleon 1 back up and running ... before moving onto Chameleon 2. So far got the Atari screen but sio seems broken for some reason.
Updated by foft over 5 years ago
Done most of chameleon2 wiring with the new helpers... Just a few things remain then I can try it:
- 8MHz->50MHz in plls
- Assign pins in qsf
- Solder on jtag
- Change device to cyclone 10 in qsf
- Cross fingers!
Updated by foft over 5 years ago
- 8MHz->50MHz in plls
- DONE:Assign pins in qsf
- Solder on jtag
- DONE:Change device to cyclone 10
- Install cyclone 10 support to quartus
- Cross fingers!
Updated by foft over 5 years ago
Enough for today!
- 8MHz->50MHz in plls
- DONE:Assign pins in qsf
- Solder on jtag
- DONE:Change device to cyclone 10
- DONE:Install cyclone 10 support to quartus
- Upgrade all ip to cyclone 10
- Cross fingers!
Updated by foft over 5 years ago
I think chameleon 1 and chameleon 2 are good. firmware_eclaire is running on them and also on the eclaire.
Heading back to some other targets soon.
Updated by foft over 5 years ago
Building the mcc216 with this latest firmware + plumbing changes. Realized the scandoubler will not fit in the memory at the same time as this larger firmware, arg!
Updated by foft over 5 years ago
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!
Updated by foft over 5 years ago
Tried building with riscv and the firmware size dropped from 37KB to <32KB. Which is great! So might need to reactivate the zpu->riscv plan...
Updated by foft over 5 years ago
That was with 64-bit riscv, switched to the 32-bit version and its bigger: 39512
Updated by foft over 5 years ago
Experimenting with replacing the menu with a simple structure/code approach, should cut code size somewhat.
Updated by foft over 5 years ago
Haha, working and much neater, but 300 bytes more
Updated by foft over 5 years ago
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
Updated by foft over 5 years ago
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.
Updated by foft over 5 years ago
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.
Updated by foft over 5 years ago
Perhaps a state machine to do the in request too, then I do not even need to call poll.
Updated by foft over 5 years ago
Saved some memory in USB and also saved some memory by disabling flash. Now fits in 36K on MCC, with a little space. Will do for this board, can save the things I thought of above for later!
Updated by foft over 5 years ago
mcc_5200 seems fine (minimal changes here). Next up mcctv... Tried to merge diff and quite a lot of failed hunks, will have to do manually.
Updated by foft over 5 years ago
mist 800xl is working. Skipping mist 5200 since it has been converted into a zpu-free core by György
Updated by foft over 5 years ago
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!
Updated by foft over 5 years ago
Released a first cut of them here http://www.64kib.com/autobuild/20190622/
See http://www.64kib.com/autobuild/changes.txt
Updated by foft over 5 years ago
Trying to get pll switching working on other boards (different ip than on cyclone v)...
Updated by foft over 5 years ago
So near and yet so far... Re-configures and still have ready screen at slightly different frequency. But ZPU and 6502 seem to have locked solid. Not sure why, I'm freezing the clock and holding reset high. Must be some kind of glitch I guess.
Updated by foft over 5 years 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.
Plan:
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
iv) Profit!
Updated by foft over 5 years ago
Results are in, think its sync between the clocks
Updated by foft over 5 years 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.
Updated by foft over 5 years ago
reset to put back original settings does not crash, but does not put back settings!
Updated by foft over 5 years ago
PAL/NTSC switching canned test is working on mcctv:-)
Updated by foft over 5 years ago
Wired up svideo_gtia while I'm at it (i.e. direct palette to svideo, rather than via rgb), looks a bit better... Was mostly since the ntsc palette was not correctly supported.
Updated by foft over 5 years ago
Last thing to finish up this mcctv version is to make profiles work on the sdcard I guess, one for another day.
Updated by foft about 3 years ago
- Status changed from In Progress to Resolved
Been back on trunk for years now, should close this!