Please be advised that access to Atari Forum this coming Friday will be sporadic whilst the backend operating system and dependency upgrades are carried out.

ScummVM/Falcon060 pre-release

Latest news in the Atari world

Moderator: Moderator Team

User avatar
Eero Tamminen
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 3998
Joined: Sun Jul 31, 2011 1:11 pm

Re: ScummVM/Falcon060 pre-release

Post by Eero Tamminen »

Debugged a bit further. That log message is about 288 bytes longer than the static (1KiB) log message buffer. I.e. quite a few other things from ScummVM data section can get overwritten by the sprintf() in the logMessage(). Based on what happens, NF_STDERR identifier is among them.
mikro
Hardware Guru
Hardware Guru
Posts: 4724
Joined: Sat Sep 10, 2005 11:11 am
Location: Kosice, Slovakia

Re: ScummVM/Falcon060 pre-release

Post by mikro »

Oops, oops. Great find, the snprintf() is definitely a must. IIRC I took the implementation from somewhere else (mintlib?), it's Thorsten's code so maybe he could check in his projects whether this overflow can't happen there, too. I'll take a look at the other things when I find time.
User avatar
Eero Tamminen
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 3998
Joined: Sun Jul 31, 2011 1:11 pm

Re: ScummVM/Falcon060 pre-release

Post by Eero Tamminen »

FYI: Blade Runner & A Golden Wake demos both work fine in (older) Linux ScummVM => I think them not being supported by Atari ScummVM is indeed due to 16-bit gfx .


Kingdom: Far Reaches: https://wiki.scummvm.org/index.php?titl ... ar_Reaches

Demo: https://downloads.scummvm.org/frs/demos ... m-demo.zip

Crashes to NULL pointer access in "loadKingArt()" during startup:

Code: Select all

[00030065] Running Kingdom: The Far Reaches (Demo/DOS/English)
[00030075] KINGDEMO.EXE: 2ce478fc13086d0ddb02a2867ba307dc, 167154 bytes.
[00030195] beginGFXTransaction
[00030200] initSize: 320, 200, 1
[00030215] endGFXTransaction
[00030245] Loading resource: 151 (KINGART.ART)
[00031145] WARNING: Failed to open KINGART.ART!
WARN : Bus Error reading at address $0, PC=$163825a addr_e3=163825a op_e3=2052

Panic: Bus Error
...
*** Press any key to continue ***
Finalizing costs for 3 non-returned functions:
- 1. 0xe56176: Kingdom::KingdomGame::loadKingArt() -0x7e20ce
- 2. 0x163c9d0: Kingdom::KingdomGame::run() +0x6c
- 3. 0x1016878: runGame(Plugin const*, Plugin const*, OSystem&, Common::String const&) +0x5fa
Based on backtrace, does not seem Atari specific, but one never knows...

Note: demo does not include KINGART.ART file.


Private Eye: https://wiki.scummvm.org/index.php?titl ... Eye_(1996)

2.5 min profile of the demo shows time going to Smacker Huffman decoding:

Code: Select all

Time spent in profile = 154.78665s.
...
Used cycles:
  21.48%  21.82%  21.82%  106684524110836036361083728054   Video::BigHuffmanTree::getCode(Common::BitStreamImpl<Common::BitStreamMemoryStream, unsigned int, 8, false, false>&)
  18.56%                   921503980                       c2p1x1_8_rect_start
  14.32%                   711014947                       c2p1x1_8_rect_pix16
   9.50%   9.65%  31.49%   471631212 4791196291564098165   Video::SmackerDecoder::SmackerVideoTrack::decodeFrame(Common::BitStreamImpl<Common::BitStreamMemoryStream, unsigned int, 8, false, false>&)
   7.88%                   391293445                       ROM_TOS
   5.42%   5.51%   5.51%   269195135 273662719 273695210   Video::SmallHuffmanTree::getCode(Common::BitStreamImpl<Common::BitStreamMemoryStream, unsigned int, 8, false, false>&) [clone .part.0]
   4.55%                   226097307                       copy256
   4.34%   4.42%   4.82%   215743800 219681130 239221245   Audio::RateConverter_Impl<false, true, false>::convert(Audio::AudioStream&, short*, unsigned int, unsigned short, unsigned short)
   2.84%                   141135698                       set256
   2.41%   2.45%   2.45%   119782740 121652799 121666023   void Graphics::transBlit<unsigned char, unsigned char>(Graphics::Surface const&, Common::Rect const&, Graphics::ManagedSurface&, Common::Rect const&, unsigned char, bool, unsigned int, unsigned int, Graphics::Palette const*, Graphics::Palette const*, Graphics::Surface const*, bool)
   1.55%   1.57%   7.03%    76857603  78057703 348920587   Video::SmackerDecoder::SmackerAudioTrack::queueCompressedBuffer(unsigned char*, unsigned int, unsigned int)
   0.90%   0.91%   0.91%    44482049  44980733  44985218   timesub.isra.0
(Bad game, but maybe profile and it using Smacker is of some interest.)
Teki
Atari maniac
Atari maniac
Posts: 94
Joined: Sat Oct 09, 2021 12:23 am

Re: ScummVM/Falcon060 pre-release

Post by Teki »

to eero: yes blade runner is 65k colors
Teki
Atari maniac
Atari maniac
Posts: 94
Joined: Sat Oct 09, 2021 12:23 am

Re: ScummVM/Falcon060 pre-release

Post by Teki »

some news to feeble files
feeble files : i used th 4cd german version and find now a 2 cd english version which runs littlebit better ... the 4cd version have 4 oggs (converted to wav from me) and its all the same sound and size is only littlebit different as ogg around 40mb as wav around 220mb and they are named voices01.wav to voices04.wav and on every 4cd is 1 of this voice file with same voices in it ....

in the 2cd version there are only one of these voices.wav file but it also doesnt let me play it ... so it seems an own format that you dont need the same file 4 times ... the intro works a littlebit better, seems they lower the resolution, i think its just more upper and lower border

i mean its interesting with the 2 versions and maybe at the end it will be run very smooth :)
Teki
Atari maniac
Atari maniac
Posts: 94
Joined: Sat Oct 09, 2021 12:23 am

Re: ScummVM/Falcon060 pre-release

Post by Teki »

sanitarium news:
i get a 1cd english version which does not have speech ingame ... 3cd version before with speech is 1.7gb in german ...
i looked in the filles ... folder music , the files there was a littlebit less in filesize, maybe lower bitrate but music is not speech
folder vids where all the same size ...
but in root all the res files where nearly the half... i copied the res files from 4 cd version to root of 2cd version
and now sanitarium is only 875mb instead 1.69gb and the intro works a littlebit better ... the sc files are all the same size in both versions and the speech ingame is now german in 875mb version ... you can do the same wit the 4cd english version i think
mikro
Hardware Guru
Hardware Guru
Posts: 4724
Joined: Sat Sep 10, 2005 11:11 am
Location: Kosice, Slovakia

Re: ScummVM/Falcon060 pre-release

Post by mikro »

Thanks Teki, without your extreme experiments I wouldn't know about those differences at all. Obviously, for our Atari target it makes sense to hunt for the least fancy version of such games. Voiceover is the maximum luxury we can ask for (The SE of MI1 and MI2 is great example of modern stuff still running on our hardware).
Teki
Atari maniac
Atari maniac
Posts: 94
Joined: Sat Oct 09, 2021 12:23 am

Re: ScummVM/Falcon060 pre-release

Post by Teki »

sanitarium in last sentence i write wrong 4cd version .... sanitarium is 3cd :) also the english version as i mentioned the german 3cd verson in beginning patched somewhere how to 875mb
mikro
Hardware Guru
Hardware Guru
Posts: 4724
Joined: Sat Sep 10, 2005 11:11 am
Location: Kosice, Slovakia

Re: ScummVM/Falcon060 pre-release

Post by mikro »

@Teki and others, if you feel up to some comparing/benchmarking, see https://www.atari-forum.com/viewtopic.p ... 05#p465205 and download the -mfastcall version. It should be visibly faster. Should. ;)
User avatar
Eero Tamminen
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 3998
Joined: Sun Jul 31, 2011 1:11 pm

Re: ScummVM/Falcon060 pre-release

Post by Eero Tamminen »

Checked few SCI demos with the new fastcall version on emulated 32Mhz Falcon.

Previous checks with these are from March 2023...

Christmas card 1988

Previous profile: https://www.atari-forum.com/viewtopic.p ... 27#p444627

Full demo round with fastcall:

Code: Select all

Time spent in profile = 390.88918s.
...
Visits/calls:
   6.18%   6.18%     5042762   5045025   Sci::GfxScreen::putPixel(short, short, unsigned char, unsigned char, unsigned char, unsigned char)
   5.57%   5.58%     4549092   4550149   Sci::GfxView::getMappedColor(unsigned char, unsigned short, Sci::Palette const*, int, int)
   5.53%   5.53%     4511075   4511329   Sci::reg_t::getSegment() const
