Jump to content

Ozmosis


xpamamadeus
6,231 posts in this topic

Recommended Posts

hi all

if any is one interested how to install Bootcamp Drivers on your Windows 7/8/8.1 For Apple Keyboard/TrackPad/Maus/TimeSynchronic/etc.

1.Donwload the attached file

2.open DMIEDIT.exe

3.edit the green market spot with the Smbios value from your hack.

4.Open Update drop-down menu and select All item Or single click <All> icon on Toolbar.

5.download Bootcamp driver from apple.

6.open the downloaded folder Bootcamp/Drivers and the $WinPEDriver$ folder delete all drivers except Apple drivers

7.that's it, now you can install it easily via the setup.exe 

my Apple Keyboard and TrackPad works 100%

 

 Good luck all :thumbsup_anim:

DMIEDITWINGUI.zip

post-838043-0-33288200-1396693690_thumb.jpg

  • Like 3
  • Thanks 1
Link to comment
Share on other sites

 

ammoune78, on 05 Apr 2014 - 12:44 AM, said:

Hi xpamamadeus! Try one of the two patches, but i think the second one would be better to use!

thx 

here is updated one with the second patch ;)

 

Hi truesoldier!

Thank's but this Bios is for Z87M-DH3, but i have Z87X-UD4H!  :surprised:

Link to comment
Share on other sites

Hi! I have played many games like DIRT2, BATMAN ARKHAM CITY, GRID, DRIVER SAN FRANCISCO, F1 2012, CALL OF DUTY BLACK OPS, TOMB RAIDER in Mavericks and really it work's good. Thank's truesoldier! ;)

 

If anyone knows how to extract the contents of SmcEmulatorKext to edit it, so the Ozmosis 894M can function properly. Because I don't understand why, i have no problem with Ozmosis 828M even when i use the FakeSMC 6.3.1211. :(
Link to comment
Share on other sites

 

Hi! I have played many games like DIRT2, BATMAN ARKHAM CITY, GRID, DRIVER SAN FRANCISCO, F1 2012, CALL OF DUTY BLACK OPS, TOMB RAIDER in Mavericks and really it work's good. Thank's truesoldier! ;)

 

If anyone knows how to extract the contents of SmcEmulatorKext to edit it, so the Ozmosis 894M can function properly. Because I don't understand why, i have no problem with Ozmosis 828M even when i use the FakeSMC 6.3.1211. :(

 

 

Hi,

 

Here is what you want extracted from 894M, tweak for iMac13,2.

 

https://www.dropbox.com/s/23xc5pvz5oddp5w/SmcEmulatorKext.kext.zip

 

Fred

  • Like 1
Link to comment
Share on other sites

Hi, sorry for my poor knoweledge, but i still dont understand howto insert my own dsdt in AmibiosInfo, i try to read some thread in MDL but dont understand 

Can someone try to explain me howto insert my own dsdt in Amibioinfo? 

 

Many thanks

Link to comment
Share on other sites

Hi, sorry for my poor knoweledge, but i still dont understand howto insert my own dsdt in AmibiosInfo, i try to read some thread in MDL but dont understand 

Can someone try to explain me howto insert my own dsdt in Amibioinfo? 

 

Many thanks

 

Hello,

 

I've made a little soft to integrate dsdt in AmiBoardInfo. (Src include)

Alway use original AmiBoardInfo to patch, don't use a patched AmiBoardInfo. (Because of size... ;) )

 

 

https://www.dropbox.com/s/btkk15ztffuamyp/Dsdt2Bios.zip

 

Need to be tested.

 

 

//
//  main.c
//  Dsdt2Bios
//
//  Created by FredWst on 06/04/2014.
//  Copyright (c) 2014 none. All rights reserved.
//
 
 
#include <stdio.h>
#include <fcntl.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
 
typedef struct Header
{
unsigned char o1;
unsigned char o2;
    unsigned char o3;
unsigned char id[16];
    unsigned char o4;
    unsigned short len;
    
} Struct_Header;
 
 
int main(int argc, const char * argv[])
{
    Struct_Header Header;
    
    int fd_amiboard, fd_dsdt, fd_out, i;
    long len;
    unsigned char *d, *n;
 
    
    fd_amiboard = open("AmiBoardInfo.ffs", O_RDWR | O_NONBLOCK);
    fd_dsdt = open("DSDT.aml", O_RDWR | O_NONBLOCK);
    
    if ((fd_amiboard < 0) || (fd_dsdt < 0))
    {
        printf("File must be name AmiBoardInfo.ffs and DSDT.aml.\n");
        printf("File must be in same directory of Dsdt2Bios.\n");
        printf("Output file will be AmiBoardInfo.new.\n");
        if (fd_amiboard < 0) close(fd_amiboard);
        if (fd_dsdt < 0) close(fd_dsdt);
        
        return 255;
    }
    //Get size of AmiBoardInfo in Header
    len = read(fd_amiboard, &Header, sizeof(Struct_Header));
    close(fd_amiboard);
        
    //Read AmiBoardInfo into buffer
    fd_amiboard = open("AmiBoardInfo.ffs", O_RDWR | O_NONBLOCK);
    d = malloc(Header.len+1);
    len = read(fd_amiboard, d, Header.len+1024);
    close(fd_amiboard);
    printf("AmiBoardInfo file size %x.\n",Header.len);
    
    if (len == Header.len)
    {
    
        //Search for DSDT offset
        for ( i = 0 ; i < Header.len; i++)
            if ((d[i] =='D') && (d[i+1] =='S') && (d[i+2] =='D') && (d[i+3] =='T')) break;
 
        //Size of DSDT
        int Size_Ori = (d[i+5] << 8) + d[i+4];
        int Ofs_Ori = i;
        printf("DSDT found at %x size %x.\n",Ofs_Ori,Size_Ori);
 
        fd_dsdt = open("DSDT.aml", O_RDWR | O_NONBLOCK);
        //Get size of DSDT in Header
        unsigned char buffer[6];
        len = read(fd_dsdt, buffer, 6);
        int Size_New = (buffer[5] << 8) + buffer[4];
        close(fd_dsdt);
    
        if ((buffer[0] =='D') && (buffer[1] =='S') && (buffer[2] =='D') && (buffer[3] =='T'))
        {
        
            //Read DSDT into buffer
            fd_amiboard = open("DSDT.aml", O_RDWR | O_NONBLOCK);
            n = malloc(Size_New+1);
            len = read(fd_amiboard, n, Size_New+1024);
            close(fd_amiboard);
            printf("New DSDT size %x.\n",Size_New);
    
            if (len == Size_New)
            {
                if ( Size_New <= Size_Ori)
                {
                    //Replace with new DSDT
                    memcpy(&d[Ofs_Ori], n, Size_New);
        
                    //Zero end
                    for ( i = Ofs_Ori + Size_New  ; i < (Size_Ori + Ofs_Ori); i++)
                        d[i] = 0;
        
                    fd_out = open("AmiBoardInfo.new", O_CREAT | O_RDWR | O_NONBLOCK );
                    write(fd_out,d,Header.len);
                    close(fd_out);
                    printf("AmiBoardInfo.new is create.\n");
        
                }
                else
                    printf("New DSDT is bigger than original, no file generated.\n");
            }
            else
                printf("Bad file DSDT.aml, header size is not equal to file len, no file generated.\n");
            
            free(n);
        }
        else
            printf("Bad file DSDT.aml, header not ok, no file generated.\n");
    }
    else
        printf("Bad file AmiBoardInfo.ffs, header size is not equal to file len, no file generated.\n");
    
    free(d);
 
 
    return 0;
}

 

Fred

  • Like 4
Link to comment
Share on other sites

 

Hi truesoldier!

The system work's fine, But i've seen in the Bios screen setting that the Current CPU Speed is 4,60Ghz and some times became 0,0Ghz  :surprised:  :o.

I will attache the screens when i will switch into windows!

Ok i'm on now

post-334538-0-10252500-1396794221_thumb.jpg

post-334538-0-86543500-1396794248_thumb.jpg

post-334538-0-45118000-1396794270_thumb.jpg

post-334538-0-93815900-1396794295_thumb.jpg

post-334538-0-04323700-1396794321_thumb.jpg

Link to comment
Share on other sites

Hi FredWst!

I've seen in the folder: AmiBoardInfo.FFS and .NEW, main.c, DSDT2Bios and DSDT2Bios.dSYM and DSDT.aml.

But the DSDT;AML and AmiBoardInfo.ffs is for another Board, and i don't know how to do this for testing!

Can you explain How, AND where to put patch or where is the patch, it's integrated?

Link to comment
Share on other sites

Hi truesoldier!

The system work's fine, But i've seen in the Bios screen setting that the Current CPU Speed is 4,60Ghz and some times became 0,0Ghz  :surprised:  :o.

I will attache the screens when i will switch into windows!

Ok i'm on now

hi

I think that has nothing to do with the DSDT.

check your Bios settings try it without OC for test.

 

good luck

  • Like 1
Link to comment
Share on other sites

Hello,

 

I've made a little soft to integrate dsdt in AmiBoardInfo. (Src include)

Alway use original AmiBoardInfo to patch, don't use a patched AmiBoardInfo. (Because of size... ;) )

Excellent!

 

And if you have a solution when the new DSDT is bigger than the original:   :drool:

Link to comment
Share on other sites

Hello,

 

I've made a little soft to integrate dsdt in AmiBoardInfo. (Src include)

Alway use original AmiBoardInfo to patch, don't use a patched AmiBoardInfo. (Because of size... ;) )

 

 

https://www.dropbox.com/s/btkk15ztffuamyp/Dsdt2Bios.zip

 

Need to be tested.

//
//  main.c
//  Dsdt2Bios
//
//  Created by FredWst on 06/04/2014.
//  Copyright (c) 2014 none. All rights reserved.
//
 
 
#include <stdio.h>
#include <fcntl.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
 
typedef struct Header
{
unsigned char o1;
unsigned char o2;
    unsigned char o3;
unsigned char id[16];
    unsigned char o4;
    unsigned short len;
    
} Struct_Header;
 
 
int main(int argc, const char * argv[])
{
    Struct_Header Header;
    
    int fd_amiboard, fd_dsdt, fd_out, i;
    long len;
    unsigned char *d, *n;
 
    
    fd_amiboard = open("AmiBoardInfo.ffs", O_RDWR | O_NONBLOCK);
    fd_dsdt = open("DSDT.aml", O_RDWR | O_NONBLOCK);
    
    if ((fd_amiboard < 0) || (fd_dsdt < 0))
    {
        printf("File must be name AmiBoardInfo.ffs and DSDT.aml.\n");
        printf("File must be in same directory of Dsdt2Bios.\n");
        printf("Output file will be AmiBoardInfo.new.\n");
        if (fd_amiboard < 0) close(fd_amiboard);
        if (fd_dsdt < 0) close(fd_dsdt);
        
        return 255;
    }
    //Get size of AmiBoardInfo in Header
    len = read(fd_amiboard, &Header, sizeof(Struct_Header));
    close(fd_amiboard);
        
    //Read AmiBoardInfo into buffer
    fd_amiboard = open("AmiBoardInfo.ffs", O_RDWR | O_NONBLOCK);
    d = malloc(Header.len+1);
    len = read(fd_amiboard, d, Header.len+1024);
    close(fd_amiboard);
    printf("AmiBoardInfo file size %x.\n",Header.len);
    
    if (len == Header.len)
    {
    
        //Search for DSDT offset
        for ( i = 0 ; i < Header.len; i++)
            if ((d[i] =='D') && (d[i+1] =='S') && (d[i+2] =='D') && (d[i+3] =='T')) break;
 
        //Size of DSDT
        int Size_Ori = (d[i+5] << 8) + d[i+4];
        int Ofs_Ori = i;
        printf("DSDT found at %x size %x.\n",Ofs_Ori,Size_Ori);
 
        fd_dsdt = open("DSDT.aml", O_RDWR | O_NONBLOCK);
        //Get size of DSDT in Header
        unsigned char buffer[6];
        len = read(fd_dsdt, buffer, 6);
        int Size_New = (buffer[5] << 8) + buffer[4];
        close(fd_dsdt);
    
        if ((buffer[0] =='D') && (buffer[1] =='S') && (buffer[2] =='D') && (buffer[3] =='T'))
        {
        
            //Read DSDT into buffer
            fd_amiboard = open("DSDT.aml", O_RDWR | O_NONBLOCK);
            n = malloc(Size_New+1);
            len = read(fd_amiboard, n, Size_New+1024);
            close(fd_amiboard);
            printf("New DSDT size %x.\n",Size_New);
    
            if (len == Size_New)
            {
                if ( Size_New <= Size_Ori)
                {
                    //Replace with new DSDT
                    memcpy(&d[Ofs_Ori], n, Size_New);
        
                    //Zero end
                    for ( i = Ofs_Ori + Size_New  ; i < (Size_Ori + Ofs_Ori); i++)
                        d[i] = 0;
        
                    fd_out = open("AmiBoardInfo.new", O_CREAT | O_RDWR | O_NONBLOCK );
                    write(fd_out,d,Header.len);
                    close(fd_out);
                    printf("AmiBoardInfo.new is create.\n");
        
                }
                else
                    printf("New DSDT is bigger than original, no file generated.\n");
            }
            else
                printf("Bad file DSDT.aml, header size is not equal to file len, no file generated.\n");
            
            free(n);
        }
        else
            printf("Bad file DSDT.aml, header not ok, no file generated.\n");
    }
    else
        printf("Bad file AmiBoardInfo.ffs, header size is not equal to file len, no file generated.\n");
    
    free(d);
 
 
    return 0;
}

