Omnimaga

Omnimaga => Our Projects => Ndless => Topic started by: fb39ca4 on August 13, 2011, 11:41:09 pm

Title: Ndless suggestions thread
Post by: fb39ca4 on August 13, 2011, 11:41:09 pm
What are some things you would like to see in the next version of ndless? I'm thinking more along the lines of functions and stuff, not major changes like a permanent installation.

Here's my first one:
Code: (Functions for overclocking and returning CPU to original speed) [Select]
void set_cpu_150_mhz() {
  *(volatile unsigned*) 0x900B0000 = 0x00000002;
  *(volatile unsigned*) 0x900B000C = 4;
}
void set_cpu_90_mhz() {
  *(volatile unsigned*) 0x900B0000 = 0x00141002;
  *(volatile unsigned*) 0x900B000C = 4;
}
Title: Re: Ndless suggestions thread
Post by: calc84maniac on August 13, 2011, 11:45:33 pm
Original CPU speed isn't 90MHz on all OSes. It's probably possible to return the previous value from the function, though.

Edit: I guess it could go something like
Code: [Select]
#define SPEED_150MHZ 0x00000002
#define SPEED_90MHZ 0x00141002

unsigned set_cpu_speed(unsigned speed) {
  unsigned lastSpeed = *(volatile unsigned*) 0x900B0000;
  *(volatile unsigned*) 0x900B0000 = speed;
  *(volatile unsigned*) 0x900B000C = 4;
  return lastSpeed;
}

And then you'd use it like:
Code: [Select]
unsigned speedBackup = set_cpu_speed(SPEED_150MHZ);

//Code goes here

set_cpu_speed(speedBackup);
Title: Re: Ndless suggestions thread
Post by: ExtendeD on August 14, 2011, 11:01:45 am
I like this thread :)

Thanks for this patch, here it is on the Ndless's SVN: http://hackspire.unsads.com/wiki/index.php/Libndls#CPU
Shouldn't CPU_SPEED_90MHZ be 0x00145002, as on OS < 2.1 according to this (http://hackspire.unsads.com/wiki/index.php/Memory-mapped_I/O_ports#900B0000_-_Power_management)?
And is this one correct: #define CPU_SPEED_120MHZ 0x000A1002 ?
Title: Re: Ndless suggestions thread
Post by: SolusIpse on August 14, 2011, 12:08:13 pm
Quote from: hackspire
since v3.0. speed is one of CPU_SPEED_150MHZ, CPU_SPEED_120MHZ, CPU_SPEED_90MHZ. Returns the previous speed. You must restore the original speed before the program exits.

I wonder if this means Ndless 3.0 is almost ready?
Title: Re: Ndless suggestions thread
Post by: DJ Omnimaga on August 14, 2011, 12:15:44 pm
I hope so, although I understand it might be hard to achieve with everything TI did to block it.

If it comes out soon this will make a lot of people happy for school restart, though. We are already getting a bunch of new members lately O.O
Title: Re: Ndless suggestions thread
Post by: ExtendeD on August 14, 2011, 12:55:19 pm
SolusIpse: it just means they probably won't be any release before v3.0.
Title: Re: Ndless suggestions thread
Post by: fb39ca4 on August 14, 2011, 01:31:33 pm
I just got that code from bwang's raycaster, I guess that was designed for os 1.1. I suppose we could have a single function oc_cpu(bool), where true overclocks, while saving the original speed in a static variable, and false resets the cpu to its original state.

Also, how about functions for accessing the timers (and RTC)?
Title: Re: Ndless suggestions thread
Post by: Lionel Debroux on August 14, 2011, 01:36:35 pm
Quote
I suppose we could have a single function oc_cpu(bool), where true overclocks, while saving the original speed in a static variable, and false resets the cpu to its original state.
Well, there's more than one overclocking clock frequency, so "bool" wouldn't do :)

Quote
Also, how about functions for accessing the timers?
Yeah, it's a good idea to expand the HAL of Ndless.
Title: Re: Ndless suggestions thread
Post by: ExtendeD on August 14, 2011, 01:38:33 pm
t0xic_kitt3n: are you able to try the set_cpu_speed() function on Ndless's Subversion repository?

I will gladly integate any contribution provided as source code patches, but I unfortunately can't invest time on enhancing libndls myself.
Title: Re: Ndless suggestions thread
Post by: fb39ca4 on August 14, 2011, 01:41:58 pm
Quote
I suppose we could have a single function oc_cpu(bool), where true overclocks, while saving the original speed in a static variable, and false resets the cpu to its original state.
Well, there's more than one overclocking clock frequency, so "bool" wouldn't do :)
But I don't really see a need for a program to switch between more that two frequencies - 150mhz for maximum performance, and the default speed for otherwise.
Title: Re: Ndless suggestions thread
Post by: annoyingcalc on August 15, 2011, 10:29:04 pm
I would like nspire CX OS 3.0.2 support
Title: Re: Ndless suggestions thread
Post by: fb39ca4 on August 15, 2011, 10:31:53 pm
That is already being worked on, this thread is more for functions to go in libndls.
Also we could add this (http://ourl.ca/9487/181570) random number function.
Title: Re: Ndless suggestions thread
Post by: Munchor on February 10, 2012, 09:32:28 am
Hey ExtendeD, what about being able to open the Scratchpad while in a game/program? I'd love that :)

Also, would it be possible to speed up the game like in some computer emulators?

Thanks.
Title: Re: Ndless suggestions thread
Post by: ExtendeD on February 10, 2012, 01:42:38 pm
Hey ExtendeD, what about being able to open the Scratchpad while in a game/program? I'd love that :)

Integrating Ndless with the OS tasks management would be rather difficult.
But being able to suspend the current program execution and restore it would be possible. Maybe I could expose an API for this?

Also, would it be possible to speed up the game like in some computer emulators?

Programs must implement CPU speed tuning themselves for this, or you can use Nover.
Title: Re: Ndless suggestions thread
Post by: Munchor on February 14, 2012, 12:37:06 pm
But being able to suspend the current program execution and restore it would be possible. Maybe I could expose an API for this?

That would be great, I'd love it.
Title: Re: Ndless suggestions thread
Post by: willrandship on May 06, 2012, 05:19:41 pm
Is this still a valid suggestion thread? If so, I'd love to see a folder for auto-run programs on bootup, for patches and the like, that the user could alter. Maybe also include that "show all directories" patch.

Ndless 3 had a retentive install, right? I think it does...

Also, perhaps a "patch" directory where we have a partial duplicate directory tree. The duplicate tree would be copied over the original upon bootup, files included, replacing old ones.

Edit: tenses, and more suggestions.
Title: Re: Ndless suggestions thread
Post by: DJ Omnimaga on May 06, 2012, 08:15:52 pm
I believe the topic is still valid, as Ndless is still being worked on (although i believe it's more active when TI blocks it)
Title: Re: Ndless suggestions thread
Post by: calc84maniac on May 06, 2012, 08:58:50 pm
The startup feature is already supported ;)
Title: Re: Ndless suggestions thread
Post by: willrandship on May 06, 2012, 09:02:56 pm
oh, good. then, a patching program shouldn't be too difficult.
Title: Re: Ndless suggestions thread
Post by: DJ Omnimaga on May 06, 2012, 09:26:06 pm
What I'm wondering in particular is if Ndless will be ported to the prototypes from which dumps were successfully made. Would the hardware be too different to allow this to happen?
Title: Re: Ndless suggestions thread
Post by: Jim Bauwens on May 07, 2012, 09:36:33 am
First we need to manage to get some code running, and I think then we can focus on porting Ndless.
However, not too many people have a CAS+, so it's not the most important thing to do right now.
Title: Re: Ndless suggestions thread
Post by: MasterGeek on May 14, 2012, 09:25:29 pm
Would it be possible to add a command or something to add things to the settings menu and other menus/context menus. You could easily modify bootup programs without closing a document or in testing mode.
Title: Re: Ndless suggestions thread
Post by: Lionel Debroux on May 15, 2012, 01:05:27 am
Quote
Would it be possible to add a command or something to add things to the settings menu and other menus/context menus
Almost everything is possible, but lots of things are not documented. AFAICT, this one belongs to that class ;)
Title: Re: Ndless suggestions thread
Post by: Darl181 on July 31, 2012, 03:50:12 am
[necro]

Could it be possible for Ndless to run a program when the calc turns on? I don't mean when it boots, but when it just goes to the homescreen.
Thinking about something like a password program, it wouldn't help much to have one that only pops up after the calc reboots :P
Title: Re: Ndless suggestions thread
Post by: cyanophycean314 on July 31, 2012, 10:01:03 am
I thought there were startup programs. For example, you can have nClock launch every time you boot and the little clock will appear.
I also recall that a password program exists for the Nspire...