...
Used cycles:
  14.99%   6.03%  18.54%  1880036312 7561093282325114382 * Sci::run_vm(Sci::EngineState*)
  12.29%  12.49%  26.11%  154183657815667887893274451336   Sci::GfxView::draw(Common::Rect const&, Common::Rect const&, Common::Rect const&, short, short, unsigned char, unsigned short, bool, unsigned short)
   9.78%   9.93%   9.93%  122619662112453851141245464850   Sci::GfxScreen::putPixel(short, short, unsigned char, unsigned char, unsigned char, unsigned char)
   5.89%   5.97%  10.06%   738419124 7488256281262024437   Sci::SegManager::getObject(Sci::reg_t) const
   5.86%   5.95%   6.45%   734440106 746294034 809386406   Sci::readPMachineInstruction(unsigned char const*, unsigned char&, short*)
   4.37%   4.44%   4.44%   548136328 556422412 556460680   Sci::GfxView::getMappedColor(unsigned char, unsigned short, Sci::Palette const*, int, int)
   4.13%                   518179994                       set256
   3.23%                   405245313                       ROM_TOS
   2.80%   2.84%   2.84%   350556480 355762284 355786657   Sci::GfxScreen::vectorIsFillMatch(short, short, unsigned char, unsigned char, unsigned char, unsigned char, bool)
   2.33%   2.37%   5.21%   292581616 297506993 653662386   Sci::GfxPicture::vectorFloodFill(short, short, unsigned char, unsigned char, unsigned char)
   1.72%   1.75%   6.46%   215913211 219334311 809587347   Sci::Object::locateVarSelector(Sci::SegManager*, int) const
   1.65%   1.68%   7.07%   207016094 210438366 886257329   Sci::send_selector(Sci::EngineState*, Sci::reg_t, Sci::reg_t, Sci::reg_t*, int, Sci::reg_t*)
   1.59%   1.61%  11.14%   199147472 2022830201397065969   Sci::lookupSelector(Sci::SegManager*, Sci::reg_t, int, Sci::ObjVarRef*, Sci::reg_t*)
   1.41%   1.43%   2.78%   176816389 179950082 349223780   Sci::Script::getObject(unsigned int)
   1.39%   1.41%   1.41%   174660878 177083096 177094610   Sci::SciEngine::checkAddressBreakpoint(Sci::reg_t const&)
   1.33%   1.35%   1.35%   166395324 169257688 169269862   Common::HashMap<unsigned int, Sci::Object, Common::Hash<unsigned int>, Common::EqualTo<unsigned int> >::lookupAndCreateIfMissing(unsigned int const&)
   0.97%   0.99%   0.99%   122106279 123886668 123895304   Sci::reg_t::getSegment() const
   0.94%                   117549634                       c2p1x1_8_rect_start
   0.93%   0.95%   0.95%   116884028 118935138 118943118   free
   0.82%                   102665890                       scopy_d
   0.81%   0.83%   1.35%   101963167 103712480 169554250   Sci::READ_SCI11ENDIAN_UINT16(void const*)
   0.73%                    91776937                       scopy
   0.70%                    88408771                       c2p1x1_8_rect_pix16
   0.68%   0.69%   1.20%    85702925  86926949 150246677   Sci::read_var(Sci::EngineState*, int, int)
   0.67%   0.68%   4.71%    84312039  85240254 590171230   Sci::Object::getClass(Sci::SegManager*) const
   0.63%   0.64%   0.71%    79589068  80605222  88650817   malloc
...
Without fastcall:

Code: Select all

Time spent in profile = 391.17234s.
...
Visits/calls:
   5.95%   5.96%     4699174   4701563   Sci::GfxScreen::putPixel(short, short, unsigned char, unsigned char, unsigned char, unsigned char)
   5.39%   5.39%     4253804   4254053   Sci::reg_t::getSegment() const
   5.38%   5.38%     4247767   4248882   Sci::GfxView::getMappedColor(unsigned char, unsigned short, Sci::Palette const*, int, int)
...
Used cycles:
  15.05%   6.04%  18.90%  1888782203 7584591412372676384 * Sci::run_vm(Sci::EngineState*)
  10.78%  10.95%  25.52%  135303074513745394583202485695   Sci::GfxView::draw(Common::Rect const&, Common::Rect const&, Common::Rect const&, short, short, unsigned char, unsigned short, bool, unsigned short)
  10.04%  10.21%  10.21%  126047810212810408511281155770   Sci::GfxScreen::putPixel(short, short, unsigned char, unsigned char, unsigned char, unsigned char)
   5.75%   5.84%   6.43%   721865151 732851453 806756473   Sci::readPMachineInstruction(unsigned char const*, unsigned char&, short*)
   5.73%   4.09%   6.01%   719515708 512836152 754278983 * Sci::SegManager::getObject(Sci::reg_t) const
   4.86%   4.93%   4.93%   609710373 619105559 619159383   Sci::GfxView::getMappedColor(unsigned char, unsigned short, Sci::Palette const*, int, int)
   3.32%                   416677087                       set256
   3.27%   3.32%   3.32%   410758090 416792863 416830106   Sci::GfxScreen::vectorIsFillMatch(short, short, unsigned char, unsigned char, unsigned char, unsigned char, bool)
   3.22%                   403726574                       ROM_TOS
   2.25%   2.27%   5.55%   282671466 284326327 696057762   Sci::GfxPicture::vectorFloodFill(short, short, unsigned char, unsigned char, unsigned char)
   1.76%   1.79%  11.19%   221042541 2245987711404773440   Sci::lookupSelector(Sci::SegManager*, Sci::reg_t, int, Sci::ObjVarRef*, Sci::reg_t*)
   1.65%   1.68%   7.09%   207336461 211187555 889528226   Sci::send_selector(Sci::EngineState*, Sci::reg_t, Sci::reg_t, Sci::reg_t*, int, Sci::reg_t*)
   1.62%   1.64%   1.64%   202933079 205829085 205848065   Sci::SciEngine::checkAddressBreakpoint(Sci::reg_t const&)
   1.60%   1.62%   6.38%   200946338 203651234 800614174   Sci::Object::locateVarSelector(Sci::SegManager*, int) const
   1.36%   1.38%   2.69%   170849859 173158990 337322234   Sci::Script::getObject(unsigned int)
   1.29%   1.31%   1.31%   161782018 164149089 164163335   Common::HashMap<unsigned int, Sci::Object, Common::Hash<unsigned int>, Common::EqualTo<unsigned int> >::lookupAndCreateIfMissing(unsigned int const&)
   1.10%   1.12%   1.54%   138667107 140243821 192810867   Sci::READ_SCI11ENDIAN_UINT16(void const*)
   1.07%   1.09%   1.09%   134577957 136557786 136569738   Sci::reg_t::getSegment() const
   0.94%   0.14%   0.14%   118513531  17762072  17763848 * free
   0.90%                   113045407                       c2p1x1_8_rect_start
   0.77%   2.51%   4.76%    96596099 315285711 596955064   Sci::Object::getClass(Sci::SegManager*) const
   0.76%                    95564720                       scopy_d
   0.76%   0.77%   0.77%    95417858  96895559  96903383   GUI::Debugger::onFrame()
   0.68%                    85720693                       scopy
   0.67%                    83969757                       c2p1x1_8_rect_pix16
   0.66%   0.67%   1.11%    82832221  84017887 138699974   Sci::read_var(Sci::EngineState*, int, int)
   0.62%   0.63%   0.70%    78253611  79532836  87759037   malloc
...
Gabriel Knight (demo)

Previous profile: https://www.atari-forum.com/viewtopic.p ... 85#p444685

Intro with fastcall (from main screen):

Code: Select all

Time spent in profile = 64.79286s.
...
Used cycles:
  36.46%                   757999099                       set256
   8.14%                   169272012                       c2p1x1_8_rect_start
   6.30%                   130887682                       c2p1x1_8_rect_pix16
   5.69%                   118328068                       ROM_TOS
   5.48%                   113868767                       Sci::run_vm(Sci::EngineState*)
   3.52%   3.57%  42.36%    73277975  74275090 880690347   Audio::MixerImpl::mixCallback(unsigned char*, unsigned int)
   2.26%   2.29%   2.29%    46932426  47502586  47505567   Sci::GfxScreen::putPixel(short, short, unsigned char, unsigned char, unsigned char, unsigned char)
   2.14%   2.18%   5.74%    44516543  45281790 119288357   Sci::GfxPicture::drawCelData(Sci::SciSpan<unsigned char const> const&, int, int, int, short, short, short, short, bool)
   1.96%   2.00%   2.02%    40677563  41474164  42001529   Sci::readPMachineInstruction(unsigned char const*, unsigned char&, short*)
   1.71%                    35523835                       copy256
   1.48%   1.50%   3.26%    30853292  31222062  67798698   Sci::SegManager::getObject(Sci::reg_t) const
   1.18%   1.18%  50.43%    24432601  246267271048356366   OSystem_Atari::update()
   0.92%   0.92%  43.29%    19044766  19165810 899869998   AtariMixerManager::update() [clone .part.0]
   0.74%   0.75%   2.26%    15283768  15521811  47004053   Common::BaseString<char>::BaseString(Common::BaseString<char> const&)
   0.70%   0.70%   1.37%    14548293  14652258  28409106   Sci::Script::getObject(unsigned int)
...
Intro without fastcall:

Code: Select all

Time spent in profile = 63.32711s.
...
Used cycles:
  36.37%                   738960899                       set256
   8.29%                   168403147                       c2p1x1_8_rect_start
   6.41%                   130144015                       c2p1x1_8_rect_pix16
   5.82%                   118288709                       ROM_TOS
   4.80%                    97605460                       Sci::run_vm(Sci::EngineState*)
   3.49%   3.55%  42.61%    70944968  72223006 865767572   Audio::MixerImpl::mixCallback(unsigned char*, unsigned int)
   2.36%   2.39%   6.38%    47933636  48612921 129563720   Sci::GfxPicture::drawCelData(Sci::SciSpan<unsigned char const> const&, int, int, int, short, short, short, short, bool)
   2.34%   2.38%   2.38%    47567101  48282697  48286877   Sci::GfxScreen::putPixel(short, short, unsigned char, unsigned char, unsigned char, unsigned char)
   1.74%                    35446953                       copy256
   1.67%   1.69%   1.71%    33854464  34274167  34771176   Sci::readPMachineInstruction(unsigned char const*, unsigned char&, short*)
   1.28%   1.07%   2.39%    25922097  21814868  48496185 * Sci::SegManager::getObject(Sci::reg_t) const
   1.24%   2.60%  51.24%    25111931  528566951041091463   OSystem_Atari::update()
   1.08%                    21949492                       AtariMixerManager::update() [clone .part.0]
   0.89%   0.90%   2.42%    18072824  18386083  49221667   Common::BaseString<char>::BaseString(Common::BaseString<char> const&)
   0.67%   0.68%   1.39%    13691050  13826065  28214613   Sci::SEQDecoder::SEQVideoTrack::decodeFrame(unsigned char*, int, unsigned char*, int, unsigned char*, int, int, int, int)
   0.65%                    13263900                       OSystem_Atari::delayMillis(unsigned int)
   0.63%   0.64%   6.02%    12895630  13045890 122304540   DefaultTimerManager::checkTimers(unsigned int)
   0.59%   0.59%   1.16%    11983846  12086412  23641044   Sci::Script::getObject(unsigned int)
...
Game start with fastcall (from selecting "Game" button, until interactive part begins):

Code: Select all

Time spent in profile = 203.18975s.
...
Visits/calls:
   6.17%   6.18%     3127183   3128624   Sci::GfxScreen::putPixel(short, short, unsigned char, unsigned char, unsigned char, unsigned char)
   5.02%             2544501             common2
...
Used cycles:
  12.04%  12.21%  26.34%   784939956 7962985831717471706   Sci::GfxView::draw(Common::Rect const&, Common::Rect const&, Common::Rect const&, short, short, unsigned char, unsigned short, bool, unsigned short)
  11.85%  12.04%  12.05%   772735321 785208664 785257725   Sci::GfxScreen::putPixel(short, short, unsigned char, unsigned char, unsigned char, unsigned char)
   8.97%   2.12%   6.51%   584923743 138519271 424582413 * Sci::run_vm(Sci::EngineState*)
   7.23%   7.33%  15.30%   471511371 478088704 997166688   Sci::SegManager::getObject(Sci::reg_t) const
   4.08%   4.14%   4.14%   265919032 269947106 269964820   Sci::GfxView::getMappedColor(unsigned char, unsigned short, Sci::Palette const*, int, int)
   3.68%                   239809567                       ROM_TOS
   3.24%   3.28%   3.33%   210919295 213929289 217038090   Sci::readPMachineInstruction(unsigned char const*, unsigned char&, short*)
   2.98%   3.03%   5.83%   194398258 197678721 380131366   Sci::Script::getObject(unsigned int)
   2.76%   2.80%   2.80%   179942952 182466628 182494987   Common::HashMap<unsigned int, Sci::Object, Common::Hash<unsigned int>, Common::EqualTo<unsigned int> >::lookupAndCreateIfMissing(unsigned int const&)
   2.56%   2.60%   6.85%   166596163 169717763 446484980   Sci::Object::locateVarSelector(Sci::SegManager*, int) const
   2.05%   2.09%   7.35%   133894021 136188708 479218507   Common::DecompressorDCL::unpack(Common::SeekableReadStream*, Common::WriteStream*, unsigned int, bool)
   1.46%   1.48%   2.22%    95206396  96597308 145011405   Common::DecompressorDCL::huffman_lookup(int const*)
   1.43%   1.45%  13.82%    93173654  94854023 900840956   Sci::lookupSelector(Sci::SegManager*, Sci::reg_t, int, Sci::ObjVarRef*, Sci::reg_t*)
   1.24%   1.02%   2.80%    81086407  66721918 182281754 * Sci::GfxPicture::drawCelData(Sci::SciSpan<unsigned char const> const&, int, int, int, short, short, short, short, bool)
   1.15%   1.17%   1.78%    74968675  76082527 115969004   Sci::READ_SCI11ENDIAN_UINT16(void const*)
   1.09%                    70808331                       common2
   1.07%   1.09%   1.24%    69788968  71064660  81108770   Audio::RateConverter_Impl<false, true, false>::convert(Audio::AudioStream&, short*, unsigned int, unsigned short, unsigned short)
   1.05%   1.07%   5.38%    68558173  69692843 350942266   Sci::send_selector(Sci::EngineState*, Sci::reg_t, Sci::reg_t, Sci::reg_t*, int, Sci::reg_t*)
   1.00%                    65230307                       set256
   0.89%   0.91%   0.91%    58129306  59008195  59011911   Sci::reg_t::getSegment() const
...
Start without fastcall:

Code: Select all

Time spent in profile = 211.53454s.
...
Visits/calls:
   5.83%   5.83%     3037570   3039077   Sci::GfxScreen::putPixel(short, short, unsigned char, unsigned char, unsigned char, unsigned char)
   4.79%             2496651             exit
...
Used cycles:
  11.90%  12.08%  12.08%   807639512 819617627 819690222   Sci::GfxScreen::putPixel(short, short, unsigned char, unsigned char, unsigned char, unsigned char)
  10.41%  10.56%  25.35%   706391918 7169935161720620034   Sci::GfxView::draw(Common::Rect const&, Common::Rect const&, Common::Rect const&, short, short, unsigned char, unsigned short, bool, unsigned short)
   8.77%   2.05%   6.50%   595023687 139134186 441480423 * Sci::run_vm(Sci::EngineState*)
   6.88%   5.34%  11.63%   466832815 362257017 789127345 * Sci::SegManager::getObject(Sci::reg_t) const
   4.74%   4.82%   4.82%   321856019 327437992 327468738   Sci::GfxView::getMappedColor(unsigned char, unsigned short, Sci::Palette const*, int, int)
   3.65%                   248048403                       ROM_TOS
   3.00%   3.04%   3.10%   203863451 206421276 210107171   Sci::readPMachineInstruction(unsigned char const*, unsigned char&, short*)
   2.88%   2.93%   5.70%   195791859 198650938 386777220   Sci::Script::getObject(unsigned int)
   2.72%   2.77%   2.77%   184903838 188150645 188183790   Common::HashMap<unsigned int, Sci::Object, Common::Hash<unsigned int>, Common::EqualTo<unsigned int> >::lookupAndCreateIfMissing(unsigned int const&)
   2.37%   2.41%   6.72%   160894889 163367534 456147323   Sci::Object::locateVarSelector(Sci::SegManager*, int) const
   2.10%   2.13%   8.31%   142690559 144819939 564089655   Common::DecompressorDCL::unpack(Common::SeekableReadStream*, Common::WriteStream*, unsigned int, bool)
   1.69%   1.71%   2.73%   114446840 115867630 185022711   Common::DecompressorDCL::huffman_lookup(int const*)
   1.59%   1.61%  13.77%   107828199 109332657 934615496   Sci::lookupSelector(Sci::SegManager*, Sci::reg_t, int, Sci::ObjVarRef*, Sci::reg_t*)
   1.54%   1.57%   2.09%   104251150 106649206 141762658   Sci::READ_SCI11ENDIAN_UINT16(void const*)
   1.31%   1.07%   2.93%    89189431  72439619 198837084 * Sci::GfxPicture::drawCelData(Sci::SciSpan<unsigned char const> const&, int, int, int, short, short, short, short, bool)
   1.19%                    80985684                       common2
   1.06%   1.07%   1.22%    71678571  72768842  83046820   Audio::RateConverter_Impl<false, true, false>::convert(Audio::AudioStream&, short*, unsigned int, unsigned short, unsigned short)
   1.04%   1.06%   5.32%    70464905  71605850 360879761   Sci::send_selector(Sci::EngineState*, Sci::reg_t, Sci::reg_t, Sci::reg_t*, int, Sci::reg_t*)
   0.99%                    67342394                       set256
   0.94%   0.95%   0.95%    63842961  64742773  64748581   Sci::reg_t::getSegment() const
   0.91%   0.92%   2.16%    62000190  62719276 146531713   Common::MemoryWriteStream::write(void const*, unsigned int)
   0.91%   0.92%   0.92%    61810739  62706972  62713548   Sci::SciEngine::checkAddressBreakpoint(Sci::reg_t const&)
   0.81%                    54980813                       c2p1x1_8_rect_start
   0.81%                    54748812                       top_down
   0.78%   0.79%   0.79%    53202248  53936790  53941232   debug(int, char const*, ...)
   0.77%   2.43%   4.31%    51964086 165243448 292768531   Sci::Object::getClass(Sci::SegManager*) const
   0.75%                    51007782                       scopy_d
   0.73%   0.74%   0.74%    49606154  50398977  50404771   Sci::GfxScreen::vectorIsFillMatch(short, short, unsigned char, unsigned char, unsigned char, unsigned char, bool)
   0.69%   0.68%   2.04%    47150395  46405026 138290346 * Sci::GfxPaint16::fillRect(Common::Rect const&, short, unsigned char, unsigned char, unsigned char)
   0.68%   0.10%   0.10%    46466236   6973001   6973721 * free
   0.60%                    41027387                       c2p1x1_8_rect_pix16
...
Summary

Don't see any great difference with fastcall in case of SCI engine, which was a bit of a let down.

Main change is GK start being 8s i.e. 4% faster with fastcall (with both versions being 1/4th faster than what I measured year ago).

Add Dreamweb game

With fastcall:

Code: Select all

Time spent in profile = 11.34292s.
...
Visits/calls:
  21.10%   1.49%     1308446     92552   strchr
  18.53%  18.53%     1149036   1149104   tolower
   2.80%              173490             exit
