Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 9 additions & 8 deletions iop/sound/libsd/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,21 @@
# ____| | ____| | | |____|
# | ___| |____ ___| ____| | \ PS2DEV Open Source Project.
#-----------------------------------------------------------------------
# Copyright 2001-2004, ps2dev - http://www.ps2dev.org
# Copyright ps2dev - http://www.ps2dev.org
# Licenced under Academic Free License version 2.0
# Review ps2sdk README & LICENSE files for further details.

IOP_BIN_ALTNAMES = freesd.irx

IOP_IMPORT_INCS += \
system/intrman \
system/loadcore \
system/sifman \
system/stdio \
system/sysclib
IOP_INCS += \
-I$(PS2SDKSRC)/iop/system/intrman/include \
-I$(PS2SDKSRC)/iop/system/loadcore/include \
-I$(PS2SDKSRC)/iop/system/sifman/include \
-I$(PS2SDKSRC)/iop/system/stdio/include \
-I$(PS2SDKSRC)/iop/system/sysclib/include \
-I$(PS2SDKSRC)/iop/system/threadman/include

IOP_OBJS = exports.o freesd.o batch.o block.o effect.o voice.o imports.o
IOP_OBJS = libsd.o imports.o exports.o

include $(PS2SDKSRC)/Defs.make
include $(PS2SDKSRC)/iop/Rules.bin.make
Expand Down
24 changes: 24 additions & 0 deletions iop/sound/libsd/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Sound Device Library

This module is an abstraction layer for the SPU2 interface used for audio mixing and analog and digital audio output.

## Configurations

There are multiple configurations of this library, allowing the choice of
balancing between size, speed, and features.

* `libsd` -> The recommended version.

## How to use this module in your program

In order to use this module in your program, use `LoadModule` or \
`LoadModuleBuffer` with no arguments.

## Credits

Original FREESD 1.0 developer: TyRaNiD <mailto:tiraniddo@hotmail.com>\
Original FREESD 1.0 developer: Lukasz Bruun <mailto:ps2@lukasz.dk>\
Neill Corlett <mailto:neill@neillcorlett.com> for very valuable information on sound registers.\
\[RO]man <mailto:roman_ps2dev@hotmail.com> for register information.\
adresd <mailto:adresd_ps2dev@yahoo.com>, Nicholas Van Veen <mailto:nickvv@xtra.co.nz>, Vzzrzzn,
MrHTFord <mailto:mrhtford_ps2dev@hotmail.com> for their work with libsd and thereby providing test data.
64 changes: 35 additions & 29 deletions iop/sound/libsd/src/exports.tab
Original file line number Diff line number Diff line change
@@ -1,33 +1,39 @@

