资源简介

AMD and Nvidia GOP 更新工具 GOPUpd_v1.9.6.5.zip 此工具可以更新显卡GOP,可支持现流行的大部分A卡 N卡

资源截图

代码片段和文件信息

#!/usr/bin/env python3

import binascii
import ctypes
import datetime
import os
import re
import struct
import subprocess
import sys

char     = ctypes.c_char
uint8_t  = ctypes.c_ubyte
uint16_t = ctypes.c_ushort
uint32_t = ctypes.c_uint
uint64_t = ctypes.c_uint64
#uint128_t = ctypes.c_uint128
void     = ctypes.c_void_p

try :
#import colorama
from colorama import Fore Back style init

except :
print(“Colorama is not installed! Use \“pip install colorama\“ from your Python\scripts folder.\n“)
sys.exit()

#colorama.init()
init()

class ROM_Header(ctypes.LittleEndianStructure):
_pack_   = 1
_fields_ = [
(“Signature“                 uint16_t)     # 00 55AA <- AA55 564E <- 4E56
(“InitializationSize“        uint8_t)      # 02
(“InitEntryPoint“            uint8_t * 3)  # 03
(“Reserved“                  uint8_t * 18) # 06
(“PcirOffset“                uint16_t)     # 18
(“PnpOffset“                 uint16_t)     # 1A
# 1C
    ]

def pack(self):
return bytearray(self)[:]
    
def rom_print(self offset):

init_size = self.InitializationSize * 0x200

jmp_cmd  = self.InitEntryPoint[0]
jmp_off  = self.InitEntryPoint[2] * 0x100 + self.InitEntryPoint[1]
jmp_len  = 3

if jmp_cmd == 0xEB :
init_jmp = “Jump short“
jmp_off  = self.InitEntryPoint[1]
jmp_len  = 2
elif jmp_cmd == 0xE9 :
init_jmp = “Jump near“
elif jmp_cmd == 0xEA :
init_jmp = “Jump far“
elif jmp_cmd == 0xE8 :
init_jmp = “Call“
else :
init_jmp = “Jumpy McJumpFace“

init_hex   = “%0.2X %-4.2X“ % (jmp_cmd jmp_off)
init_asm   = “%s 0x%0.2X“  % (init_jmp jmp_off)

reserv_str  = ““.join(“%02X“ % val for val in self.Reserved)
#reserv_bin = ““.join(val.to_bytes(1 ‘big‘).decode(‘utf-8‘ ‘ignore‘) for val in self.Reserved)
init_abs    = jmp_off + jmp_len + offset + 3 if jmp_cmd else 0
pci_off_abs = self.PcirOffset + offset if self.PcirOffset else 0
pnp_off_abs = self.PnpOffset + offset if self.PnpOffset else 0

print(“-------------ROM_HEADER-------------\n“)
print(“Signature:                          %0.4X“                   % self.Signature)
print(“Initialization Size:                0x%-4.2X  (0x%0.2X)“     % (self.InitializationSize init_size))
print(“Init Entry Point:                   %s (%s abs 0x%0.2X)“    % (init_hex init_asm init_abs))
print(“Reserved:                           %s“                      % reserv_str) # %s (%s)“ % (reserv_str reserv_bin))
print(“PCIR Offset:                        0x%-4.2X  (abs 0x%0.2X)“ % (self.PcirOffset pci_off_abs))
print(“PnP Offset:                         0x%-4.2X  (abs 0x%0.2X)“ % (self.PnpOffset pnp_off_abs))
print(“\n------------------------------------\n“)

def nv_rom_print(self offset): # For 564E <- 4E56

# Init size is uint16_t
nv_InitializationSize = self.InitEntryPoint[0] * 0x100 + self.InitializationSize
init_size             

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2020-06-15 09:46  GOPUpd_v1.9.6.5\
     文件         187  2020-06-15 09:46  __MACOSX\._GOPUpd_v1.9.6.5
     目录           0  2018-11-16 21:15  GOPUpd_v1.9.6.5\#GOP_Files\
     文件         187  2018-11-16 21:15  __MACOSX\GOPUpd_v1.9.6.5\._#GOP_Files
     文件       80112  2018-11-25 20:06  GOPUpd_v1.9.6.5\vcruntime140.dll
     文件         187  2018-11-25 20:06  __MACOSX\GOPUpd_v1.9.6.5\._vcruntime140.dll
     文件     3295232  2018-12-04 21:11  GOPUpd_v1.9.6.5\python36.dll
     文件         187  2018-12-04 21:11  __MACOSX\GOPUpd_v1.9.6.5\._python36.dll
     目录           0  2018-06-16 07:56  GOPUpd_v1.9.6.5\#ROM_Info\
     文件         187  2018-06-16 07:56  __MACOSX\GOPUpd_v1.9.6.5\._#ROM_Info
     文件       26112  2010-08-23 14:57  GOPUpd_v1.9.6.5\cecho.exe
     文件         187  2010-08-23 14:57  __MACOSX\GOPUpd_v1.9.6.5\._cecho.exe
     文件        2594  2018-11-16 22:03  GOPUpd_v1.9.6.5\#AMD_ROM_Info.bat
     文件         187  2018-11-16 22:03  __MACOSX\GOPUpd_v1.9.6.5\._#AMD_ROM_Info.bat
     文件        8500  2018-12-04 21:04  GOPUpd_v1.9.6.5\GOPupd.bat
     文件         187  2018-12-04 21:04  __MACOSX\GOPUpd_v1.9.6.5\._GOPupd.bat
     文件        2818  2017-08-17 22:11  GOPUpd_v1.9.6.5\#Nvidia_ROM_Info.bat
     文件         187  2017-08-17 22:11  __MACOSX\GOPUpd_v1.9.6.5\._#Nvidia_ROM_Info.bat
     文件      240128  2018-12-04 21:11  GOPUpd_v1.9.6.5\GOPupd.exe
     文件         187  2018-12-04 21:11  __MACOSX\GOPUpd_v1.9.6.5\._GOPupd.exe
     文件     1470674  2018-12-04 21:11  GOPUpd_v1.9.6.5\GOPupd.zip
     文件         187  2018-12-04 21:11  __MACOSX\GOPUpd_v1.9.6.5\._GOPupd.zip
     文件       88064  2014-07-19 04:17  GOPUpd_v1.9.6.5\UEFIRomExtract.exe
     文件         187  2014-07-19 04:17  __MACOSX\GOPUpd_v1.9.6.5\._UEFIRomExtract.exe
     文件      152915  2018-12-04 21:09  GOPUpd_v1.9.6.5\GOPupd.py
     文件         187  2018-12-04 21:09  __MACOSX\GOPUpd_v1.9.6.5\._GOPupd.py
     文件       40899  2017-08-18 09:55  GOPUpd_v1.9.6.5\#GOP_Files\amd_gop_IDs_1.57.0.0.0.txt
     文件         187  2017-08-18 09:55  __MACOSX\GOPUpd_v1.9.6.5\#GOP_Files\._amd_gop_IDs_1.57.0.0.0.txt
     文件       41472  2015-05-23 12:52  GOPUpd_v1.9.6.5\#GOP_Files\amd_gop_mcu.efirom
     文件         187  2015-05-23 12:52  __MACOSX\GOPUpd_v1.9.6.5\#GOP_Files\._amd_gop_mcu.efirom
     文件       67584  2015-06-08 22:15  GOPUpd_v1.9.6.5\#GOP_Files\nv_gop_GK1xx_multi.efirom
............此处省略49个文件信息

评论

共有 条评论