...
Used cycles:
  10.02%  10.18%  10.18%    36462618  37038975  37041287   tolower
   6.23%   6.32%   6.32%    22688081  23014568  23015826   strchr
   4.26%   4.36%   8.87%    15520212  15856357  32269772   Common::hashit_lower(char const*)
   3.15%   3.26%   3.35%    11458444  11847191  12190037   Common::BaseString<char>::ensureCapacity(unsigned int, bool)
   3.11%   3.14%   8.74%    11302350  11441793  31805837   Common::String::equalsIgnoreCase(Common::String const&) const
   2.96%                    10768570                       set256
   2.89%   2.93%   5.53%    10530758  10680892  20111992   Common::BaseString<char32_t>::assignAppend(char32_t)
   2.86%   2.91%   2.97%    10414567  10601780  10813714   Graphics::VectorRendererSpec<unsigned char>::drawBevelSquareAlg(int, int, int, int, int, unsigned char, unsigned char)
   2.81%   2.85%   7.43%    10244416  10363222  27030064   Common::BaseString<char>::assignAppend(char const*)
   2.69%   2.73%   2.74%     9790111   9923240   9975694   Common::BaseString<char32_t>::ensureCapacity(unsigned int, bool)
   2.24%   2.26%   2.26%     8149947   8231806   8232316   Graphics::VectorRendererSpec<unsigned char>::applyScreenShading(GUI::ThemeEngine::ShadingStyle)
   2.02%                     7360518                       ROM_TOS
   1.97%   1.99%   3.55%     7180815   7253860  12937579   Common::BaseString<char>::assignAppend(char)
   1.93%   1.95%  25.82%     7040726   7107775  93983323   Common::punycode_encodefilename(Common::U32String const&)
   1.84%   1.87%   1.87%     6704374   6813879   6814151   strlen
   1.74%   1.76%   2.44%     6334156   6406865   8890365   Common::BaseString<char>::~BaseString()
   1.68%   1.70%   7.23%     6112723   6179903  26297221   Common::U32String::operator+=(char32_t)
   1.62%   1.63%   5.26%     5905285   5922391  19126697   Common::U32String::decodeUTF8(char const*, unsigned int)
   1.54%   1.55%  15.92%     5605880   5628193  57926311   Common::punycode_encode(Common::U32String const&)
   1.45%   1.47%  51.92%     5282233   5346392 188948186   AdvancedMetaEngineDetection::composeFileHashMap(Common::HashMap<Common::Path, Common::FSNode, Common::Path::IgnoreCase_Hash, Common::Path::IgnoreCase_EqualTo>&, Common::FSList const&, int, Common::Path const&) const [clone .part.0]
   1.40%   1.41%  21.10%     5106551   5130545  76790405   AdvancedMetaEngineDetection::detectGame(Common::FSNode const&, Common::HashMap<Common::Path, Common::FSNode, Common::Path::IgnoreCase_Hash, Common::Path::IgnoreCase_EqualTo> const&, Common::Language, Common::Platform, Common::String const&, unsigned int, bool)
   1.40%   1.42%   9.55%     5104210   5175781  34760926   Common::String::encodeUTF8(Common::U32String const&, char)
   1.37%                     4997714                       top_down
   1.35%                     4904922                       c2p1x1_8_rect_start
   1.33%   1.39%   4.29%     4855163   5064091  15609394   Common::BaseString<char>::BaseString(char const*)
   1.25%                     4540445                       common2
   1.19%   1.21%   1.21%     4324724   4386088   4386326   timesub.isra.1
   1.09%   1.11%   9.28%     3971935   4032877  33769283   Common::HashMap<Common::Path, Common::FSNode, Common::Path::IgnoreCase_Hash, Common::Path::IgnoreCase_EqualTo>::lookupAndCreateIfMissing(Common::Path const&)
   1.05%   1.11%   2.41%     3808845   4026253   8782006   Common::BaseString<char>::BaseString(Common::BaseString<char> const&)
Without fastcall:

Code: Select all

Time spent in profile = 12.89195s.
...
Visits/calls:
  22.26%  22.26%     1149018   1149098   tolower
   3.35%              173125             common2
...
   1.79%   1.79%       92528     92593   strchr
...
Used cycles:
  10.21%  10.37%  10.37%    42245023  42906882  42910861   tolower
   6.09%   6.23%   6.23%    25180005  25777201  25780321   strchr
   4.79%   2.95%   5.65%    19801831  12217638  23350177 * Common::hashit_lower(char const*)
   3.98%   2.30%   5.50%    16469298   9518224  22730392 * Common::String::equalsIgnoreCase(Common::String const&) const
   3.14%   3.18%   3.26%    12996079  13139043  13492716   Common::BaseString<char>::ensureCapacity(unsigned int, bool)
   2.97%   2.99%   7.41%    12268054  12362543  30641136   Common::BaseString<char>::assignAppend(char const*)
   2.94%                    12164503                       set256
   2.92%   2.98%   5.74%    12065076  12345432  23761666   Common::BaseString<char32_t>::assignAppend(char32_t)
   2.82%   2.88%   2.89%    11648277  11899858  11957260   Common::BaseString<char32_t>::ensureCapacity(unsigned int, bool)
   2.53%   2.56%   2.62%    10453952  10597112  10834475   Graphics::VectorRendererSpec<unsigned char>::drawBevelSquareAlg(int, int, int, int, int, unsigned char, unsigned char)
   2.35%   2.37%   3.85%     9732292   9817570  15934698   Common::BaseString<char>::assignAppend(char)
   2.18%   2.19%  26.75%     9009433   9053038 110644042   Common::punycode_encodefilename(Common::U32String const&)
   1.97%   2.00%   2.00%     8148840   8278391   8279111   Graphics::VectorRendererSpec<unsigned char>::applyScreenShading(GUI::ThemeEngine::ShadingStyle)
   1.97%                     8139603                       ROM_TOS
   1.97%   1.97%   1.97%     8128237   8133054   8133534   strlen
   1.81%   1.83%  16.95%     7495945   7567294  70105844   Common::punycode_encode(Common::U32String const&)
   1.68%   2.30%   2.32%     6968539   9519932   9606409   Common::BaseString<char>::~BaseString()
   1.59%                     6587093                       Common::U32String::decodeUTF8(char const*, unsigned int)
   1.40%   1.42%  52.86%     5800338   5870540 218639243   AdvancedMetaEngineDetection::composeFileHashMap(Common::HashMap<Common::Path, Common::FSNode, Common::Path::IgnoreCase_Hash, Common::Path::IgnoreCase_EqualTo>&, Common::FSList const&, int, Common::Path const&) const [clone .part.0]
   1.36%   1.39%  21.62%     5639070   5750724  89411451   AdvancedMetaEngineDetection::detectGame(Common::FSNode const&, Common::HashMap<Common::Path, Common::FSNode, Common::Path::IgnoreCase_Hash, Common::Path::IgnoreCase_EqualTo> const&, Common::Language, Common::Platform, Common::String const&, unsigned int, bool)
   1.32%                     5468673                       common2
   1.30%                     5380144                       Common::String::encodeUTF8(Common::U32String const&, char)
   1.30%                     5370211                       top_down
   1.29%   1.29%   4.18%     5336482   5355825  17303953   Common::BaseString<char>::BaseString(char const*)
   1.28%   1.30%   5.14%     5311071   5381205  21274974   Common::String::operator+=(char)
   1.18%                     4895241                       c2p1x1_8_rect_start
   1.11%   1.11%   1.11%     4574093   4593294   4593678   timesub.isra.1
   1.04%   1.06%   2.34%     4312105   4373380   9669200   Common::BaseString<char>::BaseString(Common::BaseString<char> const&)
   1.03%   1.05%   9.79%     4248991   4329472  40508969   Common::HashMap<Common::Path, Common::FSNode, Common::Path::IgnoreCase_Hash, Common::Path::IgnoreCase_EqualTo>::lookupAndCreateIfMissing(Common::Path const&)
=> looks pretty similar (within my reaction speed), only odd thing is much higher strchr() call counts in profile data with fastcalls, although cycles are about same.

ScummVM startup

According to ScummVM's own logging on its startup, and timestamp on last log line...

With fastcall:

Code: Select all

[00007730] grabOverlay: 768(768), 480
Without fastcall:

Code: Select all

[00009000] grabOverlay: 768(768), 480
=> Clear ~14% perf improvement with fastcall!

Year ago perf was in middle of these, but I guess related code has changed, and my scummvm.ini grown since: https://www.atari-forum.com/viewtopic.p ... 69#p449969

Any suggestions for other things to compare?
mikro
Hardware Guru
Hardware Guru
Posts: 4724
Joined: Sat Sep 10, 2005 11:11 am
Location: Kosice, Slovakia

Re: ScummVM/Falcon060 pre-release

Post by mikro »

Indeed, not very convincing.

I'm thinking that maybe some of the audio-intensive engines could be good candidates? Also anything which doesn't have c2p and/or copy operations on top of the profiler output.

I don't get my hopes too high, though; mfastcall should show itself on generic function parameters passing, i.e. in quite generic cases i.e. everywhere.
User avatar
Eero Tamminen
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 3998
Joined: Sun Jul 31, 2011 1:11 pm

Re: ScummVM/Falcon060 pre-release

Post by Eero Tamminen »

Here are profiles for couple of game demos where audio conversion is the main bottleneck.

Full Throttle (demo)

Previous profile: https://www.atari-forum.com/viewtopic.p ... 12#p453612

From starting game until it is interactive:

Code: Select all