Fred

How it works? Any tutorial?

Link to comment
Share on other sites

Hi FredWst!

I've seen in the folder: AmiBoardInfo.FFS and .NEW, main.c, DSDT2Bios and DSDT2Bios.dSYM and DSDT.aml.

But the DSDT;AML and AmiBoardInfo.ffs is for another Board, and i don't know how to do this for testing!

Can you explain How, AND where to put patch or where is the patch, it's integrated?

It's simple, modify your DSDT with maciasl compile and look for errors, if all it's' ok, save DSDT.aml in compiled way, put this file in the same folder of Dsdt2Bios launch, if the size it's ok, you wii have AmiBoarInfo.ffs with new dsdt instead of the old one, put this in your bios, that's it

  • Like 1
Link to comment
Share on other sites

Hello,

 

I've made a little soft to integrate dsdt in AmiBoardInfo. (Src include)

Alway use original AmiBoardInfo to patch, don't use a patched AmiBoardInfo. (Because of size... ;) )

 

https://www.dropbox.com/s/btkk15ztffuamyp/Dsdt2Bios.zip

 

Need to be tested.

Fred

 

Thanks a lot, works fine.

Solved the sound problem I have using the same DSDT in Efi/Quo/Acpi/Load.

 

When I run your soft the created file has 000 permissions, if you add the following integer at the end of the line, the problem is over.

fd_out = open("AmiBoardInfo.new", O_CREAT | O_RDWR | O_NONBLOCK, 0666 );
Link to comment
Share on other sites

Hello,

 

 

https://www.dropbox.com/s/cm6hpf7365xt31o/Dsdt2Bios-r0.1.zip

 

Can extract DSDT from AmiBiosInfo.

 

Syntax :

 

  ./Dsdt2Bios -extract AmiBoardInfo-file Dsdt-file

                      or                          

  ./Dsdt2Bios AmiBoardInfo-file Dsdt-file

                      or                          

  ./Dsdt2Bios -extract AmiBoardInfo-file

 

-extract will generate DSDT-Original.aml

 

In all case output file is AmiBoardInfo.new

 

//
//  main.c
//  Dsdt2Bios
//
//  Created by FredWst on 06/04/2014.
//  Copyright (c) 2014 none. All rights reserved.
//
 
 
#include <stdio.h>
#include <fcntl.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
 
