diff --git a/desmume/src/NDSSystem.c b/desmume/src/NDSSystem.c index 7377596a8..7093328bd 100644 --- a/desmume/src/NDSSystem.c +++ b/desmume/src/NDSSystem.c @@ -26,6 +26,7 @@ #include "ROMReader.h" NDSSystem nds; +NDSFirmware firmware; int NDS_Init(void) { nds.ARM9Cycle = 0; @@ -44,6 +45,15 @@ int NDS_Init(void) { if (SPU_Init(SNDCORE_DUMMY, 735) != 0) return -1; + + sprintf(firmware.nickName,"yopyop"); + firmware.nickLen = strlen(firmware.nickName); + sprintf(firmware.message,"Hi,it/s me!"); + firmware.msgLen = strlen(firmware.message); + firmware.bDay = 15; + firmware.bMonth = 7; + firmware.favColor = 10; + firmware.language = 2; #ifdef EXPERIMENTAL_WIFI WIFI_Init(&wifiMac) ; @@ -365,32 +375,19 @@ void NDS_Reset(void) // logcount = 0; MMU_writeByte(0, 0x023FFC80, 1); - MMU_writeByte(0, 0x023FFC82, 10); - MMU_writeByte(0, 0x023FFC83, 7); - MMU_writeByte(0, 0x023FFC84, 15); + MMU_writeByte(0, 0x023FFC82, firmware.favColor); + MMU_writeByte(0, 0x023FFC83, firmware.bMonth); + MMU_writeByte(0, 0x023FFC84, firmware.bDay); - MMU_writeHWord(0, 0x023FFC86, 'y'); - MMU_writeHWord(0, 0x023FFC88, 'o'); - MMU_writeHWord(0, 0x023FFC8A, 'p'); - MMU_writeHWord(0, 0x023FFC8C, 'y'); - MMU_writeHWord(0, 0x023FFC8E, 'o'); - MMU_writeHWord(0, 0x023FFC90, 'p'); - MMU_writeHWord(0, 0x023FFC9A, 6); + for(i=0; iFNameTblOff); MMU_writeWord(0, 0x027FFE44, header->FNameTblSize); @@ -560,7 +557,6 @@ int NDS_WriteBMP(const char *filename) int NDS_CreateDummyFirmware(void) { #ifdef EXPERIMENTAL_WIFI - memcpy(MMU.fw.data+0x36,FW_Mac,sizeof(FW_Mac)) ; memcpy(MMU.fw.data+0x44,FW_WIFIInit,sizeof(FW_WIFIInit)) ; MMU.fw.data[0x41] = 18 ; /* bits per RF value */ diff --git a/desmume/src/NDSSystem.h b/desmume/src/NDSSystem.h index 663a5da5f..3d8dff585 100644 --- a/desmume/src/NDSSystem.h +++ b/desmume/src/NDSSystem.h @@ -111,7 +111,21 @@ typedef struct u16 touchY; } NDSSystem; +typedef struct +{ + u8 favColor; + u8 bMonth; + u8 bDay; + char nickName[10]; + u8 nickLen; + char message[26]; + u8 msgLen; + u8 language; + +} NDSFirmware; + extern NDSSystem nds; +extern NDSFirmware firmware; int NDSInit(void); void NDSDeInit(void); diff --git a/desmume/src/matrix.c b/desmume/src/matrix.c index e6be6f882..1bb804b29 100644 --- a/desmume/src/matrix.c +++ b/desmume/src/matrix.c @@ -243,4 +243,4 @@ float * MatrixStackGet (MatrixStack *stack) void MatrixStackLoadMatrix (MatrixStack *stack, int pos, float *ptr) { MatrixCopy (&stack->matrix[pos*16], ptr); -} \ No newline at end of file +} diff --git a/desmume/src/matrix.h b/desmume/src/matrix.h index b46de1696..c15639cef 100644 --- a/desmume/src/matrix.h +++ b/desmume/src/matrix.h @@ -47,4 +47,4 @@ float* MatrixStackGetPos (MatrixStack *stack, int pos); float* MatrixStackGet (MatrixStack *stack); void MatrixStackLoadMatrix (MatrixStack *stack, int pos, float *ptr); -#endif \ No newline at end of file +#endif