Archive for the ‘Raspberry PI’ Category

Smart Pascal: Arduino and 39 other boards

January 17, 2017 Leave a comment

Did you know that you can use Smart Mobile Studio to write your Arduino controller code? People think they need to dive into C, native Delphi or (shrug) Java to work with controller boards or embedded SoC’s, but fact is – Smart Pascal is easier to set up, cheaper and a hell of lot more productive than C.

Arduino getting you down? Why bother, whip out Smart Pascal and do some mild wrapping and kill 40 birds with one stone

Arduino getting you down? Why bother, whip out Smart Pascal and do some mild wrapping and kill 40 birds with one stone

What may come as a surprice to you though is that Smart allows you to write code for no less than 40 micro-controllers and embedded devices! Yes you read right, 40 different boards from the same codebase.

Johnny number five

jfiveNode.js is the new favorite automation platform in the world of hardware, and board’s both large and small either support JavaScript directly, or at the very least try to be JS friendly. And since Smart Mobile Studio support Node.js very well (and it’s about to get even better support), that should give you some ideas about the advantages here.

The magic library is called Johnny number five (JN5) and it gives you a more or less unified API for working with GPIO and a ton of sensors. And it’s completely free!

As of writing I havent gotten around to writing the wrapper code for JN5, but the library is so clean and well-defined that it’s something that should not take more than a day to port over. You can also take a shortcut via our Typescript importer and use our import tool.

Check out the API here:

Here is a list of the sensors JN5 supports:

  • Altimeter
  • Animation
  • Barometer
  • Button
  • Compass
  • ESC
  • ESCs
  • Expander
  • Fn
  • GPS
  • Gyro
  • Hygrometer
  • IMU
  • IR.Reflect.Array
  • Joystick
  • Keypad
  • LCD
  • Led
  • Led.Digits
  • Led.Matrix
  • Led.RGB
  • Leds
  • Light
  • Motion
  • Motor
  • Motors
  • Multi
  • Piezo
  • Pin
  • Proximity
  • Relay
  • Relays
  • Sensor
  • Servo
  • Servos
  • ShiftRegister
  • Stepper
  • Switch
  • Thermometer

And enjoy one of the many tutorials here:

Up board, a perfect embedded board

December 23, 2016 2 comments

In my previous article about the UP single board computer, my primary focus was to use it purely for emulating a next generation PPC based Amiga, running Amiga OS 4.1 final edition. This is probably the hardest, most challenging task you can give a computer. Even by modern standards emulating a 68k and ppc based hybrid platform is a proverbial assault on the hardware.

Next generation Amiga, it works but the board is not powerful enough to deliver an enjoyable experience. Classic Amiga's however is the best you can imagine!

Next generation Amiga, it works but the board is not powerful enough to deliver an enjoyable experience. Classic Amiga’s however is the best you can imagine!

Just contemplate it for a second: if ppc emulation isnt formidable enough, the target of my emulation was a hybrid platform in the true sense of the word. You have the older Amiga chipset which is extremely complex. Attached to that (and working in symphony) is a ppc accelerator board designed to do the grunt work.

The UP single board computer came up short for that highly specialized task. But like I wrote, it missed the mark by just a handful of Hz. Had the CPU been just slightly more powerful (and a more suitable storage device), the UP board would have ace’ed it. Which would have been nothing short of miraculous! The fact that it was capable of running Amiga OS 4 at working speed to begin with is extremely impressive! Remember this is a tiny, single board computer retailing at $150 !

And the most amazing part? The CPU emulated the next generation Amiga running at a steady 60% cpu utilization. Not once did it spike up to 100%. So the Windows process scheduler held it back for obvious reasons.

Ok, but what about other tasks?

Just because you don’t have the power to knock out Mike Tyson doesn’t necessarily mean you’re a bad fighter. And the same can be said about technology and computers. The UP board came up a little short for next generation Amiga emulation, but so what? The PC I owned back in 2013 and had been using for Delphi development for 3 years couldn’t even start OS 4 of its life depended on it.

Truth be told, the UP board is the most exciting product I have owned for years. I was only this excited about something when I got my first Raspberry PI. I’m even more excited about the UP board because it’s infinitely more capable!

x86 UP board, same size as the PI3 but packing a hell of a punch!

x86 UP board, same size as the PI3 but packing a hell of a punch!

And when I get excited, you should to. I am privileged and blessed through my work to have access to all the latest gadgets. Be it embedded boards to the latest phones, tablets, graphics cards, operative systems — you name it, I got it or have access to it. But of all the awesome tech I have played with since 2010, the UP board is the most fun. It’s just perfect and has everything a professional software developer, retrogamer or product integrator could possibly want in a SoC.

Setting up the UP board

The first thing you want to do is get Windows 10 installed. If Linux is your thing then I can strongly recommend Ubuntu, it’s beautiful on the UP and runs like a dream.

But for this article I’ll be going with Windows 10, and the easiest way to get that installed, unless you have an external DVD drive and bootable disks is the following:

  1. Have a USB stick with at least 4 gigabyte
  2. Download Rufus
  3. Download the Windows 10 iso file from Microsoft
  4. Burn the Windows iso file to the USB stick
  5. Plug the USB stick into the UP board and fire it up

Rufus is a cool little program that allows you to burn ISO files to a USB stick and then make the stick bootable. This is not the same as (for example) Windows image writer, which just burns a disk image (*.img file) verbatim to whatever storage media you pick.

Once you have burnt the ISO to your usb stick, it’s just a matter of sticking it into one of the free usb-slots on the device and power it up. The normal Windows installer should show up as normal and you just follow the installation process. I’m guessing you have done this a few times in your life, so no need to outline that part.

Enable remote desktop

Once Windows is installed and registered, you want to give the computer a name that makes a little more sense. Windows comes up with these absurd identifiers based on whatever, like “UPx7621ab” and similar stuff.

I renamed my board to “UPBoard” and checked the “Allow remote connections”. I then added my admin account (the “select users” button) so I can login remotely. If you havent done this before then just google around and you’ll find out how:

You dont need to setup a full remote desktop (which is something new in Windows 10), you just need to enable remote access

You don’t need to set up a full remote desktop (which is something new in Windows 10), you just need to enable remote access

Once you have changed all that you need to reboot the device, so just do that. In the meantime go over to your work PC and download “Microsoft remote desktop preview” which is their new Remote desktop client. Yes, the good old remote desktop application that have shipped with Windows since the civil war is no longer there. So head over to Microsoft and grab the new one.

Connect to the Up-Board from your PC

OK, with that in place I guess it’s time to play! Fire up the remote-desktop application, add a new location, use the name “UPBoard” as the host, then add your login credentials. Click connect and voila! You now have remote access to your fancy new mini computer!


Click “Add” to add your new remote connection

Then just double-click on the icon that says “UPBoard” in the fancy menu, and that’s it! With this in place you don’t even need a monitor or keyboard for the board, just get a nice case for it and plug it into the router. You can even leave it besides your router if you like.

Fast, responsive and one hell of a system to work with!

Fast, responsive and one hell of a system to work with!

As a developer I take it for granted that you know how to share out a drive or folder, so I’m not going to pussy feet you through that.

Getting the UP drivers

You really want the UP drivers, this means faster graphics and that Windows knows what it can and cannot do with the hardware. So head over to the UP website and download the drivers. Then just install them one by one.

Click here to visit the download page.

Developing on the board

I do most of my development through VMWare. Since I have to use various versions of Delphi, Xamarin studio, Visual studio and other things I can’t even spell – an ordinary PC just wont cut it. I think the smallest PC I have is a Intel i7 octa-core running at 4.1 GHz with 32 gigabyte memory and NVidia Geforce GTX 970. This is because I run 3 virtual environments at the same time (client, server and database).

But you don’t need specs like that to write Smart Pascal based node.js services or servers. That’s one of the great things about Smart Mobile Studio. A normal PC will do the trick. And the UP board is much smoother to work on than one of my old machines, that’s for damn sure.

$150 for a fully equipped workstation? Indeed! The UP-board performs brilliantly for Smart Mobile Studio development. So you can easily code, test and deploy on the board itself.

$150 for a fully equipped workstation? Indeed! The UP-board performs brilliantly for Smart Mobile Studio development. So you can easily code, test and deploy on the board itself.

When it comes to CPU use that’s really not a problem. I tried it with several custom applications, including the Smart pascal kiosk software. This has a node.js server running in the background providing content, while a webkit browser renders the front-end display. Amazingly the whole thing hardly registers. The system that usually runs at around 60% on the Raspberry PI, here clocks in at a measly 5% (!)

5% performance hit. Holy cow!

5% performance hit. Holy cow!

Nothing to say except awesome, I absolutely love this board!

EMMC, the only real bottleneck of the product

The only real bottleneck, a topic I exhausted in my previous post because it pissed me off like nothing else, is the storage device.

But it’s not really a big problem under Windows or Ubuntu. You do notice it when you download large files or decompress large archives. In order to get my developer tools over I just zipped them down and transferred it over. And while getting the data from A to B was simple enough – it was when I started unpacking the data I noticed how slow it was.

But here is the thing: on a dedicated product, these things don’t matter. If you are building your own games machine, your own router, or designing a new top of the line NAS destined for mass production – it doesn’t matter if unzipping 2 gigabytes of source code is slow. Because that’s not what your product will be doing anyway.

Your product, what you use the UP board to make, will ship with a custom program (or a series of programs) designed by you. They will be pre-installed on the machine as your customer buys it, and unless you are born in a cave – I hardly think you will be forcing your customers to download gigabytes of data and unpacking it. That would be a horrible design mistake regardless of product.

Classic Amiga emulation is flawless and perfect on the UP board. This is probably the best emulation experience I have ever had

Classic Amiga emulation is flawless and perfect on the UP board. This is probably the best emulation experience I have ever had

Let’s for sake of argument we say you want to use the board to create the coolest retrogaming machine ever invented. You wont be copying over all the roms every single time right? You will copy it over once, or even better – just download it directly since you have Windows or Ubuntu to play with. So again, the somewhat dull storage device is not going to be a problem for you.

And should you build a movie server or media streaming service, like Plex, then you are going to attach an external hard disk anyway and just use the internal storage for booting up. Once again, not a factor at all.

Factor in a drive

The red thread that you see in the 3 posts I have made about the UP board, is all about the storage device. I have bitched enough about their choice of EMMC storage I think, but instead of just bitching – I want to give you a tip: always factor in a fast USB 3.0 drive when planning a product or home appliance based on the UP single board computer. And that goes double if you plan on developing on the board itself (which it is more than capable of handling).

The CPU and graphics chipset is more than enough to drive Visual Studio, Mono, Delphi, Lazarus or Smart Mobile Studio – but do yourself a favour and reserve the buildt-in EMMC device for Windows only. Never, ever on pain of death install any software bigger than notepad on it because it will bug you for all eternity.

As such I cannot recommend that you buy the biggest model, because the only thing separating the biggest UP model from the second best, is more bloody EMMC storage. The model just below the best is equipped with same amount of ram (4 gigabytes) but only half the disk space. And I so regret not getting that instead. Those $20 would go a long way paying for a plastic casing instead.

Unless you want to run a fixed, single application and could use the extra space, it's $20 straight down the toilet.

Unless you want to run a fixed, single application and could use the extra space, it’s $20 straight down the toilet.

So word to the wise: always factor in a fast USB 3.0 external disk if you plan on using the UP board for anything disk intensive. And with disk intensive I also mean compiling code, because that typically plows through hundreds if not thousands of files. So yeah, the EMMC really sucks.

But you can also factor in a SATA drive. Turns out, if you visit the UP web store that you can buy a SATA shield board that turns one of your USB ports into a blistering fast SATA drive slot. It will set you back $85, but in return you get two USB ports and a SATA drive slot. This makes the UP board a suitable candidate for NAS production. Considering the horsepower you could easily surpass brands like Asustor (which just happens to be my favorite NAS devices).

It would also make the ultimate home streaming service, capable of streaming full HD without breaking a sweat!

Peripherals that make sense

One of the things I hate about the Raspberry PI community is that more often than not, they take for granted that everyone is an electrician or have a background in electronics. So when the moment comes that you want to broaden your horizon, you are faced with thousands of “add-on” products that you dont have a clue how works.

A good example is a remote control I ordered earlier. Seems like a fairly straight forward thing right? And the advert said “only 3 wires to solder, easy for beginners”. What I got was a smart looking remote, but the part that needs to be soldered have no clear markings of what exactly to solder. There are 8 pins to pick from, no “how to” manual — and this is just typical for the Raspberry community (it’s not the first time I have recieved stuff like this).

The UP webshop makes more sense. They dont have thousands of chips or gadgets, because you are expected to deal with things that run on USB and are supported by the operative system.

As such they sell you the most obvious parts:

  • 10″ touch screen
  • Sata drive shield
  • Plastic casing
  • Converters (USB 3 male/female etc.)
  • Wifi dongle
  • .. and so on

When it comes to remote control, which is really handy when coding kiosk software that eventually will be keyboard-less (so its the ultimate admin magic wand) take your pick. There are thousands of wireless USB remote control packages out there, and if they are compatible with Windows, they can be used with UP.

Also a hell of a lot easier to code for!

Personal verdict

This is by far the most exciting gadget I have seen in years. Much more exciting than the Sony Virtual Reality gogles for Playstation 4 (rev 2) that just came out. Dont think I was ever so disapointed as when I got that. Been waiting 20 years for VR to become a reality, only to realize you need a padded room if you want to move around.

So instead of buying the Playstation VR for XMas, get yourself 3 UP boards for the same price. I can guarantee that you will get much more joy from owning them than the Playstation Virtual Reality headset.

My personal verdict for the UP board is a shining 5 out of 6 stars!

No other board except the Raspberry PI 3 has ever gotten that kind of score on my website. Not even the iPad when that came out.

What about classic Emulation? How does that work?

How does it work? It is so smooth that im at a loss for words. Seriously, I dont even know where to begin describing how sweet this is.

Let me say it like t his: When I fire up Amiga Forever and run the pimped up 3.x “enhanced experience” (read: one pimped up Amiga 1200), start IBrowse and visit, the webpage renders just as fast as Chromium renders. Scrolling with the mouse-wheel is blistering faster and you actually dont notice any difference between using the emulated Amiga or Windows.

This setup is pure joy on Amibian on the Raspberry PI. On the UP board its bliss, bliss on tap, bliss on demand. A perfect emulation experience all the way through.

This setup is pure joy on Amibian on the Raspberry PI. On the UP board its bliss, bliss on tap, bliss on demand. A perfect emulation experience all the way through.

Images download and render near instantly, music is crisp and clear, not a flicker or jitter in sight. And the CPU has depth, thats the main difference between Raspberry PI and the UP board. Let me explain what I mean with that.

I downloaded the latest freepascal (version 3.1) which is the same version that I use on Linux and Windows to produce modern products. Now on the Raspberry PI whenever you attempt to compile anything substantial, the whole thing goes into a grinding halt. The Raspberry PI is excellent for superficial things, especially desktop and games where it can fall back on the GPU and custom chips to get the job done.

Compiling anything, even older stuff that is a joke by today standard, is painful on the Raspberry PI. Here showing my retro-fitted A500 PI with sexy led keyboard. It will soon get a makeover with an UP board :)

