FPGA 'Emulation' and modification

Started by GZeus, December 22, 2006, 11:57:08 AM

Previous topic - Next topic

GZeus

I see that things like the C-One do emulation of various systems/computers in hardware via FPGA chips.
I also read about a man in Japan who MADE his own PC Engin/Turbo Grafx 16.
I think it would be a good idea to keep tabs on people changing parts/building systems based on these chips.

Imagine someone MAKING a faster Genesis/MD VS overclocking, or programming a chip that divides the clock differently than the 68000 so it doesn't need overclocking, etc.

Recent threads of questionable nature have given rise to "how could that really be done?" thoughts in me, and these seem to be the way to go.

Anyone know how fast these can get? I know they're generally slower than the 'hard-wired' counterparts, but to what degree?
How fast could we get that 68k? Imagine a 40mhz Genesis! How would I ever beat Android Assault without slowdown!?

In any case, I hope we can have a meaningful exchange of ideas as to how these could/should be used in retrogaming.

blackevilweredragon

what about the Z80?  wouldn't that have no sound then?  with what your proposing, wouldn't that require a "switched" startup?  (to even get sound)

I never fully understood what the sound deal was when overclocked..

RobIvy64

#2
If you replace the CPU with say a 16 MHz 68000 and ramp up the clock on the CPU to 16 MHz, technically it's not overclocked.

In theory it seems like a great idea, however, most games would require heavy modification of the original software to allow for glitch free gameplay with the faster components.
"Console Mods" lurker

GZeus

That's the beauty part.
You can most likely do the modifications to the HARDWARE.

RobIvy64

QuoteThat's the beauty part.
You can most likely do the modifications to the HARDWARE.
How so? Remember that the games were originally designed for a 7.6 MHz cpu.
"Console Mods" lurker

blackevilweredragon

doesn't the sonic 2 special stage speedup?

GZeus

#6
Quote
QuoteThat's the beauty part.
You can most likely do the modifications to the HARDWARE.
How so? Remember that the games were originally designed for a 7.6 MHz cpu.
So you're saying you want slowdown?

If they don't have slowdown, they won't speed up.

Also, the reprogrammable nature would allow the divider to be reset and thus go back to stock speed.


My point was you could make sure the speed/instructions don't go out of sync with other procs and this avoid glitching.
You could combine chips and so on, as well.

RobIvy64

#7

So from what I gather you are talking about installing a variable oscillator?

Losing sync with other processors is a large contributor to glitches, but to say that there wouldn't be glitches if everything was synced and the chips were upgraded is unrealistic. When those games were developed they were developed for that specific hardware. Some games, like Sonic 2 special stage, do physically speed up as the processor speed increases.

With overclocking (or upgrading) any game console it's safe to assume that there will always be a game that will have some sort of glitch.
"Console Mods" lurker

GZeus

No, I'm talking about a variable processor.
the 68000 in the Genesis divides by a specific number to get its clock speed.
If you alter that variable, it's will result in a differnt clock speed.

if you modify the behavior of the chips, then there won't be glitches.

The sonic 2 special stage was in fact designed to work at a specific speed despite it's great tax on the processor, thus, you'd have to set the speed of the proc to standard for that stage to get the same speed of play. that's why things would need to be able to revert to stock.

I'm not claiming to know everything about this technology, but I do know you'd be able to set the divider and change it as needed, and also change its overall behavior as needed.

blackevilweredragon

I don't think the 68000 divides the clock, at all..  Whatever clock it gets, it uses...

RobIvy64

#10
QuoteI don't think the 68000 divides the clock, at all..  Whatever clock it gets, it uses...
Correct. It doesn't have any sort of divisor or multiplier.


What do you mean by "Modify the behavior of the chips"?  
"Console Mods" lurker

GZeus

Again I'm not sure what exactly would need to be done, but what i'm getting at is i believe it's possible to 'program' a chip to accept 68000 instructions, but execute them at a faster or idientical rate.

If it's recieving a 7.6mhz clock, then we'd simply need to include a multiplier in the chip. That's not a very complex circuit at all.

blackevilweredragon

It would still have sync problems with the Z80 though...

RobIvy64

QuoteAgain I'm not sure what exactly would need to be done, but what i'm getting at is i believe it's possible to 'program' a chip to accept 68000 instructions, but execute them at a faster or idientical rate.

If it's recieving a 7.6mhz clock, then we'd simply need to include a multiplier in the chip. That's not a very complex circuit at all.
OK I think I know what you're trying to say.

You are suggesting that a simple clock-multiplier logic should be attached to the CPU with the stock clock signal ran to it (7.6 MHz). If this multiplier was set to 2X, the resulting speed would be a more system-clock syncronous 15.2 MHz.

I can't say what the results would be like, but I would be surprised if it was glitch-free.
"Console Mods" lurker

blackevilweredragon


RobIvy64

Quotei dont think it would work...
It would certainly work, weither it would help is debateable.
"Console Mods" lurker

blackevilweredragon

i know it will RUN, but I don't think it would HELP...

Epicenter

Multiplying the original 7.67 Mhz VCLK signal to ~15.34 MHz should yield a synchronous signal that is in phase with the original bus, and will likely yield higher stability and better compatibility with the MD/Genesis' bus arbiter-- thereby improving the reliability of intercomponent communications. This may very well include decreasing, or completely removing, the number of missed writes to the Z80 which results in audio issues (though, I do not usually observe audio problems except beyond 24 MHz 68000 clock, or with the onboard ~13.4 Mhz signal on pin B15 of the cart slot.) This action could also decrease the severity of graphical glitches at very high clockrates.
- Epicenter
Epic Gaming Admin

blackevilweredragon

if it works, let me know, that'll be the mod I perform..  but i wonder if it'll work with the SCD and 32X..

Epicenter

Probably not, no. Just turn the clock back down when using them.
- Epicenter
Epic Gaming Admin

GZeus

QuoteIt would still have sync problems with the Z80 though...
Dude, stop ignoring what you don't want to read. You're frustrating me a great deal.
The point of carefully setting the chip's function is to make sure it stays in sync(the funny part is, you recommended that people overclock their processor to USA spec and keep their sound and video sections PAL, despite people telling what you're telling me now).
Make it wait, etc.
Hell the 68010 is more efficient at the same clock speed. The only reason it has errors is the changed commands.
Make sure the chip is programmed to be as efficient as possible and you should have no problems.

Also, if it's multiplied by 2, 4, 8 etc then you shouldn't have sync issues as it won't be trying to do things during a blanking period.

GZeus

Quotei dont think it would work...
Dude, I honestly don't think you should be the one to say that.

blackevilweredragon

the PAL systems downclock the CPU a small bit..  that should be obvious..  the Z80 gets slowed down too...  but you obviously need the video output as 50Hz, otherwise the color won't be present...

GZeus

Quotethe PAL systems downclock the CPU a small bit..  that should be obvious..  the Z80 gets slowed down too...  but you obviously need the video output as 50Hz, otherwise the color won't be present...
Ignoring the point once again...
SYNC.
If it's out of sync, then you have problems.

You suggested doing that, but it would cause the problems you just raised.

Make up your mind.
Wait, you'd need to have an opinion. You're just trolling.

blackevilweredragon

what sync?  if you speed up the Z80 to american standards ,the music is fixed..  if you speed up the CPU to american standards, it works faster..

this is NO different than overclocking the american CPU to beyond...  how do you think the brits overclock?  by twiddling their thumbs?  no

GZeus

#25
Quotewhat sync?  if you speed up the Z80 to american standards ,the music is fixed..  if you speed up the CPU to american standards, it works faster..

this is NO different than overclocking the american CPU to beyond...  how do you think the brits overclock?  by twiddling their thumbs?  no
This is hilarious.

Look at what this guy's doing.
He's pretending he didn't say things that he said IN THE SAME THREAD.

http://nfggames.com/forum/index.php?showtopic=2495

RobIvy64

Quote
Quotewhat sync?  if you speed up the Z80 to american standards ,the music is fixed..  if you speed up the CPU to american standards, it works faster..

this is NO different than overclocking the american CPU to beyond...  how do you think the brits overclock?  by twiddling their thumbs?  no
This is hilarious.

Look at what this guy's doing.
He's pretending he didn't say things that he said IN THE SAME THREAD.

http://nfggames.com/forum/index.php?showtopic=2495
Be careful guys, lets not let this topic get out of hand.  :rolleyes:  
"Console Mods" lurker

GZeus

Quote
Quote
Quotewhat sync?  if you speed up the Z80 to american standards ,the music is fixed..  if you speed up the CPU to american standards, it works faster..

this is NO different than overclocking the american CPU to beyond...  how do you think the brits overclock?  by twiddling their thumbs?  no
This is hilarious.

Look at what this guy's doing.
He's pretending he didn't say things that he said IN THE SAME THREAD.

http://nfggames.com/forum/index.php?showtopic=2495
Be careful guys, lets not let this topic get out of hand.  :rolleyes:
I edited that post.
Sending it to that thread was the best I could think of.

In any case, one could theoretically build a Genesis on one or two chips, and still build all new features into it.

The Genesis is just an example.
The same can be done with any system in theory.

Epicenter

#28
Quotei dont think it would work...
It would work just fine, and probably much better, than an arbitrarily-generated asynchronous clock signal from an external generator would. I can't even begin to imagine why you'd find it to be unlikely to work, as the signal is closer to something that'd be generated in the GLU chip. At any rate what you're looking at is just a square wave, and if it meets the parameters the 68000 expects for its input clock (see its whitepapers) there's no reason it will not function.

Quotewhat sync? if you speed up the Z80 to american standards ,the music is fixed.. if you speed up the CPU to american standards, it works faster..

this is NO different than overclocking the american CPU to beyond... how do you think the brits overclock? by twiddling their thumbs? no
I'm not entirely sure what kind of argument you are trying to make. Maybe just arguing for the sake of arguing. ;)

European and other 50hz regions' MD/Genesis units have slower audio in games because the system's vertical sync rate is 50hz, not 60hz. So less frames occur per second, and the entire game is timed slower-- logic, video, and audio. This has NOTHING to do with Z80 clockrate. In the US/Japan, 60hz regions, Z80 clockrate is ~3.58 MHz. In European and other 50hz regions, it is ~3.55 MHz. 0.03 MHz makes no discernable difference in audio tempo. (The system clock differences are due to a different clock oscillator frequency used in the 50hz-region units to compensate for PAL video clock.) There is nothing to FIX in the music. Are you imagining more faults like in the YM2612? :rolleyes:

By the way, you won't see any big performance increase 'overclocking' the 68000 in a 50hz system (running at 7.61 MHz) to the US/JP version's clockrate (7.67 MHz). You'll gain 0.06 Mhz, no discernable performance gains, and run the 68000 asynchronous to the bus, thereby decreasing overall probability of stable operation. It is debatable if that is even overclocking-- the 68000s are rated for 8 MHz and run slightly underclocked anyway.
- Epicenter
Epic Gaming Admin

blackevilweredragon

#29
but it was you that told me that changing the clock rate of the Z80 changes the speed of the music..

EDIT:  It may actually have been Rob, or even GZeus that said changing the Z80 changes the tempo..  Someone told me, hence I said it (because i do listen)

And I know the game itself won't speed up...  im not gonna finish this sentence, im not going to argue..

Epicenter

Quotebut it was you that told me that changing the clock rate of the Z80 changes the speed of the music..

EDIT:  It may actually have been Rob, or even GZeus that said changing the Z80 changes the tempo..  Someone told me, hence I said it (because i do listen)

And I know the game itself won't speed up...  im not gonna finish this sentence, im not going to argue..
Read more carefully. I said the clockrate is changed by about 0.03 MHz. Any tempo difference will be impossible to perceive. I never said the Z80 clockrate doesn't affect tempo, because on many games, it does.
- Epicenter
Epic Gaming Admin