#include "newcpu.h"
#include "autoconf.h"
#include "gensound.h"
+#include "audio.h"
#include "sounddep/sound.h"
#include "events.h"
-#include "audio.h"
#include "savestate.h"
#include "driveclick.h"
#include "zfile.h"
for (i = 0; i < 256; i++)
for (j = 0; j < 64; j++)
- sound_table[j][i] = j * (uae_s8)i * (currprefs.sound_stereo ? 2 : 1);
+ sound_table[j][i] = j * (uae_s8)i * get_audio_ismono() ? 1 : 2;
}
void init_sound_table8 (void)
for (i = 0; i < 256; i++)
for (j = 0; j < 64; j++)
- sound_table[j][i] = (j * (uae_s8)i * (currprefs.sound_stereo ? 2 : 1)) / 256;
+ sound_table[j][i] = (j * (uae_s8)i * get_audio_ismono() ? 1 : 2) / 256;
}
#define MULTIPLICATION_PROFITABLE
#define MAX_DELAY_BUFFER 1024
static uae_u32 right_word_saved[MAX_DELAY_BUFFER];
static uae_u32 left_word_saved[MAX_DELAY_BUFFER];
-static int saved_ptr;
+static uae_u32 right2_word_saved[MAX_DELAY_BUFFER];
+static uae_u32 left2_word_saved[MAX_DELAY_BUFFER];
+static int saved_ptr, saved_ptr2;
#define MIXED_STEREO_MAX 32
static int mixed_on, mixed_stereo_size, mixed_mul1, mixed_mul2;
static struct filter_state {
float rc1, rc2, rc3, rc4, rc5;
-} sound_filter_state[2];
+} sound_filter_state[4];
static float a500e_filter1_a0;
static float a500e_filter2_a0;
PUT_SOUND_WORD_RIGHT (w);
}
-STATIC_INLINE void put_sound_word_left (uae_u32 w)
+STATIC_INLINE void put_sound_word_left (uae_u32 w)
{
if (mixed_on) {
uae_u32 rold, lold, rnew, lnew, tmp;
PUT_SOUND_WORD_LEFT (w);
}
+STATIC_INLINE void put_sound_word_right2 (uae_u32 w)
+{
+ if (mixed_on) {
+ right2_word_saved[saved_ptr2] = w;
+ return;
+ }
+ PUT_SOUND_WORD_RIGHT2 (w);
+}
+
+STATIC_INLINE void put_sound_word_left2 (uae_u32 w)
+{
+ if (mixed_on) {
+ uae_u32 rold, lold, rnew, lnew, tmp;
+
+ left2_word_saved[saved_ptr2] = w;
+ lnew = w - SOUND16_BASE_VAL;
+ rnew = right2_word_saved[saved_ptr2] - SOUND16_BASE_VAL;
+
+ saved_ptr2 = (saved_ptr2 + 1) & mixed_stereo_size;
+
+ lold = left2_word_saved[saved_ptr2] - SOUND16_BASE_VAL;
+ tmp = (rnew * mixed_mul1 + lold * mixed_mul2) / MIXED_STEREO_MAX;
+ tmp += SOUND16_BASE_VAL;
+ PUT_SOUND_WORD_RIGHT2 (tmp);
+
+ rold = right2_word_saved[saved_ptr2] - SOUND16_BASE_VAL;
+ w = (lnew * mixed_mul1 + rold * mixed_mul2) / MIXED_STEREO_MAX;
+ }
+ PUT_SOUND_WORD_LEFT2 (w);
+}
+
+
#define DO_CHANNEL(v, c) do { (v) &= audio_channel[c].adk_mask; data += v; } while (0);
static void anti_prehandler(unsigned long best_evtime)
}
#ifdef HAVE_STEREO_SUPPORT
+
void sample16ss_handler (void)
{
uae_u32 data0 = audio_channel[0].current_sample;
data2 &= audio_channel[2].adk_mask;
data3 &= audio_channel[3].adk_mask;
- PUT_SOUND_WORD (data0 << 2);
- PUT_SOUND_WORD (data1 << 2);
- PUT_SOUND_WORD (data3 << 2);
- PUT_SOUND_WORD (data2 << 2);
+ put_sound_word_left (data0 << 2);
+ put_sound_word_right (data1 << 2);
+ if (currprefs.sound_stereo == SND_6CH) {
+ PUT_SOUND_WORD (0);
+ PUT_SOUND_WORD (0);
+ }
+ put_sound_word_left2 (data3 << 2);
+ put_sound_word_right2 (data2 << 2);
check_sound_buffers ();
}
/* This interpolator examines sample points when Paula switches the output
* voltage and computes the average of Paula's output */
+
+void sample16ss_anti_handler (void)
+{
+ int datas[4];
+
+ samplexx_anti_handler (datas);
+ put_sound_word_left (datas[0] << 2);
+ put_sound_word_right (datas[1] << 2);
+ if (currprefs.sound_stereo == SND_6CH) {
+ PUT_SOUND_WORD (0);
+ PUT_SOUND_WORD (0);
+ }
+ put_sound_word_left2 (datas[3] << 2);
+ put_sound_word_right2 (datas[2] << 2);
+ check_sound_buffers ();
+}
+
static void sample16si_anti_handler (void)
{
int datas[4], data1, data2;
check_sound_buffers ();
}
+void sample16ss_sinc_handler (void)
+{
+ int datas[4];
+
+ samplexx_sinc_handler (datas);
+ put_sound_word_left (datas[0] << 2);
+ put_sound_word_right (datas[1] << 2);
+ if (currprefs.sound_stereo == SND_6CH) {
+ PUT_SOUND_WORD (0);
+ PUT_SOUND_WORD (0);
+ }
+ put_sound_word_left2 (datas[3] << 2);
+ put_sound_word_right2 (datas[2] << 2);
+ check_sound_buffers ();
+}
static void sample16si_sinc_handler (void)
{
: currprefs.sound_interpol == 4 ? sample16si_crux_handler
: currprefs.sound_interpol == 2 ? sample16si_sinc_handler
: sample16si_anti_handler);
+ } else if (sample_handler == sample16ss_handler
+ || sample_handler == sample16ss_sinc_handler
+ || sample_handler == sample16ss_anti_handler)
+ {
+ sample_handler = (currprefs.sound_interpol == 0 ? sample16ss_handler
+ : currprefs.sound_interpol == 3 ? sample16ss_handler
+ : currprefs.sound_interpol == 4 ? sample16ss_handler
+ : currprefs.sound_interpol == 2 ? sample16ss_sinc_handler
+ : sample16ss_anti_handler);
}
sample_prehandler = NULL;
- if (sample_handler == sample16si_sinc_handler || sample_handler == sample16i_sinc_handler) {
+ if (sample_handler == sample16si_sinc_handler || sample_handler == sample16i_sinc_handler || sample_handler == sample16ss_sinc_handler) {
sample_prehandler = sinc_prehandler;
sound_use_filter_sinc = sound_use_filter;
sound_use_filter = 0;
- } else if (sample_handler == sample16si_anti_handler || sample_handler == sample16i_anti_handler) {
+ } else if (sample_handler == sample16si_anti_handler || sample_handler == sample16i_anti_handler || sample_handler == sample16ss_anti_handler) {
sample_prehandler = anti_prehandler;
}
#include "options.h"
#include "uae.h"
+#include "audio.h"
#include "autoconf.h"
#include "events.h"
#include "custom.h"
static const char *soundmode2[] = { "none", "interrupts", "good", "best", 0 };
static const char *centermode1[] = { "none", "simple", "smart", 0 };
static const char *centermode2[] = { "false", "true", "smart", 0 };
-static const char *stereomode[] = { "mono", "stereo", "clonedstereo", "4ch", "mixed", 0 };
+static const char *stereomode[] = { "mono", "stereo", "clonedstereo", "4ch", "clonedstereo6ch", "6ch", "mixed", 0 };
static const char *interpolmode[] = { "none", "anti", "sinc", "rh", "crux", 0 };
static const char *collmode[] = { "none", "sprites", "playfields", "full", 0 };
static const char *compmode[] = { "direct", "indirect", "indirectKS", "afterPic", 0 };
}
if (cfgfile_strval (option, value, "sound_channels", &p->sound_stereo, stereomode, 1)) {
- if (p->sound_stereo == 4) { /* "mixed stereo" compatibility hack */
- p->sound_stereo = 1;
+ if (p->sound_stereo == SND_NONE) { /* "mixed stereo" compatibility hack */
+ p->sound_stereo = SND_STEREO;
p->sound_mixed_stereo = 5;
p->sound_stereo_separation = 7;
}
if (x1) {
p->sound_stereo_separation = 0;
if (*x1 == 'S') {
- p->sound_stereo = 1;
+ p->sound_stereo = SND_STEREO;
p->sound_stereo_separation = 7;
} else if (*x1 == 's')
- p->sound_stereo = 1;
+ p->sound_stereo = SND_STEREO;
else
- p->sound_stereo = 0;
+ p->sound_stereo = SND_MONO;
}
if (x2)
p->sound_bits = atoi (x2);
p->keyboard_lang = KBD_LANG_US;
p->produce_sound = 3;
- p->sound_stereo = 1;
+ p->sound_stereo = SND_STEREO;
p->sound_stereo_separation = 7;
p->sound_mixed_stereo = 0;
p->sound_bits = DEFAULT_SOUND_BITS;
{
#if 0
p->sound_filter = FILTER_SOUND_OFF;
- p->sound_stereo = 1;
+ p->sound_stereo = SND_STEREO;
p->sound_stereo_separation = 7;
p->sound_mixed_stereo = 0;
#endif
#include "options.h"
#include "uae.h"
#include "gensound.h"
+#include "audio.h"
#include "sounddep/sound.h"
#include "events.h"
#include "memory.h"
#include "blitter.h"
#include "xwin.h"
#include "inputdevice.h"
-#include "audio.h"
#include "keybuf.h"
#include "serial.h"
#include "osemu.h"
#include "cia.h"
#include "xwin.h"
#include "identify.h"
+#include "audio.h"
#include "sound.h"
#include "disk.h"
#include "savestate.h"
#include "uae.h"
#include "options.h"
+#include "audio.h"
#include "sounddep/sound.h"
#include "zfile.h"
#include "events.h"
#include "driveclick.h"
-#include "audio.h"
static struct drvsample drvs[4][DS_END];
static int freq = 44100;
static void mix (void)
{
- int total = ((uae_u8*)sndbufpt - (uae_u8*)sndbuffer) / ((currprefs.sound_stereo == 3) ? 8 : (currprefs.sound_stereo ? 4 : 2));
+ int total = ((uae_u8*)sndbufpt - (uae_u8*)sndbuffer) / (get_audio_nativechannels() * 2);
if (currprefs.dfxclickvolume > 0) {
while (clickcnt < total) {
return;
mix();
clickcnt = 0;
- if (currprefs.sound_stereo) {
+ if (!get_audio_ismono()) {
for (i = 0; i < size / 2; i++) {
uae_s16 s = clickbuffer[i];
sndbuffer[0] = limit(((sndbuffer[0] + s) * 2) / 3);
int type, devno;
UnitInfo *ui;
char *devname = 0, *volname = 0, *rootdir = 0, *filesysdir = 0;
- int bootpri, readonly, hdc;
+ int bootpri, readonly;
if (restore_u32 () != 2)
return src;
ps(10, "68000", 20); /* serial */
pw(20, 3);
pw(21, 512);
- ps(23, "0.1", 8); /* firmware revision */
+ ps(23, "0.2", 8); /* firmware revision */
ps(27, "UAE-IDE", 40); /* model */
pw(47, 128); /* max 128 sectors multiple mode */
pw(48, 1);
pw(49, (1 << 9) | (1 << 8)); /* LBA and DMA supported */
- pw(53, 1);
+ pw(51, 240 << 8); /* PIO0 to PIO2 supported */
+ pw(53, 1 | 2);
pw(54, ide->cyls);
pw(55, ide->heads);
pw(56, ide->secspertrack);
pw(61, totalsecs >> 16);
pw(62, 0x0f);
pw(63, 0x0f);
+ pw(64, 0x03); /* PIO3 and PIO4 */
+ pw(65, 120 << 8); /* MDMA2 supported */
+ pw(66, 120 << 8);
+ pw(67, 120 << 8);
+ pw(68, 120 << 8);
+ pw(80, (1 << 1) | (1 << 2) | (1 << 3)); /* ATA-1 to ATA-3 */
+ pw(81, 0x000A); /* ATA revision */
}
static void ide_initialize_drive_parameters(void)
{
struct ide_hdf *ide = &idedrive[ide_drv];
if (ide->size) {
- ide->secspertrack = ide_nsector;
+ ide->secspertrack = ide_nsector == 0 ? 256 : ide_nsector;
ide->heads = (ide_select & 15) + 1;
ide->cyls = (ide->size / 512) / (ide->secspertrack * ide->heads);
+ if (ide->heads * ide->cyls * ide->secspertrack > 16515072) {
+ ide->cyls = ide->cyls_def;
+ ide->heads = ide->heads_def;
+ ide->secspertrack = ide->secspertrack_def;
+ }
} else {
ide_error |= IDE_ERR_ABRT;
idedrive[ide_drv].status |= IDE_STATUS_ERR;
}
}
+void getchs2 (struct hardfiledata *hfd, int *pcyl, int *phead, int *psectorspertrack)
+{
+ unsigned int total = (unsigned int)(hfd->size / 512);
+ int i, head , cyl, spt;
+ int sptt[] = { 63, 127, 255, -1 };
+
+ if (total > 16515072) {
+ /* >8G, CHS=16383/16/63 */
+ *pcyl = 16383;
+ *phead = 16;
+ *psectorspertrack = 63;
+ return;
+ }
+
+ for (i = 0; sptt[i] >= 0; i++) {
+ spt = sptt[i];
+ for (head = 4; head <= 16;head++) {
+ cyl = total / (head * spt);
+ if (hfd->size <= 512 * 1024 * 1024) {
+ if (cyl <= 1023)
+ break;
+ } else {
+ if (cyl < 16383)
+ break;
+ if (cyl < 32767 && head >= 5)
+ break;
+ if (cyl <= 65535)
+ break;
+ }
+ }
+ if (head <= 16)
+ break;
+ }
+ *pcyl = cyl;
+ *phead = head;
+ *psectorspertrack = spt;
+}
+
int gayle_add_ide_unit(int ch, char *path, int blocksize, int readonly)
{
struct ide_hdf *ide;
- uae_u8 bufrdb[512];
- int i;
- int cyls, secspertrack, heads, tpt;
if (ch >= 2)
return -1;
return -1;
ide->path = my_strdup(path);
write_log("IDE%d initialized ('%s')\n", ch, path);
- cyls = secspertrack = heads = 0;
- for (i = 0; i < 64; i++) {
- memset(bufrdb, 0, 512);
- hdf_read(&ide->hfd, bufrdb, 0, 512);
- if (!memcmp(bufrdb, "RDSK", 4)) {
- ide->hfd.cylinders = rl (bufrdb + 64);
- ide->hfd.sectors = rl (bufrdb + 68);
- ide->hfd.heads = rl (bufrdb + 72);
- break;
- }
- }
- getchs2(&ide->hfd, &ide->cyls, &tpt, &ide->heads, &ide->secspertrack);
+ getchs2(&ide->hfd, &ide->cyls, &ide->heads, &ide->secspertrack);
ide->cyls_def = ide->cyls;
ide->secspertrack_def = ide->secspertrack;
ide->heads_def = ide->heads;
return 0; /* Simply ignore this one... */
}
-void getchs2 (struct hardfiledata *hfd, int *cyl, int *cylsec, int *head, int *tracksec)
+static void getchs2 (struct hardfiledata *hfd, int *cyl, int *cylsec, int *head, int *tracksec)
{
unsigned int total = (unsigned int)(hfd->size / 1024);
int heads;
extern void audio_sampleripper(int);
extern int sampleripper_enabled;
extern void write_wavheader (struct zfile *wavfile, uae_u32 size, uae_u32 freq);
+
+enum {
+ SND_MONO, SND_STEREO, SND_4CH_CLONEDSTEREO, SND_4CH, SND_6CH_CLONEDSTEREO, SND_6CH, SND_NONE };
+STATIC_INLINE int get_audio_nativechannels(void)
+{
+ int ch[] = { 1, 2, 4, 4, 6, 6, 0 };
+ return ch[currprefs.sound_stereo];
+}
+STATIC_INLINE int get_audio_amigachannels(void)
+{
+ int ch[] = { 1, 2, 2, 4, 2, 4, 0 };
+ return ch[currprefs.sound_stereo];
+}
+STATIC_INLINE int get_audio_ismono(void)
+{
+ if (currprefs.sound_stereo == 0)
+ return 1;
+ return 0;
+}
\ No newline at end of file
extern int hdf_init (void);
extern int isspecialdrive(const char *name);
extern int get_native_path(uae_u32 lock, char *out);
-extern void getchs2 (struct hardfiledata *hfd, int *cyl, int *cylsec, int *head, int *tracksec);
#include "ar.h"
#include "gui.h"
#include "disk.h"
+#include "audio.h"
#include "sound.h"
#include "savestate.h"
#include "arcadia.h"
#include "sysdeps.h"
#include "options.h"
+#include "audio.h"
#include "memory.h"
#include "events.h"
#include "custom.h"
#include "sysconfig.h"
#include "sysdeps.h"
#include "options.h"
+#include "audio.h"
#include "custom.h"
#include "picasso96.h"
#include "dxwrap.h"
// set the source format
wfxSrc.wFormatTag = WAVE_FORMAT_PCM;
- wfxSrc.nChannels = currprefs.sound_stereo == 3 ? 4 : (currprefs.sound_stereo ? 2 : 1);
+ wfxSrc.nChannels = get_audio_nativechannels();
wfxSrc.nSamplesPerSec = workprefs.sound_freq;
wfxSrc.nBlockAlign = wfxSrc.nChannels * (workprefs.sound_bits / 8);
wfxSrc.nAvgBytesPerSec = wfxSrc.nBlockAlign * wfxSrc.nSamplesPerSec;
uae_u16 tw;
uae_u32 tl;
int bits = 16;
- int channels = currprefs.sound_stereo == 3 ? 4 : (currprefs.sound_stereo ? 2 : 1);
+ int channels = get_audio_nativechannels();
fseek (wavfile, 0, SEEK_SET);
fwrite ("RIFF", 1, 4, wavfile);
#include "uae.h"
#include "gui.h"
#include "options.h"
+#include "audio.h"
#include "memory.h"
#include "custom.h"
#include "events.h"
CONTROL "Slider1",IDC_SOUNDBUFFERRAM,"msctls_trackbar32",TBS_AUTOTICKS | TBS_TOP | WS_TABSTOP,138,81,106,19
EDITTEXT IDC_SOUNDBUFFERMEM,248,84,40,12,ES_CENTER | ES_READONLY
GROUPBOX "Settings",IDC_SOUNDINTERPOLATION2,6,114,290,60
- LTEXT "Frequency:",IDC_SOUNDFREQTXT,11,124,53,8,SS_CENTERIMAGE
- COMBOBOX IDC_SOUNDFREQ,13,133,51,75,CBS_DROPDOWN | WS_VSCROLL | WS_TABSTOP
+ LTEXT "Frequency:",IDC_SOUNDFREQTXT,11,147,53,8,SS_CENTERIMAGE
+ COMBOBOX IDC_SOUNDFREQ,13,156,51,75,CBS_DROPDOWN | WS_VSCROLL | WS_TABSTOP
LTEXT "Audio filter:",IDC_SOUNDFILTERTXT,209,148,77,8,SS_CENTERIMAGE
COMBOBOX IDC_SOUNDFILTER,209,157,80,75,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
- LTEXT "Stereo mode:",IDC_SOUNDSTEREOTXT,74,124,57,8,SS_CENTERIMAGE
- COMBOBOX IDC_SOUNDSTEREO,73,133,62,75,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+ LTEXT "Channel mode:",IDC_SOUNDSTEREOTXT,11,124,57,8,SS_CENTERIMAGE
+ COMBOBOX IDC_SOUNDSTEREO,13,133,122,75,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
LTEXT "Interpolation:",IDC_SOUNDINTERPOLATIONTXT,209,124,75,8,SS_CENTERIMAGE
COMBOBOX IDC_SOUNDINTERPOLATION,209,132,80,75,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
LTEXT "Stereo separation:",IDC_SOUNDSTEREOSEPTXT,141,124,63,8,SS_CENTERIMAGE
STRINGTABLE
BEGIN
- IDS_SOUND_STEREO2 "Cloned Stereo"
+ IDS_SOUND_STEREO2 "Cloned Stereo (4 Channels)"
IDS_INPUT_CUSTOMEVENT "<Custom event>"
END
#include "sysdeps.h"
#include "options.h"
+#include "audio.h"
#include "memory.h"
#include "events.h"
#include "custom.h"
#include "win32.h"
#include "savestate.h"
#include "driveclick.h"
-#include "audio.h"
#include <windows.h>
#include <mmsystem.h>
snd_totalmaxoffset_of = max_sndbufsize + (dsoundbuf - max_sndbufsize) * 3 / 9;
snd_totalmaxoffset_uf = max_sndbufsize + (dsoundbuf - max_sndbufsize) * 7 / 9;
}
-
+
const static GUID KSDATAFORMAT_SUBTYPE_PCM = {0x00000001,0x0000,0x0010,
{0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71}};
WAVEFORMATEXTENSIBLE wavfmt;
LPDIRECTSOUNDBUFFER pdsb;
int freq = currprefs.sound_freq;
- int ch = (currprefs.sound_stereo == 3 || currprefs.sound_stereo == 2) ? 4 : (currprefs.sound_stereo ? 2 : 1);
+ int ch = get_audio_nativechannels();
int round;
enumerate_sound_devices (0);
- if (ch == 4) {
- size <<= 3;
- } else {
- size <<= 1;
- if (ch == 2)
- size <<= 1;
- }
+ size *= ch * 2;
snd_configsize = size;
sndbufsize = size / 32;
if (sndbufsize > SND_MAX_BUFFER)
wavfmt.Format.nSamplesPerSec = freq;
wavfmt.Format.wBitsPerSample = 16;
if (extend) {
- DWORD ksmode = round == 1 ? KSAUDIO_SPEAKER_QUAD : (round == 2 ? KSAUDIO_SPEAKER_SURROUND : SPEAKER_ALL);
- extname = round == 1 ? "QUAD" : (round == 2 ? "SUR" : "ALL");
+ DWORD ksmode;
+ if (ch == 6) {
+ ksmode = KSAUDIO_SPEAKER_5POINT1;
+ extname = "5.1";
+ } else {
+ ksmode = round == 1 ? KSAUDIO_SPEAKER_QUAD : (round == 2 ? KSAUDIO_SPEAKER_SURROUND : SPEAKER_ALL);
+ extname = round == 1 ? "QUAD" : (round == 2 ? "SUR" : "ALL");
+ }
wavfmt.Format.cbSize = sizeof (WAVEFORMATEXTENSIBLE) - sizeof (WAVEFORMATEX);
wavfmt.SubFormat = KSDATAFORMAT_SUBTYPE_PCM;
wavfmt.Samples.wValidBitsPerSample = 16;
setvolume ();
cleardsbuffer ();
init_sound_table16 ();
- if (currprefs.sound_stereo == 3)
+ if (get_audio_amigachannels() == 4)
sample_handler = sample16ss_handler;
else
- sample_handler = currprefs.sound_stereo ? sample16s_handler : sample16_handler;
+ sample_handler = get_audio_ismono() ? sample16_handler : sample16s_handler;
obtainedfreq = currprefs.sound_freq;
sndbuffer[i + 1] = t;
}
}
+static void channelswap6(uae_s16 *sndbuffer, int len)
+{
+ int i;
+ for (i = 0; i < len; i += 6) {
+ uae_s16 t = sndbuffer[i + 0];
+ sndbuffer[i + 0] = sndbuffer[i + 1];
+ sndbuffer[i + 1] = t;
+ t = sndbuffer[i + 4];
+ sndbuffer[i + 4] = sndbuffer[i + 5];
+ sndbuffer[i + 5] = t;
+ }
+}
void finish_sound_buffer (void)
{
if (turbo_emulation)
return;
- if (ISSTEREO(currprefs) && currprefs.sound_stereo_swap_paula)
- channelswap((uae_s16*)sndbuffer, sndbufsize / 2);
+ if (currprefs.sound_stereo_swap_paula) {
+ if (get_audio_nativechannels() == 2 || get_audio_nativechannels() == 4)
+ channelswap((uae_s16*)sndbuffer, sndbufsize / 2);
+ else if (get_audio_nativechannels() == 6)
+ channelswap6((uae_s16*)sndbuffer, sndbufsize / 2);
+ }
#ifdef DRIVESOUND
driveclick_mix ((uae_s16*)sndbuffer, sndbufsize / 2);
#endif
STATIC_INLINE void check_sound_buffers (void)
{
- if (currprefs.sound_stereo == 2) {
+ if (currprefs.sound_stereo == SND_4CH_CLONEDSTEREO) {
((uae_u16*)sndbufpt)[0] = ((uae_u16*)sndbufpt)[-2];
((uae_u16*)sndbufpt)[1] = ((uae_u16*)sndbufpt)[-1];
- sndbufpt = (uae_u16 *)(((uae_u8 *)sndbufpt) + 4);
+ sndbufpt = (uae_u16 *)(((uae_u8 *)sndbufpt) + 2 * 2);
+ } else if (currprefs.sound_stereo == SND_6CH_CLONEDSTEREO) {
+ ((uae_u16*)sndbufpt)[2] = ((uae_u16*)sndbufpt)[-2];
+ ((uae_u16*)sndbufpt)[3] = ((uae_u16*)sndbufpt)[-1];
+ sndbufpt = (uae_u16 *)(((uae_u8 *)sndbufpt) + 4 * 2);
}
if ((char *)sndbufpt - (char *)sndbuffer >= sndbufsize) {
finish_sound_buffer ();
#define PUT_SOUND_WORD_LEFT(b) do { if (currprefs.sound_filter) b = filter (b, &sound_filter_state[0]); PUT_SOUND_WORD(b); } while (0)
#define PUT_SOUND_BYTE_RIGHT(b) PUT_SOUND_BYTE(b)
#define PUT_SOUND_WORD_RIGHT(b) do { if (currprefs.sound_filter) b = filter (b, &sound_filter_state[1]); PUT_SOUND_WORD(b); } while (0)
+#define PUT_SOUND_WORD_LEFT2(b) do { if (currprefs.sound_filter) b = filter (b, &sound_filter_state[2]); PUT_SOUND_WORD(b); } while (0)
+#define PUT_SOUND_WORD_RIGHT2(b) do { if (currprefs.sound_filter) b = filter (b, &sound_filter_state[3]); PUT_SOUND_WORD(b); } while (0)
+
#define PUT_SOUND_WORD_MONO(b) PUT_SOUND_WORD_LEFT(b)
#define SOUND16_BASE_VAL 0
#define SOUND8_BASE_VAL 128
#define FILTER_SOUND_TYPE_A500 0
#define FILTER_SOUND_TYPE_A1200 1
-#define ISSTEREO(p) (p.sound_stereo == 1 || p.sound_stereo == 2)
#include "sysdeps.h"
#include "options.h"
+#include "audio.h"
#include "sound.h"
#include "uae.h"
#include "memory.h"
#include "lcd.h"
#include "uaeipc.h"
#include "ar.h"
-#include "audio.h"
#include "akiko.h"
#include "cdtv.h"
#define GETBDM(x) (((x) - ((x / 10000) * 10000)) / 100)
#define GETBDD(x) ((x) % 100)
-#define WINUAEBETA 5
+#define WINUAEBETA 6
#define WINUAEPUBLICBETA 1
-#define WINUAEDATE MAKEBD(2007, 4, 8)
+#define WINUAEDATE MAKEBD(2007, 4, 9)
#define IHF_WINDOWHIDDEN 6
#define NORMAL_WINDOW_STYLE (WS_VISIBLE | WS_BORDER | WS_CAPTION | WS_MINIMIZEBOX | WS_SYSMENU)
#include "sysdeps.h"
#include "options.h"
+#include "audio.h"
#include "uae.h"
#include "memory.h"
#include "custom.h"
ew (hDlg, IDC_FREQUENCY, workprefs.produce_sound);
ew (hDlg, IDC_SOUNDFREQ, workprefs.produce_sound ? TRUE : FALSE);
ew (hDlg, IDC_SOUNDSTEREO, workprefs.produce_sound);
- ew (hDlg, IDC_SOUNDINTERPOLATION, workprefs.sound_stereo < 3 && workprefs.produce_sound);
+ ew (hDlg, IDC_SOUNDINTERPOLATION, workprefs.produce_sound);
ew (hDlg, IDC_SOUNDVOLUME, workprefs.produce_sound);
ew (hDlg, IDC_SOUNDVOLUME2, workprefs.produce_sound);
- ew (hDlg, IDC_SOUNDSTEREOSEP, ISSTEREO(workprefs) && workprefs.produce_sound);
- ew (hDlg, IDC_SOUNDSTEREOMIX, ISSTEREO(workprefs) && workprefs.produce_sound);
+ ew (hDlg, IDC_SOUNDSTEREOSEP, workprefs.sound_stereo > 0 && workprefs.produce_sound);
+ ew (hDlg, IDC_SOUNDSTEREOMIX, workprefs.sound_stereo > 0 && workprefs.produce_sound);
ew (hDlg, IDC_SOUNDBUFFERMEM, workprefs.produce_sound);
ew (hDlg, IDC_SOUNDBUFFERRAM, workprefs.produce_sound);
SendDlgItemMessage(hDlg, IDC_SOUNDSTEREO, CB_ADDSTRING, 0, (LPARAM)txt);
WIN32GUI_LoadUIString (IDS_SOUND_4CHANNEL, txt, sizeof (txt));
SendDlgItemMessage(hDlg, IDC_SOUNDSTEREO, CB_ADDSTRING, 0, (LPARAM)txt);
+ SendDlgItemMessage(hDlg, IDC_SOUNDSTEREO, CB_ADDSTRING, 0, (LPARAM)"Cloned Stereo (4 Channels in 5.1)");
+ SendDlgItemMessage(hDlg, IDC_SOUNDSTEREO, CB_ADDSTRING, 0, (LPARAM)"4 Channels in 5.1");
SendDlgItemMessage (hDlg, IDC_SOUNDSTEREO, CB_SETCURSEL, workprefs.sound_stereo, 0);
SendDlgItemMessage(hDlg, IDC_SOUNDSWAP, CB_RESETCONTENT, 0, 0);
+Beta 6:
+
+- added 4 channel and cloned stereo in 5.1 native mode. Workaround for
+ non-working 4.0 modes on many sound cards. (5.1 center and lf
+ channels are silent currently)
+- 4ch/6ch mode swap channel, interpolation, filter (anti and sinc only)
+ and stereo separation support added
+- IDE CHS calculation fixed. Max heads is always 16 and max sectors is
+ 63 for drives smaller than 8GB. (A600/A1200 crashed or gurued with
+ large HDF images) >8G should also work, current "hardware" max limit
+ is 128G (no LBA48 support) NOTE: CHS value is only imaginary value for
+ compatibility purposes and it has nothing to do with real geometry, it
+ can even change and HD still works fine. Internally it is always
+ translated to LBA.
+- added some ATA-3 bits to identify drive reply
+
Beta 5:
- A600/A1200 and A4000 IDE emulation (mount RDB HDF as a IDE drive)
basically are base IO address and different interrupt register..
- HRTMon IDE activated if IDE emulation enabled. AR A1200 also works.
+- 68020/68030 + JIT random crashing fixed (b4)
- non-3d filters work again (broke in 1.4.2b2)
- Agnus/Denise revision settings re-added to advanced chipset
- added non-EHB A1000 to Quickstart (not yet in advanced chipset),