Zophar's Message Domain

Go Back   Zophar's Message Domain > Emulation Talk > General Emulation

Reply
 
Thread Tools Display Modes
Old 02-18-2006, 08:55 PM   #1
projekt2501x
Junior Member
 
Join Date: Feb 2006
Posts: 10
Default nes emulator with cpu core frequency settings?

I am new to this forum so first I will just say hello and that I am quite an avid emulation fan.

I was wondering if there was a NES emulator out at the moment that allowed for overclocking the 1.7Mhz emulation that most of the emulators are fixed on. I don't mean speeding up gameplay. I was playing metroid last night, for example, and it just bothers me that no emulator I have seen has tried to address the slowdown issues inherit in that game and others. It's almost a case of emulating too perfectly, because if I fire up my NES and put on metroid, of course it does the same thing.

I was reading on slashdot about people overclocking their hardware Nintendo systems up to 4.2 mhz to fix slowdown isses [in games such as metroid]... are there any emulators that are trying to do the same?

_p
<P ID="signature"></P>
projekt2501x is offline   Reply With Quote
Old 02-18-2006, 10:16 PM   #2
Disch
Senior Member
 
Join Date: Apr 2001
Posts: 4,387
Default Re: nes emulator with cpu core frequency settings?

Anyway. The short answer is: No, I don't know of any NES emus which allow you to change it.

The long answer of a reason why that might be the case:

For starters, it would be a lot of work (it wouldn't be as simple as changing a constant inside the emu -- there's a lot of timing sync stuff the emu has to keep track of, and most emus probably are built around the assumption of a fixed CPU:PPU clock ratio). Furthermore, it would probably only work for a handful of games.. and would break (or cause glitches in) many many many games.

Too many games rely on PPU/CPU syncronization. Upping the CPU clock speed would probably break many older games which don't take advantage of a PPU-based IRQ counter (MMC3, MMC5, and some mapper 90 IRQs are the only ones that would still work -- but most of those games would likely experience jitters right where the screen splits if you changed the CPU clock). Older games which split the screen in more than one place -- or that don't use Sprite-0 hit for timing would probably become unplayable. Some of them might even completely crash and burn. Extremely timing sensitive games such as Rad Racer and Battletoads would be pretty much unplayable (and in fact, I'm 99.999% sure Battletoads would crash and burn)

Although I suppose if you up the PPU clock rate so that it keeps the same sync ratio with the CPU -- that might work. You could just have the emu add a bunch of idle scanlines at the end of the frame before tripping an NMI. That way split screen effects and other PPU timing tricks won't be messed up -- but there will be more CPU time in the frame.

However upping the CPU clock rate (regardless of the method) would change the pitch of the music/sound effects (at least -- it would if the emu does it right). And could potentially break CPU-cycle based IRQ counters used by various mappers.

Metroid is one of the few games that would work without a hitch with an overclocked CPU since it never splits the screen (but again, the music/sound would be a higher pitch).
<P ID="signature"></P>
Disch is offline   Reply With Quote
Old 02-18-2006, 10:25 PM   #3
projekt2501x
Junior Member
 
Join Date: Feb 2006
Posts: 10
Default Re: nes emulator with cpu core frequency settings?

well, hrm. I mean I of course will respect your know how on these matters..., but I would still like to see an implementation of it somewhere. I think, based on the slashdot article I read, could lead to worthwhile results...

http://games.slashdot.org/article.pl...4/12/25/237255

He says he was able to get it up to 3.3mhz without any hickups at all for almost all games.

p
<P ID="signature"></P>
projekt2501x is offline   Reply With Quote
Old 02-18-2006, 11:09 PM   #4
Disch
Senior Member
 
Join Date: Apr 2001
Posts: 4,387
Default Re: nes emulator with cpu core frequency settings?

> http://games.slashdot.org/article.pl...4/12/25/237255
>
> He says he was able to get it up to 3.3mhz without any
> hickups at all for almost all games.

Perhaps I spoke too soon.

I couldn't see his page -- it seems to have been removed. But I was able to work it into a build of my emu (actually it wasn't as hard as I originally thought it to be -- but my setup might have made it easier -- some emus might have a harder time).

Anyway -- I'm actually very suprised by the result. There are some slight glitches in MMC3 games if you look for them. Some timing-sensitive games have major problems, and pretty much every single game to use a CPU-cycle based IRQ counter has big glitches (not many US games -- but many Japanese games)

