PDA

View Full Version : Borland C++ Builder vs. Micro$oft Visual C++



nephalim
May 30th, 2003, 04:51
What's your preference?

What's better for making an emulator?

God I hate M$...i'd rather use straight assembly I think :geek:

Is using assembly in an emulator inevitable? What's a good way to learn it?

NeTo
May 30th, 2003, 04:57
I can't just stop using Visual Basic. I'm cursed!!!

Eagle
May 30th, 2003, 06:06
I have to say g++

Slougi
May 30th, 2003, 06:42
I have to say jed + g++ :linux:

nephalim
May 30th, 2003, 07:08
g++? I've never heard of it, can someone give me the basic details? I'll see if i'm allowed to add it to the poll.

Update: I can't edit the poll. Everyone who voted "something else" is voting for g++, so far, so if a mod can fix that, it'd be appreciated.

Slougi
May 30th, 2003, 08:39
g++ is the gnu c++ compiler. It does not include an IDE though. You can take a look at http://gcc.gnu.org for more info.

ScottJC
May 30th, 2003, 10:57
I use delphi;

Mainly because its a bit like Visualbasic but it is faster and the exe's can run without runtimes, oh and its gui stuff is way better too...

also like pascal:)

no idea how good it is for emulation though, i know that one of the best nes emus was programmed in it...

tooie
May 30th, 2003, 11:14
I do not know how good the Microsoft Visual C compiler is .. I know there are plenty of issues .. especially with C++, but I have not seen a better debugger .. it is excellent, I use it all the time at work with bug hunting ..

SculleatR
May 30th, 2003, 11:18
I use Borland C++Builder;
Uses C/C++, is fast and you don't need runtime librarys.

Sayargh: Don't you know? Nemu was written until v0.7A
in Delphi. :)

Hacktarux
May 30th, 2003, 11:43
Originally posted by SculleatR
I use Borland C++Builder;
Uses C/C++, is fast and you don't need runtime librarys.

Sayargh: Don't you know? Nemu was written until v0.7A
in Delphi. :)

Huh, bc++ builder may have many qualities but it's not fast. In all major compilers, it builds by far the slower binaries.
Then vc.net and gcc 3.2 are almost equals in speed (gcc 3.2 is far more standard compliant). Finally icc (intel c++ compiler) is the faster compiler but it only works for x86. This compiler is able to produce simd code automatically when it's needed...

The fact that nemu's gui was written in delphi is irevelant because the core is a dynarec and the goal of a dynarec is to produce asm code. Maybe 95% of the time is spent in asm code produced by nemu, you can't really take this as an example to show how good is a compiler.

SculleatR
May 30th, 2003, 12:08
Originally posted by Hacktarux
Huh, bc++ builder may have many qualities but it's not fast. In all major compilers, it builds by far the slower binaries.
Then vc.net and gcc 3.2 are almost equals in speed (gcc 3.2 is far more standard compliant). Finally icc (intel c++ compiler) is the faster compiler but it only works for x86. This compiler is able to produce simd code automatically when it's needed...

The fact that nemu's gui was written in delphi is irevelant because the core is a dynarec and the goal of a dynarec is to produce asm code. Maybe 95% of the time is spent in asm code produced by nemu, you can't really take this as an example to show how good is a compiler.

Are you sure? behinds to version... BCB6 is very fast. Maybe
I will port a N64 emu to BCB and test its speed if you say its
that slow. :). When I have some time. :)

We will see. ;)

icepir8
May 30th, 2003, 12:43
Originally posted by nephalim
g++? I've never heard of it, can someone give me the basic details? I'll see if i'm allowed to add it to the poll.

Update: I can't edit the poll. Everyone who voted "something else" is voting for g++, so far, so if a mod can fix that, it'd be appreciated.

Done. :D

SculleatR
May 30th, 2003, 13:58
Hacktarux: There is no need to port it... I tested already it
with some emulators wich are written in bcb. Also,
already bcb4 had more features than msvc++6.
And bcb's speed is already equal to msvc++ in
execution. (readed this at borland homepage).
Afaik Microsoft used their best programmers to
develop. vc++.

Hacktarux
May 30th, 2003, 14:01
Originally posted by SculleatR
Hacktarux: There is no need to port it... I tested already it
with some emulators wich are written in bcb. Also,
already bcb4 had more features than msvc++6.
And bcb's speed is already equal to msvc++ in
execution. (readed this at borland homepage).

lol :D

SculleatR
May 30th, 2003, 14:07
g++ is freeware, right?
also I even don't think a freeware compiler is faster than a
2000-3000 compiler. :D

Hacktarux
May 30th, 2003, 14:58
SculleatR,

firstly, you can't believe what companies are saying about their products... What would you think about a company saying: our compiler is crap, it's slow, outdated but if you still want to use it, it costs 3000 thx

As for the free compiler argument, it only prove your lack of informations... BCB++ was fast a few years ago but now, it's very outdated. On the other hand it's still very fast to compile a binary. For example you can compile something in 5 seconds while you need more than one minute in all the others compilers. The drawback is that the compiled binary will be far slower. But for companies it can still be good to be able to compile things fast (anyone who has already compiled kde on linux would agree that it's surely easier to program such big software if you have a fast compiler : even if the result has poor performances, it's still cool to test things quickly). Borland has played much on these numbers in the past to hide the poor performances of their compiler.

Now why gcc (or g++ it's the same thing) can be so good and still being free ? For many reasons. Firstly, it has always been updated regularly since many years. Secondly, it's supported by hardware and software companies. For example a company develop a new processor or develop hardware that use a specific processor. They want to have a compiler for their hardware that doesn't cost too much. Rather than creating a new one from scratch, they take gcc and they add the new things they need. Gcc license require them to give their changes back to the community. That's how gcc evolve. Then companies oftenly give money to support devloppement of these compilers because they are interested in the performances of this compiler. One of the best example is AMD. They are supporting gcc because they want to have x86-64 support in it. And they are also giving money to gcc main team to support them, because they also need non processor specifics optimizations to be improved.

SculleatR
May 30th, 2003, 15:07
Surely every company shows only positive things about their
products :). And IF bcb is slower, I don't care, because its
speed is very fast though :saint:. One question, is g++ only
for linux avaible?

SculleatR
May 30th, 2003, 17:24
Erm.... We went to another topic :doh: . Nephalim
was asking wich Compiler/IDE is the best to code an emu.

Nephalim:

-Windows:If you program in c/c++ I'd use bcb. And making your gui is also easy & fast.

-For Linux you could use g++ (i don't know how it is, but so far
everyone says its good) or Kylix3 (wich supports c++ too).

ps: I see no point using visual c++. ;)

nephalim
May 30th, 2003, 18:18
The problem I see with using Gnu C++ is how the hell do you make windows based programs? It's not worth the frustration to build them by hand, even if you are using libraries, IMO.

blight
May 30th, 2003, 18:23
Originally posted by SculleatR
Surely every company shows only positive things about their
products :). And IF bcb is slower, I don't care, because its
speed is very fast though :saint:. One question, is g++ only
for linux avaible?

i think you can compile gcc for any posix compatible OS (and for windows using cygwin i guess)... you can also use it as a cross-compiler... it supports many target platforms... like AVR micro controllers, MIPS (N64), x86, ppc, ......

btw: gideon/kdevelop-3 is a nice IDE for linux IMO

Hacktarux
May 30th, 2003, 18:40
Originally posted by nephalim
The problem I see with using Gnu C++ is how the hell do you make windows based programs? It's not worth the frustration to build them by hand, even if you are using libraries, IMO.

It depends... Are u planning to write you program using the specific libraries provided by the compiler ? For example if you use vc++, will you use MFC and make your binary mfc dll dependant ? If the answer is no, gcc won't change much to your problem because vc++ is only writing the ressource file, then you'll have to write the code around. you can even use lcc to write your ressource files automatically...

Anyway before thinking about the gui, you need to have a working core. To achieve this you may need a few full rewrite of your code so i think you should focus on learning how to program the core of your emulator. Once it'll be done, i think you'll know enough to write a gui easily :)

Oh and to answer your initial question about asm, imo, using asm in an emulator isn't required at all unless you write a dynarec:
- if you're emulating an old system, your emulator is fast enough, asm is useless..
- if you're emulating a new system, your emulator is too slow and it'll still be if you make some asm optimizations here and there. Only solution is to write a dynarec which involve obviously writing asm code.

Cyberman
June 1st, 2003, 01:40
Ok a few things I've posted this a few times but I think people don't listen.

Cygwin
MingW
DevC++

All work for the Windows OS these are the windows GCC libraries and compilors.

GCC compiles for a number of platforms and processors, in fact all new processors use this to get an initial compilor working for it.
In fact the only part you need to change on the compilor are two parts they are the back end.

