|
What makes Xbox so hard to emulate?
|
| Author |
Message |
blueshogun96
The danish lady...
      
Posts: 355
Group: Administrator/Developer
Joined: Mar 2006
Status:
Away
|
What makes Xbox so hard to emulate?
"Xbox is just like a PC, it's easy to emulate!"
Yes, we've all heard this silly and pointless argument a million times and it usually ends in the same, and rather ignorant conclusion (or should I say assumption) that just because the Xbox is PC similar, it's hardware should be relatively easy to emulate. That's a very wrong frame of mind. How hard can it be? Very. Xbox's hardware is very complex and still poorly documented to this day. This requires some explanation.
1. Is a PC easy to emulate? Well, I wouldn't say so myself. Take a look at the source code from bochs. A lot of source code/work isn't it?
2. Emulating an x86 CPU is a lot harder than it sounds. I don't know where this mindless assumption comes from. Yes, there's loads of documentation on how the x86 processor works, but that doesn't exactly make it easy. First of all, the x86 instruction set is M-A-S-S-I-V-E! There can be at least 20 different versions of one instruction (i.e. There are many different versions of the MOV instruction, as well as INC, DEC, ADD, SUB, SHR, SHL, AND, OR, XOR etc.) and it takes time to implement them all. Of course, that's not exactly difficult. The real problem is that any modern x86 processor including the Pentium III can execute multiple instructions at once. So it's not like emulating a Z80 doing one instruction at a time. The actual algorithm and how x86 does this is undocumented and still unknown. In short, the Xbox's CPU can be emulated, but not accurately.
3. Emulating any hardware by NVIDIA is not a walk in the park! The Xbox's GPU, the NV2A is often assumed just a GeForce 3. It's not! It's similar but not identical. It has some GeForce 4 capabilities too, so it's more of a cross between an NV20 and NV25. This is by no means easy to emulate either. NVIDIA's GPUs have very large register sets and afaik not even half of them have been discovered, and a large portion of known registers have unknown purposes. There is little to no documentation on how NVIDIA GPUs work. The best thing to do is to look at similar GPUs such as RIVA, TNT, and older GeForce cards. Some registers are similar, but not identical. The best place to look for information is in open source drivers available on the net. Adding to the dificulty is that no one has ever discovered how pixel shaders work on NV2x cards, vertex shaders yes though. The Xbox GPU also has exclusive registers that are not found in other GeForce cards. Information on the NV2A's GPU registers are just now beginning to be discovered a few months ago. And yet, there's still a long way to go. The GeForce 3 series is the most mysterious of all NVIDIA GPUs (G7x and G8x aside) and the NV2A is alot worse. "But can't you just directly execute the NV2A instructions on another NVIDIA card?". No, I get alot of questions concerning this, and it is impossible. It's MMIO addresses are different and the exclusive registers must be emulated. Plus, in windows, we don't have ring 0 access anyway, so you all can scratch that idea now. Then comes the NForce 2 chipset. This is where it get easier. The NVIDIA MCPX is the control center for things such as audio, USB for input, Network adapters, PCI, AGP, etc. These things are not really that difficult to emulate IMO except for the audio.
4. The Audio system is rather complex. Xbox's audio consists of at least 4 DSPs, and audio codec (AC '97) and an NVIDIA SoundStorm APU. The DSPs shouldn't be a problem (just figuring out what they all are is) nor should the AC '97 but the NVIDIA SoundStorm APU is the really difficult part. So far I haven't found any information on this thing, but right now, it's relevance is low.
5. The Xbox BIOS isn't fully understood. The basic execution process of the BIOS is understood, but details on the process are at a loss. What we do know gives us hints, but before the BIOS can be emulated, we'll need a better understanding of the Xbox hardware layout because the BIOS does some unknown hardware initialization at boot time and writes to the hardware directly without using any XDK stuff. It will take some time, and effort, but I'll eventually get it working.
6. Video Encoder "Hell". Instead of using a RAMDAC for video output, the Xbox uses a Video Encoder. What makes this suck a pain? Microsoft sought the need to change the video encoder every other Xbox version (there are seven in all, 1.0 - 1.6). Why, I dunno, it's a Microsoft thing, they always tend to try to "fix" things that aren't broken >.> AFAIK, there are at least 3 different Video Encoders used: Conexant CX25871, Focus FS454, and Xcalibur. For more information in Xbox video encoders, click here. Emulating all three video encoders is only less than half the battle, the real problem is that BIOSes can be specifically tied to a specific encoder depending on it's version (don't quote me on this though). Like PS2, every Xbox model revision has a updated BIOS and has different expectations. This is a potential problem, but not exactly major.
Basally, I'm trying to get this "Xbox should be easy to emulate because it's just like a PC" crap out of your heads. I'm sure that most of you will disagree with me on this, but for these reasons and more, on a low level, Xbox is harder to emulate than PS2. I'll leave this thread open so anyone can discuss it.
Hej! Jeg hedder blueshogun. Jeg kommer fra USA. Forstår du det? Selvfølgelig...

