Skip to content
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

Allow to specify timing straps to apply from a list of gpu vendors #11

Open
wilvk opened this issue Jul 8, 2018 · 7 comments
Open

Allow to specify timing straps to apply from a list of gpu vendors #11

wilvk opened this issue Jul 8, 2018 · 7 comments

Comments

@wilvk
Copy link
Owner

wilvk commented Jul 8, 2018

for example, the C# polaris bios editor has the option for specifying timing straps from a list based on a gpu vendor. see below:

string[] timings = new string[] {
            // FIXME Try UberMix 3.2 Timings:
            // 777000000000000022CC1C00CEE55C46C0590E1532CD66090060070014051420FA8900A00300000012123442C3353C19
            // UberMix 3.1
            "777000000000000022CC1C00AD615C41C0590E152ECC8608006007000B031420FA8900A00300000010122F3FBA354019",
          //"777000000000000022CC1C00AD615C41C0590E152ECCA60B006007000B031420FA8900A00300000010122F3FBA354019", // new, please test
            // UberMix 2.3 (less extreme)
            "777000000000000022CC1C00AD615B41C0570E152DCB7409006007000B031420FA8900A00300000010123A46DB354019",
            // 1750/2000MHz Mix Timings
            "777000000000000022CC1C00106A6D4DD0571016B90D060C006AE70014051420FA8900A0030000001E123A46DB354019",
            // 1625/2000MHz Mix Timings
            "777000000000000022CC1C00CE616C47D0570F15B48C250B006AE7000B031420FA8900A0030000001E123A46DB354019",

            // Good HYNIX_2
            "777000000000000022AA1C00B56A6D46C0551017BE8E060C006AE6000C081420EA8900AB030000001B162C31C0313F17",
                
            // Good Micron
          //"777000000000000022AA1C0073626C41B0551016BA0D260B006AE60004061420EA8940AA030000001914292EB22E3B16", old
            "777000000000000022AA1C0073626C41B0551016BA0D260B0060060004061420EA8940AA030000001914292EB22E3B16", // new tested timings (much better xmr performance @ rx560 sapphire pulse)
             
            // Good Hynix_1
            "999000000000000022559D0010DE5B4480551312B74C450A00400600750414206A8900A00200312010112D34A42A3816",

            // Good Elpida (fixed with version 1.6.4, see issue #19)
            "777000000000000022AA1C00315A5B36A0550F15B68C1506004082007C041420CA8980A9020004C01712262B612B3715"
          //"777000000000000022AA1C00AC615B3CA0550F142C8C1506006004007C041420CA8980A9020004C01712262B612B3715" // new, please test
        };


private void apply_timings(int vendor_index, int timing_index)
        {
            for (var i = 0; i < tableVRAM_TIMING.Items.Count; i++)
            {
                ListViewItem container = tableVRAM_TIMING.Items[i];
                var name = container.Text;
                UInt32 real_mhz = 0;
                int mem_index = -1;

                if (name.IndexOf(':') > 0)
                {
                    // get mem index
                    mem_index = (Int32)int32.ConvertFromString(name.Substring(0, 1));
                }
                else
                {
                    mem_index = 32768;
                }

                real_mhz = (UInt32)uint32.ConvertFromString(name.Substring(name.IndexOf(':') + 1));

                if (real_mhz >= 1500 && (mem_index == vendor_index || mem_index == 32768))
                {
                    // set the timings
                    container.SubItems[1].Text = timings[timing_index];
                }
            }
        }
@kirill190497
Copy link

kirill190497 commented Jul 10, 2018

Here, too, found the conformity of the manufacturers and models of memory

Dictionary<string, string> rc = new Dictionary<string, string>();

rc.Add("MT51J256M3", "MICRON");
rc.Add("EDW4032BAB", "ELPIDA");
rc.Add("H5GC4H24AJ", "HYNIX_1");
rc.Add("H5GQ8H24MJ", "HYNIX_2");
rc.Add("H5GC8H24MJ", "HYNIX_2");
rc.Add("K4G80325FB", "SAMSUNG");
rc.Add("K4G41325FE", "SAMSUNG");
rc.Add("K4G41325FC", "SAMSUNG");
rc.Add("K4G41325FS", "SAMSUNG");

@wilvk
Copy link
Owner Author

wilvk commented Jul 10, 2018

Thanks! Will get to it soon.

@kirill190497
Copy link

kirill190497 commented Jul 22, 2018

this is a function of the c # version, I think this will help

