Emuforums.com

Go Back   Emuforums.com > PS2 Emulation > Misc PS2 Discussion
About Us Register FAQ Members List Calendar Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old November 24th, 2003   #41 (permalink)
Ar-digital Intelligence
 
psycho_cyclone's Avatar
 
Join Date: Nov 2003
Location: PC heaven
Posts: 53
Re: where should I start writing a PS2 emu?

you were right, i just coded some more stuff, and i realized that i had been too optimistic. but i'm dying here with the FFX disk in my hands while i can't play it...
ector was also right, i haven't got a chance. i was just wondering if i can do something my own way, but i realized that even if i do manage to write an emu, i'll have to copy down 90% of the code from PCSX2 source, so actually i haven't done anything myself.
but i still want to know if i'm a good coder or not, so i'll give it shot with chip8 as ector advised.
but one thing that truly disappoints me is that i bought a DVD-ROM only and only for the hope of PS2 emulation, and now it's useless.
i guess all that i can do is to pray for the real coders' success. thanx for your advice anyway.
__________________

My system:
[Motherboard:] Gigabyte 8IPE1000Pro-G (Intel 865PE chipset)
[Processor:] Intel Pentium 4 2.80E (FSB800, 1MB cache, HyperThreading support)
[RAM:] 512MB DDR400
[Video card:] nVidia GeForce FX 5900 Ultra 256MB DDR (ASUS V9950 Ultra)
[Hard drive:] 80GB Seagate Barracuda 7200.7
psycho_cyclone is offline   Reply With Quote
Old November 24th, 2003   #42 (permalink)
B( o Y o )BS!
 
GiGaHeRz's Avatar
 
Join Date: Feb 2002
Location: Spain
Posts: 883
Re: where should I start writing a PS2 emu?

you don't need to programa n emu to be a good coder...
emu writers are more than good coders... they are programming gods, like the OS programmers xD
__________________
"There's only one absolute truth in our world: shït happens." - Gigaherz (whoever decided "s-h-i-t" is a obscene word needs to grow up a few years)

The Book and other stories:
Tears of Fantasy - An Online Book... by ME!
MetaLife, Inc. (intro)
SubGaea (intro)
Crow Blade (intro for now)
Memories - Prayer from the fallen hearts.

My weblog... not like if there was too much to read on it tho.
For anyone interested, there's a mirc script which converts "/me 's" into " * nickname's whatever" and adds a nice "/my" command.
GiGaHeRz is offline   Reply With Quote
Old November 24th, 2003   #43 (permalink)
Ar-digital Intelligence
 
psycho_cyclone's Avatar
 
Join Date: Nov 2003
Location: PC heaven
Posts: 53
Re: where should I start writing a PS2 emu?

i just decided to write a NES emulator and see how quick i can do it, and i'm not gonna check on any source code, just information. i can't just sit back here doing nothing, maybe coding a simple emulator might help me understand the concepts of emulation.
__________________

My system:
[Motherboard:] Gigabyte 8IPE1000Pro-G (Intel 865PE chipset)
[Processor:] Intel Pentium 4 2.80E (FSB800, 1MB cache, HyperThreading support)
[RAM:] 512MB DDR400
[Video card:] nVidia GeForce FX 5900 Ultra 256MB DDR (ASUS V9950 Ultra)
[Hard drive:] 80GB Seagate Barracuda 7200.7
psycho_cyclone is offline   Reply With Quote
Old November 24th, 2003   #44 (permalink)
Ar-digital Intelligence
 
psycho_cyclone's Avatar
 
Join Date: Nov 2003
Location: PC heaven
Posts: 53
Re: where should I start writing a PS2 emu?

BYTHEWAY,
i did manage to run the BIOS with PCSX2 but i noticed that it's way too slow, i was just wondering,
isn't it possible to switch to a compiler instead of interpreter?
i mean, at least you can cut some slow parts by creating a, say, C++ file that straightly calls the necessary functions. i was only wondering if this can be done...
__________________

My system:
[Motherboard:] Gigabyte 8IPE1000Pro-G (Intel 865PE chipset)
[Processor:] Intel Pentium 4 2.80E (FSB800, 1MB cache, HyperThreading support)
[RAM:] 512MB DDR400
[Video card:] nVidia GeForce FX 5900 Ultra 256MB DDR (ASUS V9950 Ultra)
[Hard drive:] 80GB Seagate Barracuda 7200.7
psycho_cyclone is offline   Reply With Quote
Old November 24th, 2003   #45 (permalink)
B( o Y o )BS!
 
GiGaHeRz's Avatar
 
Join Date: Feb 2002
Location: Spain
Posts: 883
Re: where should I start writing a PS2 emu?

1: there is an EDIT button so dont double-post.

2: the NES is a complex console, the CPU may be somewhat simple, but each cartridge has it's own mapper, so you will have to program hm... 1000 mappers? I don't actually know

EDIT: 3: If you disable the interpreter in the CPU config, you are using a Dynamic Recompiler (DYNAREC).

EDIT 2: 4: The ps2 can't be HLE'd because most games use their own "modules", because the libraries that sony made were crap.

EDIT 3: if you wanna make a simple emulator, then why don't you try to code some other simple machine? like the c64 (I have heard that it's a simple computer).
__________________
"There's only one absolute truth in our world: shït happens." - Gigaherz (whoever decided "s-h-i-t" is a obscene word needs to grow up a few years)

The Book and other stories:
Tears of Fantasy - An Online Book... by ME!
MetaLife, Inc. (intro)
SubGaea (intro)
Crow Blade (intro for now)
Memories - Prayer from the fallen hearts.

My weblog... not like if there was too much to read on it tho.
For anyone interested, there's a mirc script which converts "/me 's" into " * nickname's whatever" and adds a nice "/my" command.

Last edited by GiGaHeRz; November 24th, 2003 at 23:52.
GiGaHeRz is offline   Reply With Quote
Old November 25th, 2003   #46 (permalink)
Emu author
 
Join Date: May 2003
Posts: 271
Re: where should I start writing a PS2 emu?

Just like the NES the C64 is also a very complex beast..



From my knowledge, the easiest consoles/machines are:

Chip8, ZX Spectrum, Phoenix (arcade machine), probably some more old computers/arcades.

Standard B&W gameboy isn't extremely complex either but it's not trivial.
ector is offline   Reply With Quote
Old November 27th, 2003   #47 (permalink)
Emu author
 
Join Date: Apr 2001
Location: Bloomington IN, USA
Posts: 1,061
Re: where should I start writing a PS2 emu?

Quote:
Originally Posted by psycho_cyclone
BYTHEWAY,
i did manage to run the BIOS with PCSX2 but i noticed that it's way too slow, i was just wondering,
isn't it possible to switch to a compiler instead of interpreter?
i mean, at least you can cut some slow parts by creating a, say, C++ file that straightly calls the necessary functions. i was only wondering if this can be done...
I've never seen that kind of dynamic source generation/compilation done... while it might give you slight optimization advantage it'd be incredibly slow to compile and slow to translate to C for that matter (C++? Are you crazy?)

Most emulators of this level use dynamic recompilation. Technically it's more like dynamic binary translation, but some consider it compilation because it usually involves SOME very basic optimization (reg caching, const caching, flag look ahead optimizations, branch prediction.. etc). In a dynarec blocks of the host CPU's binary instructions are analyzed and converted to blocks of native x86 code which are then executed. In it's most raw form it's pretty straightforward, however x86 emitters still must be written, and then you realize several things that need to be taken care of (memory protection, memory mapped I/O, self modifying code) which screw the complexity/compile time speed/compiled code efficiency terribly. And yet it's still a necessary and complex beast that must be tackled to really get anywhere with something like PS2...

But even with the best dynarec in the world, I doubt most PS2 games will play that well on even top of the line hardware right now. Especially not FFX. Emulation just has a ton of overhead.

An NES emulator isn't necessarily a bad idea, but like others have said you shouldn't take it lightly. At least with NES you won't have to worry as much about optimization and you can start with a few simple games that don't require mappers. And you should definitely look at other people's source and documentation. This is how you learn. You're never going to do something like this on your own.

Right now it seems that you're dying to prove yourself as a programmer. If that's how you feel then emulation probably isn't what you should be looking for. Emulation is usually about working together with other people and involves a lot of trial and error and raw effort, often with little gains in the end. Usually only those that make the best emulators get any real recognition, but it doesn't really matter, because I don't think any emu authors in it for that.

GiGaHeRz, BIOS can be HLE'd with a decent level of success (as is being done.. at least to some extent right now). That's actually pretty substantial.
Exophase is offline   Reply With Quote
Old November 28th, 2003   #48 (permalink)
Ar-digital Intelligence
 
psycho_cyclone's Avatar
 