DECLARE_EXPORT_TABLE(libsd, 1, 4)
DECLARE_EXPORT(_start)
DECLARE_EXPORT(_retonly)
DECLARE_EXPORT(sceSdQuit)
DECLARE_EXPORT(_retonly)
DECLARE_EXPORT(sceSdInit)
DECLARE_EXPORT(sceSdSetParam) // 5
DECLARE_EXPORT(sceSdGetParam)
DECLARE_EXPORT(sceSdSetSwitch)
DECLARE_EXPORT(sceSdGetSwitch)
DECLARE_EXPORT(sceSdSetAddr)
DECLARE_EXPORT(sceSdGetAddr) // 10
DECLARE_EXPORT(sceSdSetCoreAttr)
DECLARE_EXPORT(sceSdGetCoreAttr)
DECLARE_EXPORT(sceSdNote2Pitch)
DECLARE_EXPORT(sceSdPitch2Note)
DECLARE_EXPORT(sceSdProcBatch) // 15
DECLARE_EXPORT(sceSdProcBatchEx)
DECLARE_EXPORT(sceSdVoiceTrans)
DECLARE_EXPORT(sceSdBlockTrans)
DECLARE_EXPORT(sceSdVoiceTransStatus)
DECLARE_EXPORT(sceSdBlockTransStatus) // 20
DECLARE_EXPORT(sceSdSetTransCallback)
DECLARE_EXPORT(sceSdSetIRQCallback)
DECLARE_EXPORT(sceSdSetEffectAttr)
DECLARE_EXPORT(sceSdGetEffectAttr)
DECLARE_EXPORT(sceSdClearEffectWorkArea) // 25
DECLARE_EXPORT(sceSdSetTransIntrHandler)
DECLARE_EXPORT(sceSdSetSpu2IntrHandler)
DECLARE_EXPORT_TABLE(libsd, 1, 5)
DECLARE_EXPORT(_start)
DECLARE_EXPORT(_retonly)
DECLARE_EXPORT(sceSdQuit)
DECLARE_EXPORT(_retonly)
DECLARE_EXPORT(sceSdInit)
DECLARE_EXPORT(sceSdSetParam)
DECLARE_EXPORT(sceSdGetParam)
DECLARE_EXPORT(sceSdSetSwitch)
DECLARE_EXPORT(sceSdGetSwitch)
DECLARE_EXPORT(sceSdSetAddr)
DECLARE_EXPORT(sceSdGetAddr)
DECLARE_EXPORT(sceSdSetCoreAttr)
DECLARE_EXPORT(sceSdGetCoreAttr)
DECLARE_EXPORT(sceSdNote2Pitch)
DECLARE_EXPORT(sceSdPitch2Note)
DECLARE_EXPORT(sceSdProcBatch)
DECLARE_EXPORT(sceSdProcBatchEx)
DECLARE_EXPORT(sceSdVoiceTrans)
DECLARE_EXPORT(sceSdBlockTrans)
DECLARE_EXPORT(sceSdVoiceTransStatus)
DECLARE_EXPORT(sceSdBlockTransStatus)
DECLARE_EXPORT(sceSdSetTransCallback)
DECLARE_EXPORT(sceSdSetIRQCallback)
DECLARE_EXPORT(sceSdSetEffectAttr)
DECLARE_EXPORT(sceSdGetEffectAttr)
DECLARE_EXPORT(sceSdClearEffectWorkArea)
DECLARE_EXPORT(sceSdSetTransIntrHandler)
DECLARE_EXPORT(sceSdSetSpu2IntrHandler)
DECLARE_EXPORT(sceSdGetTransIntrHandlerArgument)
DECLARE_EXPORT(sceSdGetSpu2IntrHandlerArgument)
DECLARE_EXPORT(sceSdStopTrans)
DECLARE_EXPORT(sceSdCleanEffectWorkArea)
DECLARE_EXPORT(sceSdSetEffectMode)
DECLARE_EXPORT(sceSdSetEffectModeParams)
END_EXPORT_TABLE

void _retonly() {}
22 changes: 16 additions & 6 deletions iop/sound/libsd/src/imports.lst
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
sysclib_IMPORTS_start
I_memcpy
sysclib_IMPORTS_end

intrman_IMPORTS_start
I_RegisterIntrHandler
Expand All @@ -9,6 +6,7 @@ I_EnableIntr
I_DisableIntr
I_CpuSuspendIntr
I_CpuResumeIntr
I_QueryIntrContext
intrman_IMPORTS_end

loadcore_IMPORTS_start
Expand All @@ -21,6 +19,18 @@ I_sceSifSetDma
I_sceSifDmaStat
sifman_IMPORTS_end

stdio_IMPORTS_start
I_printf
stdio_IMPORTS_end
sysclib_IMPORTS_start
I_bzero
I_memset
I_memcpy
sysclib_IMPORTS_end

thevent_IMPORTS_start
I_CreateEventFlag
I_DeleteEventFlag
I_SetEventFlag
I_iSetEventFlag
I_ClearEventFlag
I_iClearEventFlag
I_WaitEventFlag
thevent_IMPORTS_end
4 changes: 2 additions & 2 deletions iop/sound/libsd/src/irx_imports.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# ____| | ____| | | |____|
# | ___| |____ ___| ____| | \ PS2DEV Open Source Project.
#-----------------------------------------------------------------------
# Copyright 2001-2009, ps2dev - http://www.ps2dev.org
# Copyright ps2dev - http://www.ps2dev.org
# Licenced under Academic Free License version 2.0
# Review ps2sdk README & LICENSE files for further details.
#
Expand All @@ -19,7 +19,7 @@
#include <intrman.h>
#include <loadcore.h>
#include <sifman.h>
#include <stdio.h>
#include <sysclib.h>
#include <thevent.h>

#endif /* IOP_IRX_IMPORTS_H */
Loading
Loading