`
private void apply_timings(int vendor_index, int timing_index)
{
for (var i = 0; i < tableVRAM_TIMING.Items.Count; i++)
{
ListViewItem container = tableVRAM_TIMING.Items[i];
var name = container.Text;
UInt32 real_mhz = 0;
int mem_index = -1;

            if (name.IndexOf(':') > 0)
            {
                // get mem index
                mem_index = (Int32)int32.ConvertFromString(name.Substring(0, 1));
            }
            else
            {
                mem_index = 32768;
            }

            real_mhz = (UInt32)uint32.ConvertFromString(name.Substring(name.IndexOf(':') + 1));

            if (real_mhz >= 1750 && (mem_index == vendor_index || mem_index == 32768))
            {
                // set the timings
                container.SubItems[1].Text = timings[timing_index];
            }
        }
    }

private void button1_Click(object sender, EventArgs e)
{
int samsung_index = -1;
int micron_index = -1;
int elpida_index = -1;
int hynix_1_index = -1;
int hynix_2_index = -1;
for (var i = 0; i < atom_vram_info.ucNumOfVRAMModule; i++)
{
string mem_vendor;
if (atom_vram_entries[i].strMemPNString[0] != 0)
{
var mem_id = Encoding.UTF8.GetString(atom_vram_entries[i].strMemPNString).Substring(0, 10);

                if (rc.ContainsKey(mem_id))
                {
                    mem_vendor = rc[mem_id];
                }
                else
                {
                    mem_vendor = "UNKNOWN";
                }

                switch (mem_vendor)
                {
                    case "SAMSUNG":
                        samsung_index = i;
                        break;
                    case "MICRON":
                        micron_index = i;
                        break;
                    case "ELPIDA":
                        elpida_index = i;
                        break;
                    case "HYNIX_1":
                        hynix_1_index = i;
                        break;
                    case "HYNIX_2":
                        hynix_2_index = i;
                        break;
                }


            }
        }

        if (samsung_index != -1)
        {
            MessageBox.Show("Samsung Memory found at index #" + samsung_index + ", now applying UBERMIX 3.1 timings to 1500+ strap(s)");
            apply_timings(samsung_index, 0);
        }

        if (hynix_2_index != -1)
        {
            MessageBox.Show("Hynix (2) Memory found at index #" + hynix_2_index + ", now applying GOOD HYNIX MINING timings to 1500+ strap(s)");
            apply_timings(hynix_2_index, 4);

        }

        if (micron_index != -1)
        {
            MessageBox.Show("Micron Memory found at index #" + micron_index + ", now applying GOOD MICRON MINING timings to 1500+ strap(s)");

            apply_timings(micron_index, 5);

        }

        if (hynix_1_index != -1)
        {
            MessageBox.Show("Hynix (1) Memory found at index #" + hynix_1_index + ", now applying GOOD HYNIX MINING timings to 1500+ strap(s)");

            apply_timings(hynix_1_index, 6);

        }

        if (elpida_index != -1)
        {
            MessageBox.Show("Elpida Memory found at index #" + elpida_index + ", now applying GOOD ELPIDA MINING timings to 1500+ strap(s)");

            apply_timings(elpida_index, 7);

        }
        if (samsung_index == -1 && hynix_2_index == -1 && hynix_1_index == -1 && elpida_index == -1 && micron_index == -1)
        {
            MessageBox.Show("Sorry, no supported memory found. If you think this is an error, please file a bugreport @ github.com/jaschaknack/PolarisBiosEditor");
        }

    }
}

}
`

@wilvk
Copy link
Owner Author

wilvk commented Jul 22, 2018

Thanks for this. Haven't forgotten, just been super busy lately.

@wilvk
Copy link
Owner Author

wilvk commented Aug 21, 2018

A temporary workaround for this has been implemented as, for example:

./pbec -i test2.rom -o test2.rom -n aaaaaaaaaabbbbbbbbbbcccccccccc333333333344444444445555555555666666666677777777778888888889ABCDEF -p 1

@smlyclts
Copy link

smlyclts commented Mar 4, 2020

how do we use this, is there a guide
I have a K4G41325FC samsung sapphire rx 470 4gb (one dvi)

@smlyclts
Copy link

smlyclts commented Mar 4, 2020

K4G41325FC samsung sapphire rx 470 4gb (one dvi)
RADEON RX 470 4G GDDR5 PCI-E DVI-D (UEFI)
SKU# 11256-31

how do i best do this ???

offical bios
1500 555000000000000022CC1C00AD515A3EC0570E142D4A64080068C70003011420FA8900A003000000150E2A3186272E16
1625
555000000000000022CC1C0010626C49D0570F15B40B1509006AE7000B051420FA8900A00300000019113139912B3517
1750
777000000000000022CC1C0010626C49D0571016B50BD509006AE70014051420FA8900A003000000191131399D2C3617
2000
777000000000000022CC1C0031EE7D53E05711173BCD350B006C07011C081420FA8900A0030000001C123842B3303C18

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants