Search the web
Sign In
New User? Sign Up
vmu-dev · The VMU Development list
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Want to share photos of your group with the world? Add a group photo to Flickr.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
VMU Oscillation Control Register   Message List  
Reply | Forward Message #1052 of 1156 |
Hi,

I recently made good progress with my VMU emulator. But now it looks as if
the timing is incorrect. Some games run too fast, some too slow. Since I
don't have a real VMU myself, I can't do any comparissons. Well, I will just
drop my code wich handles the OCR register, and perhaps someone can tell me
if the timings are correct:

case 0x10E: /* Oscillation Control Regitser */
{
Cpu.OCR = Data;

int OldSpeed = Cpu.Speed;

switch (Data & 0xA0)
{
case 0x00:
Cpu.Speed = 5000; /* (600Khz / 2) / 60 (RC Clock / 12) */
break;
case 0x20:
Cpu.Speed = 273; /* (32768Hz / 2) / 60 (Sub Clock / 12) */
break;
case 0x80:
Cpu.Speed = 10000; /* (600Khz / 1) / 60 (RC Clock / 6) */
break;
case 0xA0:
Cpu.Speed = 546; /* (32768Hz / 1) / 60 (Sub Clock / 6) */
break;
}

/* Calculate remaining cycles to run, based on new clock speed */
Cpu.NrCycles = Cpu.Speed * (Cpu.NrCycles / OldSpeed);
return;
}

Notes: I'm rendering the VMU at 60 FPS, so the timing values are divided by
60. Cpu.Speed is the current clock speed. Cpu.NrCycles is the remaining
cycles to run during this frame.

Anyone noticed something wrong with this code ??

BTW: If you want to compare my emu to a real thing, just ask, and I can send
a private build of it.

Thanks in advance,

Michel Gerritse (Gerrie)


_________________________________________________________________
Chatten met je vrienden via het web? Probeer MSN Messenger
http://messenger.msn.nl/default.asp?client=1




Tue Oct 15, 2002 8:43 pm

xega_emu
Offline Offline
Send Email Send Email

Forward
Message #1052 of 1156 |
Expand Messages Author Sort by Date

Hi, I recently made good progress with my VMU emulator. But now it looks as if the timing is incorrect. Some games run too fast, some too slow. Since I don't...
Michel Gerritse
xega_emu
Offline Send Email
Oct 15, 2002
8:43 pm
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help