6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Sat Oct 05, 2024 5:22 am

All times are UTC




Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: Thu Dec 04, 2008 4:16 am 
Offline

Joined: Tue Nov 04, 2008 3:08 am
Posts: 2
I could not find one for use anywhere. There's a need for it!

I am trying to make a complete NES emulator with 64-color graphics mode (or 16-color by making some chart) in EGA. And can make a Modded EGA palette for VGA users in 64-color mode only.

I know there may be some 6502 emulator for 8086/8088/80286. If there is no hope, Maybe someone can try to do something about it!

P.S. I have a EGA PC emulator to test it on! so I can test things if made.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Thu Dec 04, 2008 6:53 am 
Offline

Joined: Sat Jan 04, 2003 10:03 pm
Posts: 1706
Unfortunately, no, and there never will be.

The problem with emulating any CPU (virtual or otherwise) is that even the best emulators often take approximately 15 to 30 clock cycles per instruction emulated. This means, in the best possible case, if you wanted to properly emulate a 1MHz 6502, you'd need at least a 15MHz 8086 or 80286 processor.

(Yes, I'm aware that some virtual CPU architectures get down to 5 to 10 instructions, but those involve a dynamic recompilation pass over the code, which itself takes a non-zero amount of time. Therefore, the claimed performance figures are horribly misleading except for the inner-most, tightest loops imaginable.)

However, this is just the emulation of the CPU. Now you also need to throw in enough bandwidth to properly emulate the audio and video interfaces too. And, if necessary, any lower-bandwidth I/O chips like a VIA or some such.

In short, when all is said and done, you're not going to have any useful emulation until you somehow get your hands on a 50MHz 80286 at the least. Unless you have one of the very rare 40MHz 80286-based PC/ATs, you're almost certainly not going to have enough CPU horsepower to emulate everything.

By way of comparison, I have a dual-core AMD Athlon XP system running at 2.8GHz. Gigahertz! Yet, when executing the VICE "x64" or "x128" emulator, I get only about "25MHz" equivalent performance in warp-mode. Since my lib65816 emulator gets close to about 200 to 300MHz equivalent performance alone, I can therefore theorize that the factor of 10 loss in performance is primarily due to I/O emulation (particularly video). That my Kestrel-2 emulator with the video emulation enabled gets about 30MHz performance at full speed seems to corroborate this determination.

On top of that, you also need to consider the I/O throughput to the EGA card as well. Odds are likely, you're looking at an ISA or EISA bus, both of which have quite low throughputs to cards compared to modern buses. The time delays imposed by transferring graphics data to the EGA card must be accounted for in the video display emulation.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Thu Dec 04, 2008 8:48 pm 
Offline

Joined: Tue Nov 04, 2008 3:08 am
Posts: 2
I might try programming a game by scratch for a BASIC interpreter/compiler in DOS then. Thanks for your explanation.

-Hamtaro126


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 7 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: