Wednesday, 30 March 2016

FriendlyArm Nano Pi2/M2

Today I got a nice big package in from Friendly Arm in China, I bought 2 of their higher end machines the Nano Pi2 and the M2, as well as a couple of their absurdly cheap $11 quadcore M1's

$11 do they make money?

Anyway....I'll start with the Nano Pi 2, It came very nicely packaged in a book style folding box, and is very neat, bigger than a Raspberry zero, but about half the size of a standard Pi.

Not a lot of software out there, but the Forum seems well set up and the images were easy to find for Debian and Android, I went for Debian of course.

I have to say this was by far the easiest burn and play I've had so far. It worked perfectly and I had a very nippy running version of Debian in no Time. Which is good as I was a worried after reading that some early adopters had to change resisters on the board. But no it was all fine.

I used the exact same SD card on the M2...again booted no problem.

Can't really say anything bad yet, expect that the video res was a little low at 1280 instead of 1920, so I'll change that when I know now. It was only a quick boot and test, but I nosed around the libs, with ease since it was so responsive even ran a few stress tests to see how hot it got, it seemed to manage ok, hot but not HOT!!!

I like this, when this do what they are supposed to, I will play with them properly at the weekend.

The M1 sadly however did not boot from the same SD, so I went to go get the M1 images....which despite being referenced in the Wiki...are not there...oops. I think I may well be the 1st Western customer for this board, since no one else has reported missing M1 images, they have a Chinese download site to, but I can't get to it, so am guessing that's where that are at the moment.

Hopefully they will be up tomorrow and I can give a report on it separately. I bought 2 of those since at $11 there are a total bargain and I am sure I will find a nice use for them in spite of the almost total lack of software

I ordered them with cases which are 3D printed, and tbh are a little on the coarse side, screw holes will need to be filed out in order for screws to fit....but not to worry, these are so rare over here, I doubt I'd be able to find anyone doing my preferred clear Perspex open sided enclosures.

So that was just an unbox and test... I was pleased, I hope that in use they are just as pleasing.

Edit... well ok, maybe I spoke to soon. Though the issues are not really down to the Nano's, just my total lack of understanding of Debian. However it does seem to be a painfully light version with a lot missing, and method to resize the disk does not work since sudo refuses to resolve the username
no idea at the moment how to fix that but I'm sure someone will inform me in the coming days.

It did crash, one time and possibly from entering the wrong passwords too often..which is not surprising as the Debian password is not listed, its fa by the way.
I can't change the user to root though since any attempt to change the user causes a crash...most likely due to not being able to resize the partition.. hmm

ok well the M2 was not able to find any networks with my RPi wireless dongle...bit of a pisser but not entirely unexpected I'll hook it up to a hardwire network soon.
The Pi2 took a bit of time to connect to my in house wifi but it did work, though I don't seem to have the right passwords for SSH connections...again I will wait for a response. Then hopefull we can test it out.
I put a little heatsink on the chip though, it was getting mighty hot, and even though I am not sure the crash was heat related its not going to do any harm.

So until I get passwords resolve..I'm stuck

Short update, the day after, the Pi2 seems to have issues, with overheating, I left it running for a while and went back to it to find a white screen, though it may not be a heating issue, could be software trying to enter sleep mode...But I tried leaving it overnight and in the morning white screen again.

I do think this is more of a bad sleep mode though.

I now have M1 Debian and Ubunu builds which I'll work on later tonight, but still waiting for passwords from the forum support. I will just burn Ubuntu on them and see what I get.

Tuesday, 29 March 2016

Raspberry Pi A+

Ah a raspberry,

really there's nothing that can go wrong, Rasbian installs, it all works, everything is awesome..

... ok well yes but its slow as anything has no ram in it to do anything cool and its basically less capable than the Pi Zero, but its a Raspberry, its a lovely thing, very easy to get started with and that's all there is to say.
Its not ideal as a game target, but it does work...just

Saturday, 26 March 2016

And so it begins

I've been running a breadboard test program (ie every test routine with no real regard for clarity or intending to be published) for several weeks now, getting my game framework up and running, testing and scolding myself and learning a few things about SBC's which I just wasn't aware of,
The intent was to write a couple of game frameworks, starting off with a scalable resolution 2D sprite based framework. This will be a jump off point for 5 or 6 games in my book before we discuss optimisations and transition to 3D.

The 1st game to be done is going to be an Invaders game. As soon as I have the clean tidy but still very bad, code ready I'll start putting it in the book.

So far its only running on the Raspberry Range, I have to make a few changes still to get it on the others, but its a start.

Behold the invaders are coming

Yeah I know not much to look at just yet, but that is a double buffered RAM buffer drawing to screen at 60Hz, scaling up to 1920x1080, with all Sprites having full colour and alpha channel. at 640x480 pixel res, these 32x32 don't even push the hardware.. In fact I tested it to do over 2000 on a Model 2 and 3000 on a model 3 before the speed dropped down.
Considering this code is quite deliberately very bad (for educational reasons) I was amazed.

I'll finish the game tomorrow and post a few more pics, but source code won't be available till the book is done.

Banana Pi M3

I've been waiting for this one, I ordered one from a German supplier several weeks ago, but after waiting 5 weeks I gave up and cancelled the order, after I spotted one half price on eBay.

There's a down side in that this one is the Rev1 version which uses 2amp max, micro USB power but I don't plan to hook it up to much so it shouldn't need the 3amp version in Rev 2. But that said it hated having an unpowered USB hub with Mouse, keyboard/mouse combo and a Wifi on refused to boot if they were plugged in. I resorted to just using the keyboard/mouse direct into one of its 2 USB, as wifi is on board.

The M3 is the Octa core system from Banana Pi, which competes with the amazing, Odroid XU4 in having 8 cores but its not quite as cool as it sounds since in truth the XU4 has 2x4 cores, so while you can allocate 4 cores to any app, you can't access all 8 in one app. But this does have the advantage that your OS and other apps are probably working on one core group while your app runs full speed on the other. The M3 has 8 actual cores which can all be accessed in theory meaning you really have full power on your app.

Speed is also a factor with this machine, it defaults to 1.2ghz, but can be overclocked up to 1.8Ghz or if you have a bit more cooling 2.0ghz. But I'm not too interested in any of that right now. I may boost it a little but I like to see the chips and won't cover them with heatsinks unless I have to, Research also shows that even attempting to overclock is going to fail, and in fact its best to keep it running at 1Ghz.

Graphically the GPU is a bit disappointing, given the effort to put CPU power in there, they could have done so much better than a PowerVR SGX544MP1 single core . Its an ok chip, well actually its a very fine chip,  faster I think than the single core Mali 400's that abound but not exactly a match for the CPU potential it has.

It runs OpenGLES2.0 but unlike the Odroid XU4 it can't (currently) handle ES3.0 which is a shame. It does however allow OpenCL compute coding, for more advanced coders than I, which I will play with in due course. I am excited to get some code working on them that can test the GPU power to find out if the multi core (6) GPU of the 600 series Mali on a XU4 is better or worse than this.

It does have a Gigabit Ethernet which is nice, and it has Sata connections, but I discovered on line that its not a true Sata, its USB emulated, so while its possible to hook up Sata drives to it, which is cool it won't have the performance you'd expect from a Sata Drive. In fact its terrible perfomance.

Some nice buttons for power and reset, and one called uboot, which I have no idea about, usual extras include IR and microphone, Wi-Fi, Bluetooth plus the usual lcd and debug ports and the ubiquitous GIO systems. Hardware wise though this is not a clone of the Pi, it does its own things its own ways, it just happens to run a version of Rasbian and share a liking for fruit pastry based nomenclature. Its unlikely any Raspberry hardware will work out of the box with it but again I don't plan to try, its just a target for me.

So lets get it going.
I assumed as this has cMMC memory on it, it would come supplied with something on board and boot direct, but it seems not, I think I will have to install it myself once I find an OS I like. So I burned a Rasbian distro on a 32Gb SD, which I downloaded from the Banana Pi site.

while I was waiting, I put it in its nice Perspex enclosure which has been sat on the shelf those 5 weeks waiting..

Sadly the Rasbian distro didn't work, so I tried Ubuntu...also no joy... But rather than get all Hulk on it and smash it into a thousand pieces as the voices in my head were saying. I decided to try a different SD and this time I got Ubuntu to work. It fired up even connected to WiFi and did what it was supposed to do. So maybe it has an issue with my 32MB generic SD card. I'll try it with Rasbian again another time.

The machine is suffering a little from a lack of power and it gets very hot, with apparently random crashes. I'll reluctantly add a heat-sink to it when I get some more in and see if that helps. Also it really needs to use a powered USB hub

