Next Generation Emulation banner

Why only C++ for Emulators?

1719 Views 17 Replies 10 Participants Last post by  Shin_Gouki
Is it impossible to make an emulator using another language?

For example are any reasons(other than flexibility) for not using other languages like assembler, RPG, Fortran or Basic(Jaguar is a basic derivative?).

I like basic language since debugging is just following each line but then what do I know?


Thank you.


R. E. Burrows.
1 - 18 of 18 Posts
Because, other programming languages usually don't have as good as results. C/C++ is a much more flexible program to use IMO. Assembly mught be good, too. Take Zsnes for example, most of its code is in ASM, with this you can run something very fast on a very slow computer (i.e. 60fps on a 400MHz CPU). But the problem w/ASM is that some things can't get emulated properly on Zsnes, like the SPC700.
Not really.
As Windows is the common OS used in the world, C++ is generally recommanded.

If you have noticed, ePSXe was ported to the Linux as well.
Isn't assembly quite hard to program in or deal with?
Most of Zsnes is written in a assembly, it could be possible to do it for a PSX emulator too, but in fact writing Zsnes in assembly turned out to be a mistake since none wants to go back and change the assembly anymore now ( too much work :) ) :D , C/C++ is still the best language ( IMHO ) to write performance critical applications, atleast if they're too complicated to write in Fortran ( it's a limited language after all, even if it's faster than C/C++ )
I wanna see a fully emulated SNES, that way I can play Top Gear3000, I never got to play that game and always wanted to.
DemonSui said:
I wanna see a fully emulated SNES, that way I can play Top Gear3000, I never got to play that game and always wanted to.
ZSNES runs it flawless. at least from what i tested....

/me is learning C. ill try Chip8 when im done :)
maybe you should downlaod TG300 and try it. it didn't work for me or anyone else I talked to.
Slighty off topic, but someone asked :p
----
There are some games that doesn't run well on Zsnes,
Star Ocean &
Shin Megami Tensei

are examples.

However both of these runs great on SNES9X, did you try the latest version of that DemonSui?
----
I have the latest version of SNES9x but it didn't run TG3000, neither did Zsnes

also, the newest SNES9x is so buggy... it will not let me use a controler only the keyboard. every time I try it keeps configuring the same key...
DemonSui said:
maybe you should downlaod TG300 and try it. it didn't work for me or anyone else I talked to.
Or maybe not. It would be wise to leave such a suggestion out of future posts ;).
Thank you.

However no one mentioned anything about Basic?

I continue to wonder about why no one posted about basic.

I understand the positives listed for C++ but no one listed any negatives.

I now see that there are some negatives for using basic but what are the positives.

Thank you.
n_w95482 said:
Isn't assembly quite hard to program in or deal with?
Having programmed in 8 bit assemply long ago...Assembly isn't that hard...It just requires that you know individual registers for EVERY item you use in your program, -I.E., all the video registers, all the sound card registers, etc...
With assembly you actually place the values there versus C++ which will manage all that for you...It is much more involved, but if you know they system extremely well, you can actually do more with it. Although with todays hardware I personally wouldn't get back involved with it...I don't have that kind of time to invest...
Russell Burrows said:
Thank you.

However no one mentioned anything about Basic?

I continue to wonder about why no one posted about basic.

I understand the positives listed for C++ but no one listed any negatives.

I now see that there are some negatives for using basic but what are the positives.

Thank you.
There are no positives, Basic is much to slow to do anything intensively usefull.
Basic is the highest high level language and therefore the slowest...where as C++ and assembly are low level and therefore the fastest, other than programming in pure binaray which is NOT recomended...
If you want an emulator that has better sound than Zsnes, use SnesGT or SNEsE. (No offense intended for Zsnes users). If they would be willing to reprogram the code to C/C++, I'd fell much better and more inclined to using Zsnes. I heard that they are porting the code to C, but I'm not 100% sure.
ChankastRules said:
Slighty off topic, but someone asked :p
----
There are some games that doesn't run well on Zsnes,
Star Ocean &
Shin Megami Tensei

are examples.

However both of these runs great on SNES9X, did you try the latest version of that DemonSui?
----
Those specific games require special hardware addons that are emulated by default in Snes9x, but you need to download a patch for Zsnes.
the "thing" with the languages concerning emulators is...
um i think i guess because i can´t tell 100% so jusrt some pro/cons for languages:
  1. ASM:
    + IF well coded , GOOD speed
    - maintaining code gets hard when code "grows" ( for me it starts even when the code is longer then 6 pages..:)
    - plattform bound
  2. C:
    + Speed "still" good
    - Data types are very unflexible... string[]....
    - when it comes to a certain point .. u have to use pointers... IF u know how to deal with them and never forget one...(do not point into nirvana!!) its fine
    (i remember i had to code a double interlinked List... it was a pain in the ass ArrayList or Vectors are sooo nice ^^)
    - still plattform bound, to a certain degree interoperable
  3. Basic:
    dunno anything about that but when i look at Visual Basic from MS... i feel this .. need to throw up ^^
  4. C++:
    + fast if good coded
    + OOP , when u can take advantage of it and not only know the 3 chars u can gain A LOT of it
    + since C++ is "newer" then C or asm or pure basic it has also nice Data Types... etc..
    - u have to do GC Yourself :/ ( this CAN be plus or minus, dont have too ^^)
    - still plattform bound, to a certain degree interoperable
  5. Java:
    + OOP
    + Mighty FRamework Container Classes , extensions.. etc..
    - tends to be slow, it got better but i think VM is still not THAT fast as u would like to have it for an Emulator
    +ok VM is makin Java slow BUT what u gain is: Interoperability guessing every maschine u test ur code a VM is installed u can run ur code on EVERY single of these maschines without modifying ur code o_O!
  6. C#:
    almost samething as in Java although the JIT tends to be a bit faster
    and of course MS VM isonly available for MS Systems(Mono put aside)
so far my *blabla* concerning "WHAT LANGUAGE FOR EMULATORS???"
:)
wbr Shin Gouki
See less See more
1 - 18 of 18 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