Monday, April 2, 2018

MEGA65 Computer Build with Vivado

Setup of HARDWARE bench

This is the easy part

Setup of the Build Environment

I assume this being simple as well, as there was Vivado tcl script to recreate the Vivado project.

Try #1

I am trying to start the tcl script from Vivado console. And yes I had forgotten that the src/vhdl directory does not contain all source code files at all. Yes, yes many of the files needed are generated files and not original VHDL files.

Try #2

Oh, the main toplevel Makefile - it really does not look like fun trying to build it on Windows/cygwin so I start linux in VM.
Ok, the main reason I assumed that the original Makefile is hard target for Windows was the presence of tool called Ophis.
But well Ophis is a cross assembler that is written in Python and has built in support for Windows. So probably Ophis would have run on my Windows box without problems as I do have Python 3.6 installed and available from console prompt. The lack of proper make is another problem, the only make that is on Windows path is the one from Delphi :) that one is no good for building gnu Makefiles. I did set up a batch file to set path to C:\Xilinx\SDK\2017\gnuwin\bin to execute some reasonable make but after removing the "prg" targets, well the Makefile choked on missing rule for ".git" target. After some more trials I did proceed on linux VM.
Now the PRG targets are build, but what, CA65 is missing? Why and where should I pull-in this? OK lets see what else can we build.

make tools

After installing libpng-devel tools target is building without errors.

Try #3

Pulling in CC65 source code, running make. Build succeeds now lets copy the ca65 and ld65 where the mega makefile can find them! After adding ./ into the Makefile ca65/ld65 are found and executed. Now we are stuck on cbmconvert :(

Try 4

OK cbmconvert build also completed, this time I install it too so I do not need to add ./ into the Makefile. Now we are stuck on .git target missing. Well this I had on initial trial on Windows too.

Try 5

Searching for problem why .git is not found. Ah so stupid, I did copy the files into the Linux VM and did not fetch them directly from git, so the ".git" directory was missing. A dirty trick

git init

and we are in game again. Well now we are stuck on the next missing part - convert is missing.

Try 6

sudo yum ImageMagick

and we are stuck again on? Seems something is wrong in /core/src/mega65-fdisk folder. Well but at least some VHDL files needed from Vivado have been already created, lets see if something is still mssing. I am copying the VHDL files back from Linux VM to the main workstation hard disk. There are 5 new VHDL files generated, but the colourram.vhdl is still missing. I could try excluding it, but let see if we can force the Linux build one step further.
Ok, the issue with fdisk is very simple, I did not download the git submodules so I do that manually now and copy the files again into the linux box.
Unfortunately I am stuck again, this time the error comes from c code, complaining that -std=c99 option should be used. This is well known issue with lots of linux projects. For some reason adding the switch into the Makefile does not help so I fix the source code that is faster and easier. And now we are ready for Vivado!

Yeah!

Try 7




Now the fun can begin.
A mega65 fun!

Links

Pointers to resources

Ophis 

Cross compiler in Python under MIT license. Web pages from the original author are no longer online, his github account seems still be active with some commits in early 2017 but Ophis should be fetched from forked repo.

CA65/LD65

Those utilities are needed to build MEGA65 Vivado files, they can be fetched from github and there is also Windows snapshot available here.

cbmconvert

From github here. Assumed somewhere is windows build available also.





Sunday, March 25, 2018

Visit Estonia

Just some random hints for shorter or longer vacation to Estonia and other countries around Baltic sea.

When? (Weather)

July or August. That's it. There are usually some very nice days in May and September too but you are most likely to miss them if you visit only for a short time. June should also be OK. So one possible date plan is to include Jaanipäev Estonian summer Holiday. Please note that during the summer holiday the local folks (not only in Estonia) tend to use lots of alcohol!

Things to (NOT) worry

Ticks. They can be found everywhere in the Baltic states. Two types exist the red ones and the grey ones, both usually harmless. I used to be bitten by them multiple times each summer that I spent on Island Hiiumaa. But should you get a tick, please, please do not try to pull it off yourself, seek a doctor and immediately. I got recently a Deer Tick on Bonny Doon Road close to Santa Cruz California. It was a real bad thing. Such ticks do not live in Estonia to my knowledge, but, still please do not take any risk. You can read here some more about ticks.

Short trip with airplane

You can fly to-from either Tallinn, Helsinki or Stockholm whatever you get best flight connections. You should also count for accessibility from airport to city center this is possible fastest and easiest in Tallinn. In Tallinn you can either take a Taxi (does not cost a fortune!) city bus or even walk if you have light luggage. So assuming you fly to-from Tallinn (TLL) you can take night ferry to Stockholm spend a day there then proceed with night ferry from Helsinki. After a day in Helsinki you take next night ferry to Tallinn. From Tallinn you can take your return flight back home.

This way you get 3 countries with one single round-trip airplane ticket and with the need to spend a night in hotel. You can of course extend you stay in any of the visited countries. And you can also opt in for fast jet-boat on the route from-to Helsinki-Tallinn.

This trip can be done with light airplane carry on luggage only. And without paying a dime to taxi or bus for airport transfers.

Considerations: Airport access to city center is best in Tallinn. The maritime terminal in Helsinki is different for different vessels. So while from fast boat you may land very close to city center then for the overnight ferry you may have to walk a few kilometers.

Short trip with a car

Lets say we start from Germany. During the drive in Poland you see where all the EU money goes:
Rabbit bridges!

Please keep some Polish money ready you need to pay toll many many times on the road. One place to stay on the road is Hotel Trylogia - it s located very close to the optimal route that bypasses Warsaw.

Next thing to note is the need to avoid crossing the border of EU. This is possible but you need to be very persistent against your GPS guidance - the route that within EU borders is about 70 km longer as the one crossing the borders. Chances are that GPS will try to route you to White Russia for an hour or so. In Bialystok you must proceed to Augustow this is very important. Next stop you take say in Resort Hotel Egles
You can fill your bottles with mineral Water:
Or have cup of coffee here:  
 Of course you can stay for a night or more there too. And in the lobby for the main eating room there are tourist agents lurking around. You may use them if you wish, they are able to get you to visa free DAY TRIP to White Russia! You just must return same day.
If lucky you can find this place in Druskininkai :) tasty! 
This is where Estonian national ARDF team did have a cake after Gold Medal from ARDF2017 Competition.

