Trivial tool to rip PRG from NROM .nes files
authorAlyssa Rosenzweig <alyssa@backtick.town>
Wed, 29 Jun 2016 22:56:20 +0000 (15:56 -0700)
committerAlyssa Rosenzweig <alyssa@backtick.town>
Wed, 29 Jun 2016 22:56:20 +0000 (15:56 -0700)
src/tools/rip.js [new file with mode: 0644]

diff --git a/src/tools/rip.js b/src/tools/rip.js
new file mode 100644 (file)
index 0000000..ab26ac6
--- /dev/null
@@ -0,0 +1,9 @@
+/* rip.js
+ * rips an NROM-32 .nes file
+ */
+
+var fs = require("fs");
+var name = process.argv[2].split(".").slice(0, -1).join(".");
+var game = fs.readFileSync(process.argv[2]);
+var PRGROM = game.slice(16, 16 + 32768);
+fs.writeFileSync(name + ".hex", PRGROM);
This page took 0.028738 seconds and 4 git commands to generate.