V5.07.08RC1

Compared to V5.07.07, 08 has the following detail changes:

New functionality
WEB TCP SEND cb%, data%()
WEB TCP CLOSE cb%
OPTION UDP SERVER PORT n
WEB UDP INTERRUPT intname
WEB UDP SEND addr$, port, data$
OPTION WIFI SSID$, PASSWD$, [NAME$] [,IPADDRESS$, MASK$, GATEWAY$]
INSTR([start],text$, search$ [,size])
LIINSTR(text%(),search$ [,start] [,size]
PIO DMA TX now accepts 0 for the number of conversions when using a ringbuffer for continuous output
PIO DMA RX now accepts 0 for the number of conversions when using a ringbuffer for continuous input
ADC RUN array1%(),array2%()
OPTION MODBUFF ENABLE/DISABLE [sizeinK]
PLAY MODFILE fname$
PLAY MODSAMPLE sampleno, channelno [,volume]
WATCHDOG HW OFF
WATCHDOG HW nmSec
BITBANG WS2812 W, pin, nbr, value%[()]
OPTION WEB MESSAGES ON/OFF
Implements interlock to stop other ADC use while ADC DMA is running.
BLIT WRITE [#]b, x, y [,mode]
MM.INFO(ADC DMA)
MATH WINDOW in(),min, max, out(),[minfound, maxfound]
/* and */ commands for multiline comments
BLIT MEMORY address%, x, y[,col]
BLIT COMPRESSED address%, x, y[,col]
BLIT FRAMEBUFFER F/L/N, F/L/N, xfrom, yfrom, xto, yto, width, height [,col]
EDIT fname$

Bug Fixes
MM.INFO(OPTION ANGLE) returns an incorrect value. Fixed in V5.07.08b5
FORMAT$ function may not yield expected results (WebMite only). Waiting for SDK change
Minor bugs in CALL and MM.CMDLINE$. Fixed in V5.07.08b5
LOAD SPRITE requires exact spacing of the width,number,height fields. Fixed in V5.07.08b5.
Changing volume when PLAY TONE is playing the same on both channels causes one channel to disappear. Fixed in V5.07.08b5.
A TCP request while in the editor causes the WebMite to crash. Fixed in V5.07.08b5.
Memory leak in WEB MQTT PUBLISH. Fixed in V5.07.08b5.
EXECUTE command does not work at the command prompt. Fixed in V5.07.08b5.
CLS after NEW when a framebuffer is active can crash system. Fixed in V5.07.08b5.
Using EXECUTE in a program that has been AUTORUN crashes the system. Fixed in V5.07.08b5.
Bug in FRAMEBUFFER COPY to N. Fixed in V5.07.08b7
Bug in FRAMEBUFFER CLOSE. Fixed in V5.07.08b7
Race condition when PLAY TONE is used with defined time and a new tone is issued during the termination. Fixed in V5.07.08b8
Fixes various bugs in ADC use after ADC DMA conversions.
Fixes bug in PIN(TEMP) after another ADC channel is used.
Fixes bug in PIO assemble
Fixes bugs in BLIT WRITE when target overlaps the screen
Fixes bug in web transmit page when the size of included variables exceeds the size of the html file by a margin

=========================================

V5.07.08RC3

This has a major tidy up of the code to eliminate all compiler warnings

A change to WEB TRANSMIT PAGE made in b12 has been backed out. I don't know if this created some instability but thus far RC3 runs Geoff's watering controller for me without any obvious problems so far

This version includes support for a Brazilian keyboard layout OPTION KEYBOARD BR

===========================================

V5.07.08RC4

Quite a lot of new stuff to keep you amused. Next I'll focus on trying to get to the bottom of the Webmite instability issues

Fixes bugs in using a backlight pin with SSD1963 displays

New functionality:

Support for 8-bit parallel ILI9341 display
OPTION LCDPANEL ILI9341_8,orientation% [,backlightpin]

NB: unlike SPI displays, parallel display performance scales with CPU speed. The drivers are tuned to work up to and including at 378MHz.
The pins for the ILI9481_8 are exactly as per the SSD1963 in the manual

MM.INFO(FLASH ADDRESS n) - returns the address of the flash slot n

LIBRARY DISK SAVE fname$ - saves the contents of the library to disk

LIBRARY DISK LOAD fname$ - restores the contents of the library from disk

FLASH DISK LOAD n, fname$ [,O[VERWRITE]] - copies a file into flash slot n as a binary transfer. If overwrite is specified then overwrites the existing contents of the flash slot without an error being raised. Can be used in a program.

NB: Together, these commands allow you to prepare data as CSUB, copy it to the library and then either restore the library in preparation for running a specific program (command line only), or load the library as binary data into any flash slot directly in a program. The new MM.INFO function allows you to know the location of each flash slot in memory.

FRAMEBUFFER COPY from, to [,B] - if B is specified the copy is done using the second CPU and the command returns immediately to the Basic program (PicoMite only)

===============================================

V5.07.08RC5

Fixes bug introduced in reading the VGA screen when the framebuffer L is enabled
Fixes bug in the editor when a file is edited without an extension being specified (defaults to .bas)
Fixes bug in playing mono FLAC files (untested)

Changes LIBRARY DISK SAVE so only used memory is written to disk
Changes LIBRARY DISK LOAD so files smaller than the full library can be loaded
Together these changes allow libraries to be stored on, for example, a PicoMite, to be used on a PicoMiteVGA

PLAY MODFILE fname$ [, intsub]
If the optional interrupt parameter is set it will be called when the modfile has played through a single loop and playback will be terminated.
If not set the modfile will play on a loop as before. Because of the way mod files work the end of playback may not be perfect with a few additional notes from the next loop played.

OPTION PICO OFF/ON (default ON, permanent option, N/A WebMite)
If set to OFF GP23, GP24, and GP29 are not initialised allowing them to be used freely on non-Pico boards. GP25 remains under the control of OPTION HEARTBEAT ON/OFF

BLIT MEMORY address%, x, y[,col]
If the word at address% has the top bit set the sprite will be treated as compressed as though BLIT COMPRESSED was used

WebMite
WEB TLS functionality is removed. The maximum program size is increased to 96Kb (from 80Kb) WARNING: installing this version on the WebMite will delete the A: drive and all options

==================================================

V5.07.08RC6

Just a couple of small tweaks

Compiler update to V12.3.1

OPTION AUTORUN n/ON [,NORESET]  - if NORESET is set then the autorun option will not be removed in the event of system errors. Use with care on fully debugged programs as you may need to nuke the Pico to fix a repeated error

Maximum filename size for TFTP increased to 63 characters

Fixes bug (PicoMite, WebMite) in running a program when a framebuffer is left open

==================================================

V5.07.08RC7

This minor update has a number of optimisations of FRAMEBUFFER BLIT for the PicoMite and WebMite
If you are using it to move data from a framebuffer to the display AND the x-coordinate of the data in the framebuffer is even you will see a big reduction in the time taken. The reduction will be even greater if you blit a number of complete lines

So (ILI9341 SPI):
VERY FAST 0.8uSec/pixel
timer=0:framebuffer blit f,n,0,100,0,120,MM.HRES,100:?timer

FAST 1.1uSec/pixel
timer=0:framebuffer blit f,n,100,100,121,120,100,100:?timer

BEFORE 2.4uSec/pixel

UPDATE

Now all BLITs from framebuffer (or layer) to a screen are optimized. Download updated 7:00 UTC 13/10/23


Also, I must be feeling very co-operative today - DONE

  Quote  
Perhaps I can point you at my changes to make error reporting on the LCD more friendly and obviate the need for my Game*Mite specific firmware:

https://github.com/thwill1000/picomite-firmware/blob/gamemite/PicoMite/Commands.c
  void cmd_error() returned to an earlier, simpler form.

https://github.com/thwill1000/picomite-firmware/blob/gamemite/PicoMite/MMBasic.c
  void error(char* msg, ...) refactored to call ...

https://github.com/thwill1000/picomite-firmware/blob/gamemite/PicoMite/gamemite.c
  void gamemite_error(int line_num, const char *line_txt, const char* error_msg) format and write error to LCD.

================================================

V5.07.08RC8

This version adds new drawing functionality for the PicoMite and WebMite

BLIT MEMORY and BLIT COMPRESSED can now BLIT to the LCD direct however in this case a transparent colour can not be specified.

FRAMEBUFFER MERGE tries to emulate a bit of how the layer buffer works in the VGA version. It copies any non-black pixels in the layer buffer to the screen

In addition I've rationalized the way tokens are assigned to commands so library files should now be completely interchangeable between versions

e.g.
FRAMEBUFFER layer
FRAMEBUFFER write l
For i=5 To MM.HRes-5 Step 10
Line i,0,i,MM.VRes-1
Next i
For i=5 To MM.VRes-5 Step 10
Line 0,i,MM.HRes-1,i
Next i
FRAMEBUFFER write n
CLS RGB(red)
FRAMEBUFFER merge

============================================

V5.07.08RC9

I was doing the manual and trying to think how to document the differences between BLIT MEMORY and BLIT COMPRESSED on the VGA version vs the LCD versions and decided it was easier to equalise the firmware so...


BLIT COMPRESSED address, x, y [,col]
and
BLIT MEMORY address, x, y [,col]

Now work on all framebuffers and physical displays including transparent colours on the TFTs.

As on the VGA version "col" is a number between -1 and 15. -1 indicates there is no transparent colour and is the default. 0 to 15 correspond to the 16 RGB121 colours supported by framebuffers and the VGA display

===========================================

V5.07.08RC10

WebMite
No significant changes

PicoMiteVGA

FRAMEBUFFER LAYER [colour]
You can now select the colour that will be transparent when a layer is created
Colours are specified as a number between 0 and 15 representing:

0:BLACK,1:BLUE,2:MYRTLE,3:COBALT,4:MIDGREEN,5:CERULEAN,6:GREEN,7:CYAN,
8:RED,9:MAGENTA,10:RUST,11:FUCHSIA,12:BROWN,13:LILAC,14:YELLOW,15:WHITE

When FRAMEBUFFER WRITE L is active in Mode 2, CLS without any parameters will clear the screen to the transparent colour

PicoMite

Installing this will delete everything on the PicoMite

Heap memory and maximum program size now 132Kb

New commands:

FRAMEBUFFER MERGE [colour] [,mode] [,updaterate]

FRAMEBUFFER SYNC


Preconditions for new command
FRAMEBUFFER and LAYERBUFFER are created i.e.

FRAMEBUFFER CREATE
FRAMEBUFFER LAYER


FRAMEBUFFER MERGE - writes the contents of the framebuffer to the physical display overwriting any pixels in the framebuffer that are set in the layerbuffer (not zero)

FRAMEBUFER MERGE col - writes the contents of the framebuffer to the physical display overwriting any pixels in the framebuffer that are in the layerbuffer not set to the transparent colour  "col"

FRAMEBUFFER MERGE col,B - as above except that the transfer to the physical display takes place on the second processor and control returns to Basic immediately

FRAMEBUFFER MERGE col,R [,updaterate] - sets the second processor to continuously update the physical display with the merger of the two buffers. Automatically sets FRAMEBUFFER WRITE F if not F or L already set. By default the screen will update as fast as possible (At 133MHz an ILI9341 in SPI mode updates about 13 times a second, in 8-bit parallel mode the ILI9341 achieves 27 FPS)
If "updaterate" is set then the screen will update to the rate specified in milliseconds (unless that is less than the fastest achievable on the display)
NB: FRAMEBUFFER WRITE cannot be set to N while continuous merged update is active.

FRAMEBUFFER MERGE col,A - aborts the continuous updates

In addition deleting either the layerbuf or framebuffer, ctrl-C, or END will abort the automatic update as well.

When using an automatic update on an SPI screen any attempt to use touch functionality will cause an error, also SDcard access will error unless a different set of pins are used for the SDcard SPI connection. Mod file playback is compatible with automatic update as long as the mod file is loaded before the MERGE command is issued

FRAMEBUFFER SYNC
Waits for the latest update to complete to allow drawing without tearing

----

BLIT FRAMEBUFFER from, to, xin, yin, xout, yout, width, height [,colour]


Now works for all displays and framebuffers on the PicoMite and WebMite including transparent pixels when "colour" is specified (0-15). This allows copying any rectangular area from one framebuffer to another or to and from the physical display

from and to can be any combination of N,F, and L but not the same

FRAMEBUFFER BLIT is now deprecated and will be removed from the final release.
Use instead BLIT FRAMEBUFFER which is more powerful (transparent pixel capable) and better implemented (faster)

=======================================

V5.07.08RC11

Re-engineered background SPI LCD updates to co-exist better with touch and mod file playback. It is not possible to also do this for SDcard access so all card usage should be completed before using background updates or they should be stopped before resuming card access.

FRAMEBUFFER BLIT removed - see above

New optional parameter for SPRITE LOAD on the VGA version

SPRITE LOAD #n, fname$ [,mode]

mode defaults to zero in which case the CMM1/CMM2 colour codes are used
BLACK,BLUE,GREEN,CYAN,RED,MAGENTA,YELLOW,WHITE,MYRTLE,COBALT,MIDGREEN,CERULEAN,RUST,FUCHSIA,BROWN,LILAC;

If mode is specified as 1 then the RGB121 colour codes are used:
       BLACK,BLUE,MYRTLE,COBALT,MIDGREEN,CERULEAN,GREEN,CYAN,RED,MAGENTA,RUST,FUCHSIA,BROWN,LILAC,YELLOW,WHITE

New optional parameter for OPTION LCDPANEL for 8-bit parallel displays

OPTION LCDPANEL 8bitdisplaycode, orientation [, backlightpin] [,DCpin]
If DCpin is omitted then the pin allocation is as per the manual. If DCpin is specified then the pins DC, WR, RD, and RESET will be allocated sequentially from DCpin

General tidying up and very minor performance tweak for graphics framebuffer and VGA useage

========================================

V5.07.08RC12

You can now use a variable in FRAMEBUFFER WRITE N/F/L/fr$
This should make it easier to write code that is easily transportable between PicoMite and PicoMiteVGA

Fixes issue with background framebuffer copy (I hope)

Trying to use \&00 or \000 as an escape sequence now gives an error and prompts re-coding as CHR$(0)

==========================================

V5.07.08RC14

All versions

PEEK(CFUNADDR ...) now optionally takes a variable or string literal as the argument
Various small bug fixes/improved data validation

PICOMITE and WEBMITE

New Command supporting the OV7670 camera module
Wire 3.3V to 3.3V on the Pico
Wire GND and PWDN to GND on the Pico
Enable OPTION SYSTEM I2C on the Pico and wire SCL and SDA to the relevant pins (may be labelled SIOC and SIOD on the camera module). These connections must have a pullup to 3.3V - 2K7 recommended)
Other pins are wired as per the OPEN command. (NB: VS may be labelled VSYNC, HS may be labelled HREF, PLK may be labelled PCLK, RET may be labelled RESET and XLK may be XCLK on your module)
D0pin defines the start of a range of 8 contiguous pins (e.g.GP0 - GP7).

Basic commands

BITBANG CAMERA OPEN XLKpin, PLKpin, HSpin, VSCpin, RETpin, D0pin


This command initialises the camera, It outputs a 12MHz clock on XLK (PWM) and checks that it is correctly receiving signals on PLK, VS, and HS. The camera is set to a resolution of 160x120 (QQVGA) which is the maximum achievable within the limits of the RP2040 memory. However the image quality is remarkably usable.





BITBANG CAMERA CAPTURE [scale, [x , y]]


This captures a picture from the camera (RGB565) and displays it on an LCD screen. An SPI LCD must be connected and enabled in order for the command to work. (ILI9341 and ST7789_320 recommended).
Scale defaults to 1 and x,y each to 0
By default a 160x120 image is output on the LCD with the top left at 0,0 on the LCD. Setting scale to 2 will fill a 320x240 display with the image. Setting the x and y parameters will offset the top left of the image on the LCD.
Update rate in a continuous loop is 7FPS onto the display at 1:1 scale and 5FPS scaled to 320x240.
Of course, assuming the display has MISO wired it is then possible to save the image to disk using the SAVE IMAGE command as used to create the example image above.

BITBANG CAMERA CLOSE

Close the camera subsystem and frees up all the pins allocated in the OPEN command


Motion detection

The camera firmware is also able to detect motion in the camera's field of view using the command.

BITBANG CAMERA CHANGE image%(),change! [,scale [,x ,y]]


It does this by operating the camera in YUV mode rather than RGB. This has the advantage that the intensity information and colour information are separated and just one byte is needed for a 256-level greyscale image which is ideal fer detecting movement.
image% is an array of size 160x120 bytes (DIM image%(160,120/8-1)
On calling the command it holds a packed 8-bit greyscale image.
The change! variable returns the percentage the image has changed from the previous time the command was called.
Optionally if "scale" is set then the image delta is output to the screen i.e. the difference between the previous image and this one. As in the CAPTURE command the delta image can be scaled and positioned as required. If the scale parameter is omitted then the LCD is not updated by this command.
The new command makes it trivially easy to check for and log activity in the camera's field of view. The example code below detects movement in the field of view and logs the image to disk

Other camera commands

BITBANG CAMERA TEST tnum


The command enables or disables a test signal from the camera. tnum=2 generates colourbars and tnum=0 sets back to the visual input. tnum = 1 and tnum = 3 do something but what?

BITBANG CAMERA REGISTER reg%, data%


Sets the register "reg%" in the camera to the value "data%". When used the command will report to the console the previous value and automatically confirms that the new value has been set as requested. The colour rendition of the camera as initialised is reasonable but could probably be improved further by tuning the various camera registers.

============================================

V5.07.08RC15

Full support for VS1053 sound.

This version has full support for the VS1053 sound chip as a (much better) alternative to the PWM sound or the MCP4822 DAC (no filters needed just an SPI connection to the PicoMite). It is available on all versions and the chip packaged onto a module is cheap and widely available.

To enable the VS1053 use

OPTION AUDIO VS1053 SPICLKpin, SPIMOSIpin, SPIMISOpin, CSpin, DCSpin, DREQpin, RESETpin


Note that like the MCP4822 the VS1053 uses a separate SPI port from that specified by OPTION SYSTEM SPI. A dedicated SPI channel is essential to allow it to be used in a H/W interrupt routine.

What is the VS1053 and why is it so good?

The VS1053 can decode a wide variety of audio formats such as MP3, AAC, Ogg Vorbis, WMA, MIDI, FLAC, WAV (PCM and ADPCM). There's also a special MIDI mode that you can boot the chip into that will read execute realtime MIDI data. It has a high-quality on-chip stereo DAC with no phase error between channels and stereo earphone driver capable of driving a 30 Ω load direct.

I've integrated the VS1053 so that nearly all existing audio commands will work through it: FLAC playback, WAV file playback, MOD file playback but in addition it can also provide superb MP3 audio, playback MIDI files and also provide a real-time MIDI interface. In the case of FLAC, MP3, MIDI, and WAV files, all files in a directory can be played with a single command and PLAY NEXT and PLAY PREVIOUS can step forwards and backwards through the playlist.
Finally I've implemented a MP3 STREAM capability allowing the WebMite to provide internet radio  capability with half a dozen simple commands.

So once the VS1053 is enabled with the permanent option command you can do the following:

PLAY FLAC fname$ [,interrupt] or PLAY FLAC dirname$
PLAY MP3 fname$ [,interrupt] or PLAY MP3 dirname$
PLAY WAV fname$ [,interrupt] or PLAY WAV dirname$
PLAY MIDIFILE fname$ [,interrupt]  or PLAY MIDIFILE dirname$
PLAY MODFILE fname$ [,interrupt]

To enter realtime MIDI mode use:
PLAY MIDI

then you can use
PLAY NOTE ON channel, note, velocity
PLAY NOTE OFF channel, note [,velocity]
PLAY MIDI TEST n (n=0 to 3, 0 = normal realtime, the others play note and instrument samples)
PLAY MIDI CMD cmd%, data1% [,data2%] (used for setting instruments to channels etc.)

Finally, you can use:
PLAY STREAM buffer%(), readpointer%, writepointer%
This plays anything in the circular buffer and will continuously output if the write pointer is updated. This is specifically designed for use with the Webmite but could also be used to output any WAV pattern from MMBasic by first writing into the buffer a 44-byte WAV header.

See this thread and this one for more information and history of the development.

The new commands for the WebMite supporting streamed TCP data are:

WEB OPEN TCP STREAM address$, PORTno

and

WEB TCP CLIENT STREAM command$, buffer%(), readpointer%, writepointer%

The command will be something like
  Quote  
GET /ClassicFMMP3 HTTP/1.1
Host: ice-the.musicradio.com
Connection: close


as in the example to listen to the UK program CLASSIC-FM

I think the VS1053 support has significantly increased the number of possible applications for the PicoMite (even MP3 support is a big advantage). There is more I could do in supporting AAC and/or OG and I haven't currently implement PLAY TONE or PLAY SOUND as they are somewhat difficult and largely superseded by the realtime MIDI capability

========================================

V5.07.08RC16

Sorry one more change but the last for a while

This will delete all options and any contents of the A: drive

By request this has new maths functions


MATH C_ADD array1%(), array2%(), arrary3%()
MATH C_SUB array1%(), array2%(), arrary3%()
MATH C_MUL array1%(), array2%(), arrary3%()
MATH C_DIV array1%(), array2%(), arrary3%()
MATH C_ADD array1!(), array2!(), arrary3!()
MATH C_SUB array1!(), array2!(), arrary3!()
MATH C_MUL array1!(), array2!(), arrary3!()
MATH C_DIV array1!(), array2!(), arrary3!()


These do cell by cell operations (hence C_) on identically sized arrays. There are no restrictions on the number of dimensions and no restrictions on using the same array twice or even three times in the parameters. The datatype must be the same for all the arrays

so

MATH C_MULT a%(),a%(),a%()

will square all the values in the array a%()

=============================================

V5.07.08RC17

I lied about no more changes - sorry.

This will delete all options and any contents of the A: drive


Flash slots reduced to 3 and changes to optimization to increase the size of the A: drive. No functional changes but please report anything odd.
 
============================================

V5.07.08RC18

Prompted by amigawizard I've added some ultra-fast plotting capability

New command

LINE PLOT ydata() [,nbr] [,xstart] [,xinc] [,ystart] [,yinc] [,colour]


ydata is an array of floats or integers to be plotted
nbr is the nbr of line segments to be plotted - defaults to the lesser of the array size and MM.HRES-2 if omitted
xstart is the x-coordinate to start plotting - defaults to 0
xinc is the increment along the x-axis to plot each coordinate - defaults to 1
ystart is the location in ydata to start the plot - defaults to the array start
yinc is the increment in ydata to add for each point to be plotted
colour is the colour to draw the line


This give a huge performance increase over plotting discrete line segments. For example plotting 319 line segments on the VGA version takes around 1mSec @ 252MHz

In addition I've added extra capability to the ADC START command to optionally scale the reading as required

ADC START CHAN1arr!() [,Chan2arr!()] [,Chan3arr!()] [,Chan4arr!()] [,C1min] [,C1max] [,C2min] [,C2max] [,C3min] [,C3max] [,C4min] [,C4max]


By default the min and max values are set to 0 and VCC to give voltage readings. But if the data is for display then you can use other values so:

C1min=200 and C1max=100 will create values ranging from 200 to 100 for equivalent voltages of 0 - 3.3. This allows you to scale the reading for display without further manipulation or to recover the original ADC readings (C1min=0.0, C1max=4095.0)

=============================================

I'm on a roll today. If you re-download RC18 then it now has a new MATH function

MATH(CROSSING array() [,level] [,direction]


level defaults to 0
direction defaults to 1 (valid -1 or 1)

This returns the array index at which the values in the array pass the "level" in the direction specified. This makes plotting ADC data for an oscilloscope application even easier than before

=============================================

V5.07.08RC19

Implements

BLIT MERGE colour, x, y, w, h

This works like FRAMEBUFFER MERGE but just overwrites the bit of the physical screen defined by x,y,w,h with the merged combination of that area from F and L

WEB TRANSMIT PAGE cb%, filename$ [,buffersize]

By default the command allocates a buffer the size of the file + 4096 bytes to build the page to transmit. However, if the page is complex and includes many MMBasic variables that yield text bigger than the variable name it is possible that the buffer will not be big enough. In this case the user can specify the extra space required (defaults to 4096 as before if not specified)

FRAMEBUFFER WAIT now implemented for ILI9341, ST7789_320 and ILI9488 displays

note however that the

BLIT MERGE and FRAMEBUFFER MERGE commands both now incorporate this functionality automatically. Assuming these are run on the second processor then tearing effects should be reduced or eliminated

============================================

V5.07.08RC20

Changes

Fixes bugs in LOAD JPG

New Commands

MEMORY PRINT [#]fnbr , nbr, address%/array()
MEMORY INPUT [#]fnbr , nbr, address%/array()

These commands save or read data from or to memory from or to an open disk file

e.g.

dim a%(5)=(1,2,3,4,5,6)
open "test.txt" for output as #1
memory print #1,48,a%()
close #1
dim b%(6)
open "test.txt" for input as #1
memory input #1,48,b%()
close #1
? b%(3)
4



MATH SHIFT inarray%(), nbr, outarray%()

This command does a bit shift on all elements of inarray%() and places the result in outarray%() (may be the same as inarray%()). nbr can be between -63 and 63. Positive numbers are a left shift (multiply by power of 2). Negative number are a right shift.


WebMite only

WEB SCAN can now be used without a connection
WEB CONNECT has new optional parameters

WEB CONNECT [SSID$, PASSWD$, [NAME$] [,IPADDRESS$, MASK$, GATEWAY$]]

This command, with no optional parameters,  will connect to the default network if possible (as previously set with OPTION WIFI) or with the new parameters will connect to the network specified and also set up the OPTIONS for future use.

Together WEB SCAN and WEB CONNECT allow the user to connect to their a new network without previously setting using OPTION WIFI

WEB CONNECT does not disconnect from a previously connected network so should only be used where nothing has been previously set up or where a previously configured network is not active or a previously configured network has previously failed to connect on boot (no parameters)

======================================

V5.07.08RC21

Fixes a bug in XMODEM S on the VGA version (NB: will erase all options and the A: drive on the VGA version)

New commands

DEVICE WII OPEN [interrupt]
DEVICE WII CLOSE

NB: the DEVICE command replaces the BITBANG command. You can still use BITBANG but it will be converted to DEVICE in the program listing and editor

The Wii Classic must be wired to the pins specified by OPTION SYSTEM I2C which is a prerequisite. Open attempts to talk to the Wii Classic and will return an error if not found. If found the firmware will sample the Wii data in the background at a rate of 50Hz. If an optional user interrupt is specified this will be triggered if any of the buttons changes (both on and off)

New FUNCTION

DEVICE(WII funct)

Returns data from a Wii Classic controller.
'funct' is a 1 or 2 letter code indicating the information to return as follows:
LX returns the position of the analog left joystick x axis
LY returns the position of the analog left joystick y axis
RX returns the position of the analog right joystick x axis
RY returns the position of the analog right joystick y axis
L returns the position of the analog left button
R returns the position of the analog right button
B returns a bitmap of the state of all the buttons. A bit will be set to 1 if the
button is pressed.
T returns the ID code of the controller - should be hex &H4200101
The button bitmap is as follows:
BIT 0: Button R
BIT 1: Button start
BIT 2: Button home
BIT 3: Button select
BIT 4: Button L
BIT 5: Button down cursor
BIT 6: Button right cursor
BIT 7: Button up cursor
BIT 8: Button left cursor
BIT 9: Button ZR
BIT 10: Button x
BIT 11: Button a
BIT 12: Button y
BIT 13: Button b
BIT 14: Button ZL

=====================================

Phew!

