MISTer on DE0-nano?

https://github.com/MiSTer-devel/Main_MiSTer/wiki

Moderators: Mug UK, Zorro 2, Greenious, spiny, Sorgelig, Moderator Team

olin
Atariator
Atariator
Posts: 22
Joined: Tue Nov 21, 2017 8:57 pm

MISTer on DE0-nano?

Postby olin » Tue Nov 21, 2017 9:12 pm

MISTer looks like a very interesting project. I found out I still have my DE0-nano board laying around unused. I was wondering whether / how hard would it be to port MISTer from DE10-nano to DE0-nano? I'm aware that the FPGA in DE0-nano has 'only' 40k of LEs, so won't be able to run all cores, but in general the board layout and header location seems quite similar (if not identical, didn't do thorough check). Also there is the dual core ARM HPS on the board and a USB port. HDMI chip and connector is missing, but I guess that is resolved by one of the add-on boards with VGA out. BTW. DE0-nano is $30 cheaper than DE10-nano ATM, so it might be an interesting option...

Any thoughts?
Cheers!

Sorgelig
Atari God
Atari God
Posts: 1196
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: MISTer on DE0-nano?

Postby Sorgelig » Tue Nov 21, 2017 9:21 pm

I'm sure, it's possible to port MiSTer to DE0-nano.
Probably Linux part of MiSTer will work without any modification. All extension boards should be compatible as well.
Only FPGA part will require special config to be able to compile for DE0-nano. It will require specific to DE0-nano pin assignment, and removing HDMI part. Actually Video scaler can be tweaked for VGA output (just need to adjust blanking signals) so you can get perfect VGA which will work with any standard monitor/TV (not like raw video which uses incompatible format).

I personally don't have DE0-nano, so i cannot help with porting and fine adjustments.

olin
Atariator
Atariator
Posts: 22
Joined: Tue Nov 21, 2017 8:57 pm

Re: MISTer on DE0-nano?

Postby olin » Tue Nov 21, 2017 9:48 pm

Thanks for the info, that's encouraging. I guess I just need to build the add-on boards and try it for myself.. :) Will report my progress if I get anywhere.

olin
Atariator
Atariator
Posts: 22
Joined: Tue Nov 21, 2017 8:57 pm

Re: MISTer on DE0-nano?

Postby olin » Wed Nov 22, 2017 12:08 am

Just looking at the dimensions of the DE0-nano and the PCB length is slightly shorter, so the mounting holes and the pin headers won't fit nicely. Unfortunately Altium Designer is way above what I can afford :) , so will try to redesign the boards in some free CAD software. The gerbers and the schematics from Github should be enough to get me started I guess. Is combining SDRAM and the IO board to one PCB a bad idea (thermal and space considerations, possibly signal noise)? I'm wondering whether a simplified/unified single add-on board with the VGA, DACs, audio jack and SDRAM would make my effort easier.

User avatar
Newsdee
Atari God
Atari God
Posts: 1039
Joined: Fri Sep 19, 2014 8:40 am

Re: MISTer on DE0-nano?

Postby Newsdee » Wed Nov 22, 2017 12:10 am

Is it possible to change the core source code so it can target a different board, without forking a new branch on Github?

In any case it looks interesting if it were to work. Probably there are more people out there with a DE0 compared to the DE10 (as it's slightly cheaper).

cocotower
Atarian
Atarian
Posts: 4
Joined: Mon Nov 20, 2017 11:09 pm

Re: MISTer on DE0-nano?

Postby cocotower » Wed Nov 22, 2017 12:47 am

Hello,

I designed the NanoMate daughter board for the DE0-Nano over a year ago and it's being successfully used on the "Cyclone CoCo 3" project. You might consider adding this board when you try porting MIST/MISTer. It adds 1MB of 55ns SRAM. I can get 7 Mhz CPU and video with this SRAM. I use the DE0-Nano's 32MB SDRAM partially for a VGA framebuffer. The NanoMate board also adds 512 color VGA, 12-bit stereo DAC, SD card interface, infrared receiver, LED, HC-05 bluetooth header, ESP8266 WIFI header, and 2 PS/2 ports, plus a user I/O header. The NanoMate board is available on OSH Park.

I also made the Nanolog daughter board that fits the 2x13 header on the DE0-Nano (underneath) and adds 2 joystick ports and a stereo recording jack.

Let me know if anybody gets a DE0-Nano MISTer project started.

Sorgelig
Atari God
Atari God
Posts: 1196
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: MISTer on DE0-nano?

Postby Sorgelig » Wed Nov 22, 2017 8:11 am

Newsdee wrote:Is it possible to change the core source code so it can target a different board, without forking a new branch on Github?

It's possible. Need just different QSF file and sys_top.v module. We can talk about merging DE0-nano version into main code when it will become mature and will have its dedicated developer who will be able to fix the incompatibilities.

olin
Atariator
Atariator
Posts: 22
Joined: Tue Nov 21, 2017 8:57 pm

Re: MISTer on DE0-nano?

Postby olin » Mon Nov 27, 2017 12:50 am

I've progressed a bit with the de0-soc board layout. I've based it on the 3.1 DE10 IO board as it seems less complicated. I tried to keep the components only on the top side, SDRAM part of the board is an exception. I've copied the SDRAM board as closely as possible to avoid issues with speed. I also used 1206 package size of components to make it easier to hand solder. I could not fit the TOS link so far (board space) but managed to squeeze in micro SD card reader from the recent DE10 IO board revisions. My plan is to have just one MiSTer board with integrated SDRAM, but the SDRAM part can be cut off in case the vertical position is desired. Single board will also (hopefully) simplify the ordering/manufacturing of the board itself.

Designed in free gEDA-PCB software (http://pcb.geda-project.org/). Will post the design source file once it is tested/mature.

Here is a WIP preview of the design so far: http://mujweb.cz/molej/mister/pic/v01_render.png

Thoughts.. suggestions?

Sorgelig
Atari God
Atari God
Posts: 1196
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: MISTer on DE0-nano?

Postby Sorgelig » Mon Nov 27, 2017 2:40 am

olin wrote:Thoughts.. suggestions?

looks not bad!

What is the dimensions of DE0-nano board? The main reason why I/O board on DE10-nano doesn't cover all 4 holes is the size ob board. Chinese PCB manufacturers have cheap prices only for boards below 100x100 mm and DE10-nano is longer than 100mm.
But looking at width of board, it seems DE0-nano is shorter than 100mm.
Your SDRAM board covers precious free GPIO. I've intentionally opened them on my design to allow future expansions like UART, MIDI, etc.

mpattonm
Captain Atari
Captain Atari
Posts: 159
Joined: Mon Oct 21, 2002 8:52 am
Location: Czech republic
Contact:

Re: MISTer on DE0-nano?

Postby mpattonm » Mon Nov 27, 2017 7:05 am

olin wrote:Thoughts.. suggestions?

Looking very good!

Sorgelig
Atari God
Atari God
Posts: 1196
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: MISTer on DE0-nano?

Postby Sorgelig » Mon Nov 27, 2017 11:32 am

There are some considerations which you might didn't take in account:
1) make sure the ground has enough connections between "islands". Actually i't just 2 pins with ground and it's possible the whole board grounded through a tiny trace.
2) long traces going together may affect each other. Especially analog signals such as video and audio may get noise. It's better to use ground traces between long signal traces.
3) SD card has contact springs. They may protrude outside the case when you insert the card and touch the traces under it. Thus, it's better not to bend the traces under that area of SD card. So if it will be touched, then it will touch the same signal.
4) If you will order such board from those chinese PCB makers providing cheap service for just $2-$5, they won't make it cheap because it's considered as 2 designs in one. And price will turn into ~$30 instead of $5.

