梦幻西游二启动程序失败

梦幻西游二启动程序失败,第1张

可能原因:你电脑的网速差了!

1、下载所需要的补丁程序,放置于《梦幻西游》文件夹内。下载所需要的补丁程序,放置于《梦幻西游》文件夹内,运行游戏目录下的补丁更新程序XY1Patchexe,如果出现不能正常更新的情况,可以下载更新软件Updatebat;放置在游戏目录下运行即可(如果手动更新程序XY1Patchexe能够正常启用,则无需下载Updatebat),选择游戏更新目录,在更新模式中选择“只更新需要部分”,点选“更新”进行更新。

2、应该是游戏装载的时候出问题了,你重新安装下。就是重新把下载包在电脑上解压,先把前面这个删除完了再更新下。

3、w7系统或者vista系统,选择以管理员身份运行游戏就好了。

4、 可能原因:你电脑的网速差了!

5、兼容性问题,看你得图,貌似你这是VISIT系统,你可以右键点图标,选择属性,然后兼容性,选择用兼容性运行,还不行,你可以查一下关于兼容性的问题。

6、是不是下载之后没有在桌面创建图标,而是直接从文件夹里把图标拉到桌面然后双击,就会出现这个,你可以重新安装,并且在桌面创建图标;也可以从文件夹里打开,就是麻烦点。

延时程序(包括asm和C程序,都是我在学单片机的过程中用到的),在单片机延时程序中应考虑所使用的晶振的频率,在51系列的单片机中我们常用的是110592MHz和120000MHz的晶振,而在AVR单片机上常用的有8000MHz和4000MH的晶振所以在网上查找程序时如果涉及到精确延时则应该注意晶振的频率是多大。

软件延时:(asm)

晶振12MHZ,延时1秒

程序如下:

DELAY:MOV 72H,#100

LOOP3:MOV 71H,#100

LOOP1:MOV 70H,#47

LOOP0:DJNZ 70H,LOOP0

NOP

DJNZ 71H,LOOP1

MOV 70H,#46

LOOP2:DJNZ 70H,LOOP2

NOP

DJNZ 72H,LOOP3

MOV 70H,#48

LOOP4:DJNZ 70H,LOOP4

定时器延时:

晶振12MHZ,延时1s,定时器0工作方式为方式1

DELAY1:MOV R7,#0AH ;;晶振12MHZ,延时05秒

AJMP DELAY

DELAY2:MOV R7,#14H ;;晶振12MHZ,延时1秒

DELAY:CLR EX0

MOV TMOD,#01H ;设置定时器的工作方式为方式1

MOV TL0,#0B0H ;给定时器设置计数初始值

MOV TH0,#3CH

SETB TR0 ;开启定时器

HERE:JBC TF0,NEXT1

SJMP HERE

NEXT1:MOV TL0,#0B0H

MOV TH0,#3CH

DJNZ R7,HERE

CLR TR0 ;定时器要软件清零

SETB EX0

RET

C语言延时程序:

10ms延时子程序(12MHZ)

void delay10ms(void)

{

unsigned char i,j,k;

for(i=5;i>0;i--)

for(j=4;j>0;j--)

for(k=248;k>0;k--);

}

1s延时子程序(12MHZ)

void delay1s(void)

{

unsigned char h,i,j,k;

for(h=5;h>0;h--)

for(i=4;i>0;i--)

for(j=116;j>0;j--)

for(k=214;k>0;k--);

}

200ms延时子程序(12MHZ)

void delay200ms(void)

{

unsigned char i,j,k;

for(i=5;i>0;i--)

for(j=132;j>0;j--)

for(k=150;k>0;k--);

}

500ms延时子程序程序: (12MHZ)

void delay500ms(void)

{

unsigned char i,j,k;

for(i=15;i>0;i--)

for(j=202;j>0;j--)

for(k=81;k>0;k--);

}

下面是用了80000MHZ的晶振的几个延时程序(用定时0的工作模式1):

(1)延时09MS

void delay_0_9ms(void)

{

TMOD=0x01; /定时器0工作在模式1下(16位计数器)/

TH0=0xfd;

TL0=0xa8;

TR0=1; /启动定时器/

while(TF0==0);

TR0=0;

}

(2)延时1MS

void delay_1ms(void)

{

TMOD=0x01; /定时器0工作在模式1下(16位计数器)/

TH0=0xfd;

TL0=0x65;

TR0=1; /启动定时器/

while(TF0==0);

TR0=0;

}

(3)延时45ms

void delay_4_5ms(void)

{

TMOD=0x01; /定时器0工作在模式1下(16位计数器)/

TH0=0xf4;

TL0=0x48;

TR0=1; /启动定时器/

while(TF0==0);

TR0=0;

}

怎么就非要74S164的呢,我没小时间给你写,这里我发一个用74H573的时钟程序给你参考,

#include<reg52h>

#define uchar unsigned char

#define uint unsigned int

uchar aa,h,hh,hl,m,mh,ml,s,sh,sl,ah,am,as,

ahh,ahl,amh,aml,ash,asl,a,b,c;

sbit dula=P2^6;

sbit wela=P2^7;

sbit dian=P0^7;

sbit fm=P2^3;

sbit key1=P3^4;

sbit key2=P3^5;

sbit key3=P3^6;

sbit key4=P3^7;

sbit d1=P1^0;

uchar code table[]={ 0x3f,0x06,0x5b,0x4f,

0x66,0x6d,0x7d,0x07,

0x7f,0x6f};

void display(uchar hh,uchar hl,uchar mh,uchar ml,uchar sh,uchar sl);//显示函数

void delay(uint z) ;//延时函数

void init() ;//初始化话函数

void chan();//调时函数

uchar alarm(uchar ah,uchar am);//调闹铃函数

uchar trans(uchar h,uchar m,uchar s);//显示转换函数

void time(); //时间函数

void main()

{

init(); //初始化

while(1)

{

alarm(); //调闹钟

chan(); //调时

time(); //时间

if(ah==h&&am==m)

{

if(s%2==0)

fm=0;

else

fm=1;

}

if(!(ah==h&&am==m))

fm=1;

}

}

uchar trans(uchar h,uchar m,uchar s)//时间转换

{

//a=h;

//b=m;

//c=s;

hh=h/10;

hl=h%10;

mh=m/10;

ml=m%10;

sh=s/10;

sl=s%10;

return (hh,hl,mh,ml,sh,sl) ;

}

void time()//时间函数

{

if(aa==20)

{

aa=0;

s++;

//fm=1;

if(s==60)

{

s=0;

m++;

if(m==60)

{

m=0;

h++;

if(h==24)

h=0;

}

}

}

trans(h,m,s);

display(hh,hl,mh,ml,sh,sl);

//return (h,m,s);

}

void chan() //调时行数

{

if(key1==0)

{

h++;

delay(200);

if(h==24)

h=0;

}

if(key2==0)

{

m++;

delay(200);

if(m==60)

{

m=0;

h++;

if(h==24)

h=0;

}

}

}

uchar alarm(uchar h,uchar m)//调闹钟函数

{

loop:if(key3==0)

{

while(1)

{

if(key1==0)

{

ah++;

delay(200);

if(ah==24)

ah=0;

}

if(key2==0)

{

am++;

delay(200);

if(m==60)

{

am=0;

ah++;

if(ah==24)

ah=0;

}

}

trans(ah,am,as);

display(hh,hl,mh,ml,sh,sl);

if(key4==0)

goto loop;

}

}

return (ah,am);

}

void delay(uint z) //延时函数

{

uint x,y;

for(x=z;x>0;x--)

for(y=110;y>0;y--);

}

void display(uchar hh,uchar hl,uchar mh,uchar ml,uchar sh,uchar sl)//显示函数

{

dula=1;

P0=table[hh];

dula=0;

P0=0xff;

wela=1;

P0=0xfe;

wela=0;

delay(1);

dula=1;

P0=table[hl];

dian=1;

dula=0;

P0=0xff;

wela=1;

P0=0x7d;

wela=0;

delay(1);

dula=1;

P0=table[mh];

dula=0;

P0=0xff;

wela=1;

P0=0xfb;

wela=0;

delay(1);

dula=1;

P0=table[ml];

dian=1;

dula=0;

P0=0xff;

wela=1;

P0=0x77;

wela=0;

delay(1);

dula=1;

P0=table[sh];

dula=0;

P0=0xff;

wela=1;

P0=0xef;

wela=0;

delay(1);

dula=1;

P0=table[sl];

dula=0;

P0=0xff;

wela=1;

P0=0xdf;

wela=0;

delay(1);

}

void init() //初始化函数

{

wela=0;

dula=0;

TMOD=0x01;

TH0=(65536-50000)/256;

TL0=(65536-50000)%256;

EA=1;

ET0=1;

TR0=1;

}

void timer0() interrupt 1 //中断函数

{

TH0=(65536-50000)/256;

TL0=(65536-50000)%256;

aa++;

}

C语言软件延时一般用for循环或while循环:

void delay(unsigned int data)

{

unsigned int i, j;

for(i=data; i!=0; i--)

for(j=1000; j!=0; j--);

}

void delay(unsigned int data)

{

unsigned int i, j;

i=data;

while(i--)

for(j=1000; j!=0; j--);

}

不同的单片机指令周期不太一样,

想精确延时200ms,最好用protue软件仿真一下,或者自己也可以在开发环境中利用断点调试。

PS:用定时器是最好的方法。

具体用法如下,另外附上源码:如果是只对密码加密的话,只要调用第2个函数就行了。但要注意函数的类型。如果不匹配的话会出错的。

/

1、 MD5String、MD5File、MD5Print、MD5Match这四个函数是供调用的。其他是用来辅助这几个函数的子函数。

2、MD5String为加密字符串。

3、MD5File为加密这个文件。

4、MD5Print是将加密后的密文转换成字符串。

5、MD5Match是用来比较密文是否一致。

加密字符串aaa MD5String('aaa')

将加密后的aaa显示出来 MD5Print(MD5String('aaa'))

比较两次密文是否一致: MD5Match(MD5String('第一次明文'),MD5String('第二次输入的明文'))

/

MD5加密算法(DELPHI)

unit md5;

// -----------------------------------------------------------------------------------------------

INTERFACE

// -----------------------------------------------------------------------------------------------

uses

Windows;

type

MD5Count = array[01] of DWORD;

MD5State = array[03] of DWORD;

MD5Block = array[015] of DWORD;

MD5CBits = array[07] of byte;

MD5Digest = array[015] of byte;

MD5Buffer = array[063] of byte;

MD5Context = record

State: MD5State;

Count: MD5Count;

Buffer: MD5Buffer;

end;

procedure MD5Init(var Context: MD5Context);

procedure MD5Update(var Context: MD5Context; Input: pChar; Length: longword);

procedure MD5Final(var Context: MD5Context; var Digest: MD5Digest);

function MD5String(M: string): MD5Digest;

function MD5File(N: string): MD5Digest;

function MD5Print(D: MD5Digest): string;

function MD5Match(D1, D2: MD5Digest): boolean;

// -----------------------------------------------------------------------------------------------

IMPLEMENTATION

// -----------------------------------------------------------------------------------------------

var

PADDING: MD5Buffer = (

$80, $00, $00, $00, $00, $00, $00, $00,

$00, $00, $00, $00, $00, $00, $00, $00,

$00, $00, $00, $00, $00, $00, $00, $00,

$00, $00, $00, $00, $00, $00, $00, $00,

$00, $00, $00, $00, $00, $00, $00, $00,

$00, $00, $00, $00, $00, $00, $00, $00,

$00, $00, $00, $00, $00, $00, $00, $00,

$00, $00, $00, $00, $00, $00, $00, $00

);

function F(x, y, z: DWORD): DWORD;

begin

Result := (x and y) or ((not x) and z);

end;

function G(x, y, z: DWORD): DWORD;

begin

Result := (x and z) or (y and (not z));

end;

function H(x, y, z: DWORD): DWORD;

begin

Result := x xor y xor z;

end;

function I(x, y, z: DWORD): DWORD;

begin

Result := y xor (x or (not z));

end;

procedure rot(var x: DWORD; n: BYTE);

begin

x := (x shl n) or (x shr (32 - n));

end;

procedure FF(var a: DWORD; b, c, d, x: DWORD; s: BYTE; ac: DWORD);

begin

inc(a, F(b, c, d) + x + ac);

rot(a, s);

inc(a, b);

end;

procedure GG(var a: DWORD; b, c, d, x: DWORD; s: BYTE; ac: DWORD);

begin

inc(a, G(b, c, d) + x + ac);

rot(a, s);

inc(a, b);

end;

procedure HH(var a: DWORD; b, c, d, x: DWORD; s: BYTE; ac: DWORD);

begin

inc(a, H(b, c, d) + x + ac);

rot(a, s);

inc(a, b);

end;

procedure II(var a: DWORD; b, c, d, x: DWORD; s: BYTE; ac: DWORD);

begin

inc(a, I(b, c, d) + x + ac);

rot(a, s);

inc(a, b);

end;

// -----------------------------------------------------------------------------------------------

// Encode Count bytes at Source into (Count / 4) DWORDs at Target

procedure Encode(Source, Target: pointer; Count: longword);

var

S: PByte;

T: PDWORD;

I: longword;

begin

S := Source;

T := Target;

for I := 1 to Count div 4 do begin

T^ := S^;

inc(S);

T^ := T^ or (S^ shl 8);

inc(S);

T^ := T^ or (S^ shl 16);

inc(S);

T^ := T^ or (S^ shl 24);

inc(S);

inc(T);

end;

end;

// Decode Count DWORDs at Source into (Count 4) Bytes at Target

procedure Decode(Source, Target: pointer; Count: longword);

var

S: PDWORD;

T: PByte;

I: longword;

begin

S := Source;

T := Target;

for I := 1 to Count do begin

T^ := S^ and $ff;

inc(T);

T^ := (S^ shr 8) and $ff;

inc(T);

T^ := (S^ shr 16) and $ff;

inc(T);

T^ := (S^ shr 24) and $ff;

inc(T);

inc(S);

end;

end;

// Transform State according to first 64 bytes at Buffer

procedure Transform(Buffer: pointer; var State: MD5State);

var

a, b, c, d: DWORD;

Block: MD5Block;

begin

Encode(Buffer, @Block, 64);

a := State[0];

b := State[1];

c := State[2];

d := State[3];

FF (a, b, c, d, Block[ 0], 7, $d76aa478);

FF (d, a, b, c, Block[ 1], 12, $e8c7b756);

FF (c, d, a, b, Block[ 2], 17, $242070db);

FF (b, c, d, a, Block[ 3], 22, $c1bdceee);

FF (a, b, c, d, Block[ 4], 7, $f57c0faf);

FF (d, a, b, c, Block[ 5], 12, $4787c62a);

FF (c, d, a, b, Block[ 6], 17, $a8304613);

FF (b, c, d, a, Block[ 7], 22, $fd469501);

FF (a, b, c, d, Block[ 8], 7, $698098d8);

FF (d, a, b, c, Block[ 9], 12, $8b44f7af);

FF (c, d, a, b, Block[10], 17, $ffff5bb1);

FF (b, c, d, a, Block[11], 22, $895cd7be);

FF (a, b, c, d, Block[12], 7, $6b901122);

FF (d, a, b, c, Block[13], 12, $fd987193);

FF (c, d, a, b, Block[14], 17, $a679438e);

FF (b, c, d, a, Block[15], 22, $49b40821);