Compiling anything, even older stuff that is a joke by today standard, is painful on the Raspberry PI. Here showing my retro-fitted A500 PI with sexy led keyboard. It will soon get a makeover with an UP board 🙂

But compilation is pure CPU work and this is where the Raspberry PI cannot hide what it is. A slow, underpowered ARM system on a chip, posing as a real computer.

I compiled a small shell-utility i coded especially for the Amiga, called AmigaZipper. A very humble program with barely 8000 lines of code. When compiling on my UAE Amiga running on the PI, it took almost an hour to produce an executable binary.

How long did it take on the UP board? oh, 5 seconds give or take. So where the Raspberry looks great for superficial things it lacks grit. The UP board however has so much more power it can apply to a task, and plows through it like a warm knife through butter.

Classic Amiga runs along nicely, eating around 40% of the cpu running in 1920x1080x32 bpp. Even with the latest freepascal (3.1) compiling on the 68k it never broke 60%. Perfect. Just perfect!

Classic Amiga runs along nicely, eating around 40% of the cpu running in 1920x1080x32 bpp. Even with the latest freepascal (3.1) compiling on the 68k it never broke 60%. Perfect. Just perfect!

If you are serious about emulating Amiga up to OS 3.9, then this is absolutely the board to get! With the Raspberry foundation releasing Pixel for x86, we can only hope Gunnar Kristiansson creates Amibian for x86 as well — then all will be right with the world and the force will be in balance once again.

Merry Xmas!

Embedded boards, finally!

December 19, 2016 Leave a comment

I was about to conclude that this day horizontally sucked beyond measure, but just as I thought as much -the door bell rang. It was FedEx (ta da!) with not one package, but two packages of super nerdy goodness. And here I was sure these puppies wouldnt arrive until after Xmas!

Top the x86 UP board, left bottom a Raspberry PI 3, bottom right the ODroid XU4

Top the x86 UP board, left bottom a Raspberry PI 3, bottom right the ODroid XU4

The ODroid XU4

A while back I ordered the very exciting “Raspberry PI 3 killer” ODroid XU4. It’s a bit of a unicorn, said to be roughly 10 times faster than the Raspberry PI 3. Honestly, having looked at the specs I can’t imagine it being more than 3 to 4 times faster; depending greatly on what your application is doing and the operative system in question. Here is the full spec sheet:

  • Samsung Exynos 5422 Cortex™-A15 2 GHz and Cortex™-A7 Octa core CPUs
  • Mali-T628 MP6(OpenGL ES 3.0/2.0/1.1 and OpenCL 1.1 Full profile)
  • 2 Gbyte LPDDR3 RAM PoP stacked
  • eMMC 5.0 HS400 Flash Storage
  • 2 x USB 3.0 Host, 1 x USB 2.0 Host
  • Gigabit Ethernet port
  • HDMI 1.4a for display

As you can see the ODroid comes armed with 8 CPU cores while the Raspberry PI 3 (RPI3) has only 4. It also comes with twice the RAM (which really impacts performance), and tests have shown the ODroid disk/IO speed is roughly double that of the RPI3. But the cores is what caught my eye, because 8 cores means 8 simultaneous threads. This means code written for node.js, apache [php] or indeed custom, natively compiled Free Pascal servers will be able to handle twice the payload straight off the bat. For stateless protocols like http, I am guessing a performance factor of 3 to 1 compared to an RPI3.

Having said all this, there will be exceptions where the PI3 performs equal of better. The RPI3 SoC have better HD video functionality, so the ODroid have to work harder to produce the same.

For those of you thinking the ODroid will solve all your Amiga emulation problems, the answer is yes. It is significantly faster than the RPI3. But never forget that single threaded applications like UAE (Unix Amiga Emulator) involves a high degree of chipset synchronization. If the chipset performs out of sync (for instance if the blitter finishes faster than it should), all manner of problems will occur. So all that synchronization causes some parts to wait. Meaning no matter how fast your computer is (even my Intel i7 CPU) UAE will never reach peak performance. It will never use the full capacity of a single core due to synchronization.

A small note is also popularity, which means less updates. ODroid has a somewhat slower update cycle than Raspberry. It has thousands of users, but it’s not even close to getting the attention of the Raspberry PI project. And where the Raspberry website has been community oriented, with inspiring graphics, free tutorials and a huge forum from day one – the ODroid has nothing that even compares.

From what I read and hear the biggest problem has been kernel updates. But, seriously, that is often a Linux fetish. Unless it’s a super important update, like going from 32 to 64 bit or patching a really terrible security flaw – most users are not going to be bothered by a 2 versions old kernel. You still have access to the proverbial library of Alexandria that is aperture package manager (apt-get command) and compiling a few programs from code is not that hard. It’s typically download, unpack, configure, make and install – and that’s it.

Naturally, considering the faster CPU of the ODroid, double the ram, double the IO speed – emulators like UAE will be awesome. ODroid is also the only ARM SoC out there in this price range that plays Sega Saturn and PSX 2 games without any problems. And it will also be far better suited for servers, be it natively compiled freepascal servers, mono or Smart Pascal [node.js] work.

The UP x86 board

The second package contained another embedded board, this time the x86 based UP board. I bought the most expensive model they had, containing 4 gigabytes of ram and 64 GB EMMC on-board storage. The board sports a 64 bit Intel® Atom™ x5 Z8350 processor, running as high as 1.92 GHz. Between Raspberry PI 3, ODroid XU4 and UP – let there be no doubt which model will come out on top.

  • Intel® Atom™ x5 Z8350 Processor 64 bit – up to 1.92GHz
  • Intel® HD 400 Graphics ,12 EU GEN 8, up to 500MHz Support DX*11.1/12, Open GL*4.2, Open CL*1.2 OGL ES3.0, H.264, HEVC(decode), VP8
  • 4GB DDR3L
  • 64GB eMMC
  • 4 x USB2.0 external connector
  • 2 x USB2.0 port (pin header)
  • 1 x USB 3.0 port
  • 1 x Gb Ethernet (full speed) RJ-45
  • HDMI (DSI / eDP)
  • MIPI-CSI Camera interface
  • 5V DC-in @ 3A 5.5/2.1mm jack

Where the ODroid is rumoured to be 10 times faster than a RPI3, that is a statement closer to an urban myth rather than fact; The UP board on the other hand IS without a shadow of a doubt 10 times faster (and then some), no question about it. Since this is essentially a vanilla x86 SoC PC, the world is your oyster. The full onslaught of x86 software is at your disposal, be it Windows or Linux you chose as your base.

x86 UP board, same size as the PI3 but packing a hell of a punch!

x86 UP board, same size as the PI3 but packing a hell of a punch!

The board has no problems running Windows 10, Ubuntu (full 64 bit version) and Android. And it’s actually more responsive than a few laptops on sale. I wanted a cheap laptop for dedicated Amiga Emulation – but having tested both the low-end Asus and Dell models it just left me wanting. The problem with cheap model laptops is often the absurd memory they ship with (1 to 2 gigabyte). The devices spend more time swapping data back and forth between ram and disk than they do running your code!

This is not the case for the UP board thanks to the on-board 4 gigabytes of ram.

Being a Embarcadero Delphi and Smart Mobile Studio (object pascal for JavaScript) developer this board is perfect for my needs. It has so much more to offer than the cheap ARM boards and is something I can use to create custom hardware projects and avoid many of the adaptation problems associated with ARM Linux.

While I love Raspberry PI 3, Linux takes some getting used to. There are things that takes me days to figure out on Linux that I completed in minutes on Windows (I have been using Windows since the beginning after all). This will change as my skill and insight into Linux matures, but if I can choose between the RPI3 and the UP board, I would pick the UP board every time.

Price is a factor here. RPI3 sells for between $35-40, the ODroid retails for $99 while the x86 UP board can be yours for $150. But you can also buy a cheaper model with less ram and EMMC storage. The UP provider has the following options:

  • $99 – 2 gigabyte memory, 16 gigabyte EMMC storage
  • $109 – 2 gigabyte memory, 32 gigabyte EMMC storage
  • $129 – 4 gigabyte memory, 32 gigabyte EMMC storage
  • $150 – 4 gigabyte memory, 64 gigabyte EMMC storage

If you’re thinking “oh, for that price I could get 2, 3 and 4 PI’s respectively!”, keep in mind the level of CPU power, graphics speed and available software here. The fact that you can install and run Windows 10 and just copy over your Delphi or Smart applications is really sweet.

And if you are into emulation then naturally, Windows has the latest and greatest. Things like EmulationStation is going to run so much better on this device than anything else at this price out there, especially if you get the x86 Linux edition. You can run the latest WinUAE on Windows, giving you full PPC emulation and essentially booting straight into Workbench and OS4.1. $150 for an OS4.x capable SoC that is x86 based makes a hell of a lot more sense than forking out $489 for the A1222 low-end PPC based Amiga NG board planned for 2017. I mean, who the hell buys PPC in 2017 (!) Emulation will always be a little bit slower than the real thing, but we are talking negligible.

And with the UP board you can also re-cycle the hardware when you get bored with OS 4. I mean, there are only so many things you can do with a modern Amiga. It is great fun for enthusiasts like myself, but I would much rather run a juiced up version of OS 3.9 with my massive collection of WHDLoad software, cd32 software and modern compilers (like Free Pascal 3.1 which work brilliantly on an emulated, classic Amiga).


For the developer the UP board gives you the same choices you enjoy on your Windows development machine in general. You can use it to deliver your Delphi, C++ builder or Smart Pascal solutions. If you happen to own a Microsoft Embedded license its performance will be greatly enhanced since you can drop a lot of the “standard” stuff that has to ship with Windows. Remember, a standard Windows  installation is written to work on millions of PC’s and equal number of different hardware configurations. For customized, single purpose applications (like a kiosk system, information booth, cash machine type system) you will be able to cut out quite a lot. Do you need support for printers? Do you need driver-collection for hardware that is not there? Windows embedded allows you to cut the disk image down to the bones, and it’s also written to run on slower CPU’s than what people in general own – so the performance is much better.

  • Run your Delphi projects, it’s a normal PC after all
  • Run your node.js Smart Pascal projects with ease
  • Make use of nodewebkit for Smart Pascal to create full screen, desktop oriented software, enjoy the full scope of GPU powered CSS
  • Enjoy the debugging tools you already know
  • Run familiar databases like MSSQL, MySQL and Firebird with a more friendly and developed editors and tools
  • Use the more friendly backup solution that ships with Windows rather than some cryptic Linux solution (although some Linux versions that have desktop control-panels are just as great!)
  • Use GPIO ports from Delphi and C++ builder (!)
  • Just hook your UP board into your network and install/setup via remote desktop. It saves a lot of time.

If you are a Delphi programmer looking for a reasonable embedded board to ship your killer Windows-based product, the UP board is by far the best option I have seen (and I have tested quite a few board out there!).

The problem with high-end boards is not just the initial price, which can be anything from $300 to $400. Sure, these boards Intel i2 or i3 processors (much faster), but you end up paying extra for everything. Need a new ram module? That will set you back a pretty penny! Want GPIO? Again we are talking $100+ just to get that.

By the time you sum up the expenses, you realize it would have been cheaper to just visit the local computer store and bought a mico-atx board with more ram and a faster processor (!). Micro-atx is not that big, perhaps 2 times larger than the UP board (if you place them into a square). The micro-atx is often to high to be practical embedded boards where you want to cram as much hardware as you can into something the size of a router or set-top-box. The heat sink hovers over the motherboard like the eye of london.

Here is what you should have in mind:

  • Is size a factor?
    • No
      • Buy a cheap mico-atx pc
    • Yes
      • Take a look at the boards listed below
  • Do you need Windows support?
    • No
      • Get a ARM based device
    • Yes
  • Do you need an i3 or i5 CPU?
  • Do you need GPIO built-in?

Note: The UP project is presently busy working on their second kickstarter, which is cleverly called “Up 2” (sigh). This board is slightly larger, being dubbed “UP squared”, but there is a good reason for that. First of all it ships with the more powerful Intel® Pentium™ N4200 2.5 GHz CPU, up to 8 gigabyte of memory and 128 gigabyte emmc storage. Just like the present UP board you will be able to pick a configuration that matches your wallet, but they are aiming at roughly the same price-range as they have now. Head over to the UP project and have a peek at the specs!


So far the only negative thing about the UP board is the speed of the emmc storage. As you probably know, emmc is a storage medium designed to be a cheap alternative to SSD. But when it comes to speed it can be anything from SD card to USB 3 in actual performance. This is very vendor spesific and obviously the cheaper models are going to be the slowest. So the first thing you are going to notice is that even though this is a PC, installing things takes a lot longer.

You can however enter the bios and boot from a USB 3 stick. For homebrew projects that shouldnt matter much, and these days a sexy and small 128 or 256 gigabyte (you know, those tiny usb storage devices that is barely the USB socket and little else) is affordable.

I find myself having to look for negatives here. I do think the UP organization should do something about the startup of the device. When you boot the UP logo is displayed, but they should have added a line of text about what key to press for the bios. I ended up going through the typical ones, F1, F2, F8 and F10 which did nothing. The next key was printscreen, before i finally hit DEL and the bios editor came up.

Insignificant, but a small detail that would make their product more polished.

A far worse notion is how they charge money for branding. When the product boots the UP logo comes into view for a couple of seconds (in full-screen). If you want to replace that, the minimal fee is $500 (for a small picture). This is something that simply infuriates me, because you cant change it.

When you buy an embedded board for production purposes, hidden costs such as this for something as simple as a picture – is completely unacceptable. I sincerly hope they drop this practise, because I will not use a board with a fixed boot picture in the embedded systems I deliver. There are plenty of other boards about there with similar specs at competitive prices. Being able to brand your own system is considered normal in 2016 and it has been common for years now.

At least an option in the bios for removing or hiding the UP logo should be in place.


The test

For the next few days before and after Xmas, I’ll be playing with these boards as much as time allows. I have already installed the latest Ubuntu on the UP board – and it performed brilliantly. I am presently giving Windows 10 a test drive, and my primary aim will be Smart Mobile Studio graphics demos and UAE running Amiga OS 4.1 final edition. I will also test how emulators work. This is especially exciting for the ODroid since that is the one most people will pick as an alternative to Raspberry PI 3.

If you are a dedicated retro-gamer or just love all things Amiga then again, the UP board should be of special interest to you. It will set you back $150, but considering that it has the exact same form-factor as the Raspberry PI (except its components go a few mm. higher) is considerably faster (in a league way beyond both the PI and ODroid) – this could be your ticket to get a cheap “next-gen” emulated Amiga. It will run OS 4.1 final without problems under WinUAE and it will be a pleasant experience.

I will give you updates as the frame rates, execution speed and overall performance comes in. Oh and the tests will obviously use the RPI3 as the baseline.

Cheers guys!


Smart Pascal, supported server types

December 2, 2016 1 comment

Use node.js to fill your xmas with fun!

Node.js is probably one of the coolest pieces of software I have had the pleasure to work with for years. It’s platform independent and available for just about every operative system you can imagine. I would even go so far as to say it has become universal.

NodeJS allows you not only to write server-side JavaScript, but also your own system level services. This is especially easy on Linux where the philosophy regarding a service is somewhat different from Microsoft Windows. On Linux, a simple bash script can be installed as a service. You can write services in python, perl or whatever tickles your fancy.

