o crc checking rom

This commit is contained in:
optixx
2009-04-25 20:41:02 +02:00
parent edf204ac24
commit 4a083cbea3
32 changed files with 1553 additions and 0 deletions

17
snes/crc/pad.c Normal file
View File

@@ -0,0 +1,17 @@
#include "data.h";
#include "pad.h";
void enablePad(void) {
// Enable pad reading and NMI
*(byte*)0x4200 = 0x81;
}
padStatus readPad(byte padNumber) {
word test;
padStatus *status;
padNumber = padNumber << 1;
test = (word) *(byte*)0x4218+padNumber << 8;
test |= (word) *(byte*)0x4219+padNumber;
status = (padStatus *) &test;
return *status;
}