Interactive Configuration ... lost in bytespace ? Helpertool
Re: Interactive Configuration ... lost in bytespace ? Helper
I understand this program just checks the IC but since we just copy our entire code could you not just check every single offset being used? Just wondering. I have all of mine written down but that would certainly help for those people that script in certain on the fly changes.
-
USER101 - Sergeant Major
- Posts: 100
- Joined: Mon Dec 03, 2018 5:45 pm
Re: Interactive Configuration ... lost in bytespace ? Helper
It is not that easy to check every single offset being used...
how would you check something like that, real code from one of my the division scripts:
That it way too much work..it would be like writing a new compiler as it would have to understand every single line of code to be able to track all possible pmem_read and pmem_write usages.
how would you check something like that, real code from one of my the division scripts:
- Code: Select all
// load data for a weapon slot
void _pmem_load_Weapon(uint8 profile, uint8 wslot) {
int8 i8dummy; // time id dummy to read int8 and use as int16
uint8 po = 40*profile;// offset modification to read from the correct pmem location for all profiles
uint8 wo = 10*wslot; // offset modification to read from the correct pmem location for all weapon slots
int8 *Vs = NULL;
int16 *Ts = NULL;
// anti recoil times and values (byteoffset 11..32)
if (wslot < 2 ) {
if (wslot == 0 ) {
Vs = &ARSlot0V;
Ts = &ARSlot0T;
} else {
Vs = &ARSlot1V;
Ts = &ARSlot1T;
}
pmem_read(11+wo+po,&Vs[0]); // horizontal
//printf("horizontal: %d",Vs[0]);
pmem_read(12+wo+po,&i8dummy); // vertical timers - index for timers
Ts[0]=i8dummy;
//printf("timeid from pmem: %d",Ts[0]);
TimeTranslate(Ts); // for combobox id-> timers selection translations
uint8 i, iV;
iV=1;
for (i=13;i<21;i++) {
pmem_read(i+wo+po,&Vs[iV]); // vertical anti recoil values
iV++;
}
// reload on weapon switch times (byteoffset 8,9) , none for sidearm
pmem_read(8+wslot+po,&WeaponReloadTimes[wslot]);
//printf("profile %d, weapon load %d done",profile,wslot);
} else { // sidearm has two value only, no timers
pmem_read(31+po,&ARSlot2[0]); // horizontal
pmem_read(32+po,&ARSlot2[1]); // vertical
}
// selected fire mode and timing (byteoffset 5.33.35, 6.37.39, 7.41.43
pmem_read(5+wslot+po,&FMode[wslot]);
pmem_read(33+4*wslot+po,&FMTimeH[wslot]);
pmem_read(35+4*wslot+po,&FMTimeW[wslot]);
}
That it way too much work..it would be like writing a new compiler as it would have to understand every single line of code to be able to track all possible pmem_read and pmem_write usages.
-
Scachi - Brigadier General
- Posts: 3044
- Joined: Wed May 11, 2016 6:25 am
- Location: Germany
Re: Interactive Configuration ... lost in bytespace ? Helper
I see. I assumed that every time pmem_write was called it passed a variable that could be traced back. I didnt realize that the variable was dynamic and could be anything. For instance :
if everyone used set_pvar you could say when set_pvar is used in the code flag the offset and variable type but I see that is not the case because set_pvar could be set_crazyLegs lol.
- Code: Select all
void set_pvar(uint8 idx, int16 val) {
pmem_write(idx, val);
pmem_save();
return;
if everyone used set_pvar you could say when set_pvar is used in the code flag the offset and variable type but I see that is not the case because set_pvar could be set_crazyLegs lol.
-
USER101 - Sergeant Major
- Posts: 100
- Joined: Mon Dec 03, 2018 5:45 pm
Re: Interactive Configuration ... lost in bytespace ? Helper
This software has really evolved and is very helpful. Is there a way to get export into Excel/CSV format or print it? I often use it to figure out where I need to change or reorganize. Also it would be great to export your Pmem Usage chart.
-
UK_Wildcats - Brigadier General
- Posts: 2243
- Joined: Thu Jan 08, 2015 6:53 pm
Re: Interactive Configuration ... lost in bytespace ? Helper
Good idea.
I think a csv format is the easiest to add as I never used print or xls output via autoit. I'll add that.
I think a csv format is the easiest to add as I never used print or xls output via autoit. I'll add that.
-
Scachi - Brigadier General
- Posts: 3044
- Joined: Wed May 11, 2016 6:25 am
- Location: Germany
Re: Interactive Configuration ... lost in bytespace ? Helper
Awesome. Thank you
-
UK_Wildcats - Brigadier General
- Posts: 2243
- Joined: Thu Jan 08, 2015 6:53 pm
Re: Interactive Configuration ... lost in bytespace ? Helper
UK_Wildcats_Fans wrote:Awesome. Thank you
Uploaded version 1.6.15 : https://github.com/J2Kbr/GtunerIV/issues/171
The right-click context menu in the main list now has a "Export as CSV" entry to export both lists into seperate files at once.
Added "B" to the usage chart to indicate bits used by bitsize=1 entries.
X is used for the first 8 bits of a byte, like bitsize=8 or higher
x is used for all other bits of a byte, like bits 8..16 of bitsize=16
I hope I didn't break the error checking with the required changes..hadn't much time to test it.
-
Scachi - Brigadier General
- Posts: 3044
- Joined: Wed May 11, 2016 6:25 am
- Location: Germany
Re: Interactive Configuration ... lost in bytespace ? Helper
That was fast. When I run it, I only get the Pmem Usage data in a CSV. The other list is not there. Am I missing a step before exporting to csv? I already had everything checked.
-
UK_Wildcats - Brigadier General
- Posts: 2243
- Joined: Thu Jan 08, 2015 6:53 pm
Re: Interactive Configuration ... lost in bytespace ? Helper
UK_Wildcats_Fans wrote:That was fast. When I run it, I only get the Pmem Usage data in a CSV. The other list is not there. Am I missing a step before exporting to csv? I already had everything checked.
It should export everything and doesn't care about selection.
When I run it for my the divsion script it creates the files:
the_division_scachi_chart.csv
the_division_scachi_data.csv
Can you pm me your script..might be a bug in my program so I can check/debug it.
// edit:
try without changing the default export filename. There seems to be a problem when I change the filename in the dialog. Going to inverstigate it.
-
Scachi - Brigadier General
- Posts: 3044
- Joined: Wed May 11, 2016 6:25 am
- Location: Germany
Re: Interactive Configuration ... lost in bytespace ? Helper
It works when I open the file from your program and then export it. It creates the two file names with data & chart csv files. When I use clipboard, it only gives the one CSV file without data or chart added to the name.
-
UK_Wildcats - Brigadier General
- Posts: 2243
- Joined: Thu Jan 08, 2015 6:53 pm
Who is online
Users browsing this forum: No registered users and 52 guests