olin
Atariator
Atariator
Posts: 22
Joined: Tue Nov 21, 2017 8:57 pm

Re: MISTer on DE0-nano?

Postby olin » Mon Nov 27, 2017 1:25 pm

thanks for the comments:
Size of the board : currently 67.8 x 99.6 mm. I'll make the board 1 mm shorter to fit nicely within 100mm without a dispute.
ad 1) yes, I've noticed only two ground pins are exposed from the DEO pin header, both are slightly inaccessible because of the surrounding traces. The image doesn't show it well, but the ground should reach most of the places on the ground plane. The top copper islands should also be connected, but I'll put more vias to improve the ground connection of the top islands.
ad 2) good point - both audio signals are currently close together without ground island, will try to fix that.
ad 3) I didn't consider it ! the sdcard connector should arrive tomorrow, so will take a look how exactly it interfaces with the board surface.
ad 4) Will try to research that. I used Allpcb.com and dirtypcbs.com services in the past, the price was quite reasonable so far.

Few board errors spotted:
1) missing VGA power pin separation (the top island merged with the pin)
2) sdcard connector pads are too big and have small copper clearance (will probably violate rules of cheap fabs).

ex68k
Atari User
Atari User
Posts: 41
Joined: Sat Oct 26, 2013 11:13 am

