Download
THOREAU_GM.TBGM · losslessly compressed wavetable · 513.5 MB
New in 3.6
Text for big screens, missing sprite queries, clearer program loading and a rare JIT error that a harmless edit could make disappear.
- Text for 4K screens. The text area grows
to 512 columns and 256 rows. A 3840×2160 screen has 480×135
text cells for
LOCATE,PRINTand text windows; 3.5 stopped at 256×128. - FN without parentheses. After
DEF FN Pi()=3.1416,PRINT FN Picalls the function, asFNPidoes. Assigning to the name of a defined function is now an error instead of creating a variable that can never be read. - Sprite state and pause.
SPRITEVISIBLE(n)andSPRITEEXISTS(n)ask about an instance without raising errors.SPRITEPAUSE ONhides every sprite for a menu or options page, andSPRITEPAUSE OFFbrings them back as they were. - Safe loading.
LOAD,RUNfile$,MERGEandCHAINread the whole file before changing anything, and errors name the line:Line too long (file line 1234, line 5680). A UTF-8 byte-order mark is skipped. - JIT. The rare error
JIT regional GOSUB escapedis gone. A compiledGOSUBwhose subroutine leaves withoutRETURNcontinues exactly as withJIT OFF. - UEFI mouse. A PS/2 mouse read without a firmware driver now moves at the firmware pointer's speed instead of one pixel per count.
Check existing programs. A program that
assigns to the name of one of its own DEF FN
functions now stops with error 2; rename the variable.
Re-create standalone EXE/EFI applications to include the new
runtime.
Also included from 3.5
3.5 was a correctness release. Unsuffixed literals take the
type of the other operand, so X#+2.7 adds the
double-precision 2.7. Native JIT code gives the same results,
errors and error lines as the interpreter, PRINT,
PRINT USING and WRITE follow
GW-BASIC rules, statements reject invalid trailing text, DEF
FN accepts empty parentheses and PARFOR
subroutines nest as deeply as in FOR. On
Windows, WinMM joysticks got new slot numbers. Read UPGRADING
in the release notes when moving programs from 3.4.x.
Also included from 3.4.x
Colors have one meaning everywhere: packed 24-bit RGB, built
with RGB(r,g,b) or converted from a classic
palette index with PALETTERGB(index). CREATEEXE
and CREATEEFI accept NODEBUG for
packaged applications. GETBMP and GETSPRITE
capture drawn rectangles as bitmaps and sprites, and gamepads
and joysticks have a polling interface (JOYAXIS,
JOYBUTTON, JOYHAT and more) with
XInput and WinMM on Windows and experimental generic USB HID
support on UEFI. Screen pages, named callbacks and SELECTBOX
remain available.
See the manual and 3.6 release notes for the complete changes, syntax, controller mappings and platform limits.
What it is
Thoreau BASIC starts from GW-BASIC-style syntax but is not
trapped in 1983. It has 64-bit memory, 24-bit graphics,
sprites, mouse and joystick input, TCP/IP and HTTP, a complete
GM/GS wavetable with MIDI/WAV/FLAC/Opus playback,
complex/quaternion/octonion values, a debugger, profiler,
source tools, multicore PARFOR, and native x64
JIT compilation with automatic loop SIMD.
The same BASIC language runs as a normal Windows program or directly from UEFI firmware without an operating system. BASIC programs can also be packaged as standalone Windows EXE or bootable EFI applications.
Still BASIC
10 CLS
20 PRINT "HELLO FROM THOREAU BASIC"
30 FOR I=1 TO 5
40 PRINT I
50 NEXT I
60 END
RUN
And now the orchestra is BASIC too:
SOUND PRELOAD
LOADMID 0,"BALLADE.MID"
PLAYMID 0
Graphics, networking and sound remain ordinary BASIC commands, not separate frameworks.
BASIC without an operating system
The UEFI build boots directly on x64 machines. It uses GOP graphics, firmware or raw HID keyboard input, mouse support with fallbacks, networking through firmware protocols or Thoreau's own SNP-based stack, HDA/Azalia PCM sound where available, and the same interpreter/JIT and GM wavetable used by the Windows version.
The UEFI build also includes experimental USB HID gamepad/joystick polling. It requires a compatible controller exposed by the firmware and connected at application startup; it is not a universal controller driver.
Project
The project page and downloads are on itch.io.
Contact
Bug reports, compatibility notes and strange BASIC edge cases are very welcome.
To support development, PayPal is available. No nag screens, no locked features.