Omnimaga

Calculator Community => Discontinued => Major Community Projects => KnightOS => Topic started by: DJ Omnimaga on May 27, 2010, 12:24:22 am

Title: SirCmpwn third-party OS project: KnightOS
Post by: DJ Omnimaga on May 27, 2010, 12:24:22 am
I am posting this since our dear friend can't post on the forums ATM.

Ok so some people might have heard the name KnightOS before on IRC and on forums and been wondering what was that project by our dear friend. Well, to your great surprise, KnightOS is not just another shell with "OS" stuck in the name (like MirageOS), it's really an entire TI-83 Plus and 84 Plus third-party Operating System project in the work. I guess with the key factoring, some people were eventually going to take on OS projects. BrandonW is working on OS2 and patches for the TI-OS (to fix some bugs). our dear friend is working on his own OS project too: KnightOS.

Currently, he doesn't have a lot done, but here are his plans in summary: a simple calculator OS with multitasking properties, a bit like computer operating systems, but for a calc of course. Each applications will have its own thread, allowing them to continue running in the background when you run another. When an app will be doing nothing, it will take no processor time when the focus is on another app. It will just take processor time if the other app is actually doing something. Example, if you compile an ASM program using Mosaic on-calc ASM compiler while playing a small game, you may experience slow downs on the game until the app is done compiling, but it will still run. There will be limitations, of course, so you won't be able to run two grayscale raycasters at once :P, but yeah basically the OS will support some form of multi tasking. In the future it will most likely be possible to port ASM games to the new OS.

Also the OS will not contain bloatware or stuff like math functions. It will all be add-ons or external apps the user will install only if he needs them. Due to the smaller OS size this will leave more archive memory for the user. Programs/apps will be ran from archive.

I guess now I know why he needed a routine to unlock flash :P (I told him to be very careful, tho)

So yeah, for now he hasn't done too much but here is a screenshot showing the small stuff included so far and a ROM image that you can try under WabbitEmu.

Press ON to startup and follow instructions on screen. When the calc is turned OFF, hold down PRGM while turning it back ON and see what happens (shown in the screenshot). Then try with STATS and R instead of PRGM.
Title: Re: our dear friend third-party OS project: KnightOS
Post by: bwang on May 27, 2010, 12:49:14 am
Shiny!
Its nice to see more OSes for the 8x series.
Title: Re: our dear friend third-party OS project: KnightOS
Post by: Juju on May 27, 2010, 01:03:17 am
Cool, it's nice to see some form of multi-tasking on TI devices, and also to see someone who is exploiting that calculator to the maximum, like these 70s-80s computers.
Title: Re: our dear friend third-party OS project: KnightOS
Post by: meishe91 on May 27, 2010, 01:10:58 am
That's really cool. Tell He-Who-Shall-Not-Be-Named good luck with this :)

Side Question: Is there any news on He-Who-Shall-Not-Be-Named's other projects?
Title: Re: our dear friend third-party OS project: KnightOS
Post by: DJ Omnimaga on May 27, 2010, 01:32:30 am
Not sure really, I think right now he's focusing on this and Mosaic.

Also BrandonW found some issue about the ROM, I'll point them out via e-mail to the author. However here are the IRC logs:

Quote
[01:08:42] <+BrandonW> I disassembled that ROM he posted, I don't see how it's booting without any boot page.
[01:08:53] <+BrandonW> I guess he's using an emulator that starts at 0000h.
[01:09:07] <+BrandonW> There are some strange things going on in it.
[01:10:18] * +TD-Linux ([email protected]) Quit (Ping timeout: 310 seconds)
[01:10:22] <+BrandonW> Actually my disassembler's just having a tought time with a couple of instructions.
[01:10:38] <+BrandonW> Looks like out (c),a and in a,(c)
[01:11:11] <+SpyBot45> New post by meishe91 in our dear friend third-party... http://ourl.ca/5934/91778
[01:11:33] * TD-Linux ([email protected]) has joined #omnimaga
[01:13:04] <@DJ_Omni> ok
[01:13:15] <@DJ_Omni> if there are any problems you may want to point him out
[01:13:16] <+BrandonW> Did he also have something to do with LinTIx?
[01:13:24] <@DJ_Omni> cuz idk much about that stuff
[01:13:30] <@DJ_Omni> idk
[01:14:23] <@DJ_Omni> all I know is that it appeared to work fine under WabbitEmu
[01:16:08] <+BrandonW> Actually, it just hit me...
[01:16:18] <@DJ_Omni> also what is LinTIx?
[01:16:33] <+BrandonW> Wabbitemu will start executing on the boot page, but because he's got that filled with either 0xFF or 0x00, it'll overflow to 0x0000 and start executing.
[01:16:39] <+BrandonW> I wonder if he realizes that.
[01:16:46] <@DJ_Omni> ok
[01:16:47] <+BrandonW> Either that or it'll jump to 0x0038.
[01:16:49] <@DJ_Omni> not sure x.x
[01:17:06] <+BrandonW> LinTIx is apparently a third-party OS project on SourceForge for the 83+ series.
[01:18:23] <@DJ_Omni> aaah
[01:18:26] <@DJ_Omni> never heard of it
Title: Re: our dear friend third-party OS project: KnightOS
Post by: Galandros on May 27, 2010, 07:14:56 am
Ben Ryves done a curious experiment of multitasking using the custom interrupt.

