├── GLideN64 ├── .gitignore ├── .gitrepo ├── .travis.yml ├── LICENSE ├── README.md ├── appveyor.yml ├── ini │ ├── GLideN64.custom.ini │ └── GLideN64.ini ├── licenses │ ├── GLSL-FXAA │ │ └── LICENSE.md │ ├── GlideHQ │ │ └── gpl-2.0.txt │ ├── Glow │ │ └── LICENSE │ ├── gles2n64 │ │ └── LICENSE │ └── readerwriterqueue │ │ └── LICENSE.md ├── projects │ ├── cmake │ │ └── Readme.txt │ └── msvc │ │ ├── GLideN64.sln │ │ ├── GLideN64.vcxproj │ │ ├── GLideN64.vcxproj.filters │ │ ├── GLideNUI.pro │ │ ├── GLideNUI.vcxproj │ │ ├── GLideNUI.vcxproj.filters │ │ ├── lib │ │ ├── dbg │ │ │ ├── freetype253MT_D.lib │ │ │ ├── libpngd.lib │ │ │ └── zlibd.lib │ │ ├── msvc12 │ │ │ ├── dbg │ │ │ │ ├── freetype253MT_D.lib │ │ │ │ ├── libpngd.lib │ │ │ │ └── zlibd.lib │ │ │ └── rel │ │ │ │ ├── freetype253MT.lib │ │ │ │ ├── libpng.lib │ │ │ │ └── zlib.lib │ │ ├── rel │ │ │ ├── freetype253MT.lib │ │ │ ├── libpng.lib │ │ │ └── zlib.lib │ │ └── x64 │ │ │ ├── dbg │ │ │ ├── freetype253MT_D.lib │ │ │ ├── libpngd.lib │ │ │ └── zlibd.lib │ │ │ └── rel │ │ │ ├── freetype253MT.lib │ │ │ ├── libpng.lib │ │ │ └── zlib.lib │ │ ├── libGLideNHQ.vcxproj │ │ ├── libGLideNHQ.vcxproj.filters │ │ ├── osal.vcxproj │ │ └── osal.vcxproj.filters ├── src │ ├── 3DMath.cpp │ ├── 3DMath.h │ ├── BufferCopy │ │ ├── ColorBufferToRDRAM.cpp │ │ ├── ColorBufferToRDRAM.h │ │ ├── ColorBufferToRDRAMStub.h │ │ ├── DepthBufferToRDRAM.cpp │ │ ├── DepthBufferToRDRAM.h │ │ ├── RDRAMtoColorBuffer.cpp │ │ ├── RDRAMtoColorBuffer.h │ │ └── WriteToRDRAM.h │ ├── CMakeLists.txt │ ├── CRC.h │ ├── CRC32.cpp │ ├── CRC32_ARMV8.cpp │ ├── CRC_OPT.cpp │ ├── Combiner.cpp │ ├── Combiner.h │ ├── CombinerKey.cpp │ ├── CombinerKey.h │ ├── CommonPluginAPI.cpp │ ├── Config.cpp │ ├── Config.h │ ├── DebugDump.cpp │ ├── DebugDump.h │ ├── Debugger.cpp │ ├── Debugger.h │ ├── DepthBuffer.cpp │ ├── DepthBuffer.h │ ├── DepthBufferRender │ │ ├── ClipPolygon.cpp │ │ ├── ClipPolygon.h │ │ ├── DepthBufferRender.cpp │ │ └── DepthBufferRender.h │ ├── DisplayLoadProgress.cpp │ ├── DisplayLoadProgress.h │ ├── DisplayWindow.cpp │ ├── DisplayWindow.h │ ├── FrameBuffer.cpp │ ├── FrameBuffer.h │ ├── FrameBufferEmulationIssues.txt │ ├── FrameBufferInfo.cpp │ ├── FrameBufferInfo.h │ ├── FrameBufferInfoAPI.h │ ├── GBI.cpp │ ├── GBI.h │ ├── GLideN64.cpp │ ├── GLideN64.h │ ├── GLideNHQ │ │ ├── CMakeLists.txt │ │ ├── Ext_TxFilter.cpp │ │ ├── Ext_TxFilter.h │ │ ├── GlideHQ.rc │ │ ├── README.txt │ │ ├── TextureFilters.cpp │ │ ├── TextureFilters.h │ │ ├── TextureFilters_2xsai.cpp │ │ ├── TextureFilters_2xsai.h │ │ ├── TextureFilters_hq2x.cpp │ │ ├── TextureFilters_hq2x.h │ │ ├── TextureFilters_hq4x.cpp │ │ ├── TextureFilters_hq4x.h │ │ ├── TextureFilters_lq2x.h │ │ ├── TextureFilters_xbrz.cpp │ │ ├── TextureFilters_xbrz.h │ │ ├── TxCache.cpp │ │ ├── TxCache.h │ │ ├── TxDbg.cpp │ │ ├── TxDbg.h │ │ ├── TxFilter.cpp │ │ ├── TxFilter.h │ │ ├── TxFilterExport.cpp │ │ ├── TxHiResCache.cpp │ │ ├── TxHiResCache.h │ │ ├── TxImage.cpp │ │ ├── TxImage.h │ │ ├── TxInternal.h │ │ ├── TxQuantize.cpp │ │ ├── TxQuantize.h │ │ ├── TxReSample.cpp │ │ ├── TxReSample.h │ │ ├── TxTexCache.cpp │ │ ├── TxTexCache.h │ │ ├── TxUtil.cpp │ │ ├── TxUtil.h │ │ ├── bldno.cpp │ │ ├── bldno.h │ │ ├── gpl-2.0.txt │ │ ├── inc │ │ │ ├── png.h │ │ │ ├── pngconf.h │ │ │ ├── pnglibconf.h │ │ │ ├── pngstruct.h │ │ │ ├── zconf.h │ │ │ └── zlib.h │ │ ├── lib │ │ │ ├── libdxtn.a │ │ │ ├── libpng.a │ │ │ └── libz.a │ │ ├── test │ │ │ ├── CMakeLists.txt │ │ │ ├── Makefile.gcc │ │ │ ├── Makefile.vc8 │ │ │ └── test.cpp │ │ ├── txWidestringWrapper.cpp │ │ └── txWidestringWrapper.h │ ├── GLideNUI │ │ ├── AboutDialog.cpp │ │ ├── AboutDialog.h │ │ ├── AboutDialog.ui │ │ ├── BottomLeft.ico │ │ ├── BottomRight.ico │ │ ├── ConfigDialog.cpp │ │ ├── ConfigDialog.h │ │ ├── Down.ico │ │ ├── FullscreenResolutions.h │ │ ├── GLideNUI.cpp │ │ ├── GLideNUI.h │ │ ├── GLideNUI.pro │ │ ├── Icon-Original.ico │ │ ├── Icon.ico │ │ ├── Info.ico │ │ ├── Left.ico │ │ ├── Right.ico │ │ ├── ScreenShot.cpp │ │ ├── Settings.cpp │ │ ├── Settings.h │ │ ├── TopLeft.ico │ │ ├── TopRight.ico │ │ ├── Up.ico │ │ ├── Warning.ico │ │ ├── configDialog.ui │ │ ├── fullscreenresolutions_windows.cpp │ │ └── icon.qrc │ ├── Graphics │ │ ├── ColorBufferReader.cpp │ │ ├── ColorBufferReader.h │ │ ├── CombinerProgram.cpp │ │ ├── CombinerProgram.h │ │ ├── Context.cpp │ │ ├── Context.h │ │ ├── ContextImpl.h │ │ ├── FramebufferTextureFormats.h │ │ ├── ObjectHandle.cpp │ │ ├── ObjectHandle.h │ │ ├── OpenGLContext │ │ │ ├── GLFunctions.cpp │ │ │ ├── GLFunctions.h │ │ │ ├── GLSL │ │ │ │ ├── glsl_CombinerInputs.cpp │ │ │ │ ├── glsl_CombinerInputs.h │ │ │ │ ├── glsl_CombinerProgramBuilder.cpp │ │ │ │ ├── glsl_CombinerProgramBuilder.h │ │ │ │ ├── glsl_CombinerProgramImpl.cpp │ │ │ │ ├── glsl_CombinerProgramImpl.h │ │ │ │ ├── glsl_CombinerProgramUniformFactory.cpp │ │ │ │ ├── glsl_CombinerProgramUniformFactory.h │ │ │ │ ├── glsl_FXAA.cpp │ │ │ │ ├── glsl_FXAA.h │ │ │ │ ├── glsl_ShaderPart.h │ │ │ │ ├── glsl_ShaderStorage.cpp │ │ │ │ ├── glsl_ShaderStorage.h │ │ │ │ ├── glsl_SpecialShadersFactory.cpp │ │ │ │ ├── glsl_SpecialShadersFactory.h │ │ │ │ ├── glsl_Utils.cpp │ │ │ │ └── glsl_Utils.h │ │ │ ├── GraphicBuffer │ │ │ │ ├── GraphicBufferWrapper.cpp │ │ │ │ ├── GraphicBufferWrapper.h │ │ │ │ ├── PrivateApi │ │ │ │ │ ├── GraphicBuffer.cpp │ │ │ │ │ ├── GraphicBuffer.h │ │ │ │ │ ├── gralloc.h │ │ │ │ │ ├── libhardware.cpp │ │ │ │ │ └── libhardware.h │ │ │ │ └── PublicApi │ │ │ │ │ ├── android_hardware_buffer_compat.cpp │ │ │ │ │ ├── android_hardware_buffer_compat.h │ │ │ │ │ ├── check.h │ │ │ │ │ └── dcheck.h │ │ │ ├── ThreadedOpenGl │ │ │ │ ├── BlockingQueue.h │ │ │ │ ├── RingBufferPool.cpp │ │ │ │ ├── RingBufferPool.h │ │ │ │ ├── atomicops.h │ │ │ │ ├── opengl_Command.cpp │ │ │ │ ├── opengl_Command.h │ │ │ │ ├── opengl_ObjectPool.cpp │ │ │ │ ├── opengl_ObjectPool.h │ │ │ │ ├── opengl_WrappedFunctions.cpp │ │ │ │ ├── opengl_WrappedFunctions.h │ │ │ │ ├── opengl_Wrapper.cpp │ │ │ │ ├── opengl_Wrapper.h │ │ │ │ └── readerwriterqueue.h │ │ │ ├── mupen64plus │ │ │ │ └── mupen64plus_DisplayWindow.cpp │ │ │ ├── opengl_Attributes.cpp │ │ │ ├── opengl_Attributes.h │ │ │ ├── opengl_BufferManipulationObjectFactory.cpp │ │ │ ├── opengl_BufferManipulationObjectFactory.h │ │ │ ├── opengl_BufferedDrawer.cpp │ │ │ ├── opengl_BufferedDrawer.h │ │ │ ├── opengl_CachedFunctions.cpp │ │ │ ├── opengl_CachedFunctions.h │ │ │ ├── opengl_ColorBufferReaderWithBufferStorage.cpp │ │ │ ├── opengl_ColorBufferReaderWithBufferStorage.h │ │ │ ├── opengl_ColorBufferReaderWithEGLImage.cpp │ │ │ ├── opengl_ColorBufferReaderWithEGLImage.h │ │ │ ├── opengl_ColorBufferReaderWithPixelBuffer.cpp │ │ │ ├── opengl_ColorBufferReaderWithPixelBuffer.h │ │ │ ├── opengl_ColorBufferReaderWithReadPixels.cpp │ │ │ ├── opengl_ColorBufferReaderWithReadPixels.h │ │ │ ├── opengl_ContextImpl.cpp │ │ │ ├── opengl_ContextImpl.h │ │ │ ├── opengl_GLInfo.cpp │ │ │ ├── opengl_GLInfo.h │ │ │ ├── opengl_GraphicsDrawer.h │ │ │ ├── opengl_Parameters.cpp │ │ │ ├── opengl_TextureManipulationObjectFactory.cpp │ │ │ ├── opengl_TextureManipulationObjectFactory.h │ │ │ ├── opengl_UnbufferedDrawer.cpp │ │ │ ├── opengl_UnbufferedDrawer.h │ │ │ ├── opengl_Utils.cpp │ │ │ ├── opengl_Utils.h │ │ │ └── windows │ │ │ │ ├── WindowsWGL.cpp │ │ │ │ ├── WindowsWGL.h │ │ │ │ └── windows_DisplayWindow.cpp │ │ ├── Parameter.h │ │ ├── Parameters.h │ │ ├── PixelBuffer.h │ │ └── ShaderProgram.h │ ├── GraphicsDrawer.cpp │ ├── GraphicsDrawer.h │ ├── Keys.cpp │ ├── Keys.h │ ├── Log.cpp │ ├── Log.h │ ├── Log_android.cpp │ ├── Log_ios.mm │ ├── MemoryStatus.h │ ├── MupenPlusPluginAPI.cpp │ ├── N64.cpp │ ├── N64.h │ ├── Neon │ │ ├── 3DMathNeon.cpp │ │ ├── CRC_OPT_NEON.cpp │ │ ├── RSP_LoadMatrixNeon.cpp │ │ └── gSPNeon.cpp │ ├── NoiseTexture.cpp │ ├── NoiseTexture.h │ ├── PaletteTexture.cpp │ ├── PaletteTexture.h │ ├── Performance.cpp │ ├── Performance.h │ ├── Platform.h │ ├── PluginAPI.h │ ├── PostProcessor.cpp │ ├── PostProcessor.h │ ├── RDP.cpp │ ├── RDP.h │ ├── RSP.cpp │ ├── RSP.h │ ├── RSP_LoadMatrix.cpp │ ├── RSP_LoadMatrixX86.cpp │ ├── SoftwareRender.cpp │ ├── SoftwareRender.h │ ├── TexrectDrawer.cpp │ ├── TexrectDrawer.h │ ├── TextDrawer.cpp │ ├── TextDrawer.h │ ├── TextDrawerStub.cpp │ ├── TextureFilterHandler.cpp │ ├── TextureFilterHandler.h │ ├── Textures.cpp │ ├── Textures.h │ ├── TxFilterStub.cpp │ ├── Types.h │ ├── VI.cpp │ ├── VI.h │ ├── ZilmarGFX_1_3.h │ ├── ZilmarPluginAPI.cpp │ ├── ZlutTexture.cpp │ ├── ZlutTexture.h │ ├── common │ │ └── CommonAPIImpl_common.cpp │ ├── convert.cpp │ ├── convert.h │ ├── gDP.cpp │ ├── gDP.h │ ├── gSP.cpp │ ├── gSP.h │ ├── getRevision.bat │ ├── getRevision.sh │ ├── inc │ │ ├── GL │ │ │ ├── glcorearb.h │ │ │ ├── glext.h │ │ │ ├── glxext.h │ │ │ └── wglext.h │ │ ├── callbacks.h │ │ ├── config.h │ │ ├── debugger.h │ │ ├── freetype │ │ │ └── include │ │ │ │ ├── config │ │ │ │ ├── ftconfig.h │ │ │ │ ├── ftheader.h │ │ │ │ ├── ftmodule.h │ │ │ │ ├── ftoption.h │ │ │ │ └── ftstdlib.h │ │ │ │ ├── freetype.h │ │ │ │ ├── ft2build.h │ │ │ │ ├── ftadvanc.h │ │ │ │ ├── ftautoh.h │ │ │ │ ├── ftbbox.h │ │ │ │ ├── ftbdf.h │ │ │ │ ├── ftbitmap.h │ │ │ │ ├── ftbzip2.h │ │ │ │ ├── ftcache.h │ │ │ │ ├── ftcffdrv.h │ │ │ │ ├── ftchapters.h │ │ │ │ ├── ftcid.h │ │ │ │ ├── fterrdef.h │ │ │ │ ├── fterrors.h │ │ │ │ ├── ftgasp.h │ │ │ │ ├── ftglyph.h │ │ │ │ ├── ftgxval.h │ │ │ │ ├── ftgzip.h │ │ │ │ ├── ftimage.h │ │ │ │ ├── ftincrem.h │ │ │ │ ├── ftlcdfil.h │ │ │ │ ├── ftlist.h │ │ │ │ ├── ftlzw.h │ │ │ │ ├── ftmac.h │ │ │ │ ├── ftmm.h │ │ │ │ ├── ftmodapi.h │ │ │ │ ├── ftmoderr.h │ │ │ │ ├── ftotval.h │ │ │ │ ├── ftoutln.h │ │ │ │ ├── ftpfr.h │ │ │ │ ├── ftrender.h │ │ │ │ ├── ftsizes.h │ │ │ │ ├── ftsnames.h │ │ │ │ ├── ftstroke.h │ │ │ │ ├── ftsynth.h │ │ │ │ ├── ftsystem.h │ │ │ │ ├── fttrigon.h │ │ │ │ ├── ftttdrv.h │ │ │ │ ├── fttypes.h │ │ │ │ ├── ftwinfnt.h │ │ │ │ ├── ftxf86.h │ │ │ │ ├── internal │ │ │ │ ├── autohint.h │ │ │ │ ├── ftcalc.h │ │ │ │ ├── ftdebug.h │ │ │ │ ├── ftdriver.h │ │ │ │ ├── ftgloadr.h │ │ │ │ ├── ftmemory.h │ │ │ │ ├── ftobjs.h │ │ │ │ ├── ftpic.h │ │ │ │ ├── ftrfork.h │ │ │ │ ├── ftserv.h │ │ │ │ ├── ftstream.h │ │ │ │ ├── fttrace.h │ │ │ │ ├── ftvalid.h │ │ │ │ ├── internal.h │ │ │ │ ├── psaux.h │ │ │ │ ├── pshints.h │ │ │ │ ├── services │ │ │ │ │ ├── svbdf.h │ │ │ │ │ ├── svcid.h │ │ │ │ │ ├── svgldict.h │ │ │ │ │ ├── svgxval.h │ │ │ │ │ ├── svkern.h │ │ │ │ │ ├── svmm.h │ │ │ │ │ ├── svotval.h │ │ │ │ │ ├── svpfr.h │ │ │ │ │ ├── svpostnm.h │ │ │ │ │ ├── svprop.h │ │ │ │ │ ├── svpscmap.h │ │ │ │ │ ├── svpsinfo.h │ │ │ │ │ ├── svsfnt.h │ │ │ │ │ ├── svttcmap.h │ │ │ │ │ ├── svtteng.h │ │ │ │ │ ├── svttglyf.h │ │ │ │ │ ├── svwinfnt.h │ │ │ │ │ └── svxf86nm.h │ │ │ │ ├── sfnt.h │ │ │ │ ├── t1types.h │ │ │ │ └── tttypes.h │ │ │ │ ├── t1tables.h │ │ │ │ ├── ttnameid.h │ │ │ │ ├── tttables.h │ │ │ │ ├── tttags.h │ │ │ │ └── ttunpat.h │ │ ├── m64p_common.h │ │ ├── m64p_config.h │ │ ├── m64p_debugger.h │ │ ├── m64p_frontend.h │ │ ├── m64p_plugin.h │ │ ├── m64p_types.h │ │ └── m64p_vidext.h │ ├── iob.cpp │ ├── mupenplus │ │ ├── CommonAPIImpl_mupenplus.cpp │ │ ├── Config_mupenplus.cpp │ │ ├── GLideN64_mupenplus.h │ │ ├── MemoryStatus_mupenplus.cpp │ │ ├── MupenPlusAPIImpl.cpp │ │ └── video_api_export.ver │ ├── osal │ │ ├── CMakeLists.txt │ │ ├── osal_files.h │ │ ├── osal_files_ios.mm │ │ ├── osal_files_unix.c │ │ └── osal_files_win32.c │ ├── sdl2_compat.h │ ├── uCodes │ │ ├── F3D.cpp │ │ ├── F3D.h │ │ ├── F3DAM.cpp │ │ ├── F3DAM.h │ │ ├── F3DBETA.cpp │ │ ├── F3DBETA.h │ │ ├── F3DDKR.cpp │ │ ├── F3DDKR.h │ │ ├── F3DEX.cpp │ │ ├── F3DEX.h │ │ ├── F3DEX2.cpp │ │ ├── F3DEX2.h │ │ ├── F3DEX2ACCLAIM.cpp │ │ ├── F3DEX2ACCLAIM.h │ │ ├── F3DEX2CBFD.cpp │ │ ├── F3DEX2CBFD.h │ │ ├── F3DFLX2.cpp │ │ ├── F3DFLX2.h │ │ ├── F3DGOLDEN.cpp │ │ ├── F3DGOLDEN.h │ │ ├── F3DPD.cpp │ │ ├── F3DPD.h │ │ ├── F3DSETA.cpp │ │ ├── F3DSETA.h │ │ ├── F3DTEXA.cpp │ │ ├── F3DTEXA.h │ │ ├── F3DZEX2.cpp │ │ ├── F3DZEX2.h │ │ ├── F5Indi_Naboo.cpp │ │ ├── F5Indi_Naboo.h │ │ ├── F5Rogue.cpp │ │ ├── F5Rogue.h │ │ ├── L3D.cpp │ │ ├── L3D.h │ │ ├── L3DEX.cpp │ │ ├── L3DEX.h │ │ ├── L3DEX2.cpp │ │ ├── L3DEX2.h │ │ ├── S2DEX.cpp │ │ ├── S2DEX.h │ │ ├── S2DEX2.cpp │ │ ├── S2DEX2.h │ │ ├── T3DUX.cpp │ │ ├── T3DUX.h │ │ ├── Turbo3D.cpp │ │ ├── Turbo3D.h │ │ ├── ZSort.cpp │ │ ├── ZSort.h │ │ ├── ZSortBOSS.cpp │ │ └── ZSortBOSS.h │ ├── windows │ │ ├── CommonAPIImpl_windows.cpp │ │ ├── Config_windows.cpp │ │ ├── GLideN64_windows.cpp │ │ ├── GLideN64_windows.h │ │ ├── MemoryStatus_windows.cpp │ │ └── ZilmarAPIImpl_windows.cpp │ ├── winlnxdefs.h │ ├── wst.h │ └── xxHash │ │ ├── xxhash.c │ │ └── xxhash.h └── translations │ ├── gliden64_de.ts │ ├── gliden64_es.ts │ ├── gliden64_fr.ts │ ├── gliden64_it.ts │ ├── gliden64_ja.ts │ ├── gliden64_pl.ts │ └── gliden64_pt_BR.ts ├── Makefile ├── Makefile.common ├── README.md ├── custom ├── GLideN64 │ ├── CRC.cpp │ ├── GLideN64.custom.ini.h │ ├── GLideN64_libretro.h │ ├── inc │ │ └── ARB_buffer_storage.h │ └── mupenplus │ │ ├── CommonAPIImpl_mupenplus.cpp │ │ ├── Config_mupenplus.cpp │ │ ├── GLideN64_mupenplus.h │ │ └── OpenGL_mupenplus.cpp ├── android │ ├── arm │ │ └── libpng.a │ ├── arm64 │ │ └── libpng.a │ ├── include │ │ ├── GLES3 │ │ │ └── gl31.h │ │ ├── cutils │ │ │ ├── android_reboot.h │ │ │ ├── aref.h │ │ │ ├── ashmem.h │ │ │ ├── atomic.h │ │ │ ├── bitops.h │ │ │ ├── compiler.h │ │ │ ├── config_utils.h │ │ │ ├── debugger.h │ │ │ ├── fs.h │ │ │ ├── hashmap.h │ │ │ ├── iosched_policy.h │ │ │ ├── jstring.h │ │ │ ├── klog.h │ │ │ ├── list.h │ │ │ ├── log.h │ │ │ ├── memory.h │ │ │ ├── misc.h │ │ │ ├── multiuser.h │ │ │ ├── native_handle.h │ │ │ ├── open_memstream.h │ │ │ ├── partition_utils.h │ │ │ ├── process_name.h │ │ │ ├── properties.h │ │ │ ├── qtaguid.h │ │ │ ├── record_stream.h │ │ │ ├── sched_policy.h │ │ │ ├── sockets.h │ │ │ ├── str_parms.h │ │ │ ├── threads.h │ │ │ ├── trace.h │ │ │ └── uevent.h │ │ ├── hardware │ │ │ ├── activity_recognition.h │ │ │ ├── audio.h │ │ │ ├── audio_alsaops.h │ │ │ ├── audio_effect.h │ │ │ ├── audio_policy.h │ │ │ ├── bluetooth.h │ │ │ ├── boot_control.h │ │ │ ├── bt_av.h │ │ │ ├── bt_common_types.h │ │ │ ├── bt_gatt.h │ │ │ ├── bt_gatt_client.h │ │ │ ├── bt_gatt_server.h │ │ │ ├── bt_gatt_types.h │ │ │ ├── bt_hf.h │ │ │ ├── bt_hf_client.h │ │ │ ├── bt_hh.h │ │ │ ├── bt_hl.h │ │ │ ├── bt_mce.h │ │ │ ├── bt_pan.h │ │ │ ├── bt_rc.h │ │ │ ├── bt_sdp.h │ │ │ ├── bt_sock.h │ │ │ ├── camera.h │ │ │ ├── camera2.h │ │ │ ├── camera3.h │ │ │ ├── camera_common.h │ │ │ ├── consumerir.h │ │ │ ├── fb.h │ │ │ ├── fingerprint.h │ │ │ ├── fused_location.h │ │ │ ├── gatekeeper.h │ │ │ ├── gps.h │ │ │ ├── gralloc.h │ │ │ ├── hardware.h │ │ │ ├── hdmi_cec.h │ │ │ ├── hw_auth_token.h │ │ │ ├── hwcomposer.h │ │ │ ├── hwcomposer_defs.h │ │ │ ├── input.h │ │ │ ├── keymaster0.h │ │ │ ├── keymaster1.h │ │ │ ├── keymaster2.h │ │ │ ├── keymaster_common.h │ │ │ ├── keymaster_defs.h │ │ │ ├── lights.h │ │ │ ├── local_time_hal.h │ │ │ ├── memtrack.h │ │ │ ├── nfc.h │ │ │ ├── nfc_tag.h │ │ │ ├── nvram.h │ │ │ ├── nvram_defs.h │ │ │ ├── power.h │ │ │ ├── qemu_pipe.h │ │ │ ├── qemud.h │ │ │ ├── radio.h │ │ │ ├── sensors.h │ │ │ ├── sound_trigger.h │ │ │ ├── tv_input.h │ │ │ └── vibrator.h │ │ ├── log │ │ │ ├── event_tag_map.h │ │ │ ├── log.h │ │ │ ├── log_read.h │ │ │ ├── logd.h │ │ │ ├── logger.h │ │ │ ├── logprint.h │ │ │ └── uio.h │ │ ├── system │ │ │ ├── camera.h │ │ │ ├── graphics.h │ │ │ ├── radio.h │ │ │ ├── thread_defs.h │ │ │ └── window.h │ │ ├── ui │ │ │ ├── ANativeObjectBase.h │ │ │ ├── DisplayInfo.h │ │ │ ├── DisplayStatInfo.h │ │ │ ├── Fence.h │ │ │ ├── FrameStats.h │ │ │ ├── FramebufferNativeWindow.h │ │ │ ├── GraphicBuffer.h │ │ │ ├── GraphicBufferAllocator.h │ │ │ ├── GraphicBufferMapper.h │ │ │ ├── PixelFormat.h │ │ │ ├── Point.h │ │ │ ├── Rect.h │ │ │ ├── Region.h │ │ │ ├── TMatHelpers.h │ │ │ ├── TVecHelpers.h │ │ │ ├── UiConfig.h │ │ │ ├── mat4.h │ │ │ ├── vec2.h │ │ │ ├── vec3.h │ │ │ └── vec4.h │ │ └── utils │ │ │ ├── AndroidThreads.h │ │ │ ├── Atomic.h │ │ │ ├── BitSet.h │ │ │ ├── BlobCache.h │ │ │ ├── ByteOrder.h │ │ │ ├── CallStack.h │ │ │ ├── Compat.h │ │ │ ├── Condition.h │ │ │ ├── Debug.h │ │ │ ├── Endian.h │ │ │ ├── Errors.h │ │ │ ├── FileMap.h │ │ │ ├── Flattenable.h │ │ │ ├── Functor.h │ │ │ ├── JenkinsHash.h │ │ │ ├── KeyedVector.h │ │ │ ├── LinearTransform.h │ │ │ ├── List.h │ │ │ ├── Log.h │ │ │ ├── Looper.h │ │ │ ├── LruCache.h │ │ │ ├── Mutex.h │ │ │ ├── NativeHandle.h │ │ │ ├── Printer.h │ │ │ ├── ProcessCallStack.h │ │ │ ├── PropertyMap.h │ │ │ ├── RWLock.h │ │ │ ├── RefBase.h │ │ │ ├── Singleton.h │ │ │ ├── SortedVector.h │ │ │ ├── StopWatch.h │ │ │ ├── String16.h │ │ │ ├── String8.h │ │ │ ├── StrongPointer.h │ │ │ ├── SystemClock.h │ │ │ ├── Thread.h │ │ │ ├── ThreadDefs.h │ │ │ ├── Timers.h │ │ │ ├── Tokenizer.h │ │ │ ├── Trace.h │ │ │ ├── TypeHelpers.h │ │ │ ├── Unicode.h │ │ │ ├── Vector.h │ │ │ ├── VectorImpl.h │ │ │ ├── misc.h │ │ │ └── threads.h │ ├── x86 │ │ └── libpng.a │ └── x86_64 │ │ └── libpng.a ├── libretro_externs.h ├── mman-win32 │ ├── mman.c │ └── sys │ │ └── mman.h ├── mupen64plus-core │ ├── api │ │ ├── config.c │ │ ├── frontend_libretro.c │ │ ├── msvc_compat.h │ │ └── vidext_libretro.c │ ├── main │ │ └── mupen64plus.ini.h │ └── plugin │ │ ├── audio_libretro │ │ ├── audio_backend_libretro.c │ │ └── audio_plugin.h │ │ ├── emulate_game_controller_via_input_plugin.h │ │ └── emulate_game_controller_via_libretro.c ├── mupen64plus-rsp-cxd4 │ └── module.c └── osal │ ├── osal_files.h │ ├── osal_files_unix.c │ └── osal_files_win32.c ├── libretro-common ├── .gitignore ├── .gitrepo ├── audio │ ├── audio_mix.c │ ├── audio_mixer.c │ ├── conversion │ │ ├── float_to_s16.c │ │ ├── float_to_s16_neon.S │ │ ├── float_to_s16_neon.c │ │ ├── s16_to_float.c │ │ ├── s16_to_float_neon.S │ │ └── s16_to_float_neon.c │ ├── dsp_filter.c │ ├── dsp_filters │ │ ├── BassBoost.dsp │ │ ├── ChipTuneEnhance.dsp │ │ ├── Chorus.dsp │ │ ├── Crystalizer.dsp │ │ ├── EQ.dsp │ │ ├── Echo.dsp │ │ ├── EchoReverb.dsp │ │ ├── HighShelfDampen.dsp │ │ ├── IIR.dsp │ │ ├── LowPassCPS.dsp │ │ ├── Makefile │ │ ├── Mono.dsp │ │ ├── Panning.dsp │ │ ├── Phaser.dsp │ │ ├── Reverb.dsp │ │ ├── Tremolo.dsp │ │ ├── Vibrato.dsp │ │ ├── WahWah.dsp │ │ ├── chorus.c │ │ ├── configure │ │ ├── crystalizer.c │ │ ├── echo.c │ │ ├── eq.c │ │ ├── fft │ │ │ ├── fft.c │ │ │ └── fft.h │ │ ├── iir.c │ │ ├── link.T │ │ ├── panning.c │ │ ├── phaser.c │ │ ├── reverb.c │ │ ├── tremolo.c │ │ ├── vibrato.c │ │ └── wahwah.c │ └── resampler │ │ ├── audio_resampler.c │ │ └── drivers │ │ ├── nearest_resampler.c │ │ ├── null_resampler.c │ │ ├── sinc_resampler.c │ │ └── sinc_resampler_neon.S ├── cdrom │ └── cdrom.c ├── compat │ ├── compat_fnmatch.c │ ├── compat_getopt.c │ ├── compat_ifaddrs.c │ ├── compat_posix_string.c │ ├── compat_snprintf.c │ ├── compat_strcasestr.c │ ├── compat_strl.c │ ├── compat_vscprintf.c │ └── fopen_utf8.c ├── crt │ ├── include │ │ └── string.h │ └── string.c ├── dynamic │ └── dylib.c ├── encodings │ ├── encoding_base64.c │ ├── encoding_crc32.c │ └── encoding_utf.c ├── features │ └── features_cpu.c ├── file │ ├── archive_file.c │ ├── archive_file_7z.c │ ├── archive_file_zlib.c │ ├── config_file.c │ ├── config_file_userdata.c │ ├── file_path.c │ ├── nbio │ │ ├── nbio_intf.c │ │ ├── nbio_linux.c │ │ ├── nbio_orbis.c │ │ ├── nbio_stdio.c │ │ ├── nbio_unixmmap.c │ │ └── nbio_windowsmmap.c │ └── retro_dirent.c ├── formats │ ├── bmp │ │ ├── rbmp.c │ │ └── rbmp_encode.c │ ├── image_texture.c │ ├── image_transfer.c │ ├── jpeg │ │ └── rjpeg.c │ ├── json │ │ ├── jsonsax.c │ │ └── jsonsax_full.c │ ├── libchdr │ │ ├── libchdr_bitstream.c │ │ ├── libchdr_cdrom.c │ │ ├── libchdr_chd.c │ │ ├── libchdr_flac.c │ │ ├── libchdr_flac_codec.c │ │ ├── libchdr_huffman.c │ │ ├── libchdr_lzma.c │ │ └── libchdr_zlib.c │ ├── png │ │ ├── rpng.c │ │ ├── rpng_encode.c │ │ └── rpng_internal.h │ ├── tga │ │ └── rtga.c │ ├── wav │ │ └── rwav.c │ └── xml │ │ ├── rxml.c │ │ └── test │ │ ├── Makefile │ │ └── rxml_test.c ├── gfx │ ├── gl_capabilities.c │ └── scaler │ │ ├── pixconv.c │ │ ├── scaler.c │ │ ├── scaler_filter.c │ │ └── scaler_int.c ├── glsm │ └── glsm.c ├── glsym │ ├── README.md │ ├── glgen.py │ ├── glsym_es2.c │ ├── glsym_es3.c │ ├── glsym_gl.c │ ├── rglgen.c │ ├── rglgen.py │ └── xglgen.py ├── hash │ └── rhash.c ├── include │ ├── array │ │ └── dynarray.h │ ├── audio │ │ ├── audio_mix.h │ │ ├── audio_mixer.h │ │ ├── audio_resampler.h │ │ ├── conversion │ │ │ ├── float_to_s16.h │ │ │ └── s16_to_float.h │ │ └── dsp_filter.h │ ├── boolean.h │ ├── cdrom │ │ └── cdrom.h │ ├── clamping.h │ ├── compat │ │ ├── apple_compat.h │ │ ├── fnmatch.h │ │ ├── fopen_utf8.h │ │ ├── getopt.h │ │ ├── ifaddrs.h │ │ ├── intrinsics.h │ │ ├── msvc.h │ │ ├── msvc │ │ │ └── stdint.h │ │ ├── posix_string.h │ │ ├── strcasestr.h │ │ ├── strl.h │ │ ├── zconf.h │ │ ├── zconf.h.in │ │ ├── zlib.h │ │ ├── zlib │ │ │ ├── zconf.h │ │ │ ├── zconf.h.in │ │ │ ├── zlib.h │ │ │ └── zutil.h │ │ └── zutil.h │ ├── dynamic │ │ └── dylib.h │ ├── encodings │ │ ├── base64.h │ │ ├── crc32.h │ │ ├── utf.h │ │ └── win32.h │ ├── fastcpy.h │ ├── features │ │ └── features_cpu.h │ ├── file │ │ ├── archive_file.h │ │ ├── config_file.h │ │ ├── config_file_userdata.h │ │ ├── file_path.h │ │ └── nbio.h │ ├── filters.h │ ├── formats │ │ ├── image.h │ │ ├── jsonsax.h │ │ ├── jsonsax_full.h │ │ ├── rbmp.h │ │ ├── rjpeg.h │ │ ├── rpng.h │ │ ├── rtga.h │ │ ├── rwav.h │ │ └── rxml.h │ ├── gfx │ │ ├── gl_capabilities.h │ │ ├── math │ │ │ ├── matrix_3x3.h │ │ │ ├── matrix_4x4.h │ │ │ ├── vector_2.h │ │ │ ├── vector_3.h │ │ │ └── vector_4.h │ │ ├── scaler │ │ │ ├── filter.h │ │ │ ├── pixconv.h │ │ │ ├── scaler.h │ │ │ └── scaler_int.h │ │ └── video_frame.h │ ├── glsm │ │ ├── glsm.h │ │ ├── glsm_caps.h │ │ ├── glsm_state_ctl.h │ │ └── glsmsym.h │ ├── glsym │ │ ├── glsym.h │ │ ├── glsym_es2.h │ │ ├── glsym_es3.h │ │ ├── glsym_gl.h │ │ ├── rglgen.h │ │ ├── rglgen_headers.h │ │ └── switch │ │ │ ├── nx_gl.h │ │ │ └── nx_glsym.h │ ├── libchdr │ │ ├── bitstream.h │ │ ├── cdrom.h │ │ ├── chd.h │ │ ├── coretypes.h │ │ ├── flac.h │ │ ├── huffman.h │ │ ├── libchdr_zlib.h │ │ ├── lzma.h │ │ └── minmax.h │ ├── libco.h │ ├── libretro.h │ ├── libretro_d3d.h │ ├── libretro_dspfilter.h │ ├── libretro_gskit_ps2.h │ ├── libretro_vulkan.h │ ├── lists │ │ ├── dir_list.h │ │ ├── file_list.h │ │ └── string_list.h │ ├── math │ │ ├── complex.h │ │ ├── float_minmax.h │ │ └── fxp.h │ ├── media │ │ └── media_detect_cd.h │ ├── memalign.h │ ├── memmap.h │ ├── net │ │ ├── net_compat.h │ │ ├── net_http.h │ │ ├── net_http_parse.h │ │ ├── net_ifinfo.h │ │ ├── net_natt.h │ │ ├── net_socket.h │ │ └── net_socket_ssl.h │ ├── queues │ │ ├── fifo_queue.h │ │ ├── message_queue.h │ │ └── task_queue.h │ ├── retro_assert.h │ ├── retro_common.h │ ├── retro_common_api.h │ ├── retro_dirent.h │ ├── retro_endianness.h │ ├── retro_environment.h │ ├── retro_inline.h │ ├── retro_math.h │ ├── retro_miscellaneous.h │ ├── retro_stat.h │ ├── retro_timers.h │ ├── rhash.h │ ├── rthreads │ │ ├── async_job.h │ │ └── rthreads.h │ ├── streams │ │ ├── chd_stream.h │ │ ├── file_stream.h │ │ ├── file_stream_transforms.h │ │ ├── interface_stream.h │ │ ├── memory_stream.h │ │ ├── stdin_stream.h │ │ └── trans_stream.h │ ├── string │ │ └── stdstring.h │ ├── utils │ │ └── md5.h │ ├── vfs │ │ ├── vfs.h │ │ ├── vfs_implementation.h │ │ └── vfs_implementation_cdrom.h │ └── vulkan │ │ ├── vk_icd.h │ │ ├── vk_layer.h │ │ ├── vk_platform.h │ │ ├── vk_sdk_platform.h │ │ ├── vulkan.h │ │ ├── vulkan_intel.h │ │ └── vulkan_symbol_wrapper.h ├── libco │ ├── aarch64.c │ ├── amd64.c │ ├── armeabi.c │ ├── fiber.c │ ├── genode.cpp │ ├── libco.c │ ├── ppc.c │ ├── psp2.c │ ├── scefiber.c │ ├── sjlj.c │ ├── ucontext.c │ └── x86.c ├── lists │ ├── dir_list.c │ ├── file_list.c │ ├── string_list.c │ └── vector_list.c ├── media │ └── media_detect_cd.c ├── memmap │ ├── memalign.c │ └── memmap.c ├── net │ ├── net_compat.c │ ├── net_http.c │ ├── net_http_parse.c │ ├── net_ifinfo.c │ ├── net_natt.c │ ├── net_socket.c │ └── net_socket_ssl.c ├── queues │ ├── fifo_queue.c │ ├── message_queue.c │ └── task_queue.c ├── rthreads │ ├── ctr_pthread.h │ ├── gx_pthread.h │ ├── psp_pthread.h │ ├── rthreads.c │ ├── wiiu_pthread.h │ └── xenon_sdl_threads.c ├── samples │ ├── core_options │ │ ├── README.md │ │ ├── example_default │ │ │ └── libretro_core_options.h │ │ ├── example_hide_option │ │ │ └── libretro_core_options.h │ │ └── example_translation │ │ │ └── libretro_core_options.h │ ├── file │ │ └── nbio │ │ │ ├── Makefile │ │ │ └── nbio_test.c │ ├── formats │ │ └── png │ │ │ ├── Makefile │ │ │ └── rpng_test.c │ ├── net │ │ ├── Makefile │ │ ├── http_test │ │ ├── net_http_test.c │ │ ├── net_ifinfo │ │ ├── net_ifinfo_test.c │ │ └── udp-test.c │ └── utils │ │ └── Makefile ├── streams │ ├── chd_stream.c │ ├── file_stream.c │ ├── file_stream_transforms.c │ ├── interface_stream.c │ ├── memory_stream.c │ ├── stdin_stream.c │ ├── trans_stream.c │ ├── trans_stream_pipe.c │ └── trans_stream_zlib.c ├── string │ └── stdstring.c ├── utils │ ├── crc32.c │ ├── djb2.c │ ├── md5.c │ ├── sha1.c │ └── sha1_main.c ├── vfs │ ├── vfs_implementation.c │ ├── vfs_implementation_cdrom.c │ └── vfs_implementation_uwp.cpp └── vulkan │ └── vulkan_symbol_wrapper.c ├── libretro ├── jni │ ├── Android.mk │ └── Application.mk ├── libretro.c ├── libretro_memory.h ├── libretro_perf.h ├── libretro_private.h └── link.T ├── mupen64plus-core ├── .gitattributes ├── .gitignore ├── .gitrepo ├── .travis.yml ├── CREDITS ├── INSTALL ├── LICENSES ├── README ├── README.md ├── RELEASE ├── appveyor.yml ├── data │ ├── font.ttf │ ├── mupen64plus.ini │ └── mupencheat.txt ├── doc │ ├── emuwiki-api-doc │ │ ├── Home.mediawiki │ │ ├── Mupen64Plus-Core-Parameters.mediawiki │ │ ├── Mupen64Plus-Plugin-Parameters.mediawiki │ │ ├── Mupen64Plus-v2.0-API-Versioning.mediawiki │ │ ├── Mupen64Plus-v2.0-Core-API-v1.0.mediawiki │ │ ├── Mupen64Plus-v2.0-Core-Basic.mediawiki │ │ ├── Mupen64Plus-v2.0-Core-Config.mediawiki │ │ ├── Mupen64Plus-v2.0-Core-Debugger.mediawiki │ │ ├── Mupen64Plus-v2.0-Core-Front-End.mediawiki │ │ ├── Mupen64Plus-v2.0-Core-Video-Extension.mediawiki │ │ ├── Mupen64Plus-v2.0-Design-Proposal-3.mediawiki │ │ ├── Mupen64Plus-v2.0-Plugin-API.mediawiki │ │ └── Mupen64Plus-v2.0-headers.mediawiki │ ├── font-license │ ├── gpl-license │ ├── lgpl-license │ └── new_dynarec.mediawiki ├── projects │ ├── VisualStudio2013 │ │ ├── mupen64plus-core.vcxproj │ │ └── mupen64plus-core.vcxproj.filters │ └── unix │ │ └── Makefile ├── src │ ├── api │ │ ├── api_export.ver │ │ ├── callbacks.c │ │ ├── callbacks.h │ │ ├── common.c │ │ ├── config.c │ │ ├── config.h │ │ ├── debugger.c │ │ ├── debugger.h │ │ ├── frontend.c │ │ ├── m64p_common.h │ │ ├── m64p_config.h │ │ ├── m64p_debugger.h │ │ ├── m64p_frontend.h │ │ ├── m64p_plugin.h │ │ ├── m64p_types.h │ │ ├── m64p_vidext.h │ │ ├── vidext.c │ │ ├── vidext.h │ │ └── vidext_sdl2_compat.h │ ├── asm_defines │ │ └── asm_defines.c │ ├── backends │ │ ├── api │ │ │ ├── audio_out_backend.h │ │ │ ├── clock_backend.h │ │ │ ├── controller_input_backend.h │ │ │ ├── joybus.h │ │ │ ├── rumble_backend.h │ │ │ ├── storage_backend.h │ │ │ ├── video_capture_backend.c │ │ │ └── video_capture_backend.h │ │ ├── clock_ctime_plus_delta.c │ │ ├── clock_ctime_plus_delta.h │ │ ├── dummy_video_capture.c │ │ ├── file_storage.c │ │ ├── file_storage.h │ │ ├── opencv_video_capture.cpp │ │ └── plugins_compat │ │ │ ├── audio_plugin_compat.c │ │ │ ├── input_plugin_compat.c │ │ │ └── plugins_compat.h │ ├── debugger │ │ ├── dbg_breakpoints.c │ │ ├── dbg_breakpoints.h │ │ ├── dbg_debugger.c │ │ ├── dbg_debugger.h │ │ ├── dbg_decoder.c │ │ ├── dbg_decoder.h │ │ ├── dbg_decoder_local.h │ │ ├── dbg_memory.c │ │ └── dbg_memory.h │ ├── device │ │ ├── cart │ │ │ ├── af_rtc.c │ │ │ ├── af_rtc.h │ │ │ ├── cart.c │ │ │ ├── cart.h │ │ │ ├── cart_rom.c │ │ │ ├── cart_rom.h │ │ │ ├── eeprom.c │ │ │ ├── eeprom.h │ │ │ ├── flashram.c │ │ │ ├── flashram.h │ │ │ ├── sram.c │ │ │ └── sram.h │ │ ├── controllers │ │ │ ├── game_controller.c │ │ │ ├── game_controller.h │ │ │ └── paks │ │ │ │ ├── biopak.c │ │ │ │ ├── biopak.h │ │ │ │ ├── mempak.c │ │ │ │ ├── mempak.h │ │ │ │ ├── rumblepak.c │ │ │ │ ├── rumblepak.h │ │ │ │ ├── transferpak.c │ │ │ │ └── transferpak.h │ │ ├── dd │ │ │ ├── dd_controller.c │ │ │ └── dd_controller.h │ │ ├── device.c │ │ ├── device.h │ │ ├── gb │ │ │ ├── gb_cart.c │ │ │ ├── gb_cart.h │ │ │ ├── m64282fp.c │ │ │ ├── m64282fp.h │ │ │ ├── mbc3_rtc.c │ │ │ └── mbc3_rtc.h │ │ ├── memory │ │ │ ├── memory.c │ │ │ └── memory.h │ │ ├── pif │ │ │ ├── bootrom_hle.c │ │ │ ├── bootrom_hle.h │ │ │ ├── cic.c │ │ │ ├── cic.h │ │ │ ├── n64_cic_nus_6105.c │ │ │ ├── n64_cic_nus_6105.h │ │ │ ├── pif.c │ │ │ └── pif.h │ │ ├── r4300 │ │ │ ├── cached_interp.c │ │ │ ├── cached_interp.h │ │ │ ├── cp0.c │ │ │ ├── cp0.h │ │ │ ├── cp1.c │ │ │ ├── cp1.h │ │ │ ├── fpu.h │ │ │ ├── idec.c │ │ │ ├── idec.h │ │ │ ├── instr_counters.c │ │ │ ├── instr_counters.h │ │ │ ├── interrupt.c │ │ │ ├── interrupt.h │ │ │ ├── mips_instructions.def │ │ │ ├── new_dynarec │ │ │ │ ├── arm │ │ │ │ │ ├── arm_cpu_features.c │ │ │ │ │ ├── arm_cpu_features.h │ │ │ │ │ ├── asm_defines_gas.h │ │ │ │ │ ├── asm_defines_nasm.h │ │ │ │ │ ├── assem_arm.c │ │ │ │ │ ├── assem_arm.h │ │ │ │ │ └── linkage_arm.S │ │ │ │ ├── arm64 │ │ │ │ │ ├── asm_defines_gas.h │ │ │ │ │ ├── asm_defines_nasm.h │ │ │ │ │ ├── assem_arm64.c │ │ │ │ │ ├── assem_arm64.h │ │ │ │ │ └── linkage_arm64.S │ │ │ │ ├── new_dynarec.c │ │ │ │ ├── new_dynarec.h │ │ │ │ ├── recomp_dbg.c │ │ │ │ ├── x64 │ │ │ │ │ ├── assem_x64.c │ │ │ │ │ ├── assem_x64.h │ │ │ │ │ └── linkage_x64.asm │ │ │ │ └── x86 │ │ │ │ │ ├── assem_x86.c │ │ │ │ │ ├── assem_x86.h │ │ │ │ │ └── linkage_x86.asm │ │ │ ├── opcodes.md │ │ │ ├── pure_interp.c │ │ │ ├── pure_interp.h │ │ │ ├── r4300_core.c │ │ │ ├── r4300_core.h │ │ │ ├── recomp.c │ │ │ ├── recomp.h │ │ │ ├── recomp_types.h │ │ │ ├── tlb.c │ │ │ ├── tlb.h │ │ │ ├── x86 │ │ │ │ ├── assemble.c │ │ │ │ ├── assemble.h │ │ │ │ ├── assemble_struct.h │ │ │ │ ├── dyna_start.asm │ │ │ │ ├── dynarec.c │ │ │ │ ├── interpret.h │ │ │ │ ├── regcache.c │ │ │ │ └── regcache.h │ │ │ └── x86_64 │ │ │ │ ├── assemble.c │ │ │ │ ├── assemble.h │ │ │ │ ├── assemble_struct.h │ │ │ │ ├── dyna_start.asm │ │ │ │ ├── dynarec.c │ │ │ │ ├── interpret.h │ │ │ │ ├── regcache.c │ │ │ │ └── regcache.h │ │ ├── rcp │ │ │ ├── ai │ │ │ │ ├── ai_controller.c │ │ │ │ └── ai_controller.h │ │ │ ├── mi │ │ │ │ ├── mi_controller.c │ │ │ │ └── mi_controller.h │ │ │ ├── pi │ │ │ │ ├── pi_controller.c │ │ │ │ └── pi_controller.h │ │ │ ├── rdp │ │ │ │ ├── fb.c │ │ │ │ ├── fb.h │ │ │ │ ├── rdp_core.c │ │ │ │ └── rdp_core.h │ │ │ ├── ri │ │ │ │ ├── ri_controller.c │ │ │ │ └── ri_controller.h │ │ │ ├── rsp │ │ │ │ ├── rsp_core.c │ │ │ │ └── rsp_core.h │ │ │ ├── si │ │ │ │ ├── si_controller.c │ │ │ │ └── si_controller.h │ │ │ └── vi │ │ │ │ ├── vi_controller.c │ │ │ │ └── vi_controller.h │ │ └── rdram │ │ │ ├── rdram.c │ │ │ └── rdram.h │ ├── main │ │ ├── cheat.c │ │ ├── cheat.h │ │ ├── eventloop.c │ │ ├── eventloop.h │ │ ├── lirc.c │ │ ├── lirc.h │ │ ├── list.h │ │ ├── main.c │ │ ├── main.h │ │ ├── profile.c │ │ ├── profile.h │ │ ├── rom.c │ │ ├── rom.h │ │ ├── savestates.c │ │ ├── savestates.h │ │ ├── screenshot.c │ │ ├── screenshot.h │ │ ├── sdl_key_converter.c │ │ ├── sdl_key_converter.h │ │ ├── util.c │ │ ├── util.h │ │ ├── version.h │ │ ├── workqueue.c │ │ └── workqueue.h │ ├── osal │ │ ├── dynamiclib.h │ │ ├── dynamiclib_unix.c │ │ ├── dynamiclib_win32.c │ │ ├── files.h │ │ ├── files_macos.c │ │ ├── files_unix.c │ │ ├── files_win32.c │ │ └── preproc.h │ ├── osd │ │ ├── oglft_c.cpp │ │ ├── oglft_c.h │ │ ├── osd.c │ │ └── osd.h │ └── plugin │ │ ├── dummy_audio.c │ │ ├── dummy_audio.h │ │ ├── dummy_input.c │ │ ├── dummy_input.h │ │ ├── dummy_rsp.c │ │ ├── dummy_rsp.h │ │ ├── dummy_video.c │ │ ├── dummy_video.h │ │ ├── plugin.c │ │ └── plugin.h ├── subprojects │ ├── md5 │ │ ├── md5.c │ │ └── md5.h │ ├── minizip │ │ ├── crypt.h │ │ ├── ioapi.c │ │ ├── ioapi.h │ │ ├── unzip.c │ │ ├── unzip.h │ │ ├── zip.c │ │ └── zip.h │ ├── oglft │ │ ├── OGLFT.cpp │ │ └── OGLFT.h │ └── xxhash │ │ ├── xxhash.c │ │ └── xxhash.h └── tools │ ├── build_bundle_bin.sh │ ├── build_bundle_src.sh │ ├── build_modules_src.sh │ ├── cheat_code_convert.py │ ├── gen_asm_defines.awk │ ├── gen_sdl_key_converter.c │ ├── install_binary_bundle.sh │ ├── joymodel.c │ ├── joymodel.png │ ├── m64p_helper_scripts.tar.gz │ ├── osx_build_bundle.sh │ ├── osx_build_instructions.txt │ ├── profiling.txt │ ├── r4300prof.c │ ├── regtests │ ├── daily-tests.cfg │ └── regression-video.py │ ├── savestate_convert.c │ ├── savestate_convert.txt │ └── uninstall_binary_bundle.sh ├── mupen64plus-rsp-cxd4 ├── COPYING ├── README.md ├── config.h ├── module.c ├── module.h ├── my_types.h ├── rsp.c ├── rsp.h ├── rsp_dump.cpp ├── rsp_dump.h ├── sse2neon │ └── SSE2NEON.h ├── su.c ├── su.h └── vu │ ├── add.c │ ├── add.h │ ├── divide.c │ ├── divide.h │ ├── logical.c │ ├── logical.h │ ├── multiply.c │ ├── multiply.h │ ├── pack.h │ ├── select.c │ ├── select.h │ ├── vu.c │ └── vu.h ├── mupen64plus-rsp-hle ├── .gitattributes ├── .gitignore ├── .gitrepo ├── .travis.yml ├── INSTALL ├── LICENSES ├── RELEASE ├── projects │ ├── VisualStudio2013 │ │ └── mupen64plus-rsp-hle.vcxproj │ └── unix │ │ └── Makefile └── src │ ├── alist.c │ ├── alist.h │ ├── alist_audio.c │ ├── alist_naudio.c │ ├── alist_nead.c │ ├── arithmetics.h │ ├── audio.c │ ├── audio.h │ ├── cicx105.c │ ├── common.h │ ├── hle.c │ ├── hle.h │ ├── hle_external.h │ ├── hle_internal.h │ ├── jpeg.c │ ├── memory.c │ ├── memory.h │ ├── mp3.c │ ├── musyx.c │ ├── osal_dynamiclib.h │ ├── osal_dynamiclib_unix.c │ ├── osal_dynamiclib_win32.c │ ├── plugin.c │ ├── re2.c │ ├── rsp_api_export.ver │ └── ucodes.h ├── mupen64plus-rsp-paraLLEl ├── .clang-format ├── .gitignore ├── .gitrepo ├── CMakeLists.txt ├── CREDITS.txt ├── arch │ └── x86_64 │ │ └── rsp │ │ ├── clamp.h │ │ ├── rsp_core.cpp │ │ ├── rsp_impl.h │ │ ├── rsp_para.h │ │ ├── vabs.h │ │ ├── vadd.h │ │ ├── vaddc.h │ │ ├── vand.h │ │ ├── vch.h │ │ ├── vcl.h │ │ ├── vcmp.h │ │ ├── vcr.h │ │ ├── vdivh.h │ │ ├── vmac.h │ │ ├── vmov.h │ │ ├── vmrg.h │ │ ├── vmudh.h │ │ ├── vmul.h │ │ ├── vmulh.h │ │ ├── vmull.h │ │ ├── vmulm.h │ │ ├── vmuln.h │ │ ├── vor.h │ │ ├── vrcpsq.h │ │ ├── vrsq.h │ │ ├── vsub.h │ │ ├── vsubc.h │ │ └── vxor.h ├── cpu_state.hpp ├── debug-toolchain │ ├── Makefile │ ├── Makefile.mips │ ├── add.s │ ├── addi.s │ ├── and.s │ ├── andi.s │ ├── beq-impossible-delay-slot-both-taken.s │ ├── beq-impossible-delay-slot-first-taken.s │ ├── beq-impossible-delay-slot-second-taken.s │ ├── bgez.s │ ├── bgezal.s │ ├── bgtz.s │ ├── blez.s │ ├── bltz.s │ ├── bltzal.s │ ├── bne.s │ ├── cop0.s │ ├── cop2-basic.s │ ├── cop2-ls.s │ ├── cop2-vector.s │ ├── delay-slot-before-break.s │ ├── delay-slot-before-new-block-illegal.s │ ├── delay-slot-before-new-block-not-taken.s │ ├── delay-slot-before-new-block.s │ ├── j.s │ ├── jal-into-indirect-delay-slot.s │ ├── jal.s │ ├── jr.s │ ├── lb.s │ ├── lbu.s │ ├── lh-unaligned.s │ ├── lh.s │ ├── lhu-unaligned.s │ ├── lhu.s │ ├── lui.s │ ├── lw-unaligned-in-branch-delay.s │ ├── lw-unaligned.s │ ├── lw.s │ ├── main.c │ ├── nor.s │ ├── or.s │ ├── ori.s │ ├── rsp-mips.h │ ├── rsp-mips.ld │ ├── rsp-mips.s │ ├── sb.s │ ├── sh-unaligned.s │ ├── sh.s │ ├── sll.s │ ├── sllv.s │ ├── slt.s │ ├── slti.s │ ├── sltiu.s │ ├── sltu.s │ ├── sra.s │ ├── srav.s │ ├── srl.s │ ├── srlv.s │ ├── start.s │ ├── sub.s │ ├── sw-unaligned.s │ ├── sw.s │ ├── unconditional-delay-slot-before-break.s │ ├── xor.s │ └── xori.s ├── debug_jit.cpp ├── debug_jit.hpp ├── format_all.sh ├── lightning │ ├── .gitattributes │ ├── .gitignore │ ├── .gitrepo │ ├── AUTHORS │ ├── COPYING │ ├── COPYING.DOC │ ├── COPYING.LESSER │ ├── ChangeLog │ ├── Makefile.am │ ├── NEWS │ ├── README │ ├── THANKS │ ├── TODO │ ├── check │ │ ├── 3to2.ok │ │ ├── 3to2.tst │ │ ├── Makefile.am │ │ ├── add.ok │ │ ├── add.tst │ │ ├── align.ok │ │ ├── align.tst │ │ ├── all.tst │ │ ├── allocai.ok │ │ ├── allocai.tst │ │ ├── allocar.ok │ │ ├── allocar.tst │ │ ├── alu.inc │ │ ├── alu_add.ok │ │ ├── alu_add.tst │ │ ├── alu_and.ok │ │ ├── alu_and.tst │ │ ├── alu_com.ok │ │ ├── alu_com.tst │ │ ├── alu_div.ok │ │ ├── alu_div.tst │ │ ├── alu_lsh.ok │ │ ├── alu_lsh.tst │ │ ├── alu_mul.ok │ │ ├── alu_mul.tst │ │ ├── alu_neg.ok │ │ ├── alu_neg.tst │ │ ├── alu_or.ok │ │ ├── alu_or.tst │ │ ├── alu_rem.ok │ │ ├── alu_rem.tst │ │ ├── alu_rsb.ok │ │ ├── alu_rsb.tst │ │ ├── alu_rsh.ok │ │ ├── alu_rsh.tst │ │ ├── alu_sub.ok │ │ ├── alu_sub.tst │ │ ├── alu_xor.ok │ │ ├── alu_xor.tst │ │ ├── alux_add.ok │ │ ├── alux_add.tst │ │ ├── alux_sub.ok │ │ ├── alux_sub.tst │ │ ├── bp.ok │ │ ├── bp.tst │ │ ├── branch.ok │ │ ├── branch.tst │ │ ├── call.ok │ │ ├── call.tst │ │ ├── carg.c │ │ ├── carry.ok │ │ ├── carry.tst │ │ ├── ccall.c │ │ ├── check.arm.sh │ │ ├── check.arm.swf.sh │ │ ├── check.arm4.swf.sh │ │ ├── check.nodata.sh │ │ ├── check.sh │ │ ├── check.swf.sh │ │ ├── check.x87.nodata.sh │ │ ├── check.x87.sh │ │ ├── clobber.ok │ │ ├── clobber.tst │ │ ├── ctramp.c │ │ ├── cva_list.c │ │ ├── cvt.ok │ │ ├── cvt.tst │ │ ├── divi.ok │ │ ├── divi.tst │ │ ├── fib.ok │ │ ├── fib.tst │ │ ├── float.ok │ │ ├── float.tst │ │ ├── fop_abs.ok │ │ ├── fop_abs.tst │ │ ├── fop_sqrt.ok │ │ ├── fop_sqrt.tst │ │ ├── hton.ok │ │ ├── hton.tst │ │ ├── jmpr.ok │ │ ├── jmpr.tst │ │ ├── ldst.inc │ │ ├── ldsti.ok │ │ ├── ldsti.tst │ │ ├── ldstr-c.ok │ │ ├── ldstr-c.tst │ │ ├── ldstr.ok │ │ ├── ldstr.tst │ │ ├── ldstxi-c.ok │ │ ├── ldstxi-c.tst │ │ ├── ldstxi.ok │ │ ├── ldstxi.tst │ │ ├── ldstxr-c.ok │ │ ├── ldstxr-c.tst │ │ ├── ldstxr.ok │ │ ├── ldstxr.tst │ │ ├── lightning.c │ │ ├── nodata.c │ │ ├── put.ok │ │ ├── put.tst │ │ ├── qalu.inc │ │ ├── qalu_div.ok │ │ ├── qalu_div.tst │ │ ├── qalu_mul.ok │ │ ├── qalu_mul.tst │ │ ├── range.ok │ │ ├── range.tst │ │ ├── ranger.ok │ │ ├── ranger.tst │ │ ├── ret.ok │ │ ├── ret.tst │ │ ├── rpn.ok │ │ ├── rpn.tst │ │ ├── run-test │ │ ├── self.c │ │ ├── setcode.c │ │ ├── stack.ok │ │ ├── stack.tst │ │ ├── tramp.ok │ │ ├── tramp.tst │ │ ├── va_list.ok │ │ ├── va_list.tst │ │ ├── varargs.ok │ │ └── varargs.tst │ ├── configure.ac │ ├── doc │ │ ├── .cvsignore │ │ ├── .gitignore │ │ ├── Makefile.am │ │ ├── body.texi │ │ ├── fact.c │ │ ├── ifib.c │ │ ├── incr.c │ │ ├── lightning.texi │ │ ├── printf.c │ │ ├── rfib.c │ │ ├── rpn.c │ │ └── version.texi │ ├── include │ │ ├── Makefile.am │ │ ├── lightning.h │ │ ├── lightning.h.in │ │ └── lightning │ │ │ ├── Makefile.am │ │ │ ├── jit_aarch64.h │ │ │ ├── jit_alpha.h │ │ │ ├── jit_arm.h │ │ │ ├── jit_hppa.h │ │ │ ├── jit_ia64.h │ │ │ ├── jit_mips.h │ │ │ ├── jit_ppc.h │ │ │ ├── jit_private.h │ │ │ ├── jit_riscv.h │ │ │ ├── jit_s390.h │ │ │ ├── jit_sparc.h │ │ │ └── jit_x86.h │ ├── lib │ │ ├── Makefile.am │ │ ├── jit_aarch64-cpu.c │ │ ├── jit_aarch64-fpu.c │ │ ├── jit_aarch64-sz.c │ │ ├── jit_aarch64.c │ │ ├── jit_alpha-cpu.c │ │ ├── jit_alpha-fpu.c │ │ ├── jit_alpha-sz.c │ │ ├── jit_alpha.c │ │ ├── jit_arm-cpu.c │ │ ├── jit_arm-swf.c │ │ ├── jit_arm-sz.c │ │ ├── jit_arm-vfp.c │ │ ├── jit_arm.c │ │ ├── jit_disasm.c │ │ ├── jit_hppa-cpu.c │ │ ├── jit_hppa-fpu.c │ │ ├── jit_hppa-sz.c │ │ ├── jit_hppa.c │ │ ├── jit_ia64-cpu.c │ │ ├── jit_ia64-fpu.c │ │ ├── jit_ia64-sz.c │ │ ├── jit_ia64.c │ │ ├── jit_memory.c │ │ ├── jit_mips-cpu.c │ │ ├── jit_mips-fpu.c │ │ ├── jit_mips-sz.c │ │ ├── jit_mips.c │ │ ├── jit_names.c │ │ ├── jit_note.c │ │ ├── jit_ppc-cpu.c │ │ ├── jit_ppc-fpu.c │ │ ├── jit_ppc-sz.c │ │ ├── jit_ppc.c │ │ ├── jit_print.c │ │ ├── jit_rewind.c │ │ ├── jit_riscv-cpu.c │ │ ├── jit_riscv-fpu.c │ │ ├── jit_riscv-sz.c │ │ ├── jit_riscv.c │ │ ├── jit_s390-cpu.c │ │ ├── jit_s390-fpu.c │ │ ├── jit_s390-sz.c │ │ ├── jit_s390.c │ │ ├── jit_size.c │ │ ├── jit_sparc-cpu.c │ │ ├── jit_sparc-fpu.c │ │ ├── jit_sparc-sz.c │ │ ├── jit_sparc.c │ │ ├── jit_x86-cpu.c │ │ ├── jit_x86-sse.c │ │ ├── jit_x86-sz.c │ │ ├── jit_x86-x87.c │ │ ├── jit_x86.c │ │ └── lightning.c │ ├── lightning.pc.in │ ├── m4 │ │ └── .gitkeep │ └── size.c ├── llvm_jit.cpp ├── llvm_jit.hpp ├── main.cpp ├── parallel.cpp ├── rsp.cpp ├── rsp.hpp ├── rsp │ ├── cp0.cpp │ ├── cp2.cpp │ ├── ls.cpp │ ├── pipeline.h │ ├── reciprocal.cpp │ ├── reciprocal.h │ ├── registers.md │ └── vfunctions.cpp ├── rsp_1.1.h ├── rsp_disasm.cpp ├── rsp_disasm.hpp ├── rsp_jit.cpp ├── rsp_jit.hpp ├── rsp_op.hpp ├── state.hpp └── win32 │ └── mman │ └── sys │ ├── .gitignore │ ├── .gitrepo │ ├── .vs │ └── mman │ │ └── v14 │ │ └── .suo │ ├── CMakeLists.txt │ ├── Makefile │ ├── README.md │ ├── UpgradeLog.htm │ ├── configure │ ├── mman-win32.pro │ ├── mman.c │ ├── mman.h │ ├── mman.sln │ ├── mman.vcxproj │ ├── mman.vcxproj.filters │ ├── mman.vcxproj.user │ └── test.c ├── mupen64plus-video-angrylion ├── Gfx #1.3.h ├── common.h ├── interface.c ├── msg.h ├── n64video.c ├── n64video.h ├── n64video │ ├── rdp.c │ ├── rdp │ │ ├── blender.c │ │ ├── combiner.c │ │ ├── coverage.c │ │ ├── dither.c │ │ ├── fbuffer.c │ │ ├── rasterizer.c │ │ ├── rdp.c │ │ ├── rdram.c │ │ ├── tcoord.c │ │ ├── tex.c │ │ ├── tmem.c │ │ └── zbuffer.c │ ├── vi.c │ └── vi │ │ ├── divot.c │ │ ├── fetch.c │ │ ├── gamma.c │ │ ├── lerp.c │ │ ├── restore.c │ │ ├── vi.c │ │ └── video.c ├── parallel_al.cpp ├── parallel_al.h ├── plugin.c ├── plugin.h ├── rdp.h ├── vdac.h └── version.h.in ├── mupen64plus-video-paraLLEl ├── .clang-format ├── CREDITS.txt ├── Gfx #1.3.h ├── format_all.sh ├── parallel.cpp ├── parallel.h ├── rdp.cpp ├── rdp.hpp ├── rdp │ ├── .clang-format │ ├── Makefile │ ├── common.hpp │ ├── format_all.sh │ ├── frontend.cpp │ ├── frontend.hpp │ ├── glsl │ │ ├── Makefile │ │ ├── blender.h │ │ ├── blit.16.inc │ │ ├── blit.32.inc │ │ ├── blit.8.inc │ │ ├── blit.comp │ │ ├── buffers.h │ │ ├── clip.h │ │ ├── combiner.comp │ │ ├── combiner.h │ │ ├── combiner.inc │ │ ├── coverage.h │ │ ├── depth.h │ │ ├── flags.h │ │ ├── noise.h │ │ ├── rasterizer.h │ │ ├── rdp.16.noz.inc │ │ ├── rdp.16.z.inc │ │ ├── rdp.32.noz.inc │ │ ├── rdp.32.z.inc │ │ ├── rdp.8.noz.inc │ │ ├── rdp.8.z.inc │ │ ├── rdp.color.depth.alias.16.inc │ │ ├── rdp.comp │ │ ├── structs.h │ │ ├── texture.comp │ │ ├── texture.inc │ │ ├── textures.h │ │ ├── tmem.comp │ │ ├── tmem.i8.inc │ │ ├── tmem.ia16.inc │ │ ├── tmem.ia8.inc │ │ ├── tmem.rgba16.inc │ │ ├── tmem.rgba32.inc │ │ ├── util.h │ │ ├── varying.comp │ │ └── varying.inc │ ├── main.cpp │ ├── rdp.cpp │ ├── rdp.hpp │ ├── rdp_dump.cpp │ ├── rdp_dump.hpp │ ├── stb │ │ ├── stb_image.h │ │ └── stb_image_write.h │ ├── tests │ │ ├── cycle1_triangle │ │ │ └── dump.rdp │ │ ├── fill_triangle │ │ │ ├── dump.rdp │ │ │ └── reference.png │ │ └── texture_triangle_32bpp │ │ │ ├── dump.rdp │ │ │ └── reference.png │ ├── tmem.cpp │ ├── tmem.hpp │ ├── vulkan.cpp │ ├── vulkan.hpp │ ├── vulkan_symbol_wrapper.cpp │ ├── vulkan_symbol_wrapper.h │ ├── vulkan_util.cpp │ └── vulkan_util.hpp ├── rdp_dump.c ├── rdp_dump.h ├── vi.cpp └── z64.h └── xxHash ├── xxhash.c └── xxhash.h /GLideN64/.gitignore: -------------------------------------------------------------------------------- 1 | backup/ 2 | Debug*/ 3 | Release*/ 4 | build*/ 5 | Roms/ 6 | *.ncb 7 | *.suo 8 | *.sdf 9 | *.user 10 | src/Revision.h 11 | /projects/msvc/.vs 12 | /projects/msvc/GLideN64.VC.VC.opendb 13 | /projects/msvc/GLideN64.VC.db 14 | /projects/msvc/GeneratedFiles 15 | .vs 16 | .vscode/ipch/* 17 | -------------------------------------------------------------------------------- /GLideN64/.gitrepo: -------------------------------------------------------------------------------- 1 | ; DO NOT EDIT (unless you know what you are doing) 2 | ; 3 | ; This subdirectory is a git "subrepo", and this file is maintained by the 4 | ; git-subrepo command. See https://github.com/git-commands/git-subrepo#readme 5 | ; 6 | [subrepo] 7 | remote = git@github.com:libretro/GLideN64.git 8 | branch = develop 9 | commit = 05908492340e59363030fe7dcd4a04c3b91eec1a 10 | parent = c5335f7c0b56c2c7fcb2d0768ce9970aa097931d 11 | method = rebase 12 | cmdver = 0.4.0 13 | -------------------------------------------------------------------------------- /GLideN64/README.md: -------------------------------------------------------------------------------- 1 | GLideN64 2 | ======== 3 | 4 | A new generation, open-source graphics plugin for N64 emulators. 5 | 6 | Windows latest build status for master branch: 7 | [![Build status](https://ci.appveyor.com/api/projects/status/vx18fie77cgq23i8/branch/master?svg=true)](https://ci.appveyor.com/project/gonetz/gliden64/branch/master) 8 | 9 | Linux and MacOsX latest build status for master branch: 10 | [![Build Status](https://travis-ci.org/gonetz/GLideN64.svg?branch=master)](https://travis-ci.org/gonetz/GLideN64) 11 | 12 | To get Continuous Integration (CI) builds for mupen64plus and zilmar-spec emulators for Windows: click the build status icon, then select "Artifacts". 13 | You will get a zip containing both builds. Choose the between the 32-bit and 64-bit version depending on your emulator version. 14 | If you want to download an earlier build, go to "History" and select the build you want. 15 | 16 | CI builds have the latest features and fixes, and are generally stable, but may introduce bugs and have incomplete translations. 17 | -------------------------------------------------------------------------------- /GLideN64/ini/GLideN64.ini: -------------------------------------------------------------------------------- 1 | [General] 2 | version=7 3 | 4 | [video] 5 | fullscreenWidth=640 6 | fullscreenHeight=480 7 | windowedWidth=640 8 | windowedHeight=480 9 | fullscreenRefresh=60 10 | multisampling=0 11 | 12 | [texture] 13 | maxAnisotropy=0 14 | bilinearMode=1 15 | maxBytes=524288000 16 | screenShotFormat=0 17 | 18 | [generalEmulation] 19 | enableFog=1 20 | enableNoise=1 21 | enableLOD=1 22 | enableHWLighting=0 23 | enableCustomSettings=1 24 | 25 | [frameBufferEmulation] 26 | enable=1 27 | copyToRDRAM=2 28 | copyDepthToRDRAM=0 29 | copyFromRDRAM=0 30 | detectCFB=0 31 | N64DepthCompare=0 32 | aspect=1 33 | 34 | [textureFilter] 35 | txFilterMode=0 36 | txEnhancementMode=0 37 | txFilterIgnoreBG=0 38 | txCacheSize=104857600 39 | txHiresEnable=0 40 | txHiresFullAlphaChannel=0 41 | txHresAltCRC=0 42 | txDump=0 43 | txForce16bpp=0 44 | txCacheCompression=1 45 | txSaveCache=1 46 | 47 | [font] 48 | name=arial.ttf 49 | size=18 50 | color=@Variant(\0\0\0\x43\x1\xff\xff\xb5\xb5\xe6\xe6\x1d\x1d\0\0) 51 | -------------------------------------------------------------------------------- /GLideN64/projects/msvc/GLideNUI.pro: -------------------------------------------------------------------------------- 1 | #------------------------------------------------- 2 | # 3 | # Project created by QtCreator 2015-01-26T21:59:49 4 | # 5 | #------------------------------------------------- 6 | 7 | QT += core gui 8 | QTPLUGIN += qico 9 | 10 | greaterThan(QT_MAJOR_VERSION, 4): QT += widgets 11 | 12 | TARGET = GLideNUI 13 | TEMPLATE = lib 14 | CONFIG += staticlib 15 | CONFIG += c++11 16 | 17 | VPATH += ./../../src/GLideNUI/ 18 | SOURCES += \ 19 | ConfigDialog.cpp \ 20 | GLideNUI.cpp \ 21 | FullscreenResolutions_windows.cpp \ 22 | Settings.cpp \ 23 | ScreenShot.cpp \ 24 | AboutDialog.cpp 25 | 26 | HEADERS += \ 27 | ConfigDialog.h \ 28 | GLideNUI.h \ 29 | FullscreenResolutions.h \ 30 | Settings.h \ 31 | AboutDialog.h 32 | 33 | RESOURCES += \ 34 | icon.qrc 35 | 36 | FORMS += \ 37 | configDialog.ui \ 38 | AboutDialog.ui 39 | 40 | TRANSLATIONS = gliden64_fr.ts \ 41 | gliden64_de.ts \ 42 | gliden64_it.ts \ 43 | gliden64_es.ts \ 44 | gliden64_pl.ts \ 45 | gliden64_pt_BR.ts \ 46 | gliden64_ja.ts 47 | 48 | DISTFILES += 49 | -------------------------------------------------------------------------------- /GLideN64/projects/msvc/lib/dbg/freetype253MT_D.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/paraLLeXT/41567a669252e7af3dcaf75616dc83ec0a11847f/GLideN64/projects/msvc/lib/dbg/freetype253MT_D.lib -------------------------------------------------------------------------------- /GLideN64/projects/msvc/lib/dbg/libpngd.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/paraLLeXT/41567a669252e7af3dcaf75616dc83ec0a11847f/GLideN64/projects/msvc/lib/dbg/libpngd.lib -------------------------------------------------------------------------------- /GLideN64/projects/msvc/lib/dbg/zlibd.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/paraLLeXT/41567a669252e7af3dcaf75616dc83ec0a11847f/GLideN64/projects/msvc/lib/dbg/zlibd.lib -------------------------------------------------------------------------------- /GLideN64/projects/msvc/lib/msvc12/dbg/freetype253MT_D.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/paraLLeXT/41567a669252e7af3dcaf75616dc83ec0a11847f/GLideN64/projects/msvc/lib/msvc12/dbg/freetype253MT_D.lib -------------------------------------------------------------------------------- /GLideN64/projects/msvc/lib/msvc12/dbg/libpngd.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/paraLLeXT/41567a669252e7af3dcaf75616dc83ec0a11847f/GLideN64/projects/msvc/lib/msvc12/dbg/libpngd.lib -------------------------------------------------------------------------------- /GLideN64/projects/msvc/lib/msvc12/dbg/zlibd.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/paraLLeXT/41567a669252e7af3dcaf75616dc83ec0a11847f/GLideN64/projects/msvc/lib/msvc12/dbg/zlibd.lib -------------------------------------------------------------------------------- /GLideN64/projects/msvc/lib/msvc12/rel/freetype253MT.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/paraLLeXT/41567a669252e7af3dcaf75616dc83ec0a11847f/GLideN64/projects/msvc/lib/msvc12/rel/freetype253MT.lib -------------------------------------------------------------------------------- /GLideN64/projects/msvc/lib/msvc12/rel/libpng.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/paraLLeXT/41567a669252e7af3dcaf75616dc83ec0a11847f/GLideN64/projects/msvc/lib/msvc12/rel/libpng.lib -------------------------------------------------------------------------------- /GLideN64/projects/msvc/lib/msvc12/rel/zlib.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/paraLLeXT/41567a669252e7af3dcaf75616dc83ec0a11847f/GLideN64/projects/msvc/lib/msvc12/rel/zlib.lib -------------------------------------------------------------------------------- /GLideN64/projects/msvc/lib/rel/freetype253MT.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/paraLLeXT/41567a669252e7af3dcaf75616dc83ec0a11847f/GLideN64/projects/msvc/lib/rel/freetype253MT.lib -------------------------------------------------------------------------------- /GLideN64/projects/msvc/lib/rel/libpng.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/paraLLeXT/41567a669252e7af3dcaf75616dc83ec0a11847f/GLideN64/projects/msvc/lib/rel/libpng.lib -------------------------------------------------------------------------------- /GLideN64/projects/msvc/lib/rel/zlib.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/paraLLeXT/41567a669252e7af3dcaf75616dc83ec0a11847f/GLideN64/projects/msvc/lib/rel/zlib.lib -------------------------------------------------------------------------------- /GLideN64/projects/msvc/lib/x64/dbg/freetype253MT_D.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/paraLLeXT/41567a669252e7af3dcaf75616dc83ec0a11847f/GLideN64/projects/msvc/lib/x64/dbg/freetype253MT_D.lib -------------------------------------------------------------------------------- /GLideN64/projects/msvc/lib/x64/dbg/libpngd.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/paraLLeXT/41567a669252e7af3dcaf75616dc83ec0a11847f/GLideN64/projects/msvc/lib/x64/dbg/libpngd.lib -------------------------------------------------------------------------------- /GLideN64/projects/msvc/lib/x64/dbg/zlibd.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/paraLLeXT/41567a669252e7af3dcaf75616dc83ec0a11847f/GLideN64/projects/msvc/lib/x64/dbg/zlibd.lib -------------------------------------------------------------------------------- /GLideN64/projects/msvc/lib/x64/rel/freetype253MT.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/paraLLeXT/41567a669252e7af3dcaf75616dc83ec0a11847f/GLideN64/projects/msvc/lib/x64/rel/freetype253MT.lib -------------------------------------------------------------------------------- /GLideN64/projects/msvc/lib/x64/rel/libpng.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/paraLLeXT/41567a669252e7af3dcaf75616dc83ec0a11847f/GLideN64/projects/msvc/lib/x64/rel/libpng.lib -------------------------------------------------------------------------------- /GLideN64/projects/msvc/lib/x64/rel/zlib.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/paraLLeXT/41567a669252e7af3dcaf75616dc83ec0a11847f/GLideN64/projects/msvc/lib/x64/rel/zlib.lib -------------------------------------------------------------------------------- /GLideN64/projects/msvc/osal.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {93995380-89BD-4b04-88EB-625FBE52EBFB} 10 | h;hh;hpp;hxx;hm;inl;inc;xsd 11 | 12 | 13 | 14 | 15 | Header Files 16 | 17 | 18 | 19 | 20 | Source Files 21 | 22 | 23 | -------------------------------------------------------------------------------- /GLideN64/src/BufferCopy/ColorBufferToRDRAMStub.h: -------------------------------------------------------------------------------- 1 | #include "ColorBufferToRDRAM.h" 2 | 3 | class ColorBufferToRDRAMStub : public ColorBufferToRDRAM 4 | { 5 | public: 6 | ColorBufferToRDRAMStub() : ColorBufferToRDRAM() {} 7 | ~ColorBufferToRDRAMStub() {}; 8 | 9 | private: 10 | void _init() override {} 11 | void _initBuffers() override {} 12 | void _destroyBuffers(void) override {} 13 | bool _readPixels(GLint _x0, GLint _y0, GLsizei _width, GLsizei _height, u32 _size, bool _sync) override {} 14 | void _cleanUp() override {} 15 | }; 16 | -------------------------------------------------------------------------------- /GLideN64/src/BufferCopy/DepthBufferToRDRAM.h: -------------------------------------------------------------------------------- 1 | #ifndef DepthBufferToRDRAM_H 2 | #define DepthBufferToRDRAM_H 3 | 4 | #include 5 | #include 6 | 7 | namespace graphics { 8 | class PixelReadBuffer; 9 | } 10 | 11 | struct CachedTexture; 12 | struct FrameBuffer; 13 | 14 | class DepthBufferToRDRAM 15 | { 16 | public: 17 | void init(); 18 | void destroy(); 19 | 20 | bool copyToRDRAM(u32 _address); 21 | bool copyChunkToRDRAM(u32 _startAddress); 22 | 23 | static DepthBufferToRDRAM & get(); 24 | 25 | private: 26 | DepthBufferToRDRAM(); 27 | ~DepthBufferToRDRAM(); 28 | 29 | bool _prepareCopy(u32& _startAddress, bool _copyChunk); 30 | bool _copy(u32 _startAddress, u32 _endAddress); 31 | 32 | // Convert pixel from video memory to N64 depth buffer format. 33 | static u16 _FloatToUInt16(f32 _z); 34 | 35 | graphics::ObjectHandle m_FBO; 36 | std::unique_ptr m_pbuf; 37 | u32 m_frameCount; 38 | CachedTexture * m_pColorTexture; 39 | CachedTexture * m_pDepthTexture; 40 | FrameBuffer * m_pCurFrameBuffer; 41 | }; 42 | 43 | #endif // DepthBufferToRDRAM_H 44 | -------------------------------------------------------------------------------- /GLideN64/src/CRC.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "Types.h" 3 | 4 | void CRC_Init(); 5 | 6 | u32 CRC_Calculate_Strict( u32 crc, const void *buffer, u32 count ); 7 | u32 CRC_Calculate( u32 crc, const void *buffer, u32 count ); 8 | u32 CRC_CalculatePalette( u32 crc, const void *buffer, u32 count ); 9 | -------------------------------------------------------------------------------- /GLideN64/src/CombinerKey.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #include "gDP.h" 4 | 5 | class CombinerKey { 6 | public: 7 | CombinerKey() { 8 | m_key.mux = 0; 9 | } 10 | explicit CombinerKey(u64 _mux, bool _setModeBits = true); 11 | CombinerKey(const CombinerKey & _other); 12 | 13 | void operator=(u64 _mux); 14 | void operator=(const CombinerKey & _other); 15 | 16 | bool operator==(const CombinerKey & _other) const; 17 | bool operator<(const CombinerKey & _other) const; 18 | 19 | bool isRectKey() const; 20 | 21 | u32 getCycleType() const; 22 | 23 | u32 getBilerp() const; 24 | 25 | u64 getMux() const { return m_key.mux; } 26 | 27 | void read(std::istream & _is); 28 | 29 | static const CombinerKey & getEmpty(); 30 | 31 | private: 32 | gDPCombine m_key; 33 | }; 34 | -------------------------------------------------------------------------------- /GLideN64/src/DepthBufferRender/ClipPolygon.h: -------------------------------------------------------------------------------- 1 | #ifndef CLIP_POLYGON_H 2 | #define CLIP_POLYGON_H 3 | 4 | #define VISIBLE 0 5 | #define LEFT 1 6 | #define RIGHT 2 7 | #define TOP 4 8 | #define BOT 8 9 | 10 | struct vertexclip 11 | { 12 | float x,y,z; 13 | int visible; 14 | }; 15 | 16 | /* 17 | * vbp is a pointer to a vertex array. The first 3 vertices in that 18 | * array is our source vertices. The rest of the array will be used 19 | * to hold new vertices created during clipping. 20 | * 21 | * you can then access the new vertices using the *final variable 22 | * 23 | * function returns the number of vertices in the resulting polygon 24 | */ 25 | int ClipPolygon(vertexclip *** final, vertexclip * vbp, int numVertices); 26 | 27 | #endif // CLIP_POLYGON_H 28 | -------------------------------------------------------------------------------- /GLideN64/src/DepthBufferRender/DepthBufferRender.h: -------------------------------------------------------------------------------- 1 | //**************************************************************** 2 | // 3 | // Software rendering to N64 depth buffer 4 | // Created by Gonetz, Dec 2004 5 | // 6 | //**************************************************************** 7 | 8 | #ifndef DEPTH_BUFFER_RENDER_H 9 | #define DEPTH_BUFFER_RENDER_H 10 | 11 | struct vertexi 12 | { 13 | int x, y; // Screen position in 16:16 bit fixed point 14 | int z; // z value in 16:16 bit fixed point 15 | }; 16 | 17 | void Rasterize(vertexi * vtx, int vertices, int dzdx); 18 | 19 | #endif //DEPTH_BUFFER_RENDER_H 20 | -------------------------------------------------------------------------------- /GLideN64/src/DisplayLoadProgress.h: -------------------------------------------------------------------------------- 1 | #ifndef DISPLAYLOADPROGRESS_H 2 | #define DISPLAYLOADPROGRESS_H 3 | 4 | void displayLoadProgress(const wchar_t *format, ...); 5 | 6 | #endif // DISPLAYLOADPROGRESS_H 7 | -------------------------------------------------------------------------------- /GLideN64/src/FrameBufferEmulationIssues.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/paraLLeXT/41567a669252e7af3dcaf75616dc83ec0a11847f/GLideN64/src/FrameBufferEmulationIssues.txt -------------------------------------------------------------------------------- /GLideN64/src/GLideN64.cpp: -------------------------------------------------------------------------------- 1 | char pluginName[] = "GLideN64"; 2 | wchar_t pluginNameW[] = L"GLideN64"; 3 | void (*CheckInterrupts)( void ); 4 | -------------------------------------------------------------------------------- /GLideN64/src/GLideN64.h: -------------------------------------------------------------------------------- 1 | #ifndef GLIDEN64_H 2 | #define GLIDEN64_H 3 | 4 | extern char pluginName[]; 5 | extern wchar_t pluginNameW[]; 6 | extern void (*CheckInterrupts)( void ); 7 | 8 | #endif // GLIDEN64_H 9 | -------------------------------------------------------------------------------- /GLideN64/src/GLideNHQ/TextureFilters_xbrz.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/paraLLeXT/41567a669252e7af3dcaf75616dc83ec0a11847f/GLideN64/src/GLideNHQ/TextureFilters_xbrz.cpp -------------------------------------------------------------------------------- /GLideN64/src/GLideNHQ/bldno.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | int main (void) 6 | { 7 | struct tm locTime; 8 | time_t sysTime; 9 | char *build; 10 | 11 | time(&sysTime); 12 | locTime = *localtime(&sysTime); 13 | 14 | if ((build = getenv("BUILD_NUMBER")) != NULL) { 15 | printf("#define BUILD_NUMBER %s\n", build); 16 | printf("#define BUILD_NUMBER_STR \"%s\"\n", build); 17 | } else { 18 | unsigned short magic; 19 | magic = (locTime.tm_yday << 7) | 20 | (locTime.tm_hour << 2) | 21 | (locTime.tm_min / 15); 22 | printf("#define BUILD_NUMBER %d\n", magic); 23 | printf("#define BUILD_NUMBER_STR \"%d\"\n", magic); 24 | } 25 | 26 | return 0; 27 | } 28 | -------------------------------------------------------------------------------- /GLideN64/src/GLideNHQ/bldno.h: -------------------------------------------------------------------------------- 1 | #define BUILD_NUMBER 13480 2 | #define BUILD_NUMBER_STR "13480" 3 | -------------------------------------------------------------------------------- /GLideN64/src/GLideNHQ/lib/libdxtn.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/paraLLeXT/41567a669252e7af3dcaf75616dc83ec0a11847f/GLideN64/src/GLideNHQ/lib/libdxtn.a -------------------------------------------------------------------------------- /GLideN64/src/GLideNHQ/lib/libpng.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/paraLLeXT/41567a669252e7af3dcaf75616dc83ec0a11847f/GLideN64/src/GLideNHQ/lib/libpng.a -------------------------------------------------------------------------------- /GLideN64/src/GLideNHQ/lib/libz.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/paraLLeXT/41567a669252e7af3dcaf75616dc83ec0a11847f/GLideN64/src/GLideNHQ/lib/libz.a -------------------------------------------------------------------------------- /GLideN64/src/GLideNHQ/test/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 2.6) 2 | 3 | project( test_hq ) 4 | 5 | # Build type 6 | 7 | if( NOT CMAKE_BUILD_TYPE) 8 | set( CMAKE_BUILD_TYPE Release) 9 | endif( NOT CMAKE_BUILD_TYPE) 10 | 11 | if( CMAKE_BUILD_TYPE STREQUAL "Debug") 12 | set( CMAKE_BUILD_TYPE Debug) 13 | set( DEBUG_BUILD TRUE) 14 | add_definitions( 15 | -DDEBUG 16 | ) 17 | endif( CMAKE_BUILD_TYPE STREQUAL "Debug") 18 | 19 | add_definitions( 20 | -DGHQCHK=1 21 | -DTXFILTER_DLL=1 22 | ) 23 | 24 | if(WIN32) 25 | add_definitions( 26 | -DWIN32 27 | -DOS_WINDOWS 28 | ) 29 | endif(WIN32) 30 | 31 | #SET( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${GCC_CPP11_COMPILE_FLAGS}" ) 32 | 33 | add_executable( test_hq test.cpp ../Ext_TxFilter.cpp ) 34 | -------------------------------------------------------------------------------- /GLideN64/src/GLideNUI/AboutDialog.cpp: -------------------------------------------------------------------------------- 1 | #include "AboutDialog.h" 2 | #include "ui_AboutDialog.h" 3 | #include 4 | #include 5 | 6 | AboutDialog::AboutDialog(QWidget *parent, Qt::WindowFlags f) : 7 | QDialog(parent, f), 8 | ui(new Ui::AboutDialog) 9 | { 10 | ui->setupUi(this); 11 | } 12 | 13 | AboutDialog::~AboutDialog() 14 | { 15 | delete ui; 16 | } 17 | 18 | void AboutDialog::_init() 19 | { 20 | ui->buttonBox->button(QDialogButtonBox::Close)->setText(tr("Close")); 21 | } 22 | -------------------------------------------------------------------------------- /GLideN64/src/GLideNUI/AboutDialog.h: -------------------------------------------------------------------------------- 1 | #ifndef ABOUTDIALOG_H 2 | #define ABOUTDIALOG_H 3 | 4 | #include 5 | 6 | namespace Ui { 7 | class AboutDialog; 8 | } 9 | 10 | class AboutDialog : public QDialog 11 | { 12 | Q_OBJECT 13 | 14 | public: 15 | explicit AboutDialog(QWidget *parent = Q_NULLPTR, Qt::WindowFlags f = Qt::WindowFlags()); 16 | ~AboutDialog(); 17 | 18 | private: 19 | void _init(); 20 | Ui::AboutDialog *ui; 21 | }; 22 | 23 | #endif // ABOUTDIALOG_H 24 | -------------------------------------------------------------------------------- /GLideN64/src/GLideNUI/BottomLeft.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/paraLLeXT/41567a669252e7af3dcaf75616dc83ec0a11847f/GLideN64/src/GLideNUI/BottomLeft.ico -------------------------------------------------------------------------------- /GLideN64/src/GLideNUI/BottomRight.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/paraLLeXT/41567a669252e7af3dcaf75616dc83ec0a11847f/GLideN64/src/GLideNUI/BottomRight.ico -------------------------------------------------------------------------------- /GLideN64/src/GLideNUI/Down.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/paraLLeXT/41567a669252e7af3dcaf75616dc83ec0a11847f/GLideN64/src/GLideNUI/Down.ico -------------------------------------------------------------------------------- /GLideN64/src/GLideNUI/FullscreenResolutions.h: -------------------------------------------------------------------------------- 1 | #ifndef FULLSCREENRESOLUTIONS_H 2 | #define FULLSCREENRESOLUTIONS_H 3 | 4 | #include "ConfigDialog.h" 5 | 6 | void fillFullscreenResolutionsList(QStringList & _listResolutions, int & _resolutionIdx, QStringList & _listRefreshRates, int & _rateIdx); 7 | 8 | void fillFullscreenRefreshRateList(int _resolutionIdx, QStringList & _listRefreshRates, int & _rateIdx); 9 | 10 | void getFullscreenResolutions(int _idx, unsigned int & _width, unsigned int & _height); 11 | void getFullscreenRefreshRate(int _idx, unsigned int & _rate); 12 | 13 | #endif // FULLSCREENRESOLUTIONS_H 14 | 15 | -------------------------------------------------------------------------------- /GLideN64/src/GLideNUI/GLideNUI.h: -------------------------------------------------------------------------------- 1 | #ifndef GLIDENUII_H 2 | #define GLIDENUII_H 3 | 4 | #if defined(__cplusplus) 5 | extern "C" { 6 | #endif 7 | 8 | #ifdef OS_WINDOWS 9 | #define EXPORT __declspec(dllexport) 10 | #define CALL __cdecl 11 | #else 12 | #define EXPORT __attribute__((visibility("default"))) 13 | #define CALL 14 | #endif 15 | 16 | EXPORT bool CALL RunConfig(const wchar_t * _strFileName, const char * _romName); 17 | EXPORT int CALL RunAbout(const wchar_t * _strFileName); 18 | EXPORT void CALL LoadConfig(const wchar_t * _strFileName); 19 | EXPORT void CALL LoadCustomRomSettings(const wchar_t * _strFileName, const char * _romName); 20 | EXPORT void CALL SaveScreenshot(const wchar_t * _folder, const char * _name, int _width, int _height, const unsigned char * _data); 21 | 22 | #if defined(__cplusplus) 23 | } 24 | #endif 25 | 26 | #endif // GLIDENUII_H 27 | -------------------------------------------------------------------------------- /GLideN64/src/GLideNUI/GLideNUI.pro: -------------------------------------------------------------------------------- 1 | #------------------------------------------------- 2 | # 3 | # Project created by QtCreator 2015-01-26T21:59:49 4 | # 5 | #------------------------------------------------- 6 | 7 | QT += core gui 8 | QTPLUGIN += qico 9 | 10 | greaterThan(QT_MAJOR_VERSION, 4): QT += widgets 11 | 12 | TARGET = GLideNUI 13 | TEMPLATE = lib 14 | CONFIG += staticlib 15 | CONFIG += c++11 16 | 17 | SOURCES += \ 18 | ConfigDialog.cpp \ 19 | GLideNUI.cpp \ 20 | FullscreenResolutions_windows.cpp \ 21 | Settings.cpp \ 22 | ScreenShot.cpp \ 23 | AboutDialog.cpp 24 | 25 | HEADERS += \ 26 | ConfigDialog.h \ 27 | GLideNUI.h \ 28 | FullscreenResolutions.h \ 29 | Settings.h \ 30 | AboutDialog.h 31 | 32 | RESOURCES += \ 33 | icon.qrc 34 | 35 | FORMS += \ 36 | configDialog.ui \ 37 | AboutDialog.ui 38 | 39 | TRANSLATIONS = gliden64_fr.ts \ 40 | gliden64_de.ts \ 41 | gliden64_it.ts \ 42 | gliden64_es.ts \ 43 | gliden64_pl.ts \ 44 | gliden64_pt_BR.ts \ 45 | gliden64_ja.ts 46 | 47 | DISTFILES += 48 | -------------------------------------------------------------------------------- /GLideN64/src/GLideNUI/Icon-Original.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/paraLLeXT/41567a669252e7af3dcaf75616dc83ec0a11847f/GLideN64/src/GLideNUI/Icon-Original.ico -------------------------------------------------------------------------------- /GLideN64/src/GLideNUI/Icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/paraLLeXT/41567a669252e7af3dcaf75616dc83ec0a11847f/GLideN64/src/GLideNUI/Icon.ico -------------------------------------------------------------------------------- /GLideN64/src/GLideNUI/Info.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/paraLLeXT/41567a669252e7af3dcaf75616dc83ec0a11847f/GLideN64/src/GLideNUI/Info.ico -------------------------------------------------------------------------------- /GLideN64/src/GLideNUI/Left.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/paraLLeXT/41567a669252e7af3dcaf75616dc83ec0a11847f/GLideN64/src/GLideNUI/Left.ico -------------------------------------------------------------------------------- /GLideN64/src/GLideNUI/Right.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/paraLLeXT/41567a669252e7af3dcaf75616dc83ec0a11847f/GLideN64/src/GLideNUI/Right.ico -------------------------------------------------------------------------------- /GLideN64/src/GLideNUI/Settings.h: -------------------------------------------------------------------------------- 1 | #ifndef SETTINGS_H 2 | #define SETTINGS_H 3 | 4 | void loadSettings(const QString & _strIniFolder); 5 | void writeSettings(const QString & _strIniFolder); 6 | void loadCustomRomSettings(const QString & _strIniFolder, const char * _strRomName); 7 | void saveCustomRomSettings(const QString & _strIniFolder, const char * _strRomName); 8 | QString getTranslationFile(); 9 | QStringList getProfiles(const QString & _strIniFolder); 10 | QString getCurrentProfile(const QString & _strIniFolder); 11 | void changeProfile(const QString & _strIniFolder, const QString & _strProfile); 12 | void addProfile(const QString & _strIniFolder, const QString & _strProfile); 13 | void removeProfile(const QString & _strIniFolder, const QString & _strProfile); 14 | 15 | #endif // SETTINGS_H 16 | 17 | -------------------------------------------------------------------------------- /GLideN64/src/GLideNUI/TopLeft.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/paraLLeXT/41567a669252e7af3dcaf75616dc83ec0a11847f/GLideN64/src/GLideNUI/TopLeft.ico -------------------------------------------------------------------------------- /GLideN64/src/GLideNUI/TopRight.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/paraLLeXT/41567a669252e7af3dcaf75616dc83ec0a11847f/GLideN64/src/GLideNUI/TopRight.ico -------------------------------------------------------------------------------- /GLideN64/src/GLideNUI/Up.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/paraLLeXT/41567a669252e7af3dcaf75616dc83ec0a11847f/GLideN64/src/GLideNUI/Up.ico -------------------------------------------------------------------------------- /GLideN64/src/GLideNUI/Warning.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/paraLLeXT/41567a669252e7af3dcaf75616dc83ec0a11847f/GLideN64/src/GLideNUI/Warning.ico -------------------------------------------------------------------------------- /GLideN64/src/GLideNUI/icon.qrc: -------------------------------------------------------------------------------- 1 | 2 | 3 | Icon.ico 4 | Warning.ico 5 | Info.ico 6 | Up.ico 7 | Right.ico 8 | Down.ico 9 | Left.ico 10 | TopLeft.ico 11 | TopRight.ico 12 | BottomRight.ico 13 | BottomLeft.ico 14 | 15 | 16 | -------------------------------------------------------------------------------- /GLideN64/src/Graphics/CombinerProgram.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include "CombinerProgram.h" 3 | #include 4 | 5 | namespace graphics { 6 | 7 | u32 CombinerProgram::getShaderCombinerOptionsBits() 8 | { 9 | // WARNING: Shader Storage format version must be increased after any change in this function. 10 | std::vector vecOptions; 11 | vecOptions.push_back(config.video.multisampling > 0 ? 1 : 0); 12 | vecOptions.push_back(config.texture.bilinearMode); 13 | vecOptions.push_back(config.texture.enableHalosRemoval); 14 | vecOptions.push_back(config.generalEmulation.enableHWLighting); 15 | vecOptions.push_back(config.generalEmulation.enableNoise); 16 | vecOptions.push_back(config.generalEmulation.enableLOD); 17 | vecOptions.push_back(config.frameBufferEmulation.N64DepthCompare); 18 | vecOptions.push_back(config.generalEmulation.enableLegacyBlending); 19 | vecOptions.push_back(config.generalEmulation.enableFragmentDepthWrite); 20 | u32 optionsSet = 0; 21 | for (u32 i = 0; i < vecOptions.size(); ++i) 22 | optionsSet |= vecOptions[i] << i; 23 | return optionsSet; 24 | } 25 | 26 | } 27 | -------------------------------------------------------------------------------- /GLideN64/src/Graphics/CombinerProgram.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #include 4 | #include "CombinerKey.h" 5 | 6 | namespace graphics { 7 | 8 | class CombinerProgram 9 | { 10 | public: 11 | virtual ~CombinerProgram() {} 12 | virtual void activate() = 0; 13 | virtual void update(bool _force) = 0; 14 | 15 | virtual const CombinerKey & getKey() const = 0; 16 | 17 | virtual bool usesTexture() const = 0; 18 | virtual bool usesTile(u32 _t) const = 0; 19 | virtual bool usesShade() const = 0; 20 | virtual bool usesLOD() const = 0; 21 | virtual bool usesHwLighting() const = 0; 22 | 23 | virtual bool getBinaryForm(std::vector & _buffer) = 0; 24 | 25 | static u32 getShaderCombinerOptionsBits(); 26 | }; 27 | 28 | typedef std::map Combiners; 29 | } 30 | -------------------------------------------------------------------------------- /GLideN64/src/Graphics/ObjectHandle.cpp: -------------------------------------------------------------------------------- 1 | #include "ObjectHandle.h" 2 | 3 | namespace graphics { 4 | 5 | ObjectHandle ObjectHandle::null; 6 | ObjectHandle ObjectHandle::defaultFramebuffer; 7 | 8 | } 9 | -------------------------------------------------------------------------------- /GLideN64/src/Graphics/ObjectHandle.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | 4 | namespace graphics { 5 | 6 | class ObjectHandle 7 | { 8 | public: 9 | ObjectHandle() : m_name(0) {} 10 | explicit ObjectHandle(u32 _name) : m_name(_name) {} 11 | explicit operator u32() const { return m_name; } 12 | bool operator==(const ObjectHandle & _other) const { return m_name == _other.m_name; } 13 | bool operator!=(const ObjectHandle & _other) const { return m_name != _other.m_name; } 14 | bool operator<(const ObjectHandle & _other) const { return m_name < _other.m_name; } 15 | 16 | bool isNotNull() const { return m_name != 0; } 17 | 18 | void reset() { m_name = 0; } 19 | 20 | static ObjectHandle null; 21 | static ObjectHandle defaultFramebuffer; 22 | private: 23 | u32 m_name; 24 | }; 25 | 26 | } 27 | -------------------------------------------------------------------------------- /GLideN64/src/Graphics/OpenGLContext/GLSL/glsl_CombinerInputs.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | 4 | namespace glsl { 5 | 6 | class CombinerInputs 7 | { 8 | public: 9 | CombinerInputs() : m_inputs(0) {} 10 | explicit CombinerInputs(int _inputs) : m_inputs(_inputs) {} 11 | CombinerInputs(const CombinerInputs & _other) : m_inputs(_other.m_inputs) {} 12 | 13 | explicit operator int() { return m_inputs; } 14 | 15 | bool usesTile(u32 _t) const; 16 | 17 | bool usesTexture() const; 18 | 19 | bool usesLOD() const; 20 | 21 | bool usesNoise() const; 22 | 23 | bool usesShade() const; 24 | 25 | bool usesShadeColor() const; 26 | 27 | bool usesHwLighting() const; 28 | 29 | void addInput(int _input); 30 | 31 | void operator+=(const CombinerInputs & _other); 32 | 33 | private: 34 | int m_inputs; 35 | }; 36 | 37 | } 38 | -------------------------------------------------------------------------------- /GLideN64/src/Graphics/OpenGLContext/GLSL/glsl_CombinerProgramUniformFactory.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #include "glsl_CombinerProgramImpl.h" 4 | 5 | namespace glsl { 6 | 7 | class CombinerProgramUniformFactory 8 | { 9 | public: 10 | CombinerProgramUniformFactory(const opengl::GLInfo & _glInfo); 11 | 12 | void buildUniforms(GLuint _program, 13 | const CombinerInputs & _inputs, 14 | const CombinerKey & _key, 15 | UniformGroups & _uniforms); 16 | 17 | private: 18 | const opengl::GLInfo & m_glInfo; 19 | }; 20 | 21 | } 22 | -------------------------------------------------------------------------------- /GLideN64/src/Graphics/OpenGLContext/GLSL/glsl_FXAA.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "glsl_ShaderPart.h" 3 | #include 4 | 5 | namespace glsl { 6 | 7 | class FXAAVertexShader : public ShaderPart 8 | { 9 | public: 10 | FXAAVertexShader(const opengl::GLInfo & _glinfo); 11 | }; 12 | 13 | class FXAAFragmentShader : public ShaderPart 14 | { 15 | public: 16 | FXAAFragmentShader(const opengl::GLInfo & _glinfo); 17 | }; 18 | } -------------------------------------------------------------------------------- /GLideN64/src/Graphics/OpenGLContext/GLSL/glsl_ShaderPart.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #include 4 | 5 | namespace glsl { 6 | 7 | class ShaderPart 8 | { 9 | public: 10 | virtual void write(std::stringstream & shader) const 11 | { 12 | shader << m_part; 13 | } 14 | 15 | protected: 16 | std::string m_part; 17 | }; 18 | 19 | } 20 | -------------------------------------------------------------------------------- /GLideN64/src/Graphics/OpenGLContext/GLSL/glsl_ShaderStorage.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | 4 | namespace opengl { 5 | class CachedUseProgram; 6 | } 7 | 8 | namespace glsl { 9 | 10 | class ShaderStorage 11 | { 12 | public: 13 | ShaderStorage(const opengl::GLInfo & _glinfo, opengl::CachedUseProgram * _useProgram); 14 | 15 | bool saveShadersStorage(const graphics::Combiners & _combiners) const; 16 | 17 | bool loadShadersStorage(graphics::Combiners & _combiners); 18 | 19 | private: 20 | bool _saveCombinerKeys(const graphics::Combiners & _combiners) const; 21 | bool _loadFromCombinerKeys(graphics::Combiners & _combiners); 22 | 23 | const u32 m_formatVersion = 0x29U; 24 | const u32 m_keysFormatVersion = 0x04; 25 | const opengl::GLInfo & m_glinfo; 26 | opengl::CachedUseProgram * m_useProgram; 27 | }; 28 | 29 | } 30 | -------------------------------------------------------------------------------- /GLideN64/src/Graphics/OpenGLContext/GLSL/glsl_Utils.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #include 4 | #include 5 | 6 | namespace glsl { 7 | 8 | struct Utils { 9 | static void locateAttributes(GLuint _program, bool _rect, bool _textures); 10 | static bool checkShaderCompileStatus(GLuint obj); 11 | static bool checkProgramLinkStatus(GLuint obj); 12 | static void logErrorShader(GLenum _shaderType, const std::string & _strShader); 13 | static GLuint createRectShaderProgram(const char * _strVertex, const char * _strFragment); 14 | 15 | template 16 | static std::string to_string(T value) 17 | { 18 | #ifdef OS_ANDROID 19 | std::ostringstream os ; 20 | os << value ; 21 | return os.str() ; 22 | #else 23 | return std::to_string(value); 24 | #endif 25 | } 26 | }; 27 | } 28 | -------------------------------------------------------------------------------- /GLideN64/src/Graphics/OpenGLContext/GraphicBuffer/PrivateApi/libhardware.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include "libhardware.h" 4 | #include "Log.h" 5 | 6 | typedef int (*hw_get_moduleProto)(const char *id, const struct hw_module_t **module); 7 | 8 | static hw_get_moduleProto hw_get_moduleSym = 0; 9 | 10 | bool libhardware_dl() 11 | { 12 | if(hw_get_moduleSym) 13 | return true; 14 | void *libhardware = dlopen("libhardware.so", RTLD_LAZY); 15 | if(!libhardware) 16 | { 17 | LOG(LOG_ERROR, "libhardware not found"); 18 | return false; 19 | } 20 | hw_get_moduleSym = (hw_get_moduleProto)dlsym(libhardware, "hw_get_module"); 21 | if(!hw_get_moduleSym) 22 | { 23 | LOG(LOG_ERROR, "missing libhardware functions"); 24 | dlclose(libhardware); 25 | hw_get_moduleSym = 0; 26 | return false; 27 | } 28 | LOG(LOG_ERROR, "libhardware symbols loaded"); 29 | return true; 30 | } 31 | 32 | int hw_get_module(const char *id, const struct hw_module_t **module) 33 | { 34 | assert(hw_get_moduleSym); 35 | return hw_get_moduleSym(id, module); 36 | } 37 | -------------------------------------------------------------------------------- /GLideN64/src/Graphics/OpenGLContext/GraphicBuffer/PublicApi/check.h: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * You can read more about these macros on chromium.org. 4 | * Go to the direct link - https://www.chromium.org/developers/coding-style#TOC-CHECK-DCHECK-and-NOTREACHED- 5 | * 6 | * ... other source files should be here in this repo or folder or w/e 7 | * 8 | */ 9 | 10 | #ifndef CLIB_CHECK_H 11 | #define CLIB_CHECK_H 12 | 13 | // thank you brother tj & stephen (https://github.com/clibs/unlikely) 14 | #if defined(__GNUC__) && (__GNUC__ > 2) && defined(__OPTIMIZE__) 15 | # define likely(expr) (__builtin_expect(!!(expr), 1)) 16 | # define unlikely(expr) (__builtin_expect(!!(expr), 0)) 17 | #else 18 | # define likely(expr) (1 == !!(expr)) 19 | # define unlikely(expr) (0 == !!(expr)) 20 | #endif 21 | 22 | // overload if you want your own abort fn - w/e 23 | #ifndef CHECK_ABORT_FUNCTION 24 | // need that prototype def 25 | # include 26 | # define CHECK_ABORT_FUNCTION abort 27 | #endif 28 | 29 | // check and bail if nope 30 | #ifndef CHECK 31 | # define CHECK(expr) if (!likely(expr)) { CHECK_ABORT_FUNCTION(); } 32 | #endif 33 | 34 | #endif 35 | -------------------------------------------------------------------------------- /GLideN64/src/Graphics/OpenGLContext/GraphicBuffer/PublicApi/dcheck.h: -------------------------------------------------------------------------------- 1 | #ifndef CLIB_DCHECK_H 2 | #define CLIB_DCHECK_H 3 | 4 | #include "check.h" 5 | 6 | // check and bail if nope. however, this only works if `-D DCHECK_IS_ON` 7 | // or equivalent is defined 8 | #ifdef DCHECK_IS_ON 9 | # define DCHECK(...) CHECK(__VA_ARGS__); 10 | #else 11 | # define DCHECK(expr) ((void) expr); 12 | #endif 13 | 14 | #endif 15 | -------------------------------------------------------------------------------- /GLideN64/src/Graphics/OpenGLContext/ThreadedOpenGl/opengl_ObjectPool.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | 6 | 7 | namespace opengl { 8 | 9 | class PoolObject { 10 | public: 11 | 12 | PoolObject(); 13 | 14 | bool isInUse(); 15 | void setInUse(bool _inUse); 16 | 17 | int getPoolId(); 18 | 19 | void setPoolId(int _poolId); 20 | 21 | int getObjectId(); 22 | 23 | void setObjectId(int _objectId); 24 | private: 25 | 26 | bool m_inUse; 27 | int m_poolId; 28 | int m_objectId; 29 | }; 30 | 31 | class OpenGlCommandPool 32 | { 33 | public: 34 | static OpenGlCommandPool& get(); 35 | 36 | int getNextAvailablePool(); 37 | 38 | std::shared_ptr getAvailableObject(int _poolId); 39 | 40 | void addObjectToPool(int _poolId, std::shared_ptr _object); 41 | 42 | private: 43 | std::vector>> m_objectPool; 44 | std::vector m_objectPoolIndex; 45 | }; 46 | } 47 | -------------------------------------------------------------------------------- /GLideN64/src/Graphics/OpenGLContext/opengl_Attributes.cpp: -------------------------------------------------------------------------------- 1 | #include "opengl_Attributes.h" 2 | 3 | namespace opengl { 4 | 5 | namespace triangleAttrib { 6 | const GLuint position = 0U; 7 | const GLuint color = 1U; 8 | const GLuint texcoord = 2U; 9 | const GLuint numlights = 3U; 10 | const GLuint modify = 4U; 11 | } 12 | 13 | // Rect attributes 14 | namespace rectAttrib { 15 | const GLuint position = 5U; 16 | const GLuint texcoord0 = 6U; 17 | const GLuint texcoord1 = 7U; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /GLideN64/src/Graphics/OpenGLContext/opengl_Attributes.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "GLFunctions.h" 3 | 4 | namespace opengl { 5 | 6 | // Triangle attributes 7 | namespace triangleAttrib { 8 | extern const GLuint position; 9 | extern const GLuint color; 10 | extern const GLuint texcoord; 11 | extern const GLuint numlights; 12 | extern const GLuint modify; 13 | } 14 | 15 | // Rect attributes 16 | namespace rectAttrib { 17 | extern const GLuint position; 18 | extern const GLuint texcoord0; 19 | extern const GLuint texcoord1; 20 | } 21 | 22 | #define MaxAttribIndex 8 23 | } 24 | -------------------------------------------------------------------------------- /GLideN64/src/Graphics/OpenGLContext/opengl_ColorBufferReaderWithBufferStorage.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include "opengl_CachedFunctions.h" 5 | #include 6 | 7 | namespace opengl { 8 | 9 | class ColorBufferReaderWithBufferStorage : 10 | public graphics::ColorBufferReader 11 | { 12 | public: 13 | ColorBufferReaderWithBufferStorage(CachedTexture * _pTexture, 14 | CachedBindBuffer * _bindBuffer); 15 | virtual ~ColorBufferReaderWithBufferStorage(); 16 | 17 | const u8 * _readPixels(const ReadColorBufferParams& _params, u32& _heightOffset, u32& _stride) override; 18 | 19 | void cleanUp() override; 20 | 21 | private: 22 | void _initBuffers(); 23 | void _destroyBuffers(); 24 | 25 | CachedBindBuffer * m_bindBuffer; 26 | 27 | static const int _maxPBO = 3; 28 | u32 m_numPBO; 29 | GLuint m_PBO[_maxPBO]; 30 | void* m_PBOData[_maxPBO]; 31 | u32 m_curIndex; 32 | }; 33 | 34 | } 35 | -------------------------------------------------------------------------------- /GLideN64/src/Graphics/OpenGLContext/opengl_ColorBufferReaderWithEGLImage.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #ifdef EGL 3 | #include 4 | #include 5 | #include "opengl_CachedFunctions.h" 6 | 7 | #include 8 | 9 | namespace opengl { 10 | 11 | class ColorBufferReaderWithEGLImage : public graphics::ColorBufferReader 12 | { 13 | public: 14 | ColorBufferReaderWithEGLImage(CachedTexture * _pTexture, CachedBindTexture * _bindTexture); 15 | ~ColorBufferReaderWithEGLImage() override; 16 | 17 | const u8 * _readPixels(const ReadColorBufferParams& _params, u32& _heightOffset, u32& _stride) override; 18 | 19 | void cleanUp() override; 20 | 21 | private: 22 | void _initBuffers(); 23 | 24 | CachedBindTexture * m_bindTexture; 25 | GraphicBufferWrapper m_hardwareBuffer; 26 | EGLImageKHR m_image; 27 | uint64_t m_usage; 28 | bool m_bufferLocked; 29 | }; 30 | 31 | } 32 | 33 | #endif //EGL 34 | -------------------------------------------------------------------------------- /GLideN64/src/Graphics/OpenGLContext/opengl_ColorBufferReaderWithPixelBuffer.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #include "opengl_CachedFunctions.h" 4 | 5 | namespace opengl { 6 | 7 | class ColorBufferReaderWithPixelBuffer : 8 | public graphics::ColorBufferReader 9 | { 10 | public: 11 | ColorBufferReaderWithPixelBuffer(CachedTexture * _pTexture, 12 | CachedBindBuffer * _bindBuffer); 13 | ~ColorBufferReaderWithPixelBuffer(); 14 | 15 | const u8 * _readPixels(const ReadColorBufferParams& _params, u32& _heightOffset, u32& _stride) override; 16 | void cleanUp() override; 17 | 18 | private: 19 | void _initBuffers(); 20 | void _destroyBuffers(); 21 | 22 | CachedBindBuffer * m_bindBuffer; 23 | 24 | u32 m_numPBO; 25 | static const int _maxPBO = 3; 26 | GLuint m_PBO[_maxPBO]; 27 | u32 m_curIndex; 28 | }; 29 | 30 | } 31 | -------------------------------------------------------------------------------- /GLideN64/src/Graphics/OpenGLContext/opengl_ColorBufferReaderWithReadPixels.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include "opengl_ColorBufferReaderWithReadPixels.h" 3 | #include 4 | 5 | using namespace graphics; 6 | using namespace opengl; 7 | 8 | ColorBufferReaderWithReadPixels::ColorBufferReaderWithReadPixels(CachedTexture *_pTexture) 9 | : ColorBufferReader(_pTexture) 10 | { 11 | 12 | } 13 | 14 | const u8 * ColorBufferReaderWithReadPixels::_readPixels(const ReadColorBufferParams& _params, u32& _heightOffset, 15 | u32& _stride) 16 | { 17 | GLenum format = GLenum(_params.colorFormat); 18 | GLenum type = GLenum(_params.colorType); 19 | 20 | // No async pixel buffer copies are supported in this class, this is a last resort fallback 21 | u8* gpuData = m_pixelData.data(); 22 | glReadPixels(_params.x0, _params.y0, m_pTexture->width, _params.height, format, type, gpuData); 23 | 24 | _heightOffset = 0; 25 | _stride = m_pTexture->width; 26 | 27 | return gpuData; 28 | } 29 | 30 | void ColorBufferReaderWithReadPixels::cleanUp() 31 | { 32 | } 33 | -------------------------------------------------------------------------------- /GLideN64/src/Graphics/OpenGLContext/opengl_ColorBufferReaderWithReadPixels.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #include "opengl_CachedFunctions.h" 4 | 5 | namespace opengl { 6 | 7 | class ColorBufferReaderWithReadPixels : 8 | public graphics::ColorBufferReader 9 | { 10 | public: 11 | ColorBufferReaderWithReadPixels(CachedTexture * _pTexture); 12 | ~ColorBufferReaderWithReadPixels() = default; 13 | 14 | const u8 * _readPixels(const ReadColorBufferParams& _params, u32& _heightOffset, u32& _stride) override; 15 | void cleanUp() override; 16 | }; 17 | 18 | } 19 | -------------------------------------------------------------------------------- /GLideN64/src/Graphics/OpenGLContext/opengl_GLInfo.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "GLFunctions.h" 3 | 4 | namespace opengl { 5 | 6 | enum class Renderer { 7 | Adreno530, 8 | Adreno_no_bugs, 9 | Adreno, 10 | VideoCore, 11 | Intel, 12 | PowerVR, 13 | Tegra, 14 | Other 15 | }; 16 | 17 | struct GLInfo { 18 | GLint majorVersion = 0; 19 | GLint minorVersion = 0; 20 | bool isGLES2 = false; 21 | bool isGLESX = false; 22 | bool imageTextures = false; 23 | bool bufferStorage = false; 24 | bool texStorage = false; 25 | bool shaderStorage = false; 26 | bool msaa = false; 27 | bool depthTexture = false; 28 | bool noPerspective = false; 29 | bool fetch_depth = false; 30 | bool texture_barrier = false; 31 | bool texture_barrierNV = false; 32 | bool fragment_interlock = false; 33 | bool fragment_interlockNV = false; 34 | bool fragment_ordering = false; 35 | bool ext_fetch = false; 36 | bool eglImage = false; 37 | bool eglImageFramebuffer = false; 38 | Renderer renderer = Renderer::Other; 39 | 40 | void init(); 41 | }; 42 | } 43 | -------------------------------------------------------------------------------- /GLideN64/src/Graphics/OpenGLContext/opengl_GraphicsDrawer.h: -------------------------------------------------------------------------------- 1 | #ifndef OPENGL_GRAPHICS_DRAWER_H 2 | #define OPENGL_GRAPHICS_DRAWER_H 3 | #include 4 | 5 | namespace opengl { 6 | 7 | class GraphicsDrawer { 8 | public: 9 | virtual ~GraphicsDrawer() {} 10 | 11 | virtual void drawTriangles(const graphics::Context::DrawTriangleParameters & _params) = 0; 12 | 13 | virtual void drawRects(const graphics::Context::DrawRectParameters & _params) = 0; 14 | 15 | virtual void drawLine(f32 _width, SPVertex * _vertices) = 0; 16 | }; 17 | } 18 | 19 | 20 | #endif // OPENGL_GRAPHICS_DRAWER_H -------------------------------------------------------------------------------- /GLideN64/src/Graphics/OpenGLContext/opengl_UnbufferedDrawer.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #include "opengl_GraphicsDrawer.h" 4 | #include "opengl_GLInfo.h" 5 | 6 | namespace opengl { 7 | class CachedVertexAttribArray; 8 | 9 | class UnbufferedDrawer : public GraphicsDrawer 10 | { 11 | public: 12 | UnbufferedDrawer(const GLInfo & _glinfo, CachedVertexAttribArray * _cachedAttribArray); 13 | ~UnbufferedDrawer(); 14 | 15 | void drawTriangles(const graphics::Context::DrawTriangleParameters & _params) override; 16 | 17 | void drawRects(const graphics::Context::DrawRectParameters & _params) override; 18 | 19 | void drawLine(f32 _width, SPVertex * _vertices) override; 20 | 21 | private: 22 | bool _updateAttribPointer(u32 _index, const void * _ptr); 23 | 24 | const GLInfo & m_glInfo; 25 | CachedVertexAttribArray * m_cachedAttribArray; 26 | std::array m_attribsData; 27 | }; 28 | 29 | } 30 | -------------------------------------------------------------------------------- /GLideN64/src/Graphics/OpenGLContext/opengl_Utils.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "opengl_GLInfo.h" 4 | 5 | namespace opengl { 6 | 7 | struct Utils 8 | { 9 | static bool isExtensionSupported(const opengl::GLInfo & _glinfo, const char * extension); 10 | static bool isEGLExtensionSupported(const char * extension); 11 | static bool isGLError(); 12 | static bool isFramebufferError(); 13 | }; 14 | 15 | } 16 | -------------------------------------------------------------------------------- /GLideN64/src/Graphics/OpenGLContext/windows/WindowsWGL.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | 8 | class WindowsWGL 9 | { 10 | public: 11 | static bool start(); 12 | static void stop(); 13 | static void swapBuffers(); 14 | 15 | private: 16 | 17 | static HGLRC hRC; 18 | static HDC hDC; 19 | }; 20 | 21 | -------------------------------------------------------------------------------- /GLideN64/src/Graphics/PixelBuffer.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "Parameter.h" 3 | 4 | namespace graphics { 5 | 6 | class PixelReadBuffer 7 | { 8 | public: 9 | virtual ~PixelReadBuffer() {} 10 | virtual void readPixels(s32 _x,s32 _y, u32 _width, u32 _height, Parameter _format, Parameter _type) = 0; 11 | virtual void * getDataRange(u32 _offset, u32 _range) = 0; 12 | virtual void closeReadBuffer() = 0; 13 | virtual void bind() = 0; 14 | virtual void unbind() = 0; 15 | }; 16 | 17 | template 18 | class PixelBufferBinder 19 | { 20 | public: 21 | PixelBufferBinder(T * _buffer) 22 | : m_buffer(_buffer) { 23 | m_buffer->bind(); 24 | } 25 | 26 | ~PixelBufferBinder() { 27 | m_buffer->unbind(); 28 | m_buffer = nullptr; 29 | } 30 | private: 31 | T * m_buffer; 32 | }; 33 | } 34 | -------------------------------------------------------------------------------- /GLideN64/src/Graphics/ShaderProgram.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #include "CombinerProgram.h" 4 | 5 | namespace graphics { 6 | 7 | class ShaderProgram : public CombinerProgram 8 | { 9 | public: 10 | virtual ~ShaderProgram() {} 11 | 12 | void update(bool _force) override {} 13 | const CombinerKey & getKey() const override { return CombinerKey::getEmpty(); } 14 | bool usesTexture() const override {return true;} 15 | virtual bool usesTile(u32 _t) const override {return _t == 0 ? true : false;} 16 | virtual bool usesShade() const override {return false;} 17 | virtual bool usesLOD() const override {return false;} 18 | virtual bool usesHwLighting() const override {return false;} 19 | virtual bool getBinaryForm(std::vector & _buffer) override {return false;} 20 | }; 21 | 22 | class TexrectDrawerShaderProgram : public ShaderProgram 23 | { 24 | public: 25 | virtual void setTextureSize(u32 _width, u32 _height) = 0; 26 | virtual void setEnableAlphaTest(int _enable) = 0; 27 | }; 28 | 29 | class TextDrawerShaderProgram : public ShaderProgram 30 | { 31 | public: 32 | virtual void setTextColor(float * _color) = 0; 33 | }; 34 | } 35 | -------------------------------------------------------------------------------- /GLideN64/src/Log.h: -------------------------------------------------------------------------------- 1 | #ifndef __LOG_H__ 2 | #define __LOG_H__ 3 | 4 | #define LOG_NONE 0 5 | #define LOG_ERROR 1 6 | #define LOG_MINIMAL 2 7 | #define LOG_WARNING 3 8 | #define LOG_VERBOSE 4 9 | #define LOG_APIFUNC 5 10 | 11 | #define LOG_LEVEL LOG_WARNING 12 | 13 | #if LOG_LEVEL > 0 14 | 15 | #include "Types.h" 16 | #include 17 | #include 18 | 19 | // for strrchr 20 | #include 21 | 22 | #ifdef OS_WINDOWS 23 | #define __FILENAME__ (strrchr(__FILE__, '\\') ? strrchr(__FILE__, '\\') + 1 : __FILE__) 24 | #else 25 | #define __FILENAME__ (strrchr(__FILE__, '/') ? strrchr(__FILE__, '/') + 1 : __FILE__) 26 | #endif //OS_WINDOWS 27 | 28 | #define LOG(...) LogDebug(__FILENAME__, __LINE__, __VA_ARGS__) 29 | 30 | void LogDebug(const char* _fileName, int _line, u16 _type, const char* _format, ...); 31 | 32 | #else 33 | 34 | #define LOG(A, ...) 35 | 36 | #endif 37 | 38 | #if defined(OS_WINDOWS) && !defined(MINGW) 39 | void debugPrint(const char * format, ...); 40 | #else 41 | #define debugPrint(A, ...) 42 | #endif 43 | 44 | #endif 45 | -------------------------------------------------------------------------------- /GLideN64/src/Log_android.cpp: -------------------------------------------------------------------------------- 1 | #include "Log.h" 2 | #include 3 | #include 4 | #include 5 | #include 6 | 7 | void LogDebug(const char* _fileName, int _line, u16 _type, const char* _format, ...) { 8 | static android_LogPriority androidLogTranslate[] = { 9 | ANDROID_LOG_SILENT, 10 | ANDROID_LOG_ERROR, 11 | ANDROID_LOG_INFO, 12 | ANDROID_LOG_WARN, 13 | ANDROID_LOG_DEBUG, 14 | ANDROID_LOG_VERBOSE, 15 | }; 16 | 17 | if (_type > LOG_LEVEL) 18 | return; 19 | 20 | va_list va; 21 | va_start(va, _format); 22 | __android_log_vprint(androidLogTranslate[_type], "GLideN64", _format, va); 23 | va_end(va); 24 | } 25 | -------------------------------------------------------------------------------- /GLideN64/src/Log_ios.mm: -------------------------------------------------------------------------------- 1 | #include "Log.h" 2 | #include 3 | 4 | void LOG(u16 type, const char * format, ...) { 5 | if (type > LOG_LEVEL) 6 | return; 7 | 8 | va_list va; 9 | va_start(va, format); 10 | NSString *nsformat = [NSString stringWithFormat:@"GLideN64: %s", format]; 11 | NSLogv(nsformat, va); 12 | va_end(va); 13 | } 14 | -------------------------------------------------------------------------------- /GLideN64/src/MemoryStatus.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "Platform.h" 3 | #include "Types.h" 4 | 5 | bool isMemoryWritable(void * ptr, size_t byteCount); 6 | -------------------------------------------------------------------------------- /GLideN64/src/N64.cpp: -------------------------------------------------------------------------------- 1 | #include "N64.h" 2 | 3 | u8 *HEADER; 4 | u8 *DMEM; 5 | u8 *IMEM; 6 | u64 TMEM[512]; 7 | u8 *RDRAM; 8 | 9 | u32 RDRAMSize = 0; 10 | 11 | N64Regs REG; 12 | 13 | bool ConfigOpen = false; 14 | -------------------------------------------------------------------------------- /GLideN64/src/N64.h: -------------------------------------------------------------------------------- 1 | #ifndef N64_H 2 | #define N64_H 3 | 4 | #include "Types.h" 5 | 6 | #define MI_INTR_DP 0x20 // Bit 5: DP intr 7 | 8 | struct N64Regs 9 | { 10 | u32 *MI_INTR; 11 | 12 | u32 *DPC_START; 13 | u32 *DPC_END; 14 | u32 *DPC_CURRENT; 15 | u32 *DPC_STATUS; 16 | u32 *DPC_CLOCK; 17 | u32 *DPC_BUFBUSY; 18 | u32 *DPC_PIPEBUSY; 19 | u32 *DPC_TMEM; 20 | 21 | u32 *VI_STATUS; 22 | u32 *VI_ORIGIN; 23 | u32 *VI_WIDTH; 24 | u32 *VI_INTR; 25 | u32 *VI_V_CURRENT_LINE; 26 | u32 *VI_TIMING; 27 | u32 *VI_V_SYNC; 28 | u32 *VI_H_SYNC; 29 | u32 *VI_LEAP; 30 | u32 *VI_H_START; 31 | u32 *VI_V_START; 32 | u32 *VI_V_BURST; 33 | u32 *VI_X_SCALE; 34 | u32 *VI_Y_SCALE; 35 | 36 | u32 *SP_STATUS; 37 | }; 38 | 39 | extern N64Regs REG; 40 | extern u8 *HEADER; 41 | extern u8 *DMEM; 42 | extern u8 *IMEM; 43 | extern u8 *RDRAM; 44 | extern u64 TMEM[512]; 45 | extern u32 RDRAMSize; 46 | extern bool ConfigOpen; 47 | 48 | #endif 49 | 50 | -------------------------------------------------------------------------------- /GLideN64/src/NoiseTexture.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #include 4 | #include 5 | #include "Types.h" 6 | 7 | #define NOISE_TEX_NUM 30 8 | 9 | struct CachedTexture; 10 | typedef std::array, NOISE_TEX_NUM> NoiseTexturesData; 11 | 12 | class NoiseTexture 13 | { 14 | public: 15 | NoiseTexture(); 16 | 17 | void init(); 18 | void destroy(); 19 | void update(); 20 | 21 | private: 22 | void _fillTextureData(); 23 | 24 | CachedTexture * m_pTexture[NOISE_TEX_NUM]; 25 | u32 m_DList; 26 | u32 m_currTex, m_prevTex; 27 | NoiseTexturesData m_texData; 28 | }; 29 | 30 | extern NoiseTexture g_noiseTexture; 31 | -------------------------------------------------------------------------------- /GLideN64/src/PaletteTexture.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #include 4 | 5 | struct CachedTexture; 6 | 7 | class PaletteTexture 8 | { 9 | public: 10 | PaletteTexture(); 11 | 12 | void init(); 13 | void destroy(); 14 | void update(); 15 | 16 | private: 17 | CachedTexture * m_pTexture; 18 | u8* m_pbuf; 19 | u32 m_paletteCRC256; 20 | }; 21 | 22 | extern PaletteTexture g_paletteTexture; 23 | -------------------------------------------------------------------------------- /GLideN64/src/Performance.h: -------------------------------------------------------------------------------- 1 | #ifndef PERFORMANCE_H 2 | #define PERFORMANCE_H 3 | #include 4 | #include "Types.h" 5 | 6 | class Performance 7 | { 8 | public: 9 | Performance(); 10 | void reset(); 11 | f32 getFps() const; 12 | f32 getVIs() const; 13 | f32 getPercent() const; 14 | void increaseVICount(); 15 | void increaseFramesCount(); 16 | 17 | private: 18 | u32 m_vi; 19 | u32 m_frames; 20 | f32 m_fps; 21 | f32 m_vis; 22 | std::chrono::steady_clock::time_point m_startTime; 23 | bool m_enabled; 24 | }; 25 | 26 | extern Performance perf; 27 | #endif // PERFORMANCE_H 28 | -------------------------------------------------------------------------------- /GLideN64/src/Platform.h: -------------------------------------------------------------------------------- 1 | #ifndef PLATFORM_H 2 | #define PLATFORM_H 3 | 4 | #ifdef OS_WINDOWS 5 | #ifndef NOMINMAX 6 | #define NOMINMAX 7 | #endif 8 | #include 9 | #else 10 | #include "winlnxdefs.h" 11 | #endif 12 | 13 | #ifdef PANDORA 14 | typedef char GLchar; 15 | #endif 16 | 17 | #endif // PLATFORM_H 18 | -------------------------------------------------------------------------------- /GLideN64/src/RDP.h: -------------------------------------------------------------------------------- 1 | #ifndef RDP_H 2 | #define RDP_H 3 | 4 | #define MAXCMD 0x100000 5 | const unsigned int maxCMDMask = MAXCMD - 1; 6 | 7 | typedef struct 8 | { 9 | u32 w0, w1, w2, w3; 10 | u32 cmd_ptr; 11 | u32 cmd_cur; 12 | u32 cmd_data[MAXCMD + 32]; 13 | } RDPInfo; 14 | 15 | extern RDPInfo RDP; 16 | 17 | void RDP_Init(); 18 | void RDP_Half_1(u32 _c); 19 | void RDP_TexRect(u32 w0, u32 w1); 20 | void RDP_ProcessRDPList(); 21 | void RDP_RepeatLastLoadBlock(); 22 | void RDP_SetScissor(u32 w0, u32 w1); 23 | void RDP_SetTImg(u32 w0, u32 w1); 24 | void RDP_LoadBlock(u32 w0, u32 w1); 25 | void RDP_SetTile(u32 w0, u32 w1); 26 | void RDP_SetTileSize(u32 w0, u32 w1); 27 | 28 | #endif 29 | 30 | -------------------------------------------------------------------------------- /GLideN64/src/RSP.h: -------------------------------------------------------------------------------- 1 | #ifndef RSP_H_ 2 | #define RSP_H_ 3 | 4 | #include "Types.h" 5 | #include "N64.h" 6 | 7 | typedef struct 8 | { 9 | u32 PC[18], PCi; 10 | u32 F5DL[10]; 11 | u32 uc_start, uc_dstart, cmd, nextCmd; 12 | u32 w0, w1; 13 | s32 count; 14 | bool busy, halt, infloop; 15 | bool LLE; 16 | char romname[21]; 17 | wchar_t pluginpath[PLUGIN_PATH_SIZE]; 18 | } RSPInfo; 19 | 20 | extern RSPInfo RSP; 21 | 22 | extern u32 DepthClearColor; 23 | extern u32 rectDepthBufferCopyFrame; 24 | 25 | #define RSP_SegmentToPhysical( segaddr ) ((gSP.segment[(segaddr >> 24) & 0x0F] + (segaddr & RDRAMSize)) & RDRAMSize) 26 | 27 | void RSP_Init(); 28 | void RSP_ProcessDList(); 29 | void RSP_LoadMatrix( f32 mtx[4][4], u32 address ); 30 | void RSP_CheckDLCounter(); 31 | 32 | #endif 33 | -------------------------------------------------------------------------------- /GLideN64/src/RSP_LoadMatrix.cpp: -------------------------------------------------------------------------------- 1 | #include "RSP.h" 2 | #include "3DMath.h" 3 | 4 | void RSP_LoadMatrix( f32 mtx[4][4], u32 address ) 5 | { 6 | struct _N64Matrix 7 | { 8 | s16 integer[4][4]; 9 | u16 fraction[4][4]; 10 | } *n64Mat = (struct _N64Matrix *)&RDRAM[address]; 11 | 12 | for (u32 i = 0; i < 4; i++) 13 | for (u32 j = 0; j < 4; j++) 14 | mtx[i][j] = GetFloatMatrixElement(n64Mat->integer[i][j ^ 1], n64Mat->fraction[i][j ^ 1]); 15 | } 16 | -------------------------------------------------------------------------------- /GLideN64/src/SoftwareRender.h: -------------------------------------------------------------------------------- 1 | #ifndef SOFTWARE_RENDER_H 2 | #define SOFTWARE_RENDER_H 3 | 4 | #include "gSP.h" 5 | 6 | f32 renderTriangles(const SPVertex * _pVertices, const u16 * _pElements, u32 _numElements); 7 | 8 | #endif // SOFTWARE_RENDER_H 9 | -------------------------------------------------------------------------------- /GLideN64/src/TextDrawer.h: -------------------------------------------------------------------------------- 1 | #ifndef TEXTDRAWER_H 2 | #define TEXTDRAWER_H 3 | 4 | #include 5 | #include "Graphics/ShaderProgram.h" 6 | #include "Graphics/FramebufferTextureFormats.h" 7 | 8 | struct Atlas; 9 | 10 | class TextDrawer 11 | { 12 | public: 13 | void init(); 14 | 15 | void destroy(); 16 | 17 | void drawText(const char *_pText, float x, float y) const; 18 | 19 | void getTextSize(const char *_pText, float & _w, float & _h) const; 20 | 21 | void setTextColor(float * _color); 22 | 23 | private: 24 | std::unique_ptr m_atlas; 25 | std::unique_ptr m_program; 26 | }; 27 | 28 | extern TextDrawer g_textDrawer; 29 | 30 | #endif // TEXTDRAWER_H 31 | -------------------------------------------------------------------------------- /GLideN64/src/TextDrawerStub.cpp: -------------------------------------------------------------------------------- 1 | /* Stub for TextDrawer.h 2 | * Use to replace remove freetype library requirement. 3 | */ 4 | 5 | #include "TextDrawer.h" 6 | 7 | TextDrawer g_textDrawer; 8 | 9 | struct Atlas { 10 | }; 11 | 12 | void TextDrawer::init() 13 | { 14 | } 15 | 16 | void TextDrawer::destroy() 17 | { 18 | } 19 | 20 | void TextDrawer::drawText(const char *_pText, float _x, float _y) const 21 | { 22 | } 23 | 24 | void TextDrawer::getTextSize(const char *_pText, float & _w, float & _h) const 25 | { 26 | } 27 | 28 | void TextDrawer::setTextColor(float * _color) 29 | { 30 | } 31 | -------------------------------------------------------------------------------- /GLideN64/src/TextureFilterHandler.h: -------------------------------------------------------------------------------- 1 | #ifndef TEXTUREFILTERHANDLER_H 2 | #define TEXTUREFILTERHANDLER_H 3 | 4 | #include "Types.h" 5 | 6 | class TextureFilterHandler 7 | { 8 | public: 9 | TextureFilterHandler() : m_inited(0), m_options(0) {} 10 | // It's not safe to call shutdown() in destructor, because texture filter has its own static objects, which can be destroyed first. 11 | ~TextureFilterHandler() { shutdown(); } 12 | void init(); 13 | void shutdown(); 14 | void dumpcache(); 15 | bool isInited() const { return m_inited != 0; } 16 | bool optionsChanged() const { return _getConfigOptions() != m_options; } 17 | private: 18 | u32 _getConfigOptions() const; 19 | u32 m_inited; 20 | u32 m_options; 21 | }; 22 | 23 | extern TextureFilterHandler TFH; 24 | 25 | #endif // TEXTUREFILTERHANDLER_H 26 | -------------------------------------------------------------------------------- /GLideN64/src/VI.h: -------------------------------------------------------------------------------- 1 | #ifndef VI_H 2 | #define VI_H 3 | #include "Types.h" 4 | 5 | struct VIInfo 6 | { 7 | u32 width, widthPrev, height, real_height; 8 | f32 rwidth, rheight; 9 | u32 lastOrigin; 10 | bool interlaced; 11 | bool PAL; 12 | 13 | VIInfo() : 14 | width(0), widthPrev(0), height(0), real_height(0), rwidth(0), rheight(0), 15 | lastOrigin(-1), interlaced(false), PAL(false) 16 | {} 17 | }; 18 | 19 | extern VIInfo VI; 20 | 21 | void VI_UpdateSize(); 22 | void VI_UpdateScreen(); 23 | u16 VI_GetMaxBufferHeight(u16 _width); 24 | 25 | #endif 26 | 27 | -------------------------------------------------------------------------------- /GLideN64/src/ZilmarPluginAPI.cpp: -------------------------------------------------------------------------------- 1 | #ifdef OS_WINDOWS 2 | # include 3 | #else 4 | # include "winlnxdefs.h" 5 | #endif // OS_WINDOWS 6 | 7 | #include "PluginAPI.h" 8 | #include "N64.h" 9 | 10 | extern "C" { 11 | 12 | EXPORT void CALL RomOpen (void) 13 | { 14 | RDRAMSize = 0; 15 | api().RomOpen(); 16 | } 17 | 18 | EXPORT void CALL CaptureScreen ( char * Directory ) 19 | { 20 | api().CaptureScreen(Directory); 21 | } 22 | 23 | EXPORT void CALL CloseDLL (void) 24 | { 25 | api().CloseDLL(); 26 | } 27 | 28 | EXPORT void CALL DllAbout ( HWND hParent ) 29 | { 30 | api().DllAbout(/*hParent*/); 31 | } 32 | 33 | EXPORT void CALL DllConfig ( HWND hParent ) 34 | { 35 | api().DllConfig(hParent); 36 | } 37 | 38 | EXPORT void CALL DllTest ( HWND hParent ) 39 | { 40 | api().DllTest(hParent); 41 | } 42 | 43 | EXPORT void CALL DrawScreen (void) 44 | { 45 | api().DrawScreen(); 46 | } 47 | 48 | EXPORT void CALL GetDllInfo ( PLUGIN_INFO * PluginInfo ) 49 | { 50 | api().GetDllInfo(PluginInfo); 51 | } 52 | 53 | EXPORT void CALL ReadScreen (void **dest, long *width, long *height) 54 | { 55 | api().ReadScreen(dest, width, height); 56 | } 57 | 58 | } 59 | -------------------------------------------------------------------------------- /GLideN64/src/ZlutTexture.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | struct CachedTexture; 4 | 5 | class ZlutTexture 6 | { 7 | public: 8 | ZlutTexture(); 9 | 10 | void init(); 11 | void destroy(); 12 | 13 | private: 14 | CachedTexture * m_pTexture; 15 | }; 16 | 17 | extern ZlutTexture g_zlutTexture; 18 | -------------------------------------------------------------------------------- /GLideN64/src/getRevision.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | set "SCRIPT_DIRECTORY=%~dp0" 3 | 4 | for /f "delims=" %%A in ('git rev-parse --short HEAD') do set "rev=%%A" 5 | echo current revision %rev% 6 | echo #define PLUGIN_REVISION "%rev%">%SCRIPT_DIRECTORY%/Revision.h 7 | echo #define PLUGIN_REVISION_W L"%rev%">>%SCRIPT_DIRECTORY%/Revision.h 8 | -------------------------------------------------------------------------------- /GLideN64/src/getRevision.sh: -------------------------------------------------------------------------------- 1 | SCRIPT_DIRECTORY=`dirname $0` 2 | rev=\"`git rev-parse --short HEAD`\" 3 | echo current revision $rev 4 | echo "#define PLUGIN_REVISION $rev" > $SCRIPT_DIRECTORY/Revision.h 5 | echo "#define PLUGIN_REVISION_W L$rev" >> $SCRIPT_DIRECTORY/Revision.h 6 | -------------------------------------------------------------------------------- /GLideN64/src/iob.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | FILE _iob[] = { *stdin, *stdout, *stderr }; 4 | extern "C" FILE * __cdecl __iob_func(void) { return _iob; } 5 | -------------------------------------------------------------------------------- /GLideN64/src/mupenplus/GLideN64_mupenplus.h: -------------------------------------------------------------------------------- 1 | #ifndef GLIDEN64_MUPENPLUS_H 2 | #define GLIDEN64_MUPENPLUS_H 3 | 4 | #include "m64p_common.h" 5 | #include "m64p_config.h" 6 | #include "m64p_vidext.h" 7 | 8 | #define PLUGIN_VERSION 0x020000 9 | #define VIDEO_PLUGIN_API_VERSION 0x020200 10 | #define CONFIG_API_VERSION 0x020000 11 | #define VIDEXT_API_VERSION 0x030000 12 | 13 | #endif // GLIDEN64_MUPENPLUS_H 14 | -------------------------------------------------------------------------------- /GLideN64/src/mupenplus/MemoryStatus_mupenplus.cpp: -------------------------------------------------------------------------------- 1 | #include "../MemoryStatus.h" 2 | 3 | bool isMemoryWritable(void * ptr, size_t byteCount) 4 | { 5 | return true; 6 | } 7 | -------------------------------------------------------------------------------- /GLideN64/src/mupenplus/video_api_export.ver: -------------------------------------------------------------------------------- 1 | { global: 2 | PluginStartup; 3 | PluginShutdown; 4 | PluginGetVersion; 5 | ChangeWindow; 6 | InitiateGFX; 7 | MoveScreen; 8 | ProcessDList; 9 | ProcessRDPList; 10 | RomClosed; 11 | RomOpen; 12 | ShowCFB; 13 | UpdateScreen; 14 | ViStatusChanged; 15 | ViWidthChanged; 16 | ReadScreen2; 17 | SetRenderingCallback; 18 | ResizeVideoOutput; 19 | FBRead; 20 | FBWrite; 21 | FBGetFrameBufferInfo; 22 | local: *; }; 23 | -------------------------------------------------------------------------------- /GLideN64/src/uCodes/F3DAM.h: -------------------------------------------------------------------------------- 1 | #ifndef F3DAM_H 2 | #define F3DAM_H 3 | 4 | void F3DAM_Init(); 5 | 6 | #endif // F3DAM_H 7 | -------------------------------------------------------------------------------- /GLideN64/src/uCodes/F3DBETA.h: -------------------------------------------------------------------------------- 1 | #ifndef F3DBETA_H 2 | #define F3DBETA_H 3 | 4 | #define F3DBETA_PERSPNORM 0xB4 5 | #define F3DBETA_RDPHALF_1 0xB3 6 | #define F3DBETA_RDPHALF_2 0xB2 7 | #define F3DBETA_TRI2 0xB1 8 | 9 | void F3DBETA_Init(); 10 | 11 | void F3DBETA_Perpnorm(u32 w0, u32 w1); 12 | 13 | #endif 14 | 15 | -------------------------------------------------------------------------------- /GLideN64/src/uCodes/F3DDKR.h: -------------------------------------------------------------------------------- 1 | #ifndef F3DDKR_H 2 | #define F3DDKR_H 3 | 4 | #define F3DDKR_VTX_APPEND 0x00010000 5 | 6 | #define F3DDKR_DMA_MTX 0x01 7 | #define F3DDKR_DMA_TEX_OFFSET 0x02 8 | #define F3DDKR_DMA_VTX 0x04 9 | #define F3DDKR_DMA_TRI 0x05 10 | #define F3DDKR_DMA_DL 0x07 11 | #define F3DDKR_DMA_OFFSETS 0xBF 12 | 13 | void F3DDKR_Init(); 14 | void F3DJFG_Init(); 15 | #endif 16 | 17 | -------------------------------------------------------------------------------- /GLideN64/src/uCodes/F3DEX2ACCLAIM.h: -------------------------------------------------------------------------------- 1 | #ifndef F3DEX2_ACCLAIM_H 2 | #define F3DEX2_ACCLAIM_H 3 | 4 | void F3DEX2ACCLAIM_Init(); 5 | 6 | #endif 7 | 8 | -------------------------------------------------------------------------------- /GLideN64/src/uCodes/F3DEX2CBFD.h: -------------------------------------------------------------------------------- 1 | #ifndef F3DEX2CBFD_H 2 | #define F3DEX2CBFD_H 3 | 4 | #define F3DEX2CBFD_TRI4 16 5 | 6 | void F3DEX2CBFD_Init(); 7 | 8 | #endif // F3DEX2CBFD_H 9 | -------------------------------------------------------------------------------- /GLideN64/src/uCodes/F3DFLX2.h: -------------------------------------------------------------------------------- 1 | #ifndef F3DFLX2_H 2 | #define F3DFLX2_H 3 | 4 | void F3DFLX2_Init(); 5 | 6 | #endif // F3DFLX2_H 7 | -------------------------------------------------------------------------------- /GLideN64/src/uCodes/F3DGOLDEN.h: -------------------------------------------------------------------------------- 1 | #ifndef F3DGOLDEN_H 2 | #define F3DGOLDEN_H 3 | 4 | #define F3D_TRIX 0xB1 5 | 6 | void F3DGOLDEN_Init(); 7 | 8 | void F3D_TriX(u32 w0, u32 w1); 9 | 10 | #endif 11 | 12 | -------------------------------------------------------------------------------- /GLideN64/src/uCodes/F3DPD.h: -------------------------------------------------------------------------------- 1 | #ifndef F3DPD_H 2 | #define F3DPD_H 3 | 4 | void F3DPD_Init(); 5 | 6 | #endif 7 | 8 | -------------------------------------------------------------------------------- /GLideN64/src/uCodes/F3DSETA.h: -------------------------------------------------------------------------------- 1 | #ifndef F3DSETA_H 2 | #define F3DSETA_H 3 | 4 | void F3DSETA_Init(); 5 | 6 | #endif 7 | 8 | -------------------------------------------------------------------------------- /GLideN64/src/uCodes/F3DTEXA.h: -------------------------------------------------------------------------------- 1 | #ifndef F3DTEXA_H 2 | #define F3DTEXA_H 3 | 4 | void F3DTEXA_Init(); 5 | 6 | #endif 7 | -------------------------------------------------------------------------------- /GLideN64/src/uCodes/F3DZEX2.h: -------------------------------------------------------------------------------- 1 | #ifndef F3DZEX2_H 2 | #define F3DZEX2_H 3 | 4 | void F3DZEX2_Init(); 5 | 6 | #endif // F3DEX2M_H 7 | -------------------------------------------------------------------------------- /GLideN64/src/uCodes/F5Indi_Naboo.h: -------------------------------------------------------------------------------- 1 | #ifndef F5INDI_NABOO_H 2 | #define F5INDI_NABOO_H 3 | 4 | void F5Indi_Naboo_Init(); 5 | 6 | #endif 7 | -------------------------------------------------------------------------------- /GLideN64/src/uCodes/F5Rogue.h: -------------------------------------------------------------------------------- 1 | #ifndef F5ROGUE_H 2 | #define F5ROGUE_H 3 | 4 | void F5Rogue_Init(); 5 | 6 | #endif // F5ROGUE_H 7 | -------------------------------------------------------------------------------- /GLideN64/src/uCodes/L3D.h: -------------------------------------------------------------------------------- 1 | #ifndef L3D_H 2 | #define L3D_H 3 | #include "Types.h" 4 | 5 | #define L3D_LINE3D 0xB5 6 | 7 | void L3D_Line3D( u32 w0, u32 w1 ); 8 | void L3D_Init(); 9 | #endif 10 | 11 | -------------------------------------------------------------------------------- /GLideN64/src/uCodes/L3DEX.h: -------------------------------------------------------------------------------- 1 | #ifndef L3DEX_H 2 | #define L3DEX_H 3 | #include "Types.h" 4 | 5 | void L3DEX_Line3D( u32 w0, u32 w1 ); 6 | void L3DEX_Init(); 7 | #endif 8 | 9 | -------------------------------------------------------------------------------- /GLideN64/src/uCodes/L3DEX2.h: -------------------------------------------------------------------------------- 1 | #ifndef L3DEX2_H 2 | #define L3DEX2_H 3 | #include "Types.h" 4 | 5 | #define L3DEX2_LINE3D 0x08 6 | 7 | void L3DEX2_Line3D( u32 w0, u32 w1 ); 8 | void L3DEX2_Init(); 9 | #endif 10 | 11 | -------------------------------------------------------------------------------- /GLideN64/src/uCodes/S2DEX.h: -------------------------------------------------------------------------------- 1 | #ifndef S2DEX_H 2 | #define S2DEX_H 3 | 4 | #include "Types.h" 5 | 6 | void S2DEX_BG_1Cyc(u32 w0, u32 w1); 7 | void S2DEX_BG_Copy( u32 w0, u32 w1 ); 8 | void S2DEX_Obj_Rectangle( u32 w0, u32 w1 ); 9 | void S2DEX_Obj_Sprite( u32 w0, u32 w1 ); 10 | void S2DEX_Obj_MoveMem( u32 w0, u32 w1 ); 11 | void S2DEX_RDPHalf_0( u32 w0, u32 w1 ); 12 | void S2DEX_Select_DL( u32 w0, u32 w1 ); 13 | void S2DEX_Obj_RenderMode( u32 w0, u32 w1 ); 14 | void S2DEX_Obj_Rectangle_R( u32 w0, u32 w1 ); 15 | void S2DEX_Obj_LoadTxtr( u32 w0, u32 w1 ); 16 | void S2DEX_Obj_LdTx_Sprite( u32 w0, u32 w1 ); 17 | void S2DEX_Obj_LdTx_Rect( u32 w0, u32 w1 ); 18 | void S2DEX_Obj_LdTx_Rect_R( u32 w0, u32 w1 ); 19 | void S2DEX_1_03_Init(); 20 | void S2DEX_1_05_Init(); 21 | void S2DEX_1_07_Init(); 22 | void resetObjMtx(); 23 | 24 | #endif 25 | -------------------------------------------------------------------------------- /GLideN64/src/uCodes/S2DEX2.h: -------------------------------------------------------------------------------- 1 | #ifndef S2DEX2_H 2 | #define S2DEX2_H 3 | 4 | void S2DEX2_Init(); 5 | 6 | #endif 7 | -------------------------------------------------------------------------------- /GLideN64/src/uCodes/T3DUX.h: -------------------------------------------------------------------------------- 1 | #ifndef T3DUX_H 2 | #define T3DUX_H 3 | 4 | void RunT3DUX(); 5 | 6 | #endif // T3DUX_H 7 | -------------------------------------------------------------------------------- /GLideN64/src/uCodes/Turbo3D.h: -------------------------------------------------------------------------------- 1 | #ifndef TURBO3D_H 2 | #define TURBO3D_H 3 | 4 | void RunTurbo3D(); 5 | 6 | #endif // TURBO3D_H 7 | -------------------------------------------------------------------------------- /GLideN64/src/uCodes/ZSort.h: -------------------------------------------------------------------------------- 1 | #ifndef ZSORT_H 2 | #define ZSORT_H 3 | 4 | struct zSortVDest{ 5 | s16 sy; 6 | s16 sx; 7 | s32 invw; 8 | s16 yi; 9 | s16 xi; 10 | s16 wi; 11 | u8 fog; 12 | u8 cc; 13 | }; 14 | 15 | typedef f32 M44[4][4]; 16 | 17 | void ZSort_Init(); 18 | void ZSort_RDPCMD( u32, u32 _w1 ); 19 | int Calc_invw( int _w ); 20 | 21 | #endif // ZSORT_H 22 | -------------------------------------------------------------------------------- /GLideN64/src/uCodes/ZSortBOSS.h: -------------------------------------------------------------------------------- 1 | #ifndef ZSORTBOSS_H 2 | #define ZSORTBOSS_H 3 | 4 | void ZSortBOSS_Init(); 5 | 6 | #endif // ZSORTBOSS_H 7 | -------------------------------------------------------------------------------- /GLideN64/src/windows/Config_windows.cpp: -------------------------------------------------------------------------------- 1 | #include "GLideN64_Windows.h" 2 | #include "../N64.h" 3 | #include "../Config.h" 4 | #include "../RSP.h" 5 | #include "../PluginAPI.h" 6 | #include "../GLideNUI/GLideNUI.h" 7 | #include 8 | 9 | 10 | Config config; 11 | 12 | void Config_DoConfig(/*HWND hParent*/) 13 | { 14 | wchar_t strIniFolderPath[PLUGIN_PATH_SIZE]; 15 | api().FindPluginPath(strIniFolderPath); 16 | 17 | ConfigOpen = true; 18 | const bool bRestart = RunConfig(strIniFolderPath, api().isRomOpen() ? RSP.romname : nullptr); 19 | if (config.generalEmulation.enableCustomSettings != 0) 20 | LoadCustomRomSettings(strIniFolderPath, RSP.romname); 21 | config.validate(); 22 | if (bRestart) 23 | dwnd().restart(); 24 | ConfigOpen = false; 25 | } 26 | 27 | void Config_LoadConfig() 28 | { 29 | wchar_t strIniFolderPath[PLUGIN_PATH_SIZE]; 30 | api().FindPluginPath(strIniFolderPath); 31 | LoadConfig(strIniFolderPath); 32 | if (config.generalEmulation.enableCustomSettings != 0) 33 | LoadCustomRomSettings(strIniFolderPath, RSP.romname); 34 | config.validate(); 35 | } 36 | -------------------------------------------------------------------------------- /GLideN64/src/windows/GLideN64_windows.cpp: -------------------------------------------------------------------------------- 1 | #include "GLideN64_Windows.h" 2 | 3 | HWND hWnd; 4 | HWND hStatusBar; 5 | HWND hToolBar; 6 | HINSTANCE hInstance; 7 | 8 | BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD dwReason, LPVOID /*lpvReserved*/) 9 | { 10 | hInstance = hinstDLL; 11 | 12 | return TRUE; 13 | } 14 | -------------------------------------------------------------------------------- /GLideN64/src/windows/GLideN64_windows.h: -------------------------------------------------------------------------------- 1 | #ifndef GLIDEN64_WINDOWS_H 2 | #define GLIDEN64_WINDOWS_H 3 | 4 | #include 5 | 6 | extern HWND hWnd; 7 | extern HWND hStatusBar; 8 | extern HWND hToolBar; 9 | extern HINSTANCE hInstance; 10 | 11 | #endif // GLIDEN64_WINDOWS_H 12 | -------------------------------------------------------------------------------- /GLideN64/src/windows/MemoryStatus_windows.cpp: -------------------------------------------------------------------------------- 1 | #include "../MemoryStatus.h" 2 | 3 | /* Code taken from stackoverflow.com/questions/18394647 */ 4 | bool isMemoryWritable(void * ptr, size_t byteCount) 5 | { 6 | MEMORY_BASIC_INFORMATION mbi; 7 | if (VirtualQuery(ptr, &mbi, sizeof(MEMORY_BASIC_INFORMATION)) == 0) 8 | return false; 9 | 10 | if (mbi.State != MEM_COMMIT) 11 | return false; 12 | 13 | if ((mbi.Protect & (PAGE_NOACCESS | PAGE_EXECUTE | PAGE_READONLY)) != 0) 14 | return false; 15 | 16 | // Check that the start of memory block is in the same "region" as the end. 17 | // If it isn't, "simplify" the problem into checking that the rest of the memory is writeable. 18 | size_t blockOffset = (size_t)(reinterpret_cast(ptr) - reinterpret_cast(mbi.BaseAddress)); 19 | size_t blockBytesPostPtr = mbi.RegionSize - blockOffset; 20 | 21 | if (blockBytesPostPtr < byteCount) 22 | return isMemoryWritable(reinterpret_cast(ptr) + blockBytesPostPtr, byteCount - blockBytesPostPtr); 23 | 24 | return true; 25 | } 26 | -------------------------------------------------------------------------------- /GLideN64/src/windows/ZilmarAPIImpl_windows.cpp: -------------------------------------------------------------------------------- 1 | #include "GLideN64_Windows.h" 2 | #include "../PluginAPI.h" 3 | #include "../GLideN64.h" 4 | #include "../GLideNUI/GLideNUI.h" 5 | #include "../Config.h" 6 | #include "../Revision.h" 7 | #include 8 | 9 | void PluginAPI::DllAbout(/*HWND _hParent*/) 10 | { 11 | Config_LoadConfig(); 12 | wchar_t strIniFolderPath[PLUGIN_PATH_SIZE]; 13 | api().FindPluginPath(strIniFolderPath); 14 | RunAbout(strIniFolderPath); 15 | } 16 | 17 | void PluginAPI::CaptureScreen(char * _Directory) 18 | { 19 | dwnd().setCaptureScreen(_Directory); 20 | } 21 | 22 | void PluginAPI::DllConfig(HWND _hParent) 23 | { 24 | Config_DoConfig(/*_hParent*/); 25 | } 26 | 27 | void PluginAPI::GetDllInfo(PLUGIN_INFO * PluginInfo) 28 | { 29 | PluginInfo->Version = 0x103; 30 | PluginInfo->Type = PLUGIN_TYPE_GFX; 31 | sprintf(PluginInfo->Name, "%s rev.%s", pluginName, PLUGIN_REVISION); 32 | PluginInfo->NormalMemory = FALSE; 33 | PluginInfo->MemoryBswaped = TRUE; 34 | } 35 | -------------------------------------------------------------------------------- /GLideN64/src/wst.h: -------------------------------------------------------------------------------- 1 | #ifndef WST_H 2 | #define WST_H 3 | 4 | #include 5 | 6 | #ifdef OS_ANDROID 7 | static 8 | void gln_wcscat(wchar_t* destination, const wchar_t* source) 9 | { 10 | const u32 bufSize = 512; 11 | char cbuf[bufSize]; 12 | wcstombs(cbuf, destination, bufSize); 13 | std::string dest(cbuf); 14 | wcstombs(cbuf, source, bufSize); 15 | dest.append(cbuf); 16 | mbstowcs(destination, dest.c_str(), PLUGIN_PATH_SIZE); 17 | } 18 | 19 | class dummyWString 20 | { 21 | public: 22 | dummyWString(const char * _str) 23 | { 24 | wchar_t buf[512]; 25 | mbstowcs(buf, _str, 512); 26 | _wstr.assign(buf); 27 | } 28 | 29 | const wchar_t * c_str() const { 30 | return _wstr.c_str(); 31 | } 32 | 33 | private: 34 | std::wstring _wstr; 35 | }; 36 | 37 | #define wst(A) dummyWString(A).c_str() 38 | #else // OS_ANDROID 39 | #define gln_wcscat wcscat 40 | #define wst(A) L##A 41 | #endif // OS_ANDROID 42 | 43 | #endif // WST_H 44 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | [![Build Status](https://travis-ci.org/libretro/parallel-n64.svg?branch=master)](https://travis-ci.org/libretro/parallel-n64) 2 | [![Build status](https://ci.appveyor.com/api/projects/status/iqe836smfugoy8ey/branch/master?svg=true)](https://ci.appveyor.com/project/bparker06/parallel-n64/branch/master) 3 | 4 | # mupen64plus-libretro 5 | 6 | To enable a dynarec CPU core you must pass the WITH_DYNAREC value to make: 7 | * make WITH_DYNAREC=x86 8 | * make WITH_DYNAREC=x86_64 9 | * make WITH_DYNAREC=arm 10 | * make WITH_DYNAREC=aarch64 11 | 12 | New make options: 13 | * USE_CXD4_NEW - use the most recent version of CXD4 that was verified on Android 14 | * USE_SSE2NEON - enable SSE2 vectorized routines on ARMv7+ via hacked SSE2NEON library 15 | 16 | To build Android hardfp library with the new CXD4 RSP + NEON + Parallel RDP do: 17 | * ndk-build -j8 USE_SSE2NEON=1 APP_ABI=armeabi-v7a-hard 18 | 19 | To build Android arm64 library with the new CXD4 RSP + Parallel RDP + dynarec do: 20 | * ndk-build APP_ABI=arm64-v8a 21 | -------------------------------------------------------------------------------- /custom/android/arm/libpng.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/paraLLeXT/41567a669252e7af3dcaf75616dc83ec0a11847f/custom/android/arm/libpng.a -------------------------------------------------------------------------------- /custom/android/arm64/libpng.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/paraLLeXT/41567a669252e7af3dcaf75616dc83ec0a11847f/custom/android/arm64/libpng.a -------------------------------------------------------------------------------- /custom/android/include/cutils/ashmem.h: -------------------------------------------------------------------------------- 1 | /* cutils/ashmem.h 2 | ** 3 | ** Copyright 2008 The Android Open Source Project 4 | ** 5 | ** This file is dual licensed. It may be redistributed and/or modified 6 | ** under the terms of the Apache 2.0 License OR version 2 of the GNU 7 | ** General Public License. 8 | */ 9 | 10 | #ifndef _CUTILS_ASHMEM_H 11 | #define _CUTILS_ASHMEM_H 12 | 13 | #include 14 | 15 | #if defined(__BIONIC__) 16 | #include 17 | #endif 18 | 19 | #ifdef __cplusplus 20 | extern "C" { 21 | #endif 22 | 23 | int ashmem_create_region(const char *name, size_t size); 24 | int ashmem_set_prot_region(int fd, int prot); 25 | int ashmem_pin_region(int fd, size_t offset, size_t len); 26 | int ashmem_unpin_region(int fd, size_t offset, size_t len); 27 | int ashmem_get_size_region(int fd); 28 | 29 | #ifdef __cplusplus 30 | } 31 | #endif 32 | 33 | #endif /* _CUTILS_ASHMEM_H */ 34 | -------------------------------------------------------------------------------- /custom/android/include/cutils/log.h: -------------------------------------------------------------------------------- 1 | #include 2 | -------------------------------------------------------------------------------- /custom/android/include/cutils/open_memstream.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2010 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef __CUTILS_OPEN_MEMSTREAM_H__ 18 | #define __CUTILS_OPEN_MEMSTREAM_H__ 19 | 20 | #include 21 | 22 | #if defined(__APPLE__) 23 | 24 | #ifdef __cplusplus 25 | extern "C" { 26 | #endif 27 | 28 | FILE* open_memstream(char** bufp, size_t* sizep); 29 | 30 | #ifdef __cplusplus 31 | } 32 | #endif 33 | 34 | #endif /* __APPLE__ */ 35 | 36 | #endif /*__CUTILS_OPEN_MEMSTREAM_H__*/ 37 | -------------------------------------------------------------------------------- /custom/android/include/cutils/partition_utils.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2011, The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef __CUTILS_PARTITION_WIPED_H__ 18 | #define __CUTILS_PARTITION_WIPED_H__ 19 | 20 | __BEGIN_DECLS 21 | 22 | int partition_wiped(char *source); 23 | 24 | __END_DECLS 25 | 26 | #endif /* __CUTILS_PARTITION_WIPED_H__ */ 27 | -------------------------------------------------------------------------------- /custom/android/include/ui/DisplayStatInfo.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef ANDROID_UI_DISPLAY_STAT_INFO_H 18 | #define ANDROID_UI_DISPLAY_STAT_INFO_H 19 | 20 | #include 21 | 22 | namespace android { 23 | 24 | struct DisplayStatInfo { 25 | nsecs_t vsyncTime; 26 | nsecs_t vsyncPeriod; 27 | }; 28 | 29 | }; // namespace android 30 | 31 | #endif // ANDROID_COMPOSER_DISPLAY_STAT_INFO_H 32 | -------------------------------------------------------------------------------- /custom/android/include/ui/UiConfig.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2012 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef ANDROID_UI_CONFIG_H 18 | #define ANDROID_UI_CONFIG_H 19 | 20 | #include 21 | 22 | namespace android { 23 | 24 | // Append the libui configuration details to configStr. 25 | void appendUiConfigString(String8& configStr); 26 | 27 | }; // namespace android 28 | 29 | #endif /*ANDROID_UI_CONFIG_H*/ 30 | -------------------------------------------------------------------------------- /custom/android/include/utils/Atomic.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2005 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef ANDROID_UTILS_ATOMIC_H 18 | #define ANDROID_UTILS_ATOMIC_H 19 | 20 | #include 21 | 22 | #endif // ANDROID_UTILS_ATOMIC_H 23 | -------------------------------------------------------------------------------- /custom/android/include/utils/Endian.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2005 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | // 18 | // Android endian-ness defines. 19 | // 20 | #ifndef _LIBS_UTILS_ENDIAN_H 21 | #define _LIBS_UTILS_ENDIAN_H 22 | 23 | #if defined(__APPLE__) || defined(_WIN32) 24 | 25 | #define __BIG_ENDIAN 0x1000 26 | #define __LITTLE_ENDIAN 0x0001 27 | #define __BYTE_ORDER __LITTLE_ENDIAN 28 | 29 | #else 30 | 31 | #include 32 | 33 | #endif 34 | 35 | #endif /*_LIBS_UTILS_ENDIAN_H*/ 36 | -------------------------------------------------------------------------------- /custom/android/include/utils/Functor.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2011 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef ANDROID_FUNCTOR_H 18 | #define ANDROID_FUNCTOR_H 19 | 20 | #include 21 | 22 | namespace android { 23 | 24 | class Functor { 25 | public: 26 | Functor() {} 27 | virtual ~Functor() {} 28 | virtual status_t operator ()(int /*what*/, void* /*data*/) { return NO_ERROR; } 29 | }; 30 | 31 | }; // namespace android 32 | 33 | #endif // ANDROID_FUNCTOR_H 34 | -------------------------------------------------------------------------------- /custom/android/include/utils/SystemClock.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2008 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef ANDROID_UTILS_SYSTEMCLOCK_H 18 | #define ANDROID_UTILS_SYSTEMCLOCK_H 19 | 20 | #include 21 | #include 22 | 23 | namespace android { 24 | 25 | int64_t uptimeMillis(); 26 | int64_t elapsedRealtime(); 27 | int64_t elapsedRealtimeNano(); 28 | 29 | }; // namespace android 30 | 31 | #endif // ANDROID_UTILS_SYSTEMCLOCK_H 32 | 33 | -------------------------------------------------------------------------------- /custom/android/x86/libpng.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/paraLLeXT/41567a669252e7af3dcaf75616dc83ec0a11847f/custom/android/x86/libpng.a -------------------------------------------------------------------------------- /custom/android/x86_64/libpng.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/paraLLeXT/41567a669252e7af3dcaf75616dc83ec0a11847f/custom/android/x86_64/libpng.a -------------------------------------------------------------------------------- /custom/libretro_externs.h: -------------------------------------------------------------------------------- 1 | #ifndef LIBRETRO_EXTERNS_H 2 | #define LIBRETRO_EXTERNS_H 3 | 4 | extern uint32_t CountPerOp; 5 | extern uint32_t CountPerScanlineOverride; 6 | extern uint32_t *blitter_buf_lock; 7 | extern unsigned int screen_width, screen_height; 8 | extern uint32_t screen_pitch; 9 | 10 | #endif -------------------------------------------------------------------------------- /libretro-common/.gitignore: -------------------------------------------------------------------------------- 1 | *.o 2 | -------------------------------------------------------------------------------- /libretro-common/.gitrepo: -------------------------------------------------------------------------------- 1 | ; DO NOT EDIT (unless you know what you are doing) 2 | ; 3 | ; This subdirectory is a git "subrepo", and this file is maintained by the 4 | ; git-subrepo command. See https://github.com/git-commands/git-subrepo#readme 5 | ; 6 | [subrepo] 7 | remote = https://github.com/libretro/libretro-common.git 8 | branch = master 9 | commit = 991eb8222f895f495848c9d5d6ec79233a2ffad2 10 | parent = 951422902c80908763eee7aaefe2a7e94869c34e 11 | method = rebase 12 | cmdver = 0.4.0 13 | -------------------------------------------------------------------------------- /libretro-common/audio/dsp_filters/BassBoost.dsp: -------------------------------------------------------------------------------- 1 | filters = 2 2 | filter0 = iir 3 | filter1 = panning 4 | 5 | iir_gain = 10.0 6 | iir_type = BBOOST 7 | iir_frequency = 200.0 8 | 9 | # Avoids clipping. 10 | panning_left_mix = "0.3 0.0" 11 | panning_right_mix = "0.0 0.3" 12 | -------------------------------------------------------------------------------- /libretro-common/audio/dsp_filters/ChipTuneEnhance.dsp: -------------------------------------------------------------------------------- 1 | filters = 4 2 | filter0 = eq 3 | filter1 = reverb 4 | filter2 = iir 5 | filter3 = panning 6 | 7 | eq_frequencies = "32 64 125 250 500 1000 2000 4000 8000 16000 20000" 8 | eq_gains = "6 9 12 7 6 5 7 9 11 6 0" 9 | 10 | # Reverb - slight reverb 11 | reverb_drytime = 0.5 12 | reverb_wettime = 0.15 13 | reverb_damping = 0.8 14 | reverb_roomwidth = 0.25 15 | reverb_roomsize = 0.25 16 | 17 | # IIR - filters out some harsh sounds on the upper end 18 | iir_type = RIAA_CD 19 | 20 | # Panning - cut the volume a bit 21 | panning_left_mix = "0.75 0.0" 22 | panning_right_mix = "0.0 0.75" 23 | -------------------------------------------------------------------------------- /libretro-common/audio/dsp_filters/Chorus.dsp: -------------------------------------------------------------------------------- 1 | filters = 1 2 | filter0 = chorus 3 | 4 | # Controls the base delay of the chorus (milliseconds). 5 | # chorus_delay_ms = 25.0 6 | # 7 | # Controls the depth of the delay. The delay will vary between delay_ms +/- depth_ms. 8 | # chorus_depth_ms = 1.0 9 | # 10 | # Frequency of LFO which controls delay. 11 | # chorus_lfo_freq = 0.5 12 | # 13 | # Controls dry/wet-ness of effect. 1.0 = full chorus, 0.0 = no chorus. 14 | # chorus_drywet = 0.8 15 | -------------------------------------------------------------------------------- /libretro-common/audio/dsp_filters/Crystalizer.dsp: -------------------------------------------------------------------------------- 1 | filters = 1 2 | filter0 = crystalizer 3 | # Controls dry/wet-ness of effect. 0.0 = none, 10.0 = max. 4 | crystalizer_intensity = 5.0 5 | -------------------------------------------------------------------------------- /libretro-common/audio/dsp_filters/Echo.dsp: -------------------------------------------------------------------------------- 1 | filters = 1 2 | filter0 = echo 3 | 4 | # Somewhat fancy Echo filter. Can take any number of echo channels with varying delays (ms) and feedback factors. 5 | # Echo output from all channels can be fed back into each other to create a somewhat reverb-like effect if desired. 6 | 7 | # Defaults, 200 ms delay echo with feedback: 8 | # Delay in ms. Takes an array with multiple channels. 9 | # echo_delay = "200" 10 | # Feedback factor for echo. 11 | # echo_feedback = "0.5" 12 | # Overall echo amplification. If too high, the echo becomes unstable due to feedback. 13 | # echo_amp = "0.2" 14 | 15 | # Reverby preset. 16 | # echo_delay = " 60 80 120 172 200 320 380" 17 | # echo_feedback = "0.5 0.5 0.4 0.3 0.5 0.3 0.2" 18 | 19 | # echo_amp = "0.12" 20 | -------------------------------------------------------------------------------- /libretro-common/audio/dsp_filters/EchoReverb.dsp: -------------------------------------------------------------------------------- 1 | filters = 2 2 | filter0 = echo 3 | filter1 = reverb 4 | 5 | echo_delay = "200" 6 | echo_feedback = "0.6" 7 | echo_amp = "0.25" 8 | 9 | reverb_roomwidth = 0.75 10 | reverb_roomsize = 0.75 11 | reverb_damping = 1.0 12 | reverb_wettime = 0.3 13 | -------------------------------------------------------------------------------- /libretro-common/audio/dsp_filters/HighShelfDampen.dsp: -------------------------------------------------------------------------------- 1 | filters = 1 2 | filter0 = iir 3 | 4 | iir_gain = -12.0 5 | iir_type = HSH 6 | iir_frequency = 8000.0 7 | -------------------------------------------------------------------------------- /libretro-common/audio/dsp_filters/IIR.dsp: -------------------------------------------------------------------------------- 1 | filters = 1 2 | filter0 = iir 3 | 4 | # Defaults. 5 | #iir_frequency = 1024.0 6 | #iir_quality = 0.707 7 | #iir_gain = 0.0 8 | #iir_type = LPF 9 | 10 | # Filter types: 11 | # LPF: Low-pass 12 | # HPF: High-pass 13 | # BPCSGF: Band-pass #1 14 | # BPZPGF: Band-pass #2 15 | # APF: Allpass 16 | # NOTCH: Notch filter 17 | # RIAA_phono: RIAA record/tape deemphasis 18 | # PEQ: peaking band EQ 19 | # BBOOST: Bassboost 20 | # LSH: Low-shelf 21 | # HSH: High-shelf 22 | # RIAA_CD: CD de-emphasis 23 | -------------------------------------------------------------------------------- /libretro-common/audio/dsp_filters/Mono.dsp: -------------------------------------------------------------------------------- 1 | filters = 1 2 | filter0 = panning 3 | 4 | # Gains are linear. 5 | 6 | # Stereo Mono: 7 | panning_left_mix = "0.5 0.5" 8 | panning_right_mix = "0.5 0.5" 9 | 10 | # Mono on one speaker: 11 | # panning_left_mix = "0.5 0.5" 12 | # panning_right_mix = "0.0 0.0" 13 | -------------------------------------------------------------------------------- /libretro-common/audio/dsp_filters/Panning.dsp: -------------------------------------------------------------------------------- 1 | filters = 1 2 | filter0 = panning 3 | 4 | # Gains are linear. 5 | 6 | # The default. Left and right channels map to each other. 7 | panning_left_mix = "1.0 0.0" 8 | panning_right_mix = "0.0 1.0" 9 | 10 | # Some examples: 11 | # 12 | # Mono: 13 | # panning_left_mix = "0.5 0.5" 14 | # panning_right_mix = "0.5 0.5" 15 | 16 | # Swap left and right channels: 17 | # panning_left_mix = "0.0 1.0" 18 | # panning_right_mix = "1.0 0.0" 19 | # 20 | # Mono on one speaker: 21 | # panning_left_mix = "0.5 0.5" 22 | # panning_right_mix = "0.0 0.0" 23 | -------------------------------------------------------------------------------- /libretro-common/audio/dsp_filters/Phaser.dsp: -------------------------------------------------------------------------------- 1 | filters = 1 2 | filter0 = phaser 3 | 4 | # Defaults. 5 | # phaser_lfo_freq = 0.4 6 | # phaser_lfo_start_phase = 0.0 7 | # phaser_feedback = 0.0 8 | # phaser_depth = 0.4 9 | # phaser_dry_wet = 0.5 10 | # phaser_stages = 2 11 | -------------------------------------------------------------------------------- /libretro-common/audio/dsp_filters/Reverb.dsp: -------------------------------------------------------------------------------- 1 | filters = 1 2 | filter0 = reverb 3 | 4 | # Defaults. 5 | # reverb_drytime = 0.43 6 | # reverb_wettime = 0.4 7 | # reverb_damping = 0.8 8 | # reverb_roomwidth = 0.56 9 | # reverb_roomsize = 0.56 10 | -------------------------------------------------------------------------------- /libretro-common/audio/dsp_filters/Tremolo.dsp: -------------------------------------------------------------------------------- 1 | filters = 1 2 | filter0 = tremolo 3 | 4 | # Defaults. 5 | #tremolo_frequency = 4.0 6 | #tremolo_depth = 0.9 7 | -------------------------------------------------------------------------------- /libretro-common/audio/dsp_filters/Vibrato.dsp: -------------------------------------------------------------------------------- 1 | filters = 1 2 | filter0 = vibrato 3 | 4 | # Defaults. 5 | #vibrato_frequency = 5.0 6 | #vibrato_depth = 0.5 7 | -------------------------------------------------------------------------------- /libretro-common/audio/dsp_filters/WahWah.dsp: -------------------------------------------------------------------------------- 1 | filters = 1 2 | filter0 = wahwah 3 | 4 | # Defaults. 5 | # wahwah_lfo_freq = 1.5 6 | # wahwah_lfo_start_phase = 0.0 7 | # wahwah_freq_offset = 0.3 8 | # wahwah_depth = 0.7 9 | # wahwah_resonance = 2.5 10 | -------------------------------------------------------------------------------- /libretro-common/audio/dsp_filters/configure: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | PACKAGE_NAME=retroarch-filters-audio -------------------------------------------------------------------------------- /libretro-common/audio/dsp_filters/link.T: -------------------------------------------------------------------------------- 1 | { 2 | global: dspfilter_get_implementation; 3 | local: *; 4 | }; 5 | -------------------------------------------------------------------------------- /libretro-common/crt/include/string.h: -------------------------------------------------------------------------------- 1 | #ifndef __LIBRETRO_SDK_CRT_STRING_H_ 2 | #define __LIBRETRO_SDK_CRT_STRING_H_ 3 | 4 | #include 5 | 6 | void *memcpy(void *dst, const void *src, size_t len); 7 | 8 | void *memset(void *b, int c, size_t len); 9 | 10 | #endif 11 | -------------------------------------------------------------------------------- /libretro-common/crt/string.c: -------------------------------------------------------------------------------- 1 | #ifdef _MSC_VER 2 | #include 3 | #endif 4 | #include 5 | #include 6 | 7 | void *memset(void *dst, int val, size_t count) 8 | { 9 | void *start = dst; 10 | 11 | #if defined(_M_IA64) || defined (_M_AMD64) || defined(_M_ALPHA) || defined (_M_PPC) 12 | extern void RtlFillMemory(void *, size_t count, char); 13 | 14 | RtlFillMemory(dst, count, (char)val); 15 | #else 16 | while (count--) 17 | { 18 | *(char*)dst = (char)val; 19 | dst = (char*)dst + 1; 20 | } 21 | #endif 22 | 23 | return start; 24 | } 25 | 26 | void *memcpy(void *dst, const void *src, size_t len) 27 | { 28 | size_t i; 29 | 30 | for (i = 0; i < len; i++) 31 | ((unsigned char *)dst)[i] = ((unsigned char *)src)[i]; 32 | 33 | return dst; 34 | } 35 | -------------------------------------------------------------------------------- /libretro-common/formats/xml/test/Makefile: -------------------------------------------------------------------------------- 1 | TARGET := rxml 2 | 3 | LIBRETRO_XML_DIR := .. 4 | LIBRETRO_COMM_DIR := ../../.. 5 | 6 | SOURCES := \ 7 | rxml_test.c \ 8 | $(LIBRETRO_XML_DIR)/rxml.c \ 9 | $(LIBRETRO_COMM_DIR)/streams/file_stream.c 10 | 11 | OBJS := $(SOURCES:.c=.o) 12 | 13 | CFLAGS += -DRXML_TEST -Wall -pedantic -std=gnu99 -g -I$(LIBRETRO_COMM_DIR)/include 14 | 15 | all: $(TARGET) 16 | 17 | %.o: %.c 18 | $(CC) -c -o $@ $< $(CFLAGS) 19 | 20 | $(TARGET): $(OBJS) 21 | $(CC) -o $@ $^ $(LDFLAGS) 22 | 23 | clean: 24 | rm -f $(TARGET) $(OBJS) 25 | 26 | .PHONY: clean 27 | -------------------------------------------------------------------------------- /libretro-common/glsym/README.md: -------------------------------------------------------------------------------- 1 | # Autogenerate GL extension loaders 2 | 3 | ## OpenGL desktop 4 | 5 | Use Khronos' recent [header](www.opengl.org/registry/api/glext.h). 6 | 7 | ./glgen.py /usr/include/GL/glext.h glsym_gl.h glsym_gl.c 8 | 9 | ## OpenGL ES 10 | 11 | ./glgen.py /usr/include/GLES2/gl2ext.h glsym_es2.h glsym_es2.c 12 | -------------------------------------------------------------------------------- /libretro-common/include/libchdr/coretypes.h: -------------------------------------------------------------------------------- 1 | #ifndef __CORETYPES_H__ 2 | #define __CORETYPES_H__ 3 | 4 | #include 5 | #include 6 | #include 7 | 8 | typedef uint64_t UINT64; 9 | #ifndef OSD_CPU_H 10 | typedef uint32_t UINT32; 11 | typedef uint16_t UINT16; 12 | typedef uint8_t UINT8; 13 | #endif 14 | 15 | typedef int64_t INT64; 16 | #ifndef OSD_CPU_H 17 | typedef int32_t INT32; 18 | typedef int16_t INT16; 19 | typedef int8_t INT8; 20 | #endif 21 | 22 | #endif 23 | -------------------------------------------------------------------------------- /libretro-common/include/libchdr/minmax.h: -------------------------------------------------------------------------------- 1 | /* license:BSD-3-Clause 2 | * copyright-holders:Aaron Giles 3 | *************************************************************************** 4 | 5 | minmax.h 6 | 7 | ***************************************************************************/ 8 | 9 | #pragma once 10 | 11 | #ifndef __MINMAX_H__ 12 | #define __MINMAX_H__ 13 | 14 | #if defined(RARCH_INTERNAL) || defined(__LIBRETRO__) 15 | #include 16 | #else 17 | #define MAX(x, y) (((x) > (y)) ? (x) : (y)) 18 | #define MIN(x, y) ((x) < (y) ? (x) : (y)) 19 | #endif 20 | 21 | #endif 22 | -------------------------------------------------------------------------------- /libretro-common/libco/genode.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | libco.genode_secondary_stack (2018-09-15) 3 | author: Emery Hemingway 4 | license: public domain 5 | */ 6 | 7 | /* Genode include */ 8 | #include 9 | 10 | /* Libco include */ 11 | #include 12 | 13 | extern "C" 14 | void *genode_alloc_secondary_stack(unsigned long stack_size) 15 | { 16 | try { 17 | return Genode::Thread::myself()->alloc_secondary_stack("libco", stack_size); } 18 | catch (...) { 19 | Genode::error("libco: failed to allocate ", stack_size, " byte secondary stack"); 20 | return nullptr; 21 | } 22 | 23 | } 24 | 25 | extern "C" 26 | void genode_free_secondary_stack(void *stack) 27 | { 28 | Genode::Thread::myself()->free_secondary_stack(stack); 29 | } 30 | -------------------------------------------------------------------------------- /libretro-common/libco/libco.c: -------------------------------------------------------------------------------- 1 | /* 2 | libco 3 | auto-selection module 4 | license: public domain 5 | */ 6 | 7 | #ifdef __GENODE__ 8 | void *genode_alloc_secondary_stack(unsigned long stack_size); 9 | void genode_free_secondary_stack(void *stack); 10 | #endif 11 | 12 | #if defined _MSC_VER 13 | #include 14 | #if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) 15 | #include "fiber.c" 16 | #elif defined _M_IX86 17 | #include "x86.c" 18 | #elif defined _M_AMD64 19 | #include "amd64.c" 20 | #else 21 | #include "fiber.c" 22 | #endif 23 | #elif defined __GNUC__ 24 | #if defined __i386__ 25 | #include "x86.c" 26 | #elif defined __amd64__ 27 | #include "amd64.c" 28 | #elif defined _ARCH_PPC 29 | #include "ppc.c" 30 | #elif defined(__aarch64__) 31 | #include "aarch64.c" 32 | #elif defined VITA 33 | #include "scefiber.c" 34 | #elif defined(__ARM_EABI__) || defined(__arm__) 35 | #include "armeabi.c" 36 | #else 37 | #include "sjlj.c" 38 | #endif 39 | #else 40 | #error "libco: unsupported processor, compiler or operating system" 41 | #endif 42 | -------------------------------------------------------------------------------- /libretro-common/samples/file/nbio/Makefile: -------------------------------------------------------------------------------- 1 | TARGET := nbio_test 2 | 3 | LIBRETRO_COMM_DIR := ../../.. 4 | 5 | SOURCES := \ 6 | nbio_test.c \ 7 | $(LIBRETRO_COMM_DIR)/compat/fopen_utf8.c \ 8 | $(LIBRETRO_COMM_DIR)/compat/compat_strl.c \ 9 | $(LIBRETRO_COMM_DIR)/encodings/encoding_utf.c \ 10 | $(LIBRETRO_COMM_DIR)/file/nbio/nbio_intf.c \ 11 | $(LIBRETRO_COMM_DIR)/file/nbio/nbio_linux.c \ 12 | $(LIBRETRO_COMM_DIR)/file/nbio/nbio_unixmmap.c \ 13 | $(LIBRETRO_COMM_DIR)/file/nbio/nbio_windowsmmap.c \ 14 | $(LIBRETRO_COMM_DIR)/file/nbio/nbio_stdio.c 15 | 16 | OBJS := $(SOURCES:.c=.o) 17 | 18 | CFLAGS += -Wall -pedantic -std=gnu99 -g -I$(LIBRETRO_COMM_DIR)/include 19 | 20 | all: $(TARGET) 21 | 22 | %.o: %.c 23 | $(CC) -c -o $@ $< $(CFLAGS) 24 | 25 | $(TARGET): $(OBJS) 26 | $(CC) -o $@ $^ $(LDFLAGS) 27 | 28 | clean: 29 | rm -f $(TARGET) $(OBJS) 30 | 31 | .PHONY: clean 32 | -------------------------------------------------------------------------------- /libretro-common/samples/net/http_test: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/paraLLeXT/41567a669252e7af3dcaf75616dc83ec0a11847f/libretro-common/samples/net/http_test -------------------------------------------------------------------------------- /libretro-common/samples/net/net_ifinfo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/paraLLeXT/41567a669252e7af3dcaf75616dc83ec0a11847f/libretro-common/samples/net/net_ifinfo -------------------------------------------------------------------------------- /libretro-common/utils/crc32.c: -------------------------------------------------------------------------------- 1 | /* gcc -O3 -o crc32 crc32.c -lz */ 2 | 3 | #include 4 | #include 5 | #include 6 | 7 | #include 8 | 9 | int main(int argc, const char* argv[]) 10 | { 11 | if (argc != 2 ) 12 | { 13 | fprintf( stderr, "Usage: crc32 \n" ); 14 | return 1; 15 | } 16 | 17 | FILE *file = fopen(argv[1], "rb"); 18 | 19 | if (file) 20 | { 21 | uint32_t crc = encoding_crc32(0L, NULL, 0 ); 22 | 23 | for (;;) 24 | { 25 | uint8_t buffer[16384]; 26 | 27 | int numread = fread((void*)buffer, 1, sizeof(buffer), file); 28 | 29 | if (numread > 0) 30 | crc = encoding_crc32( crc, buffer, numread ); 31 | else 32 | break; 33 | } 34 | 35 | fclose(file); 36 | 37 | printf("%08x\n", crc); 38 | return 0; 39 | } 40 | 41 | fprintf(stderr, "Error opening input file: %s\n", strerror(errno)); 42 | return 1; 43 | } 44 | -------------------------------------------------------------------------------- /libretro-common/utils/djb2.c: -------------------------------------------------------------------------------- 1 | /* public domain */ 2 | /* gcc -O3 -o djb2 djb2.c */ 3 | 4 | #include 5 | #include 6 | 7 | static uint32_t djb2(const char* str) 8 | { 9 | const unsigned char* aux = (const unsigned char*)str; 10 | uint32_t hash = 5381; 11 | 12 | while (*aux) 13 | hash = (hash << 5) + hash + *aux++; 14 | 15 | return hash; 16 | } 17 | 18 | int main(int argc, const char* argv[]) 19 | { 20 | int i; 21 | 22 | for (i = 1; i < argc; i++) 23 | printf( "0x%08xU: %s\n", djb2( argv[ i ] ), argv[ i ] ); 24 | 25 | return 0; 26 | } 27 | -------------------------------------------------------------------------------- /libretro/jni/Application.mk: -------------------------------------------------------------------------------- 1 | APP_ABI := arm64-v8a 2 | APP_STL := gnustl_static 3 | APP_SHORT_COMMANDS := true 4 | NDK_TOOLCHAIN_VERSION := 4.9 5 | -------------------------------------------------------------------------------- /libretro/libretro_memory.h: -------------------------------------------------------------------------------- 1 | #ifndef M64P_LIBRETRO_MEMORY_H 2 | #define M64P_LIBRETRO_MEMORY_H 3 | 4 | #include 5 | #define EEPROM_MAX_SIZE 0x800 6 | #include 7 | #include 8 | #include 9 | 10 | typedef struct _save_memory_data 11 | { 12 | uint8_t eeprom[EEPROM_MAX_SIZE]; 13 | uint8_t mempack[MEMPAK_SIZE * 4]; 14 | uint8_t sram[SRAM_SIZE]; 15 | uint8_t flashram[FLASHRAM_SIZE]; 16 | } save_memory_data; 17 | 18 | extern save_memory_data saved_memory; 19 | 20 | #endif 21 | -------------------------------------------------------------------------------- /libretro/libretro_perf.h: -------------------------------------------------------------------------------- 1 | #ifndef _LIBRETRO_PERF_H 2 | #define _LIBRETRO_PERF_H 3 | 4 | #include "libretro.h" 5 | 6 | #ifdef __cplusplus 7 | extern "C" { 8 | #endif 9 | 10 | extern struct retro_perf_callback perf_cb; 11 | 12 | #if 1 13 | #define RETRO_PERFORMANCE_INIT(perf_cb, name) static struct retro_perf_counter name = {#name}; if (!name.registered) perf_cb.perf_register(&(name)) 14 | #define RETRO_PERFORMANCE_START(perf_cb, name) perf_cb.perf_start(&(name)) 15 | #define RETRO_PERFORMANCE_STOP(perf_cb, name) perf_cb.perf_stop(&(name)) 16 | #else 17 | #define RETRO_PERFORMANCE_INIT(perf_cb, name) 18 | #define RETRO_PERFORMANCE_START(perf_cb, name) 19 | #define RETRO_PERFORMANCE_STOP(perf_cb, name) 20 | #endif 21 | 22 | #ifdef __cplusplus 23 | } 24 | #endif 25 | 26 | #endif 27 | -------------------------------------------------------------------------------- /libretro/libretro_private.h: -------------------------------------------------------------------------------- 1 | #ifndef _LIBRETRO_PRIVATE_H_ 2 | #define _LIBRETRO_PRIVATE_H_ 3 | 4 | #include 5 | #include 6 | #include "libretro.h" 7 | #include "libretro_perf.h" 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | extern unsigned int FAKE_SDL_TICKS; 14 | 15 | extern retro_get_cpu_features_t perf_get_cpu_features_cb; 16 | extern retro_perf_get_counter_t perf_get_counter_cb; 17 | extern retro_log_printf_t log_cb; 18 | extern retro_perf_register_t perf_register_cb; 19 | extern bool libretro_swap_buffer; 20 | extern void retro_return(); 21 | 22 | #define SDL_GetTicks() FAKE_SDL_TICKS 23 | 24 | #ifdef __cplusplus 25 | } 26 | #endif 27 | 28 | #ifdef _MSC_VER 29 | #define strcasecmp stricmp 30 | #endif 31 | 32 | 33 | #endif 34 | -------------------------------------------------------------------------------- /libretro/link.T: -------------------------------------------------------------------------------- 1 | { 2 | global: retro_*; 3 | local: *; 4 | }; 5 | 6 | -------------------------------------------------------------------------------- /mupen64plus-core/.gitattributes: -------------------------------------------------------------------------------- 1 | * text=auto 2 | 3 | # normal text files 4 | *.6 text 5 | AUTHORS text 6 | *.c text 7 | *.cfg text 8 | *.cht text 9 | *.conf text 10 | COPYING text 11 | *.cpp text 12 | *.def text 13 | *-license text 14 | *.h text 15 | *.html text 16 | *.ini text 17 | INSTALL text 18 | LICENSES text 19 | Makefile text 20 | *.py text 21 | README text 22 | RELEASE text 23 | *.S text 24 | *.sh text 25 | *.txt text 26 | *.ver text 27 | 28 | # windows specific text files 29 | *.sln text eol=crlf 30 | *.vcproj text eol=crlf 31 | *.vcxproj text eol=crlf 32 | *.vcxproj.filters text eol=crlf 33 | 34 | # binary files 35 | *.gz binary 36 | *.ttf binary 37 | cursor.tex binary 38 | font.tex binary 39 | -------------------------------------------------------------------------------- /mupen64plus-core/.gitignore: -------------------------------------------------------------------------------- 1 | /projects/unix/_obj*/ 2 | /projects/unix/libmupen64plus*.so* 3 | -------------------------------------------------------------------------------- /mupen64plus-core/.gitrepo: -------------------------------------------------------------------------------- 1 | ; DO NOT EDIT (unless you know what you are doing) 2 | ; 3 | ; This subdirectory is a git "subrepo", and this file is maintained by the 4 | ; git-subrepo command. See https://github.com/git-commands/git-subrepo#readme 5 | ; 6 | [subrepo] 7 | remote = https://github.com/libretro/mupen64plus-core.git 8 | branch = master 9 | commit = 7a0c2c03a5f19a0e158e19ea5b78dc0a172c92b0 10 | parent = 1c7c9148952a68bbaae74043faf1c223896cd332 11 | method = rebase 12 | cmdver = 0.4.0 13 | -------------------------------------------------------------------------------- /mupen64plus-core/INSTALL: -------------------------------------------------------------------------------- 1 | Mupen64Plus-Core INSTALL 2 | ------------------------ 3 | 4 | This text file was written to explain the installation process of the 5 | Mupen64Plus-Core module. 6 | 7 | If this module is part of a Mupen64Plus source code bundle, the user should run 8 | the "m64p_install.sh" script in the root of the unzipped bundle to install all 9 | of the included modules in the bundle. 10 | 11 | If this module is a standalone source code release, you should build the library 12 | from source code and install it via the makefile, like this: 13 | 14 | $ cd projects/unix 15 | $ make all 16 | $ sudo make install 17 | 18 | If you want to build the Mupen64Plus-Core module for installation in a home 19 | folder for a single user, you may build it like this (replacing 20 | with your desired local installation path): 21 | 22 | $ cd projects/unix 23 | $ make all SHAREDIR= 24 | $ make install LIBDIR= SHAREDIR= 25 | 26 | 27 | -------------------------------------------------------------------------------- /mupen64plus-core/appveyor.yml: -------------------------------------------------------------------------------- 1 | version: 1.0.{build} 2 | 3 | configuration: 4 | - New_Dynarec_Release 5 | - Release 6 | platform: 7 | - x86 8 | - x64 9 | 10 | matrix: 11 | exclude: 12 | - platform: x64 13 | configuration: New_Dynarec_Release 14 | 15 | before_build: 16 | - cmd: git clone --depth 1 https://github.com/mupen64plus/mupen64plus-win32-deps.git ../mupen64plus-win32-deps 17 | build: 18 | project: projects/VisualStudio2013/mupen64plus-core.vcxproj 19 | verbosity: minimal 20 | -------------------------------------------------------------------------------- /mupen64plus-core/data/font.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/paraLLeXT/41567a669252e7af3dcaf75616dc83ec0a11847f/mupen64plus-core/data/font.ttf -------------------------------------------------------------------------------- /mupen64plus-core/doc/emuwiki-api-doc/Home.mediawiki: -------------------------------------------------------------------------------- 1 | =User Documentation= 2 | == Configuration Parameters == 3 | === [[Mupen64Plus Core Parameters|Core Parameters]] === 4 | 5 | This section lists the names and descriptions of all of the configuration parameters used by the Core library. 6 | 7 | === [[Mupen64Plus Plugin Parameters|Plugin Parameters]] === 8 | 9 | This section lists the names and descriptions of all of the configuration parameters used by the Plugin libraries. 10 | 11 | =Developer Documentation= 12 | 13 | == [[Mupen64Plus v2.0 Core API v1.0|Mupen64Plus v2.0 API]] == 14 | 15 | The interface between Mupen64Plus and its compatible plugins is (slightly) different from other N64 emulators. The new API is described in detail in the documentation here. 16 | 17 | -------------------------------------------------------------------------------- /mupen64plus-core/src/device/r4300/new_dynarec/x86/assem_x86.h: -------------------------------------------------------------------------------- 1 | #ifndef M64P_DEVICE_R4300_NEW_DYNAREC_X86_ASSEM_X86_H 2 | #define M64P_DEVICE_R4300_NEW_DYNAREC_X86_ASSEM_X86_H 3 | 4 | #define EAX 0 5 | #define ECX 1 6 | #define EDX 2 7 | #define EBX 3 8 | #define ESP 4 9 | #define EBP 5 10 | #define ESI 6 11 | #define EDI 7 12 | 13 | #define HOST_REGS 8 14 | #define HOST_CCREG ESI 15 | #define HOST_BTREG EBP 16 | #define EXCLUDE_REG ESP 17 | 18 | //#define IMM_PREFETCH 1 19 | #define HOST_IMM_ADDR32 1 20 | #define INVERTED_CARRY 1 21 | #define DESTRUCTIVE_WRITEBACK 1 22 | #define DESTRUCTIVE_SHIFT 1 23 | 24 | #define USE_MINI_HT 1 25 | 26 | #define TARGET_SIZE_2 25 // 2^25 = 32 megabytes 27 | #define JUMP_TABLE_SIZE 0 // Not needed for 32-bit x86 28 | 29 | /* x86 calling convention: 30 | caller-save: %eax %ecx %edx 31 | callee-save: %ebp %ebx %esi %edi */ 32 | 33 | #endif /* M64P_DEVICE_R4300_NEW_DYNAREC_X86_ASSEM_X86_H */ 34 | -------------------------------------------------------------------------------- /mupen64plus-core/tools/gen_asm_defines.awk: -------------------------------------------------------------------------------- 1 | BEGIN { 2 | nasm_file = dest_dir"/asm_defines_nasm.h"; 3 | gas_file = dest_dir"/asm_defines_gas.h"; 4 | } 5 | 6 | /@ASM_DEFINE offsetof_struct_[a-zA-Z_0-9]+ 0x[0-9a-fA-F]+/ { 7 | print "%define "$2" ("$3")" > nasm_file; 8 | print "#define "$2" ("$3")" > gas_file; 9 | } 10 | 11 | END {} 12 | -------------------------------------------------------------------------------- /mupen64plus-core/tools/joymodel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/paraLLeXT/41567a669252e7af3dcaf75616dc83ec0a11847f/mupen64plus-core/tools/joymodel.png -------------------------------------------------------------------------------- /mupen64plus-core/tools/m64p_helper_scripts.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/paraLLeXT/41567a669252e7af3dcaf75616dc83ec0a11847f/mupen64plus-core/tools/m64p_helper_scripts.tar.gz -------------------------------------------------------------------------------- /mupen64plus-core/tools/osx_build_instructions.txt: -------------------------------------------------------------------------------- 1 | Mupen64plus build under OSX 10.9.5 (Mavericks) with Xcode 6.1.1 2 | 3 | 1. Install command-line tools through xcode 4 | - Xcode --> Preferences... --> Downloads tab --> Components page --> Command Line Tools 5 | 2. Install mac ports 6 | - download page: http://www.macports.org/install.php 7 | - .pkg installer for Mavericks 8 | 3. Install Git via macports 9 | - command line: "sudo port install git” 10 | 4. Get m64p_helper_scripts.tar.gz from https://mupen64plus.org/wiki/index.php/CompilingFromGit 11 | - unzip into build folder 12 | - run "./m64p_get.sh" 13 | 5. Install other build dependencies: 14 | - sudo port install pkgconfig 15 | - sudo port install libpng 16 | - edit /opt/local/etc/macports/variants.conf: 17 | - add: +no_x11 +quartz 18 | - sudo port install libSDL2 19 | - sudo port install freetype 20 | - sudo port install boost 21 | 6. Run "./m64p_build.sh" 22 | 23 | -------------------------------------------------------------------------------- /mupen64plus-rsp-cxd4/rsp_dump.h: -------------------------------------------------------------------------------- 1 | #ifndef RSP_DUMP_H__ 2 | #define RSP_DUMP_H__ 3 | 4 | #include 5 | 6 | #ifdef __cplusplus 7 | extern "C" { 8 | #endif 9 | 10 | void rsp_open_trace(const char *path); 11 | void rsp_close_trace(void); 12 | 13 | void rsp_dump_begin_trace(void); 14 | void rsp_dump_end_trace(void); 15 | 16 | void rsp_dump_block(const char *tag, const void *data, size_t size); 17 | 18 | void rsp_dump_begin_read_dma(void); 19 | void rsp_dump_poke_mem(unsigned base, const void *data, size_t size); 20 | void rsp_dump_end_read_dma(void); 21 | 22 | int rsp_dump_recording_trace(void); 23 | 24 | #ifdef __cplusplus 25 | } 26 | #endif 27 | 28 | #endif 29 | -------------------------------------------------------------------------------- /mupen64plus-rsp-hle/.gitattributes: -------------------------------------------------------------------------------- 1 | * text=auto 2 | 3 | # normal text files 4 | *.6 text 5 | AUTHORS text 6 | *.c text 7 | *.cfg text 8 | *.cht text 9 | *.conf text 10 | COPYING text 11 | *.cpp text 12 | *.def text 13 | *-license text 14 | *.h text 15 | *.html text 16 | *.ini text 17 | INSTALL text 18 | LICENSES text 19 | Makefile text 20 | *.py text 21 | README text 22 | RELEASE text 23 | *.S text 24 | *.sh text 25 | *.txt text 26 | *.ver text 27 | 28 | # windows specific text files 29 | *.sln text eol=crlf 30 | *.vcproj text eol=crlf 31 | *.vcxproj text eol=crlf 32 | *.vcxproj.filters text eol=crlf 33 | 34 | # binary files 35 | *.gz binary 36 | *.ttf binary 37 | cursor.tex binary 38 | font.tex binary 39 | -------------------------------------------------------------------------------- /mupen64plus-rsp-hle/.gitignore: -------------------------------------------------------------------------------- 1 | /projects/unix/_obj*/ 2 | /projects/unix/mupen64plus-rsp-hle*.so 3 | -------------------------------------------------------------------------------- /mupen64plus-rsp-hle/.gitrepo: -------------------------------------------------------------------------------- 1 | ; DO NOT EDIT (unless you know what you are doing) 2 | ; 3 | ; This subdirectory is a git "subrepo", and this file is maintained by the 4 | ; git-subrepo command. See https://github.com/git-commands/git-subrepo#readme 5 | ; 6 | [subrepo] 7 | remote = https://github.com/libretro/mupen64plus-rsp-hle.git 8 | branch = master 9 | commit = 22d5d75e8ea0598ea7510cc193342d3300ec54d4 10 | parent = 8de141288d18408352ff0729d4771d939b904783 11 | method = rebase 12 | cmdver = 0.4.0 13 | -------------------------------------------------------------------------------- /mupen64plus-rsp-hle/INSTALL: -------------------------------------------------------------------------------- 1 | Mupen64Plus-RSP-HLE INSTALL 2 | --------------------------- 3 | 4 | This text file was written to explain the installation process of the 5 | Mupen64Plus-RSP-HLE plugin. 6 | 7 | If this module is part of a Mupen64Plus source code bundle, the user should run 8 | the "m64p_install.sh" script in the root of the unzipped bundle to install all 9 | of the included modules in the bundle. 10 | 11 | If this module is a standalone source code release, you should build the library 12 | from source code and install it via the makefile, like this: 13 | 14 | $ cd projects/unix 15 | $ make all 16 | $ sudo make install 17 | 18 | If you want to build the Mupen64Plus-RSP-HLE module for installation in a home 19 | folder for a single user, you may build it like this (replacing 20 | with your desired local installation path): 21 | 22 | $ cd projects/unix 23 | $ make all 24 | $ make install LIBDIR= 25 | 26 | 27 | -------------------------------------------------------------------------------- /mupen64plus-rsp-hle/src/rsp_api_export.ver: -------------------------------------------------------------------------------- 1 | { global: 2 | PluginStartup; 3 | PluginShutdown; 4 | PluginGetVersion; 5 | DoRspCycles; 6 | InitiateRSP; 7 | RomClosed; 8 | local: *; }; 9 | -------------------------------------------------------------------------------- /mupen64plus-rsp-paraLLEl/.gitignore: -------------------------------------------------------------------------------- 1 | *.o 2 | *.bin 3 | *.elf 4 | /cmake-build-* 5 | /.idea 6 | *.iml 7 | -------------------------------------------------------------------------------- /mupen64plus-rsp-paraLLEl/.gitrepo: -------------------------------------------------------------------------------- 1 | ; DO NOT EDIT (unless you know what you are doing) 2 | ; 3 | ; This subdirectory is a git "subrepo", and this file is maintained by the 4 | ; git-subrepo command. See https://github.com/git-commands/git-subrepo#readme 5 | ; 6 | [subrepo] 7 | remote = https://github.com/Themaister/parallel-rsp.git 8 | branch = master 9 | commit = b1b3839c7c3f1440e12131775ff785ae07bcd46e 10 | parent = dbdea196d7656bb3f25eb052ea707f5c6c7176c9 11 | method = rebase 12 | cmdver = 0.4.0 13 | -------------------------------------------------------------------------------- /mupen64plus-rsp-paraLLEl/CREDITS.txt: -------------------------------------------------------------------------------- 1 | Written by Themaister. 2 | 3 | The code is heavily reliant on MarathonMan's CEN64 RSP implementation, as well as CXD4's RSP implementation. 4 | 5 | MIPS core: Rewritten from scratch 6 | CP0: Near copy-pasta from CEN64 7 | CP2: Near copy-pasta from CEN64 8 | LS pipe: Near copy-pasta from CXD4 9 | Mupen64plus glue code: Reused most of CXD4. 10 | Lightning jitter interface: Written from scratch 11 | 12 | The plugin's focus is to support dynamic recompilation for performance, 13 | instead of being pure interpreters as CEN64 and CXD4's implementations are. 14 | -------------------------------------------------------------------------------- /mupen64plus-rsp-paraLLEl/arch/x86_64/rsp/rsp_impl.h: -------------------------------------------------------------------------------- 1 | #ifndef RSP_IMPL_H 2 | #define RSP_IMPL_H 3 | 4 | #include "clamp.h" 5 | #include "vabs.h" 6 | #include "vadd.h" 7 | #include "vaddc.h" 8 | #include "vand.h" 9 | #include "vch.h" 10 | #include "vcl.h" 11 | #include "vcmp.h" 12 | #include "vcr.h" 13 | #include "vdivh.h" 14 | #include "vmac.h" 15 | #include "vmov.h" 16 | #include "vmrg.h" 17 | #include "vmul.h" 18 | #include "vmulh.h" 19 | #include "vmull.h" 20 | #include "vmulm.h" 21 | #include "vmuln.h" 22 | #include "vor.h" 23 | #include "vrcpsq.h" 24 | #include "vrsq.h" 25 | #include "vsub.h" 26 | #include "vsubc.h" 27 | #include "vxor.h" 28 | 29 | #endif 30 | -------------------------------------------------------------------------------- /mupen64plus-rsp-paraLLEl/arch/x86_64/rsp/vabs.h: -------------------------------------------------------------------------------- 1 | // 2 | // arch/x86_64/rsp/vabs.h 3 | // 4 | // This file is subject to the terms and conditions defined in 5 | // 'LICENSE', which is part of this source code package. 6 | // 7 | 8 | static inline __m128i rsp_vabs(__m128i vs, __m128i vt, __m128i *acc_lo) 9 | { 10 | __m128i vs_zero = _mm_cmpeq_epi16(vs, _mm_setzero_si128()); 11 | __m128i sign_lt = _mm_srai_epi16(vs, 15); 12 | __m128i vd = _mm_andnot_si128(vs_zero, vt); 13 | 14 | // Careful: if VT = 0x8000 and VS is negative, 15 | // acc_lo will be 0x8000 but vd will be 0x7FFF. 16 | vd = _mm_xor_si128(vd, sign_lt); 17 | *acc_lo = _mm_sub_epi16(vd, sign_lt); 18 | return _mm_subs_epi16(vd, sign_lt); 19 | } 20 | -------------------------------------------------------------------------------- /mupen64plus-rsp-paraLLEl/arch/x86_64/rsp/vadd.h: -------------------------------------------------------------------------------- 1 | // 2 | // arch/x86_64/rsp/vadd.h 3 | // 4 | // This file is subject to the terms and conditions defined in 5 | // 'LICENSE', which is part of this source code package. 6 | // 7 | 8 | static inline __m128i rsp_vadd(__m128i vs, __m128i vt, __m128i carry, __m128i *acc_lo) 9 | { 10 | __m128i vd, minimum, maximum; 11 | 12 | // VCC uses unsaturated arithmetic. 13 | vd = _mm_add_epi16(vs, vt); 14 | *acc_lo = _mm_sub_epi16(vd, carry); 15 | 16 | // VD is the signed sum of the two sources and the carry. Since we 17 | // have to saturate the sum of all three, we have to be clever. 18 | minimum = _mm_min_epi16(vs, vt); 19 | maximum = _mm_max_epi16(vs, vt); 20 | minimum = _mm_subs_epi16(minimum, carry); 21 | return _mm_adds_epi16(minimum, maximum); 22 | } 23 | -------------------------------------------------------------------------------- /mupen64plus-rsp-paraLLEl/arch/x86_64/rsp/vaddc.h: -------------------------------------------------------------------------------- 1 | // 2 | // arch/x86_64/rsp/vaddc.h 3 | // 4 | // This file is subject to the terms and conditions defined in 5 | // 'LICENSE', which is part of this source code package. 6 | // 7 | 8 | static inline __m128i rsp_vaddc(__m128i vs, __m128i vt, __m128i zero, __m128i *sn) 9 | { 10 | __m128i sat_sum, unsat_sum; 11 | 12 | sat_sum = _mm_adds_epu16(vs, vt); 13 | unsat_sum = _mm_add_epi16(vs, vt); 14 | 15 | *sn = _mm_cmpeq_epi16(sat_sum, unsat_sum); 16 | *sn = _mm_cmpeq_epi16(*sn, zero); 17 | 18 | return unsat_sum; 19 | } 20 | -------------------------------------------------------------------------------- /mupen64plus-rsp-paraLLEl/arch/x86_64/rsp/vand.h: -------------------------------------------------------------------------------- 1 | // 2 | // arch/x86_64/rsp/vand.h 3 | // 4 | // This file is subject to the terms and conditions defined in 5 | // 'LICENSE', which is part of this source code package. 6 | // 7 | 8 | static inline __m128i rsp_vand(__m128i vs, __m128i vt) 9 | { 10 | return _mm_and_si128(vs, vt); 11 | } 12 | 13 | static inline __m128i rsp_vnand(__m128i vs, __m128i vt) 14 | { 15 | __m128i vd = _mm_and_si128(vs, vt); 16 | return _mm_xor_si128(vd, _mm_set1_epi32(0xffffffffu)); 17 | } 18 | -------------------------------------------------------------------------------- /mupen64plus-rsp-paraLLEl/arch/x86_64/rsp/vdivh.h: -------------------------------------------------------------------------------- 1 | // 2 | // arch/x86_64/rsp/vrcp.c 3 | // 4 | // This file is subject to the terms and conditions defined in 5 | // 'LICENSE', which is part of this source code package. 6 | // 7 | 8 | inline __m128i rsp_vdivh(RSP::CPUState *rsp, unsigned src, unsigned e, unsigned dest, unsigned de) 9 | { 10 | 11 | // Get the element from VT. 12 | rsp->cp2.div_in = rsp->cp2.regs[src].e[e & 0x7]; 13 | 14 | // Write out the upper part of the result. 15 | rsp->cp2.regs[dest].e[de & 0x7] = rsp->cp2.div_out; 16 | return rsp_vect_load_unshuffled_operand(rsp->cp2.regs[dest].e); 17 | } 18 | -------------------------------------------------------------------------------- /mupen64plus-rsp-paraLLEl/arch/x86_64/rsp/vmov.h: -------------------------------------------------------------------------------- 1 | // 2 | // arch/x86_64/rsp/vmov.c 3 | // 4 | // This file is subject to the terms and conditions defined in 5 | // 'LICENSE', which is part of this source code package. 6 | // 7 | 8 | inline __m128i rsp_vmov(RSP::CPUState *rsp, unsigned src, unsigned e, unsigned dest, unsigned de) 9 | { 10 | uint16_t data; 11 | 12 | // Get the element from VT. 13 | data = rsp->cp2.regs[src].e[e & 0x7]; 14 | 15 | // Write out the upper part of the result. 16 | rsp->cp2.regs[dest].e[de & 0x7] = data; 17 | return rsp_vect_load_unshuffled_operand(rsp->cp2.regs[dest].e); 18 | } 19 | -------------------------------------------------------------------------------- /mupen64plus-rsp-paraLLEl/arch/x86_64/rsp/vmrg.h: -------------------------------------------------------------------------------- 1 | // 2 | // arch/x86_64/rsp/vmrg.h 3 | // 4 | // This file is subject to the terms and conditions defined in 5 | // 'LICENSE', which is part of this source code package. 6 | // 7 | 8 | static inline __m128i rsp_vmrg(__m128i vs, __m128i vt, __m128i le) 9 | { 10 | #ifdef __SSE4_1__ 11 | return _mm_blendv_epi8(vt, vs, le); 12 | #else 13 | vs = _mm_and_si128(le, vs); 14 | vt = _mm_andnot_si128(le, vt); 15 | return _mm_or_si128(vs, vt); 16 | #endif 17 | } 18 | -------------------------------------------------------------------------------- /mupen64plus-rsp-paraLLEl/arch/x86_64/rsp/vmudh.h: -------------------------------------------------------------------------------- 1 | // 2 | // arch/x86_64/rsp/vmudh.h 3 | // 4 | // This file is subject to the terms and conditions defined in 5 | // 'LICENSE', which is part of this source code package. 6 | // 7 | 8 | static inline __m128i rsp_vmudh(__m128i vs, __m128i vt, __m128i *acc_md, __m128i *acc_hi) 9 | { 10 | *acc_md = _mm_mullo_epi16(vs, vt); 11 | *acc_hi = _mm_mulhi_epi16(vs, vt); 12 | 13 | return rsp_sclamp_acc_tomd(*acc_md, *acc_hi); 14 | } 15 | -------------------------------------------------------------------------------- /mupen64plus-rsp-paraLLEl/arch/x86_64/rsp/vor.h: -------------------------------------------------------------------------------- 1 | // 2 | // arch/x86_64/rsp/vor.h 3 | // 4 | // This file is subject to the terms and conditions defined in 5 | // 'LICENSE', which is part of this source code package. 6 | // 7 | 8 | static inline __m128i rsp_vor(__m128i vs, __m128i vt) 9 | { 10 | return _mm_or_si128(vs, vt); 11 | } 12 | 13 | static inline __m128i rsp_vnor(__m128i vs, __m128i vt) 14 | { 15 | __m128i vd = _mm_or_si128(vs, vt); 16 | return _mm_xor_si128(vd, _mm_set1_epi32(0xffffffffu)); 17 | } 18 | -------------------------------------------------------------------------------- /mupen64plus-rsp-paraLLEl/arch/x86_64/rsp/vsub.h: -------------------------------------------------------------------------------- 1 | // 2 | // arch/x86_64/rsp/vsub.h 3 | // 4 | // This file is subject to the terms and conditions defined in 5 | // 'LICENSE', which is part of this source code package. 6 | // 7 | 8 | static inline __m128i rsp_vsub(__m128i vs, __m128i vt, __m128i carry, __m128i *acc_lo) 9 | { 10 | __m128i unsat_diff, sat_diff, overflow, vd; 11 | 12 | // acc_lo uses saturated arithmetic. 13 | unsat_diff = _mm_sub_epi16(vt, carry); 14 | sat_diff = _mm_subs_epi16(vt, carry); 15 | 16 | *acc_lo = _mm_sub_epi16(vs, unsat_diff); 17 | vd = _mm_subs_epi16(vs, sat_diff); 18 | 19 | // VD is the signed diff of the two sources and the carry. Since we 20 | // have to saturate the diff of all three, we have to be clever. 21 | overflow = _mm_cmpgt_epi16(sat_diff, unsat_diff); 22 | return _mm_adds_epi16(vd, overflow); 23 | } 24 | -------------------------------------------------------------------------------- /mupen64plus-rsp-paraLLEl/arch/x86_64/rsp/vsubc.h: -------------------------------------------------------------------------------- 1 | // 2 | // arch/x86_64/rsp/vsubc.h 3 | // 4 | // This file is subject to the terms and conditions defined in 5 | // 'LICENSE', which is part of this source code package. 6 | // 7 | 8 | static inline __m128i rsp_vsubc(__m128i vs, __m128i vt, __m128i zero, __m128i *eq, __m128i *sn) 9 | { 10 | __m128i equal, sat_udiff, sat_udiff_zero; 11 | 12 | sat_udiff = _mm_subs_epu16(vs, vt); 13 | equal = _mm_cmpeq_epi16(vs, vt); 14 | sat_udiff_zero = _mm_cmpeq_epi16(sat_udiff, zero); 15 | 16 | *eq = _mm_cmpeq_epi16(equal, zero); 17 | *sn = _mm_andnot_si128(equal, sat_udiff_zero); 18 | 19 | return _mm_sub_epi16(vs, vt); 20 | } 21 | -------------------------------------------------------------------------------- /mupen64plus-rsp-paraLLEl/arch/x86_64/rsp/vxor.h: -------------------------------------------------------------------------------- 1 | // 2 | // arch/x86_64/rsp/vxor.h 3 | // 4 | // This file is subject to the terms and conditions defined in 5 | // 'LICENSE', which is part of this source code package. 6 | // 7 | 8 | static inline __m128i rsp_vxor(__m128i vs, __m128i vt) 9 | { 10 | return _mm_xor_si128(vs, vt); 11 | } 12 | 13 | static inline __m128i rsp_vnxor(__m128i vs, __m128i vt) 14 | { 15 | __m128i vd = _mm_xor_si128(vs, vt); 16 | return _mm_xor_si128(vd, _mm_set1_epi32(0xffffffffu)); 17 | } 18 | -------------------------------------------------------------------------------- /mupen64plus-rsp-paraLLEl/cpu_state.hpp: -------------------------------------------------------------------------------- 1 | #ifndef RSP_CPU_STATE_HPP 2 | #define RSP_CPU_STATE_HPP 3 | 4 | 5 | #endif -------------------------------------------------------------------------------- /mupen64plus-rsp-paraLLEl/debug-toolchain/Makefile: -------------------------------------------------------------------------------- 1 | RSP_TEST = main 2 | 3 | PROGRAM = $(RSP_TEST) 4 | MIPS_OBJ = $(RSP_TEST).o 5 | 6 | include Makefile.mips 7 | -------------------------------------------------------------------------------- /mupen64plus-rsp-paraLLEl/debug-toolchain/add.s: -------------------------------------------------------------------------------- 1 | .text 2 | .global main 3 | main: 4 | li $t0, 40 5 | li $t1, -20 6 | add $t2, $t0, $t1 7 | addu $t3, $t0, $t1 8 | 9 | li $t0, -5 10 | li $t1, -4 11 | add $t2, $t0, $t1 12 | addu $t3, $t0, $t1 13 | break 14 | -------------------------------------------------------------------------------- /mupen64plus-rsp-paraLLEl/debug-toolchain/addi.s: -------------------------------------------------------------------------------- 1 | .text 2 | .global main 3 | main: 4 | li $a0, 17 5 | addi $t0, $a0, -8 6 | addi $t1, $a0, 8 7 | addiu $t2, $a0, -8 8 | addiu $t3, $a0, 8 9 | break 10 | -------------------------------------------------------------------------------- /mupen64plus-rsp-paraLLEl/debug-toolchain/and.s: -------------------------------------------------------------------------------- 1 | .text 2 | .global main 3 | main: 4 | li $t0, 17 5 | li $t1, 5 6 | and $t2, $t0, $t1 7 | break 8 | -------------------------------------------------------------------------------- /mupen64plus-rsp-paraLLEl/debug-toolchain/andi.s: -------------------------------------------------------------------------------- 1 | .text 2 | .global main 3 | main: 4 | li $a0, -1 5 | andi $t0, $a0, 50000 6 | break 7 | -------------------------------------------------------------------------------- /mupen64plus-rsp-paraLLEl/debug-toolchain/beq-impossible-delay-slot-both-taken.s: -------------------------------------------------------------------------------- 1 | # This works on the Lightning JIT, but hangs the reference. 2 | 3 | .text 4 | .set noreorder 5 | .global main 6 | main: 7 | li $t0, 1 8 | li $t1, 1 9 | li $t2, 2 10 | li $t3, 0 11 | beq $t0, $t1, taken0 # This will be taken. 12 | beq $t0, $t1, taken1 # This will also be taken. 13 | li $t3, 3 # This will not be executed. 14 | 15 | taken0: 16 | li $t6, 5 # This will be executed, the second branch then kicks in and runs taken1 path. 17 | break 18 | taken1: 19 | li $t4, 4 # This will be executed. 20 | break 21 | -------------------------------------------------------------------------------- /mupen64plus-rsp-paraLLEl/debug-toolchain/beq-impossible-delay-slot-first-taken.s: -------------------------------------------------------------------------------- 1 | .text 2 | .set noreorder 3 | .global main 4 | main: 5 | li $t0, 1 6 | li $t1, 1 7 | li $t2, 2 8 | li $t3, 0 9 | beq $t0, $t1, taken0 # This will be taken. 10 | beq $t0, $t2, taken1 # Will not be taken. 11 | li $t3, 3 12 | 13 | taken0: 14 | li $t4, 5 15 | break 16 | taken1: 17 | li $t4, 4 18 | break 19 | -------------------------------------------------------------------------------- /mupen64plus-rsp-paraLLEl/debug-toolchain/beq-impossible-delay-slot-second-taken.s: -------------------------------------------------------------------------------- 1 | .text 2 | .set noreorder 3 | .global main 4 | main: 5 | li $t0, 1 6 | li $t1, 1 7 | li $t2, 2 8 | li $t3, 0 9 | beq $t0, $t2, taken0 # This will not be taken, should be ignored. 10 | beq $t0, $t1, taken1 # This will be taken. 11 | li $t3, 3 12 | 13 | taken0: 14 | li $t4, 5 15 | break 16 | taken1: 17 | li $t4, 4 18 | break 19 | -------------------------------------------------------------------------------- /mupen64plus-rsp-paraLLEl/debug-toolchain/bgez.s: -------------------------------------------------------------------------------- 1 | .text 2 | .set noreorder 3 | .global main 4 | main: 5 | li $t0, -1 6 | bgez $t0, taken1 # This will not be taken. 7 | li $t2, 10 8 | 9 | li $t0, 0 10 | bgez $t0, taken1 # This will be taken. 11 | li $t2, 20 12 | 13 | li $t0, 1 14 | bgez $t0, taken1 # This will be taken. 15 | li $t2, 30 16 | 17 | taken0: 18 | li $t4, 5 19 | break 20 | taken1: 21 | li $t4, 4 22 | break 23 | -------------------------------------------------------------------------------- /mupen64plus-rsp-paraLLEl/debug-toolchain/bgezal.s: -------------------------------------------------------------------------------- 1 | .text 2 | .set noreorder 3 | .global main 4 | main: 5 | li $t0, -1 6 | bgezal $t0, taken1 # This will not be taken. 7 | li $t2, 10 8 | 9 | li $t0, 0 10 | bgezal $t0, taken1 # This will be taken. 11 | li $t2, 20 12 | 13 | li $t0, 1 14 | bgezal $t0, taken1 # This will be taken. 15 | li $t2, 30 16 | 17 | taken0: 18 | li $t4, 5 19 | break 20 | taken1: 21 | li $t4, 4 22 | break 23 | -------------------------------------------------------------------------------- /mupen64plus-rsp-paraLLEl/debug-toolchain/bgtz.s: -------------------------------------------------------------------------------- 1 | .text 2 | .set noreorder 3 | .global main 4 | main: 5 | li $t0, -1 6 | bgtz $t0, taken1 # This will not be taken. 7 | li $t2, 10 8 | 9 | li $t0, 0 10 | bgtz $t0, taken1 # This will not be taken. 11 | li $t2, 20 12 | 13 | li $t0, 1 14 | bgtz $t0, taken1 # This will be taken. 15 | li $t2, 30 16 | 17 | taken0: 18 | li $t4, 5 19 | break 20 | taken1: 21 | li $t4, 4 22 | break 23 | -------------------------------------------------------------------------------- /mupen64plus-rsp-paraLLEl/debug-toolchain/blez.s: -------------------------------------------------------------------------------- 1 | .text 2 | .set noreorder 3 | .global main 4 | main: 5 | li $t0, 1 6 | blez $t0, taken1 # This will not be taken. 7 | li $t2, 10 8 | 9 | li $t0, 0 10 | blez $t0, taken1 # This will be taken. 11 | li $t2, 20 12 | 13 | li $t0, 0 14 | blez $t0, taken1 # This will be taken. 15 | li $t2, 30 16 | 17 | taken0: 18 | li $t4, 5 19 | break 20 | taken1: 21 | li $t4, 4 22 | break 23 | -------------------------------------------------------------------------------- /mupen64plus-rsp-paraLLEl/debug-toolchain/bltz.s: -------------------------------------------------------------------------------- 1 | .text 2 | .set noreorder 3 | .global main 4 | main: 5 | li $t0, 1 6 | bltz $t0, taken1 # This will not be taken. 7 | li $t2, 10 8 | 9 | li $t0, 0 10 | bltz $t0, taken1 # This will not be taken. 11 | li $t2, 20 12 | 13 | li $t0, -1 14 | bltz $t0, taken1 # This will be taken. 15 | li $t2, 30 16 | 17 | taken0: 18 | li $t4, 5 19 | break 20 | taken1: 21 | li $t4, 4 22 | break 23 | -------------------------------------------------------------------------------- /mupen64plus-rsp-paraLLEl/debug-toolchain/bltzal.s: -------------------------------------------------------------------------------- 1 | .text 2 | .set noreorder 3 | .global main 4 | main: 5 | li $t0, 1 6 | bltzal $t0, taken1 # This will not be taken. 7 | li $t2, 10 8 | 9 | li $t0, 0 10 | bltzal $t0, taken1 # This will not be taken. 11 | li $t2, 20 12 | 13 | li $t0, -1 14 | bltzal $t0, taken1 # This will be taken. 15 | li $t2, 30 16 | 17 | taken0: 18 | li $t4, 5 19 | break 20 | taken1: 21 | li $t4, 4 22 | break 23 | -------------------------------------------------------------------------------- /mupen64plus-rsp-paraLLEl/debug-toolchain/bne.s: -------------------------------------------------------------------------------- 1 | .text 2 | .set noreorder 3 | .global main 4 | main: 5 | li $t0, 1 6 | li $t1, 1 7 | li $t2, 2 8 | li $t3, 0 9 | bne $t0, $t1, taken0 # This will not be taken. 10 | nop 11 | 12 | bne $t0, $t2, taken1 # Will be taken. 13 | li $t3, 3 14 | 15 | taken0: 16 | li $t4, 5 17 | break 18 | taken1: 19 | li $t4, 4 20 | break 21 | -------------------------------------------------------------------------------- /mupen64plus-rsp-paraLLEl/debug-toolchain/cop0.s: -------------------------------------------------------------------------------- 1 | .text 2 | .set noreorder 3 | .global main 4 | main: 5 | li $t0, 100 6 | mtc0 $t0, $1 7 | bgez $t0, bar 8 | mfc0 $t1, $1 9 | li $t1, 200 # Should not execute. 10 | break 11 | 12 | bar: 13 | li $t2, 400 14 | break 15 | -------------------------------------------------------------------------------- /mupen64plus-rsp-paraLLEl/debug-toolchain/cop2-basic.s: -------------------------------------------------------------------------------- 1 | .text 2 | .set noreorder 3 | .global main 4 | main: 5 | li $t0, 10 6 | li $t2, 10 7 | nop 8 | .word (0x12 << 26) | (4 << 21) | (2 << 11) | (8 << 16) | (4 << 7) 9 | .word (0x12 << 26) | (0 << 21) | (2 << 11) | (9 << 16) | (4 << 7) 10 | #mtc2 $t0, $2, 4 11 | #mfc2 $t1, $2, 4 12 | 13 | ctc2 $t2, $2 14 | cfc2 $t3, $2 15 | 16 | break 17 | -------------------------------------------------------------------------------- /mupen64plus-rsp-paraLLEl/debug-toolchain/cop2-ls.s: -------------------------------------------------------------------------------- 1 | .data 2 | buffer: 3 | .hword 10, 20, 30, 40, 50, 60, 70, 80 4 | .hword 20, 30, 40, 50, 60, 70, 80, 90 5 | 6 | .text 7 | .set noreorder 8 | .global main 9 | main: 10 | la $t0, buffer 11 | # lqv 2, 0, 1(t0) 12 | .word (0x32 << 26) | (4 << 11) | (2 << 16) | (0 << 7) | (1 << 0) | (8 << 21) 13 | # sqv 2, 0, 2(t0) 14 | .word (0x3a << 26) | (4 << 11) | (2 << 16) | (0 << 7) | (2 << 0) | (8 << 21) 15 | break 16 | -------------------------------------------------------------------------------- /mupen64plus-rsp-paraLLEl/debug-toolchain/cop2-vector.s: -------------------------------------------------------------------------------- 1 | .data 2 | buffer: 3 | .hword 10, 20, 30, 40, 50, 60, 70, 80 4 | .hword 20, 30, 40, 50, 60, 70, 80, 90 5 | 6 | .text 7 | .set noreorder 8 | .global main 9 | main: 10 | la $t0, buffer 11 | # lqv 2, 0, 0(t0) 12 | .word (0x32 << 26) | (4 << 11) | (2 << 16) | (0 << 7) | (0 << 0) | (8 << 21) 13 | # lqv 3, 0, 1(t0) 14 | .word (0x32 << 26) | (4 << 11) | (3 << 16) | (0 << 7) | (1 << 0) | (8 << 21) 15 | 16 | .word (0x25 << 25) | (4 << 6) | (2 << 11) | (3 << 16) | (17 << 0) | (0 << 21) 17 | # vsub v4, v2, v3, 0 18 | break 19 | -------------------------------------------------------------------------------- /mupen64plus-rsp-paraLLEl/debug-toolchain/delay-slot-before-break.s: -------------------------------------------------------------------------------- 1 | .text 2 | .set noreorder 3 | .global main 4 | main: 5 | li $t0, 1 6 | blez $t0, foo 7 | break 8 | 9 | nop 10 | nop 11 | nop 12 | nop 13 | 14 | foo: 15 | break 16 | -------------------------------------------------------------------------------- /mupen64plus-rsp-paraLLEl/debug-toolchain/delay-slot-before-new-block-illegal.s: -------------------------------------------------------------------------------- 1 | .text 2 | .set noreorder 3 | .global main 4 | .align 10 5 | main: 6 | li $t0, 1 7 | .rept 126 8 | nop 9 | .endr 10 | bgtz $t0, foobar 11 | # New block begins here, 12 | j foobar2 13 | li $t2, 2 # This should not execute 14 | 15 | foobar: 16 | li $t3, 3 # This should execute, then we move to foobar2 17 | break 18 | 19 | foobar2: 20 | li $t4, 4 # This executes. 21 | break 22 | -------------------------------------------------------------------------------- /mupen64plus-rsp-paraLLEl/debug-toolchain/delay-slot-before-new-block-not-taken.s: -------------------------------------------------------------------------------- 1 | .text 2 | .set noreorder 3 | .global main 4 | .align 10 5 | main: 6 | li $t0, 0 7 | .rept 126 8 | nop 9 | .endr 10 | bgtz $t0, foobar 11 | # New block begins here, 12 | # last instruction will be bgtz which needs to promote its delay slot 13 | # into a new block. 14 | # First instruction of any block have to handle potential latent delay slots like these. 15 | li $t1, 1 16 | li $t2, 2 # This should execute 17 | 18 | foobar: 19 | break 20 | -------------------------------------------------------------------------------- /mupen64plus-rsp-paraLLEl/debug-toolchain/delay-slot-before-new-block.s: -------------------------------------------------------------------------------- 1 | .text 2 | .set noreorder 3 | .global main 4 | .align 10 5 | main: 6 | li $t0, 1 7 | .rept 126 8 | nop 9 | .endr 10 | bgtz $t0, foobar 11 | # New block begins here, 12 | # last instruction will be bgtz which needs to promote its delay slot 13 | # into a new block. 14 | # First instruction of any block have to handle potential latent delay slots like these. 15 | li $t1, 1 16 | li $t2, 2 # This should not execute 17 | 18 | foobar: 19 | break 20 | -------------------------------------------------------------------------------- /mupen64plus-rsp-paraLLEl/debug-toolchain/j.s: -------------------------------------------------------------------------------- 1 | .text 2 | .set noreorder 3 | .global main 4 | main: 5 | j indelay 6 | nop 7 | 8 | j die # Test to make sure this becomes a conditional branch. 9 | 10 | indelay: 11 | j notdie 12 | li $t0, 1 13 | 14 | die: 15 | li $t0, 0x10000 16 | 17 | notdie: 18 | li $t1, 2 19 | break 20 | 21 | -------------------------------------------------------------------------------- /mupen64plus-rsp-paraLLEl/debug-toolchain/jal-into-indirect-delay-slot.s: -------------------------------------------------------------------------------- 1 | .text 2 | .set noreorder 3 | .global main 4 | main: 5 | li $t0, 1 6 | bgtz $0, dummy 7 | jal callsite 8 | li $t5, 10 9 | 10 | jr $s5 11 | callsite: 12 | lw $t2, 184($0) 13 | li $t1, 10 14 | break 15 | 16 | dummy: 17 | nop 18 | break 19 | 20 | -------------------------------------------------------------------------------- /mupen64plus-rsp-paraLLEl/debug-toolchain/jal.s: -------------------------------------------------------------------------------- 1 | .text 2 | .set noreorder 3 | .global main 4 | main: 5 | jal indelay 6 | nop 7 | 8 | jal die # Test to make sure this becomes a conditional branch. 9 | 10 | indelay: 11 | jal notdie 12 | move $t2, $ra 13 | li $t0, 1 14 | 15 | die: 16 | li $t0, 0x10000 17 | 18 | notdie: 19 | li $t1, 2 20 | break 21 | 22 | -------------------------------------------------------------------------------- /mupen64plus-rsp-paraLLEl/debug-toolchain/jr.s: -------------------------------------------------------------------------------- 1 | .text 2 | .set noreorder 3 | .global main 4 | main: 5 | la $t5, notdie 6 | la $ra, indelay 7 | jr $ra 8 | nop 9 | 10 | j die # Test to make sure this becomes a conditional branch. 11 | 12 | indelay: 13 | jr $t5 14 | li $t0, 1 15 | 16 | die: 17 | li $t0, 0x10000 18 | 19 | notdie: 20 | li $t1, 2 21 | break 22 | 23 | -------------------------------------------------------------------------------- /mupen64plus-rsp-paraLLEl/debug-toolchain/lb.s: -------------------------------------------------------------------------------- 1 | .data 2 | .byte 0, 0, 0 3 | foobar: 4 | .byte 0x72, 0x91 5 | 6 | .text 7 | .global main 8 | main: 9 | la $t1, foobar 10 | lb $t0, 1($t1) 11 | break 12 | -------------------------------------------------------------------------------- /mupen64plus-rsp-paraLLEl/debug-toolchain/lbu.s: -------------------------------------------------------------------------------- 1 | .data 2 | .byte 0, 0, 0 3 | foobar: 4 | .byte 0x72, 0x91 5 | 6 | .text 7 | .global main 8 | main: 9 | la $t1, foobar 10 | lbu $t0, 1($t1) 11 | break 12 | -------------------------------------------------------------------------------- /mupen64plus-rsp-paraLLEl/debug-toolchain/lh-unaligned.s: -------------------------------------------------------------------------------- 1 | .data 2 | .byte 0, 0, 0, 0 3 | foobar: 4 | .byte 0 5 | .byte 0x92, 0x70 6 | 7 | .text 8 | .global main 9 | main: 10 | la $t1, foobar 11 | lh $t0, 1($t1) 12 | break 13 | -------------------------------------------------------------------------------- /mupen64plus-rsp-paraLLEl/debug-toolchain/lh.s: -------------------------------------------------------------------------------- 1 | .data 2 | .byte 0, 0, 0, 0 3 | foobar: 4 | .byte 0x92, 0x70 5 | 6 | .text 7 | .global main 8 | main: 9 | la $t1, foobar 10 | lh $t0, 0($t1) 11 | break 12 | -------------------------------------------------------------------------------- /mupen64plus-rsp-paraLLEl/debug-toolchain/lhu-unaligned.s: -------------------------------------------------------------------------------- 1 | .data 2 | .byte 0, 0, 0, 0 3 | foobar: 4 | .byte 0 5 | .byte 0x92, 0x70 6 | 7 | .text 8 | .global main 9 | main: 10 | la $t1, foobar 11 | lhu $t0, 1($t1) 12 | break 13 | -------------------------------------------------------------------------------- /mupen64plus-rsp-paraLLEl/debug-toolchain/lhu.s: -------------------------------------------------------------------------------- 1 | .data 2 | .byte 0, 0, 0, 0 3 | foobar: 4 | .byte 0x92, 0x70 5 | 6 | .text 7 | .global main 8 | main: 9 | la $t1, foobar 10 | lhu $t0, 0($t1) 11 | break 12 | -------------------------------------------------------------------------------- /mupen64plus-rsp-paraLLEl/debug-toolchain/lui.s: -------------------------------------------------------------------------------- 1 | .text 2 | .global main 3 | main: 4 | lui $t0, 50000 5 | break 6 | -------------------------------------------------------------------------------- /mupen64plus-rsp-paraLLEl/debug-toolchain/lw-unaligned-in-branch-delay.s: -------------------------------------------------------------------------------- 1 | .data 2 | foo: 3 | .byte 0 4 | .byte 0xaa, 0xbb, 0xcc, 0xdd 5 | 6 | .text 7 | .set noreorder 8 | .global main 9 | main: 10 | li $t0, 1 11 | la $t1, foo 12 | bgtz $t0, taken1 13 | lw $t1, 1($t1) 14 | 15 | taken0: 16 | li $t5, 100 17 | break 18 | 19 | taken1: 20 | break 21 | -------------------------------------------------------------------------------- /mupen64plus-rsp-paraLLEl/debug-toolchain/lw-unaligned.s: -------------------------------------------------------------------------------- 1 | .data 2 | .byte 0, 0, 0, 0 3 | foobar: 4 | .word 12345678 5 | .word 30 6 | 7 | .text 8 | .global main 9 | main: 10 | la $t1, foobar 11 | lw $t0, 0($t1) 12 | lw $t1, 1($t1) 13 | lw $t2, 2($t1) 14 | lw $t3, 3($t1) 15 | break 16 | -------------------------------------------------------------------------------- /mupen64plus-rsp-paraLLEl/debug-toolchain/lw.s: -------------------------------------------------------------------------------- 1 | .data 2 | .byte 0, 0, 0, 0 3 | foobar: 4 | .word 12345678 5 | .word 30 6 | 7 | .text 8 | .global main 9 | main: 10 | la $t1, foobar 11 | lw $t0, 4($t1) 12 | break 13 | -------------------------------------------------------------------------------- /mupen64plus-rsp-paraLLEl/debug-toolchain/main.c: -------------------------------------------------------------------------------- 1 | #include "rsp-mips.h" 2 | 3 | u8 data[4] = { 0x10, 0x20, 0x30, 0x40 }; 4 | 5 | __attribute__((noinline)) 6 | int load_byte(int i) 7 | { 8 | return data[i]; 9 | } 10 | 11 | int count = 3; 12 | 13 | int main(void) 14 | { 15 | int res = 0; 16 | for (int i = 0; i < 3; i++) 17 | { 18 | res += load_byte(i); 19 | } 20 | rsp_debug_break(res, res, res, res); 21 | } 22 | -------------------------------------------------------------------------------- /mupen64plus-rsp-paraLLEl/debug-toolchain/nor.s: -------------------------------------------------------------------------------- 1 | .text 2 | .global main 3 | main: 4 | li $t0, 17 5 | li $t1, 5 6 | nor $t2, $t0, $t1 7 | break 8 | -------------------------------------------------------------------------------- /mupen64plus-rsp-paraLLEl/debug-toolchain/or.s: -------------------------------------------------------------------------------- 1 | .text 2 | .global main 3 | main: 4 | li $t0, 8 5 | li $t1, 50 6 | or $t2, $t0, $t1 7 | break 8 | -------------------------------------------------------------------------------- /mupen64plus-rsp-paraLLEl/debug-toolchain/ori.s: -------------------------------------------------------------------------------- 1 | .text 2 | .global main 3 | main: 4 | li $a0, 500 5 | ori $t0, $a0, 50000 6 | break 7 | -------------------------------------------------------------------------------- /mupen64plus-rsp-paraLLEl/debug-toolchain/rsp-mips.h: -------------------------------------------------------------------------------- 1 | #ifndef __RSP_MIPS_H 2 | #define __RSP_MIPS_H 3 | 4 | typedef signed char s8; 5 | typedef unsigned char u8; 6 | typedef signed short s16; 7 | typedef unsigned short u16; 8 | typedef signed int s32; 9 | typedef unsigned int u32; 10 | typedef signed long long s64; 11 | typedef unsigned long long u64; 12 | typedef u32 size_t; 13 | 14 | void rsp_break(void); 15 | void rsp_debug_break(u32 a, u32 b, u32 c, u32 d); 16 | 17 | #endif 18 | -------------------------------------------------------------------------------- /mupen64plus-rsp-paraLLEl/debug-toolchain/rsp-mips.ld: -------------------------------------------------------------------------------- 1 | SECTIONS { 2 | ENTRY(rsp_mips_start) 3 | . = 0x00400000; 4 | .text : { start.o (.text); * (.text*); } 5 | 6 | . = 0x00700000; 7 | .data : { * (.data); * (.rodata*); * (.sbss); * (.scommon); } 8 | .bss : { * (.bss); } 9 | } 10 | -------------------------------------------------------------------------------- /mupen64plus-rsp-paraLLEl/debug-toolchain/rsp-mips.s: -------------------------------------------------------------------------------- 1 | .text 2 | .section .text 3 | 4 | .global rsp_break 5 | .ent rsp_break 6 | .type rsp_break, @function 7 | rsp_break: 8 | break 9 | jr $ra 10 | .end rsp_break 11 | .size rsp_break, .-rsp_break 12 | 13 | .global rsp_debug_break 14 | .ent rsp_debug_break 15 | .type rsp_debug_break, @function 16 | rsp_debug_break: 17 | break 18 | jr $ra 19 | .end rsp_debug_break 20 | .size rsp_debug_break, .-rsp_debug_break 21 | -------------------------------------------------------------------------------- /mupen64plus-rsp-paraLLEl/debug-toolchain/sb.s: -------------------------------------------------------------------------------- 1 | .data 2 | foobar: 3 | .word 0 4 | .word 0 5 | .word 0 6 | .word 0 7 | .word 0 8 | .word 0 9 | .word 0 10 | .word 0 11 | 12 | .text 13 | .global main 14 | main: 15 | li $t0, 0xaabbccdd 16 | la $t1, foobar 17 | sb $t0, 0($t1) 18 | sb $t0, 1($t1) 19 | sb $t0, 3($t1) 20 | break 21 | 22 | -------------------------------------------------------------------------------- /mupen64plus-rsp-paraLLEl/debug-toolchain/sh-unaligned.s: -------------------------------------------------------------------------------- 1 | .data 2 | foobar: 3 | .word 0 4 | .word 0 5 | .word 0 6 | .word 0 7 | .word 0 8 | .word 0 9 | .word 0 10 | .word 0 11 | 12 | .text 13 | .global main 14 | main: 15 | li $t0, 0xaabbccdd 16 | la $t1, foobar 17 | sh $t0, 0($t1) 18 | sh $t0, 3($t1) 19 | break 20 | 21 | -------------------------------------------------------------------------------- /mupen64plus-rsp-paraLLEl/debug-toolchain/sh.s: -------------------------------------------------------------------------------- 1 | .data 2 | foobar: 3 | .word 0 4 | .word 0 5 | .word 0 6 | .word 0 7 | .word 0 8 | .word 0 9 | .word 0 10 | .word 0 11 | 12 | .text 13 | .global main 14 | main: 15 | li $t0, 0xaabbccdd 16 | la $t1, foobar 17 | sh $t0, 0($t1) 18 | sh $t0, 2($t1) 19 | sh $t0, 6($t1) 20 | break 21 | 22 | -------------------------------------------------------------------------------- /mupen64plus-rsp-paraLLEl/debug-toolchain/sll.s: -------------------------------------------------------------------------------- 1 | .text 2 | .global main 3 | main: 4 | li $t0, 40 5 | sll $t0, $t0, 20 6 | break 7 | -------------------------------------------------------------------------------- /mupen64plus-rsp-paraLLEl/debug-toolchain/sllv.s: -------------------------------------------------------------------------------- 1 | .text 2 | .global main 3 | main: 4 | li $t0, 40 5 | li $t1, 20 6 | sllv $t0, $t0, $t1 7 | break 8 | -------------------------------------------------------------------------------- /mupen64plus-rsp-paraLLEl/debug-toolchain/slt.s: -------------------------------------------------------------------------------- 1 | .text 2 | .global main 3 | main: 4 | li $a0, 17 5 | li $a1, 5 6 | li $a2, -17 7 | li $a3, -5 8 | slt $t0, $a0, $a1 9 | slt $t1, $a3, $a0 10 | slt $t2, $a2, $a3 11 | slt $t3, $a2, $a1 12 | break 13 | -------------------------------------------------------------------------------- /mupen64plus-rsp-paraLLEl/debug-toolchain/slti.s: -------------------------------------------------------------------------------- 1 | .text 2 | .global main 3 | main: 4 | li $a0, 100000 5 | li $a1, -100000 6 | slti $t0, $a0, -40 7 | slti $t1, $a0, 40 8 | slti $t2, $a1, -40 9 | slti $t3, $a1, 40 10 | break 11 | -------------------------------------------------------------------------------- /mupen64plus-rsp-paraLLEl/debug-toolchain/sltiu.s: -------------------------------------------------------------------------------- 1 | .text 2 | .global main 3 | main: 4 | li $a0, 100000 5 | li $a1, -100000 6 | sltiu $t0, $a0, -40 7 | sltiu $t1, $a0, 40 8 | sltiu $t2, $a1, -40 9 | sltiu $t3, $a1, 40 10 | break 11 | -------------------------------------------------------------------------------- /mupen64plus-rsp-paraLLEl/debug-toolchain/sltu.s: -------------------------------------------------------------------------------- 1 | .text 2 | .global main 3 | main: 4 | li $a0, 17 5 | li $a1, 5 6 | li $a2, -17 7 | li $a3, -5 8 | sltu $t0, $a0, $a1 9 | sltu $t1, $a3, $a0 10 | sltu $t2, $a2, $a3 11 | sltu $t3, $a2, $a1 12 | break 13 | -------------------------------------------------------------------------------- /mupen64plus-rsp-paraLLEl/debug-toolchain/sra.s: -------------------------------------------------------------------------------- 1 | .text 2 | .global main 3 | main: 4 | li $t0, -15254 5 | sra $t0, $t0, 20 6 | break 7 | -------------------------------------------------------------------------------- /mupen64plus-rsp-paraLLEl/debug-toolchain/srav.s: -------------------------------------------------------------------------------- 1 | .text 2 | .global main 3 | main: 4 | li $t0, -15254 5 | li $t1, 20 6 | srav $t0, $t0, $t1 7 | break 8 | -------------------------------------------------------------------------------- /mupen64plus-rsp-paraLLEl/debug-toolchain/srl.s: -------------------------------------------------------------------------------- 1 | .text 2 | .global main 3 | main: 4 | li $t0, -15254 5 | srl $t0, $t0, 20 6 | break 7 | -------------------------------------------------------------------------------- /mupen64plus-rsp-paraLLEl/debug-toolchain/srlv.s: -------------------------------------------------------------------------------- 1 | .text 2 | .global main 3 | main: 4 | li $t0, -15254 5 | li $t1, 20 6 | srlv $t0, $t0, $t1 7 | break 8 | -------------------------------------------------------------------------------- /mupen64plus-rsp-paraLLEl/debug-toolchain/start.s: -------------------------------------------------------------------------------- 1 | ### 2 | ## 3 | # Entry point and setup for our RSP 4 | ## 5 | 6 | .equ RAM_SIZE, 4096 7 | 8 | .text 9 | .align 2 10 | .section .text 11 | .global rsp_mips_start 12 | .extern main 13 | .ent rsp_mips_start 14 | .type rsp_mips_start, @function 15 | 16 | rsp_mips_start: 17 | nop 18 | redo: 19 | li $a0, 0 # argc = 0, it will never be used anyways on this stuff. :D 20 | li $a1, 0 # argv = 0 21 | li $sp, (0x00700000 + RAM_SIZE - 4) # Set up stack. 22 | 23 | jal main 24 | j redo 25 | 26 | .end rsp_mips_start 27 | .size rsp_mips_start, .-rsp_mips_start 28 | 29 | -------------------------------------------------------------------------------- /mupen64plus-rsp-paraLLEl/debug-toolchain/sub.s: -------------------------------------------------------------------------------- 1 | .text 2 | .global main 3 | main: 4 | li $t0, 40 5 | li $t1, -20 6 | sub $t2, $t0, $t1 7 | subu $t3, $t0, $t1 8 | 9 | li $t0, -5 10 | li $t1, -4 11 | sub $t2, $t0, $t1 12 | subu $t3, $t0, $t1 13 | 14 | break 15 | -------------------------------------------------------------------------------- /mupen64plus-rsp-paraLLEl/debug-toolchain/sw-unaligned.s: -------------------------------------------------------------------------------- 1 | .data 2 | foobar: 3 | .word 0 4 | .word 0 5 | .word 0 6 | .word 0 7 | .word 0 8 | .word 0 9 | .word 0 10 | .word 0 11 | 12 | .text 13 | .global main 14 | main: 15 | li $t0, 0xaabbccdd 16 | la $t1, foobar 17 | sw $t0, 0($t1) 18 | sw $t0, 5($t1) 19 | sw $t0, 10($t1) 20 | sw $t0, 15($t1) 21 | break 22 | 23 | -------------------------------------------------------------------------------- /mupen64plus-rsp-paraLLEl/debug-toolchain/sw.s: -------------------------------------------------------------------------------- 1 | .data 2 | foobar: 3 | .word 0 4 | .word 0 5 | .word 0 6 | .word 0 7 | .word 0 8 | .word 0 9 | .word 0 10 | .word 0 11 | 12 | .text 13 | .global main 14 | main: 15 | li $t0, 0xaabbccdd 16 | la $t1, foobar 17 | sw $t0, 0($t1) 18 | sw $t0, 4($t1) 19 | sw $t0, 12($t1) 20 | break 21 | 22 | -------------------------------------------------------------------------------- /mupen64plus-rsp-paraLLEl/debug-toolchain/unconditional-delay-slot-before-break.s: -------------------------------------------------------------------------------- 1 | .text 2 | .set noreorder 3 | .global main 4 | main: 5 | jal foo 6 | break 7 | 8 | nop 9 | nop 10 | nop 11 | nop 12 | 13 | foo: 14 | break 15 | -------------------------------------------------------------------------------- /mupen64plus-rsp-paraLLEl/debug-toolchain/xor.s: -------------------------------------------------------------------------------- 1 | .text 2 | .global main 3 | main: 4 | li $t0, 17 5 | li $t1, 5 6 | xor $t2, $t0, $t1 7 | break 8 | -------------------------------------------------------------------------------- /mupen64plus-rsp-paraLLEl/debug-toolchain/xori.s: -------------------------------------------------------------------------------- 1 | .text 2 | .global main 3 | main: 4 | li $a0, 500 5 | xori $t0, $a0, 50000 6 | break 7 | -------------------------------------------------------------------------------- /mupen64plus-rsp-paraLLEl/debug_jit.hpp: -------------------------------------------------------------------------------- 1 | #ifndef DEBUG_JIT_HPP__ 2 | #define DEBUG_JIT_HPP__ 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | 9 | namespace JIT 10 | { 11 | using Func = void (*)(void *, void *); 12 | class DebugBlock 13 | { 14 | public: 15 | DebugBlock(const std::unordered_map &symbol_table); 16 | ~DebugBlock(); 17 | 18 | bool compile(uint64_t hash, const std::string &source); 19 | Func get_func() const 20 | { 21 | return block; 22 | } 23 | 24 | private: 25 | struct Impl; 26 | std::unique_ptr impl; 27 | Func block = nullptr; 28 | }; 29 | } // namespace JIT 30 | 31 | #endif 32 | -------------------------------------------------------------------------------- /mupen64plus-rsp-paraLLEl/format_all.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | for file in arch/*/*/*.{cpp,h} *.{cpp,hpp,h} rsp/*.{cpp,h} 4 | do 5 | echo "Formatting file: $file ..." 6 | clang-format -style=file -i $file 7 | done 8 | -------------------------------------------------------------------------------- /mupen64plus-rsp-paraLLEl/lightning/.gitattributes: -------------------------------------------------------------------------------- 1 | ChangeLog merge=merge-changelog 2 | -------------------------------------------------------------------------------- /mupen64plus-rsp-paraLLEl/lightning/.gitignore: -------------------------------------------------------------------------------- 1 | +* 2 | autom4te.cache 3 | aclocal.m4 4 | depcomp 5 | INSTALL 6 | Makefile 7 | Makefile.in 8 | config.guess 9 | config.h 10 | config.h.in 11 | config.log 12 | config.status 13 | config.sub 14 | configure 15 | install-sh 16 | libtool 17 | lightning-*.tar.* 18 | ltmain.sh 19 | missing 20 | size 21 | stamp-h1 22 | test-driver 23 | check/.deps 24 | doc/.deps 25 | lib/.deps 26 | m4/libtool.m4 27 | m4/lt~obsolete.m4 28 | m4/ltoptions.m4 29 | m4/ltsugar.m4 30 | m4/ltversion.m4 31 | doc/mdate-sh 32 | doc/texinfo.tex 33 | lightning.pc 34 | -------------------------------------------------------------------------------- /mupen64plus-rsp-paraLLEl/lightning/.gitrepo: -------------------------------------------------------------------------------- 1 | ; DO NOT EDIT (unless you know what you are doing) 2 | ; 3 | ; This subdirectory is a git "subrepo", and this file is maintained by the 4 | ; git-subrepo command. See https://github.com/git-commands/git-subrepo#readme 5 | ; 6 | [subrepo] 7 | remote = https://git.savannah.gnu.org/git/lightning.git 8 | branch = master 9 | commit = b0b8eb5e856c0d29053dc842e1919a2eb58c8cda 10 | parent = 9f797430963d9cf0fcef7d963466f9cac7026de2 11 | method = merge 12 | cmdver = 0.4.1 13 | -------------------------------------------------------------------------------- /mupen64plus-rsp-paraLLEl/lightning/AUTHORS: -------------------------------------------------------------------------------- 1 | Paulo Cesar Pereira de Andrade 2 | 3 | Paolo Bonzini 4 | 5 | PPC assembler by Ian Piumarta 6 | 7 | i386 assembler by Ian Piumarta 8 | and Gwenole Beauchesne 9 | 10 | x86-64 backend by Matthew Flatt 11 | 12 | Major PPC contributions by Laurent Michel 13 | 14 | Major SPARC contributions by Ludovic Courtes 15 | -------------------------------------------------------------------------------- /mupen64plus-rsp-paraLLEl/lightning/ChangeLog: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/paraLLeXT/41567a669252e7af3dcaf75616dc83ec0a11847f/mupen64plus-rsp-paraLLEl/lightning/ChangeLog -------------------------------------------------------------------------------- /mupen64plus-rsp-paraLLEl/lightning/README: -------------------------------------------------------------------------------- 1 | GNU lightning is a library to aid in making portable programs 2 | that compile assembly code at run time. For more information, 3 | look at the info documentation. 4 | -------------------------------------------------------------------------------- /mupen64plus-rsp-paraLLEl/lightning/THANKS: -------------------------------------------------------------------------------- 1 | Thanks to all the following people for their help in 2 | improving GNU lightning: 3 | 4 | Paolo Bonzini 5 | Eli Barzilay 6 | Ludovic Courtes 7 | Matthew Flatt 8 | Laurent Michel 9 | Paulo Cesar Pereira de Andrade 10 | Mike Spivey 11 | Basile Starynkevitch 12 | Sam Steingold 13 | Jens Troeger 14 | Tom Tromey 15 | Trent Nelson 16 | Vitaly Magerya 17 | Brandon Invergo 18 | Holger Hans Peter Freyther 19 | Jon Arintok 20 | Bruno Haible 21 | Marc Nieper-Wißkirchen 22 | -------------------------------------------------------------------------------- /mupen64plus-rsp-paraLLEl/lightning/TODO: -------------------------------------------------------------------------------- 1 | * Validate that divrem in jit_x86-cpu.c is not modifying 2 | the non result arguments. This is not verified by clobber.tst, 3 | as it only checks registers not involved in the operation 4 | (because it does not know about values being set as input 5 | for the the operation). 6 | 7 | * Write a simple higher level language implementation generating 8 | jit with lightning, that could be some lisp or C like language. 9 | 10 | * rerun ./configure --enable-devel-get-jit-size and regenerate 11 | the related jit_$arch-sz.c for the ports where nodata is 12 | meaningful: 13 | hppa (done) 14 | i586 (done) 15 | ia64 16 | mips o32 (done) 17 | mips n32 18 | mips n64 19 | powerpc 32 (done) 20 | powerpc 64 (done) 21 | ppc 22 | s390x (done) 23 | sparc (done) 24 | x86_64 (done) 25 | Missing ones are due to no longer (remote) access to such hosts 26 | and may be broken with jit_set_data(..., JIT_DISABLE_DATA). 27 | (ia64 hp-ux or linx), (irix mips for 32 or 64 abi), and 28 | (darwin ppc). 29 | -------------------------------------------------------------------------------- /mupen64plus-rsp-paraLLEl/lightning/check/3to2.ok: -------------------------------------------------------------------------------- 1 | 0 2 | 1 3 | 1 4 | 1 5 | 0 6 | 1 7 | 1 8 | 1 9 | 0 10 | 1 11 | 1 12 | 0 13 | 1 14 | 1 15 | 1 16 | 0 17 | 1 18 | 1 19 | 1 20 | 0 21 | 1 22 | 1 23 | -------------------------------------------------------------------------------- /mupen64plus-rsp-paraLLEl/lightning/check/add.ok: -------------------------------------------------------------------------------- 1 | 5 + 4 = 9 2 | -------------------------------------------------------------------------------- /mupen64plus-rsp-paraLLEl/lightning/check/add.tst: -------------------------------------------------------------------------------- 1 | .data 32 2 | fmt: 3 | .c "%d + %d = %d\n" 4 | 5 | .code 6 | jmpi main 7 | 8 | name test 9 | test: 10 | prolog 11 | arg $i0 12 | arg $i1 13 | getarg %r0 $i0 14 | getarg %r1 $i1 15 | addr %r0 %r0 %r1 16 | retr %r0 17 | epilog 18 | 19 | name main 20 | main: 21 | prolog 22 | prepare 23 | pushargi 5 24 | pushargi 4 25 | finishi test 26 | retval %r0 27 | prepare 28 | pushargi fmt 29 | ellipsis 30 | pushargi 5 31 | pushargi 4 32 | pushargr %r0 33 | finishi @printf 34 | ret 35 | epilog 36 | -------------------------------------------------------------------------------- /mupen64plus-rsp-paraLLEl/lightning/check/align.ok: -------------------------------------------------------------------------------- 1 | 10 2 | -------------------------------------------------------------------------------- /mupen64plus-rsp-paraLLEl/lightning/check/align.tst: -------------------------------------------------------------------------------- 1 | .data 32 2 | fmt: 3 | .c "%d\n" 4 | .code 5 | prolog 6 | movi %r0 1 7 | jmpi L1 /* should not generate this */ 8 | align $(__WORDSIZE / 8) /* possible nops */ 9 | L1: 10 | bgei L4 %r0 10 11 | addi %r0 %r0 1 12 | jmpi L2 13 | movr %r1 %r0 /* to force jump generation */ 14 | align $(__WORDSIZE / 8) /* possible nops */ 15 | L2: 16 | bgti L4 %r0 10 /* never executed */ 17 | align $(__WORDSIZE / 8) /* possible nops */ 18 | L3: 19 | jmpi L1 20 | align $(__WORDSIZE / 8) /* possible nops */ 21 | L4: 22 | prepare 23 | pushargi fmt 24 | ellipsis 25 | pushargr %r0 26 | finishi @printf 27 | ret 28 | epilog 29 | -------------------------------------------------------------------------------- /mupen64plus-rsp-paraLLEl/lightning/check/allocai.ok: -------------------------------------------------------------------------------- 1 | received 7777 2 | succeeded 3 | -------------------------------------------------------------------------------- /mupen64plus-rsp-paraLLEl/lightning/check/allocar.ok: -------------------------------------------------------------------------------- 1 | 1 2 3 2 | 3 4 5 3 | 5 6 7 4 | 7 8 9 5 | -------------------------------------------------------------------------------- /mupen64plus-rsp-paraLLEl/lightning/check/alu_add.ok: -------------------------------------------------------------------------------- 1 | ok 2 | -------------------------------------------------------------------------------- /mupen64plus-rsp-paraLLEl/lightning/check/alu_and.ok: -------------------------------------------------------------------------------- 1 | ok 2 | -------------------------------------------------------------------------------- /mupen64plus-rsp-paraLLEl/lightning/check/alu_com.ok: -------------------------------------------------------------------------------- 1 | ok 2 | -------------------------------------------------------------------------------- /mupen64plus-rsp-paraLLEl/lightning/check/alu_com.tst: -------------------------------------------------------------------------------- 1 | #include "alu.inc" 2 | 3 | .code 4 | prolog 5 | 6 | #define COM(N, I0, V) UN(N, com, I0, V) 7 | 8 | #if __WORDSIZE == 32 9 | COM(0, 0, 0xffffffff) 10 | COM(1, 1, 0xfffffffe) 11 | COM(2, 0xffffffff, 0) 12 | COM(3, 0x80000000, 0x7fffffff) 13 | COM(4, 0x7fffffff, 0x80000000) 14 | COM(5, 0x80000001, 0x7ffffffe) 15 | #else 16 | COM(0, 0, 0xffffffffffffffff) 17 | COM(1, 1, 0xfffffffffffffffe) 18 | COM(2, 0xffffffff, 0xffffffff00000000) 19 | COM(3, 0x80000000, 0xffffffff7fffffff) 20 | COM(4, 0x7fffffff, 0xffffffff80000000) 21 | COM(5, 0x80000001, 0xffffffff7ffffffe) 22 | COM(6, 0xffffffffffffffff, 0) 23 | COM(7, 0x8000000000000000, 0x7fffffffffffffff) 24 | COM(8, 0x7fffffffffffffff, 0x8000000000000000) 25 | COM(9, 0x8000000000000001, 0x7ffffffffffffffe) 26 | #endif 27 | 28 | prepare 29 | pushargi ok 30 | ellipsis 31 | finishi @printf 32 | ret 33 | epilog 34 | -------------------------------------------------------------------------------- /mupen64plus-rsp-paraLLEl/lightning/check/alu_div.ok: -------------------------------------------------------------------------------- 1 | ok 2 | -------------------------------------------------------------------------------- /mupen64plus-rsp-paraLLEl/lightning/check/alu_lsh.ok: -------------------------------------------------------------------------------- 1 | ok 2 | -------------------------------------------------------------------------------- /mupen64plus-rsp-paraLLEl/lightning/check/alu_mul.ok: -------------------------------------------------------------------------------- 1 | ok 2 | -------------------------------------------------------------------------------- /mupen64plus-rsp-paraLLEl/lightning/check/alu_neg.ok: -------------------------------------------------------------------------------- 1 | ok 2 | -------------------------------------------------------------------------------- /mupen64plus-rsp-paraLLEl/lightning/check/alu_neg.tst: -------------------------------------------------------------------------------- 1 | #include "alu.inc" 2 | 3 | .code 4 | prolog 5 | 6 | #define NEG(N, I, V) UN(N, neg, I, V) 7 | 8 | NEG(0, 0, 0) 9 | #if __WORDSIZE == 32 10 | NEG(1, 1, 0xffffffff) 11 | NEG(2, 0xffffffff, 1) 12 | NEG(3, 0x80000000, 0x80000000) 13 | NEG(4, 0x7fffffff, 0x80000001) 14 | NEG(5, 0x80000001, 0x7fffffff) 15 | #else 16 | NEG(1, 1, 0xffffffffffffffff) 17 | NEG(2, 0xffffffff, 0xffffffff00000001) 18 | NEG(3, 0x80000000, 0xffffffff80000000) 19 | NEG(4, 0x7fffffff, 0xffffffff80000001) 20 | NEG(5, 0x80000001, 0xffffffff7fffffff) 21 | NEG(6, 0xffffffffffffffff, 1) 22 | NEG(7, 0x8000000000000000, 0x8000000000000000) 23 | NEG(8, 0x7fffffffffffffff, 0x8000000000000001) 24 | #endif 25 | 26 | #undef NEG 27 | #define NEG(N, T, I, V) FUN(N, T, neg, I, V) 28 | NEG(0, _f, 0.0, -0.0) 29 | NEG(1, _f, 0.5, -0.5) 30 | NEG(2, _f, $(1 / 0.0), $(-1.0 / 0)) 31 | NEG(3, _f, -1.25, 1.25) 32 | NEG(0, _d, 0.0, -0.0) 33 | NEG(1, _d, 0.5, -0.5) 34 | NEG(2, _d, $(1.0 / 0), $(-1 / 0.0)) 35 | NEG(3, _d, -1.25, 1.25) 36 | 37 | prepare 38 | pushargi ok 39 | ellipsis 40 | finishi @printf 41 | ret 42 | epilog 43 | -------------------------------------------------------------------------------- /mupen64plus-rsp-paraLLEl/lightning/check/alu_or.ok: -------------------------------------------------------------------------------- 1 | ok 2 | -------------------------------------------------------------------------------- /mupen64plus-rsp-paraLLEl/lightning/check/alu_rem.ok: -------------------------------------------------------------------------------- 1 | ok 2 | -------------------------------------------------------------------------------- /mupen64plus-rsp-paraLLEl/lightning/check/alu_rsb.ok: -------------------------------------------------------------------------------- 1 | ok 2 | -------------------------------------------------------------------------------- /mupen64plus-rsp-paraLLEl/lightning/check/alu_rsh.ok: -------------------------------------------------------------------------------- 1 | ok 2 | -------------------------------------------------------------------------------- /mupen64plus-rsp-paraLLEl/lightning/check/alu_sub.ok: -------------------------------------------------------------------------------- 1 | ok 2 | -------------------------------------------------------------------------------- /mupen64plus-rsp-paraLLEl/lightning/check/alu_xor.ok: -------------------------------------------------------------------------------- 1 | ok 2 | -------------------------------------------------------------------------------- /mupen64plus-rsp-paraLLEl/lightning/check/alux_add.ok: -------------------------------------------------------------------------------- 1 | ok 2 | -------------------------------------------------------------------------------- /mupen64plus-rsp-paraLLEl/lightning/check/alux_sub.ok: -------------------------------------------------------------------------------- 1 | ok 2 | -------------------------------------------------------------------------------- /mupen64plus-rsp-paraLLEl/lightning/check/bp.ok: -------------------------------------------------------------------------------- 1 | nfibs(32) = 2178309 2 | -------------------------------------------------------------------------------- /mupen64plus-rsp-paraLLEl/lightning/check/bp.tst: -------------------------------------------------------------------------------- 1 | .data 32 2 | fmt: 3 | .c "nfibs(%d) = %d\n" 4 | 5 | .code 6 | jmpi main 7 | 8 | name rfibs 9 | rfibs: 10 | prolog 11 | arg $in 12 | getarg %r0 $in /* R0 = N */ 13 | beqi out %r0 0 14 | movr %v0 %r0 /* V0 = R0 */ 15 | movi %r0 1 16 | blei_u out %v0 2 17 | subi %v1 %v0 1 /* V1 = N-1 */ 18 | subi %v2 %v0 2 /* V1 = N-2 */ 19 | prepare 20 | pushargr %v1 21 | finishi rfibs 22 | retval %v1 /* V1 = rfibs(N-1) */ 23 | prepare 24 | pushargr %v2 25 | finishi rfibs 26 | retval %r0 /* R0 = rfibs(N-2) */ 27 | addr %r0 %r0 %v1 28 | out: 29 | retr %r0 30 | epilog 31 | 32 | name main 33 | main: 34 | prolog 35 | prepare 36 | pushargi 32 37 | finishi rfibs 38 | retval %v0 39 | prepare 40 | pushargi fmt 41 | ellipsis 42 | pushargi 32 43 | pushargr %v0 44 | finishi @printf 45 | ret 46 | epilog 47 | -------------------------------------------------------------------------------- /mupen64plus-rsp-paraLLEl/lightning/check/branch.ok: -------------------------------------------------------------------------------- 1 | ok 2 | -------------------------------------------------------------------------------- /mupen64plus-rsp-paraLLEl/lightning/check/call.ok: -------------------------------------------------------------------------------- 1 | forward 2 | backward 3 | forward 4 | backward 5 | -------------------------------------------------------------------------------- /mupen64plus-rsp-paraLLEl/lightning/check/carry.ok: -------------------------------------------------------------------------------- 1 | ok 2 | -------------------------------------------------------------------------------- /mupen64plus-rsp-paraLLEl/lightning/check/check.arm.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | test=`basename $0 | sed -e 's|\.arm$||'` 3 | ./lightning -mthumb=0 $srcdir/$test.tst | tr -d \\r > $test.out 4 | if test $? != 0; then 5 | exit $? 6 | fi 7 | 8 | cmp -s $srcdir/$test.ok $test.out 9 | result=$? 10 | if test $result != 0; then 11 | diff $srcdir/$test.ok $test.out 12 | rm $test.out 13 | exit 1 14 | fi 15 | rm $test.out 16 | -------------------------------------------------------------------------------- /mupen64plus-rsp-paraLLEl/lightning/check/check.arm.swf.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | test=`basename $0 | sed -e 's|\.arm\.swf$||'` 3 | ./lightning -mthumb=0 -mvfp=0 $srcdir/$test.tst | tr -d \\r > $test.out 4 | if test $? != 0; then 5 | exit $? 6 | fi 7 | 8 | cmp -s $srcdir/$test.ok $test.out 9 | result=$? 10 | if test $result != 0; then 11 | diff $srcdir/$test.ok $test.out 12 | rm $test.out 13 | exit 1 14 | fi 15 | rm $test.out 16 | -------------------------------------------------------------------------------- /mupen64plus-rsp-paraLLEl/lightning/check/check.arm4.swf.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | test=`basename $0 | sed -e 's|\.arm4\.swf$||'` 3 | ./lightning -mcpu=4 -mthumb=0 -mvfp=0 $srcdir/$test.tst | tr -d \\r > $test.out 4 | if test $? != 0; then 5 | exit $? 6 | fi 7 | 8 | cmp -s $srcdir/$test.ok $test.out 9 | result=$? 10 | if test $result != 0; then 11 | diff $srcdir/$test.ok $test.out 12 | rm $test.out 13 | exit 1 14 | fi 15 | rm $test.out 16 | -------------------------------------------------------------------------------- /mupen64plus-rsp-paraLLEl/lightning/check/check.nodata.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | test=`basename $0 | sed -e 's|\.nodata$||'` 3 | ./lightning -d $srcdir/$test.tst | tr -d \\r > $test.out 4 | if test $? != 0; then 5 | exit $? 6 | fi 7 | 8 | cmp -s $srcdir/$test.ok $test.out 9 | result=$? 10 | if test $result != 0; then 11 | diff $srcdir/$test.ok $test.out 12 | rm $test.out 13 | exit 1 14 | fi 15 | rm $test.out 16 | -------------------------------------------------------------------------------- /mupen64plus-rsp-paraLLEl/lightning/check/check.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | test=`basename $0` 3 | ./lightning $srcdir/$test.tst | tr -d \\r > $test.out 4 | if test $? != 0; then 5 | exit $? 6 | fi 7 | 8 | cmp -s $srcdir/$test.ok $test.out 9 | result=$? 10 | if test $result != 0; then 11 | diff $srcdir/$test.ok $test.out 12 | rm $test.out 13 | exit 1 14 | fi 15 | rm $test.out 16 | -------------------------------------------------------------------------------- /mupen64plus-rsp-paraLLEl/lightning/check/check.swf.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | test=`basename $0 | sed -e 's|\.swf$||'` 3 | ./lightning -mvfp=0 $srcdir/$test.tst | tr -d \\r > $test.out 4 | if test $? != 0; then 5 | exit $? 6 | fi 7 | 8 | cmp -s $srcdir/$test.ok $test.out 9 | result=$? 10 | if test $result != 0; then 11 | diff $srcdir/$test.ok $test.out 12 | rm $test.out 13 | exit 1 14 | fi 15 | rm $test.out 16 | -------------------------------------------------------------------------------- /mupen64plus-rsp-paraLLEl/lightning/check/check.x87.nodata.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | test=`basename $0 | sed -e 's|\.x87.nodata$||'` 3 | ./lightning -data=0 -mx87=1 $srcdir/$test.tst | tr -d \\r > $test.out 4 | if test $? != 0; then 5 | exit $? 6 | fi 7 | 8 | cmp -s $srcdir/$test.ok $test.out 9 | result=$? 10 | if test $result != 0; then 11 | diff $srcdir/$test.ok $test.out 12 | rm $test.out 13 | exit 1 14 | fi 15 | rm $test.out 16 | -------------------------------------------------------------------------------- /mupen64plus-rsp-paraLLEl/lightning/check/check.x87.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | test=`basename $0 | sed -e 's|\.x87$||'` 3 | ./lightning -mx87=1 $srcdir/$test.tst | tr -d \\r > $test.out 4 | if test $? != 0; then 5 | exit $? 6 | fi 7 | 8 | cmp -s $srcdir/$test.ok $test.out 9 | result=$? 10 | if test $result != 0; then 11 | diff $srcdir/$test.ok $test.out 12 | rm $test.out 13 | exit 1 14 | fi 15 | rm $test.out 16 | -------------------------------------------------------------------------------- /mupen64plus-rsp-paraLLEl/lightning/check/clobber.ok: -------------------------------------------------------------------------------- 1 | ok 2 | -------------------------------------------------------------------------------- /mupen64plus-rsp-paraLLEl/lightning/check/cvt.ok: -------------------------------------------------------------------------------- 1 | ok 2 | -------------------------------------------------------------------------------- /mupen64plus-rsp-paraLLEl/lightning/check/divi.ok: -------------------------------------------------------------------------------- 1 | 40/8 = 5 (expected 5) 2 | 64/8 = 8 (expected 8) 3 | 80/8 = 10 (expected 10) 4 | 98304/32768 = 3 (expected 3) 5 | 65536/32768 = 2 (expected 2) 6 | 163840/32768 = 5 (expected 5) 7 | -------------------------------------------------------------------------------- /mupen64plus-rsp-paraLLEl/lightning/check/fib.ok: -------------------------------------------------------------------------------- 1 | nfibs(32) = 2178309 2 | -------------------------------------------------------------------------------- /mupen64plus-rsp-paraLLEl/lightning/check/fib.tst: -------------------------------------------------------------------------------- 1 | .data 32 2 | format: 3 | .c "nfibs(%d) = %d\n" 4 | 5 | .code 6 | jmpi main 7 | 8 | name nfibs 9 | nfibs: 10 | prolog 11 | arg $in 12 | getarg %r0 $in // R0 = n 13 | beqi ref %r0 0 14 | movr %r1 %r0 15 | movi %r0 1 16 | blei_u ref %r1 2 17 | subi %r2 %r1 2 18 | movr %r1 %r0 19 | loop: 20 | subi %r2 %r2 1 // decr. counter 21 | movr %v0 %r0 // V0 = R0 22 | addr %r0 %r0 %r1 // R0 = R0 + R1 23 | movr %r1 %v0 // R1 = V0 24 | bnei loop %r2 0 // if (R2) goto loop 25 | ref: 26 | retr %r0 // RET = R0 27 | epilog 28 | 29 | name main 30 | main: 31 | prolog 32 | arg $argc 33 | arg $argv 34 | 35 | getarg_i %r0 $argc 36 | blei default %r0 1 37 | getarg %r0 $argv 38 | addi %r0 %r0 $(__WORDSIZE >> 3) 39 | ldr %r0 %r0 40 | prepare 41 | pushargr %r0 42 | finishi @atoi 43 | retval %r0 44 | jmpi call 45 | 46 | default: 47 | movi %r0 32 48 | 49 | call: 50 | movr %v0 %r0 51 | prepare 52 | pushargr %r0 53 | finishi nfibs 54 | retval %r0 55 | prepare 56 | pushargi format 57 | ellipsis 58 | pushargr %v0 59 | pushargr %r0 60 | finishi @printf 61 | ret 62 | epilog 63 | -------------------------------------------------------------------------------- /mupen64plus-rsp-paraLLEl/lightning/check/float.ok: -------------------------------------------------------------------------------- 1 | ok 2 | -------------------------------------------------------------------------------- /mupen64plus-rsp-paraLLEl/lightning/check/fop_abs.ok: -------------------------------------------------------------------------------- 1 | ok 2 | -------------------------------------------------------------------------------- /mupen64plus-rsp-paraLLEl/lightning/check/fop_abs.tst: -------------------------------------------------------------------------------- 1 | #include "alu.inc" 2 | 3 | .code 4 | prolog 5 | #define ABS(N, T, I, V) FUN(N, T, abs, I, V) 6 | #define UABS(N, T, I, V) UFUN(N, T, abs, I, V) 7 | ABS(0, _f, -0.0, 0.0) 8 | ABS(1, _f, 0.5, 0.5) 9 | ABS(2, _f, -0.5, 0.5) 10 | ABS(3, _f, $Inf, $Inf) 11 | ABS(4, _f, $nInf, $Inf) 12 | ABS(5, _f, 1.25, 1.25) 13 | ABS(6, _f, -1.25, 1.25) 14 | ABS(7, _f, $nInf, $Inf) 15 | UABS(0, _f, $NaN, $NaN) 16 | ABS(0, _d, -0.0, 0.0) 17 | ABS(1, _d, 0.5, 0.5) 18 | ABS(2, _d, -0.5, 0.5) 19 | ABS(3, _d, $Inf, $Inf) 20 | ABS(4, _d, $nInf, $Inf) 21 | ABS(5, _d, 1.25, 1.25) 22 | ABS(6, _d, -1.25, 1.25) 23 | ABS(7, _d, $nInf, $Inf) 24 | UABS(0, _d, $NaN, $NaN) 25 | 26 | prepare 27 | pushargi ok 28 | ellipsis 29 | finishi @printf 30 | ret 31 | epilog 32 | -------------------------------------------------------------------------------- /mupen64plus-rsp-paraLLEl/lightning/check/fop_sqrt.ok: -------------------------------------------------------------------------------- 1 | ok 2 | -------------------------------------------------------------------------------- /mupen64plus-rsp-paraLLEl/lightning/check/fop_sqrt.tst: -------------------------------------------------------------------------------- 1 | #include "alu.inc" 2 | 3 | .code 4 | prolog 5 | #define SQRT(N, T, I, V) FUN(N, T, sqrt, I, V) 6 | #define USQRT(N, T, I, V) UFUN(N, T, sqrt, I, V) 7 | SQRT(0, _f, -0.0, 0.0) 8 | SQRT(1, _f, 4.0, 2.0) 9 | SQRT(2, _f, 2.25, 1.5) 10 | SQRT(3, _f, $Inf, $Inf) 11 | USQRT(0, _f, $NaN, $NaN) 12 | SQRT(0, _d, -0.0, 0.0) 13 | SQRT(1, _d, 4.0, 2.0) 14 | SQRT(2, _d, 2.25, 1.5) 15 | SQRT(3, _d, $Inf, $Inf) 16 | USQRT(0, _d, $NaN, $NaN) 17 | 18 | prepare 19 | pushargi ok 20 | ellipsis 21 | finishi @printf 22 | ret 23 | epilog 24 | -------------------------------------------------------------------------------- /mupen64plus-rsp-paraLLEl/lightning/check/hton.ok: -------------------------------------------------------------------------------- 1 | ok 2 | -------------------------------------------------------------------------------- /mupen64plus-rsp-paraLLEl/lightning/check/jmpr.ok: -------------------------------------------------------------------------------- 1 | ok 2 | -------------------------------------------------------------------------------- /mupen64plus-rsp-paraLLEl/lightning/check/ldsti.ok: -------------------------------------------------------------------------------- 1 | ok 2 | -------------------------------------------------------------------------------- /mupen64plus-rsp-paraLLEl/lightning/check/ldstr-c.ok: -------------------------------------------------------------------------------- 1 | ok 2 | -------------------------------------------------------------------------------- /mupen64plus-rsp-paraLLEl/lightning/check/ldstr.ok: -------------------------------------------------------------------------------- 1 | ok 2 | -------------------------------------------------------------------------------- /mupen64plus-rsp-paraLLEl/lightning/check/ldstxi-c.ok: -------------------------------------------------------------------------------- 1 | ok 2 | -------------------------------------------------------------------------------- /mupen64plus-rsp-paraLLEl/lightning/check/ldstxi.ok: -------------------------------------------------------------------------------- 1 | ok 2 | -------------------------------------------------------------------------------- /mupen64plus-rsp-paraLLEl/lightning/check/ldstxr-c.ok: -------------------------------------------------------------------------------- 1 | ok 2 | -------------------------------------------------------------------------------- /mupen64plus-rsp-paraLLEl/lightning/check/ldstxr.ok: -------------------------------------------------------------------------------- 1 | ok 2 | -------------------------------------------------------------------------------- /mupen64plus-rsp-paraLLEl/lightning/check/put.ok: -------------------------------------------------------------------------------- 1 | ok 2 | -------------------------------------------------------------------------------- /mupen64plus-rsp-paraLLEl/lightning/check/qalu_div.ok: -------------------------------------------------------------------------------- 1 | ok 2 | -------------------------------------------------------------------------------- /mupen64plus-rsp-paraLLEl/lightning/check/qalu_div.tst: -------------------------------------------------------------------------------- 1 | #include "qalu.inc" 2 | 3 | .code 4 | prolog 5 | #define QDIV(N, I0, I1, LO, HI) QALU(N, , qdiv, I0, I1, LO, HI) 6 | #define UQDIV(N, I0, I1, LO, HI) QALU(N, _u, qdiv, I0, I1, LO, HI) 7 | QDIV(0, 10, 3, 3, 1) 8 | QDIV(1, -33, 9, -3, -6) 9 | QDIV(2, -41, -7, 5, -6) 10 | QDIV(3, 65536, 4096, 16, 0) 11 | UQDIV(4, -1, -2, 1, 1) 12 | UQDIV(5, -2, -5, 1, 3) 13 | prepare 14 | pushargi ok 15 | ellipsis 16 | finishi @printf 17 | ret 18 | epilog 19 | -------------------------------------------------------------------------------- /mupen64plus-rsp-paraLLEl/lightning/check/qalu_mul.ok: -------------------------------------------------------------------------------- 1 | ok 2 | -------------------------------------------------------------------------------- /mupen64plus-rsp-paraLLEl/lightning/check/qalu_mul.tst: -------------------------------------------------------------------------------- 1 | #include "qalu.inc" 2 | 3 | .code 4 | prolog 5 | #define QMUL(N, I0, I1, LO, HI) QALU(N, , qmul, I0, I1, LO, HI) 6 | #define UQMUL(N, I0, I1, LO, HI) QALU(N, _u, qmul, I0, I1, LO, HI) 7 | QMUL(0, -2, -1, 2, 0) 8 | QMUL(1, 0, -1, 0, 0) 9 | QMUL(2, -1, 0, 0, 0) 10 | QMUL(3, 1, -1, -1, -1) 11 | #if __WORDSIZE == 32 12 | QMUL(4, 0x7ffff, 0x7ffff, 0xfff00001, 0x3f) 13 | UQMUL(5, 0xffffff, 0xffffff, 0xfe000001, 0xffff) 14 | QMUL(6, 0x80000000, -2, 0, 1) 15 | QMUL(7, 0x80000000, 2, 0, -1) 16 | QMUL(8, 0x80000001, 3, 0x80000003, -2) 17 | QMUL(9, 0x80000001, -3, 0x7ffffffd, 1) 18 | #else 19 | QMUL(4, 0x7ffffffff, 0x7ffffffff, 0xfffffff000000001, 0x3f) 20 | UQMUL(5, 0xffffffffff, 0xffffffffff, 0xfffffe0000000001, 0xffff) 21 | QMUL(6, 0x8000000000000000, -2, 0, 1) 22 | QMUL(7, 0x8000000000000000, 2, 0, -1) 23 | QMUL(8, 0x8000000000000001, 3, 0x8000000000000003, -2) 24 | QMUL(9, 0x8000000000000001, -3, 0x7ffffffffffffffd, 1) 25 | #endif 26 | prepare 27 | pushargi ok 28 | ellipsis 29 | finishi @printf 30 | ret 31 | epilog 32 | -------------------------------------------------------------------------------- /mupen64plus-rsp-paraLLEl/lightning/check/range.ok: -------------------------------------------------------------------------------- 1 | ok 2 | -------------------------------------------------------------------------------- /mupen64plus-rsp-paraLLEl/lightning/check/ranger.ok: -------------------------------------------------------------------------------- 1 | ok 2 | -------------------------------------------------------------------------------- /mupen64plus-rsp-paraLLEl/lightning/check/ret.ok: -------------------------------------------------------------------------------- 1 | ok 2 | -------------------------------------------------------------------------------- /mupen64plus-rsp-paraLLEl/lightning/check/rpn.ok: -------------------------------------------------------------------------------- 1 | 2 | C: 0 10 20 30 40 50 60 70 80 90 100 3 | F: 32 50 68 86 104 122 140 158 176 194 212 4 | 5 | F: 32 50 68 86 104 122 140 158 176 194 212 6 | C: 0 10 20 30 40 50 60 70 80 90 100 7 | -------------------------------------------------------------------------------- /mupen64plus-rsp-paraLLEl/lightning/check/run-test: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | 3 | ok=`echo $1 | sed -e 's@\.\(x87\|arm\|swf\)@@'` 4 | $1 | tr -d \\r > $1.log 5 | if cmp -s $srcdir/$ok.ok $1.log; then 6 | rm $1.log 7 | else 8 | diff $srcdir/$ok.ok $1.log 9 | exit 1 10 | fi 11 | -------------------------------------------------------------------------------- /mupen64plus-rsp-paraLLEl/lightning/check/stack.ok: -------------------------------------------------------------------------------- 1 | ok 2 | -------------------------------------------------------------------------------- /mupen64plus-rsp-paraLLEl/lightning/check/tramp.ok: -------------------------------------------------------------------------------- 1 | xfibs(32) = 7049155 2 | -------------------------------------------------------------------------------- /mupen64plus-rsp-paraLLEl/lightning/check/va_list.ok: -------------------------------------------------------------------------------- 1 | ok 2 | -------------------------------------------------------------------------------- /mupen64plus-rsp-paraLLEl/lightning/check/varargs.ok: -------------------------------------------------------------------------------- 1 | 0 1 2 3 4 5 6 7 8 9 2 | 0.0 1.0 2.0 3.0 4.0 5.0 6.0 7.0 8.0 9.0 3 | 0 0.0 1 1.0 2 2.0 3 3.0 4 4.0 5 5.0 6 6.0 7 7.0 8 8.0 9 9.0 4 | 0.0 0 1.0 1 2.0 2 3.0 3 4.0 4 5.0 5 6.0 6 7.0 7 8.0 8 9.0 9 5 | -------------------------------------------------------------------------------- /mupen64plus-rsp-paraLLEl/lightning/doc/.cvsignore: -------------------------------------------------------------------------------- 1 | *.info* 2 | stamp-* 3 | version.texi 4 | -------------------------------------------------------------------------------- /mupen64plus-rsp-paraLLEl/lightning/doc/.gitignore: -------------------------------------------------------------------------------- 1 | *.info* 2 | stamp-* 3 | -------------------------------------------------------------------------------- /mupen64plus-rsp-paraLLEl/lightning/doc/incr.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | static jit_state_t *_jit; 5 | 6 | typedef int (*pifi)(int); /* Pointer to Int Function of Int */ 7 | 8 | int main(int argc, char *argv[]) 9 | { 10 | jit_node_t *in; 11 | pifi incr; 12 | 13 | init_jit(argv[0]); 14 | _jit = jit_new_state(); 15 | 16 | jit_prolog(); /* @t{ prolog } */ 17 | in = jit_arg(); /* @t{ in = arg } */ 18 | jit_getarg(JIT_R0, in); /* @t{ getarg R0 } */ 19 | jit_addi(JIT_R0, JIT_R0, 1); /* @t{ addi R0\, R0\, 1 } */ 20 | jit_retr(JIT_R0); /* @t{ retr R0 } */ 21 | 22 | incr = jit_emit(); 23 | jit_clear_state(); 24 | 25 | /* call the generated code\, passing 5 as an argument */ 26 | printf("%d + 1 = %d\n", 5, incr(5)); 27 | 28 | jit_destroy_state(); 29 | finish_jit(); 30 | return 0; 31 | } 32 | -------------------------------------------------------------------------------- /mupen64plus-rsp-paraLLEl/lightning/doc/version.texi: -------------------------------------------------------------------------------- 1 | @set UPDATED 3 October 2017 2 | @set UPDATED-MONTH October 2017 3 | @set EDITION 2.1.3 4 | @set VERSION 2.1.3 5 | -------------------------------------------------------------------------------- /mupen64plus-rsp-paraLLEl/lightning/include/Makefile.am: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2000, 2001, 2002, 2012-2019 Free Software Foundation, Inc. 3 | # 4 | # This file is part of GNU lightning. 5 | # 6 | # GNU lightning is free software; you can redistribute it and/or modify it 7 | # under the terms of the GNU Lesser General Public License as published 8 | # by the Free Software Foundation; either version 3, or (at your option) 9 | # any later version. 10 | # 11 | # GNU lightning is distributed in the hope that it will be useful, but 12 | # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 13 | # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public 14 | # License for more details. 15 | # 16 | 17 | SUBDIRS = \ 18 | lightning 19 | 20 | nodist_include_HEADERS = lightning.h 21 | -------------------------------------------------------------------------------- /mupen64plus-rsp-paraLLEl/lightning/lightning.pc.in: -------------------------------------------------------------------------------- 1 | prefix=@prefix@ 2 | exec_prefix=@exec_prefix@ 3 | libdir=@libdir@ 4 | includedir=@includedir@ 5 | 6 | Name: GNU Lightning 7 | Description: JIT library 8 | Version: @VERSION@ 9 | Libs: -L${libdir} -llightning 10 | Cflags: -I${includedir}/ 11 | 12 | 13 | -------------------------------------------------------------------------------- /mupen64plus-rsp-paraLLEl/lightning/m4/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/paraLLeXT/41567a669252e7af3dcaf75616dc83ec0a11847f/mupen64plus-rsp-paraLLEl/lightning/m4/.gitkeep -------------------------------------------------------------------------------- /mupen64plus-rsp-paraLLEl/llvm_jit.hpp: -------------------------------------------------------------------------------- 1 | #ifndef JIT_HPP 2 | #define JIT_HPP 3 | 4 | #include 5 | #include 6 | #include 7 | 8 | namespace JIT 9 | { 10 | using Func = void (*)(void *, void *); 11 | class LLVMEngine 12 | { 13 | public: 14 | LLVMEngine(const std::unordered_map &symbol_table); 15 | ~LLVMEngine(); 16 | 17 | private: 18 | friend class Block; 19 | struct Impl; 20 | std::unique_ptr impl; 21 | }; 22 | 23 | class Block 24 | { 25 | public: 26 | Block(LLVMEngine &engine); 27 | ~Block(); 28 | bool compile(uint64_t hash, const std::string &source); 29 | Func get_func() const 30 | { 31 | return block; 32 | } 33 | 34 | private: 35 | struct Impl; 36 | std::unique_ptr impl; 37 | Func block = nullptr; 38 | size_t block_size = 0; 39 | }; 40 | } // namespace JIT 41 | 42 | #endif 43 | -------------------------------------------------------------------------------- /mupen64plus-rsp-paraLLEl/rsp/reciprocal.h: -------------------------------------------------------------------------------- 1 | // 2 | // common/reciprocal.h: RSP reciprocal ROM contents. 3 | // 4 | // CEN64: Cycle-Accurate Nintendo 64 Emulator. 5 | // Copyright (C) 2015, Tyler J. Stachecki. 6 | // 7 | // This file is subject to the terms and conditions defined in 8 | // 'LICENSE', which is part of this source code package. 9 | // 10 | 11 | #ifndef __common_reciprocal_h__ 12 | #define __common_reciprocal_h__ 13 | #include 14 | 15 | extern const uint16_t rsp_reciprocal_rom[1024]; 16 | 17 | #endif 18 | -------------------------------------------------------------------------------- /mupen64plus-rsp-paraLLEl/rsp/registers.md: -------------------------------------------------------------------------------- 1 | // 2 | // rsp/registers.md: RSP register enumerations. 3 | // 4 | // CEN64: Cycle-Accurate Nintendo 64 Emulator. 5 | // Copyright (C) 2015, Tyler J. Stachecki. 6 | // 7 | // This file is subject to the terms and conditions defined in 8 | // 'LICENSE', which is part of this source code package. 9 | // 10 | 11 | #ifndef SP_REGISTER_LIST 12 | #define SP_REGISTER_LIST \ 13 | X(SP_MEM_ADDR_REG) \ 14 | X(SP_DRAM_ADDR_REG) \ 15 | X(SP_RD_LEN_REG) \ 16 | X(SP_WR_LEN_REG) \ 17 | X(SP_STATUS_REG) \ 18 | X(SP_DMA_FULL_REG) \ 19 | X(SP_DMA_BUSY_REG) \ 20 | X(SP_SEMAPHORE_REG) \ 21 | X(CMD_START) \ 22 | X(CMD_END) \ 23 | X(CMD_CURRENT) \ 24 | X(CMD_STATUS) \ 25 | X(CMD_CLOCK) \ 26 | X(CMD_BUSY) \ 27 | X(CMD_PIPE_BUSY) \ 28 | X(CMD_TMEM_BUSY) \ 29 | X(SP_PC_REG) \ 30 | X(SP_IBIST_REG) 31 | #endif 32 | 33 | SP_REGISTER_LIST 34 | 35 | -------------------------------------------------------------------------------- /mupen64plus-rsp-paraLLEl/rsp_disasm.hpp: -------------------------------------------------------------------------------- 1 | #ifndef RSP_DISASM_HPP_ 2 | #define RSP_DISASM_HPP_ 3 | 4 | #include 5 | 6 | namespace RSP 7 | { 8 | std::string disassemble(uint32_t pc, uint32_t instr); 9 | const char *register_name(unsigned reg_index); 10 | } 11 | 12 | #endif -------------------------------------------------------------------------------- /mupen64plus-rsp-paraLLEl/win32/mman/sys/.gitignore: -------------------------------------------------------------------------------- 1 | x64 2 | mman.VC.db -------------------------------------------------------------------------------- /mupen64plus-rsp-paraLLEl/win32/mman/sys/.gitrepo: -------------------------------------------------------------------------------- 1 | ; DO NOT EDIT (unless you know what you are doing) 2 | ; 3 | ; This subdirectory is a git "subrepo", and this file is maintained by the 4 | ; git-subrepo command. See https://github.com/git-commands/git-subrepo#readme 5 | ; 6 | [subrepo] 7 | remote = https://github.com/witwall/mman-win32.git 8 | branch = master 9 | commit = 2d1c576e62b99e85d99407e1a88794c6e44c3310 10 | parent = 9f797430963d9cf0fcef7d963466f9cac7026de2 11 | method = merge 12 | cmdver = 0.4.0 13 | -------------------------------------------------------------------------------- /mupen64plus-rsp-paraLLEl/win32/mman/sys/.vs/mman/v14/.suo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/paraLLeXT/41567a669252e7af3dcaf75616dc83ec0a11847f/mupen64plus-rsp-paraLLEl/win32/mman/sys/.vs/mman/v14/.suo -------------------------------------------------------------------------------- /mupen64plus-rsp-paraLLEl/win32/mman/sys/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | project (mman-win32 C) 2 | 3 | cmake_minimum_required (VERSION 2.8) 4 | 5 | option (BUILD_SHARED_LIBS "shared/static libs" ON) 6 | option (BUILD_TESTS "tests?" OFF) 7 | 8 | set (headers mman.h) 9 | set (sources mman.c) 10 | 11 | add_library (mman ${sources}) 12 | 13 | if (BUILD_SHARED_LIBS) 14 | target_compile_definitions(mman 15 | PUBLIC MMAN_LIBRARY_DLL 16 | PRIVATE MMAN_LIBRARY 17 | ) 18 | endif() 19 | 20 | install (TARGETS mman RUNTIME DESTINATION bin 21 | LIBRARY DESTINATION lib${LIB_SUFFIX} 22 | ARCHIVE DESTINATION lib${LIB_SUFFIX}) 23 | 24 | install (FILES ${headers} DESTINATION include/sys) 25 | 26 | if (BUILD_TESTS) 27 | enable_testing () 28 | add_executable (t_mman test.c) 29 | target_link_libraries (t_mman mman) 30 | add_test (NAME t_mman COMMAND t_mman${CMAKE_EXECUTABLE_SUFFIX}) 31 | endif () 32 | 33 | 34 | -------------------------------------------------------------------------------- /mupen64plus-rsp-paraLLEl/win32/mman/sys/README.md: -------------------------------------------------------------------------------- 1 | mman-win32 2 | ========== 3 | 4 | mman library for Windows. mirror of https://code.google.com/p/mman-win32/ 5 | 6 | A light implementation of the mmap functions for MinGW. 7 | 8 | The mmap-win32 library implements a wrapper for mmap functions around the memory mapping Windows API. 9 | 10 | License: MIT License 11 | -------------------------------------------------------------------------------- /mupen64plus-rsp-paraLLEl/win32/mman/sys/UpgradeLog.htm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/paraLLeXT/41567a669252e7af3dcaf75616dc83ec0a11847f/mupen64plus-rsp-paraLLEl/win32/mman/sys/UpgradeLog.htm -------------------------------------------------------------------------------- /mupen64plus-rsp-paraLLEl/win32/mman/sys/mman-win32.pro: -------------------------------------------------------------------------------- 1 | QT -= core gui 2 | 3 | TARGET = mman 4 | TEMPLATE = lib 5 | 6 | DEFINES += MMAN_LIBRARY_DLL 7 | DEFINES += MMAN_LIBRARY 8 | 9 | HEADERS += \ 10 | mman.h 11 | 12 | SOURCES += \ 13 | mman.c 14 | -------------------------------------------------------------------------------- /mupen64plus-rsp-paraLLEl/win32/mman/sys/mman.vcxproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /mupen64plus-video-angrylion/common.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | // endianness 4 | #define LSB_FIRST 1 5 | #ifdef LSB_FIRST 6 | #define BYTE_ADDR_XOR 3 7 | #define WORD_ADDR_XOR 1 8 | #define BYTE4_XOR_BE(a) ((a) ^ BYTE_ADDR_XOR) 9 | #else 10 | #define BYTE_ADDR_XOR 0 11 | #define WORD_ADDR_XOR 0 12 | #define BYTE4_XOR_BE(a) (a) 13 | #endif 14 | 15 | #ifdef LSB_FIRST 16 | #define BYTE_XOR_DWORD_SWAP 7 17 | #define WORD_XOR_DWORD_SWAP 3 18 | #else 19 | #define BYTE_XOR_DWORD_SWAP 4 20 | #define WORD_XOR_DWORD_SWAP 2 21 | #endif 22 | 23 | #define DWORD_XOR_DWORD_SWAP 1 24 | 25 | // inlining 26 | #define INLINE inline 27 | 28 | #ifdef _MSC_VER 29 | #define STRICTINLINE __forceinline 30 | #elif defined(__GNUC__) 31 | #define STRICTINLINE __attribute__((always_inline)) inline 32 | #else 33 | #define STRICTINLINE inline 34 | #endif 35 | -------------------------------------------------------------------------------- /mupen64plus-video-angrylion/msg.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | void msg_error(const char * err, ...); 4 | void msg_warning(const char* err, ...); 5 | void msg_debug(const char* err, ...); 6 | -------------------------------------------------------------------------------- /mupen64plus-video-angrylion/n64video/vi/divot.c: -------------------------------------------------------------------------------- 1 | static STRICTINLINE void divot_filter(struct rgba* final, struct rgba center, struct rgba left, struct rgba right) 2 | { 3 | *final = center; 4 | 5 | if ((center.a & left.a & right.a) == 7) 6 | { 7 | return; 8 | } 9 | 10 | if ((left.r >= center.r && right.r >= left.r) || (left.r >= right.r && center.r >= left.r)) 11 | final->r = left.r; 12 | else if ((right.r >= center.r && left.r >= right.r) || (right.r >= left.r && center.r >= right.r)) 13 | final->r = right.r; 14 | 15 | if ((left.g >= center.g && right.g >= left.g) || (left.g >= right.g && center.g >= left.g)) 16 | final->g = left.g; 17 | else if ((right.g >= center.g && left.g >= right.g) || (right.g >= left.g && center.g >= right.g)) 18 | final->g = right.g; 19 | 20 | if ((left.b >= center.b && right.b >= left.b) || (left.b >= right.b && center.b >= left.b)) 21 | final->b = left.b; 22 | else if ((right.b >= center.b && left.b >= right.b) || (right.b >= left.b && center.b >= right.b)) 23 | final->b = right.b; 24 | } 25 | -------------------------------------------------------------------------------- /mupen64plus-video-angrylion/n64video/vi/lerp.c: -------------------------------------------------------------------------------- 1 | static STRICTINLINE void vi_vl_lerp(struct rgba* up, struct rgba down, uint32_t frac) 2 | { 3 | uint32_t r0, g0, b0; 4 | if (!frac) 5 | return; 6 | 7 | r0 = up->r; 8 | g0 = up->g; 9 | b0 = up->b; 10 | 11 | up->r = ((((down.r - r0) * frac + 16) >> 5) + r0) & 0xff; 12 | up->g = ((((down.g - g0) * frac + 16) >> 5) + g0) & 0xff; 13 | up->b = ((((down.b - b0) * frac + 16) >> 5) + b0) & 0xff; 14 | } 15 | -------------------------------------------------------------------------------- /mupen64plus-video-angrylion/parallel_al.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #ifdef __cplusplus 4 | extern "C" { 5 | #endif 6 | 7 | #include 8 | 9 | #define PARALLEL_MAX_WORKERS 64u 10 | 11 | void parallel_alinit(uint32_t num); 12 | void parallel_run(void task(uint32_t)); 13 | uint32_t parallel_num_workers(); 14 | void parallel_close(); 15 | 16 | #ifdef __cplusplus 17 | } 18 | #endif 19 | -------------------------------------------------------------------------------- /mupen64plus-video-angrylion/plugin.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | void plugin_init(void); 6 | void plugin_sync_dp(void); 7 | uint32_t** plugin_get_dp_registers(void); 8 | uint32_t** plugin_get_vi_registers(void); 9 | uint8_t* plugin_get_rdram(void); 10 | uint32_t plugin_get_rdram_size(void); 11 | uint8_t* plugin_get_dmem(void); 12 | uint8_t* plugin_get_rom_header(void); 13 | uint32_t plugin_get_rom_name(char* name, uint32_t name_size); 14 | void plugin_close(void); 15 | -------------------------------------------------------------------------------- /mupen64plus-video-angrylion/vdac.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "n64video.h" 4 | 5 | #include 6 | #include 7 | 8 | struct rgba 9 | { 10 | uint8_t b; 11 | uint8_t g; 12 | uint8_t r; 13 | uint8_t a; 14 | }; 15 | 16 | struct frame_buffer 17 | { 18 | struct rgba* pixels; 19 | uint32_t width; 20 | uint32_t height; 21 | uint32_t height_out; 22 | uint32_t pitch; 23 | }; 24 | 25 | void vdac_init(struct n64video_config* config); 26 | void vdac_read(struct frame_buffer* fb, bool alpha); 27 | void vdac_write(struct frame_buffer* fb); 28 | void vdac_sync(bool invaid); 29 | void vdac_close(void); 30 | -------------------------------------------------------------------------------- /mupen64plus-video-angrylion/version.h.in: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #define GIT_BRANCH "@GIT_BRANCH@" 4 | #define GIT_TAG "@GIT_TAG@" 5 | #define GIT_COMMIT_HASH "@GIT_COMMIT_HASH@" 6 | #define GIT_COMMIT_DATE "@GIT_COMMIT_DATE@" 7 | 8 | #define CORE_BASE_NAME "angrylion's RDP Plus" 9 | 10 | #ifdef _DEBUG 11 | #define CORE_NAME CORE_BASE_NAME " " GIT_TAG " (Debug)" 12 | #else 13 | #define CORE_NAME CORE_BASE_NAME " " GIT_TAG 14 | #endif 15 | 16 | #define CORE_SIMPLE_NAME "angrylion-plus" 17 | -------------------------------------------------------------------------------- /mupen64plus-video-paraLLEl/CREDITS.txt: -------------------------------------------------------------------------------- 1 | Written by Tiny Tiger. 2 | 3 | Code is heavily inspired by the Angrylion LLE plugin. 4 | This plugin aims to be very similar to Angrylion LLE, but it is completely rewritten to run in parallel on GPUs. 5 | -------------------------------------------------------------------------------- /mupen64plus-video-paraLLEl/format_all.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | for file in *.{cpp,hpp} 4 | do 5 | echo "Formatting file: $file ..." 6 | clang-format -style=file -i $file 7 | done 8 | -------------------------------------------------------------------------------- /mupen64plus-video-paraLLEl/parallel.h: -------------------------------------------------------------------------------- 1 | #ifndef PARALLEL_H__ 2 | #define PARALLEL_H__ 3 | 4 | #include 5 | #include 6 | #include 7 | 8 | #ifdef __cplusplus 9 | extern "C" { 10 | #endif 11 | 12 | bool parallel_init(const struct retro_hw_render_interface_vulkan *vulkan); 13 | void parallel_deinit(void); 14 | bool parallel_frame_is_valid(void); 15 | unsigned parallel_frame_width(void); 16 | unsigned parallel_frame_height(void); 17 | void parallel_begin_frame(void); 18 | void parallel_set_synchronous_rdp(bool enable); 19 | 20 | const VkApplicationInfo *parallel_get_application_info(void); 21 | bool parallel_create_device(struct retro_vulkan_context *context, 22 | VkInstance instance, 23 | VkPhysicalDevice gpu, 24 | VkSurfaceKHR surface, 25 | PFN_vkGetInstanceProcAddr get_instance_proc_addr, 26 | const char **required_device_extensions, 27 | unsigned num_required_device_extensions, 28 | const char **required_device_layers, 29 | unsigned num_required_device_layers, 30 | const VkPhysicalDeviceFeatures *required_features); 31 | 32 | #ifdef __cplusplus 33 | } 34 | #endif 35 | 36 | #endif 37 | -------------------------------------------------------------------------------- /mupen64plus-video-paraLLEl/rdp.hpp: -------------------------------------------------------------------------------- 1 | #ifndef PARALLEL_RDP_HPP 2 | #define PARALLEL_RDP_HPP 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | 9 | #include "rdp/frontend.hpp" 10 | #include "rdp/rdp.hpp" 11 | #include "rdp/vulkan.hpp" 12 | #include "rdp/vulkan_util.hpp" 13 | 14 | namespace RDP 15 | { 16 | bool init(); 17 | void deinit(); 18 | void begin_frame(); 19 | void set_dithering(unsigned type); 20 | 21 | void process_commands(); 22 | void set_scissor_variables(const char *name); 23 | extern const struct retro_hw_render_interface_vulkan *vulkan; 24 | 25 | extern std::unique_ptr frontend; 26 | extern std::unique_ptr renderer; 27 | extern std::unique_ptr device; 28 | extern std::unique_ptr context; 29 | extern unsigned parallel_dithering; 30 | } 31 | 32 | namespace VI 33 | { 34 | extern unsigned width; 35 | extern unsigned height; 36 | extern bool valid; 37 | 38 | void complete_frame(); 39 | void set_num_frames(unsigned count); 40 | void deinit(); 41 | } 42 | 43 | #endif 44 | -------------------------------------------------------------------------------- /mupen64plus-video-paraLLEl/rdp/format_all.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | for file in *.{cpp,hpp} 4 | do 5 | echo "Formatting file: $file ..." 6 | clang-format -style=file -i $file 7 | done 8 | -------------------------------------------------------------------------------- /mupen64plus-video-paraLLEl/rdp/glsl/clip.h: -------------------------------------------------------------------------------- 1 | #ifndef CLIP_H_ 2 | #define CLIP_H_ 3 | 4 | void clip_x(ivec2 clip, ivec4 xs, out ivec4 xsc, out bool curunder, out bool curover) 5 | { 6 | // Quantize X bounds down to 1/8th pixel resolution. 7 | // Apply scissor and clipping in X. 8 | // Very finicky math follows, see Angrylion. 9 | ivec4 stickybit = ivec4(bvec4(xs & 0x3fff)); 10 | xsc = ((xs >> 13) & ~1) | stickybit; 11 | 12 | // Clip against left side. 13 | bvec4 under = lessThan(xsc, clip.xxxx); 14 | xsc = mix(((xs >> 13) & 0x3ffe) | stickybit, clip.xxxx, under); 15 | 16 | // Clip against right side. 17 | xsc = xsc & 0x3fff; 18 | bvec4 over = greaterThanEqual(xsc, clip.yyyy); 19 | xsc = mix(xsc, clip.yyyy, over); 20 | 21 | curunder = all(under); 22 | curover = all(over); 23 | } 24 | 25 | ivec2 unpack_scissor(uint word) 26 | { 27 | return ivec2((uvec2(word) >> uvec2(0u, 16u)) & uvec2(0xffff)); 28 | } 29 | 30 | #endif 31 | -------------------------------------------------------------------------------- /mupen64plus-video-paraLLEl/rdp/glsl/noise.h: -------------------------------------------------------------------------------- 1 | #ifndef NOISE_H_ 2 | #define NOISE_H_ 3 | 4 | #include "buffers.h" 5 | 6 | // Just some random crap. Not really important for now. 7 | int noise8(int cookie) 8 | { 9 | vec2 uv = vec2(gl_GlobalInvocationID.xy) + vec2(float(constants.seed) * 1.135415, float(cookie) * 0.2378927); 10 | float i = dot(vec2(1.2379, 1.98295), uv); 11 | float c = fract(43758.5453123 * sin(i)); 12 | return int(255.0 * c); 13 | } 14 | 15 | #endif 16 | -------------------------------------------------------------------------------- /mupen64plus-video-paraLLEl/rdp/rdp_dump.hpp: -------------------------------------------------------------------------------- 1 | #ifndef RDP_DUMP_HPP 2 | #define RDP_DUMP_HPP 3 | 4 | #include 5 | #include 6 | 7 | namespace RDP 8 | { 9 | enum DumpCommand 10 | { 11 | RDP_DUMP_CMD_INVALID = 0, 12 | RDP_DUMP_CMD_UPDATE_DRAM = 1, 13 | RDP_DUMP_CMD_BEGIN_COMMAND_LIST = 2, 14 | RDP_DUMP_CMD_END_COMMAND_LIST = 3, 15 | RDP_DUMP_CMD_RDP_COMMAND = 4, 16 | RDP_DUMP_CMD_EOF = 5, 17 | }; 18 | 19 | struct DRAMUpdate 20 | { 21 | uint32_t offset; 22 | std::vector payload; 23 | }; 24 | 25 | struct Command 26 | { 27 | uint32_t command; 28 | std::vector arguments; 29 | }; 30 | 31 | struct CommandList 32 | { 33 | std::vector dram_updates; 34 | std::vector commands; 35 | }; 36 | 37 | struct Dump 38 | { 39 | std::vector lists; 40 | uint32_t dram_size; 41 | }; 42 | 43 | bool load_dump(const char *path, Dump *dump); 44 | } 45 | 46 | #endif 47 | -------------------------------------------------------------------------------- /mupen64plus-video-paraLLEl/rdp/tests/cycle1_triangle/dump.rdp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/paraLLeXT/41567a669252e7af3dcaf75616dc83ec0a11847f/mupen64plus-video-paraLLEl/rdp/tests/cycle1_triangle/dump.rdp -------------------------------------------------------------------------------- /mupen64plus-video-paraLLEl/rdp/tests/fill_triangle/dump.rdp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/paraLLeXT/41567a669252e7af3dcaf75616dc83ec0a11847f/mupen64plus-video-paraLLEl/rdp/tests/fill_triangle/dump.rdp -------------------------------------------------------------------------------- /mupen64plus-video-paraLLEl/rdp/tests/fill_triangle/reference.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/paraLLeXT/41567a669252e7af3dcaf75616dc83ec0a11847f/mupen64plus-video-paraLLEl/rdp/tests/fill_triangle/reference.png -------------------------------------------------------------------------------- /mupen64plus-video-paraLLEl/rdp/tests/texture_triangle_32bpp/dump.rdp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/paraLLeXT/41567a669252e7af3dcaf75616dc83ec0a11847f/mupen64plus-video-paraLLEl/rdp/tests/texture_triangle_32bpp/dump.rdp -------------------------------------------------------------------------------- /mupen64plus-video-paraLLEl/rdp/tests/texture_triangle_32bpp/reference.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/paraLLeXT/41567a669252e7af3dcaf75616dc83ec0a11847f/mupen64plus-video-paraLLEl/rdp/tests/texture_triangle_32bpp/reference.png -------------------------------------------------------------------------------- /mupen64plus-video-paraLLEl/rdp_dump.h: -------------------------------------------------------------------------------- 1 | #ifndef RDP_DUMP_H 2 | #define RDP_DUMP_H 3 | 4 | #include 5 | #include 6 | 7 | bool rdp_dump_init(const char *path, uint32_t dram_size); 8 | void rdp_dump_end(void); 9 | void rdp_dump_flush_dram(const void *dram, uint32_t size); 10 | 11 | void rdp_dump_begin_command_list(void); 12 | void rdp_dump_end_command_list(void); 13 | void rdp_dump_emit_command(uint32_t command, const uint32_t *cmd_data, uint32_t cmd_words); 14 | 15 | #endif 16 | --------------------------------------------------------------------------------