You can help CodeWalrus stay online by donating here. | New CodeWalrus | Old (dark mode) | Old (light) | Discord server

C support in KOS

b/[Inactive] KnightOS (TI-73/83+/84+/CSE) Started by Max Leiter, December 27, 2015, 11:53:26 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

u/Max Leiter February 05, 2016, 04:40:29 AM
The two finished C tutorials are now live :)
http://www.knightos.org/documentation/tutorials/getting-started-c/

Hopefully people decide to make some C programs, because the KOS program ecosystem is severely lacking.
u/Dream of Omnimaga February 05, 2016, 06:11:38 AM
Good to see tutorials ready now. :D As for programs, it might take a while before more are made, though, because if even the CE doesn't get many programs, then imagine for a third-party OS. :P But yeah it would definitively be nice to see more games and perhaps math tools for KOS.
u/Max Leiter February 12, 2016, 04:11:03 AM


Began some work on color C bindings tonight, hopefully I'll be able to create a copy of the gfxdemo in C sometime soonish, and I'm on break from school this week so should have plenty of time to.

Here's a higher quality mp4 version of the GIF:
Last Edit: February 12, 2016, 04:22:05 AM by Max Leiter
u/Max Leiter February 18, 2016, 04:17:15 PM
Update: The color C bindings have now been merged
u/Max Leiter March 02, 2016, 03:34:16 AM
Went ahead and added wrappers for the (action)Pixel kernel functions (invert_pixel, set_pixel, and reset_pixel).
https://github.com/KnightOS/libc/commit/d50ffc682fdf2f44bdffb45f64270f16dfbfdfd9
u/Dream of Omnimaga March 02, 2016, 03:35:37 AM
Thanks for the update. I'M glad to see more progress on this Max Leiter. I hope that one day we will be able to easily port C games between multiple calculators and KnightOS (even if it means changing the graphics in the monochrome version).
u/Max Leiter March 02, 2016, 03:37:31 AM
Quote from: DJ Omnimaga on March 02, 2016, 03:35:37 AM
Thanks for the update. I'M glad to see more progress on this Max Leiter. I hope that one day we will be able to easily port C games between multiple calculators and KnightOS (even if it means changing the graphics in the monochrome version).
I'm currently experimenting porting a Prizm game (Game of Life by @merthsoft) to KnightOS, it's pretty easy so far. The hardest part is making a game made for color calculators look nice on a monochrome screen, but besides that most of the functions have direct "translations." I don't plan to release the game, but will post a finished version here if I ever finish it.

EDIT: Added all the draw_rect() functions/variations, so now the KOS Display section is implemented! (ie www.knightos.org/documentation/reference/display.html)
Last Edit: March 03, 2016, 02:18:23 AM by Max Leiter
u/Dream of Omnimaga March 22, 2016, 06:12:10 AM
Nice that cross calculator brand porting isn't too hard. Monochrome graphics can usually be adapted to just be small rectangles or squares if they can't be converted easily anyway. Even a Pac-Man game would still be enjoyable with 3x3 blocks if that meant the entire board fit on screen without being flipped sideways.

Did you work more on the game, by the way? I am curious if you could post a screenshot.
u/Ivoah March 22, 2016, 06:14:31 AM
Quote from: DJ Omnimaga on March 22, 2016, 06:12:10 AM
Nice that cross calculator brand porting isn't too hard. Monochrome graphics can usually be adapted to just be small rectangles or squares if they can't be converted easily anyway. Even a Pac-Man game would still be enjoyable with 3x3 blocks if that meant the entire board fit on screen without being flipped sideways.
Porting stuff from TI-OS to KOS is super easy, I managed to port the rubiks cube program, and I still don't even know exactly how it works :)
u/Max Leiter March 22, 2016, 06:20:00 AM
Quote from: DJ Omnimaga on March 22, 2016, 06:12:10 AM
Nice that cross calculator brand porting isn't too hard. Monochrome graphics can usually be adapted to just be small rectangles or squares if they can't be converted easily anyway. Even a Pac-Man game would still be enjoyable with 3x3 blocks if that meant the entire board fit on screen without being flipped sideways.

Did you work more on the game, by the way? I am curious if you could post a screenshot.

too much relied on colors for it to be ported easily (I couldn't tell if it was working correctly with just black/white, I didnt put much time in it :( )
u/Dream of Omnimaga March 23, 2016, 03:06:37 AM
Quote from: Ivoah on March 22, 2016, 06:14:31 AM
Quote from: DJ Omnimaga on March 22, 2016, 06:12:10 AM
Nice that cross calculator brand porting isn't too hard. Monochrome graphics can usually be adapted to just be small rectangles or squares if they can't be converted easily anyway. Even a Pac-Man game would still be enjoyable with 3x3 blocks if that meant the entire board fit on screen without being flipped sideways.
Porting stuff from TI-OS to KOS is super easy, I managed to port the rubiks cube program, and I still don't even know exactly how it works :)
Lol nice. Actually my main difficulty concern was converting a 320x240 game to 96x64, hence my suggestion. But nice to hear. Maybe at one point someone could port various calc games to KOS and make some sort of CW arcade using the emulator. Porting games would probably require the permission of certain authors, though.
Website statistics


MyCalcs | Ticalc.org | Cemetech | Omnimaga | TI-Basic Developer | MaxCoderz | TI-Story | Casiocalc.org | Casiopeia | The Museum of HP Calculators | HPCalc.org | CnCalc.org | Music 2000 Community | TI Education | Casio Education | HP Calcs | NumWorks | SwissMicros | Sharp Calculators
Powered by EzPortal