Skip to content

Commit 164a093

Browse files
committed
Removed all code specific to my personal site and added some example homebrew roms
1 parent fb14713 commit 164a093

File tree

7 files changed

+416
-74
lines changed

7 files changed

+416
-74
lines changed

.gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/build/
2-
/roms/
2+
/local-roms/
33
jsnes.tmproj
44
._*
55
.DS_Store

index.html

+26-56
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,6 @@
44
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
55

66
<title>JSNES: A JavaScript NES emulator</title>
7-
<link rel="stylesheet" href="/style.3.css" type="text/css" media="screen"
8-
charset="utf-8">
9-
<link rel="stylesheet" href="jsnes.3.css" type="text/css" media="screen"
10-
charset="utf-8">
117

128
<script src="lib/jquery-1.4.2.min.js" type="text/javascript" charset="utf-8"></script>
139
<script src="lib/dynamicaudio-min.js" type="text/javascript" charset="utf-8"></script>
@@ -25,50 +21,46 @@
2521
$(function() {
2622
nes = new JSNES({
2723
'ui': $('#emulator').JSNESUI({
24+
"Homebrew": [
25+
['Concentration Room', 'roms/croom/croom.nes'],
26+
['LJ65', 'roms/lj65/lj65.nes'],
27+
],
2828
"Working": [
29-
['Bubble Bobble', 'roms/Bubble Bobble (U).nes'],
30-
['Concentration Room', 'roms/croom.nes'],
31-
['Contra', 'roms/Contra (U) [!].nes'],
32-
['Donkey Kong', 'roms/Donkey Kong (JU).nes'],
33-
['Dr. Mario', 'roms/Dr. Mario (JU).nes'],
34-
['Golf', 'roms/Golf (JU).nes'],
35-
['The Legend of Zelda', 'roms/Legend of Zelda, The (U) (PRG1).nes'],
36-
['Lemmings', 'roms/Lemmings (U).nes'],
37-
['Lifeforce', 'roms/Lifeforce (U).nes'],
38-
['lj65', 'roms/lj65.nes'],
39-
['Mario Bros.', 'roms/Mario Bros. (JU) [!].nes'],
40-
['Mega Man', 'roms/Mega Man (U).nes'],
41-
['Pac-Man', 'roms/Pac-Man (U) [!].nes'],
42-
['Super Mario Bros.', 'roms/Super Mario Bros. (JU) (PRG0) [!].nes'],
43-
['Tennis', 'roms/Tennis (JU) [!].nes'],
44-
['Tetris', 'roms/Tetris (U) [!].nes'],
45-
['Tetris 2', 'roms/Tetris 2 (U) [!].nes'],
46-
['Zelda II - The Adventure of Link', 'roms/Zelda II - The Adventure of Link (U).nes']
29+
['Bubble Bobble', 'local-roms/Bubble Bobble (U).nes'],
30+
31+
['Contra', 'local-roms/Contra (U) [!].nes'],
32+
['Donkey Kong', 'local-roms/Donkey Kong (JU).nes'],
33+
['Dr. Mario', 'local-roms/Dr. Mario (JU).nes'],
34+
['Golf', 'local-roms/Golf (JU).nes'],
35+
['The Legend of Zelda', 'local-roms/Legend of Zelda, The (U) (PRG1).nes'],
36+
['Lemmings', 'local-roms/Lemmings (U).nes'],
37+
['Lifeforce', 'local-roms/Lifeforce (U).nes'],
38+
39+
['Mario Bros.', 'local-roms/Mario Bros. (JU) [!].nes'],
40+
['Mega Man', 'local-roms/Mega Man (U).nes'],
41+
['Pac-Man', 'local-roms/Pac-Man (U) [!].nes'],
42+
['Super Mario Bros.', 'local-roms/Super Mario Bros. (JU) (PRG0) [!].nes'],
43+
['Tennis', 'local-roms/Tennis (JU) [!].nes'],
44+
['Tetris', 'local-roms/Tetris (U) [!].nes'],
45+
['Tetris 2', 'local-roms/Tetris 2 (U) [!].nes'],
46+
['Zelda II - The Adventure of Link', 'local-roms/Zelda II - The Adventure of Link (U).nes']
4747
],
4848

4949
"Nearly Working": [
50-
['Duck Hunt', 'roms/Duck Hunt (JUE) [!].nes'],
51-
['Super Mario Bros. 3', 'roms/Super Mario Bros. 3 (U) (PRG1) [!].nes']
50+
['Duck Hunt', 'local-roms/Duck Hunt (JUE) [!].nes'],
51+
['Super Mario Bros. 3', 'local-roms/Super Mario Bros. 3 (U) (PRG1) [!].nes']
5252
]
5353
})
5454
});
5555
});
5656
</script>
5757
</head>
5858

59-
<body><div id="wrapper">
59+
<body>
6060
<h1>JSNES</h1>
61-
<p class="summary">A JavaScript <a href="http://en.wikipedia.org/wiki/Nintendo_Entertainment_System">NES</a> emulator. <small>By <a href="/">Ben Firshman</a> <a href="http://twitter.com/bfirsh">@bfirsh</a></small></p>
6261

6362
<div id="emulator"></div>
6463

65-
<script type="text/javascript">
66-
digg_url = 'http://digg.com/playable_web_games/JSNES_A_NES_emulator_written_entirely_in_Javascript';
67-
68-
</script>
69-
<script src="http://digg.com/tools/diggthis.js" type="text/javascript"></script>
70-
<script type="text/javascript" src="http://www.reddit.com/button.js?t=1"></script>
71-
7264
<h2>Controls</h2>
7365
<table id="controls">
7466
<tr>
@@ -116,28 +108,6 @@ <h2>Controls</h2>
116108
<td>Num-3</td>
117109
</tr>
118110
</table>
119-
120-
<h2>About</h2>
121-
<p>A few months ago, I stumbled across Matt Westcott's excellent <a href="http://matt.west.co.tt/spectrum/jsspeccy/">JSSpeccy</a>. I had seen some pretty imaginative <a href="http://en.wikipedia.org/wiki/Canvas_(HTML_element)">canvas</a> creations, but JavaScript emulators? What a perfect idea for a daft new project.</p>
122-
<p>I got underway shamelessly porting <a href="http://www.virtualnes.com/">vNES</a> into JavaScript. Although not the most efficient, it didn't have any of the pointer memory mapping magic associated with emulators written in lower level languages. As such, it was more or less a direct port, bar a few tweaks to compensate for the lack of static typing, and obviously a rewrite of all the I/O.</p>
123-
<p>JSNES runs at full speed on <a href="http://www.google.com/chrome">Google Chrome</a> with a modern computer, so it is highly recommended you use that to play. On <a href="http://www.apple.com/safari/">Safari 4</a> it runs at almost full speed. Otherwise, it just about works on <a href="http://getfirefox.com/">Firefox 3.5</a>, but it's hardly playable.</p>
124-
<p>The source is available on <a href="http://github.com/bfirsh/jsnes/">Github</a>, contributions welcome!</p>
125-
126-
<h2>News</h2>
127-
<h3>7th January 2010</h3>
128-
<p>It has been in the pipeline for a while, but JSNES can now play sound! There is no way of playing dynamically generated sound in JavaScript, but I have created a tiny Flash application reads a buffer from JavaScript then writes it to the sound card. I hope to release this as a reusable library, hopefully opening up many possibilities for cool sound applications such as <a href="/projects/jstunes/">jsTunes</a>.</p>
129-
<p>Playing sound probably won't run at full speed, but Chrome appears to be fastest.</p>
130-
131-
<script type="text/javascript" charset="utf-8">
132-
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
133-
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
134-
</script>
135-
<script type="text/javascript">
136-
try {
137-
var pageTracker = _gat._getTracker("UA-6774621-1");
138-
pageTracker._trackPageview();
139-
} catch(err) {}
140-
</script>
141111

142-
</div></body>
112+
</body>
143113
</html>

jsnes.3.css

-17
This file was deleted.

roms/croom/README.html

+75
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
<!DOCTYPE HTML><html><head>
2+
<title>Concentration Room</title>
3+
<link rel="stylesheet" type="text/css" href="docs/croom.css">
4+
</head><body>
5+
<div id="pgheader"><div class="thereisnosuchthingaspaddingauto">
6+
<h1><img alt="Concentration Room" width="320" height="128" src="docs/croomlogo320.png"></h1>
7+
<ul id="headerlist">
8+
<li><strong>About</strong>
9+
<ul>
10+
<li><a href="#overview">Overview</a>
11+
<li><a href="#requirements">Requirements</a>
12+
<li><a href="#modes">Modes</a>
13+
<li><a href="#faq">FAQ</a>
14+
</ul>
15+
<li><a href="http://pineight.com/croom/dl">Download</a>
16+
</ul>
17+
18+
</div></div><div id="pgbody"><div class="thereisnosuchthingaspaddingauto">
19+
20+
<h2><a name="overview">Overview</a></h2>
21+
<img src="docs/croom_screenshot01.png" style="float:right; margin: 0 0 1em 1em">
22+
<p>
23+
An accident at the biochemical lab has released a neurotoxin,
24+
and you've been quarantined after exposure. Maintain your
25+
sanity by playing a card-matching game.
26+
</p><p>
27+
The table is littered with 10, 20, 36, 52, or 72 face-down cards.
28+
Flip two cards, and if they show the same emblem, you keep them.
29+
If they don't, flip them back.
30+
</p>
31+
32+
<h2><a name="requirements">System Requirements</a></h2>
33+
<p>
34+
Concentration Room is designed for your Nintendo Entertainment System. This version is an NROM-128 (16 KiB PRG, 8 KiB CHR), and it has been tested on a <a title="CompactFlash to NES adapter" href="http://www.retrousb.com/index.php?cPath=24">PowerPak</a>. It also works in PC-based emulators such as <a href="http://nestopia.sourceforge.net/">Nestopia</a> and <a href="http://fceux.com/web/home.html">FCE Ultra</a>.
35+
</p>
36+
37+
<h2><a name="modes">Modes</a></h2>
38+
<dl>
39+
<dt>1 Player Story<dd>
40+
Play solitaire to start to work the toxin out of your system. Then defeat other contaminated technicians and children one on one.
41+
<dt>1 Player Solitaire<dd>
42+
Select a difficulty level, then try to clear the table without having to turn back more than 99 non-matching pairs.
43+
<dt>2 Players<dd>
44+
Two players take turns turning over cards. They can pass one controller back and forth or use one controller each. If a pair doesn't match, the other player presses the A and B Buttons and takes a turn. The first player to take half the pairs wins.
45+
<dt>Vs. CPU<dd>
46+
Like 2 Players, except the second player is controlled by the NES.
47+
</dl>
48+
49+
<h2><a name="faq">FAQ (Fully Anticipated Questions)</a></h2>
50+
<dl>
51+
<dt>How long have you been working on this?<dd>
52+
This is actually my third try. The logo and the earliest background sketch date back to 2000. It got held up because I lacked artistic skill on the 16x16 pixel canvas. The second try in 2007 finalized the appearance of the game, and I did some work on the "emblem designer" that will show up in a future release. In late November 2009, I discovered <a title="Review of Dian Shi Mali on waluigious.com" href="http://www.waluigious.com/2008/09/in-which-dian-shi-ma-li.html"><i>Dian Shi Mali</i></a>, a <a title="Dian Shi Mali article on Wikipedia" href="http://en.wikipedia.org/wiki/Dian_Shi_Mali">gambling simulator</a> for the Famicom (Asian version of the NES) that also uses 16x16 pixel emblems. After a few hours of <a title="Video of Dian Shi Mali play" href="http://www.youtube.com/watch?v=4s1mAPISOzw">pushing Start to rich</a>, I was inspired to create a set of 36 emblems. By then, I was ready to code most of the game in spare time during December 2009.
53+
<dt>Why are you still making games that don't scroll? You're better than that, as I saw in the <a title="Video of a homebrew sidescroller engine" href="http://www.youtube.com/watch?v=GY693NxC9xU">President video</a>.<dd>
54+
I saw it as something simple that I could finish fairly quickly in order to push falling block games off <a href="http://www.pineight.com/">the front page of my web site</a>.
55+
<dt>GameTek already made two other Concentration games on the NES. Why did you make this one?<dd>
56+
The controls in <i>I Can Remember</i> nor <i>Classic Concentration</i> are clunky. Neither of them features a full 72-card deck. And of course, they're not <a title="Free Software Definition (free speech, not free beer)" href="http://www.gnu.org/philosophy/free-sw.html">free software</a>.
57+
<dt>In vs. modes, why end the game at half the cards matched instead of one more than half?<dd>
58+
Pairs early in a game require more skill to clear, and the last pair requires absolutely no skill. For example, a 20-card game tied at 4-4 will always end up 6-4. And at 5-3, the player in the lead likely got more early matches. So if we award no points for the last pair, the first player to reach half always wins.
59+
<dt>What's that font?<dd>
60+
The font in the game's logo is called <a href="http://www.windowfonts.com/fonts/wasted-collection.html">Wasted Collection</a>. The font in <a title="Launcher for small programs for Game Boy Advance" href="http://www.pineight.com/gba/#mbmenu">Multiboot Menu</a> was based on it. The monospace font for menu text originally appeared in the "Who's Cuter" demo and is based on <a href="http://en.wikipedia.org/wiki/Chicago_%28typeface%29">Apple Chicago by Susan Kare</a>. (Another fun font is on <a href="http://www.angelfire.com/stars5/tkcpics2/wildworld/#downloads">this page</a>.)
61+
<dt>Are you a Nazi?<dd>
62+
No, and that's why this game is called Concentration <em>Room,</em> not <a title="National Lampoon video" href="http://www.youtube.com/watch?v=cXeHn9k27Iw">Concentration Camp</a>.
63+
</dl>
64+
<h2>Legal</h2>
65+
<p>
66+
Copyright &copy; 2010 Damian Yerrick &lt;croom&#64;pineight.com&gt;
67+
</p><p>
68+
Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved. This file is offered as-is, without any warranty.
69+
</p><p>
70+
The accompanying program is free software: you can redistribute it and/or modify it under the terms of the <a href="http://www.gnu.org/copyleft/gpl.html">GNU General Public License</a>, version 3 or later. As a special exception, you may copy and distribute exact copies of the program, as published by Damian Yerrick, in iNES or UNIF executable form without source code.
71+
</p><p>
72+
This product is not sponsored or endorsed by Nintendo, Ravensburger, Hasbro, Mattel, Quaker Oats, NBC Universal, GameTek, or Apple.
73+
</p>
74+
</div></div>
75+
</body></html>

roms/croom/croom.nes

24 KB
Binary file not shown.

0 commit comments

Comments
 (0)