But a operating system is a new level, I like the concept. Good to luck for doing it. An OS is a big project.
Title: Re: our dear friend third-party OS project: KnightOS
Post by: ztrumpet on May 27, 2010, 07:50:41 am
This is pretty cool!  Good luck with it, our dear (and awesome) friend. :D
I hope you finish this.  Huge is an understatement. ;D
Title: Re: our dear friend third-party OS project: KnightOS
Post by: calcdude84se on May 27, 2010, 07:57:45 am
That makes three people I know who are heading OS projects (our dear friend, me, and brandonw). I, however, promised myself I wouldn't mention mine anywhere except in my sig until I got at least a demo. (Right now I'm still planning features. I'll create a topic eventually.)
Good like to our dear friend!
Title: Re: our dear friend third-party OS project: KnightOS
Post by: SirCmpwn on May 27, 2010, 09:49:23 am
Hello,
Thanks to geekboy, I can access the forums.  Thank you, geekboy.
Also, I would like to point a few things out.
The problem with the rom is the boot page.  There actually isn't one.  It just skips and hops its way over to page 00 for now, which is pretty stupid, but whatever.
Also, if you guys want a chance to play around with a multithreaded OS, there already is one.  It is semi-done, and I've played around with it.  It's called BAOS, and you can get it here: http://www.ticalc.org/archives/files/fileinfo/398/39863.html (http://www.ticalc.org/archives/files/fileinfo/398/39863.html).

Developers should know that KnightOS will require coders to use location-independent code.  This means that using call, jp, and occasionally ld will not work.  However, I have included macros kcall, kjp, and kld for the programmers use, which will run slower the at first, but will run just as fast as the application's life progresses.

Calc84, nice to hear!  I look forward to seeing more about it.

Does anyone know how to set up the system interrupt?  I tried, but it didn't work too well, and looking through the source code from OS2 didn't help too much.

I tried KnightOS on hardware the other day, and it worked fine, with the exception of a buggy keyboard driver (O_o).

Progress on my other projects is just chuggin along.  I made a hex editor with Axe that I'm slowly working on, and I'm working on a floating point math library for Axe off and on.  Mosaic is going good, the assembler is fast.  The GUI is still non-functional, with a couple exceptions.
Title: Re: our dear friend third-party OS project: KnightOS
Post by: ztrumpet on May 27, 2010, 10:24:54 am
I'm glad this progressing well, and it sounds like your other projects are too.  Keep it up, and good luck irl! ;D
Title: Re: our dear friend third-party OS project: KnightOS
Post by: SirCmpwn on May 27, 2010, 10:26:44 am
Thanks!
Btw, for anyone who saw me on IRC last knight suddenly disappearing, its cause I installed updates to my Ubuntu flash drive and it went into kernel panic upon booting, so I apologizing for saying "brb" and lying about it :P.
Title: Re: our dear friend third-party OS project: KnightOS
Post by: DJ Omnimaga on May 27, 2010, 02:15:24 pm
Ouch that sucks. I kinda feared this happened or that you got told to get off the computer x.x

I hope you don't lose anything or damage the comp, tho x.x
Title: Re: our dear friend third-party OS project: KnightOS
Post by: SirCmpwn on May 27, 2010, 04:09:49 pm
Naw, its all good.  I'm getting the drive fixed again.
Title: Re: our dear friend third-party OS project: KnightOS
Post by: calcdude84se on May 27, 2010, 05:56:49 pm
... stuff ...

Developers should know that KnightOS will require coders to use location-independent code.  This means that using call, jp, and occasionally ld will not work.  However, I have included macros kcall, kjp, and kld for the programmers use, which will run slower the at first, but will run just as fast as the application's life progresses.

Calc84, nice to hear!  I look forward to seeing more about it.

Does anyone know how to set up the system interrupt?  I tried, but it didn't work too well, and looking through the source code from OS2 didn't help too much.

... more stuff ...

