<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>NES | Learn C Games Programming Blog</title>
	<atom:link href="https://learncgames.com/tag/nes/feed/" rel="self" type="application/rss+xml" />
	<link>https://learncgames.com</link>
	<description>A blog about C, programming games and my ebook(s).</description>
	<lastBuildDate>Mon, 04 Jan 2021 22:16:01 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>

<image>
	<url>https://learncgames.com/wp-content/uploads/2020/03/cropped-favicon-32x32.png</url>
	<title>NES | Learn C Games Programming Blog</title>
	<link>https://learncgames.com</link>
	<width>32</width>
	<height>32</height>
</image> 
<site xmlns="com-wordpress:feed-additions:1">181446779</site>	<item>
		<title>Program a NES game in C</title>
		<link>https://learncgames.com/program-a-nes-game-in-c/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=program-a-nes-game-in-c</link>
		
		<dc:creator><![CDATA[David]]></dc:creator>
		<pubDate>Thu, 07 Jan 2021 00:00:45 +0000</pubDate>
				<category><![CDATA[C]]></category>
		<category><![CDATA[Game]]></category>
		<category><![CDATA[NES]]></category>
		<guid isPermaLink="false">https://learncgames.com/?p=2309</guid>

					<description><![CDATA[<p>Back in the mid 80s I was busy writing games for ZX Spectrum, MSX and CBM-64 and also porting games between 6502 and Z80. That was also when the original NES appeared.  That had a 6502 CPU but a lot less RAM than the CBM-64. In those days the NES was programmed in assembly language. [&#8230;]</p>
The post <a href="https://learncgames.com/program-a-nes-game-in-c/">Program a NES game in C</a> first appeared on <a href="https://learncgames.com">Learn C Games Programming Blog</a>.]]></description>
										<content:encoded><![CDATA[<div class='__iawmlf-post-loop-links' style='display:none;' data-iawmlf-post-links='[{&quot;id&quot;:269,&quot;href&quot;:&quot;https:\/\/nesdoug.com&quot;,&quot;archived_href&quot;:&quot;http:\/\/web-wp.archive.org\/web\/20260131043218\/https:\/\/nesdoug.com\/&quot;,&quot;redirect_href&quot;:&quot;&quot;,&quot;checks&quot;:[{&quot;date&quot;:&quot;2026-02-06 13:21:05&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-02-10 08:50:34&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-02-17 03:04:09&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-02-20 15:23:26&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-02-27 05:42:20&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-03-03 13:46:08&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-03-08 06:11:30&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-03-11 21:31:48&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-03-16 06:30:27&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-03-21 08:38:33&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-03-25 07:39:23&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-03-29 19:56:20&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-04-03 01:23:05&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-04-06 09:17:33&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-04-10 18:44:41&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-04-13 19:23:59&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-04-18 20:21:25&quot;,&quot;http_code&quot;:200}],&quot;broken&quot;:false,&quot;last_checked&quot;:{&quot;date&quot;:&quot;2026-04-18 20:21:25&quot;,&quot;http_code&quot;:200},&quot;process&quot;:&quot;done&quot;},{&quot;id&quot;:270,&quot;href&quot;:&quot;https:\/\/retropie.org.uk\/docs\/Nintendo-Entertainment-System&quot;,&quot;archived_href&quot;:&quot;http:\/\/web-wp.archive.org\/web\/20251007031658\/https:\/\/retropie.org.uk\/docs\/Nintendo-Entertainment-System\/&quot;,&quot;redirect_href&quot;:&quot;&quot;,&quot;checks&quot;:[{&quot;date&quot;:&quot;2026-02-06 13:21:08&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-02-10 08:50:35&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-02-17 01:07:40&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-02-20 15:23:27&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-02-27 05:42:17&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-03-03 13:46:13&quot;,&quot;http_code&quot;:503},{&quot;date&quot;:&quot;2026-03-07 13:44:19&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-03-11 04:25:20&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-03-14 15:23:35&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-03-18 01:14:17&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-03-21 08:38:38&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-03-25 07:39:25&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-03-29 19:56:20&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-04-03 01:23:08&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-04-06 09:17:34&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-04-11 17:57:46&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-04-15 07:10:24&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-04-18 20:21:25&quot;,&quot;http_code&quot;:200}],&quot;broken&quot;:false,&quot;last_checked&quot;:{&quot;date&quot;:&quot;2026-04-18 20:21:25&quot;,&quot;http_code&quot;:200},&quot;process&quot;:&quot;done&quot;},{&quot;id&quot;:271,&quot;href&quot;:&quot;https:\/\/nesdoug.com\/2016\/03\/10\/26-asm-basics&quot;,&quot;archived_href&quot;:&quot;http:\/\/web-wp.archive.org\/web\/20251204235910\/https:\/\/nesdoug.com\/2016\/03\/10\/26-asm-basics\/&quot;,&quot;redirect_href&quot;:&quot;&quot;,&quot;checks&quot;:[{&quot;date&quot;:&quot;2026-02-06 13:21:10&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-02-10 08:50:34&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-02-17 01:07:40&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-02-20 15:23:26&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-02-27 05:42:17&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-03-03 13:46:11&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-03-07 13:44:17&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-03-11 04:25:13&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-03-14 15:23:34&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-03-18 01:14:17&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-03-21 08:38:38&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-03-25 07:39:23&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-03-29 19:56:20&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-04-03 01:23:05&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-04-06 09:17:33&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-04-11 03:35:42&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-04-14 19:36:36&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-04-18 20:21:24&quot;,&quot;http_code&quot;:200}],&quot;broken&quot;:false,&quot;last_checked&quot;:{&quot;date&quot;:&quot;2026-04-18 20:21:24&quot;,&quot;http_code&quot;:200},&quot;process&quot;:&quot;done&quot;}]'></div>
<p>B<img fetchpriority="high" decoding="async" class="alignleft size-medium wp-image-2310" src="https://learncgames.com/wp-content/uploads/2021/01/nes-mario-300x280.png" alt="NES Mario" width="300" height="280" srcset="https://learncgames.com/wp-content/uploads/2021/01/nes-mario-300x280.png 300w, https://learncgames.com/wp-content/uploads/2021/01/nes-mario.png 512w" sizes="(max-width: 300px) 100vw, 300px" />ack in the mid 80s I was busy writing games for ZX Spectrum, MSX and CBM-64 and also porting games between 6502 and Z80. That was also when the original NES appeared.  That had a 6502 CPU but a lot less RAM than the CBM-64.</p>
<p>In those days the NES was programmed in assembly language. C was still too new for most things but now, it&#8217;s possible to program a NES game in C. Developer Douglas Fraker has produced a <a title="Link to Nesdoug.com" href="https://nesdoug.com/" target="_blank" rel="nofollow noopener">series of tutorials</a> on how to create NES games in C using cc65, a C compiler/assembler that takes C code and outputs 6502 assembly language.</p>
<p>His tutorials cover the whole range of things including sprites, how palettes work, music, sound effects, even how to use the Zapper (<em>a stand alone gun-like accessory</em>) with all source code on GitHub.  You can run games on an emulator such as the one that comes with <a title="Link to RetroPie.org page on running NES Emulator." href="https://retropie.org.uk/docs/Nintendo-Entertainment-System/" target="_blank" rel="nofollow noopener">RetroPie</a>.</p>
<p>Reading the page on <a title="Link to Nesdoug.com page on 6502 ASM Basics." href="https://nesdoug.com/2016/03/10/26-asm-basics/" target="_blank" rel="nofollow noopener">6502 ASM Basics</a> brought it all back to me even though it&#8217;s 31 years since I last wrote 6502 code.</p>
<p>&nbsp;</p>
<p>.</p>The post <a href="https://learncgames.com/program-a-nes-game-in-c/">Program a NES game in C</a> first appeared on <a href="https://learncgames.com">Learn C Games Programming Blog</a>.]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">2309</post-id>	</item>
	</channel>
</rss>
