Page 3 of 10

Re: Gtuner IV and Titan Two 1.08 BETA Release

PostPosted: Thu Apr 30, 2020 9:41 pm
by Scachi
J2Kbr wrote:Released :joia: :smile0517:
Gtuner IV 1.08B Revision 2 changelog:
Code: Select all
* Code Editor: File handles are kept closed, so other apps can have write access {GitHub#375}
* GPC Compiler: Implemented garbage collection of unused variables, functions, combos {GitHub#377}
* GPC Compiler: Updated xb1.gph header file to include XB1_SYNC define (BUTTON_21)

Before: GPC: Bytecode usage: 7795 bytes (95.15%)
Now with Garbage collection: GPC: Bytecode usage: 7433 bytes (90.73%) :smile0517: :smile0517:
GPC: Discarded: z__default_cmap, z_ads_cmap, z_ads_mxyc, z_inventory_cmap, z_inventory_mxyc, z_softaim_cmap, z_softaim_mxyc

Re: Gtuner IV and Titan Two 1.08 BETA Release

PostPosted: Fri May 01, 2020 7:55 am
by Prototype
Yes i tried that too, it can save a lot of size and time ! Awesome :smile0517:

Re: Gtuner IV and Titan Two 1.08 BETA Release

PostPosted: Fri May 01, 2020 8:48 am
by Prototype
Scachi wrote:But now we can copy it to the SD without having to remove the SD from the T2, so it is a big step forward

This is the part that discouraged me since every time I format the SD card I have to reinstall a LOT of files, especially with fighting characters. Now it's automatic :shocked: :joia:

Re: Gtuner IV and Titan Two 1.08 BETA Release

PostPosted: Sat May 02, 2020 4:06 am
by DontAtMe
J2Kbr wrote:Released :joia: :smile0517:
Gtuner IV 1.08B Revision 2 changelog:
Code: Select all
* Code Editor: File handles are kept closed, so other apps can have write access {GitHub#375}
* GPC Compiler: Implemented garbage collection of unused variables, functions, combos {GitHub#377}
* GPC Compiler: Updated xb1.gph header file to include XB1_SYNC define (BUTTON_21)

Is it possible to discard local variables from discarded functions? Freeing up the static memory.

Example
Code: Select all
main {
 
}
void func() {
  fix32 a[64];
  static fix32 b[64];
  return;
}
Code: Select all
GPC: Variables: Global: 0, Local: 2, Parameters: 0, Pointers: 0, Constants: 0, Labels: 0, Functions: 1, Combos: 0
GPC: Memory usage: Static: 256 bytes (25.00%), Dynamic: 256 bytes (25.00%)
GPC: Second-pass started.
GPC: Unreferenced: func, a, b
GPC: Garbage collection started.
GPC: Discarded: func, a*, b* (* static memory still allocated)
I understand why static variables should be allocated, however, I don't see the purpose of still allocating them from discarded functions. Seeing as they would never be used.

I know by utilizing the preprocessor you can choose to include or to omit the function completely by doing something like this
Code: Select all
#define func
#include "my_header.gph"
main {
  func();
}
my_header.gph
Code: Select all
#pragma once
 
#ifdef func
#undef func
#define func func
void func() {
  fix32 a[64];
  static fix32 b[64];
  return;
}
#endif
But it would be nice to simply include the header, and not worry about defining any functions that I plan to use.

Re: Gtuner IV and Titan Two 1.08 BETA Release

PostPosted: Tue May 05, 2020 1:23 am
by t7gergamer
I downloaded the Gtuner IV 1.8 beta to solve share/touch button on paddles issue for Xbox Elite 2 controller.

Installed the direct download application, but my Titan Two seems to be stuck on 1.73 firmware. The problem is that I couldn't locate the "Gtuner.cfg" file on my iMac. Went to my Gtuner IV.app to show package content, found the Gtuner.exe but not the .cfg. Also could not find Gtuner under Application Support with hidden files shown either. Could someone help me out?

I"m assuming adding the [Advanced] beta_tester=true code will solve the issue.

Thanks

Re: Gtuner IV and Titan Two 1.08 BETA Release

PostPosted: Tue May 05, 2020 1:54 pm
by J2Kbr
t7gergamer wrote:I downloaded the Gtuner IV 1.8 beta to solve share/touch button on paddles issue for Xbox Elite 2 controller. Installed the direct download application, but my Titan Two seems to be stuck on 1.73 firmware. The problem is that I couldn't locate the "Gtuner.cfg" file on my iMac. Went to my Gtuner IV.app to show package content, found the Gtuner.exe but not the .cfg. Also could not find Gtuner under Application Support with hidden files shown either. Could someone help me out?
I"m assuming adding the [Advanced] beta_tester=true code will solve the issue.
Thanks

Yes, you are correct. On Mac the Gtuner.cfg is here:

Macintosh HD⁩ ▸ ⁨Users⁩ ▸ ⁨(UserName)⁩ ▸ ⁨Library⁩ ▸ ⁨Application Support⁩ ▸ ⁨Gtuner⁩

You have to show hidden files first Shift + Command + >

Re: Gtuner IV and Titan Two 1.08 BETA Release

PostPosted: Tue May 05, 2020 2:03 pm
by J2Kbr
Thank you DontAtMe for your suggestions.

The Gtuner 1.08 Beta Rev3 released today has significant improvements on the garbage collection procedures. However, static variables are still allocated. The addressing of static variables are determined when generation the symbol table (first-step), to complicate the addressing is memory aligned depending on the data type, as such a simple offsetting to remove the unused variable will not work. To proper get hid of unused static variables would be need re-run all compiler procedures from beginning. I did not discarded this option yet, however, would prefer find a more elegant/optimized way.

Re: Gtuner IV and Titan Two 1.08 BETA Release

PostPosted: Tue May 05, 2020 6:24 pm
by Prototype
I have an issue to update, after the update the software is still in 1.8.1.2 and finds the 1.8.1.3 so i updated 3 times but still the same.

Re: Gtuner IV and Titan Two 1.08 BETA Release

PostPosted: Tue May 05, 2020 8:06 pm
by J2Kbr
prototype wrote:I have an issue to update, after the update the software is still in 1.8.1.2 and finds the 1.8.1.3 so i updated 3 times but still the same.

Please try download the full package from here:

WIN: Gtuner IV 1.08B-Rev3
MAC: Gtuner IV 1.08B-Rev3

Re: Gtuner IV and Titan Two 1.08 BETA Release

PostPosted: Tue May 05, 2020 8:15 pm
by Prototype
Thanks :joia: