* WalrusIRC

You need to have 5 posts and not be part of restricted usergroups in order to use the WalrusIRC embedded shoutbox. However, you can also access our IRC channel called #CodeWalrus via EFnet.

Author Topic: BuinoBasic - Basic Compiler and VM for the Gamebuino  (Read 2575 times)

0 Members and 1 Guest are viewing this topic.

Offline DarkestEx

  • Super User
  • Join Date: Jan 2015
  • Location: Germany
  • Posts: 1324
  • Post Rating Ratio: +10/-2
    • @0xbmuessig
    • @muessigb
    • My homepage
  • Gender: Male
BuinoBasic - Basic Compiler and VM for the Gamebuino
« on: May 25, 2015, 09:17:24 pm »
This is my latest and almost my largest project so far. A Basic compiler and VM for the Gamebuino platform.
You can find more information on GitHub (VM, Compiler), on my blog and my project page.


What is BuinoBasic?
BuinoBasic consists of two main parts, which are the BuinoBasic compiler (or short bcc) and the BuinoBasic VM (bvm). The compiler takes your Basic source code and translates it into a memory structure, that your computer can understand. These structures are then compiled into binary tokens and then saved to a file. You then put the file onto your Gamebuino's SD card. Now the VM comes into play. It's job is to execute the binary tokens and perform the operations assigned to them. So you flash the VM's compiled hex file onto the Gamebuino like any other game using the loader. Now you can select a file you want to run. After selecting your file, the VM will validate and start executing it.


What features does BuinoBasic bring?
BuinoBasic allows you to use a subset of (Q/GL)Basic for the syntax of your game's source code. Basic is one of the easiest and in this dialekt a very powerful language, supporting functions, 8-64 bit integers, strings and even arrays. It has flow control blocks, I/O, sound, graphics, file management functions. But that is not the end. Using BuiniBasic, you don't have to reflash your Gamebuino to load a new game, making it faster to play or to debug a new game. Just drop it onto the SD and start it in the VM. This will also save you flash-cycles making your Gamebuino's main MPU's memory last longer. There will even be a small compiler on the Gamebuino itself, which allows you to experiment with a limited Basic subset on the fly! But as everything, BuinoBasic also has its drawbacks. It is a some slower than plain C++ and a lot slower than optimized assembly. Also does BuinoBasic not allow you to include any kind of unmanaged code, so any hardware feature must be implemented as a function or it won't work, but you can still request a new feature to be added.


How can I help with Development?
Help is always welcome! Below you will find a list of tasks with which you can contribute:

  • If you are good at C, I'd be happy to welcome you in our VM team. Together we can make it happen a lot faster!
  • If you're good with C# you can help with the compiler and make it more awesome than ever expected. :)
  • If you are good with Basic, you could set some Demo programs up or help with the syntax.
  • If you are good at HTML and CSS, we'd love to see what new design, you make for our page.
  • If you feel like writing, and know a little Basic you could help writing the Basic documentation and provide some graphics.
  • If you are not able to help with the above, you can still beta test on an actual device or emulator.
And don't forget to spread Gamebuino and BuinoBasic to the world!


  • Calculators owned: TI-84+, Casio 101-S, RPN-Calc, Hewlett-Packard 100LX, Hewlett-Packard 95LX
  • Consoles, mobile devices and vintage computers owned: Hewlett-Packard 100LX, Hewlett-Packard 95LX, Original Commodore 64C, Tektronix AWG2021, IBM X60s, IBM X60t, Nintendo DS Lite, Nintendo GameBoy Color, Nintendo GameCube, Xbox 360, Palm m5


Avatar drewn for me by Tabbes.

Offline Snektron

  • Lvl 69 Russian Snake
  • CodeWalrus Staff
  • Super User
  • Topic Management
  • Join Date: Dec 2014
  • Location: Netherlands
  • Posts: 3165
  • Post Rating Ratio: +32/-0
  • SSSssssss.....
    • RobinDeWalvis
    • Kzyrox
    • RobinDeWalvis
    • quantuminfinity
  • Gender: Male
Awesome :D

also you copied this from your site, didn't you? :P
  • Calculators owned: TI-84+
Legends say if you spam more than DJ Omnimaga, you will become a walrus...


Offline DarkestEx

  • Super User
  • Join Date: Jan 2015
  • Location: Germany
  • Posts: 1324
  • Post Rating Ratio: +10/-2
    • @0xbmuessig
    • @muessigb
    • My homepage
  • Gender: Male
Awesome :D
Thanks :)

also you copied this from your site, didn't you? :P
Write once, paste many :P
  • Calculators owned: TI-84+, Casio 101-S, RPN-Calc, Hewlett-Packard 100LX, Hewlett-Packard 95LX
  • Consoles, mobile devices and vintage computers owned: Hewlett-Packard 100LX, Hewlett-Packard 95LX, Original Commodore 64C, Tektronix AWG2021, IBM X60s, IBM X60t, Nintendo DS Lite, Nintendo GameBoy Color, Nintendo GameCube, Xbox 360, Palm m5


Avatar drewn for me by Tabbes.

Offline xlibman

  • Omni founder & CW co-founder
  • CodeWalrus Staff
  • Super User
  • Original 5
  • CodeWalrus Supporter
  • *
  • Join Date: Nov 2014
  • Location: Quebec, Canada
  • Posts: 18618
  • Post Rating Ratio: +95/-4
    • dj_omnimaga
    • DJOmnimaga.music
    • @DJOmnimaga
    • dj_omnimaga
    • @DJOmnimaga
    • /u/DJ_Omnimaga
    • DJOmnimaga
    • 112/11286
    • @djomnimaga
    • @DJOmnimaga
    • DJ Omnimaga music store
  • Gender: Male
Ooh nice, I didn't know this was for the Gamebuino. Many people use BASIC-like languages because they tend to be so user-friendly, so this might cater to a larger audience for Gamebuino programmers. :) That is a big undertaking to start a brand new language from scratch, though, so I wish you good luck >.<.
  • Calculators owned: TI-57, 73, TI-80 (broken), TI-81, TI-82, TI-83, TI-83+ (broken), TI-83+ (broken), TI-83+SE (broken), TI-84+, TI-84+CSE, TI-84+CE, TI-85, TI-86, TI-89T, TI-92, TI-Nspire, TI-Nspire CX (semi-broken), HP 39gII, HP Prime, Casio fx-7000G, fx-7400G+, fx-7700GE, fx-9750G+, fx-9750GII, fx-9860G, cfx-9850G, FX-1.0+, fx-CG10, fx-CP400
  • Consoles, mobile devices and vintage computers owned: Samsung i5510, Nexus 5, Atari 2600, Lynx, SMS, Game Gear, Genesis, Dreamcast, NES, SNES, N64, GCN, Wii, Wii U, GBA, DS, 3DS, PS2, PS3, PS4, PSP, PSVita, XBox 360, XBOne

Bandcamp|Reverbnation|Facebook|Youtube|Twitter
Retired Omnimaga admin (2001-11) and editor (2012-14)

Offline CKH4

  • Extravagant Sushi
  • Super User
  • Join Date: Jan 2015
  • Location:
  • Posts: 872
  • Post Rating Ratio: +3/-2
  • Gender: Male
I can work on HTML / CSS. What kind of site do you need? Flat theme? Quotes for code? Preferred color scheme? Will JavaScript be involved? (I'm a js invalid)

I may be able to help with the basic part of it. I'm pretty experienced in ti basic so maybe if you need sample programs I could make some. Also what will the sytax look like? Will there be necessary indentation?
  • Calculators owned: TI-83+, TI-84+


Offline Snektron

  • Lvl 69 Russian Snake
  • CodeWalrus Staff
  • Super User
  • Topic Management
  • Join Date: Dec 2014
  • Location: Netherlands
  • Posts: 3165
  • Post Rating Ratio: +32/-0
  • SSSssssss.....
    • RobinDeWalvis
    • Kzyrox
    • RobinDeWalvis
    • quantuminfinity
  • Gender: Male
Also what's the level of the bytecode? If it's low enough i might be able to make a z80 port :)
(is there maybe some kind of documentation on the instruction set?)
  • Calculators owned: TI-84+
Legends say if you spam more than DJ Omnimaga, you will become a walrus...


Offline DarkestEx

  • Super User
  • Join Date: Jan 2015
  • Location: Germany
  • Posts: 1324
  • Post Rating Ratio: +10/-2
    • @0xbmuessig
    • @muessigb
    • My homepage
  • Gender: Male
I can work on HTML / CSS. What kind of site do you need? Flat theme? Quotes for code? Preferred color scheme? Will JavaScript be involved? (I'm a js invalid)

I may be able to help with the basic part of it. I'm pretty experienced in ti basic so maybe if you need sample programs I could make some. Also what will the sytax look like? Will there be necessary indentation?

That sounds great
I could really need a nice project site with user uploads, API reference, download page, ... You know. I am going to write the PHP, but I'd be awesome if you do the design and layout. I like to have a flat l, but colorful theme. No JS involved as I dislike it. Feel free to check the samples folder to get used to the language a bit better. It is influenced by qbasic and glbasic. You can set as many whitespace as you want. Minimum between command and arguments is one though. Tabs and spaces are equivalent. Variables need to be defined with dim, variable name length is unlimited, maximum variable size needs to be specified. No dollar sign for strings allowed. Numbers are allowed after the 2nd character of a variable name. Functions are allowed. Use call functionname arg1; arg2; ... To call them.
Ooh nice, I didn't know this was for the Gamebuino. Many people use BASIC-like languages because they tend to be so user-friendly, so this might cater to a larger audience for Gamebuino programmers. :) That is a big undertaking to start a brand new language from scratch, though, so I wish you good luck >.<.
Yeah, I exactly thought so
  • Calculators owned: TI-84+, Casio 101-S, RPN-Calc, Hewlett-Packard 100LX, Hewlett-Packard 95LX
  • Consoles, mobile devices and vintage computers owned: Hewlett-Packard 100LX, Hewlett-Packard 95LX, Original Commodore 64C, Tektronix AWG2021, IBM X60s, IBM X60t, Nintendo DS Lite, Nintendo GameBoy Color, Nintendo GameCube, Xbox 360, Palm m5


Avatar drewn for me by Tabbes.

Offline Unicorn

  • ??? ??? ??? ??? ???
  • Super User
  • CW Contest II - 2nd place
  • *
  • Join Date: Jan 2015
  • Location: ??? ??? ??? ??? ???
  • Posts: 2819
  • Post Rating Ratio: +5/-2
  • make :PICKACHUP: a thing!
    • Unicorn808
    • 114/11432
    • ??? ??? ??? ??? ???
  • Gender: Male
Coolio! I like seeing a BASIC for every platform. (Maybe because that is the only thing I understand so far) :P
  • Calculators owned: I own all of them: PICKACHUP TI 84+ CSE TI 83+ SE TI something something ??? ??? ??? ??? ???
  • Consoles, mobile devices and vintage computers owned: PICKACHUP ??? ??? ??? ??? ???



??? ??? ??? ??? ???

Offline CKH4

  • Extravagant Sushi
  • Super User
  • Join Date: Jan 2015
  • Location:
  • Posts: 872
  • Post Rating Ratio: +3/-2
  • Gender: Male
So darkest I think I got the android navigation down using pure CSS (if it looks funny its because I'm using the preprocessor stylus). It'll hopefully work in all mobile browsers but I've only tested in chrome. I'll work on checking other browsers but it should work on all chromium based ones.

Edit. So after some testing I've determined that pretty much the only  browser that doesn't support the pointer media query is Firefox. Oh how I struggle with Firefox compatibility.

Edit2. Here's the link if you want to test it:
http://s.codepen.io/CKH4/debug/BNQEyZ
« Last Edit: May 28, 2015, 11:59:27 am by CKH4 »
  • Calculators owned: TI-83+, TI-84+


Offline DarkestEx

  • Super User
  • Join Date: Jan 2015
  • Location: Germany
  • Posts: 1324
  • Post Rating Ratio: +10/-2
    • @0xbmuessig
    • @muessigb
    • My homepage
  • Gender: Male
So darkest I think I got the android navigation down using pure CSS (if it looks funny its because I'm using the preprocessor stylus). It'll hopefully work in all mobile browsers but I've only tested in chrome. I'll work on checking other browsers but it should work on all chromium based ones.
Android navigation?

Great that you are working on it, thank you! :)
  • Calculators owned: TI-84+, Casio 101-S, RPN-Calc, Hewlett-Packard 100LX, Hewlett-Packard 95LX
  • Consoles, mobile devices and vintage computers owned: Hewlett-Packard 100LX, Hewlett-Packard 95LX, Original Commodore 64C, Tektronix AWG2021, IBM X60s, IBM X60t, Nintendo DS Lite, Nintendo GameBoy Color, Nintendo GameCube, Xbox 360, Palm m5


Avatar drewn for me by Tabbes.

Offline CKH4

  • Extravagant Sushi
  • Super User
  • Join Date: Jan 2015
  • Location:
  • Posts: 872
  • Post Rating Ratio: +3/-2
  • Gender: Male
You can test it but the site navigation is what I meant. Hopefully its colorful enough but you can experiment with the colors.
Full screen link:
http://s.codepen.io/CKH4/debug/BNQEyZ
Editor link:
http://s.codepen.io/CKH4/pen/BNQEyZ
  • Calculators owned: TI-83+, TI-84+


Offline xlibman

  • Omni founder & CW co-founder
  • CodeWalrus Staff
  • Super User
  • Original 5
  • CodeWalrus Supporter
  • *
  • Join Date: Nov 2014
  • Location: Quebec, Canada
  • Posts: 18618
  • Post Rating Ratio: +95/-4
    • dj_omnimaga
    • DJOmnimaga.music
    • @DJOmnimaga
    • dj_omnimaga
    • @DJOmnimaga
    • /u/DJ_Omnimaga
    • DJOmnimaga
    • 112/11286
    • @djomnimaga
    • @DJOmnimaga
    • DJ Omnimaga music store
  • Gender: Male
In desktop mode at least, the blue thing that expand is kinda slow it seems and the navigation options shows up in gray before the blue thing finished expanding. I thought it was kinda weird.
  • Calculators owned: TI-57, 73, TI-80 (broken), TI-81, TI-82, TI-83, TI-83+ (broken), TI-83+ (broken), TI-83+SE (broken), TI-84+, TI-84+CSE, TI-84+CE, TI-85, TI-86, TI-89T, TI-92, TI-Nspire, TI-Nspire CX (semi-broken), HP 39gII, HP Prime, Casio fx-7000G, fx-7400G+, fx-7700GE, fx-9750G+, fx-9750GII, fx-9860G, cfx-9850G, FX-1.0+, fx-CG10, fx-CP400
  • Consoles, mobile devices and vintage computers owned: Samsung i5510, Nexus 5, Atari 2600, Lynx, SMS, Game Gear, Genesis, Dreamcast, NES, SNES, N64, GCN, Wii, Wii U, GBA, DS, 3DS, PS2, PS3, PS4, PSP, PSVita, XBox 360, XBOne

Bandcamp|Reverbnation|Facebook|Youtube|Twitter
Retired Omnimaga admin (2001-11) and editor (2012-14)

Offline CKH4

  • Extravagant Sushi
  • Super User
  • Join Date: Jan 2015
  • Location:
  • Posts: 872
  • Post Rating Ratio: +3/-2
  • Gender: Male
Oh yeah I forgot to post that I broke it and I'll have to redo all of it but no biggie because it'll take like half an hour.
  • Calculators owned: TI-83+, TI-84+


Offline CKH4

  • Extravagant Sushi
  • Super User
  • Join Date: Jan 2015
  • Location:
  • Posts: 872
  • Post Rating Ratio: +3/-2
  • Gender: Male
Since I can't reach you in irc I'll try the actual topic.

I've found some time to work on the site but I'm a little annoyed because I have limited internet connection, only on my phone and I can tether to my computer too but I have to be careful about data usage. I've decided to rewrite the side menu so that hopefully it'll work on ff mobile. It's currently very broken so if I can fix it that'll be good. Also hopefully I'll be able to limit the use of media queries with the vw, vh, vmin and vmax length units.

Edit. Here's the rewrite in case you're interested.
http://s.codepen.io/CKH4/debug/aOqMXM?
« Last Edit: July 03, 2015, 05:14:28 pm by CKH4 »
  • Calculators owned: TI-83+, TI-84+


 


You can also use the following HTML or bulletin board code to share it on your page or forum signature!


Also do not forget to check our affiliates below.
Planet Casio TI-Planet Calc.news BroniesQC BosaikNet Velocity Games