typedef struct Header
{
unsigned char o1;
unsigned char o2;
    unsigned char o3;
unsigned char id[16];
    unsigned char o4;
    unsigned short len;
    
} Struct_Header;
 
 
unsigned char *Read_AmiBoardInfo(char *FileName, Struct_Header *Header,int Extract, int *Ofs_Ori, int *Size_Ori)
{
    int fd_amiboard, fd_out, i;
    long len;
    unsigned char *d = NULL;
    
    fd_amiboard = open(FileName, O_RDWR | O_NONBLOCK);
    if (fd_amiboard < 0)
    {
        printf("%s does not exist\n",FileName);
        return NULL;
    }
 
    //Get size of AmiBoardInfo in Header
    len = read(fd_amiboard, Header, sizeof(Struct_Header));
    close(fd_amiboard);
 
    
    //Read AmiBoardInfo into buffer
    fd_amiboard = open(FileName, O_RDWR | O_NONBLOCK);
    d = malloc(Header->len+1);
    len = read(fd_amiboard, d, Header->len+1024);
    close(fd_amiboard);
    printf("AmiBoardInfo file size %x.\n",Header->len);
    
    if (len == Header->len)
    {
        //Search for DSDT offset
        for ( i = 4 ; i < Header->len; i++)
            if ((d[i] =='D') && (d[i+1] =='S') && (d[i+2] =='D') && (d[i+3] =='T')) break;
    
        if ( i < Header->len)
        {
            //Size of DSDT
            *Size_Ori = (d[i+5] << 8) + d[i+4];
            *Ofs_Ori = i;
            printf("DSDT found at %x size %x.\n",*Ofs_Ori,*Size_Ori);
    
            if ( Extract )
            {
                fd_out = open("DSDT-Original.aml", O_CREAT | O_RDWR | O_NONBLOCK, 0644);
                write(fd_out,&d[*Ofs_Ori],*Size_Ori);
                close(fd_out);
                printf("DSDT-Original.aml create.\n");
            }
            return d;
        }
        else
            printf("DSDT not found.\n");
    }
    
    printf("Bad file AmiBoardInfo.ffs, header size is not equal to file len, no file generated.\n");
    
    return NULL;
}
 
int Read_Dsdt(char *FileName, Struct_Header *Header, unsigned char *d, int *Ofs_Ori, int *Size_Ori)
{
    int fd_dsdt, fd_out, i;
    long len;
    unsigned char *n = NULL;
    
    fd_dsdt = open(FileName, O_RDWR | O_NONBLOCK);
    
    if (fd_dsdt < 0)
    {
        printf("%s does not exist\n",FileName);
        return 1;
    }
 
    //Get size of DSDT in Header
    unsigned char buffer[6];
    len = read(fd_dsdt, buffer, 6);
    int Size_New = (buffer[5] << 8) + buffer[4];
    close(fd_dsdt);
    
    if ((buffer[0] =='D') && (buffer[1] =='S') && (buffer[2] =='D') && (buffer[3] =='T'))
    {
        
        
        //Read DSDT into buffer
        fd_dsdt = open(FileName, O_RDWR | O_NONBLOCK);
        n = malloc(Size_New+1);
        len = read(fd_dsdt, n, Size_New+1024);
        close(fd_dsdt);
        
        printf("New DSDT size %x.\n",Size_New);
        
        if (len == Size_New)
        {
            if ( Size_New <= *Size_Ori)
            {
                //Replace with new DSDT
                memcpy(&d[*Ofs_Ori], n, Size_New);
                
                //Zero end
                for ( i = *Ofs_Ori + Size_New  ; i < (*Size_Ori + *Ofs_Ori); i++)
                    d[i] = 0;
                
                fd_out = open("AmiBoardInfo.new", O_CREAT | O_RDWR | O_NONBLOCK, 0644 );
                write(fd_out,d,Header->len);
                close(fd_out);
                printf("AmiBoardInfo.new create.\n");
                
            }
            else
                printf("Size new DSDT is greater than original, no file generated.\n");
        }
        else
            printf("Bad file %s, header size is not equal to file len, no file generated.\n",FileName);
        
        free(n);
    }
    else
        printf("Bad file %s, header not ok, no file generated.\n",FileName);
    
    return 0;
}
 
