Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,12 @@ clean:

rebuild: clean all

format:
find . -type f -a \( -iname \*.h -o -iname \*.c \) | xargs clang-format -i

format-check:
@! find . -type f -a \( -iname \*.h -o -iname \*.c \) | xargs clang-format -style=file -output-replacements-xml | grep "<replacement " >/dev/null

#special recipe for compiling and dumping obj to subfolder
$(EE_OBJS_DIR)%.o: $(EE_SRC_DIR)%.c | $(EE_OBJS_DIR)
@echo -e "\033[1m CC - $@\033[0m"
Expand Down
24 changes: 12 additions & 12 deletions include/SMB_test.h
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
//---------------------------------------------------------------------------
//File name: SMB_test.h
// File name: SMB_test.h
//---------------------------------------------------------------------------

#define SERVERLIST_MAX 16

typedef struct
{ // size = 1148
char Server_IP[16]; //IP address of this server
int Server_Port; //IP port for use with this server
char Username[256]; //Username for login to this server (NUL if anonymous)
char Password[256]; //Password for login to this server (ignore if anonymous)
char Server_IP[16]; // IP address of this server
int Server_Port; // IP port for use with this server
char Username[256]; // Username for login to this server (NUL if anonymous)
char Password[256]; // Password for login to this server (ignore if anonymous)
int PasswordType; // PLAINTEXT_PASSWORD or HASHED_PASSWORD or NO_PASSWORD
u8 PassHash[32]; //Hashed password for this server (unused if anonymous)
int PassHash_f; //Flags hashing already performed if non-zero
int Server_Logon_f; //Flags successful logon to this server
char Client_ID[256]; //Unit name of ps2, in SMB traffic with this server
char Server_ID[256]; //Unit name of this server, as defined for SMB traffic
char Server_FBID[64]; //Name of this server for display in FileBrowser
} smbServerList_t; //uLE SMB ServerList entry type
u8 PassHash[32]; // Hashed password for this server (unused if anonymous)
int PassHash_f; // Flags hashing already performed if non-zero
int Server_Logon_f; // Flags successful logon to this server
char Client_ID[256]; // Unit name of ps2, in SMB traffic with this server
char Server_ID[256]; // Unit name of this server, as defined for SMB traffic
char Server_FBID[64]; // Name of this server for display in FileBrowser
} smbServerList_t; // uLE SMB ServerList entry type

int smbCurrentServer;
int smbServerListCount;
Expand Down
68 changes: 34 additions & 34 deletions include/launchelf.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,13 @@
#include <sior_rpc.h>

