Next Generation Emulation banner
1 - 20 of 72 Posts

·
Premium Member
Joined
·
17,148 Posts
Discussion Starter · #4 ·
you sir have a lot of time on your hands... mind throwing some my way so I can finish my GB emu? XD
I´ve been toying around with the source since a while silently(and Dolphin if you check the first pic). one of the biggest challenges is the constant change of the source but that´s not a bit issue actually... in fact i just like to toy a bit with it XD.

btw i didn´t knew you´re working on a GB emu oO
 

·
Premium Member
Joined
·
8,201 Posts
yeah well i havent touched it in 3 weeks now. I think I wont have a choice to port it over to C# because it's running way too slow right now.

Do you plan on putting the source up on sourceforge or googlecode? My be tempted to take a look and contribute if I can :p
 

·
Premium Member
Joined
·
17,148 Posts
Discussion Starter · #6 · (Edited)
yeah well i havent touched it in 3 weeks now. I think I wont have a choice to port it over to C# because it's running way too slow right now.

Do you plan on putting the source up on sourceforge or googlecode? My be tempted to take a look and contribute if I can :p
well actually i´ve been porting lots of code to C# lately.. since am planning to add internal emulation to @ES am toying around with emulators source and planning some big stuff for it while learning from each source i touch. at the end i will always do things my way as i´ve found several places where things can be optimized or changed but that´s just a taste and time thing :thumb:

am not the coder that like to release codes and so but maybe i could change my mind and post my C# source somewhere on google or other place don´t know.. in that way people with C# knowledge can learn from it and not just break there minds trying to figure out how C++ works :p. i´ll try to complete some stuff then let´s see ;)

about C# and C++ speeds.. well C# is indeed slightly slower but not as slow as people probably think... the battle of C# and C++ reminds me the GPU battle where one is slightly faster than other and sometimes we´re talking about just 3-6 fps which to me doesn´t make a big difference.. anyways am confident that a well coded emu will always deliver great results.
 

·
Premium Member
Joined
·
17,148 Posts
Discussion Starter · #11 · (Edited)
We'll see how a recompiler to MSIL can compete with one going to x86, that is, if you get that far of course. I don't think you'd be able to generate code that's equivalent to PCSX2's VTLB.
first of all i do not posted the shots here telling am going to port PCSX2 to C# or something like that.. i clearly sayd am toying around with the code which is something i love to do. second putting doubts about others is one thing but talking without base is a whole different story. as a C/C++ coder myself am tired of the retarded battle between C++ and C#. if i decide to code a PS2 emulator in C# i will use my own methods as C# has different functions and different stuff. so the PCSX2 code isn´t of much help for me when it comes to performance but it serves as a base.

i clearly stayed that C# is slightly slower but the question is...for how long??? other than C++, C# is beeing improved constantly over the time. C# 4.0 is almost here and i´ve even heard about 5.0 so let´s see what the future brings. as a experienced developer myself i don´t stop at sites and watch what other people with 0 knowledge talk about a language. other than that i try to figure out things by myself and one thing i´ve learned.... C# is by now means far behind C++. i´ve made two builds of my upcomming app and i can clearly show the difference between .net 3.5 and .net 3.5 sp1 where sp1 have been improved a lot and speeds are just awesome and in many cases even faster than some C++ methods as they need less stuff to do. in fact am not the kind of coder that is trying to copy others work(otherwise i wouldn´t have posted the pics here)... i learn from others and try to do it better. writing comments such as "I don't think you'd be able to generate code that's equivalent to PCSX2's VTLB" doesn´t bother me either because could you do it better with your own code even under C/C++??? so there you are.

if is speed what you want to see i have an example for you... few years ago i started to learn Visual Basic 6 for my previous job. as many people know VB6 is slow and indeed is slow. eventhough i don´t gave up and so i continued my wifes work which is now known as @ES. the old version of @ES is completely written in VB6.... many people will say "OMFG VB6 is so slow!! are you crazy?" well i don´t get bother by those comments as languages doesn´t make a coder but a coder makes an application. a mediocre coder will make mediocre apps. a good coder will create excellent apps and that´s a fact. @ES even beeing a VB6 application it kicks some C++ apps. i showed in the past that @ES is able to load 22GB of Audio full with coverflow and even ID3 in less than 5 secs.... but that´s not all loading 22GB and rendering covers using GDI+ which is also known as slow is a very hard task eventhough i was able to get insane speeds using VB6... speeds never seen on any C/C++ code to date... now haven´t i sayd VB6 is slow??? so why am getting insane speeds then? oh and i forgot to mention that the coverflow menu has a mirror effect which means extra rendering and it has a "on type" search mechanism which look for the right album while you type and everything is done instantly. so again languages are just tools.... if you don´t know how to use them you will fail but if you know how to use them well you will get stunning results.

