English Amiga Board


Go Back   English Amiga Board > Support > support.WinUAE

 
 
Thread Tools
Old 24 June 2016, 18:53   #1
mark_k
Registered User
 
Join Date: Aug 2004
Location:
Posts: 3,335
Reducing CPU usage when emulation window is inactive

A couple of suggestions for features which could allow WinUAE's CPU usage (but not the emulated machine speed) to be reduced when the window is inactive:
  • Ability to specify an alternate refresh (frame skip) setting to be used when the window is inactive. The user could be using another application, but still wants to have the emulation window visible. [Maybe, depending on emulation settings, doing that would increase emulation speed?]
  • When the entire emulated display is obscured by another window, stop refreshing it altogether. Start rendering Amiga frames again once part of the display is revealed. (Note that the emulated display could be completely covered but the status bar below might not be. So you'd still refresh the status bar in that case.)
mark_k is online now  
Old 24 June 2016, 21:26   #2
meynaf
son of 68k
 
meynaf's Avatar
 
Join Date: Nov 2007
Location: Lyon / France
Age: 51
Posts: 5,323
I second that.

In addition it would be good to detect whether the screen has changed or not, to prevent unneeded refreshing (i heard some mac emu on the amiga does this with the mmu).
Seeing permanent 25% cpu use while the Amiga is totally idle isn't exactly sexy.
meynaf is offline  
Old 24 June 2016, 21:54   #3
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,505
It isn't that simple. When it is finally known that display has changed, about 2/3 of the display emulation is already done.. Final bit (planer to chunky, sprite merging and conversion to host color depth) is very simple part.

Don't ever try to compare Amiga with some basic system that does not have anything like a copper or hardware sprites.

EDIT: RTG modes already use host MMU write detection trick. It can only work with RTG modes because they are 100% predictable, no copper tricks and splits.

Last edited by Toni Wilen; 24 June 2016 at 22:06.
Toni Wilen is offline  
Old 24 June 2016, 22:15   #4
mark_k
Registered User
 
Join Date: Aug 2004
Location:
Posts: 3,335
A small addition: the ability to specify a very large frame skip value for when the window is inactive could be useful. E.g. user is installing Linux or NetBSD which takes a while, they might choose to only have the display refreshed once per second, which would be good enough to see when user input is needed.
mark_k is online now  
Old 24 June 2016, 22:18   #5
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,505
Does it really make any noticeably difference? Static non-copper trick screen should be detected as nothing much changing and frame skip can't skip early parts of display emulation anyway because it would only break compatibility too bady.
Toni Wilen is offline  
Old 24 June 2016, 22:32   #6
mark_k
Registered User
 
Join Date: Aug 2004
Location:
Posts: 3,335
Testing with a config which uses fastest possible CPU, JIT, CPU idle set to max (my usual config which I use with Workbench). Screenmode is HighGFX 1024×768. Workbench loaded, emulated system idle. On Linux/Wine, the WinUAE CPU% indicator reads 29%-33% at frame skip 0, 23-26% at frame skip 9.

Maybe some demo with lots of copper effects could show a larger difference?

An A500-like config with cycle-exact unchecked, running CELTIC-MultiscrollerScroller demo.
27%-30% frame skip 9
43%-52% frame skip 0
(with my laptop's CPU locked to 800MHz)

Large frameskip could be useful if user has demo running, listening to the music, but the demo waits for a mouseclick at the end of each part.
mark_k is online now  
Old 24 June 2016, 23:16   #7
meynaf
son of 68k
 
meynaf's Avatar
 
Join Date: Nov 2007
Location: Lyon / France
Age: 51
Posts: 5,323
Quote:
Originally Posted by Toni Wilen View Post
Does it really make any noticeably difference?
It's worth if filters are used. Some take a significant cpu use.
meynaf is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
Strange CPU usage under Wine mark_k support.WinUAE 0 05 December 2013 13:24
Is this Normal cpu usage? exoticaga support.WinUAE 6 18 February 2008 09:22
Heavy cpu usage - again abelthorne support.WinUAE 5 03 March 2004 11:32
WinUAE high CPU usage DeCreator support.WinUAE 2 17 July 2003 02:12
WinUAE CPU usage at 100% argh wakeupbomb support.WinUAE 4 23 January 2003 09:27

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 15:38.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.23536 seconds with 15 queries