making an emulator?

Touko White

I'm cute, aren't I?
I haven't got any programming experience outside of most of HTML4 and some of CSS1.

However, some time maybe, I would make an NES or Gameboy (monochrome) emulator, and would like to know what free programming language would be good for this? I'm also thinking of implementing a plugin system, like with N64 emulators, so my emulator would be more compatible with other computers, perhaps if one plugin didn't work, another would for example.

Also, what's the first thing I should write in besides the actual system things like mappers, memory and such?

-----------------

I know several good emulators are written in C, too. But I don't know if that's a good idea to make it a C based emulator... blarg

-----------------

Anything you want to ask goes below. If I can't start an emulator from scratch I'll probably fork an existing project on GitHub and continue the project as something new.
 

ulaoulao

Controller Man
Staff member
I haven't got any programming experience outside of most of HTML4 and some of CSS1.
That will not help so you basically have none.

what free programming language
they are all free?

would be good for this? I'm also thinking of implementing a plugin system, like with N64 emulators, so my emulator would be more compatible with other computers, perhaps if one plugin didn't work, another would for example.
This is going to require some pretty advanced understanding of how to develop an application.

I know several good emulators are written in C, too. But I don't know if that's a good idea to make it a C based emulator... blarg
The main reason for C is to get low level access to the system, c++ is also a very popular choice and would be better since %90 of all emulators are in c++.

FYI: If I didn't quote one of your questions, it's because it didn't make sense to me.

That said consider...

Programming rule 1#, plan. There is a lot more to crating an emulator then just coding...
HLE or LLE, you will need to know what this is and what approach you want to take, being you are interested in nes, LLE is fine here. Though a plug-in system is much better with HLE. Cycle redundant may be a stretch but its another approach.
Study ASM and basic machine architectures. The NES will have many mappers and it seems you are aware of that, it is not fun, nor is it coding. Its a lot of tediuse date analyzing and typing.
Ground up or use existing. Today most of the hard work is done, many cores are made that you can plug in to and add your own style application to. BSNES(AKA higen) for example has all the implementation done, you just need to make the emulator and build against it. Easier said then done but much faster then re programming the wheel.
 
Last edited:

Touko White

I'm cute, aren't I?
1. True. I don't know why I stated that.
2. I can't remember what I referred to then.
3. OK. I'll perhaps leave it to later, when I DO know stuff.
4. I see. I'm not 100% sure on exactly what you said, but I kind of think that you've said C is more accurate, since you stated it is low-level.
5.

-As I'll probably be starting out with NES or GB/GBC/SGB, I'll look into low-level emulation, and look more into emulator terminology (no pun intended). I was referring to a plugin system, because of requirements of DirectX and other things.
-I'll also look into ASM, then. in fact, I'm probably going to make SMW hacks also, so it would be useful (although that might be different kind).
-Like I said, I could contribute to an emulator, and then make out my own some time.

Thanks. Looks like I'll be spending a lot of time on the computer, instead of messing around in boards. Also, when is it a good idea to put such a project on github or other such sites?
 

ulaoulao

Controller Man
Staff member
4. Stick with c++, I think that will be best for you. And there are a lot of examples out there.

Also, when is it a good idea to put such a project on github or other such sites?
Only when it "does" something. At that point it becomes useful to others. Even if its just reading opt codes. People may join in, remember doing something that has been done is not as attractive is something new. As for nes, its been done. but not many emulators do NES/GB/GBC/SGB, that is attractive.

Also get on IRC's that is where you find the knowledgeable guys.
 

Touko White

I'm cute, aren't I?
Thanks for the tips. And yeah, making an emu that would do the Game Boy and NES lines would be a good idea, although I'd make them separate projects, but also available as one pack, for people that just want one thing.

I'll check for irc channels, and yeah, I'll probably be on the web tomorrow reading about C++. :)
 

malloc4096

New member
That will not help so you basically have none.
I don't think thats completely true, depending on how he went/learned about it.. If he learned the syntax and manually did most of the work, or at least when he was learning it. then it proves he has the ability to do what most average non computer junkies don't have the patience to do. If he did/learned it tho mostly threw apps that do most of the work for you, then yeah lol

they are all free?
I think that is a general given. . . however not all Compilers and IDE's are created equal, thats why they are not all free. And i believe Not all of the libraries for compiling for some proprietary platforms would be free. . . So yea mostly free, but not actually 100percent of the time.

Programming rule 1#, plan. There is a lot more to crating an emulator then just coding...
I Didn't know you could code at all withOUT a plan, well i guess thats not true otherwise win8 would of never existed lol.

DISCLAIMER - I don't have the experience your looking for but I looked into and learn the basics b4, didn't have the motivation/time to go farther. So i may not know the exact detail, but i think otheres will agree what i may state will be logicaly true.

to get out of the way first. . . when your start learning, not instructed by someone experienced, The info on the web for coding is like everything else, a lot of wrong info mixed in, except in reliable sources ofcourse. . also a lot of different styles/opinions, just because someone formats there code a certain style doesnt mean it needs to be, I had to re-write stuff to make it readable for myself especially when first learning. And just for example creating a dynamic table in excel so it would be easyer to see/learn bitwise manipulation, instead of memorizing all the bites lol. The sources i saw 4it explained stuff properly but don't take into consideration that learners maynot have that stuff memorized, so its not practial unless you draw out the table. I think a good site that at least explained the basics correctly was www.cprogramming.com

I heard similar things about C/C++. I also heard someone state at some point that, you can do nearly everything other languages can do with just C however it will take you longer, the exception to that mayb 3D apps like games which benefit or require ObjectOriented programming.

Due to my inexperience I don't know if this is 100% true, but maybe cause, theres a lot of coding you can do simply by prebuilt function calls from the libraries, however they don't need to be. The functions can be manually coded in/macroed. And those who don't learn how the function works within reasonable extent, Is perhaps part of why some apps just don't work as well, due to missuse/abuse of call functions, tho I can probably imagine most peoples philosophy who do are going under the "why reinvent the wheel" saying. That is true, but everything In moderation, its not as simple as rolling a wheel down a hill. May also be part of the reason some apps require specific runtime versions installed before it can exacute correctly. That just pisses me off personally LoL, but that maybe just me.

I think but might not be true - If an app does not need to be coded in another language for some specific reason, I believe it will probably run more efficent and more potable in general and between platforms if its just C. . . However as said that probably takes Longer and requires perhaps more understanding of the concepts of some of the prebuilt call functions of other languages. I'm not saying there all lazy, but u know a lot of people must be lol
 

ulaoulao

Controller Man
Staff member
I don't think thats completely true, depending on how he went/learned about it.. If he learned the syntax and manually did most of the work, or at least when he was learning it. then it proves he has the ability to do what most average non computer junkies don't have the patience to do. If he did/learned it tho mostly threw apps that do most of the work for you, then yeah lol
Syntax? LOL wow your clueless? Making an emulator and making a user interference it hardly dependent on each other. When you start reading a rom file your going to be doing some low-level work. So if you really think HTML4 and some of CSS1 is in anyway related to low level coding you're replying to the wrong topic. Now at some point he will have to write an application. For sake I hope not in html5 LOL. Though assuming c++/c# and if you think HTML4 and some of CSS1 have anything in common with application development, again, your in the wrong topic pal.

however not all Compilers and IDE's are created equal
He didn't asking about IDE's or compilers.

Yeah you can code without a plan it's call "code first" development, but to "code" an emulator without a plan would by like shooting your foot and trying to walk.

Most of what you said above is true but what you are missing is that "coding" an application and coding an emulator is not really at all the same thing. You will need to understand machine level architecture. There are people that know machine level architecture and can not code. It's not the same, or even remotely related. It's like saying mechanics should know how to reverse engineer the MCU in cars and likewise the reverse.
 
Last edited:

malloc4096

New member
That wasn't my point. I will argue but not for the wrong reason. It doesn't matter what it is he's interested in trying, there's going to be a learning curve, yeah HTML is far from coding, but if he took the time to go through that curve. It doesn't mean he cant accomplish another hurtle, tho more difficault. Your being a bit harsh, like I said I'm not qualified to judge, however even if i was, personally I'd resurve criticism for after some one has taken the time to attempt to learn the task. . . and the choices they make after they are informed on what maybe good or bad practice. I could be wrong, But I assume very very very few people are born able to code, the rest had to learn. Deminishing someones past accomplishments has no positive purpose/motivation to accomplish future ones, within reason.

that said, I respect your input here as much as anyone, U may or maynot have noticed I perfer to insault sometimes to(where insault is due LoL), so I respect that aswell. and if i have the time, this topic relates to misc interests of mine aswell so your inputs are valued. just try not to be to harsh on future OPs, unless your goal is trying to inseption the idea they cant accomplish it befor they even try, because of the difficaulty of the task ;)
 
Top