Go Back   Project64 Forums > General Discussion > Open Discussion

Reply
 
Thread Tools Display Modes
  #671  
Old 21st February 2014, 04:23 PM
Melchior's Avatar
Melchior Melchior is offline
Alpha Tester
Project Supporter
Super Moderator
 
Join Date: Apr 2007
Location: NH, USA
Posts: 230
Default

Quote:
Originally Posted by HatCat View Post
Damn. I was going to take a screenshot of this thread with 666 replies, but then you'd already replied, and post #666 in this thread was made by you.

Yep that's the one.

I should be using it more often honestly.
I seem to prefer the old 0.56 WIP 2 release for some reason, or I'm just lazy with updating unlike you.

The fun thing about doing HLE is that it's more easily perfected, straightforward, in your machine's native language, free of virtual overhead, direct, ... but, I still like LLE more, even though it's probably not as fun.

I guess it depends. Sometimes HLE can be significantly easier, especially for documented sequences comprised of undocumented commands.
EGAD.... I see Numerology all the time every I go on the internet(like current download bandwidth, in video games, etc)
http://en.wikipedia.org/wiki/Numerology



Quote:
Originally Posted by HatCat View Post
In some ways, the algorithm in HLE can be even more accurate than LLE for some systems.

But the fundamental problem with HLE as you may know, is the theoretical infinitude of cases to cover...that's what makes it less direct than LLE, instead of more.

What would be cool is a translator that statically recompiles N64 code into Linux or Win32 executables...then both HLE and LLE could be equally important to implement.
I was thinking about that my self on and off...
doing a one time recompile of the N64 ROMs and optimize then for x86 or x64 CPUs to make them run even more efficiently then before


I have that say thought with regards to JAVA(ick so! SLLOOOOOWWW...)
Take Minecraft and any mods or modpacks like Tekkit...
Do a onetime Compilation (as long as there are no updates)
that would save on most of the start-up and lag with JAVA ;P
__________________
(PC Specs)
CPU: AMD FX-9590 4.7GHz 8-core
CPU Instructions: MMX, SSE1-4
Motherboard: Asus SABERTOOTH 990FX R2.0
GPU: nVidia GTX 1070 Ti 8GB
GFX Drivers: Nvidia v441.66
OS: Windows 7 Ultimate 64-bit SP1
RAM: 32GB Kingston 1866MHz DDR3

Favorite Emulators:
PS2 : PCSX2 (Auto-Builds)
SNES : ZSNES

My PJ64 setup:
EXE : v2.4.0.1114
GFX : Project64-Video (v2.2.0.1114)
SPU : AziAudioNEW (v0.70)(2017-09-14)
INPUT : NRage(v2.5.3.1114)
RSP : RSP (v1.7.4.1114)
Reply With Quote
  #672  
Old 21st February 2014, 06:22 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

Minecraft can go to fuck.

Java is more intelligent, but still a cluster of a horribly latent VM. Like Minecraft, it's a cesspool.

Quote:
Originally Posted by Melchior View Post
I was thinking about that my self on and off...
doing a one time recompile of the N64 ROMs and optimize then for x86 or x64 CPUs to make them run even more efficiently then before
Funny how you're like the only person who actually understood remotely what I just said.

When I tried to refer to the not-so-new concept of translators (as opposed to emulators) on efnet, it's like everyone was stuck thinking it had to be a static re-compiler or something. I was beginning to think there was just something wrong with the way I worded it somehow...uh, but at least you got it.

Last edited by HatCat; 21st February 2014 at 06:25 PM.
Reply With Quote
  #673  
Old 21st February 2014, 11:30 PM
RPGMaster's Avatar
RPGMaster RPGMaster is offline
Alpha Tester
Project Supporter
Super Moderator
 
Join Date: Dec 2013
Posts: 2,008
Default

Quote:
Originally Posted by HatCat View Post
What would be cool is a translator that statically recompiles N64 code into Linux or Win32 executables...then both HLE and LLE could be equally important to implement.
How difficult would this be to achieve? It's such an interesting concept that's worth attempting if possible.
Reply With Quote
  #674  
Old 22nd February 2014, 01:04 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

Never tried to do one. Honestly, emulators seem to have drowned them out in popularity so much, that I haven't even heard of any. The concept itself however is as real as you'd imagine.
Reply With Quote
  #675  
Old 22nd February 2014, 01:08 AM
MarathonMan's Avatar
MarathonMan MarathonMan is offline
Alpha Tester
Project Supporter
Senior Member
 
Join Date: Jan 2013
Posts: 454
Default

Quote:
Originally Posted by RPGMaster View Post
How difficult would this be to achieve? It's such an interesting concept that's worth attempting if possible.
For some ROMs, it wouldn't be terrible. For anything that depends on SMC, things would start to get really tricky very quickly. You also have to somehow keep into mind that you need to support thing like timer interrupts (the R4300i count register) and a couple other events.

Static recompilation, as it's called, is nothing new:
http://andrewkelley.me/post/jamulator.html

Last edited by MarathonMan; 22nd February 2014 at 01:10 AM.
Reply With Quote
  #676  
Old 22nd February 2014, 01:43 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

"Static recompilation" by its self is not that specific.

Many static recompilers are emulators, not translators that produce an executable file.

That's why the title of that page is, "Statically Recompiling NES Games into Native Executables ...", and not, "Static Recompiling".
That's more a matter of how your dictionary works.
Reply With Quote
  #677  
Old 22nd February 2014, 02:23 AM
MarathonMan's Avatar
MarathonMan MarathonMan is offline
Alpha Tester
Project Supporter
Senior Member
 
Join Date: Jan 2013
Posts: 454
Default

I beg to differ. Emulators are, and the emulation scene has, almost always revolved around the notion of an interpreter or dynamic recompiler. Show me a static compiler that outputs something that's not a native executable or virtual machine bytecode and I'll eat my shorts.

Even LLVM refers to LLC as a "static compiler":
http://llvm.org/docs/CommandGuide/llc.html
Reply With Quote
  #678  
Old 22nd February 2014, 04:05 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

Well, you said it yourself, didn't you?

Corn. That uses a static recompiler, but it is NOT a translator in the sense of creating an executable file. It's an emulator.

Therefore, as I said, "static recompiler" by its self does not necessarily specify whether it's an emulator, or it just translates something into a native executable file ported to your operating system. Such a translator, even then, does not have to use static recompiler theory.

A static recompiler is not always an executable file writer, and a translator does not always use static recompilation. The two are independent.

Last edited by HatCat; 22nd February 2014 at 04:09 AM.
Reply With Quote
  #679  
Old 22nd February 2014, 04:36 AM
RPGMaster's Avatar
RPGMaster RPGMaster is offline
Alpha Tester
Project Supporter
Super Moderator
 
Join Date: Dec 2013
Posts: 2,008
Default

I did some reading and it seems like there wouldn't be too much of a performance gain from statically compiling. I just thought it would be awesome to convert roms into native code. I now see why not many people are interested in doing this kind of stuff. Time for me to hit the books .
Reply With Quote
  #680  
Old 22nd February 2014, 07:12 AM
MarathonMan's Avatar
MarathonMan MarathonMan is offline
Alpha Tester
Project Supporter
Senior Member
 
Join Date: Jan 2013
Posts: 454
Default

Quote:
Originally Posted by HatCat View Post
Corn. That uses a static recompiler, but it is NOT a translator in the sense of creating an executable file. It's an emulator.
TIL Corn doesn't write executables in PE format. Gonna go eat my shorts.

Anyways, it creates an executable image in memory; it just doesn't write it to the disk -- it's still a native executable image (albeit one loaded in memory, and not in ELF, PE, or any "standardized" format on disk). Translating it into one of those would be trivial, yet mundane, as all you could have to do is dump the memory image to the file format and pad everything properly.

The point I'm trying to make is that static recompilation is well defined. The process I described earlier is indeed static recompilation, or static binary translation maybe to be more specific. It is a translator regardless of where it places the final image.

Quote:
Originally Posted by RPGMaster View Post
I did some reading and it seems like there wouldn't be too much of a performance gain from statically compiling.
All it really buys you is the ability to do really expensive analysis; something you cannot afford to do at runtime. However, as the author of the article stated, you have to shelf a lot of the optimizations in favor of accuracy much of the time. I too believe that there's not much point in things beyond dynamic recompilation. This is how many FOSS projects, such as qemu, operate. In the case of the N64, you can keep the generated code lying around at runtime since the images are so small compared to what's afforded by modern systems.

Last edited by MarathonMan; 22nd February 2014 at 07:16 AM.
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 02:34 PM.


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