Chip-level accuracy for the PSX

Discuss any unrelated topics here.
Post Reply
User avatar
Nacho
Posts: 66
Joined: Thu Nov 07, 2013 9:25 am

Chip-level accuracy for the PSX

Post by Nacho » Fri Dec 19, 2014 10:17 pm

http://hackaday.com/2014/12/18/counting ... aystation/

Apparently, some team is working with hi-res microscope photos of the original PSX chips in order to achieve an insane level of accuracy!!

Wouldn't be wonderful if they take the n64 as their next project? :P

Enjoy the NAND-porn
Testing CEN64 on: Intel Core i5 520M 2.4 GHz. SSE2 SSE3 SSE4.1 SSE4.2 SSSE3, but no AVX. Ubuntu Linux

User avatar
MarathonMan
Site Admin
Posts: 692
Joined: Fri Oct 04, 2013 4:49 pm

Re: Chip-level accuracy for the PSX

Post by MarathonMan » Fri Dec 19, 2014 10:48 pm

This is an absolutely enormous feat. It's one thing to do this for, say, something on the order of NES. It's an entirely different story to do something on the level of the PSX! I hope that the hackers post/blog about their progress.

beannaich
Posts: 149
Joined: Mon Oct 21, 2013 2:43 pm

Re: Chip-level accuracy for the PSX

Post by beannaich » Sun Dec 21, 2014 7:40 pm

MarathonMan wrote:This is an absolutely enormous feat. It's one thing to do this for, say, something on the order of NES. It's an entirely different story to do something on the level of the PSX! I hope that the hackers post/blog about their progress.
I know that as of 2013 things about the NES were still being uncovered. Almost 30 years after its initial release. Granted, 99% is now known and most games run perfectly on the better emulators, but it is still crazy to think that a system with 8k of RAM could have so many well kept secrets :)

User avatar
Narann
Posts: 154
Joined: Mon Jun 16, 2014 4:25 pm
Contact:

Re: Chip-level accuracy for the PSX

Post by Narann » Wed Dec 24, 2014 12:17 pm

Nacho wrote:Wouldn't be wonderful if they take the n64 as their next project? :P
Due to the history of N64/SGI leak, it wouldn't be needed. :)

User avatar
Snowstorm64
Posts: 303
Joined: Sun Oct 20, 2013 8:22 pm

Re: Chip-level accuracy for the PSX

Post by Snowstorm64 » Wed Dec 24, 2014 12:32 pm

Narann wrote:
Nacho wrote:Wouldn't be wonderful if they take the n64 as their next project? :P
Due to the history of N64/SGI leak, it wouldn't be needed. :)
And yet N64 is the worst among emulated Nintendo consoles...Which is ironic. Even Dolphin (GC/Wii) is in great shape and it has already surpassed the N64...But we're lucky, because others are in a worse position (Saturn, Xbox and PS2 anyone?), so...
OS: Debian GNU/Linux Jessie (8.0)
CPU: Intel i7 4770K @ 3.5 GHz
Build: AVX (compiled from git)

User avatar
Narann
Posts: 154
Joined: Mon Jun 16, 2014 4:25 pm
Contact:

Re: Chip-level accuracy for the PSX

Post by Narann » Wed Dec 24, 2014 1:03 pm

Snowstorm64 wrote:And yet N64 is the worst among emulated Nintendo consoles...Which is ironic.
There is multiple reason why N64 emu is such a mess, on the technical point RCP doesn't look like any hardware ever design. N64 work in a unified way. There is no "Read, send to the GPU, use". Everything is done in a the same unified memory (Something very hard to emulate on X86 arch by design). Render an image using RDP, modify it using CPU then rerender is trivial for N64 hardware while difficult to do on X86 arch.