Our latest addition: UDP

Today I had a few minutes to test the UDP implementation I finished last week, and I was for some odd reason expecting an exception or “something” to come up. You know.. when something is that easy to write, there’s typically is a catch right? Or maybe im just and old, cynical Delphi developer. Either way, it worked on the first try!

So easy, so powerful and you can deploy it anywhere. An embedded system, a dedicated server - or do a push to your Amazon / Azure cloud stack. Node.js is so powerful once you understand how to use it.

Compiled SMS (node.js) talking with a Delphi application

Now I realize that UDP is not what you use for high-end, reliable communication. But that is beside the point. I want the code you get access to in our next update to be polished, easy to use and something you can rely on. And the keyword here is “co-operation”. My personal service stack that I host in my own home is written in 4 different languages. You have Delphi and C# services running under Windows, you have Lazarus daemons on my Linux box (a full PC) and last but not least — you have Smart Pascal servers running on embedded hardware.

Our list of server types now include:

  • HTTP
  • TCP
  • WebSocket
  • UDP

I use UDP more or less as a signal trigger between processes to handle wait, ready, update and even restart. So by broadcasting a single “shutdown” signal, all my machines will gracefully stop and then power down.

So, how does an UDP server look like? It borders on ridicules how little effort it takes:

procedure TNodeService1.SetupUDPServer;
  Server: TNJUDPServer;

Server := TNJUDPServer.Create;
Server.Port := 1881;
Server.Address := '';
Server.MulticastLoopback := true;
Server.Broadcast := true;
Server.Exclusive:= false;

Server.OnMessage := procedure (Sender: TObject; Data: variant;
          RequestInfo: TNJUDPRequestInfo)
  writeln("Message recieved!");

Server.OnError := procedure (Sender: TObject; ErrorObj: TJsErrorObject)
  writeln("Error:" + ErrorObj.message);

Server.OnClose := procedure (Sender: TObject; ErrorObj: TJsErrorObject)
  writeln("Server closed");

Server.OnAfterServerStarted := procedure (sender: TObject)
  writelnF("Server started, listening on post %d @ %s",
  [Server.port, Server.Address]);

Server.Active := true;

That’s pretty much it. Naturally you have to fill in the blanks, but the above code is all you have to write to create a UDP server. The cool part is that all server classes inherit from a common ancestor, so once you know how to code one – you have a leg up on using the rest of them.

Running the server as a Linux Daemon

Like all languages, node.js has a few tools that are considered standard. It’s like we Delphi developers take component’s and libraries like GR32 and SynEdit for granted. These packages have become so standard that we forget how hard it can be for beginners to get an overview of what’s available.

Turns our node.js is no different, and the tool everyone is using to run their node.js code as a dedicated background service (meaning that it will start during the boot sequence) is called PM2 or node.js process manager v2.

Running your Smart Pascal server as a system-level daemon is very easy once you know what to look for :)

Running your Smart Pascal server as a system-level daemon is very easy once you know what to look for 🙂

In short, PM2 is like a watch-dog that keeps an eye on your service. If it crashed PM2 will re-started it (unless you tell it otherwise), it also does extensive logging for you – and it will even generate a startup script that you can add to the Linux (or windows) startup sequence.

But the most important aspect of PM2 is that you can easily get some “live” info on your services, like how much memory they consume, the CPU consumption and everything else. It’s also PM2 that makes it a snap to run your node.js servers in cluster mode, meaning that you can spread the workload over multiple machines and cores for better performance.

Getting PM2 up and running is easy enough. Just make sure you have installed NPM first, which is the “node package manager” front-end. To install NPM you just write:

sudo apt-get install npm -y

And with NPM available on your system, you install PM2 through NPM (PM2 is ofcourse written in node.js itself):

npm install pm2 -g

Next, having compiled our Smart Pascal project, we copy the file over to a shared folder on our raspberry PI (I installed Samba to make this easier), cd into the folder and type:

pm2 start backend/backend.js --name backend

Notice the “–name backend” part? PM2 allows you to assign names to your code. This makes it easier to manage them (not having to type the full path every single time).

To check if our service is now installed, type:

pm2 show backend

And voila! We have a live Smart Mobile Studio server running on a Raspberry PI 3! Now whip out Delphi and recycle those legacy services!

Overclocking Raspberry PI 3, part 2

November 20, 2016 2 comments

If you havent read my first installment then head back and read it here.

Right. Overclocking is not something that should be taken lightly. I have seen people get cpu-burn and basically kill their brand new Intel i7 CPU’s – effectively throwing well over a thousand dollars worth of gear straight out the window.

My idea of overclocking is not to push the cpu to the bleeding edge. Moderation is the keyword here. Its like when we were kids and bought trim-set’s for our mopeds and dirt-bikes. Filing down the intake on the cylinder and pumping more gasoline in could get that 50cc engine yielding 70 KPM rather than the default 50. But if you filed even 5mm too much, you could pretty much throw the whole cylinder in the thrash. And if you didn’t get a dedicated cylinder with better cooling — the whole engine would burn out.

The test

You can get some heavy-duty performance test-kits for Linux, but for moderate overclocking I find that practical, hands on testing works just as well. In my case I have used a simple JavaScript demo (actually a port of a JS68k demo to Smart Pascal) that I compiled on my PC and dumped on my server.

On my Raspberry PI I just start Chromium and let the demo run.

Without overclocking I get the following performance factors:

  • 1-2 frames per second
  • 46-57% CPU usage in task-manager

Preparing the hardware

I bought a simple, cheap set of 3 heat-sinks for around $2. So first order of the day is to get that attached to the 3 chips that more or less make up the Raspberry PI 3b.


Heatsinks + fans all humming nicely!

My son managed to play a cheap graphics card to death earlier, which just happened to have a small fan. So I took that fan and attached it to the heat-sink with a double-sided tape pad, then connected the power cords to the GPIO pins. This ensures a reasonable degree of cooling. Not top of the line liquid stuff – but a lot better than just heatsinks alone. And hey, it’s a $35 SoC, so heat sink pluss fan is pretty much giving it the royal treatment.

Thats one pimped up A500 :)

That’s one pimped up Amiga 500! 🙂

The settings

Next is to adjust the config file to perform the actual overclocking. Again, I stick to safe values. You could probably push this further by adjusting sdram read and write frequencies — but you may end up burning the whole thing to pieces. Also, the keyword here is “safe”. To much overclocking and the amount of computational errors actually renders the whole thing useless.

Not running out of SD card slots any time soon!

Not running out of SD card slots any time soon!

Start a command-line prompt and do:

cd ..
cd ..
cd boot
sudo nano config.txt

Now scroll down until you find

#uncomment to overclock the arm. 700 MHz is the default.

Replace the values there with:

#uncomment to overclock the arm. 700 MHz is the default.

Next, hit CTRL+X, press Y, then enter to save the file. Now type:


Performance test

Now simply start Chromium again and run the demo. The performance have now gone up quite considerably:

  • 8-9 frames per second
  • 42% CPU usage in task-manager
From 1-2 FPS to 8-9 is actually a MASSIVE speedup

From 1-2 FPS to 8-9 is actually a MASSIVE speedup

Now let’s check the temp. From what I read, the core will blow at around 80 degrees, so no matter what you decide to do – make sure it stays well below that.

Open up a command-line prompt and type the following:

/opt/vc/bin/vcgencmd measure_temp
Keep an eye out on the temp, let it run for a while and make sure all is safe

Keep an eye out on the temp, let it run for a while and make sure all is safe

Let’s do some maths

Since the JavaScript demo is a “per-pixel demo”, meaning that it uses the canvas to draw stuff, with a secondary callback cycle applying an alpha clear to give the impression of fading pixels out ( fillrect(0,0,width,height, rgba(0,0,0,0.3)) ) running out of sync — the demo is actually processing millions of bytes per frame.

Just for sake of argument, lets say the chrome window is “1024 x 1024” in 32 bit mode (which is an understatement, but let’s go with that). We then get:

  • 1024 * 4 (four bytes per 32 bit pixel) = 4096 bytes per scanline
  • 4096 * 1024 = 4,194304 million bytes per frame

There is also a stride offset, but I will ignore that since it probably amounts to about 1kb or less. Right, since we are now drawing 9 frames instead of 2, this gives us:

7 * 4194304 = 29360128 – a boost of 29.3 million bytes per second

Final words

Im sure you can overclock the shit out of this if you really want, but honestly — I would rather have a piece of kit I can trust, that is stable, that dont renders the device useless in six months time – and that gives me that little extra I need for my embedded work (or Amiga emulation for that matter).

Well, that’s it for now — Remember to practise safe hex!

Build NodeJS from Source

November 17, 2016 Leave a comment
nodeJS rocks!

nodeJS rocks!

Since your Smart Mobile Studio programs can run from Linux under Raspberry PI, I figured I could write a few words about building from C/C++ source. Normally you don’t need to do this, but in case the process-manager (which makes sure your Smart NodeJS servers can be clustered and essentially controlled as services) can be picky about the version – you may suddenly find yourself needing the cutting edge.

Open up a command-line prompt and CD (change dir) to the location you want to keep node. Since this is so essential to my system I keep it at root (/), but you may want to stuff it in your home folder.

Either way, cd to the location then do:

sudo apt-get install build-essential
sudo apt-get install curl openssl libssl-dev

Odds are this is up to date (it was on my fresh Raspbian image). If not, let it finish (you may need to press “y” at some point) and let it work itself out.

You also need to install git (may also already be there):

sudo apt-get install git

With those in place, let’s do a clone of the node.js repository:

git clone

When its finished you should have a “nodejs” folder available. So we cd into that and do a configure:

cd node
sudo make install

Now building anything on the Raspberry PI is slow. So the “make” call will probably take 1.5 hours depending on your PI. If its overclocked you will probably get away with 45 minutes, but a bog standard Raspberry PI 3 is much slower.

When it’s all done, test it with

node --version

As of writing that prints out “8.0.0-pre” since im using the cutting edge pre-release version right now.

Now you can install npm (node package manager) and them pm2 and enjoy the show 🙂

Overclocking the Raspberry PI 3

November 17, 2016 2 comments

On the menu for today was a meeting with my partner in crime, Glenn, who is working hard on the Raspberry PI Linux distro for Smart Mobile Studio – and then do some Linux stuff. For the Smart Pascal headers to actually fit the latest stuff I needed (doh) the latest version of Node to test on. Which has to be built from C/C++ source code on the Arm device.

Building purely from C/C++ source on a PI is .. probably the worst thing I did all day. Cross-compile from your PC instead

Building purely from C/C++ source on a PI is .. probably the worst thing I did all day. Cross-compile from your PC instead

So I baked a fresh copy of Raspbian with the sexy new Pixel UI, updated packages and so on. I set the CPU in performance mode (yes the CPU has different modes) before doing a compile — installed git, cloned out the latest nodejs repository and hit configure + make.

Well, its been 60+ minutes since the bloody build started so I thought, hey why not overclock the sucker and at least shave some off the waiting. But sadly overclocking is not supported by the official Raspbian system settings.

After a bit of google time I found a guy that had gone through the ropes and settled on a sexy 1400 frequency overclock with an over-voltage at around 6. This is stable and the core temp when spawning 4 intense 100% threads (one for each core) is around 58-60 degrees. In other words, well within the specifications (the cpu blows at around 80 degrees and will also kick the bucket at -40).


The dark side of the force is a pathway to many abilities, some considered unnatural

So — you do this at your own risk. Do not attempt this unless you understand the risk. By overclocking you can kiss the warranty good-bye, and I take NO RESPONSEBILITY for whatever damage or loss this could cause. You are on your own when you overclock anything, be it your dishwasher, PC or Raspberry PI embedded boards.

Having said that, the worst that can happen is that you kill your PI. Not exactly a heart breaking loss since they retail at around $35. In most cases when a CPU gets to warm it just shuts down or programs crash. So should that happen let it cool, then use a normal image and leave overclocking alone.

Heat sinks

Yes it may look silly, but if you overclock anything you need to delegate the extra heat somewhere. You can get a heat-sink set for around $1-$3 depending on the vendor. I ordered a couple of sets from Asia at around $2. You get the same kit at RC components for roughly the same price.

Tiny little things with double-sided sticky tape. Works like a charm.

Tiny little things with double-sided sticky tape. Works like a charm.

Ironically it’s not just the CPU that overheat, but also the USB controller and WIFI chip. Thats why a trim-set typically ships with 3 mini heat sinks.

Let there be light!

Boot your PI with a normal raspberry image (and take a backup in case of karma). When you get to the desktop, open a command-prompt and cd all the way back to root (/). Then cd into the boot folder. Inside the boot folder you will find a file called “config.txt”. You need to edit this file with admin rights:

sudo nano config.txt

This opens up nano, a dos like text editor. Just scroll down until you find:

#uncomment to overclock the arm. 700 MHz is the default.

Change that to the following:

#uncomment to overclock the arm. 700 MHz is the default.

hit CTRL+x, when asked if you want to save – hit “y”. The file is now saved and the next time you boot – it should run at 1.45 GHz. Which is quite nice

To reboot, just type


This is the setting that works best for me:

#uncomment to overclock the arm. 700 MHz is the default.

The sdram overclocking might not work at all (did for me though), and some PI’s actually wont run any faster above arm_freq=1300, but mine works fine with the above settings.

From 3 FPS to 7 FPS! We are talking millions of pixels per frame, and going from 3 to 7 FPS is quite a boost!

Click for video!!! From 3 FPS to 7 FPS! We are talking millions of pixels per frame, and going from 3 to 7 FPS is quite a boost!

Also note that if it wont boot, just plug the sd-card into your PC and edit the config.txt there in notepad (the boot folder on the pi is actually a mapping to the windows fat32 partition).

Remember to fit the heat-sinks BEFORE you boot (!)


Since some guy has posted “you dont understand the raspberry PI” in the comment section I just want to respond to that briefly.

Yes, you are partly right, there are aspects of the PI I dont have a clue about. Nor do I pretend to be guru about every piece of tech i come into contact with (that would be a very booring life IMHO). In fact, what I think is exciting about that little machine is that you can tinker and learn as you go – and that even mid-level users like myself can get results.

The JavaScript demo I used to test the clocking is actually a reasonable starting point. At first it was running at roughly 1 fps (due to poor coding, I used timers rather than RequestAnimationFrame to synchronize redraw). By just changing the arm_freq to 1350 this doubled, to a whopping 2 fps.

After i tweaked the memory clock-speed and gpu and set some overvoltage, that in turn went up to a stable 7 fps.

Since this is a per-pixel demo, meaning that it uses the canvas to draw stuff, with a secondary callback cycle applying an alpha clear to give the impression of fading pixels out ( fillrect(0,0,width,height, rgba(0,0,0,0.3)) ) running out of sync — the demo is actually processing millions of bytes per frame.

Just for sake of argument, lets say the chrome window is “1024 x 1024” in 32 bit mode (which is probably a bit small, but lets go with that). We then get:

  • 1024 * 4 (four bytes per 32 bit pixel) = 4096 bytes per scanline
  • 4096 * 1024 = 4,194304 million bytes per frame

There is also a stride offset, but I will ignore that since it probably amounts to about 1kb or less. Right, since we are now drawing 7 frames instead of 3, this gives us:

4 * 4194304 = 16,777216 – a boost of 16.7 million bytes per second


I may not be a Raspberry PI guru, nor would I pretend to be one, but boosting the javascript virtual machine by that magnitude is pretty good. And remember: JavaScript is single threaded. I have yet to see what happens when we use all the cores here.

But I am open for information and would love to hear your take on this. Im sure we can dig down and find out exactly which of my settings had the most impact.

Either way: overclocking and tuning the Raspberry PI 3 for better performance is possible. And that was the only thing on the table here.

The case for Raspberry PI, FPGA and AmigaOS 4.1

September 10, 2016 3 comments

First, thanks for so many good comments on the whole Amiga retro-emulation concepts. I think there is a sort of resurgence today of the whole retro gear thing. On Facebook the Amiga forums and groups are growing, and there is really a sense of community there. Something I havent experienced with the Amiga for well over a decade (or was it two?).

To those that grew up without an Amiga we “old timers” must seem nuts. But that is to be expected by generations growing up with 24/7 internet connections. I’m not dizzing young programmers in any way, absolutely not; but I will make a case that you are missing out on something very valuable in terms of learning and evolving your skill.

“It’s just that it’s based on pre-existing hardware, not an imaginary instruction-set that
assaults the stack while raping the instruction cache”

The term “personal computer” (PC) doesnt really have any meaning today. I see that with my son as well. He has no personal relationship with his computer at all. The computer is a means to an end for him and his friends – a portal if you like, to the reality on the internet. Be it steam, Photoshop express, chatting or whatever. Young coders sort of have a split reality, where their friends online that they have never meet plays a bigger role in their lives than, well, their best friend across the street.

Classic Amiga Workbench

Classic Amiga Workbench running under Amibian

People who grew up without the internet had only their computer to deal with. It was the center of music, demos, games and creativity. Be it coding, graphics, sound or whatever was the interest. The result was naturally that you created bonds to that computer that, to other people, could seem odd or silly. But the phrase “personal computer” is not just a throwback to the time when you no longer needed a campus mainframe or terminal. It also hints to a more personal approach to technology. Which is easy to forget in an age where you switch mobile phones once a year, and the average phone has more computing power than was on the planet in the 1970’s.

Amiga emulation; why it’s a good thing

If we forget the visual aspects of the grey “classical” Amiga OS for a moment and put the looks on the backburner — why on earth should a modern programmer or computing enthusiast even consider Amiga OS? What could a 30-year-old tech bring to a modern world of high-powered CPU and GPU driven monsters?

In a word: efficiency.

AmigaOS thrives with just one megabyte of memory. Stop and think about that for a moment. The core operating system itself resides in a 512kb (half a megabyte) ROM – and the rest fits nicely on a couple of 720kb disks. So if we say that a full desktop experience can fit in 4-5 megabytes (if we include the programs, accessories and extras), what does that tell you?

It should tell you something about how the code is written. But secondly it should tell you about how we write code today (!)

“You think Linux is a fast and efficient operating system? You don’t have a clue”

An average Microsoft Windows installation is what? 16 gigabytes? You can probably trim it down to 8 gigabytes by removing services, graphics and drivers you don’t use. There is also a huge difference in the size of executables and the amount of information stored in the binaries — but ultimately it comes down to a shift in mindset that occurred back in the late 90’s: rather than forcing coders to write efficient programs, the emphasis was placed on the hardware to deliver enough power to run crap and bloated code.

Now being a programmer myself I have no illusions that if AmigaOS, this time the modern and latest 4.x version, was ever re-compiled for x86 it would naturally result in bigger binaries. Depending on the amount of drivers, you would probably end up with at least 512 megabytes to 1 gigabyte of software. Add presentation and media to that and we are quickly breaching the 1.5 to 2 gigabyte boundary. But that in itself would be revolutionary compared to the size of Ubuntu or Windows. Yet the core of the operating system is so small that many young developers find it hard to believe.

And yes I know the Linux kernel and base packages can be squeezed down. But in all honesty, Amiga has much more interesting system. Some of the stuff you can do with shell scripting and Arexx on the Amiga, the lack of cryptic complexity, the ease of use and control you as an end-user had; im sorry but Linux is anything but user-friendly.

Why Raspberry PI

By any modern measure, the Raspberry PI is an embedded board at best, and a toy at worst. It exists there between the cusps of single-function boards and a modern computer. But is it really that bad? Actually, its bloody smashing. It’s just that people havent really been able to run anything written specifically for it yet.

Amibian, a debian based distro that boots straight into UAE (Unix Amiga emulator) and runs classical 16/32 bit Amiga OS, presently performs at 3.2 times the speed if an Amiga 4000\o60. So for $35 you will own the most powerful Amiga ever devised. If you take it one step further and overclock the PI (and add a heat-sink so you don’t burn out the SoC) it emulates the Amiga operating system roughly 4 times the speed of the flagship high-end Amiga of the late 90’s and early 2k’s. You also get 32bit graphics, HDMI output, USB device access through the Linux sub-layer, built-in tcp/ip (and WiFi built-in on the model 3b). And naturally: a hell of a lot more ram than the Amiga even needs (!)

Not exactly technologically impaired

AmigaOS 4, not exactly technologically impaired

Now remember, this is emulated on 68k instruction level (!) It is practically the same as running Java or CLR bytecodes (!) Which is a good parallell. People ask me why i bother with 68k; My reply is: why the hell do you bother with Java bytecodes if you don’t have a clue what a virtual machine is! An emulator is a virtual machine in the true sense of the phrase. It’s just that it’s based on pre-existing hardware, not an imaginary instruction-set that assaults the stack while raping the instruction cache (yeah I’m looking at you Java!).

Imagine then for a second what the situation would be if Amiga OS was compiled for Arm, running natively on the Raspberry PI with direct access to everything. You think Linux is a fast and efficient operating system? You don’t have a clue.

I mean, the PI was initially created to deliver cheap computing power to schools and educational centers, not to mention third-world countries. It made big waves as it blew the ridicules “$100 one PC per child” campagne out of the water (which was more an insult to the poor living in Africa than anything resembling help). Yet at the end of the day – what do these third world countries have to work with? Raspbian and Ubuntu are usable, but only superficially.

Try compiling something on the PI with a modern compiler. What would take less than a second to compile under Amiga OS can take up to 45 minutes to build under Linux on that SoC. If a kid in Africa starts learning C++ with Linux on a PI, he will be 59 years old before he can even apply for a job.

AmigaOS 4 is a sexy desktop

AmigaOS 4 is a sexy desktop

If AmigaOS 4 was ever compiled and setup to match the SoC firmware (which is also a benefit about the PI, the hardware is fixed and very few drivers would have to be made), it would revolutionize computing from the ground up. And I think people would be amazed at just how fast programs can be,when written to be efficient – rather than the onslaught of bloat coming out of Redmond (not to mention Ubuntu which is becoming more and more useless).

The benefit for Hyperion Entertainment, which has done a phenomenal job in upgrading AmigaOS to the modern age, are many:

  • Increased sales of the operating system
  • Sale of merchandize surrounding the AmigaOS brand
  • Sale of SDK and associated development tools
  • The establishment of a codebase for OS 4 that is modern

If we take it one step further and look at what would be the next natural step:

  • Team up with case producers to deliver a more “normal size” case for the PI with keyboard
  • Team up with Cloanto to ship the old ROM files for the built-in 68k emulation layer

The point of all this? To build up money. Enough money for Amiga Inc, Commodore or Hyperion to buy time. Time enough for the codebase to grow and become relevant in the marketplace. Once established, to further sale of a dedicated Amiga HW platform (preferably ARM or X86) and secure the investment the owners have made over the years.

FPGA, the beast of xmas future

FPGA (field programmable gate array) is the future. I don’t care how proud you are of your Intel i7 processor (I have a couple of those myself). Mark my words: 20 years from now you will be blazing behind your FPGA based computer. And I have no doubt that games and applications will adapt the hardware to their needs – with possibilities we can’t even dream about today; let alone define.


Mist. A low-cost FPGA computer capable of becoming an Amiga (and about 10 other platforms). The closest thing to new Amiga hardware to be created in 20 years.

Todays processors are fixed. They have a fixed architecture that is written silicon and copper. Once cooked they cannot be altered in any way. Nanotubes is just about to drop, but again the nature of fixed systems – is that they cannot be altered once cooked.

FPGA however is based on gate logic. Which means (simply put) that the relations that make up the internal architecture is fluid, like a million doors that can be opened or closed to create all manner of living space. In many ways its like a virus, capable of absorbing existing blueprints and becoming “that blueprint”. If we dip into sci-fi for a moment this is the computer variation of a xenomorph, a shape shifter. A creature that can adapt and alter itself to become any other thing.

As of writing this tech is in its infancy. It’s just getting out there and the prices and speed of these spectacular devices bears witness to its age and cost of production. If you want a FPGA with some kick in it, you better be prepared to take out a second mortgage your house.


The Vampire 2 accelerator for Amiga 600. This takes over and gives the Amiga so much power that it can play movies, modern music and 3d games faster than ever imagined. At the same time! In fact, I bought an A600 just to get this!

One of the cool things about this hardware is how it’s being used today. One of the first hardware platforms to be devised for FPGA was (drumroll) the Amiga. And you have to understand that we are not talking just the 68k cpu here – but the whole bloody thing: paula, agnus, deniese, fat agnus and the whole crew of chips that made the Amiga so popular in the first place. All of it coded in gate-logic and uploaded to a cpu that with a flick of a switch can turn right around and become an x86 pc, a PPC Mac, a Commodore 64, a Nintendo 64 or whatever tickles your fancy.

Lets stop and think about this.

Today we use virtual machines to mimic or translate bytecode (or pre-existing cpu instructions). We call these solutions by many names: virtual machine, emulator, runtime – but its all the same really. Even if you slap a JIT (just in time compilation) into the mix, which is the case of both emulators, Java and .NET compilers — it still boils down to running an imaginary (or pre-defined) platform under the umbrella of a fixed piece of kit.

Now what do you think would be the next logical step in that evolution?

The answer is naturally being able to sculpt virtual machines in hardware (read: fixed hardware that gives you a non-fixed field). Fixed processors is a costly process. Yet primitive when we really look at it. We may have shrunk the brilliance of the 1800’s and early 1900’s and made all the great inventions of the past fit on the head of a pin — but its all based on the same stuff: physical implementation. Someone has to sit there with a microscope and hammer the damn circuits out (although “hammer” is maybe the wrong word on particle level).

This is also the problem with western culture: the use and throw away mentality that creates mountains of technological garbage – and powers child labour and sickness beyond belief in poor parts of the world. You have six years old kids that work with melting out copper and quicksilver. A waste of life, tech and nature. So yeah, a bit of morality in this as well.

FPGA represents, really, the first actual breakthrough and paradigm shift since the invention of the first electric circuit. For the first time in history a medium has been created that is not fixed. It has to be created of course, and it’s not like its wet-wire technology or anything — but for the first time anyone with the skill to code the gates, can shape and adapt the hardware without the need to cook the chips first.

And they can be infinitely re-used, which is good for both people and nature.

Think about it.. then go “holy cow”.

And that my friend – is the thought of the day!


Booting into UAE on ARM/RPI2

January 25, 2016 1 comment

I was just about to go to bed, but this info is to important to just leave hanging, so I have to scribble it down here for all to enjoy.

If you own a Raspberry PI and find Linux to be less than welcome, especially in the startup department, then you are not alone. And trying to get the linux gurus to shed some light on how the heck you can alter the boot process is like talking to wizards, pondering the mysteries of kernel callbacks or whatnot.


Ah! The awesomeness! Look at the bones, look at the bones!

But thankfully today, Chips, the author of UAE4All2 (Amiga emulator for ARM) helped me out and gave the full low-down on how to boot straight into UAE with no Linux desktop getting in the way! Meaning: You can now transform your PI into a dedicated Amiga emulator! Once that doesnt start the Linux desktop at all. How cool is that!

For systemd based distros

How to boot directly to uae4arm FOR RASPBIAN JESSIE (and other linux based on systemd). First if you boot to desktop, let’s disable this by entering following line in a terminal:

sudo systemctl set-default

Then reboot and check: you should autologin with pi user so without any authentication…

Now enter startx to continue customization:

We will add uae4arm at each bash launch (basically each time you enter command line mode):

Enter following line in a terminal in order to edit bashrc:

leafpad ~/.bashrc &

At the bottom add lines to execute uae4arm (update directory as your installation):

cd ~/uae4arm-rpi/

Next reboot you should enter automatically uae4arm :)

Initd based systems

How to boot directly to uae4arm FOR RASPBIAN WHEEZY (and other linux based on init)!
Below instruction apply for pi user but you can subtitute for any other user you created.
I prefer to edit files under desktop but you can use any other way too…

First if you boot to desktop, let’s disable this by entering following line in a terminal (raspi-config could be used to… to be confirmed):

sudo update-rc.d lightdm disable 2

Now reboot and check: you should not go anymore to desktop but instead should be ask for login in text mode. So login as pi (user then password) then enter startx to continue customization.

Now open a terminal and edit /etc/inittab by entering following line:

sudo leafpad /etc/inittab &

And add a # at the beginning of the line that ask for login, as below

#1:2345:respawn:/sbin/getty 115200 tty1

And instead we will auto-login, to do this add the following line just below the commented line

1:2345:respawn:/bin/login -f pi tty1 </dev/tty1 >/dev/tty1 2>&1

Now save and reboot and check: we should autologin with pi user so without any authentication…

Now enter startx to continue customization:

We will add uae4arm at each bash launch (basically each time you enter command line mode):

Enter following line in a terminal in order to edit bashrc:

leafpad ~/.bashrc &

At the bottom add lines to execute uae4arm (update directory as your installation):

cd ~/uae4arm-rpi/

Now reboot: you should enter automatically uae4arm :)

For Raspbian jessie, it is completly different since it use systemd instead of init during booting sequence…

Aeros for Raspberry PI, a field test

January 23, 2016 1 comment

Wow, seems like I never have time to blog lately. We are super busy creating fantastic stuff at work, and the little free time I have these days are spent with my children and my girlfriend. But today I have managed to allocate a whole 5 hours just to relax and enjoy myself.

Long story short, I have been super interested in Aeros for a long time now. So let me start by writing a few words what that is.

What is Aeros?

Long story short, back in the early 90’s the Amiga home computer was going the way of the dinosaurs. It’s graphical excellence which once made PC’s look retarded and stupid, was failing to keep up with cheap and fast hardware. As such, the 15 year old Amiga chipset was beginning to show it’s age. It simply could not stand up against fast GPU’s, 3D accellerators and 16 bit sound-cards. So all of that, in combination with some spectacularly stupid decitions by the Amiga share-holders and decision makers, ultimately meant that the best home computer the world had ever seen, was about to die. And we all knew it. It was inevitable.

Now what makes the fate of the Amiga home computer even more sad, is that while the hardware and poor decision-making was ultimately what held it back, the software that made up the Amiga system was still very much ahead of the competition. We have to remember that even a year head-start in computing represents a massive advantage; To make it short: the operative system was just to good to let die out.

amiga (1)

Aros, The Amiga OS re-incarnated. Looks awesome!

An example of that is this: back in december 2014 I read that Apple had finally implemented full support for ReXX scripting in their OS. I had to smile because ReXX (or AREXX) was an integral part of Amiga OS over 20 years ago. And that’s just the tip of the iceberg. The Amiga had a full multi-tasking desktop decades before Microsoft could even get their mouse-pointer to stop flickering. So the Amiga really was an awesome system.

Where does Aeros fit into all this? Well back in the early 90’s a groups of Amiga users got together and tried to figure out how to save the operative system. The Amiga brand and intellectual property was being abused by non-other than its originators and investors, to the point of ridicule I might add. The brand name itself had been sold around so much that no serious investor would ever again touch it.

Amazingly, with no help from Commodore or the Amiga copyright holders, this team of passionate Amiga users decided to take matters into their own hands. Amiga Inc. could not be trusted, and as such they began to reverse engineer the whole bloody thing from scratch. Thats right – they decided to dedicate roughly 2 decades of their lives to saving an operative system. You know, people say we dont make computers like we used to? That is true. But no brand in the world, not even Apple, has followers this loyal (or fanatical, take your pick) as the Amiga.

Their goal? To reverse-engineer the Amiga operative system and get it working on x86 hardware.

The Raspberry PI

Fast forward nearly 20 years and a small british company releases what must be the cutest little computer you will ever see: the raspberry PI. It’s not very powerful, not much to look at, but it delivers enough juice to handle DIY projects, the odd Linux experiments – or your ultimate homebrew retro gaming platform.

But compared to the Amiga it at least 100 times faster. The ram alone is 1000 times what the Amiga had to play with, and if someone started to write an OS purely for RPI with the same attention to detail and efficiency as the Amiga, it would deliver a user experience en-par with a “fast” x86 PC today.

What the PI suffers from is that Linux, which is the only real desktop OS that runs on ARM processors (excluding QNX and Android) has grown rather heavy over the years. It’s become a fat, sluggish bastard to be more precise. It used to be that Linux could fit on a single floppy disk, but those days are gone and a modern ditribution is right up there with Windows and OS X. Weighing in at around four or six gigabytes.


Kids today have no idea how efficient and fast the Amiga really was

Several flavours of Linux exists for the Raspberry PI, but no matter how slim or trim they pretend to be, they are ultimately to much for the little computer. Linux is just to complex and bloated, which is the sad fact of age and “one size fits all” mentality amongst the developers.

What we really need is an operative system written with the same philosophy like we did back in the 16-bit days; back when every byte counted. One that is powerful, offers silky smooth multi-tasking, a decent desktop environment, networking, a well stocked software library – and that is easy to use.

And this is where my interest in Aeros comes into play, because Aeros is the ARM version of Aros, the re-implementation of Amiga OS!

We have to remember that the original Amiga OS was designed to operate with only 512 kb of ram. Thats right, half a megabyte! And absurd as it sounds, with that half a megabyte it managed to run rings around microsoft for a whole decade. Imagine that. If nothing else, a testament to the ingenuity of its architects.

But why would this be interesting, I hear you say? Why go for a weid, esoteric (by modern standards) and outdated operative system when you can install Ubuntu or Debian Jessie?

I can give you several reasons:

  • Speed. Aros is exceedingly smaller and faster than any Linux window manager
  • Memory efficiency. Aros thrives with just 1 megabytes on a 68k Amiga machine; Imagine what code like that can do with 1000 times the memory!
  • Emulation. Aros supports 68k applications directly via built-in UAE emulation
  • Software. Nearly 30 years of software to enjoy. Also plenty of modern ports from Linux, like The Gimp, Open Office, Free Pascal, Webkit browser (to much to list here)
  • Simplicity. Amiga OS is simple to use, like all brilliant things in life.
  • Nostalgia. Amiga is a part of my history. It holds great value to me personally.

Well, today I decided to take the plunge! So I visited Ares’s website and paid for the premium Raspberry PI Aeros download. My first Amiga related purchase in.. at least over 20 years!

 What do I expect?

As I type this the Win32 Disk Imager application is burning the Aeros disk image to a 16 gigabyte SD card. What do I expect of AEROS? Not that much, all things considered.

I presume that paying 20 Euro gives me access to the premium build, which from what I understand is the native, non hosted version. Aeros has shipped with a purely linux driven foundation for quite some time; understandably ofcourse since that saves the authors the hazzle of having to write a ton of drivers — but the downside is that .. well, unless you are running full-screen without a window-manager, rendering directly to the framebuffer or the X viewport — you are neither an Amiga or a Linux box.

If Aeros is going to continue floating on Linux for foundation support, then at least follow Apple’s example and hide it well. My advice would be to have a special shell window, LShell, somewhere in the utillities folder. Starting that opens up a linux shell – giving you access. Linux should never show itself in the file-system, in the UI or any other part of the Amiga experience.

But what I expect is the following:

  • Being able to run 68k software directly (built-in emulation layer)
  • Enjoy a desktop looking like OS 4 (or some other Amiga’ish theme)
  • Enjoy hardware bashing games through UAE4All2 compiled for Raspberry PI2

And last but not least, I expect the distro to come loaded with the very best of ported and 68k programs. From BlitzBasic II and Amos basic, straight up to Deluxe Paint (or something similar).

So this is Aeros

First impression is important. And immediately on booting the Aeros disk image I was struck by something I did not expect: I was greeted by a fancy 3d animated logo of sorts, which morphed into a text advertising at the end. Wow, that was fancy I thought!

I should mention that this animation is persistent, meaning that you have to see it again, and again, and again (ad naseum). So I sincerly hope the author of Aeros either make an option for this in preferences, or write”true” to a file when it’s been shown – so we dont have to see it again. Things like that quickly get on your nerves.

Within seconds I was greeted by the Aeros desktop, and I must admit — i just went “wow!”. I have never seen an operative system boot up that fast since my Amiga 1200 all those years ago; and the warmth of the desktop color and Amiga like features brought me straight back to my teens. Hacking away at kuma seka assembler and blitzbasic 🙂

Some icons immediately cought my eye, and that was Skype and  Spotify. Thats odd I thought, those are not Linux. And absolutely not ARM Linux. I also noticed DOS Box, WinUAE and the more appropriate Uae4All2, which is a special build for Raspberry PI 2, taking advantage of the different cpu instructions and faster GPU (hardware accelerated graphics).


Downloading FPC while playing a spot of Scumm VM 🙂

But the weird thing was that nothing happened when i double-clicked them. Actually, very little happened when i clicked a lot of those “odd” icons, the programs that just didnt belong on Linux — let alone an Amiga based operative system!

It was then that i remembered the e-mail I got, which said something about unlocking something. I had presumed it was for the product, the native Aeros product — but now I started to catch on. So i registered the product as the letter said, and voila – now i could start these alien programs!

Turns out the Aeros doesnt just come with UAE and 68k emulation built in, it also comes with x86 emulation (!). I must admit that for me, personally, this is completely useless. First of all the Raspberry PI is not powerful enough to run software at a reasonable speed; secondly, the whole setup began to annoy me: I had paid for Aros. I wanted the Amiga experience. Not the Linux experience, and absolutely not the Windows experience.

No choice

As I began to investigate the system I noticed that the theme for the windows were, well how shall i put it, abhorrent? Sort of grey, stripey — not at all what I expected or wanted. But thats ok — I’ll just pop into preferences and change that straight away.

But sadly that was not an option. There simply were no themes to be changed. You could neither change the default background image. An image which to me is childish and counterproductive (the sadist amiga cat whipping a smiling tux? Seriously?). One of my primary goals here is to introduce Aros in schools, teaching kids to program. And a picture like this is not going to fly at all. It creates the completely opposite image of Aros than I believe the author intended.

I dont care about the cat stuff, but it’s just a stupid picture. Nice work, but the image doesnt belong in an OS you want to sell or promote.


I expected something like this by default, as the very least on offer

Ok. So i cant change the background or the theme. That is odd. In fact while fidling around with the MUI preferences, the whole thing crashed. Twice. Which was annoying to say the least.


Then came the Linux part, and here the visual theme was set to “high-contrast”, which means bright white on black, with bold fonts and stamped glyphs. Horrible theme.

I did the same thing there, went into “appearance” on the Linux menu, the dialog showing various themes comes up — pick another theme, but nothing changes. It’s bolted shut to high-contrast come hell or high water.

I’m sorry but this is driving me mad. I love the speed and the technical achievements, but not being able to change even the smallest thing — and the bugs? This needs more work. And it deserves it because the project is just what we need!

My verdict

Being a programmer myself I know how “work in progress” can be. And when you are knee deep in x86 emulation, or getting 68k applications to run side-by-side with ARM applications — things like backdrop images, theming and preferences requesters can seem trivial.

But they are not. In this case they represent the ability to actually use and enjoy a product i have paid money for. And it is a product after all. And in all honesty, this is not something I can present to the school board, because its not stable enough, it ignores preferences completely – and it crashes if you fiddle around with prefs to much (read: click to many odd buttons).

I was also very disappointed by the distribution itself. It comes with no 68k software what so ever. Not even BlitzBasic on a coverdisk — or freepascal, which has been ported to Aros and these days runs natively. Thousands of applications has been written in FPC or Delphi for Windows and OS X; It makes sense for Aeros/Aros to come bundled with FPC and Lazarus (ide) to help inspire people to port over their work to Aros. Sadly that is not the case at all.

Now before you think everything is bad — I am paradoxically very excited about this project. Lets look at what the programmer has achieved here. It is by far the fastest desktop i have tried since a real amiga machine ages ago. It uses a fraction of the resources any other OS, Linux or otherwise, demands. Its responsive, and overwhelmingly enough allows you to execute x86, 68k and ARM code. Not exactly a walk in the park!

But to be honest it feels like it’s been standing still for a while. The impression I get is that this is just a pet project, and the programmer havent touched it since last summer or so. Which, if true, is really, really sad- because this system has so much potential.

For the first time in all those years, I feelt like I had a real Amiga again. I completely forgot that this was running on $35 hardware; Hardware that has weaker performance than my iPhone (!). Imagine that. Yet with Aeros, you would think you used a normal PC.

If you expect me to warn you away from this project, then I will actually do the opposite. The only way this project will be completed, is if more people buy, send questions and wait for updates. So I would urge everyone to get this. Its cheap (costing a symbolical 20€) and it helps keep this project alive.

This is one project we really want to see, because it turns your Raspberry PI2 into a real computer. A computer you can use. Something non of the Linux distros can even come close to.

As for verdict: I give this 2 stars out of 6. I would have given it 4 stars had the preferences bugs not been there and everything worked as expected. I would further have given it 5 stars if it was polished and came with a good selection of 68k applications.

A system well worth watching!



Smart Raspberry PI project

October 31, 2015 7 comments

Raspberry PI is a great little $35 mini computer the size of a credit card. The latest version (2.0) comes with 1 gigabyte of ram and a mid-range powerful ARM processor. Raspberry PI is used by hobbyists, schools and IOT companies to create clever consumer gadgets. The sky is the limit and what you can do with your PI is defined by imagination only (and I admit, some knowledge of Linux).

What our custom Linux distro brings, is a ready-to-use kiosk system

Smart Mobile Studio full control Raspberry PI

My good friend Glenn, a citizen of Denmark, loves all things Linux – so when I asked him if we could hijack the boot sequence, drop the desktop and boot straight into full-screen Chrome instead.. well, it didn’t take long for him to figure out a way to do that. I have to little experience with the mysteries of Linux to make that happen (it would take weeks of fiddling), so it’s good to have friends who know’s what they are doing.

A fully working desktop environment

A fully working desktop environment, took Glenn and myself 15 minutes to make

In essence we are creating a custom Linux distro which is designed to run your Smart Mobile Studio projects exclusively. This means:

  • full access to the filesystem
  • no content domain restrictions (CORS)
  • no blocking-operation restraints
  • No restriction on database or storage sizes
  • Your Smart program completely runs the show

As a gateway to the operative system and interesting functionality, I have gone for a nodeJS server running in the background (booted before the browser display) which means the desktop (or your project) can use RPC calls for advanced functions.

This is pretty cool because it means that the UI will be completely abstracted from the service functionality. The service can be local and run on the same installation – or it can run on Azure or Amazon cloud servers on the other side of the world.

Think of it this way: You dont have to run it on the same device. You can upload your desktop (or kiosk) to a normal web-host, disable CORS on the host, and then use websockets and connect to the NodeJS layer; which can be hosted on another computer or domain.

But all of that is already possible today. This is one of the simplest things to make with Smart Mobile Studio actually. A much cooler project is what we are doing now with the Raspberry PI — giving your creations the ability to live on and control a full Linux system.

So what are you guys up to?

The first project is a NetFlix like media system (or a XBMC clone) with full support for USB wireless remote controls. To make it short: a $35 home theatre that plugs into your television, which will scan your movies folder (or external drive) and present your movies like NetFlix does it. It will download info from and other media services for identification. It sounds complicated but it’s actually very straight forward. One of the simplest solutions I’ve done with Smart Mobile Studio to be honest.

Using a standard USB remote control is excellent because it registers as a touch-device. So the buttons you press registers as touch-events in a predictable order (read: it works on all controls of this type).

What our custom Linux distro brings, is a ready-to-use kiosk system. You can use it to display advertizing in a shop window if you like, or add a touch screen and build your own ticket ordering station. Again, it’s only limited by your own imagination.

A JavaScript cloud desktop

Depending on the success of the project we may go full-out and create the world’s first JavaScript desktop. It is essentially Debian + Chrome + Smart Mobile Studio. This would require a bit more NodeJS magic, where each exposed node service (RPC) represents a distinct part of the “operative system”. A virtual operative system running on top of a Linux stub. Pretty darn cool if you ask me. Who knows, maybe we can define POSIX for the cloud?

A fun hobby to say the least 🙂

The art of pissing people off

May 8, 2015 Leave a comment
To provoke is a part of self-examination, education and growth

To provoke is a part of self-examination, education and growth

Ok, I admit it. Part of writing a blog is to be informative, helpful and the whole good guy thing. But another just as important part is to challenge stereotyping, old ideas, new ideas and to basically be a profiled prick. And I admit it, I am exceptionally good at pissing people off — but at the same time I force people to re-evaluate their ideals, tendencies and patterns.

Over the past four years I have pretty much done it all. I have dizzed Delphi on numerous occasions, not because I mean every word of what I wrote (well, the XML mapper is dying for attention, that I meant) but because the only way to create life is to break apart the old, stagnant constructs that is holding an otherwise brilliant technology back.

And look at all we have achieved!

Hate me, love me, It really doesn’t matter. You can hardly say that the Delphi community would be the same without that hyper-active Norwegian who cuts straight to the chase, taking no prisoners and churns out a fair load of code month after month. I even taught Delphi for free in my local community for over 2 years just to make sure I had done everything I could to protect my job and skill-set.

I have been yelled at, thrash talked on forums I never even knew existed, a guy even tried to knock me down once in Oslo after a Delphi meetup (boy was he surprised, I did thaiboxing for 10 years and still remember a few tricks *smile*). I have gotten letters telling me in exquisite detail how utterly retarded I am, but also letters thanking me for helping, creating or solving problems they have struggled with.

I helped this kid in India who could not afford Delphi, so I gave him a copy of Smart Mobile Studio professional. I got a warm letter from his mother thanking me, because using SMS he had got enough object pascal skill to be accepted to the schools computer group. Meaning he would have access to Delphi 2 days a week. And if he works hard he can become a developer as an adult.

