Skip to content

Commit

Permalink
big endian.
Browse files Browse the repository at this point in the history
  • Loading branch information
aliaspider committed Sep 18, 2020
1 parent 3e7dfea commit 276354b
Show file tree
Hide file tree
Showing 8 changed files with 40 additions and 40 deletions.
8 changes: 4 additions & 4 deletions Core/Dialog/PSPNetconfDialog.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ struct SceUtilityNetconfData {

struct SceUtilityNetconfParam {
pspUtilityDialogCommon common;
int netAction; // sets how to connect
s32_le netAction; // sets how to connect
PSPPointer<SceUtilityNetconfData> NetconfData;
int netHotspot; // Flag to allow hotspot connections
int netHotspotConnected; // Flag to check if a hotspot connection is active
int netWifiSpot; // Flag to allow WIFI connections
s32_le netHotspot; // Flag to allow hotspot connections
s32_le netHotspotConnected; // Flag to check if a hotspot connection is active
s32_le netWifiSpot; // Flag to allow WIFI connections
};


Expand Down
4 changes: 2 additions & 2 deletions Core/ELF/ElfReader.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class ElfReader {
public:
ElfReader(const void *ptr, size_t size) {
base = (const char*)ptr;
base32 = (const u32 *)ptr;
base32 = (const u32_le *)ptr;
header = (const Elf32_Ehdr*)ptr;
segments = (const Elf32_Phdr *)(base + header->e_phoff);
sections = (const Elf32_Shdr *)(base + header->e_shoff);
Expand Down Expand Up @@ -139,7 +139,7 @@ class ElfReader {

private:
const char *base = nullptr;
const u32 *base32 = nullptr;
const u32_le *base32 = nullptr;
const Elf32_Ehdr *header = nullptr;
const Elf32_Phdr *segments = nullptr;
const Elf32_Shdr *sections = nullptr;
Expand Down
2 changes: 1 addition & 1 deletion Core/HLE/HLEHelperThread.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
HLEHelperThread::HLEHelperThread() : id_(-1), entry_(0) {
}

HLEHelperThread::HLEHelperThread(const char *threadName, u32 instructions[], u32 instrCount, u32 prio, int stacksize) {
HLEHelperThread::HLEHelperThread(const char *threadName, u32_le instructions[], u32 instrCount, u32 prio, int stacksize) {
u32 instrBytes = instrCount * sizeof(u32);
u32 totalBytes = instrBytes + sizeof(u32) * 2;
AllocEntry(totalBytes);
Expand Down
2 changes: 1 addition & 1 deletion Core/HLE/HLEHelperThread.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class HLEHelperThread {
public:
// For savestates.
HLEHelperThread();
HLEHelperThread(const char *threadName, u32 instructions[], u32 instrCount, u32 prio, int stacksize);
HLEHelperThread(const char *threadName, u32_le instructions[], u32 instrCount, u32 prio, int stacksize);
HLEHelperThread(const char *threadName, const char *module, const char *func, u32 prio, int stacksize);
~HLEHelperThread();
void DoState(PointerWrap &p);
Expand Down
10 changes: 5 additions & 5 deletions Core/HLE/sceKernelThread.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3661,12 +3661,12 @@ int LoadExecForUser_362A956B()
static const SceUID SCE_TE_THREADID_ALL_USER = 0xFFFFFFF0;

struct NativeThreadEventHandler {
u32 size;
u32_le size;
char name[KERNELOBJECT_MAX_NAME_LENGTH + 1];
SceUID threadID;
u32 mask;
u32 handlerPtr;
u32 commonArg;
SceUID_le threadID;
u32_le mask;
u32_le handlerPtr;
u32_le commonArg;
};

struct ThreadEventHandler : public KernelObject {
Expand Down
14 changes: 7 additions & 7 deletions Core/HLE/sceNet.h
Original file line number Diff line number Diff line change
Expand Up @@ -171,8 +171,8 @@ typedef struct SceNetApctlInfoInternal { // Using struct instead of union for in
char name[APCTL_PROFILENAME_MAXLEN];
u8 bssid[ETHER_ADDR_LEN];
char ssid[APCTL_SSID_MAXLEN];
unsigned int ssidLength; // ssid string length (excluding null terminator)
unsigned int securityType; // a value of PSP_NET_APCTL_INFO_SECURITY_TYPE_NONE..PSP_NET_APCTL_INFO_SECURITY_TYPE_WPA?
u32_le ssidLength; // ssid string length (excluding null terminator)
u32_le securityType; // a value of PSP_NET_APCTL_INFO_SECURITY_TYPE_NONE..PSP_NET_APCTL_INFO_SECURITY_TYPE_WPA?
u8 strength; // Signal strength in %
u8 channel;
u8 powerSave; // 1 on, 0 off
Expand All @@ -181,12 +181,12 @@ typedef struct SceNetApctlInfoInternal { // Using struct instead of union for in
char gateway[APCTL_IPADDR_MAXLEN];
char primaryDns[APCTL_IPADDR_MAXLEN];
char secondaryDns[APCTL_IPADDR_MAXLEN];
unsigned int useProxy; // 1 for proxy, 0 for no proxy
u32_le useProxy; // 1 for proxy, 0 for no proxy
char proxyUrl[APCTL_URL_MAXLEN];
unsigned short proxyPort;
unsigned int eapType; // 0 is none, 1 is EAP-MD5
unsigned int startBrowser; // 1 = start browser
unsigned int wifisp; // 1 if connection is for Wifi service providers (WISP) for sharing internet connection
u16_le proxyPort;
u32_le eapType; // 0 is none, 1 is EAP-MD5
u32_le startBrowser; // 1 = start browser
u32_le wifisp; // 1 if connection is for Wifi service providers (WISP) for sharing internet connection
} SceNetApctlInfoInternal;

struct ApctlHandler {
Expand Down
2 changes: 1 addition & 1 deletion Core/HLE/sceNp.h
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ struct SceNpAuthRequestParameter
u32_le cookieSize;
u32_le entitlementIdAddr; //PSPPointer<char> entitlementId; // null-terminated string
u32_le consumedCount; // related to entitlement?
u32 ticketCbAddr; //PSPPointer<SceNpAuthCallback> ticketCb
u32_le ticketCbAddr; //PSPPointer<SceNpAuthCallback> ticketCb
u32_le cbArgAddr; //PSPPointer<void> cbArg
};

Expand Down
38 changes: 19 additions & 19 deletions Core/HLE/sceUsbGps.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,35 +28,35 @@ void __UsbGpsShutdown();
#pragma pack(push, 1)

typedef struct {
short year;
short month;
short date;
short hour;
short minute;
short second;
float garbage1;
float hdop;
float garbage2;
float latitude;
float longitude;
float altitude;
float garbage3;
float speed;
float bearing;
s16_le year;
s16_le month;
s16_le date;
s16_le hour;
s16_le minute;
s16_le second;
float_le garbage1;
float_le hdop;
float_le garbage2;
float_le latitude;
float_le longitude;
float_le altitude;
float_le garbage3;
float_le speed;
float_le bearing;
} GpsData;

typedef struct {
unsigned char id;
unsigned char elevation;
short azimuth;
s16_le azimuth;
unsigned char snr;
unsigned char good;
short garbage;
s16_le garbage;
} SatInfo;

typedef struct {
short satellites_in_view;
short garbage;
s16_le satellites_in_view;
s16_le garbage;
SatInfo satInfo[24];
} SatData;

Expand Down

0 comments on commit 276354b

Please sign in to comment.