On the human side, N64 emu scene appear in an area where peoples where not used to work together (github like didn't exist and almost every software was close source) and it was actually the opposite, everybody were retaining it's code to avoid another to copy it... It's a very weird mind set from my (younger maybe) perspective and this has bring to shitty idea like the Zilmar's plugin spec that definitely fragment the N64 emu. If anyone want to create a new emu (N64 or not) I would push to don't do this as it totally fragment the code, the community, everything! Keep one single way to do things and improve it.
Snowstorm64 wrote:Even Dolphin (GC/Wii) is in great shape and it has already surpassed the N64...But we're lucky, because others are in a worse position (Saturn, Xbox and PS2 anyone?), so...
About Dolphin, it's the best HLE emulator ever created (what ever the console). It has good code design, talented devs, etc... So I would not compare. "Every emulator would look like Dolphin".

User avatar
Snowstorm64
Posts: 303
Joined: Sun Oct 20, 2013 8:22 pm

Re: Chip-level accuracy for the PSX

Post by Snowstorm64 » Wed Dec 24, 2014 2:01 pm

Narann wrote: There is multiple reason why N64 emu is such a mess, on the technical point RCP doesn't look like any hardware ever design. N64 work in a unified way. There is no "Read, send to the GPU, use". Everything is done in a the same unified memory (Something very hard to emulate on X86 arch by design). Render an image using RDP, modify it using CPU then rerender is trivial for N64 hardware while difficult to do on X86 arch.

On the human side, N64 emu scene appear in an area where peoples where not used to work together (github like didn't exist and almost every software was close source) and it was actually the opposite, everybody were retaining it's code to avoid another to copy it... It's a very weird mind set from my (younger maybe) perspective and this has bring to shitty idea like the Zilmar's plugin spec that definitely fragment the N64 emu. If anyone want to create a new emu (N64 or not) I would push to don't do this as it totally fragment the code, the community, everything! Keep one single way to do things and improve it.
Yes, that's why we lost ~15 years of progress, despite having the complete documentation for it, putting N64 in this messy situation. I still remember the awful times with Paper Mario and other 'problematic' games.
Narann wrote:About Dolphin, it's the best HLE emulator ever created (what ever the console). It has good code design, talented devs, etc... So I would not compare. "Every emulator would look like Dolphin".
I was speaking generally, either HLE or LLE, it doesn't matter, just a really good emulator that lets us play most games without problems. This is not the case for N64 emulators, unfortunately.
OS: Debian GNU/Linux Jessie (8.0)
CPU: Intel i7 4770K @ 3.5 GHz
Build: AVX (compiled from git)

AIO
Posts: 51
Joined: Wed Nov 05, 2014 4:56 pm

Re: Chip-level accuracy for the PSX

Post by AIO » Wed Dec 24, 2014 5:38 pm

Cmon guys! N64 scene isn't that bad 8-) . I'd honestly be satisfied if my hardware didn't suck with z64gl ;/ .

I'd say the biggest problems are not enough developers, not enough teamwork, and people not willing to take advantage of modern hardware. That last one mostly applies to graphics. Things would have been better if those docs were more available too, but it's understandable why people wouldn't openly distribute them.

User avatar
Nintendo Maniac 64
Posts: 185
Joined: Fri Oct 04, 2013 11:37 pm

Re: Chip-level accuracy for the PSX

Post by Nintendo Maniac 64 » Thu Mar 05, 2015 12:12 am

Snowstorm64 wrote:Saturn
Part of the issue is exactly the same thing that was present in N64 emulators - the best emulator was closed source.
Snowstorm64 wrote:Xbox
Honestly I think part of the issue is that using a virtual machine looks to be the answer to emulating the Xbox, but the idea and concept of virtualization was nowhere as popular 5-10 years ago as it is now.

Back then the only two ideas really thrown around for emulating the Xbox was running games essentually as native Windows programs, or emulating the entire x86 instruction set - both of these ideas being the number 1 and 2 rebuttals to anyone stating that Xbox emulation should be easy.
Snowstorm64 wrote:PS2
I'd argue that it's nowhere near as bad as the other two you listed.
CEN64 Forum's resident straight-male kuutsundere
(just "tsundere" makes people think of "Shana clones" *shivers*)

CPU+iGPU: Pentium G3258 @ 4.6GHz/1.281v
dGPU: Radeon HD5870 1GB
RAM: Vengeance 1600 4x4GB
OS: Windows 7

User avatar
Kerr Avon
Posts: 19
Joined: Wed Jan 08, 2014 2:47 pm

Re: Chip-level accuracy for the PSX

Post by Kerr Avon » Thu Mar 12, 2015 11:53 am

XBox emulation is almost non-existent, or at least it was when I last checked, and I've heard nothing contrary since. People think (and it does make sense) that since the XBox is largely just a PC with only joypad input and TV out, that emulating it should be very easy. But apparently the 10% or so difference between an XBox and a PC is full of huge, undocumented areas and difficulties.


Quote:

"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.

Basically, 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.

^ The exception to that above is that the NV2A is much better documented now, but not fully. There's an open source library for the OpenXDK called pbKit. It interfaces directly with the hardware to fully expose it's potential. This is what Microsoft should have done all along (or at least wrote a low-level OpenGL implementation).


Unquote


Source: http://ngemu.com/threads/why-is-xbox-em ... re.132032/



Also, many of the XBox's best games are cross platform, either with the PC or other consoles. It does have some very goof true exclusives (games like Unreal Championship 2 and Breakdown alone make it worth owning an XBox), but for many people it's not seen a a machine that's worth emulating. Fortunately they are sturdy and long-lasting (not like the XBox's successor, the XBox 360, with it's Red Ring of Death :o ), so we can keep using them. Mine is modded, and not only plays all of it's games from it's 500GB hard drive, but also runs lots of fantastic 8 and 16 bit emulators.

User avatar
Nintendo Maniac 64
Posts: 185
Joined: Fri Oct 04, 2013 11:37 pm

Re: Chip-level accuracy for the PSX

Post by Nintendo Maniac 64 » Thu Mar 12, 2015 6:19 pm

That post you linked to is 5 years old. Again, it largely predated the idea of using vitualization for a console emulator.

Congrats on re-iterating what I just mentioned:
Nintendo Maniac 64 wrote: Back then the only two ideas really thrown around for emulating the Xbox was running games essentually as native Windows programs, or emulating the entire x86 instruction set - both of these ideas being the number 1 and 2 rebuttals to anyone stating that Xbox emulation should be easy.

Meanwhile, it hasn't been updated in several months, but XQEMU has had the best success in "emulating" the Xbox so far...by actually being a virtual machine
http://shogun3d-cxbx.blogspot.com/2014/ ... xqemu.html


EDIT: Also relevent, Chihiro emulation in MAME:
https://github.com/mamedev/mame/blob/ma ... /chihiro.c
CEN64 Forum's resident straight-male kuutsundere
(just "tsundere" makes people think of "Shana clones" *shivers*)

CPU+iGPU: Pentium G3258 @ 4.6GHz/1.281v
dGPU: Radeon HD5870 1GB
RAM: Vengeance 1600 4x4GB
OS: Windows 7

User avatar
Snowstorm64
Posts: 303
Joined: Sun Oct 20, 2013 8:22 pm

Re: Chip-level accuracy for the PSX

Post by Snowstorm64 » Sat Mar 14, 2015 3:57 pm

Saturn
Nintendo Maniac 64 wrote: Part of the issue is exactly the same thing that was present in N64 emulators - the best emulator was closed source.
This is not the case for N64, I believe there are lots of documentations that helped a lot the N64 scene trying to emulate the hardware. I think the closed source emulator thing wasn't very relevant to this. Also, I believe the Saturn was much more harder to emulate due to its complex architecture, more than the N64 itself.

Xbox
Nintendo Maniac 64 wrote:Honestly I think part of the issue is that using a virtual machine looks to be the answer to emulating the Xbox, but the idea and concept of virtualization was nowhere as popular 5-10 years ago as it is now.

Back then the only two ideas really thrown around for emulating the Xbox was running games essentually as native Windows programs, or emulating the entire x86 instruction set - both of these ideas being the number 1 and 2 rebuttals to anyone stating that Xbox emulation should be easy.
Plus the fact that many of the best games for Xbox are available also on PC, and the lack of documentations...well...There weren't very compelling reasons to reverse-engineering the hardware, except for the sake of the preservation.

PS2
Nintendo Maniac 64 wrote: I'd argue that it's nowhere near as bad as the other two you listed.
I may concede that, but PCSX2 is to be considered the best PS2 emulator, right? Too bad, because it is done in a such way that its code is a hell to maintain, it is exclusive to x86 architecture (so only Windows and Linux on PC) and it is 32-bit only.
OS: Debian GNU/Linux Jessie (8.0)
CPU: Intel i7 4770K @ 3.5 GHz
Build: AVX (compiled from git)

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests