diff options
author | notaz | 2011-01-23 21:29:29 +0200 |
---|---|---|
committer | notaz | 2011-01-24 00:38:48 +0200 |
commit | 0d16cda294b8f4655dda849a526b336a5b46aa16 (patch) | |
tree | 722d7ff7663e71badbbc4bf3273180bcc83413de /plugins/dfxvideo | |
parent | 7c0f51de89955f60f5c7304ab8c4a8f8e9b7f185 (diff) | |
download | pcsx_rearmed-0d16cda294b8f4655dda849a526b336a5b46aa16.tar.gz pcsx_rearmed-0d16cda294b8f4655dda849a526b336a5b46aa16.tar.bz2 pcsx_rearmed-0d16cda294b8f4655dda849a526b336a5b46aa16.zip |
fix some alignment issues
Diffstat (limited to 'plugins/dfxvideo')
-rw-r--r-- | plugins/dfxvideo/gpu.c | 6 | ||||
-rw-r--r-- | plugins/dfxvideo/gpu.h | 11 |
2 files changed, 12 insertions, 5 deletions
diff --git a/plugins/dfxvideo/gpu.c b/plugins/dfxvideo/gpu.c index 200913c..7372ba4 100644 --- a/plugins/dfxvideo/gpu.c +++ b/plugins/dfxvideo/gpu.c @@ -946,14 +946,14 @@ ENDVRAM: { gpuDataC = primTableCX[command]; gpuCommand = command; - PUTLE32(&gpuDataM[0], gdata); + PUTLE32_(&gpuDataM[0], gdata); gpuDataP = 1; } else continue; } else { - PUTLE32(&gpuDataM[gpuDataP], gdata); + PUTLE32_(&gpuDataM[gpuDataP], gdata); if(gpuDataC>128) { if((gpuDataC==254 && gpuDataP>=3) || @@ -986,7 +986,7 @@ ENDVRAM: void CALLBACK GPUwriteData(uint32_t gdata) { - PUTLE32(&gdata, gdata); + PUTLE32_(&gdata, gdata); GPUwriteDataMem(&gdata,1); } diff --git a/plugins/dfxvideo/gpu.h b/plugins/dfxvideo/gpu.h index 740add5..b7b171e 100644 --- a/plugins/dfxvideo/gpu.h +++ b/plugins/dfxvideo/gpu.h @@ -104,10 +104,17 @@ #define GETLEs32(X) ((int16_t)GETLE32((uint16_t *)X)) #define GETLE16(X) LE2HOST16(*(uint16_t *)X) -#define GETLE32(X) LE2HOST32(*(uint32_t *)X) +#define GETLE32_(X) LE2HOST32(*(uint32_t *)X) #define GETLE16D(X) ({uint32_t val = GETLE32(X); (val<<16 | val >> 16);}) #define PUTLE16(X, Y) do{*((uint16_t *)X)=HOST2LE16((uint16_t)Y);}while(0) -#define PUTLE32(X, Y) do{*((uint32_t *)X)=HOST2LE16((uint32_t)Y);}while(0) +#define PUTLE32_(X, Y) do{*((uint32_t *)X)=HOST2LE16((uint32_t)Y);}while(0) +#ifdef __arm__ +#define GETLE32(X) (*(uint16_t *)X|(((uint16_t *)X)[1]<<16)) +#define PUTLE32(X, Y) do{*((uint16_t *)X)=(uint32_t)Y;((uint16_t *)X)[1]=(uint32_t)(Y)>>16;}while(0) +#else +#define GETLE32 GETLE32_ +#define PUTLE32 PUTLE32_ +#endif ///////////////////////////////////////////////////////////////////////////// |