JavaScriptによるゲームボーイのエミュレーション (imrannazar.com)
原題: GameBoy Emulation in JavaScript (imrannazar.com)
日本語訳
# タイトル
JavaScriptによるGameBoyエミュレーション (imrannazar.com)
# 本文
- CPU (2010年7月)
- 本シリーズの最初の記事では、JavaScriptを通じてどのようにCPUをエミュレートできるかを探り、GameBoyコンソールのエミュレーションコアの構築を開始します。
- メモリ (2010年8月)
- JavaScriptによるシステムエミュレーションを検証するシリーズの続きとして、本記事ではGameBoyのメモリがCPUのアドレスバスにどのようにマッピングされているか、そしてそのマッピングをどのようにエミュレートできるかを検証します。また、初期化後の非同期ファイルリクエストによるプログラムROMイメージの動的な読み込みについても扱います。
- GPUタイミング (2010年8月)
- JavaScriptによるシステムエミュレーションに関するシリーズの第3部では、ラスタグラフィックスシステムの例としてGameBoyを取り上げ、CPUとグラフィックス間の制御の受け渡しに関するタイミングを確立します。また、エミュレートされたグラフィックスコードがどこに描画出力をレンダリングするかという問題についても検討し、その解決策としてHTML5 Canvasを紹介します。
- グラフィックス (2010年8月)
- JavaScriptによるシステムエミュレーションの探求を続け、GameBoyのグラフィックスシステムと、GameBoyのハードウェアによってグラフィックスがどのようにレンダリングされるかを詳細に見ていきます。その後、より広範なグラフィックスエンジンで使用するためのプロセス・シミュレーションを構築します。
- 統合 (2010年9月)
- シリーズの第5部では、GameBoyエミュレータのグラフィックス・サブシステムをメモリハンドラに紐付け、エミュレータを起動するための初歩的なインターフェースを提供します。本パートには、これまでのエミュレータの動作デモが含まれており、これは以降のパートでも同様です。
- 入力 (2010年9月)
- シリーズの第6部では、プレイヤーがどのようにGameBoyと対話するかという問題を取り上げ、キーパッドのハードウェアレイアウトと、そのレイアウトをエミュレータの一部としてどのように実装できるかを検証します。基本的なイベントハンドリングや、イベントをどのようにキーパッドハンドラに渡すかなど、JavaScriptによるエミュレーション特有の問題についても検討します。
- スプライト (2010年10月)
- ほとんどのゲームの基本は、背景の風景の上をオブジェクトが移動することです。エミュレータ開発に関する本シリーズのこのパートでは、GameBoyがどのように移動可能なオブジェクトを生成するか、そしてそのプロセスをJavaScriptでどのようにエミュレートできるかを見ていきます。
- 割り込み (2010年11月)
- すべてのコンピュータと同様に、ゲームコンソールにもプログラムの実行を中断してイベントやトリガーを処理する機能があります。GameBoyも例外ではなく、ほとんどのゲームは、時間を保持し画面を更新するための主要なツールの一つとして、垂直帰線期間割り込み(V-Blank Interrupt)を利用しています。エミュレータ開発に関するシリーズの第8部では、割り込みの背後にある概念とその実装について見ていきます。
- メモリバンキング (2010年12月)
- GameBoyエミュレータの実装に関するシリーズの続きとして、本パートでは、32kBを超えるサイズのゲームに対応するために、GameBoyの基本的なメモリマップをどのように拡張できるかを検討します。GameBoyはこの拡張を行うために仮想メモリバンキングのシステムを使用しています。バンキングコントローラの概念を検証し、その実装を提示します。
- タイマー (2011年2月)
- 多くのコンピュータやコンソールシステムと同様に、GameBoyには、垂直帰線期間の更新レートよりも正確に時間を保持したいゲームのために、ハードウェアタイマーが用意されています。制御可能なタイマーに加えて、GameBoyにはシステムクロックの固定分周器を直接参照する機能も備わっています。本記事では、タイマーの両側面を調査し、テトリスの例を用いて、乱数生成のためのタイマーの活用についても見ていきます。
原文(英語)を表示
- The CPU (Jul 2010)
- In the first of this series of articles, I'll look at how a CPU can be emulated through JS, and start building an emulation core for the GameBoy console.
- Memory (Aug 2010)
- Continuing a series examining system emulation in JavaScript, this article examines how the GameBoy memories are mapped onto the CPU's address bus, and how such a mapping can be emulated. Also covered is the dynamic loading of program ROM images after initialisation, through asynchronous file requests.
- GPU Timings (Aug 2010)
- In the third part of a series regarding system emulation in JavaScript, the GameBoy as an example of a raster graphics system is looked at, and the timings established for passing of control between CPU and graphics. Also examined is the issue of where the emulated graphics code will be rendering its output, and the HTML5 canvas is introduced as a solution.
- Graphics (Aug 2010)
- The exploration of system emulation in JavaScript continues, with a detailed look at the GameBoy graphics system, and how graphics are rendered by the GameBoy hardware; a simulation of the process is then put in place for use by the wider graphics engine.
- Integration (Sep 2010)
- In the fifth part of the series, the graphics subsystem of the GameBoy emulator is tied to the memory handler, and a rudimentary interface provided for the activation of the emulator. This part includes a working demo of the emulator so far, as will subsequent parts.
- Input (Sep 2010)
- Part six of the series examines the issue of how a player interacts with the GameBoy, taking a look at the hardware layout of the keypad, and how the layout can be implemented as part of an emulator. The particular issues thrown up by a JavaScript emulation are looked at, including basic event handling and how events can be passed to the keypad handler.
- Sprites (Oct 2010)
- The basis of most games is the movement of objects over a background landscape. In this part of the series on emulation development, I take a look at how the GameBoy produces movable objects, and how the process can be emulated in JavaScript.
- Interrupts (Nov 2010)
- Game consoles, like all computers, offer the facility to break off execution of a program and handle events or triggers. The GameBoy is no exception, and most games utilise the vertical blanking interrupt as one of their primary tools for keeping time and refreshing the screen. In part 8 of the series on emulator development, I look at the concepts behind, and the implementation of interrupts.
- Memory Banking (Dec 2010)
- Continuing a series on the implementation of a GameBoy emulator, this part looks at how the basic memory map of the GameBoy can be expanded, to accommodate games that are larger than 32kB. The GameBoy uses a system of virtual memory banking to perform this expansion; the concepts of the banking controller are looked at, and an implementation offered.
- Timers (Feb 2011)
- Like most computer and console systems, the GameBoy offers a hardware timer for use by games, if they wish to keep time more accurately than at the rate of vertical blanking refresh. In addition to a controllable timer, the GameBoy provides a facility for directly examining a fixed divisor of the system clock; in this article, both aspects of the timer are investigated, and the use of the timer for generating random numbers is also looked at, using the example of Tetris.