Time spent in profile = 165.11353s.
...
Used cycles:
  25.12%  25.51%  30.99%  133067322113513053461641500542   Audio::RateConverter_Impl<true, true, false>::convert(Audio::AudioStream&, short*, unsigned int, unsigned short, unsigned short)
  16.82%  17.09%  17.09%   891241655 905394228 905477014   Scumm::SmushDeltaBlocksDecoder::proc3WithoutFDFE(unsigned char*, unsigned char const*, int, int, int, int, short*)
   6.22%                   329453504                       c2p1x1_8_rect_start
   4.80%                   254140810                       c2p1x1_8_rect_pix16
   4.42%                   234178514                       Scumm::IMuseDigiInternalMixer::mixBits8ConvertToStereo(unsigned char*, int, int, int, int*, int*, bool)
   3.66%   3.72%   4.65%   193893781 196879346 246557179   Audio::RawStream<2, false, false>::readBuffer(short*, int)
   3.45%   5.46%  50.32%   182542790 2891909852666013253   OSystem_Atari::update()
   3.38%                   179319190                       copy256
   3.29%   3.34%   3.34%   174187173 176982469 176997489   Scumm::IMuseDigiInternalMixer::loop(unsigned char**, int)
   2.00%                   105950248                       ROM_TOS
   1.78%                    94529119                       OSystem_Atari::delayMillis(unsigned int)
   1.72%   1.74%  13.42%    91105935  92431935 710750172   DefaultTimerManager::checkTimers(unsigned int)
   1.53%                    81092848                       Scumm::CharsetRendererV7::drawCharV7(unsigned char*, Common::Rect&, int, int, int, short, Scumm::TextStyleFlags, unsigned char)
   1.51%   1.53%   1.53%    80069725  81138458  81145946   Scumm::MajMinCodec::decodeLine(unsigned char*, int, int)
   1.38%                    73200420                       copy256_d
   1.33%                    70297542                       AtariMixerManager::update() [clone .part.0]
   1.18%   1.20%   1.20%    62276450  63328344  63334236   virtual thunk to OSystem_Atari::getMillis(bool)
   0.70%   0.71%   2.13%    36860353  37537835 113101188   Scumm::Gdi::drawStripComplex(unsigned char*, int, unsigned char const*, int, bool) const
   0.67%   0.68%   0.68%    35481379  36065087  36068351   Scumm::ScummEngine::remapPaletteColor(int, int, int, int)
Same with fastcall version:

Code: Select all

Time spent in profile = 160.31653s.
...
Used cycles:
  23.71%  24.08%  29.32%  121954381512388201731508342232   Audio::RateConverter_Impl<true, true, false>::convert(Audio::AudioStream&, short*, unsigned int, unsigned short, unsigned short)
  17.33%  17.58%  17.58%   891442984 904216200 904273578   Scumm::SmushDeltaBlocksDecoder::proc3WithoutFDFE(unsigned char*, unsigned char const*, int, int, int, int, short*)
   6.83%                   351502914                       c2p1x1_8_rect_start
   5.28%                   271522081                       c2p1x1_8_rect_pix16
   4.40%   4.48%   4.48%   226463703 230623223 230638138   Scumm::IMuseDigiInternalMixer::mixBits8ConvertToStereo(unsigned char*, int, int, int, int*, int*, bool)
   3.57%   3.63%   4.51%   183742127 186672140 232115890   Audio::RawStream<2, false, false>::readBuffer(short*, int)
   3.48%                   179027421                       copy256
   3.36%   3.41%  49.27%   172677955 1753933212534413589   OSystem_Atari::update()
   3.22%   3.26%   3.26%   165577128 167727552 167737447   Scumm::IMuseDigiInternalMixer::loop(unsigned char**, int)
   2.10%   2.13%  13.64%   108106004 109644156 701496928   DefaultTimerManager::checkTimers(unsigned int)
   1.99%                   102323635                       ROM_TOS
   1.91%                    98244176                       OSystem_Atari::delayMillis(unsigned int)
   1.75%   1.80%  31.54%    89888954  924025971622442904   AtariMixerManager::update() [clone .part.0]
   1.66%                    85469424                       Scumm::CharsetRendererV7::drawCharV7(unsigned char*, Common::Rect&, int, int, int, short, Scumm::TextStyleFlags, unsigned char)
   1.52%   1.54%   1.54%    78056326  79297531  79302631   Scumm::MajMinCodec::decodeLine(unsigned char*, int, int)
   1.31%                    67418341                       copy256_d
   1.26%   1.28%   1.28%    64623203  65793927  65797633   virtual thunk to OSystem_Atari::getMillis(bool)
   0.71%   0.72%   0.72%    36318047  36856422  36858734   Scumm::ScummEngine::remapPaletteColor(int, int, int, int)
   0.70%   0.71%   2.14%    35940788  36438226 110088045   Scumm::Gdi::drawStripComplex(unsigned char*, int, unsigned char const*, int, bool) const
=> 3% faster, idle delays increase 1.78% -> 1.91%

Pyjama Sam 1 (demo)

Previous profile: https://www.atari-forum.com/viewtopic.p ... 45#p462145

From starting game until it is interactive:

Code: Select all

Time spent in profile = 39.15887s.
...
Used cycles:
  12.31%  12.52%  13.51%   154633204 157266457 169687967   Audio::RateConverter_Impl<false, true, false>::convert(Audio::AudioStream&, short*, unsigned int, unsigned short, unsigned short)
   8.96%   9.10%   9.10%   112565201 114344279 114355852   Scumm::Gdi::drawStripHE(unsigned char*, int, unsigned char const*, int, int, bool) const
   7.83%  12.08%  32.65%    98321234 151712642 410208320   OSystem_Atari::update()
   7.79%   7.94%   9.01%    97862249  99783223 113177815   Scumm::ScummEngine::resetActorBgs()
   5.75%   5.83%   6.74%    72294023  73269493  84678829   Scumm::ScummEngine::drawStripToScreen(Scumm::VirtScreen*, int, int, int, int)
   5.47%   5.57%   6.82%    68778180  70005586  85635678   Scumm::AkosRenderer::byleRLEDecode(Scumm::BaseCostumeRenderer::ByleRLEData&)
   3.84%                    48215670                       OSystem_Atari::delayMillis(unsigned int)
   3.69%   3.74%   6.21%    46315526  46986827  78019049   DefaultTimerManager::checkTimers(unsigned int)
   2.85%                    35773207                       AtariMixerManager::update() [clone .part.0]
   2.45%                    30763894                       c2p1x1_8_rect_start
   2.43%   2.47%   2.47%    30472731  31041719  31044935   virtual thunk to OSystem_Atari::getMillis(bool)
   2.00%   2.02%   5.38%    25102196  25353342  67656325   Scumm::Wiz::auxDecompTRLEStream(unsigned short*, unsigned char const*, int, int, unsigned short const*)
   1.89%                    23723293                       c2p1x1_8_rect_pix16
   1.85%                    23245178                       ROM_TOS
   1.38%   1.40%   1.40%    17332334  17602273  17604193   tolower
   1.31%   1.32%   1.93%    16456089  16633449  24235262   fwrite_unlocked
   1.23%                    15421906                       AtariMixerManager::update()
   1.05%                    13143820                       copy256
   0.93%   0.96%   1.02%    11737375  12070746  12759992   Scumm::ResourceManager::createResource(Scumm::ResType, unsigned short, unsigned int)
Same with fastcall version:

Code: Select all

Time spent in profile = 38.37603s.
...
Used cycles:
  12.34%  12.52%  13.48%   151941129 154170820 165957925   Audio::RateConverter_Impl<false, true, false>::convert(Audio::AudioStream&, short*, unsigned int, unsigned short, unsigned short)
   8.13%   8.27%   8.27%   100143816 101773592 101780280   Scumm::Gdi::drawStripHE(unsigned char*, int, unsigned char const*, int, int, bool) const
   7.61%   7.75%   8.72%    93656661  95386429 107396635   Scumm::ScummEngine::resetActorBgs()
   7.00%   7.11%  34.00%    86198450  87488934 418679162   OSystem_Atari::update()
   6.04%   6.14%   6.97%    74336495  75625537  85787017   Scumm::ScummEngine::drawStripToScreen(Scumm::VirtScreen*, int, int, int, int)
   5.72%   5.80%   6.94%    70451732  71465174  85455780   Scumm::AkosRenderer::byleRLEDecode(Scumm::BaseCostumeRenderer::ByleRLEData&)
   4.51%   4.57%   7.24%    55512238  56311296  89194973   DefaultTimerManager::checkTimers(unsigned int)
   4.16%                    51187474                       OSystem_Atari::delayMillis(unsigned int)
   3.80%   3.86%  18.05%    46794838  47516226 222206843   AtariMixerManager::update() [clone .part.0]
   2.62%   2.67%   2.67%    32271564  32882416  32884320   virtual thunk to OSystem_Atari::getMillis(bool)
   2.60%                    32046369                       c2p1x1_8_rect_start
   2.00%                    24686230                       c2p1x1_8_rect_pix16
   1.96%                    24087458                       ROM_TOS
   1.85%   1.87%   4.73%    22747675  23070402  58233590   Scumm::Wiz::auxDecompTRLEStream(unsigned short*, unsigned char const*, int, int, unsigned short const*)
   1.42%   1.43%  19.65%    17454677  17658966 241936167   AtariMixerManager::update()
   1.39%   1.42%   2.11%    17055054  17430670  25969418   fwrite_unlocked
   1.35%   1.36%   1.36%    16585020  16737262  16738101   tolower
   1.05%                    12959444                       copy256
   0.95%   0.97%   1.02%    11731624  11925750  12547576   Scumm::ResourceManager::createResource(Scumm::ResType, unsigned short, unsigned int)
=> Startup time decrease could be due to manual start/stop inaccuracy, but idle delays also increases from 3.84% to 4.16%.

Summary

Fastcall perf improvements to games are pretty meh, but at least perf does seem to marginally improve instead of regressing.
mikro
Hardware Guru
Hardware Guru
Posts: 4724
Joined: Sat Sep 10, 2005 11:11 am
Location: Kosice, Slovakia