But it connected to the dev PC and was able to run an SSH console, so it should not be too hard to get the beast to work. But I think I may at some point sell it on and try to get a Rev 2 model, as this is far too fussy.and I want to be sure crashes are caused by me not by a lack of power.
Software support is as always very poor, but I really can't blame the Banana people (or person) the community needs to step up to help and that will deliver improvements like the Rev2.

Though not on paper, at the Odroid XU4 levels of speed,or GPU power it does actually seem to run Ubuntu mate far faster and smoother than the X4U, I think however that's down to a lack of GPU acceleration on the Odroid machine which may be enabled here. It does crash though from time to time...grrr However I realized I was using a 1amp power unit so I'll try my monitors powered usb hub, which I think can do more than 1amp,  until I pick up a 2amp+ unit from somewhere.

Snooping though the libs there s a LOT of Raspberry Pi references, so it may be that the libs and code are for the RasPi and have been copied over but probably won't work...

So not the beast it promises to be, more of a petulant teen on its way to being a beast. I won't rush to get the Rev2 but I will keep an eye out on how it is received.

I have to add that after a quick look around their forums its populated by a lot of incredible negativity, the machine has faults for sure, but when people post solely to run it down and avoid an actual attempts at helping others to get it working its a sad kind of support.
I suspect however this is rather a directed targeting of hate at the makers. The makers themselves are clearly not well versed in English, so  it may be they are not too involved in the forums directly, but there is evidence of software updates and one or 2 people doing their best to make it work.

The M3 really fails to deliver if you are looking for a proper 8 core fast system, without heat sinks it tends to shut down cores and its rare you see all 8 cores available...but as a target for our tests it does do its job...maybe they will fix the software issues that are causing most of its problems...maybe not...its a brave attempt though

Orange Pi PC

After a not so good experience with the Orange Pi One, their simplest board, I decided to try their more direct clone. And it did work out a bit better in some ways.

I burned a Rasbian clone from their website, and basically that worked fine, and the machine booted up right away. but it did boot up in 720p rather than 1080p and I had problems finding a way to fix that but no matter.

The Rasbian on board seems to be a copy of the Banana Pi version, which in turn is a copy of the Rasbian version, it even included the BC-Host.h files. which are useless on a Mali based system.

Wifi also does not get recognised, I tried 2 Pi compatible dongles but non of them worked, no matter, the wired networked worked fine and connected to my Windows PC no problem, but clearly no update and having to use SSH to send libs is a bit tedious.

Overall the Rasbian is a bit buggy, with window movement being a bit flakey so trying to use it for anything serious that works on the Raspberry is likely to be a disappointment.

One thing to take note of was how hot this board runs, it really kicks out some heat from the CPU, probably still within its safe limits but considering I did nothing more than boot up a low res OS and test connectivity which did not register as any form of stress on the taskmanger, I'd hate to think what temp it gets to when its run under stress.  A small investment in a heat sink might be a good idea.

Software support is.....almost non existent, there is a dedicated but very small group of enthusiasts working on porting various OS's and some media players, but not much more than that.
However for simply testing out my projects it should all be fine

It also has to be said, this is a very very nippy machine, that over-clocked and hot CPU has a lot of horsepower which I am looking forward to testing.

We'll soon find out ;)

Friday, 25 March 2016

More Pi..

I think I am done now with my collection of Pi clones.
I got hold of a Roseapple Pi, one of the fastest out there, and I ordered a couple of $11 Friendly Arm Nano Pi's which should be here next week. I think that brings the total to over 20!!

Its all a bit mad now, but I think I can stop now, I have almost all the base and high end ranges of each of the main makers, and in the case of Roseapple a very obscure but very fast one. Which is more than enough for me to perform my tests.
It does seem that the success of the RPi is encouraging a lot of Chinese/Korean makers to clone it and try to add a little extra value, but the Rpi leads because of its support, If you look at the Orange Pi, you can see such a difference.

But anything that gets people interested in small computers and coding is good.

In other coding related news, the V1 (bad) framework for my games projects is now complete, I can get around 3000 blitted and 2000 alpha compliant sprites on screen on an RPi 3 at 30+ FPS, and easy 1000 on a lesser machine, which is more than enough to get the games working.

