mirror of
https://github.com/xemu-project/xemu.git
synced 2024-12-02 16:46:59 +00:00
nv2a: Ptimer fixes (#113)
Set NV2A_CRYSTAL_FREQ to Retail speed Fix ptimer_get_clock() behaviour
This commit is contained in:
parent
337e1fa114
commit
7960ffe466
@ -1292,7 +1292,7 @@
|
||||
#define NV2A_VERTEX_ATTR_RESERVED2 14
|
||||
#define NV2A_VERTEX_ATTR_RESERVED3 15
|
||||
|
||||
#define NV2A_CRYSTAL_FREQ 13500000
|
||||
#define NV2A_CRYSTAL_FREQ 16666666
|
||||
#define NV2A_NUM_CHANNELS 32
|
||||
#define NV2A_NUM_SUBCHANNELS 8
|
||||
#define NV2A_CACHE1_SIZE 128
|
||||
|
@ -19,12 +19,14 @@
|
||||
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/* PIMTER - time measurement and time-based alarms */
|
||||
/* PTIMER - time measurement and time-based alarms */
|
||||
static uint64_t ptimer_get_clock(NV2AState *d)
|
||||
{
|
||||
return muldiv64(qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL),
|
||||
d->pramdac.core_clock_freq * d->ptimer.numerator,
|
||||
NANOSECONDS_PER_SECOND * d->ptimer.denominator);
|
||||
return muldiv64(muldiv64(qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL),
|
||||
d->pramdac.core_clock_freq,
|
||||
NANOSECONDS_PER_SECOND),
|
||||
d->ptimer.denominator,
|
||||
d->ptimer.numerator);
|
||||
}
|
||||
|
||||
uint64_t ptimer_read(void *opaque, hwaddr addr, unsigned int size)
|
||||
|
Loading…
Reference in New Issue
Block a user