Author Topic: HYBRID (8X+)  (Read 37227 times)

0 Members and 2 Guests are viewing this topic.

Offline the_mad_joob

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 346
  • Rating: +47/-0
    • View Profile
HYBRID (8X+)
« on: September 04, 2014, 09:49:26 pm »
Hello everyone...
 
Alright, i'm trying to dedicate as much time as possible on that new project of mine, and decided to create this topic on the way (not to mention some of you were curious about it).
It will be something between an OS and a shell, which explains the name.
I intend to make it some kind of dev environement too, but that part is still a bit obscure.
The main idea is to be able to run large programs (at least 32K, but probably more), while still being able to use the TI-OS for what it is supposed to be, a calculator.
The hybrid environement will be independant from the TI-OS, so rom calls won't be available at all.
I'm creating a few basic routines, but maybe libraries will be handled, not sure yet.
When using hybrid, RAM will only be used as a temporary storage.
Basically, what it does is backing up the TI-OS RAM data in the archive, making pages 0 & 1 free to use.
It will be an old-school command line interface (yeah, we're in 2014, plz stop crying).
It will only recognize archived appvars, as executable or non-executable data, but i intend to use specific headers for file types.
When loaded, everything is unlocked (flash and RAM/ROM execution).
Will be compatible with all OS and models (basic 83+ excepted, due to too much hardware differences).
 
memory layout project (subject to changes) :
$0000>$3FFF : reserved for TI-OS (ROM page 0)
$4000>$7FFF : free space (initially RAM page 1) (programs loaded at $4000)
$8000>$BFFF : free space (initially RAM page 2)
$C000>$FFFF : free space , hybrid routines , hybrid data , hardware stack (initially RAM page 0)
 
What's done so far (without using any rom call, except jforcecmdnochar ofc) :
- starting loading interface
- recognizes, saves and displays model, total RAM, and total ROM
- overall archive check for corruption (missing swap sector, invalid sector status bytes, invalid variable status bytes, variables crossing sectors, zeros in unallocated space).
- detects corrupted stack & VAT.
- check if enough archive for TI-OS RAM data (the amount should vary but never exceed 32158 bytes).
- large system font, matching ASCII, ISO-8859-1, and CP-1252, with some dedicated chars for title bars.
- a few basic optimized standalone routines, using only registers as input, which will be callable from any program :
-- lcdres (lcd clearer)
-- lcdreswin (clears all but title bar)
-- lcdset (lcd filler)
-- lcdinv (lcd inverter)
-- lcdsave (printscreen, saving to custom location)
-- lcddisp (grbufcpy, restoring from custom location)
-- lcddispchr (putmap)
-- lcddispchri (putmap inverted)
-- lcddispstr (puts, with size to be put in a register, automatic wrapping)
-- lcddispstri (same, but inverted)
-- lcdinvchr (inverts an already displayed char)
-- lcdinvstr (inverts an already displayed string, automatic wrapping)
-- arcchk (archive space check for corruption, also returns the first page of apps area)
-- arcenough (check if enough contiguous free space in archive)
current used size in the app : 4833 bytes (font itself takes 2048 bytes).
 
Next step : some kind of smart garbage collector / defragmenter, which will only make space for the inputted amount, without defragmenting the whole archive to save the chip's life.
 
More to come...

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: HYBRID (8X+)
« Reply #1 on: September 04, 2014, 11:07:02 pm »
Seems pretty interesting. I am impressed by what is done so far. If you decided, however, to go for a full OS, then make sure it offers educational features that could convince someone to use this outside calculator gaming too, since people might need the calc in class. If it's a shell, just keep in mind it would be competing head-on against Doors CS7, Ion and MirageOS.

Good luck!

Offline the_mad_joob

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 346
  • Rating: +47/-0
    • View Profile
Re: HYBRID (8X+)
« Reply #2 on: September 05, 2014, 12:45:55 am »
Hello DJ, good to see the veteran =]

I'm definitely not ready for a full OS, and that's one of the reason i came with that idea.
Also, i think it's quite important to still be able to use the TI-OS, since many have lots of stuff running from there.
And about doors/ion/mirage, i don't intend to compete them, but if things go well, you should be able to run very fat programs with hybrid (maybe 40K+).
If it sees the light, it could be quite an interesting platform for running huge RPGs, for example.
Initially, i wanted to make it handle a custom page swapping system, allowing to run up to 65K programs.
But i think i'll see how things go for now, cause there's so much to code...

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: HYBRID (8X+)
« Reply #3 on: September 05, 2014, 12:50:29 am »
Lol actually it feels kinda weird to be called a veteran in an ASM project thread, considering I have never got into ASM and you did :P, but I guess it's more the fact I founded Omni or that I have been around for ages.

And thanks for the clarification. As for large programs, I believe that the max file size on a 83+ is 64 KB and it's possible that using files this large might be possible via Celtic III on the 83+, but you have to copy chunks of code into a separate program in order to do so, you can't run the entire program. Running programs this large from the shell, including maybe basic programs, would definitively be a big plus.

Offline the_mad_joob

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 346
  • Rating: +47/-0
    • View Profile
Re: HYBRID (8X+)
« Reply #4 on: September 05, 2014, 05:13:58 pm »
Alright, i'm gonna re-write my arcenough routine.

My goal is to make it work the following way :
- first pass : check for space avaiability, considering deleted variables as unavailable space
- if success : return page and location to store data (no defrag + Garbage Collect required)
- if failure :
- second pass : same, but this time, consider deleted variables as available space
- if success : defrag+GC only the concerned sector, then return page & location to store data
- if failure : return error

