ok, i was finally able to develop enought to show something working.
You can download the current "alpha" here
So basically, when you boot up, you get to the console main screen which is currently this one:
Here you can choose some Cartridge (which are Lua programs with embedded graphics and such) to run.
There are two games included, both developed by me and ported from TIC80, one is Secret Agents which is a fairly completed game:
The other game is Oseo, a simple game where you have to pop baloon with your beak:
Also included is the editor:
The editor is a big part of the system, you can load cartridges into it, edit them live and run them. Currently is limited to only the code, but it will eventually include sprite and map editor like TIC80 or other fantasy consoles.
Currently is very crude (writing a text editor from scratch is a project in itself), it support basic editing, cursor movements and not much more. No selections, no undo, no CTRL keys except nano-style CTRL-K and CTRL-U (cut/uncut). Also scrolling is limited to vertical. But it's still somehow usable, i spent some time using it to adapt my ported games. Probably the biggest missing feature is a search function.
Cartridges interact with the system with a bunch of "system call" that handle inputs and screen drawing. The current set of API is the following (these are the freepascal signatures, in lua there are equivalents):
Code: Select all
type TApiSystem = class
function print(text:String; x,y,color:integer):integer;virtual;abstract;
procedure rect(x,y,width,height,color:integer; fill:boolean);virtual;abstract;
procedure key(out KeyCode:Word; out down:boolean; out modifiers:integer);virtual;abstract;
procedure map(mapNum, sheetNum, x, y, mx, my, w, h, colorKey:integer); virtual; abstract;
function mem(resourceType:integer; resourceNum, pos, val:integer):integer; virtual; abstract;
function hardware(module:string; command:string; param:array of string):string; virtual; abstract;
Programs also have the ability to start other programs, pass parameters to them and receive results, thus making a simple system (for example, there's an "input.lua" program which is actually an input dialog, it returns any input the user enters). The editor is made this way too (it's a cartridge like the others)
Well this is it mainly, big missing features are sound and music, and gamepad support, then i can have my working console
Let me know if you like it.