What's new

Beggining emulation

rockytrh

New member
I have learned Visual C++ and am pretty good with it, however, i have only learned oop with c++, thus i don't know C. I have used emulators for a long time now and would like to start writing them.

Is there a guide to help people like me, who know oop c++, but not C, to get started in writing emulators? I know that i am supposed to start with chip8 (which is fine) but is there any chip8 emulators that are written in oop c++ that have the source to look at?

Thanks,

Rocky

I'd like to edit because i just realized that i spelled beginning with 2 g's and 1 n for the topic. God, i'm an idiot.
Please don't take that as incompetency
 
Last edited:

bcrew1375

New member
I can't find any tutorials specifically on OOP emulator programming, but if you know OOP C++, you should already know C++, right? If zenogais is around, he might be able to help you, I think he uses OOP.
 
OP
R

rockytrh

New member
yeah, i know C++, but i only know the object oreintated approch (my spelling is horrible). I dont know how to program in C, which isn't object orientated.

I guess the better question would be is it possible to program a chip8 with mfc?

See the problem i have with having to learn c is that it is becoming obolete. Especially when .Net 2.0 is out. I dont know, is it worth my time to learn C, or is emulation possible with stricly object programming?
 

ShizZy

Emulator Developer
Well, whether your in C, or OOP C++, the functionality of the emulator itself is exactly the same. And if you know OOP, then you know C++ without OOP, because OOP isn't a language in its own. And MFC really has nothing to do with it either, thats pretty much just for you user interface. MFC is really ugly, for something as simple as an emu gui all you need is some basic win32 calls. I suggest you do a little more reading on some basic C stuff, bit shifting/operations, etc - it sounds like you have a very washy knowledge of programming.
 

Doomulation

?????????????????????????
C++ is just an extension of C, so if you know C++, you know C, basically. You don't need to code in C to make an emulator - C++ will do just fine and I do disagree MFC may be bloated, but it makes life easier for ANY gui. Win32 is really messy and annoying.
 
OP
R

rockytrh

New member
ok, thanks all

edited to add this:
i do know about bit shifting and such (using << and >> to shift, as well as deviding/multiplying by 2)
I am fairly familiar with bitwise operations (& | !) because i am kindof in the middle of learning some assembly to get a head up on the 'competition' at UND next fall.

Again, thanks. I think i am going to by Programming Windows (5th edition) to learn how to program in windows without using classes.
 
Last edited:

zenogais

New member
rockytrh: C++ is a perfectly suitable language for programming an emulator in - my Chip8 emulator was created in C++ using OOP. Granted, I think I could probably create a much neater code base now. As for programming windows, MFC is not the only object-oriented windows library, Microsoft also created the WTL which is much, much nicer and less bloated than MFC (there's also win32gui which is much faster and lighter than MFC or WTL for application development, but it's also lacking in documentation and uses some fairly advanced OOP concepts that may only confuse you).

There's no need to give up OOP when developing an emulator, and if you need any help just PM me or get an IRC client and hang out in #emudev on EFNet.
 

Top