|
Forum Index : Microcontroller and PC projects : Colour Maximite 2 firmware V8.00.00 betas
| Page 1 of 2 |
|||||
| Author | Message | ||||
| matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 12322 |
https://github.com/UKTailwind/CMM2V1.5/releases/tag/v8.00.00b1 The first beta of version 8 of MMBasic for the Colour Maximite 2 is on GitHub. One firmware file runs on the Generation 1, the Generation 2 and the new Generation 3. About version 7 7.00.00RC6 is the last release of version 7. It is highly functional and well tested, and you can keep using it, but there will be no full 7.00.00 release. Version 8 is needed to support the new Generation 3 and WiFi, so from now on all the work goes into version 8. What is new in version 8 • WiFi and the Internet. Plug a WiFi module carrying a Raspberry Pi RM2 into the rear I/O connector, and the Colour Maximite 2 runs the WebMite's networking: a web server, web clients with TLS, UDP, MQTT, the time from the Internet, a Telnet console and TFTP file transfer. The WEB commands are the WebMite's, so WebMite programs run with only their pins changed. Geoff's Retic irrigation controller runs under OPTION PICOMITE with its pins changed. • The Generation 3. A Generation 2 with HDMI in place of VGA. Every mode shows at full colour levels, and the sound goes to the HDMI monitor as well as the audio socket. OPTION DVI ON is there for monitors that only take DVI. • Programs always run from RAM. The program is never written to the flash, so loading is quicker and editing and running programs no longer wear it. A program is kept over an option's restart. To run one at power up, save it as AUTORUN.BAS and use OPTION AUTORUN ON. • Your own commands and functions. You can now extend MMBasic itself: see the next section. • SQL. Ctrl-C in a long statement is now an error that ON ERROR catches, SQL(LONGSTRING reads text of any length, and an SQL INSERT of an array that fails part way no longer leaves its transaction open. • For PicoMite programs. WATCHDOG HW, MM.INFO(BOOT COUNT), OPTION COUNT (for the CMM2's own counting pins), MODE 19 as the PicoMite's 720 x 400, and 640 x 480 at 75Hz. Extend MMBasic with your own commands and functions Version 8 lets you add commands and functions of your own to the BASIC language. You write them in C, and a BASIC program calls them as if they were built in: USER LOAD "A:/mymod.mod" USER LED ON PRINT USER(TEMPERATURE 3) • They work like built-in commands. MMBasic hands your module the rest of the statement after USER, or the text inside USER( ), and the module reads its own keywords and arguments with the interpreter's own routines, just as MMBasic's commands do. Arguments can be numbers, strings, expressions, variables to change in place, or whole arrays. A function returns an integer, a float or a string. • They run as compiled C. You can move the parts of a program that are too slow in BASIC into C, and keep the rest of the program in BASIC. • Starting is easy. tools/sdk/examples/user/proforma.c is a complete working module with four commands and four functions, a few lines each: USER HELLO, USER SWAP a, b, USER FILL a(), value, USER TOTAL a(), t, USER(ADD a, b), USER(REVERSE$ s$), USER(FIXED$ x, n) and USER(CALLS). Copy it, rename it, and replace its commands with your own. • Building is one line on a PC with Python 3 and the Arm GCC toolchain (arm-none-eabi-gcc 13.3), the same tools the loadable programs use: python build.py out/mymod.mod mymod.c --user • Modules stay small. printf() and sprintf() in a module are the firmware's own, floats included, so the pro-forma is only 3KB. A module can have about 400KB of code and data. • No restart is needed. Copy a rebuilt module to the card and USER LOAD it again. RUN and NEW unload the module, and the next USER or USER( loads it again by itself. The same .mod file works on the Generation 1, 2 and 3, and it can be loaded while the SQL command's database engine is in use. The new chapter USER Modules in the Loadable Programs manual describes all of it, including every interpreter routine a module can call: https://github.com/UKTailwind/CMM2V1.5/releases/download/v8.00.00b1/Colour_Maximite_2_Loadable_Programs.pdf The build tools and the pro-forma module are in the repository: https://github.com/UKTailwind/CMM2V1.5/tree/v8.00.00b1/tools/sdk Before you update: please read • Save your program to the SD card first. Version 7 kept it in the flash, and version 8 uses that flash for its own code. • As always, save your options with OPTION DISK SAVE "A:/myoptions" before writing the firmware, and load them afterwards with OPTION DISK LOAD "A:/myoptions". A file saved by 7.00 loads into 8.00. • Load your library again from its source files with LIBRARY LOAD. Version 8 numbers some functions differently, so a library saved by 7.00 is discarded with a message, and a 7.00 .lib file is refused. • A program saved in a flash slot by 7.00 has to be loaded from its .bas file and saved with FLASH SAVE again. • To go back to 7.00, write RC6 with "Full chip erase" ticked, then load an options file saved by 7.00. In the release • The firmware, CMM2_MMBasic_8.00.00b1.bin. • CMM2_Programs_8.00.00b1.zip. These are the same programs as in RC6's zip, and they all run on version 8. • The User Manual, with a new chapter, WiFi and Internet Functions. The Loadable Programs manual, with a new chapter, USER Modules. The App User Guide, C Compiler, 386 PC Emulator and STEPPER references. • The full release notes, which list every change since RC6, including the structural ones. Known problems • The RM2 also has Bluetooth. It is not used yet, and is next on the list. • Not all of the WebMite's own example programs have been tried yet. • A Generation 3 can reset when its HDMI cable is unplugged. Switching the monitor off and on is fine, and the next board fixes it. This is a beta, so please report anything that goes wrong here. |
||||
| hhtg1968 Guru Joined: 25/05/2023 Location: GermanyPosts: 323 |
runs well so far. |
||||
| homa Guru Joined: 05/11/2021 Location: GermanyPosts: 790 |
https://thebackshed.com/forum/ViewTopic_mobile.php?FID=16&TID=19254#261877 @Peter: error message in the other post |
||||
| matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 12322 |
https://github.com/UKTailwind/CMM2V1.5/releases/tag/v8.00.00b2 The second beta of version 8 of MMBasic for the Colour Maximite 2 is on GitHub. One firmware file runs on the Generation 1, the Generation 2 and the Generation 3. Please report problems on this thread. 7.00.00RC6 remains the last release of version 7. The same firmware file runs on the Generation 1, the Generation 2 and the Generation 3. 8.00.00b2 brings: • Bluetooth. The WiFi module's chip is a Bluetooth radio too. Bluetooth keyboards, mice (and a keyboard's touchpad) and game controllers; the sound through a Bluetooth speaker or headphones; and a Bluetooth serial device as COM8. It is the PicoMite's Bluetooth, with its BLUETOOTH command, and the WiFi and Bluetooth can be used at the same time. • MicroPython runs every example program of the book *Programming the Pico Computer 3*, with the clock and its alarm, asyncio, native code, the I/O pins as on a Pico Computer 3 and, with the WiFi module, the network: sockets, HTTPS, MQTT. • Loadable programs can use the network, the clock's alarm and the LED (services versions 21 and 22). • zeptoforth 1.17.2.1, with fixes to code it writes as it runs (closures, CREATE and DOES>, DEFER) and to DEFER! on the Colour Maximite 2's memory; and zeptoforth_g1.app starts on a Generation 1 again. • Fixes: a program that left GUI controls behind could, at the next RUN, damage the WiFi's and Bluetooth's memory (since 8.00.00b1); WEB TCP CLIENT with a 64KB receive array; a memory fault that could give a program memory already in use; LGETSTR$ of 255 characters, which could spoil an open file (an SQL COMMIT failed with "disk I/O error"); and WEB CONNECT, which did not join the WiFi again once it was down. Before you update From 8.00.00b1: save the options first and load them again afterwards, as with every update. Writing the firmware erases them: OPTION DISK SAVE "A:/myoptions" Then write the firmware, and: OPTION DISK LOAD "A:/myoptions" A file saved under 8.00.00b1 loads into 8.00.00b2: OPTION RADIO is set from OPTION WIFI, so the WiFi carries on as before and Bluetooth stays off. The console runs at 115200 baud until the options are loaded. Save the program in memory to the SD card first: version 8 does not keep it over a reset. The flash library is kept and works as before, and .lib files and flash slots saved by 8.00.00b1 load, as no tokens have moved. From 7.00: read "Before you update" in 8.00.00b1's notes first (they are in Release_Notes_8.00.00b2_full.md): the program held in the flash is lost, and the library and flash slots must be saved again. Everything there applies to 8.00.00b2 too. Going back to 8.00.00b1: write it with "Full chip erase" ticked in STM32CubeProgrammer, then OPTION DISK LOAD an options file saved under 8.00.00b1, and LIBRARY LOAD the library's files again. 8.00.00b1 refuses a file saved by 8.00.00b2 ("File size incorrect"), as that holds the Bluetooth options and pairings too. Copy CMM2_Programs_8.00.00b2.zip to the card as well if you use the programs in it: its micropython.app is new, and needs 8.00.00b2. What is new Bluetooth The Bluetooth is the PicoMite's: the code of its Bluetooth versions (PicoMiteRP2350BTH, PicoMiteHDMIBTH and PicoMitePC3), unchanged, with the same BLUETOOTH command, options and functions. The User Manual has a new chapter, Bluetooth. • Turning it on. It needs the WiFi module. OPTION RADIO BOTH (WiFi and Bluetooth), WEB, BLUETOOTH or NONE, the PicoMitePC3's option. NONE is the default, and OPTION WIFI turns the WiFi's half on, so nothing changes until OPTION RADIO is set. • Keyboards, mice and game controllers. Bluetooth LE devices pair by themselves when put into pairing mode nearby; a Bluetooth Classic keyboard is found with BLUETOOTH SCAN and connected with BLUETOOTH CONNECT "name". A keyboard works as a USB keyboard does, at the prompt, in the editor and in programs, with its lock lights. A mouse, or a keyboard's touchpad, is the mouse on channel 2 (DEVICE(MOUSE 2, ...), MM.MOUSE, the GUI cursor). A Bluetooth LE game controller is DEVICE(GAMEPAD 3, ...), with GAMEPAD INTERRUPT 3. • Speakers and headphones. OPTION AUDIO BLUETOOTH, then BLUETOOTH CONNECT "name": everything PLAY makes is played through the speaker, and through the audio socket as well. The speaker is remembered and connects again by itself. The stream is suspended after 60 seconds of silence (OPTION AUDIO BLUETOOTH n sets the time; 0 keeps it running). • Serial devices as COM8. A Bluetooth Classic serial device (SPP: a GPS receiver, an HC-05) or a Bluetooth LE serial module (the Nordic UART Service, HM-10, Microchip's Transparent UART), connected with BLUETOOTH CONNECT and opened with OPEN "COM8:", with a receive buffer, an interrupt and AS GPS. • Pairings are stored with the options, so paired devices reconnect after a power cycle. BLUETOOTH FORGET deletes them; OPTION DISK SAVE and LOAD keep them. • BLUETOOTH STATUS lists the connections; MM.INFO$(BLUETOOTH KEYBOARD | SPEAKER | SERIAL) gives a device's address. • Memory: Bluetooth keeps 64KB of the memory for variables while it is on (MM.INFO(HEAP) is 64KB less). • Differences from the PicoMite: the serial device is COM8, not COM7; OPTION AUDIO DAC, not OPTION AUDIO DISABLE, ends the sound to Bluetooth; there is no console over Bluetooth; and Bluetooth is not serviced while a loadable program runs. MicroPython The CMM2's MicroPython (micropython.app in the zip) now runs every one of the 162 example programs of *Programming the Pico Computer 3*, Peter Mather's course in Python for the Pico Computer 3. The book's new Appendix K, Running this book on a Colour Maximite 2, gives the few differences: how to start it, where the files are, and which connector pin is which. The book is in github.com/UKTailwind/micropython, branch pico-computer-3. New in the app: • The I/O pins as on a Pico Computer 3: the same GP numbers, GP40 to GP46 and ADC(n) as on the RP2350B, Pin("LED") the SD card's activity light, I2C on any pins (a software I2C), and a pin's owner changes as on a PC3. • The clock: gettime(), settime(), machine.RTC and a daily alarm, on the DS3231 with OPTION DS3231 ON or on the processor's own clock. • machine.WDT (the watchdog), asyncio, and @micropython.native, viper and asm_thumb. • The network, with the WiFi module and OPTION WIFI: wifi() and ntpsync() at the prompt, socket, network.WLAN, TLS (HTTPS), requests, MQTT (umqtt), ntptime and mip. • Fixes: SQLite's memory is set aside at start-up (after a long session connect() could fail with memory free); import ulab.numpy; files that a program dropped without closing them are closed when the limit of open files is reached; pins are given back at a soft reset (Ctrl-D), and a pin another part has says "GPn is in use"; and a program's end now lets go of its off-screen buffer (hdmi.create()) and its sprites and collects the memory, so that the book's games run one after another on a Generation 1, which has less memory. It needs 8.00.00b2, as it uses the new services below. zeptoforth The zip's zeptoforth is version 1.17.2.1: Bezier curves (bezier.fs, in the zeptoforth folder, with an example in WORDS.md under Drawing), 0x before a hexadecimal number, and zeptoed leaving the cursor where it belongs when it ends. Fixed: • Code written as it runs reached the processor's instruction cache only by chance in three places: closures (bind and the words built on it), CREATE, <BUILDS and DOES>, and DEFER. A closure bound in a loop could run its first binding again, and a word made and used on one line could run what was there before. Each now makes the caches agree. • DEFER! (and IS) on a word deferred at the prompt said "attempted to write past flash end" and left zeptoforth compiling to flash: it took the Colour Maximite 2's memory for flash. • zeptoforth_g1.app did not start on a Generation 1 under version 8 ("the memory it is linked for is not free"): it is now linked where version 8 leaves room, so it needs version 8 (7.00's zip keeps the one for 7.00). zeptoforth.app is unchanged in that. The two saved systems, zeptoforth.img and zeptoforth_g1.img, are made again for the new kernel. A zeptoforth.img you saved yourself with an earlier zeptoforth does not load into this one: keep your source files, include them again and save-image. Loadable programs: services 21 and 22 • Version 21: rtc_alarm, the clock's daily alarm; and the network: net_poll, net_join, net_leave, net_ifconfig and net_dns, and eight TCP or UDP handles (sock_open to sock_close) over the firmware's own network. While a program runs the firmware does not service the network itself: net_poll does. • Version 22: led (the SD card's activity LED as the program's own), gp_pin (a GP's connector pin) and pin_setup's pull for an open drain output. The Loadable Programs guide describes them (The Services: The Clock and The Network; The I/O Pins: The LED). GP40 to GP46 GP40 to GP46, the analog inputs of an RP2350B (and of the Pico Computer 3), are second names for the Colour Maximite 2's analog pins: GP40, GP41 and GP42 are pins 26, 29 and 37 (GP26 to GP28, so ADC channel n is GP40+n on both chips), and GP43 to GP46 are pins 7, 13, 15 and 24 (GP6 to GP9). A program that uses a second name must not use the pin's first name as well. MM.INFO(PINNO GP40) is 26. GP47 still has no pin. MM.INFO(MAX GP) is 46 (it was 37); under OPTION PICOMITE it is still the PicoMite's. Fixes • RUN after a program that used GUI controls (OPTION MAXCTRLS) could damage the network's memory, and with Bluetooth on Bluetooth's: RUN, NEW and loading a program freed the old program's controls (and its serial ports' buffers) after the memory they were in had already been cleared, and each such free went on to free the memory kept above it for the WiFi and Bluetooth. Programs then printed lwIP errors ("mem_free: illegal memory") or the Colour Maximite 2 stopped. In 8.00.00b1 too, on any board with OPTION MAXCTRLS and OPTION WIFI. The old program's I/O is now closed first, as on the PicoMite, and a second free of the same memory does nothing. • Bluetooth: a wrong position read from the radio chip's Bluetooth buffer (once, on a Generation 2 with a speaker connected) made the firmware overwrite 56KB of its memory and stop. Such a position is now refused, and the read tried again at the next poll. • WEB TCP CLIENT REQUEST into a 64KB array (DIM b%(8192)) received nothing ("No response from server"), and into a larger one lost part of each packet. The PicoMite had the same fault, now fixed there too. • Memory: MMBasic's memory for variables could be given space that the C library's own allocator had already handed out (used by the audio decoders, JSON, the file system and now Bluetooth), when a program filled the memory. They are now kept apart. • LGETSTR$ of exactly 255 characters wrote a zero one byte past its result, into whatever came next in memory: an open file's record (a reader's SQL script then failed at COMMIT with "SQL: disk I/O error"), a string or an array. In 7.00 and the PicoMite too, where it shows less often. • WEB CONNECT with no parameters joined OPTION WIFI's network again only after a failed connection, not when the WiFi was simply down (after a loadable program's join to another network, for example), so only CPU RESTART brought it back. It now joins whenever it is not connected, as the manual says. The PicoMite has the same fault. • MM.VER is 8.000002. What behaves differently • New keyword: BLUETOOTH. A program that uses it for its own variable must rename it. • With Bluetooth on (OPTION RADIO BOTH or BLUETOOTH) the WiFi's four pins (32, 33, 38 and 40) belong to the radio, as with OPTION WIFI, and MM.INFO(HEAP) is 64KB less. • OPTION LIST shows OPTION RADIO when it is not what OPTION WIFI alone gives, and OPTION AUDIO BLUETOOTH when it is set. Structural changes For those who build the firmware or study its source: • BTstack (BlueKitchen, at the commit of pico-sdk 2.3.1) is in Middlewares/Third_Party/btstack, unchanged (tools/port_btstack.py). The PicoMite's Bluetooth files are copied into Src/net/bt/picomite by tools/port_bt.py with four mechanical changes; the Colour Maximite 2's side is Src/net/bt/BTMite_cmm2.c, with pico-sdk's HCI transport for the CYW43439. • The flash: the CYW43439's firmware is now kept compressed (141KB in place of 225KB), and unpacked by Mark Adler's puff (Middlewares/Third_Party/puff, zlib licence) when it is loaded into the chip. That made room for Bluetooth in the network's .net section (bank 2's sectors 3 to 6). • RAM: the radio's data (the driver, lwIP, Mbed TLS, BTstack and Src/net) moved to the top 32KB of the D2 RAM. Bluetooth has its own 64KB heap, taken from MMBasic's SDRAM heap and kept across RUN and NEW, as the network's block is. • The options record is layout 5: OPTION RADIO, OPTION AUDIO BLUETOOTH and 2KB of Bluetooth pairings (3,260 bytes). OPTION DISK LOAD also takes 8.00.00b1's layout 4 and 7.00's files. • Tokens: BLUETOOTH is a new command token at the end of the command table, so no other token moved; the image format is still 7. • The loadable programs' services are version 22 (Inc/cmm2img.h; the network's side is Src/net/LoaderNet.c). The programs CMM2_Programs_8.00.00b2.zip is 8.00.00b1's zip with micropython.app replaced (it needs 8.00.00b2), the zeptoforth folder replaced (1.17.2.1, with bezier.fs) and README.txt for this version. The licences folder adds BTstack's licence (for the firmware's Bluetooth) and micropython-lib's (for MicroPython's network modules). The other programs are unchanged and run on 8.00.00b2 as on 8.00.00b1. Tested On a Generation 2 with the WiFi module, Bluetooth on and a speaker connected, and a Generation 3 with the WiFi module, with the firmware of 17 November (this release but for the three fixes of 18 November: LGETSTR$, WEB CONNECT and MM.INFO(MAX GP)); and on a Generation 1 with the WiFi module: • The regression on both: the test programs, the PicoMite tests, the crash tests, the program corpus, the PicoMite's Testfiles and SP Tools (686 of 727, as before). No change from the last runs but what the WiFi module's pins, its memory and the network bring, and the expected output of the GP pin test (GP40 to GP46). • The RUN and Bluetooth faults fixed above were found by this regression on the Generation 2: with the fixes, the programs that failed ran clean six times over. • The update from 8.00.00b1 on the Generation 2, as a user does it: 8.00.00b1 written fresh, a library and its .lib file and the options saved; 8.00.00b2 written without a full erase; the options loaded, the library kept and working, the .lib file loaded. • MicroPython (the zip's micropython.app) on both: its new modules, the pins and the LED, the clock, SQLite and an HTTPS fetch; on the Generation 3 also the book's Appendix K example and a short sound through HDMI. Every one of the book's 162 example programs ran on the Generation 2 with this release's services (on a build before the RUN and Bluetooth fixes, which do not touch loadable programs). • Bluetooth on the Generation 3 with the WiFi: turned on, a scan finding a speaker, the 64KB set aside, COM8's message with no device. On 16 November, with this release's Bluetooth code: a Bluetooth Classic keyboard and its touchpad, a speaker and an HM-10 serial module on COM8 (both ways) on a Generation 2, and the regression on all three generations. • Generation 1, on 18 November: the regression, with the LGETSTR$ fix, the same as on 15 November but for one test now right (SP Tools 686 of 727); then this release's file: MM.INFO(MAX GP), the program corpus's WiFi programs and TFTP as on 15 November, WEB CONNECT after a failed join, SQL, and MicroPython: 159 of the book's 162 example programs in one session, the network's included (two run out of memory there: below; the last restarts the board, as it is meant to, and was run on its own). The LGETSTR$ fix also on the Generation 2: the reporter's programs and the SQL tests. • zeptoforth (the zip's), on the Generation 1 and a Generation 3, each with the saved system made on it: float64 108 of 108, the Black-Scholes and solar eclipse programs (the eclipse identical to MMBasic's output), the words tests for the documentation, the graphics and tasks under stress, and the fixes above (closures bound in a loop, DEFER and IS, CREATE and DOES> on one line). The stress test's count of a task's card reads now asks only that it ran: an old 4GB card reads at a fifth of the speed. Known problems • Bluetooth game controllers have not been tried with a real controller yet. • Why the radio chip once gave a wrong Bluetooth buffer position is not known; the firmware now refuses it (above), so it costs at most a packet. • Bluetooth and the network wait while a loadable program runs: a Bluetooth keyboard does not type into it and a speaker plays nothing (MicroPython's network is the exception: it services the network itself). • The Bluetooth serial device: a Bluetooth LE module passes on only part of a long burst at 115200 baud (the module's limit): send in pieces or more slowly. • MicroPython on a Generation 1 has about 1.6MB for Python. In one long session two of the book's games (ch19/05 and ch25/02) still run out of memory after the examples before them; each runs after Ctrl-D (a soft reset). • The WebMite's own example programs have not all been tried yet. • A Generation 3 can reset when its HDMI cable is unplugged (the cable's shield meeting the monitor's ground on the reset line). The next board has a fix. • The known problems of 7.00.00RC6 remain, apart from the three SQL faults fixed in 8.00.00b1. The manuals • The User Manual is for 8.00.00b2: the new chapter Bluetooth, with the BLUETOOTH command, OPTION RADIO, OPTION AUDIO BLUETOOTH, COM8 and MM.INFO$(BLUETOOTH ...) in the references; GP40 to GP46 in Using the I/O Pins; WiFi and Bluetooth in Porting Programs. • Colour Maximite 2 Loadable Programs adds services 21 and 22: the clock's alarm, the network, the LED and gp_pin. • The App User Guide: the MicroPython chapter (what it has now, and the book), and the zip's name. • The C Compiler guide is unchanged apart from the zip's name. The 386 PC Emulator guide and the Stepper reference are unchanged. Licences The firmware's own licence (LICENSE) is unchanged. Bluetooth brings BTstack, whose licence allows redistribution and use "solely for personal benefit and not for any commercial purpose or for monetary gain" (Raspberry Pi's licence for BTstack covers only its own chips): free for the free firmware, but anyone who sells boards with it needs a commercial licence from BlueKitchen. cyw43-driver's copy carries the same condition, as in 8.00.00b1. puff (zlib licence) unpacks the chip's firmware. Each licence is beside its code in Middlewares/Third_Party, and in the licences folder of the zip. |
||||
| homa Guru Joined: 05/11/2021 Location: GermanyPosts: 790 |
Ui, thx for b2, but: Hi Peter, a small issue with 8.00.00b1 at the MMBasic prompt, only on the serial terminal (Tera Term) - on the VGA screen everything is fine: When I go back in the command history (cursor up), from the second entry on the whole line is shown one column too far to the left, without the space after the prompt: >xmodem receive "mmsql.bas" > xmodem receive "mmsql.bas" After that, editing the line goes wrong on the terminal: the cursor is one position off, so changes end up in the wrong place. >option list 480MHz Colour Maximite 2 G2 MMBasic 8.00.00b1 CURRENT VGA mode 800x600 RGB332 CURRENT DISPLAY 50,100 OPTION USBKEYBOARD DE OPTION COMPILE ON Matthias |
||||
| matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 12322 |
Travelling until after the weekend. Will look at it then. |
||||
| PeteCotton Guru Joined: 13/08/2020 Location: CanadaPosts: 671 |
Wow! Thank you (again!) |
||||
| matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 12322 |
22 November 2026. Updated on 23 November with FRAMEBUFFER WARPH and WARPV. Compared with 8.00.00b2, the last version released. This is the third beta of MMBasic 8.00 for the Colour Maximite 2. Please report problems on the Back Shed forum. 7.00.00RC6 remains the last release of version 7. https://github.com/UKTailwind/CMM2V1.5/releases/tag/v8.00.00b3 The same firmware file runs on the Generation 1, the Generation 2 and the Generation 3. 8.00.00b3 brings: • The Generation 3's WiFi and Bluetooth module on the board. The Generation 3 carries the module on its board, on a bus of its own, so nothing is plugged into the rear I/O connector: with the WiFi and Bluetooth on, pins 32, 33, 38 and 40 and SPI2 stay free for other uses. The firmware finds the module by itself. On a Generation 1 or 2 the plug-in module works as before. • SQL(TYPE n), which says what SQLite holds in a column of the row: an integer, a floating point number, text, a BLOB or no value. • FRAMEBUFFER WARPH and WARPV (added on 23 November): each row or column of one buffer is copied to another, moved by its own offset from an integer array. One command makes racing roads, parallax, water that wobbles and screen melts, what the arcade hardware called row scroll and column scroll. PAGE WARPH and WARPV do the same with page numbers. FRAMEBUFFER WAIT now works in every colour depth. The PicoMite's 8.00.00b1 has the same commands. • Fixes: text arriving on the serial console was lost or garbled while a program switched OPTION CONSOLE; a key typed under OPTION CONSOLE NONE was stored in the wrong memory; the prompt's history recall drew and edited each recalled line a column to the left on a serial terminal exactly as wide as the screen; and under OPTION STATUS ON the file manager's prompts were hidden on the screen and the status line said "Check Disk" for a program that was on the card. Before you update From 8.00.00b2: save the options first and load them again afterwards, as with every update. Writing the firmware erases them: OPTION DISK SAVE "A:/myoptions" Then write the firmware, and: OPTION DISK LOAD "A:/myoptions" The options are kept in the same form as in 8.00.00b2, so a file saved under 8.00.00b2 loads into 8.00.00b3, and one saved under 8.00.00b3 loads into 8.00.00b2. The console runs at 115200 baud until the options are loaded. Save the program in memory to the SD card first: version 8 does not keep it over a reset. The flash library is kept and works as before, and .lib files and flash slots saved by 8.00.00b2 load, as no tokens have moved. The loadable programs' services are unchanged (version 22). From 7.00: read "Before you update" in 8.00.00b1's notes first (they are in Release_Notes_8.00.00b3_full.md): the program held in the flash is lost, and the library and flash slots must be saved again. Everything there applies to 8.00.00b3 too. Going back to 8.00.00b2: write it as you wrote this one, and OPTION DISK LOAD the same options file. CMM2_Programs_8.00.00b3.zip holds the same programs as 8.00.00b2's zip, unchanged: only its README.txt is new. If your card has 8.00.00b2's programs, there is nothing to copy. A Generation 3 with the module on its board needs 8.00.00b3 or later for the WiFi and Bluetooth. 8.00.00b2 and earlier run it as a Generation 3 without them: they look for the plug-in module on the rear connector, and with OPTION WIFI set they print "WiFi module not found". What is new The Generation 3's WiFi and Bluetooth module on the board The Generation 3 has the WiFi and Bluetooth module, a Raspberry Pi RM2, on its board. It is joined to the processor by a bus of its own (the processor's SPI6), not by the rear I/O connector: • Nothing is plugged in, and the module uses none of the connector's pins. With OPTION WIFI or OPTION RADIO set, pins 32, 33, 38 and 40 (and GP10 and GP11, their PicoMite names) stay free for SETPIN, and SPI2 can be opened alongside the WiFi. • Everything else is as with the plug-in module: OPTION WIFI, OPTION RADIO, the WEB and BLUETOOTH commands, the 128KB the network keeps and the 64KB Bluetooth keeps, and MM.DEVICE$ ("Colour Maximite 2 G3"). • The link to the chip runs at up to 30MHz (the plug-in module's at 24MHz on a Generation 2 and 20MHz on a Generation 1). • The firmware tells the boards apart at power up by a pin the Generation 3 connects to ground, so the same file serves every board: a Generation 1 or 2, with or without the plug-in module, works exactly as before. The User Manual says so in Hardware Features, WiFi and Internet Functions (The WiFi Module), Bluetooth, Porting Programs, Appendix D (SPI) and Appendix M, and in the entries for OPTION WIFI and SPI2. SQL(TYPE n) SQL(TYPE n), beside SQL(ISNULL n), returns what SQLite holds in column n of the current row: 1 an integer, 2 a floating point number, 3 text, 4 a BLOB, 5 no value (SQLite's own numbers, from sqlite3_column_type()). SQL(n) gives a BLOB as a string, as it gives text, and a column read into a float cannot tell 2.0 from 2, so a program that writes the data out again, as a dump does, can now keep each value's type (Matthias's wish, for mmsql). It uses what sql.mod already gives the firmware, so the zip's sql.mod is unchanged. FRAMEBUFFER WARPH and WARPV (added on 23 November) FRAMEBUFFER WARPH from, to, xoff%() [, step] [, first] [, phase] [, edge] [, transparent] [, rows%()] FRAMEBUFFER WARPV from, to, yoff%() [, step] [, first] [, phase] [, edge] [, transparent] Each row (WARPH) or column (WARPV) of the buffer from is copied to the buffer to, moved by its own offset from an integer array: a positive offset moves a row to the right, or a column up, as PAGE SCROLL does. The old games made these effects by changing the scroll position on chosen lines (the arcade hardware's *row scroll*, or *line scroll*, and *column scroll*): the curves and hills of a racing road, parallax layers that move at different speeds, water that wobbles and a screen that melts away. An array operation such as MATH SCALE makes a frame's offsets, so there is no BASIC loop over the lines. They are Peter's design for the PicoMite, whose 8.00.00b1 has the same commands, and a program that uses them runs on both. • Bands: each element of the array moves a band of step rows or columns (default 1), from the row or column first (default 0). Rows or columns outside the bands are left as they are, so a score line can stay still. • phase rotates the element each band takes ((band + phase) MOD the number of elements), so a table holding a wave is animated by counting phase up. • edge: if it is omitted the source wraps round, so any offset can be given (a camera position that keeps growing, for example). -1 leaves the destination's pixel as it is, and a colour fills it. • transparent is a pixel that is not copied, so layers moved by different offsets can be stacked in one buffer. In the 12-bit colour depth the pixels with an alpha of 0 are not copied, whatever colour is given (give 0). • rows%() (WARPH only) picks the source row shown on each band: a hill, or the colour of a road's kerbs, for each line. • The buffers: in the 8, 12, 16 and 32-bit colour depths from and to are N (the display, page 0) and F (the framebuffer of FRAMEBUFFER CREATE). They can be of different sizes: the offsets wrap at the source's size, so WARPH from a framebuffer wider than the screen is a FRAMEBUFFER WINDOW for each line. In the 4-bit depth (the PicoMite's VGA and HDMI) they take the PicoMite's letters N, L, F, 2 and T. • PAGE WARPH and PAGE WARPV do the same with page numbers (PAGE WARPH 1 TO 0, off%()), in every colour depth but 1 bit. The 1-bit depth does not have WARPH and WARPV ("Invalid for this screen mode"). • FRAMEBUFFER WAIT, which waits for the next frame blanking, now works in the 8, 12, 16 and 32-bit colour depths, as it did in the 4 and 1-bit ones. Use it before writing to the display, so that the picture is whole when it is shown. The User Manual has them in the FRAMEBUFFER and PAGE entries, with an example, and in the chapters Video Modes and Pages and Game Playing Features. The PicoMite's warp_demo.bas runs unchanged under OPTION PICOMITE VGA at 59.5 to 59.9 frames a second on a Generation 1. Fixes • OPTION CONSOLE in a program. OPTION CONSOLE SCREEN stopped the serial console's port, and BOTH or SERIAL set it up again, so text arriving while a program switched between them was lost or came in garbled (Matthias: mmsql switches while reading pasted text). The original Colour Maximite 2 firmware did this to free the port for OPEN "COM3:". OPTION CONSOLE now only chooses where the output goes, as on the PicoMite: the port keeps running, and nothing that arrives is lost however often a program switches. A program can still open the console's port as COM3 (or COM1 or COM2 under OPTION CONSOLE PORT) as before: the console gives the port up while it is open. • OPTION CONSOLE NONE: a key typed on the serial console was stored through COM3's receive buffer, which does not exist unless COM3 is open, so it was written to the wrong memory. It now reaches the program, as under the other settings. • The prompt's history recall (the Up and Down keys): on a serial terminal exactly as wide as the screen (Tera Term at 100 columns for MODE 1, for example) each recalled line, from the second on, was drawn over the space after the prompt (">option list") and edits landed one place to the left (Matthias). The VGA screen was right. In the Colour Maximite 2's firmware from the start: a terminal one column wider, which EDIT, FM and Shift-F6 ask for, hid it. Also, insert mode could push a line past the screen's right edge. • The file manager's prompts under OPTION STATUS ON: while FM waited for a name (to rename, duplicate, go to a path, filter, or make a new file or directory), the screen's bottom row showed the prompt's status line (the program's name and the time) in place of the question, redrawn every second. The serial terminal was right. In the firmware since 7.00.00b4 (Peter). • The status line under OPTION STATUS ON said "Wrong Disk" and then "Check Disk" after a program was loaded, although its file was on the card: the check looked for the name with a stray character in front of it. Since 7.00.00b4, when a program's name began to keep its drive. • MM.VER is 8.000003. What behaves differently • OPTION CONSOLE SCREEN no longer stops the serial console's input: keys typed on the serial console reach a program under OPTION CONSOLE SCREEN, CTRL-C included, as on the PicoMite. "Console port in use" is now the error of OPTION CONSOLE BOTH or SERIAL while the console's port is open as a COM port (COM1, COM2 or COM3). • On a Generation 3 the WiFi's and Bluetooth's pins and SPI2 are free (above). Structural changes For those who build the firmware or study its source: • Which board: getVersion (Src/main.c) reads PF6 as well as PF9 at power up. PF9 to ground is a Generation 2 or 3 (as before); PF6 to ground as well is a Generation 3 with the module on the board (RM2OnBoard). It now leaves both pins as analog inputs with no pull; it had set port E there by mistake, so PF9 kept its pull-up. • The module's bus on a Generation 3 (Src/net/cyw43_bus_cmm2.c): SPI6, with the clock on PG13 and the data, in both directions and with the chip's interrupt, on PG14 (both alternate function 5), chip select PF7 and power on PF8, all on the board. SPI6 is in the D3 domain, clocked from its bus clock (120MHz at 480MHz) divided by 4. It is a limited SPI (16-bit frames at most, an 8-byte FIFO), so each 32-bit word of the chip's protocol goes as two 16-bit frames, and a long transfer in parts of at most 511 words. The plug-in module's path (SPI2, 32-bit frames) is unchanged. • The pins: cyw43_driver_cmm2.c has the board's pins beside the plug-in module's; Src/net/WebMite_cmm2.c reserves the connector's four pins and SPI2 only for the plug-in module. • The console's port (Src/Serial.c): ConsoleUartUp says whether the console has its UART; a program's OPEN of that port hands it over (ConsoleHandOver) and ConsolePortOpen gives "Console port in use". The interrupt handlers of USART1, USART2 and UART4 (Src/stm32h7xx_it.c) give a byte to whoever has the port: the console, else the COM port if it is open, else it is read and dropped. • WARPH and WARPV (Src/Warp.c): the PicoMite's core (its graphics/Warp.c), with the Colour Maximite 2's additions: 32-bit pixels, the 12-bit depth's alpha, pages that hold each row twice, a source and destination of different sizes, and the routine checks every 16 rows. It is all in the .extra section, entered through one call, WarpCommand, from cmd_framebuffer (Src/Draw.c), Rgb121Framebuffer (Src/Rgb121.c) and cmd_page, so the code run for every statement moved by 64 bytes and the statements' timings are as before. The tests are tests/cmm2/warpn.bas and tests/picomite/warp.bas. • Unchanged: the options record (layout 5), the tokens (image format 7) and the loadable programs' services (version 22). WARPH and WARPV are words of the FRAMEBUFFER and PAGE commands, not new tokens. • docs/G3_V1.2_Header_Plan.md records the board's connections, the antenna's keep-out and the firmware for the module on the board. The programs CMM2_Programs_8.00.00b3.zip is 8.00.00b2's zip with README.txt for this version. When it was published no program in it had changed since 8.00.00b2 (tools/zip_apps_check.py: none to review; micropython.app is the same build), and each runs on 8.00.00b3 as on 8.00.00b2. quest/scummvm.app was replaced on 23 November. In the games that speak, the first one read each line of speech from the SD card as it played, in the interrupt that makes the sound: Day of the Tentacle, Sam & Max Hit the Road, Indiana Jones and the Fate of Atlantis on CD, Full Throttle, and the CD versions of The Legend of Kyrandia 1 and 2. A line that played while the game loaded a room or saved could have read the wrong data, or damaged a file on the card; no one is known to have seen it happen. The new one reads each line into memory before it plays it: on a Generation 1 Day of the Tentacle played for two minutes with it, each line read in 111 ms at most. Copy the new A:/quest/scummvm.app from the zip if you downloaded it before then. 7.00.00RC6's zip has the same new file. Tested The release file on a Generation 1 (400MHz, with the plug-in WiFi module and OPTION WIFI set). The options file saved under 8.00.00b2 loaded unchanged. • The test suites, compared with 8.00.00b2's run on the same board. These are: ◦ tests/cmm2 (113 programs); ◦ the PicoMite tests; ◦ the crash tests: all passed; ◦ the corpus (212 programs); ◦ the test files (66 programs); ◦ SP Tools: 686 of 727, as under 8.00.00b2 (the rest need a USB flash drive). Every program gave what it gave under 8.00.00b2, apart from four, each explained: ◦ one test now shows pins 32, 33, 38 and 40 reserved, and two network tests now run: the WiFi module was plugged in after 8.00.00b2's run; ◦ one test that switches OPTION CONSOLE now matches: under 8.00.00b2 it lost a character to the switching ("loop 1" came out as "loopð1"), the fault fixed here. • The WiFi: it joined at start-up. 100 pings of 1400 bytes from a PC came back with 4 lost (WiFi). A 1MB file sent by TFTP and read back was identical. While the WiFi has them, pins 32, 33, 38 and 40 are reserved and SPI2 OPEN is refused. The network tests gave the same output, byte for byte, as on 22 November with the same code before the version number changed. • The fixes: ◦ OPTION CONSOLE: 200 characters pasted while a program switched between OPTION CONSOLE SCREEN and BOTH about 7,450 times arrived identical. ◦ OPTION CONSOLE NONE: 200 characters typed arrived identical. ◦ History recall: recalled lines were drawn in the right place with the cursor where MMBasic expects it, on a terminal 100 columns wide (the screen's width) and 101. • SQL(TYPE n): it gave 3, 4, 1, 2, 3, 1 for text, a BLOB, 2, 2.0, '12' and 12, matching SQLite's typeof(). • The programs: each program in the zip that runs on a Generation 1 started from the prompt with no error, and the prompt came back when it was left. These are MicroPython, Doom, ScummVM, the 386 PC, the NES, Heretic, the Spectrum, the CPC, the C64, the Atari 800, the TRS-80, the BBC Micro, the VT100 terminal, zeptoforth for the G1, WordGrinder, sc-im and SQL's example. The Generation 2 programs (zeptoforth, Quake and the Amiga) refused with "Needs a G2", as they should. The Apple //e and the C compiler were not on that board's card. The same changes on a Generation 3 (V1.1, with the plug-in WiFi module), in builds of the same code before the version number changed: • 21 November: the OPTION CONSOLE paste test (200 characters over about 8,700 switches, twice), OPTION CONSOLE NONE, the history recall at 100 and 101 columns, and SQL(TYPE n). • 22 November: ◦ The new 16-bit transfer code carried the plug-in module's traffic in short parts. It joined, 100 of 100 pings came back, a 1MB TFTP round trip was identical, and there were no bus errors. ◦ A build that treated this board as one with the module on the board found no chip, said "WiFi module not found" within 2.2 seconds, and left every pin and SPI2 free. ◦ The final code ran the plug-in module as before. The Generation 2 and the Generation 3 have not run the release file itself: only one board could be connected. The release file was replaced on 22 November with the two OPTION STATUS fixes above, an hour after it was first published. They change two lines, and no other code moved. The tests above ran on the first file. The new file runs on the same Generation 1 with its options loaded back unchanged. Under OPTION STATUS ON, FM's rename prompt there reads "Rename occom3.bas to: occom3.bas", and after RUN the status line shows "A:/T21/sqltype2.bas" with no "Check Disk". The release file was replaced again on 23 November, before 8.00.00b3 was announced, with FRAMEBUFFER WARPH and WARPV. Nothing else changed in the firmware. The release file runs on the same Generation 1, with its options loaded back unchanged: • tests/cmm2 (114 programs, now with warpn.bas: WARPH and WARPV in the Colour Maximite 2's own colour depths, in 13 configurations, and 18 error tests) and the PicoMite tests (now with warp.bas, the PicoMite's own WARP test under OPTION PICOMITE VGA in MODE 2 and 3): warpn.bas and warp.bas give their expected output. Every other program gave what it gave under the first 8.00.00b3 file, byte for byte, but for one line: a test that lists the options now also shows OPTION STATUS OFF, which was set on this board for the OPTION STATUS tests. The crash tests, the corpus, the test files and SP Tools were not run again. The statements' timings, measured with the same code before the release build, are as before. • The manual's example for FRAMEBUFFER WARPH, as printed, ran in MODE 7 at 75 frames a second: every frame of that mode's 75Hz display. • The PicoMite's warp_demo.bas ran unchanged under OPTION PICOMITE VGA at 59.5 to 59.9 frames a second, with the same code before the release build. • The programs: after a restart, each program in the zip that runs on a Generation 1 started from the prompt with no error, the 386 PC and the NES included, and the prompt came back when it was left. The Generation 2 programs refused with "Needs a G2", as before. • The timings over a whole 800 x 600 page are under Known problems. Known problems • No Generation 3 with the module on its board has been made yet. Its path has run only in a test build that took a Generation 3 without the module for one with it: the firmware found no chip, said "WiFi module not found" and carried on with every pin free. The same 16-bit transfer code has carried the plug-in module's traffic without an error (see Tested). If the first boards misread at 30MHz, the bus can be slowed to 15MHz in the next beta. • Opening the console's own port as COM3 (or COM1 or COM2 under OPTION CONSOLE PORT) in a program has not been tried on a board since the OPTION CONSOLE change. COM3 still opens only when the saved option is OPTION CONSOLE SCREEN or NONE, as before. • A large loadable program on a Generation 1 after many BASIC programs. After a long session the 386 PC and the NES emulator stopped with "Needs n KB, n KB free in one block". In this testing that came after about 400 test programs. Each started at once after a restart (CPU RESTART or the reset button). Something those programs used is held until a restart and keeps the loader from joining the display memory to the heap. 8.00.00b2 has the same code. Which statement does this is not yet known. • FRAMEBUFFER WARPV a column at a time over a whole 800 x 600 page is slow. With offsets that differ from column to column it took 108 ms in the 8-bit colour depth, 253 ms in 16 bits and 594 ms in 12 bits on a Generation 1. Bands of four columns (step 4) took 20, 39 and 70 ms, and WARPH over the same page 4, 26 and 53 ms. • Bluetooth game controllers have not been tried with a real controller yet. • Why the radio chip once gave a wrong Bluetooth buffer position is not known; the firmware refuses it, so it costs at most a packet. • Bluetooth and the network wait while a loadable program runs: a Bluetooth keyboard does not type into it and a speaker plays nothing (MicroPython's network is the exception: it services the network itself). • The Bluetooth serial device: a Bluetooth LE module passes on only part of a long burst at 115200 baud (the module's limit): send in pieces or more slowly. • MicroPython on a Generation 1 has about 1.6MB for Python. In one long session two of the book's games (ch19/05 and ch25/02) still run out of memory after the examples before them; each runs after Ctrl-D (a soft reset). • The WebMite's own example programs have not all been tried yet. • A Generation 3 can reset when its HDMI cable is unplugged (the cable's shield meeting the monitor's ground on the reset line). The next board has a fix. • The known problems of 7.00.00RC6 remain, apart from the three SQL faults fixed in 8.00.00b1. The manuals • The User Manual is for 8.00.00b3: the Generation 3's module on the board (Hardware Features, WiFi and Internet Functions, Bluetooth, Porting Programs, Appendices D and M, OPTION WIFI and SPI2), SQL(TYPE n) (in SQL( and the chapter SQL Databases), and OPTION CONSOLE. • The User Manual was replaced on 23 November (its title page says 23 November). It adds FRAMEBUFFER WARPH, WARPV and WAIT, and PAGE WARPH and WARPV, in the Commands and in the chapters Video Modes and Pages and Game Playing Features. It also carries changes made to the manual's text for 8.00.00b1 and later that the manuals of 8.00.00b1 to 8.00.00b3 had missed: ◦ Using MMBasic: the program is held in RAM, not in the flash, and is lost at a reset or power off (MMBasic keeps it over the restart of an option change); AUTORUN.BAS for a program to run at power up; the library has 128KB of flash of its own; a loadable program on a Generation 1 borrows about 3.75MB. ◦ MMBasic Characteristics: the memory map of version 8 (the flash and the SDRAM of each generation). ◦ Appendix K: what a firmware upgrade keeps and clears in version 8. ◦ Video Modes and Pages: MODE 19 is 720 x 400 (the PicoMite's), and its pages; the PicoMite's 640x480 at 75Hz (OPTION RESOLUTION 640x480, 315000); on VGA, MODE 18 and the PicoMite's 1024x600 are shown in a 1024 x 768 frame. • Colour Maximite 2 Loadable Programs: its title page (firmware 8.00.00b3), and 8.00.00b3 in the list of services versions (still 22). • The App User Guide and the C Compiler guide are unchanged apart from the zip's name. The 386 PC Emulator guide and the Stepper reference are unchanged. Licences Unchanged since 8.00.00b2. The firmware's own licence (LICENSE) is unchanged. For the WiFi and Bluetooth it includes lwIP, Mbed TLS, the cyw43-driver, BTstack, puff and the CYW43439's firmware. BTstack's licence allows redistribution and use "solely for personal benefit and not for any commercial purpose or for monetary gain" (Raspberry Pi's licence for BTstack covers only its own chips): free for the free firmware, but anyone who sells boards with it needs a commercial licence from BlueKitchen. cyw43-driver's copy carries the same condition. Each licence is beside its code in Middlewares/Third_Party, and in the licences folder of the zip. |
||||
| homa Guru Joined: 05/11/2021 Location: GermanyPosts: 790 |
Thank you, Peter! Wow - I only asked on Friday, and 8.00.00b3 already has it all: - SQL(TYPE n) - exactly as I hoped. Now a program can finally tell text from BLOB, and a whole number from a REAL. - OPTION CONSOLE no longer spoils the characters coming in on the serial port - and the fix for OPTION CONSOLE NONE on top. - The history at the prompt in the terminal is fixed, too. For mmsql this means: .mode insert and .mode json no longer have to guess whether a value is a BLOB, and .dump gets simpler. And with OPTION CONSOLE safe to switch, an idea I had put aside - real UTF-8 in the terminal while the screen keeps its placeholder - is back on the list. I am really looking forward to using and trying all of this. During the week there is no time, but when the weekend comes, b3 goes onto my CMM2 and I will report back how it works with mmsql. ![]() Matthias |
||||
| Volhout Guru Joined: 05/03/2018 Location: NetherlandsPosts: 6334 |
delete Edited 2026-11-24 23:26 by Volhout PicomiteVGA PETSCII ROBOTS |
||||
| matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 12322 |
https://github.com/UKTailwind/CMM2V1.5/releases/tag/v8.00.00b4 The fourth beta of version 8 of MMBasic for the Colour Maximite 2 is on GitHub. One firmware file runs on the Generation 1, the Generation 2 and the Generation 3. Two of its changes were asked for here. What is new • EDIT opens a file where you left it. Change a line, press F2 to run the program, and EDIT opens it again at that line and column, as the file manager comes back to the program it ran. F1 and Esc remember the place too. If the program stops with an error, EDIT still opens at the error's line. It works for EDIT, EDIT "file" and E in the file manager; only the last file edited is remembered, and any other opens at its top. • PLAY MODSAMPLE LOOP, CHANGE and STOP for sound effects over MOD music. LOOP plays a sample until it is stopped (using the sample's own loop in the MOD file), CHANGE alters a playing sample's volume or rate without starting it again, so an engine's note can follow its revs, and STOP stops one channel or all four. Effects now start 12 to 23 ms after the command, where they took 46 to 93 ms. See https://mather.host/blog/modsample-sound-effects/ for more details and ideas. Fixed • A board switched on with OPTION SD TIMING FAST could say "SD Card not found" until the timing was set to NORMAL and back. The card is now started at the slow speed, as NORMAL does, then run at the full speed. • PLAY MODSAMPLE accepted sample 32, which a MOD file does not have, and played whatever memory followed the 31 samples. It now gives an error. Changed • A MOD file's music is now made 12 ms at a time, so that effects are heard sooner. A single statement that runs for longer than that without letting the player in can make the music repeat a short piece: on a Generation 1, CLS of a whole 800 x 600 page in the 12-bit colour depth, or a SORT of a large array. BLIT, PAGE COPY, PAUSE and file access are fine. Before you update • Save your program to the SD card: version 8 does not keep it over a reset. • Save your options with OPTION DISK SAVE "A:/myoptions" before writing the firmware, and load them afterwards with OPTION DISK LOAD "A:/myoptions". Files saved by 8.00.00b3 and 8.00.00b4 load into either. • The library, .lib files and flash slots saved by 8.00.00b3 are kept and work. • The programs zip is 8.00.00b3's with a new README: if your card has those programs, there is nothing to copy. • Coming from 7.00? Read "Before you update" in 8.00.00b1's notes first. They are in the full release notes in the release. Known problems • No Generation 3 with the module on its board has been made yet, so that part has been tried only without a module. • Bluetooth game controllers have not been tried with a real controller yet. • Bluetooth is not serviced while a loadable program runs. • A Generation 3 can reset when its HDMI cable is unplugged. • On a Generation 1, after a long session of BASIC programs, a large program (the 386 PC, the NES) can stop with "Needs n KB, n KB free in one block". A restart cures it. This is a beta, so please report anything that goes wrong here. Edited 2026-11-25 01:59 by matherp |
||||
| Volhout Guru Joined: 05/03/2018 Location: NetherlandsPosts: 6334 |
@Peter, Very happy with the focus change in fm/editor in V8.00.00b4. Thank you. Have been using it for hours now, and works fine. With the baudrate limit on CMM2 (115200) and larger programs, the built in editor works faster than MMEdit since it eliminates the upload times. In that perspective the pico (non-USB) is much better than the CMM2. The pico USB versions are also set for 115200 baud. Anyway, STONED-HQ is in works (a version of the STONED game on Game*Mite) making use of the superior picture quality of the CMM2 (mode 8,16). Volhout Edited 2026-11-25 17:55 by Volhout PicomiteVGA PETSCII ROBOTS |
||||
| matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 12322 |
For G2/G3, I set the baudrate to 460800 baud. Speeds everything up and is rock solid for things like zmodem. The G1 is limited by the Microbridge. It would be easy to remove that chip and add a ch340 or similar with a small adapter board which would liberate the G1 |
||||
| toml_12953 Guru Joined: 13/02/2015 Location: United StatesPosts: 763 |
I have a CMM2 G2 V2. When I turned OPTION DS3231 ON I lost all I/O from the serial console. I had to reflash the firmware. NEVER MIND! I had OPTION BAUDRATE set higher which doesn't go into effect until a restart. The OPTION DS3231 ON caused a reboot at the higher rate. Of course, the terminal was still set to 115200 so nothing showed when I typed. Edited 2026-11-25 20:32 by toml_12953 |
||||
| matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 12322 |
I like bugs like that |
||||
| toml_12953 Guru Joined: 13/02/2015 Location: United StatesPosts: 763 |
For me, most of them are! I do have a question, though. When I turn OPTION DS3231 ON, I have to answer the time and date prompts at every bootup. Is it supposed to work like that? |
||||
| toml_12953 Guru Joined: 13/02/2015 Location: United StatesPosts: 763 |
Will an optional file number be added to the LIST commands as the PicoMite version has? It's very handy to be able to run the serial console at 460800 baud and still be able to list a program to a serial printer @ 19200. |
||||
| matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 12322 |
Shouldn't do unless the ds3231 hasn't been enabled or has a flat/missing battery |
||||
| toml_12953 Guru Joined: 13/02/2015 Location: United StatesPosts: 763 |
I have OPTION DS3231 ON in my option list and I bought and installed a fresh battery. I got around the problem by not only answering the prompts at bootup but also setting TIME$ and DATE$ at a command prompt. Now the system doesn't prompt at reboot but does display the correct time and date when queried. How can I tell if I'm actually using the DS3231 though? |
||||
| matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 12322 |
OK, that makes sense. The startup reads from the internal battery backed RTC on boot and prompts for the time and date if that isn't sensible. Only after that does it look for the ds3231. If the ds3231 is enabled then it is being used to update the internal clock on a regular basic and it is also used when you ask for the time or date unless you have milliseconds on enabled. The DS3231 is only updated when you use the time$ and date$ commands so until then after a battery change it will have its default values Edited 2026-11-26 02:06 by matherp |
||||
| Page 1 of 2 |
|||||
| The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2026 |