You can help CodeWalrus stay online by donating here. | New CodeWalrus | Old (dark mode) | Old (light) | Discord server

BuinoBasic - Basic Compiler and VM for the Gamebuino

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

0
b/Consoles publicado por u/DarkestEx 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!
Inicia sesión o crea una cuenta para dejar un comentario
u/Snektron May 25, 2015, 09:18:30 PM
Awesome :D

also you copied this from your site, didn't you? :P
u/Dream of Omnimaga May 25, 2015, 11:52:19 PM
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 >.<.
u/CKH4 May 26, 2015, 12:08:58 AM
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?
u/Snektron May 26, 2015, 12:54:36 PM
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?)
u/DarkestEx May 27, 2015, 04:43:11 PM
Quote from: CKH4 on May 26, 2015, 12:08:58 AM
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 [emoji1]
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.
Quote from: DJ Omnimaga on May 25, 2015, 11:52:19 PM
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 [emoji1]
u/Unicorn May 28, 2015, 03:16:09 AM
Coolio! [emoji14] I like seeing a BASIC for every platform. (Maybe because that is the only thing I understand so far) :P
u/CKH4 May 28, 2015, 11:28:04 AM
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
u/DarkestEx May 28, 2015, 11:58:46 AM
Quote from: CKH4 on May 28, 2015, 11:28:04 AM
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! :)
u/CKH4 May 28, 2015, 12:02:31 PM
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
u/Dream of Omnimaga May 28, 2015, 06:38:17 PM
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.
u/CKH4 May 28, 2015, 06:46:53 PM
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.
u/CKH4 July 03, 2015, 04:06:09 PM
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
Start a Discussion

b/Consoles

Game console programming, homebrew development and hacking.

40
Topics
Explore Board
Website statistics


MyCalcs | Ticalc.org | Cemetech | Omnimaga | TI-Basic Developer | MaxCoderz | TI-Story | Casiocalc.org | Casiopeia | The Museum of HP Calculators | HPCalc.org | CnCalc.org | Music 2000 Community | TI Education | Casio Education | HP Calcs | NumWorks | SwissMicros | Sharp Calculators
Powered by EzPortal