Re: MISTer on DE0-nano?

Postby ex68k » Mon Nov 27, 2017 7:55 pm

olin wrote:I also used 1206 package size of components to make it easier to hand solder.


Just a small remark ... 1206 is pretty big. If someone is able to solder the SDRAM without problems, he could do well 0603 ...

olin
Atariator
Atariator
Posts: 22
Joined: Tue Nov 21, 2017 8:57 pm

Re: MISTer on DE0-nano?

Postby olin » Wed Nov 29, 2017 1:28 pm

ex68k wrote:
olin wrote:I also used 1206 package size of components to make it easier to hand solder.


Just a small remark ... 1206 is pretty big. If someone is able to solder the SDRAM without problems, he could do well 0603 ...


I agree, 1206 package is big enough even for a beginner to solder these on the board without problems. SDRAM pins are usually not soldered individually, a "sliding iron" technique is used insted, so that makes it a bit easier (not trivial of course). I personally struggle with 0805 package size, even the pick & place requires more patience. I think it makes sense to make the soldering of the boards as easy as possible, especially If the boards are not readily available assembled and have to be made by hobbyists. I'll release the design of the board soon, so anybody is welcome to change the pads to fit smaller packages if desired.

It's good point though, worth revisiting if/once the board gets off the prototype stage. The extra board space can be used for other features.

hrvoje
Atarian
Atarian
Posts: 2
Joined: Wed Nov 29, 2017 1:32 pm

Re: MISTer on DE0-nano?

Postby hrvoje » Wed Nov 29, 2017 1:43 pm

FPGA total beginner here, just ordered DE0 NANO because DE10 was too expensive for me. I would *love* to be able to use it for retrogaming, this is a great initiative...

I still don't know enough to help but thumbs up, there is interest for DE0 NANO!

Cheers, :cheers:

Hrvoje

olin
Atariator
Atariator
Posts: 22
Joined: Tue Nov 21, 2017 8:57 pm

Re: MISTer on DE0-nano?

Postby olin » Wed Nov 29, 2017 7:29 pm

I apologise if I mislead somebody with the wording of the name of this thread. What I really meant was DE0-nano-SOC with Altera Cyclone V. I didn't realise that Terasic produced other DE0-nano boards (with the same product name) with older generations of FPGA chips (Cyclone III, IV) which would be harder if impossible to port MiSTer to.

The experimental board I'm designing is for DE0-nano-SOC and will not work with other/older DE0-nano boards. Also, it is quite possible MiSTer for DE0-nano-SOC will not be ported at all, depending on how much interest/developers it attracts. For the time being I'd suggest to anyone who plans to buy hardware for MiSTer and is deciding between DE0-nano-SOC or DE10-nano to save up a bit more and definitely go for the the DE10-nano board.

Sorgelig
Atari God
Atari God
Posts: 1196
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: MISTer on DE0-nano?

Postby Sorgelig » Wed Nov 29, 2017 9:30 pm

DE10-nano worth additional $30! You will get a HDMI output and a larger FPGA. Usually the main problem with smaller FPGAs is not the amount of LE, but amount of BRAM.
So, i strongly suggest not to save the $30 - you will loose more.
DE0-nano-SocKit version of MiSTer is for those who already has the board. Also it will require to tweak and recompile of EVERY core. Thus DE0 will require a dedicated developer!

hrvoje
Atarian
Atarian
Posts: 2
Joined: Wed Nov 29, 2017 1:32 pm

Re: MISTer on DE0-nano?

Postby hrvoje » Wed Nov 29, 2017 9:35 pm

