Author Topic: HYBRID (8X+)  (Read 37262 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
Re: HYBRID (8X+)
« Reply #45 on: April 15, 2015, 10:49:03 am »
Wha, welcome back!
Also good luck on picking up your project again, it can be quite tough to pick up old projects.
Thx !
Especially with asm.
Fortunately, i did my best to document my own code enough =]

I was just wondering what was going on with this project, glad to see you working on it again!
Glad to see some interest =]
These days, i currently have my head straight on the CLI routines.
Also, i decided to let the user decide if he wants to backup the TI-OS RAM at startup, rather than making it automatic.

Offline the_mad_joob

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 346
  • Rating: +47/-0
    • View Profile
Re: HYBRID (8X+)
« Reply #46 on: April 20, 2015, 06:40:44 am »
CLI PROGRESS

After some long thoughts, i decided to make it ins/del only (no overstrike input).
It is gonna use a 128 chars buffer, similar to TI's textshadow, which will basically be used for refresh.
Vertical scrolling will definitely be handled.
However, the entries will only scroll up, not down (basically, no history access apart from what you can see on the screen).
Currently, about 50% of it has been coded.
Wasn't easy, as like most of what i write, everything must be usable from both the kernel and user programs.

done :

lcddisphyb (shadow display)
lcdinvcur (cursor blinking display, subroutine)
hyboutclr (clears everything except title bar)
hyboutnl (newline, automatic scrolling)
hyboutchr (putc, automatic scrolling)
hyboutstr (puts, automatic scrolling)
hybinclr (clears current input field or screen if empty, subroutine)
hybinchr (character insertion at current cursor, subroutine)
hybindel (character deletion at current cursor, subroutine)

in progress | to do :

poweroff (manual & automatic power off, subroutine)
hybpause (waits for ENTER)
hybchoice (custom arrow-based choice input)
hybprompt (effect very similar to when using the input token in a basic program)



ROM USAGE

The low-level part is already coded.
I will have the following main routines to code once i'm done with the CLI :

fileinfo (checks if an appvar exists, and returns the start of the actual data)
filenew
filedel



RAM USAGE

Definitely have some things left to figure out there.
About program execution space, i'm still hesitating between only 32768 bytes, or more.
About the TI-OS RAM backup, i am currently considering to allow the usage of extra RAM on 128K models, to reduce flash abuse.
Also, i'm already thinking of potential compatibility problems between versions...

Offline chickendude

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 817
  • Rating: +90/-1
  • Pro-Riot Squad
    • View Profile
Re: HYBRID (8X+)
« Reply #47 on: April 21, 2015, 09:22:24 am »
Nice work, i can't wait for the first betas to come out and play with them.

Offline the_mad_joob

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 346
  • Rating: +47/-0
    • View Profile
Re: HYBRID (8X+)
« Reply #48 on: April 22, 2015, 03:36:13 pm »
Thx chicky !

Successfully coded poweroff, hypause, and hybchoice.
The next one, hybprompt, definitely promises to give me some nice headaches XD
After that, the CLI input/output system will be complete.
I promise a few screenies at that point =]

Offline the_mad_joob

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 346
  • Rating: +47/-0
    • View Profile
Re: HYBRID (8X+)
« Reply #49 on: April 27, 2015, 12:26:51 pm »

Offline TheMachine02

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 452
  • Rating: +105/-0
  • me = EF99+F41A
    • View Profile
Re: HYBRID (8X+)
« Reply #50 on: April 28, 2015, 06:37:25 am »
This screenshot does look really cool ! I definitly will play with this when there will be a beta out.
AXE/asm programmer - unleash the power of z80 //C++//C

epic 3D things http://www.ntu.edu.sg/home/ehchua/programming/opengl/CG_BasicsTheory.html

Offline the_mad_joob

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 346
  • Rating: +47/-0
    • View Profile
Re: HYBRID (8X+)
« Reply #51 on: April 29, 2015, 02:33:07 am »
Thx TheMachine02 =]
To tell the truth, i'm kinda proud to have a working CLI without having used a single byte from TI.
If everything goes well with my flash routines, i'm gonna code some little higher level archive interaction stuff soon.
More to come...

Offline the_mad_joob

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 346
  • Rating: +47/-0
    • View Profile
Re: HYBRID (8X+)
« Reply #52 on: April 30, 2015, 11:41:11 pm »
Well, it seems that i didn't have that much bugs in my flash routines.
I was expecting some hard debugging, since i barely tested them, 1 and a half year ago.
To give you an idea of the speed, here is a quick screenshot.
What the routine does is copying 65536 bytes from ROM to ROM, directly (no RAM buffer at all).
The busy cursor (upper right corner) is used as an indicator of the duration.
That is at 15MHZ minus the tiny slowdown from wabbit & imgur.
There you go :

Offline chickendude

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 817
  • Rating: +90/-1
  • Pro-Riot Squad
    • View Profile
Re: HYBRID (8X+)
« Reply #53 on: May 06, 2015, 05:26:17 am »
Wow, that looks great! It's cool to see some screens of it finally. I think the last screen we saw was of the character set :P

Offline c4ooo

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 252
  • Rating: +10/-1
  • The impossible chemical compound.
    • View Profile
Re: HYBRID (8X+)
« Reply #54 on: May 07, 2015, 07:44:50 pm »
I don't get it, so is  his a shell or os? ??? How can an os be "hybrid" and be in a the shape of an app for a different os? ???
-German Kuznetsov
The impossible chemical compound.

Offline the_mad_joob

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 346
  • Rating: +47/-0
    • View Profile
