Page 5 of 11

Re: Interactive Configuration ... lost in bytespace ? Helper

PostPosted: Mon Nov 19, 2018 1:41 pm
by Scachi
Updated, Version 1.6.12 -> Download from Github here.
Changes:
Added column to display the byteoffset as hex too,
Stripping leading/trailing white spaces from all values

Re: Interactive Configuration ... lost in bytespace ? Helper

PostPosted: Fri Nov 23, 2018 6:28 am
by Scachi
Updated, Version 1.6.13 -> https://github.com/J2Kbr/GtunerIV/issues/171
Changes:
Fixed bug: parsing combobox item lines containing the char [ did parse them as a new IC option name

Re: Interactive Configuration ... lost in bytespace ? Helper

PostPosted: Wed Dec 12, 2018 2:58 am
by USER102
does this work on windows 95?

Re: Interactive Configuration ... lost in bytespace ? Helper

PostPosted: Wed Dec 12, 2018 6:01 am
by Scachi
USER101 wrote:does this work on windows 95?

Nice joke..Win95 is like 20 years obsolete so I don't know, don't care if this works on it.

Re: Interactive Configuration ... lost in bytespace ? Helper

PostPosted: Wed Dec 12, 2018 6:12 am
by Scachi
Updated to version 1.6.14 -> https://github.com/J2Kbr/GtunerIV/issues/171
Fixed problem when parsing lines without whitespace between keyword= or =value
like
byteoffset=10

Re: Interactive Configuration ... lost in bytespace ? Helper

PostPosted: Thu Dec 13, 2018 9:59 am
by USER101
This is going to be so freaking awesome when I learn how to use pmem. still working on my core script then moving to the interface. Thanks for sharing your work.

Re: Interactive Configuration ... lost in bytespace ? Helper

PostPosted: Tue Dec 25, 2018 9:45 pm
by USER101
So I have finally gotten around to pmem.. I have added a flag and check box and that seems to be working. It also shows in IC bytetable but I also tried to save a single 16bit variable using:

Code: Select all
 
int fileNumber = 1;
init {
pmem_load();
pmem_read(4, &fileNumber);
}
main {
/*
code to set conditional file number
*/

set_pvar(4, &fileNumber); // this line is what I use to save conditional file number 
}
void set_pvar(uint8 idx, int16 val) {
    pmem_write(idx, val);
    pmem_save();
}


The IC bytetable program only shows the check box. Is it possible to save a variable to pmem without having an interface in the interface config portion? I am simply trying to let the user start at the same macro location they were on when they last used my script. Am I using this right? Should the IC bytetable overview program shoe all offsets being used or just from the interactive configuration?

Thanks
Jess

Re: Interactive Configuration ... lost in bytespace ? Helper

PostPosted: Wed Dec 26, 2018 12:53 am
by Sillyasskid
Jesscorp wrote:Is it possible to save a variable to pmem without having an interface in the interface config portion?

Code: Select all
uint16 fileNumber, old_fileNumber;
init {
  pmem_load();
  pmem_read(4, &fileNumber);
 
  old_fileNumber = fileNumber;
 
// Make sure the correct filenumber is printed.
  printf("<hr>filenumber: <b>%d", fileNumber);
}
main {
//Code to set conditional file number
  if(event_active(BUTTON_16)) ++fileNumber;
 
// This contion will prevent flooding the set_pvar function.
  if(old_fileNumber != fileNumber){
  // This line is what I use to save conditional file number.
    set_pvar(4, fileNumber);
    old_fileNumber = fileNumber;
  }
}
 
// The function will run only if the fileNumber value changes.
void set_pvar(uint8 idx, int16 val) {
  pmem_write(idx, val);
  pmem_save();
  printf("filenumber: %d saved.", fileNumber);
  return;
}

Here is an example based off your script, it does not require the interactive config.

The filenumber value will increment, every time BUTTON_16 (A / CROSS) is pressed.
The value will save, and carry over the next time you load the script.

Re: Interactive Configuration ... lost in bytespace ? Helper

PostPosted: Wed Dec 26, 2018 10:54 am
by Scachi
The program IC-Bytetable does check the Interactive Configuration definitions only, lines between tags <cfgdesc></cfgdesc>, for errors/problems/memory usage.

It does not parse the actual code of a script. IC-Bytetable == InteractiveConfiguration-Bytetable

You can use the persistent memory without an Interactive Configuration but you can't use the program IC-Bytetable without an Interactive Configuration.
https://www.consoletuner.com/wiki/index ... ent_memory

Re: Interactive Configuration ... lost in bytespace ? Helper

PostPosted: Thu Dec 27, 2018 2:50 am
by USER101
There was a major issue with my code that kept messing with me. the line set_pvar(4, &fileNumber); come to find out the & should not be in front of the fileNumber.. it was the only thing that kept my code from not working to begin with. It was fixed in your code but the change was not very apparent to me at first. I appreciate your responses. Smarter everyday :)
Thanks
Jess