int main(int argc, const char * argv[])
{
    Struct_Header Header;
    
    int Ofs_Ori, Size_Ori, Extract;
    unsigned char *d;
    char FileName[256];
    
    switch ( argc )
    {
        case 3:
            if ( !strcmp(argv[1],"-extract") )
            {
                Extract = 1;
                strcpy(FileName,argv[2]);
                d = Read_AmiBoardInfo( FileName, &Header, Extract, &Ofs_Ori, &Size_Ori );
            }
            else
            {
                Extract = 0;
                strcpy(FileName,argv[1]);
                d = Read_AmiBoardInfo( FileName, &Header, Extract, &Ofs_Ori, &Size_Ori );
                strcpy(FileName,argv[2]);
                if ( d != NULL ) Read_Dsdt(FileName, &Header, d, &Ofs_Ori, &Size_Ori);
            }
        break;
        case 4:
            Extract = 1;
            strcpy(FileName,argv[2]);
            d = Read_AmiBoardInfo( FileName, &Header, Extract, &Ofs_Ori, &Size_Ori );
            strcpy(FileName,argv[3]);
            if ( d != NULL ) Read_Dsdt(FileName, &Header, d, &Ofs_Ori, &Size_Ori);
        break;
        default:
            printf("\nSyntax :\n\n");
            printf("  ./Dsdt2Bios -extract AmiBoardInfo-file Dsdt-file\n");
            printf("                      or                          \n");
            printf("  ./Dsdt2Bios AmiBoardInfo-file Dsdt-file\n");
            printf("                      or                          \n");
            printf("  ./Dsdt2Bios -extract AmiBoardInfo-file\n\n");
            printf("-extract will generate DSDT-Original.aml\n\n");
            printf("In all case output file is AmiBoardInfo.new\n\n");
        break;
    }
    
    free(d);
 
    return 0;
}
  • Like 2
Link to comment
Share on other sites

It's simple, modify your DSDT with maciasl compile and look for errors, if all it's' ok, save DSDT.aml in compiled way, put this file in the same folder of Dsdt2Bios launch, if the size it's ok, you wii have AmiBoarInfo.ffs with new dsdt instead of the old one, put this in your bios, that's it

Thank's Aigors! but where to put my original AmiBoardInfo.ffs, and how to make it: there are no .command or something like that to execute it  :huh:

Should i open the terminal with the main.c ?

hi

I think that has nothing to do with the DSDT.

check your Bios settings try it without OC for test.

 

good luck

Thank's truesoldier!

But i never overclock my CPU!  :wacko:

 

Hello,

 

 

https://www.dropbox.com/s/cm6hpf7365xt31o/Dsdt2Bios-r0.1.zip

 

Can extract DSDT from AmiBiosInfo.

 

Syntax :

 

  ./Dsdt2Bios -extract AmiBoardInfo-file Dsdt-file

                      or                          

  ./Dsdt2Bios AmiBoardInfo-file Dsdt-file

                      or                          

  ./Dsdt2Bios -extract AmiBoardInfo-file

 

-extract will generate DSDT-Original.aml

 

In all case output file is AmiBoardInfo.new

//
//  main.c
//  Dsdt2Bios
//
//  Created by FredWst on 06/04/2014.
//  Copyright (c) 2014 none. All rights reserved.
//
 
 
#include <stdio.h>
#include <fcntl.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
 
