CodeWalrus

Development => Calculators => Calculator News, Coding, Help & Talk => Topic started by: Yuki on February 19, 2016, 09:26:40 PM

Title: Ndless 4.2 is out!
Post by: Yuki on February 19, 2016, 09:26:40 PM
(https://tiplanet.org/forum/images/forum_uploads/65047_1455915354_56c7815ad1500.jpg)
It's working! <insert mad scientist laugh here>

Remember the big red warning in my last news about Nspire OS 4.2? Well, I guess it lasted only a good 3 days. That was fast.

Indeed, Ndless 4.2, working on the OS 4.2 that has been released 3 days ago, which is an answer to Ndless 4.0 released about a month and a half ago, has been released. The cat and mouse game is going strong these days, it seems.

Installation is the same as 4.0, you can even refer word-by-word to the Ndless 4.0.3 (https://codewalr.us/index.php?topic=975.0) news and replace the version number with 4.2.

Download it here! (https://github.com/ndless-nspire/Ndless/releases/tag/v4.2)
Official website (http://ndless.me/)
Tutorial by TI-Planet (https://tiplanet.org/forum/viewtopic.php?f=63&t=17765)
Source code (https://github.com/ndless-nspire/Ndless)
Title: Re: Ndless 4.2 is out!
Post by: Dream of Omnimaga on February 20, 2016, 06:11:36 AM
That was definitively fast and I'm glad the install process is identical to 4.0.3 rather than 3.9. 3.9 was so annoying to install, thanks to TI's actions. Hopefully OS 4.3 doesn't come out tomorrow (maybe Ndless 4.2 record speed release will make TI also break their OS release speed record? <_<
Title: Re: Ndless 4.2 is out!
Post by: rwill on April 30, 2016, 09:57:44 AM
So I tried running nQuake with a new ndless and it appears that
the usable stack size shrunk to around 53kb. This makes nQuake
crash. As 53kb is somewhat low for any program I wondered if it
would be possible for ndless to increase the amount of stack
available to programs, most likely by pointing the stack to
an ndless allocated region and then restoring the real stack
when entering syscalls.

I can wrap the syscalls myself for nQuake but nQuake can hardly
be the only application where such a small stack size is
a problem..
Title: Re: Ndless 4.2 is out!
Post by: Dream of Omnimaga on April 30, 2016, 04:01:10 PM
What's the minimum stack size required by nQuake?
Title: Re: Ndless 4.2 is out!
Post by: rwill on April 30, 2016, 05:15:26 PM
Quote from: DJ Omnimaga on April 30, 2016, 04:01:10 PM
What's the minimum stack size required by nQuake?

Well I can only guess but it worked with around 56k. Unmodified WinQuake was around 600k...
Title: Re: Ndless 4.2 is out!
Post by: Vogtinator on May 01, 2016, 03:09:41 PM
Quote from: rwill on April 30, 2016, 09:57:44 AM
So I tried running nQuake with a new ndless and it appears that
the usable stack size shrunk to around 53kb. This makes nQuake
crash. As 53kb is somewhat low for any program I wondered if it
would be possible for ndless to increase the amount of stack
available to programs, most likely by pointing the stack to
an ndless allocated region and then restoring the real stack
when entering syscalls.

I can wrap the syscalls myself for nQuake but nQuake can hardly
be the only application where such a small stack size is
a problem..


I can confirm the issue. SP is at 0x1800d488 on 4.2 CX CAS, so there are 0xd488 bytes of available stack space.
It should be possible to increase it by either using a different stack or map some more space at 0x17ffX000.
I'll try both and figure out what's the best option here.
Title: Re: Ndless 4.2 is out!
Post by: bluman855 on November 01, 2016, 04:21:16 AM
Sorry for the extreme necro, but is this problem resolved? I am on a non CAS Nspire CX, and the calculator reboots when I try to run nquake.
Title: Re: Ndless 4.2 is out!
Post by: Dream of Omnimaga on November 01, 2016, 04:52:32 AM
Hi and welcome here bluman855. I can't help you but hopefully @Vogtinator can. It seems that @Legimet has been active recently on the Ndless repo, so maybe he might know if that issue was resolved yet.
Title: Re: Ndless 4.2 is out!
Post by: Vogtinator on November 01, 2016, 10:32:15 AM
Quote from: bluman855 on November 01, 2016, 04:21:16 AM
Sorry for the extreme necro, but is this problem resolved? I am on a non CAS Nspire CX, and the calculator reboots when I try to run nquake.

The issue hasn't been resolved yet, as the underlying cause is fairly complex. However, I've got two weeks of vacation now so hopefully I'll be able to look into this in the next few days!
The approach of mapping additional pages is likely the best one, as it means not having to fiddle with sp at all. It just needs some modification to the nucleus task struct, so that the OS doesn't think that it overflowed.
Title: Re: Ndless 4.2 is out!
Post by: Vogtinator on November 01, 2016, 07:00:50 PM
It was actually much less work than I thought, this ndless_resources adds 128k of additional stack space before running programs on OS >= 4.2.
Please test and report back!
Title: Re: Ndless 4.2 is out!
Post by: Dream of Omnimaga on November 02, 2016, 03:42:12 AM
Cool. Hopefully this resolves compatibility issues.

On a side note I wonder if it would be easy to add backward compatibility support with Ndless 1.0, 1.1, 1.7, 2.0, 2.1 programs and emulate grayscale mode with them?
Title: Re: Ndless 4.2 is out!
Post by: critor on November 06, 2016, 03:38:53 PM
Note to those who have to update to OS 4.3 for some reason (latest version mandatory for some exams for example), and still haven't done so yet.

With the above latest Ndless 4.2r2006 release, there is a way to update to OS 4.3 and keep Ndless. :D

If your calculator is hardware revision V or older, check the tutorial : https://tiplanet.org/forum/viewtopic.php?f=57&t=19185 ;)

(https://tiplanet.org/forum/gallery/image.php?mode=medium&album_id=63&image_id=7494) (https://tiplanet.org/forum/gallery/image_page.php?image_id=7494)