Improving the AWE32 emulation

Support and general discussion.
Post Reply
JosepMa
Posts: 202
Joined: Tue 20 Jun, 2017 6:25 pm

Improving the AWE32 emulation

Post by JosepMa »

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.
Last edited by JosepMa on Wed 28 Jun, 2017 7:10 pm, edited 1 time in total.
User avatar
leilei
Posts: 1039
Joined: Fri 25 Apr, 2014 4:47 pm

Re: Improving the AWE32 emulation

Post by leilei »

You could attach patches as files in the forum posts. That generally works

I haven't been able to hear the AWE32 in Cubic Player either, even though I know it works with my real AWE cards


The missing chorus/reverb's one thing, what about the missing noise floor and CQM FM (in cut-down later models and AWE64)? :P
JosepMa
Posts: 202
Joined: Tue 20 Jun, 2017 6:25 pm

Re: Improving the AWE32 emulation

Post by JosepMa »

About noise floor... One thing that i can hear and probably is not meant to be heard is, with AST EMU8000 sampler, (and also when I tried to play something with AWEAMP, the AWE ROM is played on the right channel at low volume!!! )
User avatar
FredPJ
Posts: 31
Joined: Tue 15 Sep, 2015 1:55 pm

Re: Improving the AWE32 emulation

Post by FredPJ »

It always bothered me that the Sound Blaster AWE32 is marked as "emulated", as it should be marked as "partially emulated" at best. To me the chorus/reverb effects are what made that sound card, without it it isn't a particularly interesting. While I understand that it may not be an easy task to emulate the effects processor without proper documentation, marking it as "emulated" is like emulating a 2D part of a 2D/3D video card then mark it as emulated and call it a day.
altheos
Posts: 72
Joined: Wed 24 Feb, 2016 7:27 pm

Re: Improving the AWE32 emulation

Post by altheos »

OCP works for me without specific configuration : AMI 486 Clone, DX/4 100, 16 Mb RAM, AWE32 (512k,DBOPL) t4,p220,i7,d1,e5, DOS 6.22, NO drivers loaded.
IT (v214) works in SB16 mode but failed to detect AWE32 (without drivers loaded).
JosepMa
Posts: 202
Joined: Tue 20 Jun, 2017 6:25 pm

Re: Improving the AWE32 emulation

Post by JosepMa »

