Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 20:00 25 Sep 2026 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : MMB4L: MMBasic for Linux version 0.8

Author Message
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 4401
Posted: 04:52pm 24 Sep 2026
Copy link to clipboard 
Print this post

Previous MMB4L release thread

Once again, "It's time to play the music. It's time to light the lights ..."

README.md
ChangeLog
Downloads for x86_64, aarch64 + arm6vl

As usual it seems highly unlikely I've managed to roll this all out correctly, but hopefully someone will let me know.

Note that this doesn't have parity with PicoMite 6.0 and certainly can't handle Peter's latest wonders: Chuckie Egg, Elite, Exile and Prince of Persia - I don't have the time, or money to throw at Claude, or, let's be honest inclination to make that happen any time soon.

It is however up-to-date with (and includes some fixes from) MMBasic for macOS v0.1.2 which @TomSchimana forked off one of my v0.8 development branches. Tom if you are reading this, I backed out some experimental/unfinished enhancements and refactoring and have fixed a performance bug in the SDL audio since you forked.

Best wishes,

Tom

The ChangeLog in full:
Version 0.8 alpha 1 - 24-Sep-2026:
 - Added support for console I/O to graphics windows:
     OPTION CONSOLE BOTH ' or OPTION CONSOLE SCREEN
     GRAPHICS WINDOW 0, 300, 300
     GRAPHICS WRITE 0
     PRINT "Hello World"
     - Enabled automatically for simulated platforms where appropriate.
 - Added simulation of additional platforms:
     - PicoMiteHDMI
     - PicoMiteVGAUSB
     - PicoCalc
 - Added internal editor ported/rewritten from PicoMite:
     - Do a single edit using the internal editor:
         EDIT INTERNAL "helloworld.bas"
     - Do a persisted switch to the internal editor:
         OPTION EDITOR INTERNAL
     - ** Still has some bugs that need ironing out. **
     - ** Not feature-complete c.f. very latest PicoMite editor. **
 - Added BLIT RESIZE command:
     BLIT RESIZE src_id, dst_id, sx, sy, sw, sh, dx, dy, dw, dh [, transparent]
 - Added BREAKPOINT command to assist debugging the interpreter:
     BREAKPOINT
     - Placing a BREAKPOINT statement in an MMBasic program gives a developer
       a named, stable symbol at which a gdb breakpoint can be set, allowing
       execution to be paused at a precise MMBasic line.
 - Added DEVICE GAMEPAD sub-commands:
     DEVICE GAMEPAD INTERRUPT ENABLE id, interrupt [, bitmask]
     DEVICE GAMEPAD INTERRUPT DISABLE id
     DEVICE GAMEPAD LED id, red, green, blue
     DEVICE GAMEPAD RUMBLE id [, low_freq] [, high_freq] [, duration_ms]
     DEVICE GAMEPAD RUMBLE id, OFF
     DEVICE GAMEPAD RUMBLE TRIGGERS id [, left] [, right] [, duration_ms]
     DEVICE GAMEPAD RUMBLE TRIGGERS id, OFF
     - LED and RUMBLE TRIGGERS are currently untested as I don't have
       compatible hardware.
     - Note: DEVICE GAMEPAD VIBRATE has been renamed to DEVICE GAMEPAD RUMBLE.
 - Added DRIVE command as no-op for PicoMite simulation.
 - Added IN and OUT commands as no-op for PicoMite simulation:
     - On the PicoMite these are used with the PIO.
     - Having them in MMB4L, even if they don't do anything, prevents IN and
       OUT being used as variable names in programs intended to also run on
       the PicoMite.
 - Added LIST VARS command:
     LIST VARIABLES [ALL|GLOBAL|LOCAL|level%]
 - Added LOAD JPG command:
     LOAD JPG file$ [, x] [, y] [, mode] [, ximage] [, yimage]
 - Added LOG command:
     LOG [ DEBUG | INFO | WARNING | ERROR | FATAL ]? expression ...
     - See further description of logging support below.
 - Added MKFILE command for creating an empty file:
     MKFILE filename$
     - Helpful for testing, limited use in production.
 - Added OPTION KEYBOARD command as no-op for PicoMite simulation.
 - Added OPTION LOG command:
     OPTION LOG [ NONE | DEBUG | INFO | WARNING | ERROR ]
     - See further description of logging support below.
 - Added SAVE IMAGE command for saving .bmp files:
     SAVE [COMPRESSED|IMAGE|1BPP|24BPP|32BPP|RGB121|RGB121_RLE4|RGB222|
         RGB222_RLE8|RGB332|RGB332_RLE8|RGB555|RGB565] file$ [, x, y, w, h]
 - Added SAVE JPG command:
     SAVE JPG file$ [, x, y, w, h]
 - Added SETTICK PAUSE and SETTICK RESUME commands.
 - Added SPRITE LOADARRAY command:
     SPRITE LOADARRAY [#]id, w, h, array%()
 - Added ATAN2() function.
 - Added KEYDOWN() function for PicoMiteVGA + PicoMiteHDMI:
     - Available for all simulated platforms except Game*Mite and PicoCalc.
 - Added MM.INFO(FONT), MM.INFO(BCOLOUR), MM.INFO(FCOLOUR) functions.
 - Added PIXEL() function.
 - Added support for long lines, i.e. greater than console width, at prompt.
 - Added logging support to assist debugging the interpreter:
     - Writes "mmb4l.log" to directory in which MMB4L is started.
     - Set initial log level at command line with:
         --log [ none | debug | info | warning | error ]
     - Set via non-persistent option from within MMB4L:
         OPTION LOG [ NONE | DENUG | INFO | WARNING | ERROR ]
     - Write directly to the log:
         LOG [ DEBUG | INFO | WARNING | ERROR | FATAL ]? expression ...
 - Added support for 2nd FRAMEBUFFER to PicoMite simulation.
 - Added support for Fonts 8 and 9 from PicoMite.
 - Added BYVAL and BYREF keywords.
 - Added support for ANSI default terminal colour.
 - Added support for reading stdin from pipe or redirected input.
 - Added support for multibyte function tokens:
     - Removes the previous limit of 127/128 function tokens.
 - Added support for specifying a platform to simulate on the command line:
     RUN [filename$] [, cmdargs$] [AS {<device> | device$}]
     - e.g. RUN "foo.bas", "wombat" AS CMM2
     - Also via the * command, e.g. *CMM2 foo --wom --bat
     - If a platform is supplied at the command line then it is used as the
       default returned to by the NEW and RUN commands.
 - Added character coordinate variants of MM.INFO(HPOS|VPOS|HRES|VRES) and
   PRINT @:
       MM.INFO(HPOS C), MM.INFO(VPOS C), MM.INFO(HRES C), MM.INFO(VRES C)
       PRINT @C(x, y) "Hello World"
 - Added SETENV name$ = value$ as synonym for SYSTEM SETENV.
 - Added prompt history saved and restored to/from file.
 - Removed OPTION RESOLUTION command:
   - Replaced with explicit character coordinate variants of
     MM.INFO(HPOS|VPOS|HRES|VRES) and PRINT @; see above.
 - Changed FILES command to be reimplemented PicoMite-alike instead of
   delegating to operating-system 'ls'.
 - Changed MEMORY report to show used vs. available function and variable
   slots, and renamed "General RAM" to "Heap".
 - Changed termgfx cursor to use cell inversion instead of a flashing
   underline for improved visibility.
 - Changed platform switching: NEW and RUN no longer destroy graphics
   surfaces unless the platform is actually switched.
 - Changed EOF() behaviour to match PicoMite.
 - Changed CMM2 simulation: colour depth of 8 or 16 now treated as 32 in
   MODE command.
 - Changed MM.INFO(HRES|VRES) so they are disallowed for simulated platforms.
 - Changed SDL event polling to occur every 5ms rather than continuously:
     - Excessive polling was a major performance bottleneck.
 - Changed STDIN reading to use a worker thread:
     - The principal reason for this is that on Windows reading from STDIN
       is very slow.
 - Fixed bug in SDL audio buffering. Callback now processes full stereo frames
   instead of assuming a 1-sample buffer which reduces underruns and the
   crackling and popping in the sound that they were causing.
 - Fixed bug in single-line IF <expr> THEN <stmt1> ELSE <stmt2>:
     - Was broken if <stmt1> began with a command whose command token id was
       equal to ELSE's function token id.
 - Fixed bug where DefinedSubFun did not restore state when throwing an error.
 - Fixed bug where BLIT had edge condition errors with horizontal and vertical
   flip.
 - Fixed bug where block drawing characters in FONT 4 were incorrect.
 - Fixed bug where INC/CAT did not respect string array element length.
 - Fixed bug where SDL was not properly cleaned up on exit.
 - Fixed bug where display was not updated until the first button press on
   the R36S (dirty flag not set on SDL_WINDOWEVENT_SHOWN).
 - Fixed bug where gamepad struct id was 0 after gamepad_close().
 - Fixed bug where Mstrcpy() would segfault when src == NULL.
 - Fixed bug where MATH function complex number support used incorrect return
   type (test suite contributed by Peter Mather).
 - Fixed bug where INPUT$ returned no error given an invalid file number.
 - Fixed bug where temporary buffers were not released during SELECT/CASE
   processing.
 - Fixed bug where all files were not closed when program_process_file()
   exited.
 - Fixed bug where saving options to a directory instead of a file did not
   return an error.
 - Fixed bug where trailing separator was not stripped in file_getcwd() and
   file_get_home().
 - Fixed bug where audio track current used unsigned type with -1 sentinel.
 - Fixed bug where popen() output was not trimmed of leading/trailing
   whitespace.
 - Fixed bug where --version command-line option did not work correctly.
 - Fixed bug where console carriage-return was not handled correctly.
 - Fixed bug where backspace in the first column would move the cursor up
   in termgfx.
 - Fixed bug with [Delete] key behaviour in termgfx.
 - Fixed bug where show/hide cursor was not correct in MMgetchar().
 - Fixed bug where memory was not allocated for return values from
   MM.INFO(CPUSPEED), MM.INFO(CPUTIME) and MM.INFO(DRIVE)
     - Fix by @TomSchimana.
 - Fixed various uninitialised local variables reported by MSVC.
 - Fixed codepage pointer dereferencing for output.

Edited 2026-09-25 02:54 by thwill
MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
Volhout

Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 6133
Posted: 06:47am 25 Sep 2026
Copy link to clipboard 
Print this post

Hi Tom,

Simple installation (I had a running 0.7), just copy mmbasic to /usr/local/bin
Of coarse (since sound was my main issue with 0.7) tested the PLAY commands first.
Used OPTION SIMULATE "picomitevga". WAV and FLAC work fine. Only found an issue with PLAY TONE.

PLAY TONE only uses first frequency values, and only plays on one audio channel.
Since WAV and FLAC play fine, the interface between MMB4L and SDL2 should be okay. Must be something you could fix. Behaviour is the same with simulate picomiteVGA as well as default.

No big issue, just put it on your todo list for 0.9. It is great that sound works without needs of ALSA.

Regards,

Harm(Volhout)
PicomiteVGA PETSCII ROBOTS
 
Print this page


To reply to this topic, you need to log in.

The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2026