Commit 3eb3fed2 authored by ROOL's avatar ROOL :robot:
Browse files

32-bit compatible

Detail:
  Propagate errors internally, use macros to deal with V flags on entry/exit.
  Correct the "Out of memory" error number, shouldn't be "Bad SWI" &1E6.

Version 0.08. Tagged as 'RSound-0_08'
No related merge requests found
...@@ -9,12 +9,12 @@ ...@@ -9,12 +9,12 @@
GBLS Module_ApplicationDate GBLS Module_ApplicationDate
GBLS Module_HelpVersion GBLS Module_HelpVersion
GBLS Module_ComponentName GBLS Module_ComponentName
Module_MajorVersion SETS "0.07" Module_MajorVersion SETS "0.08"
Module_Version SETA 7 Module_Version SETA 8
Module_MinorVersion SETS "" Module_MinorVersion SETS ""
Module_Date SETS "17 Aug 1997" Module_Date SETS "27 Apr 2023"
Module_ApplicationDate SETS "17-Aug-97" Module_ApplicationDate SETS "27-Apr-23"
Module_ComponentName SETS "RSound" Module_ComponentName SETS "RSound"
Module_FullVersion SETS "0.07" Module_FullVersion SETS "0.08"
Module_HelpVersion SETS "0.07 (17 Aug 1997)" Module_HelpVersion SETS "0.08 (27 Apr 2023)"
END END
/* (0.07) /* (0.08)
* *
* This file is automatically maintained by srccommit, do not edit manually. * This file is automatically maintained by srccommit, do not edit manually.
* *
*/ */
#define Module_MajorVersion_CMHG 0.07 #define Module_MajorVersion_CMHG 0.08
#define Module_MinorVersion_CMHG #define Module_MinorVersion_CMHG
#define Module_Date_CMHG 17 Aug 1997 #define Module_Date_CMHG 27 Apr 2023
#define Module_MajorVersion "0.07" #define Module_MajorVersion "0.08"
#define Module_Version 7 #define Module_Version 8
#define Module_MinorVersion "" #define Module_MinorVersion ""
#define Module_Date "17 Aug 1997" #define Module_Date "27 Apr 2023"
#define Module_ApplicationDate "17-Aug-97" #define Module_ApplicationDate "27-Apr-23"
#define Module_ComponentName "RSound" #define Module_ComponentName "RSound"
#define Module_FullVersion "0.07" #define Module_FullVersion "0.08"
#define Module_HelpVersion "0.07 (17 Aug 1997)" #define Module_HelpVersion "0.08 (27 Apr 2023)"
#define Module_LibraryVersionInfo "0:7" #define Module_LibraryVersionInfo "0:8"
...@@ -71,10 +71,14 @@ ReverbOff_Syntax ...@@ -71,10 +71,14 @@ ReverbOff_Syntax
DCD Mod_Title - Module_BaseAddr ; Title string offset DCD Mod_Title - Module_BaseAddr ; Title string offset
DCD Mod_HelpStr - Module_BaseAddr ; Help string offset DCD Mod_HelpStr - Module_BaseAddr ; Help string offset
DCD Mod_HC_Table - Module_BaseAddr ; Help and command keyword table offset DCD Mod_HC_Table - Module_BaseAddr ; Help and command keyword table offset
[ :LNOT:No32bitCode
DCD 0 ; SWI chunk number DCD 0 ; SWI chunk number
DCD 0 ; SWI handler code offset DCD 0 ; SWI handler code offset
DCD 0 ; SWI decoding table offset DCD 0 ; SWI decoding table offset
DCD 0 ; SWI decoding code offset DCD 0 ; SWI decoding code offset
DCD 0 ; No MessageTrans file
DCD Mod_Flags - Module_BaseAddr
]
DCB " Expressive Software Projects, Nottingham." DCB " Expressive Software Projects, Nottingham."
Mod_Title Mod_Title
DCB "SoundReverb", 0 DCB "SoundReverb", 0
...@@ -82,6 +86,8 @@ Mod_Title ...@@ -82,6 +86,8 @@ Mod_Title
Mod_HelpStr Mod_HelpStr
DCB "ESP RealTime Sound effects", 9, Module_HelpVersion, 0 DCB "ESP RealTime Sound effects", 9, Module_HelpVersion, 0
ALIGN ALIGN
Mod_Flags
DCD ModuleFlag_32bit
Mod_Init ROUT Mod_Init ROUT
Push "R0-R12,R14" Push "R0-R12,R14"
...@@ -97,7 +103,6 @@ Mod_Init ROUT ...@@ -97,7 +103,6 @@ Mod_Init ROUT
STR R10,wksp_pw STR R10,wksp_pw
MOV R0,#0 MOV R0,#0
STR R0,wksp_ss_handle STR R0,wksp_ss_handle
MOV R0,#5
; Copy and relocate offsets to live set ; Copy and relocate offsets to live set
ADR R1,reverb_weights ADR R1,reverb_weights
...@@ -126,19 +131,22 @@ Mod_Init ROUT ...@@ -126,19 +131,22 @@ Mod_Init ROUT
STMIA R1!,{R3-R6} STMIA R1!,{R3-R6}
SUBS R2,R2,#&40 SUBS R2,R2,#&40
BGT %BT10 BGT %BT10
LDMIA R13!,{R0-R12,PC}^ CLRV
Pull "R0-R12,PC"
90 90
Pull "R0-R12,R14" Pull "R0-R12,R14"
ADR R0,ErrorBlock_NoSuchSWI ADR R0,ErrorBlock_MHNoRoom
ORRS PC,R14,#&10000000 SETV
MOV PC,LR
MakeInternatErrorBlock NoSuchSWI,,"Not enough memory for SoundReverb" MakeInternatErrorBlock MHNoRoom,,"Not enough memory for SoundReverb"
Mod_Die Mod_Die
Push "R0-R12,R14" Push "R0-R12,R14"
LDR R12,[R12,#0] LDR R12,[R12,#0]
BL remove_ss_handler BL remove_ss_handler
LDMIA R13!,{R0-R12,PC}^ CLRV
Pull "R0-R12,PC"
;;---------------------------------------------------------------------------- ;;----------------------------------------------------------------------------
;; Star command table ;; Star command table
...@@ -162,44 +170,46 @@ ReverbOff_Help ...@@ -162,44 +170,46 @@ ReverbOff_Help
;; Command ReverbOn ;; Command ReverbOn
;;---------------------------------------------------------------------------- ;;----------------------------------------------------------------------------
ReverbOn_Code ReverbOn_Code
Push "R0-R5,R14" Push "R14"
LDR R12,[R12,#0] LDR R12,[R12,#0]
BL install_ss_handler BL install_ss_handler
LDMIA R13!,{R0-R5,PC}^ Pull "PC"
;;---------------------------------------------------------------------------- ;;----------------------------------------------------------------------------
;; Command ReverbOff ;; Command ReverbOff
;;---------------------------------------------------------------------------- ;;----------------------------------------------------------------------------
ReverbOff_Code ReverbOff_Code
Push "R0-R5,R14" Push "R14"
LDR R12,[R12,#0] LDR R12,[R12,#0]
BL remove_ss_handler BL remove_ss_handler
LDMIA R13!,{R0-R5,PC}^ Pull "PC"
install_ss_handler install_ss_handler
Push "R0-R12,R14" Push "R0-R4,LR"
ADR R0,reverb_proc ADR R0,reverb_proc
LDR R1,wksp_pw LDR R1,wksp_pw
MOV R2,#1 MOV R2,#1 ; Use type in R4
ADR R3,handler_name ADR R3,handler_name
MOV R4,#2 MOV R4,#2 ; Process handler
SWI SharedSound_InstallHandler SWI XSharedSound_InstallHandler
STRVS R0,[SP]
STRVC R0,wksp_ss_handle STRVC R0,wksp_ss_handle
Pull "R0-R12,PC" Pull "R0-R4,PC"
handler_name handler_name
DCB "Reverb processing", 0 DCB "Reverb processing", 0
ALIGN ALIGN
remove_ss_handler ROUT remove_ss_handler ROUT
Push "R0-R12,R14" Push "R0,R14"
LDR R0,wksp_ss_handle LDR R0,wksp_ss_handle
CMP R0,#0 CMP R0,#0
BEQ %FT90 BEQ %FT90
SWI SharedSound_RemoveHandler SWI XSharedSound_RemoveHandler
MOV R0,#0 STRVS R0,[SP]
STR R0,wksp_ss_handle MOV R14,#0
STR R14,wksp_ss_handle
90 90
Pull "R0-R12,PC" Pull "R0,PC"
;;---------------------------------------------------------------------------- ;;----------------------------------------------------------------------------
;; Reverb effect ;; Reverb effect
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment