Monday, 30 May 2011

BASIC VFP and a decision on OpenGL

The re-write of TAG as TAG32 continues.   Having completed a load of code relating to the structure of everything, we move on to the 3D library.    There are two options on the table:
1) Write a new version of the TAG calculation and rendering code based on VFPv3 and SIMD.   This will bring maximum performance.   All the various methods would be exposed through the TAG32 SWI calls.  This method fits with the RISC OS legacy in that there is assembler code at the core of the operating system.  The down-side is a lack of standards implementation, making it RISC OS only code.   That said the Windows/Airplay version of TAG wouldn't require this code, so it's not necessarily that much of a limitation.

2) Use OpenGL as the 3D library.  This requires reviving the port of Mesa, and may open up hardware acceleration in the future. While this is an attractive option in many ways, the problem is a lack of performance.   In order to squeeze high quality 3D graphics in a higher resolutions and colour depths out of the Cortex A8 it is essential to optimise the code.  The Mesa code from the old RISC OS port is C code full of floating point and non-optimised functions and methods.

For now I've started work on adding VFPv3 and SIMD into the BASIC assembler.   The ARM 'ARM' manual is a bit tricky to read, but after a couple of days of studying I now understand VFPv3 and at least some of the ideas behind SIMD.

The first version is a BASIC library which implements FNvfp("instruction") to assemble the instruction.  All of the logic is based on lookup tables and a small amount of string processing code so it can be incorporated into the BASIC source in assembler at a later date.    It uses EVAL so that expressions can be used with variables as with other instructions.

So far I've tested VMOV, VCVT, VSQRT, VDIV, and VMRS/VMSR and it works very nicely.

The VFPSupport module in RISC OS 5.17 is used to first make a context and enable VFP/SIMD operation as it's switched off by default.

I hope to put up a getting started with VFPv3 post in due course once I've completed work on the library and carried out some more testing.


  1. Superb post. Many thanks for discussing valuable content material. No doubt each one of these tips are extremely much ideal for bloggers.
    Antivirus comes in the list of most needed software as it protects our device for virus but several times it shows tech issues also. In case Avast installed in your device is putting you in panic then call Avast Support Number UK and get your issue solved in just few minutes.

  2. Nice blog. Keep posting like those amazing posts, this is really awesome. Want tech support for your Acer computer, Call @ 0800-098-8371 Acer support Number UK.

  3. Hotmail has introduced the fastest mailing experience for two decades. Besides this, complications related to username and password keep on bothering us. In this case, Hotmail Support Number UK is what you need to solve this problem in a short a while.

  4. This is outstanding and great post! i really like it. thank you so much.
    Call 0800-090-3224 for Dell Printer Helpline, Dell Customer Care, Dell Contact Number, Dell Support Number, Dell support Contact, Dell Tech Support.

  5. Delighted so much to be here,lot of things i found here,Thanks for sharing.I gonna bookmark your site.Please keep posting.
    Epson Customer Service

  6. Really awesome post i found here,lot of coll stuff.Thanks for sharing.
    Dell helpline

  7. I have read your article, it is very informative and helpful for me.I admire the valuable information you offer in your articles. Thanks for posting it.for information regarding content writers in Delhi please visit to the link.
    Content writer in Delhi

  8. Its an incredible joy perusing your post.Its brimming with data I am searching for and I want to post a remark that "The substance of your post is marvelous" Great work.for information regarding SEO services provider go to the link.
    SEO services provider in Delhi