GG (a, b, c, d, Block[ 1], 5, $f61e2562);

GG (d, a, b, c, Block[ 6], 9, $c040b340);

GG (c, d, a, b, Block[11], 14, $265e5a51);

GG (b, c, d, a, Block[ 0], 20, $e9b6c7aa);

GG (a, b, c, d, Block[ 5], 5, $d62f105d);

GG (d, a, b, c, Block[10], 9, $2441453);

GG (c, d, a, b, Block[15], 14, $d8a1e681);

GG (b, c, d, a, Block[ 4], 20, $e7d3fbc8);

GG (a, b, c, d, Block[ 9], 5, $21e1cde6);

GG (d, a, b, c, Block[14], 9, $c33707d6);

GG (c, d, a, b, Block[ 3], 14, $f4d50d87);

GG (b, c, d, a, Block[ 8], 20, $455a14ed);

GG (a, b, c, d, Block[13], 5, $a9e3e905);

GG (d, a, b, c, Block[ 2], 9, $fcefa3f8);

GG (c, d, a, b, Block[ 7], 14, $676f02d9);

GG (b, c, d, a, Block[12], 20, $8d2a4c8a);

HH (a, b, c, d, Block[ 5], 4, $fffa3942);

HH (d, a, b, c, Block[ 8], 11, $8771f681);

HH (c, d, a, b, Block[11], 16, $6d9d6122);

HH (b, c, d, a, Block[14], 23, $fde5380c);

HH (a, b, c, d, Block[ 1], 4, $a4beea44);

HH (d, a, b, c, Block[ 4], 11, $4bdecfa9);

HH (c, d, a, b, Block[ 7], 16, $f6bb4b60);

HH (b, c, d, a, Block[10], 23, $bebfbc70);

HH (a, b, c, d, Block[13], 4, $289b7ec6);

HH (d, a, b, c, Block[ 0], 11, $eaa127fa);

HH (c, d, a, b, Block[ 3], 16, $d4ef3085);

HH (b, c, d, a, Block[ 6], 23, $4881d05);

HH (a, b, c, d, Block[ 9], 4, $d9d4d039);

HH (d, a, b, c, Block[12], 11, $e6db99e5);

HH (c, d, a, b, Block[15], 16, $1fa27cf8);

HH (b, c, d, a, Block[ 2], 23, $c4ac5665);

II (a, b, c, d, Block[ 0], 6, $f4292244);

II (d, a, b, c, Block[ 7], 10, $432aff97);

II (c, d, a, b, Block[14], 15, $ab9423a7);

II (b, c, d, a, Block[ 5], 21, $fc93a039);

II (a, b, c, d, Block[12], 6, $655b59c3);

II (d, a, b, c, Block[ 3], 10, $8f0ccc92);

II (c, d, a, b, Block[10], 15, $ffeff47d);

II (b, c, d, a, Block[ 1], 21, $85845dd1);

II (a, b, c, d, Block[ 8], 6, $6fa87e4f);

II (d, a, b, c, Block[15], 10, $fe2ce6e0);

II (c, d, a, b, Block[ 6], 15, $a3014314);

II (b, c, d, a, Block[13], 21, $4e0811a1);

II (a, b, c, d, Block[ 4], 6, $f7537e82);

II (d, a, b, c, Block[11], 10, $bd3af235);

II (c, d, a, b, Block[ 2], 15, $2ad7d2bb);

II (b, c, d, a, Block[ 9], 21, $eb86d391);

inc(State[0], a);

inc(State[1], b);

inc(State[2], c);

inc(State[3], d);

end;

// -----------------------------------------------------------------------------------------------

// Initialize given Context

procedure MD5Init(var Context: MD5Context);

begin

with Context do begin

State[0] := $67452301;

State[1] := $efcdab89;

State[2] := $98badcfe;

State[3] := $10325476;

Count[0] := 0;

Count[1] := 0;

ZeroMemory(@Buffer, SizeOf(MD5Buffer));

end;

end;

