{"id":248,"date":"2022-10-27T20:48:52","date_gmt":"2022-10-27T20:48:52","guid":{"rendered":"https:\/\/lesfarrell.com\/?p=248"},"modified":"2025-10-01T21:03:49","modified_gmt":"2025-10-01T21:03:49","slug":"super-chip8-emulator","status":"publish","type":"post","link":"https:\/\/lesfarrell.com\/?p=248","title":{"rendered":"Super Chip Emulator"},"content":{"rendered":"\n<p>Not quite sure what Chip-8 even is? Don&#8217;t worry, there&#8217;s quite a nice description at <a href=\"http:\/\/Wikipedia\" target=\"_blank\" rel=\"noopener\" title=\"Wikipedia \">https:\/\/en.wikipedia.org\/wiki\/CHIP-8<\/a> which should tell you more than you ever wanted to know.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img data-dominant-color=\"147739\" data-has-transparency=\"false\" style=\"--dominant-color: #147739;\" loading=\"lazy\" decoding=\"async\" width=\"642\" height=\"352\" sizes=\"auto, (max-width: 642px) 100vw, 642px\" src=\"https:\/\/lesfarrell.com\/wp-content\/uploads\/2022\/10\/splash.png\" alt=\"\" class=\"wp-image-251 not-transparent\" srcset=\"https:\/\/lesfarrell.com\/wp-content\/uploads\/2022\/10\/splash.png 642w, https:\/\/lesfarrell.com\/wp-content\/uploads\/2022\/10\/splash-300x164.png 300w\" \/><\/figure>\n<\/div>\n\n\n<p>This is my attempt at writing a Chip-8 \/ SuperChip emulator in C. I think every programmer should at least attempt to create a Chip8 emulator as it serves as the perfect introduction to how computers work at a low level.<\/p>\n\n\n\n<p>It should be fairly easy to convert the emulator code itself to a different platform as the only thing that&#8217;s platform specific is the Windows File browser and some optional Windows console code but that should be easy to remove or replace.<\/p>\n\n\n\n<p class=\"has-text-align-center\">You can download both the code and executable from my GitHub page.<\/p>\n\n\n\n<p class=\"has-text-align-center\"> <a href=\"https:\/\/github.com\/LesFarrell\/Chip8\">https:\/\/github.com\/LesFarrell\/Chip8<\/a><\/p>\n\n\n\n<p>The Emulator is using the cross platform Tigr Graphics Library <a href=\"https:\/\/github.com\/erkkah\/tigr\">https:\/\/github.com\/erkkah\/tigr<\/a> to handle the Window creation and process key-presses. It&#8217;s single C file which makes it very easy to use and debug and it&#8217;s perfect if you just want to get something on screen quickly! <\/p>\n\n\n\n<p>There&#8217;s no sound emulated at the moment but given the limited sound of the Chip-8 it&#8217;s not really a problem and it&#8217;s probably something I&#8217;ll address in the future. <\/p>\n\n\n\n<p><\/p>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-9d6595d7 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<figure class=\"wp-block-image size-full\"><img data-dominant-color=\"08913b\" data-has-transparency=\"false\" style=\"--dominant-color: #08913b;\" loading=\"lazy\" decoding=\"async\" width=\"642\" height=\"352\" sizes=\"auto, (max-width: 642px) 100vw, 642px\" src=\"https:\/\/lesfarrell.com\/wp-content\/uploads\/2022\/10\/sweetcoptor.png\" alt=\"\" class=\"wp-image-258 not-transparent\" srcset=\"https:\/\/lesfarrell.com\/wp-content\/uploads\/2022\/10\/sweetcoptor.png 642w, https:\/\/lesfarrell.com\/wp-content\/uploads\/2022\/10\/sweetcoptor-300x164.png 300w\" \/><\/figure>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<figure class=\"wp-block-image size-full\"><img data-dominant-color=\"0f823a\" data-has-transparency=\"false\" style=\"--dominant-color: #0f823a;\" loading=\"lazy\" decoding=\"async\" width=\"642\" height=\"352\" sizes=\"auto, (max-width: 642px) 100vw, 642px\" src=\"https:\/\/lesfarrell.com\/wp-content\/uploads\/2022\/10\/gradschool.png\" alt=\"\" class=\"wp-image-259 not-transparent\" srcset=\"https:\/\/lesfarrell.com\/wp-content\/uploads\/2022\/10\/gradschool.png 642w, https:\/\/lesfarrell.com\/wp-content\/uploads\/2022\/10\/gradschool-300x164.png 300w\" \/><\/figure>\n<\/div>\n<\/div>\n\n\n\n<h3 class=\"wp-block-heading\">Commands<\/h3>\n\n\n\n<p>In addition to the normal CHIP8 movement keys of:<\/p>\n\n\n\n<div class=\"wp-block-group\"><div class=\"wp-block-group__inner-container is-layout-flow wp-block-group-is-layout-flow\">\n<h3>\n<figure class=\"wp-block-table aligncenter is-style-regular\">\n<table style=\"border-size: 1px\" ;=\"\" border-color:=\"\" #0f0000\"=\"\">\n<tbody><tr>\n<td><strong>1<\/strong><\/td>\n<td><strong>2<\/strong><\/td>\n<td><strong>3<\/strong><\/td>\n<td><strong>4<\/strong><\/td>\n<\/tr>\n<tr>\n<td><strong>Q<\/strong><\/td>\n<td><strong>W<\/strong><\/td>\n<td><strong>E<\/strong><\/td>\n<td><strong>R<\/strong><\/td>\n<\/tr>\n<tr>\n<td><strong>A<\/strong><\/td>\n<td><strong>S<\/strong><\/td>\n<td><strong>D<\/strong><\/td>\n<td><strong>F<\/strong><\/td>\n<\/tr>\n<tr>\n<td><strong>Z<\/strong><\/td>\n<td><strong>X<\/strong><\/td>\n<td><strong>C<\/strong><\/td>\n<td><strong>V<\/strong><\/td>\n<\/tr>\n<\/tbody><\/table>\n<\/figure>\n<\/h3>\n<\/div><\/div>\n\n\n\n<h5 class=\"wp-block-heading\">You can also use the following keys:<\/h5>\n\n\n\n<p><strong>O <\/strong>&#8211; Open a new ROM image.<\/p>\n\n\n\n<p><strong>L<\/strong> &#8211; Reload the current ROM Image.<\/p>\n\n\n\n<p>I&#8217;ve tried the emulator with quite a few games and most seem to work without problem.<\/p>\n\n\n\n<figure class=\"wp-block-gallery aligncenter has-nested-images columns-2 is-cropped wp-block-gallery-1 is-layout-flex wp-block-gallery-is-layout-flex\">\n<figure class=\"wp-block-image size-large\"><img data-dominant-color=\"0c883b\" data-has-transparency=\"false\" style=\"--dominant-color: #0c883b;\" loading=\"lazy\" decoding=\"async\" width=\"642\" height=\"352\" data-id=\"252\" src=\"https:\/\/lesfarrell.com\/wp-content\/uploads\/2022\/10\/blinky.png\" alt=\"\" class=\"wp-image-252 not-transparent\" srcset=\"https:\/\/lesfarrell.com\/wp-content\/uploads\/2022\/10\/blinky.png 642w, https:\/\/lesfarrell.com\/wp-content\/uploads\/2022\/10\/blinky-300x164.png 300w\" sizes=\"auto, (max-width: 642px) 100vw, 642px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img data-dominant-color=\"0d873a\" data-has-transparency=\"false\" style=\"--dominant-color: #0d873a;\" loading=\"lazy\" decoding=\"async\" width=\"642\" height=\"352\" data-id=\"253\" src=\"https:\/\/lesfarrell.com\/wp-content\/uploads\/2022\/10\/sokoban.png\" alt=\"\" class=\"wp-image-253 not-transparent\" srcset=\"https:\/\/lesfarrell.com\/wp-content\/uploads\/2022\/10\/sokoban.png 642w, https:\/\/lesfarrell.com\/wp-content\/uploads\/2022\/10\/sokoban-300x164.png 300w\" sizes=\"auto, (max-width: 642px) 100vw, 642px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img data-dominant-color=\"08903b\" data-has-transparency=\"false\" style=\"--dominant-color: #08903b;\" loading=\"lazy\" decoding=\"async\" width=\"642\" height=\"352\" data-id=\"256\" src=\"https:\/\/lesfarrell.com\/wp-content\/uploads\/2022\/10\/Joust.png\" alt=\"\" class=\"wp-image-256 not-transparent\" srcset=\"https:\/\/lesfarrell.com\/wp-content\/uploads\/2022\/10\/Joust.png 642w, https:\/\/lesfarrell.com\/wp-content\/uploads\/2022\/10\/Joust-300x164.png 300w\" sizes=\"auto, (max-width: 642px) 100vw, 642px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img data-dominant-color=\"0a8c3b\" data-has-transparency=\"false\" style=\"--dominant-color: #0a8c3b;\" loading=\"lazy\" decoding=\"async\" width=\"642\" height=\"352\" data-id=\"254\" src=\"https:\/\/lesfarrell.com\/wp-content\/uploads\/2022\/10\/outlaws.png\" alt=\"\" class=\"wp-image-254 not-transparent\" srcset=\"https:\/\/lesfarrell.com\/wp-content\/uploads\/2022\/10\/outlaws.png 642w, https:\/\/lesfarrell.com\/wp-content\/uploads\/2022\/10\/outlaws-300x164.png 300w\" sizes=\"auto, (max-width: 642px) 100vw, 642px\" \/><\/figure>\n<\/figure>\n","protected":false},"excerpt":{"rendered":"<p>Not quite sure what Chip-8 even is? Don&#8217;t worry, there&#8217;s quite a nice description at https:\/\/en.wikipedia.org\/wiki\/CHIP-8 which should tell you more than you ever wanted to know. This is my attempt at writing a Chip-8 \/ SuperChip emulator in C. I think every programmer should at least attempt to create a Chip8 emulator as it&hellip;&nbsp;<a href=\"https:\/\/lesfarrell.com\/?p=248\" rel=\"bookmark\">Read More &raquo;<span class=\"screen-reader-text\">Super Chip Emulator<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"neve_meta_sidebar":"","neve_meta_container":"","neve_meta_enable_content_width":"","neve_meta_content_width":0,"neve_meta_title_alignment":"","neve_meta_author_avatar":"","neve_post_elements_order":"","neve_meta_disable_header":"","neve_meta_disable_footer":"","neve_meta_disable_title":"","footnotes":""},"categories":[1],"tags":[],"class_list":["post-248","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/lesfarrell.com\/index.php?rest_route=\/wp\/v2\/posts\/248","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lesfarrell.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lesfarrell.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lesfarrell.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lesfarrell.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=248"}],"version-history":[{"count":14,"href":"https:\/\/lesfarrell.com\/index.php?rest_route=\/wp\/v2\/posts\/248\/revisions"}],"predecessor-version":[{"id":282,"href":"https:\/\/lesfarrell.com\/index.php?rest_route=\/wp\/v2\/posts\/248\/revisions\/282"}],"wp:attachment":[{"href":"https:\/\/lesfarrell.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=248"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lesfarrell.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=248"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lesfarrell.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=248"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}