├── GX_gfx ├── Gfx_#1.3.h ├── SoftGFXPlugin.h ├── bl_GX.cpp ├── bl_GX.h ├── cc_GX.cpp ├── cc_GX.h ├── color.h ├── font.c ├── font.h ├── global.h ├── main.cpp ├── matrix.h ├── rsp_GX.cpp ├── rsp_GX.h ├── tx_GX.cpp ├── tx_GX.h ├── vektor.h ├── vi.cpp ├── vi.h ├── vi_GX.cpp └── vi_GX.h ├── LICENCE.TXT ├── Makefile.GLN64_dev ├── Makefile.GLN64_dev_wii ├── Makefile.GX_gfx ├── Makefile.GX_gfx_wii ├── Makefile.menu2_gc ├── Makefile.menu2_wii ├── Makefile.sft_gfx ├── Makefile.sft_gfx_wii ├── README.md ├── README.original ├── config.h ├── debugger ├── ChangeLog ├── README ├── TODO ├── breakpoints.c ├── breakpoints.h ├── debugger.c ├── debugger.h ├── decoder.c ├── decoder.h ├── desasm.c ├── desasm.h ├── regAI.c ├── regAI.h ├── regCop0.c ├── regCop0.h ├── regCop1.c ├── regCop1.h ├── regGPR.c ├── regGPR.h ├── regPI.c ├── regPI.h ├── regRI.c ├── regRI.h ├── regSI.c ├── regSI.h ├── regSpecial.c ├── regSpecial.h ├── regTLB.c ├── regTLB.h ├── regVI.c ├── regVI.h ├── registers.c ├── registers.h ├── types.h ├── ui_clist_edit.c └── ui_clist_edit.h ├── doc ├── HiRezTexture.txt ├── compile.sh ├── logo.eps ├── readme.latex └── readme.pdf ├── fileBrowser ├── HW64 │ ├── banner.bin │ ├── cert │ ├── customTitle.h │ ├── customTitle.s │ ├── hw64.tik │ ├── hw64.tmd │ └── workaround.c ├── fileBrowser-CARD.c ├── fileBrowser-CARD.h ├── fileBrowser-DVD.c ├── fileBrowser-DVD.h ├── fileBrowser-WiiFS.c ├── fileBrowser-WiiFS.h ├── fileBrowser-libfat.c ├── fileBrowser-libfat.h ├── fileBrowser.c ├── fileBrowser.h └── imagedata │ ├── Thumbs.db │ ├── icon.png │ └── mupenIcon.h ├── gc_audio ├── AudioPlugin.h ├── Audio_#1.1.h └── audio.c ├── gc_input ├── Controller_#1.1.h ├── InputPlugin.h ├── PakIO.h ├── controller-Classic.c ├── controller-DRC.c ├── controller-GC.c ├── controller-WiimoteNunchuk.c ├── controller.h └── input.c ├── gc_memory ├── ARAM.c ├── ARAM.h ├── MEM2.h ├── Save-Prompt.c ├── Saves.h ├── TLB-Cache-hash.c ├── TLB-Cache.c ├── TLB-Cache.h ├── dma.c ├── dma.h ├── flashram.c ├── flashram.h ├── mcbanner.h ├── memory.c ├── memory.h ├── pif.c ├── pif.h ├── pif2.h ├── tlb.c └── tlb.h ├── glN64_GX ├── 2xSAI.cpp ├── 2xSAI.h ├── 3DMath.h ├── CRC.cpp ├── CRC.h ├── Combiner.cpp ├── Combiner.h ├── Config.h ├── Config_linux.cpp ├── Debug.h ├── DepthBuffer.cpp ├── DepthBuffer.h ├── F3D.cpp ├── F3D.h ├── F3DDKR.cpp ├── F3DDKR.h ├── F3DEX.cpp ├── F3DEX.h ├── F3DEX2.cpp ├── F3DEX2.h ├── F3DPD.cpp ├── F3DPD.h ├── F3DWRUS.cpp ├── F3DWRUS.h ├── FrameBuffer.cpp ├── FrameBuffer.h ├── GBI.cpp ├── GBI.h ├── GFXPlugin.h ├── L3D.cpp ├── L3D.h ├── L3DEX.cpp ├── L3DEX.h ├── L3DEX2.cpp ├── L3DEX2.h ├── N64.cpp ├── N64.h ├── NV_register_combiners.cpp ├── NV_register_combiners.h ├── OpenGL.cpp ├── OpenGL.h ├── RDP.cpp ├── RDP.h ├── RSP.cpp ├── RSP.h ├── S2DEX.cpp ├── S2DEX.h ├── S2DEX2.cpp ├── S2DEX2.h ├── TEV_combiner.cpp ├── TEV_combiner.h ├── Textures.cpp ├── Textures.h ├── Types.h ├── VI.cpp ├── VI.h ├── Zilmar GFX 1.3.h ├── convert.h ├── gDP.cpp ├── gDP.h ├── gSP.cpp ├── gSP.h ├── gl.h ├── glATI.h ├── glN64.cpp ├── glN64.h ├── glext.h ├── texture_env.cpp ├── texture_env.h ├── texture_env_combine.cpp └── texture_env_combine.h ├── gui ├── ARIAL.H ├── DEBUG.c ├── DEBUG.h ├── GUI.c ├── GUI.h ├── TEXT.c ├── TEXT.h ├── background.tex ├── background.tlut ├── background_tex.s ├── font.c ├── font.h ├── gui_GX-menu.c ├── gui_GX-menu.h ├── gui_GX.c ├── gui_GX.h ├── logo.tex ├── menu.c ├── menu.h ├── menuFileBrowser.c └── menuFileBrowser.h ├── libgui ├── Button.cpp ├── Button.h ├── Component.cpp ├── Component.h ├── CursorManager.cpp ├── CursorManager.h ├── FocusManager.cpp ├── FocusManager.h ├── Frame.cpp ├── Frame.h ├── GraphicsGX.cpp ├── GraphicsGX.h ├── Gui.cpp ├── Gui.h ├── GuiResources.cpp ├── GuiResources.h ├── GuiTypes.h ├── IPLFont.cpp ├── IPLFont.h ├── Image.cpp ├── Image.h ├── InputManager.cpp ├── InputManager.h ├── InputStatusBar.cpp ├── InputStatusBar.h ├── LoadingBar.cpp ├── LoadingBar.h ├── Logo.cpp ├── Logo.h ├── MessageBox.cpp ├── MessageBox.h ├── TextBox.cpp ├── TextBox.h ├── resources.h ├── resources.s └── resources │ ├── Button.tx │ ├── ButtonA.tlt │ ├── ButtonA.tx │ ├── ButtonAFoc.tx │ ├── ButtonASelOff.tx │ ├── ButtonASelOffFoc.tx │ ├── ButtonASelOn.tx │ ├── ButtonASelOnFoc.tx │ ├── ButtonFocus.tx │ ├── CursorGrab.tx │ └── CursorPoint.tx ├── logo.xpm ├── main ├── Audio_#1.1.h ├── Controller_#1.1.h ├── Gfx_#1.3.h ├── KillWiimote.c ├── ROM-Cache-MEM2.c ├── ROM-Cache.c ├── ROM-Cache.h ├── Rsp_#1.1.h ├── adler32.c ├── gc_dvd.c ├── gc_dvd.h ├── gczip.c ├── gczip.h ├── guifuncs.h ├── main.h ├── main_gc-menu.c ├── main_gc-menu2.cpp ├── main_gc.c ├── md5.c ├── md5.h ├── mupenIniApi.c ├── mupenIniApi.h ├── plugin.c ├── plugin.h ├── rom.h ├── rom_gc.c ├── savestates.h ├── savestates_gc.c ├── textFileBrowser.c ├── timers.c ├── timers.h ├── usbthread.c ├── usbthread.h ├── wii64config.h └── winlnxdefs.h ├── menu ├── ConfigureButtonsFrame.cpp ├── ConfigureButtonsFrame.h ├── ConfigureInputFrame.cpp ├── ConfigureInputFrame.h ├── ConfigurePaksFrame.cpp ├── ConfigurePaksFrame.h ├── CurrentRomFrame.cpp ├── CurrentRomFrame.h ├── FileBrowserFrame.cpp ├── FileBrowserFrame.h ├── LoadRomFrame.cpp ├── LoadRomFrame.h ├── LoadSaveFrame.cpp ├── LoadSaveFrame.h ├── MainFrame.cpp ├── MainFrame.h ├── MenuContext.cpp ├── MenuContext.h ├── MenuResources.h ├── MenuResources.s ├── MenuTypes.h ├── SaveGameFrame.cpp ├── SaveGameFrame.h ├── SelectCPUFrame.cpp ├── SelectCPUFrame.h ├── SettingsFrame.cpp ├── SettingsFrame.h └── resources │ ├── Loading.tx │ ├── bg.tx │ ├── cntrlClassic.tx │ ├── cntrlEmpty.tx │ ├── cntrlGC.tx │ ├── cntrlWM.tx │ ├── cntrlWNC.tx │ ├── cube64.tx │ ├── n64Cntrl.tx │ └── wii64.tx ├── mupen64.ini ├── mupen64_soft_gfx ├── Gfx_#1.3.h ├── SoftGFXPlugin.h ├── bl.cpp ├── bl.h ├── cc.cpp ├── cc.h ├── color.h ├── global.h ├── main.cpp ├── matrix.h ├── rdp.cpp ├── rdp.h ├── rs.cpp ├── rs.h ├── rsp.cpp ├── rsp.d ├── rsp.h ├── tf.cpp ├── tf.h ├── tx.cpp ├── tx.h ├── vektor.h ├── vi.cpp ├── vi.h ├── vi_GX.cpp ├── vi_GX.h ├── vi_SDL.cpp └── vi_SDL.h ├── ogc_patches └── gx.c ├── r4300 ├── ARAM-blocks.c ├── ARAM-blocks.h ├── Invalid_Code.c ├── Invalid_Code.h ├── Recomp-Cache-Heap.c ├── Recomp-Cache.c ├── Recomp-Cache.h ├── bc.c ├── compare_core.c ├── cop0.c ├── cop1.c ├── cop1_d.c ├── cop1_l.c ├── cop1_s.c ├── cop1_w.c ├── exception.c ├── exception.h ├── interupt.c ├── interupt.h ├── macros.h ├── ops.h ├── ppc │ ├── FuncTree.c │ ├── Interpreter.h │ ├── MIPS-to-PPC.c │ ├── MIPS-to-PPC.h │ ├── MIPS.h │ ├── PowerPC.h │ ├── Recompile.c │ ├── Recompile.h │ ├── Register-Cache.c │ ├── Register-Cache.h │ ├── Wrappers.c │ └── Wrappers.h ├── profile.c ├── pure_interp.c ├── r4300.c ├── r4300.h ├── recomp.c ├── recomp.h ├── recomph.h ├── regimm.c ├── special.c ├── tlb.c └── x86 │ ├── assemble.h │ ├── interpret.h │ └── regcache.h ├── release ├── README └── apps │ └── wii64 │ ├── icon.png │ └── meta.xml ├── rsp_hle-ppc ├── Audio_#1.1.h ├── RSPPlugin.h ├── Rsp_#1.1.h ├── disasm.c ├── hle.h ├── jpeg.c ├── main.c ├── ucode1.c ├── ucode2.c ├── ucode3.c └── wintypes.h └── rsp_hle ├── Audio_#1.1.h ├── RSPPlugin.h ├── Rsp_#1.1.h ├── disasm.c ├── hle.h ├── jpeg.c ├── main.c ├── ucode1.cpp ├── ucode2.cpp ├── ucode3.cpp ├── ucode3mp3.cpp └── wintypes.h /GX_gfx/SoftGFXPlugin.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Wii64 - SoftGFXPlugin.h 3 | * Copyright (C) 2007 Mike Slegeir 4 | * 5 | * Mangles the plugin so it can be linked staticly 6 | * 7 | * Wii64 homepage: http://www.emulatemii.com 8 | * email address: wii64team@gmail.com 9 | * 10 | * 11 | * This program is free software; you can redistribute it and/ 12 | * or modify it under the terms of the GNU General Public Li- 13 | * cence as published by the Free Software Foundation; either 14 | * version 2 of the Licence, or any later version. 15 | * 16 | * This program is distributed in the hope that it will be use- 17 | * ful, but WITHOUT ANY WARRANTY; without even the implied war- 18 | * ranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public Licence for more details. 20 | * 21 | **/ 22 | 23 | #ifndef GFX_PLUGIN_H 24 | #define GFX_PLUGIN_H 25 | 26 | #define RomClosed romClosed_gfx 27 | #define RomOpen romOpen_gfx 28 | #define GetDllInfo getDllInfo_gfx 29 | #define DllConfig dllConfig_gfx 30 | #define DllTest dllTest_gfx 31 | #define DllAbout dllAbout_gfx 32 | #define CloseDLL closeDLL_gfx 33 | 34 | #define CaptureScreen captureScreen 35 | #define ChangeWindow changeWindow 36 | #define DrawScreen drawScreen 37 | #define InitiateGFX initiateGFX 38 | #define MoveScreen moveScreen 39 | #define ProcessDList processDList 40 | #define ProcessRDPList processRDPList 41 | #define ShowCFB showCFB 42 | #define UpdateScreen updateScreen 43 | #define ViStatusChanged viStatusChanged 44 | #define ViWidthChanged viWidthChanged 45 | 46 | #endif 47 | 48 | -------------------------------------------------------------------------------- /GX_gfx/font.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * font.h 3 | *****************************************************************************/ 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | extern void init_font(void); 8 | void write_font(int x, int y, char *string,u32 **axfb,int whichfb); 9 | 10 | #ifdef __cplusplus 11 | } 12 | #endif 13 | -------------------------------------------------------------------------------- /GX_gfx/global.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Mupen64 - global.h 3 | * Copyright (C) 2002 Hacktarux 4 | * 5 | * Mupen64 homepage: http://mupen64.emulation64.com 6 | * email address: hacktarux@yahoo.fr 7 | * 8 | * If you want to contribute to the project please contact 9 | * me first (maybe someone is already making what you are 10 | * planning to do). 11 | * 12 | * 13 | * This program is free software; you can redistribute it and/ 14 | * or modify it under the terms of the GNU General Public Li- 15 | * cence as published by the Free Software Foundation; either 16 | * version 2 of the Licence, or any later version. 17 | * 18 | * This program is distributed in the hope that it will be use- 19 | * ful, but WITHOUT ANY WARRANTY; without even the implied war- 20 | * ranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 21 | * See the GNU General Public Licence for more details. 22 | * 23 | * You should have received a copy of the GNU General Public 24 | * Licence along with this program; if not, write to the Free 25 | * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, 26 | * USA. 27 | * 28 | **/ 29 | 30 | #ifndef GLOBAL_H 31 | #define GLOBAL_H 32 | 33 | #include "vi.h" 34 | 35 | #ifdef _BIG_ENDIAN 36 | #define S8 0 37 | #define S16 0 38 | #else 39 | #define S8 3 40 | #define S16 1 41 | #endif 42 | 43 | extern VI* vi; 44 | 45 | #endif 46 | -------------------------------------------------------------------------------- /GX_gfx/vektor.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Mupen64 - vector.h 3 | * Copyright (C) 2002 Hacktarux 4 | * 5 | * Mupen64 homepage: http://mupen64.emulation64.com 6 | * email address: hacktarux@yahoo.fr 7 | * 8 | * If you want to contribute to the project please contact 9 | * me first (maybe someone is already making what you are 10 | * planning to do). 11 | * 12 | * 13 | * This program is free software; you can redistribute it and/ 14 | * or modify it under the terms of the GNU General Public Li- 15 | * cence as published by the Free Software Foundation; either 16 | * version 2 of the Licence, or any later version. 17 | * 18 | * This program is distributed in the hope that it will be use- 19 | * ful, but WITHOUT ANY WARRANTY; without even the implied war- 20 | * ranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 21 | * See the GNU General Public Licence for more details. 22 | * 23 | * You should have received a copy of the GNU General Public 24 | * Licence along with this program; if not, write to the Free 25 | * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, 26 | * USA. 27 | * 28 | **/ 29 | 30 | #ifndef VEKTOR_H 31 | #define VEKTOR_H 32 | 33 | template class Vektor 34 | { 35 | T element[s]; 36 | 37 | public: 38 | Vektor() {} 39 | ~Vektor() {} 40 | 41 | Vektor(const Vektor& v) 42 | { 43 | for (int i=0; i& operator= (const Vektor& v) 48 | { 49 | for (int i=0; i& v) const 55 | { 56 | T res = 0; 57 | for (int i=0; i 33 | #include 34 | #include 35 | #include 36 | #include 37 | 38 | #include "types.h" 39 | #include "../r4300/r4300.h" 40 | #include "../memory/memory.h" 41 | 42 | #include "debugger.h" 43 | #include "decoder.h" 44 | 45 | #include "ui_clist_edit.h" 46 | 47 | 48 | int breakpoints_opened; 49 | 50 | GtkWidget *winBreakpoints; 51 | 52 | void init_breakpoints(); 53 | int add_breakpoint( uint32 address ); 54 | int remove_breakpoint_by_address( uint32 address ); 55 | int check_breakpoints( uint32 address ); 56 | 57 | #endif // BREAKPOINTS_H 58 | -------------------------------------------------------------------------------- /debugger/debugger.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Mupen64 - debugger.h 3 | * Copyright (C) 2002 DavFr - robind@esiee.fr 4 | * 5 | * Mupen64 homepage: http://mupen64.emulation64.com 6 | * email address: hacktarux@yahoo.fr 7 | * 8 | * If you want to contribute to the project please contact 9 | * me first (maybe someone is already making what you are 10 | * planning to do). 11 | * 12 | * 13 | * This program is free software; you can redistribute it and/ 14 | * or modify it under the terms of the GNU General Public Li- 15 | * cence as published by the Free Software Foundation; either 16 | * version 2 of the Licence, or any later version. 17 | * 18 | * This program is distributed in the hope that it will be use- 19 | * ful, but WITHOUT ANY WARRANTY; without even the implied war- 20 | * ranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 21 | * See the GNU General Public Licence for more details. 22 | * 23 | * You should have received a copy of the GNU General Public 24 | * Licence along with this program; if not, write to the Free 25 | * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, 26 | * USA. 27 | * 28 | **/ 29 | 30 | #ifndef DEBUGGER_H 31 | #define DEBUGGER_H 32 | 33 | #include 34 | #include 35 | #include 36 | #include 37 | #include 38 | 39 | #include "types.h" 40 | #include "../r4300/r4300.h" 41 | #include "../memory/memory.h" 42 | 43 | #include "breakpoints.h" 44 | #include "desasm.h" 45 | #include "decoder.h" 46 | #include "registers.h" 47 | #include "regTLB.h" 48 | 49 | #define DEBUGGER_VERSION "0.0.2 - WIP2" 50 | 51 | 52 | 53 | int debugger_mode; // Debugger option enabled. 54 | 55 | // State of the Emulation Thread: 56 | // 0 -> pause, 1 -> step, 2 -> run. 57 | int run; 58 | 59 | uint32 previousPC; 60 | 61 | void init_debugger(); 62 | void update_debugger(); 63 | 64 | 65 | pthread_cond_t debugger_done_cond; 66 | pthread_mutex_t mutex; 67 | 68 | GdkColor color_modif, // Color of modified register. 69 | color_ident; // Unchanged register. 70 | 71 | GtkWidget *winRegisters; 72 | 73 | #endif //DEBUGGER_H 74 | -------------------------------------------------------------------------------- /debugger/decoder.h: -------------------------------------------------------------------------------- 1 | /* 2 | * debugger/decoder.h 3 | * 4 | * Debugger for Mupen64 - davFr 5 | * Copyright (C) 2002 davFr - robind@esiee.fr 6 | * 7 | * Mupen64 is copyrighted (C) 2002 Hacktarux 8 | * Mupen64 homepage: http://mupen64.emulation64.com 9 | * email address: hacktarux@yahoo.fr 10 | * 11 | * This program is free software; you can redistribute it and/ 12 | * or modify it under the terms of the GNU General Public Li- 13 | * cence as published by the Free Software Foundation; either 14 | * version 2 of the Licence. 15 | * 16 | * This program is distributed in the hope that it will be use- 17 | * ful, but WITHOUT ANY WARRANTY; without even the implied war- 18 | * ranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public Licence for more details. 20 | * 21 | * You should have received a copy of the GNU General Public 22 | * Licence along with this program; if not, write to the Free 23 | * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, 24 | * USA. 25 | * 26 | **/ 27 | 28 | 29 | #ifndef DECODER_H 30 | #define DECODER_H 31 | 32 | #include 33 | #include "types.h" 34 | 35 | void decode_op(uint32 instr, char *op, char *args ); 36 | 37 | #endif //DECODER_H 38 | -------------------------------------------------------------------------------- /debugger/desasm.h: -------------------------------------------------------------------------------- 1 | /* 2 | * debugger/desasm.h 3 | * 4 | * 5 | * Debugger for Mupen64 - davFr 6 | * Copyright (C) 2002 davFr - robind@esiee.fr 7 | * 8 | * Mupen64 is copyrighted (C) 2002 Hacktarux 9 | * Mupen64 homepage: http://mupen64.emulation64.com 10 | * email address: hacktarux@yahoo.fr 11 | * 12 | * This program is free software; you can redistribute it and/ 13 | * or modify it under the terms of the GNU General Public Li- 14 | * cence as published by the Free Software Foundation; either 15 | * version 2 of the Licence. 16 | * 17 | * This program is distributed in the hope that it will be use- 18 | * ful, but WITHOUT ANY WARRANTY; without even the implied war- 19 | * ranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 20 | * See the GNU General Public Licence for more details. 21 | * 22 | * You should have received a copy of the GNU General Public 23 | * Licence along with this program; if not, write to the Free 24 | * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, 25 | * USA. 26 | * 27 | **/ 28 | 29 | 30 | #ifndef DESASM_H 31 | #define DESASM_H 32 | 33 | #include 34 | #include 35 | #include 36 | #include 37 | 38 | #include 39 | 40 | #include "types.h" 41 | #include "../r4300/r4300.h" 42 | #include "../memory/memory.h" 43 | 44 | #include "debugger.h" 45 | 46 | 47 | int desasm_opened; 48 | 49 | extern pthread_t thread_n64; 50 | 51 | GtkWidget *winDesasm; 52 | 53 | void init_desasm(); 54 | int get_instruction( uint32 address, uint32 *ptr_instruction ); 55 | void update_desasm( uint32 focused_address ); 56 | void update_desasm_color( uint32 address ); 57 | 58 | void switch_button_to_run(); 59 | #endif // DESASM_H 60 | -------------------------------------------------------------------------------- /debugger/regAI.h: -------------------------------------------------------------------------------- 1 | /* 2 | * debugger/regAI.h 3 | * 4 | * 5 | * Debugger for Mupen64 - davFr 6 | * Copyright (C) 2002 davFr - robind@esiee.fr 7 | * 8 | * Mupen64 is copyrighted (C) 2002 Hacktarux 9 | * Mupen64 homepage: http://mupen64.emulation64.com 10 | * email address: hacktarux@yahoo.fr 11 | * 12 | * This program is free software; you can redistribute it and/ 13 | * or modify it under the terms of the GNU General Public Li- 14 | * cence as published by the Free Software Foundation; either 15 | * version 2 of the Licence. 16 | * 17 | * This program is distributed in the hope that it will be use- 18 | * ful, but WITHOUT ANY WARRANTY; without even the implied war- 19 | * ranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 20 | * See the GNU General Public Licence for more details. 21 | * 22 | * You should have received a copy of the GNU General Public 23 | * Licence along with this program; if not, write to the Free 24 | * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, 25 | * USA. 26 | * 27 | **/ 28 | 29 | #ifndef REGAI_H 30 | #define REGAI_H 31 | 32 | #include 33 | #include 34 | #include 35 | #include 36 | #include 37 | 38 | #include "types.h" 39 | #include "../r4300/r4300.h" 40 | #include "../memory/memory.h" 41 | 42 | #include "debugger.h" 43 | 44 | 45 | 46 | GtkWidget *frRegAI; 47 | 48 | int regAI_opened; 49 | 50 | void init_regAI(); 51 | void update_regAI(); 52 | 53 | #endif //REGAI_H 54 | -------------------------------------------------------------------------------- /debugger/regCop0.h: -------------------------------------------------------------------------------- 1 | /* 2 | * debugger/regCop0.h 3 | * 4 | * 5 | * Debugger for Mupen64 - davFr 6 | * Copyright (C) 2002 davFr - robind@esiee.fr 7 | * 8 | * Mupen64 is copyrighted (C) 2002 Hacktarux 9 | * Mupen64 homepage: http://mupen64.emulation64.com 10 | * email address: hacktarux@yahoo.fr 11 | * 12 | * This program is free software; you can redistribute it and/ 13 | * or modify it under the terms of the GNU General Public Li- 14 | * cence as published by the Free Software Foundation; either 15 | * version 2 of the Licence. 16 | * 17 | * This program is distributed in the hope that it will be use- 18 | * ful, but WITHOUT ANY WARRANTY; without even the implied war- 19 | * ranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 20 | * See the GNU General Public Licence for more details. 21 | * 22 | * You should have received a copy of the GNU General Public 23 | * Licence along with this program; if not, write to the Free 24 | * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, 25 | * USA. 26 | * 27 | **/ 28 | 29 | #ifndef REGCOP0_H 30 | #define REGCOP0_H 31 | 32 | #include 33 | #include 34 | #include 35 | #include 36 | #include 37 | 38 | #include "types.h" 39 | #include "../r4300/r4300.h" 40 | #include "../memory/memory.h" 41 | 42 | #include "debugger.h" 43 | 44 | 45 | 46 | GtkWidget *frCop0; 47 | 48 | int regCop0_opened; 49 | 50 | void init_regCop0(); 51 | void update_regCop0(); 52 | 53 | #endif //REGCOP0_H 54 | -------------------------------------------------------------------------------- /debugger/regCop1.h: -------------------------------------------------------------------------------- 1 | /* 2 | * debugger/regR4300.h 3 | * 4 | * 5 | * Debugger for Mupen64 - davFr 6 | * Copyright (C) 2002 davFr - robind@esiee.fr 7 | * 8 | * Mupen64 is copyrighted (C) 2002 Hacktarux 9 | * Mupen64 homepage: http://mupen64.emulation64.com 10 | * email address: hacktarux@yahoo.fr 11 | * 12 | * This program is free software; you can redistribute it and/ 13 | * or modify it under the terms of the GNU General Public Li- 14 | * cence as published by the Free Software Foundation; either 15 | * version 2 of the Licence. 16 | * 17 | * This program is distributed in the hope that it will be use- 18 | * ful, but WITHOUT ANY WARRANTY; without even the implied war- 19 | * ranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 20 | * See the GNU General Public Licence for more details. 21 | * 22 | * You should have received a copy of the GNU General Public 23 | * Licence along with this program; if not, write to the Free 24 | * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, 25 | * USA. 26 | * 27 | **/ 28 | 29 | #ifndef REGCOP1_H 30 | #define REGCOP1_H 31 | 32 | #include 33 | #include 34 | #include 35 | #include 36 | #include 37 | 38 | #include "types.h" 39 | #include "../r4300/r4300.h" 40 | #include "../memory/memory.h" 41 | 42 | #include "debugger.h" 43 | #include "decoder.h" 44 | 45 | 46 | int FGR_opened; 47 | 48 | GtkWidget *frFGR; 49 | 50 | void init_FGR(); 51 | void update_FGR(); 52 | 53 | #endif //REGR4300_H 54 | -------------------------------------------------------------------------------- /debugger/regGPR.h: -------------------------------------------------------------------------------- 1 | /* 2 | * debugger/regGPR.h 3 | * 4 | * 5 | * Debugger for Mupen64 - davFr 6 | * Copyright (C) 2002 davFr - robind@esiee.fr 7 | * 8 | * Mupen64 is copyrighted (C) 2002 Hacktarux 9 | * Mupen64 homepage: http://mupen64.emulation64.com 10 | * email address: hacktarux@yahoo.fr 11 | * 12 | * This program is free software; you can redistribute it and/ 13 | * or modify it under the terms of the GNU General Public Li- 14 | * cence as published by the Free Software Foundation; either 15 | * version 2 of the Licence. 16 | * 17 | * This program is distributed in the hope that it will be use- 18 | * ful, but WITHOUT ANY WARRANTY; without even the implied war- 19 | * ranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 20 | * See the GNU General Public Licence for more details. 21 | * 22 | * You should have received a copy of the GNU General Public 23 | * Licence along with this program; if not, write to the Free 24 | * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, 25 | * USA. 26 | * 27 | **/ 28 | 29 | #ifndef REGGPR_H 30 | #define REGGPR_H 31 | 32 | #include 33 | #include 34 | #include 35 | #include 36 | #include 37 | 38 | #include "types.h" 39 | #include "../r4300/r4300.h" 40 | #include "../memory/memory.h" 41 | 42 | #include "debugger.h" 43 | 44 | 45 | GtkWidget *frGPR; 46 | 47 | int GPR_opened; 48 | 49 | void init_GPR(); 50 | void update_GPR(); 51 | 52 | #endif //REGGPR_H 53 | -------------------------------------------------------------------------------- /debugger/regPI.h: -------------------------------------------------------------------------------- 1 | /* 2 | * debugger/regPI.h 3 | * 4 | * 5 | * Debugger for Mupen64 - davFr 6 | * Copyright (C) 2002 davFr - robind@esiee.fr 7 | * 8 | * Mupen64 is copyrighted (C) 2002 Hacktarux 9 | * Mupen64 homepage: http://mupen64.emulation64.com 10 | * email address: hacktarux@yahoo.fr 11 | * 12 | * This program is free software; you can redistribute it and/ 13 | * or modify it under the terms of the GNU General Public Li- 14 | * cence as published by the Free Software Foundation; either 15 | * version 2 of the Licence. 16 | * 17 | * This program is distributed in the hope that it will be use- 18 | * ful, but WITHOUT ANY WARRANTY; without even the implied war- 19 | * ranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 20 | * See the GNU General Public Licence for more details. 21 | * 22 | * You should have received a copy of the GNU General Public 23 | * Licence along with this program; if not, write to the Free 24 | * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, 25 | * USA. 26 | * 27 | **/ 28 | 29 | #ifndef REGPI_H 30 | #define REGPI_H 31 | 32 | #include 33 | #include 34 | #include 35 | #include 36 | #include 37 | 38 | #include "types.h" 39 | #include "../r4300/r4300.h" 40 | #include "../memory/memory.h" 41 | 42 | #include "debugger.h" 43 | 44 | 45 | 46 | GtkWidget *frRegPI; 47 | 48 | int regPI_opened; 49 | 50 | void init_regPI(); 51 | void update_regPI(); 52 | 53 | #endif //REGPI_H 54 | -------------------------------------------------------------------------------- /debugger/regRI.h: -------------------------------------------------------------------------------- 1 | /* 2 | * debugger/regRI.h 3 | * 4 | * 5 | * Debugger for Mupen64 - davFr 6 | * Copyright (C) 2002 davFr - robind@esiee.fr 7 | * 8 | * Mupen64 is copyrighted (C) 2002 Hacktarux 9 | * Mupen64 homepage: http://mupen64.emulation64.com 10 | * email address: hacktarux@yahoo.fr 11 | * 12 | * This program is free software; you can redistribute it and/ 13 | * or modify it under the terms of the GNU General Public Li- 14 | * cence as published by the Free Software Foundation; either 15 | * version 2 of the Licence. 16 | * 17 | * This program is distributed in the hope that it will be use- 18 | * ful, but WITHOUT ANY WARRANTY; without even the implied war- 19 | * ranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 20 | * See the GNU General Public Licence for more details. 21 | * 22 | * You should have received a copy of the GNU General Public 23 | * Licence along with this program; if not, write to the Free 24 | * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, 25 | * USA. 26 | * 27 | **/ 28 | 29 | #ifndef REGRI_H 30 | #define REGRI_H 31 | 32 | #include 33 | #include 34 | #include 35 | #include 36 | #include 37 | 38 | #include "types.h" 39 | #include "../r4300/r4300.h" 40 | #include "../memory/memory.h" 41 | 42 | #include "debugger.h" 43 | 44 | 45 | 46 | GtkWidget *frRegRI; 47 | 48 | int regRI_opened; 49 | 50 | void init_regRI(); 51 | void update_regRI(); 52 | 53 | #endif //REGRI_H 54 | -------------------------------------------------------------------------------- /debugger/regSI.h: -------------------------------------------------------------------------------- 1 | /* 2 | * debugger/regSI.h 3 | * 4 | * 5 | * Debugger for Mupen64 - davFr 6 | * Copyright (C) 2002 davFr - robind@esiee.fr 7 | * 8 | * Mupen64 is copyrighted (C) 2002 Hacktarux 9 | * Mupen64 homepage: http://mupen64.emulation64.com 10 | * email address: hacktarux@yahoo.fr 11 | * 12 | * This program is free software; you can redistribute it and/ 13 | * or modify it under the terms of the GNU General Public Li- 14 | * cence as published by the Free Software Foundation; either 15 | * version 2 of the Licence. 16 | * 17 | * This program is distributed in the hope that it will be use- 18 | * ful, but WITHOUT ANY WARRANTY; without even the implied war- 19 | * ranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 20 | * See the GNU General Public Licence for more details. 21 | * 22 | * You should have received a copy of the GNU General Public 23 | * Licence along with this program; if not, write to the Free 24 | * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, 25 | * USA. 26 | * 27 | **/ 28 | 29 | #ifndef REGSI_H 30 | #define REGSI_H 31 | 32 | #include 33 | #include 34 | #include 35 | #include 36 | #include 37 | 38 | #include "types.h" 39 | #include "../r4300/r4300.h" 40 | #include "../memory/memory.h" 41 | 42 | #include "debugger.h" 43 | 44 | 45 | 46 | GtkWidget *frRegSI; 47 | 48 | int regSI_opened; 49 | 50 | void init_regSI(); 51 | void update_regSI(); 52 | 53 | #endif //REGSI_H 54 | -------------------------------------------------------------------------------- /debugger/regSpecial.h: -------------------------------------------------------------------------------- 1 | /* 2 | * debugger/regSpecial.h 3 | * 4 | * 5 | * Debugger for Mupen64 - davFr 6 | * Copyright (C) 2002 davFr - robind@esiee.fr 7 | * 8 | * Mupen64 is copyrighted (C) 2002 Hacktarux 9 | * Mupen64 homepage: http://mupen64.emulation64.com 10 | * email address: hacktarux@yahoo.fr 11 | * 12 | * This program is free software; you can redistribute it and/ 13 | * or modify it under the terms of the GNU General Public Li- 14 | * cence as published by the Free Software Foundation; either 15 | * version 2 of the Licence. 16 | * 17 | * This program is distributed in the hope that it will be use- 18 | * ful, but WITHOUT ANY WARRANTY; without even the implied war- 19 | * ranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 20 | * See the GNU General Public Licence for more details. 21 | * 22 | * You should have received a copy of the GNU General Public 23 | * Licence along with this program; if not, write to the Free 24 | * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, 25 | * USA. 26 | * 27 | **/ 28 | 29 | #ifndef REGSPECIAL_H 30 | #define REGSPECIAL_H 31 | 32 | #include 33 | #include 34 | #include 35 | #include 36 | #include 37 | 38 | #include "types.h" 39 | #include "../r4300/r4300.h" 40 | #include "../memory/memory.h" 41 | 42 | #include "debugger.h" 43 | #include "decoder.h" 44 | 45 | 46 | int regSpecial_opened; 47 | 48 | GtkWidget *frRegSpecial; 49 | 50 | void init_regSpecial(); 51 | void update_regSpecial(); 52 | 53 | #endif //REGSPECIAL_H 54 | -------------------------------------------------------------------------------- /debugger/regTLB.h: -------------------------------------------------------------------------------- 1 | /* 2 | * debugger/regTLB.h 3 | * 4 | * 5 | * Debugger for Mupen64 - davFr 6 | * Copyright (C) 2002 davFr - robind@esiee.fr 7 | * 8 | * Mupen64 is copyrighted (C) 2002 Hacktarux 9 | * Mupen64 homepage: http://mupen64.emulation64.com 10 | * email address: hacktarux@yahoo.fr 11 | * 12 | * This program is free software; you can redistribute it and/ 13 | * or modify it under the terms of the GNU General Public Li- 14 | * cence as published by the Free Software Foundation; either 15 | * version 2 of the Licence. 16 | * 17 | * This program is distributed in the hope that it will be use- 18 | * ful, but WITHOUT ANY WARRANTY; without even the implied war- 19 | * ranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 20 | * See the GNU General Public Licence for more details. 21 | * 22 | * You should have received a copy of the GNU General Public 23 | * Licence along with this program; if not, write to the Free 24 | * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, 25 | * USA. 26 | * 27 | **/ 28 | 29 | #ifndef REGTLB_H 30 | #define REGTLB_H 31 | 32 | #include 33 | #include 34 | #include 35 | #include 36 | #include 37 | 38 | #include "types.h" 39 | #include "../r4300/r4300.h" 40 | #include "../memory/memory.h" 41 | 42 | #include "debugger.h" 43 | #include "decoder.h" 44 | 45 | 46 | int regTLB_opened; 47 | 48 | GtkWidget *winTLB, *frTLB; 49 | 50 | 51 | void init_regTLB(); 52 | void update_regTLB(); 53 | 54 | void init_TLBwindow(); 55 | void update_TLBwindow(); 56 | 57 | #endif //REGTLB_H 58 | -------------------------------------------------------------------------------- /debugger/regVI.h: -------------------------------------------------------------------------------- 1 | /* 2 | * debugger/regVI.h 3 | * 4 | * 5 | * Debugger for Mupen64 - davFr 6 | * Copyright (C) 2002 davFr - robind@esiee.fr 7 | * 8 | * Mupen64 is copyrighted (C) 2002 Hacktarux 9 | * Mupen64 homepage: http://mupen64.emulation64.com 10 | * email address: hacktarux@yahoo.fr 11 | * 12 | * This program is free software; you can redistribute it and/ 13 | * or modify it under the terms of the GNU General Public Li- 14 | * cence as published by the Free Software Foundation; either 15 | * version 2 of the Licence. 16 | * 17 | * This program is distributed in the hope that it will be use- 18 | * ful, but WITHOUT ANY WARRANTY; without even the implied war- 19 | * ranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 20 | * See the GNU General Public Licence for more details. 21 | * 22 | * You should have received a copy of the GNU General Public 23 | * Licence along with this program; if not, write to the Free 24 | * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, 25 | * USA. 26 | * 27 | **/ 28 | 29 | #ifndef REGVI_H 30 | #define REGVI_H 31 | 32 | #include 33 | #include 34 | #include 35 | #include 36 | #include 37 | 38 | #include "types.h" 39 | #include "../r4300/r4300.h" 40 | #include "../memory/memory.h" 41 | 42 | #include "debugger.h" 43 | 44 | 45 | 46 | GtkWidget *frRegVI; 47 | 48 | int regVI_opened; 49 | 50 | void init_regVI(); 51 | void update_regVI(); 52 | 53 | #endif //REGVI_H 54 | -------------------------------------------------------------------------------- /debugger/registers.h: -------------------------------------------------------------------------------- 1 | /* 2 | * debugger/registers.h 3 | * 4 | * 5 | * Debugger for Mupen64 - davFr 6 | * Copyright (C) 2002 davFr - robind@esiee.fr 7 | * 8 | * Mupen64 is copyrighted (C) 2002 Hacktarux 9 | * Mupen64 homepage: http://mupen64.emulation64.com 10 | * email address: hacktarux@yahoo.fr 11 | * 12 | * This program is free software; you can redistribute it and/ 13 | * or modify it under the terms of the GNU General Public Li- 14 | * cence as published by the Free Software Foundation; either 15 | * version 2 of the Licence. 16 | * 17 | * This program is distributed in the hope that it will be use- 18 | * ful, but WITHOUT ANY WARRANTY; without even the implied war- 19 | * ranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 20 | * See the GNU General Public Licence for more details. 21 | * 22 | * You should have received a copy of the GNU General Public 23 | * Licence along with this program; if not, write to the Free 24 | * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, 25 | * USA. 26 | * 27 | **/ 28 | 29 | #ifndef REGISTERS_H 30 | #define REGISTERS_H 31 | 32 | #include 33 | #include 34 | #include 35 | #include 36 | #include 37 | 38 | #include "types.h" 39 | #include "../r4300/r4300.h" 40 | #include "../memory/memory.h" 41 | 42 | //#include "debugger.h" 43 | #include "decoder.h" 44 | #include "regGPR.h" 45 | #include "regSpecial.h" 46 | #include "regCop0.h" 47 | #include "regCop1.h" 48 | #include "regAI.h" 49 | #include "regPI.h" 50 | #include "regRI.h" 51 | #include "regSI.h" 52 | #include "regVI.h" 53 | 54 | 55 | int registers_opened; 56 | 57 | extern pthread_t thread_n64; 58 | 59 | void init_registers(); 60 | void update_registers(); 61 | 62 | #endif //REGISTERS_H 63 | -------------------------------------------------------------------------------- /debugger/types.h: -------------------------------------------------------------------------------- 1 | #ifndef TYPES_H 2 | #define TYPES_H 3 | 4 | 5 | typedef unsigned char uint8; 6 | typedef unsigned short uint16; 7 | typedef unsigned long uint32; 8 | typedef unsigned long long int uint64; 9 | 10 | typedef signed char sint8; 11 | typedef signed short sint16; 12 | typedef signed long sint32; 13 | typedef signed long long int sint64; 14 | 15 | typedef float fp32; 16 | typedef double fp64; 17 | 18 | #endif 19 | -------------------------------------------------------------------------------- /debugger/ui_clist_edit.h: -------------------------------------------------------------------------------- 1 | /* 2 | * (SLIK) SimpLIstic sKin functions 3 | * (C) 2002 John Ellis 4 | * 5 | * Author: John Ellis 6 | * 7 | * This software is released under the GNU General Public License (GNU GPL). 8 | * Please read the included file COPYING for more information. 9 | * This software comes with no warranty of any kind, use at your own risk! 10 | */ 11 | 12 | 13 | #ifndef UI_CLIST_EDIT_H 14 | #define UI_CLIST_EDIT_H 15 | 16 | 17 | typedef struct _ClistEditData ClistEditData; 18 | struct _ClistEditData 19 | { 20 | GtkWidget *window; 21 | GtkWidget *entry; 22 | 23 | gchar *old_name; 24 | gchar *new_name; 25 | 26 | gint (*edit_func)(ClistEditData *ced, const gchar *oldname, const gchar *newname, gpointer data); 27 | gpointer edit_data; 28 | 29 | GtkCList *clist; 30 | gint row; 31 | gint column; 32 | }; 33 | 34 | 35 | /* 36 | * edit_func: return TRUE is rename successful, FALSE on failure. 37 | */ 38 | gint clist_edit_by_row(GtkCList *clist, gint row, gint column, 39 | gint (*edit_func)(ClistEditData *, const gchar *, const gchar *, gpointer), gpointer data); 40 | 41 | /* 42 | * use this when highlighting a right-click menued or dnd clist row. 43 | */ 44 | void clist_edit_set_highlight(GtkWidget *clist, gint row, gint set); 45 | 46 | /* 47 | * Useful for alternating dark/light rows in lists. 48 | */ 49 | void clist_edit_shift_color(GtkStyle *style); 50 | 51 | /* 52 | * Various g_list utils, do not really fit anywhere, so they are here. 53 | */ 54 | GList *uig_list_insert_link(GList *list, GList *link, gpointer data); 55 | GList *uig_list_insert_list(GList *parent, GList *insert_link, GList *list); 56 | 57 | 58 | #endif 59 | 60 | -------------------------------------------------------------------------------- /doc/compile.sh: -------------------------------------------------------------------------------- 1 | latex readme.latex 2 | latex readme.latex 3 | dvips -Ppdf -G0 readme.dvi -o readme.ps 4 | ps2pdf -sPAPERSIZE=a4 -dMaxSubsetPct=100 -dCompatibilityLevel=1.2 -dSubSetFonts=true -dEmbedAllFonts=true readme.ps 5 | -------------------------------------------------------------------------------- /doc/readme.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FIX94/mupen64gc-fix94/e5d9d9cc9fea4b1abaf79635cd00893a56a03ff9/doc/readme.pdf -------------------------------------------------------------------------------- /fileBrowser/HW64/banner.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FIX94/mupen64gc-fix94/e5d9d9cc9fea4b1abaf79635cd00893a56a03ff9/fileBrowser/HW64/banner.bin -------------------------------------------------------------------------------- /fileBrowser/HW64/cert: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FIX94/mupen64gc-fix94/e5d9d9cc9fea4b1abaf79635cd00893a56a03ff9/fileBrowser/HW64/cert -------------------------------------------------------------------------------- /fileBrowser/HW64/customTitle.h: -------------------------------------------------------------------------------- 1 | /* customTitle.h - For loading our own title 2 | by Mike Slegeir for Mupen64-GC 3 | */ 4 | 5 | #ifndef CUSTOM_TITLE_H 6 | #define CUSTOM_TITLE_H 7 | 8 | #define TITLE_ID (0x0001000148573634LL) 9 | 10 | extern void* customTicket; 11 | extern unsigned int customTicketSize; 12 | extern void* customTMD; 13 | extern unsigned int customTMDSize; 14 | extern void* customCert; 15 | extern unsigned int customCertSize; 16 | extern void* customBanner; 17 | extern unsigned int customBannerSize; 18 | 19 | #endif 20 | -------------------------------------------------------------------------------- /fileBrowser/HW64/customTitle.s: -------------------------------------------------------------------------------- 1 | .rodata 2 | 3 | .balign 32 4 | _customTMD: 5 | .incbin "./fileBrowser/HW64/hw64.tmd" 6 | .globl customTMD 7 | customTMD: 8 | .long _customTMD 9 | .globl customTMDSize 10 | customTMDSize: 11 | .long (customTMD - _customTMD) 12 | 13 | .balign 32 14 | _customTicket: 15 | .incbin "./fileBrowser/HW64/hw64.tik" 16 | .globl customTicket 17 | customTicket: 18 | .long _customTicket 19 | .globl customTicketSize 20 | customTicketSize: 21 | .long (customTicket - _customTicket) 22 | 23 | .balign 32 24 | _customCert: 25 | /**/ 26 | .incbin "./fileBrowser/HW64/cert" 27 | /**/ 28 | .globl customCert 29 | customCert: 30 | .long /*0/**/_customCert/**/ 31 | .globl customCertSize 32 | customCertSize: 33 | .long (customCert - _customCert) 34 | 35 | .balign 32 36 | _customBanner: 37 | .incbin "./fileBrowser/HW64/banner.bin" 38 | .globl customBanner 39 | customBanner: 40 | .long _customBanner 41 | .globl customBannerSize 42 | customBannerSize: 43 | .long (customBanner - _customBanner) 44 | 45 | 46 | -------------------------------------------------------------------------------- /fileBrowser/HW64/hw64.tik: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FIX94/mupen64gc-fix94/e5d9d9cc9fea4b1abaf79635cd00893a56a03ff9/fileBrowser/HW64/hw64.tik -------------------------------------------------------------------------------- /fileBrowser/HW64/hw64.tmd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FIX94/mupen64gc-fix94/e5d9d9cc9fea4b1abaf79635cd00893a56a03ff9/fileBrowser/HW64/hw64.tmd -------------------------------------------------------------------------------- /fileBrowser/fileBrowser-CARD.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Wii64 - fileBrowser-CARD.h 3 | * Copyright (C) 2007, 2008, 2009 emu_kidid 4 | * 5 | * fileBrowser module for Nintendo Gamecube Memory Cards 6 | * 7 | * Wii64 homepage: http://www.emulatemii.com 8 | * email address: emukidid@gmail.com 9 | * 10 | * 11 | * This program is free software; you can redistribute it and/ 12 | * or modify it under the terms of the GNU General Public Li- 13 | * cence as published by the Free Software Foundation; either 14 | * version 2 of the Licence, or any later version. 15 | * 16 | * This program is distributed in the hope that it will be use- 17 | * ful, but WITHOUT ANY WARRANTY; without even the implied war- 18 | * ranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public Licence for more details. 20 | * 21 | **/ 22 | 23 | 24 | #ifndef FILE_BROWSER_CARD_H 25 | #define FILE_BROWSER_CARD_H 26 | 27 | #include "fileBrowser.h" 28 | 29 | extern fileBrowser_file topLevel_CARD_SlotA; 30 | extern fileBrowser_file topLevel_CARD_SlotB; 31 | #define saveDir_CARD_SlotA topLevel_CARD_SlotA 32 | #define saveDir_CARD_SlotB topLevel_CARD_SlotB 33 | 34 | int fileBrowser_CARD_readDir(fileBrowser_file*, fileBrowser_file**); 35 | int fileBrowser_CARD_readFile(fileBrowser_file*, void*, unsigned int); 36 | int fileBrowser_CARD_writeFile(fileBrowser_file*, void*, unsigned int); 37 | int fileBrowser_CARD_seekFile(fileBrowser_file*, unsigned int, unsigned int); 38 | int fileBrowser_CARD_init(fileBrowser_file* file); 39 | int fileBrowser_CARD_deinit(fileBrowser_file* file); 40 | 41 | #endif 42 | 43 | -------------------------------------------------------------------------------- /fileBrowser/fileBrowser-DVD.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Wii64 - fileBrowser-DVD.h 3 | * Copyright (C) 2007, 2008, 2009 emu_kidid 4 | * 5 | * fileBrowser module for ISO9660 DVD Discs 6 | * 7 | * Wii64 homepage: http://www.emulatemii.com 8 | * email address: emukidid@gmail.com 9 | * 10 | * 11 | * This program is free software; you can redistribute it and/ 12 | * or modify it under the terms of the GNU General Public Li- 13 | * cence as published by the Free Software Foundation; either 14 | * version 2 of the Licence, or any later version. 15 | * 16 | * This program is distributed in the hope that it will be use- 17 | * ful, but WITHOUT ANY WARRANTY; without even the implied war- 18 | * ranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public Licence for more details. 20 | * 21 | **/ 22 | 23 | 24 | #ifndef FILE_BROWSER_DVD_H 25 | #define FILE_BROWSER_DVD_H 26 | 27 | #include "fileBrowser.h" 28 | 29 | extern fileBrowser_file topLevel_DVD; 30 | 31 | int fileBrowser_DVD_readDir(fileBrowser_file*, fileBrowser_file**); 32 | int fileBrowser_DVD_readFile(fileBrowser_file*, void*, unsigned int); 33 | int fileBrowser_DVD_seekFile(fileBrowser_file*, unsigned int, unsigned int); 34 | int fileBrowser_DVD_init(fileBrowser_file* file); 35 | int fileBrowser_DVD_deinit(fileBrowser_file* file); 36 | 37 | #endif 38 | 39 | -------------------------------------------------------------------------------- /fileBrowser/fileBrowser-WiiFS.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Wii64 - fileBrowser-WiiFS.h 3 | * Copyright (C) 2007, 2008, 2009 Mike Slegeir 4 | * 5 | * fileBrowser Wii FileSystem module 6 | * 7 | * Wii64 homepage: http://www.emulatemii.com 8 | * email address: tehpola@gmail.com 9 | * 10 | * 11 | * This program is free software; you can redistribute it and/ 12 | * or modify it under the terms of the GNU General Public Li- 13 | * cence as published by the Free Software Foundation; either 14 | * version 2 of the Licence, or any later version. 15 | * 16 | * This program is distributed in the hope that it will be use- 17 | * ful, but WITHOUT ANY WARRANTY; without even the implied war- 18 | * ranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public Licence for more details. 20 | * 21 | **/ 22 | 23 | 24 | #ifndef FILE_BROWSER_WIIFS_H 25 | #define FILE_BROWSER_WIIFS_H 26 | 27 | #include "fileBrowser.h" 28 | 29 | extern fileBrowser_file topLevel_WiiFS; 30 | extern fileBrowser_file saveDir_WiiFS; 31 | 32 | int fileBrowser_WiiFS_readDir(fileBrowser_file*, fileBrowser_file**); 33 | int fileBrowser_WiiFS_readFile(fileBrowser_file*, void*, unsigned int); 34 | int fileBrowser_WiiFS_writeFile(fileBrowser_file*, void*, unsigned int); 35 | int fileBrowser_WiiFS_seekFile(fileBrowser_file*, unsigned int, unsigned int); 36 | int fileBrowser_WiiFS_init(fileBrowser_file* f); 37 | int fileBrowser_WiiFS_deinit(fileBrowser_file* f); 38 | 39 | int fileBrowser_WiiFSROM_readFile(fileBrowser_file*, void*, unsigned int); 40 | int fileBrowser_WiiFSROM_init(fileBrowser_file*); 41 | int fileBrowser_WiiFSROM_deinit(fileBrowser_file*); 42 | 43 | #endif 44 | 45 | -------------------------------------------------------------------------------- /fileBrowser/fileBrowser-libfat.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Wii64 - fileBrowser-libfat.h 3 | * Copyright (C) 2007, 2008, 2009 Mike Slegeir 4 | * Copyright (C) 2007, 2008, 2009 emu_kidid 5 | * 6 | * fileBrowser for any devices using libfat 7 | * 8 | * Wii64 homepage: http://www.emulatemii.com 9 | * email address: tehpola@gmail.com 10 | * emukidid@gmail.com 11 | * 12 | * 13 | * This program is free software; you can redistribute it and/ 14 | * or modify it under the terms of the GNU General Public Li- 15 | * cence as published by the Free Software Foundation; either 16 | * version 2 of the Licence, or any later version. 17 | * 18 | * This program is distributed in the hope that it will be use- 19 | * ful, but WITHOUT ANY WARRANTY; without even the implied war- 20 | * ranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 21 | * See the GNU General Public Licence for more details. 22 | * 23 | **/ 24 | 25 | 26 | #ifndef FILE_BROWSER_LIBFAT_H 27 | #define FILE_BROWSER_LIBFAT_H 28 | 29 | extern fileBrowser_file topLevel_libfat_Default; //GC SD Slots & Wii Front SD Slot 30 | extern fileBrowser_file topLevel_libfat_USB; //Wii only, USB 31 | extern fileBrowser_file saveDir_libfat_Default; //GC SD Slots & Wii Front SD Slot 32 | extern fileBrowser_file saveDir_libfat_USB; //Wii only, USB 33 | 34 | int fileBrowser_libfat_readDir(fileBrowser_file*, fileBrowser_file**); 35 | int fileBrowser_libfat_readFile(fileBrowser_file*, void*, unsigned int); 36 | int fileBrowser_libfat_writeFile(fileBrowser_file*, void*, unsigned int); 37 | int fileBrowser_libfat_seekFile(fileBrowser_file*, unsigned int, unsigned int); 38 | int fileBrowser_libfat_init(fileBrowser_file* f); 39 | int fileBrowser_libfat_deinit(fileBrowser_file* f); 40 | 41 | int fileBrowser_libfatROM_readFile(fileBrowser_file*, void*, unsigned int); 42 | int fileBrowser_libfatROM_deinit(fileBrowser_file* f); 43 | 44 | void pauseRemovalThread(); 45 | void continueRemovalThread(); 46 | 47 | #endif 48 | -------------------------------------------------------------------------------- /fileBrowser/fileBrowser.c: -------------------------------------------------------------------------------- 1 | /** 2 | * Wii64 - fileBrowser.c 3 | * Copyright (C) 2007, 2008, 2009 Mike Slegeir 4 | * Copyright (C) 2007, 2008, 2009 emu_kidid 5 | * 6 | * Actual declarations of all the fileBrowser function pointers, etc 7 | * 8 | * Wii64 homepage: http://www.emulatemii.com 9 | * email address: tehpola@gmail.com 10 | * emukidid@gmail.com 11 | * 12 | * 13 | * This program is free software; you can redistribute it and/ 14 | * or modify it under the terms of the GNU General Public Li- 15 | * cence as published by the Free Software Foundation; either 16 | * version 2 of the Licence, or any later version. 17 | * 18 | * This program is distributed in the hope that it will be use- 19 | * ful, but WITHOUT ANY WARRANTY; without even the implied war- 20 | * ranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 21 | * See the GNU General Public Licence for more details. 22 | * 23 | **/ 24 | 25 | #include "fileBrowser.h" 26 | 27 | #define NULL 0 28 | 29 | fileBrowser_file* romFile_topLevel; 30 | fileBrowser_file* saveFile_dir; 31 | 32 | int (*romFile_init)(fileBrowser_file*) = NULL; 33 | int (*romFile_readDir)(fileBrowser_file*, fileBrowser_file**) = NULL; 34 | int (*romFile_readFile)(fileBrowser_file*, void*, unsigned int) = NULL; 35 | int (*romFile_seekFile)(fileBrowser_file*, unsigned int, unsigned int) = NULL; 36 | int (*romFile_deinit)(fileBrowser_file*) = NULL; 37 | 38 | int (*saveFile_init)(fileBrowser_file*) = NULL; 39 | //int (*saveFile_exists)(fileBrowser_file*) = NULL; 40 | int (*saveFile_readFile)(fileBrowser_file*, void*, unsigned int) = NULL; 41 | int (*saveFile_writeFile)(fileBrowser_file*, void*, unsigned int) = NULL; 42 | int (*saveFile_deinit)(fileBrowser_file*) = NULL; 43 | 44 | -------------------------------------------------------------------------------- /fileBrowser/imagedata/Thumbs.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FIX94/mupen64gc-fix94/e5d9d9cc9fea4b1abaf79635cd00893a56a03ff9/fileBrowser/imagedata/Thumbs.db -------------------------------------------------------------------------------- /fileBrowser/imagedata/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FIX94/mupen64gc-fix94/e5d9d9cc9fea4b1abaf79635cd00893a56a03ff9/fileBrowser/imagedata/icon.png -------------------------------------------------------------------------------- /gc_audio/AudioPlugin.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Wii64 - AudioPlugin.h 3 | * Copyright (C) 2007, 2008, 2009 Mike Slegeir 4 | * 5 | * Mangles the plugin so it can be linked statically 6 | * 7 | * Wii64 homepage: http://www.emulatemii.com 8 | * email address: tehpola@gmail.com 9 | * 10 | * 11 | * This program is free software; you can redistribute it and/ 12 | * or modify it under the terms of the GNU General Public Li- 13 | * cence as published by the Free Software Foundation; either 14 | * version 2 of the Licence, or any later version. 15 | * 16 | * This program is distributed in the hope that it will be use- 17 | * ful, but WITHOUT ANY WARRANTY; without even the implied war- 18 | * ranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public Licence for more details. 20 | * 21 | **/ 22 | 23 | 24 | #ifndef AUDIO_PLUGIN_H 25 | #define AUDIO_PLUGIN_H 26 | 27 | #define RomClosed romClosed_audio 28 | #define RomOpen romOpen_audio 29 | #define GetDllInfo getDllInfo_audio 30 | #define DllConfig dllConfig_audio 31 | #define DllTest dllTest_audio 32 | #define DllAbout dllAbout_audio 33 | #define CloseDLL closeDLL_audio 34 | 35 | #define AiDacrateChanged aiDacrateChanged 36 | #define AiLenChanged aiLenChanged 37 | #define AiReadLength aiReadLength 38 | #define AiUpdate aiUpdate 39 | #define InitiateAudio initiateAudio 40 | #define ProcessAlist processAList 41 | 42 | #endif 43 | 44 | -------------------------------------------------------------------------------- /gc_input/InputPlugin.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Wii64 - InputPlugin.h 3 | * Copyright (C) 2007, 2008, 2009 Mike Slegeir 4 | * 5 | * Mangles the plugin so it can be linked staticly 6 | * 7 | * Wii64 homepage: http://www.emulatemii.com 8 | * email address: tehpola@gmail.com 9 | * 10 | * 11 | * This program is free software; you can redistribute it and/ 12 | * or modify it under the terms of the GNU General Public Li- 13 | * cence as published by the Free Software Foundation; either 14 | * version 2 of the Licence, or any later version. 15 | * 16 | * This program is distributed in the hope that it will be use- 17 | * ful, but WITHOUT ANY WARRANTY; without even the implied war- 18 | * ranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public Licence for more details. 20 | * 21 | **/ 22 | 23 | 24 | #ifndef INPUT_PLUGIN_H 25 | #define INPUT_PLUGIN_H 26 | 27 | #define RomClosed romClosed_input 28 | #define RomOpen romOpen_input 29 | #define GetDllInfo getDllInfo_input 30 | #define DllConfig dllConfig_input 31 | #define DllTest dllTest_input 32 | #define DllAbout dllAbout_input 33 | #define CloseDLL closeDLL_input 34 | 35 | #define ControllerCommand controllerCommand 36 | #define GetKeys getKeys 37 | #define InitiateControllers initiateControllers 38 | #define ReadController readController 39 | #define WM_KeyDown wM_KeyDown 40 | #define WM_KeyUp wM_KeyUp 41 | 42 | #endif 43 | 44 | -------------------------------------------------------------------------------- /gc_input/PakIO.h: -------------------------------------------------------------------------------- 1 | /* PakIO.h - Defines for Raw Data handling 2 | A gutted version of PakIO.h from N-Rage`s Dinput8 Plugin 3 | (C) 2002, 2006 Norbert Wladyka (Released under the GPLv2) 4 | */ 5 | 6 | #ifndef PAKIO_H 7 | #define PAKIO_H 8 | 9 | //************Raw Data***********// 10 | //byte 1 = number of bytes to send 11 | //byte 2 = number of bytes to recieve 12 | //byte 3 = Command Type 13 | 14 | // get status 15 | #define RD_GETSTATUS 0x00 16 | // read button values 17 | #define RD_READKEYS 0x01 18 | // read from controllerpak 19 | #define RD_READPAK 0x02 20 | // write to controllerpack 21 | #define RD_WRITEPAK 0x03 22 | // reset controller 23 | #define RD_RESETCONTROLLER 0xff 24 | // read eeprom 25 | #define RD_READEEPROM 0x04 26 | // write eeprom 27 | #define RD_WRITEEPROM 0x05 28 | 29 | // Codes for retrieving status 30 | // 0x010300 - A1B2C3FF 31 | 32 | //A1 33 | // Default GamePad 34 | #define RD_ABSOLUTE 0x01 35 | #define RD_RELATIVE 0x02 36 | // Default GamePad 37 | #define RD_GAMEPAD 0x04 38 | 39 | //B2 40 | #define RD_EEPROM 0x80 41 | #define RD_NOEEPROM 0x00 42 | 43 | //C3 44 | // No Plugin in Controller 45 | #define RD_NOPLUGIN 0x00 46 | // Plugin in Controller (Mempack, RumblePack etc) 47 | #define RD_PLUGIN 0x01 48 | // Pak interface was uninitialized before the call 49 | #define RD_NOTINITIALIZED 0x02 50 | // Address of last Pak I/O was invalid 51 | #define RD_ADDRCRCERR 0x04 52 | // eeprom busy 53 | #define RD_EEPROMBUSY 0x80 54 | 55 | // The Error values are as follows: 56 | // 0x01ER00 - ........ 57 | 58 | //ER 59 | // no error, operation successful. 60 | #define RD_OK 0x00 61 | // error, device not present for specified command. 62 | #define RD_ERROR 0x80 63 | // error, unable to send/recieve the number bytes for command type. 64 | #define RD_WRONGSIZE 0x40 65 | 66 | // the address where rumble-commands are sent to 67 | // this is really 0xC01B but our addressing code truncates the last several bits. 68 | #define PAK_IO_RUMBLE 0xC000 69 | 70 | #endif 71 | -------------------------------------------------------------------------------- /gc_memory/ARAM.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Wii64 - ARAM.h 3 | * Copyright (C) 2007, 2008, 2009 Mike Slegeir 4 | * 5 | * This is the ARAM manager 6 | * 7 | * Wii64 homepage: http://www.emulatemii.com 8 | * email address: tehpola@gmail.com 9 | * 10 | * 11 | * This program is free software; you can redistribute it and/ 12 | * or modify it under the terms of the GNU General Public Li- 13 | * cence as published by the Free Software Foundation; either 14 | * version 2 of the Licence, or any later version. 15 | * 16 | * This program is distributed in the hope that it will be use- 17 | * ful, but WITHOUT ANY WARRANTY; without even the implied war- 18 | * ranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public Licence for more details. 20 | * 21 | **/ 22 | 23 | 24 | #ifndef ARAM_H 25 | #define ARAM_H 26 | 27 | #define BLOCK_SIZE (64*1024) 28 | 29 | void ARAM_manager_init(void); 30 | void ARAM_manager_deinit(void); 31 | 32 | // Returns the number of available blocks 33 | int ARAM_block_available(void); 34 | int ARAM_block_available_contiguous(void); 35 | 36 | // Allocs/Frees blocks in aram 37 | // ptr [in/out]: the pointer to the new ARAM_block pointer, e.g. &ROM_blocks[rom_offset>>20] 38 | // owner [in]: a char unique to the owner of the block 39 | // [out]: the address of the new block 40 | char* ARAM_block_alloc(unsigned char** ptr, unsigned char owner); 41 | char* ARAM_block_alloc_contiguous(unsigned char** ptr, unsigned char owner, unsigned int num_blocks); 42 | void ARAM_block_free(unsigned char** ptr); 43 | void ARAM_block_free_contiguous(unsigned char** ptr, unsigned int num_blocks); 44 | 45 | // Finds the least recently used block of the specified owner 46 | unsigned char** ARAM_block_LRU(unsigned char owner); 47 | void ARAM_block_update_LRU(unsigned char** ptr); 48 | 49 | #endif 50 | 51 | -------------------------------------------------------------------------------- /gc_memory/Saves.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Wii64 - Saves.h 3 | * Copyright (C) 2007, 2008, 2009 Mike Slegeir 4 | * 5 | * Defines/globals for saving files 6 | * 7 | * Wii64 homepage: http://www.emulatemii.com 8 | * email address: tehpola@gmail.com 9 | * 10 | * 11 | * This program is free software; you can redistribute it and/ 12 | * or modify it under the terms of the GNU General Public Li- 13 | * cence as published by the Free Software Foundation; either 14 | * version 2 of the Licence, or any later version. 15 | * 16 | * This program is distributed in the hope that it will be use- 17 | * ful, but WITHOUT ANY WARRANTY; without even the implied war- 18 | * ranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public Licence for more details. 20 | * 21 | **/ 22 | 23 | 24 | #ifndef SAVES_H 25 | #define SAVES_H 26 | 27 | #include "../fileBrowser/fileBrowser.h" 28 | 29 | /* 30 | extern char saveEnabled; 31 | extern int savetype; 32 | extern char savepath[]; 33 | 34 | #define SELECTION_SLOT_A 0 35 | #define SELECTION_SLOT_B 1 36 | #define SELECTION_TYPE_SD 2 37 | #define SELECTION_TYPE_MEM 0*/ 38 | 39 | // Return 0 if load/save fails, 1 otherwise 40 | 41 | int loadEeprom(fileBrowser_file* savepath); 42 | int saveEeprom(fileBrowser_file* savepath); 43 | 44 | int loadMempak(fileBrowser_file* savepath); 45 | int saveMempak(fileBrowser_file* savepath); 46 | 47 | int loadSram(fileBrowser_file* savepath); 48 | int saveSram(fileBrowser_file* savepath); 49 | 50 | int loadFlashram(fileBrowser_file* savepath); 51 | int saveFlashram(fileBrowser_file* savepath); 52 | 53 | #endif 54 | 55 | -------------------------------------------------------------------------------- /gc_memory/TLB-Cache.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Wii64 - TLB-Cache.h 3 | * Copyright (C) 2007, 2008, 2009 Mike Slegeir 4 | * 5 | * This is how the TLB LUT should be accessed, this way it won't waste RAM 6 | * 7 | * Wii64 homepage: http://www.emulatemii.com 8 | * email address: tehpola@gmail.com 9 | * 10 | * 11 | * This program is free software; you can redistribute it and/ 12 | * or modify it under the terms of the GNU General Public Li- 13 | * cence as published by the Free Software Foundation; either 14 | * version 2 of the Licence, or any later version. 15 | * 16 | * This program is distributed in the hope that it will be use- 17 | * ful, but WITHOUT ANY WARRANTY; without even the implied war- 18 | * ranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public Licence for more details. 20 | * 21 | **/ 22 | 23 | 24 | #ifndef TLB_CACHE_H 25 | #define TLB_CACHE_H 26 | 27 | #ifdef USE_TLB_CACHE 28 | 29 | #include 30 | 31 | // Num Slots must be a power of 2! 32 | #define TLB_NUM_SLOTS 64 33 | 34 | // The amount of bits required to represent a page 35 | // number, don't change. Required for hash calc 36 | #define TLB_BITS_PER_PAGE_NUM 20 37 | 38 | typedef struct node { 39 | unsigned int value; 40 | unsigned int page; 41 | struct node* next; 42 | } TLB_hash_node; 43 | 44 | void TLBCache_init(void); 45 | void TLBCache_deinit(void); 46 | 47 | unsigned int inline TLBCache_get_r(unsigned int page); 48 | unsigned int inline TLBCache_get_w(unsigned int page); 49 | 50 | void inline TLBCache_set_r(unsigned int page, unsigned int val); 51 | void inline TLBCache_set_w(unsigned int page, unsigned int val); 52 | 53 | // for savestates 54 | void TLBCache_dump_r(gzFile *f); 55 | void TLBCache_dump_w(gzFile *f); 56 | 57 | void ARAM_ReadTLBBlock(unsigned int addr, int type); 58 | void ARAM_WriteTLBBlock(unsigned int addr, int type); 59 | 60 | #endif 61 | 62 | #endif 63 | 64 | -------------------------------------------------------------------------------- /gc_memory/dma.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Mupen64 - dma.h 3 | * Copyright (C) 2002 Hacktarux 4 | * 5 | * Mupen64 homepage: http://mupen64.emulation64.com 6 | * email address: hacktarux@yahoo.fr 7 | * 8 | * If you want to contribute to the project please contact 9 | * me first (maybe someone is already making what you are 10 | * planning to do). 11 | * 12 | * 13 | * This program is free software; you can redistribute it and/ 14 | * or modify it under the terms of the GNU General Public Li- 15 | * cence as published by the Free Software Foundation; either 16 | * version 2 of the Licence, or any later version. 17 | * 18 | * This program is distributed in the hope that it will be use- 19 | * ful, but WITHOUT ANY WARRANTY; without even the implied war- 20 | * ranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 21 | * See the GNU General Public Licence for more details. 22 | * 23 | * You should have received a copy of the GNU General Public 24 | * Licence along with this program; if not, write to the Free 25 | * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, 26 | * USA. 27 | * 28 | **/ 29 | 30 | #ifndef DMA_H 31 | #define DMA_H 32 | 33 | void dma_pi_write(); 34 | void dma_pi_read(); 35 | void dma_si_write(); 36 | void dma_si_read(); 37 | void dma_sp_write(); 38 | void dma_sp_read(); 39 | 40 | #endif 41 | -------------------------------------------------------------------------------- /gc_memory/flashram.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Mupen64 - flashram.c 3 | * Copyright (C) 2002 Hacktarux 4 | * 5 | * Mupen64 homepage: http://mupen64.emulation64.com 6 | * email address: hacktarux@yahoo.fr 7 | * 8 | * If you want to contribute to the project please contact 9 | * me first (maybe someone is already making what you are 10 | * planning to do). 11 | * 12 | * 13 | * This program is free software; you can redistribute it and/ 14 | * or modify it under the terms of the GNU General Public Li- 15 | * cence as published by the Free Software Foundation; either 16 | * version 2 of the Licence, or any later version. 17 | * 18 | * This program is distributed in the hope that it will be use- 19 | * ful, but WITHOUT ANY WARRANTY; without even the implied war- 20 | * ranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 21 | * See the GNU General Public Licence for more details. 22 | * 23 | * You should have received a copy of the GNU General Public 24 | * Licence along with this program; if not, write to the Free 25 | * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, 26 | * USA. 27 | * 28 | **/ 29 | 30 | extern int use_flashram; 31 | 32 | 33 | void init_flashram(); 34 | void reset_flashram(); 35 | void flashram_command(unsigned long command); 36 | unsigned long flashram_status(); 37 | void dma_read_flashram(); 38 | void dma_write_flashram(); 39 | 40 | void save_flashram_infos(char *buf); 41 | void load_flashram_infos(char *buf); 42 | -------------------------------------------------------------------------------- /gc_memory/pif.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Mupen64 - pif.h 3 | * Copyright (C) 2002 Hacktarux 4 | * 5 | * Mupen64 homepage: http://mupen64.emulation64.com 6 | * email address: hacktarux@yahoo.fr 7 | * 8 | * If you want to contribute to the project please contact 9 | * me first (maybe someone is already making what you are 10 | * planning to do). 11 | * 12 | * 13 | * This program is free software; you can redistribute it and/ 14 | * or modify it under the terms of the GNU General Public Li- 15 | * cence as published by the Free Software Foundation; either 16 | * version 2 of the Licence, or any later version. 17 | * 18 | * This program is distributed in the hope that it will be use- 19 | * ful, but WITHOUT ANY WARRANTY; without even the implied war- 20 | * ranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 21 | * See the GNU General Public Licence for more details. 22 | * 23 | * You should have received a copy of the GNU General Public 24 | * Licence along with this program; if not, write to the Free 25 | * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, 26 | * USA. 27 | * 28 | **/ 29 | 30 | #ifndef PIF_H 31 | #define PIF_H 32 | 33 | void update_pif_write(); 34 | void update_pif_read(); 35 | void format_mempacks(); 36 | void init_eeprom(); 37 | #endif 38 | -------------------------------------------------------------------------------- /gc_memory/tlb.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Mupen64 - tlb.h 3 | * Copyright (C) 2002 Hacktarux 4 | * 5 | * Mupen64 homepage: http://mupen64.emulation64.com 6 | * email address: hacktarux@yahoo.fr 7 | * 8 | * If you want to contribute to the project please contact 9 | * me first (maybe someone is already making what you are 10 | * planning to do). 11 | * 12 | * 13 | * This program is free software; you can redistribute it and/ 14 | * or modify it under the terms of the GNU General Public Li- 15 | * cence as published by the Free Software Foundation; either 16 | * version 2 of the Licence, or any later version. 17 | * 18 | * This program is distributed in the hope that it will be use- 19 | * ful, but WITHOUT ANY WARRANTY; without even the implied war- 20 | * ranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 21 | * See the GNU General Public Licence for more details. 22 | * 23 | * You should have received a copy of the GNU General Public 24 | * Licence along with this program; if not, write to the Free 25 | * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, 26 | * USA. 27 | * 28 | **/ 29 | 30 | #ifndef TLB_H 31 | #define TLB_H 32 | 33 | typedef struct _tlb 34 | { 35 | short mask; 36 | long vpn2; 37 | char g; 38 | unsigned char asid; 39 | long pfn_even; 40 | char c_even; 41 | char d_even; 42 | char v_even; 43 | long pfn_odd; 44 | char c_odd; 45 | char d_odd; 46 | char v_odd; 47 | char r; 48 | //long check_parity_mask; 49 | 50 | unsigned long start_even; 51 | unsigned long end_even; 52 | unsigned long phys_even; 53 | unsigned long start_odd; 54 | unsigned long end_odd; 55 | unsigned long phys_odd; 56 | } tlb; 57 | #ifndef USE_TLB_CACHE 58 | extern unsigned long *tlb_LUT_r; 59 | extern unsigned long *tlb_LUT_w; 60 | void tlb_mem2_init(); 61 | #endif 62 | unsigned long virtual_to_physical_address(unsigned long addresse, int w); 63 | int probe_nop(unsigned long address); 64 | 65 | #endif 66 | -------------------------------------------------------------------------------- /glN64_GX/CRC.cpp: -------------------------------------------------------------------------------- 1 | /** 2 | * glN64_GX - CRC.cpp 3 | * Copyright (C) 2003 Orkin 4 | * Copyright (C) 2008, 2009 sepp256 (Port to Wii/Gamecube/PS3) 5 | * 6 | * glN64 homepage: http://gln64.emulation64.com 7 | * Wii64 homepage: http://www.emulatemii.com 8 | * email address: sepp256@gmail.com 9 | * 10 | **/ 11 | 12 | #ifndef __LINUX__ 13 | # include 14 | #else 15 | # include "../main/winlnxdefs.h" 16 | #endif // __LINUX__ 17 | 18 | #define CRC32_POLYNOMIAL 0x04C11DB7 19 | 20 | unsigned long CRCTable[ 256 ]; 21 | 22 | DWORD Reflect( DWORD ref, char ch ) 23 | { 24 | DWORD value = 0; 25 | 26 | // Swap bit 0 for bit 7 27 | // bit 1 for bit 6, etc. 28 | for (int i = 1; i < (ch + 1); i++) 29 | { 30 | if(ref & 1) 31 | value |= 1 << (ch - i); 32 | ref >>= 1; 33 | } 34 | return value; 35 | } 36 | 37 | void CRC_BuildTable() 38 | { 39 | DWORD crc; 40 | 41 | for (int i = 0; i <= 255; i++) 42 | { 43 | crc = Reflect( i, 8 ) << 24; 44 | for (int j = 0; j < 8; j++) 45 | crc = (crc << 1) ^ (crc & (1 << 31) ? CRC32_POLYNOMIAL : 0); 46 | 47 | CRCTable[i] = Reflect( crc, 32 ); 48 | } 49 | } 50 | 51 | DWORD CRC_Calculate( DWORD crc, void *buffer, DWORD count ) 52 | { 53 | BYTE *p; 54 | DWORD orig = crc; 55 | 56 | p = (BYTE*) buffer; 57 | while (count--) 58 | #ifndef _BIG_ENDIAN 59 | crc = (crc >> 8) ^ CRCTable[(crc & 0xFF) ^ *p++]; 60 | #else // !_BIG_ENDIAN -> Big Endian fix - necessary for Ucode detection. 61 | crc = (crc >> 8) ^ CRCTable[(crc & 0xFF) ^ *(BYTE*)((int)p++ ^ 3)]; //This fixes the endian problem for uc_crc 62 | #endif // _BIG_ENDIAN 63 | 64 | return crc ^ orig; 65 | } 66 | 67 | DWORD CRC_CalculatePalette( DWORD crc, void *buffer, DWORD count ) 68 | { 69 | BYTE *p; 70 | DWORD orig = crc; 71 | 72 | p = (BYTE*) buffer; 73 | while (count--) 74 | { 75 | #ifndef _BIG_ENDIAN 76 | crc = (crc >> 8) ^ CRCTable[(crc & 0xFF) ^ *p++]; 77 | crc = (crc >> 8) ^ CRCTable[(crc & 0xFF) ^ *p++]; 78 | 79 | p += 6; 80 | #else // !_BIG_ENDIAN -> Big Endian fix 81 | crc = (crc >> 8) ^ CRCTable[(crc & 0xFF) ^ *(BYTE*)((int)p + 1)]; 82 | crc = (crc >> 8) ^ CRCTable[(crc & 0xFF) ^ *(BYTE*)((int)p)]; 83 | 84 | p += 8; 85 | #endif // _BIG_ENDIAN 86 | } 87 | 88 | return crc ^ orig; 89 | } 90 | -------------------------------------------------------------------------------- /glN64_GX/CRC.h: -------------------------------------------------------------------------------- 1 | /** 2 | * glN64_GX - CRC.h 3 | * Copyright (C) 2003 Orkin 4 | * Copyright (C) 2008, 2009 sepp256 (Port to Wii/Gamecube/PS3) 5 | * 6 | * glN64 homepage: http://gln64.emulation64.com 7 | * Wii64 homepage: http://www.emulatemii.com 8 | * email address: sepp256@gmail.com 9 | * 10 | **/ 11 | 12 | #ifndef __LINUX__ 13 | # include 14 | #else 15 | # include "../main/winlnxdefs.h" 16 | #endif // __LINUX__ 17 | 18 | void CRC_BuildTable(); 19 | 20 | DWORD CRC_Calculate( DWORD crc, void *buffer, DWORD count ); 21 | DWORD CRC_CalculatePalette( DWORD crc, void *buffer, DWORD count ); 22 | -------------------------------------------------------------------------------- /glN64_GX/Config.h: -------------------------------------------------------------------------------- 1 | /** 2 | * glN64_GX - Config.h 3 | * Copyright (C) 2003 Orkin 4 | * 5 | * glN64 homepage: http://gln64.emulation64.com 6 | * Wii64 homepage: http://www.emulatemii.com 7 | * 8 | **/ 9 | 10 | #ifndef CONFIG_H 11 | #define CONFIG_H 12 | void Config_LoadConfig(); 13 | void Config_DoConfig(); 14 | #endif 15 | 16 | -------------------------------------------------------------------------------- /glN64_GX/Debug.h: -------------------------------------------------------------------------------- 1 | /** 2 | * glN64_GX - Debug.h 3 | * Copyright (C) 2003 Orkin 4 | * 5 | * glN64 homepage: http://gln64.emulation64.com 6 | * Wii64 homepage: http://www.emulatemii.com 7 | * 8 | **/ 9 | 10 | #if !defined( DEBUGGFX_H ) && defined( DEBUG ) 11 | #define DEBUGGFX_H 12 | 13 | #ifndef __LINUX__ 14 | # include 15 | #else 16 | # include "winlnxdefs.h" 17 | #endif 18 | #include 19 | 20 | #define DEBUG_LOW 0x1000 21 | #define DEBUG_MEDIUM 0x2000 22 | #define DEBUG_HIGH 0x4000 23 | #define DEBUG_DETAIL 0x8000 24 | 25 | #define DEBUG_HANDLED 0x0001 26 | #define DEBUG_UNHANDLED 0x0002 27 | #define DEBUG_IGNORED 0x0004 28 | #define DEBUG_UNKNOWN 0x0008 29 | #define DEBUG_ERROR 0x0010 30 | #define DEBUG_COMBINE 0x0020 31 | #define DEBUG_TEXTURE 0x0040 32 | #define DEBUG_VERTEX 0x0080 33 | #define DEBUG_TRIANGLE 0x0100 34 | #define DEBUG_MATRIX 0x0200 35 | 36 | struct DebugInfo 37 | { 38 | WORD show, level; 39 | BOOL detail, paused, step; 40 | struct 41 | { 42 | DWORD pci, pc, cmd, w0, w1; 43 | } rsp; 44 | }; 45 | 46 | extern DebugInfo Debug; 47 | 48 | void OpenDebugDlg(); 49 | void CloseDebugDlg(); 50 | void DebugRSPState( DWORD pci, DWORD pc, DWORD cmd, DWORD w0, DWORD w1 ); 51 | void DebugMsg( WORD type, LPCSTR format, ... ); 52 | void StartDump( char *filename ); 53 | void EndDump(); 54 | 55 | #endif // DEBUG_H 56 | -------------------------------------------------------------------------------- /glN64_GX/DepthBuffer.h: -------------------------------------------------------------------------------- 1 | /** 2 | * glN64_GX - DepthBuffer.h 3 | * Copyright (C) 2003 Orkin 4 | * 5 | * glN64 homepage: http://gln64.emulation64.com 6 | * Wii64 homepage: http://www.emulatemii.com 7 | * 8 | **/ 9 | 10 | #ifndef DEPTHBUFFER_H 11 | #define DEPTHBUFFER_H 12 | 13 | #include "Types.h" 14 | 15 | struct DepthBuffer 16 | { 17 | DepthBuffer *higher, *lower; 18 | 19 | u32 address, cleared; 20 | }; 21 | 22 | struct DepthBufferInfo 23 | { 24 | DepthBuffer *top, *bottom, *current; 25 | int numBuffers; 26 | }; 27 | 28 | extern DepthBufferInfo depthBuffer; 29 | 30 | void DepthBuffer_Init(); 31 | void DepthBuffer_Destroy(); 32 | void DepthBuffer_SetBuffer( u32 address ); 33 | void DepthBuffer_RemoveBuffer( u32 address ); 34 | DepthBuffer *DepthBuffer_FindBuffer( u32 address ); 35 | 36 | #endif 37 | -------------------------------------------------------------------------------- /glN64_GX/F3DDKR.h: -------------------------------------------------------------------------------- 1 | /** 2 | * glN64_GX - F3DDKR.h 3 | * Copyright (C) 2003 Orkin 4 | * 5 | * glN64 homepage: http://gln64.emulation64.com 6 | * Wii64 homepage: http://www.emulatemii.com 7 | * 8 | **/ 9 | 10 | #ifndef F3DDKR_H 11 | #define F3DDKR_H 12 | 13 | #define F3DDKR_VTX_APPEND 0x00010000 14 | 15 | #define F3DDKR_DMA_MTX 0x01 16 | #define F3DDKR_DMA_VTX 0x04 17 | #define F3DDKR_DMA_TRI 0x05 18 | #define F3DDKR_DMA_DL 0x07 19 | #define F3DDKR_DMA_OFFSETS 0xBF 20 | 21 | void F3DDKR_Init(); 22 | #endif 23 | 24 | -------------------------------------------------------------------------------- /glN64_GX/F3DEX.h: -------------------------------------------------------------------------------- 1 | /** 2 | * glN64_GX - F3DEX.h 3 | * Copyright (C) 2003 Orkin 4 | * 5 | * glN64 homepage: http://gln64.emulation64.com 6 | * Wii64 homepage: http://www.emulatemii.com 7 | * 8 | **/ 9 | 10 | #ifndef F3DEX_H 11 | #define F3DEX_H 12 | 13 | #define F3DEX_MTX_STACKSIZE 18 14 | 15 | #define F3DEX_MTX_MODELVIEW 0x00 16 | #define F3DEX_MTX_PROJECTION 0x01 17 | #define F3DEX_MTX_MUL 0x00 18 | #define F3DEX_MTX_LOAD 0x02 19 | #define F3DEX_MTX_NOPUSH 0x00 20 | #define F3DEX_MTX_PUSH 0x04 21 | 22 | #define F3DEX_TEXTURE_ENABLE 0x00000002 23 | #define F3DEX_SHADING_SMOOTH 0x00000200 24 | #define F3DEX_CULL_FRONT 0x00001000 25 | #define F3DEX_CULL_BACK 0x00002000 26 | #define F3DEX_CULL_BOTH 0x00003000 27 | #define F3DEX_CLIPPING 0x00800000 28 | 29 | #define F3DEX_MV_VIEWPORT 0x80 30 | 31 | #define F3DEX_MWO_aLIGHT_1 0x00 32 | #define F3DEX_MWO_bLIGHT_1 0x04 33 | #define F3DEX_MWO_aLIGHT_2 0x20 34 | #define F3DEX_MWO_bLIGHT_2 0x24 35 | #define F3DEX_MWO_aLIGHT_3 0x40 36 | #define F3DEX_MWO_bLIGHT_3 0x44 37 | #define F3DEX_MWO_aLIGHT_4 0x60 38 | #define F3DEX_MWO_bLIGHT_4 0x64 39 | #define F3DEX_MWO_aLIGHT_5 0x80 40 | #define F3DEX_MWO_bLIGHT_5 0x84 41 | #define F3DEX_MWO_aLIGHT_6 0xa0 42 | #define F3DEX_MWO_bLIGHT_6 0xa4 43 | #define F3DEX_MWO_aLIGHT_7 0xc0 44 | #define F3DEX_MWO_bLIGHT_7 0xc4 45 | #define F3DEX_MWO_aLIGHT_8 0xe0 46 | #define F3DEX_MWO_bLIGHT_8 0xe4 47 | 48 | // F3DEX commands 49 | #define F3DEX_MODIFYVTX 0xB2 50 | #define F3DEX_TRI2 0xB1 51 | #define F3DEX_BRANCH_Z 0xB0 52 | #define F3DEX_LOAD_UCODE 0xAF // 0xCF 53 | 54 | void F3DEX_Vtx( u32 w0, u32 w1 ); 55 | void F3DEX_Tri1( u32 w0, u32 w1 ); 56 | void F3DEX_CullDL( u32 w0, u32 w1 ); 57 | void F3DEX_ModifyVtx( u32 w0, u32 w1 ); 58 | void F3DEX_Tri2( u32 w0, u32 w1 ); 59 | void F3DEX_Branch_Z( u32 w0, u32 w1 ); 60 | void F3DEX_Load_uCode( u32 w0, u32 w1 ); 61 | void F3DEX_Init(); 62 | #endif 63 | 64 | -------------------------------------------------------------------------------- /glN64_GX/F3DPD.h: -------------------------------------------------------------------------------- 1 | /** 2 | * glN64_GX - F3DPD.h 3 | * Copyright (C) 2003 Orkin 4 | * 5 | * glN64 homepage: http://gln64.emulation64.com 6 | * Wii64 homepage: http://www.emulatemii.com 7 | * 8 | **/ 9 | 10 | #ifndef F3DPD_H 11 | #define F3DPD_H 12 | 13 | #define F3DPD_VTXCOLORBASE 0x07 14 | 15 | void F3DPD_Init(); 16 | #endif 17 | 18 | -------------------------------------------------------------------------------- /glN64_GX/F3DWRUS.h: -------------------------------------------------------------------------------- 1 | /** 2 | * glN64_GX - F3DWRUS.h 3 | * Copyright (C) 2003 Orkin 4 | * 5 | * glN64 homepage: http://gln64.emulation64.com 6 | * Wii64 homepage: http://www.emulatemii.com 7 | * 8 | **/ 9 | 10 | #ifndef F3DWRUS_H 11 | #define F3DWRUS_H 12 | 13 | #define F3DWRUS_TRI2 0xB1 14 | void F3DWRUS_Init(); 15 | 16 | #endif 17 | 18 | -------------------------------------------------------------------------------- /glN64_GX/FrameBuffer.h: -------------------------------------------------------------------------------- 1 | /** 2 | * glN64_GX - FrameBuffer.cpp 3 | * Copyright (C) 2003 Orkin 4 | * Copyright (C) 2008, 2009 sepp256 (Port to Wii/Gamecube/PS3) 5 | * 6 | * glN64 homepage: http://gln64.emulation64.com 7 | * Wii64 homepage: http://www.emulatemii.com 8 | * email address: sepp256@gmail.com 9 | * 10 | **/ 11 | 12 | #ifndef FRAMEBUFFER_H 13 | #define FRAMEBUFFER_H 14 | 15 | #include "Types.h" 16 | #include "Textures.h" 17 | 18 | struct FrameBuffer 19 | { 20 | FrameBuffer *higher, *lower; 21 | 22 | CachedTexture *texture; 23 | 24 | u32 startAddress, endAddress; 25 | u32 size, width, height, changed; 26 | float scaleX, scaleY; 27 | }; 28 | 29 | struct FrameBufferInfo 30 | { 31 | FrameBuffer *top, *bottom, *current; 32 | int numBuffers; 33 | }; 34 | 35 | extern FrameBufferInfo frameBuffer; 36 | 37 | void FrameBuffer_Init(); 38 | void FrameBuffer_Destroy(); 39 | void FrameBuffer_SaveBuffer( u32 address, u16 size, u16 width, u16 height ); 40 | void FrameBuffer_RenderBuffer( u32 address ); 41 | void FrameBuffer_RestoreBuffer( u32 address, u16 size, u16 width ); 42 | void FrameBuffer_RemoveBuffer( u32 address ); 43 | FrameBuffer *FrameBuffer_FindBuffer( u32 address ); 44 | void FrameBuffer_ActivateBufferTexture( s16 t, FrameBuffer *buffer ); 45 | #ifdef __GX__ 46 | void FrameBuffer_RemoveBottom(); 47 | void FrameBuffer_MoveToTop( FrameBuffer *newtop ); 48 | void FrameBuffer_IncrementVIcount(); 49 | #endif //__GX__ 50 | 51 | #endif 52 | -------------------------------------------------------------------------------- /glN64_GX/GFXPlugin.h: -------------------------------------------------------------------------------- 1 | /** 2 | * glN64_GX - SoftGFXPlugin.h 3 | * Copyright (C) 2007 Mike Slegeir 4 | * Mangles the plugin so it can be linked staticly 5 | * 6 | * Wii64 homepage: http://www.emulatemii.com 7 | * 8 | **/ 9 | 10 | #ifndef GFX_PLUGIN_H 11 | #define GFX_PLUGIN_H 12 | 13 | #define RomClosed romClosed_gfx 14 | #define RomOpen romOpen_gfx 15 | #define GetDllInfo getDllInfo_gfx 16 | #define DllConfig dllConfig_gfx 17 | #define DllTest dllTest_gfx 18 | #define DllAbout dllAbout_gfx 19 | #define CloseDLL closeDLL_gfx 20 | 21 | #define CaptureScreen captureScreen 22 | #define ChangeWindow changeWindow 23 | #define DrawScreen drawScreen 24 | #define InitiateGFX initiateGFX 25 | #define MoveScreen moveScreen 26 | #define ProcessDList processDList 27 | #define ProcessRDPList processRDPList 28 | #define ShowCFB showCFB 29 | #define UpdateScreen updateScreen 30 | #define ViStatusChanged viStatusChanged 31 | #define ViWidthChanged viWidthChanged 32 | 33 | #endif 34 | 35 | -------------------------------------------------------------------------------- /glN64_GX/L3D.h: -------------------------------------------------------------------------------- 1 | /** 2 | * glN64_GX - L3D.h 3 | * Copyright (C) 2003 Orkin 4 | * 5 | * glN64 homepage: http://gln64.emulation64.com 6 | * Wii64 homepage: http://www.emulatemii.com 7 | * 8 | **/ 9 | 10 | #ifndef L3D_H 11 | #define L3D_H 12 | #include "Types.h" 13 | 14 | #define L3D_LINE3D 0xB5 15 | 16 | void L3D_Line3D( u32 w0, u32 w1 ); 17 | void L3D_Init(); 18 | #endif 19 | 20 | -------------------------------------------------------------------------------- /glN64_GX/L3DEX.h: -------------------------------------------------------------------------------- 1 | /** 2 | * glN64_GX - L3DEX.h 3 | * Copyright (C) 2003 Orkin 4 | * 5 | * glN64 homepage: http://gln64.emulation64.com 6 | * Wii64 homepage: http://www.emulatemii.com 7 | * 8 | **/ 9 | 10 | #ifndef L3DEX_H 11 | #define L3DEX_H 12 | #include "Types.h" 13 | 14 | void L3DEX_Line3D( u32 w0, u32 w1 ); 15 | void L3DEX_Init(); 16 | #endif 17 | 18 | -------------------------------------------------------------------------------- /glN64_GX/L3DEX2.h: -------------------------------------------------------------------------------- 1 | /** 2 | * glN64_GX - L3DEX2.h 3 | * Copyright (C) 2003 Orkin 4 | * 5 | * glN64 homepage: http://gln64.emulation64.com 6 | * Wii64 homepage: http://www.emulatemii.com 7 | * 8 | **/ 9 | 10 | #ifndef L3DEX2_H 11 | #define L3DEX2_H 12 | #include "Types.h" 13 | 14 | #define L3DEX2_LINE3D 0x08 15 | 16 | void L3DEX2_Line3D( u32 w0, u32 w1 ); 17 | void L3DEX2_Init(); 18 | #endif 19 | 20 | -------------------------------------------------------------------------------- /glN64_GX/N64.cpp: -------------------------------------------------------------------------------- 1 | /** 2 | * glN64_GX - N64.cpp 3 | * Copyright (C) 2003 Orkin 4 | * 5 | * glN64 homepage: http://gln64.emulation64.com 6 | * Wii64 homepage: http://www.emulatemii.com 7 | * 8 | **/ 9 | 10 | #ifdef __GX__ 11 | #include 12 | #endif // __GX__ 13 | 14 | #ifndef __LINUX__ 15 | # include 16 | #else 17 | # include "../main/winlnxdefs.h" 18 | #endif // __LINUX__ 19 | #include "N64.h" 20 | #include "Types.h" 21 | 22 | u8 *DMEM; 23 | u8 *IMEM; 24 | u64 TMEM[512]; 25 | u8 *RDRAM; 26 | u32 RDRAMSize; 27 | 28 | N64Regs REG; 29 | -------------------------------------------------------------------------------- /glN64_GX/N64.h: -------------------------------------------------------------------------------- 1 | /** 2 | * glN64_GX - N64.h 3 | * Copyright (C) 2003 Orkin 4 | * 5 | * glN64 homepage: http://gln64.emulation64.com 6 | * Wii64 homepage: http://www.emulatemii.com 7 | * 8 | **/ 9 | 10 | #ifndef N64_H 11 | #define N64_H 12 | 13 | #include "Types.h" 14 | 15 | #define MI_INTR_DP 0x20 // Bit 5: DP intr 16 | 17 | struct N64Regs 18 | { 19 | unsigned long *MI_INTR; 20 | 21 | unsigned long *DPC_START; 22 | unsigned long *DPC_END; 23 | unsigned long *DPC_CURRENT; 24 | unsigned long *DPC_STATUS; 25 | unsigned long *DPC_CLOCK; 26 | unsigned long *DPC_BUFBUSY; 27 | unsigned long *DPC_PIPEBUSY; 28 | unsigned long *DPC_TMEM; 29 | 30 | unsigned long *VI_STATUS; 31 | unsigned long *VI_ORIGIN; 32 | unsigned long *VI_WIDTH; 33 | unsigned long *VI_INTR; 34 | unsigned long *VI_V_CURRENT_LINE; 35 | unsigned long *VI_TIMING; 36 | unsigned long *VI_V_SYNC; 37 | unsigned long *VI_H_SYNC; 38 | unsigned long *VI_LEAP; 39 | unsigned long *VI_H_START; 40 | unsigned long *VI_V_START; 41 | unsigned long *VI_V_BURST; 42 | unsigned long *VI_X_SCALE; 43 | unsigned long *VI_Y_SCALE; 44 | }; 45 | 46 | extern N64Regs REG; 47 | extern u8 *DMEM; 48 | extern u8 *IMEM; 49 | extern u8 *RDRAM; 50 | extern u64 TMEM[512]; 51 | extern u32 RDRAMSize; 52 | 53 | #endif 54 | 55 | -------------------------------------------------------------------------------- /glN64_GX/NV_register_combiners.h: -------------------------------------------------------------------------------- 1 | /** 2 | * glN64_GX - NV_register_combiners.h 3 | * Copyright (C) 2003 Orkin 4 | * Copyright (C) 2008, 2009 sepp256 (Port to Wii/Gamecube/PS3) 5 | * 6 | * glN64 homepage: http://gln64.emulation64.com 7 | * Wii64 homepage: http://www.emulatemii.com 8 | * email address: sepp256@gmail.com 9 | * 10 | **/ 11 | 12 | #ifndef __GX__ 13 | #include 14 | #else // !__GX__ 15 | #define __WIN32__ 16 | #include "gl.h" 17 | #include "glext.h" 18 | #undef __WIN32__ 19 | #endif // __GX__ 20 | 21 | struct CombinerInput 22 | { 23 | GLenum input; 24 | GLenum mapping; 25 | GLenum usage; 26 | }; 27 | 28 | struct CombinerVariable 29 | { 30 | GLenum input; 31 | GLenum mapping; 32 | GLenum usage; 33 | BOOL used; 34 | }; 35 | 36 | struct GeneralCombiner 37 | { 38 | CombinerVariable A, B, C, D; 39 | 40 | struct 41 | { 42 | GLenum ab; 43 | GLenum cd; 44 | GLenum sum; 45 | } output; 46 | }; 47 | 48 | struct RegisterCombiners 49 | { 50 | GeneralCombiner color[8]; 51 | GeneralCombiner alpha[8]; 52 | 53 | struct 54 | { 55 | CombinerVariable A, B, C, D, E, F, G; 56 | } final; 57 | 58 | struct 59 | { 60 | WORD color, alpha; 61 | } constant[2]; 62 | 63 | struct 64 | { 65 | WORD color, secondaryColor, alpha; 66 | } vertex; 67 | 68 | WORD numCombiners; 69 | BOOL usesT0, usesT1, usesNoise; 70 | }; 71 | 72 | void Init_NV_register_combiners(); 73 | void Uninit_NV_register_combiners(); 74 | RegisterCombiners *Compile_NV_register_combiners( Combiner *color, Combiner *alpha ); 75 | void Update_NV_register_combiners_Colors( RegisterCombiners *regCombiners ); 76 | void Set_NV_register_combiners( RegisterCombiners *regCombiners ); 77 | -------------------------------------------------------------------------------- /glN64_GX/RDP.h: -------------------------------------------------------------------------------- 1 | /** 2 | * glN64_GX - RDP.h 3 | * Copyright (C) 2003 Orkin 4 | * 5 | * glN64 homepage: http://gln64.emulation64.com 6 | * Wii64 homepage: http://www.emulatemii.com 7 | * 8 | **/ 9 | 10 | #ifndef RDP_H 11 | #define RDP_H 12 | 13 | void RDP_Init(); 14 | 15 | #endif 16 | 17 | -------------------------------------------------------------------------------- /glN64_GX/RSP.h: -------------------------------------------------------------------------------- 1 | /** 2 | * glN64_GX - RSP.h 3 | * Copyright (C) 2003 Orkin 4 | * Copyright (C) 2008, 2009 sepp256 (Port to Wii/Gamecube/PS3) 5 | * 6 | * glN64 homepage: http://gln64.emulation64.com 7 | * Wii64 homepage: http://www.emulatemii.com 8 | * email address: sepp256@gmail.com 9 | * 10 | **/ 11 | 12 | #ifndef RSP_H 13 | #define RSP_H 14 | 15 | #ifndef __LINUX__ 16 | # include 17 | #else 18 | # include "../main/winlnxdefs.h" 19 | # ifndef __GX__ 20 | # include "SDL.h" 21 | # include "SDL_thread.h" 22 | # endif // !__GX__ 23 | #endif 24 | #include "N64.h" 25 | #include "GBI.h" 26 | #include "gSP.h" 27 | #include "Types.h" 28 | 29 | #define RSPMSG_CLOSE 0 30 | #define RSPMSG_UPDATESCREEN 1 31 | #define RSPMSG_PROCESSDLIST 2 32 | #define RSPMSG_CAPTURESCREEN 3 33 | #define RSPMSG_DESTROYTEXTURES 4 34 | #define RSPMSG_INITTEXTURES 5 35 | 36 | typedef struct 37 | { 38 | #ifdef RSPTHREAD 39 | # ifndef __LINUX__ 40 | HANDLE thread; 41 | // Events for thread messages, see defines at the top, or RSP_Thread 42 | HANDLE threadMsg[6]; 43 | // Event to notify main process that the RSP is finished with what it was doing 44 | HANDLE threadFinished; 45 | # else 46 | SDL_Thread *thread; 47 | int threadMsg[6]; 48 | # endif // !__LINUX__ 49 | #endif // RSPTHREAD 50 | 51 | u32 PC[18], PCi, busy, halt, close, DList, uc_start, uc_dstart, cmd, nextCmd, count; 52 | } RSPInfo; 53 | 54 | extern RSPInfo RSP; 55 | 56 | #define RSP_SegmentToPhysical( segaddr ) ((gSP.segment[(segaddr >> 24) & 0x0F] + (segaddr & 0x00FFFFFF)) & 0x00FFFFFF) 57 | 58 | void RSP_Init(); 59 | void RSP_ProcessDList(); 60 | #ifdef RSPTHREAD 61 | DWORD WINAPI RSP_ThreadProc( LPVOID lpParameter ); 62 | #endif 63 | void RSP_LoadMatrix( f32 mtx[4][4], u32 address ); 64 | 65 | #endif 66 | -------------------------------------------------------------------------------- /glN64_GX/S2DEX2.cpp: -------------------------------------------------------------------------------- 1 | /** 2 | * glN64_GX - S2DEX2.cpp 3 | * Copyright (C) 2003 Orkin 4 | * 5 | * glN64 homepage: http://gln64.emulation64.com 6 | * Wii64 homepage: http://www.emulatemii.com 7 | * 8 | **/ 9 | 10 | #ifdef __GX__ 11 | #include 12 | #endif // __GX__ 13 | 14 | #include "OpenGL.h" 15 | #include "S2DEX.h" 16 | #include "S2DEX2.h" 17 | #include "F3D.h" 18 | #include "F3DEX.h" 19 | #include "F3DEX2.h" 20 | #include "GBI.h" 21 | #include "gSP.h" 22 | #include "gDP.h" 23 | #include "RSP.h" 24 | #include "Types.h" 25 | 26 | void S2DEX2_Init() 27 | { 28 | // Set GeometryMode flags 29 | GBI_InitFlags( F3DEX2 ); 30 | 31 | gSP.geometryMode = 0; 32 | 33 | GBI.PCStackSize = 18; 34 | 35 | // GBI Command Command Value Command Function 36 | GBI_SetGBI( G_SPNOOP, F3DEX2_SPNOOP, F3D_SPNoOp ); 37 | GBI_SetGBI( G_BG_1CYC, S2DEX2_BG_1CYC, S2DEX_BG_1Cyc ); 38 | GBI_SetGBI( G_BG_COPY, S2DEX2_BG_COPY, S2DEX_BG_Copy ); 39 | GBI_SetGBI( G_OBJ_RECTANGLE, S2DEX2_OBJ_RECTANGLE, S2DEX_Obj_Rectangle ); 40 | GBI_SetGBI( G_OBJ_SPRITE, S2DEX2_OBJ_SPRITE, S2DEX_Obj_Sprite ); 41 | GBI_SetGBI( G_OBJ_MOVEMEM, S2DEX2_OBJ_MOVEMEM, S2DEX_Obj_MoveMem ); 42 | GBI_SetGBI( G_DL, F3DEX2_DL, F3D_DList ); 43 | GBI_SetGBI( G_SELECT_DL, S2DEX2_SELECT_DL, S2DEX_Select_DL ); 44 | GBI_SetGBI( G_OBJ_RENDERMODE, S2DEX2_OBJ_RENDERMODE, S2DEX_Obj_RenderMode ); 45 | GBI_SetGBI( G_OBJ_RECTANGLE_R, S2DEX2_OBJ_RECTANGLE_R, S2DEX_Obj_Rectangle_R ); 46 | GBI_SetGBI( G_OBJ_LOADTXTR, S2DEX2_OBJ_LOADTXTR, S2DEX_Obj_LoadTxtr ); 47 | GBI_SetGBI( G_OBJ_LDTX_SPRITE, S2DEX2_OBJ_LDTX_SPRITE, S2DEX_Obj_LdTx_Sprite ); 48 | GBI_SetGBI( G_OBJ_LDTX_RECT, S2DEX2_OBJ_LDTX_RECT, S2DEX_Obj_LdTx_Rect ); 49 | GBI_SetGBI( G_OBJ_LDTX_RECT_R, S2DEX2_OBJ_LDTX_RECT_R, S2DEX_Obj_LdTx_Rect_R ); 50 | GBI_SetGBI( G_MOVEWORD, F3DEX2_MOVEWORD, F3DEX2_MoveWord ); 51 | GBI_SetGBI( G_SETOTHERMODE_H, F3DEX2_SETOTHERMODE_H, F3DEX2_SetOtherMode_H ); 52 | GBI_SetGBI( G_SETOTHERMODE_L, F3DEX2_SETOTHERMODE_L, F3DEX2_SetOtherMode_L ); 53 | GBI_SetGBI( G_ENDDL, F3DEX2_ENDDL, F3D_EndDL ); 54 | GBI_SetGBI( G_RDPHALF_1, F3DEX2_RDPHALF_1, F3D_RDPHalf_1 ); 55 | GBI_SetGBI( G_RDPHALF_2, F3DEX2_RDPHALF_2, F3D_RDPHalf_2 ); 56 | GBI_SetGBI( G_LOAD_UCODE, F3DEX2_LOAD_UCODE, F3DEX_Load_uCode ); 57 | } 58 | 59 | -------------------------------------------------------------------------------- /glN64_GX/S2DEX2.h: -------------------------------------------------------------------------------- 1 | /** 2 | * glN64_GX - S2DEX2.h 3 | * Copyright (C) 2003 Orkin 4 | * 5 | * glN64 homepage: http://gln64.emulation64.com 6 | * Wii64 homepage: http://www.emulatemii.com 7 | * 8 | **/ 9 | 10 | #ifndef S2DEX2_H 11 | #define S2DEX2_H 12 | 13 | void S2DEX2_Init(); 14 | 15 | #define S2DEX2_OBJ_RECTANGLE_R 0xDA 16 | #define S2DEX2_OBJ_MOVEMEM 0xDC 17 | #define S2DEX2_RDPHALF_0 0xE4 18 | #define S2DEX2_OBJ_RECTANGLE 0x01 19 | #define S2DEX2_OBJ_SPRITE 0x02 20 | #define S2DEX2_SELECT_DL 0x04 21 | #define S2DEX2_OBJ_LOADTXTR 0x05 22 | #define S2DEX2_OBJ_LDTX_SPRITE 0x06 23 | #define S2DEX2_OBJ_LDTX_RECT 0x07 24 | #define S2DEX2_OBJ_LDTX_RECT_R 0x08 25 | #define S2DEX2_BG_1CYC 0x09 26 | #define S2DEX2_BG_COPY 0x0A 27 | #define S2DEX2_OBJ_RENDERMODE 0x0B 28 | #endif 29 | 30 | -------------------------------------------------------------------------------- /glN64_GX/Types.h: -------------------------------------------------------------------------------- 1 | /** 2 | * glN64_GX - Types.cpp 3 | * Copyright (C) 2003 Orkin 4 | * Copyright (C) 2008, 2009 sepp256 (Port to Wii/Gamecube/PS3) 5 | * 6 | * glN64 homepage: http://gln64.emulation64.com 7 | * Wii64 homepage: http://www.emulatemii.com 8 | * email address: sepp256@gmail.com 9 | * 10 | **/ 11 | 12 | #ifndef __GX__ 13 | #ifndef TYPES_H 14 | #define TYPES_H 15 | 16 | typedef unsigned char u8; /* unsigned 8-bit */ 17 | typedef unsigned short u16; /* unsigned 16-bit */ 18 | typedef unsigned long u32; /* unsigned 32-bit */ 19 | typedef unsigned long long u64; /* unsigned 64-bit */ 20 | 21 | typedef signed char s8; /* signed 8-bit */ 22 | typedef short s16; /* signed 16-bit */ 23 | typedef long s32; /* signed 32-bit */ 24 | typedef long long s64; /* signed 64-bit */ 25 | 26 | typedef volatile unsigned char vu8; /* unsigned 8-bit */ 27 | typedef volatile unsigned short vu16; /* unsigned 16-bit */ 28 | typedef volatile unsigned long vu32; /* unsigned 32-bit */ 29 | typedef volatile unsigned long long vu64; /* unsigned 64-bit */ 30 | 31 | typedef volatile signed char vs8; /* signed 8-bit */ 32 | typedef volatile short vs16; /* signed 16-bit */ 33 | typedef volatile long vs32; /* signed 32-bit */ 34 | typedef volatile long long vs64; /* signed 64-bit */ 35 | 36 | typedef float f32; /* single prec floating point */ 37 | typedef double f64; /* double prec floating point */ 38 | 39 | #ifndef TRUE 40 | #define TRUE 1 41 | #endif 42 | 43 | #ifndef FALSE 44 | #define FALSE 0 45 | #endif 46 | 47 | #ifndef NULL 48 | #define NULL 0 49 | #endif 50 | 51 | #endif // TYPES_H 52 | #endif // !__GX__ 53 | -------------------------------------------------------------------------------- /glN64_GX/VI.h: -------------------------------------------------------------------------------- 1 | /** 2 | * glN64_GX - VI.h 3 | * Copyright (C) 2003 Orkin 4 | * Copyright (C) 2008, 2009 sepp256 (Port to Wii/Gamecube/PS3) 5 | * 6 | * glN64 homepage: http://gln64.emulation64.com 7 | * Wii64 homepage: http://www.emulatemii.com 8 | * email address: sepp256@gmail.com 9 | * 10 | **/ 11 | 12 | #ifndef VI_H 13 | #define VI_H 14 | #include "Types.h" 15 | 16 | struct VIInfo 17 | { 18 | u32 width, height; 19 | u32 lastOrigin; 20 | #ifdef __GX__ 21 | unsigned int* xfb[2]; 22 | int which_fb; 23 | bool updateOSD; 24 | bool EFBcleared; 25 | bool copy_fb; 26 | #endif // __GX__ 27 | }; 28 | 29 | extern VIInfo VI; 30 | 31 | void VI_UpdateSize(); 32 | void VI_UpdateScreen(); 33 | 34 | #ifdef __GX__ 35 | 36 | void VI_GX_init(); 37 | void VI_GX_setFB(unsigned int* fb1, unsigned int* fb2); 38 | unsigned int* VI_GX_getScreenPointer(); 39 | void VI_GX_clearEFB(); 40 | void VI_GX_showFPS(); 41 | void VI_GX_updateDEBUG(); 42 | void VI_GX_showDEBUG(); 43 | void VI_GX_showStats(); 44 | void VI_GX_cleanUp(); 45 | void VI_GX_renderCpuFramebuffer(); 46 | void VI_GX_PreRetraceCallback(u32 retraceCnt); 47 | 48 | #endif // __GX__ 49 | 50 | #endif 51 | 52 | -------------------------------------------------------------------------------- /glN64_GX/gl.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FIX94/mupen64gc-fix94/e5d9d9cc9fea4b1abaf79635cd00893a56a03ff9/glN64_GX/gl.h -------------------------------------------------------------------------------- /glN64_GX/glN64.h: -------------------------------------------------------------------------------- 1 | /** 2 | * glN64_GX - glN64.h 3 | * Copyright (C) 2003 Orkin 4 | * 5 | * glN64 homepage: http://gln64.emulation64.com 6 | * Wii64 homepage: http://www.emulatemii.com 7 | * 8 | **/ 9 | 10 | #ifndef GLN64_H 11 | #define GLN64_H 12 | 13 | #ifndef __LINUX__ 14 | #include 15 | //#include 16 | #else 17 | # include "../main/winlnxdefs.h" 18 | #endif 19 | 20 | //#define DEBUG 21 | //#define RSPTHREAD 22 | 23 | #ifndef __LINUX__ 24 | extern HWND hWnd; 25 | //extern HWND hFullscreen; 26 | extern HWND hStatusBar; 27 | extern HWND hToolBar; 28 | extern HINSTANCE hInstance; 29 | #endif // !__LINUX__ 30 | 31 | extern char pluginName[]; 32 | 33 | extern void (*CheckInterrupts)( void ); 34 | extern char *screenDirectory; 35 | 36 | #endif 37 | 38 | -------------------------------------------------------------------------------- /glN64_GX/texture_env.h: -------------------------------------------------------------------------------- 1 | /** 2 | * glN64_GX - texture_env.h 3 | * Copyright (C) 2003 Orkin 4 | * Copyright (C) 2008, 2009 sepp256 (Port to Wii/Gamecube/PS3) 5 | * 6 | * glN64 homepage: http://gln64.emulation64.com 7 | * Wii64 homepage: http://www.emulatemii.com 8 | * email address: sepp256@gmail.com 9 | * 10 | **/ 11 | 12 | #ifndef TEXTURE_ENV_H 13 | #define TEXTURE_ENV_H 14 | 15 | struct TexEnv 16 | { 17 | GLint mode; 18 | 19 | struct 20 | { 21 | WORD color, alpha; 22 | } fragment; 23 | 24 | BOOL usesT0, usesT1; 25 | }; 26 | 27 | void Init_texture_env(); 28 | TexEnv *Compile_texture_env( Combiner *color, Combiner *alpha ); 29 | void Set_texture_env( TexEnv *texEnv ); 30 | void Update_texture_env_Colors( TexEnv *texEnv ); 31 | void Uninit_texture_env(); 32 | 33 | #endif 34 | 35 | -------------------------------------------------------------------------------- /glN64_GX/texture_env_combine.h: -------------------------------------------------------------------------------- 1 | /** 2 | * glN64_GX - texture_env_combine.h 3 | * Copyright (C) 2003 Orkin 4 | * 5 | * glN64 homepage: http://gln64.emulation64.com 6 | * Wii64 homepage: http://www.emulatemii.com 7 | * 8 | **/ 9 | 10 | #ifndef TEXTURE_ENV_COMBINE_H 11 | #define TEXTURE_ENV_COMBINE_H 12 | 13 | struct TexEnvCombinerArg 14 | { 15 | GLenum source, operand; 16 | }; 17 | 18 | struct TexEnvCombinerStage 19 | { 20 | WORD constant; 21 | BOOL used; 22 | GLenum combine; 23 | TexEnvCombinerArg arg0, arg1, arg2; 24 | WORD outputTexture; 25 | }; 26 | 27 | struct TexEnvCombiner 28 | { 29 | BOOL usesT0, usesT1, usesNoise; 30 | 31 | WORD usedUnits; 32 | 33 | struct 34 | { 35 | WORD color, secondaryColor, alpha; 36 | } vertex; 37 | 38 | TexEnvCombinerStage color[8]; 39 | TexEnvCombinerStage alpha[8]; 40 | }; 41 | 42 | void Init_texture_env_combine(); 43 | TexEnvCombiner *Compile_texture_env_combine( Combiner *color, Combiner *alpha ); 44 | void Set_texture_env_combine( TexEnvCombiner *envCombiner ); 45 | void Update_texture_env_combine_Colors( TexEnvCombiner* ); 46 | void Uninit_texture_env_combine(); 47 | void BeginTextureUpdate_texture_env_combine(); 48 | void EndTextureUpdate_texture_env_combine(); 49 | #endif 50 | 51 | -------------------------------------------------------------------------------- /gui/DEBUG.h: -------------------------------------------------------------------------------- 1 | /* DEBUG.h - DEBUG interface 2 | by Mike Slegeir for Mupen64-GC 3 | */ 4 | 5 | #ifndef DEBUG_H 6 | #define DEBUG_H 7 | 8 | //#define SDPRINT 9 | 10 | #define DBG_DLIST 0 11 | #define DBG_DLISTTYPE 1 12 | #define DBG_RSPINFO 2 13 | #define DBG_RSPINFO1 3 14 | #define DBG_TXINFO 4 15 | #define DBG_TXINFO1 5 16 | #define DBG_VIINFO 6 17 | #define DBG_CCINFO 7 18 | #define DBG_BLINFO 8 19 | #define DBG_AUDIOINFO 9 20 | #define DBG_MEMFREEINFO 10 21 | #define DBG_CACHEINFO 11 22 | #define DBG_PROFILE_GFX 19 23 | #define DBG_PROFILE_AUDIO 20 24 | #define DBG_PROFILE_IDLE 21 25 | #define DBG_PROFILE_TLB 22 26 | #define DBG_PROFILE_FP 23 27 | #define DBG_PROFILE_COMP 24 28 | #define DBG_PROFILE_INTERP 25 29 | #define DBG_PROFILE_TRAMP 26 30 | #define DBG_PROFILE_FUNCS 27 31 | #define DBG_STATSBASE 12 // ALL stats print from this line onwards 32 | #define DBG_SDGECKOOPEN 0xFC 33 | #define DBG_SDGECKOCLOSE 0xFD 34 | #define DBG_SDGECKOPRINT 0xFE 35 | #define DBG_USBGECKO 0xFF 36 | 37 | //DEBUG_stats defines 38 | #define STAT_TYPE_ACCUM 0 39 | #define STAT_TYPE_AVGE 1 40 | #define STAT_TYPE_CLEAR 2 41 | 42 | #define STATS_RECOMPCACHE 0 43 | #define STATS_CACHEMISSES 1 44 | #define STATS_FCOUNTER 2 //FRAME counter 45 | #define STATS_THREE 3 46 | 47 | extern char txtbuffer[1024]; 48 | // Amount of time each string will be held onto 49 | #define DEBUG_STRING_LIFE 5 50 | // Dimensions of array returned by get_text 51 | #define DEBUG_TEXT_WIDTH 100 52 | #define DEBUG_TEXT_HEIGHT 40 53 | 54 | #ifdef __cplusplus 55 | extern "C" { 56 | #endif 57 | 58 | // Pre-formatted string (use sprintf before sending to print) 59 | void DEBUG_print(char* string,int pos); 60 | void DEBUG_stats(int stats_id, char *info, unsigned int stats_type, unsigned int adjustment_value); 61 | 62 | // Should be called before get_text. Ages the strings, and remove old ones 63 | void DEBUG_update(void); 64 | 65 | // Returns pointer to an array of char* 66 | char** DEBUG_get_text(void); 67 | 68 | #ifdef __cplusplus 69 | } 70 | #endif 71 | 72 | #endif 73 | 74 | 75 | -------------------------------------------------------------------------------- /gui/GUI.h: -------------------------------------------------------------------------------- 1 | /* GUI.h - GUI interface 2 | by Mike Slegeir for Mupen64-GC 3 | */ 4 | 5 | #ifndef GUI_H 6 | #define GUI_H 7 | 8 | #include 9 | 10 | // Dimensions of array returned by get_text 11 | #define GUI_TEXT_WIDTH 35 12 | #define GUI_TEXT_HEIGHT 16 13 | 14 | // Some defined colors to make things easier 15 | extern GXColor GUI_color_default; 16 | extern GXColor GUI_color_highlighted; 17 | extern GXColor GUI_color_special; 18 | 19 | // Pre-formatted string (use sprintf before sending to print) 20 | void GUI_print(char* string); 21 | void GUI_print_color(char* string, GXColor color); 22 | 23 | // Clear text to be displayed each frame 24 | void GUI_clear(void); 25 | 26 | // Should be called before a call to get_text, reformats text 27 | void GUI_update(void); 28 | 29 | // Returns pointer to an array of char* 30 | // Call BEFORE you call get_colors 31 | char** GUI_get_text(void); 32 | 33 | // Returns an array of GXColor 34 | GXColor* GUI_get_colors(void); 35 | 36 | #endif 37 | 38 | -------------------------------------------------------------------------------- /gui/TEXT.c: -------------------------------------------------------------------------------- 1 | /* TEXT.c - Helper functions for reformatting text 2 | by Mike Slegeir for Mupen64-GC 3 | */ 4 | 5 | #include "TEXT.h" 6 | 7 | char TEXT_split_lines[TEXT_MAX_SPLIT][TEXT_WIDTH]; 8 | 9 | int TEXT_split(char* string){ 10 | int current_line = 0, i = 0; 11 | while( *string != 0 ){ 12 | if( *string == '\n'){ 13 | TEXT_split_lines[current_line][i] = 0; 14 | if(++current_line >= TEXT_MAX_SPLIT) return current_line; 15 | i = 0; 16 | } else if(i == TEXT_WIDTH-1){ 17 | // If we run out of space for this line, throw away characters 18 | // until we reach a new line or the end of the string 19 | // FIXME: If we'd rather have the string continue on the next 20 | // line, simply put this if test or'ed in the above 21 | // conditional, and it will treat it like a newline 22 | while( *string != '\n' && *string != 0 ) ++string; 23 | continue; 24 | } else TEXT_split_lines[current_line][i++] = *string; 25 | 26 | ++string; 27 | } 28 | 29 | // Null out the last byte 30 | TEXT_split_lines[current_line][i] = 0; 31 | 32 | // Return the number of lines created 33 | // the boolean checks whether the last line 34 | // contains any characters or not, hence 35 | // whether or not to count it 36 | //return current_line + 1; 37 | return current_line + ((i == 0) ? 0 : 1); 38 | } 39 | 40 | void TEXT_expand(char* string){ 41 | // Although it'd be nice to get this in one sweep, it'd probably not be a good idea 42 | 43 | // First determine if every tab is expandable without overflow 44 | int i, spaces = 0; 45 | for(i=0; string[i] != 0; ++i) 46 | if(string[i] == '\t') spaces += TEXT_SPACE_PER_TAB - 1; 47 | 48 | if( TEXT_WIDTH - i > spaces ){ // We have the space to expand 49 | while(i >= 0){ 50 | if(string[i] == '\t'){ // Expand this tab 51 | int j; 52 | for(j=0; j 28 | 29 | typedef struct 30 | { 31 | unsigned int* xfb[2]; 32 | int which_fb; 33 | int width; 34 | int height; 35 | } GUIinfo; 36 | 37 | 38 | void GUI_setFB(unsigned int*, unsigned int*); 39 | void GUI_init(); 40 | void GUI_toggle(); 41 | void GUI_draw(); 42 | void GUI_displayText(); 43 | int GUI_loadBGtex(); 44 | void GUI_drawWiiN64(float, float, float, float); 45 | void GUI_drawLogo(float, float, float); 46 | void GUI_centerText(bool); 47 | void GUI_setLoadProg(float percent); 48 | void GUI_drawLoadProg(); 49 | void GUI_creditScreen(); 50 | void GUI_writeString(guVector pos, guVector axis1, guVector axis2, guVector axis3, guVector rot, GXColor fontColor, char *string, float scale); 51 | 52 | #endif 53 | -------------------------------------------------------------------------------- /gui/gui_GX.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Wii64 - gui_GX.h 3 | * Copyright (C) 2007, 2008 sepp256 4 | * 5 | * gui that uses GX graphics 6 | * 7 | * Wii64 homepage: http://www.emulatemii.com 8 | * email address: sepp256@gmail.com 9 | * 10 | * 11 | * This program is free software; you can redistribute it and/ 12 | * or modify it under the terms of the GNU General Public Li- 13 | * cence as published by the Free Software Foundation; either 14 | * version 2 of the Licence, or any later version. 15 | * 16 | * This program is distributed in the hope that it will be use- 17 | * ful, but WITHOUT ANY WARRANTY; without even the implied war- 18 | * ranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public Licence for more details. 20 | * 21 | **/ 22 | 23 | #ifndef GUI_GX_H 24 | #define GUI_GX_H 25 | 26 | #include "GUI.h" 27 | #include 28 | 29 | typedef struct 30 | { 31 | unsigned int* xfb[2]; 32 | int which_fb; 33 | int width; 34 | int height; 35 | } GUIinfo; 36 | 37 | 38 | void GUI_setFB(unsigned int*, unsigned int*); 39 | void GUI_init(); 40 | void GUI_toggle(); 41 | void GUI_main(); 42 | void GUI_displayText(); 43 | int GUI_loadBGtex(); 44 | void GUI_drawWiiN64(float, float, float, float); 45 | void GUI_drawLogo(float, float, float); 46 | 47 | #endif 48 | -------------------------------------------------------------------------------- /gui/logo.tex: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FIX94/mupen64gc-fix94/e5d9d9cc9fea4b1abaf79635cd00893a56a03ff9/gui/logo.tex -------------------------------------------------------------------------------- /gui/menu.h: -------------------------------------------------------------------------------- 1 | /* menu.h - Main menu 2 | by Mike Slegeir for Mupen64-GC 3 | */ 4 | 5 | #ifndef MENU_H 6 | #define MENU_H 7 | 8 | #define MENU_ATTR_NONE 0 9 | #define MENU_ATTR_HASSUBMENU 1 /* Whether this item has a submenu */ 10 | #define MENU_ATTR_SPECIAL 2 /* Displays in a different color */ 11 | #define MENU_ATTR_LEFTALIGN 4 /* Text aligned to left instead of center */ 12 | 13 | typedef struct menu_item_t { 14 | char* caption; 15 | unsigned int attr; 16 | union { 17 | struct { 18 | unsigned int num_items; 19 | struct menu_item_t* items; 20 | } subMenu; 21 | char* (*func)(); // Returns a feedback string 22 | }; 23 | } menu_item; 24 | 25 | // Initializes the menu, call first 26 | void menuInit(void); 27 | // Displays the menu via GUI 28 | void menuDisplay(void); 29 | // Moves the cursor by dx items 30 | void menuNavigate(int dx); 31 | // Select the item currently highlighted 32 | void menuSelect(void); 33 | // Go back in the menu (up a level) 34 | void menuBack(void); 35 | 36 | #endif 37 | -------------------------------------------------------------------------------- /gui/menuFileBrowser.h: -------------------------------------------------------------------------------- 1 | /* menuFileBrowser.h - File browser using the menu system 2 | by Mike Slegeir for Mupen64-GC 3 | */ 4 | 5 | #ifndef MENU_FILE_BROWSER_H 6 | #define MENU_FILE_BROWSER_H 7 | 8 | #include "menu.h" 9 | #include "../fileBrowser/fileBrowser.h" 10 | 11 | menu_item* menuFileBrowser(fileBrowser_file* dir); 12 | 13 | #endif 14 | -------------------------------------------------------------------------------- /libgui/Component.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Wii64 - Component.h 3 | * Copyright (C) 2009 sepp256 4 | * 5 | * Wii64 homepage: http://www.emulatemii.com 6 | * email address: sepp256@gmail.com 7 | * 8 | * 9 | * This program is free software; you can redistribute it and/ 10 | * or modify it under the terms of the GNU General Public Li- 11 | * cence as published by the Free Software Foundation; either 12 | * version 2 of the Licence, or any later version. 13 | * 14 | * This program is distributed in the hope that it will be use- 15 | * ful, but WITHOUT ANY WARRANTY; without even the implied war- 16 | * ranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 17 | * See the GNU General Public Licence for more details. 18 | * 19 | **/ 20 | 21 | #ifndef COMPONENT_H 22 | #define COMPONENT_H 23 | 24 | #include "GuiTypes.h" 25 | 26 | namespace menu { 27 | 28 | class Component 29 | { 30 | public: 31 | Component(); 32 | virtual ~Component(); 33 | virtual void setEnabled(bool enable); 34 | bool isEnabled() const; 35 | void setVisible(bool visible); 36 | bool isVisible() const; 37 | void setFocus(bool focus); 38 | bool getFocus(); 39 | void setType(int type); 40 | int getType(); 41 | void setParent(Component* parent); 42 | Component* getParent() const; 43 | void draw(Graphics& gfx); 44 | virtual void drawComponent(Graphics& gfx); 45 | virtual void drawChildren(Graphics& gfx) const; 46 | virtual void updateTime(float deltaTime); 47 | void setNextFocus(int direction, Component* component); 48 | Component* getNextFocus(int direction); 49 | virtual Component* updateFocus(int direction, int buttonsPressed); 50 | // virtual void doFocusEvent(int type, bool buttonDown); 51 | enum ComponentType 52 | { 53 | TYPE_OTHER, 54 | TYPE_FRAME, 55 | TYPE_BUTTON, 56 | TYPE_TEXTBOX 57 | }; 58 | 59 | protected: 60 | ComponentList componentList; 61 | 62 | private: 63 | bool visible, enabled, focus; 64 | Component* parent; 65 | Component* nextFocus[5]; 66 | int type; 67 | 68 | }; 69 | 70 | } //namespace menu 71 | 72 | #endif 73 | -------------------------------------------------------------------------------- /libgui/CursorManager.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Wii64 - CursorManager.h 3 | * Copyright (C) 2009 sepp256 4 | * 5 | * Wii64 homepage: http://www.emulatemii.com 6 | * email address: sepp256@gmail.com 7 | * 8 | * 9 | * This program is free software; you can redistribute it and/ 10 | * or modify it under the terms of the GNU General Public Li- 11 | * cence as published by the Free Software Foundation; either 12 | * version 2 of the Licence, or any later version. 13 | * 14 | * This program is distributed in the hope that it will be use- 15 | * ful, but WITHOUT ANY WARRANTY; without even the implied war- 16 | * ranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 17 | * See the GNU General Public Licence for more details. 18 | * 19 | **/ 20 | 21 | #ifndef CURSORMANAGER_H 22 | #define CURSORMANAGER_H 23 | 24 | #include "GuiTypes.h" 25 | 26 | namespace menu { 27 | 28 | class Cursor 29 | { 30 | public: 31 | void updateCursor(); 32 | void drawCursor(Graphics& gfx); 33 | void setCursorFocus(Component* component); 34 | void addComponent(Frame* frame, Component* component, float x1, float x2, float y1, float y2); 35 | void removeComponent(Frame* frame, Component* component); 36 | void setCurrentFrame(Frame* frame); 37 | Frame* getCurrentFrame(); 38 | void clearInputData(); 39 | void clearCursorFocus(); 40 | void setFreezeAction(bool freezeAction); 41 | static Cursor& getInstance() 42 | { 43 | static Cursor obj; 44 | return obj; 45 | } 46 | 47 | private: 48 | Cursor(); 49 | ~Cursor(); 50 | 51 | class CursorEntry 52 | { 53 | public: 54 | Frame *frame; 55 | Component *comp; 56 | float xRange[2], yRange[2]; 57 | }; 58 | 59 | Frame *currentFrame; 60 | std::vector cursorList; 61 | Image *pointerImage, *grabImage; 62 | float cursorX, cursorY, cursorRot, imageCenterX, imageCenterY; 63 | Component *foundComponent, *hoverOverComponent; 64 | bool pressed, frameSwitch, clearInput, freezeAction; 65 | int buttonsPressed, previousButtonsPressed[4], activeChan; 66 | }; 67 | 68 | } //namespace menu 69 | 70 | #endif 71 | -------------------------------------------------------------------------------- /libgui/FocusManager.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Wii64 - FocusManager.h 3 | * Copyright (C) 2009 sepp256 4 | * 5 | * Wii64 homepage: http://www.emulatemii.com 6 | * email address: sepp256@gmail.com 7 | * 8 | * 9 | * This program is free software; you can redistribute it and/ 10 | * or modify it under the terms of the GNU General Public Li- 11 | * cence as published by the Free Software Foundation; either 12 | * version 2 of the Licence, or any later version. 13 | * 14 | * This program is distributed in the hope that it will be use- 15 | * ful, but WITHOUT ANY WARRANTY; without even the implied war- 16 | * ranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 17 | * See the GNU General Public Licence for more details. 18 | * 19 | **/ 20 | 21 | #ifndef FOCUSMANAGER_H 22 | #define FOCUSMANAGER_H 23 | 24 | #include "GuiTypes.h" 25 | 26 | namespace menu { 27 | 28 | class Focus 29 | { 30 | public: 31 | void updateFocus(); 32 | void addComponent(Component* component); 33 | void removeComponent(Component* component); 34 | Frame* getCurrentFrame(); 35 | void setCurrentFrame(Frame* frame); 36 | void setFocusActive(bool active); 37 | void clearInputData(); 38 | void clearPrimaryFocus(); 39 | void setFreezeAction(bool freezeAction); 40 | enum FocusDirection 41 | { 42 | DIRECTION_NONE=0, 43 | DIRECTION_LEFT, 44 | DIRECTION_RIGHT, 45 | DIRECTION_DOWN, 46 | DIRECTION_UP 47 | }; 48 | enum FocusAction 49 | { 50 | ACTION_SELECT=1, 51 | ACTION_BACK=2 52 | }; 53 | 54 | static Focus& getInstance() 55 | { 56 | static Focus obj; 57 | return obj; 58 | } 59 | 60 | private: 61 | Focus(); 62 | ~Focus(); 63 | bool focusActive, pressed, frameSwitch, clearInput, freezeAction; 64 | int buttonsPressed, previousButtonsPressed; 65 | u32 previousButtonsWii[4]; 66 | u16 previousButtonsGC[4]; 67 | u32 previousButtonsDRC[4]; 68 | ComponentList focusList; 69 | Component *primaryFocusOwner, *secondaryFocusOwner; 70 | Frame *currentFrame; 71 | 72 | }; 73 | 74 | } //namespace menu 75 | 76 | #endif 77 | -------------------------------------------------------------------------------- /libgui/Frame.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Wii64 - Frame.h 3 | * Copyright (C) 2009, 2010 sepp256 4 | * 5 | * Wii64 homepage: http://www.emulatemii.com 6 | * email address: sepp256@gmail.com 7 | * 8 | * 9 | * This program is free software; you can redistribute it and/ 10 | * or modify it under the terms of the GNU General Public Li- 11 | * cence as published by the Free Software Foundation; either 12 | * version 2 of the Licence, or any later version. 13 | * 14 | * This program is distributed in the hope that it will be use- 15 | * ful, but WITHOUT ANY WARRANTY; without even the implied war- 16 | * ranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 17 | * See the GNU General Public Licence for more details. 18 | * 19 | **/ 20 | 21 | #ifndef FRAME_H 22 | #define FRAME_H 23 | 24 | #include "GuiTypes.h" 25 | #include "Component.h" 26 | 27 | typedef void (*FrameFunc)( void ); 28 | 29 | namespace menu { 30 | 31 | class Frame : public Component 32 | { 33 | public: 34 | Frame(); 35 | ~Frame(); 36 | void showFrame(); 37 | void hideFrame(); 38 | void setEnabled(bool enable); 39 | virtual void drawChildren(Graphics& gfx); 40 | void remove(Component* component); 41 | void removeAll(); 42 | void add(Component* comp); 43 | void updateTime(float deltaTime); 44 | void setDefaultFocus(Component* comp); 45 | Component* getDefaultFocus(); 46 | void setBackFunc(FrameFunc backFn); 47 | void setSelectFunc(FrameFunc selectFn); 48 | Component* updateFocus(int direction, int buttonsPressed); 49 | virtual void activateSubmenu(int submenu) {}; 50 | virtual void updateFrame(float deltaTime) {}; 51 | 52 | private: 53 | Component* defaultFocus; 54 | FrameFunc backFunc, selectFunc; 55 | 56 | }; 57 | 58 | } //namespace menu 59 | 60 | #endif 61 | -------------------------------------------------------------------------------- /libgui/Gui.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Wii64 - Gui.h 3 | * Copyright (C) 2009 sepp256 4 | * 5 | * Wii64 homepage: http://www.emulatemii.com 6 | * email address: sepp256@gmail.com 7 | * 8 | * 9 | * This program is free software; you can redistribute it and/ 10 | * or modify it under the terms of the GNU General Public Li- 11 | * cence as published by the Free Software Foundation; either 12 | * version 2 of the Licence, or any later version. 13 | * 14 | * This program is distributed in the hope that it will be use- 15 | * ful, but WITHOUT ANY WARRANTY; without even the implied war- 16 | * ranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 17 | * See the GNU General Public Licence for more details. 18 | * 19 | **/ 20 | 21 | #ifndef GUI_H 22 | #define GUI_H 23 | 24 | #include "GuiTypes.h" 25 | #include "Frame.h" 26 | #include "Logo.h" 27 | #include "GraphicsGX.h" 28 | 29 | namespace menu { 30 | 31 | class Gui 32 | { 33 | public: 34 | void setVmode(GXRModeObj *rmode); 35 | void addFrame(Frame* frame); 36 | void removeFrame(Frame* frame); 37 | void draw(); 38 | void drawBackground(); 39 | static Gui& getInstance() 40 | { 41 | static Gui obj; 42 | return obj; 43 | } 44 | Graphics *gfx; 45 | Logo* menuLogo; 46 | 47 | private: 48 | Gui(); 49 | ~Gui(); 50 | FrameList frameList; 51 | char fade; 52 | }; 53 | 54 | } //namespace menu 55 | 56 | #endif 57 | -------------------------------------------------------------------------------- /libgui/GuiResources.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Wii64 - GuiResources.h 3 | * Copyright (C) 2009 sepp256 4 | * 5 | * Wii64 homepage: http://www.emulatemii.com 6 | * email address: sepp256@gmail.com 7 | * 8 | * 9 | * This program is free software; you can redistribute it and/ 10 | * or modify it under the terms of the GNU General Public Li- 11 | * cence as published by the Free Software Foundation; either 12 | * version 2 of the Licence, or any later version. 13 | * 14 | * This program is distributed in the hope that it will be use- 15 | * ful, but WITHOUT ANY WARRANTY; without even the implied war- 16 | * ranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 17 | * See the GNU General Public Licence for more details. 18 | * 19 | **/ 20 | 21 | #ifndef GUIRESOURCES_H 22 | #define GUIRESOURCES_H 23 | 24 | #include "GuiTypes.h" 25 | 26 | namespace menu { 27 | 28 | class Resources 29 | { 30 | public: 31 | Image* getImage(int image); 32 | static Resources& getInstance() 33 | { 34 | static Resources obj; 35 | return obj; 36 | } 37 | 38 | enum Images 39 | { 40 | IMAGE_DEFAULT_BUTTON=1, 41 | IMAGE_DEFAULT_BUTTONFOCUS, 42 | IMAGE_STYLEA_BUTTON, 43 | IMAGE_STYLEA_BUTTONFOCUS, 44 | IMAGE_STYLEA_BUTTONSELECTOFF, 45 | IMAGE_STYLEA_BUTTONSELECTOFFFOCUS, 46 | IMAGE_STYLEA_BUTTONSELECTON, 47 | IMAGE_STYLEA_BUTTONSELECTONFOCUS, 48 | IMAGE_MENU_BACKGROUND, 49 | IMAGE_LOGO, 50 | IMAGE_CONTROLLER_EMPTY, 51 | IMAGE_CONTROLLER_GAMECUBE, 52 | IMAGE_CONTROLLER_CLASSIC, 53 | IMAGE_CONTROLLER_WIIMOTENUNCHUCK, 54 | IMAGE_CONTROLLER_WIIMOTE, 55 | IMAGE_N64_CONTROLLER 56 | }; 57 | 58 | private: 59 | Resources(); 60 | ~Resources(); 61 | Image *defaultButtonImage, *defaultButtonFocusImage; 62 | Image *styleAButtonImage, *styleAButtonFocusImage; 63 | Image *styleAButtonSelectOffImage, *styleAButtonSelectOffFocusImage; 64 | Image *styleAButtonSelectOnImage, *styleAButtonSelectOnFocusImage; 65 | Image *menuBackgroundImage; 66 | Image *logoImage; 67 | Image *controllerEmptyImage, *controllerGamecubeImage; 68 | Image *controllerClassicImage, *controllerWiimoteNunchuckImage; 69 | Image *controllerWiimoteImage; 70 | Image *n64ControllerImage; 71 | 72 | }; 73 | 74 | } //namespace menu 75 | 76 | #endif 77 | -------------------------------------------------------------------------------- /libgui/GuiTypes.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Wii64 - GuiTypes.h 3 | * Copyright (C) 2009 sepp256 4 | * 5 | * Wii64 homepage: http://www.emulatemii.com 6 | * email address: sepp256@gmail.com 7 | * 8 | * 9 | * This program is free software; you can redistribute it and/ 10 | * or modify it under the terms of the GNU General Public Li- 11 | * cence as published by the Free Software Foundation; either 12 | * version 2 of the Licence, or any later version. 13 | * 14 | * This program is distributed in the hope that it will be use- 15 | * ful, but WITHOUT ANY WARRANTY; without even the implied war- 16 | * ranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 17 | * See the GNU General Public Licence for more details. 18 | * 19 | **/ 20 | 21 | #ifndef GUIDEFS_H 22 | #define GUIDEFS_H 23 | 24 | #include 25 | #ifdef HW_RVL 26 | #include 27 | #endif 28 | #include 29 | #include 30 | #include 31 | #include 32 | #include 33 | 34 | extern "C" { 35 | #include 36 | #include 37 | } 38 | 39 | namespace menu { 40 | 41 | class Graphics; 42 | class Component; 43 | class Frame; 44 | class Button; 45 | class Input; 46 | class Cursor; 47 | class Focus; 48 | class Image; 49 | class IplFont; 50 | 51 | typedef std::vector FrameList; 52 | typedef std::vector ComponentList; 53 | typedef std::stack FloatStack; 54 | //typedef std::stack MatrixStack; 55 | 56 | } //namespace menu 57 | 58 | #endif 59 | -------------------------------------------------------------------------------- /libgui/IPLFont.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Wii64 - IPLFont.h 3 | * Copyright (C) 2009 sepp256 4 | * 5 | * Wii64 homepage: http://www.emulatemii.com 6 | * email address: sepp256@gmail.com 7 | * 8 | * 9 | * This program is free software; you can redistribute it and/ 10 | * or modify it under the terms of the GNU General Public Li- 11 | * cence as published by the Free Software Foundation; either 12 | * version 2 of the Licence, or any later version. 13 | * 14 | * This program is distributed in the hope that it will be use- 15 | * ful, but WITHOUT ANY WARRANTY; without even the implied war- 16 | * ranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 17 | * See the GNU General Public Licence for more details. 18 | * 19 | **/ 20 | 21 | #ifndef IPLFONT_H 22 | #define IPLFONT_H 23 | 24 | #include "GuiTypes.h" 25 | 26 | namespace menu { 27 | 28 | class IplFont 29 | { 30 | public: 31 | void setVmode(GXRModeObj *rmode); 32 | void drawInit(GXColor fontColor); 33 | void setColor(GXColor fontColor); 34 | void setColor(GXColor* fontColorPtr); 35 | void drawString(int x, int y, char *string, float scale, bool centered); 36 | int drawStringWrap(int x, int y, char *string, float scale, bool centered, int maxWidth, int lineSpacing); 37 | void drawStringAtOrigin(char *string, float scale); 38 | int getStringWidth(char *string, float scale); 39 | int getStringHeight(char *string, float scale); 40 | static IplFont& getInstance() 41 | { 42 | static IplFont obj; 43 | return obj; 44 | } 45 | 46 | private: 47 | IplFont(); 48 | ~IplFont(); 49 | void initFont(); 50 | void setIplConfig(unsigned char c); 51 | void decodeYay0(void *src, void *dst); 52 | void convertI2toI4(void *dst, void *src, int xres, int yres); 53 | 54 | typedef struct { 55 | u16 s[256], t[256], font_size[256], fheight; 56 | } CHAR_INFO; 57 | 58 | #ifdef HW_RVL 59 | unsigned char *fontFont; 60 | #else //GC 61 | unsigned char fontFont[ 0x40000 ] __attribute__((aligned(32))); 62 | #endif 63 | 64 | u16 frameWidth; 65 | CHAR_INFO fontChars; 66 | GXTexObj fontTexObj; 67 | GXRModeObj *vmode; 68 | GXColor fontColor; 69 | 70 | }; 71 | 72 | } //namespace menu 73 | 74 | #endif 75 | -------------------------------------------------------------------------------- /libgui/Image.cpp: -------------------------------------------------------------------------------- 1 | /** 2 | * Wii64 - Image.cpp 3 | * Copyright (C) 2009 sepp256 4 | * 5 | * Wii64 homepage: http://www.emulatemii.com 6 | * email address: sepp256@gmail.com 7 | * 8 | * 9 | * This program is free software; you can redistribute it and/ 10 | * or modify it under the terms of the GNU General Public Li- 11 | * cence as published by the Free Software Foundation; either 12 | * version 2 of the Licence, or any later version. 13 | * 14 | * This program is distributed in the hope that it will be use- 15 | * ful, but WITHOUT ANY WARRANTY; without even the implied war- 16 | * ranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 17 | * See the GNU General Public Licence for more details. 18 | * 19 | **/ 20 | 21 | #include "Image.h" 22 | 23 | namespace menu { 24 | 25 | Image::Image(void* texture, u16 wd, u16 ht, u8 fmt, u8 wrap_s, u8 wrap_t, u8 mipmap) 26 | : img_ptr(texture), 27 | tlut_ptr(0), 28 | width(wd), 29 | height(ht), 30 | format(fmt), 31 | tlut_format(0) 32 | { 33 | GX_InitTexObj(&obj, img_ptr, width, height, format, wrap_s, wrap_t, mipmap); 34 | } 35 | 36 | Image::Image(void* texture, u16 wd, u16 ht, u8 fmt, u8 wrap_s, u8 wrap_t, u8 mipmap, void* lut, u8 lut_fmt, u8 lut_name, u16 lut_size) 37 | : img_ptr(texture), 38 | tlut_ptr(lut), 39 | width(wd), 40 | height(ht), 41 | format(fmt), 42 | tlut_format(lut_fmt), 43 | tlut_name(lut_name), 44 | tlut_size(lut_size) 45 | { 46 | GX_InitTlutObj(&tlut_obj, tlut_ptr, tlut_format, tlut_size); 47 | GX_InitTexObjCI(&obj, img_ptr, width, height, format, wrap_s, wrap_t, mipmap, tlut_name); 48 | } 49 | 50 | Image::~Image() 51 | { 52 | } 53 | 54 | void Image::activateImage(u8 mapid) 55 | { 56 | if (tlut_ptr) GX_LoadTlut(&tlut_obj, tlut_name); 57 | GX_LoadTexObj(&obj, mapid); 58 | } 59 | 60 | } //namespace menu 61 | -------------------------------------------------------------------------------- /libgui/Image.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Wii64 - Image.h 3 | * Copyright (C) 2009 sepp256 4 | * 5 | * Wii64 homepage: http://www.emulatemii.com 6 | * email address: sepp256@gmail.com 7 | * 8 | * 9 | * This program is free software; you can redistribute it and/ 10 | * or modify it under the terms of the GNU General Public Li- 11 | * cence as published by the Free Software Foundation; either 12 | * version 2 of the Licence, or any later version. 13 | * 14 | * This program is distributed in the hope that it will be use- 15 | * ful, but WITHOUT ANY WARRANTY; without even the implied war- 16 | * ranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 17 | * See the GNU General Public Licence for more details. 18 | * 19 | **/ 20 | 21 | #ifndef IMAGE_H 22 | #define IMAGE_H 23 | 24 | #include "GuiTypes.h" 25 | 26 | namespace menu { 27 | 28 | class Image 29 | { 30 | public: 31 | Image(void* texture, u16 wd, u16 ht, u8 fmt, u8 wrap_s, u8 wrap_t, u8 mipmap); 32 | Image(void* texture, u16 wd, u16 ht, u8 fmt, u8 wrap_s, u8 wrap_t, u8 mipmap, void* lut, u8 lut_fmt, u8 lut_name, u16 lut_size); 33 | ~Image(); 34 | void activateImage(u8 mapid); 35 | 36 | private: 37 | GXTexObj obj; 38 | GXTlutObj tlut_obj; 39 | void *img_ptr; 40 | void *tlut_ptr; 41 | u16 width, height; 42 | u8 format, tlut_format, tlut_name; 43 | u16 tlut_size; 44 | 45 | }; 46 | 47 | } //namespace menu 48 | 49 | #endif 50 | -------------------------------------------------------------------------------- /libgui/InputManager.cpp: -------------------------------------------------------------------------------- 1 | /** 2 | * Wii64 - InputManager.cpp 3 | * Copyright (C) 2009 sepp256 4 | * 5 | * Wii64 homepage: http://www.emulatemii.com 6 | * email address: sepp256@gmail.com 7 | * 8 | * 9 | * This program is free software; you can redistribute it and/ 10 | * or modify it under the terms of the GNU General Public Li- 11 | * cence as published by the Free Software Foundation; either 12 | * version 2 of the Licence, or any later version. 13 | * 14 | * This program is distributed in the hope that it will be use- 15 | * ful, but WITHOUT ANY WARRANTY; without even the implied war- 16 | * ranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 17 | * See the GNU General Public Licence for more details. 18 | * 19 | **/ 20 | 21 | #include "InputManager.h" 22 | #include "FocusManager.h" 23 | #include "CursorManager.h" 24 | #include "../gc_input/controller.h" 25 | #include 26 | 27 | void ShutdownWii(); 28 | 29 | 30 | 31 | namespace menu { 32 | 33 | Input::Input() 34 | { 35 | PAD_Init(); 36 | #ifdef HW_RVL 37 | CONF_Init(); 38 | WPAD_Init(); 39 | WPAD_SetIdleTimeout(120); 40 | WPAD_SetVRes(WPAD_CHAN_ALL, 640, 480); 41 | WPAD_SetDataFormat(WPAD_CHAN_ALL, WPAD_FMT_BTNS_ACC_IR); 42 | WPAD_SetPowerButtonCallback((WPADShutdownCallback)ShutdownWii); 43 | SYS_SetPowerCallback(ShutdownWii); 44 | WiiDRC_Init(); 45 | #endif 46 | // VIDEO_SetPostRetraceCallback (PAD_ScanPads); 47 | } 48 | 49 | Input::~Input() 50 | { 51 | } 52 | 53 | void Input::refreshInput() 54 | { 55 | if(padNeedScan){ gc_connected = PAD_ScanPads(); padNeedScan = 0; } 56 | PAD_Read(gcPad); 57 | PAD_Clamp(gcPad); 58 | #ifdef HW_RVL 59 | if(wpadNeedScan){ WPAD_ScanPads(); wpadNeedScan = 0; } 60 | WPAD_ScanPads(); 61 | wiiPad = WPAD_Data(0); 62 | if(drcNeedScan){ WiiDRC_ScanPads(); drcNeedScan = 0; } 63 | #endif 64 | } 65 | 66 | #ifdef HW_RVL 67 | WPADData* Input::getWpad() 68 | { 69 | return wiiPad; 70 | } 71 | #endif 72 | 73 | PADStatus* Input::getPad() 74 | { 75 | return &gcPad[0]; 76 | } 77 | 78 | void Input::clearInputData() 79 | { 80 | Focus::getInstance().clearInputData(); 81 | Cursor::getInstance().clearInputData(); 82 | } 83 | 84 | } //namespace menu 85 | -------------------------------------------------------------------------------- /libgui/InputManager.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Wii64 - InputManager.h 3 | * Copyright (C) 2009 sepp256 4 | * 5 | * Wii64 homepage: http://www.emulatemii.com 6 | * email address: sepp256@gmail.com 7 | * 8 | * 9 | * This program is free software; you can redistribute it and/ 10 | * or modify it under the terms of the GNU General Public Li- 11 | * cence as published by the Free Software Foundation; either 12 | * version 2 of the Licence, or any later version. 13 | * 14 | * This program is distributed in the hope that it will be use- 15 | * ful, but WITHOUT ANY WARRANTY; without even the implied war- 16 | * ranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 17 | * See the GNU General Public Licence for more details. 18 | * 19 | **/ 20 | 21 | #ifndef INPUTMANAGER_H 22 | #define INPUTMANAGER_H 23 | 24 | #include "GuiTypes.h" 25 | #include 26 | 27 | namespace menu { 28 | 29 | class Input 30 | { 31 | public: 32 | void refreshInput(); 33 | #ifdef HW_RVL 34 | WPADData* getWpad(); 35 | #endif 36 | PADStatus* getPad(); 37 | void clearInputData(); 38 | static Input& getInstance() 39 | { 40 | static Input obj; 41 | return obj; 42 | } 43 | 44 | private: 45 | Input(); 46 | ~Input(); 47 | PADStatus gcPad[4]; 48 | #ifdef HW_RVL 49 | WPADData *wiiPad; 50 | #endif 51 | 52 | }; 53 | 54 | } //namespace menu 55 | 56 | #endif 57 | -------------------------------------------------------------------------------- /libgui/InputStatusBar.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Wii64 - InputStatusBar.h 3 | * Copyright (C) 2009 sepp256 4 | * 5 | * Wii64 homepage: http://www.emulatemii.com 6 | * email address: sepp256@gmail.com 7 | * 8 | * 9 | * This program is free software; you can redistribute it and/ 10 | * or modify it under the terms of the GNU General Public Li- 11 | * cence as published by the Free Software Foundation; either 12 | * version 2 of the Licence, or any later version. 13 | * 14 | * This program is distributed in the hope that it will be use- 15 | * ful, but WITHOUT ANY WARRANTY; without even the implied war- 16 | * ranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 17 | * See the GNU General Public Licence for more details. 18 | * 19 | **/ 20 | 21 | #ifndef INPUTSTATUSBAR_H 22 | #define INPUTSTATUSBAR_H 23 | 24 | //#include "GuiTypes.h" 25 | #include "Component.h" 26 | 27 | namespace menu { 28 | 29 | class InputStatusBar : public Component 30 | { 31 | public: 32 | InputStatusBar(float x, float y); 33 | ~InputStatusBar(); 34 | void updateTime(float deltaTime); 35 | void drawComponent(Graphics& gfx); 36 | Component* updateFocus(int direction, int buttonsPressed); 37 | 38 | private: 39 | /* Image *normalImage; 40 | Image *focusImage; 41 | Image *selectedImage; 42 | Image *selectedFocusImage; 43 | char** buttonText; 44 | int buttonStyle, labelMode, labelScissor; 45 | unsigned long StartTime;*/ 46 | float x, y;/*, width, height; 47 | GXColor focusColor, inactiveColor, activeColor, selectedColor, labelColor;*/ 48 | 49 | }; 50 | 51 | } //namespace menu 52 | 53 | #endif 54 | -------------------------------------------------------------------------------- /libgui/LoadingBar.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Wii64 - LoadingBar.h 3 | * Copyright (C) 2009 sepp256 4 | * 5 | * Wii64 homepage: http://www.emulatemii.com 6 | * email address: sepp256@gmail.com 7 | * 8 | * 9 | * This program is free software; you can redistribute it and/ 10 | * or modify it under the terms of the GNU General Public Li- 11 | * cence as published by the Free Software Foundation; either 12 | * version 2 of the Licence, or any later version. 13 | * 14 | * This program is distributed in the hope that it will be use- 15 | * ful, but WITHOUT ANY WARRANTY; without even the implied war- 16 | * ranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 17 | * See the GNU General Public Licence for more details. 18 | * 19 | **/ 20 | 21 | #ifndef LOADINGBAR_H 22 | #define LOADINGBAR_H 23 | 24 | #include "Frame.h" 25 | #include "Button.h" 26 | #include "Image.h" 27 | #include "Gui.h" 28 | #include "GuiTypes.h" 29 | 30 | namespace menu { 31 | 32 | class LoadingBar : public Frame 33 | { 34 | public: 35 | void showBar(float percent, const char* text); 36 | bool getActive(); 37 | void drawLoadingBar(Graphics& gfx); 38 | 39 | static LoadingBar& getInstance() 40 | { 41 | static LoadingBar obj; 42 | return obj; 43 | } 44 | 45 | private: 46 | LoadingBar(); 47 | ~LoadingBar(); 48 | Image *buttonImage; 49 | Image *buttonFocusImage; 50 | bool loadingBarActive; 51 | Frame *currentCursorFrame; 52 | Frame *currentFocusFrame; 53 | float percentComplete; 54 | GXColor boxColor, backColor, barColor, textColor; 55 | 56 | }; 57 | 58 | } //namespace menu 59 | 60 | #endif 61 | -------------------------------------------------------------------------------- /libgui/Logo.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Wii64 - Logo.h 3 | * Copyright (C) 2009 sepp256 4 | * 5 | * Wii64 homepage: http://www.emulatemii.com 6 | * email address: sepp256@gmail.com 7 | * 8 | * 9 | * This program is free software; you can redistribute it and/ 10 | * or modify it under the terms of the GNU General Public Li- 11 | * cence as published by the Free Software Foundation; either 12 | * version 2 of the Licence, or any later version. 13 | * 14 | * This program is distributed in the hope that it will be use- 15 | * ful, but WITHOUT ANY WARRANTY; without even the implied war- 16 | * ranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 17 | * See the GNU General Public Licence for more details. 18 | * 19 | **/ 20 | 21 | #ifndef LOGO_H 22 | #define LOGO_H 23 | 24 | //#include "GuiTypes.h" 25 | #include "Component.h" 26 | 27 | namespace menu { 28 | 29 | class Logo : public Component 30 | { 31 | public: 32 | Logo(); 33 | ~Logo(); 34 | void setLocation(float x, float y, float z); 35 | void setSize(float size); 36 | void setMode(int mode); 37 | void updateTime(float deltaTime); 38 | void drawComponent(Graphics& gfx); 39 | enum LogoMode 40 | { 41 | LOGO_N=0, 42 | LOGO_M, 43 | LOGO_W 44 | }; 45 | 46 | private: 47 | void drawQuad(u8 v0, u8 v1, u8 v2, u8 v3, u8 c); 48 | void drawLine(u8 v0, u8 v1, u8 c); 49 | int logoMode; 50 | float x, y, z, size; 51 | float rotateAuto, rotateX, rotateY; 52 | 53 | }; 54 | 55 | } //namespace menu 56 | 57 | #endif 58 | -------------------------------------------------------------------------------- /libgui/MessageBox.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Wii64 - MessageBox.h 3 | * Copyright (C) 2009 sepp256 4 | * 5 | * Wii64 homepage: http://www.emulatemii.com 6 | * email address: sepp256@gmail.com 7 | * 8 | * 9 | * This program is free software; you can redistribute it and/ 10 | * or modify it under the terms of the GNU General Public Li- 11 | * cence as published by the Free Software Foundation; either 12 | * version 2 of the Licence, or any later version. 13 | * 14 | * This program is distributed in the hope that it will be use- 15 | * ful, but WITHOUT ANY WARRANTY; without even the implied war- 16 | * ranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 17 | * See the GNU General Public Licence for more details. 18 | * 19 | **/ 20 | 21 | #ifndef MESSAGEBOX_H 22 | #define MESSAGEBOX_H 23 | 24 | #include "Frame.h" 25 | #include "Image.h" 26 | #include "Gui.h" 27 | #include "GuiTypes.h" 28 | 29 | namespace menu { 30 | 31 | class MessageBox : public Frame 32 | { 33 | public: 34 | void setMessage(const char* text); 35 | int askMessage(const char* text); 36 | void fadeMessage(const char* text); 37 | void setReturnValue(int returnValue); 38 | int getReturnValue(); 39 | void deactivate(); 40 | bool getActive(); 41 | void drawMessageBox(Graphics& gfx); 42 | 43 | static MessageBox& getInstance() 44 | { 45 | static MessageBox obj; 46 | return obj; 47 | } 48 | 49 | private: 50 | MessageBox(); 51 | ~MessageBox(); 52 | Image *buttonImage; 53 | Image *buttonFocusImage; 54 | bool messageBoxActive; 55 | Frame *currentCursorFrame; 56 | Frame *currentFocusFrame; 57 | GXColor boxColor, textColor; 58 | int returnValue; 59 | float messageFade; 60 | 61 | }; 62 | 63 | } //namespace menu 64 | 65 | #endif 66 | -------------------------------------------------------------------------------- /libgui/TextBox.cpp: -------------------------------------------------------------------------------- 1 | /** 2 | * Wii64 - TextBox.cpp 3 | * Copyright (C) 2009 sepp256 4 | * 5 | * Wii64 homepage: http://www.emulatemii.com 6 | * email address: sepp256@gmail.com 7 | * 8 | * 9 | * This program is free software; you can redistribute it and/ 10 | * or modify it under the terms of the GNU General Public Li- 11 | * cence as published by the Free Software Foundation; either 12 | * version 2 of the Licence, or any later version. 13 | * 14 | * This program is distributed in the hope that it will be use- 15 | * ful, but WITHOUT ANY WARRANTY; without even the implied war- 16 | * ranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 17 | * See the GNU General Public Licence for more details. 18 | * 19 | **/ 20 | 21 | #include "TextBox.h" 22 | #include "GraphicsGX.h" 23 | #include "IPLFont.h" 24 | 25 | namespace menu { 26 | 27 | TextBox::TextBox(char** label, float x, float y, float scale, bool centered) 28 | : centered(centered), 29 | textBoxText(label), 30 | x(x), 31 | y(y), 32 | scale(scale) 33 | { 34 | setType(TYPE_TEXTBOX); 35 | //Label color 36 | // GXColor color = {255, 255, 255, 255}; 37 | GXColor color = {56, 56, 56, 255}; 38 | setColor(&color); 39 | } 40 | 41 | TextBox::~TextBox() 42 | { 43 | } 44 | 45 | void TextBox::setColor(GXColor *colors) 46 | { 47 | labelColor.r = colors[0].r; 48 | labelColor.g = colors[0].g; 49 | labelColor.b = colors[0].b; 50 | labelColor.a = colors[0].a; 51 | } 52 | 53 | void TextBox::setText(char** strPtr) 54 | { 55 | textBoxText = strPtr; 56 | } 57 | 58 | void TextBox::drawComponent(Graphics& gfx) 59 | { 60 | IplFont::getInstance().drawInit(labelColor); 61 | IplFont::getInstance().drawString((int) x, (int) y, *textBoxText, scale, centered); 62 | } 63 | 64 | } //namespace menu 65 | -------------------------------------------------------------------------------- /libgui/TextBox.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Wii64 - TextBox.h 3 | * Copyright (C) 2009 sepp256 4 | * 5 | * Wii64 homepage: http://www.emulatemii.com 6 | * email address: sepp256@gmail.com 7 | * 8 | * 9 | * This program is free software; you can redistribute it and/ 10 | * or modify it under the terms of the GNU General Public Li- 11 | * cence as published by the Free Software Foundation; either 12 | * version 2 of the Licence, or any later version. 13 | * 14 | * This program is distributed in the hope that it will be use- 15 | * ful, but WITHOUT ANY WARRANTY; without even the implied war- 16 | * ranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 17 | * See the GNU General Public Licence for more details. 18 | * 19 | **/ 20 | 21 | #ifndef TEXTBOX_H 22 | #define TEXTBOX_H 23 | 24 | //#include "GuiTypes.h" 25 | #include "Component.h" 26 | 27 | namespace menu { 28 | 29 | class TextBox : public Component 30 | { 31 | public: 32 | TextBox(char** label, float x, float y, float scale, bool centered); 33 | ~TextBox(); 34 | void setColor(GXColor *labelColor); 35 | void setText(char** strPtr); 36 | void drawComponent(Graphics& gfx); 37 | 38 | private: 39 | bool centered; 40 | char** textBoxText; 41 | float x, y, scale; 42 | GXColor labelColor; 43 | 44 | }; 45 | 46 | } //namespace menu 47 | 48 | #endif 49 | -------------------------------------------------------------------------------- /libgui/resources.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Wii64 - resources.h 3 | * Copyright (C) 2009 sepp256 4 | * 5 | * Wii64 homepage: http://www.emulatemii.com 6 | * email address: sepp256@gmail.com 7 | * 8 | * 9 | * This program is free software; you can redistribute it and/ 10 | * or modify it under the terms of the GNU General Public Li- 11 | * cence as published by the Free Software Foundation; either 12 | * version 2 of the Licence, or any later version. 13 | * 14 | * This program is distributed in the hope that it will be use- 15 | * ful, but WITHOUT ANY WARRANTY; without even the implied war- 16 | * ranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 17 | * See the GNU General Public Licence for more details. 18 | * 19 | **/ 20 | 21 | #ifndef RESOURCES_H 22 | #define RESOURCES_H 23 | 24 | extern u8 CursorPointTexture[]; 25 | extern u8 CursorGrabTexture[]; 26 | extern u8 ButtonTexture[]; 27 | extern u8 ButtonFocusTexture[]; 28 | extern u8 StyleAButtonTlut[]; 29 | extern u8 StyleAButtonTexture[]; 30 | extern u8 StyleAButtonFocusTexture[]; 31 | extern u8 StyleAButtonSelectOffTexture[]; 32 | extern u8 StyleAButtonSelectOffFocusTexture[]; 33 | extern u8 StyleAButtonSelectOnTexture[]; 34 | extern u8 StyleAButtonSelectOnFocusTexture[]; 35 | 36 | #endif 37 | -------------------------------------------------------------------------------- /libgui/resources/Button.tx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FIX94/mupen64gc-fix94/e5d9d9cc9fea4b1abaf79635cd00893a56a03ff9/libgui/resources/Button.tx -------------------------------------------------------------------------------- /libgui/resources/ButtonA.tlt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FIX94/mupen64gc-fix94/e5d9d9cc9fea4b1abaf79635cd00893a56a03ff9/libgui/resources/ButtonA.tlt -------------------------------------------------------------------------------- /libgui/resources/ButtonA.tx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FIX94/mupen64gc-fix94/e5d9d9cc9fea4b1abaf79635cd00893a56a03ff9/libgui/resources/ButtonA.tx -------------------------------------------------------------------------------- /libgui/resources/ButtonAFoc.tx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FIX94/mupen64gc-fix94/e5d9d9cc9fea4b1abaf79635cd00893a56a03ff9/libgui/resources/ButtonAFoc.tx -------------------------------------------------------------------------------- /libgui/resources/ButtonASelOff.tx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FIX94/mupen64gc-fix94/e5d9d9cc9fea4b1abaf79635cd00893a56a03ff9/libgui/resources/ButtonASelOff.tx -------------------------------------------------------------------------------- /libgui/resources/ButtonASelOffFoc.tx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FIX94/mupen64gc-fix94/e5d9d9cc9fea4b1abaf79635cd00893a56a03ff9/libgui/resources/ButtonASelOffFoc.tx -------------------------------------------------------------------------------- /libgui/resources/ButtonASelOn.tx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FIX94/mupen64gc-fix94/e5d9d9cc9fea4b1abaf79635cd00893a56a03ff9/libgui/resources/ButtonASelOn.tx -------------------------------------------------------------------------------- /libgui/resources/ButtonASelOnFoc.tx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FIX94/mupen64gc-fix94/e5d9d9cc9fea4b1abaf79635cd00893a56a03ff9/libgui/resources/ButtonASelOnFoc.tx -------------------------------------------------------------------------------- /libgui/resources/ButtonFocus.tx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FIX94/mupen64gc-fix94/e5d9d9cc9fea4b1abaf79635cd00893a56a03ff9/libgui/resources/ButtonFocus.tx -------------------------------------------------------------------------------- /libgui/resources/CursorGrab.tx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FIX94/mupen64gc-fix94/e5d9d9cc9fea4b1abaf79635cd00893a56a03ff9/libgui/resources/CursorGrab.tx -------------------------------------------------------------------------------- /libgui/resources/CursorPoint.tx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FIX94/mupen64gc-fix94/e5d9d9cc9fea4b1abaf79635cd00893a56a03ff9/libgui/resources/CursorPoint.tx -------------------------------------------------------------------------------- /main/KillWiimote.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | void killWiimote(void){ 4 | 5 | u8 bmRequestType = 0x20; 6 | u8 bmRequest = 0; 7 | u16 wValue = 0; 8 | u16 wIndex = 0; 9 | u16 wLength = 0x0300; 10 | u8 unknown = 0; 11 | u8 data[3] = { 0x03, 0x0c, 0x00 }; 12 | 13 | ioctlv* resetBTVector = malloc( 6*sizeof(ioctlv) + 1*sizeof(ioctlv) ); 14 | resetBTVector[0] = (ioctlv) { &bmRequestType, sizeof(bmRequestType) }; 15 | resetBTVector[1] = (ioctlv) { &bmRequest, sizeof(bmRequest) }; 16 | resetBTVector[2] = (ioctlv) { &wValue, sizeof(wValue) }; 17 | resetBTVector[3] = (ioctlv) { &wIndex, sizeof(wIndex) }; 18 | resetBTVector[4] = (ioctlv) { &wLength, sizeof(wLength) }; 19 | resetBTVector[5] = (ioctlv) { &unknown, sizeof(unknown) }; 20 | resetBTVector[6] = (ioctlv) { &data, sizeof(data) }; 21 | 22 | int btfd = IOS_Open("/dev/usb/oh1/57e/305", 2); 23 | IOS_Ioctlv(btfd, 0, 6, 1, resetBTVector); 24 | IOS_Close(btfd); 25 | 26 | free(resetBTVector); 27 | } 28 | 29 | -------------------------------------------------------------------------------- /main/ROM-Cache.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Wii64 - ROM-Cache.h 3 | * Copyright (C) 2007, 2008, 2009 Mike Slegeir 4 | * Copyright (C) 2007, 2008, 2009 emu_kidid 5 | * 6 | * This is how the ROM should be accessed, this way the ROM doesn't waste RAM 7 | * 8 | * Wii64 homepage: http://www.emulatemii.com 9 | * email address: tehpola@gmail.com 10 | * emukidid@gmail.com 11 | * 12 | * 13 | * This program is free software; you can redistribute it and/ 14 | * or modify it under the terms of the GNU General Public Li- 15 | * cence as published by the Free Software Foundation; either 16 | * version 2 of the Licence, or any later version. 17 | * 18 | * This program is distributed in the hope that it will be use- 19 | * ful, but WITHOUT ANY WARRANTY; without even the implied war- 20 | * ranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 21 | * See the GNU General Public Licence for more details. 22 | * 23 | **/ 24 | 25 | #ifndef ROM_CACHE_H 26 | #define ROM_CACHE_H 27 | 28 | #include "../fileBrowser/fileBrowser.h" 29 | #include 30 | 31 | /* Rom Cache stuff */ 32 | // Note: All length/size/offsets are in bytes 33 | 34 | void ROMCache_init(fileBrowser_file*); 35 | void ROMCache_deinit(); 36 | void ROMCache_read(u8* ram_dest, u32 rom_offset, u32 length); 37 | int ROMCache_load(fileBrowser_file* file); 38 | // WARNING: Not necessarily valid after another ROMCache call 39 | void* ROMCache_pointer(u32 rom_offset); 40 | 41 | /* Byteswapping stuff */ 42 | extern int ROM_byte_swap; 43 | void byte_swap(char* buffer, unsigned int length); 44 | #define BYTE_SWAP_BAD -1 45 | #define BYTE_SWAP_NONE 0 46 | #define BYTE_SWAP_HALF 1 47 | #define BYTE_SWAP_BYTE 2 48 | 49 | #define ROM_CACHE_ERROR_READ -1 50 | #define ROM_CACHE_INVALID_ROM -2 51 | 52 | #endif 53 | 54 | -------------------------------------------------------------------------------- /main/gczip.c: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * GC Zip Extension 3 | * 4 | * GC DVD Zip File Loader. 5 | * 6 | * The idea here is not to support every zip file on the planet! 7 | * The unzip routine will simply unzip the first file in the zip archive. 8 | * 9 | * For maximum compression, I'd recommend using 7Zip, 10 | * 7za a -tzip -mx=9 rom.zip rom.smc 11 | ****************************************************************************/ 12 | #if 0 13 | #include 14 | #include 15 | #include 16 | #include 17 | #include 18 | #include "gczip.h" 19 | 20 | int zipoffset = 0; 21 | z_stream zs; 22 | 23 | 24 | 25 | 26 | int inflate_init(PKZIPHEADER* pkzip){ 27 | /*** Prepare the zip stream ***/ 28 | zipoffset = ( sizeof(PKZIPHEADER) + FLIP16(pkzip->filenameLength) + FLIP16(pkzip->extraDataLength )); 29 | 30 | memset(&zs, 0, sizeof(z_stream)); 31 | zs.zalloc = Z_NULL; 32 | zs.zfree = Z_NULL; 33 | zs.opaque = Z_NULL; 34 | zs.avail_in = 0; 35 | zs.next_in = Z_NULL; 36 | return inflateInit2(&zs, -MAX_WBITS); 37 | } 38 | 39 | int inflate_chunk(void* dst, void* src, int length){ 40 | zs.avail_in = (length - zipoffset); 41 | zs.next_in = (src + zipoffset); 42 | void* buf; 43 | int res; 44 | int have, bufferoffset = 0; 45 | 46 | buf = malloc(ZIPCHUNK); 47 | /*** Now inflate until input buffer is exhausted ***/ 48 | do { 49 | zs.avail_out = ZIPCHUNK; 50 | zs.next_out = buf; 51 | 52 | res = inflate(&zs, Z_NO_FLUSH); 53 | 54 | if(res == Z_MEM_ERROR) { 55 | inflateEnd(&zs); 56 | return -1; 57 | } 58 | 59 | if(res == Z_STREAM_END){ 60 | inflateEnd(&zs); 61 | return 0; 62 | } 63 | have = ZIPCHUNK - zs.avail_out; 64 | if (have) { 65 | /*** Copy to normal block buffer ***/ 66 | memcpy(dst + bufferoffset, buf, have); 67 | bufferoffset += have; 68 | } 69 | }while(zs.avail_out == 0); 70 | free(buf); 71 | zipoffset = 0; 72 | return bufferoffset; 73 | } 74 | #endif 75 | -------------------------------------------------------------------------------- /main/gczip.h: -------------------------------------------------------------------------------- 1 | #ifndef __GCZIP_H__ 2 | #define __GCZIP_H__ 3 | 4 | /*** PKWare Zip Header ***/ 5 | #define CRC_SEED 0xFFFFFFFF 6 | #define PKZIPID 0x504b0304 7 | #define ZIPCHUNK 2048 8 | 9 | typedef struct { 10 | unsigned int zipid __attribute__ ((__packed__)); // 0x04034b50 11 | unsigned short zipversion __attribute__ ((__packed__)); 12 | unsigned short zipflags __attribute__ ((__packed__)); 13 | unsigned short compressionMethod __attribute__ ((__packed__)); 14 | unsigned short lastmodtime __attribute__ ((__packed__)); 15 | unsigned short lastmoddate __attribute__ ((__packed__)); 16 | unsigned int crc32 __attribute__ ((__packed__)); 17 | unsigned int compressedSize __attribute__ ((__packed__)); 18 | unsigned int uncompressedSize __attribute__ ((__packed__)); 19 | unsigned short filenameLength __attribute__ ((__packed__)); 20 | unsigned short extraDataLength __attribute__ ((__packed__)); 21 | } PKZIPHEADER; 22 | 23 | static inline u32 FLIP32(u32 b){ 24 | unsigned int c; 25 | 26 | c = ( b & 0xff000000 ) >> 24; 27 | c |= ( b & 0xff0000 ) >> 8; 28 | c |= ( b & 0xff00 ) << 8; 29 | c |= ( b & 0xff ) << 24; 30 | 31 | return c; 32 | } 33 | 34 | static inline u16 FLIP16(u16 b){ 35 | u16 c; 36 | 37 | c = ( b & 0xff00 ) >> 8; 38 | c |= ( b &0xff ) << 8; 39 | 40 | return c; 41 | } 42 | 43 | int inflate_init(PKZIPHEADER* pkzip); 44 | 45 | int inflate_chunk(void* dst, void* src, int length); 46 | #endif 47 | -------------------------------------------------------------------------------- /main/guifuncs.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Mupen64 - guifuncs.h 3 | * Copyright (C) 2002 Hacktarux 4 | * 5 | * Mupen64 homepage: http://mupen64.emulation64.com 6 | * email address: hacktarux@yahoo.fr 7 | * 8 | * If you want to contribute to the project please contact 9 | * me first (maybe someone is already making what you are 10 | * planning to do). 11 | * 12 | * 13 | * This program is free software; you can redistribute it and/ 14 | * or modify it under the terms of the GNU General Public Li- 15 | * cence as published by the Free Software Foundation; either 16 | * version 2 of the Licence, or any later version. 17 | * 18 | * This program is distributed in the hope that it will be use- 19 | * ful, but WITHOUT ANY WARRANTY; without even the implied war- 20 | * ranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 21 | * See the GNU General Public Licence for more details. 22 | * 23 | * You should have received a copy of the GNU General Public 24 | * Licence along with this program; if not, write to the Free 25 | * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, 26 | * USA. 27 | * 28 | **/ 29 | 30 | char *get_currentpath(); 31 | char *get_savespath(); 32 | void display_loading_progress(int p); 33 | void display_MD5calculating_progress(int p); 34 | 35 | int ask_bad(); 36 | int ask_hack(); 37 | 38 | void new_frame(); 39 | void new_vi(); 40 | 41 | void warn_savestate_not_exist(); 42 | void warn_savestate_from_another_rom(); 43 | -------------------------------------------------------------------------------- /main/main.h: -------------------------------------------------------------------------------- 1 | /*************************************************************************** 2 | main.h - description 3 | ------------------- 4 | begin : Mon 23 Mai 2005 5 | copyright : (C) 2005 by jogibear 6 | ***************************************************************************/ 7 | 8 | /*************************************************************************** 9 | * * 10 | * This program is free software; you can redistribute it and/or modify * 11 | * it under the terms of the GNU General Public License as published by * 12 | * the Free Software Foundation; either version 2 of the License, or * 13 | * (at your option) any later version. * 14 | * * 15 | ***************************************************************************/ 16 | 17 | #ifndef __MAIN_H__ 18 | #define __MAIN_H__ 19 | 20 | #define CORE_INTERPRETER (0) 21 | #define CORE_DYNAREC (1) 22 | #define CORE_PURE_INTERPRETER (2) 23 | 24 | #ifndef PATH_MAX 25 | # define PATH_MAX 1024 26 | #endif 27 | 28 | #endif // __MAIN_H__ 29 | -------------------------------------------------------------------------------- /main/mupenIniApi.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Mupen64 - mupenIniApi.h 3 | * Copyright (C) 2002 Hacktarux 4 | * 5 | * Mupen64 homepage: http://mupen64.emulation64.com 6 | * email address: hacktarux@yahoo.fr 7 | * 8 | * If you want to contribute to the project please contact 9 | * me first (maybe someone is already making what you are 10 | * planning to do). 11 | * 12 | * 13 | * This program is free software; you can redistribute it and/ 14 | * or modify it under the terms of the GNU General Public Li- 15 | * cence as published by the Free Software Foundation; either 16 | * version 2 of the Licence, or any later version. 17 | * 18 | * This program is distributed in the hope that it will be use- 19 | * ful, but WITHOUT ANY WARRANTY; without even the implied war- 20 | * ranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 21 | * See the GNU General Public Licence for more details. 22 | * 23 | * You should have received a copy of the GNU General Public 24 | * Licence along with this program; if not, write to the Free 25 | * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, 26 | * USA. 27 | * 28 | **/ 29 | 30 | #ifndef MUPENINIAPI_H 31 | #define MUPENINIAPI_H 32 | 33 | typedef struct 34 | { 35 | char goodname[100]; 36 | int eeprom16kb; 37 | char MD5[33]; 38 | char CRC[22]; 39 | char refMD5[33]; 40 | char comments[200]; 41 | } mupenEntry; 42 | 43 | void ini_openFile(); 44 | void ini_closeFile(); 45 | void ini_updateFile(int compress); 46 | mupenEntry* ini_search_by_md5(const char *md5); 47 | mupenEntry* ini_search_by_CRC(const char *CRC); 48 | 49 | #endif 50 | -------------------------------------------------------------------------------- /main/savestates.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Mupen64 - savestates.h 3 | * Copyright (C) 2002 Hacktarux 4 | * Copyright (C) 2008, 2009 emu_kidid 5 | * 6 | * Mupen64 homepage: http://mupen64.emulation64.com 7 | * email address: hacktarux@yahoo.fr 8 | * emukidid@gmail.com 9 | * 10 | * If you want to contribute to the project please contact 11 | * me first (maybe someone is already making what you are 12 | * planning to do). 13 | * 14 | * 15 | * This program is free software; you can redistribute it and/ 16 | * or modify it under the terms of the GNU General Public Li- 17 | * cence as published by the Free Software Foundation; either 18 | * version 2 of the Licence, or any later version. 19 | * 20 | * This program is distributed in the hope that it will be use- 21 | * ful, but WITHOUT ANY WARRANTY; without even the implied war- 22 | * ranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 23 | * See the GNU General Public Licence for more details. 24 | * 25 | * You should have received a copy of the GNU General Public 26 | * Licence along with this program; if not, write to the Free 27 | * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, 28 | * USA. 29 | * 30 | **/ 31 | 32 | #define SAVESTATE 1 33 | #define LOADSTATE 2 34 | 35 | extern int savestates_job; 36 | 37 | void savestates_save(); 38 | void savestates_load(); 39 | int savestates_exists(int mode); 40 | 41 | void savestates_select_slot(unsigned int s); 42 | void savestates_select_filename(); 43 | -------------------------------------------------------------------------------- /main/timers.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************************** 2 | * timers.h - timer functions borrowed from mupen64 and mupen64plus, modified by sepp256 3 | ****************************************************************************************/ 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | #ifndef __TIMERS_H__ 8 | #define __TIMERS_H__ 9 | 10 | typedef struct { 11 | float fps; //Current fps 12 | float vis; //Current VI/s 13 | char frameDrawn; 14 | char limitVIs; //0: NO VI Limit, 1: Limit VI/s, 2: Wait only if frame drawn 15 | char useFpsModifier; //Modify FPS? 16 | int fpsModifier; //Framerate modifier in % 17 | unsigned long lastFrameTime; 18 | unsigned long lastViTime; 19 | } timers; 20 | 21 | //extern timers Timers; 22 | 23 | void InitTimer(); 24 | void TimerUpdate(void); 25 | 26 | #endif // __TIMERS_H__ 27 | #ifdef __cplusplus 28 | } 29 | #endif 30 | 31 | -------------------------------------------------------------------------------- /main/usbthread.c: -------------------------------------------------------------------------------- 1 | 2 | //============================================================================ 3 | // Name : usbthread.c 4 | // Copyright : 2012 FIX94 5 | //============================================================================ 6 | 7 | #include 8 | #include 9 | #include 10 | #include 11 | 12 | #include "usbthread.h" 13 | 14 | lwp_t USB_Thread = LWP_THREAD_NULL; 15 | bool CheckUSB = false; 16 | int USB_Thread_Active = 0; 17 | 18 | void *KeepUSBAlive(void *nothing) 19 | { 20 | USB_Thread_Active = 1; 21 | DCFlushRange(&USB_Thread_Active, sizeof(USB_Thread_Active)); 22 | time_t start = time(0); 23 | u8 sector[4096]; 24 | while(CheckUSB) 25 | { 26 | if(time(0) - start > 29 && __io_usbstorage.isInserted()) 27 | { 28 | start = time(0); 29 | __io_usbstorage.readSectors(0, 1, sector); 30 | __io_usbstorage.readSectors(1, 1, sector); 31 | } 32 | usleep(1000); 33 | } 34 | USB_Thread_Active = 0; 35 | DCFlushRange(&USB_Thread_Active, sizeof(USB_Thread_Active)); 36 | return nothing; 37 | } 38 | 39 | void CreateUSBKeepAliveThread() 40 | { 41 | CheckUSB = true; 42 | LWP_CreateThread(&USB_Thread, KeepUSBAlive, NULL, NULL, 0, LWP_PRIO_IDLE); 43 | } 44 | 45 | void KillUSBKeepAliveThread() 46 | { 47 | CheckUSB = false; 48 | while(USB_Thread_Active) 49 | usleep(100); 50 | if(USB_Thread != LWP_THREAD_NULL) 51 | { 52 | LWP_JoinThread(USB_Thread, NULL); 53 | USB_Thread = LWP_THREAD_NULL; 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /main/usbthread.h: -------------------------------------------------------------------------------- 1 | 2 | //============================================================================ 3 | // Name : usbthread.h 4 | // Copyright : 2012 FIX94 5 | //============================================================================ 6 | 7 | #ifndef _USBTHREAD_H_ 8 | #define _USBTHREAD_H_ 9 | 10 | #ifdef __cplusplus 11 | extern "C" 12 | { 13 | #endif 14 | 15 | void CreateUSBKeepAliveThread(); 16 | void KillUSBKeepAliveThread(); 17 | 18 | #ifdef __cplusplus 19 | } 20 | #endif 21 | 22 | #endif /* _USBTHREAD_H_ */ 23 | -------------------------------------------------------------------------------- /main/winlnxdefs.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Mupen64 - winlnxdefs.h 3 | * Copyright (C) 2002 Hacktarux 4 | * 5 | * Mupen64 homepage: http://mupen64.emulation64.com 6 | * email address: hacktarux@yahoo.fr 7 | * 8 | * If you want to contribute to the project please contact 9 | * me first (maybe someone is already making what you are 10 | * planning to do). 11 | * 12 | * 13 | * This program is free software; you can redistribute it and/ 14 | * or modify it under the terms of the GNU General Public Li- 15 | * cence as published by the Free Software Foundation; either 16 | * version 2 of the Licence, or any later version. 17 | * 18 | * This program is distributed in the hope that it will be use- 19 | * ful, but WITHOUT ANY WARRANTY; without even the implied war- 20 | * ranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 21 | * See the GNU General Public Licence for more details. 22 | * 23 | * You should have received a copy of the GNU General Public 24 | * Licence along with this program; if not, write to the Free 25 | * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, 26 | * USA. 27 | * 28 | **/ 29 | 30 | #ifndef WINLNXDEFS_H 31 | #define WINLNXDEFS_H 32 | 33 | #include 34 | //typedef unsigned int BOOL; 35 | typedef unsigned long DWORD; 36 | typedef unsigned short WORD; 37 | typedef unsigned char BYTE; 38 | typedef unsigned int UINT; 39 | typedef unsigned long long DWORD64; 40 | 41 | typedef short SHORT; 42 | 43 | typedef long __int32; 44 | 45 | typedef int HINSTANCE; 46 | typedef int HWND; 47 | typedef int WPARAM; 48 | typedef int LPARAM; 49 | typedef void* LPVOID; 50 | 51 | #define __declspec(dllexport) 52 | #define _cdecl 53 | #define __stdcall 54 | #define WINAPI 55 | 56 | #ifndef FALSE 57 | #define FALSE 0 58 | #endif 59 | 60 | #ifndef TRUE 61 | #define TRUE 1 62 | #endif 63 | 64 | #endif 65 | -------------------------------------------------------------------------------- /menu/ConfigureButtonsFrame.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Wii64 - ConfigureButtonsFrame.h 3 | * Copyright (C) 2010 sepp256 4 | * 5 | * Wii64 homepage: http://www.emulatemii.com 6 | * email address: sepp256@gmail.com 7 | * 8 | * 9 | * This program is free software; you can redistribute it and/ 10 | * or modify it under the terms of the GNU General Public Li- 11 | * cence as published by the Free Software Foundation; either 12 | * version 2 of the Licence, or any later version. 13 | * 14 | * This program is distributed in the hope that it will be use- 15 | * ful, but WITHOUT ANY WARRANTY; without even the implied war- 16 | * ranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 17 | * See the GNU General Public Licence for more details. 18 | * 19 | **/ 20 | 21 | #ifndef CONFIGUREBUTTONSFRAME_H 22 | #define CONFIGUREBUTTONSFRAME_H 23 | 24 | #include "../libgui/Frame.h" 25 | #include "MenuTypes.h" 26 | 27 | class ConfigureButtonsFrame : public menu::Frame 28 | { 29 | public: 30 | ConfigureButtonsFrame(); 31 | ~ConfigureButtonsFrame(); 32 | void activateSubmenu(int submenu); 33 | void updateFrame(float deltaTime); 34 | void drawChildren(menu::Graphics& gfx); 35 | 36 | enum ConfigureButtonsSubmenus 37 | { 38 | SUBMENU_N64_PAD0=0, 39 | SUBMENU_N64_PAD1, 40 | SUBMENU_N64_PAD2, 41 | SUBMENU_N64_PAD3, 42 | SUBMENU_N64_PADNONE, 43 | }; 44 | 45 | private: 46 | 47 | }; 48 | 49 | #endif 50 | -------------------------------------------------------------------------------- /menu/ConfigureInputFrame.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Wii64 - ConfigureInputFrame.h 3 | * Copyright (C) 2009, 2010 sepp256 4 | * 5 | * Wii64 homepage: http://www.emulatemii.com 6 | * email address: sepp256@gmail.com 7 | * 8 | * 9 | * This program is free software; you can redistribute it and/ 10 | * or modify it under the terms of the GNU General Public Li- 11 | * cence as published by the Free Software Foundation; either 12 | * version 2 of the Licence, or any later version. 13 | * 14 | * This program is distributed in the hope that it will be use- 15 | * ful, but WITHOUT ANY WARRANTY; without even the implied war- 16 | * ranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 17 | * See the GNU General Public Licence for more details. 18 | * 19 | **/ 20 | 21 | #ifndef CONFIGUREINPUTFRAME_H 22 | #define CONFIGUREINPUTFRAME_H 23 | 24 | #include "../libgui/Frame.h" 25 | #include "MenuTypes.h" 26 | 27 | class ConfigureInputFrame : public menu::Frame 28 | { 29 | public: 30 | ConfigureInputFrame(); 31 | ~ConfigureInputFrame(); 32 | void activateSubmenu(int submenu); 33 | 34 | enum ConfigureInputSubmenus 35 | { 36 | SUBMENU_NONE=0, 37 | SUBMENU_REINIT 38 | }; 39 | 40 | private: 41 | 42 | }; 43 | 44 | #endif 45 | -------------------------------------------------------------------------------- /menu/ConfigurePaksFrame.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Wii64 - ConfigurePaksFrame.h 3 | * Copyright (C) 2009 sepp256 4 | * 5 | * Wii64 homepage: http://www.emulatemii.com 6 | * email address: sepp256@gmail.com 7 | * 8 | * 9 | * This program is free software; you can redistribute it and/ 10 | * or modify it under the terms of the GNU General Public Li- 11 | * cence as published by the Free Software Foundation; either 12 | * version 2 of the Licence, or any later version. 13 | * 14 | * This program is distributed in the hope that it will be use- 15 | * ful, but WITHOUT ANY WARRANTY; without even the implied war- 16 | * ranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 17 | * See the GNU General Public Licence for more details. 18 | * 19 | **/ 20 | 21 | #ifndef CONFIGUREPAKSFRAME_H 22 | #define CONFIGUREPAKSFRAME_H 23 | 24 | #include "../libgui/Frame.h" 25 | #include "MenuTypes.h" 26 | 27 | class ConfigurePaksFrame : public menu::Frame 28 | { 29 | public: 30 | ConfigurePaksFrame(); 31 | ~ConfigurePaksFrame(); 32 | void activateSubmenu(int submenu); 33 | 34 | enum ConfigurePaksSubmenus 35 | { 36 | SUBMENU_NONE=0, 37 | SUBMENU_REINIT 38 | }; 39 | 40 | private: 41 | 42 | }; 43 | 44 | #endif 45 | -------------------------------------------------------------------------------- /menu/CurrentRomFrame.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Wii64 - CurrentRomFrame.h 3 | * Copyright (C) 2009 sepp256 4 | * 5 | * Wii64 homepage: http://www.emulatemii.com 6 | * email address: sepp256@gmail.com 7 | * 8 | * 9 | * This program is free software; you can redistribute it and/ 10 | * or modify it under the terms of the GNU General Public Li- 11 | * cence as published by the Free Software Foundation; either 12 | * version 2 of the Licence, or any later version. 13 | * 14 | * This program is distributed in the hope that it will be use- 15 | * ful, but WITHOUT ANY WARRANTY; without even the implied war- 16 | * ranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 17 | * See the GNU General Public Licence for more details. 18 | * 19 | **/ 20 | 21 | #ifndef CURRENTROMFRAME_H 22 | #define CURRENTROMFRAME_H 23 | 24 | #include "../libgui/Frame.h" 25 | #include "MenuTypes.h" 26 | 27 | class CurrentRomFrame : public menu::Frame 28 | { 29 | public: 30 | CurrentRomFrame(); 31 | ~CurrentRomFrame(); 32 | 33 | private: 34 | 35 | }; 36 | 37 | #endif 38 | -------------------------------------------------------------------------------- /menu/FileBrowserFrame.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Wii64 - FileBrowserFrame.h 3 | * Copyright (C) 2009, 2010 sepp256 4 | * 5 | * Wii64 homepage: http://www.emulatemii.com 6 | * email address: sepp256@gmail.com 7 | * 8 | * 9 | * This program is free software; you can redistribute it and/ 10 | * or modify it under the terms of the GNU General Public Li- 11 | * cence as published by the Free Software Foundation; either 12 | * version 2 of the Licence, or any later version. 13 | * 14 | * This program is distributed in the hope that it will be use- 15 | * ful, but WITHOUT ANY WARRANTY; without even the implied war- 16 | * ranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 17 | * See the GNU General Public Licence for more details. 18 | * 19 | **/ 20 | 21 | #ifndef FILEBROWSERFRAME_H 22 | #define FILEBROWSERFRAME_H 23 | 24 | #include "../libgui/Frame.h" 25 | #include "MenuTypes.h" 26 | 27 | class FileBrowserFrame : public menu::Frame 28 | { 29 | public: 30 | FileBrowserFrame(); 31 | ~FileBrowserFrame(); 32 | void drawChildren(menu::Graphics& gfx); 33 | 34 | private: 35 | u16 previousButtonsGC[4]; 36 | u32 previousButtonsWii[4]; 37 | u32 previousButtonsDRC[4]; 38 | }; 39 | 40 | void fileBrowserFrame_AutoBootFile(); 41 | 42 | #endif 43 | -------------------------------------------------------------------------------- /menu/LoadRomFrame.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Wii64 - LoadRomFrame.h 3 | * Copyright (C) 2009 sepp256 4 | * 5 | * Wii64 homepage: http://www.emulatemii.com 6 | * email address: sepp256@gmail.com 7 | * 8 | * 9 | * This program is free software; you can redistribute it and/ 10 | * or modify it under the terms of the GNU General Public Li- 11 | * cence as published by the Free Software Foundation; either 12 | * version 2 of the Licence, or any later version. 13 | * 14 | * This program is distributed in the hope that it will be use- 15 | * ful, but WITHOUT ANY WARRANTY; without even the implied war- 16 | * ranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 17 | * See the GNU General Public Licence for more details. 18 | * 19 | **/ 20 | 21 | #ifndef LOADROMFRAME_H 22 | #define LOADROMFRAME_H 23 | 24 | #include "../libgui/Frame.h" 25 | #include "MenuTypes.h" 26 | 27 | class LoadRomFrame : public menu::Frame 28 | { 29 | public: 30 | LoadRomFrame(); 31 | ~LoadRomFrame(); 32 | 33 | private: 34 | 35 | }; 36 | 37 | void Func_LoadFromSD(); 38 | void Func_LoadFromUSB(); 39 | 40 | #endif 41 | -------------------------------------------------------------------------------- /menu/LoadSaveFrame.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Wii64 - LoadSaveFrame.h 3 | * Copyright (C) 2009 sepp256 4 | * 5 | * Wii64 homepage: http://www.emulatemii.com 6 | * email address: sepp256@gmail.com 7 | * 8 | * 9 | * This program is free software; you can redistribute it and/ 10 | * or modify it under the terms of the GNU General Public Li- 11 | * cence as published by the Free Software Foundation; either 12 | * version 2 of the Licence, or any later version. 13 | * 14 | * This program is distributed in the hope that it will be use- 15 | * ful, but WITHOUT ANY WARRANTY; without even the implied war- 16 | * ranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 17 | * See the GNU General Public Licence for more details. 18 | * 19 | **/ 20 | 21 | #ifndef LOADSAVEFRAME_H 22 | #define LOADSAVEFRAME_H 23 | 24 | #include "../libgui/Frame.h" 25 | #include "MenuTypes.h" 26 | 27 | class LoadSaveFrame : public menu::Frame 28 | { 29 | public: 30 | LoadSaveFrame(); 31 | ~LoadSaveFrame(); 32 | 33 | private: 34 | 35 | }; 36 | 37 | #endif 38 | -------------------------------------------------------------------------------- /menu/MainFrame.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Wii64 - MainFrame.h 3 | * Copyright (C) 2009 sepp256 4 | * 5 | * Wii64 homepage: http://www.emulatemii.com 6 | * email address: sepp256@gmail.com 7 | * 8 | * 9 | * This program is free software; you can redistribute it and/ 10 | * or modify it under the terms of the GNU General Public Li- 11 | * cence as published by the Free Software Foundation; either 12 | * version 2 of the Licence, or any later version. 13 | * 14 | * This program is distributed in the hope that it will be use- 15 | * ful, but WITHOUT ANY WARRANTY; without even the implied war- 16 | * ranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 17 | * See the GNU General Public Licence for more details. 18 | * 19 | **/ 20 | 21 | #ifndef MAINFRAME_H 22 | #define MAINFRAME_H 23 | 24 | #include "../libgui/Frame.h" 25 | #include "../libgui/InputStatusBar.h" 26 | #include "MenuTypes.h" 27 | 28 | class MainFrame : public menu::Frame 29 | { 30 | public: 31 | MainFrame(); 32 | ~MainFrame(); 33 | 34 | private: 35 | menu::InputStatusBar *inputStatusBar; 36 | }; 37 | 38 | #endif 39 | -------------------------------------------------------------------------------- /menu/MenuResources.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Wii64 - MenuResources.h 3 | * Copyright (C) 2009, 2010 sepp256 4 | * 5 | * Wii64 homepage: http://www.emulatemii.com 6 | * email address: sepp256@gmail.com 7 | * 8 | * 9 | * This program is free software; you can redistribute it and/ 10 | * or modify it under the terms of the GNU General Public Li- 11 | * cence as published by the Free Software Foundation; either 12 | * version 2 of the Licence, or any later version. 13 | * 14 | * This program is distributed in the hope that it will be use- 15 | * ful, but WITHOUT ANY WARRANTY; without even the implied war- 16 | * ranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 17 | * See the GNU General Public Licence for more details. 18 | * 19 | **/ 20 | 21 | #ifndef MENURESOURCES_H 22 | #define MENURESOURCES_H 23 | 24 | extern u8 BackgroundTexture[]; 25 | extern u8 LogoTexture[]; 26 | extern u8 LoadingTexture[]; 27 | extern u8 ControlEmptyTexture[]; 28 | extern u8 ControlGamecubeTexture[]; 29 | extern u8 ControlClassicTexture[]; 30 | extern u8 ControlWiimoteNunchuckTexture[]; 31 | extern u8 ControlWiimoteTexture[]; 32 | extern u8 N64ControllerTexture[]; 33 | 34 | #endif 35 | -------------------------------------------------------------------------------- /menu/MenuResources.s: -------------------------------------------------------------------------------- 1 | .rodata 2 | 3 | .globl BackgroundTexture 4 | .balign 32 5 | BackgroundTexture: 6 | .incbin "./menu/resources/bg.tx" 7 | .globl BackgroundTexture_length 8 | BackgroundTexture_length: 9 | .long (BackgroundTexture_length - BackgroundTexture) 10 | 11 | .globl LogoTexture 12 | .balign 32 13 | LogoTexture: 14 | #ifdef HW_RVL 15 | .incbin "./menu/resources/wii64.tx" 16 | #else 17 | .incbin "./menu/resources/cube64.tx" 18 | #endif 19 | .globl LogoTexture_length 20 | LogoTexture_length: 21 | .long (LogoTexture_length - LogoTexture) 22 | 23 | .globl ControlEmptyTexture 24 | .balign 32 25 | ControlEmptyTexture: 26 | .incbin "./menu/resources/cntrlEmpty.tx" 27 | .globl ControlEmptyTexture_length 28 | ControlEmptyTexture_length: 29 | .long (ControlEmptyTexture_length - ControlEmptyTexture) 30 | 31 | .globl ControlGamecubeTexture 32 | .balign 32 33 | ControlGamecubeTexture: 34 | .incbin "./menu/resources/cntrlGC.tx" 35 | .globl ControlGamecubeTexture_length 36 | ControlGamecubeTexture_length: 37 | .long (ControlGamecubeTexture_length - ControlGamecubeTexture) 38 | 39 | .globl ControlClassicTexture 40 | .balign 32 41 | ControlClassicTexture: 42 | .incbin "./menu/resources/cntrlClassic.tx" 43 | .globl ControlClassicTexture_length 44 | ControlClassicTexture_length: 45 | .long (ControlClassicTexture_length - ControlClassicTexture) 46 | 47 | .globl ControlWiimoteNunchuckTexture 48 | .balign 32 49 | ControlWiimoteNunchuckTexture: 50 | .incbin "./menu/resources/cntrlWNC.tx" 51 | .globl ControlWiimoteNunchuckTexture_length 52 | ControlWiimoteNunchuckTexture_length: 53 | .long (ControlWiimoteNunchuckTexture_length - ControlWiimoteNunchuckTexture) 54 | 55 | .globl ControlWiimoteTexture 56 | .balign 32 57 | ControlWiimoteTexture: 58 | .incbin "./menu/resources/cntrlWM.tx" 59 | .globl ControlWiimoteTexture_length 60 | ControlWiimoteTexture_length: 61 | .long (ControlWiimoteTexture_length - ControlWiimoteTexture) 62 | 63 | .globl N64ControllerTexture 64 | .balign 32 65 | N64ControllerTexture: 66 | .incbin "./menu/resources/n64Cntrl.tx" 67 | .globl N64ControllerTexture_length 68 | N64ControllerTexture_length: 69 | .long (N64ControllerTexture_length - N64ControllerTexture) 70 | 71 | -------------------------------------------------------------------------------- /menu/MenuTypes.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Wii64 - MenuTypes.h 3 | * Copyright (C) 2009 sepp256 4 | * 5 | * Wii64 homepage: http://www.emulatemii.com 6 | * email address: sepp256@gmail.com 7 | * 8 | * 9 | * This program is free software; you can redistribute it and/ 10 | * or modify it under the terms of the GNU General Public Li- 11 | * cence as published by the Free Software Foundation; either 12 | * version 2 of the Licence, or any later version. 13 | * 14 | * This program is distributed in the hope that it will be use- 15 | * ful, but WITHOUT ANY WARRANTY; without even the implied war- 16 | * ranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 17 | * See the GNU General Public Licence for more details. 18 | * 19 | **/ 20 | 21 | #ifndef MENUDEFS_H 22 | #define MENUDEFS_H 23 | 24 | class MenuContext; 25 | class MainFrame; 26 | class LoadRomFrame; 27 | 28 | //extern MenuContext *pMenuContext; 29 | 30 | #endif 31 | -------------------------------------------------------------------------------- /menu/SaveGameFrame.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Wii64 - SaveGameFrame.h 3 | * Copyright (C) 2009 sepp256 4 | * 5 | * Wii64 homepage: http://www.emulatemii.com 6 | * email address: sepp256@gmail.com 7 | * 8 | * 9 | * This program is free software; you can redistribute it and/ 10 | * or modify it under the terms of the GNU General Public Li- 11 | * cence as published by the Free Software Foundation; either 12 | * version 2 of the Licence, or any later version. 13 | * 14 | * This program is distributed in the hope that it will be use- 15 | * ful, but WITHOUT ANY WARRANTY; without even the implied war- 16 | * ranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 17 | * See the GNU General Public Licence for more details. 18 | * 19 | **/ 20 | 21 | #ifndef SAVEGAMEFRAME_H 22 | #define SAVEGAMEFRAME_H 23 | 24 | #include "../libgui/Frame.h" 25 | #include "MenuTypes.h" 26 | 27 | class SaveGameFrame : public menu::Frame 28 | { 29 | public: 30 | SaveGameFrame(); 31 | ~SaveGameFrame(); 32 | 33 | private: 34 | 35 | }; 36 | 37 | #endif 38 | -------------------------------------------------------------------------------- /menu/SelectCPUFrame.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Wii64 - SelectCPUFrame.h 3 | * Copyright (C) 2009 sepp256 4 | * 5 | * Wii64 homepage: http://www.emulatemii.com 6 | * email address: sepp256@gmail.com 7 | * 8 | * 9 | * This program is free software; you can redistribute it and/ 10 | * or modify it under the terms of the GNU General Public Li- 11 | * cence as published by the Free Software Foundation; either 12 | * version 2 of the Licence, or any later version. 13 | * 14 | * This program is distributed in the hope that it will be use- 15 | * ful, but WITHOUT ANY WARRANTY; without even the implied war- 16 | * ranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 17 | * See the GNU General Public Licence for more details. 18 | * 19 | **/ 20 | 21 | #ifndef SELECTCPUFRAME_H 22 | #define SELECTCPUFRAME_H 23 | 24 | #include "../libgui/Frame.h" 25 | #include "MenuTypes.h" 26 | 27 | class SelectCPUFrame : public menu::Frame 28 | { 29 | public: 30 | SelectCPUFrame(); 31 | ~SelectCPUFrame(); 32 | 33 | private: 34 | 35 | }; 36 | 37 | #endif 38 | -------------------------------------------------------------------------------- /menu/SettingsFrame.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Wii64 - SettingsFrame.h 3 | * Copyright (C) 2009, 2010 sepp256 4 | * 5 | * Wii64 homepage: http://www.emulatemii.com 6 | * email address: sepp256@gmail.com 7 | * 8 | * 9 | * This program is free software; you can redistribute it and/ 10 | * or modify it under the terms of the GNU General Public Li- 11 | * cence as published by the Free Software Foundation; either 12 | * version 2 of the Licence, or any later version. 13 | * 14 | * This program is distributed in the hope that it will be use- 15 | * ful, but WITHOUT ANY WARRANTY; without even the implied war- 16 | * ranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 17 | * See the GNU General Public Licence for more details. 18 | * 19 | **/ 20 | 21 | #ifndef SETTINGSFRAME_H 22 | #define SETTINGSFRAME_H 23 | 24 | #include "../libgui/Frame.h" 25 | #include "MenuTypes.h" 26 | 27 | class SettingsFrame : public menu::Frame 28 | { 29 | public: 30 | SettingsFrame(); 31 | ~SettingsFrame(); 32 | void activateSubmenu(int submenu); 33 | void drawChildren(menu::Graphics& gfx); 34 | 35 | enum SettingsSubmenus 36 | { 37 | SUBMENU_GENERAL=0, 38 | SUBMENU_VIDEO, 39 | SUBMENU_INPUT, 40 | SUBMENU_AUDIO, 41 | SUBMENU_SAVES 42 | }; 43 | 44 | private: 45 | int activeSubmenu; 46 | u16 previousButtonsGC[4]; 47 | u32 previousButtonsWii[4]; 48 | u32 previousButtonsDRC[4]; 49 | 50 | }; 51 | 52 | #endif 53 | -------------------------------------------------------------------------------- /menu/resources/Loading.tx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FIX94/mupen64gc-fix94/e5d9d9cc9fea4b1abaf79635cd00893a56a03ff9/menu/resources/Loading.tx -------------------------------------------------------------------------------- /menu/resources/bg.tx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FIX94/mupen64gc-fix94/e5d9d9cc9fea4b1abaf79635cd00893a56a03ff9/menu/resources/bg.tx -------------------------------------------------------------------------------- /menu/resources/cntrlClassic.tx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FIX94/mupen64gc-fix94/e5d9d9cc9fea4b1abaf79635cd00893a56a03ff9/menu/resources/cntrlClassic.tx -------------------------------------------------------------------------------- /menu/resources/cntrlEmpty.tx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FIX94/mupen64gc-fix94/e5d9d9cc9fea4b1abaf79635cd00893a56a03ff9/menu/resources/cntrlEmpty.tx -------------------------------------------------------------------------------- /menu/resources/cntrlGC.tx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FIX94/mupen64gc-fix94/e5d9d9cc9fea4b1abaf79635cd00893a56a03ff9/menu/resources/cntrlGC.tx -------------------------------------------------------------------------------- /menu/resources/cntrlWM.tx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FIX94/mupen64gc-fix94/e5d9d9cc9fea4b1abaf79635cd00893a56a03ff9/menu/resources/cntrlWM.tx -------------------------------------------------------------------------------- /menu/resources/cntrlWNC.tx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FIX94/mupen64gc-fix94/e5d9d9cc9fea4b1abaf79635cd00893a56a03ff9/menu/resources/cntrlWNC.tx -------------------------------------------------------------------------------- /menu/resources/n64Cntrl.tx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FIX94/mupen64gc-fix94/e5d9d9cc9fea4b1abaf79635cd00893a56a03ff9/menu/resources/n64Cntrl.tx -------------------------------------------------------------------------------- /mupen64_soft_gfx/SoftGFXPlugin.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Wii64 - SoftGFXPlugin.h 3 | * Copyright (C) 2007 Mike Slegeir 4 | * 5 | * Mangles the plugin so it can be linked staticly 6 | * 7 | * Wii64 homepage: http://www.emulatemii.com 8 | * email address: wii64team@gmail.com 9 | * 10 | * 11 | * This program is free software; you can redistribute it and/ 12 | * or modify it under the terms of the GNU General Public Li- 13 | * cence as published by the Free Software Foundation; either 14 | * version 2 of the Licence, or any later version. 15 | * 16 | * This program is distributed in the hope that it will be use- 17 | * ful, but WITHOUT ANY WARRANTY; without even the implied war- 18 | * ranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public Licence for more details. 20 | * 21 | **/ 22 | 23 | #ifndef GFX_PLUGIN_H 24 | #define GFX_PLUGIN_H 25 | 26 | #define RomClosed romClosed_gfx 27 | #define RomOpen romOpen_gfx 28 | #define GetDllInfo getDllInfo_gfx 29 | #define DllConfig dllConfig_gfx 30 | #define DllTest dllTest_gfx 31 | #define DllAbout dllAbout_gfx 32 | #define CloseDLL closeDLL_gfx 33 | 34 | #define CaptureScreen captureScreen 35 | #define ChangeWindow changeWindow 36 | #define DrawScreen drawScreen 37 | #define InitiateGFX initiateGFX 38 | #define MoveScreen moveScreen 39 | #define ProcessDList processDList 40 | #define ProcessRDPList processRDPList 41 | #define ShowCFB showCFB 42 | #define UpdateScreen updateScreen 43 | #define ViStatusChanged viStatusChanged 44 | #define ViWidthChanged viWidthChanged 45 | 46 | #endif 47 | 48 | -------------------------------------------------------------------------------- /mupen64_soft_gfx/cc.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Mupen64 - cc.h 3 | * Copyright (C) 2002 Hacktarux 4 | * 5 | * Mupen64 homepage: http://mupen64.emulation64.com 6 | * email address: hacktarux@yahoo.fr 7 | * 8 | * If you want to contribute to the project please contact 9 | * me first (maybe someone is already making what you are 10 | * planning to do). 11 | * 12 | * 13 | * This program is free software; you can redistribute it and/ 14 | * or modify it under the terms of the GNU General Public Li- 15 | * cence as published by the Free Software Foundation; either 16 | * version 2 of the Licence, or any later version. 17 | * 18 | * This program is distributed in the hope that it will be use- 19 | * ful, but WITHOUT ANY WARRANTY; without even the implied war- 20 | * ranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 21 | * See the GNU General Public Licence for more details. 22 | * 23 | * You should have received a copy of the GNU General Public 24 | * Licence along with this program; if not, write to the Free 25 | * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, 26 | * USA. 27 | * 28 | **/ 29 | 30 | #include "color.h" 31 | 32 | class CC 33 | { 34 | int combineKey; 35 | Color32 *pa0, *pb0, *pc0, *pd0, *pa1, *pb1, *pc1, *pd1; 36 | float *pAa0, *pAb0, *pAc0, *pAd0, *pAa1, *pAb1, *pAc1, *pAd1; 37 | 38 | // constants 39 | Color32 zero; 40 | 41 | // to be set by the pipeline 42 | Color32 texel0; 43 | Color32 texel1; 44 | Color32 texel0Alpha; 45 | Color32 texel1Alpha; 46 | Color32 LODFraction; 47 | Color32 shade; 48 | 49 | // temp value inside the combiner 50 | Color32 combined; 51 | Color32 combinedAlpha; 52 | 53 | int oldCycle1, oldCycle2; 54 | Color32* getColorSource(int src, int var); 55 | float* getAlphaSource(int src, int var); 56 | 57 | // other registers 58 | Color32 primColor; 59 | Color32 envColor; 60 | float mLOD; 61 | float lLOD; 62 | 63 | public: 64 | CC(); 65 | ~CC(); 66 | 67 | void setCombineKey(int value); 68 | void setCombineMode(int cycle1, int cycle2); 69 | void setPrimColor(int color, float mLOD, float lLOD); 70 | void setEnvColor(int color); 71 | 72 | void setShade(const Color32& c); 73 | Color32 combine1(const Color32& texel); 74 | Color32 combine2(const Color32& texel1, const Color32& texel2); 75 | }; 76 | -------------------------------------------------------------------------------- /mupen64_soft_gfx/global.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Mupen64 - global.h 3 | * Copyright (C) 2002 Hacktarux 4 | * 5 | * Mupen64 homepage: http://mupen64.emulation64.com 6 | * email address: hacktarux@yahoo.fr 7 | * 8 | * If you want to contribute to the project please contact 9 | * me first (maybe someone is already making what you are 10 | * planning to do). 11 | * 12 | * 13 | * This program is free software; you can redistribute it and/ 14 | * or modify it under the terms of the GNU General Public Li- 15 | * cence as published by the Free Software Foundation; either 16 | * version 2 of the Licence, or any later version. 17 | * 18 | * This program is distributed in the hope that it will be use- 19 | * ful, but WITHOUT ANY WARRANTY; without even the implied war- 20 | * ranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 21 | * See the GNU General Public Licence for more details. 22 | * 23 | * You should have received a copy of the GNU General Public 24 | * Licence along with this program; if not, write to the Free 25 | * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, 26 | * USA. 27 | * 28 | **/ 29 | 30 | #ifndef GLOBAL_H 31 | #define GLOBAL_H 32 | 33 | #include "vi.h" 34 | 35 | #ifdef _BIG_ENDIAN 36 | #define S8 0 37 | #define S16 0 38 | #else 39 | #define S8 3 40 | #define S16 1 41 | #endif 42 | 43 | extern VI* vi; 44 | 45 | #endif 46 | -------------------------------------------------------------------------------- /mupen64_soft_gfx/rsp.d: -------------------------------------------------------------------------------- 1 | mupen64_soft_gfx/rsp.o: mupen64_soft_gfx/rsp.cpp \ 2 | mupen64_soft_gfx/global.h mupen64_soft_gfx/vi.h \ 3 | mupen64_soft_gfx/../main/winlnxdefs.h mupen64_soft_gfx/Gfx_#1.3.h \ 4 | mupen64_soft_gfx/rsp.h mupen64_soft_gfx/rdp.h mupen64_soft_gfx/tx.h \ 5 | mupen64_soft_gfx/color.h mupen64_soft_gfx/tf.h mupen64_soft_gfx/rs.h \ 6 | mupen64_soft_gfx/vector.h mupen64_soft_gfx/cc.h mupen64_soft_gfx/bl.h \ 7 | mupen64_soft_gfx/matrix.h 8 | -------------------------------------------------------------------------------- /mupen64_soft_gfx/tf.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Mupen64 - tf.h 3 | * Copyright (C) 2002 Hacktarux 4 | * 5 | * Mupen64 homepage: http://mupen64.emulation64.com 6 | * email address: hacktarux@yahoo.fr 7 | * 8 | * If you want to contribute to the project please contact 9 | * me first (maybe someone is already making what you are 10 | * planning to do). 11 | * 12 | * 13 | * This program is free software; you can redistribute it and/ 14 | * or modify it under the terms of the GNU General Public Li- 15 | * cence as published by the Free Software Foundation; either 16 | * version 2 of the Licence, or any later version. 17 | * 18 | * This program is distributed in the hope that it will be use- 19 | * ful, but WITHOUT ANY WARRANTY; without even the implied war- 20 | * ranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 21 | * See the GNU General Public Licence for more details. 22 | * 23 | * You should have received a copy of the GNU General Public 24 | * Licence along with this program; if not, write to the Free 25 | * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, 26 | * USA. 27 | * 28 | **/ 29 | 30 | #ifndef TF_H 31 | #define TF_H 32 | 33 | #include "color.h" 34 | 35 | class TF 36 | { 37 | int textureFilter; 38 | int textureConvert; 39 | 40 | public: 41 | TF(); 42 | ~TF(); 43 | 44 | void setTextureFilter(int value); 45 | void setTextureConvert(int value); 46 | int getTextureConvert(); 47 | 48 | Color32 filter(Color32 nearestTexels[4], float nearestTexelsDistances[4]); 49 | }; 50 | 51 | #endif // TF_H 52 | -------------------------------------------------------------------------------- /mupen64_soft_gfx/vektor.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Mupen64 - vector.h 3 | * Copyright (C) 2002 Hacktarux 4 | * 5 | * Mupen64 homepage: http://mupen64.emulation64.com 6 | * email address: hacktarux@yahoo.fr 7 | * 8 | * If you want to contribute to the project please contact 9 | * me first (maybe someone is already making what you are 10 | * planning to do). 11 | * 12 | * 13 | * This program is free software; you can redistribute it and/ 14 | * or modify it under the terms of the GNU General Public Li- 15 | * cence as published by the Free Software Foundation; either 16 | * version 2 of the Licence, or any later version. 17 | * 18 | * This program is distributed in the hope that it will be use- 19 | * ful, but WITHOUT ANY WARRANTY; without even the implied war- 20 | * ranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 21 | * See the GNU General Public Licence for more details. 22 | * 23 | * You should have received a copy of the GNU General Public 24 | * Licence along with this program; if not, write to the Free 25 | * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, 26 | * USA. 27 | * 28 | **/ 29 | 30 | #ifndef VEKTOR_H 31 | #define VEKTOR_H 32 | 33 | template class Vektor 34 | { 35 | T element[s]; 36 | 37 | public: 38 | Vektor() {} 39 | ~Vektor() {} 40 | 41 | Vektor(const Vektor& v) 42 | { 43 | for (int i=0; i& operator= (const Vektor& v) 48 | { 49 | for (int i=0; i& v) const 55 | { 56 | T res = 0; 57 | for (int i=0; i 36 | 37 | class VI 38 | { 39 | GFX_INFO gfxInfo; 40 | int bpp; 41 | u16* FBtex; 42 | GXTexObj FBtexObj; 43 | 44 | // the plugin assume the class that's implementing these functions 45 | // accept 16bpp 5551 mode, maybe conversion is needed on some systems 46 | // it's also assumed that it's initialized in window mode by default 47 | virtual void setVideoMode(int w, int h) = 0; 48 | // virtual void* getScreenPointer() = 0; 49 | virtual void blit() = 0; 50 | 51 | public: 52 | VI(GFX_INFO); 53 | virtual ~VI(); 54 | 55 | virtual unsigned int* getScreenPointer() = 0; 56 | virtual void setFB(unsigned int*, unsigned int*) = 0; 57 | virtual void switchFullScreenMode() = 0; 58 | virtual void switchWindowMode() = 0; 59 | virtual void setGamma(float gamma) = 0; 60 | virtual void showLoadProg(float) = 0; 61 | virtual void updateDEBUG() = 0; 62 | virtual void PreRetraceCallback(u32) = 0; 63 | void statusChanged(); 64 | void widthChanged(); 65 | void updateScreen(); 66 | void debug_plot(int x, int y, int c); 67 | void flush(); 68 | }; 69 | 70 | 71 | #endif // VI_H 72 | -------------------------------------------------------------------------------- /mupen64_soft_gfx/vi_GX.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Wii64 - vi_GX.h 3 | * Copyright (C) 2007, 2008, 2009 Wii64 Team 4 | * 5 | * vi for Gamecube by Mike Slegeir 6 | * load progress bar and GX hardware scaling by sepp256 7 | * 8 | * Wii64 homepage: http://www.emulatemii.com 9 | * email address: sepp256@gmail.com 10 | * 11 | * 12 | * This program is free software; you can redistribute it and/ 13 | * or modify it under the terms of the GNU General Public Li- 14 | * cence as published by the Free Software Foundation; either 15 | * version 2 of the Licence, or any later version. 16 | * 17 | * This program is distributed in the hope that it will be use- 18 | * ful, but WITHOUT ANY WARRANTY; without even the implied war- 19 | * ranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 20 | * See the GNU General Public Licence for more details. 21 | * 22 | **/ 23 | 24 | #ifndef VI_GX_H 25 | #define VI_GX_H 26 | 27 | #include "vi.h" 28 | 29 | class VI_GX : public VI 30 | { 31 | bool updateOSD; 32 | bool copy_fb; 33 | unsigned int* xfb[2]; 34 | int which_fb; 35 | int width; 36 | int height; 37 | Mtx44 GXprojection2D; 38 | Mtx GXmodelView2D; 39 | 40 | void setFB(unsigned int*, unsigned int*); 41 | void showFPS(); 42 | void showDEBUG(); 43 | virtual void setVideoMode(int w, int h); 44 | // virtual void* getScreenPointer(); 45 | virtual void blit(); 46 | 47 | public: 48 | VI_GX(GFX_INFO); 49 | virtual ~VI_GX(); 50 | 51 | virtual void switchFullScreenMode(); 52 | virtual void switchWindowMode(); 53 | virtual void setGamma(float gamma); 54 | unsigned int* getScreenPointer(); 55 | void showLoadProg(float); 56 | void updateDEBUG(); 57 | void PreRetraceCallback(u32 retraceCnt); 58 | }; 59 | 60 | #endif 61 | -------------------------------------------------------------------------------- /mupen64_soft_gfx/vi_SDL.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Mupen64 - vi_SDL.h 3 | * Copyright (C) 2002 Hacktarux 4 | * 5 | * Mupen64 homepage: http://mupen64.emulation64.com 6 | * email address: hacktarux@yahoo.fr 7 | * 8 | * If you want to contribute to the project please contact 9 | * me first (maybe someone is already making what you are 10 | * planning to do). 11 | * 12 | * 13 | * This program is free software; you can redistribute it and/ 14 | * or modify it under the terms of the GNU General Public Li- 15 | * cence as published by the Free Software Foundation; either 16 | * version 2 of the Licence, or any later version. 17 | * 18 | * This program is distributed in the hope that it will be use- 19 | * ful, but WITHOUT ANY WARRANTY; without even the implied war- 20 | * ranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 21 | * See the GNU General Public Licence for more details. 22 | * 23 | * You should have received a copy of the GNU General Public 24 | * Licence along with this program; if not, write to the Free 25 | * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, 26 | * USA. 27 | * 28 | **/ 29 | 30 | #ifndef VI_SDL_H 31 | #define VI_SDL_H 32 | 33 | #include 34 | 35 | #include "vi.h" 36 | 37 | class VI_SDL : public VI 38 | { 39 | SDL_Surface *screen; 40 | int width; 41 | int height; 42 | 43 | void showFPS(); 44 | virtual void setVideoMode(int w, int h); 45 | virtual void* getScreenPointer(); 46 | virtual void blit(); 47 | 48 | public: 49 | VI_SDL(GFX_INFO); 50 | virtual ~VI_SDL(); 51 | 52 | virtual void switchFullScreenMode(); 53 | virtual void switchWindowMode(); 54 | virtual void setGamma(float gamma); 55 | }; 56 | 57 | #endif 58 | -------------------------------------------------------------------------------- /r4300/ARAM-blocks.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Wii64 - ARAM-blocks.h 3 | * Copyright (C) 2007, 2008, 2009 emu_kidid 4 | * 5 | * ARAM cache version of blocks array for gamecube 6 | * 7 | * Wii64 homepage: http://www.emulatemii.com 8 | * email address: emukidid@gmail.com 9 | * 10 | * 11 | * This program is free software; you can redistribute it and/ 12 | * or modify it under the terms of the GNU General Public Li- 13 | * cence as published by the Free Software Foundation; either 14 | * version 2 of the Licence, or any later version. 15 | * 16 | * This program is distributed in the hope that it will be use- 17 | * ful, but WITHOUT ANY WARRANTY; without even the implied war- 18 | * ranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public Licence for more details. 20 | * 21 | **/ 22 | 23 | #ifndef ARAM_BLOCKS_H 24 | #define ARAM_BLOCKS_H 25 | 26 | #include 27 | #include "ppc/Recompile.h" 28 | 29 | #ifdef ARAM_BLOCKCACHE 30 | 31 | PowerPC_block* blocks_get(u32 addr); 32 | void blocks_set(u32 addr, PowerPC_block* ptr); 33 | 34 | #else 35 | 36 | inline PowerPC_block* blocks_get(u32 addr); 37 | inline void blocks_set(u32 addr, PowerPC_block* ptr); 38 | 39 | #endif 40 | #endif 41 | 42 | -------------------------------------------------------------------------------- /r4300/Invalid_Code.c: -------------------------------------------------------------------------------- 1 | /* Invalid_Code.c - Uses 1/8th the memory as the char hash table 2 | by Mike Slegeir for Mupen64-GC / MEM2 ver by emu_kidid 3 | */ 4 | 5 | #include "Invalid_Code.h" 6 | #ifndef HW_RVL //GC use bit version 7 | 8 | static unsigned char invalid_code[0x100000/8]; 9 | 10 | int inline invalid_code_get(int block_num){ 11 | return invalid_code[block_num>>3] & (1<<(block_num&0x7)); 12 | } 13 | 14 | void inline invalid_code_set(int block_num, int value){ 15 | if(value) invalid_code[block_num>>3] |= (1<<(block_num&0x7)); 16 | else invalid_code[block_num>>3] &= ~(1<<(block_num&0x7)); 17 | } 18 | 19 | #else //Wii MEM2 1MB char array version 20 | #include "../gc_memory/MEM2.h" 21 | 22 | static unsigned char *invalid_code = (unsigned char *)(INVCODE_LO); 23 | 24 | int inline invalid_code_get(int block_num){ 25 | return invalid_code[block_num]; 26 | } 27 | 28 | void inline invalid_code_set(int block_num, int value){ 29 | invalid_code[block_num] = value; 30 | } 31 | 32 | #endif 33 | 34 | -------------------------------------------------------------------------------- /r4300/Invalid_Code.h: -------------------------------------------------------------------------------- 1 | /* Invalid_Code.h - Uses 1/8th the memory as the char hash table 2 | by Mike Slegeir for Mupen64-GC 3 | */ 4 | 5 | #ifndef INVALID_CODE_H 6 | #define INVALID_CODE_H 7 | 8 | int inline invalid_code_get(int block_num); 9 | void inline invalid_code_set(int block_num, int value); 10 | 11 | #endif 12 | -------------------------------------------------------------------------------- /r4300/Recomp-Cache.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Wii64 - Recomp-Cache.h 3 | * Copyright (C) 2008, 2009, 2010 Mike Slegeir 4 | * 5 | * Interface for allocating/freeing blocks of recompiled code 6 | * 7 | * Wii64 homepage: http://www.emulatemii.com 8 | * email address: tehpola@gmail.com 9 | * 10 | * 11 | * This program is free software; you can redistribute it and/ 12 | * or modify it under the terms of the GNU General Public Li- 13 | * cence as published by the Free Software Foundation; either 14 | * version 2 of the Licence, or any later version. 15 | * 16 | * This program is distributed in the hope that it will be use- 17 | * ful, but WITHOUT ANY WARRANTY; without even the implied war- 18 | * ranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public Licence for more details. 20 | * 21 | **/ 22 | 23 | #ifndef RECOMP_CACHE_H 24 | #define RECOMP_CACHE_H 25 | 26 | // Hold 8MB worth of recompiled data max on Wii, 5 on GC 27 | #ifdef HW_RVL 28 | #define RECOMP_CACHE_SIZE (8*1024*1024) 29 | #else 30 | #define RECOMP_CACHE_SIZE (7*1024*1024) 31 | #endif 32 | 33 | // Allocate and free memory to be used for recompiled code 34 | // Any memory allocated this way can be freed at any time 35 | // you must check invalid_code before you can access it 36 | void RecompCache_Alloc(unsigned int size, unsigned int address, PowerPC_func* func); 37 | void RecompCache_Realloc(PowerPC_func* func, unsigned int new_size); 38 | void RecompCache_Free(unsigned int addr); 39 | // Update the LRU info of the indicated block 40 | // (call when the block is accessed) 41 | void RecompCache_Update(PowerPC_func* func); 42 | 43 | // Allocate memory from the meta cache 44 | // This will free from both the recomp and meta caches if capacity is hit 45 | void* MetaCache_Alloc(unsigned int num_bytes); 46 | // Free data from the meta cache 47 | void MetaCache_Free(void* ptr); 48 | 49 | #endif 50 | -------------------------------------------------------------------------------- /r4300/cop0.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FIX94/mupen64gc-fix94/e5d9d9cc9fea4b1abaf79635cd00893a56a03ff9/r4300/cop0.c -------------------------------------------------------------------------------- /r4300/cop1_l.c: -------------------------------------------------------------------------------- 1 | /** 2 | * Mupen64 - cop1_l.c 3 | * Copyright (C) 2002 Hacktarux 4 | * 5 | * Mupen64 homepage: http://mupen64.emulation64.com 6 | * email address: hacktarux@yahoo.fr 7 | * 8 | * If you want to contribute to the project please contact 9 | * me first (maybe someone is already making what you are 10 | * planning to do). 11 | * 12 | * 13 | * This program is free software; you can redistribute it and/ 14 | * or modify it under the terms of the GNU General Public Li- 15 | * cence as published by the Free Software Foundation; either 16 | * version 2 of the Licence, or any later version. 17 | * 18 | * This program is distributed in the hope that it will be use- 19 | * ful, but WITHOUT ANY WARRANTY; without even the implied war- 20 | * ranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 21 | * See the GNU General Public Licence for more details. 22 | * 23 | * You should have received a copy of the GNU General Public 24 | * Licence along with this program; if not, write to the Free 25 | * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, 26 | * USA. 27 | * 28 | **/ 29 | 30 | #include "r4300.h" 31 | #include "macros.h" 32 | 33 | void CVT_S_L() 34 | { 35 | if (check_cop1_unusable()) return; 36 | set_rounding(); 37 | *reg_cop1_simple[cffd] = *((long long*)reg_cop1_double[cffs]); 38 | PC++; 39 | } 40 | 41 | void CVT_D_L() 42 | { 43 | if (check_cop1_unusable()) return; 44 | set_rounding(); 45 | *reg_cop1_double[cffd] = *((long long*)reg_cop1_double[cffs]); 46 | PC++; 47 | } 48 | -------------------------------------------------------------------------------- /r4300/cop1_w.c: -------------------------------------------------------------------------------- 1 | /** 2 | * Mupen64 - cop1_w.c 3 | * Copyright (C) 2002 Hacktarux 4 | * 5 | * Mupen64 homepage: http://mupen64.emulation64.com 6 | * email address: hacktarux@yahoo.fr 7 | * 8 | * If you want to contribute to the project please contact 9 | * me first (maybe someone is already making what you are 10 | * planning to do). 11 | * 12 | * 13 | * This program is free software; you can redistribute it and/ 14 | * or modify it under the terms of the GNU General Public Li- 15 | * cence as published by the Free Software Foundation; either 16 | * version 2 of the Licence, or any later version. 17 | * 18 | * This program is distributed in the hope that it will be use- 19 | * ful, but WITHOUT ANY WARRANTY; without even the implied war- 20 | * ranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 21 | * See the GNU General Public Licence for more details. 22 | * 23 | * You should have received a copy of the GNU General Public 24 | * Licence along with this program; if not, write to the Free 25 | * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, 26 | * USA. 27 | * 28 | **/ 29 | 30 | #include "r4300.h" 31 | #include "ops.h" 32 | #include "macros.h" 33 | 34 | void CVT_S_W() 35 | { 36 | if (check_cop1_unusable()) return; 37 | set_rounding(); 38 | *reg_cop1_simple[cffd] = *((long*)reg_cop1_simple[cffs]); 39 | PC++; 40 | } 41 | 42 | void CVT_D_W() 43 | { 44 | if (check_cop1_unusable()) return; 45 | set_rounding(); 46 | *reg_cop1_double[cffd] = *((long*)reg_cop1_simple[cffs]); 47 | PC++; 48 | } 49 | -------------------------------------------------------------------------------- /r4300/exception.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Mupen64 - exception.h 3 | * Copyright (C) 2002 Hacktarux 4 | * 5 | * Mupen64 homepage: http://mupen64.emulation64.com 6 | * email address: hacktarux@yahoo.fr 7 | * 8 | * If you want to contribute to the project please contact 9 | * me first (maybe someone is already making what you are 10 | * planning to do). 11 | * 12 | * 13 | * This program is free software; you can redistribute it and/ 14 | * or modify it under the terms of the GNU General Public Li- 15 | * cence as published by the Free Software Foundation; either 16 | * version 2 of the Licence, or any later version. 17 | * 18 | * This program is distributed in the hope that it will be use- 19 | * ful, but WITHOUT ANY WARRANTY; without even the implied war- 20 | * ranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 21 | * See the GNU General Public Licence for more details. 22 | * 23 | * You should have received a copy of the GNU General Public 24 | * Licence along with this program; if not, write to the Free 25 | * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, 26 | * USA. 27 | * 28 | **/ 29 | 30 | #ifndef EXCEPTION_H 31 | #define EXCEPTION_H 32 | 33 | void address_error_exception(); 34 | void TLB_invalid_exception(); 35 | void TLB_refill_exception(unsigned long addresse, int w); 36 | void TLB_mod_exception(); 37 | void integer_overflow_exception(); 38 | void coprocessor_unusable_exception(); 39 | 40 | void exception_general(); 41 | 42 | #endif 43 | -------------------------------------------------------------------------------- /r4300/interupt.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Mupen64 - interupt.h 3 | * Copyright (C) 2002 Hacktarux 4 | * 5 | * Mupen64 homepage: http://mupen64.emulation64.com 6 | * email address: hacktarux@yahoo.fr 7 | * 8 | * If you want to contribute to the project please contact 9 | * me first (maybe someone is already making what you are 10 | * planning to do). 11 | * 12 | * 13 | * This program is free software; you can redistribute it and/ 14 | * or modify it under the terms of the GNU General Public Li- 15 | * cence as published by the Free Software Foundation; either 16 | * version 2 of the Licence, or any later version. 17 | * 18 | * This program is distributed in the hope that it will be use- 19 | * ful, but WITHOUT ANY WARRANTY; without even the implied war- 20 | * ranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 21 | * See the GNU General Public Licence for more details. 22 | * 23 | * You should have received a copy of the GNU General Public 24 | * Licence along with this program; if not, write to the Free 25 | * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, 26 | * USA. 27 | * 28 | **/ 29 | 30 | extern unsigned int next_interupt; 31 | extern unsigned long reg_cop0[32]; 32 | #define Count reg_cop0[9] 33 | 34 | void compare_interupt(); 35 | void gen_dp(); 36 | void init_interupt(); 37 | 38 | extern int vi_field; 39 | extern unsigned long next_vi; 40 | 41 | void gen_interupt(); 42 | void check_interupt(); 43 | 44 | void translate_event_queue(unsigned long base); 45 | void remove_event(int type); 46 | void add_interupt_event_count(int type, unsigned long count); 47 | void add_interupt_event(int type, unsigned long delay); 48 | unsigned long get_event(int type); 49 | 50 | int save_eventqueue_infos(char *buf); 51 | void load_eventqueue_infos(char *buf); 52 | 53 | #define VI_INT 0x001 54 | #define COMPARE_INT 0x002 55 | #define CHECK_INT 0x004 56 | #define SI_INT 0x008 57 | #define PI_INT 0x010 58 | #define SPECIAL_INT 0x020 59 | #define AI_INT 0x040 60 | #define SP_INT 0x080 61 | #define DP_INT 0x100 62 | 63 | typedef struct _interupt_queue 64 | { 65 | int type; 66 | unsigned long count; 67 | struct _interupt_queue *next; 68 | } interupt_queue; 69 | -------------------------------------------------------------------------------- /r4300/ppc/MIPS-to-PPC.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Wii64 - MIPS-to-PPC.h 3 | * Copyright (C) 2007, 2008, 2009 Mike Slegeir 4 | * 5 | * Functions for converting MIPS code to PPC 6 | * 7 | * Wii64 homepage: http://www.emulatemii.com 8 | * email address: tehpola@gmail.com 9 | * 10 | * 11 | * This program is free software; you can redistribute it and/ 12 | * or modify it under the terms of the GNU General Public Li- 13 | * cence as published by the Free Software Foundation; either 14 | * version 2 of the Licence, or any later version. 15 | * 16 | * This program is distributed in the hope that it will be use- 17 | * ful, but WITHOUT ANY WARRANTY; without even the implied war- 18 | * ranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | * See the GNU General Public Licence for more details. 20 | * 21 | **/ 22 | 23 | #ifndef MIPS_TO_PPC_H 24 | #define MIPS_TO_PPC_H 25 | 26 | #include "MIPS.h" 27 | #include "PowerPC.h" 28 | 29 | #define CONVERT_ERROR -1 30 | #define CONVERT_SUCCESS 0 31 | #define CONVERT_WARNING 1 32 | #define INTERPRETED 2 33 | 34 | /* These functions must be implemented 35 | by code using this module */ 36 | extern MIPS_instr get_next_src(void); 37 | extern MIPS_instr peek_next_src(void); 38 | extern void set_next_dst(PowerPC_instr); 39 | // These are unfortunate hacks necessary for jumping to delay slots 40 | extern PowerPC_instr* get_curr_dst(void); 41 | extern void unget_last_src(void); 42 | extern void nop_ignored(void); 43 | extern unsigned int get_src_pc(void); 44 | // Adjust code_addr to not include flushing of previous mappings 45 | void reset_code_addr(void); 46 | /* Adds src and dst address, and src jump address to tables 47 | it returns a unique address identifier. 48 | This data should be used to fill in addresses in pass two. */ 49 | extern int add_jump(int old_address, int is_li, int is_aa); 50 | extern int is_j_out(int branch, int is_aa); 51 | // Use these for jumps that won't be known until later in compile time 52 | extern int add_jump_special(int is_j); 53 | extern void set_jump_special(int which, int new_jump); 54 | // Set up appropriate register mappings 55 | void start_new_block(void); 56 | void start_new_mapping(void); 57 | 58 | /* Convert one conceptual instruction 59 | this may use and/or generate more 60 | than one actual instruction */ 61 | int convert(void); 62 | 63 | #endif 64 | -------------------------------------------------------------------------------- /r4300/x86/regcache.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Mupen64 - regcache.h 3 | * Copyright (C) 2002 Hacktarux 4 | * 5 | * Mupen64 homepage: http://mupen64.emulation64.com 6 | * email address: hacktarux@yahoo.fr 7 | * 8 | * If you want to contribute to the project please contact 9 | * me first (maybe someone is already making what you are 10 | * planning to do). 11 | * 12 | * 13 | * This program is free software; you can redistribute it and/ 14 | * or modify it under the terms of the GNU General Public Li- 15 | * cence as published by the Free Software Foundation; either 16 | * version 2 of the Licence, or any later version. 17 | * 18 | * This program is distributed in the hope that it will be use- 19 | * ful, but WITHOUT ANY WARRANTY; without even the implied war- 20 | * ranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 21 | * See the GNU General Public Licence for more details. 22 | * 23 | * You should have received a copy of the GNU General Public 24 | * Licence along with this program; if not, write to the Free 25 | * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, 26 | * USA. 27 | * 28 | **/ 29 | 30 | #ifndef REGCACHE_H 31 | #define REGCACHE_H 32 | 33 | #include "../recomp.h" 34 | 35 | void init_cache(precomp_instr* start); 36 | void free_all_registers(); 37 | void free_register(int reg); 38 | int allocate_register(unsigned long *addr); 39 | int allocate_64_register1(unsigned long *addr); 40 | int allocate_64_register2(unsigned long *addr); 41 | int is64(unsigned long *addr); 42 | void build_wrapper(precomp_instr*, unsigned char*, precomp_block*); 43 | void build_wrappers(precomp_instr*, int, int, precomp_block*); 44 | int lru_register(); 45 | int allocate_register_w(unsigned long *addr); 46 | int allocate_64_register1_w(unsigned long *addr); 47 | int allocate_64_register2_w(unsigned long *addr); 48 | void set_register_state(int reg, unsigned long *addr, int dirty); 49 | void set_64_register_state(int reg1, int reg2, unsigned long *addr, int dirty); 50 | void lock_register(int reg); 51 | void unlock_register(int reg); 52 | void allocate_register_manually(int reg, unsigned long *addr); 53 | void allocate_register_manually_w(int reg, unsigned long *addr, int load); 54 | void force_32(int reg); 55 | int lru_register_exc1(int exc1); 56 | void simplify_access(); 57 | 58 | #endif // REGCACHE_H 59 | -------------------------------------------------------------------------------- /release/apps/wii64/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FIX94/mupen64gc-fix94/e5d9d9cc9fea4b1abaf79635cd00893a56a03ff9/release/apps/wii64/icon.png -------------------------------------------------------------------------------- /release/apps/wii64/meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Wii64 4 | Wii64 Team 5 | Beta 1.1 'Honey' 6 | 201002230000 7 | N64 Emulator for Wii 8 | 9 | 10 | Wii64 Team is: 11 | Core Coder - tehpola 12 | Graphics & Menu Coding - sepp256 13 | General Coding - emu_kidid 14 | 15 | The Wii64Team proudly presents Wii64 Beta 1.1 'Honey' 16 | Wii64 is a port of Mupen64 to the Wii 17 | 18 | It currently runs most games at full speed or close to it, there are some known graphical and/or core issues which are posted on http://emulatemii.com/wii64/CompatList/ 19 | If you like this project, please support us by donating towards our hardware fund at emulatemii.com 20 | Please see the enclosed README and visit emulatemii.com to report issues, or to check out the latest progress. 21 | 22 | Special Thanks to: 23 | drmr - Graphics 24 | marshallh - Wii64 Demo ROM 25 | wiibrew - wiki & forums 26 | shagkur/WinterMute - libogc/devkitPPC 27 | Team Twiizers for Wii homebrew 28 | 29 | Wii64 and the Wii64 logo are trademarks of the Wii64 Team and should not be used in unofficial builds. 30 | 31 | 32 | -------------------------------------------------------------------------------- /rsp_hle-ppc/RSPPlugin.h: -------------------------------------------------------------------------------- 1 | /* RSPPlugin.h - Mangles the plugin so it can be linked staticly 2 | by Mike Slegeir for Mupen64-GC 3 | */ 4 | 5 | #ifndef RSP_PLUGIN_H 6 | #define RSP_PLUGIN_H 7 | 8 | #define RomClosed romClosed_RSP 9 | #define RomOpen romOpen_RSP 10 | #define GetDllInfo getDllInfo_RSP 11 | #define DllConfig dllConfig_RSP 12 | #define DllTest dllTest_RSP 13 | #define DllAbout dllAbout_RSP 14 | #define CloseDLL closeDLL_RSP 15 | 16 | #define GetRspDebugInfo getRspDebugInfo 17 | #define InitiateRSP initiateRSP 18 | #define InitiateRSPDebugger initiateRSPDebugger 19 | 20 | #define DoRspCycles doRspCycles 21 | 22 | #endif 23 | 24 | -------------------------------------------------------------------------------- /rsp_hle-ppc/wintypes.h: -------------------------------------------------------------------------------- 1 | #ifndef __WINTYPES_H__ 2 | #define __WINTYPES_H__ 3 | 4 | #include 5 | 6 | typedef int HWND; 7 | typedef int HINSTANCE; 8 | typedef void* LPVOID; 9 | 10 | #define __declspec(dllexport) 11 | #define __cdecl 12 | #define _cdecl 13 | #define WINAPI 14 | 15 | typedef unsigned int DWORD; 16 | typedef unsigned short WORD; 17 | typedef unsigned char BYTE, byte; 18 | typedef int BOOL, BOOLEAN; 19 | #define __int8 char 20 | #define __int16 short 21 | #define __int32 int 22 | #define __int64 long long 23 | 24 | /** HRESULT stuff **/ 25 | typedef long HRESULT; 26 | #define S_OK ((HRESULT)0L) 27 | #define E_NOTIMPL 0x80004001L 28 | 29 | #ifndef FALSE 30 | # define FALSE (0) 31 | #endif 32 | #ifndef TRUE 33 | # define TRUE (!FALSE) 34 | #endif 35 | 36 | typedef int HMENU; 37 | typedef int RECT; 38 | typedef int PAINTSTRUCT; 39 | 40 | #endif /* __WINTYPES_H__ */ 41 | -------------------------------------------------------------------------------- /rsp_hle/RSPPlugin.h: -------------------------------------------------------------------------------- 1 | /* RSPPlugin.h - Mangles the plugin so it can be linked staticly 2 | by Mike Slegeir for Mupen64-GC 3 | */ 4 | 5 | #ifndef RSP_PLUGIN_H 6 | #define RSP_PLUGIN_H 7 | 8 | #define RomClosed romClosed_RSP 9 | #define RomOpen romOpen_RSP 10 | #define GetDllInfo getDllInfo_RSP 11 | #define DllConfig dllConfig_RSP 12 | #define DllTest dllTest_RSP 13 | #define DllAbout dllAbout_RSP 14 | #define CloseDLL closeDLL_RSP 15 | 16 | #define GetRspDebugInfo getRspDebugInfo 17 | #define InitiateRSP initiateRSP 18 | #define InitiateRSPDebugger initiateRSPDebugger 19 | 20 | #define DoRspCycles doRspCycles 21 | 22 | #endif 23 | 24 | -------------------------------------------------------------------------------- /rsp_hle/wintypes.h: -------------------------------------------------------------------------------- 1 | #ifndef __WINTYPES_H__ 2 | #define __WINTYPES_H__ 3 | 4 | #include 5 | 6 | typedef int HWND; 7 | typedef int HINSTANCE; 8 | typedef void* LPVOID; 9 | 10 | #define __declspec(dllexport) 11 | #define __cdecl 12 | #define _cdecl 13 | #define WINAPI 14 | 15 | typedef unsigned int DWORD; 16 | typedef unsigned short WORD; 17 | typedef unsigned char BYTE, byte; 18 | typedef int BOOL, BOOLEAN; 19 | #define __int8 char 20 | #define __int16 short 21 | #define __int32 int 22 | #define __int64 long long 23 | 24 | /** HRESULT stuff **/ 25 | typedef long HRESULT; 26 | #define S_OK ((HRESULT)0L) 27 | #define E_NOTIMPL 0x80004001L 28 | 29 | #ifndef FALSE 30 | # define FALSE (0) 31 | #endif 32 | #ifndef TRUE 33 | # define TRUE (!FALSE) 34 | #endif 35 | 36 | typedef int HMENU; 37 | typedef int RECT; 38 | typedef int PAINTSTRUCT; 39 | 40 | #endif /* __WINTYPES_H__ */ 41 | --------------------------------------------------------------------------------