{ "cells": [ { "cell_type": "code", "execution_count": null, "id": "6527990d-da11-4660-a9c2-56bb4a57de37", "metadata": {}, "outputs": [], "source": [ "from boytacean import GameBoy\n", "\n", "ROM_PATH = \"../../res/roms/demo/pocket.gb\"\n", "gb = GameBoy(apu_enabled=False, serial_enabled=False)\n", "gb.load_rom(ROM_PATH)\n", "for _ in range(220):\n", " gb.next_frame()\n", "gb.image()" ] }, { "cell_type": "code", "execution_count": null, "id": "bea9dcad-f3a5-479f-8116-4d6031ddfac9", "metadata": {}, "outputs": [], "source": [ "gb.set_palette(\"hogwards\")\n", "for _ in range(400):\n", " gb.next_frame()\n", "gb.image()" ] }, { "cell_type": "code", "execution_count": null, "id": "eb697a68-77d4-443d-96da-0e81f9b39d2a", "metadata": {}, "outputs": [], "source": [ "gb.set_palette(\"christmas\")\n", "for _ in range(400):\n", " gb.next_frame()\n", "gb.image()" ] }, { "cell_type": "code", "execution_count": null, "id": "1f75c0f0-7350-4870-8385-b1815d672e75", "metadata": {}, "outputs": [], "source": [ "with gb.video_capture(video_format=\"avc1\", video_extension=\"mp4\", fps=60):\n", " for _ in range(400):\n", " gb.next_frame()" ] } ], "metadata": { "kernelspec": { "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.9.1" } }, "nbformat": 4, "nbformat_minor": 5 }