Join us on Discord!
You can help CodeWalrus stay online by donating here.
Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - nspiredev500

#16
I have now completed the timer drivers, which means I could now interrupt user mode programs, so nothing can just stay in an endless loop and use all the processor time.
I'm now going to start implementing the system calls for the usermode programs to use.
After that I have to port newlib, and then I can start writing user mode programs, and then I should have something more impressive to present.
#17
I wasn't satisfied with the 25% accuracy of the battery reading of my TI nspire CX CAS, so I want to make a program that shows you a more accurate percentage.
But to do this, I need much data from differed reported battery voltages with the corresponding reported percentage from the os.
I made a program that displays a dialog with 3 voltages when run.

I would like to have as many people as possible report back their calculator model (classic or CX), the voltage levels from the program and the reported battery percentage by the os (hover over the battery icon whith the cursor).
It would be very time-consuming to gather all that data myself, and I only have a CX calculator.

I can't seem to get attachments working so here is the download from github.

The full repository is here.

My first readings are:
0.0V
3.909677V
0.206452V
#18
It turns out it was just bad programming, the division was an integer division and the result was converted to a floating point number.
VBATT is still 0, but when hovering over the battery icon in firebird is says something about AAA-batteries.
Maybe you can put extra batteries in the calculator and that would detect that.
#19
It is now able to draw to the screen while the OS is running without any flickering. It does use a bit of performance though.
And weirdly, trying to turn that off while it is installed crashes the calculator, but not the emulator.
I also implemented a miniclock:
#20
Nothing groundbreaking, but it now runs a little userspace test on actual hardware.
Now I can start to implement file io, timeslices for processes, IPC and the userspace drivers.
Something a little more visual may be coming in the next weeks, maybe I'm starting with the lcd driver.
#21
TLDR: I am currently trying to create an operating system for the ti nspire and just hit a (small) milestone, searching for testers in the future

In my current project, called simply OSExt for now (because it should extend the normal ti OS sometime in the future), I deviated from simply writing a program that I wanted to integrate with the OS to wanting to write a whole paralell OS kernel.
The whole kernel-idea started because I hated it when I tried to test a program and the calculator crashed, leaving me waiting for it to reboot, and with no clue why it even crashed in the first place.


This is a massive undertaking, and I may never finish it, but I now have a small testing-version finished, which can run a programm in userspace in its own virtual address space, where it can't do harm to the rest of the system if it goes wrong.
Now I need to implement a proper program loader, a way for the program to use files, allocate new memory, create new processes and communicate with them.
I want to use the newlib library, which is actually already used by ndless, so it shouldn't be that hard to port.
My goal is to make a complete POSIX system, so I can eventually port some open-source software to my os.

If someone wants to help me, or maybe volunteer to test it if it's more mature, I'd be happy. Because I only have an ti nspire CX CAS HW-AA, I can only test the rest in the emulator myself.
If you want to test it in firebird yourself: the github page or the .tns file


The current Roadmap:
  • implementing a way for programs to allocate memory
  • implementing a way for programs to access files, if they have the permission
  • implementing POSIX fork and exec to create new processes
  • implementing a message system and a pipe system for the programs to communicate
  • porting newlib
  • implementing a dynamic linker for shared libraries
  • making a lcd driver
  • making a keypad driver
  • making a touchpad driver
  • making a desktop environment with a file browser and the ability to execute programs and let them display to the screen
  • optimizing memory usage
long-term:
  • if I'm not dead already, implementing a usb storage driver (will certainly take much time for this one)
  • porting gcc and binutils, so I can develop the kernel on my calculator
  • if I'm somehow still alive, integrating it into nLoader to boot from it

I have this shell for debug output:


And here is my proof of going into userspace:


Here is the address space. All but the first and second entries are my kernel:

#22
I want to show the battery charge to the user while my program is running, so I have to read it myself.
To test it I made a small program that reads the voltages and shows them, but it only works in firebird, not on my CX CAS HW-AA.
In firebird it shows:
VBATT: 6.0
VSYS: 6.0
B12: 3.0

on my calculator:
VBATT: 0.0
VSYS: 4.0
B12: 0.0

Is my program or my calculator broken?
Or is only VSYS used in real calculators?

At 50% my calculator now shows 3V for VSYS, so it really seems only VSYS is used.

Thanks in advance if anyone knows more, I haven't found anything about this.

Here is the hackspire entry for the ADC:
https://hackspire.org/index.php?title=Memory-mapped_I/O_ports_on_CX#C4000000_-_Analog-to-Digital_Converter_.28ADC.29

my program (download link from my omnimaga post, codewalrus doesn't seem to like zip files)
#23
I managed to get a system working (in firebird, not yet tested on hardware) that lets programms request function tables from libraries (sort-of dynamic linking from what I understand, maybe I'll do a proper dynamic linker with resolving missing symbols in the files, but I currently don't know enough about that).
When handled by header files to define function pointers with the right names and parameters, a programm doesn't have to include the functions, thus reducing the size of the binary and the size occupied in RAM if multiple programms use the same library.
It would also make it easier to update a library inside a program, you would just update your library.
I have a PoC on a github repo along with a short screen recoding showing that it works.

If you're interested, it works by replacing itself as the system call handler and then catches system calls that have a certain signature and runs them.
There are 2 system calls: registering a function table as a library with a specific name, and requesting a function table with a name.
It searches in a path (in this case /documents/ndless/) for a library with that name and runs it. The library should register itself with its name and the functions it wants to export.
Because the swi handler address isn't os-specific, this PoC should work on every hardware and software version. I testet it in firebid with 4.5 CX CAS HW W, 4.5 CX HW W and 4.5 HW J.


For anyone wondering why I even did this, I plan to make a programm that is divided up into modules, and these modules should be easily replacable by a user without recompilation (no one would do that and it is some work to get the ndless-sdk running).
In this case it would be as easy as swapping out one file.
#24
UPDATE:
I finished the settings and security modules. Now you can decide if you want navnet on or off, and you can set a password for your calculator.
Be carefull not to brick you calculator by forgetting your password.
If you set OSExt as a startup programm I recommend moving it out if you have a programm that loads ndless at boot-time and you don't plan to use your calc for a long time, so it isn't protected anymore.
If you want do reset your settings. use another programm that lets you navigate the filesystem and delete /OSExt_config.conf.tns .
(PS: is this the correct way to do an update or should I edit my post?)
#25
This is a small project I started mainly for myself, but I thought other people could use, too.
At this stage it's just a miniclock (NClock's miniclock doesn't seem to work on OS 4.5) on the top right corner and a way to disable usb transfers (so other people can't mess with your files).
Planned are a desktop, a shell, and a login manager (so people can't just edit the files directly on calc).
You can leave Suggestions as a github issue (or here) if you want.
Currently only for OS 4.5 CAS and non-CAS, CAS tested on real hardware.
Leave an issue at github (or here) if you want a version for another OS version.
https://github.com/nspiredev500/OSExt

I hope it's usefull for someone



Powered by EzPortal