You cant put a price on letters like that, it makes you humble. And if everyone in the Delphi community cared enough about our language, our skill-set and the work we do – and help out more, we would have secured our jobs and technical skill for decades to come. I dont make a dime on what I do — I do it because I genuinely care about programming. Programming teaches you to think and to see the world. Cause and effect, potentialities, abstract constructs — the things that makes a mind sharp, insightful and inquisitive.

What better legacy to leave for the next generation of coders? Take responsibility for your profession, because no-one else will.

Paying the devils dues

So do I piss off people on purpose? No, of course not. No sane human being sits down intentionally and plans what to put in a blog. People that insane are usually patients or politicians. No, I tend to wing it as I see it. And I get a lot of things wrong too; Although I tend to get more right than wrongs. Especially when it comes to programming and movements / tendencies in the market.

Lately, especially with the whole freepascal/lazarus thing going on, I just wanted to put this out there. I’m not intentionally out to get anyone or to cause problems “just for the hell of it”. I actually never saw that one coming at all. Which is a shame because had I been prepared I would have served up some cool jokes. It would have been an awesome show. But alas, I was not prepared and hey– i’m only human (well, sort of).

So my stance on blogging goes a bit deeper than just churning out the same boring, superficial crap like everyone else. I dont know, perhaps something stuck with me from art class in my teens, where dialog, free press, the art of writing and human expression was still important.

In other words – If you are going to write, no matter what it is, you are obligated to challenge yourself and others. Conflict is by nature unavoidable because each mind is an island onto itself. It’s impossible to go through life without meeting, eventually, someone who just doesn’t like you. Without any valid cause at all. They just don’t like YOU. And I’m good with that because it goes both ways. It’s fantastic!

But to challenge ideas is important. It’s important because a living, breathing entity – be it a social structure, a metaphysical structure (programming for instance) or a mechanical structure, must be in movement at all times. If death have a property it is the lack of activity and movement. So a dead programming language is one that doesn’t change, that remains static – immutable and unchallenged from cradle to grave.

I kinda enjoy being the devil in the deck. People think the worst of the devil, but they don’t realize just how important his role is in the grand scheme of things. Without the devil there would be no fall from grace, no grace, no distinction, no value and  no peace; nothing to contrast happiness against – nor the notion of positive vs. negative.

Never take anything at face value

Never take anything at face value. Notice the balloon? *smile*

All communities, no matter if it’s programming, social groups and even families – needs a black sheep. A rouge which gives voice to things people would rather not talk about, forget or brush under the table. If there is an elephant in the room, trust the devil to point him out and question why people pretend they dont see it.

In modern society we tend to drug kids that do that, without understanding what a huge loss it is to society. We should be careful of throwing out the devil, because we might just throw out the best in us.

The devil is in the details

Shiva, unbound consciousness

Shiva, unbound consciousness

If all of that sounded a bit religious then relax, I’m not religious. I am a student of tantrika, which is a part of sanatana dharma (hindu esoteric tradition) and buddhism alike. My principal deity is Krishna; The thief, the rebel, the rouge, the best friend to arjun (the mind) who runs into battle to restore order. The maintainer of “that which is functional” in the universe. And my guardian deity is shiva.

Because when things get rough, its shiva the destroyer that swoops in and kicks-ass. And just like Krishna is a part of all human beings psyche, so is Shiva. Who do you think you are when anger takes you over?

And yes, these are psychological symbols which defines aspects of nature. And that includes human beings since we are after all products of nature.

Shiva is a very misunderstood archetype. He is called the destroyer, smears his body with ash from burned corpses, carries a trident — and hence people look at him as evil. But his role and function in nature is to challenge those who think they know it all, break apart structures that no longer serve humanity and ultimately make sure things “work”.

Without shiva, which is the root of the christian devil, there would be no creativity, no new inventions and all would be dull, dark and without life.

If that is to be my archetype in all of this, then so be it. I’m happy to play the devil of freepascal as they now call me; and my work will no doubt insult, scare, impress and help those that use them.

Speak of the devil

Just before we were about to release Smart Mobile Studio (alpha release) a few years back, an individual was so upset with me over that invention, that he actually called me and threatened me on the phone. That’s how protective people are about what they love and work with. That’s how dependent some people are on their habits, their knowledge and their self-image.

Kinda scary don’t you think? Bordering on mental if you ask me. And this is over programming. Not family, children, millions of dollars, your house or the death of a loved one — no, programming (!). Behind it all he was so scared that SMS would somehow kill Delphi as he knew it, that he would no doubt have physically attacked me if he could. People are strange when it comes to their world view. They will do almost anything to protect what they believe is “right” and fight with tooth and claw against “the wrong”.

Little did he know that my mission was not to destroy, but to strengthen object pascal and ensure that his knowledge and expertise would remain valuable and useful in the years to come.

And it has worked like a charm! In the UK kids are learning Smart Pascal thanks to the effort we made, both us on the SMS team and everyone who has helped make it a reality. So kids are growing up and will remember 50 years from now that they learned to program in Smart Mobile Studio. And that is valuable. That means something. And you cant create that without utterly smashing the ideas which no longer works or serve us poorly. And in doing so you will provoke people, like unwritten facts always do.

Devil or not, I am happy I’m not that shy, ego ridden critic that doesnt make a licking difference in his entire life. Death to me is to be stiff and motionless in your work and what you enjoy. To be so utterly boring that you never even speak up when gold is replaced with shit. And to blindly let 15 years of excellence and hard work just fade into oblivion. What did you do to help Delphi remain vibrant and relevant? People who criticize me should ask themselves that before they throw the first stone.

And if that makes me the devil of freepascal, the angry nerd of hades, the emir of forks (or whatever insane title they cook up this week) then I wear that title like a badge – with pride!

Because I did stuff they never dared to do; And brush shoulders with people they will only read about. So bite me.

“Here’s to the crazy ones. The misfits. The rebels. The troublemakers. The round pegs in the square holes. The ones who see things differently. They’re not fond of rules. And they have no respect for the status quo. You can quote them, disagree with them, glorify or vilify them. About the only thing you can’t do is ignore them. Because they change things. They push the human race forward. And while some may see them as the crazy ones, we see genius. Because the people who are crazy enough to think they can change the world, are the ones who do.”

Is native outdated? Debate!

April 24, 2015 Leave a comment
I sort of subscribe to the chaos theory

I sort of subscribe to the chaos theory

Life has its ups and downs, but this one is a case that really makes me stop and think. They say the moment you reach 30, you lose your immortality. In the sense that you no longer regard yourself as immortal, infallible and a list of other power-words. It’s the age when you realize that you are no longer in the front-seat of all things new and bright, and that in fact you are heading for death.

With that gloomy intro, here is the pickle that has made me really question what programming and being a “native” developer means: Is native code outdated? I write that because the more young programmers I meet, the less native code I encounter. And it’s really scary! I mean how do you build a custom server? Not just a server that does something different, but a truly custom, never before done, truly unique and brand new – without the speed power that native code provides?

But these kids have a completely different take on it, which makes me feel so very, very old. But it also makes me want to educate them about the differences, with limited success so far.

Once in a while I meet up with younger programmers, some at work and others through IRC or Facebook to check out the latest developments. It’s mostly open forum so everyone posts ideas, links, code, references – and we all bitch and moan about what we don’t like (or envy I guess, people do that as well online).

What throws me is that native code is taking up less and less space in the minds of young programmers. Programmers who, unlike our generation I presume, have primarily grown up with free development tools and open-source libraries. So in their mind paying for anything related to programming is just not where it’s at. Perhaps this is why Microsoft has suddenly transformed into the sugar daddy of high-tech? Time will tell perhaps.

But either way, the majority of these free tools must be running on what ultimately has be, it bloody has to be (!) native code. I accept that the platform itself can be script based, perhaps generating bytecodes or p-code. But native must by virtue of how the hardware is designed, remain relevant. Right?

The p-code thing

If you don’t know the difference between byte-codes and p-codes,  they are essentially the same thing. But instead of representing your commands as bytes and small records, like say java or dot net does; P-codes have bytes which represents offset values into a runtime library. So instruction $0001 would execute command #1, and $000F would execute command number 15 (or 16 if you count from zero). The downside of p-code compilers is that they are extremely fragile. If you alter even a single byte the whole system can crash, so modern implementations use CRC and checksum validation before executing.

Since a p-code represents an offset into an array of pointers, they execute extremely fast. In many cases it can be hard to distinguish native programs from well written p-code programs. It depends wildly on the language at hand naturally, but all in all p-codes just pounds every ounce of clock cycles out of the processor.

The downside is that it’s fragile like hell. A single altered byte in a p-code program can crash the program with spectacular access-violations. Hence modern implementations are often cluttered with CRC checks and identifiers. But they are fast, much faster than translating byte-codes.

Right, now back to the topic at hand.

Is the future scripted?

A part of me want to say yes, because there is more than enough power in modern script-engines to create really powerful desktop applications, services and/or games. But a script engine can’t write itself. You can’t write a script engine in JavaScript because sooner or later someone has to write JavaScript, if you get what I mean. Somewhere along the line a programmer has to use a language which compiles to native, be it C / C++, object pascal or some other native language. I even remember a guy writing his own operating system in BlitzBasic, but he used like 70% inline assembler so I’m not sure he qualifies as a basic representative.

So while it’s tempting to say yes, considering the widespread adoption of languages like python, pearl, ruby and javascript – it just can’t be true. And that statement has launched an avalanche of well-meaning but ignorant feedback from my younger friends; who doesn’t know what native is all about and as such protect their faith in scripting to the death.

So no. You can’t get through to them.

The smart thing

Since myself and the group of programmers I work with are marketing object pascal as the best language for web and cloud development; and we have adapted object pascal to be more in-tune with how development in our day and age works, like anonymous procedures, records, properties and whatnot — i should be pro 100% script right?

Well I’m not. Smart Mobile Studio represents, in my view, one of the best solutions for writing cloud based software. Primarily because you have full access to nodeJS, which in turn mean you can write both the server and client from the same codebase.

The secret lab that shall not be named

The secret lab that shall not be named

But it’s only the best solution because the medium, namely the browser and JavaScript, is so fluid and flamboyant in nature. You can do some tricks in JavaScript that would be suicide under native languages, but in the padded room of JavaScript everything goes.

But does that mean I have become sort of “anti native code”? Absolutely not. In fact I love Delphi to pieces, and C# (native mono compilation) and I even have an off the record love affair with C++. First of all because it’s the only thing I know how to do, part from JavaScript which I’m very, very good at. But I also think it’s important for all of us to get our ducks in a row.

The view I have is that scripting is not really programming is it? I mean “really” programming. Scripting for me is a bit like sculpting. You sit down and sculpt data structures and setup boundaries using a language which, subjectively speaking, is the intellectual equivalent of putty rather than brick. So it’s a bit like carving a madonna out of a piece of soap versus a solid piece of engineering forged in steel.

Or how about this: native programming is a bit like coding a gene-pool, while scripting is the same as body-building. With scripts you carve out the form, the relations and setup the pathways between them. But without the underlying generic programming, there would be no intelligence or program to carry out the build-plans to begin with.

Native languages feel more edgy to me, more solid and concrete. You can’t cheat and get away with it under native object pascal or C, because it wont even compile. You are also closer to the hardware since the code you write is ultimately the binary pattern fed to the processor. While scripting languages are.. well, fed to a dispatcher after going through a lookup table.

A young solution

I really am amazed by how the younger generation solve things, because they are – without knowing it – doing a better job than we did 20 years ago. Instead of writing a server from scratch like we would probably do for a new piece of technology, they implement the “new” bit using the protocols already in place. So they get the job done, but in a way very different from ours.

So the new server is not a new server, it’s the same old HTTP server you have been using for 15 years, except now the URL’s are command and form-fields are parameters. Things like REST was not invented by a seasoned developer, it’s actually a perversion of the HTTP protocol if you like. But it works, and it’s even turned into a standard now.

Kids are growing up with pre-fabricated clouds

Kids are growing up with pre-fabricated clouds where we had Atari and C-64.

Same with python. You dont setup a cluster with C or object pascal, no you use python and it will execute parts of the same program on different computers to spread the payload. And that makes sense, since native code would be much harder to disperse over X number of nodes. So suddenly scripting makes sense over native. At least in that particular scenario.

The only real problem with “young thinking” is that it doesn’t generate money the same way we are used to. When you use only free compilers, editors and server kits – how will a young developer approach systems like Delphi?

I really want Delphi to survive and I want the object pascal language, be it Smart Pascal, FPC or Delphi or Oxygene; I want it to thrive. I want young programmers to see and experience how rich and beautiful object pascal is and how much it can do for them; and also how much they can deliver through that language.

But how can you even hope to persuade a young man or woman who makes less than $800 a month to fork out $3000 for a development system all their friends call “old and outdated”?

AppMethod is cool. It’s cheap, its affordable and students and hobbyist programmers can pick it up. It’s still a bit pricey compared to Smart Mobile Studio, but I hope Embarcadero makes enough money to keep going.

Last pondering

Smart Mobile Studio is probably more in tune with the new reality, since the kids growing up now are in fact growing up with “the cloud” as their foundation. Remember we grew up with commodore 64, Atari and those kind of things. Our children are growing up with cloud servers, JavaScript powered phones (Mozilla phone), Linux and the open source movement.

Perhaps I should just forget trying to make sense of their thinking. Trying to enumerate all the technological changes I have gone through from childhood to now is exhausting. I tried to tell my son what a modem was and how we connected to the internet no longer than 15 years ago — he just looked at me with big eyes and went “Dad. Please. Its ancient history”. And my daughter found a cassette tape and could not imagine what it was. She thought it was scotch tape 🙂

It’s just so weird realizing that my kids have no idea what a cassette tape is and will never have first hand experience of a modem!

I guess we all play our part.

My part is to try to get object pascal kicking and screaming onto the cloud. I am content with that role and think it’s a privilege to even be mentioned in the history of object pascal. But a future based on scripting? I sure hope not!

What are the kids using?

When it comes to languages, I can honestly say that the official list is wrong. Dead wrong. One language may have more source online that others, but that doesnt mean it’s less used. It depends completely on what group of people use it and what it’s used for. A language used primarily for commercial applications will by nature have less code in the public domain than a language which is free, open-source and generally available.

This is the case we see with Delphi. There are probably hundreds of thousands of companies using Delphi in the world, but they use Delphi to produce closed-source products. As such their code never leaves the house (so to speak) and you wont find it on github, sourceforge or google code.

But having talking to probably hundreds of teenagers coding lately, here is my general impression, in order of magnitude

  • JavaScript
  • Php
  • Python
  • Ruby
  • Swift
  • C# and dot net
  • C script
  • Erlang and friends

Of native languages the list havent really changed that much over the years:

  • C++
  • C
  • Objective C
  • Object Pascal

The javascript thing is the one to watch. Not just because that’s where I’ve invested my time and money, but because no other language is seeing anything near the amount of attention JS is getting. Not even close. And the two basic platforms is the browser, which for kids is regarded as the operative system itself (conceptually, not factually ofcourse). The browser IS where you experience computing and connect to the world.