Join Date: Nov 2003
Location: PC heaven
Posts: 53
Re: where should I start writing a PS2 emu?

I've started coding a simple emu just to emulate the PS2 Emotion Engine, and i use the TX79 instruction manual, but one thing that worries me is that, how similar IS this TX79 to the EE? i've heard that they're 95% similar, is it true?
i searched everywhere for a R5900 manual, but i couldn't find any, does that TX79 manual really suffice?
__________________

My system:
[Motherboard:] Gigabyte 8IPE1000Pro-G (Intel 865PE chipset)
[Processor:] Intel Pentium 4 2.80E (FSB800, 1MB cache, HyperThreading support)
[RAM:] 512MB DDR400
[Video card:] nVidia GeForce FX 5900 Ultra 256MB DDR (ASUS V9950 Ultra)
[Hard drive:] 80GB Seagate Barracuda 7200.7
psycho_cyclone is offline   Reply With Quote
Old November 28th, 2003   #49 (permalink)
Emu author
 
zenogais's Avatar
 
Join Date: Aug 2003
Location: Victorville(Near Los Angeles or LA for those who are on the DL)
Posts: 839
Re: where should I start writing a PS2 emu?

Quote:
Originally Posted by psycho_cyclone
I've started coding a simple emu just to emulate the PS2 Emotion Engine, and i use the TX79 instruction manual, but one thing that worries me is that, how similar IS this TX79 to the EE? i've heard that they're 95% similar, is it true?
i searched everywhere for a R5900 manual, but i couldn't find any, does that TX79 manual really suffice?
You seem to be changing your mind alot. I still think that the Emotion Engine is waaay too complex for a first-time emu author. Just stick with the NES emulator, its relatively simple and its a great project to start on because you can learn as you go and theres more documentation and source code on the internet than you'll ever need. Playstation2 is the wrong place to start, prove to yourself and if you want us that you can emulate anything first. Then move on to a more complex project, you'll be very glad that you started simple. Also I'm hoping that you know something about assembly language because it will make emulating anything much much easier. I read an entire book on assembly language after I had started my first emu and it was moving very fast, it made the project go so much faster, it was unbelievable(My first emu was a simple SNES emulator). We're all trying to help you, but please take our advice. Start small, its worked well for alot of other people.
__________________
-----------------
Emu Tinkerer and C++ Programmer
zenogais is offline   Reply With Quote
Old November 28th, 2003   #50 (permalink)
Emu author
 
Join Date: Apr 2001
Location: Bloomington IN, USA
Posts: 1,061
Re: where should I start writing a PS2 emu?

Quote:
Originally Posted by psycho_cyclone
I've started coding a simple emu just to emulate the PS2 Emotion Engine, and i use the TX79 instruction manual, but one thing that worries me is that, how similar IS this TX79 to the EE? i've heard that they're 95% similar, is it true?
i searched everywhere for a R5900 manual, but i couldn't find any, does that TX79 manual really suffice?
It has an R5900 with MMI, looks close enough for you... :P

TX79 doesn't have vector units of course.

- Exo
Exophase is offline   Reply With Quote
Old November 28th, 2003   #51 (permalink)
Ar-digital Intelligence
 
psycho_cyclone's Avatar
 
Join Date: Nov 2003
Location: PC heaven
Posts: 53
i know, i know it's too complicated, but i didn't say i'm gonna write a working PS2 emulator, i just loooove trying to code that beautiful instruction set, deal with registers and stuff! it's just so exciting for me, i can't resist! i'm just trying to code the full instruction set in my own way, and who knows? maybe i manage to do something more... i know it's way too optimistic, but i'm doing it for fun.
anyway, thanx for your advice fellas. hope we soon get to play those nasty PS2 games on our beloved PCs.
__________________

My system:
[Motherboard:] Gigabyte 8IPE1000Pro-G (Intel 865PE chipset)
[Processor:] Intel Pentium 4 2.80E (FSB800, 1MB cache, HyperThreading support)
[RAM:] 512MB DDR400
[Video card:] nVidia GeForce FX 5900 Ultra 256MB DDR (ASUS V9950 Ultra)
[Hard drive:] 80GB Seagate Barracuda 7200.7
psycho_cyclone is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT. The time now is 21:06.

© 2006 - 2008 Emu Forums | About Emu Forums | Legal | A member of the Crowdgather Forum Community


Powered by vBulletin® Version 3.7.0 Release Candidate 3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0 RC5