<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>Posts on sacckey.dev</title>
    <link>https://sacckey.dev/posts/</link>
    <description>Recent content in Posts on sacckey.dev</description>
    <image>
      <title>sacckey.dev</title>
      <url>https://sacckey.dev/sacckey.png</url>
      <link>https://sacckey.dev/sacckey.png</link>
    </image>
    <generator>Hugo -- 0.118.2</generator>
    <language>en</language>
    <lastBuildDate>Sat, 12 Oct 2024 15:46:14 +0900</lastBuildDate>
    <atom:link href="https://sacckey.dev/posts/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Implementing a Game Boy emulator in Ruby</title>
      <link>https://sacckey.dev/posts/implementing-a-game-boy-emulator-in-ruby/</link>
      <pubDate>Sat, 12 Oct 2024 15:46:14 +0900</pubDate>
      <guid>https://sacckey.dev/posts/implementing-a-game-boy-emulator-in-ruby/</guid>
      <description>Introduction I created a Game Boy emulator in Ruby and released it as a gem called rubyboy! (I&amp;rsquo;d be happy if you could give it a star!)
And now it runs in the browser using WebAssembly!
Try the demo in your browser!
Screenshots Rubyでゲームボーイのエミュレータを作りました！
カラー対応やWasmでブラウザ対応もやっていきたい💪
GitHub: https://t.co/hFwmZD6FNp pic.twitter.com/qWbx8v4mef
&amp;mdash; sacckey (@sacckey) March 17, 2024 This Article While explaining the implementation process of Ruby Boy, I&amp;rsquo;ll introduce the points where I got stuck and the techniques I devised.</description>
    </item>
    <item>
      <title>Rubyでゲームボーイのエミュレータを作った</title>
      <link>https://sacckey.dev/posts/implementing-a-game-boy-emulator-in-ruby-ja/</link>
      <pubDate>Sat, 12 Oct 2024 15:45:14 +0900</pubDate>
      <guid>https://sacckey.dev/posts/implementing-a-game-boy-emulator-in-ruby-ja/</guid>
      <description>はじめに Rubyでゲームボーイのエミュレータを作って、rubyboyという名前のgemで公開しました！ (スターをいただけると嬉しいです！)
Rubyでゲームボーイのエミュレータを作りました！
カラー対応やWasmでブラウザ対応もやっていきたい💪
GitHub: https://t.co/hFwmZD6FNp pic.twitter.com/qWbx8v4mef
&amp;mdash; sacckey (@sacckey) March 17, 2024 この記事 RUBY BOYの実装手順を説明しながら、ハマった点や工夫した点を紹介します。 またRUBY BOYの高速化のためにやったことを紹介します。
なぜゲームボーイのエミュレータをつくったのか なにか個人開発をしたいが、Webサービスは維持費がかかるので無料で維持できるものを作りたい 業務でRubyを使っていることもあり、以前からRubyのgemを作ってみたかった ゲームのエミュレータ開発は「ゴールが明確＆動くと楽しい」ので、モチベを維持しやすそう 特にゲームボーイには思い入れがある → Rubyでゲームボーイのエミュレータを作って、gemで公開しよう！
エミュレータの概要 以下は、ゲームボーイのアーキテクチャです。
&#34;Game Boy / Color Architecture - A Practical Analysis&#34; by Rodrigo Copetti, Published: February 21, 2019, Last Modified: January 9, 2024. Available at: https://www.copetti.org/writings/consoles/game-boy/. Licensed under Creative Commons Attribution 4.0 International License. これらのハードウェアを模倣したプログラムを実装することを目指します。 RUBY BOYのクラス図と各クラスの役割は以下の通りです。
Console: mainクラス Lcd: 画面描画を行う Bus: メモリマップドI/Oを実現するためのコントローラ。Cpuから各種ハードウェアの設定値の読み書きを中継する Cpu: Romから命令を読み込み、解釈して実行する Registers: レジスタの読み書きを行う Cartridge: カセット内のROMやRAMの読み書きを行う。MBCチップの種類ごとに実装が異なる(後述) Apu: オーディオデータの生成を行う Rom: カートリッジ内のゲームプログラムを読み込む Ram: カートリッジ及びゲームボーイ内のRAMデータの読み書きを行う Interrupt: 割り込みを管理する。割り込みは次の3クラスから行われる Timer: サイクル数をカウントする Ppu: ディスプレイに描画するピクセル情報を生成する Joypad: ゲームボーイのボタン入力を受け取る RUBY BOYでは、Cpuが命令を実行し、実行にかかったサイクル数だけPpu, Timer, Apuのサイクル数を進めていくことでコンポーネント間の同期をとります。 そのためメインループの中身は以下のようになります。</description>
    </item>
    <item>
      <title>Hello</title>
      <link>https://sacckey.dev/posts/hello/</link>
      <pubDate>Sat, 05 Oct 2024 18:48:19 +0900</pubDate>
      <guid>https://sacckey.dev/posts/hello/</guid>
      <description>hello world aaa
abc ddddd
efg iiiii
code (1..10).each do |i| p i puts &amp;#34;hoge&amp;#34; end image </description>
    </item>
  </channel>
</rss>