The second aspect and one I find very exciting myself, is the nodeJS side of things. Here we are seeing a tremendous growth compared to other technology. And the reason is exactly because it’s connected to the first-hand experience people have. Those who master the browser and the DOM will eventually be able to reach customers and create systems which are platform independent, international and dynamic.

Do we have anything to learn from this? Bucket loads! But we should never lose sight of the fact that we also have much to teach.

And with that my pondering stops for today 🙂

Smart Mobile ‘retrogaming’ cloud services

April 19, 2015 1 comment

Im getting older. It’s with shock I have reached the age of 41 (!) In my sons eyes I am already the proverbial dinosaur. But in my own mind it was only yesterday I ran around with my friends, Amiga in nap-sack, on the way to some copy-party or gathering of Amiga enthusiasts, coders and gamers.

Sexy, compact and extremely fast! Amiga OS

Sexy, compact and extremely fast! Amiga

You may be wondering what all of this has to do with Smart Mobile Studio, cloud computing and object pascal. The answer is: everything. Because the Amiga computer was the machine which started all of this. In fact every project I have loved working on my entire life began on the Amiga. The reason I now live as a programmer is because of the Amiga. The reason I became who I am and live where I live, is because of the Amiga. And the reason I work where I do, and know what I know – is yet again because of the Amiga.

Trying to emphasis the impact the Amiga has had on hundreds of thousands of kids during the 80’s and 90’s is almost impossible. It’s like trying to explain the impact the moon landing had, or the cold war (we share a border with Russia, so that was fun). To be blunt: The Amiga has shaped my life more than any other person, education or “thing”.

The IOT phenomenon is about to emerge, so if you wanted a wink that a revolution is about to happen — this is it. Your chance to capitalize and make money is NOW.

Sadly I was to young to realize any of my ideas back then, and the hardware was not even close to deliver them. This is why the death of Amiga was so heartbreaking to a whole generation. Because the Amiga was the platform that gave us everything, yet it was cut down in it’s prime due to sloppy, greedy and outright insane management decisions. The entire IT market and reality of computing for the entire world would have looked very different had the Amiga realized it’s potential. Windows and OS X has only recently managed to catch up with the Amiga operative system. And we are talking about a machine which went out of production 20 years ago (!). It was way beyond anything Microsoft or Apple cooked up in their labs. We enjoyed a responsive and fast multitasking desktop, high-speed games and graphics and fantastic soundtracks – 15 years before the PC (fifteen years! That’s a whole “growing up” phase).

The amiga also had VR equipment more than 18 years ago. So yeah, it was a personal disaster for a whole generation when Commodore went bankrupt. It pushed computing back to the stone age. Could you imagine having to throw away your modern computer and be forced to buy a 15 year old piece of shit instead? Being told by people who know jack shit about the mac or pc you own today, that their old shabby system is better — when you in fact have tried future technology and used it for years, knowing full well that what they say is not true? Well, that was our experience. Having to pay money to get a 486 after having lived with an Amiga 1200/68040 CPU for years was just insane. It was like trading in your iPhone for a 1996 Nokia, or your Tessla car for a 1980 Fiat.

So indeed; we had so much more than kids today have. The experience of connecting your modem up to your dad’s phone, connecting to a BBS on the other side of the world, logging in and talking to people, swapping games, documents and whatnot — take a close look at the underlying technology there and what you see is the seed of cloud-computing.

A BBS functioned as a file-sharing service. So when you connected to the BBS, the files, games etc. you placed in the public folder was immediately shared with the others. And they all went through the server first, which typically picked up whole files first.

The Amiga was a lot more than just a games machine, it was way  ahead of both Windows and OS X for a decade

The Amiga was a lot more than just a games machine, it was way ahead of both Windows and OS X for roughly 15 years. So for 15 years we had a full multitasking desktop.

Now, going from that – to a reality of mainframes, thin clients, abstracted filesystems and remote data storage (or even better: dispersed data storage, where chunks of data can be stored anywhere on the planet and re-assembed when you need it) — all of this saw the light of day on the Amiga. In fact the second webbrowser ever written (the first was naturally on a unix machine) was written on the Amiga.

A fully working US produced Amiga 500, re-built and fixed by me this weekend. It took 2 days to get it working, but it's worth it!

A fully working US produced Amiga 500, re-built and fixed by me this weekend. It took 2 days to get it working, but it’s worth it!

But for me personally: did you know that the first programming language I wrote was called “concept basic”? It was written in assembler and blitzbasic on the Amiga. So the idea of programming languages, delivering a fun system that people love — it comes directly from my Amiga days. I would never have created Smart Mobile Studio or connected with the other people of the team had I never owned an Amiga.

Blitzbasic and Amos

Have you ever thought about the people who inspired your childhood? Not your mother and father, but all those people who – behind the scenes, did something which had a huge impact on your life? I have thought about that many times. And I believe hundreds and thousands of teenagers back then was touched by two titles especially, written by two near iconic Amiga personalities.

The first is Marc Sibly who gave us BlitzBasic, which was on the Amiga the closest thing to Turbo Pascal or low-level Delphi as you could get. You could write assembler side-by-side with fast basic, and the compiler gave you a single executable which ran at extreme speeds. Even die-hard assembler coders took their hat of to Marc for his invention.

Games like Worms and Lemmings were coded in BlitzBasic  2

Games like Worms and Lemmings were coded in BlitzBasic 2

The other title which enabled a world of children to learn programming and be creative, is Francois Lionet. I have been fortunate enough to talk with him online, where I also expressed my gratitude for Amos Basic. It’s really sad that so few Amiga users have done this, because both Francois and Marc deserves to be recognized.

Amos basic was the multimedia basic par excellence

Amos basic was the multimedia basic par excellence

Thanks to these two people and programming tools – hundreds of thousands of kids became professional programmers.

I cannot express enough just how fun it was to grow up with BlitzBasic and Amos basic. Every day before I went to school I would spend an hour coding. Slowly learning trick by trick. Without the inspiration of these two IDE and compilers, I have no idea what I would be working as right now. But I doubt I would be as happy as I am, or have such a rich intellectual life as I enjoy.

Smart Mobile Studio

What I really want is to re-create that feeling for others. I want people to start Smart Mobile Studio and feel that they can make anything. Be it games, mobile applications or cloud services. I realize of-course that the majority of people using Smart are grown men, but with the student program and a few plans we have — odds are we will be able to reach teenagers who want to master programming. Just like Marc and Francois did for us.

Early variation of Smart Mobile Studio

Early variation of Smart Mobile Studio

So that is a huge driving force in what I do and my work in programming language research

Raspberry PI

What is a cloud? Well it’s not just storage. Even though that is the first service people think about. So dropbox is not really a cloud service just because it allows seamless backup and re-distribution of data. But it is indeed one of the services cloud delivers.

No, what cloud is – is a very, very old idea. The idea that you log into a huge system, allocate computer time (just like on star-trek) and then work on your task is ancient. It goes back even before the Amiga to the huge IBM mainframes of the fifties, sixties and seventies.

The commodore mainframe, an ancient idea

The commodore mainframe, an ancient idea

The fun part is that a single $35 Raspberry PI 2 contains more computing power than the entire US government combined in the nineteen sixties. Just think about that for a moment.

But it should also mean that we have something to learn here, or an opportunity to explore and do things our parents never even dreamed about.

And this is where the Raspberry PI cloud system comes in. I have been coding this for a while now, and it still requires work, but when it’s done – you will be able to run your very own cloud using a single or multiple Raspberry PI’s. An the pricetag? For a measily $140 you can now own a 16 core cloud setup. Perfect for writing cloud software, which (let’s face it) the world is heading.

Smart Cloud

Cloud storage, coming to a smart RTL near you in the future

Cloud storage, coming to a smart RTL near you in the future

So what exactly is this cloud thing? Well, in short it allows you to install cloud resident applications. Meaning applications which live in the cloud, store data in the cloud, and which conforms to the laws of the cloud reality.

This means that you will be able to develop, test, maintain and deploy your own cloud solutions directly on your own mini-cluster at home. When your service is complete, tested and validated — you simply upload the whole system (a zip file) to Amazon or Azure. Now your system is “live” and can be reached by millions of potential customers though mobile phones, pads, smart-tv’s, tabs and computers of any size and form.

The IOT phenomenon is about to emerge, so if you wanted a wink that a revolution is about to happen — this is it. Your chance to capitalize and make money is NOW. If you wait a year, the window will be lost and you will have to wait for the “next big thing”.

Retro computing taken to the extreme

The first service I am going to make, besides the professional tools you need to write kick-ass cloud software, is the ultimate retro gaming platform in the universe. You may have heard of RetroPI, WinUAE and all those emulators which plays Nintendo, Amiga, Playstation and Mame games (NEO GEO) ? Imagine running all of these on a cluster.

Thousands of classical titles at your fingertips

Thousands of classical titles at your fingertips

Imagine being able to easily upload and download games via our Smart Mobile Studio nodeJS services (which you will get when you buy it, to run in your own home). And imagine (drumroll) being able to start and play those games from anywhere in the world. All you need is a browser, and the emulated screen will be transported to the browser in real-time.

With your cluster running at home, you can be in any hotel in the world and access thousands of games, movies and music. And the good part? It’s all written in Smart Mobile Studio, using the SmartSDI daemon interface (daemon is the same as service on linux).

Look out! 1990 is about to hit your system, like a ton of PI's

Look out! 1990 is about to hit your system, like a ton of PI’s

Sounds hard? Well not really. The cool thing about X, the windowing manager on Linux, is the idea of remote desktop session. So connecting and getting the desktop pixels is there from scratch. The rest is pure RPC service architecture, a handfull of scripts – and cluster software, allowing you to make use of all 16 ARM cores for tasks.

Well, stay tuned!

Smart Mobile Studio nodejs hardware platform

April 18, 2015 Leave a comment

I am proud to announce that my research into nodeJS and inexpensive hardware has resulted in the Smart Mobile Studio server platform, which is an inexpensive but highly usable linux setup designed to run on the Raspberry PI model B.

When the system is ready you will be able to download a Linux disk-image from for use with your own Raspberry PI 2. I am also talking to a Norwegian supplier about selling ready-to-use Raspberry PI 2’s with SmartSDI (Smart Software Distribution interface).

Working with SmartSDI

SmartSDI is a Linux executable written in FreePascal which simplifies moving files between the Raspberry PI and your Windows machine. The system can interface with Smart Mobile Studio directly, meaning that when the IDE obtains support for SmartSDI, it can automatically transport the compiled files to the Raspberry PI, install it into the nodeJS service stack — and you can test the application directly: either through your browser, your mobile phone or iPad/tablet.

It also makes it a snap to write your client applications, because once the server has been installed though SmartSDI, the client can connect and talk to it using the same interfaces as Amazon and Azure cloud services.

SmartSDI is also a lot more. It allows you to write, test and work closely with your Smart nodeJS services. Doing this on a dedicated “mini-computer” before you deploy to the cloud can mean the difference between success and failure.

The Raspberry PI2 image comes complete with nodeJS, mySQL and a host of typical nodeJS libraries and extensions. The goal is to provide you with an inexpensive, fully functional and convenient run-time environment for your cloud software.

The hardware runs on 5v only, which makes it suitable for 24/7 operation. It’s extremely cost effective at $35. Making Smart Mobile Studio the least expensive development platform for it’s gentre in the world. Embarcadero is 100 times more expensive for mobile and cloud work, and you get nothing we dont deliver. Even if you bought a 10 piece nodeJS cluster you would still have $2000 to spare.

The question should be — is Delphi 100 times better at modern mobile development?

From idea to production

With this platform, Smart Mobile Studio delivers a complete development path – from your idea to the finished product. The cloud based mobile application model can seem alien to many Delphi programmers, but it’s actually involves less work and more fun than native programming.

The cloud platform is likewise inexpensive, easy to use and easy to deploy to once understand it.

But stress testing your services, throwing deliberate exceptions and problems — which is the only way to be sure your program can deal with real-life problems, is expensive and time-consuming if done straight on the cloud node or your local PC.

This is where SmartSDI comes in. It comes with everything ready and working. Want to use mySQL in your cloud solution? Just use a mySQL editor and connect to the Raspberry PI to create your database. Now go back into Smart Mobile Studio and start using the mySQL drivers to talk with it.

When it all works as expected, your cloud solution is ready for deployment! A wizard will help you through the steps of uploading your cloud solution to your service provider (Amazon, Azure) and it’s up and running in minutes (!)

With the server in place, you package your client application with phonegap, and voila — you are ready for the marketplace! With Android, iOS, Blackberry and Microsoft mobile support ready to rock!

Node-Sega, this is cool!

April 14, 2015 Leave a comment

It was in the year of our lord 2015, when a norwegian brilliant scientist, dirsturbingly norwegian, but brilliant non the less – came to create the most awesome nodeJS server the world had ever seen.

And he putteth not one, ney, nor two, ney, nor three, ney — but four Raspberry PIes which he ordereth from the gloomy land called brittania through fed-ex, or fed-up or whatever the lord callest them sad men in browish cars delvering goods.


What do you get when you marry Raspberry PI (four of them), a Sega MegaDrive II, nodeJS and a whole afternoon of free time? Well if you are around me you will get the all singing, all spanking – Node-Sega MegaJS (ta-da!).

Ok serious: I ordered a Sega MegaDrive II from AliExpress, which ships good from China. I didnt expect much from this product because, let’s face it – they do sell a lot of rubbish on that website; but since the verison II of the megadrive never came out up here in Norway — what did I have to loose? It cost something like $30 or so – with shipping (!)

Daddy's new toy -- it goes with the 16 other collectables I own

Daddy’s new toy — it goes with the 16 other collectables I own

Well, I get the sucker delivered and the first thing I find is a maelformed power socket. And to make it even more interesting its a 9 volt adapter. Not 6, not 8 or 12 – something normal that you may have around the house. Nope, a nine volt adapter.

I open the damn thing up and check, and the motherboard actually runs on 5 — which I just happen to have a ton of. So a quick modding and it’ working. Sort of. For 3 seconds until it goes up in smoke. They really dont make’em like they used to! I remember my US produced Amiga computer. I spilled coke over it, fall off a motorbike with it in my backpack, i even jumped into a pool once with my Amiga in the napsack — it didnt even glitch. You could set the bloody thing on fire and it would still boot up.

Wow, they really polled out all the stops for this one. $0.30 in parts?

Wow, they really polled out all the stops for this one. $0.30 in parts?

Old box, new tricks

So with a freshly “burnt out” Sega Megadrive at my disposal, what should a man do? But build a Raspberry PI cluster containing: Mame arcade game emulator, NodeJS web server interface for uploading and downloading MAME Roms. A dedicated PI for database work and a fallback server so nodeJS can spawn threads on a secondary machine.

So my trusty old, very new Sega megadrive will not end it’s days on the skip having come here all the way from china — instead it is being transformed into a supe sega! When sega machines talk about heroes they will whisper the name of the super-sega who went to Norway to become a most powerful sega in the universe. Mohahahaha…

Alas, this GPU is no more of use.. oh the horror

Alas, this GPU is no more of use.. oh the horror

Now to squeeze in 4 of these babies!

Now to squeeze in 4 of these babies!

