Sunday 8 May 2011

Starting at the start

It's been an interesting week.  Starting again on RISC OS programming after a 12 year gap has meant going back into the PRMs and re-learning a lot of the nuts and bolts.  However it is now coming back - I'm starting to remember the SWI calls and my way around things.  RISC OS is the easiest and most logical operating system out there to work with, and the quality of the Acorn PRM manuals is quite extraordinary. Having spent 10 years almost exclusively working with VB.NET and Visual Studio it's a pleasant change to find intuition and some clear instructions pointing me in the right direction, rather than some cryptic MSDN pages.

I'm still waiting for the tools CD from ROOL so I'm writing code with StrongEd and the BASIC assembler.  While perhaps unusually I'm not a fan of C/C++ code, I am a fan of having a modern IDE and debugger to fix bugs up front - VS.NET IntelliSense and 'compile as you type' is second to none.  That said, I am getting back into the old methods of debugging, particularly using the screen, console, and  even using the OS debugger to examine registers if everything else fails.   Having put together a new assembler code library for file handing, string handing and dynamic area/heap management, plus importing a lot of old shared code, everything is starting to come together and development is speeding up.

In the past few days I've read through all the TAG code and have designed the framework for a new 32bit version which I've dubbed (with no imagination) TAG32.  This consists of a module 'TAGMod' that allows multiple applications to simultaneously use the wide range of TAG capabilities - from the various plotting routines, through to complete management of a game runtime.   The new module will allow TAG applications to run in a desktop window, and even multi-task with other applications.    Currently the new module fires up and loads compiled TAG application package files.   Plenty more is still to be done on the structure before we get to 32bit rendering and use of VFPv3 / SIMD.

The TAG runtime for RISC OS will remain pure assembler - so the core code segments will comfortably sit in the CPU cache.  It's hard work at times, but in the end I think it's worth it as it makes the result particularly impressive.  Some simple tests show the BB XM is comfortable rendering in 640x512 in software at 60FPS (even indirecting via a framestore and copying to the display) which is encouraging.

My early impression of RISC OS 5 (on the BB XM at least) is that more work needs to be done on getting core applications running easily and reliably.  NetSurf has potential as a browser but suffers from a certificate error which makes it near impossible to view many websites.   FTPc hangs on start-up, Omniclient needs something I don't have, and this is the story with many other applications.  Currently it's making it near impossible to communicate with the PC I use to update this page without going via the RISC PC.

Over in Singapore work has begun on prototyping a system for running TAG applications through Open GL on Windows and ultimately Airplay.  One of the old TAG demo objects looks rather nice with a modern graphics engine.   Sadly at the moment Open GL for RISC OS remains little more than a dream as the SGX Power VR driver software and hardware documentation is all closed source.   While I could have plenty to say about this - for now lets just keep believing that one of the Linux groups attempting to make an open source driver makes some progress.

TAG Objects running under Open GL on Windows
Hopefully there will be a few shots of the familiar Brutal Horse Power 'worlds' in the next week or two.