#1  
Old 20th October 2009, 08:21 PM
AerosolSP AerosolSP is offline
Junior Member
 
Join Date: Oct 2009
Posts: 4
Default CPU emulation core?

I'm just wondering, how is the cpu emulation core coded in PJ64? Is it dynamic recompilation? Interpretation? And what is it written in? Have you guys considered undertaking the arduous task of writing the cpu core in x86 assembly?
Reply With Quote
  #2  
Old 21st October 2009, 11:10 AM
HatCat's Avatar
HatCat HatCat is offline
Alpha Tester
Project Supporter
Senior Member
 
Join Date: Feb 2007
Location: In my hat.
Posts: 16,236
Default

Quote:
Originally Posted by AerosolSP View Post
Have you guys considered undertaking the arduous task of writing the cpu core in x86 assembly?
Hah it looks not. Fascination like this, is one of the things that intrigue me to revolutionize. Most people don't seem to care though.

While we're living with what we have, no apparently these people aren't interested either. At some point it looks like it was re-written from C to C++...most N64 emulators have an option to switch from re-compiler to interpreter.

The second should be the default though, not the first. Why would they want the re-compiler to be used by default for games not recognized in the RDB? Learning about new games, entries and discoveries is an investigative task, rather than a hasty one calling for common speed optimizations.
It's not like such an emulator should be written in such a way that forces people to use dyna-rec anyway.
Reply With Quote
  #3  
Old 21st October 2009, 07:41 PM
squall_leonhart's Avatar
squall_leonhart squall_leonhart is offline
Alpha Tester
Project Supporter
Senior Member
 
Join Date: Mar 2007
Location: Sydney, Australia
Posts: 2,918
Default

modern compilers are so effective that the reasoning to recode in ASM is neglible.
__________________

CPU:Intel Xeon x5690 @ 4.2Ghz, Mainboard:Asus Rampage III Extreme, Memory:48GB Corsair Vengeance LP 1600
Video:EVGA Geforce GTX 1080 Founders Edition, NVidia Geforce GTX 1060 Founders Edition
Monitor:ROG PG279Q, BenQ BL2211, Sound:Creative XFI Titanium Fatal1ty Pro
SDD:Crucial MX300 275, Crucial MX300 525, Crucial MX300 1000
HDD:500GB Spinpoint F3, 1TB WD Black, 2TB WD Red, 1TB WD Black
Case:NZXT Phantom 820, PSU:Seasonic X-850, OS:Windows 7 SP1
Reply With Quote
  #4  
Old 21st October 2009, 09:50 PM
HatCat's Avatar
HatCat HatCat is offline
Alpha Tester
Project Supporter
Senior Member
 
Join Date: Feb 2007
Location: In my hat.
Posts: 16,236
Default

Or you mean an effect of doing so.
Negligibility is a measure of end effectiveness. The dedication to write a strong emulator, under re-writing in asm, isn't the kind of "reasoning" that is negligible.

The effect may be, depending on how much you care for whatever possible improvements. If you only care for some improvements and not others, well that's just bigoted inconsistency, and you don't deserve people who care permanently about your work more than others'. Thus the "reasoning", is quite the reverse of negligible.
Reply With Quote
  #5  
Old 22nd October 2009, 07:46 PM
AerosolSP AerosolSP is offline
Junior Member
 
Join Date: Oct 2009
Posts: 4
Default

From what I've read, no matter how effective the compiler is, the higher level the code, the more overhead is produced in the executable binary (or something like that). I was under the impression that it is always better to write the cpu emulation in assembly, as that enables more-or-less direct one-to-one emulation. Something like "This MIPS instruction is the same as this x86 instruction. When this x86 cpu encounters this MIPS opcode (or whatever), peform this instead." I just understand that writing an entire cpu emulation core in assembly is hard as balls.
And is there such a thing as a dynamically recompiling cpu emulation core written in assembly? Something tells me that that is redundant...but I could be wrong.
Reply With Quote
  #6  
Old 25th October 2009, 12:27 PM
Thomas Thomas is offline
Alpha Tester
Project Supporter
Junior Member
 
Join Date: Jul 2008
Posts: 19
Default

The problem with low level coding is its incredibly arduous and take a lot of skill. Not only would it be a epic task to code but also if your doing this for optimisation you would have to recode it for every CPU you wish to run it on. Its not as if you could just code it legacy X86 as it simply would not work. You also get the added problem that its all to easy to be far from optimal when coding in assembly. Its all a bit of a mute point really as even the most basic PC these days does not struggle to to emulate the R4300i CPU with the current system. At 100mhz the R4300i only gets 125 Dhrystone MIPS, 60 SPECint92, 45 SPECfp92 and the N64 clocks it even slower at 93.75 MHz.
Reply With Quote
  #7  
Old 25th October 2009, 06:27 PM
HatCat's Avatar
HatCat HatCat is offline
Alpha Tester
Project Supporter
Senior Member
 
Join Date: Feb 2007
Location: In my hat.
Posts: 16,236
Default

any fun in the challenge or would I have to have some kind of OCD to put up with myself?
Reply With Quote
  #8  
Old 3rd November 2009, 12:03 AM
XFi6 XFi6 is offline
Junior Member
 
Join Date: Oct 2008
Posts: 20
Default

Quote:
Originally Posted by Thomas View Post
The problem with low level coding is its incredibly arduous and take a lot of skill. Not only would it be a epic task to code but also if your doing this for optimisation you would have to recode it for every CPU you wish to run it on. Its not as if you could just code it legacy X86 as it simply would not work. You also get the added problem that its all to easy to be far from optimal when coding in assembly. Its all a bit of a mute point really as even the most basic PC these days does not struggle to to emulate the R4300i CPU with the current system. At 100mhz the R4300i only gets 125 Dhrystone MIPS, 60 SPECint92, 45 SPECfp92 and the N64 clocks it even slower at 93.75 MHz.
I'd just like to make a point.

Since the PJ64 developers like to keep their project dead all the time, for one platform only, how would rewriting it in asm for 32-bit Win32 with SSE be a problem?
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 12:05 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.