LoginLogin
Nintendo shutting down 3DS + Wii U online services, see our post

Kaliber Project for SmileBASIC

Root / Talk About Programs / [.]

amihartCreated:
Lately I've been working on a project called Kaliber, which is eventually going to be a programming language that compiles to a virtual machine, like Java, although with a heavy focus on portability. Currently, the virtual machine is pretty much finished, and I have a working assembler. So, in order to try and test out the portability of my design, I ported the virtual machine to SmileBASIC. As an example of its portability, I wrote a program called "Color Draw Test" in Kaliber Assembly (KASM) and have it running on three very different devices. All the program does is allow the user to control a "cursor" with the directional/WASD keys and it plots a random color pixel at that position and they can move it around and draw random color lines. Here's screenshots of it running on a Windows 10 laptop, a Raspberry Pi running Raspbian Linux, and the Nintendo 3DS via SmileBASIC: Windows 10 (x86_84): Raspbian Linux (ARM): Nintendo 3DS (SmileBASIC): Here's an actual video of it, but it's really out of focus which is why I have the screenshots: bdxJjEjmxS4 The program was not recompiled or altered in any way. It was compiled one time and runs on every machine exactly the same. Non-graphical applications run at decent speeds on all machines but graphical ones like this run slowly on the 3DS. Hopefully if SmileBASIC ever comes to the Wii U or Switch (not getting my hopes up) speed won't be quite as big of a problem. You can see the actual assembly code for Color Draw Test here. It looks complicated but it's actually pretty simple. It's assembly so you need a lot of instructions to do simple tasks, but each instruction accomplishes a single, simple task, so it's a lot of code because it's a lot of really simple things being done. Here's the Github link.. I will put out the Kaliber virtual machine on SmileBASIC eventually once I got most of the basics working. I might port over the assembler eventually too, but whether or not I bother porting the programming language itself, but how much I actually support SmileBASIC really depends on how much SmileBOOM continues to support it (still waiting for Wii U version). I plan to port this to many other devices to, including Android, the web, and the TI-84+CE graphing calculator. I may also release another 3DS version for homebrew for extra speed. The PC version of the virtual machine, the assembler, and eventually the compiler for Windows/Linux/Mac is being built in C with GTK+ 3. The idea is simple: one program, all devices.

heyyo that's pretty cool

Woah, that's really cool. Nice job!

I'm happy i'm not the only one experimenting with vms on SB.. this also gives us an idea of how reliably a vm can run something.. maybe with optimizations for the target ie, smilebasic, you can get the vm to run faster.. for instance.. pre processing of the asm code and setting up of a better way of doing it. or convert to smilebasic language instead of running in the vm Ie, Kalibur asm to sb native code. You'd probably get a big speed boost here.

I'm happy i'm not the only one experimenting with vms on SB.. this also gives us an idea of how reliably a vm can run something.. maybe with optimizations for the target ie, smilebasic, you can get the vm to run faster.. for instance.. pre processing of the asm code and setting up of a better way of doing it. or convert to smilebasic language instead of running in the vm Ie, Kalibur asm to sb native code. You'd probably get a big speed boost here.
TL;DR compiling to SB

Neat

I'm happy i'm not the only one experimenting with vms on SB.. this also gives us an idea of how reliably a vm can run something.. maybe with optimizations for the target ie, smilebasic, you can get the vm to run faster.. for instance.. pre processing of the asm code and setting up of a better way of doing it. or convert to smilebasic language instead of running in the vm Ie, Kalibur asm to sb native code. You'd probably get a big speed boost here.
TL;DR compiling to SB
Tldr of my post wasn't necessary. If you can't read a paragraph get out. Xd You lost all context as well. Its not compiling to SB that tells them nothing.. its seeing if it can optimize or convert the ASM to pure SB code. RIP lost in translation.

I'm happy i'm not the only one experimenting with vms on SB.. this also gives us an idea of how reliably a vm can run something.. maybe with optimizations for the target ie, smilebasic, you can get the vm to run faster.. for instance.. pre processing of the asm code and setting up of a better way of doing it. or convert to smilebasic language instead of running in the vm Ie, Kalibur asm to sb native code. You'd probably get a big speed boost here.
TL;DR compiling to SB
Tldr of my post wasn't necessary. If you can't read a paragraph get out. Xd You lost all context as well. Its not compiling to SB that tells them nothing.. its seeing if it can optimize or convert the ASM to pure SB code. RIP lost in translation.
TL;DR compiling to SB with optimization

I'm happy i'm not the only one experimenting with vms on SB.. this also gives us an idea of how reliably a vm can run something.. maybe with optimizations for the target ie, smilebasic, you can get the vm to run faster.. for instance.. pre processing of the asm code and setting up of a better way of doing it. or convert to smilebasic language instead of running in the vm Ie, Kalibur asm to sb native code. You'd probably get a big speed boost here.
TL;DR compiling to SB
Tldr of my post wasn't necessary. If you can't read a paragraph get out. Xd You lost all context as well. Its not compiling to SB that tells them nothing.. its seeing if it can optimize or convert the ASM to pure SB code. RIP lost in translation.
TL;DR compiling to SB with optimization
This is amiharts thread on Kaliber, not the Smile Net thread. Please stop bickering in other people's threads.

snipsnipsnip This is amiharts thread on Kaliber, not the Smile Net thread. Please stop bickering in other people's threads.
oke

Neat, looking forward to messing around in it

In other news, I got the virtual machine running on my TI-84+CE. (My name isn't Bob. :P)

In other news, I got the virtual machine running on my TI-84+CE. (My name isn't Bob. :P)
How will it handle colors? EDIT: stupid

In other news, I got the virtual machine running on my TI-84+CE. -snip- (My name isn't Bob. :P)
How will it handle colors? EDIT: stupid
I've actually written a graphics library in eZ80 assembly that can be found in the source code of this application. I'll probably just reuse it (edit: actually I just realized that's my Z80 variant of it I never released the eZ80 variant publicly). If I do demake this virtual machine to the monochrome calculators, I'd probably just make it where anything that's not $FF is black.

"One program, all devices..." Sounds like how Microsoft sounded when they were making the UWP... I'll help (if I can...)! But later today... (It's 12 AM ALREADY???)

This looks very interesting thanks for the GitHub link.