#77206 - sgeos - Wed Mar 29, 2006 9:43 am
Does anyone know of any good resources on writing emulators/virtual machines? I'm primarily looking for books. The Art of Computer Programming (Volume 1) comes to mind.
I'm thinking of writing a language that compiles to a byte code for a virtual machine.
-Brendan
#77245 - waruwaru - Wed Mar 29, 2006 7:21 pm
sgeos wrote: |
Does anyone know of any good resources on writing emulators/virtual machines? |
Writing a compiler is not same as writing an emulator/virtual-machines. If you want to write a compiler, you might be interested in this thread.
_________________
DSLua - a scripting language for your DS!
#77287 - crossraleigh - Wed Mar 29, 2006 11:39 pm
He might already be familiar with that thread; he did start it, after all.
#77306 - waruwaru - Thu Mar 30, 2006 2:11 am
crossraleigh wrote: |
He might already be familiar with that thread; he did start it, after all. |
haha, oops, my mistake. Sorry.
_________________
DSLua - a scripting language for your DS!
#77405 - sgeos - Fri Mar 31, 2006 7:14 am
I'm interested in compilers and emulators/VMs. I doubt a single resource covers both of them, "Art of Computer Programming" aside. Hence the new thread.
A compiler can be made that creates byte code X. A VM can be made that reads byte code X. What the VM does is an entirely different story.
-Brendan
#77406 - keldon - Fri Mar 31, 2006 7:38 am
I was looking through the code of Nessie [for a lil bug fix a while back], and to cut a long story short the emulator works exactly how you would imagine an emulator to work. Straight forward interpretation of the bytecode; nothing out of the ordinary.
In order to get an emulator functioning would require no more knowledge than you already have. However an effecient one [on the other hand] may.
As you know, Java JITs. Some efficient emulators supposedly JIT. I'm guessing you want to JIT. If you have done network systems architecture [network io, synchronisation, memory models, cache etc] or are familiar with issues with each then you will have saved yourself much heartache and questions.
Emulation was discussed years ago here although I'm not sure at what scale. It may have possibly been more about hardware emulation, and I cannot think of a single search term to lift it up as I barely remember a single word in it.
I found this; but I'm sure you've come across all of these entries too. And nowadays wikipedia seems to be the place to search.
#77414 - sgeos - Fri Mar 31, 2006 11:34 am
Thanks. I'm assuming that there are no good books on the topic?
-Brendan
#77420 - tepples - Fri Mar 31, 2006 2:44 pm
Often, "good books" don't appear until a technology is well known for at least 20 years so that the usable techniques have fallen out of patent.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.