Hi guys,
does anyone still have a copy of amigamod v1.1? because the only link i can find kick me to a dead thethirdcreation.
If you don't have a copy can you give me some tips to compile old version with the new ps2sdk?
Thanks in advance.
Oh, just another question, is there any way to play atari SNDHs on PS2?
Cheers.
Amigamod 1.1
Resolved.
Ok, i've solved it by myself.
Here's my patch for amigamod_rpc.c
Hope to be useful to someone,
My second question remain open: Atari's SNDH on ps2, there's any way?
Cheers.
Here's my patch for amigamod_rpc.c
Code: Select all
--- amigamod_rpc.c 2002-06-09 05:13:28.000000000 +0200
+++ amigamod_rpc.c 2007-09-22 19:19:02.750000000 +0200
@@ -1,13 +1,14 @@
-// amigamod_rpc.cpp
+// amigamod_rpc.c Updated 2007 September 22
-#include "tamtypes.h"
-#include "kernel.h"
+#include <tamtypes.h>
+#include <kernel.h>
+#include <string.h>
#include "amigamod.h"
-#include "sifcmd.h"
-#include "sifrpc.h"
-#include "iopheap.h"
+#include <sifcmd.h>
+#include <sifrpc.h>
+#include <iopheap.h>
-static struct t_rpc_client_data amodCd __attribute__((aligned(64)));
+static SifRpcClientData_t amodCd __attribute__((aligned(64)));
static unsigned sbuff[64] __attribute__((aligned (64)));
static int ammodi = 0;
@@ -19,14 +20,14 @@
if (ammodi)
return 0;
- if (sif_bind_rpc( &amodCd, VZMOD, 0) < 0)
+ if (SifBindRpc( &amodCd, VZMOD, 0) < 0)
return -1;
if (!nosdinit)
{
char hi[16] = "amigaModInit !";
memcpy((char *)sbuff, hi, 16);
- sif_call_rpc( &amodCd, MOD_INIT, 0, (void *)(&sbuff[0]), 16, (void *)(&sbuff[0]), 64, 0, 0);
+ SifCallRpc( &amodCd, MOD_INIT, 0, (void *)(&sbuff[0]), 16, (void *)(&sbuff[0]), 64, 0, 0);
}
ammodi = 1;
@@ -38,25 +39,25 @@
int amigaModLoad( void *moddata, int size )
{
int i, x, y;
- struct t_sif_dma_transfer sdt;
+ SifDmaTransfer_t sdt;
- if (_SifInitIopHeap() != 0)
+ if (SifInitIopHeap() != 0)
return -1;
if (iopmodimg)
- _SifFreeIopHeap(iopmodimg);
- iopmodimg = _SifAllocIopHeap(size);
+ SifFreeIopHeap(iopmodimg);
+ iopmodimg = SifAllocIopHeap(size);
// transfer the moddata via dma into spu RAM
sdt.src = (void*)moddata;
sdt.dest = iopmodimg;
sdt.size = size;
sdt.attr = 0;
- i = k_sceSifSetDma(&sdt, 1);
- while (k_sceSifDmaStat(i) >= 0); // potential for infinite loop ...
+ i = SifSetDma(&sdt, 1);
+ while (SifDmaStat(i) >= 0); // potential for infinite loop ...
sbuff[0] = (int)iopmodimg;
- sif_call_rpc( &amodCd, MOD_LOAD, 0, (void *)(&sbuff[0]), 4, (void *)(&sbuff[0]), 64, 0, 0);
+ SifCallRpc( &amodCd, MOD_LOAD, 0, (void *)(&sbuff[0]), 4, (void *)(&sbuff[0]), 64, 0, 0);
return sbuff[0];
}
@@ -65,7 +66,7 @@
int amigaModPlay(unsigned linear)
{
sbuff[0] = linear;
- sif_call_rpc( &amodCd, MOD_PLAY, 0, (void *)(&sbuff[0]), 4, (void *)(&sbuff[0]), 16, 0, 0);
+ SifCallRpc( &amodCd, MOD_PLAY, 0, (void *)(&sbuff[0]), 4, (void *)(&sbuff[0]), 16, 0, 0);
return sbuff[0];
//return 0;
}
@@ -74,7 +75,7 @@
// won't pause right away; best to wait one VSync after this is called, before another amigaMod* call
int amigaModPause()
{
- sif_call_rpc( &amodCd, MOD_PAUSE, 1, (void *)(&sbuff[0]), 4, (void *)(&sbuff[0]), 0, 0, 0);
+ SifCallRpc( &amodCd, MOD_PAUSE, 1, (void *)(&sbuff[0]), 4, (void *)(&sbuff[0]), 0, 0, 0);
//return sbuff[0];
return 0;
}
@@ -83,14 +84,14 @@
int amigaModSetVolume( unsigned short volume)
{
sbuff[0] = volume & 0x3fff;
- sif_call_rpc( &amodCd, MOD_SETVOL, 0, (void *)(&sbuff[0]), 4, (void *)(&sbuff[0]), 0, 0, 0);
+ SifCallRpc( &amodCd, MOD_SETVOL, 0, (void *)(&sbuff[0]), 4, (void *)(&sbuff[0]), 0, 0, 0);
return 0;
}
int amigaModGetInfo( ModInfoStruct *info)
{
- sif_call_rpc( &amodCd, MOD_GETINFO, 0, (void *)(&sbuff[0]), 4, (void *)(&sbuff[0]), 64, 0, 0);
+ SifCallRpc( &amodCd, MOD_GETINFO, 0, (void *)(&sbuff[0]), 4, (void *)(&sbuff[0]), 64, 0, 0);
info->curorder = sbuff[1];
info->currow = sbuff[2];
info->numchannels = sbuff[3];
@@ -102,7 +103,7 @@
int amigaModQuit()
{
- sif_call_rpc( &amodCd, MOD_QUIT, 1, (void *)(&sbuff[0]), 4, (void *)(&sbuff[0]), 0, 0, 0);
+ SifCallRpc( &amodCd, MOD_QUIT, 1, (void *)(&sbuff[0]), 4, (void *)(&sbuff[0]), 0, 0, 0);
return 0;
}
@@ -110,7 +111,7 @@
void ModPuts(char *s)
{
memcpy((char *)sbuff, s, 252);
- sif_call_rpc( &amodCd, MOD_PUTS, 1, (void *)(&sbuff[0]), 252, (void *)(&sbuff[0]), 0, 0, 0);
+ SifCallRpc( &amodCd, MOD_PUTS, 1, (void *)(&sbuff[0]), 252, (void *)(&sbuff[0]), 0, 0, 0);
}
My second question remain open: Atari's SNDH on ps2, there's any way?
Cheers.
You could probably start with one of the players linked here: http://sndh.atari.org/
I noticed at least one *nix player.
I noticed at least one *nix player.