News for hackers. Stuff that matters.

KnightOS, a third party OS for TI z80 calculators

https://github.com/KnightOS/KnightOS

KnightOS is a third-party Operating System for Texas Instruments z80 calculators. It offers many features over the stock OS, including multitasking and a tree-based filesystem, delivered in a Unix-like environment. KnightOS is written entirely in z80 assembly, with a purpose-built toolchain. Additionally, the KnightOS kernel is standalone, and you can use it as the basis for your own powerful operating systems.

You can download the latest (experimental) version here: http://www.knightos.org/download/

( 39 comments | 123 points | on HN )
Re:KnightOS, a third party OS for TI z80 calculators by ddevault on Sunday June 15, 2014 @09:50PM (#7897040)
I'm the author of this software, with the help of some open-source contributors. Feel free to send questions my way.

Even people who don't know assembly can help, if you're interested. We need assembly, C, Python, and web programmers. Let me know if you're interested in helping out.

Re:KnightOS, a third party OS for TI z80 calculators by joshstrange on Monday June 16, 2014 @01:41PM (#7900368)
I couldn't find any mention of this but does it have any sort of TI-BASIC-type language you can use on it? I got started programming with that and it was awesome to be able to carry around with me a little computer that I could write and run programs on. I never delved down into ASM but I did install a few ASM programs that provided better access to the BASIC programs doing things like sprites or screen draws a magnitude of times faster or providing features that were not available in BASIC.
Re:KnightOS, a third party OS for TI z80 calculators by vanderZwan on Monday June 16, 2014 @04:38AM (#7897936)
This is very well done! Almost makes me want dig up my 83 Silver Edition, try it out, port Antrun and fix that one bug that made it impossible to play after a while[0]... except I have given it to my sister who actually has a proper use for it during her biology master.

Does this OS come at the cost of not having any of the standard calculator functions, or are all of those still supported? Or maybe a better catch-all question that covers that: what do I have to give up if I switch to KnightOS from the stock OS?

Does it support any forms of on-calc programming?

[0] http://www.ticalc.org/archives/files/fileinfo/328/32817.html

Re:KnightOS, a third party OS for TI z80 calculators by Sir_Cmpwn on Monday June 16, 2014 @04:46AM (#7897959)
You give up math support, as well as on-calc file editing. However, efforts are underway to support both of these things.

You could probably port that game fairly easily. Many Ion functions are included in the kernel.

Re:KnightOS, a third party OS for TI z80 calculators by vanderZwan on Monday June 16, 2014 @05:03AM (#7897997)
Does it work on emulators? If so, any suggestions? (I haven't kept up with development of the TI calc scene at all, I assume there's new kids on the block by now)
Re:KnightOS, a third party OS for TI z80 calculators by ddevault on Monday June 16, 2014 @05:06AM (#7898002)
Runs best on wabbitemu, but you'll need wine to use it on Linux. We're working on a new emulator, maybe you'd like to help? https://github.com/KnightOS/z80e
Re:KnightOS, a third party OS for TI z80 calculators by chrissnell on Sunday June 15, 2014 @10:33PM (#7897132)
I'd love to see a screenshot. What does it look like when running?
Re:KnightOS, a third party OS for TI z80 calculators by Sir_Cmpwn on Sunday June 15, 2014 @10:34PM (#7897135)
There are some screenshots on http://www.knightos.org
Re:KnightOS, a third party OS for TI z80 calculators by mikeknoop on Sunday June 15, 2014 @10:02PM (#7897063)
Always makes my day to see people still carrying the TI-hacking torch! :)

Any particular goals you want to achieve with this project?

Re:KnightOS, a third party OS for TI z80 calculators by Sir_Cmpwn on Sunday June 15, 2014 @10:07PM (#7897073)
I just want to see a nice Unix-like for these calcs. Eventually it'd be cool to have a bunch of slick stuff like a VFS and such, but for now I'll be happy once there's good math support and students can start using it.
Re:KnightOS, a third party OS for TI z80 calculators by userbinator on Sunday June 15, 2014 @10:47PM (#7897169)
TI-73: 6MHz Z80, 25K RAM, 512K mass storage PDP-11: ~4.5MHz, 16K RAM, >1M mass storage

CPU looks powerful enough and the amount of RAM is comparable to early Unix machines but you might run into storage space limitations.

Re:KnightOS, a third party OS for TI z80 calculators by eltondegeneres on Sunday June 15, 2014 @10:31PM (#7897129)
This is really cool! Does it require/bundle any nonfree software?
Re:KnightOS, a third party OS for TI z80 calculators by Sir_Cmpwn on Sunday June 15, 2014 @10:34PM (#7897134)
Nope.
Re:KnightOS, a third party OS for TI z80 calculators by eltondegeneres on Sunday June 15, 2014 @10:42PM (#7897153)
Hm I wonder if KnightOS fits the GNU Project's free system distribution guidelines. The list of endorsed systems is pretty short right now.

https://www.gnu.org/distros/free-system-distribution-guideli...

Re:KnightOS, a third party OS for TI z80 calculators by Sir_Cmpwn on Sunday June 15, 2014 @10:50PM (#7897177)
KnightOS is not:

- Complete

- Self hosting

It also does not replace a single non-free blob that's written to read-only memory on the device.

Re:KnightOS, a third party OS for TI z80 calculators by adrusi on Sunday June 15, 2014 @10:30PM (#7897126)
Another project worth mentioning is [GlassOS](http://www.cemetech.net/forum/viewtopic.php?t=5686&highlight...) which is an operating system for the TI-8x series calculators written in C and compiled with sdcc. It doesn't offer multitasking (or at least not background tasks, suspending and resuming might be planned, I don't know). It also supports some fairly gimmicky things like system-wide grayscale settings. It also hasn't seen any development for several months, which makes me sad.

KnightOS seems to be more focused on just providing a sane environment for user programs instead of TI's stock OS which is calculator-first and user programs are second class citizens.

I'm not sure how practical preemptive scheduling with background tasks is for these devices, they really are resource constrained. I'm sure it works fine with one background process, especially if it clocks up the cpu for that, but I don't see it scaling much beyond that. I'll have to try it out some time.

I'd be interested to see if a compatibility layer for programs written in C could be set up. SDCC's binaries tend to be reasonably performant, but significantly larger than their assembly equivalent. With 31k available to programs however, C could work for a lot of applications. I might hack on that sometime.

Re:KnightOS, a third party OS for TI z80 calculators by Sir_Cmpwn on Sunday June 15, 2014 @10:52PM (#7897182)
I hope to eventually implement C support in some form. You're right about SDCC making huge binaries, though - GlassOS is enormous, there's very little space left on the device and it supports fewer calculator models.
Re:KnightOS, a third party OS for TI z80 calculators by bane on Sunday June 15, 2014 @10:43PM (#7897154)
If you want to see a never ending well of software for TI calculators check out http://www.ticalc.org/
Re:KnightOS, a third party OS for TI z80 calculators by noname123 on Sunday June 15, 2014 @11:50PM (#7897324)
Needs the most important feature that prints out the "Memory cleared..." text as the original TI-OS would to fool the teachers and still have your crib notes!
Re:KnightOS, a third party OS for TI z80 calculators by kijin on Monday June 16, 2014 @05:49AM (#7898107)
If these kinds of hacks become popular, I wouldn't be surprised if some school districts and standardized test makers decided to ban all non-stock-OS calculators in the near future.

They might even partner with TI to add some sort of DRM and force students to buy these new, even more overpriced, "ETS-approved" calculators...

Re:KnightOS, a third party OS for TI z80 calculators by Sir_Cmpwn on Monday June 16, 2014 @12:00AM (#7897350)
Here's hoping I can convince the teachers of how great open-source software is instead!
Re:KnightOS, a third party OS for TI z80 calculators by pix64 on Monday June 16, 2014 @01:16AM (#7897507)
If archive a program, it doesn't get erased when you clear the RAM btw. I put up with the little show and dance, but it was ultimately a pointless exercise. I'd hate to lose Tetris.
Re:KnightOS, a third party OS for TI z80 calculators by osi on Monday June 16, 2014 @09:13AM (#7898834)
ah, i remember writing a program to do just that on my TI back in the day!
Re:KnightOS, a third party OS for TI z80 calculators by makmanalp on Sunday June 15, 2014 @11:02PM (#7897199)
Wow, this brings me back to the early 2000s and MirageOS, which wasn't actually an OS but a glorified shell: http://www.detachedsolutions.com/mirageos/

This is a complete replacement though, right? IIRC, the firmware updates had to be signed, how did you get around that?

Re:KnightOS, a third party OS for TI z80 calculators by Sir_Cmpwn on Sunday June 15, 2014 @11:05PM (#7897203)
> This is a complete replacement though, right?

Yep.

> IIRC, the firmware updates had to be signed, how did you get around that?

Here are Texas Instrument's private keys: https://github.com/KnightOS/kernel/tree/master/keys

Re:KnightOS, a third party OS for TI z80 calculators by stusmall on Sunday June 15, 2014 @11:08PM (#7897213)
How'd you get them?
Re:KnightOS, a third party OS for TI z80 calculators by mikeknoop on Sunday June 15, 2014 @11:17PM (#7897236)
They were successfully brute forced in 2009: http://en.m.wikipedia.org/wiki/Texas_Instruments_signing_key...
Re:KnightOS, a third party OS for TI z80 calculators by recursion on Sunday June 15, 2014 @09:30PM (#7896993)
Thought I'd share this as it's really neat
Re:KnightOS, a third party OS for TI z80 calculators by dang on Sunday June 15, 2014 @09:42PM (#7897019)
The text you posted doesn't make it in with the submission when there's a url. (It's on our list to modify the software to make that clear.) The way to do it is to submit the link and then post the text as a comment to the thread—which you'd be welcome to do here. The project looks cool!
Re:KnightOS, a third party OS for TI z80 calculators by recursion on Sunday June 15, 2014 @09:46PM (#7897030)
Oh, I didn't realise that. Thanks. What I posted:

KnightOS is a third-party Operating System for Texas Instruments z80 calculators. It offers many features over the stock OS, including multitasking and a tree-based filesystem, delivered in a Unix-like environment. KnightOS is written entirely in z80 assembly, with a purpose-built toolchain. Additionally, the KnightOS kernel is standalone, and you can use it as the basis for your own powerful operating systems.

You can download the latest (experimental) version here: http://www.knightos.org/download/

Re:KnightOS, a third party OS for TI z80 calculators by rahimnathwani on Sunday June 15, 2014 @10:17PM (#7897102)
@dang As far as I can tell, the text _does_ make it in with the submission (i.e. it is stored) but it is not _displayed_.

I'm reading HN on hn.premii.com (which uses the Algolia API) and I see both the submission URL and the submission text.

BTW thanks for the awesome work you're doing on HN!

Re:KnightOS, a third party OS for TI z80 calculators by dang on Sunday June 15, 2014 @10:19PM (#7897104)
Thanks! You're right: the text is stored (that's how I knew it existed) but doesn't show up when there's a URL. Unless, it seems, you're using a clever client.
Re:KnightOS, a third party OS for TI z80 calculators by __michaelg on Monday June 16, 2014 @05:07AM (#7898005)
Other than tinkering, what's the point of that project?

AFAIK you buy those things because you want TI's math software, not because you need some hardware to run your software on it. After all, these are a bit pricey if just look at the hardware, right?

Re:KnightOS, a third party OS for TI z80 calculators by jmpe on Monday June 16, 2014 @05:20AM (#7898032)
A TI-73 or TI-83 is $20 or less on eBay.
Re:KnightOS, a third party OS for TI z80 calculators by ithkuil on Monday June 16, 2014 @04:16AM (#7897885)
Wow. Good job! Unfortunately I lost my TI-84, I'm tempted to try KnightOS on an emulator on an android tablet, running in an emulator on my laptop.
Re:KnightOS, a third party OS for TI z80 calculators by tokenizerrr on Sunday June 15, 2014 @10:51PM (#7897181)
Does it do math?
Re:KnightOS, a third party OS for TI z80 calculators by Sir_Cmpwn on Sunday June 15, 2014 @10:54PM (#7897188)
No, but it's being worked on. It wasn't being worked on until recently.
Re:KnightOS, a third party OS for TI z80 calculators by pling on Monday June 16, 2014 @02:27AM (#7897689)
Nice. The main reason I own a Casio (9750g) is because I can't stand the TI8x OS. The hardware is better than the Casio but the software isnt. This could be the sweet spot :)

I understand some people might call me crazy but I couldn't use a calculator that forces you to shift to enter EE.

Re:KnightOS, a third party OS for TI z80 calculators by tokenizerrr on Sunday June 15, 2014 @10:55PM (#7897190)
Oh, cool!