x86 Emulator for PS2

General, off-topic discussion about things of interest to the members of these forums.

Moderator: cheriff

Phoenixconsole
Posts: 17
Joined: Sat Nov 06, 2004 12:11 am

x86 Emulator for PS2

Post by Phoenixconsole »

Hello from Germany! (I`m not realy good in english)

I want to convert a IBM-PC-Emu to the PS2 (with USB and HD-Support!)

In fact i want to convert "bochs IA 32" "http://bochs.sourceforge.net/".
If there is anyone who want to help me or has some ideas or anything else - tell me!

My target is to emulate:
386DX (JIT with max clock)
8MB RAM, S3 VGA,Soundblaster,USB,HD,DVD-RW and WIN95+-Support!

Sombody in the Ps2 scene forum told that somebody else has started such a project but it was stopped. Can sombody tell me about this project?

One old Project: http://www.beepworld.de/members49/papara/index.htm
Its a german site so you must translate it(in bad english just like my own ; ) ) with a searchengine or somthong else.
Phoenixconsole
Posts: 17
Joined: Sat Nov 06, 2004 12:11 am

Post by Phoenixconsole »

Is nobody here who can give me some information? Or don`t you trust me?
pixel
Posts: 791
Joined: Fri Jan 30, 2004 11:43 pm

Post by pixel »

Can't you... just give some time to people to answer you .. ?
pixel: A mischievous magical spirit associated with screen displays. The computer industry has frequently borrowed from mythology. Witness the sprites in computer graphics, the demons in artificial intelligence and the trolls in the marketing department.
User avatar
Shazz
Posts: 244
Joined: Tue Aug 31, 2004 11:42 pm
Location: Somewhere over the rainbow
Contact:

Post by Shazz »

Are you looking for ps2pc ????

http://ps2pc.parodius.com/

I did not try it (why the hell I would emulate a PC on my PS2 ??? :D ), the source code seems available...

Good luck !
- TiTAN Art Division -
http://www.titandemo.org
Phoenixconsole
Posts: 17
Joined: Sat Nov 06, 2004 12:11 am

Post by Phoenixconsole »

Yes and thanks for the link!!! Hmm this project looks not so bad but im working on a port of bochs and the author of ps2pc wrote that he started with an own Emulator because he thinks this may be faster(P 200/300!!). I thinks this is not possible. Possible is a emulated 386DX ~@90. I will optimize some parts of the Bochs source and rewrite it. Windows98 will run.

Pardon the project is called as "RockeTonTheDog"

I plan to make a first (not realy working relase) in the end of the year which will show the GUI of the Emulator. The GUI includes already a MP3 Player(more Media will be later supported). If the Virtual PC is to slow to play any supported Media you can activate a second virtual cursor an click on a File which than, if supported will run over the ps2native Player in the GUI.

In the Moment i have some probs with USB and the use of the Harddrive. In other words i must learn something about this two things, where can i find some Informations or better: examples?

Greetings and thanks for Help!
User avatar
Shazz
Posts: 244
Joined: Tue Aug 31, 2004 11:42 pm
Location: Somewhere over the rainbow
Contact:

Post by Shazz »

Concerning USB and HDD homebrew libs, I suggest you take a look at the ps2dev CVS whre you'll find libs and good docs (especially for the HDD structure) :

http://cvs.ps2dev.org/ (or access directly to CVS)
- libhdd
- usbmass

or look into ps2sdk :
At the time of writing PS2SDK includes the following libraries and
features, allowing:

- Access to PS2 internal OS functions.
- Access to PS2 control pad and multitap.
- Access to PS2 memory card.
- Access to USB mouse and keyboard.
- TCPIP stack & DNS resolution compatible with PS2 Ethernet Adapter.
- Full PS2 compatible Hard Disk Drive file system.
- Access to CD and DVD.
- Mini optimised C library for most string operations.
- Access to sound library on all PS2 using (freesd).
- HTTP client file system.
- Network File System to load files from HOST pc.
http://ps2dev.org/kb.x?T=1079

Definitively, ps2dev.org is the place to go !!!
- TiTAN Art Division -
http://www.titandemo.org
Phoenixconsole
Posts: 17
Joined: Sat Nov 06, 2004 12:11 am

Post by Phoenixconsole »

thanks again!

I have another little question: Is it allowed to use a copyright protected song in a demo? I try to make a nice christmas demo and want to use a mp3 file in Background.
Guest

Post by Guest »

Phoenixconsole wrote:thanks again!

I have another little question: Is it allowed to use a copyright protected song in a demo? I try to make a nice christmas demo and want to use a mp3 file in Background.
Only the holder of a copyright can give you permission to use their works,
unless such usage falls under "fair use" provisions of copyright law. We
are not in any position to give you approval for the former nor advice for the latter.

The PS2DEV community expects ALL copyrights to be respected.
Phoenixconsole
Posts: 17
Joined: Sat Nov 06, 2004 12:11 am

Post by Phoenixconsole »

This is also my opinion but what is with beats of rage? I downloaded it from giga.de and this includes copyrighted charakters and Audio. This is the cause i asked.
Guest

Post by Guest »

Well, Pixel can shed more light on this. But as far as I can tell, you did not download it from the official PS2BOR website - ps2bor.ps2-scene.org.

The official distribution does not come with copyrighted materials. The author of the PS2 port asks specifically that people do not distribute it or associate it with copyrighted materials. Clearly the distribution you have is not respecting that wish.

FYI this is on the front page of the official website:

Disclaimer
The creators of PS2BOR fully acknowledge the copyrights to other game companies graphics, sprites, music and simillar material which may be contained inside of third party pak files. We also are not affiliated with any third party pak file distributors. Please do not distribute the aformentioned binary alongside with pak files containing copyrighted material. BORPS2 and the original Beats of Rage is freeware; no fee may be charged for copying or distributing the BORPS2 & Beats of Rage files.
pixel
Posts: 791
Joined: Fri Jan 30, 2004 11:43 pm

Post by pixel »

Well; don't forget there are two "ps2" ports for beats of rage out there. The original one, made by Neill Corlett, which is using the sony's SDK, and mine, based on Neill's work, but written for linking with ps2sdk. Maybe the one he got was the Neill's port.

--edit--

Yes, after looking at giga.de, they are offering Neill's native port. Well, both the binary and the bundled .pak files are illegal in this download :)

The binary is illegal for using sony's SDK, and the .pak file is illegal for having copyrighted materials coming from various games.
pixel: A mischievous magical spirit associated with screen displays. The computer industry has frequently borrowed from mythology. Witness the sprites in computer graphics, the demons in artificial intelligence and the trolls in the marketing department.
Phoenixconsole
Posts: 17
Joined: Sat Nov 06, 2004 12:11 am

Post by Phoenixconsole »

Damn f****! There are some RAM-Problems! I have another question for you: I want to make a swap partition on the PS2 HD for virtualmem but it doesent work! Has somebody done anything similar to it already? If yes please help!
User avatar
Shazz
Posts: 244
Joined: Tue Aug 31, 2004 11:42 pm
Location: Somewhere over the rainbow
Contact:

Post by Shazz »

Hum something interesting ! With Evilo we were thinking of a HD swap in order to make run NeoGeo roms > 32 Mb on top of NeoCD.... but only an idea :D

Why not posting your code, maybe somebody would find what's wrong ?
- TiTAN Art Division -
http://www.titandemo.org
pixel
Posts: 791
Joined: Fri Jan 30, 2004 11:43 pm

Post by pixel »

Pardon my dumb question, but, aren't rom, by definition, read only ? So, by "swapping", you mean, "reading chunks of the original when the game needs it" ? So it may even "work" (if we forget the cdvd drive speed) when reading from a cd or a dvd, not only by using HDD. (this remark is only valid for the neogeo emulator, not for the pc emulator, of course)
pixel: A mischievous magical spirit associated with screen displays. The computer industry has frequently borrowed from mythology. Witness the sprites in computer graphics, the demons in artificial intelligence and the trolls in the marketing department.
User avatar
Shazz
Posts: 244
Joined: Tue Aug 31, 2004 11:42 pm
Location: Somewhere over the rainbow
Contact:

Post by Shazz »

pixel wrote:Pardon my dumb question, but, aren't rom, by definition, read only ? So, by "swapping", you mean, "reading chunks of the original when the game needs it" ? So it may even "work" (if we forget the cdvd drive speed) when reading from a cd or a dvd, not only by using HDD. (this remark is only valid for the neogeo emulator, not for the pc emulator, of course)
Hello Pixel,

Yep I mean a virtual read only memory (so not RAM obviously) used to store the NeoGeo game (a cartridge bigger than 32 Mb) in order to read needed chunks as you said... so that's right, Phoenixconsole need more, read & write... but the goal is the same, extend the amount af available memory as the PS2 is quite limited...

But that was just an idea when I asked Evilo if he planned to extend NeoCD PS2 to a NeoGeo emulator and he answered that the major issue was he ROM size...
- TiTAN Art Division -
http://www.titandemo.org
User avatar
Drakonite
Site Admin
Posts: 990
Joined: Sat Jan 17, 2004 1:30 am
Contact:

Post by Drakonite »

Shazz wrote: But that was just an idea when I asked Evilo if he planned to extend NeoCD PS2 to a NeoGeo emulator and he answered that the major issue was he ROM size...
You have no idea just how far behind you are...
Shoot Pixels Not People!
Makeshift Development
User avatar
Shazz
Posts: 244
Joined: Tue Aug 31, 2004 11:42 pm
Location: Somewhere over the rainbow
Contact:

Post by Shazz »

Drakonite wrote: You have no idea just how far behind you are...
Express yourself Drakonite ! Help me to just smell it ! ;-)
- TiTAN Art Division -
http://www.titandemo.org
User avatar
evilo
Posts: 230
Joined: Thu Apr 22, 2004 8:40 pm
Contact:

Post by evilo »

Phoenix,

did you had a look to that one :
http://dosbox.sourceforge.net/information.php?page=0

?
Phoenixconsole
Posts: 17
Joined: Sat Nov 06, 2004 12:11 am

Post by Phoenixconsole »

Right now i had a look at it! It seems to be a DOS"Games-only"-Emu.Right? I don`t think that Win9x will run within the "DOSBOX" or am i wrong? And the best argument for me not to use this source is: I have already started with Bochs-source. Only to understand it was hard- to find a way to split the work on different ressources of the ps2 was and is f*** hard. A new beginning with another source will be more f**** hard. if you are sure that DOSBOX is a better choice tell me this please.

My english is bad but pehaps you understand me the way it was meant(i dont now if this word exists in english)

By the way: I kicked the Virtualmem-idea! Maybe after my first release somebody will help or try it
User avatar
evilo
Posts: 230
Joined: Thu Apr 22, 2004 8:40 pm
Contact:

Post by evilo »

well, it's sure that if your aim is to get w9x running, and dosbox is not the right choice as focus is as you said on games....

note that on the dosbox site they said that a big configuraion is required for protected mode (http://dosbox.sourceforge.net/wiki/inde ... quirements)
so I would be quite curious to see the performance while emulating w9x, when you will reach that state... (it's maybe also due to how dosbox is implemeted). What are the system requirements for boch ?
Phoenixconsole
Posts: 17
Joined: Sat Nov 06, 2004 12:11 am

Post by Phoenixconsole »

I read this and i´m realy shocked. Do you know FusionPC for Amiga? You where able to run a 486@25 with an MC68060@66! I looked at the IRIX (MIPS)-Port of Bochs. The difference to DOSBOX is that nearly everything is emulated and the compatibility will be much higher(not only Games). Remember my target: 386@ JIT. The 386 Instructions are the absolute minimum to run Win and i will use many lines of Bochs but not all. The difference will be the Just in time compilation a la FusionPC/PCTask on the Amiga. Many thinks that are emulated are not usefull on a PS2 with only Ethernet,perhaps a HD and USB- i will go the easiest way of life and kick some emulated garbage which is sure needful on a real PC which emulates another OS. In the future will nobody remember that this was a Bochs-conversation. Oh I`ve done the Gui which includes in the moment a MP3-player. The trick is if the emulated ystem is to slow to run a mp3 in it or later any other Media you will be able to click in the emulation with a second virtual Mouse on this Media and the Gui will play it with native PS2-Code! My dream is to play Day of the Tentacle, Sam and Max or Fullthrottle at full speed and to use the PS2(later Ps3 if this thing will allow it) as a nice Webbrowser or HomeofficePC.
J.F.
Posts: 2906
Joined: Sun Feb 22, 2004 11:41 am

Post by J.F. »

Phoenixconsole wrote:I read this and i´m realy shocked. Do you know FusionPC for Amiga? You where able to run a 486@25 with an MC68060@66!
You are thinking of e586. FusionPC was the Mac emulator for the PC. e586 was VERY similar to DOSBOX in what it supported: older DOS games. It was mostly designed so people could run DOOM and Tomb Raider on the Amiga. At the end before Microcode Solutions went away, there was a version that used the MMU in the Amiga to simulate the MMU in the PC. It ran EMS software and Windows 3.11 in enhanced mode pretty well. It never quite supported Windows 9x.

Also, e586 ran a little faster than 486@25 on an 060 for most things. It depended greatly on what you were running. Now suppose that you take that as the lower speed limit, the PS2 is more than 5 times as fast, so you could make a rough estimate on the lower end of performance for a decent x86 emulation on the PS2. I'd say Pentium 90 speeds should be obtainable with no special tricks. While a Pentium 90 with 16M of ram is not good for XP Pro with SP2, it's okay for things like 9x. :)
Phoenixconsole
Posts: 17
Joined: Sat Nov 06, 2004 12:11 am

Post by Phoenixconsole »

You are right but PCTask was such a PC Emu for the Amiga and Win95 is running on it. P90- this seems to be realistic. But with JIT i think a virtual PC 386based with ~200 is realistic. But every added need of more emulated ressources like VGA-Card,Sound etc will kill the Speed. I think a unzipping process under DOS will be fast as on an (never build)386@200 but running Win95 etc. it will run like 386@40(with Sound...). Somebody has a other actually stoped project called PS2PC and had a idea about writing a Win-driver for the native PS2-GPU. I don`t know if this is possible or if it is possible if it than will be really faster.
J.F.
Posts: 2906
Joined: Sun Feb 22, 2004 11:41 am

Post by J.F. »

Yes, the last versions of PCTask ran Windows 95, but not very fast. :) Using the Amiga MMU would have made it much faster, but more limited on which systems could run it.

JIT recompiling should improve the speed in many cases, but then you are taking code buffer space out of the limited RAM available. If you keep careful track of code buffers, you might be able to get away with it.

I don't think sound will slow down the emulation. The IOP can easily handle a SoundBlaster 16 AWE64 or Crystal WSS codec emulation. Emulating an Audigy would be a little too ambitious. :)

If you have the DDK from MS, it comes with a complete example DirectX 8 driver for video. It shouldn't be too much trouble to change it from the card used in the example (a Permedia 3 IIRC) to the PS2 video. Given the memory limitations and lower speed of the emulated CPU, DX8 is not bad at all. Don't expect to run HL2 or DOOM3 on a PS2 PC emu. :D
Phoenixconsole
Posts: 17
Joined: Sat Nov 06, 2004 12:11 am

Post by Phoenixconsole »

If i understand you right it is possible to make a windriver for PS2Gpu. But im not proved in DirectX, the only API i ever tried was OpenGL and this under Linux for a never released Gamingsystem.
Phoenixconsole
Posts: 17
Joined: Sat Nov 06, 2004 12:11 am

Post by Phoenixconsole »

Did you heard about the Vodoo2patch for Doom? It looks bad but it runs on a 1GHz with Vodoo2 12MB with ~30fps. ; ) Perhaps it will start with another patch. hmm no!! or.....? No!
mrbrown
Site Admin
Posts: 1537
Joined: Sat Jan 17, 2004 11:24 am

Post by mrbrown »

For Heaven's sake. Moved to Off-Topic.
"He was warned..."
J.F.
Posts: 2906
Joined: Sun Feb 22, 2004 11:41 am

Post by J.F. »

Phoenixconsole wrote:If i understand you right it is possible to make a windriver for PS2Gpu. But im not proved in DirectX, the only API i ever tried was OpenGL and this under Linux for a never released Gamingsystem.
Yes, drivers for Windows could be made that used the hw in the PS2 for accelerating the video. MS discourages OpenGL programming because they want people to use their proprietary DirectX. There are a few OpenGL wrappers for Windows that call DirectX for people with video cards that don't include an OpenGL driver. Something like that would probably work for the emulation, or maybe a version of Mesa.

Another idea would be to make the emulation simulate a 3D card like the Virge or Voodoo or Permedia cards via the GS. Then you could use the Virge or Voodoo or Permedia drivers already in Windows. You could also run old DOS 3D games that used direct access to the hardware of those older cards. That is probably what I'd do initially as those three cards have public documentation.

I saw the DOOM3 patch to run on two Voodoo 2 cards hooked up in an SLI configuration, so it had a total of 24M (12M / card). It's actually not that bad when you compare it to the older FPS games like Quake or Quake 2. I'd love to see a patch that allowed DOOM3 to run on all older video cards just to see how they perform.
Phoenixconsole
Posts: 17
Joined: Sat Nov 06, 2004 12:11 am

Post by Phoenixconsole »

This old 3D chips are`nt powerless and so i think a emulation of these is nerly impossible to do. Can is ask you something? If yes goto 10

10 Print "Are you proved in ps2 development?"
J.F.
Posts: 2906
Joined: Sun Feb 22, 2004 11:41 am

Post by J.F. »

I'm a veritable newbie on the PS2. I've only just been trying to get familiar with PS2 programming by recompiling the various demos and tools to get an idea of how everything works. However, I'm no stranger to programming, ESPECIALLY emulations. I wrote ACE, EMPLANT MACII, e586, FUSION, PCx, and FUSION PC (among other things). So I have a fairly good idea of how PCs and Macs and Amigas work. ;)
Post Reply