now show me a C/C++ app that is able to load 22GB of Audio data with full ID3 tag on a simple listbox(taking in mind @ES renders a full coverflow menu and cover pics + mirror effect in that time) in less than 5 secs.

am not trying to attack you in any ways i just want to make some points clear because it is easy to talk about others work but first look at yours.

Wow somebody is actually making the emulator in my favorite programming language...C#!!!:D
Hey are you using Visual Studio C# 2005 or 2008?
am using Visual Studio 2008 as it has lots of improvements over 2005.

Looks interesting. :)

Let's see how performance goes, eh?
am far from completing/analyzing the code but at least it´s a beginning ;) i started to toy around with the source because i wanted to know where the CRC code of PCSX2 is comming from.. after that i just had fun porting the C++ code to C# which to my opinion shows already that i know both sides...
 

·
Level 9998
Joined
·
9,384 Posts
am far from completing/analyzing the code but at least it´s a beginning ;) i started to toy around with the source because i wanted to know where the CRC code of PCSX2 is comming from.. after that i just had fun porting the C++ code to C# which to my opinion shows already that i know both sides...
No, I understand. Sometimes people see you use only one language and they assume you know only that much. ;)

That aside, I'd die before I try to analyze something so complex as PCSX2. :dead: I'm only good at writing and not exactly at editing.
 

·
Registered
Joined
·
8 Posts
You might like to know that Decode_XA.cpp is an obsolete and unused piece of code in Pcsx2. You can delete it. (noting this since you posted a screenshot of it -- tho I assume that already means you spent time porting it -- sorry).
 

·
Emu author
Joined
·
1,488 Posts
Yes, pardon me for seeing screenshots that list a directory titled "PCSX2 C#" along with basically no description of what you're actually doing and taking that to mean that you're porting PCSX2 to C#.

@ruantec said:
after that i just had fun porting the C++ code to C#
Oh never mind, you go on to outright admit it.

Your big overblown response about how benchmark X or Y shows that OMG C# is almost as fast as C++ and is only getting faster shows that you have absolutely no idea what I'm talking about. This isn't about the quality of compiled code, this is about what you can and can't do with a recompiler. Bytecode for an intermediate language behind something like C# will be executed in an environment which is simply incapable of doing some of the things that you can do if you are generating machine code for the platform you're approaching. There are some pointer tricks in particular, like in the aforementioned VTLB, that you're not going to be able to reproduce. These things are vital to the performance of a recompiler and I don't think they're going to make just a "small difference."

Is your audio processing program a dynamic recompiler? No? Then I don't care about it. Although your example is hilarious, a VB6 app that processes a 22GB file in 5 seconds. I'd really love to see the sourcecode behind an application that can make your harddrive capable of loading at a rate of over 4GB a second. Wonderful.

I'd love to know just what you're getting at with that "but first look at yours" comment you made. Are you sure I'm the one who was making this personal?

You seem really defensive and desperate to prove yourself for some reason ("see I know C++ too!".. who was saying you didn't?)...
 

·
Emu Author
Joined
·
613 Posts
you CAN use pointers like c++ in c# as long as you dump the code into an unsafe block of code so the garbage collector knows to not touch it. not sure to what extent the pointer stuff goes sicn ei have not messed with it but i am sure its nearly just as good. c# lacks a little bit of the c++ pointer stuff due to being a bit more safe about it but does not mean it can not be done.

and yes in some areas c# is much faster than c++, i had made a test app for dax using the same method i use to render to my texture surface in C# for c++ and compared to now rendering a frame at 0 ms under c#, his was getting around 14-15 ms per frame, which is a big difference in speed.

just because c++ can access low level stuff easier does not mean its the fastest thing out there, it all depends on the coder who is writing the code. not that i claim c# is the fastest either i am just stating what i have seen myself.
 

·
Premium Member
Joined
·
17,148 Posts
Discussion Starter · #16 · (Edited)
Look as i sayd in my last post i wasn´t trying to attack you with my post but making some points clear. i have to admit i lost some of my control after reading your post. about your comment...... i know there are some challenges making a PS2 emulator in C# but have i sayd am going to make one??? and if that were the case i know its going to be a challenge and chanllenges is exactly what i love. C++ offers just too many possibilities and to me is not fun because i know it can be done.

the reason i posted the pics and made this thread was to show the people some of the posibilities and how much i´ve been having fun porting C++ code to C#. i don´t have to proof nor show anything as i don´t have to. i´ve showed several times my skills here and actually i don´t even want to be prised for that... all i do i do it for fun and that´s the way i am.

so you sayd it is hilarious to write a VB6 app that is able to load 25,8GB(on my computer) of Audio data information and display the full coverflow and mirror effect in less then 5 seconds??? i actually don´t like to do that kind of things but i think is time to do it... now check out the following video which shows @ES... yeah a VB6 app loading 25,8GB of audio information and rendering 439 covers full with mirror effects in less than 1 second:



Again i don´t want a language battle here... and i want to repeat i post the pics here for fun and i hope you can understand that.
 

·
Emu author
Joined
·
1,488 Posts
Hatorijr; Please spare me the continued examples of how someone did something in C# that was much faster than someone else's efforts in C++. Although I do find the numbers funny as usual, a renderer so fast that it takes no time to render something. Wonderful. ;P

I'm not even comparing C# to C++ (btw, I write emulators in C, not C++). What I'm comparing are MSIL and various machine languages. When writing a recompiler in C# writing to MSIL and having C# compile that to native machine code at runtime is the only feasible option. There are simple architecture specific things that you cannot express in MSIL and that the compiler will not be able to convert for you. I used VTLB as an example because it's dynamically casting a byte pointer to a function pointer based on what of its bits. This is the kind of architecture dependent thing that I really doubt compiled MSIL could ever be coaxed to do.

@ruantec; If you're not interested in making a PS2 emulator in C# then this thread strikes me as rather pointless... maybe posting these pics are fun for you, is anyone else having fun? I'm not having fun.

I can't view your video right now, but obviously you're not going to convince me that a program can load over 4GB of data per second. I think what you MEAN to say is that it's processing metadata for 23GB worth of files which couldn't be more different from what you're claiming, and also says very little about what you're actually accomplishing. I don't know, maybe this is just a language barrier problem but your claims are extremely misleading.
 

·
Premium Member
Joined
·
17,148 Posts
Discussion Starter · #18 · (Edited)
Hatorijr; Please spare me the continued examples of how someone did something in C# that was much faster than someone else's efforts in C++. Although I do find the numbers funny as usual, a renderer so fast that it takes no time to render something. Wonderful. ;P

I'm not even comparing C# to C++ (btw, I write emulators in C, not C++). What I'm comparing are MSIL and various machine languages. When writing a recompiler in C# writing to MSIL and having C# compile that to native machine code at runtime is the only feasible option. There are simple architecture specific things that you cannot express in MSIL and that the compiler will not be able to convert for you. I used VTLB as an example because it's dynamically casting a byte pointer to a function pointer based on what of its bits. This is the kind of architecture dependent thing that I really doubt compiled MSIL could ever be coaxed to do.

@ruantec; If you're not interested in making a PS2 emulator in C# then this thread strikes me as rather pointless... maybe posting these pics are fun for you, is anyone else having fun? I'm not having fun.

I can't view your video right now, but obviously you're not going to convince me that a program can load over 4GB of data per second. I think what you MEAN to say is that it's processing metadata for 23GB worth of files which couldn't be more different from what you're claiming, and also says very little about what you're actually accomplishing. I don't know, maybe this is just a language barrier problem but your claims are extremely misleading.
i think i better do not write more and more examples... if you think the way you go is right then just go your way.... as i sayd i wrote this thread to show some stuff for people and have fun... aren´t you having fun? well then is the wrong thread for you..

about the video and the metadata stuff.... i won´t comment on that... just try to watch the video as its going to show you that it can be done... i do not limit myself thinking something is impossible because what i show in the video can be classified as "Impossible" eventhough i show it can be done and that´s the way i am.

btw: with @ES i was trying to show you that there are always methods to gain speed even if the language you´re using has some disadvantages and not comparing @ES with PCSX2 and i know what´s required to build an emulator so i think am capable to know what is possible and what´s not... even if i don´t accept the word "Impossible to do" because i think that word just limits you in every way.
 

·
Banned
Joined
·
2,817 Posts
We'll see how a recompiler to MSIL can compete with one going to x86, that is, if you get that far of course. I don't think you'd be able to generate code that's equivalent to PCSX2's VTLB.
Pcsx2 and @es are two different programs. There's no point comparing each other. And @ruantec isn't writing a ps2 emulator using C# either.

What's your point ??

Btw, nice video @ruantec. It's 25gb/s or less, indeed. Geez...I just don't get why the **** people brought Pcsx2 into an @ES thread...
 

·
Emu Author
Joined
·
613 Posts
well here is proof that my emu renders a frame in 0 ms, i can send you a copy if you'd like as well. and i can even show you my timer loop that achieves this. do not flat out call someone a liar because you can't believe it.

if you want actual proof just let me know i will put the latest build up here to run and see for yourself how fast my emulator renders it's frames.

i pull the time at the start of each frame, than i run through all cycles of my cpu for that frame than i render the current frame to my texture and than i pull the time when that is finished and i calculate how many milliseconds it took.

also btw, both the c# and c++ methods I wrote myself, not someone else and i wrote them exactly the same.

btw, this is a solid 0 ms, it does not go above 0 at all while playing the game.
 
1 - 20 of 72 Posts
This is an older thread, you may not receive a response, and could be reviving an old thread. Please consider creating a new thread.
Top