📄 patch.cpp
字号:
// patch.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include <stdio.h>
int main(int argc, char* argv[])
{
FILE *h = fopen( "xdsfast1.sys", "rb+");
if( h == NULL)
{
printf( "xdsfast1.sys must be in the work directory of this patch.\n");
return 1;
}
unsigned char ch;
fseek( h, 0x109, SEEK_SET);
fread( &ch, 1, 1, h);
if( ch != 0x73)
{
printf( "Wrong input file.\n" );
fclose( h);
return 2;
}
fseek( h, 0x57D, SEEK_SET);
fread( &ch, 1, 1, h);
if( ch != 0x01)
{
printf( "Wrong input file.\n" );
fclose( h);
return 2;
}
ch = 0x72;
fseek( h, 0x109, SEEK_SET);
fwrite( &ch, 1, 1, h);
ch = 0x00;
fseek( h, 0x57D, SEEK_SET);
fwrite( &ch, 1, 1, h);
fclose( h);
printf( "Patch successful.\n");
return 0;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -