今私は小さな魚だけれど

ちょっぴり非日常な音楽を紹介するブログです

【GB】アセンブラでゲームボーイソフトを作る その1

この間の記事でも書いた通り、アセンブラゲームボーイのソフトをプログラミングしたいと思います。「ゲームボーイ開発者向けの紹介記事を読んだメモ」にも記したgbdev/awesome-gbdevで紹介されているgb asm tutorialを進めていきます。

eldred.fr

気になった点をメモしてきます。

CPUの種類について

What is Game Boy?」にこのような記述があります。

The Game Boy has a custom SM83-based CPU, often called the SM83, which can be considered either as a stripped-down Z80, or a slightly upgraded 8080. It runs at a whopping 4MHz, though it can be simplified to a 1MHz, since, except in a few extremely edge-y cases, everything take a multiple of 4 cycles. Game Boy Color software can ask the console to double its CPU speed.

SM83ベースと説明されていて「 a stripped-down Z80, or a slightly upgraded 8080(余分なものを除いたZ80、もしくは少しアップグレードした8080)」と説明されています。こちらの記事やその参考に挙げられてるドキュメントにも記載の無かったので、私にとっては初耳です。

こちらのフォーラムにも話があったのですが、どうも話がはっきりしませんね…。

"SM83": Someone on the GBDev Discord server claims to have seen datasheets for other Sharp microcontrollers or systems on chip that have the same instruction set as the Game Boy CPU, and they call the core "SM83". I'd like to get the identity of this datasheet into a form that I can cite, as things said only in chat tend to disappear down a memory hole more quickly than things said in a newsgroup post, mailing list post, or other forum post with a URL.

まあいいや、次いきます。

開発環境

Tools - GB ASM tutorial

この人はLinuxVSCodeを使って開発しているようです。RGBDSの拡張機能もあるのでけっこう流行っているのかもしれません。他にもエミュレータなどの情報が揃っています。

今日はここまでにします。