Improving the AWE32 emulation
Posted: Tue 20 Jun, 2017 8:17 pm
Hello.
1) Introduction
I am a new user of PCem since a few weeks, when I finally took the time and effort to test it in different configurations
and prepare a good MS-DOS 6.22 environment (I used freedos initially and I've borrowed its CDrom drivers, but the MS-DOS
environment felt more robust in comparison).
The point that attracted me the most about it was the mention of an AWE32 emulation.
I had that card on a P133 and later I put it on a PII 350 that had one single ISA port aside of the usual PCI ports.
(That PII was really a good machine.. I also had a creative labs branded voodoo 2, which I've found out that PCem 12
also emulates and I've been able to play a couple of games that came with that videocard. Sad thing is I no longer have that box).
(Note for another thread: It's almost impossible to use PCem with a physical CD. While I could play the games from a CUE/BIN
without problems, using it directly from the drive was impossible.. stats window showed cpu usage of up to 1400% !)
2) Status
Allright... after all that "bla bla", let's start talking about the AWE32 emulation.
So far it's better than what I initially thought it would be, but the compatibility is being less than good.
I could use it with AST EMU8000 Sampler (i.e. the one i thought it wouldn't work), and was great to see that even the filter works,
although the chorus/reverb section is not.
On the other hand, the panning for the voices seems to be reversed (I have to verify it with other means. I didn't use this program
extensively in the past).
But when i came to try other programs... things went worse:
Impulse tracker: Cannot even detect the card
Cubic Player: Detects the card, but produces silence. It has some graphical oscillators that should move but remain stopped, adding a "paused" feeling.
AWEAmp Winamp output plugin: Doesn't play, similar to cubic player. This one needs to know the position of the current playing voice, so that it can update the card's RAM accordingly.
I would like to make these four programs to work without big issues. (ok, maybe aweamp is the less useful, but it was funny to use the EMU8000 effects when playing some mp3s)
I've looked into the code, and I found already a couple of bugs ( sound_emu8k.c , emu8k_in , 0x400, register 7 should be "csl" and is "cpf" , and 0x800, register 0 is not returning "val" which contains the address ).
3) Objective of this thread
Ok, as the title says, the objective of opening this thread is to put some effort into improving the current AWE32 emulation in PCem, which is already quite good in some points.
I am a coder and had one such card back then and used some programs with it. As such, I remember a bit about it, but I am not a knowledgeable man in terms of emulating hardware nor I have access to such a card any longer.
I will try to make the programs that I know to run and to produce acceptable sound, but I will not be able to judge how correct the emulation is.
I don't know which will be the best way to cooperate on this, if just forking on bitbucket and committing there, or some other means.
Also, I don't know if there is an IRC channel for PCem or something for a more direct communication in case it's needed.
So far, I've been able to build PCem on Linux (under VirtualBox! hehe) (it seemed easier to build it there than on Windows), although I see that the "good" one is the Windows Port. With that, I hope to be able to debug from both sides, the emlator's side, and the program's side.
4) Programs and sources
Impulse tracker
* source. Assembler (turbo assembler. requires older tlink for the drivers): https://bitbucket.org/jthlim/impulsetracker
* latest compiled executable: http://www.users.on.net/~jtlim/ImpulseT ... nload.html
* Run with MMX: it /sitsb16.mmx
* Run with AWE32: it /sitawe32.drv
* Run without MMX: it /sitsb16.drv, or simply it
* Status: AWE32 Card not detected. Sound is distorted and plays only the left channel with SB16 MMX drivers (bug in some MMX instructions?)
(I've been able to build this one, as well as building PCEm under linux, so I believe I will be able to make this one work correctly)
AST EMU 8000 (AST, all sound tracker)
* sources but from old version (1.40 it seems. Maybe not even complete). Pascal and assembler ( turbo pascal): http://outof.bnro.de/~feilei/obertone-h ... es/AST.zip
* latest compiled executable: http://outof.bnro.de/~feilei/obertone-h ... ST162F.zip
* older compiled executalbe: http://ftp4.se.freebsd.org/pub/awe32/util/ast102.zip
* Run: ast
* Status: works. (memory size detection works). Maybe panning issue?
Note: the video effect when opening and closing needs a trident VGA rom to work properly)
AWEAMP winamp output plugin
* source: pascal (Delphi?) (1.11): https://web.archive.org/web/20050311162 ... source.exe
* latest compiled executable (1.10final): https://web.archive.org/web/20050311162 ... 0final.exe
* latest compiled executable (1.11) https://web.archive.org/web/20050311162 ... 201.11.exe
* Run: Select AWE32 output plugin in winamp.
* Status: Detects the card (memory size detection works.), but produces silence.
(Open) Cubic Player
* source: C++ (watcom?) (2.60): ftp://ftp.cubic.org/pub/player/ocp260pre6src.tar.gz
* latest comipled executable (2.60): ftp://ftp.cubic.org/pub/player/ocp260pre6.zip
* older executables: http://ftp4.se.freebsd.org/pub/awe32/util/cp2.zip
* older executables: http://ftp4.se.freebsd.org/pub/awe32/util/cp17.zip
* older executables: http://ftp4.se.freebsd.org/pub/awe32/util/cpawe17c.zip (not sure how to use this with cp17)
* Run: cp
* Status: Detects the card (memory size detection fails. detects 28MB always), but produces silence.
(Note: with a trident bios, pressing "x" changes it to a impressive 132x60 text mode. )
5) Information and other programs for the AWE32.
- AWE32 programming info:
http://www.maz-sound.com/archives/awe32p10.txt
http://ftp4.se.freebsd.org/pub/awe32/misc/adip.exe
- Other AWE32 resources i've found on internet
http://www.maz-sound.com/awe.html
ftp://retronn.de/driver/Creative/Soundblaster16_AWE/
http://ftp4.se.freebsd.org/pub/awe32/
EDITED: Some more resources:
ftp://ftp.suse.com/pub/people/tiwai/awedrv/ ALSA/OSS linux/freebsd AWE32 driver. This one is important since it should give an understanding of some inner workings. And who knows, the author might even be keen to help.
https://github.com/tiwai/awesfx awesfx is a commandline equivalent to Creative's "AWE32 Control Panel" for linux. From the same author than above.
1) Introduction
I am a new user of PCem since a few weeks, when I finally took the time and effort to test it in different configurations
and prepare a good MS-DOS 6.22 environment (I used freedos initially and I've borrowed its CDrom drivers, but the MS-DOS
environment felt more robust in comparison).
The point that attracted me the most about it was the mention of an AWE32 emulation.
I had that card on a P133 and later I put it on a PII 350 that had one single ISA port aside of the usual PCI ports.
(That PII was really a good machine.. I also had a creative labs branded voodoo 2, which I've found out that PCem 12
also emulates and I've been able to play a couple of games that came with that videocard. Sad thing is I no longer have that box).
(Note for another thread: It's almost impossible to use PCem with a physical CD. While I could play the games from a CUE/BIN
without problems, using it directly from the drive was impossible.. stats window showed cpu usage of up to 1400% !)
2) Status
Allright... after all that "bla bla", let's start talking about the AWE32 emulation.
So far it's better than what I initially thought it would be, but the compatibility is being less than good.
I could use it with AST EMU8000 Sampler (i.e. the one i thought it wouldn't work), and was great to see that even the filter works,
although the chorus/reverb section is not.
On the other hand, the panning for the voices seems to be reversed (I have to verify it with other means. I didn't use this program
extensively in the past).
But when i came to try other programs... things went worse:
Impulse tracker: Cannot even detect the card
Cubic Player: Detects the card, but produces silence. It has some graphical oscillators that should move but remain stopped, adding a "paused" feeling.
AWEAmp Winamp output plugin: Doesn't play, similar to cubic player. This one needs to know the position of the current playing voice, so that it can update the card's RAM accordingly.
I would like to make these four programs to work without big issues. (ok, maybe aweamp is the less useful, but it was funny to use the EMU8000 effects when playing some mp3s)
I've looked into the code, and I found already a couple of bugs ( sound_emu8k.c , emu8k_in , 0x400, register 7 should be "csl" and is "cpf" , and 0x800, register 0 is not returning "val" which contains the address ).
3) Objective of this thread
Ok, as the title says, the objective of opening this thread is to put some effort into improving the current AWE32 emulation in PCem, which is already quite good in some points.
I am a coder and had one such card back then and used some programs with it. As such, I remember a bit about it, but I am not a knowledgeable man in terms of emulating hardware nor I have access to such a card any longer.
I will try to make the programs that I know to run and to produce acceptable sound, but I will not be able to judge how correct the emulation is.
I don't know which will be the best way to cooperate on this, if just forking on bitbucket and committing there, or some other means.
Also, I don't know if there is an IRC channel for PCem or something for a more direct communication in case it's needed.
So far, I've been able to build PCem on Linux (under VirtualBox! hehe) (it seemed easier to build it there than on Windows), although I see that the "good" one is the Windows Port. With that, I hope to be able to debug from both sides, the emlator's side, and the program's side.
4) Programs and sources
Impulse tracker
* source. Assembler (turbo assembler. requires older tlink for the drivers): https://bitbucket.org/jthlim/impulsetracker
* latest compiled executable: http://www.users.on.net/~jtlim/ImpulseT ... nload.html
* Run with MMX: it /sitsb16.mmx
* Run with AWE32: it /sitawe32.drv
* Run without MMX: it /sitsb16.drv, or simply it
* Status: AWE32 Card not detected. Sound is distorted and plays only the left channel with SB16 MMX drivers (bug in some MMX instructions?)
(I've been able to build this one, as well as building PCEm under linux, so I believe I will be able to make this one work correctly)
AST EMU 8000 (AST, all sound tracker)
* sources but from old version (1.40 it seems. Maybe not even complete). Pascal and assembler ( turbo pascal): http://outof.bnro.de/~feilei/obertone-h ... es/AST.zip
* latest compiled executable: http://outof.bnro.de/~feilei/obertone-h ... ST162F.zip
* older compiled executalbe: http://ftp4.se.freebsd.org/pub/awe32/util/ast102.zip
* Run: ast
* Status: works. (memory size detection works). Maybe panning issue?
Note: the video effect when opening and closing needs a trident VGA rom to work properly)
AWEAMP winamp output plugin
* source: pascal (Delphi?) (1.11): https://web.archive.org/web/20050311162 ... source.exe
* latest compiled executable (1.10final): https://web.archive.org/web/20050311162 ... 0final.exe
* latest compiled executable (1.11) https://web.archive.org/web/20050311162 ... 201.11.exe
* Run: Select AWE32 output plugin in winamp.
* Status: Detects the card (memory size detection works.), but produces silence.
(Open) Cubic Player
* source: C++ (watcom?) (2.60): ftp://ftp.cubic.org/pub/player/ocp260pre6src.tar.gz
* latest comipled executable (2.60): ftp://ftp.cubic.org/pub/player/ocp260pre6.zip
* older executables: http://ftp4.se.freebsd.org/pub/awe32/util/cp2.zip
* older executables: http://ftp4.se.freebsd.org/pub/awe32/util/cp17.zip
* older executables: http://ftp4.se.freebsd.org/pub/awe32/util/cpawe17c.zip (not sure how to use this with cp17)
* Run: cp
* Status: Detects the card (memory size detection fails. detects 28MB always), but produces silence.
(Note: with a trident bios, pressing "x" changes it to a impressive 132x60 text mode. )
5) Information and other programs for the AWE32.
- AWE32 programming info:
http://www.maz-sound.com/archives/awe32p10.txt
http://ftp4.se.freebsd.org/pub/awe32/misc/adip.exe
- Other AWE32 resources i've found on internet
http://www.maz-sound.com/awe.html
ftp://retronn.de/driver/Creative/Soundblaster16_AWE/
http://ftp4.se.freebsd.org/pub/awe32/
EDITED: Some more resources:
ftp://ftp.suse.com/pub/people/tiwai/awedrv/ ALSA/OSS linux/freebsd AWE32 driver. This one is important since it should give an understanding of some inner workings. And who knows, the author might even be keen to help.
https://github.com/tiwai/awesfx awesfx is a commandline equivalent to Creative's "AWE32 Control Panel" for linux. From the same author than above.