|
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
[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.
|
|
|
|
Re: question about CPU slice
[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
[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.
|
|
|
|
Re: question about CPU slice
[Re: AWJ]
#319003 - 12/19/13 11:11 PM
|
|
|
thank you for the explanation
|
|
|