add missing tests

This commit is contained in:
optixx
2009-08-28 08:47:26 +02:00
parent f273b986c1
commit b1db3f6ae0
29 changed files with 3093 additions and 1895 deletions

26
snes/loadertest/pad.c Normal file
View File

@@ -0,0 +1,26 @@
#include "data.h";
#include "pad.h";
#include "debug.h";
void enablePad(void)
{
// Enable pad reading and NMI
*(byte *) 0x4200 = 0x01;
}
void disablePad(void)
{
// Enable pad reading and NMI
*(byte *) 0x4200 = 0x00;
}
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;
}