http://blueshogun96.wordpress.com - View my blog (or die!)
shogun
This post was last modified: 07-08-2007 06:50 PM by blueshogun96.
|
|
| 07-08-2007 06:49 PM |
|
 |
refraction
PCSX2 Dev
      
Posts: 388
Group: Administrator/Developer
Joined: Mar 2006
Status:
Offline
|
RE: What makes Xbox so hard to emulate?
very true. I think dosbox is a good example of this. altho it is just emulating x86, its by no means quick at doing it, to run some FPS games you need a very modern machine to run them smoothly.
playing Blood on a Pentium 4 3.4Ghz you can expect a slow game, despite the games low requirements.
|
|
| 07-08-2007 06:54 PM |
|
 |
Stranger90
Registered
Posts: 27
Group: Registered
Joined: May 2007
Status:
Offline
|
RE: What makes Xbox so hard to emulate?
Another thing hard to emulate it's the DVD drive, becuase Xbox games are protected and you can't browse into it!!
My specs: OS: Windows XP Professional/ CPU: AMD Athlon 2.01 Ghz/ RAM: 2 GB RAM/ VB: RADEON X700 SE/ SB: SB Creative X-Fi/ DVD: LG GDR8164B/ DVD + RW: Pioneer DVR-111D
|
|
| 07-09-2007 06:31 AM |
|
 |
blueshogun96
The danish lady...
      
Posts: 355
Group: Administrator/Developer
Joined: Mar 2006
Status:
Away
|
RE: What makes Xbox so hard to emulate?
That's also true. So you can't expect an emulator that allows you to pop in the DVD and start playing.
Hej! Jeg hedder blueshogun. Jeg kommer fra USA. Forstår du det? Selvfølgelig...

http://blueshogun96.wordpress.com - View my blog (or die!)
shogun
|
|
| 07-09-2007 02:00 PM |
|
 |
Stranger90
Registered
Posts: 27
Group: Registered
Joined: May 2007
Status:
Offline
|
RE: What makes Xbox so hard to emulate?
That's also true. So you can't expect an emulator that allows you to pop in the DVD and start playing. 
Well, maybe there is a trick for make works the DVD! You guys that makes emulator always found something
My specs: OS: Windows XP Professional/ CPU: AMD Athlon 2.01 Ghz/ RAM: 2 GB RAM/ VB: RADEON X700 SE/ SB: SB Creative X-Fi/ DVD: LG GDR8164B/ DVD + RW: Pioneer DVR-111D
|
|
| 07-10-2007 02:40 AM |
|
 |
emwearz
Administrator
      
Posts: 549
Group: Administrators
Joined: Mar 2006
Status:
Away
|
RE: What makes Xbox so hard to emulate?
Theres hardly ever 'tricks' when the devs 'find' something it is usually the result of hours of work.
 » Intel Core 2 Duo E6300 (@3.2 Ghz) | GeForce 8800GT 512MB | 2GB OCZ DDR2 800 «
» Asus P5B Rev C1 | Thermaltake Soprano | Thermaltake Big Typhoon VX «
» Beta Tester for nullDC «
|
|
| 07-10-2007 05:50 AM |
|
 |
BigIg
Registered
Posts: 55
Group: Registered
Joined: Jun 2007
Status:
Offline
|
RE: What makes Xbox so hard to emulate?
It's amazing how many people don't understand the hard work devs put into emulators. You know, the type of guys that complain because PCSX2 won't run at full speed on thier 1.8GHz P4s. A lot of people seem too think that emulating a system is as easy as telling the game to run on thier PCs. :-P. They don't understand how complex even a Chip8 emulator is, not alone of PS2/Xbox/etc emulator.
Good luck on your project, I look forward to seeing progress.
[Computer 1] [a CPU] [Some Ram] [A video Card] [Some audio card] [Some harddisks] [a PSU] [A monitor] [And 45TB of porn]
|
|
| 07-10-2007 01:00 PM |
|
 |
MiretanK
Spaministrator
      
Posts: 1,264
Group: Administrators
Joined: Mar 2006
Status:
Offline
|
RE: What makes Xbox so hard to emulate?
That's also true. So you can't expect an emulator that allows you to pop in the DVD and start playing. 
My Nintendo Wii emulater do that

dA Page|flickr|Joejoe.org
CPU: Intel Core 2® Quad Q6600@2.4GHz RAM: 2GB Dual Channel, 1GB PC2-5300 667MHz Kingston Mainboard: Asus P5K DELUXE/WiFi-AP Video Card: Solar GeForce 8600GT 256MB DDR3 Storage: 80GB WDC SATA/ 40GB ST3 SCSI/ 80GB Samsung USB HDD PSU: WiseCase 500W Monitor: LG 710E
|
|
| 07-11-2007 10:28 AM |
|
 |
galson
The Big Red Machine
   
Posts: 328
Group: Contributors
Joined: Jun 2007
Status:
Offline
|
RE: What makes Xbox so hard to emulate?
Nice article, explains a lot, thanks blueshogun96 for taking your time to write it. I wish you much success with the emulator, even though I cannot help you in any way (I can design some emu's look, background, logo or icon, though if you're interested). Keep up the good work
This post was last modified: 07-11-2007 11:41 AM by galson.
|
|
| 07-11-2007 11:40 AM |
|
 |
BigIg
Registered
Posts: 55
Group: Registered
Joined: Jun 2007
Status:
Offline
|
RE: What makes Xbox so hard to emulate?
Just out of curiosity, is Xbox's CPU a Reduced Instruction Set or a standard P3?
Also, most consoles CPUs perform operations in the order they are received (at least 360/ps3), I'm assuming the Xbox isn't like that since it's just a modified P3?
-BigIg
[Computer 1] [a CPU] [Some Ram] [A video Card] [Some audio card] [Some harddisks] [a PSU] [A monitor] [And 45TB of porn]
|
|
| 07-13-2007 05:36 PM |
|
 |
blueshogun96
The danish lady...
      
Posts: 355
Group: Administrator/Developer
Joined: Mar 2006
Status:
Away
|
RE: What makes Xbox so hard to emulate?
Just out of curiosity, is Xbox's CPU a Reduced Instruction Set or a standard P3?
Also, most consoles CPUs perform operations in the order they are received (at least 360/ps3), I'm assuming the Xbox isn't like that since it's just a modified P3?
-BigIg
It's a standard Coppermine Intel Pentium III processor with a halved L2 cache (128KB). It has MMX, SSE, etc. and it has a customized CPUID function. Also the INT instruction isn't supported afaik. I don't know how PowerPC emulates it's instructions, but x86 is capable of doing more than one instruction at a time.
Hej! Jeg hedder blueshogun. Jeg kommer fra USA. Forstår du det? Selvfølgelig...

http://blueshogun96.wordpress.com - View my blog (or die!)
shogun
|
|
| 07-14-2007 05:18 AM |
|
 |
german15
Registered
Posts: 123
Group: Registered
Joined: May 2007
Status:
Offline
|
RE: What makes Xbox so hard to emulate?
blueshogun96 sory maiby a stupid question but are you trying to make an xbox emulator for real or you just curious how hard is it to emulate ???????
|
|
| 07-14-2007 07:03 AM |
|
 |
General Plot
Britchie Crazy
      
Posts: 2,306
Group: Administrator/Developer
Joined: Mar 2006
Status:
Offline
|
RE: What makes Xbox so hard to emulate?
blueshogun96 sory maiby a stupid question but are you trying to make an xbox emulator for real or you just curious how hard is it to emulate ???????
You haven't noticed the Xenoborg forum? Blueshogun is the author of it.

Intel Core 2 Duo E6600 | 2 GB DDR2 RAM | GeForce 7900 GTX
2.5 TB Hard Drive Space | Windows XP Pro SP2
Check out my site: http://generalplot.atspace.com
Official betatester of PCSX2 and Co-owner of General Emulation
|
|
| 07-14-2007 01:58 PM |
|
 |
blueshogun96
The danish lady...
      
Posts: 355
Group: Administrator/Developer
Joined: Mar 2006
Status:
Away
|
RE: What makes Xbox so hard to emulate?
I'm not releasing it [again] until it's ready, or at least worth the download.
Hej! Jeg hedder blueshogun. Jeg kommer fra USA. Forstår du det? Selvfølgelig...

http://blueshogun96.wordpress.com - View my blog (or die!)
shogun
|
|
| 07-15-2007 06:11 PM |
|
 |
Cid Highwind
King of Fools
  
Posts: 230
Group: Beta Discussion Members
Joined: Mar 2006
Status:
Offline
|
RE: What makes Xbox so hard to emulate?
That was very interesting to read. Although all the basics were already known to me because it's the same for every console, it was very interesting to read an in depth article on Xbox emulation specifically. Thanks
|
|
| 07-15-2007 07:00 PM |
|
 |
|
|