Re: HYBRID (8X+)
« Reply #55 on: May 07, 2015, 10:33:45 pm »
I don't get it, so is  his a shell or os? ??? How can an os be "hybrid" and be in a the shape of an app for a different os? ???
Well, i decided to use that name because it shares the properties of both a shell & an OS.
Technically, it is executed from the original OS, like a shell, but once it's loaded, 100% of both executable & non-executable data is standalone.
That means it uses its own low level interactions with the hardware, and is free to use every single byte of RAM, just like an OS does.
Hybrid starts from the TI-OS, whereas an OS starts from the boot code. Apart from that, there is not so many differences.
« Last Edit: May 08, 2015, 12:18:46 am by the_mad_joob »

Offline c4ooo

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 252
  • Rating: +10/-1
  • The impossible chemical compound.
    • View Profile
Re: HYBRID (8X+)
« Reply #56 on: May 08, 2015, 07:03:05 am »
I don't get it, so is  his a shell or os? ??? How can an os be "hybrid" and be in a the shape of an app for a different os? ???
Well, i decided to use that name because it shares the properties of both a shell & an OS.
Technically, it is executed from the original OS, like a shell, but once it's loaded, 100% of both executable & non-executable data is standalone.
That means it uses its own low level interactions with the hardware, and is free to use every single byte of RAM, just like an OS does.
Hybrid starts from the TI-OS, whereas an OS starts from the boot code. Apart from that, there is not so many differences.
Ok, the fact that it boots from the os explains it.
-German Kuznetsov
The impossible chemical compound.

Offline the_mad_joob

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 346
  • Rating: +47/-0
    • View Profile
Re: HYBRID (8X+)
« Reply #57 on: May 09, 2015, 12:39:18 am »
A few things to keep those interested updated :

I'm still working on the high level archive routines.
Things are going pretty well so far, but i can say that 100% of my coding concentration is definitely required XD
The idea is to make things simple, like handling page swapping automatically, as well as using memory offsets as inputs (for example, 0 would mean the very first byte of the actual data of the file).

About the memory layout :
Since things are currently being more & more precise, i finally had to make the choices i needed to make.
RAM pages 0 & 1 will be reserved for program execution in banks 1 & 2 ($4000>$BFFF).
RAM page 2 will be reserved for the system in bank 3 ($C000>$FFFF).
1024 bytes will be reserved for the stack, which will be located at $FC00>$FFFF (SP initialized at $0000).
The other RAM pages will be usable for temp or permanent storage, but will require to be manually swapped.
So, basically, hybrid will handle 32768 bytes programs, which is still way better than under the TI-OS.

About the initial setup :
CPU at 15MHZ
Entire RAM executable
Flash unlocked by default, but don't be scared, hybrid routines cannot write anything outside of the archive area reserved for variables, and the probability to actually code a flash write sequence by mistake is so damn close to zero.

About limitations :
The hybrid environement will pretty much be a great solution on many aspects, but recommended for experienced coders.
No interaction with the TI-OS whatsoever.
No TI-OS ROM calls, only hybrid RAM calls (regular CALL instruction).
No RST instructions.
No interrupt mode 1, only mode 2.

About file formats :
As already mentioned, hybrid will be able to read/write appvars.
Executable code will require an additional header.
Things are not done yet, but i intend to be able to have multiple programs inside one appvar.
Haven't decided yet if a batch system will be handled or not.
I'm also thinking of making writeback possible.

What won't be available in the first release (for sure) :
Basically, there won't be any link/USB RAM calls, but who knows in the future...

Offline chickendude

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 817
  • Rating: +90/-1
  • Pro-Riot Squad
    • View Profile
Re: HYBRID (8X+)
« Reply #58 on: May 10, 2015, 11:34:17 pm »
It sounds like things are coming along really well. The only thing i really use bcalls for is to mess with the VAT (find files, appvars, etc.) and for hooks, i don't think most games will miss TI's routines.

Offline the_mad_joob

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 346
  • Rating: +47/-0
    • View Profile
Re: HYBRID (8X+)
« Reply #59 on: May 12, 2015, 12:56:58 pm »
It sounds like things are coming along really well. The only thing i really use bcalls for is to mess with the VAT (find files, appvars, etc.) and for hooks, i don't think most games will miss TI's routines.
It's good that you talk about the VAT, cause there are things i didn't mention.
Hybrid won't use any form of alloc table, only realtime archive space read/write.
It may be slower than using a table in RAM, but i really hate the idea to be restricted by RAM just for that.
BUT, things are not so easy, since i also want files created/deleted under hybrid to be handled properly under the TI-OS.
That means i have to keep track of the available RAM for VAT entries.
Also, before returning to the TI-OS, i have to actually rebuild a part of the VAT when restoring RAM, which will definitely represent some boring coding sessions.

PROGRESS :

I just finished coding/debugging "fileinfo" & "filedel".
"fileinfo" returns the following informations : file size, starting page & adress, and the same things for the actual data.
"filedel" handles the following error situations : missing/corrupted files, low batteries, and flash errors.
On my way to code "filenew", which promises to be quite tricky due to possible VAT interactions.

EDIT :

"filenew" coded successfully =]
It handles everything for the user, including sector defragmenting if necessary.
Time to code probably the last 2 user-available routines, "filewrite1" & "filewritex".
"filewritex" should definitely be hot, since source data can potentially start in a bank and end in another.
Hopefully, the low level code i'm gonna use automatically detects bank overflows =P
« Last Edit: May 15, 2015, 09:47:04 am by the_mad_joob »