gtBASIC

Using, learning, programming and modding the Gigatron and anything related.
Forum rules
Be nice. No drama.
Post Reply
at67
Site Admin
Posts: 647
Joined: 14 May 2018, 08:29

Re: gtBASIC

Post by at67 »

jurkstas wrote: 07 Jan 2021, 13:39 Initially I was going to open the issue on your fork, but I couldn't. Disabled or maybe I don't have necessary role for it? See here: https://github.com/at67/gigatron-rom/issues it just redirects to pulls.
Aaaaah my bad, that should be fixed now.
jurkstas
Posts: 20
Joined: 05 Aug 2019, 17:06

Re: gtBASIC

Post by jurkstas »

at67 wrote: 07 Jan 2021, 13:43
jurkstas wrote: 07 Jan 2021, 13:39 Initially I was going to open the issue on your fork, but I couldn't. Disabled or maybe I don't have necessary role for it? See here: https://github.com/at67/gigatron-rom/issues it just redirects to pulls.
Aaaaah my bad, that should be fixed now.
Fixed. It is possible to transfer issues, but not sure if it is applicable to this situation: https://docs.github.com/en/free-pro-tea ... repository
at67
Site Admin
Posts: 647
Joined: 14 May 2018, 08:29

Re: gtBASIC

Post by at67 »

Don't worry about the current open issue on the main repo, no drama.
at67
Site Admin
Posts: 647
Joined: 14 May 2018, 08:29

Re: gtBASIC

Post by at67 »

Ver 1.0.6R, (Release) is available at https://github.com/kervinck/gigatron-ro ... ntrib/at67

Changelog:

Code: Select all

- Added the LOWER$() string function to the compiler.
- Added the UPPER$() string function to the compiler.
- Added the STRCAT$() string function to the compiler.
- Added the URND() function for generating unique non repeating sequences of random numbers for static allocations
  to the compiler.
- Added compound initialiser lists to the compiler using '{' and '}', see PucMon.gbas for an example.
- Added the MODULE command for including external files containing gtBASIC/vCPU source code to the compiler.
- Added handling of escape sequences for single and double quotes to the compiler and assembler.
- Added concatenation of temporary strings to the compiler, i.e. the results of string functions.
- Added nested string function handling to the compiler.
- Added assigning/concatenation/nested handling of string arrays to the compiler.
- Added a flashing cursor for the INPUT command to the compiler.
- Added multi dimensional array handling for the @ 'address of' operator to the compiler.
- Added CONST to the declaration of string arrays to the compiler, this allows string arrays that won't be changing
  their contents to be stored much more efficiently.
- Added the STRINGWORKAREA option to the FREE command to the compiler, so that the programmer doesn't have
  to know the hard coded addresses of temporary string buffers.
- Added the GPRINTF command to the compiler, works in a similar fashion to the Assembler's GPRINTF; see
  gbas/classic/Eliza.gbas for an example.
- Added chunk loading to the image loader for the compiler, this allows full screen images to be loaded in chunks
  after the loader has finished loading the .gt1 file.
- Added better error handling and reporting of missing line numbers and labels to the compiler.
- Added the vCPU HALT instruction to the assembler and dissassembler.
- Added %define, %if, %else and %endif to the assembler, allows for nested if's, but no boolean logic.
- Added drive letters for Windows to the emulator's browser windows.
- Added better auto switching to the 64K RAM memory model for the loading of files to the emulator.
- Added a classic sample .gbas directory to the compiler samples, a couple of them are works in progress and
  currently crash.
- Added a festive seasonal sample for 2020 to the gbas/demos sample directory.
- Added a simple but extendable binary MIDI format, (gtMID), to the gtMIDI tool and the compiler.
- Added a simple and unfinished gtMID playback option in the emulator, (use CTRL-A to access it), this allows for
  the playing of gtMIDI files with an equivalent audio fidelity as the Gigatron's hardware; thus being able to test
  MIDI playback without having to write .gbas source code.
- Added flashing cursor to the Terminal and Audio Modules command lines in the emulator.

- Changed the # operator to act as a sizeof function, thus reporting allocated memory rather than length.
- Changed the LEN() function to be more consistant across all data types.
- Changed ADDR() function to use normal function parsing, rather than parsing multi dimensional array indicies
  and thus being limited to multi dimensional arrays.

- Fixed not freeing all temporary string work buffers in the compiler, see the FREE STRINGWORKAREA command.
- Fixed delay in MIDI startup for the compiler.
- Fixed delay in vBlank startup for the compiler.
- Fixed a conflict between the INPUT command and hex editing in the emulator.
- Fixed a number of .gbas samples, miscellaneous bugs and glitches.
jurkstas
Posts: 20
Joined: 05 Aug 2019, 17:06

Re: gtBASIC

Post by jurkstas »

Awesome, thanks for the release!
at67
Site Admin
Posts: 647
Joined: 14 May 2018, 08:29

Re: gtBASIC

Post by at67 »

Ver 1.0.7R, (Release, runtime 0101) is available at https://github.com/kervinck/gigatron-ro ... ntrib/at67

Changelog:

Code: Select all

Ver 1.0.7R, (Release, runtime 0101)

- Added the 'LOAD MIDI' command to the gtBASIC compiler, currently supports gtMID binary format MIDI
files created by the gtMIDI tool.
- Added the 'TCLIP <ON/OFF>' command to the gtBASIC compiler, this enables/disables text clipping
when printing; useful for printing into offscreen areas, (use with caution).
- Added an experimental pragma '_enable6BitAudioEmu_ <ON/OFF>' to the gtBASIC compiler, this
enables/disables full 6bit audio for ROM's >= ROMv5a, (currently experimental and emulation only).
- Added a MIDI player/visualiser to the Audio Editor, (CTRL+A), this allows you to play .gtMID files and
experiment with 4bit and 6bit qualities, see the res/audio/midi samples directory.
- Added a few music samples to the gbas/audio samples directory.
- Added a pre-converted .gtMID files sample folder.
- Fixed the 'TICK' command to be more consistant and more flexible when using it for multiple time
sliced routines.

Ver 1.0.6R, (Release)

- Added simple version control to the runtime, runtimes must now exactly match what the compiler
expects, (defined in runtime/util.i and assembler.h). The current runtime as of this release is 0100,
all previous runtimes are defined as 0000, runtime versions will only change when the runtime changes.
- Added value handling to %define, defines can now be any value that int16_t supports, not just on or off.
- Removed some code duplication from linker.cpp that was duplicating some of the %define functionality
in assembler.cpp
- Changed the top left hand flashing pixel error message for incorrect ROM versions to center pixel
flashing, it is more noticable now and won't be hidden by app's like PucMon that disable a few top and
bottom scanlines for extra code space.
- Added better syntax error handling, it's still not perfect.
- Added the _USERCODESTART_ pragma, e.g. '_userCodeStart_ &h0300'.
- Cleaned up the Classic/Bowling.gbas sample a little.
User avatar
vk2
Posts: 3
Joined: 15 Jul 2018, 20:49

Re: gtBASIC

Post by vk2 »

Thanks! Any plans to implement MIDI OUT support?
at67
Site Admin
Posts: 647
Joined: 14 May 2018, 08:29

Re: gtBASIC

Post by at67 »

vk2 wrote: 18 Jan 2021, 07:24 Thanks! Any plans to implement MIDI OUT support?
Cheers.

I assume you mean MIDI IN/OUT for the controlling of external MIDI devices? If so, unless someone builds a MIDI compatible breakout board there's not much the Gigatron can do in this department.
Maniccyberdog
Posts: 14
Joined: 11 Nov 2018, 13:18

Re: gtBASIC

Post by Maniccyberdog »

Thanks for this @at67, just getting back to my gigatron (lockdown project!). I can confirm that it will build on a Rpi 400, the sound is a little choppy in the emulator, but so far everything seems fine. Would it be possible for you to add ‘set(CMAKE_CXX_LINK_FLAGS "${CMAKE_CXX_LINK_FLAGS} -latomic")’ to the make lists.txt for build type of arm. As this was needed to link
at67
Site Admin
Posts: 647
Joined: 14 May 2018, 08:29

Re: gtBASIC

Post by at67 »

Maniccyberdog wrote: 23 Jan 2021, 09:13 Thanks for this @at67, just getting back to my gigatron (lockdown project!). I can confirm that it will build on a Rpi 400, the sound is a little choppy in the emulator, but so far everything seems fine. Would it be possible for you to add ‘set(CMAKE_CXX_LINK_FLAGS "${CMAKE_CXX_LINK_FLAGS} -latomic")’ to the make lists.txt for build type of arm. As this was needed to link
Nice! I only received my RPi400 a few days ago and it is still in it's box, I'll have a play and see if I can do something about the sound.

With regards to getting it building on the RPi, you can do a pull request with the changes you made at https://github.com/at67/gigatron-rom if you like; that way you get credit recorded in the repo for a problem you solved, (if you can't or don't have time, let me know and I'll do it when I have a look at the sound issue).

P.S. Welcome back!
Post Reply