From b31e692921f500a1a4c1181171cbc2f361c41e91 Mon Sep 17 00:00:00 2001 From: zeromus Date: Tue, 16 Apr 2013 17:03:16 +0000 Subject: [PATCH] misc slot1 config related stuff --- desmume/src/addons/slot1_retail.cpp | 5 ++++- desmume/src/addons/slot1_retail_nand.cpp | 3 +++ desmume/src/commandline.cpp | 2 +- desmume/src/windows/resource.h | 1 + desmume/src/windows/resources.rc | Bin 1426714 -> 1427422 bytes desmume/src/windows/slot1_config.cpp | 5 ++++- 6 files changed, 13 insertions(+), 3 deletions(-) diff --git a/desmume/src/addons/slot1_retail.cpp b/desmume/src/addons/slot1_retail.cpp index 8fb6cea36..a3ea9eff0 100644 --- a/desmume/src/addons/slot1_retail.cpp +++ b/desmume/src/addons/slot1_retail.cpp @@ -92,10 +92,13 @@ static u32 read32_GCDATAIN(u8 PROCNUM) // Most games continuously compare the chip ID with // the value in memory, probably to know if the card // was removed. - // As DeSmuME boots directly from the game, the chip + // As DeSmuME normally boots directly from the game, the chip // ID in main mem is zero and this value needs to be // zero too. + //note that even if desmume was booting from firmware, and reading this chip ID to store in main memory, + //this still works, since it will have read 00 originally and then read 00 to validate. + //staff of kings verifies this (it also uses the arm7 IRQ 20) if(nds.cardEjected) //TODO - handle this with ejected card slot1 device (and verify using this case) return 0xFFFFFFFF; diff --git a/desmume/src/addons/slot1_retail_nand.cpp b/desmume/src/addons/slot1_retail_nand.cpp index ee6df7a86..197ae5ea1 100644 --- a/desmume/src/addons/slot1_retail_nand.cpp +++ b/desmume/src/addons/slot1_retail_nand.cpp @@ -115,6 +115,9 @@ static u32 read32_GCDATAIN(u8 PROCNUM) // ID in main mem is zero and this value needs to be // zero too. + //note that even if desmume was booting from firmware, and reading this chip ID to store in main memory, + //this still works, since it will have read 00 originally and then read 00 to validate. + //staff of kings verifies this (it also uses the arm7 IRQ 20) if(nds.cardEjected) //TODO - handle this with ejected card slot1 device (and verify using this case) return 0xFFFFFFFF; diff --git a/desmume/src/commandline.cpp b/desmume/src/commandline.cpp index 25b65553e..fcdb88fe7 100644 --- a/desmume/src/commandline.cpp +++ b/desmume/src/commandline.cpp @@ -1,5 +1,5 @@ /* - Copyright (C) 2009-2012 DeSmuME team + Copyright (C) 2009-2013 DeSmuME team This file is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/desmume/src/windows/resource.h b/desmume/src/windows/resource.h index a3910692c..5cddffccc 100644 --- a/desmume/src/windows/resource.h +++ b/desmume/src/windows/resource.h @@ -390,6 +390,7 @@ #define IDC_ADDONS_INFO2 1035 #define IDC_PATHIMG 1036 #define IDC_PIANO_DS 1036 +#define IDC_ADDONS_INFO3 1036 #define IDC_PATH 1037 #define IDC_PATHGAME 1037 #define IDC_PIANO_E 1037 diff --git a/desmume/src/windows/resources.rc b/desmume/src/windows/resources.rc index 0bcb6723648e59b33c3c63d1838c6c331ab08bb7..09a64f08263c3aa6f39c1b0dc01a13a12367b7d2 100644 GIT binary patch delta 554 zcmY*WO)ErE7=G_uckb~qW*9fh$P^1{@-;KQQrNK}7A7SbANfdzYg}eWZr!qAq`V~? zWg*J7kh2}d=Au|CDOUUeWh3w0(UeY4=bZO>&-0vfo`bE(>rP}{7j%a%>N%Iv{v)=V z$`D$Exuf`aEA?Q~RD6c^BoUlkdy>x&z0DAU0QeyY4bWt-T5+Q~FNj?)&UeuOX%bUVs1l@w|)_3UK10cazIFof{ap&a4W66=sdwrUeD-MOo{Pi18u zF$m54de|cgcyXFvjbock6T{Ge&ztNUU-re?&S8kb3SDXyW?`O&9~MES+BifB^N_H) zC@esnR&iqd#7_|yqY=m5Gg-m=6WLduW@kuc*?wA-WBv$Dniwd4zm!4HmqQ{FTiD!!ljmG7INkvpKFA*0!7A;nsFh>MdK(181a&i;-+vO$-Y?qrTc;F$5 k9K=uCfqq)T*j`sE1jNEXEV8|>RJ6(uu5^3A5z#(o03v&HIRF3v diff --git a/desmume/src/windows/slot1_config.cpp b/desmume/src/windows/slot1_config.cpp index 1c22811fe..0c31b970b 100644 --- a/desmume/src/windows/slot1_config.cpp +++ b/desmume/src/windows/slot1_config.cpp @@ -1,5 +1,5 @@ /* - Copyright (C) 2011-2012 DeSmuME team + Copyright (C) 2011-2013 DeSmuME team This file is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -126,6 +126,9 @@ BOOL CALLBACK Slot1Box_Proc(HWND dialog, UINT msg,WPARAM wparam,LPARAM lparam) _OKbutton_slot1 = false; wndConfigSlot1=CreateDialogW(hAppInst, MAKEINTRESOURCEW(Slot1_IDDs[temp_type_slot1]), dialog, (DLGPROC)Slot1_Procs[temp_type_slot1]); + //SetWindowPos(GetDlgItem(dialog, IDC_ADDONS_INFO),HWND_TOP,0,0,0,0,SWP_NOMOVE|SWP_NOSIZE); + //EnableWindow(GetDlgItem(dialog, IDC_ADDONS_INFO),FALSE); + //EnableWindow(GetDlgItem(dialog, IDC_ADDONS_INFO),TRUE); if ( (temp_type_slot1 == 0) || (_OKbutton_slot1) ) EnableWindow(OKbutton_slot1, TRUE); else