altheos: Have you explicitly selected the AWE32 output on OCP? (press "f", go to the "@", then DEVICES, then select "Soundblaster AWE32").
By default it uses the SB16 output, since by that time, CPU was strong enough to be a better option than using the EMU8000 which implied a few limitations (including the card's amount of RAM)
altheos
Posts: 72
Joined: Wed 24 Feb, 2016 7:27 pm

Re: Improving the AWE32 emulation

Post by altheos »

Ok. I didn't know that by default OCP uses SB16 mode :D . The problem can be reproduced by explicitly selecting the AWE32 output.
JosepMa
Posts: 202
Joined: Tue 20 Jun, 2017 6:25 pm

Re: Improving the AWE32 emulation

Post by JosepMa »

Allright, I've gone with the "one fix at a time" procedure and fixed Impusle tracker AWE32 detection. I initially tried to change multiple things that I thought were bugs or incorrectly implemented things and the playback got broken (playing sometimes from rom where it should have been playing from ram and the likes)

With this one fix, IT is able to detect the AWE32 and use it correctly (i had some glitches while playing on the F5 screen, but maybe it was my compilation or something not directly related to pcem).
[Edit: problem on F5 screen is actually a problem with not enough emulation speed).

https://bitbucket.org/JosepMaJaz/pcem/commits/all

Next point, let's see if i get cubic player detection of RAM to work properly (i already saw what uses to detect it, so it might be easy too, but maybe that was what broke the audio in my previous attempt)
JosepMa
Posts: 202
Joined: Tue 20 Jun, 2017 6:25 pm

Re: Improving the AWE32 emulation

Post by JosepMa »

I've commited a few more fixes:
- RAM detection on open cubic player working
- Fix of chorus/loopend register using the wrong variable.
- Oscillators, spectrum and spectogram of (open) cubic player, as well as vumeters and playing dots in F3 of Impulse tracker now work too.
User avatar
SarahWalker
Site Admin
Posts: 2054
Joined: Thu 24 Apr, 2014 4:18 pm

Re: Improving the AWE32 emulation

Post by SarahWalker »

Thanks for this! I'm going to be away for a few days, but I'll have a look when I get back.
User avatar
leilei
Posts: 1039
Joined: Fri 25 Apr, 2014 4:47 pm

Re: Improving the AWE32 emulation

Post by leilei »

I know it's early at this point but your tree causes an emulator crash when booting Win95/98 with Creative's AWE32 drivers installed (1997-12-10 specifically).
altheos
Posts: 72
Joined: Wed 24 Feb, 2016 7:27 pm

Re: Improving the AWE32 emulation

Post by altheos »

Nice Job !
May I ask how did you determine that, for instance, Impulse tracker tests the non variability of the LS byte and the variability of the MS byte to identify the AWE32 ? Reading through ASM code ?
JosepMa
Posts: 202
Joined: Tue 20 Jun, 2017 6:25 pm

Re: Improving the AWE32 emulation

Post by JosepMa »

@leiley : I left testing Windows / AWEAmp for later, but I didn't expect that these small changes could already cause crash on boot. I initially had a crash on launch on cubic player when I incorrectly setup the memory condition to ">" instead of ">=", but the commit already has it fixed.

@altheos: In the first post, there are links to the source code of the four programs ( ok, AST's code is not for the latest release, but still serves as a way to understand what the coder did).
For Impulse tracker, the code is below, which translates to some human readable code like this:

SET TMP1 = INVERT(LSB(INDEX_REGISTER))
SET TMP2 = TMP1
SET INDEX_REGISTER = TMP1
SET TMP1 = LSB(INDEX_REGISTER)
TEST TMP1 not equals TMP2 THEN exit with failure
FOR 128 times LOOP
SET TMP1 = INDEX_REGISTER
TEST LSB(TMP1) not equals TMP2 THEN exit with failure
TEST MSB(TMP1) not equals MSB(TMP2) THEN Exit with success.
END LOOP
Exit with failure


;-----------------------------------------------------------------------------------
Proc TestAWE ; Given DX = baseport.

Push DX

Add DX, 802h
In AL, DX
In AL, DX
Not AL
Mov BL, AL
Out DX, AL
In AL, DX
Cmp AL, BL
JNE TestAWE1 ; Register changed

In AX, DX ; Is upper part of pointer
Mov BX, AX ; changing?
Mov CX, 128

TestAWE2:
In AX, DX
Cmp AL, BL
JNE TestAWE1
Cmp AH, BH
JNE TestAWE3

Dec CX
JNZ TestAWE2
Jmp TestAWE1

TestAWE3:
Pop DX

ClC
Ret

TestAWE1:
Pop DX
StC
Ret

EndP TestAWE
JosepMa
Posts: 202
Joined: Tue 20 Jun, 2017 6:25 pm

Re: Improving the AWE32 emulation

Post by JosepMa »

I haven't commited more changes because I am trying to fix some sound issues i have with impulse tracker. I am assuming the oscilators or envelopes go crazy when notes stop or something. It only happens with impulse tracker.
I still have to solve the audio being muted with cubic player and AWEamp. At some point, i got AWEAmp to produce sound, but with the rom-playing and very distorted. In general, Windows works fine (Windows 98, with 1997 drivers and with creative software installed, so I could load different soundfount roms, up to 28MB and listening to several MIDI files).

Anyway, the program is relatively unstable, and it doesn't help that I had to fix keyboard and mouse to work for allegro, and the new Wxwidget works for keyboard but again not for mouse (so i'll need to fix that too). It might be related to using it inside virtualbox, or maybe even to build a 64bit version, but here I am.

Also... i STILL have been unable to build a windows version that works, not under visual studio (where it built after code modification, but crashes on startup), neither under msys2, (where i am battling between erroneus includes and configurations that think that i am under linux). I saw a post here that describes how to build it, but it sure has to be a joke that one has to build de *compiler*!
Battler
Posts: 793
Joined: Sun 06 Jul, 2014 7:05 pm

Re: Improving the AWE32 emulation

Post by Battler »

- JosepMa: Start MSYS2 in the MinGW32 mode, CD to wherever your source code is, and do: makefile -fmakefile.mingw .
JosepMa
Posts: 202
Joined: Tue 20 Jun, 2017 6:25 pm

Re: Improving the AWE32 emulation

Post by JosepMa »

Phew... build on windows finally working for me. After:
- realizing that "makefile -fmakefile.mingw" actually means "make -fmakefile.mingw under src dir" ( why do we have a configure system in place if it only works for linux? )
- fixing indentation problems in several source files, because there's the -WError option in the makefile.mingw (ok, i could have changed the makefile, but...)
- Changing the -lopenal32 linker library for -lopenal
- fixing a crash on startup that is caused by mouse_poll_host() being called before mouse_init()
- Fixing mouse movement. Again, it was not working for me. I ended modifying the code to use directinput8 instead of directinput7.

All of this is commited to my bitbucket fork ( mouse related things are on a specific branch).

As for AWE32, I will try to reimplement part of the playback system (implement the envelopes and LFO's properly). I hope that this will fix three problems that exists now: the cubic player/aweamp muting, the rom being played on right channel sometimes, and impuse tracker noise when notes are stopped. (and weird noises when stopping song and even after exiting the program).

BTW: I updated the links on first post, I found the linux/freebsd driver for the AWE32. I hope that it could give some clues about the inner workings of an AWE32.I am not sure on which distro that could be found in order to try it... I could try debian potato, or maybe i will need a redhat 5 or the likes..
JosepMa
Posts: 202
Joined: Tue 20 Jun, 2017 6:25 pm

Re: Improving the AWE32 emulation

Post by JosepMa »

More news on this (Not sure if I should open a new post under development... This one was originally intended for getting in contact and getting something going up).

Currently, I have a reasonably good playback under Impulse tracker (fixed several noises and audio problems). Cubic player is still muted, but i was able to get sound out of it when commenting out the code for envelopes. AST keeps working, but still does the playback of the awe ROM after detection and exit. I believe that maybe that is the correct behaviour, since with my last fixes, that volume is really low, and maybe it was under the SNR of the AWE.

The current code, which i haven't commited yet to my repository has changed considerably.
I've redone the emu structures, with different unions and structs to simulate the different parts of the registers and avoid doing so many ands, ors and shifts. This has the downside that the code as it is will be litte endian only. (Would need to replicate the structures for big-endian)
I've revised all the in and out registers, implementing all of what is documented, and i am in the process of validating that the ranges of all values are correct.
Finally, I've reimplemented part of the audio engine, most importantly implementing the per-voice "on/off" of the envelope engine, as well as adding delay and hold to the envelopes. Next is proper implementation of the LFOs (I believe nor the speed neither the range and probably neither the precision was good).
I even tried using a 4-point cubic spline resampler, but I feel that it filters too much. I don't know if we could get to emulate the 3-point one, although I have some ideas about it (what I miss is a way to get appropiate coefficient values for this, since I'm not too familiar with the DSP math).
Once that is ready, I will try making the filter more like the real thing (I am not sure if the implementation used is good, but so far, the ranges were not correct), and if I get all that working, I would like to try adding chorus and reverb, although I have no idea how i will convert the Init table data into values that I could use on a generic chorus/reverb ( I actually had thought about fluidsynth's ones, if not something more generic like freeverb )


I also have been thinking several times if I could make the card work sample by sample, instead of working with audio blocks. Since the card had its own clock at 44.1Khz that incremented a register value, and different registers gave information to the application about the state of the playback, the applications keep reading the registers waiting for things to change. I believe this could improve the emulation precision, although I don't have any big concerns with the way it currently works.

Oh... and I got a debian potato installed in a new PCEM disk image. Initially the emulation was really bad, playing the ROM at full volume! Once I get cubic player to work, i'll try again with that linux to see if things improve.
User avatar
SarahWalker
Site Admin
Posts: 2054
Joined: Thu 24 Apr, 2014 4:18 pm

Re: Improving the AWE32 emulation

Post by SarahWalker »

Reverb/chorus is going to involve emulating the effects DSP, which I suspect is custom and therefore has a completely unknown instruction set. Hence why I never tried to tackle it.

The filter is currently totally wrong. It's been on my list to re-do for a while now, though I never quite got round to it.

There's probably no need to change the emulation to work sample by sample - it currently forces an update to the current position on register access, so applications that poll the register state should work fine.
JosepMa
Posts: 202
Joined: Tue 20 Jun, 2017 6:25 pm

Re: Improving the AWE32 emulation

Post by JosepMa »

@leilei : I would like to improve the emulation behaviour of some concrete registers of the AWE, and I would be interested if I could give you a program to do some tests on those cards that you said you have.

I still have to implement the application, which could be an MS-DOS application (Based off of IT sources and built with borland tasm), or a Win32 application (Based off of AWEAmp sources and built with Borland delphi 4).

My main interests, which I haven't been able to find a description of are:

Real range of the "current" registers , as well as the unit ( to know if they work in linear amplitude or decibel)
How are the "target" registers moved to "current" registers, both, when the envelope engine is off, and when it is on.
Verify if Initial pitch, initial filter and initial attenuation have an effect or not when the envelope engine is off.

For that, the application would generate a series of calls and write into a file at determined intervals.
A recording of the audio would be needed too. Recording the audio in Windows should be easily done with any application. on MS-DOS i would need to implement recording ( I believe the soundblaster layer of PCem emulator lacks this ability, so that's something else would need work)
altheos
Posts: 72
Joined: Wed 24 Feb, 2016 7:27 pm

Re: Improving the AWE32 emulation

Post by altheos »

@JosepMa : I can do the test on an AWE64 if you need to.
JosepMa
Posts: 202
Joined: Tue 20 Jun, 2017 6:25 pm

Re: Improving the AWE32 emulation

Post by JosepMa »

altheos: Ok good. I will try to build the program during this week (the concept is easy, but i briefly learned pascal and delphi many years ago, and DOS assembler is difficult to write by nature :P )

On the emulation side, it seems that I keep reinventing the same envelope over and over. (as i'm going forward and backward each time that i try to get cubic player and aweamp to play. They use a "feature" where the envelope "release" actually acts as a fast attack). Supposedly I have the correct envelope implementation now, but I'm not using the registers correctly yet.
Battler
Posts: 793
Joined: Sun 06 Jul, 2014 7:05 pm

Re: Improving the AWE32 emulation

Post by Battler »

- JosepMa: If you could also check why OS/2 Warp installer hangs when AWE32 is selected, that would be greatly appreciated.
JosepMa
Posts: 202
Joined: Tue 20 Jun, 2017 6:25 pm

Re: Improving the AWE32 emulation

Post by JosepMa »

Battler: From my experience when working on this, it seems that when programs hang while detecting, is that they expect one register to act in a specific way, and if it doens't it might either hang or refuse to detect.
As such, i recommend having a debug printing to pclog.txt of the registers being read to get an idea of what is it waiting on. Of course, since in this case we don't have the sources, it might be a bit more difficult to understand what is it expecting, if this is the case.
JosepMa
Posts: 202
Joined: Tue 20 Jun, 2017 6:25 pm

Re: Improving the AWE32 emulation

Post by JosepMa »

Hi there.

I have commited the first revision of my reworked emu8k implementation. What is noteworthy is that now, all the programs that I've said at the first post, play and don't have any annoying problem (aside of a glitch sound at the begining of AWEamp playback).

This is the comment of the commit:

First version of the reimplementation of the EMU8K emulation (Reimplementation as in redoing each part to try to work as defined, and as implemented).
Things working: Impulse Tracker, AST, Cubic Player, amp for Windows (awe32 module player), AWEAmp and Creative's MIDI playback on windows all play their files, and there's only some slight noise at the start of AWEAmp.
Things not working: Amplitude range seems to be incorrect now, it gets reduced too much. Mod/Filter envelope and LFOs are commented out (unfinished). Filter is commented out (and partially broken)
Things noteworthy: Changed the emu structures a lot, in order to avoid as much as possible AND/OR and shifting to get values. The reading and writing of registers should be as they are described in the docs. The "one sample ahead due to interpolation" is implemented. I also have an optiona cubic interpolation, but seems to be filtering too much.

- Battler: You could try if you get further on with this version on OS/2. Btw... which version ??? A friend of mine won a graphics compo back then and was rewarded a copy of OS/2 Warp 4.0. Not sure if he ever used it, although I remember trying it, so probably he did. Most probably he no longer has it.


EDIT: The linux emulation works a bit better too. At startup there is no rom playing anymore, and i could at least play mods with "gmod" (not working perfectly, but somewhat ok). I couldn't get sound out of xmp (pressing "p" gives momentary sound glitches)
JosepMa
Posts: 202
Joined: Tue 20 Jun, 2017 6:25 pm

Re: Improving the AWE32 emulation

Post by JosepMa »

Update on progress.
I've been working on the envelope and LFO engine these days, and I finally have something that seems to work quite well. I've just commited to my repository these changes and I'm quite happy to hear notable sound differences and to sound more like the real thing.

Status:
Volume envelope, Modulation Envelope and LFOs operating correctly on all parameters ( volume, pitch, filter, vibrato, tremolo, filter mod) with all their options (that means including inital delay)
Working filter, althought not sounding like the real thing. I need to find out another implementation that has a working ressonance, which the current one didn't have (it could ressonate, but only on higher frequencies).

I still would like to emulate, even if just pretending to be it, the chorus and reverb. Since people had information on what registers to program, the values of different configurations that are a bit known on how they should sound, and some of the parameters are explained on what they do, it should be possible to read those values and translate into an engine.

Sound examples:

This is how the first 30 seconds of axelf.mid file sounds with the current PCem emu8k engine axelf-emu8k-buildcurrent.opus
This is how the first 30 seconds of axelf.mid file sounds with my new emu8k engine axelf-emu8k-buildjosepma.opus
(Edit: opus is an open source codec that can be played with many things, including Android smartphones. http://opus-codec.org/ )


Edit2: Oops... seems there's something still not 100% right... now AST is not playing some notes and AWEAmp stopped playing. Time to look AGAIN at that volume envelope ( AARRRG! )
Edit3: Allright, volume problem fixed on those programs. It turned out i had a 65536 value where it should have been a 65535 because it will be stored into a uint16.
JosepMa
Posts: 202
Joined: Tue 20 Jun, 2017 6:25 pm

Re: Improving the AWE32 emulation

Post by JosepMa »

Yet two mores updates:

I made more changes to the filter. I found another implementation that acts more like the described filter, but it doesn't sound better so it is there selectable with a #define (maybe with some tweaking it could get nearer...).
Also, I made changes to the original filter and I've actually made it sound better than the other two. It probably still needs some tweaking, but I'm leaving it this way for now.

Big news! I've implemented chorus!
I have no way to know if it sounds as it should, nor if the ranges of some values are correct, but it sounds like chorus, and can be programmed from the interface, so it reacts to changing it from the AWE control panel or other programs.
There's one thing that feels unnatural: Concretely, the input to the chorus right now is mono, which means that the output of the chorus ignores panning. The schematics that i see in EMU8KPGM and sfspec24 always put the chorus and reverb aside of the panning rather than getting the input from the panned audio and I don't remember if it really was this way.

@SarahWalker: You should take a look at the code in order to prepare for a patch. Right now I have lots of comments and texts copied from other sources, plus lots of code intended for debugging (disabled with a #define). Not sure what should I do with that once we consider it is in a "working state". The repo is at: https://bitbucket.org/JosepMaJaz/pcem/
Last edited by JosepMa on Fri 21 Jul, 2017 7:59 pm, edited 1 time in total.
User avatar
SarahWalker
Site Admin
Posts: 2054
Joined: Thu 24 Apr, 2014 4:18 pm

Re: Improving the AWE32 emulation

Post by SarahWalker »

It's possible that chorus/reverb are calculated in mono. That's how those effects work on the Adlib Gold, so it may well be similar here.

Wrt to preparing the code for a patch, I've had a quick look and it generally looks okay. I'd ask that you look at this post - viewtopic.php?f=3&t=5 - and fix up the code to follow the style described in it.

Most of the comments look fine to me; I've dropped in bits of external texts where it seems to be useful. Debugging code controlled by a #define is fine. I did see a little dead code - it would be good if that could be cleaned up unless there's a good reason for it being there.

Other than that, it's looking good!
Post Reply