Skip to content

Releases: QB64-Phoenix-Edition/QB64pe

v4.0.0

14 Dec 10:15
8cfb91e
Compare
Choose a tag to compare

Long time announced, now finally done and the main reason for us to give this release a major version bump, is the deprecation of $NOPREFIX. But no worries, we've added a converter which will automatically transform your old $NOPREFIX using programs back to the regular underscore using syntax as soon as you open such a program. Aside from some subtle side cases, the converter should perfectly do its job without requiring further manual adjustments afterwards.

Moreover the new version got a big audio library update with lots of new features, and a comprehensive new logging system which will help debugging and streamlining your programs. These two had been probably worth a major version bump by itself. Also to highlight is the addition of several new precompiler flags and a huge set of preset constants for use in your programs.

QB64-PE v4.0.0 - Thanks to everyone who contributed to this brand new version.

Breaking changes

  • #544, #548 - Complete deprecation of $NOPREFIX. - @RhoSigma-QB64
  • #553 - Added automatic $NOPREFIX to underscore usage converter, triggered when a file using $NOPREFIX is opened in the IDE. If the user agrees to convert, a backup of the file and any includes are made. - @flukiluke

Enhancements

  • #535 - Relax ALIAS function name validation, closing issue #493. - @a740g
  • #536, #571, #572 - The "Export As ..." feature now checks for an active selection first. If there is one, only the selected code is exported, otherwise the entire source will be exported as usual. Plus some adjustments for new commands. - @RhoSigma-QB64
  • #550 - added new _MOUSEHIDDEN function. - @RhoSigma-QB64
  • #558 - Implements the _QB64PE_ precompiler flag, closing issue #551. - @RhoSigma-QB64
  • #561 - Various enhancements to the IDE and the Compiler. - @RhoSigma-QB64
    • Now showing the syntax for all user defined SUBs and FUNCTIONs for better reference in the status messages.
    • Added lots of preset constants available in every program by default.
    • Added _MIN, _MAX, _ENCODEURL$ and _DECODEURL$ functions.
  • #562 - The HTTP support for _OPENCLIENT is stabilized now, $UNSTABLE:HTTP is no longer required. Also added the _DEBUG_ precompiler flag, closing issue #29. - @RhoSigma-QB64
  • #565 - The big audio library update. - @a740g

Lot of things:

  • PLAY now ignores the ";" character as QB4.5 did, fixing issue #554
  • Adds Pink noise, Brownian noise, LFSR noise, pulse, and custom (_WAVE) waveform support to SOUND & PLAY
  • Adds support for ADSR envelope for SOUND & PLAY
  • Adds multi-channel (4 voice) support for SOUND & PLAY
  • Adds SOUND WAIT and SOUND RESUME support for multi-channel for SOUND & PLAY
  • Adds Amiga Basic like _WAVE command, closing issue #187
  • Adds support for _SNDRAWBATCH that can push a batch of audio sample frames at once compared to just one frame that _SNDRAW supports
  • Moves BEEP out of the audio library, i.e. a simple BEEP no longer pull in the entire audio library
  • Restores CHR$(7) beep support (due to the above change)

New commands and enhancements:

  • SOUND frequency!, duration![, volume!][, panning!][, waveform&][, waveformParameters!][, voice&]
  • SOUND WAIT
  • SOUND RESUME
  • PLAY voiceCommands1$[, voiceCommands2$][, voiceCommands3$][, voiceCommands4$]
  • remainingTime# = PLAY([voice&])
  • _WAVE voice&, waveDefinition%%([index&])[, frameCount&]
  • _SNDRAWBATCH array!([index&])[, channels&][, handle&][, frameCount&]

PLAY MML language improvements (special thanks to @grymmjack for guidance):

  • Wn / @n: waveform select (1 = SQUARE, 2 = SAWTOOTH, 3 = TRIANGLE, 4 = SINE, 5 = NOISE_WHITE, 6 = NOISE_PINK, 7 = NOISE_BROWNIAN, 8 = NOISE_LFSR, 9 = PULSE, 10 = CUSTOM_WAVE)
  • /n: attack (percentage of total note time 0 - 100)
  • \n: decay (percentage of total note time 0 - 100)
  • ^n: sustain (percentage of MML volume 0 - 100)
  • _n: release (percentage of total note time 0 - 100)
  • Yn: extra params for current waveform (percentage 0 - 100 - usually for pulse wave)
  • Sn: pan position (0 to 100) where 0 is leftmost and 100 is rightmost
  • R / P: rest / pause
  • V+ & V-: Volume increment / decrement (single-step & clamped)
  • S+ & S-: Pan right / left (single-step & clamped)

