lpc-h.h

来自「Xbox主机破解,烧录晶片专用的程式,可烧录256KB的49lf020晶片,使用」· C头文件 代码 · 共 62 行

H
62
字号
typedef unsigned char  Ubyte;
typedef unsigned short Uword;
typedef unsigned long  Ulong;

#ifndef DOS
#include <windows.h>
void Outportb(Uword portid, Ubyte value);
Ubyte Inportb(Uword portid);
#else
#include <dos.h>
#include <conio.h>
#endif

#define VERSION "LPC version 0.3 DOS"

#include <time.h>
#include <stdio.h>
#include <ctype.h>

#define LO_BYTE(X)	((Ubyte) (X))
#define HI_BYTE(X)	((Ubyte) ((X)>>8))
#define LO_NIB(X)		((Ubyte) ((X) &0x0f))
#define HI_NIB(X)		((Ubyte) (((X)>>4) &0x0f))

void delay(unsigned time);
void Puts(char *str);
void SetProgress(int steps);
void StepProgress(void);

extern void (*Ldout)(Ubyte Nibble);
extern Ubyte (*Ldin)(void);
extern Uword LPT;
extern Ubyte AbortLPC;
extern unsigned int LPC_Delay;

#define DATA		((Uword)(LPT+0x00))
#define STATUS		((Uword)(LPT+0x01))
#define CTRL		((Uword)(LPT+0x02))

#define TAR	0xff
#define WRITE		0x06
#define READ		0x04

/* Common part to hardware rev. 1 & 2 */
#define LCLK	 	0x01
#define LFRAME	 	0x02
#define LRST	 	0x04
#define CTRLMASK 	0x07
#define DATAMASK 	0xf8

void SetDriver(int rev);
Uword ReadFlashID(void);            /* returns(Mfg,Device) */
void InitFlash(void);
int FlashErase(void);
int BlankCheck(void);
void ReadChip(char *Outfile);
void WriteChip(char *Infile, int index);
int VerifyChip(char *file, int index);
int Rev2_Detect(void);
void FlashReset(void);
Ubyte Rev1_Ldin(void);

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?