mirror of
https://github.com/RaySollium99/picodrive.git
synced 2025-09-05 07:17:45 -04:00
add big endian platform support
This commit is contained in:
parent
b053cb2044
commit
57c5a5e505
21 changed files with 224 additions and 178 deletions
|
@ -98,44 +98,7 @@ extern "C" {
|
|||
/* Data definition */
|
||||
/*******************/
|
||||
|
||||
#include <pico/pico_types.h>
|
||||
/*
|
||||
#ifdef u8
|
||||
#undef u8
|
||||
#endif
|
||||
|
||||
#ifdef s8
|
||||
#undef s8
|
||||
#endif
|
||||
|
||||
#ifdef u16
|
||||
#undef u16
|
||||
#endif
|
||||
|
||||
#ifdef s16
|
||||
#undef s16
|
||||
#endif
|
||||
|
||||
#ifdef u32
|
||||
#undef u32
|
||||
#endif
|
||||
|
||||
#ifdef s32
|
||||
#undef s32
|
||||
#endif
|
||||
|
||||
#ifdef uptr
|
||||
#undef uptr
|
||||
#endif
|
||||
|
||||
#define u8 unsigned char
|
||||
#define s8 signed char
|
||||
#define u16 unsigned short
|
||||
#define s16 signed short
|
||||
#define u32 unsigned int
|
||||
#define s32 signed int
|
||||
#define uptr uintptr_t
|
||||
*/
|
||||
#include <pico/pico_port.h>
|
||||
|
||||
/*
|
||||
typedef unsigned char u8;
|
||||
|
@ -148,10 +111,10 @@ typedef signed int s32;
|
|||
|
||||
typedef union
|
||||
{
|
||||
u8 B;
|
||||
s8 SB;
|
||||
u16 W;
|
||||
s16 SW;
|
||||
u8 B[4];
|
||||
s8 SB[4];
|
||||
u16 W[2];
|
||||
s16 SW[2];
|
||||
u32 D;
|
||||
s32 SD;
|
||||
} famec_union32;
|
||||
|
|
|
@ -183,19 +183,22 @@
|
|||
// internals core macros
|
||||
/////////////////////////
|
||||
|
||||
#define XB MEM_LE4(0)
|
||||
#define XW MEM_LE2(0)
|
||||
|
||||
#define DREG(X) (ctx->dreg[(X)].D)
|
||||
#define DREGu32(X) (ctx->dreg[(X)].D)
|
||||
#define DREGs32(X) (ctx->dreg[(X)].SD)
|
||||
#define DREGu16(X) (ctx->dreg[(X)].W)
|
||||
#define DREGs16(X) (ctx->dreg[(X)].SW)
|
||||
#define DREGu8(X) (ctx->dreg[(X)].B)
|
||||
#define DREGs8(X) (ctx->dreg[(X)].SB)
|
||||
#define DREGu16(X) (ctx->dreg[(X)].W[XW])
|
||||
#define DREGs16(X) (ctx->dreg[(X)].SW[XW])
|
||||
#define DREGu8(X) (ctx->dreg[(X)].B[XB])
|
||||
#define DREGs8(X) (ctx->dreg[(X)].SB[XB])
|
||||
|
||||
#define AREG(X) (ctx->areg[(X)].D)
|
||||
#define AREGu32(X) (ctx->areg[(X)].D)
|
||||
#define AREGs32(X) (ctx->areg[(X)].SD)
|
||||
#define AREGu16(X) (ctx->areg[(X)].W)
|
||||
#define AREGs16(X) (ctx->areg[(X)].SW)
|
||||
#define AREGu16(X) (ctx->areg[(X)].W[XW])
|
||||
#define AREGs16(X) (ctx->areg[(X)].SW[XW])
|
||||
|
||||
#define ASP (ctx->asp)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue