-
Notifications
You must be signed in to change notification settings - Fork 105
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Optimizations by pbfy0 (Rebase, needs testing) #255
base: master
Are you sure you want to change the base?
Conversation
static const t_key KEY_NSPIRE_DOC = KEYTPAD_(_KEY_DUMMY_ROW, _KEY_DUMMY_COL, 0x1C, 0x008); | ||
static const t_key KEY_NSPIRE_TRIG = KEYTPAD_(_KEY_DUMMY_ROW, _KEY_DUMMY_COL, 0x12, 0x200); | ||
static const t_key KEY_NSPIRE_SCRATCHPAD = KEYTPAD_(_KEY_DUMMY_ROW, _KEY_DUMMY_COL, 0x1A, 0x400); | ||
extern const t_key KEY_NSPIRE_RET; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This means that every use of any of these variables will also pull in all others via keys.o. Can you compare the impact?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Obviously this is a mistake on my part... Let me fix that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually i fixed it in gameblabla@7353060 since it wouldn't build ofc but perhaps i should redo my patches and force push ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can force push at any time - GH reviews work well with that.
Alright so i cleaned up my commits and i also recompiled it just in case to make sure it does compile fine. |
Compiled a newer build of Picodrive with those changes and gave it to someone else to try. It worked fine, no harmful effects. (although he did not use my newer resources file) |
This avoids having several copies of the table. (Seems to only happened when compiled with -O0 however) Original commit was made by pbfy0 : ndless-nspire@5ea35e9
As a result, ndless will write the location it has found the associated program to ndless.cfg. This significantly speeds opening programs with association, since it avoids trawling through the entire filesystem each time. This is a rebase based upon ndless-nspire@b4ea94c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(oops)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I may be wrong, but the "Support absolute paths in ndless.cfg." commit seems to me like it would make it possible to execute programs stored in /documents while we're in PTT (i.e. with /documents not being accessible). So, I guess we shouldn't have this patch for obvious cheating-enabling reasons (what's another usecase for that anyway?)
I got my TI Nspire CX II today and i can confirm that as of my latest push, it works fine on my calc. I did compile everything with GCC 10.2 instead of GCC 10.1 but that's something you can address later on.
Had an issue with PTT mode where i couldn't get out unless i used ndless on it (i didn't have a Windows machine on hand either) so this was useful to me. Not sure though if the commit does fix it (it was not mine) and i don't want to try it either due to the issue i just mentioned : ) |
Well there's no issue installing and using Ndless while in PTT. People just have to transfer and launch the installer as usual. That's been that way for a while (a few years/versions) now. It's indeed been useful in the past for un-breaking/un-bricking calcs in weird states.
The problem with this specific commit being that it allows for stuff not present in the PTT fake root (but /documents or wherever) to be launched from PTT. I don't think there's any valid usecase for that?
This is assuming that Ndless is pre-installed already in PTT though so I guess it's not a nominal case... (I mean, this whole thing is maybe not an actual issue because if Ndless needs to be transferred and installed then people can just do whatever anyway. Still, this commit opens up potentially unwanted things for no valid usecases that I can see :p)
|
@gooroodev WDYT? |
@admsev, thanks for the invite! 1. Summary of ChangesThe pull request includes the following changes:
2. Issues, Bugs, or TyposIssue 1: Redundant Declaration
Proposed Fix: diff --git a/ndless-sdk/include/libndls.h b/ndless-sdk/include/libndls.h
index 8bede8c5..9d876ef3 100644
--- a/ndless-sdk/include/libndls.h
+++ b/ndless-sdk/include/libndls.h
@@ -109,7 +109,6 @@ void cfg_set_value(struct cfg_entry *entr, const char *val);
const char *cfg_get(const char *key);
struct cfg_entry *cfg_put(const char *key, const char *val);
void cfg_put_fileext(const char *ext, const char *prgm);
-const char *cfg_get(const char *key);
void cfg_register_fileext(const char *ext, const char *prgm);
void cfg_register_fileext_file(const char *fielpath, const char *ext, const char *prgm);
#define nl_hassyscall(x) _nl_hassyscall(e_##x) Issue 2: Typo in Function Name
Proposed Fix: diff --git a/ndless-sdk/include/libndls.h b/ndless-sdk/include/libndls.h
index 8bede8c5..9d876ef3 100644
--- a/ndless-sdk/include/libndls.h
+++ b/ndless-sdk/include/libndls.h
@@ -111,7 +111,7 @@ void cfg_put_fileext(const char *ext, const char *prgm);
const char *cfg_get(const char *key);
void cfg_register_fileext(const char *ext, const char *prgm);
void cfg_register_fileext_file(const char *fielpath, const char *ext, const char *prgm);
-void cfg_register_fileext_file(const char *fielpath, const char *ext, const char *prgm);
+void cfg_register_fileext_file(const char *filepath, const char *ext, const char *prgm);
#define nl_hassyscall(x) _nl_hassyscall(e_##x)
#define nl_hassyscall(x) _nl_hassyscall(e_##x) 3. General Review of Code Quality and StyleCode Quality:
Code Style:
ConclusionOverall, the pull request introduces significant improvements and optimizations to the codebase. Addressing the identified issues and adding inline comments would further enhance the code quality and maintainability. Yours, Gooroo.dev. I'd love to hear from you! React or reply. |
Given that pby0 has since passed away, i did a rebase of his branch.
The old PR could be found here :
#123
My branch compiles but i wasn't able to try it on real hardware given that i have since sold my TI Nspire...
Also, i wasn't able to keep the authorship of the commits, given that it required several changes and all and i don't know how to do that... Oh well.
Made a comment here (#123 (comment)) but it would be a waste to not merge back his work so there we go.