This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Optimized Alea | |
---------------------- | |
Based on Alea by Johannes Baagøe (2010) which is based on MWC by George Marsaglia and Arif Zaman (1991). | |
Should be fast and pass BigCrush statistical test suite. It's quite fast but the quality is unverified. | |
Used like so: | |
var rand = Alea("test123"); | |
rand(); // 0.7390809920616448 | |
rand(); // 0.3916741746943444 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function rc4(key, data) { | |
var output = [], S = [], tmp, i, j = 0; | |
for (i = 0; i < 256; i++) { | |
S[i] = i; | |
} | |
for (i = 0; i < 256; i++) { | |
j = (j + S[i] + key[i % key.length]) % 256; | |
tmp = S[i]; | |
S[i] = S[j]; | |
S[j] = tmp; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Cyclic redundancy check (CRC-4, CRC-8, CRC-16, CRC-32) | |
Common CRC implementation supporting wide range of configurations: | |
http://reveng.sourceforge.net/crc-catalogue/all.htm | |
NOTE: These common polynomials are likely suboptimal. | |
In the future I should make a page of Koopman's best general purpose polynomials. | |
http://github.com/bryc |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdlib.h> | |
#include <stdio.h> | |
#include <stdint.h> | |
unsigned char *data; | |
int len = 0; | |
int cyrb32() { | |
uint32_t i, tmp, sum = 0xbf3931a8; | |
for(i = 32; i < len; i++) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var p = ["RHYDON","KANGASKHAN","NIDORAN_M","CLEFAIRY","SPEAROW","VOLTORB","NIDOKING","SLOWBRO","IVYSAUR","EXEGGUTOR","LICKITUNG","EXEGGCUTE","GRIMER","GENGAR","NIDORAN_F","NIDOQUEEN","CUBONE","RHYHORN","LAPRAS","ARCANINE","MEW","GYARADOS","SHELLDER","TENTACOOL","GASTLY","SCYTHER","STARYU","BLASTOISE","PINSIR","TANGELA","MISSINGNO_1F","MISSINGNO_20","GROWLITHE","ONIX","FEAROW","PIDGEY","SLOWPOKE","KADABRA","GRAVELER","CHANSEY","MACHOKE","MR_MIME","HITMONLEE","HITMONCHAN","ARBOK","PARASECT","PSYDUCK","DROWZEE","GOLEM","MISSINGNO_32","MAGMAR","MISSINGNO_34","ELECTABUZZ","MAGNETON","KOFFING","MISSINGNO_38","MANKEY","SEEL","DIGLETT","TAUROS","MISSINGNO_3D","MISSINGNO_3E","MISSINGNO_3F","FARFETCHD","VENONAT","DRAGONITE","MISSINGNO_43","MISSINGNO_44","MISSINGNO_45","DODUO","POLIWAG","JYNX","MOLTRES","ARTICUNO","ZAPDOS","DITTO","MEOWTH","KRABBY","MISSINGNO_4F","MISSINGNO_50","MISSINGNO_51","VULPIX","NINETALES","PIKACHU","RAICHU","MISSINGNO_56","MISSINGNO_57","DRATINI","DRAGONAIR","KABUTO","KABUTOPS","HORSEA","SEADRA" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function noteFromKey(keyCode) { | |
var char = String.fromCharCode(keyCode).toUpperCase(); | |
if(pianoMap[char]) { | |
return pianoMap[char]; | |
} | |
else { | |
return false; | |
} | |
} | |
/* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original process: | |
ultraSMS and ultraMSX2 both have a rominserter.exe file which insert a ROM into | |
the respective v64 (byteswapped) emulator at a specific offset. It actually inserts the ROM byteswapped, | |
allowing the V64jr or other to re-swap it when loading on the N64. This is quite stupid. | |
The filesize of the output ROM appears to be incompatible with 64drive, and must be 1052672 bytes. | |
Also, to run on 64drive's USB mode, they must not be in v64 format, and must be in the original z64 format. | |
TODO: Load large ROMs into the rominserter and see exactly where it stops writing at. Should shed light |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<links> | |
<entry name="Project 2612 - Mega Drive Music Archive" url="http://project2612.org/"/> | |
<entry name="SMSPower/VGM - Sega 8-bit Music Archive" url="http://www.smspower.org/Music/VGMs"/> | |
<entry name="SNES Music - SNES Music Music Archive" url="http://snesmusic.org/v2/"/> | |
<entry name="NSF Directory - Nintendo Music" url="http://nsf.joshw.info/"/> | |
<entry name="Zophar/disch - NSFE Archive" url="http://disch.zophar.net/nsfe.php"/> | |
<entry name="melcom's Chiptune Archive - YM, MOD, Adlib" url="http://chiptunes.back2roots.org"/> | |
<entry name="USF @ hcs64 - Nintendo 64 Music" url="http://usf.hcs64.com/"/> | |
<entry name="" url="http://kss.joshw.info/"/> | |
<entry name="" url="http://hes.joshw.info/"/> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- In case you forget how to use the FileReader API --> | |
<script> | |
window.ondragover = function () {return false;}; | |
window.ondrop = function (e) | |
{ | |
var reader = new FileReader(); | |
reader.readAsText(e.dataTransfer.files[0]); | |
reader.onprogress = function (Z) |