Menu

#18 Fuse emulation speed multiplies when sound is enabled.

open
nobody
None
5
2015-02-25
2004-03-12
No

On Fuse 0.6.2.1 on my machine, whenever sound is
enabled (and emulation speed is set in the preferences
at 100%), actual emulation speed goes to 200% or even
sometimes 400%. Setting any other emulation speed
doesn't have a multiplication problem (perhaps because
any other rate disables sound).

I'm on Linux 2.4.25 with an Athlon 2500+. My big
suspicion is that it might be something to do with my
sound card, which is integrated into my Gigabyte
7NX400Pro2 motherboard (Realtek ALC650/655 Audio AC'97
Codec, I think) driven by the NVidia provided driver
nvaudio 1.0-0261)

I also experienced the same problem with fuse 0.6.2

Discussion

  • Fredrick Meunier

    Logged In: YES
    user_id=11017

    It is almost certainly your soundcard driver (which Fuse relies on by
    default to control speed).

    Try compiling with the SDL UI and seeing if that makes your problem go
    away...

     
  • Philip Kendall

    Philip Kendall - 2004-03-13

    Logged In: YES
    user_id=29214

    Hmmm.... you're not the first person to report this problem,
    although its obviously not something I can reproduce :-(

    Just to collect some more statistics here: what distribution
    are you using, and do you know if you're using ALSA or OSS
    for your sound?

    If I get time (certainly not before the end of the weekend),
    I'll try and write a small test program which outputs (say)
    middle C to the sound card to see if we can track down
    what's causing this problem. Of course, if anyone else wants
    to do it before me :-)

     
  • Justin Casey

    Justin Casey - 2004-03-15

    Logged In: YES
    user_id=160296

    Compiling Fuse-0.6.2.1 with the SDL interface (--with-sdl)
    does indeed solve the problem (emulation runs with sound at
    correctly at 100%).

     
  • Justin Casey

    Justin Casey - 2004-03-15

    Logged In: YES
    user_id=160296

    Philip, my distribution is technically Redhat 7.2 but I only
    ever install stuff built from tarballs so RH is now just the
    compost at the bottom (it's kind of like a Linux From
    Scratch distro, except not as good).

    AFAIK, I'm using the kernel sound system (the OSS ish one)
    with the nvaudio driver, which according to nvidia docs is
    based off the kernel's i810_audio driver.

     
  • Felipe Bertrand

    Felipe Bertrand - 2004-10-09

    Logged In: YES
    user_id=1135765

    I have the same problem. I am using fuse 0.6.1 on Gentoo.
    I have tried to compile both with and without SDL and the
    problem does not go away.

    I am using kernel 2.4.26 with the regular OSS drivers.

     
  • Felipe Bertrand

    Felipe Bertrand - 2004-10-09

    Logged In: YES
    user_id=1135765

    Another interesting note: spectemu has exactly the same problem.

     
  • Felipe Bertrand

    Felipe Bertrand - 2004-10-09

    Logged In: YES
    user_id=1135765

    More on this issue:

    It turns out that with SDL the problem DOES go away. I had a
    problem with Gentoo USES flags not enabling SDL correctly.

    Also, I have tried version 0.7.0 and I have seen that the
    problem is still there. However, if I check the sound option
    "beeper pseudo stereo", then everything works fine (I get
    sound at 100% speed). What is puzzling is that if I disable
    this option, after having enabled it previously, everything
    continues to works fine. In version 0.6.2, fiddling with
    this option did not make any difference.

     
  • Fredrick Meunier

    Logged In: YES
    user_id=11017

    As far as we know this problem is only relevant for people
    using the OSS routines (mostly Linix + GTK+ user interface,
    sound on). Could people with those problems tell us:
    1) Their Linux distribution + kernel version
    2) Their sound harware (e.g. Soundblaster Live!, NForce
    motherboard etc.)
    3) Their sound drivers in use (e.g. OSS vs. ALSA)

    Also note: If you switch a build of Fuse from GTK+ to SDL,
    you must make clean before make or you will have problems!

     
  • Nobody/Anonymous

    Logged In: NO

    Gentoo Linux.
    Linux 2.4.26 compiled with OSS drivers (NOT alsa).
    This is a Dell Inspiron 8200, the sound chipset is integrated
    in the Intel mother board (the kernel module is the i810_audio).

     
  • Darren Salt

    Darren Salt - 2004-10-14

    Logged In: YES
    user_id=294680

    Have you tried 2.4.27? There are some i810 OSS fixes in
    there (see
    <URL:http://www.kernel.org/pub/linux/kernel/v2.4/ChangeLog-2.4.27>).

    Failing that, does ALSA's OSS emulation on that hardware
    work well?

     
  • Fredrick Meunier

    Logged In: YES
    user_id=11017

    Could people experiencing this problem please try the patch
    below to sound/lowlevel.h?

     
  • Fredrick Meunier

     
  • Felipe Bertrand

    Felipe Bertrand - 2004-10-24

    Logged In: YES
    user_id=1135765

    I tried the patch. Here is what happens:

    Now the speed is always 67% (with or without sound enabled:
    it doesn't make a difference any more).

    This effect scales: if I set the speed to "200%" in the
    options menu, the resulting emulation speed is "133%".

     
  • Felipe Bertrand

    Felipe Bertrand - 2004-10-24

    Logged In: YES
    user_id=1135765

    Another note: I tried the patch in version 0.7.0

     
  • Fredrick Meunier

    Logged In: YES
    user_id=11017

    Could you try adding patch 1050741 from the patch section of
    the website as well?

     
  • Felipe Bertrand

    Felipe Bertrand - 2004-10-24

    Logged In: YES
    user_id=1135765

    I can't apply that patch to fuse 0.7.0 or 0.6.2. I get the
    following error:

    $ patch -p0 <../timer_fix.patch
    patching file rzx.c
    Hunk #1 succeeded at 90 with fuzz 2 (offset 3 lines).
    Hunk #2 succeeded at 156 with fuzz 1 (offset -4 lines).
    Hunk #3 succeeded at 354 (offset 16 lines).
    can't find file to patch at input line 101
    Perhaps you used the wrong -p or --strip option?
    The text leading up to this was:
    --------------------------
    |diff -u -r1.11 sdlsound.c
    |--- sound/sdlsound.c 27 Jun 2004 01:11:34 -0000 1.11
    |+++ sound/sdlsound.c 20 Oct 2004 13:05:15 -0000
    --------------------------

    If I try to give this file manually (and some others that
    give the same error later), I get compile errors down the road.

    Also, I think it might be better if we continue this over
    email (febertra at indiana . edu).

     
  • Philip Kendall

    Philip Kendall - 2004-10-24

    Logged In: YES
    user_id=29214

    The patch is against CVS HEAD.

     
  • Felipe Bertrand

    Felipe Bertrand - 2004-10-24

    Logged In: YES
    user_id=1135765

    Partial success.

    This is what I did: I tried to apply the timer patch to the
    cvs tree and apparently it was already applied so I compiled
    and ran without any patching. As expected, the speed problem
    was there. On the side, I had a linking error about -lX11
    not being found but I edited that by hand and linked ok.

    Then I applied the oss patch below and compiled again. This
    time things turned out more or less ok: sound worked and
    speed was at a steady 100%. However, a new issue appeared:
    at random intervals (~1 sec or less) the speakers would emit
    a short cracking noise (similar to what you get when you
    turn on and off a speaker).

     
  • Fredrick Meunier

    Logged In: YES
    user_id=11017

    Thanks for trying that, the sound glitches you mention may
    mean you need a bit more latency to cover for jitter in your
    process scheduling (or machine load or something else),
    could you let me know if your machine is unloaded?

    As regards the linking problem, could you make a new bug
    report with your config.log and original Makefile, so I can
    see what went wrong?

    In any case, try changing this line in timer.c:
    if( difference < ( ( 2.0 * speccy_frame_time_usec /
    1000000.0 ) - 0.005 ) ) {
    to
    if( difference < ( ( 3.0 * speccy_frame_time_usec /
    1000000.0 ) - 0.005 ) ) {

     
  • Nobody/Anonymous

    Logged In: NO

    All the tests were performed with the machine unloaded. I
    have been timing the "glitches". When I leave the emulator
    running without touching anything, they happen exactly every
    two seconds. Making the modification that you suggest does
    not make any difference. (I have even tried other values for
    that constant and it still does not make any difference).

    Changing the timer_sleep_ms(10) line to timer_sleep_ms(100)
    does make a difference in the interval between glitches but
    it does not make them go away.

     
  • Fredrick Meunier

    Logged In: YES
    user_id=11017
    Originator: NO

    Does anyone still see these issues with current Linux kernels?

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.