Edit: Aha! Found it here (http://ourl.ca/15214)
Title: Re: Ndless suggestions thread
Post by: Hayleia on July 31, 2012, 10:22:01 am
I thought there were startup programs. For example, you can have nClock launch every time you boot and the little clock will appear.
I also recall that a password program exists for the Nspire...

Edit: Aha! Found it here (http://ourl.ca/15214)
Yes, but he is not asking for the program to launch on boot, but when turning the calc on ;)
Title: Re: Ndless suggestions thread
Post by: ExtendeD on July 31, 2012, 10:26:02 am
This feature could become a security issue without a key combo to bypass it (as it exists for the startup feature). And this one would make the feature useless if the password screen is the only use case.
Title: Re: Ndless suggestions thread
Post by: calc84maniac on July 31, 2012, 10:27:45 am
This feature could become a security issue without a key combo to bypass it (as it exists for the startup feature). And this one would make the feature useless if the password screen is the only use case.
It wouldn't be completely useless, since not everybody would know about the key combo.
Title: Re: Ndless suggestions thread
Post by: lkj on July 31, 2012, 12:06:54 pm
You could still bypass it by rebooting and then pressing the key combo.
Title: Re: Ndless suggestions thread
Post by: Darl181 on August 11, 2012, 01:07:21 am
Tho the vast majority of people wouldn't know the key combo... anyway..

[necro]
I had the Nspire hooked up to the Computer Link and ran a Ndless program, and the Link (and in turn Windows) freaked and the usb hub I had it plugged into was shut off.
Might it be possible, for when a usb cable is plugged in and a ndless program is launched, for the calc to mimic whatever it sends during APD or something like that so the software doesn't start causing problems?
Title: Re: Ndless suggestions thread
Post by: ExtendeD on August 11, 2012, 03:35:39 am
Booting up my Clickpad hooked up make it frequently freeze but I can't figure out why.
Your problem is different, I have never heard of anything similar. Which was the Ndless program?
Title: Re: Ndless suggestions thread
Post by: Darl181 on August 11, 2012, 03:54:59 am
It was the Theme Editor ( http://tiplanet.org/forum/archives_voir.php?id=6070 ).
I was thinking it was because the connection between the calc and comp was abruptly cut..?
Title: Re: Ndless suggestions thread
Post by: ExtendeD on August 11, 2012, 04:22:35 am
This shouldn't really be a problem.
Title: Re: Ndless suggestions thread
Post by: Levak on August 11, 2012, 07:39:29 am
I had the Nspire hooked up to the Computer Link and ran a Ndless program, and the Link (and in turn Windows) freaked and the usb hub I had it plugged into was shut off.
Might it be possible, for when a usb cable is plugged in and a ndless program is launched, for the calc to mimic whatever it sends during APD or something like that so the software doesn't start causing problems?

This was always the case. Until I created my own popups with the TI-Nspire API (syscalls) and discovered that even if we were in an Ndless program, the Link software was able to take screenshots, to send documents etc ... (but not calling the scratchpad)

I plan to make one day a patch for Ndless in order to let people develop their own GUI without recode everything.
(http://i.imgur.com/7ucWe.png)
I've also been able to initialize a new GC and use internal draw commands.
(http://i.imgur.com/Q14XY.png)

 The reason I'm not doing the patch right now is because there are bugs in a lot of functions and also I've found that there is a link between designing a GUI and drawing directly stuff on the screen with the GC functions. Sadly I haven't been able to do it.

On the other hand, the scratchpad is a strange popup that I was able to push on the stack but not able to show it inside an Ndless loop (it is called at the exit of the program).
Title: Re: Ndless suggestions thread
Post by: lkj on August 16, 2012, 03:57:15 pm
Could KEY_NSPIRE_SHIFT and CAPS be merged? I think it's useless to have both.
Title: Re: Ndless suggestions thread
Post by: willrandship on August 16, 2012, 05:17:48 pm
That would cause program incompatibility to fix something that only adds maybe 100 bytes to your compiler setup. It shouldn't affect programs at all, since those are macros, and they're simply #defined into the program as numbers.
Title: Re: Ndless suggestions thread
Post by: lkj on August 16, 2012, 05:42:20 pm
Other keys have also been merged.
I know that it might not affect compiled programs, but when coding you have to check for both keys if you want your program to be compatible with all models.

Not many existing programs use shift anyway, so it wouldn't cause big incompatibilities.
Title: Re: Ndless suggestions thread
Post by: ExtendeD on August 17, 2012, 07:18:51 am
Thanks, it's commited to the SVN head and will be shipped in the next SDK release. KEY_NSPIRE_CAPS is now deprecated.
The key constants are based on http://hackspire.unsads.com/wiki/index.php/Keypads , there might be other mistakes.
Title: Re: Ndless suggestions thread
Post by: willrandship on August 18, 2012, 10:42:37 pm
Lol, I wrote the 84+ key constants about a year and a half ago. Are they still the same?
Title: Re: Ndless suggestions thread
Post by: Spyro543 on February 07, 2013, 07:32:12 pm
Integrating Ndless with the OS tasks management would be rather difficult.
But being able to suspend the current program execution and restore it would be possible. Maybe I could expose an API for this?
It would be really cool if there was a Windows-like desktop for Ndless, that would just bypass the Nspire OS's UI.
Title: Re: Ndless suggestions thread
Post by: Levak on February 07, 2013, 08:44:26 pm
Integrating Ndless with the OS tasks management would be rather difficult.
But being able to suspend the current program execution and restore it would be possible. Maybe I could expose an API for this?
It would be really cool if there was a Windows-like desktop for Ndless, that would just bypass the Nspire OS's UI.

You mean ... stuff like this ?
(http://i.imgur.com/VJ9Fn.png)(http://i.imgur.com/7ucWe.png)(http://i.imgur.com/LSyEL.jpg)
As you can fairly see, its possible, just still in development.
Everything works using Ndless and syscalls to OS API. This means you can actually take screenshot from TI-Nspire Computer Link Software of a Ndless program. You also can receive document while you were in the app.
Title: Re: Ndless suggestions thread
Post by: Spyro543 on February 07, 2013, 09:19:49 pm
What I'm talking about is an XFCE-like desktop interface. Would a simple version of it be possible with Ndless?
Title: Re: Ndless suggestions thread
Post by: willrandship on February 08, 2013, 12:41:24 am
Well, technically you can run xorg through linux which is in turn run by ndless, but it's not wonderfully fast.
Title: Re: Ndless suggestions thread
Post by: floris497 on February 09, 2013, 09:09:23 am
is it possible to get nSpire working with different extensions so you won't have to change the every time?
Title: Re: Ndless suggestions thread
Post by: willrandship on February 09, 2013, 09:40:14 am
Anything you put in the startup folder will run on boot. Not sure if that's what you meant, but it's a good start.
Title: Re: Ndless suggestions thread
Post by: Hayleia on February 09, 2013, 09:41:56 am
is it possible to get nSpire working with different extensions so you won't have to change the every time?
Ihave not understood the request ???
Ndless supports extensions through its cfg file, if that is what you meant
Title: Re: Ndless suggestions thread
Post by: floris497 on February 09, 2013, 09:49:41 am
I know that, but it's irritating me when transferring files it must always be .tns would be nice if nSpire accepts every extension.

or is this only a restriction of the transfer software?
Title: Re: Ndless suggestions thread
Post by: Lionel Debroux on February 09, 2013, 10:41:26 am
Quote
it must always be .tns would be nice if nSpire accepts every extension.
It would indeed be nice if the Nspire exposed standard Mass Storage Device USB class (like the Prizm does) and accepted every extension, but unfortunately, it does not...
Title: Re: Re: Ndless suggestions thread
Post by: DJ Omnimaga on February 09, 2013, 10:47:38 am
Most likely a protection TI added. With the PRIZM you can go as far as using the calculator as mass storage device and run portable computer softwares from it. The funny thing is that some computer image files even show up with an image icon, even though they cannot be opened.
Title: Re: Ndless suggestions thread
Post by: JosJuice on February 09, 2013, 11:31:12 am
The funny thing is that some computer image files even show up with an image icon, even though they cannot be opened.
I think they added icons for all the file types that the Prizm can either open or save. For instance, bmp files can be saved (when taking screenshots) but not opened on-calc.
Title: Re: Ndless suggestions thread
Post by: Levak on February 09, 2013, 06:06:00 pm
or is this only a restriction of the transfer software?
Transfer software restriction, deeply coded in the navnet driver.
Title: Re: Ndless suggestions thread
Post by: willrandship on February 10, 2013, 09:26:00 am
I don't think it's that big of a deal, personally. At least they didn't set it up to check every file to make sure it's valid.