Skip to content

Commit

Permalink
Hex for all ALIGNED macros
Browse files Browse the repository at this point in the history
  • Loading branch information
hensldm committed Aug 19, 2024
1 parent 5cd125c commit 6b4ee64
Show file tree
Hide file tree
Showing 30 changed files with 56 additions and 56 deletions.
4 changes: 2 additions & 2 deletions src/debug/profile.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@
OSTimer __osProfTimer;
OSMesg __osProfTimerMsg;

OSMesgQueue __osProfFlushMQ ALIGNED(8);
OSMesgQueue __osProfFlushMQ ALIGNED(0x8);
OSMesg __osProfFlushMesg;

OSMesgQueue __osProfAckMQ ALIGNED(8);
OSMesgQueue __osProfAckMQ ALIGNED(0x8);
OSMesg __osProfAckMesg;

u32 __osProfTimerPeriod;
Expand Down
2 changes: 1 addition & 1 deletion src/error/commonerror.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

void __osSyncVPrintf(const char* fmt, va_list args);

static u32 errorLogData[19] ALIGNED(8);
static u32 errorLogData[19] ALIGNED(0x8);
static OSLog errorLog = {
OS_ERROR_MAGIC, // magic
sizeof(errorLogData), // len
Expand Down
4 changes: 2 additions & 2 deletions src/error/error.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
void __osLogWrite(OSLog* log, s16 code, s16 numArgs, va_list argPtr);
static void __osDefaultHandler(s16 code, s16 numArgs, ...);

static u32 errorLogData[19] ALIGNED(8);
static OSLog errorLog ALIGNED(8) = {
static u32 errorLogData[19] ALIGNED(0x8);
static OSLog errorLog ALIGNED(0x8) = {
OS_ERROR_MAGIC, // magic
sizeof(errorLogData), // len
errorLogData, // base
Expand Down
8 changes: 4 additions & 4 deletions src/flash/flashinit.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
#include "PR/os_internal_flash.h"
#include "PRinternal/macros.h"

u32 __osFlashID[4] ALIGNED(8);
OSIoMesg __osFlashMsg ALIGNED(8);
OSMesgQueue __osFlashMessageQ ALIGNED(8);
OSPiHandle __osFlashHandler ALIGNED(8);
u32 __osFlashID[4] ALIGNED(0x8);
OSIoMesg __osFlashMsg ALIGNED(0x8);
OSMesgQueue __osFlashMessageQ ALIGNED(0x8);
OSPiHandle __osFlashHandler ALIGNED(0x8);
OSMesg __osFlashMsgBuf[1];
s32 __osFlashVersion;

Expand Down
2 changes: 1 addition & 1 deletion src/gt/dumpturbo.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@


#define TX_MAX 100
static u32 textures[TX_MAX] ALIGNED(8);
static u32 textures[TX_MAX] ALIGNED(0x8);
static u32 numtextures;

#define UNSEG_ADDR(sa) ((u32 *) (((globp)? \
Expand Down
2 changes: 1 addition & 1 deletion src/gu/loadtextureblockmipmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ struct Tile
};

/* tram mipmaps */
static struct Tile mipmap[MM_MAX_LEVEL+1] ALIGNED(8);
static struct Tile mipmap[MM_MAX_LEVEL+1] ALIGNED(0x8);
static struct texelSizeParams sizeParams[4] =
{ 16, 3, 1, 0,
8, 2, 2, 1,
Expand Down
2 changes: 1 addition & 1 deletion src/host/host_ptn64.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ static volatile unsigned int* ptstat = (unsigned*)0xbff08004;
static volatile unsigned int* ptport = (unsigned*)0xbff08000;
static volatile unsigned int* n64piok = (unsigned*)PHYS_TO_K1(PI_STATUS_REG);

static OSMesgQueue waitPtQueue ALIGNED(8);
static OSMesgQueue waitPtQueue ALIGNED(0x8);
static OSMesg waitPtQueueBuf;
static u32 isWaitPtQueueCreated = FALSE;

Expand Down
2 changes: 1 addition & 1 deletion src/host/readhost.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#include "PRinternal/macros.h"

static int readHostInitialized = FALSE;
static OSMesgQueue readHostMesgQueue ALIGNED(8);
static OSMesgQueue readHostMesgQueue ALIGNED(0x8);
static OSMesg readHostMesgBuf[1];

u32 __osRdb_Read_Data_Buf;
Expand Down
2 changes: 1 addition & 1 deletion src/host/writehost.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#include "PRinternal/macros.h"

static int writeHostInitialized = FALSE;
static OSMesgQueue writeHostMesgQueue ALIGNED(8);
static OSMesgQueue writeHostMesgQueue ALIGNED(0x8);
static OSMesg writeHostMesgBuf[1];

#define MIN(a, b) (((a) < (b)) ? (a) : (b))
Expand Down
4 changes: 2 additions & 2 deletions src/io/cartrominit.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#include "PRinternal/piint.h"

#if BUILD_VERSION >= VERSION_J
OSPiHandle __CartRomHandle ALIGNED(8);
OSPiHandle __CartRomHandle ALIGNED(0x8);
OSPiHandle* osCartRomInit(void) {
u32 value = 0;
u32 saveMask;
Expand Down Expand Up @@ -65,7 +65,7 @@ OSPiHandle* osCartRomInit(void) {
}
#else

OSPiHandle CartRomHandle ALIGNED(8);
OSPiHandle CartRomHandle ALIGNED(0x8);
OSPiHandle* osCartRomInit(void) {
u32 domain = 0;
u32 saveMask;
Expand Down
2 changes: 1 addition & 1 deletion src/io/contpfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#include "PR/rmon.h"

#if BUILD_VERSION >= VERSION_J
__OSInode __osPfsInodeCache ALIGNED(8);
__OSInode __osPfsInodeCache ALIGNED(0x8);
s32 __osPfsInodeCacheChannel = -1;
u8 __osPfsInodeCacheBank = 250;
#endif
Expand Down
2 changes: 1 addition & 1 deletion src/io/controller.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ u8 __osContLastCmd;
u8 __osMaxControllers;

OSTimer __osEepromTimer;
OSMesgQueue __osEepromTimerQ ALIGNED(8);
OSMesgQueue __osEepromTimerQ ALIGNED(0x8);
OSMesg __osEepromTimerMsg;

s32 __osContinitialized = FALSE;
Expand Down
2 changes: 1 addition & 1 deletion src/io/driverominit.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#include "PR/rcp.h"
#include "PRinternal/macros.h"

OSPiHandle DriveRomHandle ALIGNED(8);
OSPiHandle DriveRomHandle ALIGNED(0x8);

OSPiHandle *osDriveRomInit(void) {
u32 saveMask;
Expand Down
2 changes: 1 addition & 1 deletion src/io/gbpakinit.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#include "PRinternal/controller_gbpak.h"

OSTimer __osGbpakTimer;
OSMesgQueue __osGbpakTimerQ ALIGNED(8);
OSMesgQueue __osGbpakTimerQ ALIGNED(0x8);
OSMesg __osGbpakTimerMsg;

s32 osGbpakInit(OSMesgQueue* mq, OSPfs* pfs, int channel) {
Expand Down
2 changes: 1 addition & 1 deletion src/io/leodiskinit.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#include "PR/rcp.h"
#include "PRinternal/macros.h"

OSPiHandle LeoDiskHandle ALIGNED(8);
OSPiHandle LeoDiskHandle ALIGNED(0x8);
OSPiHandle *__osDiskHandle;

OSPiHandle *osLeoDiskInit(void) {
Expand Down
8 changes: 4 additions & 4 deletions src/io/motor.c
Original file line number Diff line number Diff line change
Expand Up @@ -134,10 +134,10 @@ s32 osMotorInit(OSMesgQueue* mq, OSPfs* pfs, int channel) {

#else

OSPifRam _MotorStopData[MAXCONTROLLERS] ALIGNED(8);
OSPifRam _MotorStartData[MAXCONTROLLERS] ALIGNED(8);
u8 _motorstopbuf[32] ALIGNED(8);
u8 _motorstartbuf[32] ALIGNED(8);
OSPifRam _MotorStopData[MAXCONTROLLERS] ALIGNED(0x8);
OSPifRam _MotorStartData[MAXCONTROLLERS] ALIGNED(0x8);
u8 _motorstopbuf[32] ALIGNED(0x8);
u8 _motorstartbuf[32] ALIGNED(0x8);
u32 __osMotorinitialized[MAXCONTROLLERS] = {0, 0, 0, 0};

s32 osMotorStop(OSPfs *pfs) {
Expand Down
2 changes: 1 addition & 1 deletion src/io/piacs.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#define PI_Q_BUF_LEN 1
u32 __osPiAccessQueueEnabled = 0;
static OSMesg piAccessBuf[PI_Q_BUF_LEN];
OSMesgQueue __osPiAccessQueue ALIGNED(8);
OSMesgQueue __osPiAccessQueue ALIGNED(0x8);

void __osPiCreateAccessQueue(void) {
__osPiAccessQueueEnabled = 1;
Expand Down
18 changes: 9 additions & 9 deletions src/io/pimgr.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,32 +4,32 @@
#include "PRinternal/piint.h"
#include "PR/rdb.h"

static OSThread piThread ALIGNED(8);
static OSThread piThread ALIGNED(0x8);
static STACK(piThreadStack, OS_PIM_STACKSIZE) ALIGNED(0x10);

#ifndef _FINALROM
static OSThread ramromThread ALIGNED(8);
static OSThread ramromThread ALIGNED(0x8);
static STACK(ramromThreadStack, 0x400) ALIGNED(0x10);
static OSMesgQueue getRamromQ ALIGNED(8);
static OSMesgQueue getRamromQ ALIGNED(0x8);
static OSMesg getRamromBuf[1];
static OSMesgQueue freeRamromQ ALIGNED(8);
static OSMesgQueue freeRamromQ ALIGNED(0x8);
static OSMesg freeRamromBuf[1];
static void ramromMain(void*);
#endif

static OSMesgQueue piEventQueue ALIGNED(8);
static OSMesgQueue piEventQueue ALIGNED(0x8);
static OSMesg piEventBuf[1];

OSDevMgr __osPiDevMgr = { 0 };
OSPiHandle* __osPiTable = NULL;
#if BUILD_VERSION >= VERSION_J
OSPiHandle __Dom1SpeedParam ALIGNED(8);
OSPiHandle __Dom2SpeedParam ALIGNED(8);
OSPiHandle* __osCurrentHandle[2] ALIGNED(8) = { &__Dom1SpeedParam, &__Dom2SpeedParam };
OSPiHandle __Dom1SpeedParam ALIGNED(0x8);
OSPiHandle __Dom2SpeedParam ALIGNED(0x8);
OSPiHandle* __osCurrentHandle[2] ALIGNED(0x8) = { &__Dom1SpeedParam, &__Dom2SpeedParam };
#else
extern OSPiHandle CartRomHandle;
extern OSPiHandle LeoDiskHandle;
OSPiHandle* __osCurrentHandle[2] ALIGNED(8) = { &CartRomHandle, &LeoDiskHandle };
OSPiHandle* __osCurrentHandle[2] ALIGNED(0x8) = { &CartRomHandle, &LeoDiskHandle };
#endif

void osCreatePiManager(OSPri pri, OSMesgQueue* cmdQ, OSMesg* cmdBuf, s32 cmdMsgCnt) {
Expand Down
4 changes: 2 additions & 2 deletions src/io/siacs.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
#include "PR/os_internal.h"

#define SI_Q_BUF_LEN 1
static OSMesg siAccessBuf[SI_Q_BUF_LEN] ALIGNED(8);
OSMesgQueue __osSiAccessQueue ALIGNED(8);
static OSMesg siAccessBuf[SI_Q_BUF_LEN] ALIGNED(0x8);
OSMesgQueue __osSiAccessQueue ALIGNED(0x8);
u32 __osSiAccessQueueEnabled = 0;

void __osSiCreateAccessQueue(void) {
Expand Down
2 changes: 1 addition & 1 deletion src/io/vi.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
// TODO: this comes from a header
#ident "$Revision: 1.17 $"

static __OSViContext vi[2] ALIGNED(8) = { 0 };
static __OSViContext vi[2] ALIGNED(0x8) = { 0 };
__OSViContext* __osViCurr = &vi[0];
__OSViContext* __osViNext = &vi[1];

Expand Down
8 changes: 4 additions & 4 deletions src/io/vimgr.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ u32 __additional_scanline = 0;
#endif
static OSThread viThread;
static STACK(viThreadStack, OS_VIM_STACKSIZE) ALIGNED(0x10);
static OSMesgQueue viEventQueue ALIGNED(8);
static OSMesg viEventBuf[5] ALIGNED(8);
static OSIoMesg viRetraceMsg ALIGNED(8);
static OSIoMesg viCounterMsg ALIGNED(8);
static OSMesgQueue viEventQueue ALIGNED(0x8);
static OSMesg viEventBuf[5] ALIGNED(0x8);
static OSIoMesg viRetraceMsg ALIGNED(0x8);
static OSIoMesg viCounterMsg ALIGNED(0x8);

static void viMgrMain(void* arg);
void osCreateViManager(OSPri pri) {
Expand Down
2 changes: 1 addition & 1 deletion src/log/log.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
static u32 __osLogOKtoWrite = TRUE;
static u32 __osLogInitialized = FALSE;

static OSMesgQueue __osLogDoneMsgQ ALIGNED(8);
static OSMesgQueue __osLogDoneMsgQ ALIGNED(0x8);
static OSMesg __osLogMsgBuf;

void __osLogWrite(OSLog* log, s16 code, s16 numArgs, va_list argPtr);
Expand Down
2 changes: 1 addition & 1 deletion src/os/initialize_isv.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ void MonitorInitBreak(void);

#define IS64_MAGIC 'IS64'

__osExceptionVector ramOldVector ALIGNED(8);
__osExceptionVector ramOldVector ALIGNED(0x8);
u32 gISVFlag;
u16 gISVChk;
u32 gISVDbgPrnAdrs;
Expand Down
2 changes: 1 addition & 1 deletion src/os/seteventmesg.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#include "PR/ultraerror.h"
#include "PRinternal/osint.h"

__OSEventState __osEventStateTab[OS_NUM_EVENTS] ALIGNED(8);
__OSEventState __osEventStateTab[OS_NUM_EVENTS] ALIGNED(0x8);
#if BUILD_VERSION >= VERSION_J
u32 __osPreNMI = FALSE;
#endif
Expand Down
2 changes: 1 addition & 1 deletion src/os/timerintr.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ OSTimer __osBaseTimer;
OSTimer* __osTimerList = &__osBaseTimer;

#ifndef _FINALROM
OSMesgQueue __osProfTimerQ ALIGNED(8);
OSMesgQueue __osProfTimerQ ALIGNED(0x8);
OSProf* __osProfileList;
OSProf* __osProfileListEnd;
u32 __osProfileOverflowBin;
Expand Down
4 changes: 2 additions & 2 deletions src/rmon/rmonbrk.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@ typedef struct {
} BREAKINFO;

/* first breakpoint is reserved for implementing single-stepping */
static BREAKINFO breakpoints[NUM_BREAKPOINTS] ALIGNED(8);
static BREAKINFO breakpoints[NUM_BREAKPOINTS] ALIGNED(0x8);
/* breakpoint for alternate branch target */
static BREAKINFO altBreak;

static BREAKINFO RCPbreakpoints[NUM_BREAKPOINTS] ALIGNED(8);
static BREAKINFO RCPbreakpoints[NUM_BREAKPOINTS] ALIGNED(0x8);

u8 __rmonRcpAtBreak;

Expand Down
2 changes: 1 addition & 1 deletion src/rmon/rmonmem.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
#ident "$Revision: 1.4 $"
#endif

u8 __rmonUtilityBuffer[256] ALIGNED(8);
u8 __rmonUtilityBuffer[256] ALIGNED(0x8);

void __rmonWriteWordTo(u32* addr, u32 val) {
while (__osSpRawWriteIo((u32)addr, val) != 0) {
Expand Down
10 changes: 5 additions & 5 deletions src/rmon/rmonmisc.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,12 @@ int __rmonSetFault(KKHeader* req) {
return TV_ERROR_NO_ERROR;
}

OSMesgQueue __rmonMQ ALIGNED(8);
static OSThread rmonIOThread ALIGNED(8);
static OSMesg rmonMsgs[8] ALIGNED(8);
OSMesgQueue __rmonMQ ALIGNED(0x8);
static OSThread rmonIOThread ALIGNED(0x8);
static OSMesg rmonMsgs[8] ALIGNED(0x8);
static STACK(rmonIOStack, 0x4000) ALIGNED(0x10);
static OSMesg rmonPiMsgs[8] ALIGNED(8);
static OSMesgQueue rmonPiMQ ALIGNED(8);
static OSMesg rmonPiMsgs[8] ALIGNED(0x8);
static OSMesgQueue rmonPiMQ ALIGNED(0x8);

void __rmonInit(void) {
osCreateMesgQueue(&__rmonMQ, rmonMsgs, ARRLEN(rmonMsgs));
Expand Down
2 changes: 1 addition & 1 deletion src/rmon/rmonregs.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@

static u32 RCPpc;
static u32 oldIMEMvalue;
static u32 DMEMbuffer[4] ALIGNED(8);
static u32 DMEMbuffer[4] ALIGNED(0x8);

typedef union {
u32 everything;
Expand Down
2 changes: 1 addition & 1 deletion src/rmon/rmonsio.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
#ident "$Revision: 1.4 $"
#endif

static OSMesgQueue IOmq ALIGNED(8);
static OSMesgQueue IOmq ALIGNED(0x8);
static OSMesg IOmsgs;

void* __osRdb_DbgRead_Buf;
Expand Down

0 comments on commit 6b4ee64

Please sign in to comment.