AminetAminet
Search:
84734 packages online
About
Recent
Browse
Search
Upload
Setup
Services

driver/audio/NallePUH.lha

Mirror:Random
Showing: i386-aros icongeneric icon
No screenshot available
Short:Redirects any (hw-banging) sound program to AHI
Author:"Martin Blom" martin at blom.org
Type:driver/audio
Version:0.3
Architecture:m68k-amigaos
Date:2001-05-04
Requires:An MMU, 68020+, AHI v4, OS 3.5 for GUI mode
Download:driver/audio/NallePUH.lha - View contents
Readme:driver/audio/NallePUH.readme
Downloads:4666

Q: What is "Nalle Puh"?
A: It's the Swedish name for Winnie the Pooh.

Q: Really?
A: Yup.

Q: But... Ehm. What does this program, "Nalle PUH", do?
A: It's a hack that intercepts some custom chip register accesses and
   turns them into AHI function calls.

Q: How?
A: By using the MMU to mark the page at $dff000 as invalid.

Q: Invalid? Doesn't that mean you will get an exception each time the OS
   or an application touches the registers?
A: Exactly.

Q: Isn't that kind of... slow?
A: You bet.

Q: How slow?
A: Unbearable.

Q: So the program is useless, then?
A: Not quite. It can be instructed to patch the OS and all applications that
   read or write to the custom chip registers, so that next time the 
   instruction is executed, no exception will be generated.

Q: How?
A: A new chip register area is created at $80dff000.  For the kickstart ROM,
   all modules except audio.device will be patched to access this address
   instead of $dff000. For applications, I simply guess when it's ok to
   patch the instructions.

Q: Is that fool-proof?
A: Of course not. It's a hack. A proof of concept. Nothing more.

Q: Alright then. So what programs can be redirected?
A: I've tried the following programs, and they seem to work:

   * audio.device
   * Digibooster 1.7
   * Musicline Editor 1.5
   * Octamed Soundstudio 1.03c
   * Protracker (version 2.3 and 4.0)
   * THX Sound System 2.3d.

   I've also tried the following, and they don't:
   
   * Delitracker 2.32
   * Newtracker
   * PlaySID

   (Note that Protracker disables multitasking and cannot be used with AHI
   drivers that are not interrupt based.)

   Previously, I wrote that Sid4Amiga also could be redirected, which is just
   plain stupid, since Sid4Amiga already uses AHI. Duh! Sorry, Paul.

Q: Will you extend Nalle PUH so the all of those program work?
A: Unlikely.

Q: Pretty, pretty please!
A: No. The source code is available. Why don't you give it a shot yourself?

Q: Because <insert lame excuse here>.
A: Too bad.

Q: Suppose I do fix the program, is there anything else I should do?
A: You could certanly improve the instruction patching method. And it could
   also be wise to set up a cachable Chip-RAM mirror so AHI won't have to
   mix the samples from a non-cachable memory area. 

Q: Hey! I found a memory leak: You don't close mmu.library! And you don't
   clean up the MMU tables fully either.
A: I know.  The custom chip register mirror must stay if applications were
   patched. mmu.library must not be flushed from memory, or we loose the
   mirror.


Version history:

0.1, 2001-04-23:	* Initial release.
0.2, 2001-04-28:	* Redirected logging to the listview in GUI mode.
			* Minor GUI updates.
0.3, 2001-05-04		* Clears insr. caches when patching applications.
			* Added a few more instr. patches (base relative).
			This means that I had to move the register mirror
			to $e00000. At least that area is unused on my A4000.
			* The GUI does not touch the Paula registers on exit, 
			unless the user has pressed "Test" at least once.
			* Final update! I've returned the sound card I
                        borrowed to write this hack. Thus, no more updates.


Contents of driver/audio/NallePUH.lha
PERMISSION  UID  GID    PACKED    SIZE  RATIO METHOD CRC     STAMP     NAME
---------- ----------- ------- ------- ------ ---------- ------------ ----------
[generic]                55972   55972 100.0% -lh0- e4e5 May  4  2001 NallePUH/MuLib/MuMin.lha
[generic]                 2436    5488  44.4% -lh5- d41b Mar 27  2001 NallePUH/MuLib/MuMin.readme
[generic]                 1813    6290  28.8% -lh5- 0625 Apr 14  2001 NallePUH/src/CompilerSpecific.h
[generic]                 7097   19064  37.2% -lh5- 02ea Apr 22  2001 NallePUH/src/COPYING
[generic]                  362     636  56.9% -lh5- 49a8 Apr 28  2001 NallePUH/src/Makefile
[generic]                 5627   25744  21.9% -lh5- 4fdf May  4  2001 NallePUH/src/Nalle.c
[generic]                  275     503  54.7% -lh5- 2ed6 May  4  2001 NallePUH/src/NallePUH.cd
[generic]                  197     368  53.5% -lh5- b975 Apr 23  2001 NallePUH/src/NallePUH.h
[generic]                 7989   24780  32.2% -lh5- 9303 Apr 28  2001 NallePUH/src/NallePUH.o
[generic]                  938    3290  28.5% -lh5- a3d0 May  4  2001 NallePUH/src/NallePUH.res
[generic]                 1131    4070  27.8% -lh5- e93d May  4  2001 NallePUH/src/NallePUHstr.s
[generic]                 6989    6989 100.0% -lh0- cf9a Apr 23  2001 NallePUH/src/pooh11.gif
[generic]                32734   78004  42.0% -lh5- 10c5 Apr 23  2001 NallePUH/src/pooh11.o
[generic]                 9736   50181  19.4% -lh5- 9c5c May  4  2001 NallePUH/src/PUH.c
[generic]                 1413    3660  38.6% -lh5- e5a4 Apr 28  2001 NallePUH/src/PUH.h
[generic]                 1699    3390  50.1% -lh5- 259f May  4  2001 NallePUH/src/README
[generic]                53967  125380  43.0% -lh5- 7113 May  4  2001 NallePUH/NallePUH
[generic]                 1699    3390  50.1% -lh5- 259f May  4  2001 NallePUH/NallePUH.readme
---------- ----------- ------- ------- ------ ---------- ------------ ----------
 Total        18 files  192074  417199  46.0%            May  4  2001
Page generated in 0.01 seconds
Aminet © 1992-2024 Urban Müller and the Aminet team. Aminet contact address: <aminetaminet net>