diff --git a/desmume/AUTHORS b/AUTHORS similarity index 100% rename from desmume/AUTHORS rename to AUTHORS diff --git a/desmume/COPYING b/COPYING similarity index 100% rename from desmume/COPYING rename to COPYING diff --git a/desmume/ChangeLog b/ChangeLog similarity index 100% rename from desmume/ChangeLog rename to ChangeLog diff --git a/desmume/INSTALL b/INSTALL similarity index 100% rename from desmume/INSTALL rename to INSTALL diff --git a/desmume/Makefile.am b/Makefile.am similarity index 100% rename from desmume/Makefile.am rename to Makefile.am diff --git a/desmume/NEWS b/NEWS similarity index 100% rename from desmume/NEWS rename to NEWS diff --git a/desmume/README b/README similarity index 100% rename from desmume/README rename to README diff --git a/desmume/README.LIN b/README.LIN similarity index 100% rename from desmume/README.LIN rename to README.LIN diff --git a/desmume/README.MAC b/README.MAC similarity index 100% rename from desmume/README.MAC rename to README.MAC diff --git a/desmume/README.TRANSLATION b/README.TRANSLATION similarity index 100% rename from desmume/README.TRANSLATION rename to README.TRANSLATION diff --git a/desmume/README.WIN b/README.WIN similarity index 100% rename from desmume/README.WIN rename to README.WIN diff --git a/desmume/TODO b/TODO similarity index 100% rename from desmume/TODO rename to TODO diff --git a/desmume/autogen.sh b/autogen.sh similarity index 100% rename from desmume/autogen.sh rename to autogen.sh diff --git a/desmume/autopackage/default.apspec.in b/autopackage/default.apspec.in similarity index 100% rename from desmume/autopackage/default.apspec.in rename to autopackage/default.apspec.in diff --git a/desmume/compile b/compile similarity index 100% rename from desmume/compile rename to compile diff --git a/desmume/configure.ac b/configure.ac similarity index 99% rename from desmume/configure.ac rename to configure.ac index b028b91c8..abc79310a 100644 --- a/desmume/configure.ac +++ b/configure.ac @@ -1,7 +1,7 @@ dnl --- Package name is first argument to AC_INIT dnl --- Release version is second argument to AC_INIT -AC_INIT(desmume, [svn]) +AC_INIT(desmume, [0.9.2]) dnl -- find target architecture for some os specific libraries AC_CANONICAL_TARGET @@ -59,7 +59,6 @@ AC_ARG_ENABLE([osmesa], [osmesa=no]) if test "x$osmesa" = "xyes" ; then - AC_CHECK_LIB(dl, main) AC_CHECK_LIB(OSMesa, main,[ useosmesa=yes AC_DEFINE(HAVE_LIBOSMESA) diff --git a/desmume/src/mic.h b/desmume/src/mic.h deleted file mode 100644 index 06c3c9a12..000000000 --- a/desmume/src/mic.h +++ /dev/null @@ -1,16 +0,0 @@ -#ifndef MIC_H -#define MIC_H - -#ifdef WIN32 -extern int MicButtonPressed; -static char MicSampleName[256]; -char* LoadSample(const char *name); -extern int MicDisplay; -#endif - -BOOL Mic_Init(); -void Mic_Reset(); -void Mic_DeInit(); -u8 Mic_ReadSample(); - -#endif diff --git a/desmume/src/windows/memView.cpp b/desmume/src/windows/memView.cpp deleted file mode 100644 index 34ff9499b..000000000 --- a/desmume/src/windows/memView.cpp +++ /dev/null @@ -1,583 +0,0 @@ -/* Copyright (C) 2006 yopyop - yopyop156@ifrance.com - yopyop156.ifrance.com - - This file is part of DeSmuME - - DeSmuME is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - DeSmuME is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with DeSmuME; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -*/ - - -#include "../MMU.h" -#include "debug.h" -#include "resource.h" -#include "common.h" -#include -#include -#include -#include -#include "memView.h" - -using namespace std; - -////////////////////////////////////////////////////////////////////////////// - -typedef struct MemView_DataStruct -{ - MemView_DataStruct(u8 CPU) : cpu(CPU), address(0x02000000), viewMode(0) - { - } - - HWND hDlg; - u8 cpu; - u32 address; - u8 viewMode; -} MemView_DataStruct; - -MemView_DataStruct * MemView_Data[2] = {NULL, NULL}; - -////////////////////////////////////////////////////////////////////////////// - -BOOL MemView_Init() -{ - WNDCLASSEX wc; - - wc.cbSize = sizeof(wc); - wc.lpszClassName = "MemView_ViewBox"; - wc.hInstance = hAppInst; - wc.lpfnWndProc = MemView_ViewBoxProc; - wc.hCursor = LoadCursor(NULL, IDC_ARROW); - wc.hIcon = 0; - wc.lpszMenuName = 0; - wc.hbrBackground = GetSysColorBrush(COLOR_BTNFACE); - wc.style = 0; - wc.cbClsExtra = 0; - wc.cbWndExtra = sizeof(MemView_DataStruct); - wc.hIconSm = 0; - - RegisterClassEx(&wc); - - return 1; -} - -void MemView_DeInit() -{ - UnregisterClass("MemView_ViewBox", hAppInst); -} - -////////////////////////////////////////////////////////////////////////////// - -BOOL MemView_DlgOpen(HWND hParentWnd, u8 CPU) -{ - HWND hDlg; - char title[32]; - - MemView_Data[CPU] = new MemView_DataStruct(CPU); - if(MemView_Data[CPU] == NULL) - return 0; - - hDlg = CreateDialogParam(hAppInst, MAKEINTRESOURCE(IDD_MEM_VIEW), hParentWnd, MemView_DlgProc, (LPARAM)MemView_Data[CPU]); - if(hDlg == NULL) - return 0; - - MemView_Data[CPU]->hDlg = hDlg; - - sprintf(title, "ARM%s memory", ((CPU == ARMCPU_ARM7) ? "7" : "9")); - SetWindowText(hDlg, title); - - ShowWindow(hDlg, SW_SHOW); - UpdateWindow(hDlg); - - return 1; -} - -void MemView_DlgClose(u8 CPU) -{ - if(MemView_Data[CPU] != NULL) - { - DestroyWindow(MemView_Data[CPU]->hDlg); - delete MemView_Data[CPU]; - MemView_Data[CPU] = NULL; - } -} - -BOOL MemView_IsOpened(u8 CPU) -{ - return (MemView_Data[CPU] != NULL); -} - -void MemView_Refresh(u8 CPU) -{ - InvalidateRect(MemView_Data[CPU]->hDlg, NULL, FALSE); - UpdateWindow(MemView_Data[CPU]->hDlg); -} - -////////////////////////////////////////////////////////////////////////////// - -LRESULT MemView_DlgPaint(HWND hDlg, MemView_DataStruct *data, WPARAM wParam, LPARAM lParam) -{ - HDC hdc; - PAINTSTRUCT ps; - - hdc = BeginPaint(hDlg, &ps); - - EndPaint(hDlg, &ps); - - return 0; -} - -BOOL CALLBACK MemView_DlgProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) -{ - MemView_DataStruct *data = (MemView_DataStruct*)GetWindowLong(hDlg, DWL_USER); - if((data == NULL) && (uMsg != WM_INITDIALOG)) - return 0; - - switch(uMsg) - { - case WM_INITDIALOG: - { - if(data == NULL) - { - data = (MemView_DataStruct*)lParam; - SetWindowLong(hDlg, DWL_USER, (LONG)data); - } - - CheckRadioButton(hDlg, IDC_8_BIT, IDC_32_BIT, IDC_8_BIT); - - SendMessage(GetDlgItem(hDlg, IDC_ADDRESS), EM_SETLIMITTEXT, 8, 0); - SetWindowText(GetDlgItem(hDlg, IDC_ADDRESS), "02000000"); - - SetWindowLong(GetDlgItem(hDlg, IDC_MEMVIEWBOX), DWL_USER, (LONG)data); - - InvalidateRect(hDlg, NULL, FALSE); UpdateWindow(hDlg); - } - return 1; - - case WM_CLOSE: - case WM_DESTROY: - MemView_DlgClose(data->cpu); - return 1; - - case WM_PAINT: - MemView_DlgPaint(hDlg, data, wParam, lParam); - return 1; - - case WM_COMMAND: - switch(LOWORD(wParam)) - { - case IDCANCEL: - MemView_DlgClose(data->cpu); - return 1; - - case IDC_8_BIT: - case IDC_16_BIT: - case IDC_32_BIT: - CheckRadioButton(hDlg, IDC_8_BIT, IDC_32_BIT, LOWORD(wParam)); - data->viewMode = (LOWORD(wParam) - IDC_8_BIT); - InvalidateRect(hDlg, NULL, FALSE); UpdateWindow(hDlg); - return 1; - - case IDC_GO: - { - char addrstr[9]; - int len; - int i; - int shift; - BOOL error = FALSE; - u32 address = 0x00000000; - - len = GetWindowText(GetDlgItem(hDlg, IDC_ADDRESS), addrstr, 9); - - for(i = 0; i < len; i++) - { - char ch = addrstr[i]; - - if((ch >= '0') && (ch <= '9')) - continue; - - if((ch >= 'A') && (ch <= 'F')) - continue; - - if((ch >= 'a') && (ch <= 'f')) - continue; - - if(ch == '\0') - break; - - error = TRUE; - break; - } - - if(error) - { - MessageBox(hDlg, "Error:\nInvalid address specified.\nThe address must be an hexadecimal value.", "DeSmuME", (MB_OK | MB_ICONERROR)); - SetWindowText(GetDlgItem(hDlg, IDC_ADDRESS), ""); - return 1; - } - - for(i = (len-1), shift = 0; i >= 0; i--, shift += 4) - { - char ch = addrstr[i]; - - if((ch >= '0') && (ch <= '9')) - address |= ((ch - '0') << shift); - else if((ch >= 'A') && (ch <= 'F')) - address |= ((ch - 'A' + 0xA) << shift); - else if((ch >= 'a') && (ch <= 'f')) - address |= ((ch - 'a' + 0xA) << shift); - } - - data->address = min((u32)0xFFFFFF00, (address & 0xFFFFFFF0)); - SetScrollPos(GetDlgItem(hDlg, IDC_MEMVIEWBOX), SB_VERT, ((data->address >> 4) & 0x000FFFFF), TRUE); - InvalidateRect(hDlg, NULL, FALSE); UpdateWindow(hDlg); - } - return 1; - - case IDC_TEXTDUMP: - { - char fileName[256] = ""; - OPENFILENAME ofn; - - ZeroMemory(&ofn, sizeof(ofn)); - ofn.lStructSize = sizeof(ofn); - ofn.hwndOwner = hDlg; - ofn.lpstrFilter = "Text file (*.txt)\0*.txt\0Any file (*.*)\0*.*\0\0"; - ofn.nFilterIndex = 1; - ofn.lpstrFile = fileName; - ofn.nMaxFile = 256; - ofn.lpstrDefExt = "txt"; - ofn.Flags = OFN_NOCHANGEDIR; - - if(GetSaveFileName(&ofn)) - { - FILE *f; - u8 memory[0x100]; - int line; - - MMU_DumpMemBlock(data->cpu, data->address, 0x100, memory); - - f = fopen(fileName, "a"); - - for(line = 0; line < 16; line++) - { - int i; - - fprintf(f, "%08X\t\t", (data->address + (line << 4))); - - switch(data->viewMode) - { - case 0: - { - for(i = 0; i < 16; i++) - { - fprintf(f, "%02X ", T1ReadByte(memory, ((line << 4) + i))); - } - fprintf(f, "\t"); - } - break; - - case 1: - { - for(i = 0; i < 16; i += 2) - { - fprintf(f, "%04X ", T1ReadWord(memory, ((line << 4) + i))); - } - fprintf(f, "\t\t"); - } - break; - - case 2: - { - for(i = 0; i < 16; i += 4) - { - fprintf(f, "%08X ", T1ReadLong(memory, ((line << 4) + i))); - } - fprintf(f, "\t\t\t"); - } - break; - } - - for(i = 0; i < 16; i++) - { - u8 val = T1ReadByte(memory, ((line << 4) + i)); - - if((val >= 32) && (val <= 127)) - fprintf(f, "%c", (char)val); - else - fprintf(f, "."); - } - fprintf(f, "\n"); - } - - fclose(f); - } - } - return 1; - - case IDC_RAWDUMP: - { - char fileName[256] = ""; - OPENFILENAME ofn; - - ZeroMemory(&ofn, sizeof(ofn)); - ofn.lStructSize = sizeof(ofn); - ofn.hwndOwner = hDlg; - ofn.lpstrFilter = "Binary file (*.bin)\0*.bin\0Any file (*.*)\0*.*\0\0"; - ofn.nFilterIndex = 1; - ofn.lpstrFile = fileName; - ofn.nMaxFile = 256; - ofn.lpstrDefExt = "bin"; - ofn.Flags = OFN_NOCHANGEDIR; - - if(GetSaveFileName(&ofn)) - { - FILE *f; - u8 memory[0x100]; - int line; - - MMU_DumpMemBlock(data->cpu, data->address, 0x100, memory); - - f = fopen(fileName, "ab"); - - fwrite(memory, 0x100, 1, f); - - fclose(f); - } - } - return 1; - } - return 0; - } - - return 0; -} - -////////////////////////////////////////////////////////////////////////////// - -LRESULT MemView_ViewBoxPaint(HWND hCtl, MemView_DataStruct *data, WPARAM wParam, LPARAM lParam) -{ - HDC hdc; - PAINTSTRUCT ps; - RECT rc; - int w, h; - SIZE fontsize; - int fontwidth, fontheight; - HDC mem_hdc; - HBITMAP mem_bmp; - - GetClientRect(hCtl, &rc); - w = (rc.right - rc.left); - h = (rc.bottom - rc.top); - - hdc = BeginPaint(hCtl, &ps); - - mem_hdc = CreateCompatibleDC(hdc); - mem_bmp = CreateCompatibleBitmap(hdc, w, h); - SelectObject(mem_hdc, mem_bmp); - - SelectObject(mem_hdc, GetStockObject(SYSTEM_FIXED_FONT)); - - GetTextExtentPoint32(mem_hdc, " ", 1, &fontsize); - fontwidth = fontsize.cx; - fontheight = fontsize.cy; - - FillRect(mem_hdc, &rc, (HBRUSH)GetStockObject(WHITE_BRUSH)); - - if(data != NULL) - { - u32 addr = data->address; - u8 memory[0x100]; - char text[80]; - int startx, cury; - int line; - - startx = 0; - cury = 0; - - sprintf(text, " "); - GetTextExtentPoint32(mem_hdc, text, strlen(text), &fontsize); - startx = (fontsize.cx + 5); - cury = (fontsize.cy + 3); - - MoveToEx(mem_hdc, (fontsize.cx + 2), 0, NULL); - LineTo(mem_hdc, (fontsize.cx + 2), h); - - MoveToEx(mem_hdc, 0, (fontsize.cy + 1), NULL); - LineTo(mem_hdc, w, (fontsize.cy + 1)); - - switch(data->viewMode) - { - case 0: - { - sprintf(text, " 0 1 2 3 4 5 6 7 8 9 A B C D E F 0123456789ABCDEF"); - TextOut(mem_hdc, startx, 0, text, strlen(text)); - } - break; - - case 1: - { - sprintf(text, " 0 1 2 3 4 5 6 7 8 9 A B C D E F 0123456789ABCDEF"); - TextOut(mem_hdc, startx, 0, text, strlen(text)); - } - break; - - case 2: - { - sprintf(text, " 0 1 2 3 4 5 6 7 8 9 A B C D E F 0123456789ABCDEF"); - TextOut(mem_hdc, startx, 0, text, strlen(text)); - } - break; - } - - MMU_DumpMemBlock(data->cpu, data->address, 0x100, memory); - - for(line = 0; line < 16; line++, addr += 0x10) - { - int i; - - sprintf(text, "%08X", addr); - TextOut(mem_hdc, 0, cury, text, strlen(text)); - - switch(data->viewMode) - { - case 0: - { - sprintf(text, " "); - for(i = 0; i < 16; i++) - { - sprintf(text, "%s%02X ", text, T1ReadByte(memory, ((line << 4) + i))); - } - sprintf(text, "%s ", text); - } - break; - - case 1: - { - sprintf(text, " "); - for(i = 0; i < 16; i += 2) - { - sprintf(text, "%s%04X ", text, T1ReadWord(memory, ((line << 4) + i))); - } - sprintf(text, "%s ", text); - } - break; - - case 2: - { - sprintf(text, " "); - for(i = 0; i < 16; i += 4) - { - sprintf(text, "%s%08X ", text, T1ReadLong(memory, ((line << 4) + i))); - } - sprintf(text, "%s ", text); - } - break; - } - - for(i = 0; i < 16; i++) - { - u8 val = T1ReadByte(memory, ((line << 4) + i)); - - if((val >= 32) && (val <= 127)) - sprintf(text, "%s%c", text, (char)val); - else - sprintf(text, "%s.", text); - } - - TextOut(mem_hdc, startx, cury, text, strlen(text)); - - cury += fontheight; - } - } - - BitBlt(hdc, 0, 0, w, h, mem_hdc, 0, 0, SRCCOPY); - - DeleteDC(mem_hdc); - DeleteObject(mem_bmp); - - EndPaint(hCtl, &ps); - - return 0; -} - -LRESULT CALLBACK MemView_ViewBoxProc(HWND hCtl, UINT uMsg, WPARAM wParam, LPARAM lParam) -{ - MemView_DataStruct *data = (MemView_DataStruct*)GetWindowLong(hCtl, DWL_USER); - - switch(uMsg) - { - case WM_NCCREATE: - SetScrollRange(hCtl, SB_VERT, 0x00000000, 0x000FFFF0, TRUE); - SetScrollPos(hCtl, SB_VERT, 0x00000000, TRUE); - return 1; - - case WM_NCDESTROY: - return 1; - - case WM_ERASEBKGND: - return 1; - - case WM_PAINT: - MemView_ViewBoxPaint(hCtl, data, wParam, lParam); - return 1; - - case WM_VSCROLL: - { - int firstpos = GetScrollPos(hCtl, SB_VERT); - - switch(LOWORD(wParam)) - { - case SB_LINEUP: - data->address = (u32)max(0x00000000, ((int)data->address - 0x10)); - break; - - case SB_LINEDOWN: - data->address = min((u32)0xFFFFFF00, (data->address + 0x10)); - break; - - case SB_PAGEUP: - data->address = (u32)max(0x00000000, ((int)data->address - 0x100)); - break; - - case SB_PAGEDOWN: - data->address = min((u32)0xFFFFFF00, (data->address + 0x100)); - break; - - case SB_THUMBTRACK: - case SB_THUMBPOSITION: - { - SCROLLINFO si; - - ZeroMemory(&si, sizeof(si)); - si.cbSize = sizeof(si); - si.fMask = SIF_TRACKPOS; - - GetScrollInfo(hCtl, SB_VERT, &si); - - data->address = min((u32)0xFFFFFF00, (data->address + ((si.nTrackPos - firstpos) * 16))); - } - break; - } - - SetScrollPos(hCtl, SB_VERT, ((data->address >> 4) & 0x000FFFFF), TRUE); - InvalidateRect(hCtl, NULL, FALSE); UpdateWindow(hCtl); - } - return 1; - } - - return DefWindowProc(hCtl, uMsg, wParam, lParam); -} - -////////////////////////////////////////////////////////////////////////////// diff --git a/desmume/po/ChangeLog b/po/ChangeLog similarity index 100% rename from desmume/po/ChangeLog rename to po/ChangeLog diff --git a/desmume/po/LINGUAS b/po/LINGUAS similarity index 100% rename from desmume/po/LINGUAS rename to po/LINGUAS diff --git a/desmume/po/PACKAGE b/po/PACKAGE similarity index 100% rename from desmume/po/PACKAGE rename to po/PACKAGE diff --git a/desmume/po/POTFILES.in b/po/POTFILES.in similarity index 100% rename from desmume/po/POTFILES.in rename to po/POTFILES.in diff --git a/desmume/po/desmume.pot b/po/desmume.pot similarity index 100% rename from desmume/po/desmume.pot rename to po/desmume.pot diff --git a/desmume/po/fr.po b/po/fr.po similarity index 100% rename from desmume/po/fr.po rename to po/fr.po diff --git a/desmume/po/pt_BR.po b/po/pt_BR.po similarity index 100% rename from desmume/po/pt_BR.po rename to po/pt_BR.po diff --git a/desmume/po/sv.po b/po/sv.po similarity index 100% rename from desmume/po/sv.po rename to po/sv.po diff --git a/desmume/po/windows/en_US.po b/po/windows/en_US.po similarity index 100% rename from desmume/po/windows/en_US.po rename to po/windows/en_US.po diff --git a/desmume/po/windows/fr_FR.po b/po/windows/fr_FR.po similarity index 100% rename from desmume/po/windows/fr_FR.po rename to po/windows/fr_FR.po diff --git a/desmume/src/ARM9.h b/src/ARM9.h similarity index 68% rename from desmume/src/ARM9.h rename to src/ARM9.h index 0a9b6849d..1208358ef 100644 --- a/desmume/src/ARM9.h +++ b/src/ARM9.h @@ -11,16 +11,18 @@ struct ALIGN(16) ARM9_struct { u8 ARM9_REG[0x1000000]; u8 ARM9_BIOS[0x8000]; u8 ARM9_VMEM[0x800]; + u8 ARM9_ABG[0x80000]; + u8 ARM9_BBG[0x20000]; + u8 ARM9_AOBJ[0x40000]; + u8 ARM9_BOBJ[0x20000]; u8 ARM9_LCD[0xA4000]; u8 ARM9_OAM[0x800]; - u8* ExtPal[2][4]; - u8* ObjExtPal[2][2]; - - struct TextureInfo { - u8* texPalSlot[6]; - u8* textureSlotAddr[4]; - } texInfo; + u8 * ExtPal[2][4]; + u8 * ObjExtPal[2][2]; + u8 * texPalSlot[6]; + + u8 *textureSlotAddr[4]; u8 blank_memory[0x20000]; }; diff --git a/desmume/src/Disassembler.cpp b/src/Disassembler.cpp similarity index 99% rename from desmume/src/Disassembler.cpp rename to src/Disassembler.cpp index 56f11f017..90da60a00 100644 --- a/desmume/src/Disassembler.cpp +++ b/src/Disassembler.cpp @@ -3714,7 +3714,7 @@ static char * OP_LDMIA_THUMB(u32 adr, u32 i, char * txt) static char * OP_B_COND(u32 adr, u32 i, char * txt) { - sprintf(txt, "B%s #%X", Condition[(i>>8)&0xF], (int)(adr+(((s32)((signed char)(i&0xFF)))<<1)+4)); + sprintf(txt, "B%s #%X", Condition[(i>>8)&0xF], (int)(adr+(((signed long)((signed char)(i&0xFF)))<<1)+4)); return txt; } diff --git a/desmume/src/Disassembler.h b/src/Disassembler.h similarity index 100% rename from desmume/src/Disassembler.h rename to src/Disassembler.h diff --git a/desmume/src/FIFO.cpp b/src/FIFO.cpp similarity index 100% rename from desmume/src/FIFO.cpp rename to src/FIFO.cpp diff --git a/desmume/src/FIFO.h b/src/FIFO.h similarity index 100% rename from desmume/src/FIFO.h rename to src/FIFO.h diff --git a/desmume/src/GPU.cpp b/src/GPU.cpp similarity index 87% rename from desmume/src/GPU.cpp rename to src/GPU.cpp index 633a55acf..d71ee38d3 100644 --- a/desmume/src/GPU.cpp +++ b/src/GPU.cpp @@ -53,6 +53,23 @@ #include "debug.h" #include "NDSSystem.h" +//#define CHECKSPRITES + +#ifdef CHECKSPRITES +#define CHECK_SPRITE(type) \ +if (!src) {\ + INFO("Sprite%s(%s) in mode %i %s\n",\ + type==1?"1D":"2D",\ + dispCnt->OBJ_BMP_mapping==1?"1D":"2D",\ + spriteInfo->Mode,\ + (spriteInfo->RotScale & 1)?"(Rotoscaled)":"");\ +continue;\ +}; +#else +#define CHECK_SPRITE(type) if (!src) { continue; }; +#endif + + ARM9_struct ARM9Mem; extern BOOL click; @@ -276,7 +293,7 @@ void GPU_Reset(GPU *g, u8 l) g->BGSize[0][1] = g->BGSize[1][1] = g->BGSize[2][1] = g->BGSize[3][1] = 256; g->dispOBJ = g->dispBG[0] = g->dispBG[1] = g->dispBG[2] = g->dispBG[3] = TRUE; - g->spriteRenderMode = GPU::SPRITE_1D; + g->spriteRender = sprite1D; g->bgPrio[4] = 0xFF; @@ -452,21 +469,20 @@ void GPU_setVideoProp(GPU * gpu, u32 p) if(cnt->OBJ_Tile_mapping) { - // 1-d sprite mapping + /* 1-d sprite mapping */ // boundary : // core A : 32k, 64k, 128k, 256k // core B : 32k, 64k, 128k, 128k gpu->sprBoundary = 5 + cnt->OBJ_Tile_1D_Bound ; - - //zero 10-apr-09 - not sure whether this is right... - if((gpu->core == GPU_SUB) && (cnt->OBJ_Tile_1D_Bound == 3)) gpu->sprBoundary = 7; + if((gpu->core == GPU_SUB) && (cnt->OBJ_Tile_1D_Bound == 3)) + gpu->sprBoundary = 7; - gpu->spriteRenderMode = GPU::SPRITE_1D; + gpu->spriteRender = sprite1D; } else { - // 2d sprite mapping + /* 2d sprite mapping */ // boundary : 32k gpu->sprBoundary = 5; - gpu->spriteRenderMode = GPU::SPRITE_2D; + gpu->spriteRender = sprite2D; } if(cnt->OBJ_BMP_1D_Bound && (gpu->core == GPU_MAIN)) @@ -2038,26 +2054,14 @@ FORCEINLINE BOOL compute_sprite_vars(_OAM_ * spriteInfo, u16 l, /*****************************************************************************/ // SPRITE RENDERING /*****************************************************************************/ - -void GPU::spriteRender(u8 * dst, u8 * dst_alpha, u8 * typeTab, u8 * prioTab) +void sprite1D(GPU * gpu, u16 l, u8 * dst, u8 * dst_alpha, u8 * typeTab, u8 * prioTab) { - if(spriteRenderMode == SPRITE_1D) - _spriteRender(dst,dst_alpha,typeTab, prioTab); - else - _spriteRender(dst,dst_alpha,typeTab, prioTab); -} - -template -void GPU::_spriteRender(u8 * dst, u8 * dst_alpha, u8 * typeTab, u8 * prioTab) -{ - u16 l = currLine; - GPU *gpu = this; - struct _DISPCNT * dispCnt = &(gpu->dispx_st)->dispx_DISPCNT.bits; _OAM_ * spriteInfo = (_OAM_ *)(gpu->oam + (nbShow-1));// + 127; u8 block = gpu->sprBoundary; u16 i; + //for(i = 0; i> 1) | *(((u16*)spriteInfo)+1) << 15; *(((u16*)spriteInfo)+2) = (*(((u16*)spriteInfo)+2) >> 2) | *(((u16*)spriteInfo)+2) << 14; @@ -2070,11 +2074,8 @@ void GPU::_spriteRender(u8 * dst, u8 * dst_alpha, u8 * typeTab, u8 * prioTab) ,*(((u16*)spriteInfo)+1) = (*(((u16*)spriteInfo)+1) >> 1) | *(((u16*)spriteInfo)+1) << 15 ,*(((u16*)spriteInfo)+2) = (*(((u16*)spriteInfo)+2) >> 2) | *(((u16*)spriteInfo)+2) << 14 #endif - ) + ) /* check all sprites */ { - const int oamNum = 127 - i; - //for each sprite: - size sprSize; s32 sprX, sprY, x, y, lg; int xdir; @@ -2157,11 +2158,8 @@ void GPU::_spriteRender(u8 * dst, u8 * dst_alpha, u8 * typeTab, u8 * prioTab) // If we are using 1 palette of 256 colours if(spriteInfo->Depth) { - //2d: src = (u8 *)MMU_RenderMapToLCD(gpu->sprMem + ((spriteInfo->TileIndex) << 5)); src = (u8 *)MMU_RenderMapToLCD(gpu->sprMem + (spriteInfo->TileIndex << block)); - if (!src) { - continue; - } + CHECK_SPRITE(1); // If extended palettes are set, use them if (dispCnt->ExOBJPalette_Enable) @@ -2177,19 +2175,18 @@ void GPU::_spriteRender(u8 * dst, u8 * dst_alpha, u8 * typeTab, u8 * prioTab) if (auxX >= 0 && auxY >= 0 && auxX < sprSize.x && auxY < sprSize.y) { - if(MODE == SPRITE_2D) - offset = (auxX&0x7) + ((auxX&0xFFF8)<<3) + ((auxY>>3)<<10) + ((auxY&0x7)*8); - else - offset = (auxX&0x7) + ((auxX&0xFFF8)<<3) + ((auxY>>3)*sprSize.x*8) + ((auxY&0x7)*8); - + offset = (auxX&0x7) + ((auxX&0xFFF8)<<3) + ((auxY>>3)*sprSize.x*8) + ((auxY&0x7)*8); colour = src[offset]; if (colour && (prioTab[sprX]>=prio)) { - T2WriteWord(dst, (sprX<<1), T2ReadWord(pal, (colour<<1))); - dst_alpha[sprX] = 16; - typeTab[sprX] = spriteInfo->Mode; - prioTab[sprX] = prio; + //if (gpu->setFinalColorSpr(gpu, sprX << 1, 4, dst, T1ReadWord(pal, colour<<1), sprX )) + { + T2WriteWord(dst, (sprX<<1), T2ReadWord(pal, (colour<<1))); + dst_alpha[sprX] = 16; + typeTab[sprX] = spriteInfo->Mode; + prioTab[sprX] = prio; + } } } @@ -2208,10 +2205,7 @@ void GPU::_spriteRender(u8 * dst, u8 * dst_alpha, u8 * typeTab, u8 * prioTab) src = (u8 *)MMU_RenderMapToLCD(gpu->sprMem + (spriteInfo->TileIndex)*32); else src = (u8 *)MMU_RenderMapToLCD(gpu->sprMem + (((spriteInfo->TileIndex&0x03E0) * 8) + (spriteInfo->TileIndex&0x001F))*16); - - if (!src) { - continue; - } + CHECK_SPRITE(1); for(j = 0; j < lg; ++j, ++sprX) { @@ -2221,19 +2215,18 @@ void GPU::_spriteRender(u8 * dst, u8 * dst_alpha, u8 * typeTab, u8 * prioTab) if (auxX >= 0 && auxY >= 0 && auxX < sprSize.x && auxY < sprSize.y) { - if(MODE == SPRITE_2D) - offset = auxX + (auxY<<8); - else - offset = (auxX) + (auxY<<5); - + offset = (auxX) + (auxY<<5); colour = T1ReadWord (src, offset<<1); if((colour&0x8000) && (prioTab[sprX]>=prio)) { - T2WriteWord(dst, (sprX<<1), colour); - dst_alpha[sprX] = spriteInfo->PaletteIndex; - typeTab[sprX] = spriteInfo->Mode; - prioTab[sprX] = prio; + // if (gpu->setFinalColorSpr(gpu, sprX << 1, 4, dst, colour, sprX)) + { + T2WriteWord(dst, (sprX<<1), colour); + dst_alpha[sprX] = spriteInfo->PaletteIndex; + typeTab[sprX] = spriteInfo->Mode; + prioTab[sprX] = prio; + } } } @@ -2248,20 +2241,9 @@ void GPU::_spriteRender(u8 * dst, u8 * dst_alpha, u8 * typeTab, u8 * prioTab) // Rotozoomed 16/16 palette else { - if(MODE == SPRITE_2D) - { - src = (u8 *)MMU_RenderMapToLCD(gpu->sprMem + (spriteInfo->TileIndex<<5)); - pal = ARM9Mem.ARM9_VMEM + 0x200 + (gpu->core*0x400 + (spriteInfo->PaletteIndex*32)); - } - else - { - src = (u8 *)MMU_RenderMapToLCD(gpu->sprMem + (spriteInfo->TileIndex<sprBoundary)); - pal = ARM9Mem.ARM9_VMEM + 0x200 + gpu->core*0x400 + (spriteInfo->PaletteIndex*32); - } - - if (!src) { - continue; - } + pal = ARM9Mem.ARM9_VMEM + 0x200 + gpu->core*0x400 + (spriteInfo->PaletteIndex*32); + src = (u8 *)MMU_RenderMapToLCD(gpu->sprMem + (spriteInfo->TileIndex<sprBoundary)); + CHECK_SPRITE(1); for(j = 0; j < lg; ++j, ++sprX) { @@ -2271,11 +2253,7 @@ void GPU::_spriteRender(u8 * dst, u8 * dst_alpha, u8 * typeTab, u8 * prioTab) if (auxX >= 0 && auxY >= 0 && auxX < sprSize.x && auxY < sprSize.y) { - if(MODE == SPRITE_2D) - offset = ((auxX>>1)&0x3) + (((auxX>>1)&0xFFFC)<<3) + ((auxY>>3)<<10) + ((auxY&0x7)*4); - else - offset = ((auxX>>1)&0x3) + (((auxX>>1)&0xFFFC)<<3) + ((auxY>>3)*sprSize.x)*4 + ((auxY&0x7)*4); - + offset = ((auxX>>1)&0x3) + (((auxX>>1)&0xFFFC)<<3) + ((auxY>>3)*sprSize.x)*4 + ((auxY&0x7)*4); colour = src[offset]; // Get 4bits value from the readed 8bits @@ -2284,10 +2262,13 @@ void GPU::_spriteRender(u8 * dst, u8 * dst_alpha, u8 * typeTab, u8 * prioTab) if(colour && (prioTab[sprX]>=prio)) { - T2WriteWord(dst, (sprX<<1), T2ReadWord(pal, (colour<<1))); - dst_alpha[sprX] = 16; - typeTab[sprX] = spriteInfo->Mode; - prioTab[sprX] = prio; + //if (gpu->setFinalColorSpr(gpu, sprX << 1, 4, dst, T1ReadWord(pal, colour<<1), sprX )) + { + T2WriteWord(dst, (sprX<<1), T2ReadWord(pal, (colour<<1))); + dst_alpha[sprX] = 16; + typeTab[sprX] = spriteInfo->Mode; + prioTab[sprX] = prio; + } } } @@ -2304,29 +2285,16 @@ void GPU::_spriteRender(u8 * dst, u8 * dst_alpha, u8 * typeTab, u8 * prioTab) { u16 * pal; - if (!compute_sprite_vars(spriteInfo, l, sprSize, sprX, sprY, x, y, lg, xdir)) continue; if (spriteInfo->Mode == 2) { - if(MODE == SPRITE_2D) - { - if (spriteInfo->Depth) - src = (u8 *)MMU_RenderMapToLCD(gpu->sprMem + ((spriteInfo->TileIndex)<<5) + ((y>>3)<<10) + ((y&0x7)*8)); - else - src = (u8 *)MMU_RenderMapToLCD(gpu->sprMem + ((spriteInfo->TileIndex)<<5) + ((y>>3)<<10) + ((y&0x7)*4)); - } + if (spriteInfo->Depth) + src = (u8 *)MMU_RenderMapToLCD(gpu->sprMem + (spriteInfo->TileIndex<>3)*sprSize.x*8) + ((y&0x7)*8)); else - { - if (spriteInfo->Depth) - src = (u8 *)MMU_RenderMapToLCD(gpu->sprMem + (spriteInfo->TileIndex<>3)*sprSize.x*8) + ((y&0x7)*8)); - else - src = (u8 *)MMU_RenderMapToLCD(gpu->sprMem + (spriteInfo->TileIndex<>3)*sprSize.x*4) + ((y&0x7)*4)); - } - if (!src) { - continue; - } + src = (u8 *)MMU_RenderMapToLCD(gpu->sprMem + (spriteInfo->TileIndex<>3)*sprSize.x*4) + ((y&0x7)*4)); + CHECK_SPRITE(1); render_sprite_Win (gpu, l, src, spriteInfo->Depth, lg, sprX, x, xdir); continue; @@ -2347,10 +2315,7 @@ void GPU::_spriteRender(u8 * dst, u8 * dst_alpha, u8 * typeTab, u8 * prioTab) else // 128 * 512 src = (u8 *)MMU_RenderMapToLCD(gpu->sprMem + (((spriteInfo->TileIndex&0x3F0) * 64 + (spriteInfo->TileIndex&0x0F) *8 + ( y << 8)) << 1)); } - - if (!src) { - continue; - } + CHECK_SPRITE(1); render_sprite_BMP (gpu, i, l, dst, (u16*)src, dst_alpha, typeTab, prioTab, prio, lg, sprX, x, xdir, spriteInfo->PaletteIndex); continue; @@ -2358,44 +2323,30 @@ void GPU::_spriteRender(u8 * dst, u8 * dst_alpha, u8 * typeTab, u8 * prioTab) if(spriteInfo->Depth) /* 256 colors */ { - if(MODE == SPRITE_2D) - src = (u8 *)MMU_RenderMapToLCD(gpu->sprMem + ((spriteInfo->TileIndex)<<5) + ((y>>3)<<10) + ((y&0x7)*8)); - else - src = (u8 *)MMU_RenderMapToLCD(gpu->sprMem + (spriteInfo->TileIndex<>3)*sprSize.x*8) + ((y&0x7)*8)); - - if (!src) { - continue; - } + src = (u8 *)MMU_RenderMapToLCD(gpu->sprMem + (spriteInfo->TileIndex<>3)*sprSize.x*8) + ((y&0x7)*8)); + CHECK_SPRITE(1); if (dispCnt->ExOBJPalette_Enable) pal = (u16*)(ARM9Mem.ObjExtPal[gpu->core][0]+(spriteInfo->PaletteIndex*0x200)); else pal = (u16*)(ARM9Mem.ARM9_VMEM + 0x200 + gpu->core *0x400); - render_sprite_256 (gpu, i, l, dst, src, pal, - dst_alpha, typeTab, prioTab, prio, lg, sprX, x, xdir, spriteInfo->Mode == 1); + //sprwin test hack - to enable, only draw win and not sprite + render_sprite_256 (gpu, i, l, dst, src, pal, dst_alpha, typeTab, prioTab, prio, lg, sprX, x, xdir, spriteInfo->Mode == 1); + //render_sprite_Win (gpu, l, src, spriteInfo->Depth, lg, sprX, x, xdir); continue; } - // 16 colors - if(MODE == SPRITE_2D) - { - src = (u8 *)MMU_RenderMapToLCD(gpu->sprMem + ((spriteInfo->TileIndex)<<5) + ((y>>3)<<10) + ((y&0x7)*4)); - } - else - { - src = (u8 *)MMU_RenderMapToLCD(gpu->sprMem + (spriteInfo->TileIndex<>3)*sprSize.x*4) + ((y&0x7)*4)); - } - - if (!src) { - continue; - } - + /* 16 colors */ + src = (u8 *)MMU_RenderMapToLCD(gpu->sprMem + (spriteInfo->TileIndex<>3)*sprSize.x*4) + ((y&0x7)*4)); + CHECK_SPRITE(1); pal = (u16*)(ARM9Mem.ARM9_VMEM + 0x200 + gpu->core * 0x400); pal += (spriteInfo->PaletteIndex<<4); + //sprwin test hack - to enable, only draw win and not sprite render_sprite_16 (gpu, l, dst, src, pal, dst_alpha, typeTab, prioTab, prio, lg, sprX, x, xdir, spriteInfo->Mode == 1); + //render_sprite_Win (gpu, l, src, spriteInfo->Depth, lg, sprX, x, xdir); } } @@ -2405,6 +2356,303 @@ void GPU::_spriteRender(u8 * dst, u8 * dst_alpha, u8 * typeTab, u8 * prioTab) #endif } +void sprite2D(GPU * gpu, u16 l, u8 * dst, u8 * dst_alpha, u8 * typeTab, u8 * prioTab) +{ + struct _DISPCNT * dispCnt = &(gpu->dispx_st)->dispx_DISPCNT.bits; + _OAM_ * spriteInfo = (_OAM_*)(gpu->oam + (nbShow-1));// + 127; + u16 i; + +#ifdef WORDS_BIGENDIAN + *(((u16*)spriteInfo)+1) = (*(((u16*)spriteInfo)+1) >> 1) | *(((u16*)spriteInfo)+1) << 15; + *(((u16*)spriteInfo)+2) = (*(((u16*)spriteInfo)+2) >> 2) | *(((u16*)spriteInfo)+2) << 14; +#endif + + for(i = 0; i> 15 + ,*(((u16*)(spriteInfo+1))+2) = (*(((u16*)(spriteInfo+1))+2) << 2) | *(((u16*)(spriteInfo+1))+2) >> 14 + ,*(((u16*)spriteInfo)+1) = (*(((u16*)spriteInfo)+1) >> 1) | *(((u16*)spriteInfo)+1) << 15 + ,*(((u16*)spriteInfo)+2) = (*(((u16*)spriteInfo)+2) >> 2) | *(((u16*)spriteInfo)+2) << 14 +#endif + ) /* check all sprites */ + { + size sprSize; + s32 sprX, sprY, x, y, lg; + int xdir; + u8 prio, * src; + //u16 * pal; + u16 j; + + // Check if sprite is disabled before everything + if (spriteInfo->RotScale == 2) + continue; + + prio = spriteInfo->Priority; + + if (spriteInfo->RotScale & 1) + { + s32 fieldX, fieldY, auxX, auxY, realX, realY, offset; + u8 blockparameter, *pal; + s16 dx, dmx, dy, dmy; + u16 colour; + + // Get sprite positions and size + sprX = (spriteInfo->X<<23)>>23; + sprY = spriteInfo->Y; + sprSize = sprSizeTab[spriteInfo->Size][spriteInfo->Shape]; + + lg = sprSize.x; + + if (sprY>=192) + sprY = (s32)((s8)(spriteInfo->Y)); + + // Copy sprite size, to check change it if needed + fieldX = sprSize.x; + fieldY = sprSize.y; + + // If we are using double size mode, double our control vars + if (spriteInfo->RotScale & 2) + { + fieldX <<= 1; + fieldY <<= 1; + lg <<= 1; + } + + // Check if sprite enabled + if ((l = sprY+fieldY) || + (sprX==256) || (sprX+fieldX<=0)) + continue; + + y = l - sprY; + + // Get which four parameter block is assigned to this sprite + blockparameter = (spriteInfo->RotScalIndex + (spriteInfo->HFlip<< 3) + (spriteInfo->VFlip << 4))*4; + + // Get rotation/scale parameters + dx = (s16)(gpu->oam + blockparameter+0)->attr3; + dmx = (s16)(gpu->oam + blockparameter+1)->attr3; + dy = (s16)(gpu->oam + blockparameter+2)->attr3; + dmy = (s16)(gpu->oam + blockparameter+3)->attr3; + + // Calculate fixed poitn 8.8 start offsets + realX = ((sprSize.x) << 7) - (fieldX >> 1)*dx - (fieldY>>1)*dmx + y * dmx; + realY = ((sprSize.y) << 7) - (fieldX >> 1)*dy - (fieldY>>1)*dmy + y * dmy; + + if(sprX<0) + { + // If sprite is not in the window + if(sprX + fieldX <= 0) + continue; + + // Otherwise, is partially visible + lg += sprX; + realX -= sprX*dx; + realY -= sprX*dy; + sprX = 0; + } + else + { + if(sprX+fieldX>256) + lg = 256 - sprX; + } + + // If we are using 1 palette of 256 colours + if(spriteInfo->Depth) + { + src = (u8 *)MMU_RenderMapToLCD(gpu->sprMem + ((spriteInfo->TileIndex) << 5)); + CHECK_SPRITE(2); + + // If extended palettes are set, use them + if (dispCnt->ExOBJPalette_Enable) + pal = (ARM9Mem.ObjExtPal[gpu->core][0]+(spriteInfo->PaletteIndex*0x200)); + else + pal = (ARM9Mem.ARM9_VMEM + 0x200 + gpu->core *0x400); + + for(j = 0; j < lg; ++j, ++sprX) + { + // Get the integer part of the fixed point 8.8, and check if it lies inside the sprite data + auxX = (realX>>8); + auxY = (realY>>8); + + if (auxX >= 0 && auxY >= 0 && auxX < sprSize.x && auxY < sprSize.y) + { + offset = (auxX&0x7) + ((auxX&0xFFF8)<<3) + ((auxY>>3)<<10) + ((auxY&0x7)*8); + colour = src[offset]; + + if (colour && (prioTab[sprX]>=prio)) + { + // if (gpu->setFinalColorSpr(gpu, sprX << 1, 4, dst, T1ReadWord(pal, colour<<1), sprX )) + { + T2WriteWord(dst, (sprX<<1), T2ReadWord(pal, (colour<<1))); + dst_alpha[sprX] = 16; + typeTab[sprX] = spriteInfo->Mode; + prioTab[sprX] = prio; + } + } + } + + // Add the rotation/scale coeficients, here the rotation/scaling + // is performed + realX += dx; + realY += dy; + } + + continue; + } + // Rotozoomed direct color + else if(spriteInfo->Mode == 3) + { + if (dispCnt->OBJ_BMP_mapping) + src = (u8 *)MMU_RenderMapToLCD(gpu->sprMem + (spriteInfo->TileIndex)*32); + else + src = (u8 *)MMU_RenderMapToLCD(gpu->sprMem + (((spriteInfo->TileIndex&0x03E0) * 8) + (spriteInfo->TileIndex&0x001F))*16); + CHECK_SPRITE(2); + + for(j = 0; j < lg; ++j, ++sprX) + { + // Get the integer part of the fixed point 8.8, and check if it lies inside the sprite data + auxX = (realX>>8); + auxY = (realY>>8); + + if (auxX >= 0 && auxY >= 0 && auxX < sprSize.x && auxY < sprSize.y) + { + offset = auxX + (auxY<<8); + colour = T1ReadWord(src, offset<<1); + + if((colour&0x8000) && (prioTab[sprX]>=prio)) + { + // if (gpu->setFinalColorSpr(gpu, sprX << 1, 4, dst, colour, sprX )) + { + T2WriteWord(dst, (sprX<<1), colour); + dst_alpha[sprX] = spriteInfo->PaletteIndex; + typeTab[sprX] = spriteInfo->Mode; + prioTab[sprX] = prio; + } + } + } + + // Add the rotation/scale coeficients, here the rotation/scaling + // is performed + realX += dx; + realY += dy; + } + + continue; + } + // Rotozoomed 16/16 palette + else + { + src = (u8 *)MMU_RenderMapToLCD(gpu->sprMem + (spriteInfo->TileIndex<<5)); + CHECK_SPRITE(2); + pal = ARM9Mem.ARM9_VMEM + 0x200 + (gpu->core*0x400 + (spriteInfo->PaletteIndex*32)); + + for(j = 0; j < lg; ++j, ++sprX) + { + // Get the integer part of the fixed point 8.8, and check if it lies inside the sprite data + auxX = (realX>>8); + auxY = (realY>>8); + + if (auxX >= 0 && auxY >= 0 && auxX < sprSize.x && auxY < sprSize.y) + { + offset = ((auxX>>1)&0x3) + (((auxX>>1)&0xFFFC)<<3) + ((auxY>>3)<<10) + ((auxY&0x7)*4); + colour = src[offset]; + + if (auxX&1) colour >>= 4; + else colour &= 0xF; + + if(colour && (prioTab[sprX]>=prio)) + { + // if (gpu->setFinalColorSpr(gpu, sprX << 1,4,dst, T1ReadWord (pal, colour<<1), sprX)) + { + T2WriteWord(dst, (sprX<<1), T2ReadWord(pal, (colour<<1))); + dst_alpha[sprX] = 16; + typeTab[sprX] = spriteInfo->Mode; + prioTab[sprX] = prio; + } + } + } + + // Add the rotation/scale coeficients, here the rotation/scaling + // is performed + realX += dx; + realY += dy; + } + + continue; + } + } + else + { + u16 *pal; + + if (!compute_sprite_vars(spriteInfo, l, sprSize, sprX, sprY, x, y, lg, xdir)) + continue; + + if (spriteInfo->Mode == 2) { + if (spriteInfo->Depth) + src = (u8 *)MMU_RenderMapToLCD(gpu->sprMem + ((spriteInfo->TileIndex)<<5) + ((y>>3)<<10) + ((y&0x7)*8)); + else + src = (u8 *)MMU_RenderMapToLCD(gpu->sprMem + ((spriteInfo->TileIndex)<<5) + ((y>>3)<<10) + ((y&0x7)*4)); + CHECK_SPRITE(2); + + render_sprite_Win (gpu, l, src, spriteInfo->Depth, lg, sprX, x, xdir); + continue; + } + + if (spriteInfo->Mode == 3) /* sprite is in BMP format */ + { + if (dispCnt->OBJ_BMP_mapping) + { + // TODO: fix it for sprite1D + //src = (u8 *)MMU_RenderMapToLCD(gpu->sprMem + (((spriteInfo->TileIndex&0x3E0) * 64 + (spriteInfo->TileIndex&0x1F) *8 + ( y << 8)) << 1)); + src = (u8 *)MMU_RenderMapToLCD(gpu->sprMem + (spriteInfo->TileIndex<<4) + (y<sprBMPBoundary)); + } + else + { + if (dispCnt->OBJ_BMP_2D_dim) // 256*256 + src = (u8 *)MMU_RenderMapToLCD(gpu->sprMem + (((spriteInfo->TileIndex&0x3E0) * 64 + (spriteInfo->TileIndex&0x1F) *8 + ( y << 8)) << 1)); + else // 128 * 512 + src = (u8 *)MMU_RenderMapToLCD(gpu->sprMem + (((spriteInfo->TileIndex&0x3F0) * 64 + (spriteInfo->TileIndex&0x0F) *8 + ( y << 8)) << 1)); + } + CHECK_SPRITE(2); + + render_sprite_BMP (gpu, i, l, dst, (u16*)src, dst_alpha, typeTab, prioTab, prio, lg, sprX, x, xdir, spriteInfo->PaletteIndex); + + continue; + } + + if(spriteInfo->Depth) /* 256 colors */ + { + src = (u8 *)MMU_RenderMapToLCD(gpu->sprMem + ((spriteInfo->TileIndex)<<5) + ((y>>3)<<10) + ((y&0x7)*8)); + CHECK_SPRITE(2); + + if (dispCnt->ExOBJPalette_Enable) + pal = (u16*)(ARM9Mem.ObjExtPal[gpu->core][0]+(spriteInfo->PaletteIndex*0x200)); + else + pal = (u16*)(ARM9Mem.ARM9_VMEM + 0x200 + gpu->core *0x400); + + render_sprite_256 (gpu, i, l, dst, src, pal, + dst_alpha, typeTab, prioTab, prio, lg, sprX, x, xdir, spriteInfo->Mode == 1); + + continue; + } + + /* 16 colors */ + src = (u8 *)MMU_RenderMapToLCD(gpu->sprMem + ((spriteInfo->TileIndex)<<5) + ((y>>3)<<10) + ((y&0x7)*4)); + CHECK_SPRITE(2); + pal = (u16*)(ARM9Mem.ARM9_VMEM + 0x200 + gpu->core * 0x400); + + pal += (spriteInfo->PaletteIndex<<4); + render_sprite_16 (gpu, l, dst, src, pal, + dst_alpha, typeTab, prioTab, prio, lg, sprX, x, xdir, spriteInfo->Mode == 1); + } + } + +#ifdef WORDS_BIGENDIAN + *(((u16*)spriteInfo)+1) = (*(((u16*)spriteInfo)+1) << 1) | *(((u16*)spriteInfo)+1) >> 15; + *(((u16*)spriteInfo)+2) = (*(((u16*)spriteInfo)+2) << 2) | *(((u16*)spriteInfo)+2) >> 14; +#endif +} /*****************************************************************************/ // SCREEN FUNCTIONS @@ -2518,8 +2766,8 @@ void GPU_set_DISPCAPCNT(u32 val) struct _DISPCNT * dispCnt = &(gpu->dispx_st)->dispx_DISPCNT.bits; gpu->dispCapCnt.val = val; - gpu->dispCapCnt.EVA = std::min((u32)16, (val & 0x1F)); - gpu->dispCapCnt.EVB = std::min((u32)16, ((val >> 8) & 0x1F)); + gpu->dispCapCnt.EVA = val & 0x1F; + gpu->dispCapCnt.EVB = (val >> 8) & 0x1F; gpu->dispCapCnt.writeBlock = (val >> 16) & 0x03; gpu->dispCapCnt.writeOffset = (val >> 18) & 0x03; gpu->dispCapCnt.readBlock = dispCnt->VRAM_Block; @@ -2631,8 +2879,7 @@ static void GPU_ligne_layer(NDS_Screen * screen, u16 l) //but it has been changed to write u32 instead of u16 for a little speedup for(int i = 0; i< 128; ++i) T2WriteWord(spr, i << 2, c | (c<<16)); - - gpu->spriteRender(spr, sprAlpha, sprType, sprPrio); + gpu->spriteRender(gpu, l, spr, sprAlpha, sprType, sprPrio); mosaicSpriteLine(gpu, l, spr, sprAlpha, sprType, sprPrio); diff --git a/desmume/src/GPU.h b/src/GPU.h similarity index 98% rename from desmume/src/GPU.h rename to src/GPU.h index 936273531..2297f8e45 100644 --- a/desmume/src/GPU.h +++ b/src/GPU.h @@ -403,10 +403,6 @@ void register_gl_fun(fun_gl_Begin beg,fun_gl_End end); #define ADDRESS_STEP_16KB 0x04000 #define ADDRESS_STEP_32KB 0x08000 #define ADDRESS_STEP_64kB 0x10000 -#define ADDRESS_STEP_128KB 0x20000 -#define ADDRESS_STEP_256KB 0x40000 -#define ADDRESS_STEP_512KB 0x80000 -#define ADDRESS_MASK_256KB (ADDRESS_STEP_256KB-1) #ifdef WORDS_BIGENDIAN struct _TILEENTRY @@ -594,7 +590,6 @@ typedef struct #define ARM9MEM_BBG 0x06200000 #define ARM9MEM_AOBJ 0x06400000 #define ARM9MEM_BOBJ 0x06600000 -#define ARM9MEM_LCDC 0x06800000 extern CACHE_ALIGN u8 gpuBlendTable555[17][17][32][32]; @@ -722,17 +717,12 @@ struct GPU typedef void (*FinalOBJColFunct)(GPU *gpu, u32 passing, u8 *dst, u16 color, u8 alpha, u8 type, u16 x); typedef void (*Final3DColFunct)(GPU *gpu, u32 passing, u8 *dst, u16 color, u8 alpha, u16 x); + typedef void (*SpriteRenderFunct) (GPU * gpu, u16 l, u8 * dst, u8 * dst_alpha, u8 * typeTab, u8 * prioTab); int setFinalColorBck_funcNum; FinalOBJColFunct setFinalColorSpr; Final3DColFunct setFinalColor3D; - enum SpriteRenderMode { - SPRITE_1D, SPRITE_2D - } spriteRenderMode; - - template - void _spriteRender(u8 * dst, u8 * dst_alpha, u8 * typeTab, u8 * prioTab); - void spriteRender(u8 * dst, u8 * dst_alpha, u8 * typeTab, u8 * prioTab); + SpriteRenderFunct spriteRender; void setFinalColorBG(u16 color, u8 x); FORCEINLINE void setFinalBGColorSpecialNone(u16 color, u8 x, bool blend1); diff --git a/desmume/src/GPU_osd.cpp b/src/GPU_osd.cpp similarity index 100% rename from desmume/src/GPU_osd.cpp rename to src/GPU_osd.cpp diff --git a/desmume/src/GPU_osd.h b/src/GPU_osd.h similarity index 100% rename from desmume/src/GPU_osd.h rename to src/GPU_osd.h diff --git a/desmume/src/MMU.cpp b/src/MMU.cpp similarity index 87% rename from desmume/src/MMU.cpp rename to src/MMU.cpp index 75c8686b7..e308ca1b5 100644 --- a/desmume/src/MMU.cpp +++ b/src/MMU.cpp @@ -187,8 +187,11 @@ u8 * MMU_struct::MMU_MEM[2][256] = { /* 3X*/ DUP16(MMU.SWIRAM), /* 4X*/ DUP16(ARM9Mem.ARM9_REG), /* 5X*/ DUP16(ARM9Mem.ARM9_VMEM), - /* 6X*/ DUP8(0), //this gets handled by special logic - DUP8(ARM9Mem.ARM9_LCD), + /* 6X*/ DUP2(ARM9Mem.ARM9_ABG), + DUP2(ARM9Mem.ARM9_BBG), + DUP2(ARM9Mem.ARM9_AOBJ), + DUP2(ARM9Mem.ARM9_BOBJ), + DUP8(ARM9Mem.ARM9_LCD), /* 7X*/ DUP16(ARM9Mem.ARM9_OAM), /* 8X*/ DUP16(NULL), /* 9X*/ DUP16(NULL), @@ -209,7 +212,7 @@ u8 * MMU_struct::MMU_MEM[2][256] = { /* 4X*/ DUP8(MMU.ARM7_REG), DUP8(MMU.ARM7_WIRAM), /* 5X*/ DUP16(MMU.UNUSED_RAM), - /* 6X*/ DUP16(MMU.UNUSED_RAM), + /* 6X*/ DUP16(ARM9Mem.ARM9_ABG), /* 7X*/ DUP16(MMU.UNUSED_RAM), /* 8X*/ DUP16(NULL), /* 9X*/ DUP16(NULL), @@ -232,7 +235,10 @@ u32 MMU_struct::MMU_MASK[2][256] = { /* 3X*/ DUP16(0x00007FFF), /* 4X*/ DUP16(0x00FFFFFF), /* 5X*/ DUP16(0x000007FF), - /* 6X*/ DUP8(0x00000003), + /* 6X*/ DUP2(0x0007FFFF), + DUP2(0x0001FFFF), + DUP2(0x0003FFFF), + DUP2(0x0001FFFF), DUP8(0x000FFFFF), /* 7X*/ DUP16(0x000007FF), /* 8X*/ DUP16(ROM_MASK), @@ -254,7 +260,7 @@ u32 MMU_struct::MMU_MASK[2][256] = { /* 4X*/ DUP8(0x00FFFFFF), DUP8(0x0000FFFF), /* 5X*/ DUP16(0x00000003), - /* 6X*/ DUP16(0x00000003), + /* 6X*/ DUP16(0x0003FFFF), /* 7X*/ DUP16(0x00000003), /* 8X*/ DUP16(ROM_MASK), /* 9X*/ DUP16(ROM_MASK), @@ -278,499 +284,21 @@ TWaitState MMU_struct::MMU_WAIT32[2][16] = { { 1, 1, 1, 1, 1, 1, 1, 1, 8, 8, 5, 1, 1, 1, 1, 1 }, //arm7 }; -////////////////////////////////////////////////////////////// - -//------------- -//VRAM MEMORY MAPPING -//------------- -//(Everything is mapped through to ARM9_LCD in blocks of 16KB) - -//for all of the below, values = 41 indicate unmapped memory -#define VRAM_PAGE_UNMAPPED 41 - -#define VRAM_LCDC_PAGES 41 -u8 vram_lcdc_map[VRAM_LCDC_PAGES]; - -//in the range of 0x06000000 - 0x06800000 in 16KB pages (the ARM9 vram mappable area) -//this maps to 16KB pages in the LCDC buffer which is what will actually contain the data -#define VRAM_ARM9_PAGES 512 -u8 vram_arm9_map[VRAM_ARM9_PAGES]; - -//-----> -//consider these later, for better recordkeeping, instead of using the u8* in ARM9Mem - -////for each 128KB texture slot, this maps to a 16KB starting page in the LCDC buffer -//#define VRAM_TEX_SLOTS 4 -//u8 vram_tex_map[VRAM_TEX_SLOTS]; -// -////for each 16KB tex palette slot, this maps to a 16KB starting page in the LCDC buffer -//#define VRAM_TEX_PALETTE_SLOTS 6 -//u8 vram_tex_palette_map[VRAM_TEX_PALETTE_SLOTS]; - -//<--------- - -#define VRAM_BANKS 9 -#define VRAM_BANK_A 0 -#define VRAM_BANK_B 1 -#define VRAM_BANK_C 2 -#define VRAM_BANK_D 3 -#define VRAM_BANK_E 4 -#define VRAM_BANK_F 5 -#define VRAM_BANK_G 6 -#define VRAM_BANK_H 7 -#define VRAM_BANK_I 8 - -#define VRAM_PAGE_ABG 0 -#define VRAM_PAGE_BBG 128 -#define VRAM_PAGE_AOBJ 256 -#define VRAM_PAGE_BOBJ 384 - -void MMU_VRAM_unmap_all(); - -struct TVramBankInfo { - u8 page_addr, num_pages; -}; - -static const TVramBankInfo vram_bank_info[VRAM_BANKS] = { - {0,8}, - {8,8}, - {16,8}, - {24,8}, - {32,4}, - {36,1}, - {37,1}, - {38,2}, - {40,1} -}; - - -//maps an ARM9 BG/OBJ or LCDC address into an LCDC address, and informs the caller of whether it isn't mapped -static FORCEINLINE u32 MMU_LCDmap(u32 addr, bool& unmapped) -{ - unmapped = false; - - //in case the address is entirely outside of the interesting ranges - if(addr < 0x06000000) return addr; - if(addr >= 0x07000000) return addr; - - //handle LCD memory mirroring - if(addr>=0x068A4000) - addr = 0x06800000 + - //(addr%0xA4000); //yuck!! is this even how it mirrors? but we have to keep from overrunning the buffer somehow - (addr&0x80000); //just as likely to be right (I have no clue how it should work) but faster. - - u32 vram_page; - u32 ofs = addr & 0x3FFF; - - //return addresses in LCDC range - if(addr>=0x06800000) - { - //already in LCDC range. just look it up to see whether it is unmapped - vram_page = (addr>>14)&63; - assert(vram_page>14)&(VRAM_ARM9_PAGES-1); - assert(vram_page=8&&vram_page<12) { - //return 0x06800000; - } - } - - if(vram_page == VRAM_PAGE_UNMAPPED) - { - unmapped = true; - return 0; - } - else - return + 0x06800000 + (vram_page<<14) + ofs; -} - - -u8 *MMU_RenderMapToLCD(u32 vram_addr) -{ - //THIS FUNCTION IS DANGEROUS! - //the very idea is heinous, since people are - //certainly reading several bytes which probably overrun a page or something - //this needs to go through a system like what is used for textures for mapping into chunks - - bool unmapped; - vram_addr = MMU_LCDmap(vram_addr,unmapped); - if(unmapped) return 0; - else return ARM9Mem.ARM9_LCD + (vram_addr - 0x06800000); -} - - -template -void DMAtoVRAMmapping() -{ - //THIS IS ALSO DANGEROUS!!!!!! - //but i dont think it needs to be done - - /*u32 dst = DMADst[ARMCPU_ARM9][DMA_CHANNEL]; - - bool unmapped; - dst = MMU_LCDmap(dst,unmapped); - - DMADst[ARMCPU_ARM9][DMA_CHANNEL] = dst;*/ -} - -#define LOG_VRAM_ERROR() LOG("No data for block %i MST %i\n", block, VRAMBankCnt & 0x07); - -//maps the specified bank to LCDC -static inline void MMU_vram_lcdc(const int bank) -{ - for(int i=0;i= VRAM_BANK_H) block++; - - u8 VRAMBankCnt = T1ReadByte(MMU.MMU_MEM[ARMCPU_ARM9][0x40], 0x240 + block); - - //do nothing if the bank isnt enabled - u8 en = VRAMBankCnt & 0x80; - if(!en) return; - - int mst,ofs; - switch(bank) { - case VRAM_BANK_A: - case VRAM_BANK_B: - mst = VRAMBankCnt & 3; - ofs = (VRAMBankCnt>>3) & 3; - switch(mst) - { - case 0: //LCDC - MMU_vram_lcdc(bank); - break; - case 1: //ABG - MMU_vram_lcdc(bank); - MMU_vram_arm9(bank,VRAM_PAGE_ABG+ofs*8); - break; - case 2: //AOBJ - switch(ofs) { - case 0: - case 1: - MMU_vram_lcdc(bank); - MMU_vram_arm9(bank,VRAM_PAGE_AOBJ+ofs*8); - break; - default: - PROGINFO("Unsupported ofs setting %d for engine A OBJ vram bank %c\n", ofs, 'A'+bank); - } - break; - case 3: //texture - ARM9Mem.texInfo.textureSlotAddr[ofs] = MMU_vram_physical(vram_bank_info[bank].page_addr); - break; - } - break; - - case VRAM_BANK_C: - case VRAM_BANK_D: - mst = VRAMBankCnt & 7; - ofs = (VRAMBankCnt>>3) & 3; - switch(mst) - { - case 0: //LCDC - MMU_vram_lcdc(bank); - break; - case 1: //ABG - MMU_vram_lcdc(bank); - MMU_vram_arm9(bank,VRAM_PAGE_ABG+ofs*8); - break; - case 2: //arm7 - //MMU_vram_lcdc(bank); ? - if(bank == 2) T1WriteByte(MMU.MMU_MEM[ARMCPU_ARM7][0x40], 0x240, T1ReadByte(MMU.MMU_MEM[ARMCPU_ARM7][0x40], 0x240) | 2); - if(bank == 3) T1WriteByte(MMU.MMU_MEM[ARMCPU_ARM7][0x40], 0x240, T1ReadByte(MMU.MMU_MEM[ARMCPU_ARM7][0x40], 0x240) | 1); - break; - case 3: //texture - ARM9Mem.texInfo.textureSlotAddr[ofs] = MMU_vram_physical(vram_bank_info[bank].page_addr); - break; - case 4: //BGB or BOBJ - MMU_vram_lcdc(bank); - if(bank == VRAM_BANK_C) - MMU_vram_arm9(bank,VRAM_PAGE_BBG); //BBG - else - MMU_vram_arm9(bank,VRAM_PAGE_BOBJ); //BOBJ - break; - default: goto unsupported_mst; - } - break; - - case VRAM_BANK_E: - mst = VRAMBankCnt & 7; - switch(mst) { - case 0: //LCDC - MMU_vram_lcdc(bank); - break; - case 1: //ABG - MMU_vram_lcdc(bank); - MMU_vram_arm9(bank,VRAM_PAGE_ABG); - break; - case 2: //AOBJ - MMU_vram_lcdc(bank); - MMU_vram_arm9(bank,VRAM_PAGE_AOBJ); - break; - case 3: //texture palette - ARM9Mem.texInfo.texPalSlot[0] = MMU_vram_physical(vram_bank_info[bank].page_addr); - ARM9Mem.texInfo.texPalSlot[1] = MMU_vram_physical(vram_bank_info[bank].page_addr+1); - ARM9Mem.texInfo.texPalSlot[2] = MMU_vram_physical(vram_bank_info[bank].page_addr+2); - ARM9Mem.texInfo.texPalSlot[3] = MMU_vram_physical(vram_bank_info[bank].page_addr+3); - break; - case 4: //A BG extended palette - ARM9Mem.ExtPal[0][0] = MMU_vram_physical(vram_bank_info[bank].page_addr); - ARM9Mem.ExtPal[0][1] = ARM9Mem.ExtPal[0][0] + ADDRESS_STEP_8KB; - ARM9Mem.ExtPal[0][2] = ARM9Mem.ExtPal[0][1] + ADDRESS_STEP_8KB; - ARM9Mem.ExtPal[0][3] = ARM9Mem.ExtPal[0][2] + ADDRESS_STEP_8KB; - break; - default: goto unsupported_mst; - } - break; - - case VRAM_BANK_F: - case VRAM_BANK_G: { - mst = VRAMBankCnt & 7; - ofs = (VRAMBankCnt>>3) & 3; - const int pageofslut[] = {0,1,4,5}; - const int pageofs = pageofslut[ofs]; - switch(mst) - { - case 0: //LCDC - MMU_vram_lcdc(bank); - break; - case 1: //ABG - MMU_vram_lcdc(bank); - MMU_vram_arm9(bank,VRAM_PAGE_ABG+pageofs); - MMU_vram_arm9(bank,VRAM_PAGE_ABG+pageofs+2); //unexpected mirroring (required by spyro eternal night) - break; - case 2: //AOBJ - MMU_vram_lcdc(bank); - MMU_vram_arm9(bank,VRAM_PAGE_AOBJ+pageofs); - MMU_vram_arm9(bank,VRAM_PAGE_ABG+pageofs+2); //unexpected mirroring - I have no proof, but it is inferred from the ABG above - break; - case 3: //texture palette - ARM9Mem.texInfo.texPalSlot[pageofs] = MMU_vram_physical(vram_bank_info[bank].page_addr); - break; - case 4: //A BG extended palette - switch(ofs) { - case 0: - case 1: - ARM9Mem.ExtPal[0][ofs*2] = MMU_vram_physical(vram_bank_info[bank].page_addr); - ARM9Mem.ExtPal[0][ofs*2+1] = ARM9Mem.ExtPal[0][ofs*2] + ADDRESS_STEP_8KB; - break; - default: - PROGINFO("Unsupported ofs setting %d for engine A bgextpal vram bank %c\n", ofs, 'A'+bank); - break; - } - break; - case 5: //A OBJ extended palette - ARM9Mem.ObjExtPal[0][0] = MMU_vram_physical(vram_bank_info[bank].page_addr); - ARM9Mem.ObjExtPal[0][1] = ARM9Mem.ObjExtPal[0][1] + ADDRESS_STEP_8KB; - break; - default: goto unsupported_mst; - } - break; - } - - case VRAM_BANK_H: - mst = VRAMBankCnt & 3; - switch(mst) - { - case 0: //LCDC - MMU_vram_lcdc(bank); - break; - case 1: //BBG - MMU_vram_lcdc(bank); - MMU_vram_arm9(bank,VRAM_PAGE_BBG); - MMU_vram_arm9(bank,VRAM_PAGE_BBG + 4); //unexpected mirroring - break; - case 2: //B BG extended palette - ARM9Mem.ExtPal[1][0] = MMU_vram_physical(vram_bank_info[bank].page_addr); - ARM9Mem.ExtPal[1][1] = ARM9Mem.ExtPal[1][0] + ADDRESS_STEP_8KB; - ARM9Mem.ExtPal[1][2] = ARM9Mem.ExtPal[1][1] + ADDRESS_STEP_8KB; - ARM9Mem.ExtPal[1][3] = ARM9Mem.ExtPal[1][2] + ADDRESS_STEP_8KB; - break; - default: goto unsupported_mst; - } - break; - - case VRAM_BANK_I: - mst = VRAMBankCnt & 3; - switch(mst) - { - case 0: //LCDC - MMU_vram_lcdc(bank); - break; - case 1: //BBG - MMU_vram_lcdc(bank); - MMU_vram_arm9(bank,VRAM_PAGE_BBG+2); - MMU_vram_arm9(bank,VRAM_PAGE_BBG+3); //unexpected mirroring - break; - case 2: //BOBJ - MMU_vram_lcdc(bank); - MMU_vram_arm9(bank,VRAM_PAGE_BOBJ); - break; - case 3: //B OBJ extended palette - ARM9Mem.ObjExtPal[1][0] = MMU_vram_physical(vram_bank_info[bank].page_addr); - ARM9Mem.ObjExtPal[1][1] = ARM9Mem.ObjExtPal[1][1] + ADDRESS_STEP_8KB; - break; - } - break; - - - } //switch(bank) - - return; - -unsupported_mst: - PROGINFO("Unsupported mst setting %d for vram bank %c\n", mst, 'A'+bank); -} - -void MMU_VRAM_unmap_all() -{ - for(int i=0;iNDS_3D_VramReconfigureSignal(); - } - - //------------------------------- - //set up arm9 mirrorings - //these are probably not entirely accurate. more study will be necessary. - //in general, we find that it is not uncommon at all for games to accidentally do this. - // - //being able to easily do these experiments was one of the primary motivations for this remake of the vram mapping system - - //see the "unexpected mirroring" comments above for some more mirroring - //so far "unexpected mirrorings" are tested by combining these games: - //despereaux - storybook subtitles - //NSMB - world map sub screen - //drill spirits EU - mission select (just for control purposes, as it doesnt use H or I) - //... - //note that the "unexpected mirroring" items above may at some point rely on being executed in a certain order. - //(sequentially A..I) - - const int types[] = {VRAM_PAGE_ABG,VRAM_PAGE_BBG,VRAM_PAGE_AOBJ,VRAM_PAGE_BOBJ}; - const int sizes[] = {32,8,16,8}; - for(int t=0;t<4;t++) - { - //the idea here is to pad out the mirrored space with copies of the mappable area, - //without respect to what is mapped within that mappable area. - //we hope that this is correct in all cases - //required for driller spirits in mission select (mapping is simple A,B,C,D to each purpose) - const int size = sizes[t]; - const int mask = size-1; - const int type = types[t]; - for(int i=size;i<128;i++) - { - const int page = type + i; - vram_arm9_map[page] = vram_arm9_map[type+(i&mask)]; - } - - //attempt #1: screen corruption in drill spirits EU - //it seems like these shouldnt pad out 128K banks (space beyond those should have remained unmapped) - //int mirrorMask = -1; - //int type = types[t]; - ////if(type==VRAM_PAGE_BOBJ) continue; - //if(type==VRAM_PAGE_AOBJ) continue; - //for(int i=0;i<128;i++) - //{ - // int page = type + i; - // if(vram_arm9_map[page] == VRAM_PAGE_UNMAPPED) - // { - // if(i==0) break; //can't mirror anything if theres nothing mapped! - // if(mirrorMask == -1) - // mirrorMask = i-1; - // vram_arm9_map[page] = vram_arm9_map[type+(i&mirrorMask)]; - // } - //} - } - - //------------------------------- -} - -////////////////////////////////////////////////////////////// -//end vram -////////////////////////////////////////////////////////////// - +// VRAM mapping +u8 *LCDdst[10] = { NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }; +u8 *EngineAddr[4] = { NULL, NULL, NULL, NULL }; +const static u32 LCDdata[10][2]= { + {0x6800000, 8}, // Bank A + {0x6820000, 8}, // Bank B + {0x6840000, 8}, // Bank C + {0x6860000, 8}, // Bank D + {0x6880000, 4}, // Bank E + {0x6890000, 1}, // Bank F + {0x6894000, 1}, // Bank G + {0, 0}, + {0x6898000, 2}, // Bank H + {0x68A0000, 1}}; // Bank I void MMU_Init(void) { int i; @@ -781,11 +309,12 @@ void MMU_Init(void) { MMU.CART_ROM = MMU.UNUSED_RAM; - for(i = 0x80; i<0xA0; ++i) - { - MMU_struct::MMU_MEM[0][i] = MMU.CART_ROM; - MMU_struct::MMU_MEM[1][i] = MMU.CART_ROM; - } + for(i = 0x80; i<0xA0; ++i) + { + MMU_struct::MMU_MEM[0][i] = MMU.CART_ROM; + MMU_struct::MMU_MEM[1][i] = MMU.CART_ROM; + } + MMU.DTCMRegion = 0x027C0000; MMU.ITCMRegion = 0x00000000; @@ -837,6 +366,11 @@ u32 DMADst[2][4] = {{0, 0, 0, 0}, {0, 0, 0, 0}}; void MMU_clearMem() { + memset(ARM9Mem.ARM9_ABG, 0, sizeof(ARM9Mem.ARM9_ABG)); + memset(ARM9Mem.ARM9_AOBJ, 0, sizeof(ARM9Mem.ARM9_AOBJ)); + memset(ARM9Mem.ARM9_BBG, 0, sizeof(ARM9Mem.ARM9_BBG)); + memset(ARM9Mem.ARM9_BOBJ, 0, sizeof(ARM9Mem.ARM9_BOBJ)); + memset(ARM9Mem.ARM9_DTCM, 0, sizeof(ARM9Mem.ARM9_DTCM)); memset(ARM9Mem.ARM9_ITCM, 0, sizeof(ARM9Mem.ARM9_ITCM)); memset(ARM9Mem.ARM9_LCD, 0, sizeof(ARM9Mem.ARM9_LCD)); @@ -882,8 +416,49 @@ void MMU_clearMem() SubScreen.offset = 192; osdA->setOffset(MainScreen.offset); osdB->setOffset(SubScreen.offset); - - MMU_VRAM_unmap_all(); + + for(int i=0;i<4;i++) + ARM9Mem.textureSlotAddr[i] = ARM9Mem.blank_memory; + for(int i=0;i<6;i++) + ARM9Mem.texPalSlot[i] = ARM9Mem.blank_memory; + + LCDdst[0] = ARM9Mem.ARM9_LCD; // Bank A + LCDdst[1] = ARM9Mem.ARM9_LCD + 0x20000; // Bank B + LCDdst[2] = ARM9Mem.ARM9_LCD + 0x40000; // Bank C + LCDdst[3] = ARM9Mem.ARM9_LCD + 0x60000; // Bank D + LCDdst[4] = ARM9Mem.ARM9_LCD + 0x80000; // Bank E + LCDdst[5] = ARM9Mem.ARM9_LCD + 0x90000; // Bank F + LCDdst[6] = ARM9Mem.ARM9_LCD + 0x94000; // Bank G + LCDdst[7] = NULL; + LCDdst[8] = ARM9Mem.ARM9_LCD + 0x98000; // Bank H + LCDdst[9] = ARM9Mem.ARM9_LCD + 0xA0000; // Bank I + + EngineAddr[0] = ARM9Mem.ARM9_ABG; // Engine ABG + EngineAddr[1] = ARM9Mem.ARM9_BBG; // Engine BBG + EngineAddr[2] = ARM9Mem.ARM9_AOBJ; // Engine BOBJ + EngineAddr[3] = ARM9Mem.ARM9_BOBJ; // Engine BOBJ + + for (int i = 0; i < 4; i++) + { + ARM9Mem.ExtPal[0][i] = ARM9Mem.ARM9_LCD; + ARM9Mem.ExtPal[1][i] = ARM9Mem.ARM9_LCD; + } + ARM9Mem.ObjExtPal[0][0] = ARM9Mem.ARM9_LCD; + ARM9Mem.ObjExtPal[0][1] = ARM9Mem.ARM9_LCD; + ARM9Mem.ObjExtPal[1][0] = ARM9Mem.ARM9_LCD; + ARM9Mem.ObjExtPal[1][1] = ARM9Mem.ARM9_LCD; + + ARM9Mem.texPalSlot[0] = ARM9Mem.ARM9_LCD; + ARM9Mem.texPalSlot[1] = ARM9Mem.ARM9_LCD; + ARM9Mem.texPalSlot[2] = ARM9Mem.ARM9_LCD; + ARM9Mem.texPalSlot[3] = ARM9Mem.ARM9_LCD; + + for (int i =0; i < 9; i++) + { + MMU.LCD_VRAM_ADDR[i] = 0; + for (int t = 0; t < 32; t++) + MMU.VRAM_MAP[i][t] = 7; + } MMU.powerMan_CntReg = 0x00; MMU.powerMan_CntRegWritten = FALSE; @@ -898,11 +473,289 @@ void MMU_clearMem() Mic_Reset(); } +// VRAM mapping control +u8 *MMU_RenderMapToLCD(u32 vram_addr) +{ + if ((vram_addr < 0x6000000)) return NULL; + if ((vram_addr > 0x661FFFF)) return NULL; // Engine BOBJ max 128KB + + // holes + if ((vram_addr > 0x6080000) && (vram_addr < 0x6200000)) return NULL; // Engine ABG max 512KB + if ((vram_addr > 0x6220000) && (vram_addr < 0x6400000)) return NULL; // Engine BBG max 128KB + if ((vram_addr > 0x6420000) && (vram_addr < 0x6600000)) return NULL; // Engine AOBJ max 256KB + + vram_addr &= 0x0FFFFFF; + u8 engine = (vram_addr >> 21); + vram_addr &= 0x01FFFFF; + u8 engine_offset = (vram_addr >> 14); + u8 block = MMU.VRAM_MAP[engine][engine_offset]; + if (block == 7) return (EngineAddr[engine] + vram_addr); // not mapped to LCD + vram_addr -= MMU.LCD_VRAM_ADDR[block]; + return (LCDdst[block] + vram_addr); +} + +static FORCEINLINE u32 MMU_LCDmap(u32 addr) +{ + //handle LCD memory mirroring + if ((addr < 0x07000000) && (addr>=0x068A4000)) + return 0x06800000 + + //(addr%0xA4000); //yuck!! is this even how it mirrors? but we have to keep from overrunning the buffer somehow + (addr&0x80000); //just as likely to be right (I have no clue how it should work) but faster. + + if ((addr < 0x6000000)) return addr; + if ((addr > 0x661FFFF)) return addr; // Engine BOBJ max 128KB + + // holes + if ((addr > 0x6080000) && (addr < 0x6200000)) return addr; // Engine ABG max 512KB + if ((addr > 0x6220000) && (addr < 0x6400000)) return addr; // Engine BBG max 128KB + if ((addr > 0x6420000) && (addr < 0x6600000)) return addr; // Engine AOBJ max 256KB + + u32 save_addr = addr; + + addr &= 0x0FFFFFF; + u8 engine = (addr >> 21); + addr &= 0x01FFFFF; + u8 engine_offset = (addr >> 14); + u8 block = MMU.VRAM_MAP[engine][engine_offset]; + if (block == 7) return (save_addr); // not mapped to LCD + addr -= MMU.LCD_VRAM_ADDR[block]; + return (addr + LCDdata[block][0]); +} + +template +void DMAtoVRAMmapping() +{ + if (DMADst[ARMCPU_ARM9][DMA_CHANNEL] < 0x6000000) return; + if (DMADst[ARMCPU_ARM9][DMA_CHANNEL] > 0x661FFFF) return; + + u32 addr = DMADst[ARMCPU_ARM9][DMA_CHANNEL]; + + addr &= 0x0FFFFFF; + u8 engine = (addr >> 21); + addr &= 0x01FFFFF; + u8 engine_offset = (addr >> 14); + u8 block = MMU.VRAM_MAP[engine][engine_offset]; + if (block == 7) return; + addr -= MMU.LCD_VRAM_ADDR[block]; + + //INFO("ARM9 DMA%i at dst address 0x%08X mapped to 0x%X\n", DMA_CHANNEL, DMADst[ARMCPU_ARM9][DMA_CHANNEL], (addr + LCDdata[block][0]) ); + + DMADst[ARMCPU_ARM9][DMA_CHANNEL] = (addr + LCDdata[block][0]); +} + +#define LOG_VRAM_ERROR() LOG("No data for block %i MST %i\n", block, VRAMBankCnt & 0x07); + +static inline void MMU_VRAMmapControl(u8 block, u8 VRAMBankCnt) +{ + if (!(VRAMBankCnt & 0x80)) return; // disabled + + u32 vram_map_addr = 0xFFFFFFFF; + u8 *LCD_addr = LCDdst[block]; + bool changingTexOrTexPalette = false; + + for (int i = 0; i < 4; i++) + { + for (int t = 0; t < 32; t++) + if (MMU.VRAM_MAP[i][t] == block) + MMU.VRAM_MAP[i][t] = 7; + } + + switch (VRAMBankCnt & 0x07) + { + case 0: // not mapped + MMU.LCDCenable[block] = FALSE; + return; + case 1: + switch(block) + { + case 0: // A + case 1: // B + case 2: // C + case 3: // D Engine A, BG + vram_map_addr = ((VRAMBankCnt >> 3) & 3) * 0x20000; + if(block == 2) T1WriteByte(MMU.MMU_MEM[ARMCPU_ARM7][0x40], 0x240, T1ReadByte(MMU.MMU_MEM[ARMCPU_ARM7][0x40], 0x240) & 2); + if(block == 3) T1WriteByte(MMU.MMU_MEM[ARMCPU_ARM7][0x40], 0x240, T1ReadByte(MMU.MMU_MEM[ARMCPU_ARM7][0x40], 0x240) & 1); + break ; + case 4: // E Engine A, BG + vram_map_addr = 0x0000000; + break; + case 5: // F + case 6: // G Engine A, BG + vram_map_addr = (((VRAMBankCnt>>3)&1)*0x4000)+(((VRAMBankCnt>>4)&1)*0x10000); + break; + case 8: // H Engine B, BG + vram_map_addr = 0x0200000; + break ; + case 9: // I Engine B, BG + vram_map_addr = 0x0208000; + break; + default: + LOG_VRAM_ERROR(); + break; + } + break ; + + case 2: + switch(block) + { + case 0: // A + case 1: // B Engine A, OBJ + vram_map_addr = 0x0400000 + (((VRAMBankCnt>>3)&1)*0x20000); + break; + case 2: // C + T1WriteByte(MMU.MMU_MEM[ARMCPU_ARM7][0x40], 0x240, T1ReadByte(MMU.MMU_MEM[ARMCPU_ARM7][0x40], 0x240) | 1); + break; + case 3: // D + T1WriteByte(MMU.MMU_MEM[ARMCPU_ARM7][0x40], 0x240, T1ReadByte(MMU.MMU_MEM[ARMCPU_ARM7][0x40], 0x240) | 2); + break; + case 4: // E Engine A, OBJ + vram_map_addr = 0x0400000; + break; + case 5: // F + case 6: // G Engine A, OBJ + vram_map_addr = 0x0400000 + (((VRAMBankCnt>>3)&1)*0x4000)+(((VRAMBankCnt>>4)&1)*0x10000); + break; + case 8: // H Engine B, BG + ARM9Mem.ExtPal[1][0] = LCD_addr; + ARM9Mem.ExtPal[1][1] = LCD_addr+0x2000; + ARM9Mem.ExtPal[1][2] = LCD_addr+0x4000; + ARM9Mem.ExtPal[1][3] = LCD_addr+0x6000; + break; + case 9: // I Engine B, OBJ + vram_map_addr = 0x0600000; + break; + default: + LOG_VRAM_ERROR(); + break; + } + break ; + + case 3: + switch (block) + { + case 0: // A + case 1: // B + case 2: // C + case 3: // D + // Textures + { + changingTexOrTexPalette = true; + int slot_index = (VRAMBankCnt >> 3) & 0x3; + ARM9Mem.textureSlotAddr[slot_index] = LCD_addr; + gpu3D->NDS_3D_VramReconfigureSignal(); + if(block == 2) T1WriteByte(MMU.MMU_MEM[ARMCPU_ARM7][0x40], 0x240, T1ReadByte(MMU.MMU_MEM[ARMCPU_ARM7][0x40], 0x240) & 2); + if(block == 3) T1WriteByte(MMU.MMU_MEM[ARMCPU_ARM7][0x40], 0x240, T1ReadByte(MMU.MMU_MEM[ARMCPU_ARM7][0x40], 0x240) & 1); + } + break; + case 4: // E + changingTexOrTexPalette = true; + ARM9Mem.texPalSlot[0] = LCD_addr; + ARM9Mem.texPalSlot[1] = LCD_addr+0x4000; + ARM9Mem.texPalSlot[2] = LCD_addr+0x8000; + ARM9Mem.texPalSlot[3] = LCD_addr+0xC000; + gpu3D->NDS_3D_VramReconfigureSignal(); + break; + case 5: // F + case 6: // G + { + changingTexOrTexPalette = true; + u8 tmp_slot = ((VRAMBankCnt >> 3) & 0x01) + (((VRAMBankCnt >> 4) & 0x01)*4); + ARM9Mem.texPalSlot[tmp_slot] = LCD_addr; + gpu3D->NDS_3D_VramReconfigureSignal(); + } + break; + case 9: // I Engine B, OBJ + ARM9Mem.ObjExtPal[1][0] = LCD_addr; + ARM9Mem.ObjExtPal[1][1] = LCD_addr+0x2000; + break; + default: + LOG_VRAM_ERROR(); + break; + } + break ; + + case 4: + switch(block) + { + case 2: // C Engine B, BG + vram_map_addr = 0x0200000; + T1WriteByte(MMU.MMU_MEM[ARMCPU_ARM7][0x40], 0x240, T1ReadByte(MMU.MMU_MEM[ARMCPU_ARM7][0x40], 0x240) & 2); + break ; + case 3: // D Engine B, OBJ + vram_map_addr = 0x0600000; + T1WriteByte(MMU.MMU_MEM[ARMCPU_ARM7][0x40], 0x240, T1ReadByte(MMU.MMU_MEM[ARMCPU_ARM7][0x40], 0x240) & 1); + break ; + case 4: // E Engine A, BG + ARM9Mem.ExtPal[0][0] = LCD_addr; + ARM9Mem.ExtPal[0][1] = LCD_addr+0x2000; + ARM9Mem.ExtPal[0][2] = LCD_addr+0x4000; + ARM9Mem.ExtPal[0][3] = LCD_addr+0x6000; + break; + case 5: // F + case 6: // G Engine A, BG + { + u8 tmp_slot = (VRAMBankCnt >> 2) & 0x02; + ARM9Mem.ExtPal[0][tmp_slot] = LCD_addr; + ARM9Mem.ExtPal[0][tmp_slot+1] = LCD_addr+0x2000; + } + break; + default: + LOG_VRAM_ERROR(); + break; + } + break; + + case 5: + if ((block == 5) || (block == 6)) // F, G Engine A, OBJ + { + ARM9Mem.ObjExtPal[0][0] = LCD_addr; + ARM9Mem.ObjExtPal[0][1] = LCD_addr + 0x2000; + } + break; + } + + if(changingTexOrTexPalette && !nds.isIn3dVblank()) + { + PROGINFO("Changing texture or texture palette mappings outside of 3d vblank\n"); + } + + if (vram_map_addr != 0xFFFFFFFF) + { + u8 engine = (vram_map_addr >> 21); + vram_map_addr &= 0x001FFFFF; + u8 engine_offset = (vram_map_addr >> 14); + MMU.LCD_VRAM_ADDR[block] = vram_map_addr; + MMU.LCDCenable[block] = TRUE; + + for (unsigned int i = 0; i < LCDdata[block][1]; i++) + MMU.VRAM_MAP[engine][engine_offset + i] = (u8)block; + + //INFO("VRAM %i mapping: eng=%i (offs=%i, size=%i), addr = 0x%X, MST=%i\n", + // block, engine, engine_offset, LCDdata[block][1]*0x4000, MMU.LCD_VRAM_ADDR[block], VRAMBankCnt & 0x07); + + //unmap texmem + for(int i=0;i<4;i++) + if(ARM9Mem.textureSlotAddr[i] == LCD_addr) + ARM9Mem.textureSlotAddr[i] = ARM9Mem.blank_memory; + + //unmap texpal mem. This is not a straightforward way to do it, + //but it is the only place we have this information stored. + for(int i=0;i<4;i++) + if( (ARM9Mem.texPalSlot[i] == LCD_addr + 0x4000*i) || (ARM9Mem.texPalSlot[i] == LCD_addr) ) + ARM9Mem.texPalSlot[i] = ARM9Mem.blank_memory; + for(int i=4;i<6;i++) + if(ARM9Mem.texPalSlot[i] == LCD_addr) + ARM9Mem.texPalSlot[i] = ARM9Mem.blank_memory; + return; + } + + MMU.LCDCenable[block] = FALSE; +} + void MMU_setRom(u8 * rom, u32 mask) { unsigned int i; MMU.CART_ROM = rom; - MMU.CART_ROM_MASK = mask; for(i = 0x80; i<0xA0; ++i) { @@ -1842,9 +1695,7 @@ void FASTCALL _MMU_ARM9_write08(u32 adr, u8 val) return; } - bool unmapped; - adr = MMU_LCDmap(adr, unmapped); - if(unmapped) return; + adr = MMU_LCDmap(adr); // Removed the &0xFF as they are implicit with the adr&0x0FFFFFFFF [shash] MMU.MMU_MEM[ARMCPU_ARM9][adr>>20][adr&MMU.MMU_MASK[ARMCPU_ARM9][adr>>20]]=val; @@ -2427,9 +2278,7 @@ void FASTCALL _MMU_ARM9_write16(u32 adr, u16 val) return; } - bool unmapped; - adr = MMU_LCDmap(adr, unmapped); - if(unmapped) return; + adr = MMU_LCDmap(adr); // VRAM mapping // Removed the &0xFF as they are implicit with the adr&0x0FFFFFFFF [shash] T1WriteWord(MMU.MMU_MEM[ARMCPU_ARM9][adr>>20], adr&MMU.MMU_MASK[ARMCPU_ARM9][adr>>20], val); @@ -3006,9 +2855,7 @@ void FASTCALL _MMU_ARM9_write32(u32 adr, u32 val) return; } - bool unmapped; - adr = MMU_LCDmap(adr, unmapped); - if(unmapped) return; + adr = MMU_LCDmap(adr); // VRAM mapping // Removed the &0xFF as they are implicit with the adr&0x0FFFFFFFF [shash] T1WriteLong(MMU.MMU_MEM[ARMCPU_ARM9][adr>>20], adr&MMU.MMU_MASK[ARMCPU_ARM9][adr>>20], val); @@ -3040,10 +2887,7 @@ u8 FASTCALL _MMU_ARM9_read08(u32 adr) mmu_log_debug_ARM9(adr, "(read08) %0x%X", MMU.MMU_MEM[ARMCPU_ARM9][(adr>>20)&0xFF][adr&MMU.MMU_MASK[ARMCPU_ARM9][(adr>>20)&0xFF]]); #endif - - bool unmapped; - adr = MMU_LCDmap(adr, unmapped); - if(unmapped) return 0; + adr = MMU_LCDmap(adr); return MMU.MMU_MEM[ARMCPU_ARM9][(adr>>20)&0xFF][adr&MMU.MMU_MASK[ARMCPU_ARM9][(adr>>20)&0xFF]]; } @@ -3122,10 +2966,9 @@ u16 FASTCALL _MMU_ARM9_read16(u32 adr) return T1ReadWord(MMU.MMU_MEM[ARMCPU_ARM9][0x40], adr & MMU.MMU_MASK[ARMCPU_ARM9][(adr >> 20) & 0xFF]); } - bool unmapped; - adr = MMU_LCDmap(adr,unmapped); - if(unmapped) return 0; + adr = MMU_LCDmap(adr); + /* Returns data from memory */ return T1ReadWord(MMU.MMU_MEM[ARMCPU_ARM9][(adr >> 20) & 0xFF], adr & MMU.MMU_MASK[ARMCPU_ARM9][(adr >> 20) & 0xFF]); } @@ -3158,7 +3001,7 @@ u32 FASTCALL _MMU_ARM9_read32(u32 adr) #else // CFlash reading, Mic if ((adr>=0x9000000) && (adr<0x9900000)) - return (u32)cflash_read(adr); + return (unsigned long)cflash_read(adr); #endif adr &= 0x0FFFFFFF; @@ -3283,7 +3126,7 @@ u32 FASTCALL _MMU_ARM9_read32(u32 adr) { MMU.dscard[ARMCPU_ARM9].address = (0x8000 + (MMU.dscard[ARMCPU_ARM9].address&0x1FF)); } - val = T1ReadLong(MMU.CART_ROM, MMU.dscard[ARMCPU_ARM9].address & MMU.CART_ROM_MASK); + val = T1ReadLong(MMU.CART_ROM, MMU.dscard[ARMCPU_ARM9].address); } break; @@ -3321,10 +3164,9 @@ u32 FASTCALL _MMU_ARM9_read32(u32 adr) return T1ReadLong(MMU.MMU_MEM[ARMCPU_ARM9][0x40], adr & MMU.MMU_MASK[ARMCPU_ARM9][(adr >> 20)]); } - bool unmapped; - adr = MMU_LCDmap(adr,unmapped); - if(unmapped) return 0; + adr = MMU_LCDmap(adr); + //Returns data from memory // Removed the &0xFF as they are implicit with the adr&0x0FFFFFFFF [zeromus, inspired by shash] return T1ReadLong(MMU.MMU_MEM[ARMCPU_ARM9][(adr >> 20)], adr & MMU.MMU_MASK[ARMCPU_ARM9][(adr >> 20)]); } @@ -4207,7 +4049,7 @@ u32 FASTCALL _MMU_ARM7_read32(u32 adr) #else // CFlash reading, Mic if ((adr>=0x9000000)&&(adr<0x9900000)) - return (u32)cflash_read(adr); + return (unsigned long)cflash_read(adr); #endif adr &= 0x0FFFFFFF; @@ -4362,20 +4204,9 @@ void FASTCALL MMU_write8(u32 proc, u32 adr, u8 val) _MMU_ARM7_write08(adr,val); } -void FASTCALL MMU_DumpMemBlock(u8 proc, u32 address, u32 size, u8 *buffer) -{ - u32 i; - u32 curaddr; - - for(i = 0, curaddr = address; i < size; i++, curaddr++) - { - buffer[i] = T1ReadByte(MMU.MMU_MEM[proc][(curaddr >> 20) & 0xFF], (curaddr & MMU.MMU_MASK[proc][(curaddr >> 20) & 0xFF])); - } -} - void mmu_select_savetype(int type, int *bmemtype, u32 *bmemsize) { - if (type<0 || type > 6) return; - *bmemtype=save_types[type][0]; - *bmemsize=save_types[type][1]; - mc_realloc(&MMU.bupmem, *bmemtype, *bmemsize); + if (type<0 || type > 6) return; + *bmemtype=save_types[type][0]; + *bmemsize=save_types[type][1]; + mc_realloc(&MMU.bupmem, *bmemtype, *bmemsize); } diff --git a/desmume/src/MMU.h b/src/MMU.h similarity index 99% rename from desmume/src/MMU.h rename to src/MMU.h index cb81e178b..abae26a0e 100644 --- a/desmume/src/MMU.h +++ b/src/MMU.h @@ -64,7 +64,6 @@ struct MMU_struct { //Card rom & ram u8 * CART_ROM; - u32 CART_ROM_MASK; u8 CART_RAM[0x10000]; //Unused ram @@ -359,6 +358,4 @@ void _MMU_write16(u32 addr, u16 val) { _MMU_write16(PROCNUM, addr, val); } template void _MMU_write32(u32 addr, u32 val) { _MMU_write32(PROCNUM, addr, val); } -void FASTCALL MMU_DumpMemBlock(u8 proc, u32 address, u32 size, u8 *buffer); - #endif diff --git a/desmume/src/Makefile.am b/src/Makefile.am similarity index 100% rename from desmume/src/Makefile.am rename to src/Makefile.am diff --git a/desmume/src/NDSSystem.cpp b/src/NDSSystem.cpp similarity index 94% rename from desmume/src/NDSSystem.cpp rename to src/NDSSystem.cpp index 05cc79c55..9f903f547 100644 --- a/desmume/src/NDSSystem.cpp +++ b/src/NDSSystem.cpp @@ -25,7 +25,6 @@ #include #include #include -#include #include "common.h" #include "NDSSystem.h" @@ -1059,138 +1058,6 @@ int NDS_ImportSave(const char *filename) return 0; } -static int WritePNGChunk(FILE *fp, uint32 size, const char *type, const uint8 *data) -{ - uint32 crc; - - uint8 tempo[4]; - - tempo[0]=size>>24; - tempo[1]=size>>16; - tempo[2]=size>>8; - tempo[3]=size; - - if(fwrite(tempo,4,1,fp)!=1) - return 0; - if(fwrite(type,4,1,fp)!=1) - return 0; - - if(size) - if(fwrite(data,1,size,fp)!=size) - return 0; - - crc = crc32(0,(uint8 *)type,4); - if(size) - crc = crc32(crc,data,size); - - tempo[0]=crc>>24; - tempo[1]=crc>>16; - tempo[2]=crc>>8; - tempo[3]=crc; - - if(fwrite(tempo,4,1,fp)!=1) - return 0; - return 1; -} -int NDS_WritePNG(const char *fname) -{ - int x, y; - int width=256; - int height=192*2; - u16 * bmp = (u16 *)GPU_screen; - FILE *pp=NULL; - uint8 *compmem = NULL; - uLongf compmemsize = (uLongf)( (height * (width + 1) * 3 * 1.001 + 1) + 12 ); - - if(!(compmem=(uint8 *)malloc(compmemsize))) - return 0; - - if(!(pp=fopen(fname, "wb"))) - { - return 0; - } - { - static uint8 header[8]={137,80,78,71,13,10,26,10}; - if(fwrite(header,8,1,pp)!=1) - goto PNGerr; - } - - { - uint8 chunko[13]; - - chunko[0] = width >> 24; // Width - chunko[1] = width >> 16; - chunko[2] = width >> 8; - chunko[3] = width; - - chunko[4] = height >> 24; // Height - chunko[5] = height >> 16; - chunko[6] = height >> 8; - chunko[7] = height; - - chunko[8]=8; // 8 bits per sample(24 bits per pixel) - chunko[9]=2; // Color type; RGB triplet - chunko[10]=0; // compression: deflate - chunko[11]=0; // Basic adapative filter set(though none are used). - chunko[12]=0; // No interlace. - - if(!WritePNGChunk(pp,13,"IHDR",chunko)) - goto PNGerr; - } - - { - uint8 *tmp_buffer; - uint8 *tmp_inc; - tmp_inc = tmp_buffer = (uint8 *)malloc((width * 3 + 1) * height); - - for(y=0;y>10; - pixel-=r<<10; - g = pixel>>5; - pixel-=g<<5; - b = pixel; - r*=255/31; - g*=255/31; - b*=255/31; - tmp_inc[0] = b; - tmp_inc[1] = g; - tmp_inc[2] = r; - tmp_inc += 3; - } - } - - if(compress(compmem, &compmemsize, tmp_buffer, height * (width * 3 + 1))!=Z_OK) - { - if(tmp_buffer) free(tmp_buffer); - goto PNGerr; - } - if(tmp_buffer) free(tmp_buffer); - if(!WritePNGChunk(pp,compmemsize,"IDAT",compmem)) - goto PNGerr; - } - if(!WritePNGChunk(pp,0,"IEND",0)) - goto PNGerr; - - free(compmem); - fclose(pp); - - return 1; - -PNGerr: - if(compmem) - free(compmem); - if(pp) - fclose(pp); - return(0); -} - typedef struct { u32 size; @@ -2414,61 +2281,8 @@ void NDS_setPadFromMovie(u16 pad) #undef FIX } -turbo Turbo; -turbotime TurboTime; - -static void SetTurbo(bool (&pad) [10]) { - - bool turbo[4] = {true, false, true, false}; - bool currentbutton; - - for (int i=0; i < 10; i++) { - currentbutton=Turbo.button(i); - - if(currentbutton) { - pad[i]=turbo[TurboTime.time(i)-1]; - - if(TurboTime.time(i)>=ARRAY_SIZE(turbo)) - TurboTime.time(i)=0; - } - else - TurboTime.time(i)=0; //reset timer if the button isn't pressed - } - for (int i=0; i<10; i++) - TurboTime.time(i)++; -} - -autohold AutoHold; - void NDS_setPad(bool R,bool L,bool D,bool U,bool T,bool S,bool B,bool A,bool Y,bool X,bool W,bool E,bool G, bool F) { - - bool padarray[10] = {R, L, D, U, T, S, B, A, Y, X}; - - SetTurbo(padarray); - - R=padarray[0]; - L=padarray[1]; - D=padarray[2]; - U=padarray[3]; - T=padarray[4]; - S=padarray[5]; - B=padarray[6]; - A=padarray[7]; - Y=padarray[8]; - X=padarray[9]; - - if(AutoHold.Right) R=!padarray[0]; - if(AutoHold.Left) L=!padarray[1]; - if(AutoHold.Down) D=!padarray[2]; - if(AutoHold.Up) U=!padarray[3]; - if(AutoHold.Select)T=!padarray[4]; - if(AutoHold.Start) S=!padarray[5]; - if(AutoHold.B) B=!padarray[6]; - if(AutoHold.A) A=!padarray[7]; - if(AutoHold.Y) Y=!padarray[8]; - if(AutoHold.X) X=!padarray[9]; - //this macro is the opposite of what you would expect #define FIX(b) (b?0:0x80) diff --git a/desmume/src/NDSSystem.h b/src/NDSSystem.h similarity index 92% rename from desmume/src/NDSSystem.h rename to src/NDSSystem.h index 2cfefa3fd..bd5fe19d3 100644 --- a/desmume/src/NDSSystem.h +++ b/src/NDSSystem.h @@ -34,59 +34,6 @@ #include -struct turbo { - bool Right; - bool Left; - bool Down; - bool Up; - bool Select; - bool Start; - bool B; - bool A; - bool Y; - bool X; - - bool &button(int i) { return ((bool*)this)[i]; } -}; - -extern turbo Turbo; - -struct turbotime { - int Right; - int Left; - int Down; - int Up; - int Select; - int Start; - int B; - int A; - int Y; - int X; - - int &time(int i) { return ((int*)this)[i]; } -}; - -extern turbotime TurboTime; - -struct autohold { - bool Right; - bool Left; - bool Down; - bool Up; - bool Select; - bool Start; - bool B; - bool A; - bool Y; - bool X; - - bool &hold(int i) { return ((bool*)this)[i]; } -}; - -extern autohold AutoHold; - -int NDS_WritePNG(const char *fname); - extern volatile BOOL execute; extern BOOL click; extern char pathToROM[MAX_PATH]; diff --git a/desmume/src/OGLRender.cpp b/src/OGLRender.cpp similarity index 100% rename from desmume/src/OGLRender.cpp rename to src/OGLRender.cpp diff --git a/desmume/src/OGLRender.h b/src/OGLRender.h similarity index 100% rename from desmume/src/OGLRender.h rename to src/OGLRender.h diff --git a/desmume/src/PACKED.h b/src/PACKED.h similarity index 100% rename from desmume/src/PACKED.h rename to src/PACKED.h diff --git a/desmume/src/PACKED_END.h b/src/PACKED_END.h similarity index 100% rename from desmume/src/PACKED_END.h rename to src/PACKED_END.h diff --git a/desmume/src/ROMReader.cpp b/src/ROMReader.cpp similarity index 100% rename from desmume/src/ROMReader.cpp rename to src/ROMReader.cpp diff --git a/desmume/src/ROMReader.h b/src/ROMReader.h similarity index 100% rename from desmume/src/ROMReader.h rename to src/ROMReader.h diff --git a/desmume/src/SPU.cpp b/src/SPU.cpp similarity index 99% rename from desmume/src/SPU.cpp rename to src/SPU.cpp index e0d4e9ee5..0f991e176 100644 --- a/desmume/src/SPU.cpp +++ b/src/SPU.cpp @@ -544,7 +544,7 @@ static INLINE void FetchADPCMData(channel_struct *chan, s32 *data) chan->index = precalcindextbl[chan->index][data4bit & 0x7]; } - chan->lastsampcnt = (int)chan->sampcnt; + chan->lastsampcnt = chan->sampcnt; #ifdef SPU_INTERPOLATE *data = Interpolate((s32)chan->pcm16b_last,(s32)chan->pcm16b,chan->sampcnt); diff --git a/desmume/src/SPU.h b/src/SPU.h similarity index 100% rename from desmume/src/SPU.h rename to src/SPU.h diff --git a/desmume/src/addons.cpp b/src/addons.cpp similarity index 100% rename from desmume/src/addons.cpp rename to src/addons.cpp diff --git a/desmume/src/addons.h b/src/addons.h similarity index 100% rename from desmume/src/addons.h rename to src/addons.h diff --git a/desmume/src/addons/compactFlash.cpp b/src/addons/compactFlash.cpp similarity index 100% rename from desmume/src/addons/compactFlash.cpp rename to src/addons/compactFlash.cpp diff --git a/desmume/src/addons/gbagame.cpp b/src/addons/gbagame.cpp similarity index 100% rename from desmume/src/addons/gbagame.cpp rename to src/addons/gbagame.cpp diff --git a/desmume/src/addons/none.cpp b/src/addons/none.cpp similarity index 100% rename from desmume/src/addons/none.cpp rename to src/addons/none.cpp diff --git a/desmume/src/addons/rumblepak.cpp b/src/addons/rumblepak.cpp similarity index 100% rename from desmume/src/addons/rumblepak.cpp rename to src/addons/rumblepak.cpp diff --git a/desmume/src/arm_instructions.cpp b/src/arm_instructions.cpp similarity index 100% rename from desmume/src/arm_instructions.cpp rename to src/arm_instructions.cpp diff --git a/desmume/src/arm_instructions.h b/src/arm_instructions.h similarity index 100% rename from desmume/src/arm_instructions.h rename to src/arm_instructions.h diff --git a/desmume/src/armcpu.cpp b/src/armcpu.cpp similarity index 100% rename from desmume/src/armcpu.cpp rename to src/armcpu.cpp diff --git a/desmume/src/armcpu.h b/src/armcpu.h similarity index 100% rename from desmume/src/armcpu.h rename to src/armcpu.h diff --git a/desmume/src/bios.cpp b/src/bios.cpp similarity index 100% rename from desmume/src/bios.cpp rename to src/bios.cpp diff --git a/desmume/src/bios.h b/src/bios.h similarity index 100% rename from desmume/src/bios.h rename to src/bios.h diff --git a/desmume/src/bits.h b/src/bits.h similarity index 100% rename from desmume/src/bits.h rename to src/bits.h diff --git a/desmume/src/build.bat b/src/build.bat similarity index 100% rename from desmume/src/build.bat rename to src/build.bat diff --git a/desmume/src/cflash.cpp b/src/cflash.cpp similarity index 100% rename from desmume/src/cflash.cpp rename to src/cflash.cpp diff --git a/desmume/src/cflash.h b/src/cflash.h similarity index 100% rename from desmume/src/cflash.h rename to src/cflash.h diff --git a/desmume/src/cheatSystem.cpp b/src/cheatSystem.cpp similarity index 100% rename from desmume/src/cheatSystem.cpp rename to src/cheatSystem.cpp diff --git a/desmume/src/cheatSystem.h b/src/cheatSystem.h similarity index 100% rename from desmume/src/cheatSystem.h rename to src/cheatSystem.h diff --git a/desmume/src/cli/Makefile.am b/src/cli/Makefile.am similarity index 100% rename from desmume/src/cli/Makefile.am rename to src/cli/Makefile.am diff --git a/desmume/src/cli/doc/Makefile.am b/src/cli/doc/Makefile.am similarity index 100% rename from desmume/src/cli/doc/Makefile.am rename to src/cli/doc/Makefile.am diff --git a/desmume/src/cli/doc/desmume-cli.1 b/src/cli/doc/desmume-cli.1 similarity index 100% rename from desmume/src/cli/doc/desmume-cli.1 rename to src/cli/doc/desmume-cli.1 diff --git a/desmume/src/cli/main.cpp b/src/cli/main.cpp similarity index 100% rename from desmume/src/cli/main.cpp rename to src/cli/main.cpp diff --git a/desmume/src/cocoa/DeSmuME.cbp b/src/cocoa/DeSmuME.cbp similarity index 100% rename from desmume/src/cocoa/DeSmuME.cbp rename to src/cocoa/DeSmuME.cbp diff --git a/desmume/src/cocoa/DeSmuME.icns b/src/cocoa/DeSmuME.icns similarity index 100% rename from desmume/src/cocoa/DeSmuME.icns rename to src/cocoa/DeSmuME.icns diff --git a/desmume/src/cocoa/DeSmuME.xcodeproj/project.pbxproj b/src/cocoa/DeSmuME.xcodeproj/project.pbxproj similarity index 100% rename from desmume/src/cocoa/DeSmuME.xcodeproj/project.pbxproj rename to src/cocoa/DeSmuME.xcodeproj/project.pbxproj diff --git a/desmume/src/cocoa/Info.plist b/src/cocoa/Info.plist similarity index 100% rename from desmume/src/cocoa/Info.plist rename to src/cocoa/Info.plist diff --git a/desmume/src/cocoa/InfoPlist.strings b/src/cocoa/InfoPlist.strings similarity index 100% rename from desmume/src/cocoa/InfoPlist.strings rename to src/cocoa/InfoPlist.strings diff --git a/desmume/src/cocoa/Makefile.am b/src/cocoa/Makefile.am similarity index 100% rename from desmume/src/cocoa/Makefile.am rename to src/cocoa/Makefile.am diff --git a/desmume/src/cocoa/PkgInfo b/src/cocoa/PkgInfo similarity index 100% rename from desmume/src/cocoa/PkgInfo rename to src/cocoa/PkgInfo diff --git a/desmume/src/cocoa/Rakefile b/src/cocoa/Rakefile similarity index 100% rename from desmume/src/cocoa/Rakefile rename to src/cocoa/Rakefile diff --git a/desmume/src/cocoa/about.m b/src/cocoa/about.m similarity index 100% rename from desmume/src/cocoa/about.m rename to src/cocoa/about.m diff --git a/desmume/src/cocoa/cocoa_util.m b/src/cocoa/cocoa_util.m similarity index 100% rename from desmume/src/cocoa/cocoa_util.m rename to src/cocoa/cocoa_util.m diff --git a/desmume/src/cocoa/dialogs/rom_info.h b/src/cocoa/dialogs/rom_info.h similarity index 100% rename from desmume/src/cocoa/dialogs/rom_info.h rename to src/cocoa/dialogs/rom_info.h diff --git a/desmume/src/cocoa/dialogs/rom_info.m b/src/cocoa/dialogs/rom_info.m similarity index 100% rename from desmume/src/cocoa/dialogs/rom_info.m rename to src/cocoa/dialogs/rom_info.m diff --git a/desmume/src/cocoa/dialogs/speed_limit_selection_window.h b/src/cocoa/dialogs/speed_limit_selection_window.h similarity index 100% rename from desmume/src/cocoa/dialogs/speed_limit_selection_window.h rename to src/cocoa/dialogs/speed_limit_selection_window.h diff --git a/desmume/src/cocoa/dialogs/speed_limit_selection_window.mm b/src/cocoa/dialogs/speed_limit_selection_window.mm similarity index 100% rename from desmume/src/cocoa/dialogs/speed_limit_selection_window.mm rename to src/cocoa/dialogs/speed_limit_selection_window.mm diff --git a/desmume/src/cocoa/globals.h b/src/cocoa/globals.h similarity index 100% rename from desmume/src/cocoa/globals.h rename to src/cocoa/globals.h diff --git a/desmume/src/cocoa/input.h b/src/cocoa/input.h similarity index 100% rename from desmume/src/cocoa/input.h rename to src/cocoa/input.h diff --git a/desmume/src/cocoa/input.mm b/src/cocoa/input.mm similarity index 100% rename from desmume/src/cocoa/input.mm rename to src/cocoa/input.mm diff --git a/desmume/src/cocoa/main.mm b/src/cocoa/main.mm similarity index 100% rename from desmume/src/cocoa/main.mm rename to src/cocoa/main.mm diff --git a/desmume/src/cocoa/main_window.h b/src/cocoa/main_window.h similarity index 100% rename from desmume/src/cocoa/main_window.h rename to src/cocoa/main_window.h diff --git a/desmume/src/cocoa/main_window.mm b/src/cocoa/main_window.mm similarity index 100% rename from desmume/src/cocoa/main_window.mm rename to src/cocoa/main_window.mm diff --git a/desmume/src/cocoa/makeapp.sh b/src/cocoa/makeapp.sh similarity index 100% rename from desmume/src/cocoa/makeapp.sh rename to src/cocoa/makeapp.sh diff --git a/desmume/src/cocoa/nds_control.h b/src/cocoa/nds_control.h similarity index 100% rename from desmume/src/cocoa/nds_control.h rename to src/cocoa/nds_control.h diff --git a/desmume/src/cocoa/nds_control.mm b/src/cocoa/nds_control.mm similarity index 100% rename from desmume/src/cocoa/nds_control.mm rename to src/cocoa/nds_control.mm diff --git a/desmume/src/cocoa/preferences.h b/src/cocoa/preferences.h similarity index 100% rename from desmume/src/cocoa/preferences.h rename to src/cocoa/preferences.h diff --git a/desmume/src/cocoa/preferences.mm b/src/cocoa/preferences.mm similarity index 100% rename from desmume/src/cocoa/preferences.mm rename to src/cocoa/preferences.mm diff --git a/desmume/src/cocoa/screen_state.h b/src/cocoa/screen_state.h similarity index 100% rename from desmume/src/cocoa/screen_state.h rename to src/cocoa/screen_state.h diff --git a/desmume/src/cocoa/screen_state.m b/src/cocoa/screen_state.m similarity index 100% rename from desmume/src/cocoa/screen_state.m rename to src/cocoa/screen_state.m diff --git a/desmume/src/cocoa/screenshot.h b/src/cocoa/screenshot.h similarity index 100% rename from desmume/src/cocoa/screenshot.h rename to src/cocoa/screenshot.h diff --git a/desmume/src/cocoa/screenshot.mm b/src/cocoa/screenshot.mm similarity index 100% rename from desmume/src/cocoa/screenshot.mm rename to src/cocoa/screenshot.mm diff --git a/desmume/src/cocoa/sndOSX.h b/src/cocoa/sndOSX.h similarity index 100% rename from desmume/src/cocoa/sndOSX.h rename to src/cocoa/sndOSX.h diff --git a/desmume/src/cocoa/sndOSX.mm b/src/cocoa/sndOSX.mm similarity index 100% rename from desmume/src/cocoa/sndOSX.mm rename to src/cocoa/sndOSX.mm diff --git a/desmume/src/cocoa/translations/English.lproj/Localizable.strings b/src/cocoa/translations/English.lproj/Localizable.strings similarity index 100% rename from desmume/src/cocoa/translations/English.lproj/Localizable.strings rename to src/cocoa/translations/English.lproj/Localizable.strings diff --git a/desmume/src/cocoa/translations/English.lproj/MainMenu.nib/classes.nib b/src/cocoa/translations/English.lproj/MainMenu.nib/classes.nib similarity index 100% rename from desmume/src/cocoa/translations/English.lproj/MainMenu.nib/classes.nib rename to src/cocoa/translations/English.lproj/MainMenu.nib/classes.nib diff --git a/desmume/src/cocoa/translations/English.lproj/MainMenu.nib/info.nib b/src/cocoa/translations/English.lproj/MainMenu.nib/info.nib similarity index 100% rename from desmume/src/cocoa/translations/English.lproj/MainMenu.nib/info.nib rename to src/cocoa/translations/English.lproj/MainMenu.nib/info.nib diff --git a/desmume/src/cocoa/translations/English.lproj/MainMenu.nib/keyedobjects.nib b/src/cocoa/translations/English.lproj/MainMenu.nib/keyedobjects.nib similarity index 100% rename from desmume/src/cocoa/translations/English.lproj/MainMenu.nib/keyedobjects.nib rename to src/cocoa/translations/English.lproj/MainMenu.nib/keyedobjects.nib diff --git a/desmume/src/cocoa/translations/French.lproj/Localizable.strings b/src/cocoa/translations/French.lproj/Localizable.strings similarity index 100% rename from desmume/src/cocoa/translations/French.lproj/Localizable.strings rename to src/cocoa/translations/French.lproj/Localizable.strings diff --git a/desmume/src/cocoa/translations/French.lproj/MainMenu.nib/classes.nib b/src/cocoa/translations/French.lproj/MainMenu.nib/classes.nib similarity index 100% rename from desmume/src/cocoa/translations/French.lproj/MainMenu.nib/classes.nib rename to src/cocoa/translations/French.lproj/MainMenu.nib/classes.nib diff --git a/desmume/src/cocoa/translations/French.lproj/MainMenu.nib/info.nib b/src/cocoa/translations/French.lproj/MainMenu.nib/info.nib similarity index 100% rename from desmume/src/cocoa/translations/French.lproj/MainMenu.nib/info.nib rename to src/cocoa/translations/French.lproj/MainMenu.nib/info.nib diff --git a/desmume/src/cocoa/translations/French.lproj/MainMenu.nib/keyedobjects.nib b/src/cocoa/translations/French.lproj/MainMenu.nib/keyedobjects.nib similarity index 100% rename from desmume/src/cocoa/translations/French.lproj/MainMenu.nib/keyedobjects.nib rename to src/cocoa/translations/French.lproj/MainMenu.nib/keyedobjects.nib diff --git a/desmume/src/cocoa/translations/Italian.lproj/Localizable.strings b/src/cocoa/translations/Italian.lproj/Localizable.strings similarity index 100% rename from desmume/src/cocoa/translations/Italian.lproj/Localizable.strings rename to src/cocoa/translations/Italian.lproj/Localizable.strings diff --git a/desmume/src/cocoa/translations/Italian.lproj/MainMenu.nib/classes.nib b/src/cocoa/translations/Italian.lproj/MainMenu.nib/classes.nib similarity index 100% rename from desmume/src/cocoa/translations/Italian.lproj/MainMenu.nib/classes.nib rename to src/cocoa/translations/Italian.lproj/MainMenu.nib/classes.nib diff --git a/desmume/src/cocoa/translations/Italian.lproj/MainMenu.nib/info.nib b/src/cocoa/translations/Italian.lproj/MainMenu.nib/info.nib similarity index 100% rename from desmume/src/cocoa/translations/Italian.lproj/MainMenu.nib/info.nib rename to src/cocoa/translations/Italian.lproj/MainMenu.nib/info.nib diff --git a/desmume/src/cocoa/translations/Italian.lproj/MainMenu.nib/keyedobjects.nib b/src/cocoa/translations/Italian.lproj/MainMenu.nib/keyedobjects.nib similarity index 100% rename from desmume/src/cocoa/translations/Italian.lproj/MainMenu.nib/keyedobjects.nib rename to src/cocoa/translations/Italian.lproj/MainMenu.nib/keyedobjects.nib diff --git a/desmume/src/cocoa/translations/Japanese.lproj/Localizable.strings b/src/cocoa/translations/Japanese.lproj/Localizable.strings similarity index 100% rename from desmume/src/cocoa/translations/Japanese.lproj/Localizable.strings rename to src/cocoa/translations/Japanese.lproj/Localizable.strings diff --git a/desmume/src/cocoa/translations/Japanese.lproj/MainMenu.nib/classes.nib b/src/cocoa/translations/Japanese.lproj/MainMenu.nib/classes.nib similarity index 100% rename from desmume/src/cocoa/translations/Japanese.lproj/MainMenu.nib/classes.nib rename to src/cocoa/translations/Japanese.lproj/MainMenu.nib/classes.nib diff --git a/desmume/src/cocoa/translations/Japanese.lproj/MainMenu.nib/info.nib b/src/cocoa/translations/Japanese.lproj/MainMenu.nib/info.nib similarity index 100% rename from desmume/src/cocoa/translations/Japanese.lproj/MainMenu.nib/info.nib rename to src/cocoa/translations/Japanese.lproj/MainMenu.nib/info.nib diff --git a/desmume/src/cocoa/translations/Japanese.lproj/MainMenu.nib/keyedobjects.nib b/src/cocoa/translations/Japanese.lproj/MainMenu.nib/keyedobjects.nib similarity index 100% rename from desmume/src/cocoa/translations/Japanese.lproj/MainMenu.nib/keyedobjects.nib rename to src/cocoa/translations/Japanese.lproj/MainMenu.nib/keyedobjects.nib diff --git a/desmume/src/cocoa/video_output_view.h b/src/cocoa/video_output_view.h similarity index 100% rename from desmume/src/cocoa/video_output_view.h rename to src/cocoa/video_output_view.h diff --git a/desmume/src/cocoa/video_output_view.mm b/src/cocoa/video_output_view.mm similarity index 100% rename from desmume/src/cocoa/video_output_view.mm rename to src/cocoa/video_output_view.mm diff --git a/desmume/src/common.cpp b/src/common.cpp similarity index 100% rename from desmume/src/common.cpp rename to src/common.cpp diff --git a/desmume/src/common.h b/src/common.h similarity index 100% rename from desmume/src/common.h rename to src/common.h diff --git a/desmume/src/cp15.cpp b/src/cp15.cpp similarity index 98% rename from desmume/src/cp15.cpp rename to src/cp15.cpp index 2b646c5c6..c982625d0 100644 --- a/desmume/src/cp15.cpp +++ b/src/cp15.cpp @@ -82,7 +82,7 @@ armcp15_t *armcp15_new(armcpu_t * c) #define MASKFROMREG(val) (~((SIZEBINARY(val)-1) | 0x3F)) #define SETFROMREG(val) ((val) & MASKFROMREG(val)) /* sets the precalculated regions to mask,set for the affected accesstypes */ -static void armcp15_setSingleRegionAccess(armcp15_t *armcp15,u32 dAccess,u32 iAccess,unsigned char num, u32 mask,u32 set) { +static void armcp15_setSingleRegionAccess(armcp15_t *armcp15,unsigned long dAccess,unsigned long iAccess,unsigned char num, unsigned long mask,unsigned long set) { switch (ACCESSTYPE(dAccess,num)) { case 4: /* UNP */ diff --git a/desmume/src/cp15.h b/src/cp15.h similarity index 100% rename from desmume/src/cp15.h rename to src/cp15.h diff --git a/desmume/src/ctrlssdl.cpp b/src/ctrlssdl.cpp similarity index 100% rename from desmume/src/ctrlssdl.cpp rename to src/ctrlssdl.cpp diff --git a/desmume/src/ctrlssdl.h b/src/ctrlssdl.h similarity index 100% rename from desmume/src/ctrlssdl.h rename to src/ctrlssdl.h diff --git a/desmume/src/debug.cpp b/src/debug.cpp similarity index 100% rename from desmume/src/debug.cpp rename to src/debug.cpp diff --git a/desmume/src/debug.h b/src/debug.h similarity index 100% rename from desmume/src/debug.h rename to src/debug.h diff --git a/desmume/src/desmume.mk b/src/desmume.mk similarity index 100% rename from desmume/src/desmume.mk rename to src/desmume.mk diff --git a/desmume/src/dscard.h b/src/dscard.h similarity index 100% rename from desmume/src/dscard.h rename to src/dscard.h diff --git a/desmume/src/fat.h b/src/fat.h similarity index 100% rename from desmume/src/fat.h rename to src/fat.h diff --git a/desmume/src/fs-linux.cpp b/src/fs-linux.cpp similarity index 100% rename from desmume/src/fs-linux.cpp rename to src/fs-linux.cpp diff --git a/desmume/src/fs-windows.cpp b/src/fs-windows.cpp similarity index 100% rename from desmume/src/fs-windows.cpp rename to src/fs-windows.cpp diff --git a/desmume/src/fs.h b/src/fs.h similarity index 100% rename from desmume/src/fs.h rename to src/fs.h diff --git a/desmume/src/gdbstub.h b/src/gdbstub.h similarity index 100% rename from desmume/src/gdbstub.h rename to src/gdbstub.h diff --git a/desmume/src/gdbstub/Makefile.am b/src/gdbstub/Makefile.am similarity index 100% rename from desmume/src/gdbstub/Makefile.am rename to src/gdbstub/Makefile.am diff --git a/desmume/src/gdbstub/gdbstub.cpp b/src/gdbstub/gdbstub.cpp similarity index 100% rename from desmume/src/gdbstub/gdbstub.cpp rename to src/gdbstub/gdbstub.cpp diff --git a/desmume/src/gdbstub/gdbstub_internal.h b/src/gdbstub/gdbstub_internal.h similarity index 100% rename from desmume/src/gdbstub/gdbstub_internal.h rename to src/gdbstub/gdbstub_internal.h diff --git a/desmume/src/gfx3d.cpp b/src/gfx3d.cpp similarity index 99% rename from desmume/src/gfx3d.cpp rename to src/gfx3d.cpp index 7e7334fbc..cf3d3f383 100644 --- a/desmume/src/gfx3d.cpp +++ b/src/gfx3d.cpp @@ -355,7 +355,7 @@ void gfx3d_glLoadIdentity() MatrixIdentity (mtxCurrent[1]); } -BOOL gfx3d_glLoadMatrix4x4(s32 v) +BOOL gfx3d_glLoadMatrix4x4(signed long v) { mtxCurrent[mode][ML4x4ind] = fix2float(v); @@ -369,7 +369,7 @@ BOOL gfx3d_glLoadMatrix4x4(s32 v) return TRUE; } -BOOL gfx3d_glLoadMatrix4x3(s32 v) +BOOL gfx3d_glLoadMatrix4x3(signed long v) { mtxCurrent[mode][ML4x3ind] = fix2float(v); @@ -438,7 +438,7 @@ void gfx3d_glPushMatrix() T1WriteLong(MMU.MMU_MEM[ARMCPU_ARM9][0x40], 0x600, gxstat); } -void gfx3d_glPopMatrix(s32 i) +void gfx3d_glPopMatrix(signed long i) { u32 gxstat = T1ReadLong(MMU.MMU_MEM[ARMCPU_ARM9][0x40], 0x600); @@ -464,7 +464,7 @@ void gfx3d_glPopMatrix(s32 i) T1WriteLong(MMU.MMU_MEM[ARMCPU_ARM9][0x40], 0x600, gxstat); } -BOOL gfx3d_glTranslate(s32 v) +BOOL gfx3d_glTranslate(signed long v) { trans[transind] = fix2float(v); @@ -480,7 +480,7 @@ BOOL gfx3d_glTranslate(s32 v) return TRUE; } -BOOL gfx3d_glScale(s32 v) +BOOL gfx3d_glScale(signed long v) { short mymode = (mode==2?1:mode); @@ -501,7 +501,7 @@ BOOL gfx3d_glScale(s32 v) return TRUE; } -BOOL gfx3d_glMultMatrix3x3(s32 v) +BOOL gfx3d_glMultMatrix3x3(signed long v) { mtxTemporal[MM3x3ind] = fix2float(v); @@ -525,7 +525,7 @@ BOOL gfx3d_glMultMatrix3x3(s32 v) return TRUE; } -BOOL gfx3d_glMultMatrix4x3(s32 v) +BOOL gfx3d_glMultMatrix4x3(signed long v) { mtxTemporal[MM4x3ind] = fix2float(v); @@ -547,7 +547,7 @@ BOOL gfx3d_glMultMatrix4x3(s32 v) return TRUE; } -BOOL gfx3d_glMultMatrix4x4(s32 v) +BOOL gfx3d_glMultMatrix4x4(signed long v) { mtxTemporal[MM4x4ind] = fix2float(v); @@ -971,7 +971,7 @@ void gfx3d_glNormal(u32 v) for(c = 0; c < 3; c++) { - vertexColor[c] += (int)(((specular[c] * _lightColor[c] * shininessLevel) + vertexColor[c] += (((specular[c] * _lightColor[c] * shininessLevel) + (diffuse[c] * _lightColor[c] * diffuseLevel) + (ambient[c] * _lightColor[c])) / 31.0f); } @@ -984,20 +984,20 @@ void gfx3d_glNormal(u32 v) } -s32 gfx3d_GetClipMatrix (unsigned int index) +signed long gfx3d_GetClipMatrix (unsigned int index) { float val = MatrixGetMultipliedIndex (index, mtxCurrent[0], mtxCurrent[1]); val *= (1<<12); - return (s32)val; + return (signed long)val; } -s32 gfx3d_GetDirectionalMatrix (unsigned int index) +signed long gfx3d_GetDirectionalMatrix (unsigned int index) { int _index = (((index / 3) * 4) + (index % 3)); - return (s32)(mtxCurrent[2][_index]*(1<<12)); + return (signed long)(mtxCurrent[2][_index]*(1<<12)); } static void gfx3d_glLightDirection_cache(int index) diff --git a/desmume/src/gfx3d.h b/src/gfx3d.h similarity index 78% rename from desmume/src/gfx3d.h rename to src/gfx3d.h index a83b42560..4d9dbbecd 100644 --- a/desmume/src/gfx3d.h +++ b/src/gfx3d.h @@ -187,58 +187,58 @@ extern CACHE_ALIGN const u8 material_3bit_to_8bit[8]; extern CACHE_ALIGN const u8 alpha_5bit_to_4bit[32]; //GE commands: -void gfx3d_glViewPort(u32 v); -void gfx3d_glClearColor(u32 v); -void gfx3d_glFogColor(u32 v); -void gfx3d_glFogOffset (u32 v); -void gfx3d_glClearDepth(u32 v); -void gfx3d_glMatrixMode(u32 v); +void gfx3d_glViewPort(unsigned long v); +void gfx3d_glClearColor(unsigned long v); +void gfx3d_glFogColor(unsigned long v); +void gfx3d_glFogOffset (unsigned long v); +void gfx3d_glClearDepth(unsigned long v); +void gfx3d_glMatrixMode(unsigned long v); void gfx3d_glLoadIdentity(); -BOOL gfx3d_glLoadMatrix4x4(s32 v); -BOOL gfx3d_glLoadMatrix4x3(s32 v); -void gfx3d_glStoreMatrix(u32 v); -void gfx3d_glRestoreMatrix(u32 v); +BOOL gfx3d_glLoadMatrix4x4(signed long v); +BOOL gfx3d_glLoadMatrix4x3(signed long v); +void gfx3d_glStoreMatrix(unsigned long v); +void gfx3d_glRestoreMatrix(unsigned long v); void gfx3d_glPushMatrix(void); -void gfx3d_glPopMatrix(s32 i); -BOOL gfx3d_glTranslate(s32 v); -BOOL gfx3d_glScale(s32 v); -BOOL gfx3d_glMultMatrix3x3(s32 v); -BOOL gfx3d_glMultMatrix4x3(s32 v); -BOOL gfx3d_glMultMatrix4x4(s32 v); -void gfx3d_glBegin(u32 v); +void gfx3d_glPopMatrix(signed long i); +BOOL gfx3d_glTranslate(signed long v); +BOOL gfx3d_glScale(signed long v); +BOOL gfx3d_glMultMatrix3x3(signed long v); +BOOL gfx3d_glMultMatrix4x3(signed long v); +BOOL gfx3d_glMultMatrix4x4(signed long v); +void gfx3d_glBegin(unsigned long v); void gfx3d_glEnd(void); -void gfx3d_glColor3b(u32 v); +void gfx3d_glColor3b(unsigned long v); BOOL gfx3d_glVertex16b(unsigned int v); -void gfx3d_glVertex10b(u32 v); +void gfx3d_glVertex10b(unsigned long v); void gfx3d_glVertex3_cord(unsigned int one, unsigned int two, unsigned int v); -void gfx3d_glVertex_rel(u32 v); +void gfx3d_glVertex_rel(unsigned long v); void gfx3d_glSwapScreen(unsigned int screen); int gfx3d_GetNumPolys(); int gfx3d_GetNumVertex(); -void gfx3d_glPolygonAttrib (u32 val); -void gfx3d_glMaterial0(u32 val); -void gfx3d_glMaterial1(u32 val); -BOOL gfx3d_glShininess (u32 val); +void gfx3d_glPolygonAttrib (unsigned long val); +void gfx3d_glMaterial0(unsigned long val); +void gfx3d_glMaterial1(unsigned long val); +BOOL gfx3d_glShininess (unsigned long val); void gfx3d_UpdateToonTable(u8 offset, u16 val); void gfx3d_UpdateToonTable(u8 offset, u32 val); -void gfx3d_glTexImage(u32 val); -void gfx3d_glTexPalette(u32 val); -void gfx3d_glTexCoord(u32 val); -void gfx3d_glNormal(u32 v); -s32 gfx3d_GetClipMatrix (unsigned int index); -s32 gfx3d_GetDirectionalMatrix (unsigned int index); -void gfx3d_glLightDirection (u32 v); -void gfx3d_glLightColor (u32 v); -void gfx3d_glAlphaFunc(u32 v); -BOOL gfx3d_glBoxTest(u32 v); -BOOL gfx3d_glPosTest(u32 v); -void gfx3d_glVecTest(u32 v); +void gfx3d_glTexImage(unsigned long val); +void gfx3d_glTexPalette(unsigned long val); +void gfx3d_glTexCoord(unsigned long val); +void gfx3d_glNormal(unsigned long v); +signed long gfx3d_GetClipMatrix (unsigned int index); +signed long gfx3d_GetDirectionalMatrix (unsigned int index); +void gfx3d_glLightDirection (unsigned long v); +void gfx3d_glLightColor (unsigned long v); +void gfx3d_glAlphaFunc(unsigned long v); +BOOL gfx3d_glBoxTest(unsigned long v); +BOOL gfx3d_glPosTest(unsigned long v); +void gfx3d_glVecTest(unsigned long v); unsigned int gfx3d_glGetPosRes(unsigned int index); unsigned short gfx3d_glGetVecRes(unsigned int index); -void gfx3d_glFlush(u32 v); +void gfx3d_glFlush(unsigned long v); void gfx3d_VBlankSignal(); void gfx3d_VBlankEndSignal(bool skipFrame); -void gfx3d_Control(u32 v); +void gfx3d_Control(unsigned long v); u32 gfx3d_GetGXstatus(); void gfx3d_sendCommandToFIFO(u32 val); void gfx3d_sendCommand(u32 cmd, u32 param); diff --git a/desmume/src/gtk-glade/Makefile.am b/src/gtk-glade/Makefile.am similarity index 100% rename from desmume/src/gtk-glade/Makefile.am rename to src/gtk-glade/Makefile.am diff --git a/desmume/src/gtk-glade/callbacks.cpp b/src/gtk-glade/callbacks.cpp similarity index 100% rename from desmume/src/gtk-glade/callbacks.cpp rename to src/gtk-glade/callbacks.cpp diff --git a/desmume/src/gtk-glade/callbacks.h b/src/gtk-glade/callbacks.h similarity index 100% rename from desmume/src/gtk-glade/callbacks.h rename to src/gtk-glade/callbacks.h diff --git a/desmume/src/gtk-glade/callbacks_IO.cpp b/src/gtk-glade/callbacks_IO.cpp similarity index 100% rename from desmume/src/gtk-glade/callbacks_IO.cpp rename to src/gtk-glade/callbacks_IO.cpp diff --git a/desmume/src/gtk-glade/callbacks_IO.h b/src/gtk-glade/callbacks_IO.h similarity index 100% rename from desmume/src/gtk-glade/callbacks_IO.h rename to src/gtk-glade/callbacks_IO.h diff --git a/desmume/src/gtk-glade/dTools/callbacks_1_ioregs.cpp b/src/gtk-glade/dTools/callbacks_1_ioregs.cpp similarity index 100% rename from desmume/src/gtk-glade/dTools/callbacks_1_ioregs.cpp rename to src/gtk-glade/dTools/callbacks_1_ioregs.cpp diff --git a/desmume/src/gtk-glade/dTools/callbacks_2_memview.cpp b/src/gtk-glade/dTools/callbacks_2_memview.cpp similarity index 100% rename from desmume/src/gtk-glade/dTools/callbacks_2_memview.cpp rename to src/gtk-glade/dTools/callbacks_2_memview.cpp diff --git a/desmume/src/gtk-glade/dTools/callbacks_3_palview.cpp b/src/gtk-glade/dTools/callbacks_3_palview.cpp similarity index 95% rename from desmume/src/gtk-glade/dTools/callbacks_3_palview.cpp rename to src/gtk-glade/dTools/callbacks_3_palview.cpp index 85dcba76d..4905094c8 100755 --- a/desmume/src/gtk-glade/dTools/callbacks_3_palview.cpp +++ b/src/gtk-glade/dTools/callbacks_3_palview.cpp @@ -49,10 +49,10 @@ void init_combo_palette(GtkComboBox *combo, u16 ** addresses) { DO("Main screen SPR ExtPAL 1", ARM9Mem.ObjExtPal[0][1],) DO("Sub screen SPR ExtPAL 0", ARM9Mem.ObjExtPal[1][0],) DO("Sub screen SPR ExtPAL 1", ARM9Mem.ObjExtPal[1][1],) - DO("Texture PAL 0", ARM9Mem.texInfo.texPalSlot[0],) - DO("Texture PAL 1", ARM9Mem.texInfo.texPalSlot[1],) - DO("Texture PAL 2", ARM9Mem.texInfo.texPalSlot[2],) - DO("Texture PAL 3", ARM9Mem.texInfo.texPalSlot[3],) + DO("Texture PAL 0", ARM9Mem.texPalSlot[0],) + DO("Texture PAL 1", ARM9Mem.texPalSlot[1],) + DO("Texture PAL 2", ARM9Mem.texPalSlot[2],) + DO("Texture PAL 3", ARM9Mem.texPalSlot[3],) #undef DO gtk_combo_box_set_active(combo,0); } diff --git a/desmume/src/gtk-glade/dTools/callbacks_4_tileview.cpp b/src/gtk-glade/dTools/callbacks_4_tileview.cpp similarity index 93% rename from desmume/src/gtk-glade/dTools/callbacks_4_tileview.cpp rename to src/gtk-glade/dTools/callbacks_4_tileview.cpp index 46b059c26..ba3f9b39e 100755 --- a/desmume/src/gtk-glade/dTools/callbacks_4_tileview.cpp +++ b/src/gtk-glade/dTools/callbacks_4_tileview.cpp @@ -34,26 +34,25 @@ void init_combo_memory(GtkComboBox *combo, u8 ** addresses) { gtk_list_store_set (model, &iter, 0, str,-1); \ addresses[i]=(addr r); i++; -// FIXME: update tileview to actually work -// DO("A-BG - 0x6000000",ARM9Mem.ARM9_ABG,) -// DO("A-BG - 0x6010000",ARM9Mem.ARM9_ABG,+0x10000) -// DO("A-BG - 0x6020000",ARM9Mem.ARM9_ABG,+0x20000) -// DO("A-BG - 0x6030000",ARM9Mem.ARM9_ABG,+0x30000) -// DO("A-BG - 0x6040000",ARM9Mem.ARM9_ABG,+0x40000) -// DO("A-BG - 0x6050000",ARM9Mem.ARM9_ABG,+0x50000) -// DO("A-BG - 0x6060000",ARM9Mem.ARM9_ABG,+0x60000) -// DO("A-BG - 0x6070000",ARM9Mem.ARM9_ABG,+0x70000) + DO("A-BG - 0x6000000",ARM9Mem.ARM9_ABG,) + DO("A-BG - 0x6010000",ARM9Mem.ARM9_ABG,+0x10000) + DO("A-BG - 0x6020000",ARM9Mem.ARM9_ABG,+0x20000) + DO("A-BG - 0x6030000",ARM9Mem.ARM9_ABG,+0x30000) + DO("A-BG - 0x6040000",ARM9Mem.ARM9_ABG,+0x40000) + DO("A-BG - 0x6050000",ARM9Mem.ARM9_ABG,+0x50000) + DO("A-BG - 0x6060000",ARM9Mem.ARM9_ABG,+0x60000) + DO("A-BG - 0x6070000",ARM9Mem.ARM9_ABG,+0x70000) -// DO("B-BG - 0x6200000",ARM9Mem.ARM9_BBG,) -// DO("B-BG - 0x6210000",ARM9Mem.ARM9_BBG,+0x10000) + DO("B-BG - 0x6200000",ARM9Mem.ARM9_BBG,) + DO("B-BG - 0x6210000",ARM9Mem.ARM9_BBG,+0x10000) -// DO("A-OBJ- 0x6400000",ARM9Mem.ARM9_AOBJ,) -// DO("A-OBJ- 0x6410000",ARM9Mem.ARM9_AOBJ,+0x10000) -// DO("A-OBJ- 0x6420000",ARM9Mem.ARM9_AOBJ,+0x20000) -// DO("A-OBJ- 0x6430000",ARM9Mem.ARM9_AOBJ,+0x30000) + DO("A-OBJ- 0x6400000",ARM9Mem.ARM9_AOBJ,) + DO("A-OBJ- 0x6410000",ARM9Mem.ARM9_AOBJ,+0x10000) + DO("A-OBJ- 0x6420000",ARM9Mem.ARM9_AOBJ,+0x20000) + DO("A-OBJ- 0x6430000",ARM9Mem.ARM9_AOBJ,+0x30000) -// DO("B-OBJ- 0x6600000",ARM9Mem.ARM9_BOBJ,) -// DO("B-OBJ- 0x6610000",ARM9Mem.ARM9_BOBJ,+0x10000) + DO("B-OBJ- 0x6600000",ARM9Mem.ARM9_BOBJ,) + DO("B-OBJ- 0x6610000",ARM9Mem.ARM9_BOBJ,+0x10000) DO("LCD - 0x6800000",ARM9Mem.ARM9_LCD,) DO("LCD - 0x6810000",ARM9Mem.ARM9_LCD,+0x10000) diff --git a/desmume/src/gtk-glade/dTools/callbacks_dtools.h b/src/gtk-glade/dTools/callbacks_dtools.h similarity index 100% rename from desmume/src/gtk-glade/dTools/callbacks_dtools.h rename to src/gtk-glade/dTools/callbacks_dtools.h diff --git a/desmume/src/gtk-glade/dTools/dTools_display.h b/src/gtk-glade/dTools/dTools_display.h similarity index 100% rename from desmume/src/gtk-glade/dTools/dTools_display.h rename to src/gtk-glade/dTools/dTools_display.h diff --git a/desmume/src/gtk-glade/desmume-glade.desktop b/src/gtk-glade/desmume-glade.desktop similarity index 100% rename from desmume/src/gtk-glade/desmume-glade.desktop rename to src/gtk-glade/desmume-glade.desktop diff --git a/desmume/src/gtk-glade/desmume.cpp b/src/gtk-glade/desmume.cpp similarity index 100% rename from desmume/src/gtk-glade/desmume.cpp rename to src/gtk-glade/desmume.cpp diff --git a/desmume/src/gtk-glade/desmume.h b/src/gtk-glade/desmume.h similarity index 100% rename from desmume/src/gtk-glade/desmume.h rename to src/gtk-glade/desmume.h diff --git a/desmume/src/gtk-glade/doc/Makefile.am b/src/gtk-glade/doc/Makefile.am similarity index 100% rename from desmume/src/gtk-glade/doc/Makefile.am rename to src/gtk-glade/doc/Makefile.am diff --git a/desmume/src/gtk-glade/doc/desmume-glade.1 b/src/gtk-glade/doc/desmume-glade.1 similarity index 100% rename from desmume/src/gtk-glade/doc/desmume-glade.1 rename to src/gtk-glade/doc/desmume-glade.1 diff --git a/desmume/src/gtk-glade/gdk_3Demu.cpp b/src/gtk-glade/gdk_3Demu.cpp similarity index 100% rename from desmume/src/gtk-glade/gdk_3Demu.cpp rename to src/gtk-glade/gdk_3Demu.cpp diff --git a/desmume/src/gtk-glade/gdk_3Demu.h b/src/gtk-glade/gdk_3Demu.h similarity index 100% rename from desmume/src/gtk-glade/gdk_3Demu.h rename to src/gtk-glade/gdk_3Demu.h diff --git a/desmume/src/gtk-glade/gdk_gl.cpp b/src/gtk-glade/gdk_gl.cpp similarity index 100% rename from desmume/src/gtk-glade/gdk_gl.cpp rename to src/gtk-glade/gdk_gl.cpp diff --git a/desmume/src/gtk-glade/gdk_gl.h b/src/gtk-glade/gdk_gl.h similarity index 100% rename from desmume/src/gtk-glade/gdk_gl.h rename to src/gtk-glade/gdk_gl.h diff --git a/desmume/src/gtk-glade/glade-xml.cpp b/src/gtk-glade/glade-xml.cpp similarity index 100% rename from desmume/src/gtk-glade/glade-xml.cpp rename to src/gtk-glade/glade-xml.cpp diff --git a/desmume/src/gtk-glade/glade/DeSmuME.xpm b/src/gtk-glade/glade/DeSmuME.xpm similarity index 100% rename from desmume/src/gtk-glade/glade/DeSmuME.xpm rename to src/gtk-glade/glade/DeSmuME.xpm diff --git a/desmume/src/gtk-glade/glade/DeSmuMe.glade b/src/gtk-glade/glade/DeSmuMe.glade similarity index 100% rename from desmume/src/gtk-glade/glade/DeSmuMe.glade rename to src/gtk-glade/glade/DeSmuMe.glade diff --git a/desmume/src/gtk-glade/glade/DeSmuMe_Dtools.glade b/src/gtk-glade/glade/DeSmuMe_Dtools.glade similarity index 100% rename from desmume/src/gtk-glade/glade/DeSmuMe_Dtools.glade rename to src/gtk-glade/glade/DeSmuMe_Dtools.glade diff --git a/desmume/src/gtk-glade/globals.h b/src/gtk-glade/globals.h similarity index 100% rename from desmume/src/gtk-glade/globals.h rename to src/gtk-glade/globals.h diff --git a/desmume/src/gtk-glade/keyval_names.cpp b/src/gtk-glade/keyval_names.cpp similarity index 100% rename from desmume/src/gtk-glade/keyval_names.cpp rename to src/gtk-glade/keyval_names.cpp diff --git a/desmume/src/gtk-glade/keyval_names.h b/src/gtk-glade/keyval_names.h similarity index 100% rename from desmume/src/gtk-glade/keyval_names.h rename to src/gtk-glade/keyval_names.h diff --git a/desmume/src/gtk-glade/main.cpp b/src/gtk-glade/main.cpp similarity index 100% rename from desmume/src/gtk-glade/main.cpp rename to src/gtk-glade/main.cpp diff --git a/desmume/src/gtk/DeSmuME.xpm b/src/gtk/DeSmuME.xpm similarity index 100% rename from desmume/src/gtk/DeSmuME.xpm rename to src/gtk/DeSmuME.xpm diff --git a/desmume/src/gtk/Makefile.am b/src/gtk/Makefile.am similarity index 100% rename from desmume/src/gtk/Makefile.am rename to src/gtk/Makefile.am diff --git a/desmume/src/gtk/dTool.h b/src/gtk/dTool.h similarity index 100% rename from desmume/src/gtk/dTool.h rename to src/gtk/dTool.h diff --git a/desmume/src/gtk/dToolsList.cpp b/src/gtk/dToolsList.cpp similarity index 100% rename from desmume/src/gtk/dToolsList.cpp rename to src/gtk/dToolsList.cpp diff --git a/desmume/src/gtk/desmume.cpp b/src/gtk/desmume.cpp similarity index 100% rename from desmume/src/gtk/desmume.cpp rename to src/gtk/desmume.cpp diff --git a/desmume/src/gtk/desmume.desktop b/src/gtk/desmume.desktop similarity index 100% rename from desmume/src/gtk/desmume.desktop rename to src/gtk/desmume.desktop diff --git a/desmume/src/gtk/desmume.h b/src/gtk/desmume.h similarity index 100% rename from desmume/src/gtk/desmume.h rename to src/gtk/desmume.h diff --git a/desmume/src/gtk/doc/Makefile.am b/src/gtk/doc/Makefile.am similarity index 100% rename from desmume/src/gtk/doc/Makefile.am rename to src/gtk/doc/Makefile.am diff --git a/desmume/src/gtk/doc/desmume.1 b/src/gtk/doc/desmume.1 similarity index 100% rename from desmume/src/gtk/doc/desmume.1 rename to src/gtk/doc/desmume.1 diff --git a/desmume/src/gtk/gdk_3Demu.cpp b/src/gtk/gdk_3Demu.cpp similarity index 100% rename from desmume/src/gtk/gdk_3Demu.cpp rename to src/gtk/gdk_3Demu.cpp diff --git a/desmume/src/gtk/gdk_3Demu.h b/src/gtk/gdk_3Demu.h similarity index 100% rename from desmume/src/gtk/gdk_3Demu.h rename to src/gtk/gdk_3Demu.h diff --git a/desmume/src/gtk/main.cpp b/src/gtk/main.cpp similarity index 98% rename from desmume/src/gtk/main.cpp rename to src/gtk/main.cpp index 1f2485dc5..67ddf2b94 100644 --- a/desmume/src/gtk/main.cpp +++ b/src/gtk/main.cpp @@ -930,10 +930,11 @@ static gboolean Stylus_Move(GtkWidget *w, GdkEventMotion *e, gpointer data) GdkModifierType state; gint x,y; s32 EmuX, EmuY; - const int *opengl = (const int *)data; + const int *opengl = (const int *)data; + if(click) { - int scaled_x, scaled_y; + int scaled_x, scaled_y; if(e->is_hint) gdk_window_get_pointer(w->window, &x, &y, &state); else { @@ -942,18 +943,20 @@ static gboolean Stylus_Move(GtkWidget *w, GdkEventMotion *e, gpointer data) state=(GdkModifierType)e->state; } - scaled_x = int(x * nds_screen_size_ratio); - scaled_y = int(y * nds_screen_size_ratio); + scaled_x = x * nds_screen_size_ratio; + scaled_y = y * nds_screen_size_ratio; LOG("X=%d, Y=%d, S&1=%d\n", x,y,state&GDK_BUTTON1_MASK); - if ( !(*opengl)) { - scaled_y -= 192; - } + if ( !(*opengl)) { + scaled_y -= 192; + } if(scaled_y >= 0 && (state & GDK_BUTTON1_MASK)) { - EmuX = CLAMP(scaled_x, 0, 255); - EmuY = CLAMP(scaled_y, 0, 192); - NDS_setTouchPos(EmuX, EmuY); + EmuX = scaled_x; + EmuY = scaled_y; + if(EmuX<0) EmuX = 0; else if(EmuX>255) EmuX = 255; + if(EmuY<0) EmuY = 0; else if(EmuY>192) EmuY = 192; + NDS_setTouchPos(EmuX, EmuY); } } @@ -975,15 +978,17 @@ static gboolean Stylus_Press(GtkWidget * w, GdkEventButton * e, gdk_window_get_pointer(w->window, &x, &y, &state); - scaled_x = int(x * nds_screen_size_ratio); - scaled_y = int(y * nds_screen_size_ratio); + scaled_x = x * nds_screen_size_ratio; + scaled_y = y * nds_screen_size_ratio; if (!(*opengl)) { scaled_y -= 192; } if (scaled_y >= 0 && (state & GDK_BUTTON1_MASK)) { - EmuX = CLAMP(scaled_x, 0, 255); - EmuY = CLAMP(scaled_y, 0, 192); + EmuX = scaled_x; + EmuY = scaled_y; + if (EmuX < 0) EmuX = 0; else if (EmuX > 255) EmuX = 255; + if (EmuY < 0) EmuY = 0; else if (EmuY > 192) EmuY = 192; NDS_setTouchPos(EmuX, EmuY); } } diff --git a/desmume/src/gtk/osmesa_3Demu.cpp b/src/gtk/osmesa_3Demu.cpp similarity index 100% rename from desmume/src/gtk/osmesa_3Demu.cpp rename to src/gtk/osmesa_3Demu.cpp diff --git a/desmume/src/gtk/osmesa_3Demu.h b/src/gtk/osmesa_3Demu.h similarity index 100% rename from desmume/src/gtk/osmesa_3Demu.h rename to src/gtk/osmesa_3Demu.h diff --git a/desmume/src/gtk/tools/ioregsView.cpp b/src/gtk/tools/ioregsView.cpp similarity index 100% rename from desmume/src/gtk/tools/ioregsView.cpp rename to src/gtk/tools/ioregsView.cpp diff --git a/desmume/src/gtk/tools/ioregsView.h b/src/gtk/tools/ioregsView.h similarity index 100% rename from desmume/src/gtk/tools/ioregsView.h rename to src/gtk/tools/ioregsView.h diff --git a/desmume/src/instruction_tabdef.inc b/src/instruction_tabdef.inc similarity index 100% rename from desmume/src/instruction_tabdef.inc rename to src/instruction_tabdef.inc diff --git a/desmume/src/matrix.cpp b/src/matrix.cpp similarity index 100% rename from desmume/src/matrix.cpp rename to src/matrix.cpp diff --git a/desmume/src/matrix.h b/src/matrix.h similarity index 100% rename from desmume/src/matrix.h rename to src/matrix.h diff --git a/desmume/src/matrix_sse2-x64.asm b/src/matrix_sse2-x64.asm similarity index 100% rename from desmume/src/matrix_sse2-x64.asm rename to src/matrix_sse2-x64.asm diff --git a/desmume/src/matrix_sse2-x86.asm b/src/matrix_sse2-x86.asm similarity index 100% rename from desmume/src/matrix_sse2-x86.asm rename to src/matrix_sse2-x86.asm diff --git a/desmume/src/mc.cpp b/src/mc.cpp similarity index 100% rename from desmume/src/mc.cpp rename to src/mc.cpp diff --git a/desmume/src/mc.h b/src/mc.h similarity index 100% rename from desmume/src/mc.h rename to src/mc.h diff --git a/desmume/src/mem.h b/src/mem.h similarity index 100% rename from desmume/src/mem.h rename to src/mem.h diff --git a/desmume/src/memorystream.h b/src/memorystream.h similarity index 100% rename from desmume/src/memorystream.h rename to src/memorystream.h diff --git a/desmume/src/mic.cpp b/src/mic.cpp similarity index 100% rename from desmume/src/mic.cpp rename to src/mic.cpp diff --git a/src/mic.h b/src/mic.h new file mode 100644 index 000000000..aede8df46 --- /dev/null +++ b/src/mic.h @@ -0,0 +1,9 @@ +#ifndef MIC_H +#define MIC_H + +BOOL Mic_Init(); +void Mic_Reset(); +void Mic_DeInit(); +u8 Mic_ReadSample(); + +#endif diff --git a/desmume/src/movie.cpp b/src/movie.cpp similarity index 100% rename from desmume/src/movie.cpp rename to src/movie.cpp diff --git a/desmume/src/movie.h b/src/movie.h similarity index 100% rename from desmume/src/movie.h rename to src/movie.h diff --git a/desmume/src/rasterize.cpp b/src/rasterize.cpp similarity index 100% rename from desmume/src/rasterize.cpp rename to src/rasterize.cpp diff --git a/desmume/src/rasterize.h b/src/rasterize.h similarity index 100% rename from desmume/src/rasterize.h rename to src/rasterize.h diff --git a/desmume/src/readwrite.cpp b/src/readwrite.cpp similarity index 100% rename from desmume/src/readwrite.cpp rename to src/readwrite.cpp diff --git a/desmume/src/readwrite.h b/src/readwrite.h similarity index 100% rename from desmume/src/readwrite.h rename to src/readwrite.h diff --git a/desmume/src/registers.h b/src/registers.h similarity index 100% rename from desmume/src/registers.h rename to src/registers.h diff --git a/desmume/src/render3D.cpp b/src/render3D.cpp similarity index 100% rename from desmume/src/render3D.cpp rename to src/render3D.cpp diff --git a/desmume/src/render3D.h b/src/render3D.h similarity index 100% rename from desmume/src/render3D.h rename to src/render3D.h diff --git a/desmume/src/rtc.cpp b/src/rtc.cpp similarity index 100% rename from desmume/src/rtc.cpp rename to src/rtc.cpp diff --git a/desmume/src/rtc.h b/src/rtc.h similarity index 100% rename from desmume/src/rtc.h rename to src/rtc.h diff --git a/desmume/src/saves.cpp b/src/saves.cpp similarity index 99% rename from desmume/src/saves.cpp rename to src/saves.cpp index 38ab97f14..2259c2ed8 100644 --- a/desmume/src/saves.cpp +++ b/src/saves.cpp @@ -143,6 +143,10 @@ SFORMAT SF_MEM[]={ { "VMEM", 1, 0x800, ARM9Mem.ARM9_VMEM}, { "OAMS", 1, 0x800, ARM9Mem.ARM9_OAM}, + { "ABGM", 1, 0x80000, ARM9Mem.ARM9_ABG}, + { "BBGM", 1, 0x20000, ARM9Mem.ARM9_BBG}, + { "AOBJ", 1, 0x40000, ARM9Mem.ARM9_AOBJ}, + { "BOBJ", 1, 0x20000, ARM9Mem.ARM9_BOBJ}, { "LCDM", 1, 0xA4000, ARM9Mem.ARM9_LCD}, { 0 } }; diff --git a/desmume/src/saves.h b/src/saves.h similarity index 100% rename from desmume/src/saves.h rename to src/saves.h diff --git a/desmume/src/shaders.h b/src/shaders.h similarity index 100% rename from desmume/src/shaders.h rename to src/shaders.h diff --git a/desmume/src/sndsdl.cpp b/src/sndsdl.cpp similarity index 100% rename from desmume/src/sndsdl.cpp rename to src/sndsdl.cpp diff --git a/desmume/src/sndsdl.h b/src/sndsdl.h similarity index 100% rename from desmume/src/sndsdl.h rename to src/sndsdl.h diff --git a/desmume/src/softrender.cpp b/src/softrender.cpp similarity index 100% rename from desmume/src/softrender.cpp rename to src/softrender.cpp diff --git a/desmume/src/softrender.h b/src/softrender.h similarity index 100% rename from desmume/src/softrender.h rename to src/softrender.h diff --git a/desmume/src/softrender_config.h b/src/softrender_config.h similarity index 100% rename from desmume/src/softrender_config.h rename to src/softrender_config.h diff --git a/desmume/src/softrender_desmumefont.h b/src/softrender_desmumefont.h similarity index 100% rename from desmume/src/softrender_desmumefont.h rename to src/softrender_desmumefont.h diff --git a/desmume/src/softrender_v3sysfont.h b/src/softrender_v3sysfont.h similarity index 100% rename from desmume/src/softrender_v3sysfont.h rename to src/softrender_v3sysfont.h diff --git a/desmume/src/texcache.cpp b/src/texcache.cpp similarity index 97% rename from desmume/src/texcache.cpp rename to src/texcache.cpp index 1f14115ed..f99e72d10 100644 --- a/desmume/src/texcache.cpp +++ b/src/texcache.cpp @@ -90,7 +90,7 @@ static MemSpan MemSpan_TexMem(u32 ofs, u32 len) len -= curr.len; ofs += curr.len; currofs += curr.len; - u8* ptr = ARM9Mem.texInfo.textureSlotAddr[slot]; + u8* ptr = ARM9Mem.textureSlotAddr[slot]; if(ptr == ARM9Mem.blank_memory) { PROGINFO("Tried to reference unmapped texture memory: slot %d\n",slot); @@ -121,7 +121,7 @@ static MemSpan MemSpan_TexPalette(u32 ofs, u32 len) //if(len != 0) //here is an actual test case of bank spanning currofs += curr.len; - u8* ptr = ARM9Mem.texInfo.texPalSlot[slot]; + u8* ptr = ARM9Mem.texPalSlot[slot]; if(ptr == ARM9Mem.blank_memory) { PROGINFO("Tried to reference unmapped texture palette memory: 16k slot #%d\n",slot); @@ -402,7 +402,7 @@ REJECT: //this check isnt necessary since the addressing is tied to the texture data which will also run out: //if(msIndex.numItems != 1) PROGINFO("Your 4x4 texture index has overrun its slot.\n"); -#define PAL4X4(offset) ( *(u16*)( ARM9Mem.texInfo.texPalSlot[((paletteAddress + (offset)*2)>>14)] + ((paletteAddress + (offset)*2)&0x3FFF) ) ) +#define PAL4X4(offset) ( *(u16*)( ARM9Mem.texPalSlot[((paletteAddress + (offset)*2)>>14)] + ((paletteAddress + (offset)*2)&0x3FFF) ) ) u16* slot1; u32* map = (u32*)ms.items[0].ptr; @@ -410,9 +410,9 @@ REJECT: u32 d = 0; if ( (texcache[tx].frm & 0xc000) == 0x8000) // texel are in slot 2 - slot1=(u16*)&ARM9Mem.texInfo.textureSlotAddr[1][((texcache[tx].frm & 0x3FFF)<<2)+0x010000]; + slot1=(u16*)&ARM9Mem.textureSlotAddr[1][((texcache[tx].frm & 0x3FFF)<<2)+0x010000]; else - slot1=(u16*)&ARM9Mem.texInfo.textureSlotAddr[1][(texcache[tx].frm & 0x3FFF)<<2]; + slot1=(u16*)&ARM9Mem.textureSlotAddr[1][(texcache[tx].frm & 0x3FFF)<<2]; u16 yTmpSize = (texcache[tx].sizeY>>2); u16 xTmpSize = (texcache[tx].sizeX>>2); diff --git a/desmume/src/texcache.h b/src/texcache.h similarity index 100% rename from desmume/src/texcache.h rename to src/texcache.h diff --git a/desmume/src/thumb_instructions.cpp b/src/thumb_instructions.cpp similarity index 100% rename from desmume/src/thumb_instructions.cpp rename to src/thumb_instructions.cpp diff --git a/desmume/src/thumb_instructions.h b/src/thumb_instructions.h similarity index 100% rename from desmume/src/thumb_instructions.h rename to src/thumb_instructions.h diff --git a/desmume/src/thumb_tabdef.inc b/src/thumb_tabdef.inc similarity index 100% rename from desmume/src/thumb_tabdef.inc rename to src/thumb_tabdef.inc diff --git a/desmume/src/types.h b/src/types.h similarity index 100% rename from desmume/src/types.h rename to src/types.h diff --git a/desmume/src/utils/ConvertUTF.c b/src/utils/ConvertUTF.c similarity index 100% rename from desmume/src/utils/ConvertUTF.c rename to src/utils/ConvertUTF.c diff --git a/desmume/src/utils/ConvertUTF.h b/src/utils/ConvertUTF.h similarity index 100% rename from desmume/src/utils/ConvertUTF.h rename to src/utils/ConvertUTF.h diff --git a/desmume/src/utils/decrypt/crc.cpp b/src/utils/decrypt/crc.cpp similarity index 100% rename from desmume/src/utils/decrypt/crc.cpp rename to src/utils/decrypt/crc.cpp diff --git a/desmume/src/utils/decrypt/crc.h b/src/utils/decrypt/crc.h similarity index 100% rename from desmume/src/utils/decrypt/crc.h rename to src/utils/decrypt/crc.h diff --git a/desmume/src/utils/decrypt/decrypt.cpp b/src/utils/decrypt/decrypt.cpp similarity index 100% rename from desmume/src/utils/decrypt/decrypt.cpp rename to src/utils/decrypt/decrypt.cpp diff --git a/desmume/src/utils/decrypt/decrypt.h b/src/utils/decrypt/decrypt.h similarity index 100% rename from desmume/src/utils/decrypt/decrypt.h rename to src/utils/decrypt/decrypt.h diff --git a/desmume/src/utils/decrypt/header.cpp b/src/utils/decrypt/header.cpp similarity index 100% rename from desmume/src/utils/decrypt/header.cpp rename to src/utils/decrypt/header.cpp diff --git a/desmume/src/utils/decrypt/header.h b/src/utils/decrypt/header.h similarity index 100% rename from desmume/src/utils/decrypt/header.h rename to src/utils/decrypt/header.h diff --git a/desmume/src/utils/guid.cpp b/src/utils/guid.cpp similarity index 100% rename from desmume/src/utils/guid.cpp rename to src/utils/guid.cpp diff --git a/desmume/src/utils/guid.h b/src/utils/guid.h similarity index 100% rename from desmume/src/utils/guid.h rename to src/utils/guid.h diff --git a/desmume/src/utils/md5.cpp b/src/utils/md5.cpp similarity index 100% rename from desmume/src/utils/md5.cpp rename to src/utils/md5.cpp diff --git a/desmume/src/utils/md5.h b/src/utils/md5.h similarity index 100% rename from desmume/src/utils/md5.h rename to src/utils/md5.h diff --git a/desmume/src/utils/valuearray.h b/src/utils/valuearray.h similarity index 100% rename from desmume/src/utils/valuearray.h rename to src/utils/valuearray.h diff --git a/desmume/src/utils/xstring.cpp b/src/utils/xstring.cpp similarity index 100% rename from desmume/src/utils/xstring.cpp rename to src/utils/xstring.cpp diff --git a/desmume/src/utils/xstring.h b/src/utils/xstring.h similarity index 100% rename from desmume/src/utils/xstring.h rename to src/utils/xstring.h diff --git a/desmume/src/wifi.cpp b/src/wifi.cpp similarity index 100% rename from desmume/src/wifi.cpp rename to src/wifi.cpp diff --git a/desmume/src/wifi.h b/src/wifi.h similarity index 100% rename from desmume/src/wifi.h rename to src/wifi.h diff --git a/desmume/src/windows/AboutBox.cpp b/src/windows/AboutBox.cpp similarity index 100% rename from desmume/src/windows/AboutBox.cpp rename to src/windows/AboutBox.cpp diff --git a/desmume/src/windows/AboutBox.h b/src/windows/AboutBox.h similarity index 100% rename from desmume/src/windows/AboutBox.h rename to src/windows/AboutBox.h diff --git a/desmume/src/windows/CWindow.cpp b/src/windows/CWindow.cpp similarity index 100% rename from desmume/src/windows/CWindow.cpp rename to src/windows/CWindow.cpp diff --git a/desmume/src/windows/CWindow.h b/src/windows/CWindow.h similarity index 100% rename from desmume/src/windows/CWindow.h rename to src/windows/CWindow.h diff --git a/desmume/src/windows/DeSmuME.ico b/src/windows/DeSmuME.ico similarity index 100% rename from desmume/src/windows/DeSmuME.ico rename to src/windows/DeSmuME.ico diff --git a/desmume/src/windows/DeSmuME_2005.vcproj b/src/windows/DeSmuME_2005.vcproj similarity index 100% rename from desmume/src/windows/DeSmuME_2005.vcproj rename to src/windows/DeSmuME_2005.vcproj diff --git a/desmume/src/windows/DeSmuME_2008.vcproj b/src/windows/DeSmuME_2008.vcproj similarity index 100% rename from desmume/src/windows/DeSmuME_2008.vcproj rename to src/windows/DeSmuME_2008.vcproj diff --git a/desmume/src/windows/DeSmuME_Intel.icproj b/src/windows/DeSmuME_Intel.icproj similarity index 100% rename from desmume/src/windows/DeSmuME_Intel.icproj rename to src/windows/DeSmuME_Intel.icproj diff --git a/desmume/src/windows/DeSmuME_Intel.sln b/src/windows/DeSmuME_Intel.sln similarity index 100% rename from desmume/src/windows/DeSmuME_Intel.sln rename to src/windows/DeSmuME_Intel.sln diff --git a/desmume/src/windows/DeSmuME_Intel.vcproj b/src/windows/DeSmuME_Intel.vcproj similarity index 100% rename from desmume/src/windows/DeSmuME_Intel.vcproj rename to src/windows/DeSmuME_Intel.vcproj diff --git a/desmume/src/windows/DeSmuME_x64.manifest b/src/windows/DeSmuME_x64.manifest similarity index 100% rename from desmume/src/windows/DeSmuME_x64.manifest rename to src/windows/DeSmuME_x64.manifest diff --git a/desmume/src/windows/DeSmuME_x86.manifest b/src/windows/DeSmuME_x86.manifest similarity index 100% rename from desmume/src/windows/DeSmuME_x86.manifest rename to src/windows/DeSmuME_x86.manifest diff --git a/desmume/src/windows/FirmConfig.cpp b/src/windows/FirmConfig.cpp similarity index 100% rename from desmume/src/windows/FirmConfig.cpp rename to src/windows/FirmConfig.cpp diff --git a/desmume/src/windows/FirmConfig.h b/src/windows/FirmConfig.h similarity index 100% rename from desmume/src/windows/FirmConfig.h rename to src/windows/FirmConfig.h diff --git a/desmume/src/windows/GL/glext.h b/src/windows/GL/glext.h similarity index 100% rename from desmume/src/windows/GL/glext.h rename to src/windows/GL/glext.h diff --git a/desmume/src/windows/IORegView.cpp b/src/windows/IORegView.cpp similarity index 100% rename from desmume/src/windows/IORegView.cpp rename to src/windows/IORegView.cpp diff --git a/desmume/src/windows/IORegView.h b/src/windows/IORegView.h similarity index 100% rename from desmume/src/windows/IORegView.h rename to src/windows/IORegView.h diff --git a/desmume/src/windows/Makefile.am b/src/windows/Makefile.am similarity index 100% rename from desmume/src/windows/Makefile.am rename to src/windows/Makefile.am diff --git a/desmume/src/windows/Makefile.win b/src/windows/Makefile.win similarity index 100% rename from desmume/src/windows/Makefile.win rename to src/windows/Makefile.win diff --git a/desmume/src/windows/afxres.h b/src/windows/afxres.h similarity index 100% rename from desmume/src/windows/afxres.h rename to src/windows/afxres.h diff --git a/desmume/src/windows/aviout.cpp b/src/windows/aviout.cpp similarity index 100% rename from desmume/src/windows/aviout.cpp rename to src/windows/aviout.cpp diff --git a/desmume/src/windows/bitmap1.bmp b/src/windows/bitmap1.bmp similarity index 100% rename from desmume/src/windows/bitmap1.bmp rename to src/windows/bitmap1.bmp diff --git a/desmume/src/windows/cheatsWin.cpp b/src/windows/cheatsWin.cpp similarity index 100% rename from desmume/src/windows/cheatsWin.cpp rename to src/windows/cheatsWin.cpp diff --git a/desmume/src/windows/cheatsWin.h b/src/windows/cheatsWin.h similarity index 100% rename from desmume/src/windows/cheatsWin.h rename to src/windows/cheatsWin.h diff --git a/desmume/src/windows/colorctrl.cpp b/src/windows/colorctrl.cpp similarity index 100% rename from desmume/src/windows/colorctrl.cpp rename to src/windows/colorctrl.cpp diff --git a/desmume/src/windows/colorctrl.h b/src/windows/colorctrl.h similarity index 100% rename from desmume/src/windows/colorctrl.h rename to src/windows/colorctrl.h diff --git a/desmume/src/windows/console.cpp b/src/windows/console.cpp similarity index 100% rename from desmume/src/windows/console.cpp rename to src/windows/console.cpp diff --git a/desmume/src/windows/console.h b/src/windows/console.h similarity index 100% rename from desmume/src/windows/console.h rename to src/windows/console.h diff --git a/desmume/src/windows/directx/DxErr8.lib b/src/windows/directx/DxErr8.lib similarity index 100% rename from desmume/src/windows/directx/DxErr8.lib rename to src/windows/directx/DxErr8.lib diff --git a/desmume/src/windows/directx/ddraw.h b/src/windows/directx/ddraw.h similarity index 100% rename from desmume/src/windows/directx/ddraw.h rename to src/windows/directx/ddraw.h diff --git a/desmume/src/windows/directx/ddraw.lib b/src/windows/directx/ddraw.lib similarity index 100% rename from desmume/src/windows/directx/ddraw.lib rename to src/windows/directx/ddraw.lib diff --git a/desmume/src/windows/directx/dinput.h b/src/windows/directx/dinput.h similarity index 100% rename from desmume/src/windows/directx/dinput.h rename to src/windows/directx/dinput.h diff --git a/desmume/src/windows/directx/dinput8.lib b/src/windows/directx/dinput8.lib similarity index 100% rename from desmume/src/windows/directx/dinput8.lib rename to src/windows/directx/dinput8.lib diff --git a/desmume/src/windows/directx/dsound.h b/src/windows/directx/dsound.h similarity index 100% rename from desmume/src/windows/directx/dsound.h rename to src/windows/directx/dsound.h diff --git a/desmume/src/windows/directx/dsound.lib b/src/windows/directx/dsound.lib similarity index 100% rename from desmume/src/windows/directx/dsound.lib rename to src/windows/directx/dsound.lib diff --git a/desmume/src/windows/directx/dxerr8.h b/src/windows/directx/dxerr8.h similarity index 100% rename from desmume/src/windows/directx/dxerr8.h rename to src/windows/directx/dxerr8.h diff --git a/desmume/src/windows/directx/dxguid.lib b/src/windows/directx/dxguid.lib similarity index 100% rename from desmume/src/windows/directx/dxguid.lib rename to src/windows/directx/dxguid.lib diff --git a/desmume/src/windows/disView.cpp b/src/windows/disView.cpp similarity index 100% rename from desmume/src/windows/disView.cpp rename to src/windows/disView.cpp diff --git a/desmume/src/windows/disView.h b/src/windows/disView.h similarity index 100% rename from desmume/src/windows/disView.h rename to src/windows/disView.h diff --git a/desmume/src/windows/gbaslot_config.cpp b/src/windows/gbaslot_config.cpp similarity index 100% rename from desmume/src/windows/gbaslot_config.cpp rename to src/windows/gbaslot_config.cpp diff --git a/desmume/src/windows/gbaslot_config.h b/src/windows/gbaslot_config.h similarity index 100% rename from desmume/src/windows/gbaslot_config.h rename to src/windows/gbaslot_config.h diff --git a/desmume/src/windows/ginfo.cpp b/src/windows/ginfo.cpp similarity index 100% rename from desmume/src/windows/ginfo.cpp rename to src/windows/ginfo.cpp diff --git a/desmume/src/windows/ginfo.h b/src/windows/ginfo.h similarity index 100% rename from desmume/src/windows/ginfo.h rename to src/windows/ginfo.h diff --git a/desmume/src/windows/hotkey.cpp b/src/windows/hotkey.cpp similarity index 73% rename from desmume/src/windows/hotkey.cpp rename to src/windows/hotkey.cpp index 7db098a28..b5b492503 100644 --- a/desmume/src/windows/hotkey.cpp +++ b/src/windows/hotkey.cpp @@ -26,11 +26,9 @@ #include "inputdx.h" #include "render3d.h" #include "throttle.h" -#include "../mic.h" SCustomKeys CustomKeys; -bool AutoHoldPressed=false; bool IsLastCustomKey (const SCustomKey *key) { @@ -72,34 +70,19 @@ void CopyCustomKeys (SCustomKeys *dst, const SCustomKeys *src) void HK_PrintScreen(int param) { OPENFILENAME ofn; - char * ptr; char filename[MAX_PATH] = ""; ZeroMemory(&ofn, sizeof(ofn)); ofn.lStructSize = sizeof(ofn); ofn.hwndOwner = MainWindow->getHWnd(); - ofn.lpstrFilter = "png file (*.png)\0*.png\0Bmp file (*.bmp)\0*.bmp\0Any file (*.*)\0*.*\0\0"; + ofn.lpstrFilter = "Bmp file (*.bmp)\0*.bmp\0Any file (*.*)\0*.*\0\0"; ofn.nFilterIndex = 1; ofn.lpstrFile = filename; ofn.lpstrTitle = "Print Screen Save As"; - ofn.nMaxFile = MAX_PATH; - ofn.lpstrDefExt = "png"; - ofn.Flags = OFN_OVERWRITEPROMPT; - GetSaveFileName(&ofn); - - ptr = strrchr(filename,'.');//look for the last . in the filename - - if ( ptr != 0 ) { - if (( strcmp ( ptr, ".BMP" ) == 0 ) || - ( strcmp ( ptr, ".bmp" ) == 0 )) - { - NDS_WriteBMP(filename); - } - if (( strcmp ( ptr, ".PNG" ) == 0 ) || - ( strcmp ( ptr, ".png" ) == 0 )) - { - NDS_WritePNG(filename); - } - } + ofn.nMaxFile = MAX_PATH; + ofn.lpstrDefExt = "bmp"; + ofn.Flags = OFN_OVERWRITEPROMPT; + GetSaveFileName(&ofn); + NDS_WriteBMP(filename); } void HK_StateSaveSlot(int num) @@ -147,49 +130,6 @@ void HK_StateQuickLoadSlot(int) HK_StateLoadSlot(lastSaveState); } -void HK_MicrophoneKeyDown(int) {MicButtonPressed =1;} -void HK_MicrophoneKeyUp(int) {MicButtonPressed =0;} - -void HK_AutoHoldClearKeyDown(int) { - - for (int i=0; i < 10; i++) { - AutoHold.hold(i)=false; - } -} - -void HK_AutoHoldKeyDown(int) {AutoHoldPressed = true;} -void HK_AutoHoldKeyUp(int) {AutoHoldPressed = false;} - -void HK_TurboRightKeyDown(int) { Turbo.Right = true; } -void HK_TurboRightKeyUp(int) { Turbo.Right = false; } - -void HK_TurboLeftKeyDown(int) { Turbo.Left = true; } -void HK_TurboLeftKeyUp(int) { Turbo.Left = false; } - -void HK_TurboDownKeyDown(int) { Turbo.Down = true; } -void HK_TurboDownKeyUp(int) { Turbo.Down = false; } - -void HK_TurboUpKeyDown(int) { Turbo.Up = true; } -void HK_TurboUpKeyUp(int) { Turbo.Up = false; } - -void HK_TurboBKeyDown(int) { Turbo.B = true; } -void HK_TurboBKeyUp(int) { Turbo.B = false; } - -void HK_TurboAKeyDown(int) { Turbo.A = true; } -void HK_TurboAKeyUp(int) { Turbo.A = false; } - -void HK_TurboXKeyDown(int) { Turbo.X = true; } -void HK_TurboXKeyUp(int) { Turbo.X = false; } - -void HK_TurboYKeyDown(int) { Turbo.Y = true; } -void HK_TurboYKeyUp(int) { Turbo.Y = false; } - -void HK_TurboStartKeyDown(int) { Turbo.Start = true; } -void HK_TurboStartKeyUp(int) { Turbo.Start = false; } - -void HK_TurboSelectKeyDown(int) { Turbo.Select = true; } -void HK_TurboSelectKeyUp(int) { Turbo.Select = false; } - void HK_Pause(int) { Pause(); } void HK_FastForwardToggle(int) { FastForward ^=1; } void HK_FastForwardKeyDown(int) { FastForward = 1; } @@ -234,89 +174,6 @@ void InitCustomKeys (SCustomKeys *keys) keys->Pause.page = HOTKEY_PAGE_MAIN; keys->Pause.key = VK_SPACE; - keys->TurboRight.handleKeyDown = HK_TurboRightKeyDown; - keys->TurboRight.handleKeyUp = HK_TurboRightKeyUp; - keys->TurboRight.code = "TurboRight"; - keys->TurboRight.name = L"Turbo Right"; - keys->TurboRight.page = HOTKEY_PAGE_TURBO; - keys->TurboRight.key = NULL; - - keys->AutoHoldClear.handleKeyDown = HK_AutoHoldClearKeyDown; - keys->AutoHoldClear.code = "AutoHoldClear"; - keys->AutoHoldClear.name = L"Auto-Hold Clear"; - keys->AutoHoldClear.page = HOTKEY_PAGE_MAIN; - keys->AutoHoldClear.key = NULL; - - keys->AutoHold.handleKeyDown = HK_AutoHoldKeyDown; - keys->AutoHold.handleKeyUp = HK_AutoHoldKeyUp; - keys->AutoHold.code = "AutoHold"; - keys->AutoHold.name = L"Auto-Hold"; - keys->AutoHold.page = HOTKEY_PAGE_MAIN; - keys->AutoHold.key = NULL; - - keys->TurboLeft.handleKeyDown = HK_TurboLeftKeyDown; - keys->TurboLeft.handleKeyUp = HK_TurboLeftKeyUp; - keys->TurboLeft.code = "TurboLeft"; - keys->TurboLeft.name = L"Turbo Left"; - keys->TurboLeft.page = HOTKEY_PAGE_TURBO; - keys->TurboLeft.key = NULL; - - keys->TurboDown.handleKeyDown = HK_TurboDownKeyDown; - keys->TurboDown.handleKeyUp = HK_TurboDownKeyUp; - keys->TurboDown.code = "TurboDown"; - keys->TurboDown.name = L"Turbo Down"; - keys->TurboDown.page = HOTKEY_PAGE_TURBO; - keys->TurboDown.key = NULL; - - keys->TurboUp.handleKeyDown = HK_TurboUpKeyDown; - keys->TurboUp.handleKeyUp = HK_TurboUpKeyUp; - keys->TurboUp.code = "TurboUp"; - keys->TurboUp.name = L"Turbo Up"; - keys->TurboUp.page = HOTKEY_PAGE_TURBO; - keys->TurboUp.key = NULL; - - keys->TurboB.handleKeyDown = HK_TurboBKeyDown; - keys->TurboB.handleKeyUp = HK_TurboBKeyUp; - keys->TurboB.code = "TurboB"; - keys->TurboB.name = L"Turbo B"; - keys->TurboB.page = HOTKEY_PAGE_TURBO; - keys->TurboB.key = NULL; - - keys->TurboA.handleKeyDown = HK_TurboAKeyDown; - keys->TurboA.handleKeyUp = HK_TurboAKeyUp; - keys->TurboA.code = "TurboA"; - keys->TurboA.name = L"Turbo A"; - keys->TurboA.page = HOTKEY_PAGE_TURBO; - keys->TurboA.key = NULL; - - keys->TurboX.handleKeyDown = HK_TurboXKeyDown; - keys->TurboX.handleKeyUp = HK_TurboXKeyUp; - keys->TurboX.code = "TurboX"; - keys->TurboX.name = L"Turbo X"; - keys->TurboX.page = HOTKEY_PAGE_TURBO; - keys->TurboX.key = NULL; - - keys->TurboY.handleKeyDown = HK_TurboYKeyDown; - keys->TurboY.handleKeyUp = HK_TurboYKeyUp; - keys->TurboY.code = "TurboY"; - keys->TurboY.name = L"Turbo Y"; - keys->TurboY.page = HOTKEY_PAGE_TURBO; - keys->TurboY.key = NULL; - - keys->TurboSelect.handleKeyDown = HK_TurboSelectKeyDown; - keys->TurboSelect.handleKeyUp = HK_TurboSelectKeyUp; - keys->TurboSelect.code = "TurboSelect"; - keys->TurboSelect.name = L"Turbo Select"; - keys->TurboSelect.page = HOTKEY_PAGE_TURBO; - keys->TurboSelect.key = NULL; - - keys->TurboStart.handleKeyDown = HK_TurboStartKeyDown; - keys->TurboStart.handleKeyUp = HK_TurboStartKeyUp; - keys->TurboStart.code = "TurboStart"; - keys->TurboStart.name = L"Turbo Start"; - keys->TurboStart.page = HOTKEY_PAGE_TURBO; - keys->TurboStart.key = NULL; - keys->FastForward.handleKeyDown = HK_FastForwardKeyDown; keys->FastForward.handleKeyUp = HK_FastForwardKeyUp; keys->FastForward.code = "FastForward"; @@ -360,13 +217,6 @@ void InitCustomKeys (SCustomKeys *keys) keys->PrintScreen.page = HOTKEY_PAGE_MAIN; keys->PrintScreen.key = VK_PAUSE; - keys->Microphone.handleKeyDown = HK_MicrophoneKeyDown; - keys->Microphone.handleKeyUp = HK_MicrophoneKeyUp; - keys->Microphone.code = "Microphone"; - keys->Microphone.name = L"Microphone"; - keys->Microphone.page = HOTKEY_PAGE_MAIN; - keys->Microphone.key = NULL; - keys->QuickSave.handleKeyDown = HK_StateQuickSaveSlot; keys->QuickSave.code = "QuickSave"; keys->QuickSave.name = L"Quick Save"; diff --git a/desmume/src/windows/hotkey.h b/src/windows/hotkey.h similarity index 96% rename from desmume/src/windows/hotkey.h rename to src/windows/hotkey.h index e01521f19..39b9b96d0 100644 --- a/desmume/src/windows/hotkey.h +++ b/src/windows/hotkey.h @@ -31,7 +31,6 @@ enum HotkeyPage { HOTKEY_PAGE_MAIN=0, HOTKEY_PAGE_STATE, HOTKEY_PAGE_STATE_SLOTS, - HOTKEY_PAGE_TURBO, NUM_HOTKEY_PAGE, }; @@ -39,7 +38,6 @@ static LPCTSTR hotkeyPageTitle[] = { _T("Main"), _T("Savestates"), _T("Savestate Slots"), - _T("Turbo"), _T("NUM_HOTKEY_PAGE"), }; @@ -65,11 +63,7 @@ struct SCustomKeys SCustomKey Slot[10]; SCustomKey QuickSave, QuickLoad; - SCustomKey Pause, FrameAdvance, FastForward, FastForwardToggle, IncreaseSpeed, DecreaseSpeed, Microphone; - - SCustomKey TurboRight, TurboLeft, TurboDown, TurboUp, TurboSelect, TurboStart, TurboB, TurboA, TurboY, TurboX; - - SCustomKey AutoHold, AutoHoldClear; + SCustomKey Pause, FrameAdvance, FastForward, FastForwardToggle, IncreaseSpeed, DecreaseSpeed; SCustomKey ToggleRasterizer; @@ -97,8 +91,6 @@ void HK_StateSetSlot(int); void HK_Pause(int); void HK_FastForward(int); -extern bool AutoHoldPressed; - #endif //HOTKEY_H_INCLUDED /********************************************************************************** diff --git a/desmume/src/windows/inputdx.cpp b/src/windows/inputdx.cpp similarity index 99% rename from desmume/src/windows/inputdx.cpp rename to src/windows/inputdx.cpp index 52c8a0de8..27e3274d1 100644 --- a/desmume/src/windows/inputdx.cpp +++ b/src/windows/inputdx.cpp @@ -2198,19 +2198,7 @@ void input_process() bool G = joypads[0] & DEBUG_MASK; bool F = joypads[0] & LID_MASK; - if(AutoHoldPressed && R) AutoHold.Right ^= true; - if(AutoHoldPressed && L) AutoHold.Left ^= true; - if(AutoHoldPressed && D) AutoHold.Down ^= true; - if(AutoHoldPressed && U) AutoHold.Up ^= true; - if(AutoHoldPressed && T) AutoHold.Select ^= true; - if(AutoHoldPressed && S) AutoHold.Start ^= true; - if(AutoHoldPressed && B) AutoHold.B ^= true; - if(AutoHoldPressed && A) AutoHold.A ^= true; - if(AutoHoldPressed && Y) AutoHold.Y ^= true; - if(AutoHoldPressed && X) AutoHold.X ^= true; - NDS_setPad( R, L, D, U, T, S, B, A, Y, X, W, E, G, F); - } static void set_hotkeyinfo(HWND hDlg) diff --git a/desmume/src/windows/inputdx.h b/src/windows/inputdx.h similarity index 100% rename from desmume/src/windows/inputdx.h rename to src/windows/inputdx.h diff --git a/desmume/src/windows/langs/build_utils/gettextlib.dll b/src/windows/langs/build_utils/gettextlib.dll similarity index 100% rename from desmume/src/windows/langs/build_utils/gettextlib.dll rename to src/windows/langs/build_utils/gettextlib.dll diff --git a/desmume/src/windows/langs/build_utils/gettextpo.dll b/src/windows/langs/build_utils/gettextpo.dll similarity index 100% rename from desmume/src/windows/langs/build_utils/gettextpo.dll rename to src/windows/langs/build_utils/gettextpo.dll diff --git a/desmume/src/windows/langs/build_utils/gettextsrc.dll b/src/windows/langs/build_utils/gettextsrc.dll similarity index 100% rename from desmume/src/windows/langs/build_utils/gettextsrc.dll rename to src/windows/langs/build_utils/gettextsrc.dll diff --git a/desmume/src/windows/langs/build_utils/iconv.dll b/src/windows/langs/build_utils/iconv.dll similarity index 100% rename from desmume/src/windows/langs/build_utils/iconv.dll rename to src/windows/langs/build_utils/iconv.dll diff --git a/desmume/src/windows/langs/build_utils/intl.dll b/src/windows/langs/build_utils/intl.dll similarity index 100% rename from desmume/src/windows/langs/build_utils/intl.dll rename to src/windows/langs/build_utils/intl.dll diff --git a/desmume/src/windows/langs/build_utils/libiconv-2.dll b/src/windows/langs/build_utils/libiconv-2.dll similarity index 100% rename from desmume/src/windows/langs/build_utils/libiconv-2.dll rename to src/windows/langs/build_utils/libiconv-2.dll diff --git a/desmume/src/windows/langs/build_utils/msgfmt.exe b/src/windows/langs/build_utils/msgfmt.exe similarity index 100% rename from desmume/src/windows/langs/build_utils/msgfmt.exe rename to src/windows/langs/build_utils/msgfmt.exe diff --git a/desmume/src/windows/langs/fr_FR.mo b/src/windows/langs/fr_FR.mo similarity index 100% rename from desmume/src/windows/langs/fr_FR.mo rename to src/windows/langs/fr_FR.mo diff --git a/desmume/src/windows/lightView.cpp b/src/windows/lightView.cpp similarity index 100% rename from desmume/src/windows/lightView.cpp rename to src/windows/lightView.cpp diff --git a/desmume/src/windows/lightView.h b/src/windows/lightView.h similarity index 100% rename from desmume/src/windows/lightView.h rename to src/windows/lightView.h diff --git a/desmume/src/windows/main.cpp b/src/windows/main.cpp similarity index 91% rename from desmume/src/windows/main.cpp rename to src/windows/main.cpp index 812e44e35..4ed8f45ff 100644 --- a/desmume/src/windows/main.cpp +++ b/src/windows/main.cpp @@ -70,7 +70,6 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #include "gbaslot_config.h" #include "cheatsWin.h" -#include "../mic.h" #include "../common.h" #include "main.h" #include "hotkey.h" @@ -161,8 +160,8 @@ static int FrameLimit = 1; //=========================== view tools TOOLSCLASS *ViewDisasm_ARM7 = NULL; TOOLSCLASS *ViewDisasm_ARM9 = NULL; -//TOOLSCLASS *ViewMem_ARM7 = NULL; -//TOOLSCLASS *ViewMem_ARM9 = NULL; +TOOLSCLASS *ViewMem_ARM7 = NULL; +TOOLSCLASS *ViewMem_ARM9 = NULL; TOOLSCLASS *ViewRegisters = NULL; TOOLSCLASS *ViewPalette = NULL; TOOLSCLASS *ViewTiles = NULL; @@ -221,126 +220,8 @@ bool frameCounterDisplay = false; bool FpsDisplay = false; bool ShowInputDisplay = false; bool ShowLagFrameCounter = false; -bool ShowMicrophone = false; -bool HudEditorMode = false; -bool UseMicSample = false; unsigned short windowSize = 0; -struct HudCoordinates{ - int x; - int y; - int xsize; - int ysize; - int storedx; - int storedy; - int clicked; -}; - -struct HudStruct { - - HudCoordinates FpsDisplay; - HudCoordinates FrameCounter; - HudCoordinates InputDisplay; - HudCoordinates LagFrameCounter; - HudCoordinates Microphone; - HudCoordinates Dummy; - - HudCoordinates &hud(int i) { return ((HudCoordinates*)this)[i]; } -}; - -void SetHudDummy (HudCoordinates *hud) -{ - hud->x=666; - hud->y=666; -} - -bool IsHudDummy (HudCoordinates *hud) -{ - return (hud->x == 666 && hud->y == 666); -} - -HudStruct Hud; - -void EditHud(s32 x, s32 y, HudStruct *hudstruct) { - - UINT i = 0; - - while (!IsHudDummy(&hudstruct->hud(i))) { - HudCoordinates &hud = hudstruct->hud(i); - - //reset - if(!hud.clicked) { - hud.storedx=0; - hud.storedy=0; - } - - if((x >= hud.x && x <= hud.x + hud.xsize) && - (y >= hud.y && y <= hud.y + hud.ysize) && !hud.clicked ) { - - hud.clicked=1; - hud.storedx = x - hud.x; - hud.storedy = y - hud.y; - } - - if(hud.clicked) { - hud.x = x - hud.storedx; - hud.y = y - hud.storedy; - } - - //sanity checks - if(hud.x < 0) hud.x = 0; - if(hud.y < 0) hud.y = 0; - if(hud.x > 245)hud.x = 245; //margins - if(hud.y > 180)hud.y = 180; - - if(hud.clicked) - break;//prevent items from grouping together - - i++; - } -} - -void HudClickRelease(HudStruct *hudstruct) { - - UINT i = 0; - - while (!IsHudDummy(&hudstruct->hud(i))) { - HudCoordinates &hud = hudstruct->hud(i); - hud.clicked=0; - i++; - } -} - -void ResetHud(HudStruct *hudstruct) { - - hudstruct->FpsDisplay.x=0; - hudstruct->FpsDisplay.y=5; - hudstruct->FpsDisplay.xsize=120; - hudstruct->FpsDisplay.ysize=10; - - hudstruct->FrameCounter.x=0; - hudstruct->FrameCounter.y=25; - hudstruct->FrameCounter.xsize=60; - hudstruct->FrameCounter.ysize=10; - - hudstruct->InputDisplay.x=0; - hudstruct->InputDisplay.y=45; - hudstruct->InputDisplay.xsize=120; - hudstruct->InputDisplay.ysize=10; - - hudstruct->LagFrameCounter.x=0; - hudstruct->LagFrameCounter.y=65; - hudstruct->LagFrameCounter.xsize=30; - hudstruct->LagFrameCounter.ysize=10; - - hudstruct->Microphone.x=0; - hudstruct->Microphone.y=85; - hudstruct->Microphone.xsize=20; - hudstruct->Microphone.ysize=10; - - SetHudDummy(&hudstruct->Dummy); -} - unsigned int lastSaveState = 0; //Keeps track of last savestate used for quick save/load functions stringstream MessageToDisplay; //temp variable to store message that will be displayed via DisplayMessage function int displayMessageCounter = 0; //Counter to keep track with how long to display messages on screen @@ -370,7 +251,6 @@ struct NDS_fw_config_data win_fw_config; LRESULT CALLBACK GFX3DSettingsDlgProc(HWND hw, UINT msg, WPARAM wp, LPARAM lp); LRESULT CALLBACK SoundSettingsDlgProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam); LRESULT CALLBACK EmulationSettingsDlgProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam); -LRESULT CALLBACK MicrophoneSettingsDlgProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam); LRESULT CALLBACK WifiSettingsDlgProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam); struct configured_features { @@ -960,7 +840,6 @@ DWORD WINAPI run() int fps=0; int fpsframecount=0; u64 fpsticks=0; - int tools_frames = 0; int res; HWND hwnd = MainWindow->getHWnd(); @@ -997,8 +876,6 @@ DWORD WINAPI run() while(execute) { input_process(); - - if (ShowInputDisplay) osd->addFixed(Hud.InputDisplay.x, Hud.InputDisplay.y, "%s",InputDisplayString.c_str()); { Lock lock; @@ -1022,7 +899,7 @@ DWORD WINAPI run() static int fps3d = 0; - if (FpsDisplay) osd->addFixed(Hud.FpsDisplay.x, Hud.FpsDisplay.y, "%02d Fps / %02d 3d", fps, fps3d); + if (FpsDisplay) osd->addFixed(0, 5, "%02d Fps / %02d 3d", fps, fps3d); osd->update(); Display(); osd->clear(); @@ -1035,16 +912,6 @@ DWORD WINAPI run() } - tools_frames++; - if(tools_frames == 10) - { - if(MemView_IsOpened(ARMCPU_ARM9)) MemView_Refresh(ARMCPU_ARM9); - if(MemView_IsOpened(ARMCPU_ARM7)) MemView_Refresh(ARMCPU_ARM7); - - tools_frames = 0; - } - - fpsframecount++; QueryPerformanceCounter((LARGE_INTEGER *)&curticks); @@ -1140,9 +1007,9 @@ DWORD WINAPI run() SPU_Pause(1); } frameCounter++; - if (frameCounterDisplay) osd->addFixed(Hud.FrameCounter.x, Hud.FrameCounter.y, "%d",frameCounter); - if (ShowLagFrameCounter) osd->addFixed(Hud.LagFrameCounter.x, Hud.LagFrameCounter.y, "%d",TotalLagFrames); - if (ShowMicrophone) osd->addFixed(Hud.Microphone.x, Hud.Microphone.y, "%d",MicDisplay); + if (frameCounterDisplay) osd->addFixed(0, 25, "%d",frameCounter); + if (ShowInputDisplay) osd->addFixed(0, 45, "%s",InputDisplayString.c_str()); + if (ShowLagFrameCounter) osd->addFixed(0, 65, "%d",TotalLagFrames); DisplayMessage(); CheckMessages(); } @@ -1240,7 +1107,6 @@ int MenuInit() MainWindow->checkMenu(ID_VIEW_DISPLAYFPS, FpsDisplay ? MF_CHECKED : MF_UNCHECKED); MainWindow->checkMenu(ID_VIEW_DISPLAYINPUT, ShowInputDisplay ? MF_CHECKED : MF_UNCHECKED); MainWindow->checkMenu(ID_VIEW_DISPLAYLAG, ShowLagFrameCounter ? MF_CHECKED : MF_UNCHECKED); - MainWindow->checkMenu(ID_VIEW_DISPLAYMICROPHONE, ShowMicrophone ? MF_CHECKED : MF_UNCHECKED); MainWindow->checkMenu(IDC_WINDOW1X, MF_BYCOMMAND | ((windowSize==1)?MF_CHECKED:MF_UNCHECKED)); MainWindow->checkMenu(IDC_WINDOW1_5X, MF_BYCOMMAND | ((windowSize==65535)?MF_CHECKED:MF_UNCHECKED)); @@ -1467,7 +1333,6 @@ int WINAPI WinMain (HINSTANCE hThisInstance, frameCounterDisplay = GetPrivateProfileInt("Display","FrameCounter", 0, IniName); ShowInputDisplay = GetPrivateProfileInt("Display","Display Input", 0, IniName); ShowLagFrameCounter = GetPrivateProfileInt("Display","Display Lag Counter", 0, IniName); - ShowMicrophone = GetPrivateProfileInt("Display","Display Microphone", 0, IniName); ScreenGap = GetPrivateProfileInt("Display", "ScreenGap", 0, IniName); FrameLimit = GetPrivateProfileInt("FrameLimit", "FrameLimit", 1, IniName); //sprintf(text, "%s", DESMUME_NAME_AND_VERSION); @@ -1542,7 +1407,6 @@ int WINAPI WinMain (HINSTANCE hThisInstance, InitCustomKeys(&CustomKeys); - ResetHud(&Hud); void input_init(); input_init(); @@ -1551,12 +1415,10 @@ int WINAPI WinMain (HINSTANCE hThisInstance, GInfo_Init(); - MemView_Init(); - ViewDisasm_ARM7 = new TOOLSCLASS(hThisInstance, IDD_DESASSEMBLEUR_VIEWER7, (DLGPROC) ViewDisasm_ARM7Proc); ViewDisasm_ARM9 = new TOOLSCLASS(hThisInstance, IDD_DESASSEMBLEUR_VIEWER9, (DLGPROC) ViewDisasm_ARM9Proc); - //ViewMem_ARM7 = new TOOLSCLASS(hThisInstance, IDD_MEM_VIEWER7, (DLGPROC) ViewMem_ARM7Proc); - //ViewMem_ARM9 = new TOOLSCLASS(hThisInstance, IDD_MEM_VIEWER9, (DLGPROC) ViewMem_ARM9Proc); + ViewMem_ARM7 = new TOOLSCLASS(hThisInstance, IDD_MEM_VIEWER7, (DLGPROC) ViewMem_ARM7Proc); + ViewMem_ARM9 = new TOOLSCLASS(hThisInstance, IDD_MEM_VIEWER9, (DLGPROC) ViewMem_ARM9Proc); ViewRegisters = new TOOLSCLASS(hThisInstance, IDD_IO_REG, (DLGPROC) IoregView_Proc); ViewPalette = new TOOLSCLASS(hThisInstance, IDD_PAL, (DLGPROC) ViewPalProc); ViewTiles = new TOOLSCLASS(hThisInstance, IDD_TILE, (DLGPROC) ViewTilesProc); @@ -1738,11 +1600,6 @@ int WINAPI WinMain (HINSTANCE hThisInstance, GInfo_DeInit(); - MemView_DlgClose(ARMCPU_ARM9); - MemView_DlgClose(ARMCPU_ARM7); - - MemView_DeInit(); - //if (input!=NULL) delete input; if (ViewLights!=NULL) delete ViewLights; if (ViewMatrices!=NULL) delete ViewMatrices; @@ -1751,8 +1608,8 @@ int WINAPI WinMain (HINSTANCE hThisInstance, if (ViewTiles!=NULL) delete ViewTiles; if (ViewPalette!=NULL) delete ViewPalette; if (ViewRegisters!=NULL) delete ViewRegisters; -// if (ViewMem_ARM9!=NULL) delete ViewMem_ARM9; -// if (ViewMem_ARM7!=NULL) delete ViewMem_ARM7; + if (ViewMem_ARM9!=NULL) delete ViewMem_ARM9; + if (ViewMem_ARM7!=NULL) delete ViewMem_ARM7; if (ViewDisasm_ARM9!=NULL) delete ViewDisasm_ARM9; if (ViewDisasm_ARM7!=NULL) delete ViewDisasm_ARM7; @@ -2260,8 +2117,7 @@ enum CONFIGSCREEN CONFIGSCREEN_FIRMWARE, CONFIGSCREEN_WIFI, CONFIGSCREEN_SOUND, - CONFIGSCREEN_EMULATION, - CONFIGSCREEN_MICROPHONE + CONFIGSCREEN_EMULATION }; void RunConfig(CONFIGSCREEN which) @@ -2291,9 +2147,6 @@ void RunConfig(CONFIGSCREEN which) case CONFIGSCREEN_EMULATION: DialogBox(hAppInst, MAKEINTRESOURCE(IDD_EMULATIONSETTINGS), hwnd, (DLGPROC)EmulationSettingsDlgProc); break; - case CONFIGSCREEN_MICROPHONE: - DialogBox(hAppInst, MAKEINTRESOURCE(IDD_MICROPHONE), hwnd, (DLGPROC)MicrophoneSettingsDlgProc); - break; case CONFIGSCREEN_WIFI: #ifdef EXPERIMENTAL_WIFI if(wifiMac.netEnabled) @@ -2493,36 +2346,31 @@ LRESULT CALLBACK WindowProcedure (HWND hwnd, UINT message, WPARAM wParam, LPARAM s32 x = (s32)((s16)LOWORD(lParam)); s32 y = (s32)((s16)HIWORD(lParam)); GetClientRect(hwnd,&r); - if(HudEditorMode) { - EditHud(x,y, &Hud); - } - else { - int defwidth = 256, defheight = (384+ScreenGap); - int winwidth = (r.right-r.left), winheight = (r.bottom-r.top); - // translate from scaling (screen resolution to 256x384 or 512x192) - switch (GPU_rotation) - { - case 0: - case 180: - x = (x*defwidth) / winwidth; - y = (y*defheight) / winheight; - break ; - case 90: - case 270: - x = (x*defheight) / winwidth; - y = (y*defwidth) / winheight; - break ; - } - //translate for rotation - if (GPU_rotation != 0) - translateXY(x,y); - else - y-=(192+ScreenGap); - if(x<0) x = 0; else if(x>255) x = 255; - if(y<0) y = 0; else if(y>192) y = 192; - NDS_setTouchPos(x, y); - return 0; + int defwidth = 256, defheight = (384+ScreenGap); + int winwidth = (r.right-r.left), winheight = (r.bottom-r.top); + // translate from scaling (screen resolution to 256x384 or 512x192) + switch (GPU_rotation) + { + case 0: + case 180: + x = (x*defwidth) / winwidth; + y = (y*defheight) / winheight; + break ; + case 90: + case 270: + x = (x*defheight) / winwidth; + y = (y*defwidth) / winheight; + break ; } + //translate for rotation + if (GPU_rotation != 0) + translateXY(x,y); + else + y-=(192+ScreenGap); + if(x<0) x = 0; else if(x>255) x = 255; + if(y<0) y = 0; else if(y>192) y = 192; + NDS_setTouchPos(x, y); + return 0; } NDS_releaseTouch(); return 0; @@ -2531,7 +2379,6 @@ LRESULT CALLBACK WindowProcedure (HWND hwnd, UINT message, WPARAM wParam, LPARAM if(click) ReleaseCapture(); NDS_releaseTouch(); - HudClickRelease(&Hud); return 0; case WM_INITMENU: { @@ -2734,9 +2581,6 @@ LRESULT CALLBACK WindowProcedure (HWND hwnd, UINT message, WPARAM wParam, LPARAM case IDM_EMULATIONSETTINGS: RunConfig(CONFIGSCREEN_EMULATION); return 0; - case IDM_MICROPHONESETTINGS: - RunConfig(CONFIGSCREEN_MICROPHONE); - return 0; case IDM_GAME_INFO: { @@ -2761,14 +2605,12 @@ LRESULT CALLBACK WindowProcedure (HWND hwnd, UINT message, WPARAM wParam, LPARAM ViewRegisters->open(); return 0; case IDM_MEMORY: - /* ViewMem_ARM7->regClass("MemViewBox7", ViewMem_ARM7BoxProc); + ViewMem_ARM7->regClass("MemViewBox7", ViewMem_ARM7BoxProc); if (!ViewMem_ARM7->open()) ViewMem_ARM7->unregClass(); ViewMem_ARM9->regClass("MemViewBox9", ViewMem_ARM9BoxProc); if (!ViewMem_ARM9->open()) - ViewMem_ARM9->unregClass();*/ - if(!MemView_IsOpened(ARMCPU_ARM9)) MemView_DlgOpen(hwnd, ARMCPU_ARM9); - if(!MemView_IsOpened(ARMCPU_ARM7)) MemView_DlgOpen(hwnd, ARMCPU_ARM7); + ViewMem_ARM9->unregClass(); return 0; case IDM_DISASSEMBLER: ViewDisasm_ARM7->regClass("DesViewBox7",ViewDisasm_ARM7BoxProc); @@ -2936,19 +2778,6 @@ LRESULT CALLBACK WindowProcedure (HWND hwnd, UINT message, WPARAM wParam, LPARAM osd->clear(); return 0; - case ID_VIEW_HUDEDITOR: - HudEditorMode ^= 1; - MainWindow->checkMenu(ID_VIEW_HUDEDITOR, HudEditorMode ? MF_CHECKED : MF_UNCHECKED); - osd->clear(); - return 0; - - case ID_VIEW_DISPLAYMICROPHONE: - ShowMicrophone ^= 1; - MainWindow->checkMenu(ID_VIEW_DISPLAYMICROPHONE, ShowMicrophone ? MF_CHECKED : MF_UNCHECKED); - WritePrivateProfileInt("Display", "Display Microphone", ShowMicrophone, IniName); - osd->clear(); - return 0; - #define clearsaver() \ MainWindow->checkMenu(IDC_SAVETYPE1, MF_BYCOMMAND | MF_UNCHECKED); \ MainWindow->checkMenu(IDC_SAVETYPE2, MF_BYCOMMAND | MF_UNCHECKED); \ @@ -3454,104 +3283,6 @@ LRESULT CALLBACK EmulationSettingsDlgProc(HWND hDlg, UINT uMsg, WPARAM wParam, L return FALSE; } -LRESULT CALLBACK MicrophoneSettingsDlgProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) -{ - switch(uMsg) - { - case WM_INITDIALOG: - { - HWND cur; - - UseMicSample = GetPrivateProfileInt("Use Mic Sample", "UseMicSample", FALSE, IniName); - CheckDlgButton(hDlg, IDC_USEMICSAMPLE, ((UseMicSample == true) ? BST_CHECKED : BST_UNCHECKED)); - GetPrivateProfileString("Use Mic Sample", "MicSampleFile", "micsample.raw", MicSampleName, MAX_PATH, IniName); - SetDlgItemText(hDlg, IDC_MICSAMPLE, MicSampleName); - - if(UseMicSample == false) - { - cur = GetDlgItem(hDlg, IDC_MICSAMPLE); - EnableWindow(cur, FALSE); - cur = GetDlgItem(hDlg, IDC_MICSAMPLEBROWSE); - EnableWindow(cur, FALSE); - } - } - return TRUE; - - case WM_COMMAND: - { - switch(LOWORD(wParam)) - { - case IDOK: - { - int val = 0; - - if((!romloaded) || (val == IDYES)) - { - HWND cur; - - UseMicSample = IsDlgButtonChecked(hDlg, IDC_USEMICSAMPLE); - cur = GetDlgItem(hDlg, IDC_MICSAMPLE); - GetWindowText(cur, MicSampleName, 256); - - WritePrivateProfileInt("Use Mic Sample", "UseMicSample", ((UseMicSample == true) ? 1 : 0), IniName); - WritePrivateProfileString("Use Mic Sample", "MicSampleFile", MicSampleName, IniName); - LoadSample(MicSampleName); - } - } - case IDCANCEL: - { - EndDialog(hDlg, TRUE); - } - return TRUE; - - case IDC_USEMICSAMPLE: - { - HWND cur; - BOOL enable = IsDlgButtonChecked(hDlg, IDC_USEMICSAMPLE); - - cur = GetDlgItem(hDlg, IDC_MICSAMPLE); - EnableWindow(cur, enable); - cur = GetDlgItem(hDlg, IDC_MICSAMPLEBROWSE); - EnableWindow(cur, enable); - } - return TRUE; - - case IDC_MICSAMPLEBROWSE: - { - char fileName[256] = ""; - OPENFILENAME ofn; - - ZeroMemory(&ofn, sizeof(ofn)); - ofn.lStructSize = sizeof(ofn); - ofn.hwndOwner = hDlg; - ofn.lpstrFilter = "Any file(*.*)\0*.*\0\0"; - ofn.nFilterIndex = 1; - ofn.lpstrFile = fileName; - ofn.nMaxFile = 256; - ofn.lpstrDefExt = "bin"; - ofn.Flags = OFN_NOCHANGEDIR; - - if(GetOpenFileName(&ofn)) - { - HWND cur; - - switch(LOWORD(wParam)) - { - case IDC_MICSAMPLEBROWSE: cur = GetDlgItem(hDlg, IDC_MICSAMPLE); break; - } - - SetWindowText(cur, fileName); - } - } - return TRUE; - } - } - return TRUE; - } - - return FALSE; -} - LRESULT CALLBACK WifiSettingsDlgProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) { #ifdef EXPERIMENTAL_WIFI diff --git a/desmume/src/windows/main.h b/src/windows/main.h similarity index 92% rename from desmume/src/windows/main.h rename to src/windows/main.h index 2901e77b1..2eae78809 100644 --- a/desmume/src/windows/main.h +++ b/src/windows/main.h @@ -12,7 +12,6 @@ void SaveStateMessages(int slotnum, int whichMessage); void Display(); void Pause(); void FrameAdvance(); -extern bool ShowInputDisplay; #define GPU3D_NULL 0 #define GPU3D_OPENGL 1 diff --git a/desmume/src/windows/mapView.cpp b/src/windows/mapView.cpp similarity index 100% rename from desmume/src/windows/mapView.cpp rename to src/windows/mapView.cpp diff --git a/desmume/src/windows/mapView.h b/src/windows/mapView.h similarity index 100% rename from desmume/src/windows/mapView.h rename to src/windows/mapView.h diff --git a/desmume/src/windows/matrixView.cpp b/src/windows/matrixView.cpp similarity index 100% rename from desmume/src/windows/matrixView.cpp rename to src/windows/matrixView.cpp diff --git a/desmume/src/windows/matrixView.h b/src/windows/matrixView.h similarity index 100% rename from desmume/src/windows/matrixView.h rename to src/windows/matrixView.h diff --git a/src/windows/memView.cpp b/src/windows/memView.cpp new file mode 100644 index 000000000..b17152ded --- /dev/null +++ b/src/windows/memView.cpp @@ -0,0 +1,519 @@ +/* Copyright (C) 2006 yopyop + yopyop156@ifrance.com + yopyop156.ifrance.com + + This file is part of DeSmuME + + DeSmuME is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + DeSmuME is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with DeSmuME; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +#include +#include "memView.h" +#include +#include "../MMU.h" +#include "debug.h" +#include "resource.h" + +typedef struct +{ + u32 autoup_secs; + bool autoup; + + s8 cpu; + u32 curr_ligne; + u8 representation; +} memview_struct; + + +memview_struct *MemView7 = NULL; +memview_struct *MemView9 = NULL; + +LRESULT MemViewBox_OnPaint(HWND hwnd, memview_struct * win, WPARAM wParam, LPARAM lParam) +{ + HDC hdc; + PAINTSTRUCT ps; + SIZE fontsize; + TCHAR text[80]; + int i; + RECT rect; + int lg; + int ht; + HDC mem_dc; + HBITMAP mem_bmp; + int nbligne; + RECT r; + u32 adr; + + GetClientRect(hwnd, &rect); + lg = rect.right - rect.left; + ht = rect.bottom - rect.top; + + hdc = BeginPaint(hwnd, &ps); + + mem_dc = CreateCompatibleDC(hdc); + mem_bmp = CreateCompatibleBitmap(hdc, lg, ht); + SelectObject(mem_dc, mem_bmp); + + FillRect(mem_dc, &rect, (HBRUSH)GetStockObject(WHITE_BRUSH)); + + SelectObject(mem_dc, GetStockObject(SYSTEM_FIXED_FONT)); + + GetTextExtentPoint32(mem_dc, "0", 1, &fontsize); + + nbligne = ht/fontsize.cy; + + SetTextColor(mem_dc, RGB(0,0,0)); + + r.top = 3; + r.left = 3; + r.bottom = r.top+fontsize.cy; + r.right = rect.right-3; + + adr = win->curr_ligne*0x10; + + for(i=0; i>16), (int)(adr&0xFFFF)); + DrawText(mem_dc, text, -1, &r, DT_TOP | DT_LEFT | DT_NOPREFIX); + r.left += 11*fontsize.cx; + + if(win->representation == 0) + for(j=0; j<16; ++j) + { + sprintf(text, "%02X", MMU_read8(win->cpu, adr+j)); + DrawText(mem_dc, text, -1, &r, DT_TOP | DT_LEFT | DT_NOPREFIX); + r.left+=3*fontsize.cx; + } + else + if(win->representation == 1) + for(j=0; j<16; j+=2) + { + sprintf(text, "%04X", MMU_read16(win->cpu, adr+j)); + DrawText(mem_dc, text, -1, &r, DT_TOP | DT_LEFT | DT_NOPREFIX); + r.left+=5*fontsize.cx; + } + else + for(j=0; j<16; j+=4) + { + sprintf(text, "%08X", (int)MMU_read32(win->cpu, adr+j)); + DrawText(mem_dc, text, -1, &r, DT_TOP | DT_LEFT | DT_NOPREFIX); + r.left+=9*fontsize.cx; + } + + r.left+=fontsize.cx; + + for(j=0; j<16; ++j) + { + u8 c = MMU_read8(win->cpu, adr+j); + if(c >= 32 && c <= 127) { + text[j] = (char)c; + } + else + text[j] = '.'; + } + text[j] = '\0'; + DrawText(mem_dc, text, -1, &r, DT_TOP | DT_LEFT | DT_NOPREFIX); + + adr+=0x10; + r.top += fontsize.cy; + r.bottom += fontsize.cy; + r.left = 3; + } + + BitBlt(hdc, 0, 0, lg, ht, mem_dc, 0, 0, SRCCOPY); + + DeleteDC(mem_dc); + DeleteObject(mem_bmp); + + EndPaint(hwnd, &ps); + return 1; +} + +//=================================================== ARM7 +LRESULT CALLBACK ViewMem_ARM7BoxProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) +{ + switch(msg) + { + case WM_NCCREATE: + SetScrollRange(hwnd, SB_VERT, 0, 0x0FFFFFFF, TRUE); + SetScrollPos(hwnd, SB_VERT, 10, TRUE); + return 1; + + case WM_NCDESTROY: + return 1; + + case WM_PAINT: + MemViewBox_OnPaint(hwnd, MemView7, wParam, lParam); + return 1; + + case WM_ERASEBKGND: + return 1; + case WM_VSCROLL : + { + RECT rect; + SIZE fontsize; + HDC dc; + HFONT old; + int nbligne; + + GetClientRect(hwnd, &rect); + dc = GetDC(hwnd); + old = (HFONT)SelectObject(dc, GetStockObject(SYSTEM_FIXED_FONT)); + GetTextExtentPoint32(dc, "0", 1, &fontsize); + + nbligne = (rect.bottom - rect.top)/fontsize.cy; + + switch LOWORD(wParam) + { + case SB_LINEDOWN : + MemView7->curr_ligne = std::min((u32)0x0FFFFFFFF, (u32)MemView7->curr_ligne+1); + break; + case SB_LINEUP : + MemView7->curr_ligne = (u32)std::max((u32)0l, (u32)MemView7->curr_ligne-1); + break; + case SB_PAGEDOWN : + MemView7->curr_ligne = std::min((u32)0x0FFFFFFFF, (u32)MemView7->curr_ligne+nbligne); + break; + case SB_PAGEUP : + MemView7->curr_ligne = (u32)std::max((u32)0l, (u32)MemView7->curr_ligne-nbligne); + break; + } + + SelectObject(dc, old); + SetScrollPos(hwnd, SB_VERT, MemView7->curr_ligne, TRUE); + InvalidateRect(hwnd, NULL, FALSE); + UpdateWindow(hwnd); + } + return 1; + } + + return FALSE; +} + +BOOL CALLBACK ViewMem_ARM7Proc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) +{ + //bail out early if the dialog isnt initialized + if(!MemView7 && message != WM_INITDIALOG) + return false; + + switch (message) + { + case WM_INITDIALOG : + { + SetWindowText(hwnd, "ARM7 memory viewer"); + SendMessage(GetDlgItem(hwnd, IDC_8_BIT), BM_SETCHECK, TRUE, 0); + MemView7 = new memview_struct; + memset(MemView7, 0, sizeof(memview_struct)); + MemView7->cpu = 1; + MemView7->autoup_secs = 1; + SendMessage(GetDlgItem(hwnd, IDC_AUTO_UPDATE_SPIN), + UDM_SETRANGE, 0, MAKELONG(99, 1)); + SendMessage(GetDlgItem(hwnd, IDC_AUTO_UPDATE_SPIN), + UDM_SETPOS32, 0, MemView7->autoup_secs); + return 0; + } + case WM_CLOSE: + { + if(MemView7->autoup) + { + KillTimer(hwnd, IDT_VIEW_MEM7); + MemView7->autoup = false; + } + + if (MemView7!=NULL) + { + delete MemView7; + MemView7 = NULL; + } + //INFO("Close ARM7 memory dialog\n"); + PostQuitMessage(0); + return 0; + } + case WM_TIMER: + SendMessage(hwnd, WM_COMMAND, IDC_REFRESH, 0); + return 1; + + case WM_COMMAND : + switch (LOWORD (wParam)) + { + case IDC_8_BIT : + MemView7->representation = 0; + InvalidateRect(GetDlgItem(hwnd, IDC_MEM_BOX), NULL, FALSE); + UpdateWindow(GetDlgItem(hwnd, IDC_MEM_BOX)); + return 1; + case IDC_16_BIT : + MemView7->representation = 1; + InvalidateRect(GetDlgItem(hwnd, IDC_MEM_BOX), NULL, FALSE); + UpdateWindow(GetDlgItem(hwnd, IDC_MEM_BOX)); + return 1; + case IDC_32_BIT : + MemView7->representation = 2; + InvalidateRect(GetDlgItem(hwnd, IDC_MEM_BOX), NULL, FALSE); + UpdateWindow(GetDlgItem(hwnd, IDC_MEM_BOX)); + return 1; + case IDC_AUTO_UPDATE : + if(MemView7->autoup) + { + EnableWindow(GetDlgItem(hwnd, IDC_AUTO_UPDATE_SECS), false); + EnableWindow(GetDlgItem(hwnd, IDC_AUTO_UPDATE_SPIN), false); + KillTimer(hwnd, IDT_VIEW_MEM7); + MemView7->autoup = FALSE; + return 1; + } + EnableWindow(GetDlgItem(hwnd, IDC_AUTO_UPDATE_SECS), true); + EnableWindow(GetDlgItem(hwnd, IDC_AUTO_UPDATE_SPIN), true); + MemView7->autoup = TRUE; + SetTimer(hwnd, IDT_VIEW_MEM7, MemView7->autoup_secs*20, (TIMERPROC) NULL); + return 1; + case IDC_AUTO_UPDATE_SECS: + { + int t = GetDlgItemInt(hwnd, IDC_AUTO_UPDATE_SECS, FALSE, TRUE); + if (!MemView7) + { + SendMessage(hwnd, WM_INITDIALOG, 0, 0); + } + if (t != MemView7->autoup_secs) + { + MemView7->autoup_secs = t; + if (MemView7->autoup) + SetTimer(hwnd, IDT_VIEW_MEM7, + MemView7->autoup_secs*20, (TIMERPROC) NULL); + } + } + return 1; + case IDC_REFRESH: + InvalidateRect(hwnd, NULL, FALSE); + return 1; + case IDC_GO : + { + char tmp[8]; + int lg = GetDlgItemText(hwnd, IDC_GOTOMEM, tmp, 8); + u32 adr = 0; + u16 i; + + for(i = 0; i='A')&&(tmp[i]<='F')) + { + adr = adr*16 + (tmp[i]-'A'+10); + continue; + } + if((tmp[i]>='0')&&(tmp[i]<='9')) + { + adr = adr*16 + (tmp[i]-'0'); + continue; + } + } + MemView7->curr_ligne = (adr>>4); + InvalidateRect(hwnd, NULL, FALSE); + UpdateWindow(hwnd); + } + return 1; + case IDC_FERMER : + SendMessage(hwnd, WM_CLOSE, 0, 0); + return 1; + } + } + return FALSE; +} + +//=================================================== ARM9 +LRESULT CALLBACK ViewMem_ARM9BoxProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) +{ + switch(msg) + { + case WM_NCCREATE: + SetScrollRange(hwnd, SB_VERT, 0, 0x0FFFFFFF, TRUE); + SetScrollPos(hwnd, SB_VERT, 10, TRUE); + return 1; + + case WM_NCDESTROY: + return 1; + + case WM_PAINT: + MemViewBox_OnPaint(hwnd, MemView9, wParam, lParam); + return 1; + + case WM_ERASEBKGND: + return 1; + case WM_VSCROLL : + { + RECT rect; + SIZE fontsize; + HDC dc; + HFONT old; + int nbligne; + + GetClientRect(hwnd, &rect); + dc = GetDC(hwnd); + old = (HFONT)SelectObject(dc, GetStockObject(SYSTEM_FIXED_FONT)); + GetTextExtentPoint32(dc, "0", 1, &fontsize); + + nbligne = (rect.bottom - rect.top)/fontsize.cy; + + switch LOWORD(wParam) + { + case SB_LINEDOWN : + MemView9->curr_ligne = std::min((u32)0x0FFFFFFFF, (u32)MemView9->curr_ligne+1); + break; + case SB_LINEUP : + MemView9->curr_ligne = (u32)std::max((u32)0l, (u32)MemView9->curr_ligne-1); + break; + case SB_PAGEDOWN : + MemView9->curr_ligne = std::min((u32)0x0FFFFFFFF, (u32)MemView9->curr_ligne+nbligne); + break; + case SB_PAGEUP : + MemView9->curr_ligne = (u32)std::max((u32)0l, (u32)MemView9->curr_ligne-nbligne); + break; + } + + SelectObject(dc, old); + SetScrollPos(hwnd, SB_VERT, MemView9->curr_ligne, TRUE); + InvalidateRect(hwnd, NULL, FALSE); + UpdateWindow(hwnd); + } + return 1; + } + + return FALSE; +} + +BOOL CALLBACK ViewMem_ARM9Proc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) +{ + //bail out early if the dialog isnt initialized + if(!MemView9 && message != WM_INITDIALOG) + return false; + + switch (message) + { + case WM_INITDIALOG : + { + SetWindowText(hwnd, "ARM9 memory viewer"); + SendMessage(GetDlgItem(hwnd, IDC_8_BIT), BM_SETCHECK, TRUE, 0); + MemView9 = new memview_struct; + memset(MemView9, 0, sizeof(memview_struct)); + MemView9->cpu = 0; + MemView9->autoup_secs = 1; + SendMessage(GetDlgItem(hwnd, IDC_AUTO_UPDATE_SPIN), + UDM_SETRANGE, 0, MAKELONG(99, 1)); + SendMessage(GetDlgItem(hwnd, IDC_AUTO_UPDATE_SPIN), + UDM_SETPOS32, 0, MemView9->autoup_secs); + return 1; + } + case WM_CLOSE: + { + if(MemView9->autoup) + { + KillTimer(hwnd, IDT_VIEW_MEM9); + MemView9->autoup = false; + } + + if (MemView9!=NULL) + { + delete MemView9; + MemView9 = NULL; + } + //INFO("Close ARM9 memory dialog\n"); + PostQuitMessage(0); + return 0; + } + case WM_TIMER: + SendMessage(hwnd, WM_COMMAND, IDC_REFRESH, 0); + return 1; + + case WM_COMMAND : + switch (LOWORD (wParam)) + { + case IDC_8_BIT : + MemView9->representation = 0; + InvalidateRect(GetDlgItem(hwnd, IDC_MEM_BOX), NULL, FALSE); + UpdateWindow(GetDlgItem(hwnd, IDC_MEM_BOX)); + return 1; + case IDC_16_BIT : + MemView9->representation = 1; + InvalidateRect(GetDlgItem(hwnd, IDC_MEM_BOX), NULL, FALSE); + UpdateWindow(GetDlgItem(hwnd, IDC_MEM_BOX)); + return 1; + case IDC_32_BIT : + MemView9->representation = 2; + InvalidateRect(GetDlgItem(hwnd, IDC_MEM_BOX), NULL, FALSE); + UpdateWindow(GetDlgItem(hwnd, IDC_MEM_BOX)); + return 1; + case IDC_AUTO_UPDATE : + if(MemView9->autoup) + { + EnableWindow(GetDlgItem(hwnd, IDC_AUTO_UPDATE_SECS), false); + EnableWindow(GetDlgItem(hwnd, IDC_AUTO_UPDATE_SPIN), false); + KillTimer(hwnd, IDT_VIEW_MEM9); + MemView9->autoup = FALSE; + return 1; + } + EnableWindow(GetDlgItem(hwnd, IDC_AUTO_UPDATE_SECS), true); + EnableWindow(GetDlgItem(hwnd, IDC_AUTO_UPDATE_SPIN), true); + MemView9->autoup = TRUE; + SetTimer(hwnd, IDT_VIEW_MEM9, MemView9->autoup_secs*20, (TIMERPROC) NULL); + return 1; + case IDC_AUTO_UPDATE_SECS: + { + int t = GetDlgItemInt(hwnd, IDC_AUTO_UPDATE_SECS, FALSE, TRUE); + if (!MemView9) + { + SendMessage(hwnd, WM_INITDIALOG, 0, 0); + } + if (t != MemView9->autoup_secs) + { + MemView9->autoup_secs = t; + if (MemView9->autoup) + SetTimer(hwnd, IDT_VIEW_MEM9, + MemView9->autoup_secs*20, (TIMERPROC) NULL); + } + } + return 1; + case IDC_REFRESH: + InvalidateRect(hwnd, NULL, FALSE); + return 1; + case IDC_GO : + { + char tmp[8]; + int lg = GetDlgItemText(hwnd, IDC_GOTOMEM, tmp, 8); + u32 adr = 0; + u16 i; + + for(i = 0; i='A')&&(tmp[i]<='F')) + { + adr = adr*16 + (tmp[i]-'A'+10); + continue; + } + if((tmp[i]>='0')&&(tmp[i]<='9')) + { + adr = adr*16 + (tmp[i]-'0'); + continue; + } + } + MemView9->curr_ligne = (adr>>4); + InvalidateRect(hwnd, NULL, FALSE); + UpdateWindow(hwnd); + } + return 1; + case IDC_FERMER : + SendMessage(hwnd, WM_CLOSE, 0, 0); + return 1; + } + } + return FALSE; +} diff --git a/desmume/src/windows/memView.h b/src/windows/memView.h similarity index 67% rename from desmume/src/windows/memView.h rename to src/windows/memView.h index 078a57f7f..52f7e7eda 100644 --- a/desmume/src/windows/memView.h +++ b/src/windows/memView.h @@ -22,15 +22,12 @@ #ifndef MEM_VIEW_H #define MEM_VIEW_H -BOOL MemView_Init(); -void MemView_DeInit(); +#include "../common.h" -BOOL MemView_DlgOpen(HWND hParentWnd, u8 CPU); -void MemView_DlgClose(u8 CPU); -BOOL MemView_IsOpened(u8 CPU); -void MemView_Refresh(u8 CPU); +extern BOOL CALLBACK ViewMem_ARM7Proc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam); +extern LRESULT CALLBACK ViewMem_ARM7BoxProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam); -BOOL CALLBACK MemView_DlgProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam); -LRESULT CALLBACK MemView_ViewBoxProc(HWND hCtl, UINT uMsg, WPARAM wParam, LPARAM lParam); +extern BOOL CALLBACK ViewMem_ARM9Proc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam); +extern LRESULT CALLBACK ViewMem_ARM9BoxProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam); #endif \ No newline at end of file diff --git a/desmume/src/windows/mic.cpp b/src/windows/mic.cpp similarity index 69% rename from desmume/src/windows/mic.cpp rename to src/windows/mic.cpp index 16c608cd1..c4dc479e5 100644 --- a/desmume/src/windows/mic.cpp +++ b/src/windows/mic.cpp @@ -12,12 +12,6 @@ #include "../types.h" #include "../debug.h" #include "../mic.h" -#include -#include - -int MicDisplay; -int MicButtonPressed=0; -int SampleLoaded=0; #define MIC_CHECKERR(hr) if(hr != MMSYSERR_NOERROR) return FALSE; @@ -57,27 +51,8 @@ static int CALLBACK waveInProc(HWAVEIN wavein, UINT msg, DWORD instance, DWORD p return 0; } -char* samplebuffer; -int samplebuffersize; -FILE* fp; - -char* LoadSample(const char *name) +BOOL Mic_Init() { - - std::ifstream fl(name); - fl.seekg( 0, std::ios::end ); - size_t len = fl.tellg(); - samplebuffersize=len; - char *ret = new char[len]; - fl.seekg(0, std::ios::beg); - fl.read(ret, len); - samplebuffer=ret; - SampleLoaded=1; - return ret; -} - -BOOL Mic_Init() { - if(Mic_Inited) return TRUE; @@ -148,44 +123,21 @@ void Mic_DeInit() waveInClose(waveIn); } -int random[32] = {0xB1, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xE9, 0x70, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x28, 0x00, 0x00, 0x00, -0x00, 0x00, 0x20, 0xE1, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xE9}; - -int x=0; - u8 Mic_ReadSample() { - if(!Mic_Inited) return 0; + u8 tmp = Mic_Buffer[Mic_PlayBuf][Mic_BufPos >> 1]; u8 ret; - if(MicButtonPressed) - if(SampleLoaded) { //use a sample - x++; - if(x > samplebuffersize) - x=0; - ret=samplebuffer[x]; - } - else { //use the "random" values - x++; - if(x > ARRAY_SIZE(random)) - x=0; - ret = random[x]; - } - else { //normal mic behavior - u8 tmp = (u8)Mic_Buffer[Mic_BufPos >> 1]; - - if(Mic_BufPos & 0x1) - { - ret = ((tmp & 0x1) << 7); - } - else - { - ret = ((tmp & 0xFE) >> 1); - } + if(Mic_BufPos & 0x1) + { + ret = ((tmp & 0x1) << 7); + } + else + { + ret = ((tmp & 0xFE) >> 1); } Mic_BufPos++; @@ -195,7 +147,5 @@ u8 Mic_ReadSample() Mic_PlayBuf ^= 1; } - MicDisplay = ret; - return ret; -} \ No newline at end of file +} diff --git a/desmume/src/windows/oamView.cpp b/src/windows/oamView.cpp similarity index 98% rename from desmume/src/windows/oamView.cpp rename to src/windows/oamView.cpp index 6f38b00f3..d39a23f58 100644 --- a/desmume/src/windows/oamView.cpp +++ b/src/windows/oamView.cpp @@ -39,6 +39,7 @@ typedef struct } oamview_struct; oamview_struct *OAMView = NULL; +//extern NDSSystem nds; const char dimm[4][4][8] = { @@ -179,11 +180,9 @@ LRESULT OamView_OnPaint(HWND hwnd, oamview_struct *win, WPARAM wParam, LPARAM lP SetWindowText(GetDlgItem(hwnd, IDC_PROP1), ""); } - GPU copy = *win->gpu; for(i = 0; i < 192; ++i) { - copy.currLine = i; - copy.spriteRender((u8*)(bitmap + i*256), bitmap_alpha + i*256, type + i*256, prio + i*256); + win->gpu->spriteRender(win->gpu, i, (u8*)(bitmap + i*256), bitmap_alpha + i*256, type + i*256, prio + i*256); } SetDIBitsToDevice(hdc, 180, 4, 256, 192, 0, 0, 0, 192, bitmap, (BITMAPINFO*)&bmi, DIB_RGB_COLORS); @@ -320,7 +319,7 @@ BOOL CALLBACK ViewOAMProc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam case IDC_SCR_SELECT : switch(HIWORD(wParam)) { - case CBN_SELCHANGE : + case CBN_CLOSEUP : { u32 sel = SendMessage(GetDlgItem(hwnd, IDC_SCR_SELECT), CB_GETCURSEL, 0, 0); switch(sel) diff --git a/desmume/src/windows/oamView.h b/src/windows/oamView.h similarity index 100% rename from desmume/src/windows/oamView.h rename to src/windows/oamView.h diff --git a/desmume/src/windows/ogl.cpp b/src/windows/ogl.cpp similarity index 100% rename from desmume/src/windows/ogl.cpp rename to src/windows/ogl.cpp diff --git a/desmume/src/windows/palView.cpp b/src/windows/palView.cpp similarity index 99% rename from desmume/src/windows/palView.cpp rename to src/windows/palView.cpp index 73db477c0..c361e6eeb 100644 --- a/desmume/src/windows/palView.cpp +++ b/src/windows/palView.cpp @@ -275,7 +275,7 @@ BOOL CALLBACK ViewPalProc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam case 17 : case 18 : case 19 : - PalView->adr = ((u16 *)(ARM9Mem.texInfo.texPalSlot[sel-16])); + PalView->adr = ((u16 *)(ARM9Mem.texPalSlot[sel-16])); PalView->palnum = 0; ShowWindow(GetDlgItem(hwnd, IDC_SCROLLER), SW_SHOW); EnableWindow(GetDlgItem(hwnd, IDC_SCROLLER), TRUE); diff --git a/desmume/src/windows/palView.h b/src/windows/palView.h similarity index 100% rename from desmume/src/windows/palView.h rename to src/windows/palView.h diff --git a/desmume/src/windows/resource.h b/src/windows/resource.h similarity index 97% rename from desmume/src/windows/resource.h rename to src/windows/resource.h index 7cc7bbe0c..d57b1ce38 100644 --- a/desmume/src/windows/resource.h +++ b/src/windows/resource.h @@ -7,6 +7,7 @@ #define IDC_FERMER 103 #define IDD_DESASSEMBLEUR_VIEWER7 103 #define IDC_STEP 104 +#define IDD_MEM_VIEWER7 104 #define IDC_SETPNUM 105 #define IDC_SCROLLER 106 #define IDD_SOUNDSETTINGS 106 @@ -96,6 +97,8 @@ #define IDC_8_BIT 302 #define IDC_16_BIT 303 #define IDC_32_BIT 304 +#define IDC_MEM_BOX 305 +#define IDC_GOTOMEM 306 #define IDC_DES_BOX 402 #define IDC_R0 403 #define IDC_R1 404 @@ -154,7 +157,6 @@ #define IDB_BGTILES 913 #define IDD_EMULATIONSETTINGS 916 #define IDD_WIFISETTINGS 918 -#define IDD_MEM_VIEW 920 #define IDC_BGMAP_SEL 1000 #define IDC_BRIDGEADAPTER 1000 #define IDC_EDIT03 1000 @@ -183,20 +185,16 @@ #define IDC_ARM7BIOSBROWSE 1007 #define IDC_EDIT06 1007 #define IDC_EDIT09 1008 -#define IDC_MEMVIEWBOX 1008 -#define IDC_ADDRESS 1009 #define IDC_BIOSSWIS 1009 #define IDC_EDIT10 1009 #define IDC_FORCERATIO 1009 #define IDC_AUTO_UPDATE_SPIN 1010 #define IDC_EDIT15 1010 -#define IDC_TEXTDUMP 1010 #define IDC_WINDOW1X 1010 #define IDC_AUTO_UPDATE_SECS 1011 #define IDC_USEEXTFIRMWARE 1011 #define IDC_WINDOW2X 1011 #define IDC_FIRMWARE 1012 -#define IDC_RAWDUMP 1012 #define IDC_REFRESH 1012 #define IDC_WINDOW3X 1012 #define IDC_EDIT02 1013 @@ -358,6 +356,7 @@ #define IDC_LIGHT_VIEWER_LIGHT0COLOR_COLORCTRL 1302 #define IDD_DESASSEMBLEUR_VIEWER9 1302 #define IDC_LIGHT_VIEWER_LIGHT0COLOR_EDIT 1303 +#define IDD_MEM_VIEWER9 1303 #define IDC_LIGHT_VIEWER_LIGHT0VECTOR_EDIT 1304 #define IDD_GBASLOT_NONE 1304 #define IDD_GBASLOT_RUMBLEPAK 1305 @@ -405,11 +404,6 @@ #define IDC_GI_ARM7SIZE 4486 #define IDC_GI_FNTOFS 4487 #define IDC_GI_FNTSIZE 4488 -#define IDD_MICROPHONE 5000 -#define IDM_MICROPHONESETTINGS 5001 -#define IDC_MICSAMPLEBROWSE 5003 -#define IDC_MICSAMPLE 5004 -#define IDC_USEMICSAMPLE 5005 #define IDM_SCREENSEP_NONE 40000 #define IDM_SCREENSEP_BORDER 40001 #define IDM_SCREENSEP_NDSGAP 40002 @@ -422,8 +416,6 @@ #define ID_VIEW_DISPLAYFPS 40010 #define ID_VIEW_DISPLAYINPUT 40011 #define ID_VIEW_DISPLAYLAG 40012 -#define ID_VIEW_HUDEDITOR 40013 -#define ID_VIEW_DISPLAYMICROPHONE 40014 #define IDM_FILE_RECORDAVI 40015 #define IDM_FILE_STOPAVI 40016 #define ACCEL_CTRL_O 40032 diff --git a/desmume/src/windows/resources.rc b/src/windows/resources.rc similarity index 90% rename from desmume/src/windows/resources.rc rename to src/windows/resources.rc index 1b3869b19..f55644181 100644 --- a/desmume/src/windows/resources.rc +++ b/src/windows/resources.rc @@ -1,4 +1,4 @@ -// Generated by ResEdit 1.4.4.19 +// Generated by ResEdit 1.4.4.18 // Copyright (C) 2006-2008 // http://www.resedit.net @@ -27,9 +27,9 @@ ICONDESMUME ICON "DeSmuME.ico" // LANGUAGE LANG_DANISH, SUBLANG_DANISH_DENMARK MENU_PRINCIPAL MENU -{ +BEGIN POPUP "&Fil" - { + BEGIN MENUITEM "&Åbn ROM...\tCtrl O", IDM_OPEN MENUITEM "Frisk ROM", ID_FILE_RECENTROM MENUITEM "ROM &Info", IDM_GAME_INFO @@ -37,7 +37,7 @@ MENU_PRINCIPAL MENU MENUITEM "Gem Stadie Som...", IDM_STATE_SAVE MENUITEM "Indlæs Stadie Som...", IDM_STATE_LOAD POPUP "Gem Stadie" - { + BEGIN MENUITEM "1", IDM_STATE_SAVE_F1 MENUITEM "2", IDM_STATE_SAVE_F2 MENUITEM "3", IDM_STATE_SAVE_F3 @@ -48,9 +48,9 @@ MENU_PRINCIPAL MENU MENUITEM "8", IDM_STATE_SAVE_F8 MENUITEM "9", IDM_STATE_SAVE_F9 MENUITEM "10", IDM_STATE_SAVE_F10 - } + END POPUP "Indlæs Stadie" - { + BEGIN MENUITEM "1", IDM_STATE_LOAD_F1 MENUITEM "2", IDM_STATE_LOAD_F2 MENUITEM "3", IDM_STATE_LOAD_F3 @@ -61,7 +61,7 @@ MENU_PRINCIPAL MENU MENUITEM "8", IDM_STATE_LOAD_F8 MENUITEM "9", IDM_STATE_LOAD_F9 MENUITEM "10", IDM_STATE_LOAD_F10 - } + END MENUITEM SEPARATOR MENUITEM "Importere Backup Hukommelse", IDM_IMPORTBACKUPMEMORY MENUITEM SEPARATOR @@ -72,63 +72,61 @@ MENU_PRINCIPAL MENU MENUITEM "Stop AVI", IDM_FILE_STOPAVI MENUITEM SEPARATOR MENUITEM "&Afslut\tAlt F4", IDM_QUIT - } + END POPUP "&Emulation" - { + BEGIN MENUITEM "&Pause", IDM_PAUSE MENUITEM "&Genstart", IDM_RESET MENUITEM SEPARATOR MENUITEM "GBA &slot", IDM_GBASLOT POPUP "&Cheats" - { + BEGIN MENUITEM "&List", IDM_CHEATS_LIST, INACTIVE MENUITEM "&Search", IDM_CHEATS_SEARCH, INACTIVE - } - } + END + END POPUP "&Vis" - { + BEGIN POPUP "&Rotation" - { + BEGIN MENUITEM " 0 Grader", IDC_ROTATE0 MENUITEM " 90 Grader", IDC_ROTATE90 MENUITEM "180 Grader", IDC_ROTATE180 MENUITEM "270 Grader", IDC_ROTATE270 - } + END POPUP "Vindue &Størrelse" - { + BEGIN MENUITEM "1x", IDC_WINDOW1X MENUITEM "1.5x", IDC_WINDOW1_5X MENUITEM "2x", IDC_WINDOW2X MENUITEM "3x", IDC_WINDOW3X MENUITEM "4x", IDC_WINDOW4X - } + END POPUP "Screen separation" - { + BEGIN MENUITEM "None\t(0 px)", IDM_SCREENSEP_NONE MENUITEM "Narrow border\t(5 px)", IDM_SCREENSEP_BORDER MENUITEM "DS\t(64 px)", IDM_SCREENSEP_NDSGAP - } + END MENUITEM "&Bevar Højde og Bredde", IDC_FORCERATIO MENUITEM "Default size", IDM_DEFSIZE MENUITEM SEPARATOR MENUITEM "Display Frame Counter", ID_VIEW_FRAMECOUNTER MENUITEM "Display Fps", ID_VIEW_DISPLAYFPS - MENUITEM "Display Input", ID_VIEW_DISPLAYINPUT - MENUITEM "Display Lag Counter", ID_VIEW_DISPLAYLAG - MENUITEM "Display Microphone", ID_VIEW_DISPLAYMICROPHONE - MENUITEM "HUD Editing Mode", ID_VIEW_HUDEDITOR - } + MENUITEM "Display Input", ID_VIEW_DISPLAYINPUT + MENUITEM "Display Lag Counter", ID_VIEW_DISPLAYLAG + END POPUP "&Konfigure" - { + BEGIN POPUP "&Vælg Hukommelse Type" - { + BEGIN MENUITEM "Vælg Automatisk", IDC_SAVETYPE1 MENUITEM "EEPROM 4kbit", IDC_SAVETYPE2 MENUITEM "EEPROM 64kbit", IDC_SAVETYPE3 MENUITEM "EEPROM 512kbit", IDC_SAVETYPE4 MENUITEM "FRAM 256kbit", IDC_SAVETYPE5 MENUITEM "FLASH 2mbit", IDC_SAVETYPE6 - } + END MENUITEM "3D settings", IDM_3DCONFIG MENUITEM "Indput Indstillinger", IDM_CONFIG MENUITEM "Hotkey Config", IDM_HOTKEY_CONFIG @@ -136,9 +134,8 @@ MENU_PRINCIPAL MENU MENUITEM "Wifi settings", IDM_WIFISETTINGS, GRAYED MENUITEM "Firmware Indstillinger", IDM_FIRMSETTINGS MENUITEM "Emulation settings", IDM_EMULATIONSETTINGS - MENUITEM "Microphone Settings", IDM_MICROPHONESETTINGS POPUP "&Frame Skip" - { + BEGIN MENUITEM "Limit framerate", IDC_FRAMELIMIT MENUITEM "Auto", IDC_FRAMESKIPAUTO MENUITEM "0", IDC_FRAMESKIP0 @@ -151,16 +148,16 @@ MENU_PRINCIPAL MENU MENUITEM "7", IDC_FRAMESKIP7 MENUITEM "8", IDC_FRAMESKIP8 MENUITEM "9", IDC_FRAMESKIP9 - } + END POPUP "&Language" - { + BEGIN MENUITEM "English", IDC_LANGENGLISH MENUITEM "French", IDC_LANGFRENCH MENUITEM "Danish", IDC_LANGDANISH - } - } + END + END POPUP "&Værktøjer" - { + BEGIN MENUITEM "&Disassembler", IDM_DISASSEMBLER MENUITEM "Vis &Hukommelse", IDM_MEMORY MENUITEM "Vis &Register", IDM_IOREG @@ -172,7 +169,7 @@ MENU_PRINCIPAL MENU MENUITEM "Vis Lights", IDM_LIGHT_VIEWER MENUITEM SEPARATOR POPUP "&Vis &Lag" - { + BEGIN MENUITEM "Hoved Baggrund 0", IDM_MBG0, CHECKED MENUITEM "Hoved Baggrund 1", IDM_MBG1, CHECKED MENUITEM "Hoved Baggrund 2", IDM_MBG2, CHECKED @@ -182,24 +179,24 @@ MENU_PRINCIPAL MENU MENUITEM "Under Baggrund 1", IDM_SBG1, CHECKED MENUITEM "Under Baggrund 2", IDM_SBG2, CHECKED MENUITEM "Under Baggrund 3", IDM_SBG3, CHECKED - } - } + END + END POPUP "&Hjælp" - { + BEGIN MENUITEM "&Hjemmeside", IDM_WEBSITE MENUITEM "&Forums", IDM_FORUM MENUITEM "&Indsend Fejl Rapport", IDM_SUBMITBUGREPORT MENUITEM "About", IDM_ABOUT - } -} + END +END LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US MENU_PRINCIPAL MENU -{ +BEGIN POPUP "&File" - { + BEGIN MENUITEM "&Open ROM...\tCtrl O", IDM_OPEN MENUITEM "&Recent ROM", ID_FILE_RECENTROM MENUITEM "ROM &Info", IDM_GAME_INFO @@ -207,7 +204,7 @@ MENU_PRINCIPAL MENU MENUITEM "Save State As...", IDM_STATE_SAVE MENUITEM "Load State As...", IDM_STATE_LOAD POPUP "Save State" - { + BEGIN MENUITEM "1", IDM_STATE_SAVE_F1 MENUITEM "2", IDM_STATE_SAVE_F2 MENUITEM "3", IDM_STATE_SAVE_F3 @@ -218,9 +215,9 @@ MENU_PRINCIPAL MENU MENUITEM "8", IDM_STATE_SAVE_F8 MENUITEM "9", IDM_STATE_SAVE_F9 MENUITEM "10", IDM_STATE_SAVE_F10 - } + END POPUP "Load State" - { + BEGIN MENUITEM "1", IDM_STATE_LOAD_F1 MENUITEM "2", IDM_STATE_LOAD_F2 MENUITEM "3", IDM_STATE_LOAD_F3 @@ -231,7 +228,7 @@ MENU_PRINCIPAL MENU MENUITEM "8", IDM_STATE_LOAD_F8 MENUITEM "9", IDM_STATE_LOAD_F9 MENUITEM "10", IDM_STATE_LOAD_F10 - } + END MENUITEM SEPARATOR MENUITEM "Import Backup Memory", IDM_IMPORTBACKUPMEMORY MENUITEM SEPARATOR @@ -242,9 +239,9 @@ MENU_PRINCIPAL MENU MENUITEM "Stop AVI", IDM_FILE_STOPAVI MENUITEM SEPARATOR MENUITEM "&Quit\tAlt F4", IDM_QUIT - } + END POPUP "&Emulation" - { + BEGIN MENUITEM "&Pause", IDM_PAUSE MENUITEM "&Reset", IDM_RESET MENUITEM SEPARATOR @@ -252,48 +249,46 @@ MENU_PRINCIPAL MENU MENUITEM SEPARATOR MENUITEM "GBA &slot", IDM_GBASLOT POPUP "&Cheats" - { + BEGIN MENUITEM "&List", IDM_CHEATS_LIST, INACTIVE MENUITEM "&Search", IDM_CHEATS_SEARCH, INACTIVE - } - } + END + END POPUP "&View" - { + BEGIN POPUP "&Rotation" - { + BEGIN MENUITEM " 0", IDC_ROTATE0 MENUITEM " 90", IDC_ROTATE90 MENUITEM "180", IDC_ROTATE180 MENUITEM "270", IDC_ROTATE270 - } + END POPUP "Window &Size" - { + BEGIN MENUITEM "1x", IDC_WINDOW1X MENUITEM "1.5x", IDC_WINDOW1_5X MENUITEM "2x", IDC_WINDOW2X MENUITEM "3x", IDC_WINDOW3X MENUITEM "4x", IDC_WINDOW4X - } + END POPUP "Screen separation" - { + BEGIN MENUITEM "None\t(0 px)", IDM_SCREENSEP_NONE MENUITEM "Narrow border\t(5 px)", IDM_SCREENSEP_BORDER MENUITEM "DS\t(64 px)", IDM_SCREENSEP_NDSGAP - } + END MENUITEM "&Force Maintain Ratio", IDC_FORCERATIO MENUITEM "Default size", IDM_DEFSIZE MENUITEM SEPARATOR MENUITEM "Display Frame Counter", ID_VIEW_FRAMECOUNTER MENUITEM "Display FPS", ID_VIEW_DISPLAYFPS - MENUITEM "Display Input", ID_VIEW_DISPLAYINPUT - MENUITEM "Display Lag Counter", ID_VIEW_DISPLAYLAG - MENUITEM "Display Microphone", ID_VIEW_DISPLAYMICROPHONE - MENUITEM "HUD Editing Mode", ID_VIEW_HUDEDITOR - } + MENUITEM "Display Input", ID_VIEW_DISPLAYINPUT + MENUITEM "Display Lag Counter", ID_VIEW_DISPLAYLAG + END POPUP "&Config" - { + BEGIN POPUP "&Save Type" - { + BEGIN MENUITEM "Autodetect", IDC_SAVETYPE1 MENUITEM "EEPROM 4kbit", IDC_SAVETYPE2 MENUITEM "EEPROM 64kbit", IDC_SAVETYPE3 @@ -301,7 +296,7 @@ MENU_PRINCIPAL MENU MENUITEM "FRAM 256kbit", IDC_SAVETYPE5 MENUITEM "FLASH 2mbit", IDC_SAVETYPE6 MENUITEM "FLASH 4mbit", IDC_SAVETYPE7 - } + END MENUITEM "3D Settings", IDM_3DCONFIG MENUITEM "Control Config", IDM_CONFIG MENUITEM "Hotkey Config", IDM_HOTKEY_CONFIG @@ -309,9 +304,8 @@ MENU_PRINCIPAL MENU MENUITEM "Wifi settings", IDM_WIFISETTINGS, GRAYED MENUITEM "Firmware Settings", IDM_FIRMSETTINGS MENUITEM "Emulation Settings", IDM_EMULATIONSETTINGS - MENUITEM "Microphone Settings", IDM_MICROPHONESETTINGS POPUP "&Frame Skip" - { + BEGIN MENUITEM "Limit framerate", IDC_FRAMELIMIT MENUITEM "Auto", IDC_FRAMESKIPAUTO MENUITEM "0", IDC_FRAMESKIP0 @@ -324,16 +318,16 @@ MENU_PRINCIPAL MENU MENUITEM "7", IDC_FRAMESKIP7 MENUITEM "8", IDC_FRAMESKIP8 MENUITEM "9", IDC_FRAMESKIP9 - } + END POPUP "&Language" - { + BEGIN MENUITEM "English", IDC_LANGENGLISH MENUITEM "French", IDC_LANGFRENCH MENUITEM "Danish", IDC_LANGDANISH - } - } + END + END POPUP "&Tools" - { + BEGIN MENUITEM "&Disassembler", IDM_DISASSEMBLER MENUITEM "View &Memory", IDM_MEMORY MENUITEM "View &Registers", IDM_IOREG @@ -345,7 +339,7 @@ MENU_PRINCIPAL MENU MENUITEM "View Lights", IDM_LIGHT_VIEWER MENUITEM SEPARATOR POPUP "&View &Layers" - { + BEGIN MENUITEM "Main BG 0", IDM_MBG0, CHECKED MENUITEM "Main BG 1", IDM_MBG1, CHECKED MENUITEM "Main BG 2", IDM_MBG2, CHECKED @@ -355,24 +349,24 @@ MENU_PRINCIPAL MENU MENUITEM "Sub BG 1", IDM_SBG1, CHECKED MENUITEM "Sub BG 2", IDM_SBG2, CHECKED MENUITEM "Sub BG 3", IDM_SBG3, CHECKED - } - } + END + END POPUP "&Help" - { + BEGIN MENUITEM "&Website", IDM_WEBSITE MENUITEM "&Forums", IDM_FORUM MENUITEM "&Submit a bug report", IDM_SUBMITBUGREPORT MENUITEM "&About", IDM_ABOUT - } -} + END +END LANGUAGE LANG_FRENCH, SUBLANG_FRENCH MENU_PRINCIPAL MENU -{ +BEGIN POPUP "&Fichier" - { + BEGIN MENUITEM "&Ouvrir ROM...\tCtrl O", IDM_OPEN MENUITEM "ROMs récentes", ID_FILE_RECENTROM MENUITEM "&Info ROM", IDM_GAME_INFO @@ -380,7 +374,7 @@ MENU_PRINCIPAL MENU MENUITEM "Save State As...", IDM_STATE_SAVE MENUITEM "Load State As...", IDM_STATE_LOAD POPUP "Save State" - { + BEGIN MENUITEM "1", IDM_STATE_SAVE_F1 MENUITEM "2", IDM_STATE_SAVE_F2 MENUITEM "3", IDM_STATE_SAVE_F3 @@ -391,9 +385,9 @@ MENU_PRINCIPAL MENU MENUITEM "8", IDM_STATE_SAVE_F8 MENUITEM "9", IDM_STATE_SAVE_F9 MENUITEM "10", IDM_STATE_SAVE_F10 - } + END POPUP "Load State" - { + BEGIN MENUITEM "1", IDM_STATE_LOAD_F1 MENUITEM "2", IDM_STATE_LOAD_F2 MENUITEM "3", IDM_STATE_LOAD_F3 @@ -404,7 +398,7 @@ MENU_PRINCIPAL MENU MENUITEM "8", IDM_STATE_LOAD_F8 MENUITEM "9", IDM_STATE_LOAD_F9 MENUITEM "10", IDM_STATE_LOAD_F10 - } + END MENUITEM SEPARATOR MENUITEM "Import Backup Memory", IDM_IMPORTBACKUPMEMORY MENUITEM SEPARATOR @@ -415,63 +409,61 @@ MENU_PRINCIPAL MENU MENUITEM "Arrêter l'enregistrement", IDM_FILE_STOPAVI MENUITEM SEPARATOR MENUITEM "&Quitter\tAlt F4", IDM_QUIT - } + END POPUP "&Emulation" - { + BEGIN MENUITEM "&Pause", IDM_PAUSE MENUITEM "&Reset", IDM_RESET MENUITEM SEPARATOR MENUITEM "GBA &slot", IDM_GBASLOT POPUP "&Cheats" - { + BEGIN MENUITEM "&List", IDM_CHEATS_LIST, INACTIVE MENUITEM "&Search", IDM_CHEATS_SEARCH, INACTIVE - } - } + END + END POPUP "&View" - { + BEGIN POPUP "&Rotation" - { + BEGIN MENUITEM " 0", IDC_ROTATE0 MENUITEM " 90", IDC_ROTATE90 MENUITEM "180", IDC_ROTATE180 MENUITEM "270", IDC_ROTATE270 - } + END POPUP "Taille de la fenêtre" - { + BEGIN MENUITEM "1x", IDC_WINDOW1X MENUITEM "1.5x", IDC_WINDOW1_5X MENUITEM "2x", IDC_WINDOW2X MENUITEM "3x", IDC_WINDOW3X MENUITEM "4x", IDC_WINDOW4X - } + END POPUP "Séparation écrans" - { + BEGIN MENUITEM "Aucune\t(0 px)", IDM_SCREENSEP_NONE MENUITEM "Bordure fine\t(5 px)", IDM_SCREENSEP_BORDER MENUITEM "DS\t(64 px)", IDM_SCREENSEP_NDSGAP - } + END MENUITEM "Conserver le ratio", IDC_FORCERATIO MENUITEM "Taille par défaut", IDM_DEFSIZE MENUITEM SEPARATOR MENUITEM "Compteur d'images", ID_VIEW_FRAMECOUNTER MENUITEM "Framerate", ID_VIEW_DISPLAYFPS - MENUITEM "Display Input", ID_VIEW_DISPLAYINPUT - MENUITEM "Display Lag Counter", ID_VIEW_DISPLAYLAG - MENUITEM "Display Microphone", ID_VIEW_DISPLAYMICROPHONE - MENUITEM "HUD Editing Mode", ID_VIEW_HUDEDITOR - } + MENUITEM "Display Input", ID_VIEW_DISPLAYINPUT + MENUITEM "Display Lag Counter", ID_VIEW_DISPLAYLAG + END POPUP "&Config" - { + BEGIN POPUP "Média de &sauvegarde" - { + BEGIN MENUITEM "Autodetect", IDC_SAVETYPE1 MENUITEM "EEPROM 4kbit", IDC_SAVETYPE2 MENUITEM "EEPROM 64kbit", IDC_SAVETYPE3 MENUITEM "EEPROM 512kbit", IDC_SAVETYPE4 MENUITEM "FRAM 256kbit", IDC_SAVETYPE5 MENUITEM "FLASH 2mbit", IDC_SAVETYPE6 - } + END MENUITEM "Config. 3D", IDM_3DCONFIG MENUITEM "Config. des contrôles", IDM_CONFIG MENUITEM "Hotkey Config", IDM_HOTKEY_CONFIG @@ -479,9 +471,8 @@ MENU_PRINCIPAL MENU MENUITEM "Config. wifi", IDM_WIFISETTINGS, GRAYED MENUITEM "Config. du firmware", IDM_FIRMSETTINGS MENUITEM "Config. d'émulation", IDM_EMULATIONSETTINGS - MENUITEM "Microphone Settings", IDM_MICROPHONESETTINGS POPUP "&Frame Skip" - { + BEGIN MENUITEM "Limit framerate", IDC_FRAMELIMIT MENUITEM "Auto", IDC_FRAMESKIPAUTO MENUITEM "0", IDC_FRAMESKIP0 @@ -494,16 +485,16 @@ MENU_PRINCIPAL MENU MENUITEM "7", IDC_FRAMESKIP7 MENUITEM "8", IDC_FRAMESKIP8 MENUITEM "9", IDC_FRAMESKIP9 - } + END POPUP "&Langage" - { + BEGIN MENUITEM "English", IDC_LANGENGLISH MENUITEM "French", IDC_LANGFRENCH MENUITEM "Danish", IDC_LANGDANISH - } - } + END + END POPUP "&Outils" - { + BEGIN MENUITEM "&Désassembleur", IDM_DISASSEMBLER MENUITEM "Visualiser la &memoire", IDM_MEMORY MENUITEM "Visualiser les ®istres", IDM_IOREG @@ -515,7 +506,7 @@ MENU_PRINCIPAL MENU MENUITEM "Visualiser les lights", IDM_LIGHT_VIEWER MENUITEM SEPARATOR POPUP "&Visualiser les &couches" - { + BEGIN MENUITEM "Main BG 0", IDM_MBG0, CHECKED MENUITEM "Main BG 1", IDM_MBG1, CHECKED MENUITEM "Main BG 2", IDM_MBG2, CHECKED @@ -525,55 +516,55 @@ MENU_PRINCIPAL MENU MENUITEM "Sub BG 1", IDM_SBG1, CHECKED MENUITEM "Sub BG 2", IDM_SBG2, CHECKED MENUITEM "Sub BG 3", IDM_SBG3, CHECKED - } - } + END + END POPUP "?" - { + BEGIN MENUITEM "Site &web", IDM_WEBSITE MENUITEM "&Forums", IDM_FORUM MENUITEM "&Soumettre un report de bug", IDM_SUBMITBUGREPORT MENUITEM "A propos", IDM_ABOUT - } -} + END +END LANGUAGE LANG_DANISH, SUBLANG_DANISH_DENMARK RECENTROMS MENU -{ +BEGIN POPUP "Recent ROMs" - { + BEGIN MENUITEM "None", 601, GRAYED MENUITEM SEPARATOR MENUITEM "Clear", 600, GRAYED - } -} + END +END LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US RECENTROMS MENU -{ +BEGIN POPUP "Recent ROMs" - { + BEGIN MENUITEM "None", 601, GRAYED MENUITEM SEPARATOR MENUITEM "Clear", 600, GRAYED - } -} + END +END LANGUAGE LANG_FRENCH, SUBLANG_FRENCH RECENTROMS MENU -{ +BEGIN POPUP "ROMs récentes" - { + BEGIN MENUITEM "Aucune", 601, GRAYED MENUITEM SEPARATOR MENUITEM "Vider", 600, GRAYED - } -} + END +END @@ -585,7 +576,7 @@ IDD_3DSETTINGS DIALOG 0, 0, 174, 120 STYLE DS_MODALFRAME | DS_SETFONT | WS_BORDER | WS_CAPTION | WS_DLGFRAME | WS_POPUP | WS_SYSMENU CAPTION "3D settings" FONT 8, "MS Sans Serif" -{ +BEGIN DEFPUSHBUTTON "OK", IDOK, 62, 92, 50, 14, BS_DEFPUSHBUTTON PUSHBUTTON "Cancel", IDCANCEL, 117, 92, 50, 14, BS_PUSHBUTTON PUSHBUTTON "Default", IDC_DEFAULT, 7, 92, 50, 14, BS_PUSHBUTTON @@ -593,7 +584,7 @@ FONT 8, "MS Sans Serif" COMBOBOX IDC_3DCORE, 15, 23, 146, 138, WS_TABSTOP | WS_VSCROLL | WS_TABSTOP | CBS_DROPDOWNLIST AUTOCHECKBOX "Unrealistically High-Precision Color Interpolation", IDC_INTERPOLATECOLOR, 9, 55, 165, 10, BS_AUTOCHECKBOX LTEXT "(Presently only effective for SoftRasterizer)", IDC_STATIC, 21, 65, 134, 8, SS_LEFT -} +END @@ -602,7 +593,7 @@ IDD_3DSETTINGS DIALOGEX 0, 0, 174, 120 STYLE DS_MODALFRAME | DS_SETFONT | WS_BORDER | WS_CAPTION | WS_DLGFRAME | WS_POPUP | WS_SYSMENU CAPTION "3D settings" FONT 8, "MS Sans Serif", 0, 0, 0 -{ +BEGIN DEFPUSHBUTTON "OK", IDOK, 62, 92, 50, 14, BS_DEFPUSHBUTTON PUSHBUTTON "Cancel", IDCANCEL, 117, 92, 50, 14, BS_PUSHBUTTON PUSHBUTTON "Default", IDC_DEFAULT, 7, 92, 50, 14, BS_PUSHBUTTON @@ -610,7 +601,7 @@ FONT 8, "MS Sans Serif", 0, 0, 0 COMBOBOX IDC_3DCORE, 15, 23, 146, 138, WS_TABSTOP | WS_VSCROLL | WS_TABSTOP | CBS_DROPDOWNLIST AUTOCHECKBOX "Unrealistically High-Precision Color Interpolation", IDC_INTERPOLATECOLOR, 9, 55, 165, 10, BS_AUTOCHECKBOX LTEXT "(Presently only effective for SoftRasterizer)", IDC_STATIC, 21, 65, 134, 8, SS_LEFT -} +END @@ -619,7 +610,7 @@ IDD_3DSETTINGS DIALOG 0, 0, 174, 120 STYLE DS_MODALFRAME | DS_SETFONT | WS_BORDER | WS_CAPTION | WS_DLGFRAME | WS_POPUP | WS_SYSMENU CAPTION "Configuration 3D" FONT 8, "MS Sans Serif" -{ +BEGIN DEFPUSHBUTTON "OK", IDOK, 62, 92, 50, 14, BS_DEFPUSHBUTTON PUSHBUTTON "Annuler", IDCANCEL, 117, 92, 50, 14, BS_PUSHBUTTON PUSHBUTTON "Par défaut", IDC_DEFAULT, 7, 92, 50, 14, BS_PUSHBUTTON @@ -627,7 +618,7 @@ FONT 8, "MS Sans Serif" COMBOBOX IDC_3DCORE, 15, 23, 146, 138, WS_TABSTOP | WS_VSCROLL | WS_TABSTOP | CBS_DROPDOWNLIST AUTOCHECKBOX "Unrealistically High-Precision Color Interpolation", IDC_INTERPOLATECOLOR, 9, 55, 165, 10, BS_AUTOCHECKBOX LTEXT "(Presently only effective for SoftRasterizer)", IDC_STATIC, 21, 65, 134, 8, SS_LEFT -} +END @@ -636,7 +627,7 @@ IDD_ABOUT_BOX DIALOGEX 0, 0, 212, 298 STYLE DS_CENTER | DS_MODALFRAME | DS_SHELLFONT | WS_BORDER | WS_CAPTION | WS_DLGFRAME | WS_POPUP CAPTION "About DeSmuME..." FONT 8, "MS Shell Dlg", 400, 0, 1 -{ +BEGIN CTEXT "", IDC_AUTHORS_LIST, 7, 75, 198, 188, SS_CENTER, WS_EX_CLIENTEDGE DEFPUSHBUTTON "Close", IDC_FERMER, 86, 277, 50, 14, BS_DEFPUSHBUTTON CTEXT "DeSmuME", IDC_STATIC, 7, 7, 198, 10, SS_CENTER @@ -645,7 +636,7 @@ FONT 8, "MS Shell Dlg", 400, 0, 1 CTEXT "Original author", IDC_STATIC, 7, 36, 198, 10, SS_CENTER CTEXT "yopyop", IDC_STATIC, 9, 45, 196, 10, SS_CENTER CTEXT "current team", IDC_STATIC, 8, 63, 198, 10, SS_CENTER -} +END @@ -654,7 +645,7 @@ IDD_BGMAP_VIEWER DIALOG 0, 0, 495, 320 STYLE DS_CENTER | DS_MODALFRAME | DS_SHELLFONT | WS_VISIBLE | WS_BORDER | WS_CAPTION | WS_DLGFRAME | WS_POPUP | WS_SYSMENU CAPTION "BG map viewer" FONT 8, "MS Sans Serif" -{ +BEGIN PUSHBUTTON "Close", IDCANCEL, 5, 301, 50, 14, BS_PUSHBUTTON GROUPBOX "Map info", IDC_STATIC, 5, 23, 142, 230 COMBOBOX IDC_BGMAP_SEL, 5, 5, 142, 154, CBS_DROPDOWNLIST | CBS_HASSTRINGS @@ -684,7 +675,7 @@ FONT 8, "MS Sans Serif" LTEXT "mosaic here", IDC_BGMAP_MOSAIC, 75, 210, 68, 8, SS_LEFT LTEXT "special effect here", IDC_BGMAP_SPECEFF, 75, 225, 68, 8, SS_LEFT LTEXT "windows here", IDC_BGMAP_WINDOWS, 75, 240, 68, 8, SS_LEFT -} +END @@ -693,7 +684,7 @@ IDD_CHEAT_ADD DIALOGEX 0, 0, 121, 192 STYLE DS_CENTER | DS_MODALFRAME | DS_SHELLFONT | WS_BORDER | WS_CAPTION | WS_DLGFRAME | WS_POPUP | WS_SYSMENU CAPTION "Add cheat" FONT 8, "MS Shell Dlg", 400, 0, 1 -{ +BEGIN EDITTEXT IDC_EDIT1, 26, 17, 88, 14, ES_AUTOHSCROLL EDITTEXT IDC_EDIT2, 7, 42, 107, 14, ES_AUTOHSCROLL EDITTEXT IDC_EDIT3, 7, 67, 107, 30, ES_MULTILINE @@ -713,7 +704,7 @@ FONT 8, "MS Shell Dlg", 400, 0, 1 LTEXT "[0..65535]", IDC_STATIC_S2, 53, 134, 60, 8, SS_LEFT LTEXT "[0..16777215]", IDC_STATIC_S3, 53, 145, 58, 8, SS_LEFT LTEXT "[0..4294967295]", IDC_STATIC_S4, 53, 155, 59, 8, SS_LEFT -} +END @@ -722,7 +713,7 @@ IDD_CHEAT_ADD_AR_CODE DIALOGEX 0, 0, 121, 193 STYLE DS_CENTER | DS_MODALFRAME | DS_SHELLFONT | WS_BORDER | WS_CAPTION | WS_DLGFRAME | WS_POPUP | WS_SYSMENU CAPTION "Add Action Replay code" FONT 8, "MS Shell Dlg", 400, 0, 1 -{ +BEGIN EDITTEXT IDC_EDIT2, 7, 17, 107, 97, ES_AUTOHSCROLL EDITTEXT IDC_EDIT3, 7, 124, 107, 30, ES_MULTILINE AUTOCHECKBOX "turn on code", IDC_CHECK1, 47, 159, 67, 10, BS_AUTOCHECKBOX @@ -730,7 +721,7 @@ FONT 8, "MS Shell Dlg", 400, 0, 1 PUSHBUTTON "Cancel", IDCANCEL, 64, 172, 50, 14, BS_PUSHBUTTON LTEXT "Code:", -1, 7, 7, 20, 8, SS_LEFT LTEXT "Description:", -1, 9, 116, 39, 8, SS_LEFT -} +END @@ -739,7 +730,7 @@ IDD_CHEAT_ADD_BC_CODE DIALOGEX 0, 0, 121, 193 STYLE DS_CENTER | DS_MODALFRAME | DS_SHELLFONT | WS_BORDER | WS_CAPTION | WS_DLGFRAME | WS_POPUP | WS_SYSMENU CAPTION "Add Action Replay code" FONT 8, "MS Shell Dlg", 400, 0, 1 -{ +BEGIN EDITTEXT IDC_EDIT2, 7, 17, 107, 97, ES_AUTOHSCROLL EDITTEXT IDC_EDIT3, 7, 124, 107, 30, ES_MULTILINE AUTOCHECKBOX "turn on code", IDC_CHECK1, 47, 159, 67, 10, BS_AUTOCHECKBOX @@ -747,7 +738,7 @@ FONT 8, "MS Shell Dlg", 400, 0, 1 PUSHBUTTON "Cancel", IDCANCEL, 64, 172, 50, 14, BS_PUSHBUTTON LTEXT "Code:", -1, 7, 7, 20, 8, SS_LEFT LTEXT "Description:", -1, 9, 116, 39, 8, SS_LEFT -} +END @@ -756,7 +747,7 @@ IDD_CHEAT_LIST DIALOGEX 0, 0, 316, 177 STYLE DS_CENTER | DS_MODALFRAME | DS_SHELLFONT | WS_VISIBLE | WS_BORDER | WS_CAPTION | WS_DLGFRAME | WS_POPUP | WS_SYSMENU CAPTION "Cheats list" FONT 8, "MS Shell Dlg", 400, 0, 1 -{ +BEGIN CONTROL "", IDC_LIST1, WC_LISTVIEW, WS_TABSTOP | WS_BORDER | LVS_ALIGNLEFT | LVS_SHOWSELALWAYS | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_REPORT, 7, 7, 302, 103 PUSHBUTTON "internal", IDC_BADD, 10, 125, 50, 14, BS_PUSHBUTTON PUSHBUTTON "Action Replay", IDC_BADD_AR, 66, 125, 67, 14, WS_DISABLED | BS_PUSHBUTTON @@ -766,7 +757,7 @@ FONT 8, "MS Shell Dlg", 400, 0, 1 DEFPUSHBUTTON "Save", IDOK, 109, 156, 50, 14, WS_DISABLED | BS_DEFPUSHBUTTON PUSHBUTTON "Cancel", IDCANCEL, 163, 156, 50, 14, BS_PUSHBUTTON GROUPBOX " Add cheats code as... ", IDC_STATIC, 7, 114, 205, 31 -} +END @@ -775,11 +766,11 @@ IDD_CHEAT_SEARCH DIALOGEX 0, 0, 177, 211 STYLE DS_CENTER | DS_MODALFRAME | DS_SHELLFONT | WS_VISIBLE | WS_BORDER | WS_CAPTION | WS_DLGFRAME | WS_POPUP | WS_SYSMENU CAPTION "Cheat search" FONT 8, "MS Shell Dlg", 400, 0, 1 -{ +BEGIN PUSHBUTTON "Restart", IDC_BRESTART, 7, 190, 50, 14, WS_DISABLED | BS_PUSHBUTTON PUSHBUTTON "View", IDC_BVIEW, 64, 190, 50, 14, WS_DISABLED | BS_PUSHBUTTON DEFPUSHBUTTON "Search", IDC_BSEARCH, 120, 190, 50, 14, BS_DEFPUSHBUTTON -} +END @@ -787,7 +778,7 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US IDD_CHEAT_SEARCH_COMP DIALOGEX 0, 0, 177, 184 STYLE DS_SHELLFONT | WS_VISIBLE | WS_CHILDWINDOW | WS_SYSMENU FONT 8, "MS Shell Dlg", 400, 0, 1 -{ +BEGIN RTEXT "number of results: ", IDC_STATIC, 7, 169, 78, 8, SS_RIGHT LTEXT "Static", IDC_SNUMBER, 92, 169, 78, 8, SS_LEFT GROUPBOX " Select comparison ", IDC_STATIC, 7, 7, 163, 58 @@ -795,7 +786,7 @@ FONT 8, "MS Shell Dlg", 400, 0, 1 AUTORADIOBUTTON "new value is < old value", IDC_RADIO2, 9, 28, 93, 10, WS_TABSTOP | BS_AUTORADIOBUTTON AUTORADIOBUTTON "new value is = old value", IDC_RADIO3, 9, 39, 93, 10, WS_TABSTOP | BS_AUTORADIOBUTTON AUTORADIOBUTTON "new value is != old value", IDC_RADIO4, 9, 50, 96, 10, WS_TABSTOP | BS_AUTORADIOBUTTON -} +END @@ -803,14 +794,14 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US IDD_CHEAT_SEARCH_EXACT DIALOGEX 0, 0, 177, 184 STYLE DS_SHELLFONT | WS_VISIBLE | WS_CHILDWINDOW | WS_SYSMENU FONT 8, "MS Shell Dlg", 400, 0, 1 -{ +BEGIN EDITTEXT IDC_EVALUE, 7, 18, 163, 14, ES_AUTOHSCROLL LTEXT "Enter value:", IDC_STATIC, 7, 7, 163, 8, SS_LEFT RTEXT "Range value:", IDC_STATIC, 7, 36, 78, 8, SS_RIGHT LTEXT "Static", IDC_STATIC_RANGE, 92, 36, 78, 8, SS_LEFT RTEXT "number of results: ", IDC_STATIC, 7, 169, 78, 8, SS_RIGHT LTEXT "Static", IDC_SNUMBER, 92, 169, 78, 8, SS_LEFT -} +END @@ -818,7 +809,7 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US IDD_CHEAT_SEARCH_MAIN DIALOGEX 0, 0, 178, 185 STYLE DS_SHELLFONT | WS_VISIBLE | WS_CHILDWINDOW | WS_SYSMENU FONT 8, "MS Shell Dlg", 400, 0, 1 -{ +BEGIN AUTORADIOBUTTON "1 byte", IDC_RADIO1, 9, 10, 37, 10, WS_GROUP | WS_TABSTOP | BS_AUTORADIOBUTTON AUTORADIOBUTTON "2 bytes", IDC_RADIO2, 9, 20, 40, 10, WS_TABSTOP | BS_AUTORADIOBUTTON AUTORADIOBUTTON "3 bytes", IDC_RADIO3, 9, 31, 40, 10, WS_TABSTOP | BS_AUTORADIOBUTTON @@ -834,7 +825,7 @@ FONT 8, "MS Shell Dlg", 400, 0, 1 LTEXT "[0..65535]", IDC_STATIC_S2, 53, 20, 118, 8, SS_LEFT LTEXT "[0..16777215]", IDC_STATIC_S3, 53, 31, 118, 8, SS_LEFT LTEXT "[0..4294967295]", IDC_STATIC_S4, 53, 41, 118, 8, SS_LEFT -} +END @@ -842,11 +833,11 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US IDD_CHEAT_SEARCH_RESULT DIALOGEX 0, 0, 177, 184 STYLE DS_SHELLFONT | WS_VISIBLE | WS_CHILDWINDOW | WS_SYSMENU FONT 8, "MS Shell Dlg", 400, 0, 1 -{ +BEGIN LTEXT "Now return to your game and come back when the next search should be processed", IDC_STATIC, 7, 7, 163, 20, SS_LEFT RTEXT "number of results: ", IDC_STATIC, 7, 169, 78, 8, SS_RIGHT LTEXT "Static", IDC_SNUMBER, 92, 169, 78, 8, SS_LEFT -} +END @@ -855,11 +846,11 @@ IDD_CHEAT_SEARCH_VIEW DIALOGEX 0, 0, 177, 211 STYLE DS_CENTER | DS_MODALFRAME | DS_SHELLFONT | WS_VISIBLE | WS_BORDER | WS_CAPTION | WS_DLGFRAME | WS_POPUP | WS_SYSMENU CAPTION "Cheat search - Results" FONT 8, "MS Shell Dlg", 400, 0, 1 -{ +BEGIN CONTROL "", IDC_LIST, WC_LISTVIEW, WS_TABSTOP | WS_BORDER | LVS_ALIGNLEFT | LVS_SHOWSELALWAYS | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_REPORT, 7, 7, 163, 180 PUSHBUTTON "Return", IDCANCEL, 64, 190, 50, 14, BS_PUSHBUTTON DEFPUSHBUTTON "Add", IDC_BADD, 120, 190, 50, 14, BS_DEFPUSHBUTTON -} +END @@ -868,7 +859,7 @@ IDD_DESASSEMBLEUR_VIEWER7 DIALOGEX 0, 0, 380, 186 STYLE DS_CENTER | DS_SETFONT | WS_BORDER | WS_CAPTION | WS_DLGFRAME CAPTION "Disassembler" FONT 8, "MS Sans Serif", 0, 0, 1 -{ +BEGIN AUTORADIOBUTTON "Auto ", IDC_AUTO_DES, 10, 4, 35, 10, WS_GROUP | WS_TABSTOP | BS_AUTORADIOBUTTON AUTORADIOBUTTON "ARM", IDC_ARM, 44, 4, 35, 10, WS_TABSTOP | BS_AUTORADIOBUTTON AUTORADIOBUTTON "Thumb", IDC_THUMB, 82, 4, 40, 10, WS_TABSTOP | BS_AUTORADIOBUTTON @@ -921,7 +912,7 @@ FONT 8, "MS Sans Serif", 0, 0, 1 EDITTEXT IDC_SETPNUM, 5, 170, 34, 14, WS_GROUP | ES_AUTOHSCROLL | ES_NUMBER | ES_UPPERCASE PUSHBUTTON "&Step", IDC_STEP, 41, 170, 50, 14, BS_PUSHBUTTON AUTOCHECKBOX "Autoupd asm", IDC_AUTOUPDATE_ASM, 94, 172, 57, 10, BS_AUTOCHECKBOX -} +END @@ -930,7 +921,7 @@ IDD_DESASSEMBLEUR_VIEWER7 DIALOGEX 0, 0, 380, 186 STYLE DS_CENTER | DS_SETFONT | WS_BORDER | WS_CAPTION | WS_DLGFRAME CAPTION "Disassembler" FONT 8, "MS Sans Serif", 0, 0, 1 -{ +BEGIN AUTORADIOBUTTON "Auto ", IDC_AUTO_DES, 10, 4, 35, 10, WS_GROUP | WS_TABSTOP | BS_AUTORADIOBUTTON AUTORADIOBUTTON "ARM", IDC_ARM, 44, 4, 35, 10, WS_TABSTOP | BS_AUTORADIOBUTTON AUTORADIOBUTTON "Thumb", IDC_THUMB, 82, 4, 40, 10, WS_TABSTOP | BS_AUTORADIOBUTTON @@ -983,7 +974,7 @@ FONT 8, "MS Sans Serif", 0, 0, 1 EDITTEXT IDC_SETPNUM, 5, 170, 34, 14, WS_GROUP | ES_AUTOHSCROLL | ES_NUMBER | ES_UPPERCASE PUSHBUTTON "&Step", IDC_STEP, 41, 170, 50, 14, BS_PUSHBUTTON AUTOCHECKBOX "Autoupd asm", IDC_AUTOUPDATE_ASM, 94, 172, 57, 10, BS_AUTOCHECKBOX -} +END @@ -992,7 +983,7 @@ IDD_DESASSEMBLEUR_VIEWER7 DIALOGEX 0, 0, 380, 186 STYLE DS_CENTER | DS_SETFONT | WS_BORDER | WS_CAPTION | WS_DLGFRAME CAPTION "Desassembleur" FONT 8, "MS Sans Serif", 0, 0, 1 -{ +BEGIN AUTORADIOBUTTON "Auto ", IDC_AUTO_DES, 10, 4, 35, 10, WS_GROUP | WS_TABSTOP | BS_AUTORADIOBUTTON AUTORADIOBUTTON "ARM", IDC_ARM, 44, 4, 35, 10, WS_TABSTOP | BS_AUTORADIOBUTTON AUTORADIOBUTTON "Thumb", IDC_THUMB, 82, 4, 40, 10, WS_TABSTOP | BS_AUTORADIOBUTTON @@ -1045,7 +1036,7 @@ FONT 8, "MS Sans Serif", 0, 0, 1 EDITTEXT IDC_SETPNUM, 5, 170, 34, 14, WS_GROUP | ES_AUTOHSCROLL | ES_NUMBER | ES_UPPERCASE PUSHBUTTON "&Step", IDC_STEP, 41, 170, 50, 14, BS_PUSHBUTTON AUTOCHECKBOX "Autoupd asm", IDC_AUTOUPDATE_ASM, 94, 172, 57, 10, BS_AUTOCHECKBOX -} +END @@ -1054,7 +1045,7 @@ IDD_DESASSEMBLEUR_VIEWER9 DIALOGEX 0, 0, 380, 186 STYLE DS_CENTER | DS_SETFONT | WS_BORDER | WS_CAPTION | WS_DLGFRAME CAPTION "Disassembler" FONT 8, "MS Sans Serif", 0, 0, 1 -{ +BEGIN AUTORADIOBUTTON "Auto ", IDC_AUTO_DES, 10, 4, 35, 10, WS_GROUP | WS_TABSTOP | BS_AUTORADIOBUTTON AUTORADIOBUTTON "ARM", IDC_ARM, 44, 4, 35, 10, WS_TABSTOP | BS_AUTORADIOBUTTON AUTORADIOBUTTON "Thumb", IDC_THUMB, 82, 4, 40, 10, WS_TABSTOP | BS_AUTORADIOBUTTON @@ -1107,7 +1098,7 @@ FONT 8, "MS Sans Serif", 0, 0, 1 EDITTEXT IDC_SETPNUM, 5, 170, 34, 14, WS_GROUP | ES_AUTOHSCROLL | ES_NUMBER | ES_UPPERCASE PUSHBUTTON "&Step", IDC_STEP, 41, 170, 50, 14, BS_PUSHBUTTON AUTOCHECKBOX "Autoupd asm", IDC_AUTOUPDATE_ASM, 94, 172, 57, 10, BS_AUTOCHECKBOX -} +END @@ -1116,7 +1107,7 @@ IDD_DESASSEMBLEUR_VIEWER9 DIALOGEX 0, 0, 380, 186 STYLE DS_CENTER | DS_SETFONT | WS_BORDER | WS_CAPTION | WS_DLGFRAME CAPTION "Disassembler" FONT 8, "MS Sans Serif", 0, 0, 1 -{ +BEGIN AUTORADIOBUTTON "Auto ", IDC_AUTO_DES, 10, 4, 35, 10, WS_GROUP | WS_TABSTOP | BS_AUTORADIOBUTTON AUTORADIOBUTTON "ARM", IDC_ARM, 44, 4, 35, 10, WS_TABSTOP | BS_AUTORADIOBUTTON AUTORADIOBUTTON "Thumb", IDC_THUMB, 82, 4, 40, 10, WS_TABSTOP | BS_AUTORADIOBUTTON @@ -1169,7 +1160,7 @@ FONT 8, "MS Sans Serif", 0, 0, 1 LTEXT "frames", IDC_STATIC, 364, 5, 16, 8, SS_LEFT PUSHBUTTON "&Refresh", IDC_REFRESH, 162, 170, 50, 14, BS_PUSHBUTTON | BS_ICON AUTOCHECKBOX "Autoupd asm", IDC_AUTOUPDATE_ASM, 94, 172, 57, 10, BS_AUTOCHECKBOX -} +END @@ -1178,7 +1169,7 @@ IDD_DESASSEMBLEUR_VIEWER9 DIALOGEX 0, 0, 380, 186 STYLE DS_CENTER | DS_SETFONT | WS_BORDER | WS_CAPTION | WS_DLGFRAME CAPTION "Desassembleur" FONT 8, "MS Sans Serif", 0, 0, 1 -{ +BEGIN AUTORADIOBUTTON "Auto ", IDC_AUTO_DES, 10, 4, 35, 10, WS_GROUP | WS_TABSTOP | BS_AUTORADIOBUTTON AUTORADIOBUTTON "ARM", IDC_ARM, 44, 4, 35, 10, WS_TABSTOP | BS_AUTORADIOBUTTON AUTORADIOBUTTON "Thumb", IDC_THUMB, 82, 4, 40, 10, WS_TABSTOP | BS_AUTORADIOBUTTON @@ -1231,28 +1222,6 @@ FONT 8, "MS Sans Serif", 0, 0, 1 EDITTEXT IDC_SETPNUM, 5, 170, 34, 14, WS_GROUP | ES_AUTOHSCROLL | ES_NUMBER | ES_UPPERCASE PUSHBUTTON "&Step", IDC_STEP, 41, 170, 50, 14, BS_PUSHBUTTON AUTOCHECKBOX "Autoupd asm", IDC_AUTOUPDATE_ASM, 94, 172, 57, 10, BS_AUTOCHECKBOX -} - - - -LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US -IDD_MEM_VIEW DIALOG 0, 0, 436, 231 -STYLE DS_CENTER | DS_FIXEDSYS | WS_VISIBLE | WS_BORDER | WS_CAPTION | WS_DLGFRAME | WS_SYSMENU -CAPTION "" -FONT 8, "MS Sans Serif" -BEGIN - PUSHBUTTON "Close", IDCANCEL, 188, 210, 60, 15, BS_PUSHBUTTON - GROUPBOX "View mode", IDC_STATIC, 5, 5, 145, 35 - RADIOBUTTON "8-bit", IDC_8_BIT, 15, 20, 40, 10, WS_GROUP | WS_TABSTOP | BS_RADIOBUTTON - RADIOBUTTON "16-bit", IDC_16_BIT, 60, 20, 39, 10, WS_GROUP | WS_TABSTOP | BS_RADIOBUTTON - RADIOBUTTON "32-bit", IDC_32_BIT, 105, 20, 39, 10, WS_GROUP | WS_TABSTOP | BS_RADIOBUTTON - GROUPBOX "View address", IDC_STATIC, 160, 5, 115, 35 - PUSHBUTTON "Go", IDC_GO, 240, 20, 25, 14, BS_PUSHBUTTON - PUSHBUTTON "Text dump", IDC_TEXTDUMP, 295, 20, 60, 14, BS_PUSHBUTTON - CONTROL "1", IDC_MEMVIEWBOX, "MemView_ViewBox", 0x50210000, 5, 45, 425, 160 - EDITTEXT IDC_ADDRESS, 170, 20, 70, 14, ES_AUTOHSCROLL, WS_EX_TRANSPARENT - PUSHBUTTON "Raw dump", IDC_RAWDUMP, 360, 20, 60, 14, BS_PUSHBUTTON - GROUPBOX "View dump", IDC_STATIC, 285, 5, 145, 35 END @@ -1262,7 +1231,7 @@ IDD_EMULATIONSETTINGS DIALOG 0, 0, 241, 270 STYLE DS_CENTER | DS_SHELLFONT | WS_BORDER | WS_CAPTION | WS_DLGFRAME | WS_SYSMENU CAPTION "Emulation settings" FONT 8, "MS Sans Serif" -{ +BEGIN DEFPUSHBUTTON "OK", IDOK, 130, 250, 50, 14, BS_DEFPUSHBUTTON PUSHBUTTON "Cancel", IDCANCEL, 185, 250, 50, 14, BS_PUSHBUTTON AUTOCHECKBOX "Use 8MB debugger mode when starting execution", IDC_CHECKBOX_DEBUGGERMODE, 15, 35, 182, 10, BS_AUTOCHECKBOX @@ -1283,7 +1252,7 @@ FONT 8, "MS Sans Serif" PUSHBUTTON "...", IDC_FIRMWAREBROWSE, 205, 205, 20, 14, BS_PUSHBUTTON AUTOCHECKBOX "Boot from firmware (like the NDS)", IDC_FIRMWAREBOOT, 15, 225, 210, 10, BS_AUTOCHECKBOX GROUPBOX "General", IDC_STATIC, 5, 5, 230, 45 -} +END @@ -1292,7 +1261,7 @@ IDD_FIRMSETTINGS DIALOG 0, 0, 161, 145 STYLE DS_MODALFRAME | DS_SETFONT | WS_VISIBLE | WS_BORDER | WS_CAPTION | WS_DLGFRAME | WS_POPUP | WS_SYSMENU CAPTION "Firmware Indstillinger" FONT 8, "MS Sans Serif" -{ +BEGIN DEFPUSHBUTTON "&OK", IDOK, 7, 124, 50, 14, BS_DEFPUSHBUTTON PUSHBUTTON "&Fortryd", IDCANCEL, 104, 124, 50, 14, BS_PUSHBUTTON CONTROL "Favorit Farve:", IDC_STATIC, WC_STATIC, NOT WS_GROUP | SS_LEFTNOWORDWRAP, 9, 55, 52, 12 @@ -1307,7 +1276,7 @@ FONT 8, "MS Sans Serif" EDITTEXT IDC_EDIT1, 66, 14, 82, 14, WS_GROUP | ES_AUTOHSCROLL | ES_WANTRETURN CONTROL "Besked:", IDC_STATIC, WC_STATIC, NOT WS_GROUP | SS_LEFTNOWORDWRAP, 9, 36, 52, 12 EDITTEXT IDC_EDIT2, 66, 33, 82, 14, WS_GROUP | ES_AUTOHSCROLL | ES_WANTRETURN -} +END @@ -1316,7 +1285,7 @@ IDD_FIRMSETTINGS DIALOGEX 0, 0, 161, 145 STYLE DS_CENTER | DS_MODALFRAME | DS_SETFONT | WS_VISIBLE | WS_BORDER | WS_CAPTION | WS_DLGFRAME | WS_POPUP | WS_SYSMENU CAPTION "Firmware Settings" FONT 8, "MS Sans Serif", 0, 0, 1 -{ +BEGIN EDITTEXT IDC_EDIT1, 66, 14, 82, 14, WS_GROUP | ES_AUTOHSCROLL | ES_WANTRETURN EDITTEXT IDC_EDIT2, 66, 33, 82, 14, WS_GROUP | ES_AUTOHSCROLL | ES_WANTRETURN COMBOBOX IDC_COMBO1, 66, 53, 84, 14, WS_TABSTOP | WS_VSCROLL | WS_TABSTOP | CBS_DROPDOWN @@ -1331,7 +1300,7 @@ FONT 8, "MS Sans Serif", 0, 0, 1 CONTROL "Language:", IDC_STATIC, WC_STATIC, NOT WS_GROUP | SS_LEFTNOWORDWRAP, 9, 106, 52, 12 CONTROL "Nickname:", IDC_STATIC, WC_STATIC, NOT WS_GROUP | SS_LEFTNOWORDWRAP, 9, 17, 52, 12 CONTROL "Message:", IDC_STATIC, WC_STATIC, NOT WS_GROUP | SS_LEFTNOWORDWRAP, 9, 36, 52, 12 -} +END @@ -1340,7 +1309,7 @@ IDD_FIRMSETTINGS DIALOG 0, 0, 161, 145 STYLE DS_CENTER | DS_MODALFRAME | DS_SETFONT | WS_VISIBLE | WS_BORDER | WS_CAPTION | WS_DLGFRAME | WS_POPUP | WS_SYSMENU CAPTION "Configuration du firmware" FONT 8, "MS Sans Serif" -{ +BEGIN EDITTEXT IDC_EDIT1, 66, 14, 82, 14, WS_GROUP | ES_AUTOHSCROLL | ES_WANTRETURN EDITTEXT IDC_EDIT2, 66, 33, 82, 14, WS_GROUP | ES_AUTOHSCROLL | ES_WANTRETURN COMBOBOX IDC_COMBO1, 66, 53, 84, 14, WS_TABSTOP | WS_VSCROLL | WS_TABSTOP | CBS_DROPDOWN @@ -1355,7 +1324,7 @@ FONT 8, "MS Sans Serif" CONTROL "Langage:", IDC_STATIC, WC_STATIC, NOT WS_GROUP | SS_LEFTNOWORDWRAP, 9, 106, 52, 12 CONTROL "Pseudonyme:", IDC_STATIC, WC_STATIC, NOT WS_GROUP | SS_LEFTNOWORDWRAP, 9, 17, 52, 12 CONTROL "Message:", IDC_STATIC, WC_STATIC, NOT WS_GROUP | SS_LEFTNOWORDWRAP, 9, 36, 52, 12 -} +END @@ -1364,7 +1333,7 @@ IDD_GAME_INFO DIALOG 0, 0, 366, 406 STYLE DS_CENTER | DS_SETFONT | WS_VISIBLE | WS_BORDER | WS_CAPTION | WS_DLGFRAME | WS_SYSMENU CAPTION "ROM Information" FONT 8, "MS Sans Serif" -{ +BEGIN PUSHBUTTON "&Close", IDCANCEL, 310, 385, 50, 14, BS_PUSHBUTTON LTEXT "Game title :", IDC_STATIC, 190, 20, 95, 8, SS_LEFT LTEXT "", IDC_GI_GAMETITLE, 285, 20, 70, 8, SS_LEFT @@ -1422,7 +1391,7 @@ FONT 8, "MS Sans Serif" LTEXT "Spanish title :", IDC_STATIC, 15, 345, 65, 8, SS_LEFT LTEXT "", IDC_GI_TITLESP, 15, 360, 150, 35, SS_LEFT CONTROL "1", IDC_GI_ICON, "GInfo_IconBox", 0x50000000, 10, 15, 35, 30, 0x00000020 -} +END @@ -1431,7 +1400,7 @@ IDD_GAME_INFO DIALOG 0, 0, 366, 406 STYLE DS_CENTER | DS_SETFONT | WS_VISIBLE | WS_BORDER | WS_CAPTION | WS_DLGFRAME | WS_SYSMENU CAPTION "ROM Info" FONT 8, "MS Sans Serif" -{ +BEGIN PUSHBUTTON "&Close", IDCANCEL, 310, 385, 50, 14, BS_PUSHBUTTON LTEXT "Game title :", IDC_STATIC, 190, 20, 95, 8, SS_LEFT LTEXT "", IDC_GI_GAMETITLE, 285, 20, 70, 8, SS_LEFT @@ -1489,7 +1458,7 @@ FONT 8, "MS Sans Serif" LTEXT "Spanish title :", IDC_STATIC, 15, 345, 65, 8, SS_LEFT LTEXT "", IDC_GI_TITLESP, 15, 360, 150, 35, SS_LEFT CONTROL "1", IDC_GI_ICON, "GInfo_IconBox", 0x50000000, 10, 15, 35, 30, 0x00000020 -} +END @@ -1498,7 +1467,7 @@ IDD_GAME_INFO DIALOG 0, 0, 366, 406 STYLE DS_CENTER | DS_SETFONT | WS_VISIBLE | WS_BORDER | WS_CAPTION | WS_DLGFRAME | WS_SYSMENU CAPTION "Info ROM" FONT 8, "MS Sans Serif" -{ +BEGIN PUSHBUTTON "Fermer", IDCANCEL, 310, 385, 50, 14, BS_PUSHBUTTON LTEXT "Titre du jeu :", IDC_STATIC, 190, 20, 95, 8, SS_LEFT LTEXT "", IDC_GI_GAMETITLE, 285, 20, 70, 8, SS_LEFT @@ -1556,7 +1525,7 @@ FONT 8, "MS Sans Serif" LTEXT "Titre espagnol :", IDC_STATIC, 15, 345, 65, 8, SS_LEFT LTEXT "", IDC_GI_TITLESP, 15, 360, 150, 35, SS_LEFT CONTROL "1", IDC_GI_ICON, "GInfo_IconBox", 0x50000000, 10, 15, 35, 30, 0x00000020 -} +END @@ -1565,12 +1534,12 @@ IDD_GBASLOT DIALOGEX 0, 0, 316, 185 STYLE DS_3DLOOK | DS_CENTER | DS_MODALFRAME | DS_SHELLFONT | WS_VISIBLE | WS_BORDER | WS_CAPTION | WS_DLGFRAME | WS_POPUP CAPTION "GBA slot" FONT 8, "MS Shell Dlg", 400, 0, 1 -{ +BEGIN COMBOBOX IDC_ADDONS_LIST, 7, 7, 302, 30, WS_TABSTOP | WS_VSCROLL | WS_TABSTOP | CBS_DROPDOWNLIST DEFPUSHBUTTON "OK", IDOK, 205, 164, 50, 14, WS_DISABLED | BS_DEFPUSHBUTTON PUSHBUTTON "Cancel", IDCANCEL, 259, 164, 50, 14, BS_PUSHBUTTON CTEXT "Info", IDC_ADDONS_INFO, 7, 21, 302, 23, SS_CENTER -} +END @@ -1578,7 +1547,7 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US IDD_GBASLOT_CFLASH DIALOGEX 7, 48, 302, 109 STYLE DS_SHELLFONT | WS_VISIBLE | WS_CHILDWINDOW | WS_SYSMENU FONT 8, "MS Shell Dlg", 400, 0, 1 -{ +BEGIN AUTORADIOBUTTON "file", IDC_RFILE, 16, 26, 25, 10, WS_GROUP | WS_TABSTOP | BS_AUTORADIOBUTTON AUTORADIOBUTTON "folder", IDC_RFOLDER, 16, 56, 35, 10, WS_TABSTOP | BS_AUTORADIOBUTTON EDITTEXT IDC_PATHIMG, 14, 39, 223, 14, ES_AUTOHSCROLL | ES_READONLY @@ -1588,7 +1557,7 @@ FONT 8, "MS Shell Dlg", 400, 0, 1 AUTOCHECKBOX "use rom folder", IDC_PATHDESMUME, 43, 82, 62, 10, BS_AUTOCHECKBOX CTEXT "Select file name or folder for Compact Flash image:", IDC_STATIC, 7, 7, 288, 14, SS_CENTER GROUPBOX "", IDC_STATIC, 7, 19, 288, 75 -} +END @@ -1596,11 +1565,11 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US IDD_GBASLOT_GBAGAME DIALOGEX 7, 48, 302, 109 STYLE DS_SHELLFONT | WS_VISIBLE | WS_CHILDWINDOW | WS_SYSMENU FONT 8, "MS Shell Dlg", 400, 0, 1 -{ +BEGIN EDITTEXT IDC_PATHGAME, 7, 34, 236, 14, ES_AUTOHSCROLL | ES_READONLY PUSHBUTTON "Browse...", IDC_BBROWSE, 245, 33, 50, 14, BS_PUSHBUTTON CTEXT "Select file name for GBA game rom:\n(Please make save file matching name with extension .sav)", IDC_STATIC, 7, 7, 288, 21, SS_CENTER -} +END @@ -1608,8 +1577,8 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US IDD_GBASLOT_NONE DIALOGEX 7, 48, 302, 110 STYLE DS_SHELLFONT | WS_VISIBLE | WS_CHILDWINDOW | WS_SYSMENU FONT 8, "MS Shell Dlg", 400, 0, 1 -{ -} +BEGIN +END @@ -1617,9 +1586,9 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US IDD_GBASLOT_RUMBLEPAK DIALOGEX 7, 48, 302, 109 STYLE DS_SHELLFONT | WS_VISIBLE | WS_CHILDWINDOW | WS_SYSMENU FONT 8, "MS Shell Dlg", 400, 0, 1 -{ +BEGIN CTEXT "TODO", IDC_STATIC, 7, 7, 288, 26, SS_CENTER -} +END @@ -1628,7 +1597,7 @@ IDD_INPUT DIALOGEX 0, 0, 325, 148 STYLE DS_CENTER | DS_MODALFRAME | DS_SHELLFONT | WS_BORDER | WS_CAPTION | WS_DLGFRAME | WS_POPUP | WS_SYSMENU CAPTION "Configure controls" FONT 8, "MS Shell Dlg", 400, 0, 1 -{ +BEGIN EDITTEXT IDC_EDIT01, 32, 69, 26, 14, ES_CENTER | ES_AUTOHSCROLL | ES_READONLY | ES_WANTRETURN EDITTEXT IDC_EDIT02, 7, 83, 26, 14, ES_CENTER | ES_AUTOHSCROLL | ES_READONLY EDITTEXT IDC_EDIT03, 57, 83, 26, 14, ES_CENTER | ES_AUTOHSCROLL | ES_READONLY @@ -1664,7 +1633,7 @@ FONT 8, "MS Shell Dlg", 400, 0, 1 LTEXT "open/close lid", IDC_STATIC, 36, 129, 44, 8, SS_LEFT CONTROL "", IDC_STATIC, WC_STATIC, SS_ETCHEDFRAME, 95, 41, 141, 77 LTEXT "debug", IDC_STATIC, 123, 129, 21, 8, WS_DISABLED | SS_LEFT -} +END @@ -1673,7 +1642,7 @@ IDD_INPUTCONFIG DIALOGEX 0, 0, 339, 148 STYLE DS_MODALFRAME | DS_SHELLFONT | WS_BORDER | WS_CAPTION | WS_DLGFRAME | WS_POPUP | WS_SYSMENU CAPTION "Control Config" FONT 8, "MS Shell Dlg", 400, 0, 1 -{ +BEGIN CONTROL "WOG!", IDC_UP, "InputCustom", 0x50010000, 52, 15, 71, 12, 0x00000200 CONTROL "", IDC_LEFT, "InputCustom", 0x50010000, 52, 29, 71, 12, 0x00000200 CONTROL "", IDC_DOWN, "InputCustom", 0x50010000, 52, 42, 71, 12, 0x00000200 @@ -1715,7 +1684,7 @@ FONT 8, "MS Shell Dlg", 400, 0, 1 RTEXT "LID", IDC_LABEL_X2, 8, 121, 39, 8, SS_RIGHT RTEXT "DEBUG", IDC_LABEL_X3, 127, 123, 29, 8, SS_RIGHT CONTROL " ", IDC_DEBUG, "InputCustom", 0x58010000, 163, 120, 71, 12, 0x00000200 -} +END @@ -1724,7 +1693,7 @@ IDD_IO_REG DIALOGEX 0, 0, 150, 200 STYLE DS_CENTER | DS_SETFONT | WS_BORDER | WS_CAPTION | WS_DLGFRAME CAPTION "IO registers" FONT 8, "MS Sans Serif", 0, 0, 1 -{ +BEGIN LTEXT "Int Handler :", IDC_STATIC, 5, 13, 41, 8, SS_LEFT LTEXT "", IDC_INTHAND9, 60, 14, 80, 8, SS_LEFT LTEXT "IE :", IDC_STATIC, 5, 21, 41, 8, SS_LEFT @@ -1764,7 +1733,7 @@ FONT 8, "MS Sans Serif", 0, 0, 1 LTEXT "", IDC_IPCSYNC7, 60, 138, 78, 8, SS_LEFT LTEXT "IPCFIFO :", IDC_STATIC, 5, 146, 41, 8, SS_LEFT LTEXT "", IDC_IPCFIFO7, 60, 147, 79, 8, SS_LEFT -} +END @@ -1773,7 +1742,7 @@ IDD_IO_REG DIALOGEX 0, 0, 150, 200 STYLE DS_CENTER | DS_SETFONT | WS_BORDER | WS_CAPTION | WS_DLGFRAME CAPTION "IO registers" FONT 8, "MS Sans Serif", 0, 0, 1 -{ +BEGIN LTEXT "Int Handler :", IDC_STATIC, 5, 13, 41, 8, SS_LEFT LTEXT "", IDC_INTHAND9, 60, 14, 80, 8, SS_LEFT LTEXT "IE :", IDC_STATIC, 5, 21, 41, 8, SS_LEFT @@ -1813,7 +1782,7 @@ FONT 8, "MS Sans Serif", 0, 0, 1 LTEXT "", IDC_IPCSYNC7, 60, 138, 78, 8, SS_LEFT LTEXT "IPCFIFO :", IDC_STATIC, 5, 146, 41, 8, SS_LEFT LTEXT "", IDC_IPCFIFO7, 60, 147, 79, 8, SS_LEFT -} +END @@ -1822,7 +1791,7 @@ IDD_IO_REG DIALOGEX 0, 0, 150, 200 STYLE DS_CENTER | DS_SETFONT | WS_BORDER | WS_CAPTION | WS_DLGFRAME CAPTION "IO registre" FONT 8, "MS Sans Serif", 0, 0, 1 -{ +BEGIN LTEXT "Int Handler :", IDC_STATIC, 5, 13, 41, 8, SS_LEFT LTEXT "", IDC_INTHAND9, 60, 14, 80, 8, SS_LEFT LTEXT "IE :", IDC_STATIC, 5, 21, 41, 8, SS_LEFT @@ -1862,7 +1831,7 @@ FONT 8, "MS Sans Serif", 0, 0, 1 LTEXT "", IDC_IPCSYNC7, 60, 138, 78, 8, SS_LEFT LTEXT "IPCFIFO :", IDC_STATIC, 5, 146, 41, 8, SS_LEFT LTEXT "", IDC_IPCFIFO7, 60, 147, 79, 8, SS_LEFT -} +END @@ -1871,7 +1840,7 @@ IDD_KEYCUSTOM DIALOGEX 0, 0, 382, 180 STYLE DS_3DLOOK | DS_CENTER | DS_MODALFRAME | DS_SETFONT | WS_BORDER | WS_CAPTION | WS_CLIPCHILDREN | WS_DLGFRAME | WS_POPUP CAPTION "Customize Special Keys" FONT 8, "MS Sans Serif", 0, 0, 1 -{ +BEGIN PUSHBUTTON "OK", IDOK, 16, 159, 50, 14, BS_PUSHBUTTON PUSHBUTTON "Cancel", IDCANCEL, 66, 159, 50, 14, BS_PUSHBUTTON RTEXT "Item #01", IDC_LABEL_HK1, 2, 7, 80, 8, SS_RIGHT @@ -1916,7 +1885,7 @@ FONT 8, "MS Sans Serif", 0, 0, 1 CONTROL "", IDC_HOTKEY20, "InputCustomHot", 0x50010000, 276, 122, 98, 12, 0x00000200 LTEXT "Blue means the hotkey is already mapped.\nPink means it conflicts with a game button.\nRed means it's reserved by Windows.\nA hotkey can be disabled using Escape.", IDC_LABEL_BLUE, 238, 140, 136, 32, SS_LEFT COMBOBOX IDC_HKCOMBO, 16, 141, 168, 60, WS_TABSTOP | WS_VSCROLL | WS_TABSTOP | CBS_DROPDOWNLIST -} +END @@ -1925,7 +1894,7 @@ IDD_LIGHT_VIEWER DIALOGEX 0, 0, 197, 89 STYLE DS_CENTER | DS_SHELLFONT | WS_BORDER | WS_CAPTION | WS_DLGFRAME CAPTION "Light Viewer" FONT 8, "MS Shell Dlg", 400, 0, 1 -{ +BEGIN DEFPUSHBUTTON "OK", IDOK, 140, 68, 50, 14, BS_DEFPUSHBUTTON GROUPBOX "Light0", IDC_LIGHT_VIWER_LIGHT0_GROUP, 7, 7, 90, 27 EDITTEXT IDC_LIGHT_VIEWER_LIGHT0VECTOR_EDIT, 58, 16, 35, 14, WS_GROUP | ES_AUTOHSCROLL | ES_READONLY @@ -1947,7 +1916,7 @@ FONT 8, "MS Shell Dlg", 400, 0, 1 EDITTEXT IDC_AUTO_UPDATE_SECS, 68, 67, 12, 14, WS_DISABLED | ES_AUTOHSCROLL | ES_READONLY CONTROL "", IDC_AUTO_UPDATE_SPIN, UPDOWN_CLASS, WS_DISABLED | UDS_ARROWKEYS | UDS_AUTOBUDDY | UDS_SETBUDDYINT, 80, 67, 11, 14 LTEXT "frames", IDC_STATIC, 92, 70, 16, 8, SS_LEFT -} +END @@ -1956,7 +1925,7 @@ IDD_MAP DIALOGEX 0, 0, 485, 320 STYLE DS_CENTER | DS_SETFONT | WS_BORDER | WS_CAPTION | WS_DLGFRAME CAPTION "MAP Fremviser" FONT 8, "MS Sans Serif", 0, 0, 1 -{ +BEGIN COMBOBOX IDC_BG_SELECT, 4, 4, 90, 14, WS_TABSTOP | WS_TABSTOP | CBS_DROPDOWN LTEXT "Mode :", IDC_STATIC, 4, 20, 45, 8, SS_LEFT LTEXT "Palette :", IDC_STATIC, 4, 30, 45, 8, SS_LEFT @@ -1977,7 +1946,7 @@ FONT 8, "MS Sans Serif", 0, 0, 1 EDITTEXT IDC_AUTO_UPDATE_SECS, 59, 93, 12, 14, WS_DISABLED | ES_AUTOHSCROLL | ES_READONLY CONTROL "", IDC_AUTO_UPDATE_SPIN, UPDOWN_CLASS, WS_DISABLED | UDS_ARROWKEYS | UDS_AUTOBUDDY | UDS_SETBUDDYINT, 71, 93, 11, 14 LTEXT "frames", IDC_STATIC, 83, 96, 16, 8, SS_LEFT -} +END @@ -1986,7 +1955,7 @@ IDD_MAP DIALOGEX 0, 0, 485, 320 STYLE DS_CENTER | DS_SETFONT | WS_BORDER | WS_CAPTION | WS_DLGFRAME CAPTION "MAP VIEW" FONT 8, "MS Sans Serif", 0, 0, 1 -{ +BEGIN COMBOBOX IDC_BG_SELECT, 4, 4, 90, 14, WS_TABSTOP | WS_TABSTOP | CBS_DROPDOWN LTEXT "Mode :", IDC_STATIC, 4, 20, 45, 8, SS_LEFT LTEXT "Palette :", IDC_STATIC, 4, 30, 45, 8, SS_LEFT @@ -2009,7 +1978,7 @@ FONT 8, "MS Sans Serif", 0, 0, 1 LTEXT "frames", IDC_STATIC, 83, 106, 16, 8, SS_LEFT LTEXT "Visible :", IDC_STATIC, 4, 50, 38, 8, SS_LEFT LTEXT "CHAR", IDC_CHAR, 47, 63, 85, 8, SS_LEFT -} +END @@ -2018,7 +1987,7 @@ IDD_MAP DIALOGEX 0, 0, 485, 320 STYLE DS_CENTER | DS_SETFONT | WS_BORDER | WS_CAPTION | WS_DLGFRAME CAPTION "MAP VIEW" FONT 8, "MS Sans Serif", 0, 0, 1 -{ +BEGIN COMBOBOX IDC_BG_SELECT, 4, 4, 90, 14, WS_TABSTOP | WS_TABSTOP | CBS_DROPDOWN LTEXT "Mode :", IDC_STATIC, 4, 20, 45, 8, SS_LEFT LTEXT "Palette :", IDC_STATIC, 4, 30, 45, 8, SS_LEFT @@ -2039,7 +2008,7 @@ FONT 8, "MS Sans Serif", 0, 0, 1 EDITTEXT IDC_AUTO_UPDATE_SECS, 59, 93, 12, 14, WS_DISABLED | ES_AUTOHSCROLL | ES_READONLY CONTROL "", IDC_AUTO_UPDATE_SPIN, UPDOWN_CLASS, WS_DISABLED | UDS_ARROWKEYS | UDS_AUTOBUDDY | UDS_SETBUDDYINT, 71, 93, 11, 14 LTEXT "frames", IDC_STATIC, 83, 96, 16, 8, SS_LEFT -} +END @@ -2048,7 +2017,7 @@ IDD_MATRIX_VIEWER DIALOGEX 0, 0, 364, 177 STYLE DS_CENTER | DS_SHELLFONT | WS_BORDER | WS_CAPTION | WS_DLGFRAME CAPTION "Matrix Viewer" FONT 8, "MS Shell Dlg", 400, 0, 1 -{ +BEGIN DEFPUSHBUTTON "OK", IDOK, 307, 156, 50, 14, BS_DEFPUSHBUTTON GROUPBOX "Projection", IDC_MATRIX_VIEWER_PROJ_GROUP, 7, 86, 173, 65 EDITTEXT IDC_MATRIX_VIEWER_PROJ_11_EDIT, 11, 95, 40, 12, ES_AUTOHSCROLL | ES_READONLY @@ -2124,31 +2093,150 @@ FONT 8, "MS Shell Dlg", 400, 0, 1 EDITTEXT IDC_AUTO_UPDATE_SECS, 68, 155, 12, 14, WS_DISABLED | ES_AUTOHSCROLL | ES_READONLY CONTROL "", IDC_AUTO_UPDATE_SPIN, UPDOWN_CLASS, WS_DISABLED | UDS_ARROWKEYS | UDS_AUTOBUDDY | UDS_SETBUDDYINT, 80, 155, 11, 14 LTEXT "frames", IDC_STATIC, 92, 158, 16, 8, SS_LEFT -} +END + + + +LANGUAGE LANG_DANISH, SUBLANG_DANISH_DENMARK +IDD_MEM_VIEWER7 DIALOGEX 0, 0, 428, 178 +STYLE DS_CENTER | DS_SETFONT | WS_BORDER | WS_CAPTION | WS_DLGFRAME +CAPTION "Vis Hukommelse" +FONT 8, "MS Sans Serif", 0, 0, 1 +BEGIN + AUTORADIOBUTTON "8 bit", IDC_8_BIT, 10, 4, 29, 10, WS_GROUP | WS_TABSTOP | BS_AUTORADIOBUTTON + AUTORADIOBUTTON "16 bit", IDC_16_BIT, 44, 4, 33, 10, WS_TABSTOP | BS_AUTORADIOBUTTON + AUTORADIOBUTTON "32 bit", IDC_32_BIT, 82, 4, 33, 10, WS_TABSTOP | BS_AUTORADIOBUTTON + LTEXT "Gå Til:", IDC_STATIC, 130, 4, 33, 10, SS_LEFT + EDITTEXT IDC_GOTOMEM, 155, 1, 82, 14, WS_GROUP | ES_AUTOHSCROLL | ES_UPPERCASE | ES_WANTRETURN + PUSHBUTTON "&Start", IDC_GO, 240, 1, 20, 14, BS_PUSHBUTTON + CONTROL "Rediger", IDC_MEM_BOX, "MemViewBox7", 0x50210000, 4, 16, 424, 142, 0x00000200 + PUSHBUTTON "&Luk", IDC_FERMER, 185, 162, 50, 14, BS_PUSHBUTTON + AUTOCHECKBOX "&Auto-update", IDC_AUTO_UPDATE, 327, 1, 54, 14, BS_AUTOCHECKBOX + EDITTEXT IDC_AUTO_UPDATE_SECS, 382, 2, 12, 14, WS_DISABLED | ES_AUTOHSCROLL | ES_READONLY + CONTROL "", IDC_AUTO_UPDATE_SPIN, UPDOWN_CLASS, WS_DISABLED | UDS_ARROWKEYS | UDS_AUTOBUDDY | UDS_SETBUDDYINT, 394, 2, 11, 14 + LTEXT "frames", IDC_STATIC, 406, 5, 16, 8, SS_LEFT +END + + LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US -IDD_MICROPHONE DIALOG 0, 0, 241, 111 -STYLE DS_SHELLFONT | WS_BORDER | WS_CAPTION | WS_DLGFRAME | WS_SYSMENU -CAPTION "Microphone Simulation Settings" -FONT 8, "MS Sans Serif" -{ - DEFPUSHBUTTON "OK", IDOK, 130, 91, 50, 14, BS_DEFPUSHBUTTON - PUSHBUTTON "Cancel", IDCANCEL, 185, 91, 50, 14, BS_PUSHBUTTON - GROUPBOX "Microphone Sample", IDC_STATIC, 5, 6, 230, 75 - AUTOCHECKBOX "Use Microphone Sample", IDC_USEMICSAMPLE, 15, 21, 110, 10, BS_AUTOCHECKBOX - LTEXT "Sample:", IDC_STATIC, 15, 36, 110, 8, SS_LEFT - EDITTEXT IDC_MICSAMPLE, 15, 46, 190, 14, ES_AUTOHSCROLL - PUSHBUTTON "...", IDC_MICSAMPLEBROWSE, 205, 46, 20, 14, BS_PUSHBUTTON -} +IDD_MEM_VIEWER7 DIALOGEX 0, 0, 428, 178 +STYLE DS_CENTER | DS_MODALFRAME | DS_SHELLFONT | WS_VISIBLE | WS_BORDER | WS_CAPTION | WS_DLGFRAME | WS_POPUP +CAPTION "View Memory" +FONT 8, "MS Sans Serif", 400, 0, 0 +BEGIN + AUTORADIOBUTTON "8 bit", IDC_8_BIT, 10, 4, 29, 10, WS_GROUP | WS_TABSTOP | BS_AUTORADIOBUTTON + AUTORADIOBUTTON "16 bit", IDC_16_BIT, 44, 4, 33, 10, WS_TABSTOP | BS_AUTORADIOBUTTON + AUTORADIOBUTTON "32 bit", IDC_32_BIT, 82, 4, 33, 10, WS_TABSTOP | BS_AUTORADIOBUTTON + LTEXT "Go to:", IDC_STATIC, 130, 4, 33, 10, SS_LEFT + EDITTEXT IDC_GOTOMEM, 155, 1, 82, 14, WS_GROUP | ES_AUTOHSCROLL | ES_UPPERCASE | ES_WANTRETURN + PUSHBUTTON "&GO", IDC_GO, 240, 1, 20, 14, BS_PUSHBUTTON + PUSHBUTTON "&Close", IDC_FERMER, 185, 162, 50, 14, BS_PUSHBUTTON + CONTROL "Rediger", IDC_MEM_BOX, "MemViewBox7", 0x50210000, 4, 16, 424, 142, 0x00000200 + AUTOCHECKBOX "&Auto-update", IDC_AUTO_UPDATE, 327, 1, 54, 14, BS_AUTOCHECKBOX + EDITTEXT IDC_AUTO_UPDATE_SECS, 382, 2, 12, 14, WS_DISABLED | ES_AUTOHSCROLL | ES_READONLY + CONTROL "", IDC_AUTO_UPDATE_SPIN, UPDOWN_CLASS, WS_DISABLED | UDS_ARROWKEYS | UDS_AUTOBUDDY | UDS_SETBUDDYINT, 394, 2, 11, 14 + LTEXT "frames", IDC_STATIC, 406, 5, 16, 8, SS_LEFT +END + + + +LANGUAGE LANG_FRENCH, SUBLANG_FRENCH +IDD_MEM_VIEWER7 DIALOGEX 0, 0, 428, 178 +STYLE DS_CENTER | DS_SETFONT | WS_BORDER | WS_CAPTION | WS_DLGFRAME +CAPTION "Visualisation de la memoire" +FONT 8, "MS Sans Serif", 0, 0, 1 +BEGIN + AUTORADIOBUTTON "8 bit", IDC_8_BIT, 10, 4, 29, 10, WS_GROUP | WS_TABSTOP | BS_AUTORADIOBUTTON + AUTORADIOBUTTON "16 bit", IDC_16_BIT, 44, 4, 33, 10, WS_TABSTOP | BS_AUTORADIOBUTTON + AUTORADIOBUTTON "32 bit", IDC_32_BIT, 82, 4, 33, 10, WS_TABSTOP | BS_AUTORADIOBUTTON + LTEXT "Aller E:", IDC_STATIC, 130, 4, 33, 10, SS_LEFT + EDITTEXT IDC_GOTOMEM, 155, 1, 82, 14, WS_GROUP | ES_AUTOHSCROLL | ES_UPPERCASE | ES_WANTRETURN + PUSHBUTTON "&GO", IDC_GO, 240, 1, 20, 14, BS_PUSHBUTTON + CONTROL "Edit", IDC_MEM_BOX, "MemViewBox7", 0x50210000, 4, 16, 424, 142, 0x00000200 + PUSHBUTTON "&Fermer", IDC_FERMER, 185, 162, 50, 14, BS_PUSHBUTTON + AUTOCHECKBOX "&Auto-update", IDC_AUTO_UPDATE, 327, 1, 54, 14, BS_AUTOCHECKBOX + EDITTEXT IDC_AUTO_UPDATE_SECS, 382, 2, 12, 14, WS_DISABLED | ES_AUTOHSCROLL | ES_READONLY + CONTROL "", IDC_AUTO_UPDATE_SPIN, UPDOWN_CLASS, WS_DISABLED | UDS_ARROWKEYS | UDS_AUTOBUDDY | UDS_SETBUDDYINT, 394, 2, 11, 14 + LTEXT "frames", IDC_STATIC, 406, 5, 16, 8, SS_LEFT +END + + + +LANGUAGE LANG_DANISH, SUBLANG_DANISH_DENMARK +IDD_MEM_VIEWER9 DIALOGEX 0, 0, 428, 178 +STYLE DS_CENTER | DS_SETFONT | WS_BORDER | WS_CAPTION | WS_DLGFRAME +CAPTION "Vis Hukommelse" +FONT 8, "MS Sans Serif", 0, 0, 1 +BEGIN + AUTORADIOBUTTON "8 bit", IDC_8_BIT, 10, 4, 29, 10, WS_GROUP | WS_TABSTOP | BS_AUTORADIOBUTTON + AUTORADIOBUTTON "16 bit", IDC_16_BIT, 44, 4, 33, 10, WS_TABSTOP | BS_AUTORADIOBUTTON + AUTORADIOBUTTON "32 bit", IDC_32_BIT, 82, 4, 33, 10, WS_TABSTOP | BS_AUTORADIOBUTTON + LTEXT "Gå Til:", IDC_STATIC, 130, 4, 33, 10, SS_LEFT + EDITTEXT IDC_GOTOMEM, 155, 1, 82, 14, WS_GROUP | ES_AUTOHSCROLL | ES_UPPERCASE | ES_WANTRETURN + PUSHBUTTON "&Start", IDC_GO, 240, 1, 20, 14, BS_PUSHBUTTON + CONTROL "Rediger", IDC_MEM_BOX, "MemViewBox9", 0x50210000, 4, 16, 424, 142, 0x00000200 + PUSHBUTTON "&Luk", IDC_FERMER, 185, 162, 50, 14, BS_PUSHBUTTON + AUTOCHECKBOX "&Auto-update", IDC_AUTO_UPDATE, 327, 1, 54, 14, BS_AUTOCHECKBOX + EDITTEXT IDC_AUTO_UPDATE_SECS, 382, 2, 12, 14, WS_DISABLED | ES_AUTOHSCROLL | ES_READONLY + CONTROL "", IDC_AUTO_UPDATE_SPIN, UPDOWN_CLASS, WS_DISABLED | UDS_ARROWKEYS | UDS_AUTOBUDDY | UDS_SETBUDDYINT, 394, 2, 11, 14 + LTEXT "frames", IDC_STATIC, 406, 5, 16, 8, SS_LEFT +END + + + +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US +IDD_MEM_VIEWER9 DIALOGEX 0, 0, 428, 178 +STYLE DS_CENTER | DS_MODALFRAME | DS_SHELLFONT | WS_VISIBLE | WS_BORDER | WS_CAPTION | WS_DLGFRAME | WS_POPUP +CAPTION "View Memory" +FONT 8, "MS Shell Dlg", 0, 0, 1 +BEGIN + AUTORADIOBUTTON "8 bit", IDC_8_BIT, 10, 4, 29, 10, WS_GROUP | WS_TABSTOP | BS_AUTORADIOBUTTON + AUTORADIOBUTTON "16 bit", IDC_16_BIT, 44, 4, 33, 10, WS_TABSTOP | BS_AUTORADIOBUTTON + AUTORADIOBUTTON "32 bit", IDC_32_BIT, 82, 4, 33, 10, WS_TABSTOP | BS_AUTORADIOBUTTON + LTEXT "Go to:", IDC_STATIC, 130, 4, 33, 10, SS_LEFT + EDITTEXT IDC_GOTOMEM, 155, 1, 82, 14, WS_GROUP | ES_AUTOHSCROLL | ES_UPPERCASE | ES_WANTRETURN + PUSHBUTTON "&GO", IDC_GO, 240, 1, 20, 14, BS_PUSHBUTTON + PUSHBUTTON "&Close", IDC_FERMER, 185, 162, 50, 14, BS_PUSHBUTTON + CONTROL "Rediger", IDC_MEM_BOX, "MemViewBox9", 0x50210000, 4, 16, 424, 142, 0x00000200 + AUTOCHECKBOX "&Auto-update", IDC_AUTO_UPDATE, 327, 1, 54, 14, BS_AUTOCHECKBOX + EDITTEXT IDC_AUTO_UPDATE_SECS, 382, 2, 12, 14, WS_DISABLED | ES_AUTOHSCROLL | ES_READONLY + CONTROL "", IDC_AUTO_UPDATE_SPIN, UPDOWN_CLASS, WS_DISABLED | UDS_ARROWKEYS | UDS_AUTOBUDDY | UDS_SETBUDDYINT, 394, 2, 11, 14 + LTEXT "frames", IDC_STATIC, 406, 5, 16, 8, SS_LEFT +END + + + +LANGUAGE LANG_FRENCH, SUBLANG_FRENCH +IDD_MEM_VIEWER9 DIALOGEX 0, 0, 428, 178 +STYLE DS_CENTER | DS_SETFONT | WS_BORDER | WS_CAPTION | WS_DLGFRAME +CAPTION "Visualisation de la memoire" +FONT 8, "MS Sans Serif", 0, 0, 1 +BEGIN + AUTORADIOBUTTON "8 bit", IDC_8_BIT, 10, 4, 29, 10, WS_GROUP | WS_TABSTOP | BS_AUTORADIOBUTTON + AUTORADIOBUTTON "16 bit", IDC_16_BIT, 44, 4, 33, 10, WS_TABSTOP | BS_AUTORADIOBUTTON + AUTORADIOBUTTON "32 bit", IDC_32_BIT, 82, 4, 33, 10, WS_TABSTOP | BS_AUTORADIOBUTTON + LTEXT "Aller E:", IDC_STATIC, 130, 4, 33, 10, SS_LEFT + EDITTEXT IDC_GOTOMEM, 155, 1, 82, 14, WS_GROUP | ES_AUTOHSCROLL | ES_UPPERCASE | ES_WANTRETURN + PUSHBUTTON "&GO", IDC_GO, 240, 1, 20, 14, BS_PUSHBUTTON + CONTROL "Edit", IDC_MEM_BOX, "MemViewBox9", 0x50210000, 4, 16, 424, 142, 0x00000200 + PUSHBUTTON "&Fermer", IDC_FERMER, 185, 162, 50, 14, BS_PUSHBUTTON + AUTOCHECKBOX "&Auto-update", IDC_AUTO_UPDATE, 327, 1, 54, 14, BS_AUTOCHECKBOX + EDITTEXT IDC_AUTO_UPDATE_SECS, 382, 2, 12, 14, WS_DISABLED | ES_AUTOHSCROLL | ES_READONLY + CONTROL "", IDC_AUTO_UPDATE_SPIN, UPDOWN_CLASS, WS_DISABLED | UDS_ARROWKEYS | UDS_AUTOBUDDY | UDS_SETBUDDYINT, 394, 2, 11, 14 + LTEXT "frames", IDC_STATIC, 406, 5, 16, 8, SS_LEFT +END + + LANGUAGE LANG_DANISH, SUBLANG_DANISH_DENMARK IDD_OAM DIALOGEX 0, 0, 300, 200 STYLE DS_SETFONT | WS_BORDER | WS_CAPTION | WS_DLGFRAME | WS_SYSMENU CAPTION "OAM Fremviser" FONT 8, "MS Sans Serif", 0, 0, 1 -{ - COMBOBOX IDC_SCR_SELECT, 4, 4, 90, 14, WS_TABSTOP | WS_TABSTOP | CBS_DROPDOWNLIST - SCROLLBAR IDC_SCROLLER, 48, 20, 20, 14, WS_VISIBLE +BEGIN + COMBOBOX IDC_SCR_SELECT, 4, 4, 90, 14, WS_TABSTOP | WS_TABSTOP | CBS_DROPDOWN + SCROLLBAR IDC_SCROLLER, 48, 20, 20, 14, NOT WS_VISIBLE LTEXT "Mode :", IDC_STATIC, 4, 36, 45, 8, SS_LEFT LTEXT "Tile :", IDC_STATIC, 4, 46, 45, 8, SS_LEFT LTEXT "Palette :", IDC_STATIC, 4, 56, 45, 8, SS_LEFT @@ -2173,7 +2261,7 @@ FONT 8, "MS Sans Serif", 0, 0, 1 EDITTEXT IDC_AUTO_UPDATE_SECS, 59, 162, 12, 14, WS_DISABLED | ES_AUTOHSCROLL | ES_READONLY CONTROL "", IDC_AUTO_UPDATE_SPIN, UPDOWN_CLASS, WS_DISABLED | UDS_ARROWKEYS | UDS_AUTOBUDDY | UDS_SETBUDDYINT, 71, 161, 11, 14 LTEXT "frames", IDC_STATIC, 83, 163, 16, 8, SS_LEFT -} +END @@ -2182,9 +2270,9 @@ IDD_OAM DIALOGEX 0, 0, 300, 200 STYLE DS_CENTER | DS_SETFONT | WS_BORDER | WS_CAPTION | WS_DLGFRAME CAPTION "OAM Viewer" FONT 8, "MS Sans Serif", 0, 0, 1 -{ - COMBOBOX IDC_SCR_SELECT, 4, 4, 90, 14, WS_TABSTOP | WS_TABSTOP | CBS_DROPDOWNLIST - SCROLLBAR IDC_SCROLLER, 48, 20, 20, 14, WS_VISIBLE +BEGIN + COMBOBOX IDC_SCR_SELECT, 4, 4, 90, 14, WS_TABSTOP | WS_TABSTOP | CBS_DROPDOWN + SCROLLBAR IDC_SCROLLER, 48, 20, 20, 14, NOT WS_VISIBLE LTEXT "Mode :", IDC_STATIC, 4, 36, 45, 8, SS_LEFT LTEXT "Tile :", IDC_STATIC, 4, 46, 45, 8, SS_LEFT LTEXT "Palette :", IDC_STATIC, 4, 56, 45, 8, SS_LEFT @@ -2209,7 +2297,7 @@ FONT 8, "MS Sans Serif", 0, 0, 1 EDITTEXT IDC_AUTO_UPDATE_SECS, 59, 162, 12, 14, WS_DISABLED | ES_AUTOHSCROLL | ES_READONLY CONTROL "", IDC_AUTO_UPDATE_SPIN, UPDOWN_CLASS, WS_DISABLED | UDS_ARROWKEYS | UDS_AUTOBUDDY | UDS_SETBUDDYINT, 71, 161, 11, 14 LTEXT "frames", IDC_STATIC, 83, 163, 16, 8, SS_LEFT -} +END @@ -2218,9 +2306,9 @@ IDD_OAM DIALOGEX 0, 0, 300, 200 STYLE DS_SETFONT | WS_BORDER | WS_CAPTION | WS_DLGFRAME | WS_SYSMENU CAPTION "OAM Viewer" FONT 8, "MS Sans Serif", 0, 0, 1 -{ - COMBOBOX IDC_SCR_SELECT, 4, 4, 90, 14, WS_TABSTOP | WS_TABSTOP | CBS_DROPDOWNLIST - SCROLLBAR IDC_SCROLLER, 48, 20, 20, 14, WS_VISIBLE +BEGIN + COMBOBOX IDC_SCR_SELECT, 4, 4, 90, 14, WS_TABSTOP | WS_TABSTOP | CBS_DROPDOWN + SCROLLBAR IDC_SCROLLER, 48, 20, 20, 14, NOT WS_VISIBLE LTEXT "Mode :", IDC_STATIC, 4, 36, 45, 8, SS_LEFT LTEXT "Tile :", IDC_STATIC, 4, 46, 45, 8, SS_LEFT LTEXT "Palette :", IDC_STATIC, 4, 56, 45, 8, SS_LEFT @@ -2245,7 +2333,7 @@ FONT 8, "MS Sans Serif", 0, 0, 1 EDITTEXT IDC_AUTO_UPDATE_SECS, 59, 162, 12, 14, WS_DISABLED | ES_AUTOHSCROLL | ES_READONLY CONTROL "", IDC_AUTO_UPDATE_SPIN, UPDOWN_CLASS, WS_DISABLED | UDS_ARROWKEYS | UDS_AUTOBUDDY | UDS_SETBUDDYINT, 71, 161, 11, 14 LTEXT "frames", IDC_STATIC, 83, 163, 16, 8, SS_LEFT -} +END @@ -2254,16 +2342,16 @@ IDD_PAL DIALOGEX 0, 0, 120, 190 STYLE DS_SETFONT | WS_BORDER | WS_CAPTION | WS_DLGFRAME | WS_SYSMENU CAPTION "Palette Fremvisning" FONT 8, "MS Sans Serif", 0, 0, 1 -{ +BEGIN COMBOBOX IDC_PAL_SELECT, 15, 3, 90, 14, WS_TABSTOP | WS_TABSTOP | CBS_DROPDOWN LTEXT "Pal : 0", IDC_PALNUM, 3, 21, 25, 8, SS_LEFT - SCROLLBAR IDC_SCROLLER, 30, 18, 20, 14, WS_VISIBLE + SCROLLBAR IDC_SCROLLER, 30, 18, 20, 14, NOT WS_VISIBLE PUSHBUTTON "&Luk", IDC_FERMER, 35, 169, 50, 14, BS_PUSHBUTTON AUTOCHECKBOX "&Auto-update", IDC_AUTO_UPDATE, 13, 150, 54, 14, BS_AUTOCHECKBOX EDITTEXT IDC_AUTO_UPDATE_SECS, 68, 151, 12, 14, WS_DISABLED | ES_AUTOHSCROLL | ES_READONLY CONTROL "", IDC_AUTO_UPDATE_SPIN, UPDOWN_CLASS, WS_DISABLED | UDS_ARROWKEYS | UDS_AUTOBUDDY | UDS_SETBUDDYINT, 80, 151, 11, 14 LTEXT "frames", IDC_STATIC, 92, 154, 16, 8, SS_LEFT -} +END @@ -2272,16 +2360,16 @@ IDD_PAL DIALOGEX 0, 0, 120, 184 STYLE DS_CENTER | DS_SETFONT | WS_BORDER | WS_CAPTION | WS_DLGFRAME CAPTION "PAL VIEW" FONT 8, "MS Sans Serif", 0, 0, 1 -{ +BEGIN COMBOBOX IDC_PAL_SELECT, 15, 3, 90, 14, WS_TABSTOP | WS_TABSTOP | CBS_DROPDOWN LTEXT "Pal : 0", IDC_PALNUM, 3, 21, 25, 8, SS_LEFT - SCROLLBAR IDC_SCROLLER, 30, 18, 20, 14, WS_VISIBLE + SCROLLBAR IDC_SCROLLER, 30, 18, 20, 14, NOT WS_VISIBLE PUSHBUTTON "&Close", IDC_FERMER, 35, 169, 50, 14, BS_PUSHBUTTON AUTOCHECKBOX "&Auto-update", IDC_AUTO_UPDATE, 13, 150, 54, 14, BS_AUTOCHECKBOX EDITTEXT IDC_AUTO_UPDATE_SECS, 68, 151, 12, 14, WS_DISABLED | ES_AUTOHSCROLL | ES_READONLY CONTROL "", IDC_AUTO_UPDATE_SPIN, UPDOWN_CLASS, WS_DISABLED | UDS_ARROWKEYS | UDS_AUTOBUDDY | UDS_SETBUDDYINT, 80, 151, 11, 14 LTEXT "frames", IDC_STATIC, 92, 154, 16, 8, SS_LEFT -} +END @@ -2290,17 +2378,17 @@ IDD_PAL DIALOGEX 0, 0, 120, 194 STYLE DS_SETFONT | WS_BORDER | WS_CAPTION | WS_DLGFRAME | WS_SYSMENU CAPTION "PAL VIEW" FONT 8, "MS Sans Serif", 0, 0, 1 -{ +BEGIN COMBOBOX IDC_PAL_SELECT, 15, 3, 90, 14, WS_TABSTOP | WS_TABSTOP | CBS_DROPDOWN LTEXT "Pal : 0", IDC_PALNUM, 3, 21, 25, 8, SS_LEFT - SCROLLBAR IDC_SCROLLER, 30, 18, 20, 14, WS_VISIBLE + SCROLLBAR IDC_SCROLLER, 30, 18, 20, 14, NOT WS_VISIBLE AUTOCHECKBOX "Auto-update", IDC_AUTO_UPDATE, 60, 18, 75, 14, BS_AUTOCHECKBOX PUSHBUTTON "&Fermer", IDC_FERMER, 35, 169, 50, 14, BS_PUSHBUTTON AUTOCHECKBOX "&Auto-update", IDC_AUTO_UPDATE2, 13, 150, 54, 14, BS_AUTOCHECKBOX EDITTEXT IDC_AUTO_UPDATE_SECS, 68, 151, 12, 14, WS_DISABLED | ES_AUTOHSCROLL | ES_READONLY CONTROL "", IDC_AUTO_UPDATE_SPIN, UPDOWN_CLASS, WS_DISABLED | UDS_ARROWKEYS | UDS_AUTOBUDDY | UDS_SETBUDDYINT, 80, 151, 11, 14 LTEXT "frames", IDC_STATIC, 92, 154, 16, 8, SS_LEFT -} +END @@ -2309,7 +2397,7 @@ IDD_SOUNDSETTINGS DIALOGEX 0, 0, 174, 96 STYLE DS_CENTER | DS_MODALFRAME | DS_SETFONT | WS_VISIBLE | WS_BORDER | WS_CAPTION | WS_DLGFRAME | WS_POPUP | WS_SYSMENU CAPTION "Lyd Indstillinger" FONT 8, "MS Sans Serif", 0, 0, 1 -{ +BEGIN GROUPBOX "Lyd Indstillinger", -1, 3, 2, 168, 28 LTEXT "Lyd Driver", -1, 10, 14, 40, 10, SS_LEFT COMBOBOX IDC_SOUNDCORECB, 54, 13, 110, 33, WS_TABSTOP | WS_VSCROLL | WS_TABSTOP | CBS_DROPDOWNLIST @@ -2320,7 +2408,7 @@ FONT 8, "MS Sans Serif", 0, 0, 1 CONTROL "", IDC_SLVOLUME, TRACKBAR_CLASS, 0, 40, 57, 128, 10 DEFPUSHBUTTON "&OK", IDOK, 82, 78, 40, 14, BS_DEFPUSHBUTTON PUSHBUTTON "&Fortryd", IDCANCEL, 127, 78, 40, 14, BS_PUSHBUTTON -} +END @@ -2329,7 +2417,7 @@ IDD_SOUNDSETTINGS DIALOGEX 0, 0, 174, 96 STYLE DS_CENTER | DS_MODALFRAME | DS_SETFONT | WS_VISIBLE | WS_BORDER | WS_CAPTION | WS_DLGFRAME | WS_POPUP | WS_SYSMENU CAPTION "Sound Settings" FONT 8, "MS Sans Serif", 0, 0, 1 -{ +BEGIN GROUPBOX "Sound Core Settings", -1, 3, 2, 168, 28 LTEXT "Sound Core", -1, 10, 14, 40, 10, SS_LEFT COMBOBOX IDC_SOUNDCORECB, 54, 13, 110, 33, WS_TABSTOP | WS_VSCROLL | WS_TABSTOP | CBS_DROPDOWNLIST @@ -2340,7 +2428,7 @@ FONT 8, "MS Sans Serif", 0, 0, 1 CONTROL "", IDC_SLVOLUME, TRACKBAR_CLASS, 0, 40, 57, 128, 10 DEFPUSHBUTTON "&OK", IDOK, 82, 78, 40, 14, BS_DEFPUSHBUTTON PUSHBUTTON "&Cancel", IDCANCEL, 127, 78, 40, 14, BS_PUSHBUTTON -} +END @@ -2349,10 +2437,10 @@ IDD_TILE DIALOGEX 0, 0, 446, 180 STYLE DS_SETFONT | WS_BORDER | WS_CAPTION | WS_DLGFRAME | WS_SYSMENU CAPTION "TILE Fremvisning" FONT 8, "MS Sans Serif", 0, 0, 1 -{ +BEGIN COMBOBOX IDC_PAL_SELECT, 4, 13, 90, 14, WS_TABSTOP | WS_TABSTOP | CBS_DROPDOWN LTEXT "Pal : 0", IDC_PALNUM, 4, 31, 25, 8, SS_LEFT - SCROLLBAR IDC_SCROLLER, 30, 28, 20, 14, WS_VISIBLE + SCROLLBAR IDC_SCROLLER, 30, 28, 20, 14, NOT WS_VISIBLE COMBOBOX IDC_MEM_SELECT, 4, 50, 90, 14, WS_TABSTOP | WS_TABSTOP | CBS_DROPDOWN AUTORADIOBUTTON "Bitmap", IDC_BITMAP, 4, 68, 35, 10, WS_GROUP | WS_TABSTOP | BS_AUTORADIOBUTTON AUTORADIOBUTTON "256 Farver", IDC_256COUL, 4, 80, 55, 10, WS_TABSTOP | BS_AUTORADIOBUTTON @@ -2365,7 +2453,7 @@ FONT 8, "MS Sans Serif", 0, 0, 1 EDITTEXT IDC_AUTO_UPDATE_SECS, 404, 165, 12, 14, WS_DISABLED | ES_AUTOHSCROLL | ES_READONLY CONTROL "", IDC_AUTO_UPDATE_SPIN, UPDOWN_CLASS, WS_DISABLED | UDS_ARROWKEYS | UDS_AUTOBUDDY | UDS_SETBUDDYINT, 416, 164, 11, 14 LTEXT "frames", IDC_STATIC, 428, 167, 16, 8, SS_LEFT -} +END @@ -2374,10 +2462,10 @@ IDD_TILE DIALOGEX 0, 0, 446, 180 STYLE DS_CENTER | DS_SETFONT | WS_VISIBLE | WS_BORDER | WS_CAPTION | WS_DLGFRAME CAPTION "TILE VIEW" FONT 8, "MS Sans Serif", 0, 0, 1 -{ +BEGIN COMBOBOX IDC_PAL_SELECT, 4, 13, 90, 14, WS_TABSTOP | WS_TABSTOP | CBS_DROPDOWN LTEXT "Pal : 0", IDC_PALNUM, 4, 31, 25, 8, SS_LEFT - SCROLLBAR IDC_SCROLLER, 30, 28, 20, 14, WS_VISIBLE + SCROLLBAR IDC_SCROLLER, 30, 28, 20, 14, NOT WS_VISIBLE COMBOBOX IDC_MEM_SELECT, 4, 50, 90, 14, WS_TABSTOP | WS_TABSTOP | CBS_DROPDOWN AUTORADIOBUTTON "Bitmap", IDC_BITMAP, 4, 68, 35, 10, WS_GROUP | WS_TABSTOP | BS_AUTORADIOBUTTON AUTORADIOBUTTON "256 colors", IDC_256COUL, 4, 80, 55, 10, WS_TABSTOP | BS_AUTORADIOBUTTON @@ -2390,7 +2478,7 @@ FONT 8, "MS Sans Serif", 0, 0, 1 EDITTEXT IDC_AUTO_UPDATE_SECS, 404, 165, 12, 14, WS_DISABLED | ES_AUTOHSCROLL | ES_READONLY CONTROL "", IDC_AUTO_UPDATE_SPIN, UPDOWN_CLASS, WS_DISABLED | UDS_ARROWKEYS | UDS_AUTOBUDDY | UDS_SETBUDDYINT, 416, 164, 11, 14 LTEXT "frames", IDC_STATIC, 428, 167, 16, 8, SS_LEFT -} +END @@ -2399,10 +2487,10 @@ IDD_TILE DIALOGEX 0, 0, 446, 180 STYLE DS_SETFONT | WS_BORDER | WS_CAPTION | WS_DLGFRAME | WS_SYSMENU CAPTION "TILE VIEW" FONT 8, "MS Sans Serif", 0, 0, 1 -{ +BEGIN COMBOBOX IDC_PAL_SELECT, 4, 13, 90, 14, WS_TABSTOP | WS_TABSTOP | CBS_DROPDOWN LTEXT "Pal : 0", IDC_PALNUM, 4, 31, 25, 8, SS_LEFT - SCROLLBAR IDC_SCROLLER, 30, 28, 20, 14, WS_VISIBLE + SCROLLBAR IDC_SCROLLER, 30, 28, 20, 14, NOT WS_VISIBLE COMBOBOX IDC_MEM_SELECT, 4, 50, 90, 14, WS_TABSTOP | WS_TABSTOP | CBS_DROPDOWN AUTORADIOBUTTON "Bitmap", IDC_BITMAP, 4, 68, 35, 10, WS_GROUP | WS_TABSTOP | BS_AUTORADIOBUTTON AUTORADIOBUTTON "256 couleurs", IDC_256COUL, 4, 80, 55, 10, WS_TABSTOP | BS_AUTORADIOBUTTON @@ -2415,7 +2503,7 @@ FONT 8, "MS Sans Serif", 0, 0, 1 EDITTEXT IDC_AUTO_UPDATE_SECS, 404, 165, 12, 14, WS_DISABLED | ES_AUTOHSCROLL | ES_READONLY CONTROL "", IDC_AUTO_UPDATE_SPIN, UPDOWN_CLASS, WS_DISABLED | UDS_ARROWKEYS | UDS_AUTOBUDDY | UDS_SETBUDDYINT, 416, 164, 11, 14 LTEXT "frames", IDC_STATIC, 428, 167, 16, 8, SS_LEFT -} +END @@ -2424,14 +2512,14 @@ IDD_WIFISETTINGS DIALOG 0, 0, 331, 91 STYLE DS_CENTER | DS_SHELLFONT | WS_BORDER | WS_CAPTION | WS_DLGFRAME | WS_SYSMENU CAPTION "Wifi settings" FONT 8, "Ms Shell Dlg" -{ +BEGIN DEFPUSHBUTTON "OK", IDOK, 220, 70, 50, 14, BS_DEFPUSHBUTTON PUSHBUTTON "Cancel", IDCANCEL, 275, 70, 50, 14, BS_PUSHBUTTON GROUPBOX "Network adapter settings", IDC_STATIC, 5, 5, 320, 60 LTEXT "Bridge network adapter:", IDC_STATIC, 15, 20, 76, 8, SS_LEFT COMBOBOX IDC_BRIDGEADAPTER, 15, 30, 300, 45, CBS_DROPDOWNLIST | CBS_HASSTRINGS LTEXT "(wifi emulation is not yet complete. this doesn't work.)", IDC_STATIC, 15, 48, 166, 8, SS_LEFT -} +END @@ -2440,6 +2528,6 @@ FONT 8, "Ms Shell Dlg" // LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL IDR_MAIN_ACCEL ACCELERATORS -{ +BEGIN "O", ACCEL_CTRL_O, VIRTKEY, CONTROL -} +END diff --git a/desmume/src/windows/snddx.cpp b/src/windows/snddx.cpp similarity index 100% rename from desmume/src/windows/snddx.cpp rename to src/windows/snddx.cpp diff --git a/desmume/src/windows/snddx.h b/src/windows/snddx.h similarity index 100% rename from desmume/src/windows/snddx.h rename to src/windows/snddx.h diff --git a/desmume/src/windows/throttle.cpp b/src/windows/throttle.cpp similarity index 100% rename from desmume/src/windows/throttle.cpp rename to src/windows/throttle.cpp diff --git a/desmume/src/windows/throttle.h b/src/windows/throttle.h similarity index 100% rename from desmume/src/windows/throttle.h rename to src/windows/throttle.h diff --git a/desmume/src/windows/tileView.cpp b/src/windows/tileView.cpp similarity index 94% rename from desmume/src/windows/tileView.cpp rename to src/windows/tileView.cpp index aea0ec771..809e34c77 100644 --- a/desmume/src/windows/tileView.cpp +++ b/src/windows/tileView.cpp @@ -24,7 +24,6 @@ #include "resource.h" #include "debug.h" #include "../MMU.h" -#include "../gpu.h" typedef struct { @@ -32,7 +31,7 @@ typedef struct bool autoup; HWND hwnd; - u32 target; + u8 * mem; u16 * pal; s16 palnum; u16 tilenum; @@ -79,9 +78,7 @@ LRESULT TileViewBox_Direct(HWND hwnd, tileview_struct * win, WPARAM wParam, LPAR FillRect(mem_dc, &rect, (HBRUSH)GetStockObject(WHITE_BRUSH)); - u8* mem = MMU_RenderMapToLCD(win->target); - if(mem) - SetDIBitsToDevice(mem_dc, 0, 0, 256, 256, 0, 0, 0, 256, mem, (BITMAPINFO*)&bmi, DIB_RGB_COLORS); + SetDIBitsToDevice(mem_dc, 0, 0, 256, 256, 0, 0, 0, 256, win->mem, (BITMAPINFO*)&bmi, DIB_RGB_COLORS); BitBlt(hdc, 0, 0, lg, ht, mem_dc, 0, 0, SRCCOPY); @@ -136,16 +133,14 @@ LRESULT TileViewBox_Pal256(HWND hwnd, tileview_struct * win, WPARAM wParam, LPAR { u32 i, num2, num, y, x; - u8* mem = MMU_RenderMapToLCD(win->target); - if(mem) - { - for(num2 = 0; num2<32; ++num2) - for(num = 0; num<32; ++num) - for(y = 0; y<8; ++y) - for(x = 0; x<8; ++x) - bitmap[x + (y*256) + (num*8) +(num2*256*8)] = pal[mem[x + (y*8) + (num*64) +(num2*2048)]]; - SetDIBitsToDevice(mem_dc, 0, 0, 256, 256, 0, 0, 0, 256, bitmap, (BITMAPINFO*)&bmi, DIB_RGB_COLORS); - } + //for(i = 0; i<256*256; ++i) + // bitmap[i] = pal[win->mem[i]]; + for(num2 = 0; num2<32; ++num2) + for(num = 0; num<32; ++num) + for(y = 0; y<8; ++y) + for(x = 0; x<8; ++x) + bitmap[x + (y*256) + (num*8) +(num2*256*8)] = pal[win->mem[x + (y*8) + (num*64) +(num2*2048)]]; + SetDIBitsToDevice(mem_dc, 0, 0, 256, 256, 0, 0, 0, 256, bitmap, (BITMAPINFO*)&bmi, DIB_RGB_COLORS); sprintf(text, "Pal : %d", win->palnum); SetWindowText(GetDlgItem(hwnd, IDC_PALNUM), text); } @@ -203,20 +198,16 @@ LRESULT TileViewBox_Pal16(HWND hwnd, tileview_struct * win, WPARAM wParam, LPARA if(win->pal) { - u8* mem = MMU_RenderMapToLCD(win->target); - if(mem) - { - u32 num2, num, y, x; - for(num2 = 0; num2<32; ++num2) - for(num = 0; num<64; ++num) - for(y = 0; y<8; ++y) - for(x = 0; x<4; ++x) - { - bitmap[(x<<1) + (y*512) + (num*8) +(num2*512*8)] = pal[mem[x + (y*4) + (num*32) +(num2*2048)]&0xF]; - bitmap[(x<<1)+1 + (y*512) + (num*8) +(num2*512*8)] = pal[mem[x + (y*4) + (num*32) +(num2*2048)]>>4]; - } - SetDIBitsToDevice(mem_dc, 0, 0, 512, 256, 0, 0, 0, 256, bitmap, (BITMAPINFO*)&bmi, DIB_RGB_COLORS); - } + u32 num2, num, y, x; + for(num2 = 0; num2<32; ++num2) + for(num = 0; num<64; ++num) + for(y = 0; y<8; ++y) + for(x = 0; x<4; ++x) + { + bitmap[(x<<1) + (y*512) + (num*8) +(num2*512*8)] = pal[win->mem[x + (y*4) + (num*32) +(num2*2048)]&0xF]; + bitmap[(x<<1)+1 + (y*512) + (num*8) +(num2*512*8)] = pal[win->mem[x + (y*4) + (num*32) +(num2*2048)]>>4]; + } + SetDIBitsToDevice(mem_dc, 0, 0, 512, 256, 0, 0, 0, 256, bitmap, (BITMAPINFO*)&bmi, DIB_RGB_COLORS); sprintf(text, "Pal : %d", win->palnum); SetWindowText(GetDlgItem(hwnd, IDC_PALNUM), text); } @@ -334,7 +325,7 @@ BOOL CALLBACK ViewTilesProc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lPar TileView = new tileview_struct; memset(TileView, 0, sizeof(tileview_struct)); TileView->hwnd = hwnd; - TileView->target = ARM9MEM_ABG; + TileView->mem = ARM9Mem.ARM9_ABG; TileView->pal = ((u16 *)ARM9Mem.ARM9_VMEM); TileView->autoup_secs = 1; SendMessage(GetDlgItem(hwnd, IDC_AUTO_UPDATE_SPIN), @@ -501,21 +492,21 @@ BOOL CALLBACK ViewTilesProc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lPar case 5 : case 6 : case 7 : - TileView->target = ARM9MEM_ABG + 0x10000*sel; + TileView->mem = ARM9Mem.ARM9_ABG + 0x10000*sel; break; case 8 : case 9 : - TileView->target = ARM9MEM_BBG + 0x10000*(sel-8); + TileView->mem = ARM9Mem.ARM9_BBG + 0x10000*(sel-8); break; case 10 : case 11 : case 12 : case 13 : - TileView->target = ARM9MEM_AOBJ + 0x10000*(sel-10); + TileView->mem = ARM9Mem.ARM9_AOBJ + 0x10000*(sel-10); break; case 14 : case 15 : - TileView->target = ARM9MEM_BOBJ + 0x10000*(sel-14); + TileView->mem = ARM9Mem.ARM9_BOBJ + 0x10000*(sel-14); break; case 16 : case 17 : @@ -527,7 +518,7 @@ BOOL CALLBACK ViewTilesProc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lPar case 23 : case 24 : case 25 : - TileView->target = ARM9MEM_LCDC + 0x10000*(sel-16); + TileView->mem = ARM9Mem.ARM9_LCD + 0x10000*(sel-16); break; default : return 1; @@ -626,7 +617,7 @@ BOOL CALLBACK ViewTilesProc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lPar case 17 : case 18 : case 19 : - TileView->pal = ((u16 *)(ARM9Mem.texInfo.texPalSlot[sel-16])); + TileView->pal = ((u16 *)(ARM9Mem.texPalSlot[sel-16])); TileView->palnum = 0; ShowWindow(GetDlgItem(hwnd, IDC_16COUL), SW_SHOW); EnableWindow(GetDlgItem(hwnd, IDC_16COUL), TRUE); diff --git a/desmume/src/windows/tileView.h b/src/windows/tileView.h similarity index 100% rename from desmume/src/windows/tileView.h rename to src/windows/tileView.h diff --git a/desmume/src/windows/windriver.h b/src/windows/windriver.h similarity index 100% rename from desmume/src/windows/windriver.h rename to src/windows/windriver.h diff --git a/desmume/src/windows/winpcap/Devioctl.h b/src/windows/winpcap/Devioctl.h similarity index 100% rename from desmume/src/windows/winpcap/Devioctl.h rename to src/windows/winpcap/Devioctl.h diff --git a/desmume/src/windows/winpcap/Gnuc.h b/src/windows/winpcap/Gnuc.h similarity index 100% rename from desmume/src/windows/winpcap/Gnuc.h rename to src/windows/winpcap/Gnuc.h diff --git a/desmume/src/windows/winpcap/Ntddndis.h b/src/windows/winpcap/Ntddndis.h similarity index 100% rename from desmume/src/windows/winpcap/Ntddndis.h rename to src/windows/winpcap/Ntddndis.h diff --git a/desmume/src/windows/winpcap/Ntddpack.h b/src/windows/winpcap/Ntddpack.h similarity index 100% rename from desmume/src/windows/winpcap/Ntddpack.h rename to src/windows/winpcap/Ntddpack.h diff --git a/desmume/src/windows/winpcap/Packet.lib b/src/windows/winpcap/Packet.lib similarity index 100% rename from desmume/src/windows/winpcap/Packet.lib rename to src/windows/winpcap/Packet.lib diff --git a/desmume/src/windows/winpcap/Packet32.h b/src/windows/winpcap/Packet32.h similarity index 100% rename from desmume/src/windows/winpcap/Packet32.h rename to src/windows/winpcap/Packet32.h diff --git a/desmume/src/windows/winpcap/Win32-Extensions.h b/src/windows/winpcap/Win32-Extensions.h similarity index 100% rename from desmume/src/windows/winpcap/Win32-Extensions.h rename to src/windows/winpcap/Win32-Extensions.h diff --git a/desmume/src/windows/winpcap/bittypes.h b/src/windows/winpcap/bittypes.h similarity index 100% rename from desmume/src/windows/winpcap/bittypes.h rename to src/windows/winpcap/bittypes.h diff --git a/desmume/src/windows/winpcap/bucket_lookup.h b/src/windows/winpcap/bucket_lookup.h similarity index 100% rename from desmume/src/windows/winpcap/bucket_lookup.h rename to src/windows/winpcap/bucket_lookup.h diff --git a/desmume/src/windows/winpcap/count_packets.h b/src/windows/winpcap/count_packets.h similarity index 100% rename from desmume/src/windows/winpcap/count_packets.h rename to src/windows/winpcap/count_packets.h diff --git a/desmume/src/windows/winpcap/ip6_misc.h b/src/windows/winpcap/ip6_misc.h similarity index 100% rename from desmume/src/windows/winpcap/ip6_misc.h rename to src/windows/winpcap/ip6_misc.h diff --git a/desmume/src/windows/winpcap/memory_t.h b/src/windows/winpcap/memory_t.h similarity index 100% rename from desmume/src/windows/winpcap/memory_t.h rename to src/windows/winpcap/memory_t.h diff --git a/desmume/src/windows/winpcap/normal_lookup.h b/src/windows/winpcap/normal_lookup.h similarity index 100% rename from desmume/src/windows/winpcap/normal_lookup.h rename to src/windows/winpcap/normal_lookup.h diff --git a/desmume/src/windows/winpcap/pcap-bpf.h b/src/windows/winpcap/pcap-bpf.h similarity index 100% rename from desmume/src/windows/winpcap/pcap-bpf.h rename to src/windows/winpcap/pcap-bpf.h diff --git a/desmume/src/windows/winpcap/pcap-int.h b/src/windows/winpcap/pcap-int.h similarity index 100% rename from desmume/src/windows/winpcap/pcap-int.h rename to src/windows/winpcap/pcap-int.h diff --git a/desmume/src/windows/winpcap/pcap-stdinc.h b/src/windows/winpcap/pcap-stdinc.h similarity index 100% rename from desmume/src/windows/winpcap/pcap-stdinc.h rename to src/windows/winpcap/pcap-stdinc.h diff --git a/desmume/src/windows/winpcap/pcap.h b/src/windows/winpcap/pcap.h similarity index 100% rename from desmume/src/windows/winpcap/pcap.h rename to src/windows/winpcap/pcap.h diff --git a/desmume/src/windows/winpcap/remote-ext.h b/src/windows/winpcap/remote-ext.h similarity index 100% rename from desmume/src/windows/winpcap/remote-ext.h rename to src/windows/winpcap/remote-ext.h diff --git a/desmume/src/windows/winpcap/tcp_session.h b/src/windows/winpcap/tcp_session.h similarity index 100% rename from desmume/src/windows/winpcap/tcp_session.h rename to src/windows/winpcap/tcp_session.h diff --git a/desmume/src/windows/winpcap/time_calls.h b/src/windows/winpcap/time_calls.h similarity index 100% rename from desmume/src/windows/winpcap/time_calls.h rename to src/windows/winpcap/time_calls.h diff --git a/desmume/src/windows/winpcap/tme.h b/src/windows/winpcap/tme.h similarity index 100% rename from desmume/src/windows/winpcap/tme.h rename to src/windows/winpcap/tme.h diff --git a/desmume/src/windows/winpcap/wpcap.lib b/src/windows/winpcap/wpcap.lib similarity index 100% rename from desmume/src/windows/winpcap/wpcap.lib rename to src/windows/winpcap/wpcap.lib diff --git a/desmume/src/windows/zlib123/README b/src/windows/zlib123/README similarity index 100% rename from desmume/src/windows/zlib123/README rename to src/windows/zlib123/README diff --git a/desmume/src/windows/zlib123/zconf.h b/src/windows/zlib123/zconf.h similarity index 100% rename from desmume/src/windows/zlib123/zconf.h rename to src/windows/zlib123/zconf.h diff --git a/desmume/src/windows/zlib123/zlib-2005-x32.lib b/src/windows/zlib123/zlib-2005-x32.lib similarity index 100% rename from desmume/src/windows/zlib123/zlib-2005-x32.lib rename to src/windows/zlib123/zlib-2005-x32.lib diff --git a/desmume/src/windows/zlib123/zlib-2005-x64.lib b/src/windows/zlib123/zlib-2005-x64.lib similarity index 100% rename from desmume/src/windows/zlib123/zlib-2005-x64.lib rename to src/windows/zlib123/zlib-2005-x64.lib diff --git a/desmume/src/windows/zlib123/zlib-2008-x32.lib b/src/windows/zlib123/zlib-2008-x32.lib similarity index 100% rename from desmume/src/windows/zlib123/zlib-2008-x32.lib rename to src/windows/zlib123/zlib-2008-x32.lib diff --git a/desmume/src/windows/zlib123/zlib-2008-x64.lib b/src/windows/zlib123/zlib-2008-x64.lib similarity index 100% rename from desmume/src/windows/zlib123/zlib-2008-x64.lib rename to src/windows/zlib123/zlib-2008-x64.lib diff --git a/desmume/src/windows/zlib123/zlib.h b/src/windows/zlib123/zlib.h similarity index 100% rename from desmume/src/windows/zlib123/zlib.h rename to src/windows/zlib123/zlib.h diff --git a/desmume/src/windows/zlib123/zutil.h b/src/windows/zlib123/zutil.h similarity index 100% rename from desmume/src/windows/zlib123/zutil.h rename to src/windows/zlib123/zutil.h diff --git a/desmume/src/windows/zziplib/README b/src/windows/zziplib/README similarity index 100% rename from desmume/src/windows/zziplib/README rename to src/windows/zziplib/README diff --git a/desmume/src/windows/zziplib/zzip/_msvc.h b/src/windows/zziplib/zzip/_msvc.h similarity index 100% rename from desmume/src/windows/zziplib/zzip/_msvc.h rename to src/windows/zziplib/zzip/_msvc.h diff --git a/desmume/src/windows/zziplib/zzip/conf.h b/src/windows/zziplib/zzip/conf.h similarity index 100% rename from desmume/src/windows/zziplib/zzip/conf.h rename to src/windows/zziplib/zzip/conf.h diff --git a/desmume/src/windows/zziplib/zzip/types.h b/src/windows/zziplib/zzip/types.h similarity index 100% rename from desmume/src/windows/zziplib/zzip/types.h rename to src/windows/zziplib/zzip/types.h diff --git a/desmume/src/windows/zziplib/zzip/zzip.h b/src/windows/zziplib/zzip/zzip.h similarity index 100% rename from desmume/src/windows/zziplib/zzip/zzip.h rename to src/windows/zziplib/zzip/zzip.h diff --git a/desmume/src/windows/zziplib/zziplib-2005-x32.lib b/src/windows/zziplib/zziplib-2005-x32.lib similarity index 100% rename from desmume/src/windows/zziplib/zziplib-2005-x32.lib rename to src/windows/zziplib/zziplib-2005-x32.lib diff --git a/desmume/src/windows/zziplib/zziplib-2005-x64.lib b/src/windows/zziplib/zziplib-2005-x64.lib similarity index 100% rename from desmume/src/windows/zziplib/zziplib-2005-x64.lib rename to src/windows/zziplib/zziplib-2005-x64.lib diff --git a/desmume/src/windows/zziplib/zziplib-2008-x32.lib b/src/windows/zziplib/zziplib-2008-x32.lib similarity index 100% rename from desmume/src/windows/zziplib/zziplib-2008-x32.lib rename to src/windows/zziplib/zziplib-2008-x32.lib diff --git a/desmume/src/windows/zziplib/zziplib-2008-x64.lib b/src/windows/zziplib/zziplib-2008-x64.lib similarity index 100% rename from desmume/src/windows/zziplib/zziplib-2008-x64.lib rename to src/windows/zziplib/zziplib-2008-x64.lib