I was rather hoping that the performance would be much worse, as I am deliberately rendering the sprites in software, very badly, in an effort to show that bad code can still work, but its still bad.. The idea being that the V2 framework, will have considerably better object management and 10,000+ sprites at 60FPS, should be perfectly viable, and that better management will demonstrate to the user the difference a bad design choice can make. Oh well, there are 2 very high sprite number projects which will stress the system so the point can still be made.

This easter weekend I plan to get some backlog work done, and then come back to it renewed. I'll also be setting up the sets systems for the Odroids and Banana Pi's

This is when it starts to get interesting.

Wednesday, 23 March 2016

Raspberry Pi Model 3

Well the RPi's of course are the safe ground for any SBC user, with enough support and software to make them far and away the easiest systems to use.
I took delivery of an RPi Model 3 the day after launch, knowing that they'd probably sellout.

It of course presented no problems, once I had downloaded the latest versions of the Rasbian distro which could properly set up the 64bit system. The older versions being unable to do so.

The biggest new thing on the Model 3 for me, was the wifi, which works brilliantly. I was unable to figure out out to get Bluetooth to work but since I don't really plan to use the machine as anything other than a target for game dev I didn't really care. I am sure someone will find a reason to use it on the forums.

The speed of the Model 3 is not exactly blisteringly better than the Model 2 but it is there, the GUI in particular feels just a bit smoother and more responsive.

It seems to make little to no impact on my projects, which still run at reasonable 35FPS with no optimizations under extreme stress of rendering 3000 software sprites.

I get pretty much the same performance on the Pi Zero, but then again I am only using 1 core so can't expect the Model 3 to be massively better.

As with all RPi's the Model 3 is a nice safe and secure upgrade that presents no technical issues.

Friday, 18 March 2016

Odroid C2

Oh well this was an interesting one. I got no video output, thinking it was the SD card, I re flashed 3 different SD's but still no output. the Blue heartbeat indicate was pulsing away suggestion that all was well but nothing.

A post on the Hard kernel forum got a reply from the admins, to check the cable which I had done already, but then I noticed that when plugging in I did seem to get a slight signal capture, so I decided to fiddle about with the connector...sure enough, if I got just the right spot I got a signal.. but the slightest shake or vibration and the signal dropped. So it has a faulty connection.

I did manage to get it to sit stable on the desk for some time though to look through it, and it all seems to be fine and dandy, no disk volume size utility immediately obvious. no working OpenGLES demos on this one, but there was GLX demos, no source....otherwise pretty much the same as the XU4.

But I did note that it seems a lot more nippy than its big brother the XU4, giving me more suspicions that the X4U does not have accelerated GPU functions in Ubuntu

Sadly the vibration caused the signal to drop again and getting to stay stable was just too much effort, it has to go back. I've contacted  Hardkernel and will send it off, or try to arrange for a 2nd one at some discount to avoid paying lots of shipping.

Thursday, 17 March 2016

Odroid XU4 Setup

Ok so first up on my  list of devices to get fired up is the 8 core XU4
One of the fastest machines available so I was expecting good things, but 1st impressions are not amazing, however there are a few definite plus points

I installed Ubuntu mate on an 8GB SD, had a little trouble working out which way up the card went in,, but figured it out. (it went up :D)
1st boot, seemed to crash, so unplugged, and tried again, this time no issues and it went into the GUI desktop.

Start up of apps is a little slow, but that's quite normal with SD, though I was surprised at the refresh rate of the windows, they were fast enough to work, but there is a clear lag in the wipes and resizes...Which is usually an indicator of a software refresh. I can't be 100% sure at this point if this version of Ubuntu is actually using OpenGLES acceleration.

Anyway, this is my 1st exposure to Ubuntu Mate, it seems like a nice OS, though I'm not especially interested in using it. I could not work out how to add my wifi network until I found the installs tucked away.

Wifi did hook up, though I was plagued by my upstairs wifi externder being mega slow.

So, thats it so far, it boots up fine, it did an update fine, extender issues notwithstanding and it runs Ubuntu.

I had a look around in the directories to find the OpenGL libs and indeed we have OpenGLES1.1 ES 2.0 and ES 3.0
We evern seem to have an OpenGL lib, but that may be a leftover from which ever version of a desktop OS this was ported from

There is a really nice OpenGLES2 executable demo which gives a range of examples of shading fx with models and procedural demos. also a good hello triangle demo. But though I found the Exes, all the header files and I think the OGLES2.0  libs themselves..I could not find the source code for the demos, which will be a massive help for programming.

