o add snes fatfs dummy

o add fatfs custom chip to bsnes
o finishes fatfs linux backend smaple
This commit is contained in:
david
2009-05-26 17:07:39 +02:00
parent 0fd42d7b1d
commit 660767c464
33 changed files with 1241 additions and 121 deletions

61
snes/fatfstest/main.c Normal file
View File

@@ -0,0 +1,61 @@
#include "data.h";
#include "pad.h";
#include "event.h";
#include "myEvents.h";
#include "ressource.h";
#include "PPU.h"
#include "debug.h"
#include <stdlib.h>
padStatus pad1;
void initInternalRegisters(void) {
characterLocation[0] = 0x0000;
characterLocation[1] = 0x0000;
characterLocation[2] = 0x0000;
characterLocation[3] = 0x0000;
initDebugMap();
}
void preInit(void) {
// For testing purpose ...
// Insert code here to be executed before register init
}
void main(void) {
word i,j;
word crc01;
word crc02;
padStatus pad1;
char line_header[32] = "OK2";
char packet[4] = "TEST";
initInternalRegisters();
*(byte*) 0x2105 = 0x01; // MODE 1 value
*(byte*) 0x212c = 0x01; // Plane 0 (bit one) enable register
*(byte*) 0x212d = 0x00; // All subPlane disable
*(byte*) 0x2100 = 0x0f; // enable background
enableDebugScreen();
printDebugScreen(line_header,0);
printf("Debugging console test\n");
printf("test me\n");
printDebugScreen(line_header,1);
while(1){
while(!pad1.start) {
waitForVBlank();
pad1 = readPad((byte) 0);
}
}
while(1);
}
void IRQHandler(void) {
}
void NMIHandler(void) {
//processEvents();
}