This adds new logging capabilities to QB64, both internally from libqb and also exposed to the QB64 code. Beyond being a bit nicer than a Print since it captures the function name and line number, a big feature is that logging an error captures a stacktrace of the program at that point. Logging can also easily be turned on without recompilation via environment variables, and can be filtered via various scopes and a couple different logging levels. Overall this should hopefully be a big aid for debugging, as we can ask users to provide us with the logging output of programs when they error.

Below is an example of some logging from a QB64 program (note how the IDE opens a separate console window to display it):
image

The new commands are _LOGTRACE, _LOGINFO, _LOGWARN, _LOGERROR and _LOGMINLEVEL. The first four write out log messages at the indicated log level. The last returns a number indicating the lowest level of logging is enabled, allowing you to skip generating more expensive logging if it won't be displayed.

Logging is enabled via a variety of different environment variables (when run from the IDE these are configured automatically):

  1. QB64PE_LOG_LEVEL - sets the lowest log level to display, options are Trace, Information, Warning, Error
  2. QB64PE_LOG_SCOPES - A comma-separated list of different sets of logging to turn on, allowing basic filtering of what is displayed. Options are:
    a. libqb - Some generic logging from libqb, such as error codes when they happen, program startup/shutdown, etc.
    b. libqb-image - Logging from the image subsystem (when images are loaded,freed, errors that happen, etc.)
    c. libqb-audio - Logging from the audio subsystem
    d. qb64 - Logging from the QB64 Program ( _Log* statements)
  3. QB64PE_LOG_HANDLERS - A comma-separated list of the logging handlers to enable. If no handlers are enabled, then no logging is generated. Current options are:
    a. console - Logging output is written to the console.
    b. file - Writes logs to the file set via the QB64PE_LOG_FILE_PATH environment variable

Currently the IDE just defaults to using Information and enabling all the scopes, in a future update I'd like to have an IDE dialog that lets you pick the log level and scopes.

Bug fixes

  • #534 - Allows users to revert to the built-in soundbank by passing an empty string to _MIDISOUNDBANK. Before it was not possible to switch back to the default soundbank once an external one had been used with _MIDISOUNDBANK. - @a740g
  • #537 - Fixed some wrong Wiki links in exported code. - @RhoSigma-QB64
  • #546 - Update clipboard library to latest, fixing issue #541. - @a740g
  • #557 - Fixed a bug where KILL, FILES, and _FILES$ unintentionally shared a static DIR pointer when performing file searches. As a result, calling any of these functions would reset the search state of _FILES$, leading to unexpected behavior. This issue was reported here. - @a740g
  • #560 - Fixed unary negation when using CONST, closing issue #542. - @mkilgore
  • #568 - Reloading a MIDI file with a different soundfont now works as expected, also _MEMSOUND now works correctly with fully decoded MEMORY sounds. - @a740g
  • #570 - Re...
Read more

v3.14.1

27 Aug 09:28
Compare
Choose a tag to compare

Enhancements

  • #531, #532 - Extended ON ERROR GOTO syntax - @RhoSigma-QB64
    • _NEWHANDLER and _LASTHANDLER keywords allow for easy overriding and restoring of error handlers

Bug Fixes

Full Changelog: v3.14.0...v3.14.1

Developer Notice

We are probably going to deprecate the $NOPREFIX feature sooner or later in the future. Nothing is finally decided yet, but as we have more and more efforts to keep new things compatible with $NOPREFIX it's a decision we've to make. Especially CONST and the pre-compiler metacommands show bad interactions with $NOPREFIX over and over again and make implementations overcomplicated.

With this notice we wish to get your attention for the issue and recommend to adapt your coding habits to no longer rely on $NOPREFIX right now, so it becomes an easy transition when we finally drop it.

v3.14.0

08 Aug 16:13
Compare
Choose a tag to compare

Enhancements

  • #499 - Reliably enable window defocus on Linux. - @flukiluke
  • #501 - Modifies _FILES$ to default to the * pattern rather than *.* when fileSpec$ is empty, enabling _FILES$ to retrieve all directory entries rather than omitting files and directories that lack an extension. - @a740g
  • #502 - Optimize IDE internal string concatenation somewhat to reduce IDE lag. - @SteveMcNeill
  • #503 - Allow _UPRINTSTRING to render directly into any image, which can be specified as an optional argument. - @a740g
  • #506 - Added Metacommands and Variable Types items to the Help menu for quick access to these essential help pages. - @RhoSigma-QB64
  • #508 - Introducing the brand new Format Mode as command line switch. - @flukiluke
    • The -y command line option will format the input instead of compiling it.
    • Formatting is performed either according to the current IDE settings (Options > Code Layout...) or by overriding those settings using the new -f flags, e.g. ./qb64pe -y source/qb64pe.bas -f:autolayout=true -f:keywordcapitals=true -f:autoindent=true -f:autoindentsize=4 -f:indentsubs=true -o source/qb64pe.bas
  • #510 - Optimizes _DEFLATE$ and _INFLATE$ to eliminate unnecessary buffer copies. This results in a nice speed boost of upto 15% in some cases. - @a740g
  • #517 - Stabilized and updated MIDI support. - @a740g
    • MIDI support in QB64-PE is finally out of the $UNSTABLE state now.
    • The compiled executable will no longer include an embedded soundfont.
    • To address this issue discussed in the forum, ymfmidi, Opal, and a tiny FM bank are now used.
    • Soundfonts can be loaded using the _MIDISOUNDBANK command.
    • Depending on the sound bank type, a suitable MIDI rendering backend is selected.
    • The available backends are primesynth (SF2), TinySoundFont (SF3, SFO), and Opal (AD, OPL, OP2, TMB, WOPL).
    • For Windows users, a VSTi 2.x based renderer that is configurable by the user is also provided.
    • Multiple MIDI file formats are supported: MUS, HMI, HMP, HMQ, KAR, LDS, MDS, MIDS, RCP, R36, G18, G36, RMI, MID, MIDI, XFM, XMI
    • The use of $UNSTABLE:MIDI and $MIDISOUNDFONT triggers an appropriate "deprecated feature" warning message now.
  • #519 - Various IDE improvements. - @RhoSigma-QB64
    • Changing certain toggle settings in the Options Menu no longer causes your code to be marked as "changed".
    • IDE related config and workfiles were moved out of internal/temp into settings directly under the qb64pe folder.
    • Note the folder does not exist in the release archives, but is created on the first IDE run, at this time the user has a choice to import his settings from another QB64-PE installation or to continue with default settings.
    • The recent files and search string histories are globally shared now by all running IDE instances, limits can be set in the Undo/History... dialog (Options Menu).
    • We've added 4 new preset color schemes, Cornfield, Broadcast, X11 SgiColors by me (@RhoSigma-QB64) and VS Code curtesy to @a740g. If you use your own custom scheme, then it's ID will be automatically adjusted when importing your settings.
  • #520 - _LOADIMAGE and _SAVEIMAGE improvements. - @a740g
    • Added support to load ICO (icon) and CUR (cursor) files.
    • Added support to save ICO (icon) and single GIF (not animated ones) files.
  • #525 - Improving IDE Option dialogs. - @RhoSigma-QB64
    pic1
    pic2

Lib/MinGW Updates

  • #513 - Updated nanosvg and stb_image to latest available versions. - @a740g
  • #522 - Update to LLVM-MinGW 20240619 with LLVM 18.1.8 for WoA. - @a740g

Bug Fixes

  • #497, #527 - Properly initialise memory when REDIMming with UDT, fix #331, #524. - @flukiluke
  • #500 - Allow setting environment variables with space in values on Linux, fix #386. - @flukiluke
  • #503 - Font fixes, in some fonts the underscore was clipped away with _UPRINTSTRING. - @a740g
  • #506 - IDE Help fixes. - @RhoSigma-QB64
    • Select All (CTRL-A) in the help text actually didn't select ALL after text was selected manually once before, because some internal variables were not reset correctly (bug dates back to the ancient SDL versions).
    • Fixed Definition Lists eating the first text char, if the list introducer is followed by a space.
  • #513 - Fixed the PCX image loader issues reported in the forum. - @a740g
  • #515 - Avoid eating 0-argument functions used after L/UBOUND, fix #244. - @flukiluke
  • #523 - Fixing a bug in the KILL command, which would previously terminate and fail to process the remaining files if the user opted to continue after an error condition. - @a740g

Full Changelog: v3.13.1...v3.14.0

Developer Notice

We are probably going to deprecate the $NOPREFIX feature sooner or later in the future. Nothing is finally decided yet, but as we have more and more efforts to keep new things compatible with $NOPREFIX it's a decision we've to make. Especially CONST and the pre-compiler metacommands show bad interactions with $NOPREFIX over and over again and make implementations overcomplicated.

With this notice we wish to get your attention for the issue and recommend to adapt your coding habits to no longer rely on $NOPREFIX right now, so it becomes an easy transition when we finally drop it.

v3.13.1

15 May 22:44
Compare
Choose a tag to compare

What's Changed

  • #490 - Refactor RAD v2 Opal OPL3 FM Emulator - @a740g
  • #491 - Multiple font related optimization and improvements - @a740g
    • Especially some monospaced fonts related quirks discovered with the previous release have been fixed

Full Changelog: v3.13.0...v3.13.1

v3.13.0

01 May 18:52
Compare
Choose a tag to compare

Enhancements

Bug Fixes

  • #468 - Fixed _MOUSEMOVEMENTx behavior on macOS. - @a740g
  • #470 - Fixed an issue where the IDE would lock up if the source code had too many DATA statements on macOS. - @a740g
  • #473 - Fixed the "Export As" menu state in the IDE. - @RhoSigma-QB64
  • #474 - Fixed the GLUT thread to redraw at an accurate 60 FPS. - @mkilgore
  • #476 - Fixed an issue on Windows where special keys were monitored even when the window was not in focus. - @a740g
  • #477 - Fixed the IDE to open the GUI file dialog when Ctrl+S was pressed and GUI Dialogs were enabled. - @a740g
  • #480, #487 - Fixed mono-mode font rendering and quality issues, and corrected font width calculations when loading monospaced fonts. - @a740g
  • #481 - Fixed an issue that would cause LLVM-MinGW to incorrectly generate Windows GUI applications when $CONSOLE was used. - @a740g
  • #484 - Fixed macOS startup script bugs. - @tothebin
  • #485 - Fixed various wiki issues. - @RhoSigma-QB64
  • #486 - Fixed an issue where the IDE was reporting an incorrect error. - @SteveMcNeill

Other Fixes

Full Changelog: v3.12.0...v3.13.0

v3.12.0

28 Feb 18:22
Compare
Choose a tag to compare

Enhancements

  • #438 - Reduced memory impact of the Export As feature for large sources. - @RhoSigma-QB64
  • #442, #450, #433 - Implemented checks for External Dependencies into the IDE. - @RhoSigma-QB64
    • Formerly, if changes to $INCLUDE, $EMBED, $EXEICON, $MIDISOUNDFONT or DECLARE LIBRARY files were made while the main source was opened in the IDE, a fake change like adding/removing a line was required to force the IDE to recompile/rebuild the source when pressing F5/F11.
    • Now you can simply hit F5/F11 again (even after a programming error happened in such external file which is still displayed in the IDE status area) and the IDE will automatically recognize changes to those external files and recompile/rebuild the source as needed. No more fake changes are required.
  • #444, #447 - Implemented new checksum and hashing functions. - @RhoSigma-QB64
  • #448, #240 - Implemented the $INCLUDEONCE metacommand. - @RhoSigma-QB64
    • This works like the known #pragma once in C/C++ and avoids the need for $IF DEFINED... style include guards.
  • #454 - Implemented the _READFILE$ and _WRITEFILE commands - @RhoSigma-QB64
    • These functions will read/write whole files without OPEN/CLOSE overhead, hence similar to BLOAD/BSAVE.

Lib Updates

Bug Fixes

  • #426 - Several fixes to _FILES$. - @a740g
  • #428 - Fixed bug where OPEN COM would lock the program up. - @a740g
  • #435, #359, #196, #192 - CONST evaluation was rewritten to resolve several longstanding issues - @mkilgore
    • CHR$() and ASC() can now be used in CONST expressions.
  • #449 - Fixed $IF prioritization, $IF can now be used around $NOPREFIX, $COLOR and $DEBUG - @SteveMcNeill
  • #462, #461 - Fixed typo in -? usage details. - @grymmjack

Full Changelog: v3.11.0...v3.12.0

v3.11.0

03 Jan 17:23
Compare
Choose a tag to compare

Enhancements

  • #419 - Filesystem refactor and update - @a740g
    • Added _FILES$ to read file and directory names programmatically.
    • Added _FULLPATH$ to get an absolute or full path name for a specified relative path name.
    • _DIR$ now works as expected on Linux & macOS.
    • FILES now works on Linux & macOS.
    • KILL now supports deleting files on Linux & macOS using wildcards.
  • #421 - Updated MinGW-GCC to v13.2.0 and LLVM-MinGW to v17.0.6 - @a740g
  • #422 - Updated miniaudio to v0.11.21 - @a740g

