Source code is any collection of computer instructions written using some human-readable computer language. The source code is often transformed by a compiler program into low-level machine code understood by the computer. Alternatively, an interpreter can be used to analyze and perform the outcomes of the source code program directly on the fly.
Software, and its accompanying source code, typically falls within one of two licensing paradigms: open source and proprietary software. Software is open source if the source code is free to use, distribute, modify and study, and proprietary if the source code is kept secret, or is privately owned and restricted.
Porting software to other computer platforms is usually prohibitively difficult without source code. Without the source code for a particular piece of software, portability is generally computationally expensive.Template:Citation needed Possible porting options include binary translation and emulation of the original platform.
Emulator software may be open source or closed source. There are many advantages for console emulators:
- Abandoned open source projects can be picked up by other dev teams. Abandoned closed source projects cannot be updated.
- Easy forking and customization of projects
- Allows others to examine the source code and offer input, or to fix bugs.
Many of the most successful emulation projects are ones that are open source.
Assembly, being tied to the machine, has the potential of fastest code. However, Assembly language is also tied to machine code, making Assembly language very difficult in programming. Also, due to its being tied to the machine, Assembly code has to be recoded into another language if the programmer wants to use the emulator in another machine, even if the operating system is the same.
Java is a high-level language. Code written in Java can be run anywhere due to the ubiquitousness of interpreters and is relatively easy to code. However, the Java language is notoriously prone to security exploits, sometimes day-1 exploits.
C++ can be considered a compromise between Assembly and Java, despite C++ being older than (and is an antecedent to) Java. C++ compilers are ubiquitous, hence compiling C++ source code is a readily-available task. C++ is also one of the fastest 3rd generation languages. Also, most programmers already have a working knowledge of C++. However, writing in C++ is still quite complicated in coding. Also, opposed to Java, C++ code has to be explicitly complied before being able to work, lengthening turnaround times.
- (VEW04) "Using a Decompiler for Real-World Source Recovery", M. Van Emmerik and T. Waddington, the Working Conference on Reverse Engineering, Delft, Netherlands, 9–12 November 2004. Extended version of the paper.