MAMEWorld >> Programming
View all threads Index   Flat Mode Flat  

R. Belmont
Cuckoo for IGAvania
Reged: 09/21/03
Posts: 9711
Loc: ECV-197 The Orville
Send PM
Re: Writing My Own Emulator From Scratch
01/10/08 07:48 AM


Timing's easy, at least at first Given the clock of the emulated CPU and the frame rate of the game, you simply run the CPU for (clock / rate) cycles each frame.

So for a 1 MHz CPU (common in 6502 games) at 60 frames per second, you'd run the CPU for 1000000/60 = 16666 cycles each frame. Each time you were done running the CPU is when you'd update the screen, read the keyboard/joypads, and all the other stuff.







Entire thread
Subject Posted by Posted on
* Writing My Own Emulator From Scratch arcadegamenut 01/10/08 07:15 AM
. * Centipede Documentation arcadegamenut  02/01/08 10:19 PM
. * Re: Centipede Documentation Phil Bennett  02/01/08 11:59 PM
. * Progress arcadegamenut  01/22/08 06:25 PM
. * Re: Progress arcadegamenut  01/30/08 12:40 AM
. * Re: Progress Lord Nightmare  01/30/08 01:43 AM
. * Re: Progress R. Belmont  01/30/08 02:34 AM
. * Re: Progress arcadegamenut  01/30/08 04:27 AM
. * Re: Progress Anonymous  02/04/08 02:28 AM
. * Baby Steps arcadegamenut  01/18/08 11:43 PM
. * Re: Baby Steps R. Belmont  01/20/08 12:33 AM
. * Re: Baby Steps Anonymous  01/20/08 12:38 AM
. * Re: Baby Steps R. Belmont  01/20/08 03:38 AM
. * Re: Baby Steps arcadegamenut  01/20/08 04:13 AM
. * Re: Baby Steps arcadegamenut  01/20/08 01:34 AM
. * Re: Baby Steps R. Belmont  01/20/08 03:37 AM
. * Re: Writing My Own Emulator From Scratch arcadegamenut  01/16/08 06:27 PM
. * Re: Writing My Own Emulator From Scratch arcadegamenut  01/11/08 07:09 PM
. * Re: Writing My Own Emulator From Scratch Anonymous  01/14/08 02:12 PM
. * Re: Writing My Own Emulator From Scratch arcadegamenut  01/14/08 09:20 PM
. * Re: Writing My Own Emulator From Scratch Anonymous  01/15/08 01:30 AM
. * Re: Writing My Own Emulator From Scratch R. Belmont  01/10/08 07:48 AM
. * Re: Writing My Own Emulator From Scratch arcadegamenut  01/10/08 06:26 PM
. * Re: Writing My Own Emulator From Scratch Stolistic  01/10/08 08:27 PM
. * Re: Writing My Own Emulator From Scratch arcadegamenut  01/11/08 12:10 AM
. * Re: Writing My Own Emulator From Scratch R. Belmont  01/11/08 01:10 AM

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