Commit b9b7d64a authored by Ben Avison's avatar Ben Avison
Browse files

Import of latest sources from ESP.

This represents ESP's version 1.06 (14 May 2002). The files are exactly as
received, but they are not expected to build as they are against the public
headers.
parent 5b75ed87
......@@ -24,4 +24,6 @@
| SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
Dir <Obey$Dir>
amu_machine all THROWBACK=-throwback %*0
objasm -quit s.Gets -To o.SSound
link -rmf -o SSound o.SSound
echo [Built]
\ No newline at end of file
......@@ -24,4 +24,4 @@
| SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
Dir <Obey$Dir>
amu_machine rom %*0
amu_machine clean
......@@ -24,5 +24,4 @@
| SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
Dir <Obey$Dir>
amu_machine clean %*0
stripdepnd
amu rom THROWBACK=-throwback
......@@ -586,6 +586,30 @@ Functional Specification (2107,749)</a><br>
<PRE>
$Log$
Revision 1.1.2.1 2002/03/22 02:32:17 justin
Summary:
Import of SharedSound 1.03.
Detail:
* SharedSound import from Andy at ESP.
Admin:
This version of SharedSound builds identically to the Pace version.
Tag:
SharedSound2-1_03 (retagged)
Revision 1.1 2001/01/16 15:28:00 bavison
Summary:
See Detail.
Detail:
* 32-bit compatible
* srccommitted (and gets version number from VersionNum, even though it's
written in BASIC)
* added install rule and MkInstall file to install module in correct place
within an ARMovie installation
Admin:
Not tested.
Version 0.49. Tagged as 'SharedSnd-0_49'
Revision 6.1 1997/08/11 19:41:33 srose
SECTION: header
CHANGE: ECO 3997 allocated
......
......@@ -25,27 +25,25 @@
#
# Makefile for SharedSound
#
# ***********************************
# *** C h a n g e L i s t ***
# ***********************************
# When Who What
# ---- --- ----
# 28-Jun-2001 BJGA Created
COMPONENT = SSound
TARGET = SSound
OBJS = Gets.o
#
# Program specific options:
#
COMPONENT = SharedSound
OBJS = o.Gets
ROMSAFE = no
EXPORTS = # ${EXP_HDR}.${COMPONENT}
RESOURCES = # ${RESDIR}.${COMPONENT}.Messages
include AsmModule
include Makefiles:StdTools
include Makefiles:StdRules
include Makefiles:ROMCModule
include Makefiles:RAMCModule
# Resource files
# ${RESDIR}.${COMPONENT}.Messages: ${LDIR}.Messages
# ${CP} ${LDIR}.Messages $@ ${CPFLAGS}
clean:
${RM} o.Gets
${WIPE} aof ${WFLAGS}
${WIPE} rm ${WFLAGS}
${WIPE} linked ${WFLAGS}
@echo ${COMPONENT}: cleaned
# Exports
# ${EXP_HDR}.${COMPONENT}: Hdr.${COMPONENT}
# ${CP} Hdr.${COMPONENT} $@ ${CPFLAGS}
#---------------------------------------------------------------------------
# Dynamic dependencies:
| Copyright (c) 1995, Expressive Software Projects
| All rights reserved.
|
| Redistribution and use in source and binary forms, with or without
| modification, are permitted provided that the following conditions are met:
| * Redistributions of source code must retain the above copyright
| notice, this list of conditions and the following disclaimer.
| * Redistributions in binary form must reproduce the above copyright
| notice, this list of conditions and the following disclaimer in the
| documentation and/or other materials provided with the distribution.
| * Neither the name of Expressive Software Projects nor the names of its
| contributors may be used to endorse or promote products derived from
| this software without specific prior written permission.
|
| THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
| ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
| WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
| DISCLAIMED. IN NO EVENT SHALL EXPRESSIVE SOFTWARE PROJECTS BE LIABLE FOR ANY
| DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
| (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
| LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
| ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
| (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
| SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
Dir <Obey$Dir>
amu_machine install INSTDIR=<install$dir>.HardDisc4.!Boot.Resources.!ARMovie.MovingLine %*0
;
; This file is automatically maintained by srccommit, do not edit manually.
; Last processed by srccommit version: 1.68.
;
GBLS Module_MajorVersion
GBLA Module_Version
GBLS Module_MinorVersion
GBLS Module_Date
GBLS Module_FullVersion
GBLS Module_ApplicationDate
GBLS Module_HelpVersion
GBLS Module_ComponentName
GBLS Module_ComponentPath
Module_MajorVersion SETS "1.05"
Module_Version SETA 105
Module_MinorVersion SETS ""
Module_Date SETS "16 Jun 2004"
Module_ApplicationDate SETS "16-Jun-04"
Module_ComponentName SETS "SharedSnd"
Module_ComponentPath SETS "RiscOS/Sources/Audio/SharedSnd"
Module_FullVersion SETS "1.05"
Module_HelpVersion SETS "1.05 (16 Jun 2004)"
END
; (1.06)
;
; This file is automatically maintained by commit, do not edit manually.
;
;
GBLS Module_MajorVersion
GBLS Module_MinorVersion
GBLA Module_Version
GBLS Module_Date
GBLS Module_FullVersion
GBLS Module_FullVersionAndDate
GBLS Module_ComponentName
GBLS Module_ComponentBranch
GBLS Module_ComponentPath
Module_MajorVersion SETS "1.06"
Module_MinorVersion SETS ""
Module_Version SETA 106
Module_Date SETS "14 May 2002"
Module_FullVersion SETS "1.06"
Module_FullVersionAndDate SETS "1.06 (14 May 2002)"
Module_ComponentName SETS "SharedSound2"
Module_ComponentBranch SETS ""
Module_ComponentPath SETS "Sources/Audio/SharedSound2"
END
/* (1.05)
/* SharedSound2 (1.06) 20:02:11 14/5/2002
*
* This file is automatically maintained by srccommit, do not edit manually.
* Last processed by srccommit version: 1.68.
* This file is automatically maintained by commit, do not edit manually.
*
*/
#define Module_MajorVersion_CMHG 1.05
#define Module_MajorVersion_CMHG 1.06
#define Module_MinorVersion_CMHG
#define Module_Date_CMHG 16 Jun 2004
#define Module_Date_CMHG 14 May 2002
#define Module_MajorVersion "1.05"
#define Module_Version 105
#define Module_MajorVersion "1.06"
#define Module_Version 106
#define Module_MinorVersion ""
#define Module_Date "16 Jun 2004"
#define Module_Date "14 May 2002"
#define Module_ApplicationDate "16-Jun-04"
#define Module_ApplicationDate2 "14-May-02"
#define Module_ApplicationDate4 "14-May-2002"
#define Module_ComponentName "SharedSnd"
#define Module_ComponentPath "RiscOS/Sources/Audio/SharedSnd"
#define Module_ComponentName "SharedSound2"
#define Module_ComponentBranch ""
#define Module_ComponentPath "Sources/Audio/SharedSound2"
#define Module_FullVersion "1.05"
#define Module_HelpVersion "1.05 (16 Jun 2004)"
#define Module_LibraryVersionInfo "1:5"
#define Module_FullVersion "1.06"
#define Module_FullVersionAndDate "1.06 (14 May 2002)"
#define Module_HelpVersion "1.06 (14 May 2002)"
......@@ -23,39 +23,32 @@
; (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
; SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
;
[ debug1 :LOR: debugS
[ debug
;------------------------- Debugging
printR10
STMFD sp!,{r0-r3,lr}
MOV r0,r10 ; convert r0 to string
ADR r1,textadr
SUB sp,sp,#32
MOV r1,sp
MOV r2,#31 ; max size
SWI OS_ConvertHex8
ADR r0,textadr
SWI OS_Write0
SWIVC OS_Write0
SWI OS_NewLine
ADD sp,sp,#32
LDMFD sp!,{r0-r3,pc}
printstr
STMFD sp!,{r0-r3,lr}
MOV r0,r10 ; convert r0 to string
ADR r1,textadr
SUB sp,sp,#32
MOV r1,sp
MOV r2,#31 ; max size
SWI OS_ConvertHex8
ADR r0,textadr
SWI OS_Write0
SWIVC OS_Write0
ADD sp,sp,#32
LDMFD sp!,{r0-r3,pc}
textadr
DCD 0
DCD 0
DCD 0
DCD 0
]
END
......@@ -31,9 +31,6 @@
; otherwise be 0.
;
GBLL debug
debug SETL {FALSE}
; -------------------------------- Driver routines ---------------------------
[ doDMI
......@@ -53,6 +50,13 @@ installDefaultDriver
STMDB sp!,{lr}
[ debug
SWI XOS_WriteS
= "installDefaultDriver: entered",0
ALIGN
SWI XOS_NewLine
]
[ doDMI :LAND: ( :LNOT: forceLog)
; See if the DMI is loaded and if so install SharedSound into it's linear handler
......@@ -82,6 +86,7 @@ installDefaultDriver_NoDMI
[ :LNOT: forceLog
SWI Sound_Mode ; Check configured for 16 Bit support
MOVVS r0,#0 ; if not supported, explicitly say it's log
]
[ debug
......@@ -89,7 +94,7 @@ installDefaultDriver_NoDMI
= "Sound mode = ",0
ALIGN
MOV r10,r0
BL printr10
BL printR10
]
CMP r0,#0 ; r0 = 1 If 16 bit support is on
......@@ -114,7 +119,7 @@ installDefaultDriverNotLog
installDriver
; Install driver
; r0 = Pointer to driver table
; r0 = Pointer to driver table, or 0 if it's not really valid
; r1 = parameter to pass driver in ws when called
; r2 = flags
; r3 = Driver name
......@@ -149,7 +154,7 @@ installDriver
; ORRS pc,lr,#Overflow_Flag
;installDriverErrMesg
;
; DCD &1E6
; DCD errn_CannotInstallDriver
; = "Cannot install driver"
; DCB 0
; ALIGN
......@@ -246,6 +251,11 @@ releaseDriver
MOV r0,r0
LDMIA sp!,{ws} ; Retrieve ws
; forget the driver we're using
ADD r0,ws,#work_driverTable ; driver Table slot
MOV r1,#0
STR r1,[r0,#driver_Address]
releaseDriverExit
LDMIA sp!,{r0-r11,ws,pc}
......@@ -327,7 +337,7 @@ driverVolumeStore
= "Store scaled driver volume: ",0
ALIGN
MOV r10,r0
BL printr10
BL printR10
]
; r0 = actual volume
......
......@@ -81,25 +81,27 @@ sp RN 13
lr RN 14
pc RN 15
doLog SETL {FALSE}
doLog SETL {TRUE}
forceLog SETL {FALSE}
doLogDirect SETL {FALSE}
doDMI SETL {TRUE}
doCallBack SETL {TRUE}
doCBAI SETL {FALSE}
ROMBuild SETL {TRUE}
ROMBuild SETL {FALSE}
[ ROMBuild :LAND: doLog
ERROR "Cannot do log in ROM version"
]
GET Hdr:ListOpts
GET Hdr:Macros
GET Hdr:System
GET Hdr:Switcher ; for acknowledgements constants
GET VersionAsm
;dateS SETS " (15 Jun 1999)"
;versionS SETS "0.60"
copyRightS SETS " Expressive Software Projects, Nottingham.$date"
longcopyRightS SETS "Copyright 1995-2001 Expressive Software Projects, Nottingham.$date"
ackS SETS "Copyright 1995-2001 Expressive Software Projects."
copyRightS SETS " Expressive Software Projects, Nottingham."
ackS SETS "Copyright 1995-2002 Expressive Software Projects."
variantS SETS ""
titleS SETS "SharedSound"
swiNameS SETS "SharedSound"
......@@ -109,11 +111,6 @@ debug1 SETL {FALSE}
debugS SETL {FALSE}
MACRO
NOP
MOV r0,r0
MEND
AREA |!!Module$$Code|, CODE, READONLY
......
......@@ -23,10 +23,10 @@
; (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
; SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
;
GBLL debug
; Copyright (c) 1995, Expressive Software Projects
; All rights reserved.
;
; these are defined in global headers
; XOS_SWINumberFromString * &20039
; Redistribution and use in source and binary forms, with or without
; modification, are permitted provided that the following conditions are met:
; * Redistributions of source code must retain the above copyright
......@@ -41,7 +41,6 @@
; THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
; ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
; WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
; DISCLAIMED. IN NO EVENT SHALL EXPRESSIVE SOFTWARE PROJECTS BE LIABLE FOR ANY
; DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
; (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
......@@ -187,7 +186,7 @@ fillExit
MOV lr,pc ; Return address
MOV pc,r9 ; Call handler
fillQuit
MSREQ CPSR_ctl,R8
MOV r0,#0
STR r0,[ws,#work_SoundActive] ; Flag finished
......@@ -196,7 +195,7 @@ fillQuit
; ------------------
rateChange
; Issue a call back to change the rate values
MSREQ CPSR_ctl,R9
STMDB sp!,{r0,r1,lr}
[ doCallBack
......@@ -572,7 +571,7 @@ callBackHandlerProcess
MOV r5,#1
STR r5,[ws,#work_callBack_Active] ; Set the call back active flag
MSREQ CPSR_ctl,R8
; Set up new call back
[ doCBAI
......@@ -581,7 +580,7 @@ callBackHandlerProcess
LDR r0,[ws,#work_CBAIActive]
CMP r0,#1
MSREQ CPSR_ctl,R9
ADREQ r0,CBAIRoutine
STREQ r0,[ws,#work_PollWord]
BEQ callBackHandlerProcess_Exit
......
......@@ -65,25 +65,25 @@ installLinearDriver
= " Table = ",0
ALIGN
MOV r10,r0
BL printr10
BL printR10
SWI XOS_WriteS
= " Parameter = ",0
ALIGN
MOV r10,r1
BL printr10
BL printR10
SWI XOS_WriteS
= " Flags = ",0
ALIGN
MOV r10,r2
BL printr10
BL printR10
SWI XOS_WriteS
= " Name = ",0
ALIGN
MOV r10,r3
BL printr10
BL printR10
]
BL installDriver
......
......@@ -30,6 +30,15 @@ installLogDriver
; Sound_ChannelHandler and call installDriver
STMDB R13!,{R14}
MOV r0,#0
STR r0,[r12,#work_Log_InitedFully]
[ debug
SWI XOS_WriteS
= "installLogDriver: installing",0
SWI XOS_NewLine
]
ADD R0,R12,#work_DriverEntryTable ; Get table address
ADR R1,logDriverInstall ; Install entry
......@@ -73,6 +82,12 @@ logDriverInstall
; R14 already on stack
STMDB R13!,{R1-R12}
[ debug
SWI XOS_WriteS
= "logDriverInstall: entered",0
SWI XOS_NewLine
]
LDR R12,[R12]
MOV R6,R0
......@@ -98,6 +113,20 @@ logDriverInstall
MOV R4,#0
SWI XSound_Configure
TEQ r3,#&FC000003 ; is it 'unset' ?
TEQNE r3,#0 ; in case anyone used 0 as well.
MOVEQ r0,#0
[ debug
BNE %FT10
SWI XOS_WriteS
= "installLogDriver: Can't, no entry point",0
SWI XOS_NewLine
B installLogDriver_Cant
10
|
BEQ installLogDriver_Cant
]
LDR R5,work_Log_OldConfigureVal
ADD R5,R12,R5 ; Preserve old values
STMIA R5,{R0-R4}
......@@ -167,6 +196,10 @@ logDriverInstall
SWI XSound_Stereo
STR R1,[R12,#work_Log_OldRight] ; Preserve old vlaue
; mark us as fully initialised
MOV r0,#1
STR r0,[r12,#work_Log_InitedFully]
MOV R0,R6 ; Restore R0 if successful
;MOVVS R0,#0 ; Or 0 if error
......@@ -180,18 +213,25 @@ logDriverInstall
;LDR R1,term ; Get alternative
;STR R1,[R2,#&14] ; and patch in to Sound Configure branch code
installLogDriver_Cant
logDriverInstallExit
[ debug
SWI XOS_WriteS
= "logDriverInstall: exiting",0
SWI XOS_NewLine
]
LDMIA R13!,{R1-R12,PC}
; ---
logDriver_WorkPtr
DCD 0
soundDMATitle
= "SoundDMA"
DCD 0
; soundDMATitle
; = "SoundDMA"
; DCD 0
; -----------
......@@ -203,6 +243,11 @@ logDriverRemove
LDR R12,[R12]
; if we're not fully initialied, don't do anything
LDR r0,[r12,#work_Log_InitedFully]
TEQ r0,#1
BNE %FT90
MOV R0,#1 ; Channel 0
LDR R1,[R12,#work_Log_OldLeft] ; Preserve old value
SWI XSound_Stereo
......@@ -221,6 +266,7 @@ logDriverRemove
LDR R0,[R12,#work_OldLogFill]
STR R0,[R3]
90
LDMIA R13!,{R0-R5,PC}
; -----------
......
......@@ -23,7 +23,8 @@
; (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
; SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
;
XOS_Module * &2001E
; these are defined in global headers
; XOS_Module * &2001E
memoryStartVal
DCD memoryStart
......
......@@ -23,9 +23,10 @@
; (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
; SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
;
XOS_AddCallBack * &20054
XOS_RemoveCallBack * &2005F
XOS_ServiceCall * &20030
; JRF: these are defined in global headers
; XOS_AddCallBack * &20054
; XOS_RemoveCallBack * &2005F
; XOS_ServiceCall * &20030
IMPORT |__RelocCode|
......@@ -52,7 +53,7 @@ title
= titleS,0
ALIGN
help
= "Shared Sound",9,Module_HelpVersion,variantS,0
= "Shared Sound",9,Module_FullVersionAndDate,variantS,0
ALIGN
flagsWord
......@@ -97,7 +98,7 @@ initMemError
MOV PC,R14
initMemErrMesg
DCD &1E6
DCD errn_InitMem
= "Not enough memory for ",titleS,0
ALIGN
......@@ -190,30 +191,117 @@ serviceCode_UrsulaEntry
; LinearHandler in place
serviceCode_Sound
STMFD R13!,{R0-R3}
LDR R12,[R12]
LDR R14,[R12,# work_currentDriver]
; linear handler goes through level 1
LDR ws,[ws]
LDR R14,[ws,# work_currentDriver]
; linear handler goes through level 0
; if it dies, we shutdown the current handler (for lin or log handlers)
; it it starts up, we start the current handler (for lin or log handlers)
TEQ R14,#2 ; linear handler
TEQNE R14,#1 ; log handler
TEQEQ R0,#Service_Sound_Level0Dying
BEQ serviceCode_Sound_Shutdown
TEQ R14,#2 ; linear handler
TEQNE R14,#1 ; log handler
TEQ R0,#Service_Sound_Level0Alive
TEQEQ R14,#2 ; linear handler
BEQ serviceCode_Sound_Reinit
; log handler goes through level 2 (I *assume*)
;TEQ R0,#Service_Sound_Level1Alive
;TEQEQ R14,#1 ; log handler