Help File and info for the Emulator Newbee By No CARRIER Revision 1.00W97 (file fixed after the word 97 mishap) - (Released 3/29/98) (Sorry for sloppy layout! This document is still in the works!) ******************************************************************************** 1.) What Are Emulators? ******************************************************************************** An emulators is program that mimics the processing operations of an electronic system or gizmo, (from console systems like the NES and Genesis to calculators and computers,) so that software intended to run the original unit will run on the device doing the emulation. In other words, its a program lets you play Nintendo Games on your computer. ******************************************************************************** 2.) Different Programming Languages. Why should I care? ******************************************************************************** There are several programming languages used be many emulator authors. The programming language used is characteristic of the performance you should expect from the emulator itself. * BASIC This language is not one of them because of its simplicity and lack of speed from the code generate by BASIC compilers. * Pascal (Turbo Pascal being the most popular,) is one still in use today, (but barely.) Some emulators are completely written in PASCAL because it's a language that is a good mix of complexity of features and easy of use. The language is also forces you to write very disciplined code, meaning you must write your code in a certain way, unlike languages like C/C++ which are a lot more free. This prevents the author from writing "misbehaving code", or code that does act not the way it was intended. Major operating system like Windows 95 are written in this language to help minimized "bugged" code. But this added security does not come without a price though. The code generated by the compiler has descent speed, but it will not run fast as C/C++ or assembly code, because the language has some internal checking written into the generated code that prevents an author from creating misbehaving code, like accessing an element outside an array. This internal checking creates some overhead and therefore the code generated will not run as fast as that written for another language. * C/C++ C and C++ are the programming languages of the professional. Both are pretty much the same language: C's compiler can generate code that can be used directly with an assembly compiler, meaning a cleaver programmer can mix C and assembly code to achieve maximum performance. C++ is newer and is more object orientated then plain C. Though the language is not as user friendly as PASCAL, the speed of the code generated by C/C++ is a lot faster then PASCAL because the code does not have any "internal checking" to protect against unwanted results. (Which is why PASCAL is a language intended for the beginner, and C being intended for the more experienced programmer.) You must also specify what hardware/programming features you want to use when you write the program, which allows for even more efficient code. The code can be written so it will be portable to other OS's, but this must be considered at the time of creation of the code, or the process can get quite difficult at the end. * Assembly Last but not least we have assembly. This language is not for the faint of heart. The code generated _can_ be much faster the C++, but a lot harder to understand. A properly written assembly-based program can run circles around most C/C++ code, but only if the assembly coding was done properly. It is not done properly; it will run on part, or slower, then an efficiently written program written in C++. In other words, assembly gives the author the potential_ of writing fast programs, but does not guarantee it. (Many C/C++ fans will argue that the C/C++ compiler compiles the code very efficiently, which is right. They will also say that because of this, learning assembly is not "reasonable" in their eyes. A cleaver assembly programmer can always find something that will give a program a little more power. HUHUHU ) Assembly language is a low-level language, meaning you pretty much tell the computer how to do things down to the hardware level. This low-level access makes the language very complex, and because of this, most authors tend to only re-write routines in their code that would benefit the most from an assembly language re-write. The only problem with the code is that it is not easily portable between different types of machines like to a MAC, because the code is hardware specific. Something intended for the PC will not run on another machine without some kind of reprogramming. * JAVA Finally we have JAVA, which is a fairly new language. The code created is 100% portable to other OS's as long as the code is 100% pure JAVA code. (No mixing assembly code here, but I'm not sure how someone could do that.) But this does not come without a price. The code generated is not nearly as fast as any of the others, because it was not optimized for any particular machine or OS. Another reason is overhead. Like Pascal, Java has its own internal checking mechanism, which creates some overhead. Java also has some additional overhead created by something called the JavaNet garbage collector. Bluntly speaking, the garbage collector will "clean-up" discarded variable for a user. The advantage is a user dose not have to remember to code in a "delete" or "kill" statement in a destructor function, which helps prevent memory leaks. But this added convenience adds overhead. All of this "internal checking" makes Java a good programming language to write simple programs quickly and effectively which have the added bonus that they can run on all platforms. It was not meant to be a speed demon like assembly. ******************************************************************************** 3.) Sounds Cool. What will I need? What should I expect? ******************************************************************************** What you'll need is a computer, (duh!) Judging by the amount of Emulators available per platform, the Dos/Win95 combo is the most popular one of all because most of the most successful emulator projects run on those OS's. A Pentium 75 is my recommended baseline machine to consider if you want a computer that will run most of the emulators at an acceptable speed. A Pentium 133 or better with 32 megs of RAM is recommended for the best compatibly. There are ones available for the MAC, Unix and even some for those least popular OS's like Solaris, but there are just not as many people working to develop emulators for those platforms though. As for speed, a similarly equipped Power PC or Power Mac will do the job. What should you expect? Well, for one thing, don't expect to be able to run every single game that you know and love to run on an emulator. Some programs were designed using little known about programming techniques, which can cause problems within most emulators, because they are accessing hardware in ways that just about all other ROM do not.(Final Fantasy for Gameboy is one of them.) Others may have a chip in it (like the SNES with its DSP chip embedded into some ROMs,) which adds an extra level of difficulty to figure out what it does and figure out how a program is support to use it. Another factor is lack of documentation, which can turn the programming of emulating a system into guessing game. If an emulator author knows the specs of a system and knows how each part of the unit support to work, emulating the unit is not a hard task. But, the specs for most systems are hard to find, if available. Therefore, emulator authors will have to guess at the operation of some features of the system. These can slow-down development of an emulator dramatically. Usually the best of the emulator authors will play around with the code in their program until they figure out how something works correctly. But even with all these obstacles cleared, only a handful of the available emulators emulate some systems at 98+% of complete perfection. Only with those emulators can you achieve Another thing you should consider is speed. Unless you have a fast computer, be prepared to run a game with choppy frame rates and incorrect sound playback speeds. (Where available.) ******************************************************************************** 4.) Why should I bother? ******************************************************************************** Well, for one thing, free games. (Well, not legally, of course.) Play every game that you were never able to get you hands on without paying a dime. (Except for maybe the emulator itself.) Some people get their hands on games that they used to know and love as a kid or for systems that they no longer have as a way of reminiscing the past. Another thing you should consider is that some emulators can improve on the original unit itself. Some emulators let you save the state in a game that you in and then allow you to reload that state at a later time, like the next day. Another improvement can be seen in games that slow down from too many sprites on the screen at once. An emulator running on a fast machine can compensate the increase in demand and show no visible signs of this onscreen But most interesting of all is that now that the code for game (for example,) are no longer stored on a medium that can not be edited. Games can be manipulated in many MANY ways, like changing the characters in Super Mario Brothers to some demented creatures, or, more constructively, translate a foreign game into another language. ******************************************************************************** III Rom Image Definition ******************************************************************************** A. what is a ROM? A ROM (Read Only Memory) is a chip that stores data in a fashion that is designed so that it can not be altered, only read. A game cartridge, (a.k.a. cart) is nothing more then a ROM chip with protective a case, designed to be easily replaced. B. What is a ROM image? A ROM image is an exact copy of the data stored in a cart of ROM, (hence ROM image.) The data is stored in a format, (mostly binary,) that can be edited, read and/or manipulated computer. C. The Size of ROMs The size of ROM images varies by system. Atari 2600 games are only a few k bytes in size, while Genesis and SNES games can get to about 16 megabytes in size! One thing to note about ROM sizes is that there are 8 bits in a bytes. So for a game that is advertised as 32 megabits is really only 1/8 that size that size on disk. IV. ROM images: Where they get them? How to get them? A. How a ROM image is created?? A ROM images of a cart is achieved with a piece of hardware called a ROM copier or ROM backup device. Data is read bit by bit and stored of floppy or hard disk. The process is much like copying the contents of a book, word by word, onto a PC so you can read it, edit it, or use it in any way you want; just like a ROM image. B. Where to get them?? First of all, it is illegal to have a ROM image of a game that you do not own. You must purchase the game itself if you want to keep a ROM image. Most people ignore this because it is nearly impossible to locate a seller of, say, Nintendo games. Weather of not the cartridges are in new or used condition, someone who runs a business by carrying a wide selection of NES games is doomed to failure because there is little demand for these cartridges. Now with that mentioned, where do you look? Well, for one thing, DON'T ASK THE AUTHORS OF EMULATORS! They can't give them out law. Some will even report to some authority if asked. Besides, many of them would rather focus their time writing the emulator instead of answering requests, which is a timely process. (I should know.) Many people on the web setup websites where you can download these ROMs free of charge. So where do you go? Try searching though a search engine. This technique is a surprisingly effective method. True, sometimes you will find a dead page where the links for games go nowhere. Other times you will find a page that is loaded with working links. Never the less, the web is loaded with pages with ROMs to download. Another effective method is to go on an IRC server, and join an emulator related channel. Some may have a file server, allowing you to download ROMs from someone directly. If all else fails, check out my webpage at http://www.vgernet.net/wacko/emulator/emulzone.html I have ROMs stored locally on there with links to other sites with ROMs. NO CARRIER spends all his free time playing with and writing about emulators, and has been an emulator nut long before any fully functional emulators existed. He plans to write an emulator someday, after he learns Assembly. "Assembly is too crazy. Maybe not."