I guess I dont need to tell you where this is heading right? I must admit it’s going to be so fun to do this mod. I can just imagine the face of my boss when he asks me to bring my nodeJS monster to work. And I bring a Sega megadrive, hook it into the network and watch everything light up 🙂

Still, it does need some work. There is a height difference I need to fix, also need two types of switches (reset and movable), a HDMI extender (short) a power-led extender and splitter. A USB splitter (it will have 16 USB ports!).

Now that’s a megadrive!

And what should we call this freepascal and Smart Mobile Studio powered cluster? Why Sonic ofcourse!

Sonic clustering

Sonic clustering

Why is the seganodeJS megadrive so sexy?

The megadrive chassis is just the perfect size to do a avant-garde mod using Raspberry PI. First of all because it has plenty of room, but also because of height and the position of power-in and video/sound-out match our goals — well, perfectly!

It turns out the HDMI-out and power-in socket on the RPI fits neatly. This means that you will have power-in and HDMI out exactly where similar sockets used to be. This is a fingertip-rule when doing mod’s. Always, always try to retro-fit new sockets and parts where the older versions were. It will save you so much time and headache later.

To demonstrate just how much space the Sega chassis gives us, consider this fab setup I have in mind:

4. diasy-chained Raspberry PI 2B
2. Re-chargable power banks
1. Terrabyte slim 2.5″ USB 3.0 storage
1. USB splitter (1 to 6) which will be exposed in the cartridge bay-door
1. Fully working reset button, safe shutdown due to power-banks
1. Fullt working shutdown (hard) button
1. 5v internal fan
4. mico-heat sinks to keep the CPU’s fresh
Assorted cables

You would never, ever get anything like this into a PSX1 or psx2. You would have to gut open your XBox 360 or something, because the PSX is utterly dominated by the CD-ROM and blueray “brick” inside.

Another thing: If you decide to place the first PI right at the back and re-cycle the old power-input holes, you are lining yourself up for a neat gadget, because: one of the cooler things about the RPI is that it’s perfectly happy getting it’s power from a USB connection. And since the RPI comes with 4 USB ports, thats 3 ports to power the other RPI’s with one spare port.

And you use that spare port with a USB splitter which gives you six USB 2.0 ports in return.
This gives you 6 + 9 = 16 fully functional USB ports available to your cluster (!)

Software setup

Since the RPI has become so famous around the world, plenty of software can be downloaded for it. This includes cluster software, home-cloud solutions and whatever you can imagine. But for my solution you dont really need that much.

The vanilla Noobs setup with Raspdebian is more than ok. Because the only thing you are going to do is to pick one of them to be head-honcho. And this linux box PI should provide the following:

  • DNS service
  • Firewall service
  • Internet provider for the other machine
  • Shared HW resources (e.g “printer”, “keyboard” etc)
  • 6 extended USB ports are shared out from this unit
  • Desktop service
  • Freepascal
  • NodeJS
  • Mame
  • Remote desktop access

What you want to do here is to first setup the linux system so that it works, then and only then do you install MAME with a boot menu — that way when you fire it up the system will boot into a menu of games, and you can use your joystick ($10 gamepad, sega lookalike on amazon) to scroll around and pick a game.

But, you also want to be able to access linux. So pressing ESC on a BT device or physically connected keyboard should break you out of the MAME cycle and boot X as normal.

The second machine

The second machine is the actual nodeJS server where you will be running most of your programs. A linux system can have a maximum of 1024 sockets in read/write mode at any given point (but thousands of allocated sockets waiting) so you want to dedicate a full RPI for this task.

  • Standard Raspbean install
  • Remote desktop access
  • NodeJS
  • network name “http”

The third machine is the boring RPI, namely the database. The setup is pretty much the same as the server, except this one should have mySQL running.

  • Standard Raspbean install
  • Remote desktop access
  • MySQL
  • network name “DATA”

The last and final machine is more popular, it’s the storage manager for the entire system. This machine will have all it’s USB ports used and connected to storage, which it shares openly with it’s own network. Since the network doesnt extent beyond the DNS and firewall, it’s all good for our little cluster.

You can also install samba and use it as a backup target for time-machine if you own a mac, or a backup target if you work exclusively with windows. So your Sega Raspberry nodeJS drive can become your most priced possession 🙂

Well — thats it for me today! I have a SEGA to assemble 🙂

Get Smart Mobile Studio for 1 year

April 11, 2015 2 comments
Know Delphi or FPC? Then sign up now!

Know Delphi or FPC? Then sign up now!

The Smart Competition has been extended by 1 month, which means that you have ample time to join and code some interesting stuff with Smart Mobile Studio.

But ! I have decided to make the prices more interesting by adding a full 1 year subscription to Smart Mobile Studio pro (!) as the first price, and the Raspberry PI 2B as the second price and a Raspberry PI model 1 (the original RPI) as our third place price.

So we now have 3 prices which are as follows:

  1. Smart Mobile Studio Pro (1 yr subsc.)
  2. Raspberry PI model 2 B (Windows 10)
  3. Raspberry PI model 1 A (Linux only)

Wow! what is this competition about?

Simple. The winners will be picked from the entries and the 3 best components or packages will receive the prices.

Note: Please ship the components as a smart mobile studio package. Creating a SMS package is very easy, see the packages menu. This is not a must, but by far the easiest way for us to test the components and see them in action (demo program + package = good experience).

Writing slick HTML5 components is easy, fun and rewarding!

Smart needs stuff like this – are you up for the challenge?

What should I write components with?

Simply go to and download the trial. Remember to request a trial key (!) before you begin or you wont get access to the IDE.

With SMS installed, play around with it and get to know how it works. Especially SmartCL.Components is of interest for this competition – and then code a kick ass component or package which is noteworthy, unique and helpful.

Keep in mind that Smart Mobile Studio has few components, so controls which are old classics for Lazarus and Delphi – are completely new and valid here!

You can read the original competition post here!

Smart competition extended to may 1st!

April 6, 2015 Leave a comment
Smart Pascal Compo

Smart Pascal Compo

Time has run out for the Smart Mobile Studio component competition. but I guess I picked a bad time for this, with easter and school holidays getting in the way of things.

As I wrote regarding rules we need a minimal number of entries to call it a competition. At the moment we have only 3 entries – although I have received a fair bit of email regarding details, the rules etc. (which I thought I outlined with great precision *smile*).

And let’s face it — it’s a super easy competition. Yesterday I wrote a fully fledged component for Smart Mobile Studio. A complete implementation of the Windows 8.1 mobile category header. You can check that out here. The point being that writing components for Smart Mobile Studio is much easier than Delphi or Lazarus. It’s really fun!

As a bonus the official list of components that ship with Smart is spartan and young, so chances are you will be able to find a control which is not there quite easily.

One more time

I feel it would be premature to simply cancel at this point. So I will extend the deadline to span april – which means the final draw is now on the 1st of may!

If there is still not enough entries, then I guess I’ll cancel the competition all together. And naturally according to rules, no submitted code will be used (unless you want to) in teaching.

The Raspberry PI 2 model b price (!)

Surely a Raspberry PI 2 model B must be worth a couple of hours coding? Especially now with Windows 10 just around the corner ! I personally own 4 of these little gems. One is dedicated for retro gaming, another is used as a backup server, a third is used as a dedicated nodeJS server (which I use with Smart Mobile Studio) and the last one is an all-round coding testbed. Only the nodeJS and gaming RPI’s are version 2 model B, the two others are version 1 and 1 B respectively.

Windows 10 is just around the corner

Windows 10 is just around the corner

It’s a really great little computer. It runs on 5V so it’s extremely reasonable (you can leave it on 24/7 without being afraid of high electricity bills). And it’s particularly suited for single-server tasks. Perfect for nodeJS or Remobjects SDK servers (compiled with Lazarus and FPC for ARM CPU).

Writing nodeJS servers with Smart Mobile Studio is so much fun, and I promise you that it’s going to be a real game changer once you get into it. You use the Raspberry PI to model a full server architecture at home, and when it’s done — you just deploy it vertically onto the cloud. And then you can scale it horizontally (clone instances) as your business grows.


The primary motivation for this competition is to support object pascal in our education system; Such as the Pascal programming for Schools Project in the UK. Object Pascal in all it’s forms is an excellent language for beginners and advanced alike. It has the depth of C/C++ but with a friendly and intuitive syntax suitable for all levels. It’s a perfect language and excellent for kids and teenagers to acquaint themselves with what programming is all about.

You might not know it but classical pascal was actually engineered for schools. The language itself was created to be easy to teach and easy to learn – and at the same time replace C/C++ with all it’s quirks and idiosyncrasies.

But students need help from us adults with examples, study material and quality code. Hence the emphasis that source-code be documented as much as possible. Be clear and easy to read – and so on.

If you havent seen the Pascal programming from schools project, then you should check it out! They have their own category dedicated to Smart Pascal with some really great stuff!

I’m still blown away by the arrow-shooting game written by an 11-year-old – which uses angle calculations and momentum to fire arrows at a target. Or this little particle engine which is fun and easy to learn 🙂

Getting into the competition

If you own Smart Mobile Studio, or just want to try it out — then join the competition! If you don’t have Smart Mobile Studio and want to join, then you can go to, download the trial and request a trial serial number.

The last bit is important because a lot of people download the trial and think it’s bugged — you need a valid serial number when you start SMS for the first time, or you wont be able to fire it up.

Then what? Easy – send me an email with your entry. Use the email lennart DOT aasenden AT gmail DOT com



The Smart Mobile Studio Competition!

March 17, 2015 Leave a comment

I want to remind every one about the Smart Mobile Studio competition I launched earlier.

It’s still early (I have received two really good entries already), so if you own Smart Mobile Studio – or even if you don’t (heck you can download the trial version and have a go) and fancy winning the latest Raspberry PI 2 (model B, the new one that runs Windows 10) then this is your chance!

Probably the coolest mini-pc in the world

Probably the coolest mini-pc in the world

You can find the details regarding the compo here. The rules are straight forward and easy, and remember: this is not a graphical demonstration competition. This competition is about making the best component! And writing components is very entertaining, especially for a programming environment as young as Smart Mobile Studio. It lacks many of the controls which we take for granted under Lazarus or Delphi (hint).

It’s ready to be sent to your place

We are practically giving this Raspberry PI away; It’s just lying there in its box ready to be shipped to wherever you live; dying to be turned into something fun and useful. And even if you don’t need it, your kids will love playing every nintendo, amiga, sega and arcade game ever created (just install PIMame and turn it into an arcade machine).

So what are you waiting for? Impress us with a new toolbar, a new button-bank, sinus scrolltext or whatever control type you love to code! A hex editor would be nice (or any editor to be honest, I havent gotten around to coding one yet).

The Smart Pascal competition!

March 3, 2015 Leave a comment
Probably the coolest mini-pc in the world

Probably the coolest mini-pc in the world

I recently found myself in possession of probably the hottest piece of hardware on the market, the Raspberry PI 2 model B. This is the super funky version with roughly 10 times more speed than it’s predecessor, double the ram and more USB ports. It is capable of running Microsoft Windows 10 [ARM edition] when that arrives.

Well, now is the chance to win this puppy and have it sent to your doorstep!

Smart Mobile Studio

Back in 2012 Optimale Systemer AS held a Smart Mobile Studio competition where the winner got an iPad 2. And boy did we get some cool entries (!) Loads of classical 16 bit demo type projects which in my view is one of the best resources for beginners to learn from. The result is that Smart Mobile Studio ships with a ton of cool demo’s, ranging from phong shaded polyballs to high-quality WebGL landscape demonstrations.

While visual demonstrations are great, this competition is of a more serious type. Namely who can write the best Smart Mobile Studio custom-control!

Note: I must underline that this competition is not held by Optimale Systemer AS, but rather Delphi Developer, if you are not yet a member of our Facebook group, click the link and visit us!


  • No-one from the SMS team may enter the competition
  • You must be the author of the code you submit
  • External JS is allowed, but within reason (*1)
  • Write clean-cut, commented object pascal as much as possible
  • The code must be made open-source so others can learn from it
  • The control must make use of effects (*2)
  • Controls must conform to standard (*3)

*1: The goal here is Smart Pascal component writing, which means that JS is allowed but focus should be on providing a Smart Pascal solution. A thin wrapper around some external library is not really your creation. But we do allow the use of third party JavaScript libraries if their use can be justified.

*2: The w3effects.pas unit contains classes for triggering CSS transition effects. You can also edit the style-sheet and add your own CSS effects directly there. The use of tween.js is allowed, you may also use the Smart Pascal QTX library which makes effect programming child’s play. If effects are inappropriate for your particular controls, you may omit them naturally, but the goal should be to create controls With pleasant visual feedback when you interact with them. Also remember that CSS classes map directly to the control name. So if your control is called TMyControl, then a CSS class with the same name should be added to your stylesheet.

*3: With standards I am referring to ordinary control use, like overriding and deriving Your control from a valid visual ancestor (TW3CustomControl for instance). More than one Visual instance should be allowed on the form (unless the topic of your control dictates single instance use). No “special” (read: hack) way of initializing the control. Write a good one!


There are loads of cool JavaScript controls out there, ranging from the simple and elegant to the technically excellent. I strongly urge you to have a look at Chrome Experiments, which is a website dedicated to various effects and demonstrations for Chrome. Just remember that what this competition is about are controls. So it’s important to find something of value for others in their application design.

Coding controls is easy and fun!

Coding controls is easy and fun!

It could be something as simple as a HTML5 TPages (tab controls), a header control which animates it’s changes (e.g: you set backbutton.visible:=False and the button fades out rather than just vanish). Just have a look at TMS’s Delphi components for instance, which is very inspiring!

Or perhaps a 3D component? To achieve that have a look at our Sprite3d.pas unit which uses CSS to position ordinary DIV elements in 3D space. To add scene and perspective you must place them inside a container DIV with percentage size and perspective values — and voila, you have a 3D scene viewer component.

And last but not least, an old favorite of mine which I have implemented countless times in Delphi: The pixel editor control. With zoom, different drawing tools, grid, horizontal and vertical rules. It’s not hard to program but can be a little consuming once you get started.

Blast from the past component

Blast from the past component

Well — I have no intention of dictating what you should put into the competition, I write this only as a source of inspiration to provide some pointers as to what can be made.

If you havent written any Smart Mobile Studio controls before, dont worry. It’s a lot easier than native Delphi or FreePascal controls. Just inherit from TW3CustomControl, override InitializeObject (constructor) and FinalizeObject (destructor) and of-course ReSize() and you are well on you way. Just search this very blog for examples! The Smart RTL is rich in features, yet small and compact enough for expansion! You will notice how that Delphi 5 or 7 feeling comes back to you.

Just control-click your way around the RTL, just like you would in Delphi or Lazarus, and have a peek at the foundation classes. You will find it’s much smaller, easier to understand and ad-hoc than VCL or FMX.


Entries must be delivered by the 4 of April, so you have a whole month to complete this!

Note: If too few people enter I preserve the right to cancel the competition. At which point the Raspberry 2 will be given to the most impressive component-programmer so far.


The judges will be myself, Peter and Glenn over at Delphi Developer where we serve as administrators (Facebook group for Delphi, FreePascal and Smart Pascal developers). If you havent joined the coolest Delphi group in the universe you can do that here:


Send your submissions to lennart.aasenden AT gmail dot com, place “Smart competition” in the title!