Hmm... how does the position-independent code regain normal speed? I'm thinking SMC as the answer there. Would this mean programs must be copied into RAM before they are run? (You never specified one way or the other)

Thanks. :)

By the system interrupt, I'm assuming you mean the default one.
you'll first want to disable interrupts with di, then change to the shadow registers with exx and ex af,af'. Then, I'll assume you want to see what device triggered the interrupt. Reading from port 04h will accomplish this. Then you'll want to reset the corresponding bit by writing to port 03h so that when you re-enable interrupts the interrupt won't be triggered again. At this point, you can then do whatever you need to. (Run the task switcher, deal with devices, etc.) Because $0056 and a few bytes after that must contain certain data, you'll want to jump elsewhere to run your code (probably after the ex af,af')
Documentation on ports 03h and 04h is available at WikiTI. The ports index is located at http://wikiti.brandonw.net/index.php?title=Category:83Plus:Ports:By_Address (http://wikiti.brandonw.net/index.php?title=Category:83Plus:Ports:By_Address)
Hope this helps!
Title: Re: our dear friend third-party OS project: KnightOS
Post by: DJ Omnimaga on May 27, 2010, 11:45:23 pm
I think this OS will work a bit similary to the TI-Nspire OS. Stuff will be archived and copied to RAM when needed. However, unlike the Nspire, KnightOS itself won't be copied in RAM when you turn the calc ON. Just stuff you want to run would be.
Title: Re: our dear friend third-party OS project: KnightOS
Post by: meishe91 on May 28, 2010, 03:05:42 am
Hello,
Thanks to geekboy, I can access the forums.  Thank you, geekboy.
Also, I would like to point a few things out.
The problem with the rom is the boot page.  There actually isn't one.  It just skips and hops its way over to page 00 for now, which is pretty stupid, but whatever.
Also, if you guys want a chance to play around with a multithreaded OS, there already is one.  It is semi-done, and I've played around with it.  It's called BAOS, and you can get it here: http://www.ticalc.org/archives/files/fileinfo/398/39863.html (http://www.ticalc.org/archives/files/fileinfo/398/39863.html).

Developers should know that KnightOS will require coders to use location-independent code.  This means that using call, jp, and occasionally ld will not work.  However, I have included macros kcall, kjp, and kld for the programmers use, which will run slower the at first, but will run just as fast as the application's life progresses.

Calc84, nice to hear!  I look forward to seeing more about it.

Does anyone know how to set up the system interrupt?  I tried, but it didn't work too well, and looking through the source code from OS2 didn't help too much.

I tried KnightOS on hardware the other day, and it worked fine, with the exception of a buggy keyboard driver (O_o).

Progress on my other projects is just chuggin along.  I made a hex editor with Axe that I'm slowly working on, and I'm working on a floating point math library for Axe off and on.  Mosaic is going good, the assembler is fast.  The GUI is still non-functional, with a couple exceptions.

Well very cool, hopefully nothing will take destroy Geekboy's work now.

I wish you luck on this OS project (along with calcdude84se on his).

What exactly is a hex editor? That's cool though. What is the math library for exactly? Any news on HL2? Also, good luck with Mosaic, glad to hear it's coming along.
Title: Re: our dear friend third-party OS project: KnightOS
Post by: DJ Omnimaga on May 28, 2010, 03:47:17 am
An hex editor would be to edit RAM as you wish, like CalcSys. You need to be careful with this but it can help experimented ASM programmers fixing their calc after runnign bad programs.
Title: Re: our dear friend third-party OS project: KnightOS
Post by: meishe91 on May 28, 2010, 07:51:45 am
Ah ok, gotcha. Thanks.
Title: Re: our dear friend third-party OS project: KnightOS
Post by: SirCmpwn on May 28, 2010, 09:54:12 am
The math library lets you use floating point numbers, like 1.25, in Axe.  The hex editor is meant to be an easily customizable CalcSys kind of thing.
Quote from: calcdude84se
Hmm... how does the position-independent code regain normal speed? I'm thinking SMC as the answer there. Would this mean programs must be copied into RAM before they are run? (You never specified one way or the other)
Well, it does use SMC, and the RST changes the code that it was called from.  Thanks for the interrupt info.

DJ, I think you meant "experienced."
Title: Re: our dear friend third-party OS project: KnightOS
Post by: mapar007 on May 28, 2010, 12:23:10 pm
That's because the French word for experiment is expérience. :)
Title: Re: our dear friend third-party OS project: KnightOS
Post by: DJ Omnimaga on May 28, 2010, 02:48:32 pm
ah right, experienced. I have trouble with some of those words x.x
Title: Re: SirCmpwn third-party OS project: KnightOS
Post by: SirCmpwn on March 02, 2011, 10:03:42 pm
Wow, looking back, KnightOS has come a loooong way.  Multitasking was decided against, multithreading (which is much better) was realized, the kernel is nearly complete, program loading works... lot's of cool things going on, nice to look back.
Title: Re: SirCmpwn third-party OS project: KnightOS
Post by: Eeems on March 02, 2011, 10:14:27 pm
yeah :) I'm really excited for when this becomes a true reality and we can start developing for it on a larger scale then I currently can :P
Title: Re: SirCmpwn third-party OS project: KnightOS
Post by: jnesselr on March 02, 2011, 10:20:06 pm
yeah :) I'm really excited for when this becomes a true reality and we can start developing for it on a larger scale then I currently can :P
I just realized that KOS has to be hosted somewhere.  It's probably hard to find.

/me goes to google.

Wow, that wasn't hard at all.  Found it!
Title: Re: SirCmpwn third-party OS project: KnightOS
Post by: SirCmpwn on March 02, 2011, 10:20:44 pm
Wow, well done :P
The version on SourceForge is actually pretty out of date.  I haven't committed code in a while.
Title: Re: SirCmpwn third-party OS project: KnightOS
Post by: jnesselr on March 02, 2011, 10:22:00 pm
Wow, well done :P
The version on SourceForge is actually pretty out of date.  I haven't committed code in a while.
Yeah, I opened the rom, and it still says 2010.  You should update. ;-)

Just go type:
Code: [Select]
svn ci KOS --username sircmpwn -m "Awesomeness"
Title: Re: SirCmpwn third-party OS project: KnightOS
Post by: SirCmpwn on March 02, 2011, 10:22:51 pm
It has been updated ;) like I said, that version is out of date.
Anyone can take a look: knightos.sourceforge.net (http://knightos.sourceforge.net)
Title: Re: SirCmpwn third-party OS project: KnightOS
Post by: DJ Omnimaga on March 03, 2011, 11:47:51 pm
Hmm shouldn't this be located in the KOS sub-forum?

Also for some reasons I thought it was still multitasking. Could someone explain me the difference between multithreading and multitasking?
Title: Re: SirCmpwn third-party OS project: KnightOS
Post by: SirCmpwn on March 03, 2011, 11:48:21 pm
Multitasking = several programs running at once
Multithreading = several threads within several programs at once
Title: Re: SirCmpwn third-party OS project: KnightOS
Post by: DJ Omnimaga on March 04, 2011, 12:06:35 am
I'M still confused. X.x Does it means the plan to be able to run notepad then switch to a game without having to close notepad was ditched?
Title: Re: SirCmpwn third-party OS project: KnightOS
Post by: SirCmpwn on March 04, 2011, 12:08:09 am
Imagine running programs within programs.  For example, Chrome has multithreaded tabs - each one is on a different thread.  It's similar to interrupts.
Title: Re: SirCmpwn third-party OS project: KnightOS
Post by: DJ Omnimaga on March 04, 2011, 12:08:33 am
I see. So speed is just distributed between them?
Title: Re: SirCmpwn third-party OS project: KnightOS
Post by: SirCmpwn on March 04, 2011, 12:12:13 am
Basically.
Title: Re: SirCmpwn third-party OS project: KnightOS
Post by: DJ Omnimaga on March 04, 2011, 12:44:47 am
Ok thanks for the info :D
Title: Re: SirCmpwn third-party OS project: KnightOS
Post by: calcdude84se on March 06, 2011, 11:06:26 pm
Imagine running programs within programs.  For example, Chrome has multithreaded tabs - each one is on a different thread.  It's similar to interrupts.
For chrome, each tab is actually its own process, but the idea still holds ;)
Title: Re: SirCmpwn third-party OS project: KnightOS
Post by: SirCmpwn on March 07, 2011, 12:39:20 am
Way to ruin my point.
J/k :P

Also, KFS 2.0 is coming along great, once I finish the spec, I'll post it and implement it.  The first section talks about the structure and implementation, and isn't specific to KnightOS (feel free to use KFS in your own OS project).  The second part explains how it pertains to KOS.
Title: Re: SirCmpwn third-party OS project: KnightOS
Post by: jnesselr on March 07, 2011, 07:56:56 am
Way to ruin my point.
J/k :P

Also, KFS 2.0 is coming along great, once I finish the spec, I'll post it and implement it.  The first section talks about the structure and implementation, and isn't specific to KnightOS (feel free to use KFS in your own OS project).  The second part explains how it pertains to KOS.
It would actually be bets if everyone uses the same file structure, IMHO.