typedef struct Header
{
unsigned char o1;
unsigned char o2;
    unsigned char o3;
unsigned char id[16];
    unsigned char o4;
    unsigned short len;
    
} Struct_Header;
 
 
unsigned char *Read_AmiBoardInfo(char *FileName, Struct_Header *Header,int Extract, int *Ofs_Ori, int *Size_Ori)
{
    int fd_amiboard, fd_out, i;
    long len;
    unsigned char *d = NULL;
    
    fd_amiboard = open(FileName, O_RDWR | O_NONBLOCK);
    if (fd_amiboard < 0)
    {
        printf("%s does not exist\n",FileName);
        return NULL;
    }
 
    //Get size of AmiBoardInfo in Header
    len = read(fd_amiboard, Header, sizeof(Struct_Header));
    close(fd_amiboard);
 
    
    //Read AmiBoardInfo into buffer
    fd_amiboard = open(FileName, O_RDWR | O_NONBLOCK);
    d = malloc(Header->len+1);
    len = read(fd_amiboard, d, Header->len+1024);
    close(fd_amiboard);
    printf("AmiBoardInfo file size %x.\n",Header->len);
    
    if (len == Header->len)
    {
        //Search for DSDT offset
        for ( i = 4 ; i < Header->len; i++)
            if ((d[i] =='D') && (d[i+1] =='S') && (d[i+2] =='D') && (d[i+3] =='T')) break;
    
        if ( i < Header->len)
        {
            //Size of DSDT
            *Size_Ori = (d[i+5] << 8) + d[i+4];
            *Ofs_Ori = i;
            printf("DSDT found at %x size %x.\n",*Ofs_Ori,*Size_Ori);
    
            if ( Extract )
            {
                fd_out = open("DSDT-Original.aml", O_CREAT | O_RDWR | O_NONBLOCK, 0644);
                write(fd_out,&d[*Ofs_Ori],*Size_Ori);
                close(fd_out);
                printf("DSDT-Original.aml create.\n");
            }
            return d;
        }
        else
            printf("DSDT not found.\n");
    }
    
    printf("Bad file AmiBoardInfo.ffs, header size is not equal to file len, no file generated.\n");
    
    return NULL;
}
 
int Read_Dsdt(char *FileName, Struct_Header *Header, unsigned char *d, int *Ofs_Ori, int *Size_Ori)
{
    int fd_dsdt, fd_out, i;
    long len;
    unsigned char *n = NULL;
    
    fd_dsdt = open(FileName, O_RDWR | O_NONBLOCK);
    
    if (fd_dsdt < 0)
    {
        printf("%s does not exist\n",FileName);
        return 1;
    }
 
    //Get size of DSDT in Header
    unsigned char buffer[6];
    len = read(fd_dsdt, buffer, 6);
    int Size_New = (buffer[5] << 8) + buffer[4];
    close(fd_dsdt);
    
    if ((buffer[0] =='D') && (buffer[1] =='S') && (buffer[2] =='D') && (buffer[3] =='T'))
    {
        
        
        //Read DSDT into buffer
        fd_dsdt = open(FileName, O_RDWR | O_NONBLOCK);
        n = malloc(Size_New+1);
        len = read(fd_dsdt, n, Size_New+1024);
        close(fd_dsdt);
        
        printf("New DSDT size %x.\n",Size_New);
        
        if (len == Size_New)
        {
            if ( Size_New <= *Size_Ori)
            {
                //Replace with new DSDT
                memcpy(&d[*Ofs_Ori], n, Size_New);
                
                //Zero end
                for ( i = *Ofs_Ori + Size_New  ; i < (*Size_Ori + *Ofs_Ori); i++)
                    d[i] = 0;
                
                fd_out = open("AmiBoardInfo.new", O_CREAT | O_RDWR | O_NONBLOCK, 0644 );
                write(fd_out,d,Header->len);
                close(fd_out);
                printf("AmiBoardInfo.new create.\n");
                
            }
            else
                printf("Size new DSDT is greater than original, no file generated.\n");
        }
        else
            printf("Bad file %s, header size is not equal to file len, no file generated.\n",FileName);
        
        free(n);
    }
    else
        printf("Bad file %s, header not ok, no file generated.\n",FileName);
    
    return 0;
}
 
