|
pc2g,电脑好游戏
http://imrannazar.com/GameBoy-Emulation-in-JavaScript
This is part 1 of an article series on emulation development in JavaScript; ten parts are currently available, and others are expected to follow.
Part 1: The CPU
Part 2: Memory
Part 3: GPU Timings
Part 4: Graphics
Part 5: Integration
Part 6: Input
Part 7: Sprites
Part 8: Interrupts
Part 9: Memory Banking
Part 10: Timers
The emulator described in this series is available in source form: http://github.com/Two9A/jsGB
It's often stated that JavaScript is a special-purpose language, designed for use by web sites to enable dynamic interaction. However, JavaScript is a full object-oriented programming language, and is used in arenas besides the Web: the Widgets available for recent versions of Windows and Apple's Mac OS are implemented in JavaScript, as is the GUI for the Mozilla application suite.
With the recent introduction of the <canvas> tag to HTML, the question arises as to whether a JavaScript program is capable of emulating a system, much like desktop applications are available to emulate the Commodore 64, GameBoy Advance and other gaming consoles. The simplest way of checking whether this is viable is, of course, to write such an emulator in JavaScript.
This article sets out to implement the basis for a GameBoy emulation, by laying the groundwork for emulating each part of the physical machine. The starting point is the CPU. |
|