// Update given Context to include Length bytes of Input

procedure MD5Update(var Context: MD5Context; Input: pChar; Length: longword);

var

Index: longword;

PartLen: longword;

I: longword;

begin

with Context do begin

Index := (Count[0] shr 3) and $3f;

inc(Count[0], Length shl 3);

if Count[0] < (Length shl 3) then inc(Count[1]);

inc(Count[1], Length shr 29);

end;

PartLen := 64 - Index;

if Length >= PartLen then begin

CopyMemory(@ContextBuffer[Index], Input, PartLen);

Transform(@ContextBuffer, ContextState);

I := PartLen;

while I + 63 < Length do begin

Transform(@Input[I], ContextState);

inc(I, 64);

end;

Index := 0;

end else I := 0;

CopyMemory(@ContextBuffer[Index], @Input[I], Length - I);

end;

// Finalize given Context, create Digest and zeroize Context

procedure MD5Final(var Context: MD5Context; var Digest: MD5Digest);

var

Bits: MD5CBits;

Index: longword;

PadLen: longword;

begin

Decode(@ContextCount, @Bits, 2);

Index := (ContextCount[0] shr 3) and $3f;

if Index < 56 then PadLen := 56 - Index else PadLen := 120 - Index;

MD5Update(Context, @PADDING, PadLen);

MD5Update(Context, @Bits, 8);

Decode(@ContextState, @Digest, 4);

ZeroMemory(@Context, SizeOf(MD5Context));

end;

// -----------------------------------------------------------------------------------------------

// Create digest of given Message

function MD5String(M: string): MD5Digest;

var

Context: MD5Context;

begin

MD5Init(Context);

MD5Update(Context, pChar(M), length(M));

MD5Final(Context, Result);

end;

// Create digest of file with given Name

function MD5File(N: string): MD5Digest;

var

FileHandle: THandle;

MapHandle: THandle;

ViewPointer: pointer;

Context: MD5Context;

begin

MD5Init(Context);

FileHandle := CreateFile(pChar(N), GENERIC_READ, FILE_SHARE_READ or FILE_SHARE_WRITE,

nil, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL or FILE_FLAG_SEQUENTIAL_SCAN, 0);

if FileHandle <> INVALID_HANDLE_value then try

MapHandle := CreateFileMapping(FileHandle, nil, PAGE_READONLY, 0, 0, nil);

if MapHandle <> 0 then try

ViewPointer := MapViewOfFile(MapHandle, FILE_MAP_READ, 0, 0, 0);

if ViewPointer <> nil then try

MD5Update(Context, ViewPointer, GetFileSize(FileHandle, nil));

finally

UnmapViewOfFile(ViewPointer);

end;

finally

CloseHandle(MapHandle);

end;

finally

CloseHandle(FileHandle);

end;

MD5Final(Context, Result);

end;

// Create hex representation of given Digest

function MD5Print(D: MD5Digest): string;

var

I: byte;

const

Digits: array[015] of char =

('0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f');

begin

Result := '';

for I := 0 to 15 do Result := Result + Digits[(D[I] shr 4) and $0f] + Digits[D[I] and $0f];

end;

// -----------------------------------------------------------------------------------------------

// Compare two Digests

function MD5Match(D1, D2: MD5Digest): boolean;

var

I: byte;

begin

I := 0;

Result := TRUE;

while Result and (I < 16) do begin

Result := D1[I] = D2[I];

inc(I);

end;

end;

end

以上就是关于梦幻西游二启动程序失败全部的内容,包括:梦幻西游二启动程序失败、怎么用C语言写可以调节的延时程序,请大侠帮忙、急求用单片机 AT89C52 74LS164驱动的四位一体共阴数码管从0000~9999循环循环累加显示的程序等相关内容解答,如果想了解更多相关内容,可以关注我们,你们的支持是我们更新的动力!

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/zz/9489644.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2023-04-28
下一篇 2023-04-28

发表评论

登录后才能评论

评论列表(0条)

保存