The Odroid site does have some interesting helpful examples though so I will download those at the weekend when I will try to get a project up and running on it.

so..easy to set up, get going,we will see if the coding is as easy.

Hello and Welcome

Hi there, thanks for dropping by to my new blog.

I've been having some fun collecting and testing out a whole range of SBC's like Raspberry Pi and all the clones that have come on to the market hoping to grab a piece of the action.

In doing so I've discovered a fascinating culture of hardware geeks who love nothing more than making these little machines run various versions of Linux and Android in a seemingly never ending quest to create even better home TV boxes?

I don't like home TV Boxes, I hate Android, and I hate Linux even more.

But I do like tech, and fun tech that lets me play with it has always been interesting to me. As a veteran (ie very old) games programmer I wanted to see what these little machines were capable of.

In the process I discovered that though the  idea behind these machines is basically the same, produce low power,  cheap, self contained systems, using reliable and readily  available off the shelf chips, usually ARM with a SOC style main CPU and GPU combo, there was an interesting similarity in the design approach and hardware used. Its wrong to say they are all clones of the Raspberry Pi, though some are, many are genuine attempts to produce a better product that targets the same market, therefore there is not a massive difference in the hardware but tweeks in speed, RAM and GPU make for fun variations while retaining a common core.

So while there is some consistency in the hardware designs, the software support varies wildly. Various flavours of Linux partly work or sometimes just don't, Android usually works very well or not at all and so forth.

The overall success of the machines depends very much on how many people are actively working to make the software work so I applaud that regardless of the comments from those not willing to wait for the software to mature.

The Raspberry Pi, has far and away the most active community with many millions sold and many thousands of active contributors, so its software base is solid and reliable. The Orange Pi by comparison, has maybe 3 people (exaggeration) working on things while  other spectators complain bitterly about the lack of support and fail to realise that open source development needs participation to succeed.

I'm not an OS coder, I have little or no interest in working to port Linux to such machines, even less on Android, and most certainly no real skill.

But I do like to write games.. So I've been producing a series of projects for an upcoming university course that will work on almost all these machines, so long as they are running at least a basic version of Linux (Android is a bit too tricky).

The fact that most of these machines have as much processing and graphic power as Original XBox and PS2 and perhaps more, makes them very interesting from the point of view of developing games that work within the limits they have. Those limits are so far beyond the limits of the 8 and 16 bit machines I learned to code on that I am salivating at the idea of what might be possible, if one moves away from endless re-writes of home media boxes...these are great games machines, lets try to make games!

Over the last few months I've been slowly acquiring SBC's to go with my main Raspberry Pi dev target so that I can work out how to get them to run games

I plan to use this blog to detail, how to install working images, working OpenGL ES2 libraries and also OpenAL libs, assuming the hardware's own drivers actually allows these things to work. This then hopefully will form a useful resource to those who want to work with their SBC's for anything other than OS development.

All of this will culminate in the development of a range of games for a book I am working on which I hope people will check back on here to see where some of the choices that were made came about.

So far on my collecting quest I have the following machines

Raspberry Pi A+
Raspberry Pi Model B
Raspberry Pi Zero
Raspberry Pi Model2 B
Raspberry Pi Model3 B

Odroid C1+
Odroid C2
Odroid XU4

Orange Pi one
Orange Pi PC
Orange Pi PC2
Orange Pi Zero
Orange Pi Zero Plus 2
Orange Po Win A64

Olinex A10 OlinuXino-Lime 4G

DragonBoard 410c

BananaPi M1
BananaPi M3
BananaPi M3 with 3amp power jack

Beagleboard RevC
BeagleBoard XM
BeagleBone Black

Pine A64 2Gb


Nano Pi 2 Fire
Nano Pi M1
Nano Pi M2
NanoPi  M3
Nano PC T2
Nano PC T3
Nano Pi Neo

RoseApple Pi
Creator Ci20

Asus Tinkerboard

Some I have still to get working, Some are still on the way to me, but this represents a pretty fair wedge of the sub $75 range of SBC's on the market, most non Raspberry ones, use Mali or Power VR GPU's and all run some form of Linux.

I'll try to post info on how to get things set up, and some screen shots of games as I go.

I hope that this proves to be a useful resource and I'll try to keep it up to date as long as these little monsters don't have me feeling too stressed out.