<div dir="ltr"><div class="gmail_quote">On Wed, Nov 25, 2009 at 10:47 PM, Walter van Niftrik <span dir="ltr"><<a href="mailto:walter@vanniftrik-it.nl">walter@vanniftrik-it.nl</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">

I'm a little confused now though, as the configure script seems to set DISABLE_DOSBOX_OPL for PSP, so you should still be using the same old OPL emulator as before.<br>
<br>
So something doesn't quite add up here. Are you using a custom Makefile perhaps?<br>
<br>
Regards,<br><font color="#888888">
<br>
Walter<br>
</font></blockquote></div><br>I am using a custom makefile, and I try both the DOSBOX and MAME OPLs. Here are the main results I get from gprof for both cases:<br><br>MAME:<br><br>  %   cumulative   self              self     total           <br>

 time   seconds   seconds    calls   s/call   s/call  name    <br> 48.69     26.07    26.07 25996761     0.00     0.00  OPL::MAME::OPL_CALC_SLOT(OPL::MAME::fm_opl_slot*)<br> 15.21     34.22     8.15 12998381     0.00     0.00  OPL::MAME::OPL_CALC_CH(OPL::MAME::fm_opl_channel*)<br>

 12.83     41.09     6.87     9608     0.00     0.00  OSystem_PSP::unlockMutex(OpaqueMutex*)<br>  4.93     43.72     2.64  2883584     0.00     0.00  _ZN5AudioL10clampedAddERsi<br>  3.41     45.55     1.83   106090     0.00     0.00  PowerManager::beginCriticalSection(bool)<br>

  2.96     47.13     1.58  1444264     0.00     0.00  int CLIP<int>(int, int, int)<br>  2.59     48.52     1.39      301     0.00     0.00  OSystem_PSP::delayMillis(unsigned int)<br><br>with functional breakdown:<br>

<br>                0.01   35.83    8539/8539        Sci::MidiDriver_Adlib::generateSamples(short*, int) [7]<br>[8]     66.9    0.01   35.83    8539         OPL::MAME::OPL::readBuffer(short*, int) [8]<br>                0.03   35.80    8539/8539        OPL::MAME::YM3812UpdateOne(OPL::MAME::fm_opl_f*, short*, int) [9]<br>

-----------------------------------------------<br>                0.03   35.80    8539/8539        OPL::MAME::OPL::readBuffer(short*, int) [8]<br>[9]     66.9    0.03   35.80    8539         OPL::MAME::YM3812UpdateOne(OPL::MAME::fm_opl_f*, short*, int) [9]<br>

                8.15   26.07 12998381/12998381     OPL::MAME::OPL_CALC_CH(OPL::MAME::fm_opl_channel*) [10]<br>                1.58    0.00 1444264/1444264     int CLIP<int>(int, int, int) [39]<br>-----------------------------------------------<br>

                8.15   26.07 12998381/12998381     OPL::MAME::YM3812UpdateOne(OPL::MAME::fm_opl_f*, short*, int) [9]<br>[10]    63.9    8.15   26.07 12998381         OPL::MAME::OPL_CALC_CH(OPL::MAME::fm_opl_channel*) [10]<br>

               26.07    0.00 25996761/25996761     OPL::MAME::OPL_CALC_SLOT(OPL::MAME::fm_opl_slot*) [11]<br>-----------------------------------------------<br>               26.07    0.00 25996761/25996761     OPL::MAME::OPL_CALC_CH(OPL::MAME::fm_opl_channel*) [10]<br>

[11]    48.7   26.07    0.00 25996761         OPL::MAME::OPL_CALC_SLOT(OPL::MAME::fm_opl_slot*) [11]<br>-----------------------------------------------<br><br><br>and here's using the Dosbox OPL:<br><br>  %   cumulative   self              self     total           <br>

 time   seconds   seconds    calls   s/call   s/call  name    <br> 39.00     40.73    40.73  3652062     0.00     0.00  OPL::DOSBox::OPL3::operator_output(OPL::DOSBox::OPL3::operator_struct*, int, int)<br> 23.68     65.47    24.73     6063     0.00     0.00  OSystem_PSP::unlockMutex(OpaqueMutex*)<br>

  6.51     72.27     6.80     1406     0.00     0.00  OSystem_PSP::delayMillis(unsigned int)<br>  5.17     77.66     5.40  1826031     0.00     0.00  OPL::DOSBox::OPL3::operator_decay(OPL::DOSBox::OPL3::operator_struct*)<br>

  4.04     81.88     4.22                             OPL::DOSBox::OPL3::operator_attack(OPL::DOSBox::OPL3::operator_struct*)<br>  3.77     85.82     3.94  3652062     0.00     0.00  OPL::DOSBox::OPL3::operator_advance(OPL::DOSBox::OPL3::operator_struct*, int)<br>

  3.12     89.08     3.26                             OPL::DOSBox::OPL3::operator_release(OPL::DOSBox::OPL3::operator_struct*)<br>  2.31     91.49     2.41      539     0.00     0.00  PSPKeyboard::isVisible()<br>  2.18     93.77     2.28   140479     0.00     0.00  PowerManager::beginCriticalSection(bool)<br>

<br>with functional breakdown:<br><br>                0.01   51.34    2014/2014        Sci::MidiDriver_Adlib::generateSamples(short*, int) [7]<br>[8]     49.2    0.01   51.34    2014         OPL::DOSBox::OPL::readBuffer(short*, int) [8]<br>

                0.00   51.34    2014/2014        OPL::DOSBox::OPL3::Handler::generate(short*, unsigned int) [9]<br>-----------------------------------------------<br>                0.00   51.34    2014/2014        OPL::DOSBox::OPL::readBuffer(short*, int) [8]<br>

[9]     49.2    0.00   51.34    2014         OPL::DOSBox::OPL3::Handler::generate(short*, unsigned int) [9]<br>                0.15   51.19    2014/2014        OPL::DOSBox::OPL3::adlib_getsample(short*, int) [10]<br>-----------------------------------------------<br>

                0.15   51.19    2014/2014        OPL::DOSBox::OPL3::Handler::generate(short*, unsigned int) [9]<br>[10]    49.2    0.15   51.19    2014         OPL::DOSBox::OPL3::adlib_getsample(short*, int) [10]<br>               40.73    0.00 3652062/3652062     OPL::DOSBox::OPL3::operator_output(OPL::DOSBox::OPL3::operator_struct*, int, int) [11]<br>

                5.40    0.00 1826031/1826031     OPL::DOSBox::OPL3::operator_decay(OPL::DOSBox::OPL3::operator_struct*) [26]<br>                3.94    0.00 3652062/3652062     OPL::DOSBox::OPL3::operator_advance(OPL::DOSBox::OPL3::operator_struct*, int) [30]<br>

                0.58    0.00  680480/680480      _ZN3OPL6DOSBox4OPL3L8clipit16EiPs [87]<br>                0.55    0.00 1826031/1826031     OPL::DOSBox::OPL3::operator_sustain(OPL::DOSBox::OPL3::operator_struct*) [90]<br>

-----------------------------------------------<br>               40.73    0.00 3652062/3652062     OPL::DOSBox::OPL3::adlib_getsample(short*, int) [10]<br>[11]    39.0   40.73    0.00 3652062         OPL::DOSBox::OPL3::operator_output(OPL::DOSBox::OPL3::operator_struct*, int, int) [11]<br>

-----------------------------------------------<br><br>as you can tell, using Dosbox produces slightly better results.<br><br>Regards,<br>Yotam<br></div>