You also need to port GAS to the processor but that's not terribly difficult.

One is the processor model assertion this can take a lot of work to do but compile it and you can get your backend assembly code generated in no time. The optimizer requires assembly level optimization pairs be used and this is optional.

GCC is provides more stable and better code than most other compilors, since much of the optimization is done by contributers if they only do 'enough' for there needs, it's not all too likely others will continue there work (though it's possible such as ARM and PPC and X86).

The real difference is librarys.. whats included with BCB and VC++ are lots of library material that doesn't require you to write wrappers for DLL functions or loading DLL's etc. So.. that is really the difference.

Cyb

nephalim
June 1st, 2003, 01:49
Originally posted by Cyberman
The real difference is librarys.. whats included with BCB and VC++ are lots of library material that doesn't require you to write wrappers for DLL functions or loading DLL's etc. So.. that is really the difference.

Interface too! A sort of "spell check" for programming is awesome, makes life much easier :satisfied

The making of a GUI for windows is much easier in either of those programs also, in fact in most cases actual programming isn't even necessary! :)

ingonab
June 1st, 2003, 07:13
Which IDE has the best visual tool for hacking up standard GUIs very quicky? I use VC++ 6 for all my Windows programming but its GUI hacking tools feels dated and poor. :(

In terms of a GUI creation WYSIWIG, the nicest I've tried so far is Apple's InterfaceBuilder that comes with Mac OS X. (It has snap-to guiding lines that pop up whenever you're placing/moving a control to ensure that it's correctly spaced from, and aligned with, other controls and the window borders. --Which means I get professional looking UIs without having to muck about with spacing controls.) :sleeping: Unfortunately, it's not Mac OS X I want to develop for. :down:

Slougi
June 1st, 2003, 08:09
One problem with the Windows GUI builders is that the results you get usually resize very very poorly. Compare that to some GTK stuff built with Glade or something similar, which resizes in a much nicer fashion.

Malcolm
June 1st, 2003, 12:45
err...


School: VC++
Home:
....Linux: Anjuta IDE + GCC
....Windows: VC++ or DevCpp depending on what I'm doing


My comments stop here





















no wait, here

new_profile
June 1st, 2003, 12:55
Originally posted by Slougi
One problem with the Windows GUI builders is that the results you get usually resize very very poorly. Compare that to some GTK stuff built with Glade or something similar, which resizes in a much nicer fashion.

I think that there is a port of the Gimp toolkit to windows.
Why not using Qt from TrollTech ? It provide a really good GUI designer.

Slougi
June 1st, 2003, 19:53
Originally posted by new_profile
I think that there is a port of the Gimp toolkit to windows.
Why not using Qt from TrollTech ? It provide a really good GUI designer.
The main problem with QT is that it is free only on Linux. And yes, GTK is ported to windows, but all it's tools are *nix only :)

Hacktarux
June 1st, 2003, 20:06
afaik glade is available for windows

David_Hayter
June 3rd, 2003, 22:01
If ya wanna make an easy gui in a quick-easy-not-optimized way, then delphi or basic is the way to go, for somthin else like pro games and real stuff, then visual studio is just the best round, and most ppl hate it because "micro**** sucks,bla,bla,bla" and ya know how it is
:D

SculleatR
June 4th, 2003, 23:30
I Compared Visual C++ and BCB TODAY...

I Really saw Visual C++ IS Better than BCB in important
parts.... like code editor, optimizations etc...
When BCB's binaries use speed optimizations they are equal
in speed with VC++'s binaries without speed optimizations.

= BCB's binaries are slower.

I think I switch to VC++.
Hack: You are right :blush:

Maybe I get Visual Studio .NET 2003 Enterprise Architect. :D

Xeven
June 9th, 2003, 05:21
Regarding the question, i would recommend VC++ against Borland. The IDE and debugger in VC++ is excellent and Borland is generally outdated. Just make a note that its sometimes wise to avoid compiler specific constructs and stick with ANSI. The fastest compiler i've found so far is Intel C++, the only problem with it is that its x86 specific. If you're hellbent on making your emu "portable" g++ would be really good for you but is probably not a requirement. You can just as easily write your emu in portable code with the gui written in an uportable one. Yes like MFC, which a lot of people dont really like, but i use generally because im lazy. :happy: And as a last note, no matter what compiler you choose or whatever development environment you buy, dont expect them to do everything for you. Nothing beats human intuition.