What's new

Hack the Wii-OS (?)

Sapper

N64 Owner/Fan
I was wondering if someone could hack the Wii-OS to find the VC-Emulator Code. Could we use this source code for developing our own Emulator (despite the legality issues) or would be completely useless (because the Wii has complete another OS comprazing to a Windows OS)?
 

ScottJC

At your service, dood!
Even if you could what good would compiled code designed to run on a system so different from the PC do us? Don't be silly.

It's not just about OS its about hardware too, Wii is absolutely nothing like any current pc, so even if you could magically extract the software from it you'd have to emulate the Wii to get it to run, so, running an emulator to run an emulator... erm, not a good idea.

Likewise, software designed to run on Windows XP is not going to work on the Wii either. An emulator that runs on Wii is no good anyway, it relys specifically on the Wii's specific hardware to work its 'magic' even if you could execute the code it would go "wtf this isn't the right video system"

I've got a more realistic idea, why not use an emulator thats already available that is designed to run on the PC?

Now if you'll execuse me I need to create a thread asking if someone will take an ice block of mine and try to keep it from melting inside a volcano.
 
Last edited:

BRP

That guy
Hey now, from a technical standpoint it wouldn't be such a bad thing if you wanted to steal specs or get it working on a PPC computer (not every computer out there is a Windows-running IBM PC compatible/AMD/EMT64 machine).

On the other hand, from a legal perspective, it would be a pretty darn bad idea.
 

ScottJC

At your service, dood!
maybe there is some PPC computers that can magically run software designed to run with Wii's specific hardware, pfft, do you even understand...? this isn't like transfering data onto a hard drive and running it...

The Wii has a very specific set of hardware, i'd doubt any PPC computer out there is _anything_ like it, so you take the software from the wii, what then? It tries to run then crashes because of incorrect other hardware, there's more than processor's in a PC you know - even the processors may differ, the Wii's cpu may contain a unique instruction set for instance which makes it even more difficult.

What about 'Wii' is not a conventional PC/Mac/PPC Computer don't you people understand? It's not that simple. You'd have to reprogram each emulator from scratch or write an emulator to run the emulator still.

Find me an X86 console that you can steal software from and it can automatically run on windows, I dare you. What about the Xbox, has anyone managed to run games from that on the PC directly? Given the fact its so similar to a PC it must be easy right, WRONG.

There is no game on the Wii yet that cannot already be emulated by a PC emulator anyway so I fail to see the point in even trying this totally impractical venture. Now, I think I will make toast with my television seen as how its all the rage to try and use hardware incorrectly lately.

But what do I know right? Go ahead and try it anyway if you don't believe me, ignorance is bliss.
 
Last edited:

Doomulation

?????????????????????????
I think you forgot to mention that the emulator is probably tied to the Revolution's OS too (which is likely waaaay different than Windows or Mac OS) ;)
 

blueshogun96

A lowdown dirty shame
Find me an X86 console that you can steal software from and it can automatically run on windows, I dare you. What about the Xbox, has anyone managed to run games from that on the PC directly? Given the fact its so similar to a PC it must be easy right, WRONG.
I know this is a bit offtopic, but I'm so glad someone understands and appreciates the difficulty of emulating the Xbox even though it's processor is a Pentium III.
 

Exophase

Emulator Developer
Find me an X86 console that you can steal software from and it can automatically run on windows, I dare you. What about the Xbox, has anyone managed to run games from that on the PC directly? Given the fact its so similar to a PC it must be easy right, WRONG.

Do Halo and Turok: Evolution count..?
 

Doomulation

?????????????????????????
No Xbox games count...
As for the emulator, it used hacks to get the games running smoothly. You can't rip a game off another system and expect it to work with modification.
 

blueshogun96

A lowdown dirty shame
As for the emulator, it used hacks to get the games running smoothly.
Yup, and it took years for sir Caustik to get it working at a playable level. Cxbx uses a form of static-rec, right? Or does that not count?

@Exophase, since were talking about Xbox here, I just wanted to thank you for your x86 opcode instruction format guide you posted a while back. Now my Xbox emu is actually beginning to work with (VERY) minimal functionality. :flowers:

The only problem is that I don't know how many cycles it takes to execute a Pentium III instruction, so until then, I can't do an accurate VBLANK emulation. :( So yeah, I know it's stupid, but I've been assuming every instruction is 1 cycle just to make sure things work.
 

Doomulation

?????????????????????????
Yup, and it took years for sir Caustik to get it working at a playable level. Cxbx uses a form of static-rec, right? Or does that not count?

I'm not sure how it worked, but it can't be static recompilation. Then it would be a compiler, not an emulator. It's called dynamic recompilation because it recompiles instructions on-the-fly. Static recompilation means recompiling something into another format, but not on-the-fly. Basically, porting a game from one system to another, into a new executable.
But dynamic recompilation is a tricky thing, as you know...
 

Exophase

Emulator Developer
CXBX does convert XBox executables to Windows executables, it's a form of virtualization. It patches XDK function calls to native handlers before executing the code; the rest of it stays in place. It works for the same reasons VMWare works, that the games are ran as relatively abstract user code, and they also use a pretty standard Windows interface that was easy to convert to native Windows calls. Whether or not this can be considered emulation is debateable.

From what I understand, one of the reasons the emulator never got off the ground is because the XDK versions used by games differed, and each one (even with only small differences) had to be handled explicitely.

Having said that it doesn't mean the approach doesn't work. Xeon came out of nowhere and emulated Halo (although I don't know how well). It might just be a really tedious task.

blueshogun96; I honestly wouldn't worry about cycle timings for a machine like XBox - your approach is more or less fine, although it might be better to make each instruction take half a cycle or so. The reason I say this is because on a platform like XBox it'll probably use a system call to wait for VBlank (and if you emulate those at a low level, it'll probably use the hlt instruction), at which point you can stop counting cycles and jump straight to the next interrupt. What you want to do is make sure that you can run at least as many instructions as a real XBox can. Basically it's like overclocking it some amount, which should work out okay so long as the timers and what have you are correct relative to each other.

I don't emulate cycles accurately at all for my GBA emulator, although I've improved it some over releases. As far as compatability goes, it only makes a difference for a small percentage of games, and GBA is probably more low level than XBox.

Actually getting cycle accurate emulation on XBox would be almost impossible because you'd have to account for both levels of the cache, branch mispredictions, superscalar efficiency, decoding bottlenecks.. the Pentium 3 is far from a simple chip to simulate deterministically. I'd say you really have no way of coming even close to it, even if you were willing to pay the outrageous amount of overhead necessary it'd just be too difficult.

Fortunately, what it comes down to is that the harder it is to emulate timing accurately, the harder it is for a game to have depended on timing being a certain way in the first place. The only problem is when you have buggy games that just happen to work because of parameters of the system and are thus sensitive to the timing not being too far off. Again, this is less likely on XBox than it is on other platforms because the code would in general be higher level and the environment is more abstract (protected address spaces and all let you get away with far less real bugs, not to mention that a lot of those games were probably developed on Windows anyway).
 

Doomulation

?????????????????????????
CXBX does convert XBox executables to Windows executables, it's a form of virtualization. It patches XDK function calls to native handlers before executing the code; the rest of it stays in place. It works for the same reasons VMWare works, that the games are ran as relatively abstract user code, and they also use a pretty standard Windows interface that was easy to convert to native Windows calls. Whether or not this can be considered emulation is debateable.

But it isn't static; it's dynamic because it's done on-the-fly. We could also call it more sort of like a wrapper. Basically translating Xbox system calls into Windows system calls.
 

ScottJC

At your service, dood!
Halo and Turok Evolution have both had their own PC ports, no need to bother with emulating those two. Both I've tried on PC, both i've loved I might add; But if you tried to run the PC version of both of these on the Xbox you'd fail dramatically.

The reason I was ranting was not because of Hardware Similarities, it was the notion of trying to get an emulator designed to run on another system to run on one like mine, ludicrious. Why make an emulator to run an emulator? That's retarded, cut out the middle man and make an emulator that runs on PC instead... but why bother when those already exist.

For example, Running VMWare with windows XP inside it and running Project64, that is truely retarded.

I wish technology was so simple you could take one thing and add it to another but it simply does not work that way. The Xbox is very similar to the PC, but there still has been no ground breaking emulation for that asides from the bollocks one M$ made for the 360 which runs about 35% of the games. If it was as easy as some people think people would've seen tons of emulators by now.
 
Last edited:

Doomulation

?????????????????????????
But if you tried to run the PC version of both of these on the Xbox you'd fail dramatically.
Yes, and vice versa too.

For example, Running VMWare with windows XP inside it and running Project64, that is truely retarded.
No, it's not retarded. It's the purpose of WHY that makes it retarded. I could run PJ64 under WMWare and Vista/XP, for example, to test it on a new OS, to try a new OS, to try PJ under different hardware, and so on.
 

ScottJC

At your service, dood!
Yes, and vice versa too.


No, it's not retarded. It's the purpose of WHY that makes it retarded. I could run PJ64 under WMWare and Vista/XP, for example, to test it on a new OS, to try a new OS, to try PJ under different hardware, and so on.
Not really, VMWare/Virtual PC doesn't have video hardware acceleration so you wouldn't get an accurate estimation of how well it'd work anyway.
 

Doomulation

?????????????????????????
It would allow me to find out if it crashes due to the infamous "can't allocate memory" bug.
Point being, as long as there is a reason for it, it's valid.
 

Exophase

Emulator Developer
But it isn't static; it's dynamic because it's done on-the-fly. We could also call it more sort of like a wrapper. Basically translating Xbox system calls into Windows system calls.

I don't know what you're trying to say. The conversion is done only once and not at runtime. Therefore, it is static, not dynamic.

ScottJC said:
Halo and Turok Evolution have both had their own PC ports, no need to bother with emulating those two. Both I've tried on PC, both i've loved I might add;

That's completely irrelevant...

ScottJC said:
But if you tried to run the PC version of both of these on the Xbox you'd fail dramatically.

I don't see any relevance in that either.

Halo is the one and only game that Xeon can emulate, and Turok Evolution is the one and only game that CXBX can emulate. That's why I mentioned them. I don't know exactly what capacity each are emulated to, but I'm pretty sure both are playable in some way.

I understand your underlying point about using an emulator to get to other emulators. But what you said about XBox emulation is overstated.

ScottJC said:
Not really, VMWare/Virtual PC doesn't have video hardware acceleration so you wouldn't get an accurate estimation of how well it'd work anyway.

http://jeremyfoo.vox.com/library/post/3d-acceleration-in-vmware-fusion.html

You seem to be addressing current software limitations or simply what people haven't done yet, and presenting them as inherent limitations related to the problem at hand.

Emulating at least some XBox games via the techniques persued by Xeon and CXBX may be less of a matter of it being impossible and more of a matter of people just not having done it yet. 3D acceleration in VMWare is exactly the same issue.
 
Last edited:

blueshogun96

A lowdown dirty shame
Turok Evolution is the one and only game that CXBX can emulate.
Not quite, Cxbx has been shown to run other games (though they don't go ingame) such as Myst III, Panzer Dragoon, DOAV, etc. So it's capable of doing more, so it just needs more work done on it.

But it isn't static; it's dynamic because it's done on-the-fly. We could also call it more sort of like a wrapper. Basically translating Xbox system calls into Windows system calls.
Well, maybe it's a mix of both. As sir Exophase said, the .exe file is generated once before runtime. That .exe file generated is linked to Cxbx's emu kernel (CxbxKrnl.dll or Cxbx.dll) and all of the hijacked DirectX APIs and Kernel APIs are used instead of the actual Xbox's. So most of the HLE emulation takes place in the .dll file, not the .exe as you might expect. When Cxbx converts the .xbe, basically what it does is removes/alters the .xbe headers to conform to standerd .exe (PE) and inserts some customized code so that it can be run on windows, nothing else is really changed.
 
Last edited:

Top