Tuesday, November 22, 2016

It is time to throw in the towel.

Those of you who know me knows that I have serious health issues. I am suffering from psychosis. It has been a long journey and I would like to thank everyone that helped me over the years.

It is really a tough decision to make, but I need strength to live a normal life. I have spent 3 months/year at hospital and that simply isn't doable.

However, I will not disappear from earth. I am going to make whatever I can to continue to learn and practice technology. If anyone who reads this is interested in having something done, feel free to ask me questions. I we are lucky I might be able to do something on a hobby basis.

Feel free to send me your prototypes and the like. Who knows, I have been known to make cool things with new hardware :)

Also check out my SoundCloud page: https://soundcloud.com/michael-grunditz

I need to mention three people that helped me in a extraordinary way.

(in no particular order)

Kristoffer Andersson Prevas
William H. Buck (aka Bill) Genesi
Stefan Melander NXP (Freescale)

*Goes back to stare on his 200 lines of ARM assembler code ... It will be fun :)

Monday, January 11, 2016

Qt Declarative 2d build explained

The source code posted at Sources is built against Qt 5.3.2 . I hope to be able to update to newer versions later on. The problem with this is that Quick2 changes a lot and it is very hard to keep up for me, help is most welcome.


  1. A working toolchain for your ARM target.
  2. A system rootfs with headers etc on your build host.
  3. The 5.3.2 distribution of Qt
Build process:

  1. Extract the Qt source archive.
  2. Please read the generic build instructions at qt.io and configure the sources for "linux-arm-g++". *hint* use the -sysroot argument to point to your rootfs. You will also need to add -no-xcb and -qpa linuxfb.
  3. Build Qt (make)
  4. Test Qt on your target with a simple widget application for example wiggly.
  5. If the test fails, check that your /dev/fb0 is working and go thru the configure step again. Once you have your Qt working move on to next step.
  6. Clone Qt Declarative 2d into your top Qt source tree. (  git clone -b asm https://github.com/mgrunditz/qtdeclarative-2d.git )
  7. Enter the resulting directory and run qmake from your build tree ( ../qtbase/bin/qmake )
  8. Build it with make.
  9. Modify src/quick/items/qquickitem.cpp to your target screeen resolution.
  10. Modify src/quick/items/alphablender.S to match your screenwidth*4. *hint* check the comments.
  11. Redo make.
  12. make install
  13. Once you have your new binaries on your target it is time for some testing. You should have a program "qml" in your $prefix/$qt/bin directory. Do a simple hello world qml script and run it with the qml program.
  14. You might have problems with missing components. Check that your build includes imports, and tools.
  15. If your "Hello World" works you are ready to try out more complex applications.

Problems and bugs:

The most important issue is that Quick2 assumes that you can have larger window than your screen. I have tried to handle this in qquickitem.cpp and I have it semi working with 720p but it still crashes sometimes. Obviously it doesn't crash if your application stays inside your screen resolution.

The screen dimensions can be fetched from the qquickswindow object. Keep in mind that it is my variables you want to use, screenwidth screenheight.

The rest is a pure math exercise.

If you have any questions you can always email me at michael.grunditz@prevas.se.

Thank you for reading this far and on from all of us at:

Good luck!

Friday, October 09, 2015

QtDeclarative-2d first code drop!

I have the pleasure to announce the first sourcecode drop of our qtdeclarative (Quick2) renderer for system without GPU's.

The sources

The first push contains the branch "asm" which is a version for ARM systems only. If you want to try it on your system, please note the following:

The screen resolution is hardcoded in QQuickItem and in alphablender.S.

The screen needs to be in 32-bit mode ( fbset -depth 32)

More branches with more generic support will follow soon.

So, instead of complaining that it is not working for you , or that it looks bad , go fork it and make pull requests. The whole idea with releasing this as a opensource project is to make it a community project. More details about how it is built up will be posted here in next week.

This work is funded by FLIR to investigate the possibilities of running a rich UI on simple devices with high performance.

Freescale Semiconductor

The reference hardware is Freescale i.MX7, but is also tested on much smaller hardware with ARM9 cores.

If you find this effort interesting , have suggestions, want to certify it for your hardware, please tell me:

michael.grunditz@prevas.se , Prevas

Wednesday, August 19, 2015

i.MX6 Qt Quick2 display mirroring and scaling

This is about  screen mirroring and scaling with Qt Quick2 content on the i.MX6.

The way I did it was to use the IPU's to scale and copy out a grabbed screen image to the second display. The event mechanism was triggered by a Quick property in the Window item.

The linked file isn't the exact source code that went into production, but it shows the how  the mirror / scaling can be done. It contains a nasty goto/label thing ... useful in the context since if something breaks, the IPU tasks needs to be shutdown and not to be started again. 

The performance is quite good thanks to the high performance IPU's. There is some load on the CPU when doing the "grab", but it isn't a problem on a Quad i.MX6

 The sourcecode below can be used under the LGPL v2 or later license. The complete code package is available on request.


Friday, August 14, 2015

Qt Declarative 2d on i.MX7

Time for some updates on the Qt Declarative 2d project.

I have recently focused on changing the rendering mechanism to a custom frame buffer hitting solution. The heart of it is a ARM assembler routine for alpha blending that composes the the graphics on to the "window" backbuffer. The assembler runs in circles around Qt's drawImage,
which was the primary composing mechanism I used before the assembler routine.

I am also lucky to have a i.MX7 board for certifying Qt Declarative 2d on. It runs very nicely.

The rssnews demo running on the i.MX7 using Qt Declarative 2d with the new rendering engine:

If you have hardware that you would like that to be certified, please contact me at:


Saturday, July 25, 2015

Vacation "Work"

It is vacation time this month and I have spent a lot of time with on of my passions, namely:
The Sinclair QL , or rather its operating system QDOS and its successor SMSQ/E.

The main quest has been to get a dedicated system. I don't have any original QL, they went away many years ago. SMSQ/E is available for many platforms, including Atari ST/TT. I have a Atari 1024STe so I picked that for my first test. Sadly the current builds of SMSQ/E didn't work on it. The testing resulted in more fun! I started to debug SMSQ/E using the sources and the Hatari emulator.

In the meantime I figured out a alternative. The most well known SMSQ/E capable emulators is  QPC . They recently became freeware and I encourage you to try them out. Since I wanted a machine that is dedicated to QL computing I opted for the older DOS QPC1. I found a Celeron 400Mz PC under my desk (!) that have a CF IDE adapter and runs DOS. I took the CF card and plugged it into my CF reader and extracted QPC1 to it from my Mac. It worked on first try in the DOS pc.

QPC1 doesn't multitask, it completely takes over the machine. That was exactly what I wanted.
I am currently busy with getting up a decent install of QL software, slow progress but I am getting there.

And on Atari (old smsq/e) :

Thursday, February 12, 2015