:-(

Looks like I'll have to aim for DE10-nano down the road. I couldn't find it anywhere for a reasonable shipping cost, it would end up costing me an arm and a leg (100$ @ Terasic just for shipping).

Being interested in electronics sucks when you don't live in the US. :-)

Thanks for the information, though.

Hrvoje

olin
Atariator
Atariator
Posts: 22
Joined: Tue Nov 21, 2017 8:57 pm

Re: MISTer on DE0-nano?

Postby olin » Wed Nov 29, 2017 10:34 pm

I've put the fixes based on the suggestion in the new version 0.2 (still WORK IN PROGRESS):
- more space between analog tracks to fit a ground island in-between them
- few more vias to support ground islands
- fixed the VGA power on issue
- fixed pad clearance of the micro sd connector (and properly connected the CD pin)
- added mini-fan mounting holes and fan power pins - this is far from ideal, both the size of the fan and the location should be better. Currently designed for 25mm fan. Improvements: possibly make the bottom part of the board bigger so that the fan mounting holes are close to the FPGA chip and possibly use 30mm fan as well.

Suggestions are welcome.

io board v 0.2 preview: https://github.com/ole00/hardware_miste ... render.png

BTW. I've uploaded the design file to github here: https://github.com/ole00/hardware_mister_de0-nano-soc
At the moment there is nothing more than the io board design file, but it should allow anyone to check the design, measure the physical dimensions between pins (to ensure all fits to DE0-soc dev board) or even make his/her own mods and fixes. You can also generate your gerbers by using gEDA-pcb program via File->Export.

bernouilli
Atari maniac
Atari maniac
Posts: 88
Joined: Fri Jan 06, 2017 5:02 pm
Location: Paris/France

Re: MISTer on DE0-nano?

Postby bernouilli » Thu Nov 30, 2017 10:38 am

hrvoje wrote::-(

Looks like I'll have to aim for DE10-nano down the road. I couldn't find it anywhere for a reasonable shipping cost, it would end up costing me an arm and a leg (100$ @ Terasic just for shipping).

Being interested in electronics sucks when you don't live in the US. :-)

Thanks for the information, though.

Hrvoje

Where do you live ?
I'm from France and I ordered the de10-nano from digikey.com, they charged me $0,35 for the shipping and I received my board 2 days later. But I had to pay the duty fees.

olin
Atariator
Atariator
Posts: 22
Joined: Tue Nov 21, 2017 8:57 pm

Re: MISTer on DE0-nano?

Postby olin » Fri Dec 01, 2017 11:38 pm

I've double checked the design pin connection, traces and dimensional distances. Made few modifications to the board as well. For gerber preview I've used excellent (and free) ZofzPCB, all looked good, so ordered 10 boards on allpcb.com. So far the price for 10 pieces (68x99mm) was $5, but the order is still in 'Auditing' stage, so will see whether they increase the price. Weirdly the cost of the shipping was $0 (yes, free) by using TNT (in the past TNT shipping was $19). Not quite sure whether the free shipping was a website error, but will report later if the price rises.

olin
Atariator
Atariator
Posts: 22
Joined: Tue Nov 21, 2017 8:57 pm

Re: MISTer on DE0-nano?

Postby olin » Mon Dec 04, 2017 12:15 am

While waiting till the IO boards arrive I've cobbled a VGA out (only 3bits per color component) plus 2 buttons (user, OSD) on a proto board.
I started to look into the software part as well - to exercise my protoboard and verify I can build and basically understand how the system works. I'm a FPGA newbie but know C. What I've managed to do so far:
- installed sd card with (Main_)MiSTer (latest one from releases directory). Linux booted MiSTer was executed and attempted to upload menu.rbf, then failed to upload
- Installed Quartus Prime Lite 17.1, loaded Menu_MiSTer project (latest from git)
- in the project: switched FPGA chip to SCSEMA4U23C6N, left the pin assignment as it was for DE10
- I wrote a java app to help me to remap pins on <project>.qsf file
- I've removed the HDMI pins mapping in menu.qsf (not to possibly clash with others)
- I've remapped the menu.qsf file to match DE0-nano-SoC, reloaded in Quartus, checked pin names in "pin planner" dialogue
- Started compilation, failed because of the HDMI could not be auto-mapped to high speed pins
- Verified the LITE macro is turned On (value 1) in "Compiler settings"
- modified sys_top.v and commented out in common and LITE part of the code:
1) HDMI inputs/outputs (HDMI_I2C_SCL,...)
2) wires for INTERLACED, V_TOTAL_0, ...
3) sync_vg block (as it seems to rely on HDMI_TX_CLK ?)
4) pattern_vg, pll_hdmi, hdmi_config, hdmi_osd
- modified sys.qip and commented out HDMI block
- Started compillation, this time success, menu.rbf was produced, but much smaller size (1.2MBytes). I guess it's because of the missing HDMI.
- copied menu.rbf to memory card, rebooted DE0-nano-SoC, this time menu.rbf was uploaded. Could see this log on serial out:

