 |
forums.ps2dev.org Homebrew PS2, PSP & PS3 Development Discussions
|
| View previous topic :: View next topic |
| Author |
Message |
Expanders
Joined: 21 Sep 2007 Posts: 4
|
Posted: Fri Sep 21, 2007 9:18 pm Post subject: Amigamod 1.1 |
|
|
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. |
|
| Back to top |
|
 |
Expanders
Joined: 21 Sep 2007 Posts: 4
|
Posted: Sun Sep 23, 2007 3:25 am Post subject: Resolved. |
|
|
Ok, i've solved it by myself.
Here's my patch for amigamod_rpc.c
| Code: |
--- 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);
}
|
Hope to be useful to someone,
My second question remain open: Atari's SNDH on ps2, there's any way?
Cheers. |
|
| Back to top |
|
 |
Lukasz

Joined: 19 Jan 2004 Posts: 248 Location: Denmark
|
Posted: Sun Sep 23, 2007 8:07 pm Post subject: |
|
|
I dont there is a Atari SNDH player, so you would need to code one yourself :-) _________________ Lukasz.dk |
|
| Back to top |
|
 |
J.F.
Joined: 22 Feb 2004 Posts: 2906
|
Posted: Sun Sep 23, 2007 9:11 pm Post subject: |
|
|
You could probably start with one of the players linked here: http://sndh.atari.org/
I noticed at least one *nix player. |
|
| Back to top |
|
 |
Expanders
Joined: 21 Sep 2007 Posts: 4
|
Posted: Mon Sep 24, 2007 9:17 am Post subject: |
|
|
You know what?
It's not a bad idea.
I'm asking this question to be sure i'll kickstart in the right direction: to write a sndh player i need to fully understand sndh and then use something like SjPCM to kick streams to the ps2 audio hardware, i'm right?
Thanks in adv. |
|
| Back to top |
|
 |
Lukasz

Joined: 19 Jan 2004 Posts: 248 Location: Denmark
|
Posted: Mon Sep 24, 2007 5:30 pm Post subject: |
|
|
SjPCM uses LIBSD (rom version) / freesd.irx (ps2sdk version) to play audio.
So you can either use a module such as SjPCM as a layer between your code and libsd or use libsd directly.
I think you should be fine with just SjPCM, as you wont be playing ADPCM samples. _________________ Lukasz.dk |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|