notaz.gp2x.de
/
pcsx_rearmed.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
92a5fe8
)
gpu_unai: fix some 64bit issues
author
notaz
<notasas@gmail.com>
Tue, 3 Feb 2015 22:31:01 +0000
(
00:31
+0200)
committer
notaz
<notasas@gmail.com>
Tue, 3 Feb 2015 22:31:01 +0000
(
00:31
+0200)
plugins/gpu_unai/gpu.cpp
patch
|
blob
|
blame
|
history
plugins/gpu_unai/gpu_command.h
patch
|
blob
|
blame
|
history
plugins/gpu_unai/gpu_raster_line.h
patch
|
blob
|
blame
|
history
plugins/gpu_unai/gpulib_if.cpp
patch
|
blob
|
blame
|
history
diff --git
a/plugins/gpu_unai/gpu.cpp
b/plugins/gpu_unai/gpu.cpp
index
d509617
..
1552bed
100644
(file)
--- a/
plugins/gpu_unai/gpu.cpp
+++ b/
plugins/gpu_unai/gpu.cpp
@@
-432,7
+432,7
@@
void GPU_readDataMem(u32* dmaAddress, s32 dmaCount)
{
if ((&pvram[px])>(VIDEO_END)) pvram-=512*1024;
// lower 16 bit
{
if ((&pvram[px])>(VIDEO_END)) pvram-=512*1024;
// lower 16 bit
- u32 data =
(unsigned long)
pvram[px];
+ u32 data = pvram[px];
if (++px>=x_end)
{
if (++px>=x_end)
{
@@
-442,7
+442,7
@@
void GPU_readDataMem(u32* dmaAddress, s32 dmaCount)
if ((&pvram[px])>(VIDEO_END)) pvram-=512*1024;
// higher 16 bit (always, even if it's an odd width)
if ((&pvram[px])>(VIDEO_END)) pvram-=512*1024;
// higher 16 bit (always, even if it's an odd width)
- data |= (u
nsigned long
)(pvram[px])<<16;
+ data |= (u
32
)(pvram[px])<<16;
*dmaAddress++ = data;
*dmaAddress++ = data;
diff --git
a/plugins/gpu_unai/gpu_command.h
b/plugins/gpu_unai/gpu_command.h
index
049b146
..
d6e7a74
100644
(file)
--- a/
plugins/gpu_unai/gpu_command.h
+++ b/
plugins/gpu_unai/gpu_command.h
@@
-21,9
+21,9
@@
///////////////////////////////////////////////////////////////////////////////
INLINE void gpuSetTexture(u16 tpage)
{
///////////////////////////////////////////////////////////////////////////////
INLINE void gpuSetTexture(u16 tpage)
{
-
long
tp;
-
long
tx, ty;
- GPU_GP1 = (GPU_GP1 & ~0x
7FF) | (tpage & 0x7
FF);
+
u32
tp;
+
u32
tx, ty;
+ GPU_GP1 = (GPU_GP1 & ~0x
1FF) | (tpage & 0x1
FF);
TextureWindow[0]&= ~TextureWindow[2];
TextureWindow[1]&= ~TextureWindow[3];
TextureWindow[0]&= ~TextureWindow[2];
TextureWindow[1]&= ~TextureWindow[3];
@@
-31,6
+31,7
@@
INLINE void gpuSetTexture(u16 tpage)
tp = (tpage >> 7) & 3;
tx = (tpage & 0x0F) << 6;
ty = (tpage & 0x10) << 4;
tp = (tpage >> 7) & 3;
tx = (tpage & 0x0F) << 6;
ty = (tpage & 0x10) << 4;
+ if (tp == 3) tp = 2;
tx += (TextureWindow[0] >> (2 - tp));
ty += TextureWindow[1];
tx += (TextureWindow[0] >> (2 - tp));
ty += TextureWindow[1];
@@
-437,8
+438,8
@@
void gpuSendPacketFunction(const int PRIM)
case 0xE5:
{
const u32 temp = PacketBuffer.U4[0];
case 0xE5:
{
const u32 temp = PacketBuffer.U4[0];
- DrawingOffset[0] = ((
long
)temp<<(32-11))>>(32-11);
- DrawingOffset[1] = ((
long
)temp<<(32-22))>>(32-11);
+ DrawingOffset[0] = ((
s32
)temp<<(32-11))>>(32-11);
+ DrawingOffset[1] = ((
s32
)temp<<(32-22))>>(32-11);
//isSkip = false;
DO_LOG(("DrawingOffset(0x%x)\n",PRIM));
}
//isSkip = false;
DO_LOG(("DrawingOffset(0x%x)\n",PRIM));
}
diff --git
a/plugins/gpu_unai/gpu_raster_line.h
b/plugins/gpu_unai/gpu_raster_line.h
index
4edfa06
..
fc59b79
100644
(file)
--- a/
plugins/gpu_unai/gpu_raster_line.h
+++ b/
plugins/gpu_unai/gpu_raster_line.h
@@
-26,7
+26,7
@@
#define GPU_DIGITS 16
#define GPU_DIGITSC (GPU_DIGITS+3)
#define GPU_DIGITS 16
#define GPU_DIGITSC (GPU_DIGITS+3)
-INLINE
long GPU_DIV(long rs, long
rt)
+INLINE
s32 GPU_DIV(s32 rs, s32
rt)
{
return rt ? (rs / rt) : (0);
}
{
return rt ? (rs / rt) : (0);
}
diff --git
a/plugins/gpu_unai/gpulib_if.cpp
b/plugins/gpu_unai/gpulib_if.cpp
index
0d506bc
..
646b0f2
100644
(file)
--- a/
plugins/gpu_unai/gpulib_if.cpp
+++ b/
plugins/gpu_unai/gpulib_if.cpp
@@
-490,8
+490,8
@@
int do_cmd_list(unsigned int *list, int list_len, int *last_cmd)
}
case 0xE5: {
const u32 temp = PacketBuffer.U4[0];
}
case 0xE5: {
const u32 temp = PacketBuffer.U4[0];
- DrawingOffset[0] = ((
long
)temp<<(32-11))>>(32-11);
- DrawingOffset[1] = ((
long
)temp<<(32-22))>>(32-11);
+ DrawingOffset[0] = ((
s32
)temp<<(32-11))>>(32-11);
+ DrawingOffset[1] = ((
s32
)temp<<(32-22))>>(32-11);
gpu.ex_regs[5] = temp;
break;
}
gpu.ex_regs[5] = temp;
break;
}