#ifdef SIO_DEBUG
#define DPRINTF(format, args...) \
sio_printf(format, ##args)
#define DPRINTF(format, args...) \
sio_printf(format, ##args)
#elif defined(TTY2SIOR) || defined(COMMON_PRINTF) || defined(UDPTTY)
#define DPRINTF(format, args...) \
printf("\033[1;94;40m"format"\033[m", ##args)
#define DPRINTF(format, args...) \
printf("\033[1;94;40m" format "\033[m", ##args)
#else
#define DPRINTF(format, args...) // strip away printf from consumer builds
#define DPRINTF(format, args...) // strip away printf from consumer builds
#endif

#define TRUE 1
Expand Down Expand Up @@ -132,7 +132,7 @@ enum SETTING_LK {

SETTING_LK_BTN_COUNT,

//Special paths
// Special paths
SETTING_LK_ESR = SETTING_LK_BTN_COUNT,
SETTING_LK_OSDSYS,

Expand Down Expand Up @@ -212,7 +212,7 @@ extern char LaunchElfDir[MAX_PATH], LastDir[MAX_NAME];
extern int TV_mode;
extern int swapKeys;
extern int GUI_active; // Skin and Main Skin switch
extern int cdmode; //Last detected disc type
extern int cdmode; // Last detected disc type
extern u8 console_is_PSX;

void load_vmc_fs(void);
Expand Down Expand Up @@ -282,8 +282,8 @@ int printXY_sjis(const unsigned char *s, int x, int y, u64 colour, int);
char *transcpy_sjis(char *d, const unsigned char *s);
void loadIcon(void);
int loadFont(char *path_arg);
//Comment out WriteFont_C when not used (also requires patch in draw.c)
//int WriteFont_C(char *pathname);
// Comment out WriteFont_C when not used (also requires patch in draw.c)
// int WriteFont_C(char *pathname);

/* pad.c */
#define PAD_R3_V0 0x010000
Expand All @@ -298,7 +298,7 @@ int loadFont(char *path_arg);
extern u32 joy_value;
extern u32 new_pad;
#ifdef DS34
extern int semRunning,semFinish;
extern int semRunning, semFinish;
extern int isRunning;
#endif
int setupPad(void);
Expand All @@ -322,12 +322,12 @@ enum TV_mode {
extern char PathPad[30][MAX_PATH];
extern SETTING *setting;
void initConfig(void);
int loadConfig(char *, char *); //0==OK, -1==load failed
int loadConfig(char *, char *); // 0==OK, -1==load failed
void config(char *, char *);
int get_CNF_string(char **CNF_p_p,
char **name_p_p,
char **value_p_p); //main CNF name,value parser
char *preloadCNF(char *path); //loads file into RAM it allocates
char **value_p_p); // main CNF name,value parser
char *preloadCNF(char *path); // loads file into RAM it allocates

/* filer.c */
typedef struct
Expand All @@ -341,9 +341,9 @@ typedef struct
extern char mountedParty[MOUNT_LIMIT][MAX_NAME];
extern int latestMount;
extern int vmcMounted[2];
extern int vmc_PartyIndex[2]; //PFS index for each VMC, unless -1
extern int Party_vmcIndex[MOUNT_LIMIT]; //VMC index for each PFS, unless -1
extern int nparties; //Clearing this causes FileBrowser to refresh party list
extern int vmc_PartyIndex[2]; // PFS index for each VMC, unless -1
extern int Party_vmcIndex[MOUNT_LIMIT]; // VMC index for each PFS, unless -1
extern int nparties; // Clearing this causes FileBrowser to refresh party list
extern unsigned char *elisaFnt;
char *PathPad_menu(const char *path);
int getFilePath(char *out, const int cnfmode);
Expand Down Expand Up @@ -418,34 +418,34 @@ void Load_External_Language(void);

extern unsigned char font_uLE[];
enum {
//0x100-0x109 are 5 double width characters for D-Pad buttons, which are accessed as:
// 0x100-0x109 are 5 double width characters for D-Pad buttons, which are accessed as:
//"ÿ0"==Circle "ÿ1"==Cross "ÿ2"==Square "ÿ3"==Triangle "ÿ4"==filled Square
RIGHT_CUR = 0x10A, //Triangle pointing left, for use to the right of an item
LEFT_CUR = 0x10B, //Triangle pointing right, for use to the left of an item
UP_ARROW = 0x10C, //Arrow pointing up
DN_ARROW = 0x10D, //Arrow pointing up
LT_ARROW = 0x10E, //Arrow pointing up
RT_ARROW = 0x10F, //Arrow pointing up
TEXT_CUR = 0x110, //Vertical bar, for use between two text characters
UL_ARROW = 0x111, //Arrow pointing up and to the left, from a vertical start.
BR_SPLIT = 0x112, //Splits rectangle from BL to TR with BR portion filled
BL_SPLIT = 0x113, //Splits rectangle from TL to BR with BL portion filled
//0x114-0x11B are 4 double width characters for D-Pad buttons, which are accessed as:
//"ÿ:"==Right "ÿ;"==Down "ÿ<"==Left "ÿ="==Up
//0x11C-0x123 are 4 doubled characters used as normal/marked folder/file icons
RIGHT_CUR = 0x10A, // Triangle pointing left, for use to the right of an item
LEFT_CUR = 0x10B, // Triangle pointing right, for use to the left of an item
UP_ARROW = 0x10C, // Arrow pointing up
DN_ARROW = 0x10D, // Arrow pointing up
LT_ARROW = 0x10E, // Arrow pointing up
RT_ARROW = 0x10F, // Arrow pointing up
TEXT_CUR = 0x110, // Vertical bar, for use between two text characters
UL_ARROW = 0x111, // Arrow pointing up and to the left, from a vertical start.
BR_SPLIT = 0x112, // Splits rectangle from BL to TR with BR portion filled
BL_SPLIT = 0x113, // Splits rectangle from TL to BR with BL portion filled
// 0x114-0x11B are 4 double width characters for D-Pad buttons, which are accessed as:
//"ÿ:"==Right "ÿ;"==Down "ÿ<"==Left "ÿ="==Up
// 0x11C-0x123 are 4 doubled characters used as normal/marked folder/file icons
ICON_FOLDER = 0x11C,
ICON_M_FOLDER = 0x11E,
ICON_FILE = 0x120,
ICON_M_FILE = 0x122,
FONT_COUNT = 0x124 //Total number of characters in font
FONT_COUNT = 0x124 // Total number of characters in font
};

/* makeicon.c */
int make_icon(char *icontext, char *filename);
int make_iconsys(char *title, char *iconname, char *filename);


//vmcfs definitions
// vmcfs definitions

// The devctl commands: 0x56 == V, 0x4D == M, 0x43 == C, 0x01, 0x02, ... == command number.
#define DEVCTL_VMCFS_CLEAN 0x564D4301 // Set as free all fat cluster corresponding to a none existing object. ( Object are just marked as none existing but not removed from fat table when rmdir or remove fonctions are call. This allow to recover a deleted file. )
Expand All @@ -464,14 +464,14 @@ typedef enum {
// chkesr_rpc.c
extern int Check_ESR_Disc(void);

//USB_mass definitions for multiple drive usage
// USB_mass definitions for multiple drive usage

#define USB_MASS_MAX_DRIVES 10

extern char USB_mass_ix[10];
extern int USB_mass_max_drives;
extern u64 USB_mass_scan_time;
extern int USB_mass_scanned;
extern int USB_mass_loaded; //0==none, 1==internal, 2==external
extern int USB_mass_loaded; // 0==none, 1==internal, 2==external

#endif
19 changes: 14 additions & 5 deletions iop/AllowDVDV/AllowDVDV.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,17 @@ static u8 buf[137] __attribute((aligned(16)));
static u8 psxver[11] __attribute((aligned(16))) = "rom0:PSXVER";


static u8 Header[32] __attribute((aligned(16))) = {0x01, 0x00, 0x00, 0x01, 0x00, 0x03, 0x00, 0x4A, 0x00, 0x01, 0x02, 0x19, 0x00, 0x00, 0x00, 0x56,
0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x07, 0x2C, 0x02, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00};
// clang-format off
static u8 Header[32] __attribute((aligned(16))) = {
0x01, 0x00, 0x00, 0x01, 0x00, 0x03, 0x00, 0x4A, 0x00, 0x01, 0x02, 0x19, 0x00, 0x00, 0x00, 0x56,
0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x07, 0x2C, 0x02, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00
};



static u8 ps2Part1[8] __attribute((aligned(16))) = {0xFA, 0xA2, 0x47, 0xE9, 0xFA, 0x20, 0x89, 0x19};
static u8 ps2Part1[8] __attribute((aligned(16))) = {
0xFA, 0xA2, 0x47, 0xE9, 0xFA, 0x20, 0x89, 0x19
};
static u8 ps2Part2[49] __attribute((aligned(16))) = {
0x25, 0xD1, 0x26, 0x8E, 0x3E, 0xB5, 0x38, 0xC2,
0x87, 0xC0, 0xA9, 0xD6, 0xD5, 0x7B, 0x56, 0x87, 0x7B, 0x95, 0x6E, 0x17, 0xF6, 0xBD, 0x76, 0x51,
Expand All @@ -24,7 +29,10 @@ static u8 ps2Part2[49] __attribute((aligned(16))) = {
};


static u8 psxPart1[8] __attribute((aligned(16))) = {0x98, 0xF7, 0x5C, 0x84, 0x38, 0xC5, 0xBD, 0x3C};
static u8 psxPart1[8] __attribute((aligned(16))) = {
0x98, 0xF7, 0x5C, 0x84, 0x38, 0xC5, 0xBD, 0x3C
};

static u8 psxPart2[49] __attribute((aligned(16))) = {
0x2F, 0xDC, 0xA6, 0x35, 0x8D, 0xE7, 0x5B, 0x77,
0x02, 0x47, 0xD9, 0xD2, 0x6E, 0xCC, 0x4D, 0x60, 0x07, 0xBC, 0xCC, 0x1A, 0x7C, 0x55, 0x0E, 0x48,
Expand All @@ -36,6 +44,7 @@ static u8 CT[16] __attribute((aligned(16))) = {
0xDE, 0xF0, 0x76, 0x8C, 0x1B, 0x36, 0xF8, 0x07,
0xE0, 0x4B, 0x39, 0x33, 0xF9, 0x6D, 0x4F, 0xFF,
};
// clang-format on


int _start()
Expand Down Expand Up @@ -79,4 +88,4 @@ int _start()
//-------------------------------------------------------------------------
DECLARE_IMPORT_TABLE(secrman, 1, 0)
DECLARE_IMPORT(13, SecrDiskBootFile)
END_IMPORT_TABLE
END_IMPORT_TABLE
Loading