int main(int argc, const char * argv[])
{
    Struct_Header Header;
    
    int Ofs_Ori, Size_Ori, Extract;
    unsigned char *d;
    char FileName[256];
    
    switch ( argc )
    {
        case 3:
            if ( !strcmp(argv[1],"-extract") )
            {
                Extract = 1;
                strcpy(FileName,argv[2]);
                d = Read_AmiBoardInfo( FileName, &Header, Extract, &Ofs_Ori, &Size_Ori );
            }
            else
            {
                Extract = 0;
                strcpy(FileName,argv[1]);
                d = Read_AmiBoardInfo( FileName, &Header, Extract, &Ofs_Ori, &Size_Ori );
                strcpy(FileName,argv[2]);
                if ( d != NULL ) Read_Dsdt(FileName, &Header, d, &Ofs_Ori, &Size_Ori);
            }
        break;
        case 4:
            Extract = 1;
            strcpy(FileName,argv[2]);
            d = Read_AmiBoardInfo( FileName, &Header, Extract, &Ofs_Ori, &Size_Ori );
            strcpy(FileName,argv[3]);
            if ( d != NULL ) Read_Dsdt(FileName, &Header, d, &Ofs_Ori, &Size_Ori);
        break;
        default:
            printf("\nSyntax :\n\n");
            printf("  ./Dsdt2Bios -extract AmiBoardInfo-file Dsdt-file\n");
            printf("                      or                          \n");
            printf("  ./Dsdt2Bios AmiBoardInfo-file Dsdt-file\n");
            printf("                      or                          \n");
            printf("  ./Dsdt2Bios -extract AmiBoardInfo-file\n\n");
            printf("-extract will generate DSDT-Original.aml\n\n");
            printf("In all case output file is AmiBoardInfo.new\n\n");
        break;
    }
    
    free(d);
 
    return 0;
}

Hi FredWest!

Excuse me, i only want to know what is the command to execute for the script, should i use the terminal? Please

Link to comment
Share on other sites

Yes you must open a terminal and goto directory where you unzip file.

 

Last login: Sun Apr  6 20:35:16 on ttys000

localhost:~ fred$ cd Desktop/Debug/

localhost:Debug fred$ ls

AmiBoardInfo.ffs DSDT-F11a-050414.aml Dsdt2Bios

localhost:Debug fred$ ./Dsdt2Bios -extract AmiBoardInfo.ffs DSDT-F11a-050414.aml 

AmiBoardInfo file size af29.

DSDT found at 9fd size 959e.

DSDT-Original.aml create.

New DSDT size 7d10.

AmiBoardInfo.new create.

localhost:Debug fred$ ls

AmiBoardInfo.ffs DSDT-F11a-050414.aml Dsdt2Bios

AmiBoardInfo.new DSDT-Original.aml

localhost:Debug fred$

 

Fred

  • Like 1
Link to comment
Share on other sites

Yes you must open a terminal and goto directory where you unzip file.

 

Last login: Sun Apr  6 20:35:16 on ttys000

localhost:~ fred$ cd Desktop/Debug/

localhost:Debug fred$ ls

AmiBoardInfo.ffs DSDT-F11a-050414.aml Dsdt2Bios

localhost:Debug fred$ ./Dsdt2Bios -extract AmiBoardInfo.ffs DSDT-F11a-050414.aml 

AmiBoardInfo file size af29.

DSDT found at 9fd size 959e.

DSDT-Original.aml create.

New DSDT size 7d10.

AmiBoardInfo.new create.

localhost:Debug fred$ ls

AmiBoardInfo.ffs DSDT-F11a-050414.aml Dsdt2Bios

AmiBoardInfo.new DSDT-Original.aml

localhost:Debug fred$

 

Fred

:hammer: It works my captain :trumpet::police:  , it works :thumbsup_anim:  
Thank you very much FredWst! 
Now i don't have the 0,0Ghz or 4,60Ghz @ CPU Speed. it's really cool, Big thank's friend!!!!

howto delete some unnecessary stuffs from the original dsds? my patched it's' to big then extracted

You need to only delete the FAN's that you don't use in Scope (_TZ), but you must live the FAN_0 Witch is i think the (CPU Fan). Then you can add your patch's, nothing to be simple.

:hammer:  :hammer:  :hammer: 

 

:yes:  :yes:  :yes: BUT THE BIG SPECIAL THANK'S IS FOR "truesoldier and the FredWst" :yes:  :yes:  :yes: 

Link to comment
Share on other sites

Excellent!

 

And if you have a solution when the new DSDT is bigger than the original:   :drool:

 

i've made a test with UEFITools, i'm able to put a bigger DSDT, tomorrow i will flash.

 

Fred

  • Like 1
Link to comment
Share on other sites

×
×
  • Create New...