Welcome! Log In Create A New Profile

Advanced

PCSX2 Port (I know the wii might not have the required specs. but its worth a try... right?)

Posted by Adman 
Hello,

I know this might sound far fetched but I think it would be a good idea to have the port of PCSX2 to the Wii. I'm not that good of a coder and I hoped someone that knew how to code would be with me on this. Even if it would start out running 2 FPS, it would still be a start. I hope you conseder my request.

Adman

P.S. What languge is the Wii codes written in, if nobody agrees I will try... and fail! :)
there's another thread on this if you search around here.



Edited 2 time(s). Last edit at 06/26/2009 09:32PM by scanff.
[forum.wiibrew.org]

Most people code for the Wii with C/C++
Quote
Adman
P.S. What languge is the Wii codes written in, if nobody agrees I will try... and fail! :)

The homebrew libraries are written in and for C/C++.
But of course you can use any lanfguage you want, as long as you have a toolchain that compiles it for a powerpc-gecko
I also want to know what the wii specs are... The PCSX2 can run most games fairly on a PC with:

Dual Core @ 2.8 GHz
2 Gigabytes of RAM
Graphics Card of 256 Megabytes or more (Good Quality)(Min. Nividia 8700)

These specs can run most games @ 40-50 FPS. If Wii has equivallent or more, it could be doable.



Edited 1 time(s). Last edit at 06/30/2009 07:17PM by Adman.
I am like 99% sure the wii has nowhere near 2gig ram.

But yeah, I could totally see nintendo deciding to have more ram than flash memory (Not sarcasm, just not a nintendo fan. There is too much disappointment with being a nintendo fan -_-... +cries+)
The Wii is about 750-800 MHz, 64MB RAM. Good luck!
well, THEORETICALLY it could work.

Quote
Adman
Even if it would start out running 2 FPS, it would still be a start.

Too high, try 1 fps (max), and it wouldn't be as much as a start as it would be an end. :P
Quote
CloneDeath
Too high, try 1 fps (max), and it wouldn't be as much as a start as it would be an end. :P

How do you know it wont run in 2 fps? May I take part of your calculations?
64MB/2048
1/32

800mhz/2800
1/3


=

1/96

So it has about 1/96 of the power. I know that my calculations are aproximate, but it makes sense. First off, if we want to run the game, we are going to need room for the rom, the emulator, and the game to run in memory. Wii only has 64MB so we have to use "virtual memory" via an SD card. Standard SD is too small to hold all this (although my guess on rom sizes might be off, I don't pirate :P) so lets just say we use a 4GB microSD card. Now, if you know about how they work, they are able to have these huge capacities and in return go REALLY slow, so in this case, size of memory does compute to processing speed (although, not in a linear way)

When I get home, I will test file writing to a microSD of 4gig if need be, just to prove the point and to get more accurate metaprocessing FPS for you, but seeing as how it is about a third of the speed, multiply that by how slow it will take to access virtual memory, and we get 1/96

If we didn't have memory issues, then the game should run at about 15FPS, more or less.

Now, using the acess times from this place:

[forums.maxconsole.net]

and assuming we have an access time for ram of about .000001 seconds per byte (1,000 nanoseconds, it is hard to find an exact speed, but according to the internet, that is abominationally slow).

so a microSD of 4 gig takes < 3MB/Sec or 0.001048576 seconds per byte. (Edit: To clarify, the website only shows standard SD speeds, and I know that MicroSD is MUCH slower than that, so we say it is less than or equal to a standard SD card. Thus, even if we could run it on a normal SD rather than a microSD, the end numbers is a maximum for both)

The MicroSD is 1048 times slower than ram. (speed of MicroSD/speed of Ram, just shift the decimal place :P)

1FPS is impossible. My initial estimation was WAY too high. It should be much less than 1 FPS.

Now, these are just aproximations. Your Wii is going to be dedicated emulator and the PC has multiple things running, so the processor may actually be fast enough to get 45FPS easily, but it is the memory that causes it to be aproximately .0429 FPS (about 1 frame every 25 seconds) (I got this from 45/1048 = PC FPS / MicroSD speed vs Ram speed)

It will probobly be much slower, based on how I rounded.



Edited 1 time(s). Last edit at 07/01/2009 08:26PM by CloneDeath.
Why would an PS2 emulator even need 2 GIGS of Ram?



Edited 1 time(s). Last edit at 07/02/2009 05:41AM by daniel_c_w.
It probably doesn't, and that's why the above calculations are biased and don't make much sense :-)

If you look at the specifications, RAM requirement are at least (probably more) ~40 MB to handle PS2 internal "physical" memory (Main RAM, GPU RAM, hardware registers, etc) and then PCSX2 emulator requirement (to store code, variables, allocated objects, buffers, etc) seems to be at least 512MB (the more you have and the more things that can be buffered and speedup).

I don't know, maybe someone very talented could make the emulator fits in the remaining Wii memory but we will probably never know because, as above PS2 specifications show, there is no way the Wii could handle PS2 emulation: this is not even a matter of SDCARD access speed, it's a matter of the Wii CPU being too slow and the PS2 architecture being relatively too complex and avanced.

A good read.



Edited 1 time(s). Last edit at 07/02/2009 10:40AM by ekeeke.
I know it was biased, I didn't know the PS2 or Emulator specs, so I just made allsorts of wild assumptions...

Theoretically, if we wrote a program that was able to read the "emulator" program off the sd, and work with "virtual memory" for the "emulator" on the SD, it would be possible... albeit slow as hell... Basically we wouldn't port the PS2 emulator for the wii, we would port it into a sort of scripting language, so that we can only load bits of the emulator into memory at a time, and we have better managment of memory of the emulator/PS2 by making it all virtual.

It is possible. But no one is going to do it. Thus, impossible :P.

Also, my thing isn't that biased if you look at it. Even if the PS2 only requires 40MB of ram, using that on the card rather than the ram is still going to make it 1048 times slower. Also, I am not sure how the emulator works with stdio, but we would need to store mostly all the data from the file that needs to be interpreted on the SD, making it much slower, if my guess of how it works is correct. (My guess is that the data in a rom isn't like a set of commands you can just do, but rather it creates a structure and defines all these commands, then the header of the rom points to a specific method and says "start here" so you COULD navigate through the CD in a kind of interpreted way... I dunno, I have never made an emulator before so~)
Quote

Theoretically, if we wrote a program that was able to read the "emulator" program off the sd, and work with "virtual memory" for the "emulator" on the SD, it would be possible... albeit slow as hell... Basically we wouldn't port the PS2 emulator for the wii, we would port it into a sort of scripting language, so that we can only load bits of the emulator into memory at a time, and we have better managment of memory of the emulator/PS2 by making it all virtual.

What is sure i sthe Wii programs can only run from RAM. You mean having your emulator loading modules from SD into the Wii RAM then releave execution to them in order to save some memory ?
I don't think this would work because all PCSX2 objects must be very tied together and you would have to recode everything with memory partitionning and stuff like that. In any case, I'm pretty sure this wouldn't change much since the 512MB requirement is probably not due to the emulation code size but the size of data & buffers used by the emulator. Again, this probably could be dramatically reduced but isn't worth the effort.

Quote

Also, my thing isn't that biased if you look at it. Even if the PS2 only requires 40MB of ram, using that on the card rather than the ram is still going to make it 1048 times slower. Also, I am not sure how the emulator works with stdio, but we would need to store mostly all the data from the file that needs to be interpreted on the SD, making it much slower, if my guess of how it works is correct. (My guess is that the data in a rom isn't like a set of commands you can just do, but rather it creates a structure and defines all these commands, then the header of the rom points to a specific method and says "start here" so you COULD navigate through the CD in a kind of interpreted way... I dunno, I have never made an emulator before so~)

The only "ROM" is the PS2 BIOS , all other data are read as files from the DVD.
BIOS ROM generally contains the main program (and some data) that is executed by the PS2 CPU on startup. This program has routines to load files from the DVD. Files on DVD can be either other subprograms or various data holders (arrays, compressed textures, sound samples, level maps, etc).Those files are loaded into the PS2 internal memory when required.

Now, an emulator work exactly the same: it would read files either from DVD or any storage device so SD speed is not the problem as long as it can store the BIOS ROM and the PS2 internal RAMs in its own RAM memory.
So, I actually got it! Ported it (No not me, had a friend who knows C++)! Not relised to public! Runs at .0235 FPS! lol
And PCSX2 DOES need 2GIG because it needs (about) 10X more Specs than normal PS2.
Would it make a difference if the game were actually played off a disc instead of the SD card?
Quote
Kammesennin
Would it make a difference if the game were actually played off a disc instead of the SD card?
No.
Sorry, only registered users may post in this forum.

Click here to login