Re: ScummVM/Falcon060 pre-release

Post by mikro »

True, also it works in general, what is also good news. :-)

I have only one last idea: trying that super-hungry games like Larry 7 and similar.

Anyway, in overall I'm quite happy: we are using the best tool available out of the box, no need to maintain a separate toolchain/multilib and most importantly, I don't need to port Thorsten's patch to the "official" gcc.
Teki
Atari maniac
Atari maniac
Posts: 94
Joined: Sat Oct 09, 2021 12:23 am

Re: ScummVM/Falcon060 pre-release

Post by Teki »

excited waiting for that larry7 idea :) did this work on the amiga port ??? can i see a list of games which work on amiga ?
NovaCoder
Retro freak
Retro freak
Posts: 16
Joined: Fri Apr 26, 2013 12:09 am

Re: ScummVM/Falcon060 pre-release

Post by NovaCoder »

For the Amiga, I gave up on my old native (low level) front-end which has good performance for up to an 030. I decided that it was easier to just target SDL for the ease of porting and the extra features of a proper port on faster processors (060+) . It seems that an 060 is just about fast enough for this kind approach so maybe the SDL could also be used for Atari ST?

Looking to the future, I'm now considering only targeting PiStorm using OpenGL (Mesa), this will allow me to display 16 bit graphics (SDL2 + OpenGL) and support the more demanding 16 bit games like Ultima 8.

Is Mesa also available for Atari?
You do not have the required permissions to view the files attached to this post.
mikro
Hardware Guru
Hardware Guru
Posts: 4724
Joined: Sat Sep 10, 2005 11:11 am
Location: Kosice, Slovakia

Re: ScummVM/Falcon060 pre-release

Post by mikro »

SDL can be used (and for the Firebee, still is) and even the slowdown isn't so noticeable: https://www.atari-forum.com/viewtopic.p ... 96#p463596. And in the long term, I do plan switching to SDL-only for both of my projects (ScummVM and Atari800) however there are at least two things I have to decide / work on:

- implement various technical features into Atari SDL 1.2 (triple buffering, rework the audio driver, add support for SuperVidel blitting, ...)

- decide whether it even makes sense; I have gone through SDL3 API / specs and we could use so many of its upcoming features (especially the audio processing part and input handling) ... so maybe I'll just wait for SDL 3.0.0 release and include our backend there. libsdl2-compat, in comparison to libsdl1.2-compat, is really just a thin wrapper so even using ports with SDL2 API -> libsdl2-compat -> libsdl3 on Atari wouldn't add too much bloat.

Most likely I'll choose some kind of hybrid approach.

As for Mesa... yes, we do have it. It offers a bridge to Aranym's rendering, so you can get some nice performance from it and with the presence of another driver (PiStorm/Apollo hardware) it could work but this is not for me. I work on Atari projects from "Atari era", I don't see any appeal to run 3D games or huge applications from Linux world, so I'll leave that to someone else.
NovaCoder
Retro freak
Retro freak
Posts: 16
Joined: Fri Apr 26, 2013 12:09 am

Re: ScummVM/Falcon060 pre-release

Post by NovaCoder »

mikro wrote: Wed Jul 03, 2024 8:01 am SDL can be used (and for the Firebee, still is) and even the slowdown isn't so noticeable: https://www.atari-forum.com/viewtopic.p ... 96#p463596. And in the long term, I do plan switching to SDL-only for both of my projects (ScummVM and Atari800) however there are at least two things I have to decide / work on:

- implement various technical features into Atari SDL 1.2 (triple buffering, rework the audio driver, add support for SuperVidel blitting, ...)

- decide whether it even makes sense; I have gone through SDL3 API / specs and we could use so many of its upcoming features (especially the audio processing part and input handling) ... so maybe I'll just wait for SDL 3.0.0 release and include our backend there. libsdl2-compat, in comparison to libsdl1.2-compat, is really just a thin wrapper so even using ports with SDL2 API -> libsdl2-compat -> libsdl3 on Atari wouldn't add too much bloat.

Most likely I'll choose some kind of hybrid approach.
Cool, sounds like a plan :)
mikro wrote: Wed Jul 03, 2024 8:01 am As for Mesa... yes, we do have it. It offers a bridge to Aranym's rendering, so you can get some nice performance from it and with the presence of another driver (PiStorm/Apollo hardware) it could work but this is not for me. I work on Atari projects from "Atari era", I don't see any appeal to run 3D games or huge applications from Linux world, so I'll leave that to someone else.
Yep I get that, personally I just feel like doing something a bit different after all these years.
Teki
Atari maniac
Atari maniac
Posts: 94
Joined: Sat Oct 09, 2021 12:23 am

Re: ScummVM/Falcon060 pre-release

Post by Teki »

3 games tested, until now just from netusbee ...
-hadeschallenge seems to work but graphics is glitchy in lines to left and right, it needs a file with long filename in scumm data folder
- eye of the beholder segaCD english starts with intro then stops/freeze ( until now the the flac soundfiles not converted to wav)
-john marlowe private eye seems to work completly just intro sound stuttering
more to follow
Teki
Atari maniac
Atari maniac
Posts: 94
Joined: Sat Oct 09, 2021 12:23 am

Re: ScummVM/Falcon060 pre-release

Post by Teki »

@novacoder @micro i am just a noob with noob ideas :) but ithe last days i see a yotube video with broken sword on amiga 060, it runs slow but it runs ... when i rmemeber right the aga chipset is only lowres (not 640*480 256c vga) ---how you get it to lowres or how you get the resolution to vga ?
my idea is a 16bit high color game like bladerunner to bring down evtl. with this to a falcon 320* 240 true coolor (16 bit) mode ...
the falcon have the double line mode then to switch/scale back that the low resolution with trrue color runs also on vga then ???
NovaCoder
Retro freak
Retro freak
Posts: 16
Joined: Fri Apr 26, 2013 12:09 am

Re: ScummVM/Falcon060 pre-release

Post by NovaCoder »

I think you are talking about a descaler to reduce resolution, yes that kind of thing is of course possible. It's not something I used in my ports though.
mikro
Hardware Guru
Hardware Guru
Posts: 4724
Joined: Sat Sep 10, 2005 11:11 am
Location: Kosice, Slovakia

Re: ScummVM/Falcon060 pre-release

Post by mikro »

Indeed, some handhelds use the descaler, IIRC. There are two ways to do it:

- dumb (and more straight-forward) way: use some transformation of the original 640x480 buffer into 320x240 (linear, bilinear etc) and then chunky-to-planar conversion to 320x240 screen. Of course, this has its toll = slow.

- smart: settle with the simplest (linear) transformation and skip the intermediate buffer; this works very well for (yet unsupported) 16-bit graphics but causes some trouble for the C2P conversion as it works in 16pix chunks so I'd need to modify the routine to read 32 pixels at once and merge them them into 16 before doing anything.

As mentioned earlier, currently I'm not sold on adding 16-bit support but the idea of seeing how fast BS1/2 or COMI would run in 320x240 is quite tempting. Maybe the overhead is still too big (the engine still renders into 640x480), maybe not.

Btw, early releases did use a sort of descaler: that was when the overlay was shown in 320x240/16-bit and the game was indeed in 640x480. But since I switched to 640x480 overlay with the reduced palette, the descaler code was thrown away.
User avatar
Eero Tamminen
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 3998
Joined: Sun Jul 31, 2011 1:11 pm

Re: ScummVM/Falcon060 pre-release

Post by Eero Tamminen »

Leasure Suit Larry 7 (demo)

Earlier (partial) profile, before Doug Lea's allocator: https://www.atari-forum.com/viewtopic.p ... 37#p444437

Demo startup until main menu

With fastcall:

Code: Select all

Time spent in profile = 39.89175s.
...
Used cycles:
  19.17%  19.46%  88.99%   245320567 2491301781139022979   Sci::run_vm(Sci::EngineState*)
   8.06%   8.20%   9.06%   103189825 104946869 115998746   Sci::readPMachineInstruction(unsigned char const*, unsigned char&, short*)
   5.78%   5.88%   6.25%    73932365  75265908  79936623   fread_unlocked
   3.87%   3.94%   3.94%    49479313  50402898  50406094   timesub.isra.1
   3.26%                    41745083                       ROM_TOS
   2.96%   3.00%  11.06%    37870334  38449510 141613764   Sci::Decompressor::fetchBitsMSB()
   2.68%   2.70%   5.16%    34240787  34618952  66032835   Sci::SegManager::getObject(Sci::reg_t) const
   2.52%   2.57%  16.98%    32298442  32851462 217379720   Sci::DecompressorLZS::unpackLZS()
   2.32%   2.36%   2.36%    29755373  30168388  30170428   Sci::DecompressorLZS::copyComp(int, unsigned int)
   1.81%   1.83%   1.83%    23107412  23401082  23402612   Sci::SciEngine::checkAddressBreakpoint(Sci::reg_t const&)
   1.46%   1.48%   6.89%    18674717  18995262  88132221   Sci::send_selector(Sci::EngineState*, Sci::reg_t, Sci::reg_t, Sci::reg_t*, int, Sci::reg_t*)
   1.44%   1.46%   1.46%    18455766  18725040  18726321   tolower
   1.12%   1.13%   5.07%    14368953  14512338  64918090   localsub
   1.11%   1.12%   1.12%    14160080  14364731  14365649   Sci::reg_t::getSegment() const
   1.11%   1.13%   7.37%    14143835  14443329  94391369   StdioStream::read(void*, unsigned int)
   1.09%   1.11%   1.81%    13992304  14189287  23214645   fwrite_unlocked
   1.09%   1.11%   8.48%    13894506  14175369 108550258   Common::File::read(void*, unsigned int)
   1.06%   1.07%   1.64%    13562160  13698266  21041922   Sci::READ_SCI11ENDIAN_UINT16(void const*)
   1.03%   1.04%   1.04%    13167667  13273346  13274094   free
   0.98%   0.99%   2.88%    12574157  12725618  36876125   Sci::DecompressorLZS::getCompLen()
   0.95%   0.96%   1.68%    12204438  12252534  21486883   Sci::read_var(Sci::EngineState*, int, int)
   0.89%   0.91%   1.39%    11421232  11596522  17854828   Sci::Kernel::findRegType(Sci::reg_t)
   0.89%   0.91%   1.76%    11376019  11660748  22467239   Sci::Script::getObject(unsigned int)
   0.88%   0.89%   6.25%    11301424  11447433  79946787   time2sub
   0.87%   0.89%   0.93%    11148022  11338866  11961409   malloc
Without fastcall:

Code: Select all

Time spent in profile = 42.44016s.
...
Used cycles:
  18.02%  18.31%  88.62%   245334464 2493251791206757041   Sci::run_vm(Sci::EngineState*)
   7.22%   7.31%   8.20%    98364301  99524395 111657970   Sci::readPMachineInstruction(unsigned char const*, unsigned char&, short*)
   6.09%   6.17%   6.54%    82939187  84065118  89043703   fread_unlocked
   3.73%   3.79%   3.79%    50806563  51625144  51631271   timesub.isra.1
   3.25%   3.32%  12.15%    44277582  45192104 165418335   Sci::Decompressor::fetchBitsMSB()
   3.11%                    42334102                       ROM_TOS
   2.70%                    36821692                       Sci::DecompressorLZS::unpackLZS()
   2.52%   2.55%   2.55%    34260626  34741888  34745344   Sci::DecompressorLZS::copyComp(int, unsigned int)
   2.51%   2.10%   3.92%    34113860  28648626  53430782 * Sci::SegManager::getObject(Sci::reg_t) const
   2.22%   2.26%   2.26%    30297058  30771999  30775522   Sci::SciEngine::checkAddressBreakpoint(Sci::reg_t const&)
   1.54%   1.56%   1.56%    20952012  21190980  21193495   tolower
   1.45%   2.72%   9.26%    19708544  37002403 126050208   Common::File::read(void*, unsigned int)
   1.34%   1.36%   6.39%    18292843  18515994  87065637   Sci::send_selector(Sci::EngineState*, Sci::reg_t, Sci::reg_t, Sci::reg_t*, int, Sci::reg_t*)
   1.24%   0.00%   0.00%    16833187       347     13152 * StdioStream::read(void*, unsigned int)
   1.21%   1.22%   5.01%    16413171  16632148  68260309   localsub
   1.19%   1.22%   1.70%    16200243  16629609  23166387   Sci::READ_SCI11ENDIAN_UINT16(void const*)
   1.10%   1.11%   1.11%    14945306  15058446  15059886   Sci::reg_t::getSegment() const
   1.05%   1.06%   1.68%    14258149  14500650  22850222   fwrite_unlocked
   1.01%   1.03%   3.15%    13757765  13965775  42879575   Sci::DecompressorLZS::getCompLen()
   1.01%   0.20%   0.20%    13752733   2664113   2664209 * free
   0.99%   1.00%   1.00%    13420067  13568174  13569566   GUI::Debugger::onFrame()
   0.95%   0.96%   6.29%    12930705  13128051  85599911   time2sub
   0.92%   0.94%   1.54%    12479610  12772061  21025985   Sci::read_var(Sci::EngineState*, int, int)
   0.86%   0.90%   1.35%    11760359  12194018  18414086   Sci::Kernel::findRegType(Sci::reg_t)
   0.83%   0.82%   0.86%    11241809  11173297  11741139 * malloc
=> Fastcall version starts ~5% faster, and ~5% more time spent on TOS side, than non-fastcall version.

Demo intro until interactive poker part

With fastcall:

Code: Select all

Time spent in profile = 471.28896s.
...
Used cycles:
   8.11%   8.23%   8.34%  122698782212450385841261353228   fread_unlocked
   6.87%   4.71%  37.15%  1038341824 7116184645617892594 * Sci::run_vm(Sci::EngineState*)
   5.64%   5.73%  11.78%   852774740 8662267011781700728   void Sci::CelObj::render<Sci::MAPPER_NoMD, Sci::SCALER_NoScale<false, Sci::READER_Compressed> >(Graphics::Surface&, Common::Rect const&, Common::Point const&) const
   3.85%   3.90%   3.90%   581485427 590341644 590379033   Sci::DecompressorLZS::copyComp(int, unsigned int)
   3.81%   3.87%  10.02%   576428560 5856445431514973490   Audio::RateConverter_Impl<false, true, false>::convert(Audio::AudioStream&, short*, unsigned int, unsigned short, unsigned short)
   3.77%   3.83%  15.25%   570645937 5797257302306673961   Sci::Decompressor::fetchBitsMSB()
   3.66%   3.72%   3.72%   553998178 562917679 562953696   Sci::SingleRemap::matchColor(Sci::Color const&, int, int&, bool const*) const
   3.51%   3.56%   6.71%   530490425 5383282721015097857   Common::MemoryReadStream::read(void*, unsigned int)
   3.46%   3.51%  30.80%   522721854 5314128954657289995   Audio::RateConverter_Impl<true, true, false>::convert(Audio::AudioStream&, short*, unsigned int, unsigned short, unsigned short)
   3.39%   3.44%  24.14%   512266404 5201554873650412280   Sci::DecompressorLZS::unpackLZS()
   2.98%   3.02%   3.38%   450026082 457305740 510592034   Sci::readPMachineInstruction(unsigned char const*, unsigned char&, short*)
   2.61%   2.65%   9.36%   394640725 4002462521415417851   Common::SubReadStream::read(void*, unsigned int)
   2.54%   2.58%   5.62%   384026637 390123092 849151682   Sci::READER_Compressed::getRow(short)
   2.14%   2.17%   2.17%   324325022 328744405 328813288   Graphics::isLinePixel(Graphics::MarginedBitmap<unsigned char> const&, int, int) [clone .isra.0]
   2.09%   2.12%   4.08%   315866196 320138048 617444698   Sci::SegManager::getObject(Sci::reg_t) const
   1.95%   1.98%   7.32%   294956255 2991459191106372563   Sci::SOLStream<true, true, false>::readBuffer(short*, int)
   1.89%   1.92%   1.93%   285733425 290616494 292529028   void Sci::CelObj::render<Sci::MAPPER_NoMDNoSkip, Sci::SCALER_NoScale<false, Sci::READER_Uncompressed> >(Graphics::Surface&, Common::Rect const&, Common::Point const&) const
   1.62%                   245341701                       ROM_TOS
   1.60%   1.63%   5.63%   242507418 246767203 851089495   Sci::SOLStream<false, true, false>::readBuffer(short*, int)
   1.57%   1.60%  11.43%   237805029 2413385061727890012   Common::File::read(void*, unsigned int)
   1.52%   1.54%   6.32%   230026001 233503471 955959755   Graphics::scaleUp(Graphics::MarginedBitmap<unsigned char> const&, int, int, Graphics::RowWriter&)
   1.51%   1.54%   4.37%   228842362 232635827 660646663   Sci::DecompressorLZS::getCompLen()
   1.48%                   223452406                       common2
   1.46%   1.49%   9.83%   221136039 2250871611486657320   StdioStream::read(void*, unsigned int)
   1.35%   1.37%   3.22%   204494356 207789168 486610624   Sci::CelObjView::analyzeForRemap() const
   1.30%   1.32%   1.32%   196086054 199770572 199785470   Graphics::getEqualityMatrix(unsigned char const*, int)
   1.08%   1.10%   2.39%   163939667 166453046 361554329   Graphics::scalePixelTo2x1(Graphics::MarginedBitmap<unsigned char> const&, Graphics::MarginedBitmap<bool> const&, int, int, unsigned char&, unsigned char&)
   1.03%                   156308540                       c2p1x1_8_rect_start
   0.95%   0.96%   2.08%   143498478 145873551 315036342   Sci::Object::locateVarSelector(Sci::SegManager*, int) const
   0.90%   0.91%   4.54%   135792952 137627816 685752171   Sci::send_selector(Sci::EngineState*, Sci::reg_t, Sci::reg_t, Sci::reg_t*, int, Sci::reg_t*)
   0.80%                   120802837                       c2p1x1_8_rect_pix16
Without fastcall:

Code: Select all

Time spent in profile = 519.23076s.
...
Used cycles:
   7.77%   7.89%   7.99%  129482976013144681971331109658   fread_unlocked
   6.63%   4.60%  37.13%  1105000696 7658047186185356622 * Sci::run_vm(Sci::EngineState*)
   4.89%   4.92%  11.19%   814373277 8191774921864138832   void Sci::CelObj::render<Sci::MAPPER_NoMD, Sci::SCALER_NoScale<false, Sci::READER_Compressed> >(Graphics::Surface&, Common::Rect const&, Common::Point const&) const
   4.32%   4.38%  15.93%   720408207 7295789862654351618   Sci::Decompressor::fetchBitsMSB()
   3.64%   3.70%   3.70%   606674587 616872529 616928221   Sci::DecompressorLZS::copyComp(int, unsigned int)
   3.59%   3.64%   9.92%   597336787 6058783421652803887   Audio::RateConverter_Impl<false, true, false>::convert(Audio::AudioStream&, short*, unsigned int, unsigned short, unsigned short)
   3.52%   3.57%   7.32%   585885426 5948866491219810500   Common::MemoryReadStream::read(void*, unsigned int)
   3.44%                   572989280                       Sci::DecompressorLZS::unpackLZS()
   3.34%   3.39%  32.20%   556611381 5653036125364734137   Audio::RateConverter_Impl<true, true, false>::convert(Audio::AudioStream&, short*, unsigned int, unsigned short, unsigned short)
   3.31%   3.36%   3.36%   551689893 560240979 560292034   Sci::SingleRemap::matchColor(Sci::Color const&, int, int&, bool const*) const
   2.87%   2.91%  10.23%   477324325 4847755091704686578   Common::SubReadStream::read(void*, unsigned int)
   2.84%   2.89%   6.25%   473802730 4807625291041978886   Sci::READER_Compressed::getRow(short)
   2.67%   2.71%   3.08%   444348610 450800267 513509999   Sci::readPMachineInstruction(unsigned char const*, unsigned char&, short*)
   2.29%   2.32%   2.32%   381967434 387037065 387070713   Graphics::isLinePixel(Graphics::MarginedBitmap<unsigned char> const&, int, int) [clone .isra.0]
   2.17%   2.20%   8.12%   361016940 3663301571352407832   Sci::SOLStream<true, true, false>::readBuffer(short*, int)
   2.00%   1.59%   3.05%   332573629 264674895 508077885 * Sci::SegManager::getObject(Sci::reg_t) const
   1.87%                   311955211                       common2
   1.84%   3.57%  11.56%   305881431 5944514171925873076   Common::File::read(void*, unsigned int)
   1.73%   1.76%   1.77%   288722458 293318973 295414775   void Sci::CelObj::render<Sci::MAPPER_NoMDNoSkip, Sci::SCALER_NoScale<false, Sci::READER_Uncompressed> >(Graphics::Surface&, Common::Rect const&, Common::Point const&) const
   1.68%                   279342003                       StdioStream::read(void*, unsigned int)
   1.61%                   268250219                       ROM_TOS
   1.51%   1.54%   4.48%   252048987 256183917 746186544   Sci::DecompressorLZS::getCompLen()
   1.44%   1.47%   5.76%   240525338 244442140 959650864   Sci::SOLStream<false, true, false>::readBuffer(short*, int)
   1.37%   1.39%   1.40%   228440168 232383937 232405399   Graphics::getEqualityMatrix(unsigned char const*, int)
   1.37%                   227692845                       Graphics::scaleUp(Graphics::MarginedBitmap<unsigned char> const&, int, int, Graphics::RowWriter&)
   1.28%   1.30%   2.66%   212942291 216221138 443516287   Graphics::scalePixelTo2x1(Graphics::MarginedBitmap<unsigned char> const&, Graphics::MarginedBitmap<bool> const&, int, int, unsigned char&, unsigned char&)
   1.22%   1.24%   3.36%   203801682 206905184 559025255   Sci::CelObjView::analyzeForRemap() const
   0.95%                   158110894                       c2p1x1_8_rect_start
   0.88%   0.90%   2.02%   146937825 149672991 335993734   Sci::Object::locateVarSelector(Sci::SegManager*, int) const
   0.86%   0.87%   4.37%   143006424 145623880 728141644   Sci::send_selector(Sci::EngineState*, Sci::reg_t, Sci::reg_t, Sci::reg_t*, int, Sci::reg_t*)
   0.78%   0.79%   0.79%   129291075 131679263 131693289   Sci::SciEngine::checkAddressBreakpoint(Sci::reg_t const&)
   0.77%   0.78%   9.08%   128184785 1305951901512818277   void Sci::CelObj::render<Sci::MAPPER_Map, Sci::SCALER_Scale<false, Sci::READER_Uncompressed> >(Graphics::Surface&, Common::Rect const&, Common::Point const&, Common::Rational const&, Common::Rational const&) const
   0.73%                   122149182                       c2p1x1_8_rect_pix16
=> Intro nearly 10% faster with fastcall, and has nearly 10% more time for updating screen with c2p, which I think validates it being faster.

(About same time spent on TOS side.)
mikro
Hardware Guru
Hardware Guru
Posts: 4724
Joined: Sat Sep 10, 2005 11:11 am
Location: Kosice, Slovakia

Re: ScummVM/Falcon060 pre-release

Post by mikro »

Long time without an update... except the usual excuses I was busy with some SDL stuff and then of course playing with the -mfastcall builds. However a few days ago I wanted to again work on some SDL things, wanted to check out the implementation in ScummVM and I really didn't like what I saw, the whole graphics backend had become really hard to follow.

So I fell into the typical programmer's rabbit hole "I only refactor this, oh no, what's that, ok, I refactor that one as well, oh gosh, there's no way I let this one alone". So in the end, I didn't do anything on SDL. ;) The following builds are therefore mostly maintenance snapshot:

- updated to latest master
- HE (bink) games enabled in the full build
- fixed the SDL crash when no $HOME / $XDG_CONFIG_HOME was set
- fixed the buffer overflow crash when logging
- added support for all special Eiffel keys like Scroll Lock, Num Lock, Caps Lock, Meta ... keys
- found out how to actually test Eiffel in Aranym
- fixed / sped up the aspect ratio correction switch (CTRL+ALT+A), now supported games automatically switch to non-square pixels... to really see its effect you need a CRT monitor but an LCD with ability to stretch with preserved aspect ratio seems to do the job (at least on mine) ... I recommend to run Maniac Mansion to see the difference!
- reduced the number of transitions between video modes (typically the initial 320x200 -> overlay 640x480 -> initial 320x200 -> game resolution) and made them as smooth as possible (careful ordering and VBL'ing)
- lighter ST RAM usage on the lite build (there were three full 640x480 screens allocated instead of 320x240)
- some internal changes by Thorsten (most notably the -mfastcall support)

https://mikro.naprvyraz.sk/private/scum ... i-full.zip
https://mikro.naprvyraz.sk/private/scum ... i-lite.zip

If you get an Out of sync message on your monitor while launching a game, don't panic: press CTRL+F5, go back to the launcher and in Global options disable the aspect ratio correction checkbox. We shall see whether this should be enabled or disabled by default.

And if you are wondering why I suddenly fell in love with SDL... some time ago I have decided to slowly adopt SDL for all the housekeeping, in the beginning on the graphics side. Both Atari800 and ScummVM now contains dual backends, one "optimized / native" and one based on SDL. So I would like to have just an "optimised SDL" backend, without the need to write my own triple buffer, my own C2P routines and most importantly: to fix bugs in both backends (Atari800 is especially annoying in this way). And yes, it will definitely improves the chances of having ScummVM on NOVA, V4, maybe even GEM and FireBee and from the other end, having SuperVidel's SuperBlitter (and maybe CTPCI's bliting abilities, too) available directly in SDL (so called "hardware acceleration").

In the meantime I've got closely familiar with SDL internals, so I know where the inefficiencies usually come from. SDL is perfectly able to give you full control over your rendering with zero overhead. Later (long term) I would like to port SDL3 (when finished), it has some really nice APIs available.

Of course, this doesn't mean that I will just blindly use the default ScummVM's SDL backend, not at all. There's still too many changes tailored to our low-performing machine. But the init/deinit part, common routines, that will all come from SDL. And of course, I'll go through the recent posts for some investigation.
User avatar
Eero Tamminen
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 3998
Joined: Sun Jul 31, 2011 1:11 pm

Re: ScummVM/Falcon060 pre-release

Post by Eero Tamminen »

mikro wrote: Mon Jul 15, 2024 6:26 pm And if you are wondering why I suddenly fell in love with SDL... some time ago I have decided to slowly adopt SDL for all the housekeeping, in the beginning on the graphics side. Both Atari800 and ScummVM now contains dual backends, one "optimized / native" and one based on SDL. So I would like to have just an "optimised SDL" backend, without the need to write my own triple buffer, my own C2P routines and most importantly: to fix bugs in both backends (Atari800 is especially annoying in this way). And yes, it will definitely improves the chances of having ScummVM on NOVA, V4, maybe even GEM and FireBee and from the other end, having SuperVidel's SuperBlitter (and maybe CTPCI's bliting abilities, too) available directly in SDL (so called "hardware acceleration").

In the meantime I've got closely familiar with SDL internals, so I know where the inefficiencies usually come from. SDL is perfectly able to give you full control over your rendering with zero overhead. Later (long term) I would like to port SDL3 (when finished), it has some really nice APIs available.

Of course, this doesn't mean that I will just blindly use the default ScummVM's SDL backend, not at all. There's still too many changes tailored to our low-performing machine. But the init/deinit part, common routines, that will all come from SDL. And of course, I'll go through the recent posts for some investigation.
Have you any idea about problems with the SDL version that I listed in the ScummVM release thread: https://www.atari-forum.com/viewtopic.p ... 47#p463547

Compared to greatly working native ScummVM version, SDL version that I tested seemed somewhat unusable due to frequent pauses and downright complete freezing in many games...

Is it due to SDL clock being too inaccurate + it buffering too much audio, recursive calling of things that should not (like that one problem in native version), or something else?
mikro
Hardware Guru
Hardware Guru
Posts: 4724
Joined: Sat Sep 10, 2005 11:11 am
Location: Kosice, Slovakia

Re: ScummVM/Falcon060 pre-release

Post by mikro »

SDL sound routines need a complete overhaul, its event system is also quite complex, ... I'm pretty sure that freezing is somehow related to the timer / delay / update problem we had with some games in ScummVM but ... currently there's no point in investigating. The graphics part alone is quite a big job, so when/if that gets done and I will successfully merge it to ScummVM/Atari800 and there wont be anything more interesting, sure, then I can look into further merging but before that... we'll stick with the custom events and sound.

Return to “News & Announcements”