The overall logic is very simple (read a program into ram, read an opcode from the starting location, do whatever that opcode is supposed to do, go to the next opcode... rinse and repeat) and you can find tons of tutorial online (I liked this one: http://www.multigesture.net/articles/how-to-write-an-emulato...)
It should set your mind on the fact that writing a simple emulator is just doing a fetch/decode/execute (https://en.wikipedia.org/wiki/Instruction_cycle) on some code.
For the documentation, I've found that EmuTalk (www.emutalk.net/forums/30-Emulator-Programming) has tons of interesting links.
> PS: I'm planning to use Java for this side-project.
Emulators typically use repetitive code, less than int-sized math, 2d arrays and pointer manipulation. Java is not good at dealing with any of those, so you might want to find a more fun language. Then again, one thing at a time.
Right now I'm just trying to figure out the basic fundamental concept of "emulation" (what is it, what does it take, how can I write a simple one :)).
Chip-8 has 30-something instructions and is relatively simple to implement, and test driving it is pretty easy too. I thought it was a really wonderful first emulation exercise.
Is a fantastic resource. They are helpful and have lots of docs.
>PS: I'm planning to use Java for this side-project.
One place to start might be to try and write an emulator for the DCPU-16. It's a simple made-up computer that Notch (creator of Minecraft) designed for the game 0x10c.
Although the game was never finished, many people wrote emulators based on the DCPU's specifications[1]; search Github for "DCPU Java" to see several examples in that language.
[1] https://raw.githubusercontent.com/gatesphere/demi-16/master/...
Also, the only emulator for anything written in Io, as far as I know :p
Not that it was good, mind you. But I do highly recommend DCPU-16 as an emulation launching point. It's a really easy to understand system :)
I wouldn't mind if I have to learn from zero (OS, hardware, etc). I think I might have found a side project that I can be passionate about!
UPDATE: Thanks for the replies. I'm having hard time to follow those links since I don't even know where to start. Is there another tutorial that can explain the fundamental of "emulator" first before the NES part kicks in?
PS: I'm planning to use Java for this side-project.