Become a fan of Slashdot on Facebook

 



Forgot your password?
typodupeerror
×
Games Entertainment

UltraHLE Source code 46

Well, it seems a person nicked GossiTheDog has released the sources of UltraHLE (a good Nintendo 64 emulator). It's written in C++. This person has released the source to see a Linux port and to see this emulator still "alive". Anyone or any group to port it to Linux with SVGA/DGA/GGI support?. You can also find instuctions of how to run UltraHLE under Wine. Enjoy.
This discussion has been archived. No new comments can be posted.

UltraHLE Source code

Comments Filter:
  • Uhh, this isn't the source code. This is an exe->c conversion using one of the many decompilers out there (none of which are very good). It's basically the disassembled asm code turned into C by a conversion utility.
  • Okay, I'm confused. As i mentioned above, it's a exe->C conversion, not the actual source code. However, if he used any halfway decent exe->c "decompiler," the source, while virtually unreadable, would still compile. Why does his source not compile?
  • Posted by Tony Smolar:

    A viable N64 emulator will surely bring all the WaReZ D00ds out. Not a crowd that Linux needs.
  • by gavinhall ( 33 )
    Posted by Tony Smolar:

    This would be the "Killer App" for software pirates. I know FSF folk don't believe there's such a thing, but it's not a crowd that we want the rest of the world to associate with Linux at any rate.
  • I'm surprised noone has mentioned this yet, since it kinda blew my mind. It doesn't affect me, since I don't have an N64, or a 450 MHz Pentium, but it's still majorly cool that even through a layer of emulation and with the overhead of the X Window System, Linux still manages to be faster that Windows! Kinda makes you wonder what all those thousands of Microsoft programmers do all day.
  • Okay - so who wants to do the Mac port? I'm sure that it can't be hard, just reverse the endian here and there and voila! Free Mac software. Linux port will be even easier, since the byte order is the same on any PC platform. What are you waiting for? Jump on board. Contribute to the "source tree", now that it's "Open Source".

    From Gossi-the-aptly-named-dog's home page:

    The asm() instructions show that the U64 cpu "emulation" seems to have translated fairly well, and so I'm wondering if we fixed the broken bits and tacked it onto a new GUI if we'd have a working emulator. Again, this is just theory. In practice?

    ...it won't work. Maybe the biggest problem with UltraHLE isn't the GUI? Things like Win-only, GLIDE-only, imperfect emulation, no "flat polys only" mode, etc.? Not so easy to change these from the disassembly... This is such a joke.

  • ...But something seems fishy here. I would have expected the original authors of the emulator to post the sources. IIRC, GossiTheDog wasn't one of them.

    I'm half inclined to grab the archive, whatever it is.

    Schwab

  • This is indeed good news.. A while back someone released fixed asm de-compiled code of UltraHLE. I guess that was a bit weird.

    Port it! Port it to the Palm Pilot! BTW, the site is already /. ed.

    PS: No glide based implementations please...
    --
  • This is the real deal here... There is a file known as cpua.c which, after disassembling the UltraHLE exe into ASM much like Gossi, and compairing the two, this is the real deal. The site mentioned above, was the source of it, and now it has been removed... :/ I still have it though, but it isn't very useful on it's own.

    #include
    #include "ultra.h"
    #include "cpua.h"

    #define DUMPGO 0 // dump PC as executing (debug) (1=every group, 2=every new group)
    #define EXECPROF 0 // profile execution (cmd 'stat3'), slows execution!

    // these names are a bit short for global scope, but they were
    // originally internal to this file. Then this file grew so large
    // it had to be splitted. Well so it goes.
    RState r;
    CStats cstat;
    dword ip[256];

    /************************************************* *************************
    ** Routines for compiling a new group
    */

    // select optimization settings
    void a_optimizesetup(void)
    {
    r.opt_old=0;
    r.opt_directjmp=0;
    r.opt_rejumpgroup=0;
    r.opt_adjacentvm=0;
    r.opt_nospvm=0;
    r.opt_novm=0;
    if(st.optimize==0)

    These were the first few lines, of the file, much to long to post here, but as you can see, it is just a small component of the much larger program... Hope the rest is released soon... :)

    Baggio

    Time flies like an arrow;
  • EXE->C isn't quite right... it goes EXE->ASM, and I'm not sure there is an ASM->C as it is going from a lower level language to a higher one... EXE->ASM isn't really to hard to do. The opcodes are known, and the source is just parsed replacing the opcodes with ASM mnemonics. Using this method, anything can be "reversed", but it doesn't yield much to the original source. This is what goes on in an emulator, but the interpereted data, instead of being written to a file, it is "executed". If the opcode mnemonic was mov.b for instance, the emulator would move a byte of data into an imaginary register.

    What makes UltraHLE unique, and in that sense "revolutionary", is that it takes the ASM and does generate C of sorts. The ASM instructions are examined at a higher level, and paterns are recognized as common routines, and further emulated using C... This is posible in part because the N64 is a based on a RISC processor (R4300i for those interested), and more complex CISC instructions can replace a "patern" of RISC instructions. Also, the N64 software is developed in C now as opposed to the older memory effiecient console programs... The more available memory means that programs can be developed faster, and it means that the generated ASM has repeating patterns, is bloated, and is eaiser to reverse to a higher level... :) In this way the N64 can be emulated without emulating every single R4300i opcode.

    One thing that makes UltraHLE hard to reverse is the fact that it was compile for P5 (many disassemblers only cover 8086 instructions), and that much of the emulator is inline ASM for faster execution. Hopefully the developers will release their code in its entirety soon... :)

    Baggio
    Time flies like an arrow;
  • Hey, I don't see any other programs having this problem, like the Playstation Emulator for Mac.

    There isn't really a point to this other that to allow it to play more games. Which of course I am sure will be for totally legal pursuits.

    Geez...
  • *sigh* Perhaps next time /. should follow up on things a bit more...

    It is NOT the full source, it's the first release of one guy's effort of converting the asm to C++. It doesn't even compile.

    He is also NOT a member of the development team in any way shape or form, it is not condoned in any way by the authors.
    This is what the releaser GrossiTheDog says:
    I've decided to make my efforts of converting UltraHLE to C++ public. Note that this is NOT finished source code conversion or anything, this is just 5 minutes work of me playing around - many weeks of work are in store if this project is to be completed.
    His page is here [freeserve.co.uk] if you want to check out all he has to say about it. Next time, get the story right.
  • It takes a REAL stretch of the imagination to get from what this source code really is (a raw dissasembly into C) to a headline on slashdot such as "UltraHLE Source Code".

    First the story about the massively parallel FPGA machine (which REALLY sounds fishy to the point of being a hoax), and now this?

    Come on /. authors, please use a little more common sense in filtering what stuff gets posted. Lately you are leaning towards the sensational rather than the factual a little too much.

    Please turn up the BS filter.

  • The current version of the UltraHLE "source code" doesn't help further developments. It just contains a naive try to de-compile the executable.
    The result contains some C constructs for conditionals and loops but is not more readable than what the average disassembler can produce.
    Disassembled code is certainly not a good base for further developments...
  • The source that Gossi has released is his first attempt at tearing apart the ultrahle emulator. And not the actual source code which is yet to be found.
  • Just wanted to say that, but also, Well @ least the source is out... but on the other hand if NES's claims hold true it is STILL illegal I think...

"Gotcha, you snot-necked weenies!" -- Post Bros. Comics

Working...