aboutsummaryrefslogtreecommitdiff
path: root/libpcsxcore/mdec.c
diff options
context:
space:
mode:
authornotaz2015-02-05 02:36:58 +0200
committernotaz2015-02-05 02:36:58 +0200
commitfc4803bdc2c9840a007c60e422fb0531107b80f2 (patch)
tree5d7ffe5024e7db6bf63f455586521cbcc26e8422 /libpcsxcore/mdec.c
parent58ebb94c13df061762a7aca78e52f066339d9610 (diff)
downloadpcsx_rearmed-fc4803bdc2c9840a007c60e422fb0531107b80f2.tar.gz
pcsx_rearmed-fc4803bdc2c9840a007c60e422fb0531107b80f2.tar.bz2
pcsx_rearmed-fc4803bdc2c9840a007c60e422fb0531107b80f2.zip
dma: some timing hacks
untested
Diffstat (limited to 'libpcsxcore/mdec.c')
-rw-r--r--libpcsxcore/mdec.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/libpcsxcore/mdec.c b/libpcsxcore/mdec.c
index bed4e53..d6c7ab6 100644
--- a/libpcsxcore/mdec.c
+++ b/libpcsxcore/mdec.c
@@ -32,7 +32,7 @@
* 320x240x16@60Hz => 9.216 MB/s
* so 2.0 to 4.0 should be fine.
*/
-#define MDEC_BIAS 2.0f
+#define MDEC_BIAS 2
#define DSIZE 8
#define DSIZE2 (DSIZE * DSIZE)
@@ -545,15 +545,13 @@ void psxDma1(u32 adr, u32 bcr, u32 chcr) {
int blk[DSIZE2 * 6];
u8 * image;
int size;
- int dmacnt;
+ u32 words;
if (chcr != 0x01000200) return;
- size = (bcr >> 16) * (bcr & 0xffff);
+ words = (bcr >> 16) * (bcr & 0xffff);
/* size in byte */
- size *= 4;
- /* I guess the memory speed is limitating */
- dmacnt = size;
+ size = words * 4;
if (!(mdec.reg1 & MDEC1_BUSY)) {
/* add to pending */
@@ -625,7 +623,7 @@ void psxDma1(u32 adr, u32 bcr, u32 chcr) {
}
/* define the power of mdec */
- MDECOUTDMA_INT((int) ((dmacnt* MDEC_BIAS)));
+ MDECOUTDMA_INT(words * MDEC_BIAS);
}
}