What's new

Starting Emulator Advice?

bossattack

New member
Hi all, after searching the net for a good emulation source, I've come across this forum, it seems like a very nice useful resource.

I have been programming for a number of years creating small games/demos. I have experience with Java, OpenGL, OpenAL and other basic stuff for small games but I have not attempted any type of emulator before.

My intention is to create a Gameboy Advance emulator using Java but I am not sure where to begin.

Is the GBA a relatively straight forward system to try as a first emulator?

Or would starting with something else be a better choice?

Any advice, tips or places to start from would be much appreciated.
 

Toasty

Sony battery
To start off, I'd suggest writing a Chip8 emulator. (See the sticky about it for all the documentation you'll need.) It's a lot simpler than any real gaming system, but it will still give you valuable experience in understanding how emulation works. Second, as much as I like working in Java, it's not very well-suited for writing emulators. You can definitely write a fine Chip8 emulator with it, and perhaps even a GBA emulator with it as well. (I remember a while back there was a GBA emulator that was written in C#.) All in all though, you'll be able to write faster emulators with a more flexible language such as C/C++. Higher level languages like Java and C# hide many of the mechanisms you'd need to take advantage of to write an efficient emulator.
 

Exophase

Emulator Developer
I would not recommend GBA for a first emulator, the original GB is much simpler and will give some insight into some components of GBA emulation. GBA's CPU and video are quite a bit more complicated.
 

Normmatt

New member
I would recommend Chip8 aswell, then probably Gameboy, then NES, then GBA.

I'm currently working on my own GBA emulator in C#, the cpu is taking forever though, mostly because I dont have the time and I keep making stupid mistakes. I'm not too worried about the speed this is just a side project I've wanted to do for awhile now.

I started with Chip8 then made very basic GB and NES, and a basic PocketStation emulator (used cpu core from desmume), too GBA. Although I have worked on other emulators writting one from scratch is alot harder than improving someone elses.
 

Molokai

New member
I know this is quite old, and I hate reviving an old topic, but since it fit so well with what I was wanting, I figured I'd do it anyway. Please don't hate me... :whistling

Anyway, you're all suggesting to start with a Chip8 emulator, but I was always wondering how exactly I'm supposed to test if a Chip8 emulator is working, and that kept me from starting. So, how do you test a Chip8 emulator?
 

Toasty

Sony battery
Load a ROM into it and see if it works. :p

I just tried some games like Tic-Tac-Toe and Connect4 and managed to nail the bugs in mine fairly easily, but I imagine there are some debugging ROMs out there too (or you could write your own). Zophar's Domain has some public domain games for Chip8 if you need them.
 

Exophase

Emulator Developer
I think test ROMs are extremely helpful in the emulation process - I can't think of a single bigger time saving tool. Unfortunately, they can take longer to write than the respective things you're trying to test, not counting all the time it takes to fix them. I'm not aware of any test ROMs for chip 8 - since so many people here have and are writing chip 8 emulators maybe we should get together and write one? It could also serve as a good exercise in writing these, so we can go on to do ones for other platforms. With more of a group effort (at least in determining what to do and verifying that it's being done well) I bet we could churn out some pretty nice tests.

We will need a chip 8 assembler first though. I imagine there has to be one out there somewhere...
 

Molokai

New member
Also, as a quick side question, I've searched everywhere for this information, but no one seems to have it up anywhere, so can anyone give me a list of applications that would be good to make (progressively more difficult) that would give the important lessons needed to have a good grasp of the C\C++ languages?
 
H

h4tred

Guest
Also, as a quick side question, I've searched everywhere for this information, but no one seems to have it up anywhere, so can anyone give me a list of applications that would be good to make (progressively more difficult) that would give the important lessons needed to have a good grasp of the C\C++ languages?

You could try something like seeing about making improvements to some open source projects. You can learn loads from how others code. There's no real guide to what sort of app you "should" program. It really is your own choice.

But here is my suggestions:

You can be bold with you want to learn C and make a Winamp plugin. It should be simple enough to get a decoder that outputs its samples to a sample buffer and then use the Winamp API to output those PCM samples. You could even code your own wave generator for it if you really wanted to.

And if you are even more adventurous, make a foobar2000 component. The SDK for foobar2000 is in 100% pure C++, and expects you know about:

* Everything about classes, including inheritance
* Templates
* Polymorphism
* effective practises in handling objects
* Namespaces

and loads other things that pertain to object oriented programming.
 

Molokai

New member
Thanks for the plugin suggestion, and I don't know anything about foobar2000 (what is that exactly? lol, don't worry, I'll look it up), but I'm guessing you know that the problem with improving others' code is that the learning is really very limited. I have done that quite a bit now, and I'm ready to start making my own programs from scratch (that's my weakness: I have a hard time writing a program start to finish without borrowing code from someone else). I'm also really bad at coming up with my own ideas, which is why I've been asking.

That being said, can anyone give me a simple list of programs (or other things) to program to get started on that path?
 

Top