MAMEWorld >> Programming
Previous thread Previous  View all threads Index   Next thread Next   Threaded Mode Threaded  

Pages: 1

gtmoa
Lurker
Reged: 02/21/04
Posts: 132
Send PM


question about CPU slice
#318417 - 12/09/13 09:09 AM


Hello

Looking at some code in MAME makes me wondering.
Please someone tell me
What is the default value for the CPU slice (when not mentioned)?
Is it dependant of the main CPU?
Thank you



R. Belmont
Cuckoo for IGAvania
Reged: 09/21/03
Posts: 9716
Loc: ECV-197 The Orville
Send PM


Re: question about CPU slice new [Re: gtmoa]
#318491 - 12/10/13 06:06 PM


> What is the default value for the CPU slice (when not mentioned)?

If there are no timers running or anything else to disrupt it, the CPU time slice is the CPU's clock divided by the frame rate. If there are timers or an interleave factor in play, the time slice can be as short as 1 cycle.



gtmoa
Lurker
Reged: 02/21/04
Posts: 132
Send PM


Re: question about CPU slice new [Re: R. Belmont]
#318539 - 12/11/13 09:03 AM


Thank you

So if I understand well

MCFG_QUANTUM_TIME(attotime::from_hz(200000))

equal a 12Mhz CPU and a 60Hz refresh rate (12000000/60)=200000
slices are 200000/60 = 3333
?

the more slices equal the most precise but more power consuming or it is the contrary?
Thank you



AWJ
Reged: 03/08/05
Posts: 936
Loc: Ottawa, Ontario
Send PM


Re: question about CPU slice new [Re: gtmoa]
#318870 - 12/17/13 09:43 PM


> Thank you
>
> So if I understand well
>
> MCFG_QUANTUM_TIME(attotime::from_hz(200000))
>
> equal a 12Mhz CPU and a 60Hz refresh rate (12000000/60)=200000
> slices are 200000/60 = 3333
> ?

No. CPU slices aren't relative to the video refresh rate, nor are they intrinsically related to it in any way. MCFG_QUANTUM_TIME(attotime::from_hz(200000)) means exactly what it says on the tin: 200000 Hz.



gtmoa
Lurker
Reged: 02/21/04
Posts: 132
Send PM


Re: question about CPU slice new [Re: AWJ]
#319003 - 12/19/13 11:11 PM


thank you for the explanation


Pages: 1

MAMEWorld >> Programming
Previous thread Previous  View all threads Index   Next thread Next   Threaded Mode Threaded  

Extra information Permissions
Moderator:  Pi 
0 registered and 14 anonymous users are browsing this forum.
You cannot start new topics
You cannot reply to topics
HTML is enabled
UBBCode is enabled
Thread views: 2874