Code: Select all

Minimig by Dennis van Weeren
ARM Controller by Jakub Bednarski

Version HPS171126

Looking for root device...
FileLoad(open) File:/media/fat/device.bin, error: -1.
Using SD card as a root device
Populating /dev using udev: IKBD: Init
FileLoad(open) File:/media/fat/config/MIST.CFG, error: -1.
Init SPI.
Identified 8BIT core
Core name is "MENU"
Loading config MENU.CFG
FileLoad(open) File:/media/fat/config/MENU.CFG, error: -1.
....
INI_PARSER : Start INI parser for core "MENU".
FileOpenEx(open) File:/media/fat/config/MiSTer.ini, error: -1.
INI_PARSER : Can't open file config/MiSTer.ini !
sending keymap: 0
INFO: Video resolution: 550 x 300, fHorz = 15.6KHz, fVert = 50.1Hz, fPix = 10.00MHz
Open up to 10 input devices.
OSD is now invisible
RBF - xxx
Start to scan dir: /media/fat/
Got 0 dir entries
pFileExt = RBF
OSD is now visible
done
read-only file system detected...done
Starting system message bus: done
Starting network: OK
Starting connman ... done.
Starting ntpd: OK
Starting ProFTPD: done
Starting sshd: OK


when pressed the OSD button I got this output

Code: Select all

sending keymap: 0
/media/usb0 is NOT a VFAT mountpoint.
/media/usb1 is NOT a VFAT mountpoint.
/media/usb2 is NOT a VFAT mountpoint.
/media/usb3 is NOT a VFAT mountpoint.
sending keymap: 1
sending keymap: 0
OSD is now invisible
RBF - RBF
Start to scan dir: /media/fat/
Got 0 dir entries
pFileExt = RBF
OSD is now visible


So I guess the FPGA communicates with the ARM program, the OSD button pin map is also working.

Now the part which doesn't seem to work: no VGA output
- I scoped hsync, vsync, both signals kept steady on 220mV, no change over time
- I scoped color pins , all kept steady on 680mV, no change over time.

I tried to press the OSD button to check whether it makes any difference on VGA pins - but it does not.
The monitor was not connected when scoping. Probe was connected directly to the header pins before the resistors.
I also scoped without my cobbled board, with the same result.
Next to try: connect USB keyboard and try some keys...

Any ideas? Thanks.

Sorgelig
Atari God
Atari God
Posts: 1196
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: MISTer on DE0-nano?

Postby Sorgelig » Mon Dec 04, 2017 1:56 am

olin wrote:- Started compillation, this time success, menu.rbf was produced, but much smaller size (1.2MBytes). I guess it's because of the missing HDMI.

it's because of amount of LE/BRAM in your FPGA.

olin wrote:Could see this log on serial out:

many errors are supposed to be present and not all errors are real errors.

olin wrote:Now the part which doesn't seem to work: no VGA output
- I scoped hsync, vsync, both signals kept steady on 220mV, no change over time
- I scoped color pins , all kept steady on 680mV, no change over time.

I tried to press the OSD button to check whether it makes any difference on VGA pins - but it does not.
The monitor was not connected when scoping. Probe was connected directly to the header pins before the resistors.
I also scoped without my cobbled board, with the same result.
Next to try: connect USB keyboard and try some keys...

May be it's better if you will make some test core without using MiSTer API. Some very simple core which will output VGA without any control. May be strip down Menu core to remove every thing besides a noise on the video to understand how video works. Then you will be able to track down your problem.

ijor
Hardware Guru
Hardware Guru
Posts: 3151
Joined: Sat May 29, 2004 7:52 pm
Contact:

Re: MISTer on DE0-nano?

Postby ijor » Mon Dec 04, 2017 2:14 am

There is a VGA enable pin. Did you connect it? Otherwise you might need to modify the code to ignore it and output to the VGA unconditionally.

Sorgelig
Atari God
Atari God
Posts: 1196
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: MISTer on DE0-nano?

Postby Sorgelig » Mon Dec 04, 2017 2:29 am

Yeah, VGA enable pin could prevent video output if not mapped correctly.
I think for DE0 where VGA is the only output, VGA-enable option should be removed.


Return to “MiSTer”

Who is online

Users browsing this forum: No registered users and 2 guests