⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 launchelf.h

📁 索尼公司著名游戏机PS2使用的引导工具文件源代码,这是爱好者自编的工具,可以使用它来引导自己的程序,达到跳过原光驱启动执行自己制作的程序的目的,在windows上可以安装使用ps2的专用开发包,搭建c
💻 H
字号:
#ifndef LAUNCHELF_H
#define LAUNCHELF_H

#include <ito.h>
#include <stdio.h>
#include <tamtypes.h>
#include <sifcmd.h>
#include <kernel.h>
#include <sifrpc.h>
#include <loadfile.h>
#include <string.h>
#include <malloc.h>
#include <libhdd.h>
#include <libmc.h>
#include <libpad.h>
#include <fileio.h>
#include <sys/stat.h>
#include <iopheap.h>
#include <errno.h>
#include <fileXio_rpc.h>
#include <iopcontrol.h>
#include <stdarg.h>
#include <sbv_patches.h>
#include <sys/fcntl.h>
#include <debug.h>
#include <cdvd_rpc.h>
#include "cd.h"
#include "mass_rpc.h"

// 悅捈僗僉儍儞儗乕僩
#define SCANRATE (ITO_VMODE_AUTO==ITO_VMODE_NTSC ? 60:50)

enum
{
	SCREEN_WIDTH = 512,
	SCREEN_HEIGHT = 432,
	SCREEN_MARGIN = 12,
	FONT_WIDTH = 8,
	FONT_HEIGHT = 16,
	LINE_THICKNESS = 2,
	
	MAX_NAME = 256,
	MAX_PATH = 1025,
	MAX_ENTRY = 2048,
	MAX_ROWS = 21,
	MAX_PARTITIONS=100
};

typedef struct
{
	char dirElf[13][MAX_PATH];
	int timeout;
	int filename;
	uint64 color[4];
	int screen_x;
	int screen_y;
	int discControl;
	int interlace;
} SETTING;

extern char LaunchElfDir[MAX_PATH], LastDir[MAX_NAME];

void loadCdModules(void);
void loadUsbModules(void);
void loadHddModules(void);

/* elf.c */
int checkELFheader(const char *filename);
void RunLoaderElf(char *filename, char *);

/* draw.c */
extern itoGsEnv screen_env;
void setScrTmp(const char *msg0, const char *msg1);
void drawMsg(const char *msg);
void setupito(void);
void clrScr(uint64 color);
void drawScr(void);
void drawFrame(int x1, int y1, int x2, int y2, uint64 color);
void drawChar(unsigned char c, int x, int y, uint64 colour);
int printXY(const unsigned char *s, int x, int y, uint64 colour, int);

/* pad.c */
extern u32 new_pad;
int setupPad(void);
int readpad(void);
void waitPadReady(int port, int slot);

/* config.c */
extern SETTING *setting;
void loadConfig(char *);
void config(char *);

/* filer.c */
unsigned char *elisaFnt;
void getFilePath(char *out, const int cnfmode);

#endif

⌨️ 快捷键说明

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