Login  •  Register


The time is now: Fri Nov 22, 2019 8:38 pm

Emaculation wiki  •  Delete all board cookies



Post new topic  Reply to topic Page 1 of 1 [ 5 posts ]
Print view Previous topic  |  Next topic
Author Message
PostPosted: Sat Aug 14, 2010 3:00 am 
Offline
Site Admin
User avatar

Joined: Mon May 20, 2002 4:37 am
Posts: 3742
Location: Uiwang
There is a new Mini vMac, dated August 4, 2010.

http://minivmac.sourceforge.net/

Here's the scoop:

"Today's Development source snapshot contains an experiment in CPU emulation. The CPU emulation method introduced in 3.0.1, and made the default in 3.1.0 involves a table that classifies each of the 65536 primary opcodes, saving the work of decoding opcodes bit by bit. It has occurred to me that the reason that it is not much faster than the previous approach is because it is a poor fit for the caching scheme of modern processors. On each instruction it loads a random byte from this table, which can cause the CPU to load an entire cache line, perhaps 32 bytes or more, depending on the CPU, the rest of which likely won't be used. One alternative would be to go back to the previous bit by bit decoding, making the program a bit smaller and use a bit less memory, making it more "mini". But instead I've experimented with going in the opposite direction - as long as an entire cache line is being read in anyway, make each element of the table larger, saving additional information that can help with emulation. That's the basic idea, but the pros and cons are complex, and to see what really would happen I needed to try it. Each element is now 8 bytes, and depending on the opcode, saves information about the instruction arguments. The main advantage is that there are now fewer paths for decoding arguments, so those that remain can be better optimized, at the expense of making them larger. Parts of the routines they call are inlined into them, and then rearranged for better parallelism. Another advantage is that since there are no longer separate classes of, for example, the ADD instruction for each style of arguments, instead there can be separate classes for each of the argument sizes (byte, word, and long), avoiding nasty conditional branches that modern processors will likely mispredict. Another benefit is that more of the logic of the emulator is moved into the code that sets up the table (in M68KITAB), simplifying the multiple versions of MINEM68K (c code, and assembly language for each processor). The new approach so far averages around 5 percent faster for x86 and PowerPC assembly language, and I feel more improvement is possible. The c version can be slower than before. The new approach makes careful assembly language optimization more possible, but that generally doesn't help a c compiler. "


Top
 Profile  
Reply with quote Post a reply  
 Post subject:
PostPosted: Sat Aug 14, 2010 8:28 am 
Offline
Master Emulator
User avatar

Joined: Tue Aug 14, 2007 4:32 pm
Posts: 392
Location: People's Republic of China
VC6 build:
http://www.mediafire.com/file/gr77c861s ... 04-wx86.7z
MinGW GCC 4.3.3 build:
http://www.mediafire.com/file/0hekhc73z ... -gcc433.7z

To gryphel: Most of us do not need a faster 68000 Mini vMac, we need a more complete Mini vMac II!


Top
 Profile  
Reply with quote Post a reply  
 Post subject:
PostPosted: Sun Aug 15, 2010 4:34 am 
Offline
Nice Guy
User avatar

Joined: Sat Nov 17, 2007 6:46 pm
Posts: 106
yksoft1 wrote:
Most of us do not need a faster 68000 Mini vMac, we need a more complete Mini vMac II!


Mini vMac is open source, so feel free to work on what interests you.

I have attempted other models for getting development done, but they just don't seem viable.

Anyway, if anyone implements improvements in the Macintosh II emulation, I'd be quite likely to merge them into my version of Mini vMac and maintain it. An example is Ross Martin's nice work on FPU emulation.


Top
 Profile  
Reply with quote Post a reply  
 Post subject:
PostPosted: Sun Aug 15, 2010 2:31 pm 
Offline
Tinkerer
User avatar

Joined: Mon Sep 21, 2009 5:35 pm
Posts: 48
Location: Brazil
A wonderful piece of work! It's working fine on my Ubuntu Hardy Herron, on my Windows XP Professional SP3 and on my Windows Vista SP1. :wink:


Top
 Profile  
Reply with quote Post a reply  
 Post subject: REPLY!
PostPosted: Sat Feb 05, 2011 8:24 pm 
Offline
Tinkerer
User avatar

Joined: Thu Jan 06, 2011 10:41 pm
Posts: 97
Oh, Ok, on my pc, mini vmac runs a bit too fast! When I play Space Station Pheta, the guy falls way too fast before he dies!


Top
 Profile  
Reply with quote Post a reply  
Display posts from previous:  Sort by  
Post new topic  Reply to topic Page 1 of 1 [ 5 posts ]


Who is online

Users browsing this forum: No registered users and 5 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
 

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group