Bug Fixes

  • #420 - Fixed several CONST issues - @SteveMcNeill
    • Negative &H, &B, and &O numbers will now evaluate to the correct values.
    • Type suffixes on numbers will no longer cause CONST to ignore the rest of the expression past the suffix.
      • Ex. 20& + 1 previously caused the + 1 to be ignored, it now evaluates correctly as 21.

Full Changelog: v3.10.0...v3.11.0

v3.10.0

18 Dec 20:05
Compare
Choose a tag to compare

Enhancements

  • #392 - Allow single quoted strings in $VERSIONINFO. - @a740g
  • #399 - The IDE waits for release of F5 key before running the program to avoid start of multiple copies of the program. - @SteveMcNeill
  • #401 - Add Support for optional paramter for an image handle to CLS. - @SteveMcNeill
  • #404 - Increased the maximum number of possible SUBs/FUNCTIONs in a program from 1000 to 25000. - @SteveMcNeill
  • #414, #415 - Implemented $EMBED metacommand and _EMBEDDED$ function. - @RhoSigma-QB64
    • Can be used to embed any files (images, sounds, fonts and other assets) into the compiled executable and recall it in the program when needed.
    • Read the respective Wiki pages: $EMBED and EMBEDDED$

Bug Fixes

Full Changelog: v3.9.1...v3.10.0

v3.9.1

08 Oct 19:04
Compare
Choose a tag to compare

Bug Fixes

Full Changelog: v3.9.0...v3.9.1

v3.9.0

05 Oct 04:42
Compare
Choose a tag to compare

Enhancements

  • #368 - Image library enhancements. - @a740g
    • Adds the _SAVEIMAGE fileName$[, imageHandle&][, requirements$] statement
      • It can save graphics and text screens / images as PNG, QOI, BMP, TGA, JPG and HDR
    • Adds SVG vector image loading support from files and memory buffers
    • Adds QOI image loading support from files and memory buffers
    • Adds high quality pixel scaler support
      • Scalers can be used only during image loading and thus has zero performance impact when the image is in use
      • 6 supported scalers that can be used by specifying the scaler name in _LOADIMAGE's requirements$ string
        • SXBR2 - Super-xBR 2x
        • MMPX2 - MMPX Style-Preserving 2x
        • HQ2XA - High Quality Cartoon 2x
        • HQ2XB - High Quality Complex 2x
        • HQ3XA - High Quality Cartoon 3x
        • HQ3XB - High Quality Complex 3x
  • #370, #352, #374 - Audio library enhancements. - @a740g
    • QOA format support
    • Updates miniaudio to v0.11.18
    • Includes latest fixes for Hively Tracker and TinySoundFont
    • Updates Libxmp-lite to v4.6.0
    • Removes the legacy LGPL OpenAL audio backend
  • #356, #361 - Adds Save As OS-native GUI dialog support to the IDE. - @SteveMcNeill
  • #373 - IDE editor enhancement. - @RhoSigma-QB64
    • Now when the Home key is pressed, the cursor will only jump to the start of line if its current position is exactly on start of text, and from all other positions in the line (including anywhere in the indention space) it will always jump to start of text
  • #367 - Adds support for FNT, FON, PCF and BDF fixed width bitmap fonts. - @a740g
  • #371 - Updates MinGW. It now supports GCC 13.1.0 with MinGW runtime v11. - @a740g
  • #380 - Adds initial Windows on ARM support using LLVM-MingW. - @a740g
    • For now, Windows on ARM versions of QB64-PE can only be built by locally cloning the repository and then running setup_win.cmd
  • #379 - Updates libstem Gamepad library to the latest version. - @a740g

Bug Fixes

  • #351 - Fixes and issue where fonts were getting vertically misaligned. - @a740g
  • #367 - Fixes a seg-fault when using fonts on macOS as reported by @grymmjack. - @a740g
  • #353 - Fixes DECLARE DYNAMIC LIBRARY path issue. - @a740g
    • QB64-PE will no longer replace ./ with an absolute path
  • #358 - Fixes a bug that was hiding part of the IDE screen by the Window frame when compiled with LLVM-MingW. - @a740g
  • #365 - Patches a compiler function CopyFile() to clear the file first before writing. - @SteveMcNeill
  • #366 - Fixes CONST Blink ($COLOR:0) and _BLINK name collision with $NOPREFIX is used. - @SteveMcNeill
  • #372 - Fixes PRINT to print spaces and tabs correctly when _KEEPBACKGROUND is set. - @a740g
  • #377 - Fixes wrong KSL (key scale shift) values in RAD player. - @a740g

Full Changelog: v3.8.0...v3.9.0