
Pod cpuid patch 1.1
===================


What for ...


This tool overrides the CPU detection in POD.

If you're using an AuthenticAMD try:

  * Family = 5, Model = 9                (POD == 2.29) or
  * Family = 5, Model = 6                (POD <= 2.28) or
  * VendorID = GenuineIntel, Family = 6  (any version)

If you're using an GenuineIntel try:

  * Family = 6                           (any version)

Note that this tool does NOT work with, at least one old,
POD Demo version (since it contains an different code for
CPU detection). It'll also not work with PoverVR versions
(patch not needed for the binaries I've seen).

DON'T distribute patched POD binaries. The tool overrides
the CPU detection -- therefore the binary will not behave
correctly on ancient systems! Use your preferred binutils
and patch it yourselfs (usually changing some JE to JAE).


How it works


It replaces

        mov     eax, 00000001h
        cpuid
        mov     [Processor], eax
        mov     eax, 00000000h
        cpuid
        mov     [VendorID], bx
        shr     ebx, 10h
        mov     [VendorID+02h], bx
        mov     [VendorID+04h], dx
        shr     edx, 10h
        mov     [VendorID+06h], dx
        mov     [VendorID+08h], cx
        shr     ecx, 10h
        mov     [VendorID+0Ah], cx

with (70 Byte)

        mov     eax, 00000001h
        cpuid
        jmp     short $+2+__      ; 00h = Enabled , 0Ah = Disabled
        and     eax, 0FFFFF00Fh
        or      eax,  00000__0h   ; Set Processor Family and Model
        mov     [Processor], eax
        xor     eax, eax
        cpuid
        push    eax
        jmp     short $+2+__      ; 00h = Enabled , 0Fh = Disabled
        mov     ebx, '____'       ; Override Processor VendorID...
        mov     edx, '____'
        mov     ecx, '____'
        lea     eax, ds:[VendorID]
        mov     [eax], ebx
        shr     ebx, 10h
        mov     [eax+04h], edx
        shr     edx, 10h
        mov     [eax+08h], ecx
        shr     ecx, 10h
        pop     eax


Legal Stuff


Copyright (c) 2004, Nico Bendlin <nicode@gmx.net>
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

  * Redistributions of source code must retain the above copyright notice,
    this list of conditions and the following disclaimer.
  * Redistributions in binary form must reproduce the above copyright notice,
    this list of conditions and the following disclaimer in the documentation
    and/or other materials provided with the distribution.
  * Neither the name of the copyright holder nor the names of its
    contributors may be used to endorse or promote products derived from this
    software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.