Druskininkai you an rent a bike either in Egles or in the city, the selection is large:
If you like mummies you can take boat trip
To them:
Mummies are there... 
For Pokemon Go players: my Togetic is in the Gym about 800 meters from those mummies.

You can also visit the local Aqua Park they have a rather large Sauna-World too. And from that place there is a lift to the Snow Arena.

From Druskininkai it takes one day drive to Estonia. From Tallinn Estonia you can proceed with Ferry to Helsinki, then next Ferry to Stockholm, and then back to Germany either same route or down the the roads of Sweden, your choice.

Places to go in Tallinn

If you want to buy some yarn or needlework stuff the best place is kl24 it is a wholesale warehouse open to anyone. You may have trouble finding the entrance and getting in (you may have to press a call button named: "Karnaluks"!) and when you enter you need to surrender all your bags. But then you can shop on several floors. On the way to KL24 you can jump in to Cafe "Poska" located at Laulupeo 1.
Please note google earth photos from that street corner are really outdated!
After this meal you can proceed to KL24 (it less than 500 meters away) and do some shopping!
If you have a car a very good place to eat is a place called NOY.
Above is my free meal. And yes there is such thing.

In Tallinn should you decide to go to beach Pirita you will be passing by a steel monument
My Father had a minor accident (broken arm) at the opening ceremony with an ultra-lite airplane. This monument also serves as memory to my Mother (very successful Parachute sportsmen) who is resting at the center of Gulf of Tallinn. Please hold you breath for a second or two and have a smile.

On the marble foot of the monument there is an in-script in Estonian: "Julgetele ja teotahtelistele inimestele". My plea if you think you have a good translation of this sentence to some other language please drop me a short email. My own very bad translation to English is: 
"For the brave ones willing to act". 
It's bad translation I know but I know no better.