Stuff to add
------------
* more code!
- set ADT
- cheese ADT?
* documentation! - add usage examples & stuff!
* sasm:
- PLD instruction
- DSP instructions
- other instructions (long mul etc.)
* Add new key #defines:
- mouse scroll/extra mouse buttons - not returned? Try HID/Simtec?
* vecint code!
* More long mul code!

Stuff to amend
--------------
* make smap better
- use sorted data structure!
- make it free() value ptrs?
* improve circle support
* translate fp_math to use macros where possible
* pqueue, jprof: error checking!
* span.c: Make read* saner? (e.g. readlen for x<0 returns -x, readdepth returns CLOSEST_Z, etc)
* documentation: Number ranges, etc (e.g. vec code), crossreferences to SWI manuals, etc.
* textbuf: minh,maxh - inclusive? exclusive?
* timer: Use timer structure, as opposed to array of timers
* limpx duplicate structure definitions, etc.
* osspr error checking
* make vec*_toplane as good as spandraw's?
- have one version that returns same-type data, another that returns vecll & f4816?
* Get rid of duplicate vec*_add/sub/neg functions - all (for 32bit types) can be performed by the same generic func
* Update docs for new v3m library!

Stuff to fix
------------
* fix Z bugs when T3D arena given walls
* float_tridiv is different to f*_tridiv when division by zero
* fix jprof2 on PC-relative 1st instructions (LDR Rn,<xxx> etc.)?
* fix LimpX_DeleteIcon to have correct behaviour if icon isn't at end of list (mark as deleted but don't free)
* Fix f1616_atan2() inaccuracies for some multiples of 90

Stuff to design
---------------

Stuff to think about
--------------------
* documentation: seperate pages per fn?
* speed up vlen & sqrt by using addition system if tests say so
* add perspective projection tmat?
* add support for spheres
* surface/buffer utils?
* add texture mapping/sprite plotting to span code
* add lighting via _toplane?
* named commands, ala named variables?
* add flags word to variables? or load/save/parse ops?
* spandraw.c: Combine the two row insertion loops into one?
* vec_moveto*: Change to use binary search type algorithm?
* dispose of DTime, and use HALTimer directly?
- create small block of code in module area
- atexit() function will remove the code
- if game crashes completely, code will be left stranded
  - make it detect the game quitting?
    - no more wimp task?
    - console log available for reading?
    - flag word which gets updated regularly by program, lack of updates -> no program running?
  - or make console log/system variable contain address of code, so it can be killed by a basic app?
* triangle plotter which draws straight to screen instead of to span buffer?
- could depth sort bodies then draw all the distant bits straight to screen, leaving closer bits for the normal code
* bbbsearch: Use cbma! But what about the lack-of-memory-freeing?

Other stuff
-----------
* profile!
* investigate system limits
* Investigate relationships between sasm_mem* flags and reading/writing with 0 offset

Stuff done
----------
26/2/08
* Applied GPL v3 license
* Fixed the WOUM and LimpX documentation a bit, and added notes about the new armv3m config, and hmap/smap/dtime documentation.
25/2/08
* Fixed armv3m gen_vlen(), f1616_atan2() being over-zealous in their overflow detection
24/2/08
* Fixed overflow code in GEN_DIV (and therefore most fixed-point division functions) to handle positive overflow properly
* Tweaked f1616_sin/cos and f1616_atan2 a bit to reduce pipeline stalls when loading from the cos table
* Rewrote makefile to use patterns for building files, and to build seperate armv3 and armv3m versions of the library
* Wrote armv3m version of f1616_mul()
* Tweaked the ARM7 detection in sasm_getcapabilities() to be more reliable
* Added A9home detection to sasm_getcapabilities() to allow use of halfwords
* Wrote armv3m versions of f1616_sqrt(), f1616_sqr(), f1616_atan2(), f248_mul(), f248_sqrt(), f248_sqr(), f2012_mul(), f2012_sqrt(), f2012_sqr(), gen_vlen()
17/2/08
* Added f1616_atan2()
* Added jprof2_forceadd(), to allow profiling of libscl functions
* Marked some functions/parameters as const, in an effort to get a little bit more speed
* Fixed f1616_atan2() to return values between -180 and 180
* Added minor optimisation to gen_vlen to make it suitable for 2D vectors
11/2/08
* Added cbma_alloced() function to CBMA code to return number of allocated blocks
10/2/08
* Added timestamp extraction code to futil_ginfo()
31/1/08
* Added fbll_removeheadn(), fbll_removetailn() functions
18/12/07
* Updated OSSpr_SaveFile to return 0/1 on success/failure
16/6/07
* Fixed genll_move2d to divide deltas by two instead of four
* Added vecint type, but no code yet
3/6/07
* Fixed LIMPX_USERMSG_HELP_NOTIFY to be LIMPX_USERMSG_HELP_REPLY, and added LIMPX_USERMSG_HELP_ENABLE
* Fixed stok code to not use magic numbers for string buffer size
6/5/07
* Added key code values for left/right Windows key and menu key to keyboard.h
3/2/07
* Added sasm_s.s to allow sasm to detect processor capabilities based around the CPU ID instead of OS version
17/9/06
* Added sasm_capabilities variable and sasm_getcapabilities() function to sasm.c
* Added LDR/STR H/SH/SB support to sasm.c
20/8/06
* Fixed pointer math in screen_readmode so that it works properly with addresses >2GB (i.e. for Iyonix)
14/7/06
* Fixed gen_move2d to use the correct value for the target X pos
6/12/05
* Added extra functions to osspr.c to allow manipulation of sprites by sprite pointer.
5/12/05
* Upgraded stok.c to allow parsing of hex numbers
25/11/05
* Added hash map ADT
24/11/05
* Added sorted map ADT
1/5/05
* Fixed a bug in gdll_sort and made fbll_sort saner to use
26/3/05
* Added gdll_array 
24/3/05
* Added gdll_findhead, gdll_findtail
23/3/05
* Added return codes to pqueue_add and pqueue_remove
4/3/05
* Added fbll_sort and gdll_sort
27/2/05
* Fixed a bug in f4816_ToInt, discovered by Alan Buckley
13/9/04
* Added HS and LO condition codes to sasm (Which are just pseuodonyms for CS and CC)
12/9/04
* Fixed an overflow condition in spandraw.c's _toplane that was causing large polygons to be given bad Z gradients (e.g. missing polygons on planets in Dark Matter)
* Improved the accuracy of spandraw.c's _toplane
* Changed span_addpoly to use _toplane for backfacing checks, should now be quicker at detecting back to front polys and faster in general
* Tweaked spandraw.c's sel_insert and ser_insert to be a bit faster
10/9/04
* Added col argument to span_init
* Added LimpX_RedrawIcon
6/9/04
* Fixed a bug in fp_math.s where the sin and cos functions would give wildly inaccurate results for a specific 1 degree interval
* Rewrote cbma in assembler to try and speed up cbma_alloc (Currently taking 28% of the time spent in span_add). Got a 5% speed increase.
* Quadroupled SPANCHUNK_SIZE to try and reduce time spent allocating spans. Got a further 34% speed increase. Only seems to have caused a 1% speed increase in span_add though (But spheretest may be showing a 6% increase)
5/9/04
* Updated DTime module to use HALTimer, to provide millisecond accuracy
* Added span_saveset
* Tweaked span_add and span_addpoly a bit so that the bottom row and right column of pixels will now be drawn to, and without any error messages
* Updated ed, sss, spantest3, and spheretest to work with the new code
4/9/04
* Updated keyboard.h to include the lowest code for keys which return multiple codes
* Added screen_enumeratemodes
2/9/04
* Added parameter to jprof2_nextfunc to select whether all functions or only profilable ones should be returned
* Added jprof2_funcname, since _kernel_procname doesn't appear to work
* Added futil_readstring
31/8/04
* Fixed a bug in screen_readmode where the terminating -1 in mode specifier blocks wasn't being copied
* Changed the settings for KEY_BSLASH, KEY_FSLASH, and KEY_EXTRA (now KEY_HASH) in keyboard.h. These settings should now be correct for Risc PC's (but probably wrong for older machines)
* added jprof2_ticspersec value
30/8/04
* Added a macro to bindings.s to allow function names to be placed before a function, along with an optional MOV R12,R13 (to signal jprof2 that the function can be profiled)
* Added said macro to armscreen.s and fp_math.s
* Fixed f4816_sin and f4816_cos
* Disabled lots of old/unfinished/debugging code in fixmath.s
* Added LimpX
* Added screen_readmode
28/8/04
* Added error checking to timer code
* Added return code to span_addline
27/8/04
* Fixed jprof2 so it works with functions with arguments stored on the stack
* Added error.c/error.h
* Added error.c warning/error messages to jprof2, sasm, span, spandraw
26/8/04
* Added ADR to sasm
* Finished jprof2 & improved it so that running functions can have profiling stopped
* Added disassembler to sasm
25/8/04
* nvar remove function
* jprof2 added
* wrote sasm
24/8/04
* updated stok.c to set STOK_QUOTED if a quoted string was read
* gdll: addnext and addprev to allow mid-list insertion
19/8/04
* amdl.c should close log file on amdl_off()
* amdl.c should set current column to 0 on amdl_flush()
* float_div complains on division by zero
* tmatstack: Make dup return 0 if stack full
* fbll_findhead, fbll_findtail: Traverse tree instead of using peek functions
* futil: error checking
