Daniel Bertrand 5/31/2000

Using TRAM:

As mentioned above the effects I created use the TRAM engine. The emu10k1
apperas to have 16kbytes (or 8k addresses, each 2 byte wide) TRAM on board,
thus addresses 0-0x1fff are available as internal TRAM. The flanger program
uses the on board TRAM a thus should work fine. The Delay effect, however,
uses TRAM located in your computers RAM, to enable the emu10k1 to use
external RAM you must modify the main.c file in the driver as follows:

1. Add   "#define TANKMEM"  some where near the top

2. remove all three instances of "HCFG_LOCKTANKCACHE"

Then when you load the module the driver will alocate some RAM for the TRAM
(I think it was 256Kbytes, at 96Kbytes/sec (16bits per sample, 48k
samples/sec) that gives us 2.6667 seconds of delay).

The TRAM is described in the hog63.ps file. But incase it's not clear, from
tinkering around:
 
The tram is accessed using a pair of GPR register: 0x200-0x29f are used for
transfering data, 0x300-0x39f are used for specifying the TRAM address to
read/write to and the operation (read, write, etc--see the bottom of 8010.h).
0x380-0x39f and 0x280-0x29f are used for the external TRAM.

Also note that the operation (read, write etc.) seems to be setable only by
loading the value from the computer (unless I'm not doing something
properly). The address is modifiable both by the emu programs and the
programs on the computer, however the emu programs will have their addresses
automatically right logically shifted by 11 bits.
 
check out flanger.asm and delay.asm for examples.
 
I have not figured out what "#define TANKMEMADDRREG_ALIGN       0x00400000      /* Align
read or write relative to tank access", does anybody have a clue? I'll keep
poking.
 
Oh and, If your going to be using the TRAM without using the "loadconst"
(i.e. maybe using the ioctrl patch SOUND_MIXER_PRIVATE3 which was just posted
by Frank Cornelis-- I haven't checked it out yet ), you'll want to clear all
the TANK address registers to stop it from writting random numbers to the
TANK.