As you can see, there are 2 things i won't handle :
- defrag+GC in apps area : It is not always the case, but i will assume all apps are deleted from the TI-OS, which already does that job.
- overall defrag+GC in vars area : Doing it for all sectors will 1) abuse flash 2) be hard/long/boring to code/debug, and i need to move on.

Let's try that and see how it goes...
« Last Edit: September 05, 2014, 05:18:16 pm by the_mad_joob »

Offline Geekboy1011

  • The Oneironaut
  • Donator
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2031
  • Rating: +119/-2
  • Dream that Awakening dream
    • View Profile
Re: HYBRID (8X+)
« Reply #5 on: September 05, 2014, 05:14:51 pm »
This sounds a lot like what calc84 does in tiboy and I think its an awesome idea :D

I probably wont use it my self but it will still be pretty cool to see what people can do with it. That is for certain.

Offline the_mad_joob

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 346
  • Rating: +47/-0
    • View Profile
Re: HYBRID (8X+)
« Reply #6 on: September 05, 2014, 05:17:11 pm »
He he, thx for sharing your opinions guyz =]
And yeah, i'm pretty sure many already thought of something like that...

EDIT : Just coded pass 2 of the new arcenough routine at work. Now time to code the sector defrag...
« Last Edit: September 05, 2014, 10:23:15 pm by the_mad_joob »

Offline the_mad_joob

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 346
  • Rating: +47/-0
    • View Profile
Re: HYBRID (8X+)
« Reply #7 on: September 13, 2014, 01:39:40 pm »
UPDATE
> Totally rewritten arcchk & arcenough routines (bug fixes, great speed/size ratio optim)
> arcenough pass 2 coded (can now find if a sector could handle the data after a defrag, and returns the sector 1st page in that case).
> Still working on the sector defrag algorithm. If i manage to make the routine light enough, i could run it in the hardware stack area, allowing to have 2 available banks (would remove the need to swap between read/write, speeding things quite a lot).

In the mean time, and for the curious, hybrid system font will look like this :


Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: HYBRID (8X+)
« Reply #8 on: September 13, 2014, 11:20:52 pm »
They actually look pretty nice, especially the top ones which should fit well for menu titles and stuff. :)

Offline 123outerme

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 458
  • Rating: +23/-0
  • Self-unpaid intern
    • View Profile
Re: HYBRID (8X+)
« Reply #9 on: September 13, 2014, 11:24:51 pm »
I hate to ask the obvious question, but is it compatible with the CSE?

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: HYBRID (8X+)
« Reply #10 on: September 14, 2014, 12:10:42 am »
Since this uses ASM, I doubt it (unless he decides to make a separate version)

Offline the_mad_joob

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 346
  • Rating: +47/-0
    • View Profile
Re: HYBRID (8X+)
« Reply #11 on: September 14, 2014, 01:22:50 am »
They actually look pretty nice, especially the top ones which should fit well for menu titles and stuff. :)

Thx for the feedback =]
Yes, i used the first two lines especially for that, since those chars were initially old ASCII control characters (non-displayable), not handled by modern text editors anyway.
I also added the black arrows and smileys, in the last unused slots.
But everything else is following ASCII/ISO-8859-1/CP-1252.
That means text data will match what you can see in a regular computer text editor.
Here is an example of a title bar usage (hybrid loading screen actually) :



I hate to ask the obvious question, but is it compatible with the CSE?

Well, hybrid works almost like an OS, in the way that it is totally independant from the TI-OS.
That basically means it will only run hybrid-compatible programs (you can forget about basic, TI-asm, ion, mirage, DCS, etc...).
On a side note, it doesn't destroy anything already existing on your calc.
In other words, you could for example have DCS and hybrid on the same calc without any problems.
Then, you would use DCS to run DCS-compatible programs, and hybrid for hybrid-compatible programs.
Hybrid will share the archive space with the TI-OS, but will only be able to recognize archived appvars as files.
Those appvars will first include the TI-OS standard header (for you to be able to eventually manage the files in the TI-OS, but also send/receive them with TI-connect), followed by a hybrid header (defining if the file is compatible with hybrid, if the data is executable or not, and stuff like that).
« Last Edit: September 14, 2014, 01:34:08 am by the_mad_joob »

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: HYBRID (8X+)
« Reply #12 on: September 14, 2014, 01:45:24 am »
Yup, this definitively looks pretty good IMHO, from that screenshot. :)


Also looking at all this RAM, I wish we could use all of it for our daily calc uses and perhaps have the programs stored in archive all the time like on newer calcs. :P

Offline the_mad_joob

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 346
  • Rating: +47/-0
    • View Profile
Re: HYBRID (8X+)
« Reply #13 on: September 14, 2014, 02:35:35 am »
Also looking at all this RAM, I wish we could use all of it for our daily calc uses and perhaps have the programs stored in archive all the time like on newer calcs. :P

Had this project idea exactly for that =]

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: HYBRID (8X+)
« Reply #14 on: September 14, 2014, 10:25:27 am »
Ah ok but if it's a shell rather than a full OS, how will it be possible to access the entire 128 KB of RAM even from the TI-OS? Or will it just be restricted to games/programs running from inside the shell? In both cases you would have to make sure that no compatibility issues occur with programs that uses extra RAM, like TI-Boy SE.