avatar_mr_lou

Which emulator has the most accurate sound playback?

Started by mr_lou, 16:51, 14 June 11

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Devilmarkus

Quote from: mcklain on 11:50, 18 June 11
Oh, i hear digidrums.

Yes, this tune uses digidrums... (That already worked before) ;)
When you put your ear on a hot stove, you can smell how stupid you are ...

Amstrad CPC games in your webbrowser

JavaCPC Desktop Full Release

Gryzor

Quote from: Devilmarkus on 21:57, 15 June 11
Well, I read what mr lou wrote and so I coded a new audio-settings panel, where you can now user-define your own "very special volume table".
You can now select the "User" preset as volume table and paint with your mouse inside the level-diagram.
The volumes are stored in JavaCPC's ini file and so it restores them when you restart it.
Demonstration:
http://cpc-live.com/ay_settings



Wow, a real-time EQ. Kudos!

Executioner

Quote from: Devilmarkus on 11:46, 18 June 11
Fixed the music in Tire-Au-Flan demo.
Problem: The AY 3 8912 chip uses 16 registers but should be handled like it has 32 registers...

Not sure about this actually Markus. I need to do some more testing.

arnoldemu

Quote from: Executioner on 01:24, 21 June 11
Not sure about this actually Markus. I need to do some more testing.
same here, I re-read the datasheet, made a test program (not run it yet), and it does have only 16 registers.

My games. My Games
My website with coding examples: Unofficial Amstrad WWW Resource

arnoldemu

Quote from: arnoldemu on 09:37, 21 June 11
same here, I re-read the datasheet, made a test program (not run it yet), and it does have only 16 registers.
I have a program for the cpc that reads the ay registers, does some testing. In the datasheet it says the lower 4 bits are for register select, but only if the upper 4 bits are 0000 exactly. The program tests this, and checks what happens if you write an "invalid" register.

If anyone can test it for me (on a real cpc) and provide me with the results please send me a private message with your e-mail and I will send it to you.

The program lists a lot of numbers, then changes some sound registers (so you need to listen).
My games. My Games
My website with coding examples: Unofficial Amstrad WWW Resource

robcfg

As for the number of registers, it depends on the AY model, because the 8910 has two IO ports that are accessed as registers, whereas the 8912 has only one IO port and the 8913 has no IO ports.


The YM files contain always 16 registers because the last two of them are used to control the digidrums.By the way, could anyone point me to some info on how the digidrums are stored and how they work?


I found a datasheet that has some errors, it claims that the chip has 16 registers but they are ill numbered in the description and registers 8 and 9 are not there, that left us with the usual 14 sound-generation registers plus the two IO registers.

Phi2x

#56
.

robcfg

Quote from: phi2x on 10:57, 21 June 11
I saw that datasheet. It's because it references the registers by using octal numerotation instead of decimal.
So the 16 registers are then numbered from 0 to 7 and 10 to 17.


Hey, thanks!


I found it too weird and I didn't thought they'd go for anything different as decimal or hexadecimal....

Executioner

The datasheet is correct in this case. There are 16 registers, selecting anything greater than 16 means the data written is ignored since the chip is not selected. This also applies to the extra pins on the AY (A8/A9) which appear to be stored in the internal 10 bit register. GI made some of these chips with different chip select settings so you'd have to use a different set of top bits.

As far as the CPC is concerned, since it's an 8912 and R8/9 aren't used, and all the chips have 000000 select, just ignore data writes if the selected register > 15, and return #ff for register reads.

Executioner

Quote from: robcfg on 11:13, 21 June 11
I found it too weird and I didn't thought they'd go for anything different as decimal or hexadecimal....

Octal was used quite often in electronics and data sheets. This one caught me out the other day.

arnoldemu

#60
Quote from: Executioner on 11:41, 21 June 11
The datasheet is correct in this case. There are 16 registers, selecting anything greater than 16 means the data written is ignored since the chip is not selected. This also applies to the extra pins on the AY (A8/A9) which appear to be stored in the internal 10 bit register. GI made some of these chips with different chip select settings so you'd have to use a different set of top bits.

As far as the CPC is concerned, since it's an 8912 and R8/9 aren't used, and all the chips have 000000 select, just ignore data writes if the selected register > 15, and return #ff for register reads.
My tests confirm the read.

Registers 0-15 return data.
Registers 16-255 return 0x0ff.

My tests for writes were not as conclusive as I hoped.. but they seem to lean towards ignoring data writes (for registers >=16).
My games. My Games
My website with coding examples: Unofficial Amstrad WWW Resource

Devilmarkus

Quote from: arnoldemu on 16:38, 21 June 11
My tests confirm the read.

Registers 0-15 return data.
Registers 16-255 return 0x0ff.

My tests for writes were not as conclusive as I hoped.. but they seem to lean towards ignoring data writes (for registers >=16).