Anyway if you're interested in checking it out, I've attached a copy -- although my emu is not very flashy (there's like next to no UI).

The overclocked version ups the NTSC clock rate up to 2x (~3.4 MHz). If you can turn off your speakers, it might be a good idea, as the higher notes get really ear piercing and horrible. PAL emulation is probably horribly destroyed in the overclocked version as I didn't mess with PAL settings (didn't test any PAL games though).

But yeah -- this is beginning to seem like an interesting idea for emus.
<P ID="signature"></P>

C:Serverxampphtdocszopharoldwwwthrea...eOverclock.zip
Disch is offline   Reply With Quote
Old 02-18-2006, 11:13 PM   #5
projekt2501x
Junior Member
 
Join Date: Feb 2006
Posts: 10
Default Re: nes emulator with cpu core frequency settings?

Hrm, there was an emulator out there that had pitch for the [collective] dsp output, IE you could half the playback speed of the music without affecting the speed of gameplay. Wondering if maybe some sort of compensation feature might be appropriate.

Anyways, sorry thought I'd say real quick. Gonna check out your emulator now, thanks for putting it up.


<P ID="signature"></P>
projekt2501x is offline   Reply With Quote
Old 02-18-2006, 11:30 PM   #6
Disch
Senior Member
 
Join Date: Apr 2001
Posts: 4,387
Default Re: nes emulator with cpu core frequency settings?

> Hrm, there was an emulator out there that had pitch for the
> [collective] dsp output, IE you could half the playback
> speed of the music without affecting the speed of gameplay.
> Wondering if maybe some sort of compensation feature might
> be appropriate.

Well you could tweak it to work that way. I just didn't bother for this test.

The reason the pitch changes is because the NES's pAPU is actually part of the CPU. So sound hardware is clocked at the same rate as the CPU. Increasing CPU speed means increasing how fast the hardware gets clocked (increasing the frequency of the played tone). Doubling the clock rate effectively makes everything an octave higher in pitch.

This is the reason why PAL plays music at a slightly lower frequency than NTSC (PAL CPU clock speed is a bit slower).
<P ID="signature"></P>
Disch is offline   Reply With Quote
Old 02-18-2006, 11:31 PM   #7
Kitsune Sniper
Senior Member
 
Join Date: Feb 2000
Posts: 1,661
Default Re: nes emulator with cpu core frequency settings?

*snip*

MESS, maybe? MAME lets you adjust the CPU core speed during emulation, and that affects gameplay dramatically. Maybe MESS allows you to do the same?
<P ID="signature"></P>
Kitsune Sniper is offline   Reply With Quote
Old 02-19-2006, 01:14 AM   #8
projekt2501x
Junior Member
 
Join Date: Feb 2006
Posts: 10
Default Re: nes emulator with cpu core frequency settings?

disch,
Well I tested out your emulator with a few games and it *seems* more responsive. I was wondering, being as such you're developing what your own emulator at the moment, what you think about possibly porting one of the open source emulators out without a tweaked clock to see what sort of results people are getting and, with those statistics in hand, quite possibly use them to reshape the development of your emulator. As such, there are a lot of "perfect" emulators already out there, maybe this [overclocking] could be the determining factor to get your emu on the clock.

I for one would like to do some more tests. As you noted, though, your emulator is far from perfect. I dunno, how hard would it be to 'flip the switch' so to speak in nestopia or FCE ultra?

just a thought,
_p
<P ID="signature"></P>
projekt2501x is offline   Reply With Quote
Old 02-19-2006, 02:14 AM   #9
Disch
Senior Member
 
Join Date: Apr 2001
Posts: 4,387
Default Re: nes emulator with cpu core frequency settings?

Well I'm not actively working on the emu anymore -- it's sort of on the backburner. It was just a hobby between projects. As you mentioned, there's already more than enough good NES emus out, which is exactly why I never really "officially" released mine.

NEStopia seems to be in active development (and is probably the best existing 'casual play' NES emu). If he's accepting feature requests you might want to slip him an e-mail or something. I'm not really interested in adding such a feature to an existing emu -- so that's probably your best bet.

<P ID="signature"></P>
Disch is offline   Reply With Quote
Old 02-19-2006, 10:16 PM   #10
blargg
Regular Member
 
Join Date: Jul 2004
Posts: 45
Default Re: nes emulator with cpu core frequency settings?

> I'm not really interested in adding such a feature to an existing emu

Lots of emulators are written in a way that the author understands well, but nobody else, and they lack documentation of the design. Adding features to other unfamiliar emulators is thus a tedious and bug-producing affair.

<P ID="signature"></P>
blargg is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 10:58 AM.

Contact Us - Zophar's Domain - Archive - Top

Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.