=================================================================================
PicoMite V5.07.03 Changes from V5.07.01
V5.07.03RC7
New command FLUSH [#]filenumber
This causes any outstanding writes to a file to be written to disk or waits for serial output to be complete
Fixed error handling for too many labels and/or functions and subroutines (max 224)
Improved USB console receive
V5.07.03RC6
Fixes bug in GUI BITMAP when using monochrome displays
Fixes bug in handling of mouse escape sequences in the editor introduced in 5.07.03b1
V5.07.04RC5
More performance tuning
V5.07.04RC4
More performance tuning
Fixed bug in FLASH SAVE introduced in 5.07.03b1
V5.07.03RC3
Added FORMAT$() function as per CMM2
Minor change to DIR$() function to allow use with a single parameter in which case the type defaults to FILE
Changes to FILE command to deal with relative paths from a sub-directory
V5.07.03RC2
Fixes bug in loading F6-F9 user function definitions
V5.07.03RC1
Tidied up system response when OPTION LCDPANEL has an error
Improved files command
FILES [fspec$] [, sort]
Lists files in the current directory on the SD card.
'fspec$' (if specified) can contain search wildcards.  Question marks (?) will match any character and an asterisk (*) will match any number of characters.  If omitted, all files will be listed.  
For example:
*	Find all entries
*.TXT	Find all entries with an extension of TXT
E*.*	Find all entries starting with E
X?X.*	Find all three letter file names starting and ending with X
‘sort’ specifies the sort order as follows:
size	by ascending size 
time 	by descending time/date
name	by file name (default if not specified)
type	by file extension

V5.07.03b3
Structural change so there is now a single codeset for PicoMite and PicoMite VGA Edition with a single DEFINE selecting the relevant code where required
When first loaded this version will force a complete flash wipe removing all options, saved variables, and any prorams stored in flash
Fixes bug in BACKLIGHT 0
Reading from the framebuffer now available and bug fixed on ILI9341, ST7789_320 and ILI9488 (only if MISO pin connected in which case touch and SDcard will not work)
This enables the following on these displays:
PIXEL(x,y) function
SAVE IMAGE command
Transparent text
BLIT
OPTION LCDPANEL CONSOLE [font] [,foregroundcolour] [backgroundcolour] [backlight]
OPTION LCDPANEL NOCONSOLE
NB: as these displays are SPI connected some things work very slowly. 
Edit is usable
AUTOSAVE, LIST and PRINT are very slow if the text forces the screen to scroll
PRINT @(x, y [,mode])

NB: for VGA Edition OPTION SYSTEM SPI is not implemented. To enable an SDcard use:
OPTION SDCARD CSpin, CLKpin, MOSIpin, MISOpin. This allows complete flexibility over the pins chosen which do not need to be valid SPI pins
This syntax is also useful for the ILI9488 display when MISO is connected to allow SDcard use with this display by connecting the SDcard to different pins from the display
 
V5.07.03b1
New font added FONT 8 is a very small 6x4 font useful for 320x240 screens when high text density is needed
Bugs introduced in the major update fixed in VAR command, DEFINE FONT, and OPTION DISPLAY

V5.07.03b0
YOU MUST LOAD clear_flash BEFORE LOADING THIS VERSION
Program now runs from flash memory freeing up much more memory, following tuning there is no significant impact on performance
Maximum program size now 124Kbytes, Flash slots reduced from 10 to 7.
FLASH RUN and FLASH CHAIN now execute direct from the specified flash slot without changing the main program
OPTION MEMORY removed as no longer relevant
OPTION BAUDRATE n now sets the baudrate for when a serial console is used
Fixes bug in using SYSTEM I2C or I2C2 for general I2C use if I2C READ does not use a string as the variable. 
Fixes bug in COM1 where buffer overrun is losing characters.
Support for a PS2 Keyboard added
OPTION KEYBOARD NO_KEYBOARD/US/FR/GR/IT/BE/UK/ES
use level conversion between the Pico pins and the PS2 socket or run the keyboard at 3.3V
Connect GP8 to PS2 socket CLOCK pin via level converter 
Connect GP9 to PS2 socket DATA pin via level converter
Connect VBUS to PS2 socket +5V
Connect GND to PS2 socket GND
NEW subcommands for SETTICK
SETTICK PAUSE, myint [,tickno] ' pauses the tick so that the interrupt is delayed but the current count is maintained
SETTICK RESUME, myint [,tickno] ' resumes the tick after a pause
FLASH LIST no [,all] ' lists in full the program held in the flash slot
Increases drive level for SDcard output pins (CD, MOSI and CLOCK) which MAY improve SDcard reliability when the SPI bus is loaded with additional devices (LCD and/or touch)
Reduces maximum file name length to 63 characters but increase maximum files that can be listed with FILES command to 1000
Fixed memory leak caused by ctrl-C out of FILES command 
V5.07.02b2
Fixes bug in day$(now) function
Fixes bug where writing text to an SPI LCD that overlapped the bottom of the screen would fail to de-assert LCD_CS
Fixes bug that added an extra space after a REM command each time the program was edited.
NEW subcommands for SETTICK
SETTICK PAUSE, myint [,tickno] ' pauses the tick so that the interrupt is delayed but the current count is maintained
SETTICK RESUME, myint [,tickno] ' resumes the tick after a pause
NEW subcommands for FLASH
FLASH LIST no [,all] ' lists in full the program held in the flash slot

V5.07.02b1

Fixes bug in ON KEY keyno,int
Increases drive level for SDcard output pins (CD, MOSI and CLOCK)
Reduces maximum file name length to 63 characters but increase maximum files that can be listed with FILES command to 1000

V5.07.02b0
Support for 240x240 round GC9A01 display

=================================================================================
PicoMite V5.07.01 Changes from V5.07.00

You should load CLear_Flash.uf2 before loading this firmware if upgrading from V5.07.00 or from a beta version of V5.07.01 before b5

Fixed Bug in epoch function which changed date$. 
Changed maximum WS2812 LEDs to 256
MM.INFO(pinno GPnn) implemented to give physical pin number for a given GP number


Improvement to terminal serial output used by command stacking
Implements a logarithmic scale for the volume control so that PLAY VOLUME 50,50 should sound half as loud as 100,100
Also applies to PLAY SOUND n, ch, type, freq [,vol]


Fixes bug in SETPIN pinno,IR
Fixes bug in parameters following subcommands/sub-functions that are enclosed in brackets e.g. POKE WORD (anything),anything or ? PEEK(WORD (anything))
Allows variables or string literals in the SOUND command for both the channel and sound type. The original syntax is still also allowed


Implements the option of using a standard uart as the console
OPTION SERIAL CONSOLE uartapin, uartbpin
uartapin and uartbpin can be any valid pair of rx and tx pins for either com1 (uart0) or com2( uart1). The order you specify them is not important
Use:
OPTION SERIAL CONSOLE DISABLE
to revert to normal the USB console


Re-compile and build under pico-sdk V1.3

Fixes bug in GPS receipt where the first read of GPS(DATE) may give an incorrect answer.
Fixes bug in reporting the line of an error when goto/gosub to a line number is used. 
Fixes bug where OPTION SERIAL CONSOLE DISABLE doesn't work after reboot

Implements LIST ALL fname$
Fixes bug in GUI SWITCH
Restores original program if AUTOSAVE is terminated with Ctrl-C or XMODEM R terminates with an error


Clears variable memory after Ctrl-C out of Autosave
Removes creation of spurious "Reset" USB device


Further rework of GUI SWITCH. 
Rename FileIO.c for Linux. 
AUTOSAVE "file" now reports a "Syntax Error" rather than "Unknown command". 
EDIT "file" reporting an error rather than just ignoring the argument.

OPTION AUDIO now forces reset to avoid user confusion