When I return the data here as you explain... (And as how it is in JEMU) the game "death wish 3", "prehistorik 1" (and perhaps more unknown) do strange things:
http://cpc-live.com/dw3bug/
I did not touch the keyboard while I recorded this video...
When you put your ear on a hot stove, you can smell how stupid you are ...

Amstrad CPC games in your webbrowser

JavaCPC Desktop Full Release

Executioner

Quote from: Devilmarkus on 17:32, 21 June 11
When I return the data here as you explain... (And as how it is in JEMU) the game "death wish 3", "prehistorik 1" (and perhaps more unknown) do strange things:
http://cpc-live.com/dw3bug/
I did not touch the keyboard while I recorded this video...

I'm pretty sure WinAPE isn't doing that, perhaps it's the other fix you put in for Thing On a Spring, which isn't required... Maybe you should try the new AY code.

Devilmarkus

Quote from: Executioner on 04:00, 22 June 11
I'm pretty sure WinAPE isn't doing that, perhaps it's the other fix you put in for Thing On a Spring, which isn't required... Maybe you should try the new AY code.

Well, it's not because a patch. This bug already happened in the old AY code... ;)
I will give the new code a go...
When you put your ear on a hot stove, you can smell how stupid you are ...

Amstrad CPC games in your webbrowser

JavaCPC Desktop Full Release

Devilmarkus

I tested the game Death Wish 3 with the new AY code.
The keyboard bug still remains...  :'(
When you put your ear on a hot stove, you can smell how stupid you are ...

Amstrad CPC games in your webbrowser

JavaCPC Desktop Full Release

arnoldemu

#65
Quote from: Devilmarkus on 08:04, 22 June 11
I tested the game Death Wish 3 with the new AY code.
The keyboard bug still remains...  :'(
I have updated my ay code and it works fine.
So you have another bug somewhere.

edit: death wish 3 doesn't autostart for me.

I think I have another bug in the keyboard handling because two mag's menu doesn't seem to respond to key presses for me.
I will fix this soon.


My games. My Games
My website with coding examples: Unofficial Amstrad WWW Resource

Xyphoe

I hope Richard doesn't take offense to this, but I have to admit having tried this recently the music and sfx does sound a lot more 'vibrant' in CPCE compared to WinApe - and I actually much prefer this. It's even made me think of switching which I use to do my YouTube videos on, especially when a game has such a great soundtrack - Ghost N Goblins for example that I'd rather hear it recorded from CPCE than WinApe. Also the AVI file from WinApe when you put it into editing software you can see the wave form for the audio is completely 'peaked' and ends up distorting with nasty pops and crackles. This is why I have to import and re-encode after reducing the audio volume (hence why a lot of my videos they're recorded at low volume which I sometimes get complaints about). In WinApe's defence for recording video - it works much better than CPCE which seems to have a few bugs, for example I have to quit CPCE after recording a video before starting another recording, which is annoying. But anyway, I think that's a different issue and one I need to test and examine in more detal.

Back to my original observation re CPCE vs WinApe - can anyone explain the reason for this difference? Is it do with the demonstration and graphs Markus produced?

I don't know which is more 'accurate' as I'd have to move the PC downstairs and set the same game running on both machines to compare. Of course you have to factor in that playback through different mediums will produce different results - ie PC speakers, much the same if you compared the sound from the back of the CPC compared to hooking it up to a hi-fi. However I don't think different sound cards or onboard sound chips in PC's will produce different if anything noticeable results as the technology hasn't really changed or improved much over the years.

Executioner

The sound in the next release has somewhat of an overhaul in order to address the volume level complaints and to get some specific games and demos to work properly that didn't before. I may release a version this week, even though there are still more things I would have liked to get in to 2.0A18.

PulkoMandy

#68
Hello there !
We've been working hard on Reloaded to improve the emulation quality. The AY is now very accurate. You can get the emulator and have a look at the source here :
http://code.google.com/p/cpcsdk/


This emulator is based on Caprice, but rewritten in C++. It has some better features. Our AY code is a fork of libstsound, but was tweaked with :
  * Volume curves based on measurements from Grimmy (grimware.org)
  * Some tweaks to the noise generation, per Targhan's advice
  * Stereo output
  * Improved filter


The sound output is really near to the real hardware. It's almost identical to the code used in Arkos Tracker.


Give it a try and tell us how we can improve !


Oh, and don't thrust the datasheets, they aren't accurate :)

McKlain

Hey, in stereo the channels are in the wrong order, the central channel is on the right. Also, are you going to include a QWERTY layout?  ;D

I was testing the windows version.

PulkoMandy

Just use the right ROM to match your keyboard layout. The emulator layout can be configured in the settings window.

Phi2x

#71
.

PulkoMandy

mcklain : doh! I noticed I was using an older version of our libstsound in windows releases. It's fixed in the new one, along with some other bugs.

McKlain

I downloaded it but it says that there is some long-named dll missing.

PulkoMandy

Mh... I have a lot of dll on my hard disk. Could you be a bit more precise please ?

Powered by SMFPacks Menu Editor Mod