├── .assets ├── bahamut-lagoon.png ├── tengai-makyou-zero.png └── user-interface.png ├── .cirrus.yml ├── .gitattributes ├── .github └── workflows │ └── build.yml ├── .gitignore ├── CREDITS.md ├── GPLv3.txt ├── LICENSE.txt ├── README.md ├── bsnes ├── Database │ ├── BS Memory.bml │ ├── Cheat Codes.bml │ ├── Sufami Turbo.bml │ └── Super Famicom.bml ├── GNUmakefile ├── Locale │ └── Japanese.bml ├── README.md ├── emulator │ ├── audio │ │ ├── audio.cpp │ │ ├── audio.hpp │ │ └── stream.cpp │ ├── cheat.hpp │ ├── emulator.cpp │ ├── emulator.hpp │ ├── game.hpp │ ├── interface.hpp │ ├── memory │ │ ├── memory.hpp │ │ ├── readable.hpp │ │ └── writable.hpp │ ├── platform.hpp │ ├── random.hpp │ └── types.hpp ├── filter │ ├── 2xsai.cpp │ ├── filter.cpp │ ├── filter.hpp │ ├── hq2x.cpp │ ├── lq2x.cpp │ ├── none.cpp │ ├── ntsc-composite.cpp │ ├── ntsc-rf.cpp │ ├── ntsc-rgb.cpp │ ├── ntsc-svideo.cpp │ ├── pixellate2x.cpp │ ├── sai │ │ └── sai.cpp │ ├── scale2x.cpp │ ├── scanlines-black.cpp │ ├── scanlines-dark.cpp │ ├── scanlines-light.cpp │ ├── snes_ntsc │ │ ├── snes_ntsc.c │ │ ├── snes_ntsc.h │ │ ├── snes_ntsc_config.h │ │ └── snes_ntsc_impl.h │ ├── super-2xsai.cpp │ └── super-eagle.cpp ├── gb │ ├── .gitattributes │ ├── .github │ │ ├── actions │ │ │ ├── LICENSE │ │ │ ├── cgb-acid2.gbc │ │ │ ├── cgb_sound.gb │ │ │ ├── dmg-acid2.gb │ │ │ ├── dmg_sound-2.gb │ │ │ ├── install_deps.sh │ │ │ ├── oam_bug-2.gb │ │ │ └── sanity_tests.sh │ │ └── workflows │ │ │ └── sanity.yml │ ├── .gitignore │ ├── BESS.md │ ├── BootROMs │ │ ├── SameBoyLogo.png │ │ ├── agb_boot.asm │ │ ├── cgb_boot.asm │ │ ├── cgb_boot_fast.asm │ │ ├── dmg_boot.asm │ │ ├── pb12.c │ │ ├── sgb2_boot.asm │ │ └── sgb_boot.asm │ ├── CHANGES.md │ ├── CONTRIBUTING.md │ ├── Cocoa │ │ ├── AppDelegate.h │ │ ├── AppDelegate.m │ │ ├── AppIcon.icns │ │ ├── BigSurToolbar.h │ │ ├── CPU.png │ │ ├── CPU@2x.png │ │ ├── Cartridge.icns │ │ ├── ColorCartridge.icns │ │ ├── Display.png │ │ ├── Display@2x.png │ │ ├── Document.h │ │ ├── Document.m │ │ ├── Document.xib │ │ ├── GBAudioClient.h │ │ ├── GBAudioClient.m │ │ ├── GBBorderView.h │ │ ├── GBBorderView.m │ │ ├── GBButtons.h │ │ ├── GBButtons.m │ │ ├── GBCheatTextFieldCell.h │ │ ├── GBCheatTextFieldCell.m │ │ ├── GBCheatWindowController.h │ │ ├── GBCheatWindowController.m │ │ ├── GBColorCell.h │ │ ├── GBColorCell.m │ │ ├── GBCompleteByteSlice.h │ │ ├── GBCompleteByteSlice.m │ │ ├── GBGLShader.h │ │ ├── GBGLShader.m │ │ ├── GBImageCell.h │ │ ├── GBImageCell.m │ │ ├── GBImageView.h │ │ ├── GBImageView.m │ │ ├── GBMemoryByteArray.h │ │ ├── GBMemoryByteArray.m │ │ ├── GBOSDView.h │ │ ├── GBOSDView.m │ │ ├── GBOpenGLView.h │ │ ├── GBOpenGLView.m │ │ ├── GBOptionalVisualEffectView.h │ │ ├── GBOptionalVisualEffectView.m │ │ ├── GBPreferencesWindow.h │ │ ├── GBPreferencesWindow.m │ │ ├── GBS.xib │ │ ├── GBSplitView.h │ │ ├── GBSplitView.m │ │ ├── GBTerminalTextFieldCell.h │ │ ├── GBTerminalTextFieldCell.m │ │ ├── GBView.h │ │ ├── GBView.m │ │ ├── GBViewGL.h │ │ ├── GBViewGL.m │ │ ├── GBViewMetal.h │ │ ├── GBViewMetal.m │ │ ├── GBVisualizerView.h │ │ ├── GBVisualizerView.m │ │ ├── GBWarningPopover.h │ │ ├── GBWarningPopover.m │ │ ├── Info.plist │ │ ├── Joypad.png │ │ ├── Joypad@2x.png │ │ ├── Joypad~dark.png │ │ ├── Joypad~dark@2x.png │ │ ├── KeyboardShortcutPrivateAPIs.h │ │ ├── License.html │ │ ├── MainMenu.xib │ │ ├── NSImageNamedDarkSupport.m │ │ ├── NSObject+MavericksCompat.m │ │ ├── NSString+StringForKey.h │ │ ├── NSString+StringForKey.m │ │ ├── Next.png │ │ ├── Next@2x.png │ │ ├── Pause.png │ │ ├── Pause@2x.png │ │ ├── PkgInfo │ │ ├── Play.png │ │ ├── Play@2x.png │ │ ├── PopoverView.xib │ │ ├── Preferences.xib │ │ ├── Previous.png │ │ ├── Previous@2x.png │ │ ├── Rewind.png │ │ ├── Rewind@2x.png │ │ ├── Speaker.png │ │ ├── Speaker@2x.png │ │ ├── Speaker~dark.png │ │ ├── Speaker~dark@2x.png │ │ ├── UpdateWindow.xib │ │ └── main.m │ ├── Core │ │ ├── apu.c │ │ ├── apu.h │ │ ├── camera.c │ │ ├── camera.h │ │ ├── cheats.c │ │ ├── cheats.h │ │ ├── debugger.c │ │ ├── debugger.h │ │ ├── display.c │ │ ├── display.h │ │ ├── gb.c │ │ ├── gb.h │ │ ├── gb_struct_def.h │ │ ├── graphics │ │ │ ├── agb_border.inc │ │ │ ├── cgb_border.inc │ │ │ ├── dmg_border.inc │ │ │ ├── sgb_animation_logo.inc │ │ │ └── sgb_border.inc │ │ ├── joypad.c │ │ ├── joypad.h │ │ ├── mbc.c │ │ ├── mbc.h │ │ ├── memory.c │ │ ├── memory.h │ │ ├── printer.c │ │ ├── printer.h │ │ ├── random.c │ │ ├── random.h │ │ ├── rewind.c │ │ ├── rewind.h │ │ ├── rumble.c │ │ ├── rumble.h │ │ ├── save_state.c │ │ ├── save_state.h │ │ ├── sgb.c │ │ ├── sgb.h │ │ ├── sm83_cpu.c │ │ ├── sm83_cpu.h │ │ ├── sm83_disassembler.c │ │ ├── symbol_hash.c │ │ ├── symbol_hash.h │ │ ├── timing.c │ │ ├── timing.h │ │ ├── workboy.c │ │ └── workboy.h │ ├── FreeDesktop │ │ ├── AppIcon │ │ │ ├── 128x128.png │ │ │ ├── 16x16.png │ │ │ ├── 256x256.png │ │ │ ├── 32x32.png │ │ │ ├── 512x512.png │ │ │ └── 64x64.png │ │ ├── Cartridge │ │ │ ├── 128x128.png │ │ │ ├── 16x16.png │ │ │ ├── 256x256.png │ │ │ ├── 32x32.png │ │ │ ├── 512x512.png │ │ │ └── 64x64.png │ │ ├── ColorCartridge │ │ │ ├── 128x128.png │ │ │ ├── 16x16.png │ │ │ ├── 256x256.png │ │ │ ├── 32x32.png │ │ │ ├── 512x512.png │ │ │ └── 64x64.png │ │ ├── sameboy.desktop │ │ └── sameboy.xml │ ├── GNUmakefile │ ├── HexFiend │ │ ├── HFAnnotatedTree.h │ │ ├── HFAnnotatedTree.m │ │ ├── HFBTree.h │ │ ├── HFBTree.m │ │ ├── HFBTreeByteArray.h │ │ ├── HFBTreeByteArray.m │ │ ├── HFByteArray.h │ │ ├── HFByteArray.m │ │ ├── HFByteArray_Internal.h │ │ ├── HFByteSlice.h │ │ ├── HFByteSlice.m │ │ ├── HFByteSlice_Private.h │ │ ├── HFController.h │ │ ├── HFController.m │ │ ├── HFFullMemoryByteArray.h │ │ ├── HFFullMemoryByteArray.m │ │ ├── HFFullMemoryByteSlice.h │ │ ├── HFFullMemoryByteSlice.m │ │ ├── HFFunctions.h │ │ ├── HFFunctions.m │ │ ├── HFFunctions_Private.h │ │ ├── HFGlyphTrie.h │ │ ├── HFGlyphTrie.m │ │ ├── HFHexTextRepresenter.h │ │ ├── HFHexTextRepresenter.m │ │ ├── HFHexTextView.h │ │ ├── HFHexTextView.m │ │ ├── HFLayoutRepresenter.h │ │ ├── HFLayoutRepresenter.m │ │ ├── HFLineCountingRepresenter.h │ │ ├── HFLineCountingRepresenter.m │ │ ├── HFLineCountingView.h │ │ ├── HFLineCountingView.m │ │ ├── HFPasteboardOwner.h │ │ ├── HFPasteboardOwner.m │ │ ├── HFPrivilegedHelperConnection.h │ │ ├── HFRepresenter.h │ │ ├── HFRepresenter.m │ │ ├── HFRepresenterHexTextView.h │ │ ├── HFRepresenterHexTextView.m │ │ ├── HFRepresenterStringEncodingTextView.h │ │ ├── HFRepresenterStringEncodingTextView.m │ │ ├── HFRepresenterTextView.h │ │ ├── HFRepresenterTextView.m │ │ ├── HFRepresenterTextViewCallout.h │ │ ├── HFRepresenterTextViewCallout.m │ │ ├── HFRepresenterTextView_Internal.h │ │ ├── HFRepresenter_Internal.h │ │ ├── HFSharedMemoryByteSlice.h │ │ ├── HFSharedMemoryByteSlice.m │ │ ├── HFStatusBarRepresenter.h │ │ ├── HFStatusBarRepresenter.m │ │ ├── HFStringEncodingTextRepresenter.h │ │ ├── HFStringEncodingTextRepresenter.m │ │ ├── HFTextRepresenter.h │ │ ├── HFTextRepresenter.m │ │ ├── HFTextRepresenter_Internal.h │ │ ├── HFTextRepresenter_KeyBinding.m │ │ ├── HFTextVisualStyleRun.h │ │ ├── HFTextVisualStyleRun.m │ │ ├── HFTypes.h │ │ ├── HFVerticalScrollerRepresenter.h │ │ ├── HFVerticalScrollerRepresenter.m │ │ ├── HexFiend.h │ │ ├── HexFiend_2_Framework_Prefix.pch │ │ └── License.txt │ ├── JoyKit │ │ ├── ControllerConfiguration.inc │ │ ├── JOYAxes2D.h │ │ ├── JOYAxes2D.m │ │ ├── JOYAxis.h │ │ ├── JOYAxis.m │ │ ├── JOYButton.h │ │ ├── JOYButton.m │ │ ├── JOYController.h │ │ ├── JOYController.m │ │ ├── JOYElement.h │ │ ├── JOYElement.m │ │ ├── JOYEmulatedButton.h │ │ ├── JOYEmulatedButton.m │ │ ├── JOYFullReportElement.h │ │ ├── JOYFullReportElement.m │ │ ├── JOYHat.h │ │ ├── JOYHat.m │ │ ├── JOYMultiplayerController.h │ │ ├── JOYMultiplayerController.m │ │ ├── JOYSubElement.h │ │ ├── JOYSubElement.m │ │ └── JoyKit.h │ ├── LICENSE │ ├── Makefile │ ├── Misc │ │ └── registers.sym │ ├── OpenDialog │ │ ├── cocoa.m │ │ ├── gtk.c │ │ ├── open_dialog.h │ │ └── windows.c │ ├── QuickLook │ │ ├── CartridgeTemplate.png │ │ ├── ColorCartridgeTemplate.png │ │ ├── Info.plist │ │ ├── UniversalCartridgeTemplate.png │ │ ├── exports.sym │ │ ├── generator.m │ │ ├── get_image_for_rom.c │ │ ├── get_image_for_rom.h │ │ └── main.c │ ├── README.md │ ├── SDL │ │ ├── audio │ │ │ ├── audio.h │ │ │ └── sdl.c │ │ ├── background.bmp │ │ ├── console.c │ │ ├── console.h │ │ ├── font.c │ │ ├── font.h │ │ ├── gui.c │ │ ├── gui.h │ │ ├── main.c │ │ ├── opengl_compat.c │ │ ├── opengl_compat.h │ │ ├── shader.c │ │ ├── shader.h │ │ ├── utils.c │ │ └── utils.h │ ├── Shaders │ │ ├── AAOmniScaleLegacy.fsh │ │ ├── AAScale2x.fsh │ │ ├── AAScale4x.fsh │ │ ├── Bilinear.fsh │ │ ├── CRT.fsh │ │ ├── HQ2x.fsh │ │ ├── LCD.fsh │ │ ├── MasterShader.fsh │ │ ├── MasterShader.metal │ │ ├── MonoLCD.fsh │ │ ├── NearestNeighbor.fsh │ │ ├── OmniScale.fsh │ │ ├── OmniScaleLegacy.fsh │ │ ├── Scale2x.fsh │ │ ├── Scale4x.fsh │ │ └── SmoothBilinear.fsh │ ├── Tester │ │ └── main.c │ ├── Windows │ │ ├── inttypes.h │ │ ├── math.h │ │ ├── pthread.h │ │ ├── resources.rc │ │ ├── sameboy.ico │ │ ├── stdint.h │ │ ├── stdio.h │ │ ├── string.h │ │ ├── unistd.h │ │ └── utf8_compat.c │ ├── build-faq.md │ ├── libretro │ │ ├── Makefile │ │ ├── Makefile.common │ │ ├── jni │ │ │ ├── Android.mk │ │ │ └── Application.mk │ │ ├── libretro.c │ │ ├── libretro.h │ │ ├── libretro_core_options.inc │ │ ├── link.T │ │ └── retro_inline.h │ └── version.mk ├── heuristics │ ├── bs-memory.cpp │ ├── game-boy.cpp │ ├── heuristics.cpp │ ├── heuristics.hpp │ ├── sufami-turbo.cpp │ └── super-famicom.cpp ├── lzma │ ├── 7z.h │ ├── 7zAlloc.c │ ├── 7zAlloc.h │ ├── 7zArcIn.c │ ├── 7zBuf.c │ ├── 7zBuf.h │ ├── 7zBuf2.c │ ├── 7zCrc.c │ ├── 7zCrc.h │ ├── 7zCrcOpt.c │ ├── 7zDec.c │ ├── 7zFile.c │ ├── 7zFile.h │ ├── 7zStream.c │ ├── 7zTypes.h │ ├── 7zVersion.h │ ├── 7zVersion.rc │ ├── Aes.c │ ├── Aes.h │ ├── AesOpt.c │ ├── Alloc.c │ ├── Alloc.h │ ├── Bcj2.c │ ├── Bcj2.h │ ├── Bcj2Enc.c │ ├── Bra.c │ ├── Bra.h │ ├── Bra86.c │ ├── BraIA64.c │ ├── Compiler.h │ ├── CpuArch.c │ ├── CpuArch.h │ ├── Delta.c │ ├── Delta.h │ ├── DllSecur.c │ ├── DllSecur.h │ ├── LzFind.c │ ├── LzFind.h │ ├── LzFindMt.c │ ├── LzFindMt.h │ ├── LzHash.h │ ├── Lzma2Dec.c │ ├── Lzma2Dec.h │ ├── Lzma2DecMt.c │ ├── Lzma2DecMt.h │ ├── Lzma2Enc.c │ ├── Lzma2Enc.h │ ├── Lzma86.h │ ├── Lzma86Dec.c │ ├── Lzma86Enc.c │ ├── LzmaDec.c │ ├── LzmaDec.h │ ├── LzmaEnc.c │ ├── LzmaEnc.h │ ├── LzmaLib.c │ ├── LzmaLib.h │ ├── MtCoder.c │ ├── MtCoder.h │ ├── MtDec.c │ ├── MtDec.h │ ├── Ppmd.h │ ├── Ppmd7.c │ ├── Ppmd7.h │ ├── Ppmd7Dec.c │ ├── Ppmd7Enc.c │ ├── Precomp.h │ ├── RotateDefs.h │ ├── Sha256.c │ ├── Sha256.h │ ├── Sort.c │ ├── Sort.h │ ├── Threads.c │ ├── Threads.h │ ├── Xz.c │ ├── Xz.h │ ├── XzCrc64.c │ ├── XzCrc64.h │ ├── XzCrc64Opt.c │ ├── XzDec.c │ ├── XzEnc.c │ ├── XzEnc.h │ ├── XzIn.c │ ├── lzma.cpp │ └── lzma.hpp ├── obj │ └── .gitignore ├── out │ └── .gitignore ├── processor │ ├── GNUmakefile │ ├── arm7tdmi │ │ ├── algorithms.cpp │ │ ├── arm7tdmi.cpp │ │ ├── arm7tdmi.hpp │ │ ├── disassembler.cpp │ │ ├── instruction.cpp │ │ ├── instructions-arm.cpp │ │ ├── instructions-thumb.cpp │ │ ├── memory.cpp │ │ ├── registers.cpp │ │ └── serialization.cpp │ ├── gsu │ │ ├── disassembler.cpp │ │ ├── gsu.cpp │ │ ├── gsu.hpp │ │ ├── instruction.cpp │ │ ├── instructions.cpp │ │ ├── registers.hpp │ │ └── serialization.cpp │ ├── hg51b │ │ ├── hg51b.cpp │ │ ├── hg51b.hpp │ │ ├── instruction.cpp │ │ ├── instructions.cpp │ │ ├── registers.cpp │ │ └── serialization.cpp │ ├── processor.hpp │ ├── sm83 │ │ ├── algorithms.cpp │ │ ├── disassembler.cpp │ │ ├── instruction.cpp │ │ ├── instructions.cpp │ │ ├── memory.cpp │ │ ├── registers.cpp │ │ ├── serialization.cpp │ │ ├── sm83.cpp │ │ └── sm83.hpp │ ├── spc700 │ │ ├── algorithms.cpp │ │ ├── disassembler.cpp │ │ ├── instruction.cpp │ │ ├── instructions.cpp │ │ ├── memory.cpp │ │ ├── serialization.cpp │ │ ├── spc700.cpp │ │ └── spc700.hpp │ ├── upd96050 │ │ ├── disassembler.cpp │ │ ├── instructions.cpp │ │ ├── memory.cpp │ │ ├── serialization.cpp │ │ ├── upd96050.cpp │ │ └── upd96050.hpp │ └── wdc65816 │ │ ├── algorithms.cpp │ │ ├── disassembler.cpp │ │ ├── instruction.cpp │ │ ├── instruction.hpp │ │ ├── instructions-modify.cpp │ │ ├── instructions-other.cpp │ │ ├── instructions-pc.cpp │ │ ├── instructions-read.cpp │ │ ├── instructions-write.cpp │ │ ├── memory.cpp │ │ ├── registers.hpp │ │ ├── serialization.cpp │ │ ├── wdc65816.cpp │ │ └── wdc65816.hpp ├── sfc │ ├── GNUmakefile │ ├── cartridge │ │ ├── cartridge.cpp │ │ ├── cartridge.hpp │ │ ├── load.cpp │ │ ├── save.cpp │ │ └── serialization.cpp │ ├── controller │ │ ├── controller.cpp │ │ ├── controller.hpp │ │ ├── gamepad │ │ │ ├── gamepad.cpp │ │ │ └── gamepad.hpp │ │ ├── justifier │ │ │ ├── justifier.cpp │ │ │ └── justifier.hpp │ │ ├── mouse │ │ │ ├── mouse.cpp │ │ │ └── mouse.hpp │ │ ├── super-multitap │ │ │ ├── super-multitap.cpp │ │ │ └── super-multitap.hpp │ │ └── super-scope │ │ │ ├── super-scope.cpp │ │ │ └── super-scope.hpp │ ├── coprocessor │ │ ├── armdsp │ │ │ ├── armdsp.cpp │ │ │ ├── armdsp.hpp │ │ │ ├── memory.cpp │ │ │ ├── registers.hpp │ │ │ └── serialization.cpp │ │ ├── coprocessor.cpp │ │ ├── coprocessor.hpp │ │ ├── cx4 │ │ │ ├── cx4.cpp │ │ │ ├── cx4.hpp │ │ │ ├── data.cpp │ │ │ ├── functions.cpp │ │ │ ├── oam.cpp │ │ │ ├── opcodes.cpp │ │ │ └── serialization.cpp │ │ ├── dip │ │ │ ├── dip.cpp │ │ │ ├── dip.hpp │ │ │ └── serialization.cpp │ │ ├── dsp1 │ │ │ ├── dsp1.cpp │ │ │ ├── dsp1.hpp │ │ │ ├── dsp1emu.cpp │ │ │ ├── dsp1emu.hpp │ │ │ └── serialization.cpp │ │ ├── dsp2 │ │ │ ├── dsp2.cpp │ │ │ ├── dsp2.hpp │ │ │ ├── opcodes.cpp │ │ │ └── serialization.cpp │ │ ├── dsp4 │ │ │ ├── dsp4.cpp │ │ │ ├── dsp4.hpp │ │ │ ├── dsp4emu.c │ │ │ ├── dsp4emu.h │ │ │ └── serialization.cpp │ │ ├── epsonrtc │ │ │ ├── epsonrtc.cpp │ │ │ ├── epsonrtc.hpp │ │ │ ├── memory.cpp │ │ │ ├── serialization.cpp │ │ │ └── time.cpp │ │ ├── event │ │ │ ├── event.cpp │ │ │ ├── event.hpp │ │ │ └── serialization.cpp │ │ ├── hitachidsp │ │ │ ├── data-rom.cpp │ │ │ ├── hitachidsp.cpp │ │ │ ├── hitachidsp.hpp │ │ │ ├── memory.cpp │ │ │ └── serialization.cpp │ │ ├── icd │ │ │ ├── boot-roms.cpp │ │ │ ├── icd.cpp │ │ │ ├── icd.hpp │ │ │ ├── interface.cpp │ │ │ ├── io.cpp │ │ │ └── serialization.cpp │ │ ├── mcc │ │ │ ├── mcc.cpp │ │ │ ├── mcc.hpp │ │ │ └── serialization.cpp │ │ ├── msu1 │ │ │ ├── msu1.cpp │ │ │ ├── msu1.hpp │ │ │ └── serialization.cpp │ │ ├── necdsp │ │ │ ├── necdsp.cpp │ │ │ ├── necdsp.hpp │ │ │ └── serialization.cpp │ │ ├── obc1 │ │ │ ├── obc1.cpp │ │ │ ├── obc1.hpp │ │ │ └── serialization.cpp │ │ ├── sa1 │ │ │ ├── bwram.cpp │ │ │ ├── dma.cpp │ │ │ ├── io.cpp │ │ │ ├── iram.cpp │ │ │ ├── memory.cpp │ │ │ ├── rom.cpp │ │ │ ├── sa1.cpp │ │ │ ├── sa1.hpp │ │ │ └── serialization.cpp │ │ ├── sdd1 │ │ │ ├── decompressor.cpp │ │ │ ├── decompressor.hpp │ │ │ ├── sdd1.cpp │ │ │ ├── sdd1.hpp │ │ │ └── serialization.cpp │ │ ├── sharprtc │ │ │ ├── memory.cpp │ │ │ ├── serialization.cpp │ │ │ ├── sharprtc.cpp │ │ │ ├── sharprtc.hpp │ │ │ └── time.cpp │ │ ├── spc7110 │ │ │ ├── alu.cpp │ │ │ ├── data.cpp │ │ │ ├── dcu.cpp │ │ │ ├── decompressor.cpp │ │ │ ├── serialization.cpp │ │ │ ├── spc7110.cpp │ │ │ └── spc7110.hpp │ │ ├── st0010 │ │ │ ├── data.hpp │ │ │ ├── opcodes.cpp │ │ │ ├── serialization.cpp │ │ │ ├── st0010.cpp │ │ │ └── st0010.hpp │ │ └── superfx │ │ │ ├── bus.cpp │ │ │ ├── core.cpp │ │ │ ├── io.cpp │ │ │ ├── memory.cpp │ │ │ ├── serialization.cpp │ │ │ ├── superfx.cpp │ │ │ ├── superfx.hpp │ │ │ └── timing.cpp │ ├── cpu │ │ ├── cpu.cpp │ │ ├── cpu.hpp │ │ ├── dma.cpp │ │ ├── io.cpp │ │ ├── irq.cpp │ │ ├── memory.cpp │ │ ├── serialization.cpp │ │ └── timing.cpp │ ├── dsp │ │ ├── SPC_DSP.cpp │ │ ├── SPC_DSP.h │ │ ├── blargg_common.h │ │ ├── blargg_config.h │ │ ├── blargg_endian.h │ │ ├── blargg_source.h │ │ ├── dsp.cpp │ │ ├── dsp.hpp │ │ └── serialization.cpp │ ├── expansion │ │ ├── 21fx │ │ │ ├── 21fx.cpp │ │ │ └── 21fx.hpp │ │ ├── expansion.cpp │ │ ├── expansion.hpp │ │ └── satellaview │ │ │ ├── satellaview.cpp │ │ │ └── satellaview.hpp │ ├── interface │ │ ├── configuration.cpp │ │ ├── configuration.hpp │ │ ├── interface.cpp │ │ └── interface.hpp │ ├── memory │ │ ├── memory-inline.hpp │ │ ├── memory.cpp │ │ ├── memory.hpp │ │ ├── protectable.hpp │ │ ├── readable.hpp │ │ └── writable.hpp │ ├── ppu-fast │ │ ├── background.cpp │ │ ├── io.cpp │ │ ├── line.cpp │ │ ├── mode7.cpp │ │ ├── mode7hd.cpp │ │ ├── object.cpp │ │ ├── ppu.cpp │ │ ├── ppu.hpp │ │ ├── serialization.cpp │ │ └── window.cpp │ ├── ppu │ │ ├── background.cpp │ │ ├── background.hpp │ │ ├── counter │ │ │ ├── counter-inline.hpp │ │ │ ├── counter.hpp │ │ │ └── serialization.cpp │ │ ├── io.cpp │ │ ├── main.cpp │ │ ├── mode7.cpp │ │ ├── mosaic.cpp │ │ ├── mosaic.hpp │ │ ├── oam.cpp │ │ ├── object.cpp │ │ ├── object.hpp │ │ ├── ppu.cpp │ │ ├── ppu.hpp │ │ ├── screen.cpp │ │ ├── screen.hpp │ │ ├── serialization.cpp │ │ ├── window.cpp │ │ └── window.hpp │ ├── sfc.hpp │ ├── slot │ │ ├── bsmemory │ │ │ ├── bsmemory.cpp │ │ │ ├── bsmemory.hpp │ │ │ └── serialization.cpp │ │ ├── slot.cpp │ │ ├── slot.hpp │ │ └── sufamiturbo │ │ │ ├── serialization.cpp │ │ │ ├── sufamiturbo.cpp │ │ │ └── sufamiturbo.hpp │ ├── smp │ │ ├── io.cpp │ │ ├── memory.cpp │ │ ├── serialization.cpp │ │ ├── smp.cpp │ │ ├── smp.hpp │ │ └── timing.cpp │ └── system │ │ ├── serialization.cpp │ │ ├── system.cpp │ │ └── system.hpp ├── target-bsnes │ ├── GNUmakefile │ ├── README.md │ ├── bsnes.cpp │ ├── bsnes.hpp │ ├── input │ │ ├── hotkeys.cpp │ │ ├── input.cpp │ │ └── input.hpp │ ├── presentation │ │ ├── presentation.cpp │ │ └── presentation.hpp │ ├── program │ │ ├── audio.cpp │ │ ├── filter.cpp │ │ ├── game-pak.cpp │ │ ├── game-rom.cpp │ │ ├── game.cpp │ │ ├── hacks.cpp │ │ ├── input.cpp │ │ ├── movies.cpp │ │ ├── patch.cpp │ │ ├── paths.cpp │ │ ├── platform.cpp │ │ ├── program.cpp │ │ ├── program.hpp │ │ ├── rewind.cpp │ │ ├── states.cpp │ │ ├── utility.cpp │ │ ├── video.cpp │ │ └── viewport.cpp │ ├── resource │ │ ├── GNUmakefile │ │ ├── bsnes.Manifest │ │ ├── bsnes.desktop │ │ ├── bsnes.ico │ │ ├── bsnes.plist │ │ ├── bsnes.png │ │ ├── bsnes.rc │ │ ├── bsnes.svg │ │ ├── icon.png │ │ ├── logo.png │ │ ├── resource.bml │ │ ├── resource.cpp │ │ ├── resource.hpp │ │ ├── sameboy.png │ │ └── system │ │ │ ├── boards.bml │ │ │ └── ipl.rom │ ├── settings │ │ ├── audio.cpp │ │ ├── compatibility.cpp │ │ ├── drivers.cpp │ │ ├── emulator.cpp │ │ ├── enhancements.cpp │ │ ├── hotkeys.cpp │ │ ├── input.cpp │ │ ├── paths.cpp │ │ ├── settings.cpp │ │ ├── settings.hpp │ │ └── video.cpp │ └── tools │ │ ├── cheat-editor.cpp │ │ ├── cheat-finder.cpp │ │ ├── manifest-viewer.cpp │ │ ├── state-manager.cpp │ │ ├── tools.cpp │ │ └── tools.hpp └── target-libretro │ ├── GNUmakefile │ ├── jni │ ├── Android.mk │ └── Application.mk │ ├── libretro.cpp │ ├── libretro.h │ ├── link.T │ ├── program.cpp │ └── resources.hpp ├── docs ├── README.md └── how-to │ └── manifest.md ├── extras └── settings.bml ├── hiro ├── GNUmakefile ├── cocoa │ ├── action │ │ ├── action.cpp │ │ ├── action.hpp │ │ ├── menu-check-item.cpp │ │ ├── menu-check-item.hpp │ │ ├── menu-item.cpp │ │ ├── menu-item.hpp │ │ ├── menu-radio-item.cpp │ │ ├── menu-radio-item.hpp │ │ ├── menu-separator.cpp │ │ ├── menu-separator.hpp │ │ ├── menu.cpp │ │ └── menu.hpp │ ├── application.cpp │ ├── application.hpp │ ├── browser-window.cpp │ ├── browser-window.hpp │ ├── desktop.cpp │ ├── desktop.hpp │ ├── font.cpp │ ├── font.hpp │ ├── group.cpp │ ├── group.hpp │ ├── header.hpp │ ├── keyboard.cpp │ ├── keyboard.hpp │ ├── menu-bar.cpp │ ├── menu-bar.hpp │ ├── message-window.cpp │ ├── message-window.hpp │ ├── monitor.cpp │ ├── monitor.hpp │ ├── mouse.cpp │ ├── mouse.hpp │ ├── object.cpp │ ├── object.hpp │ ├── platform.cpp │ ├── platform.hpp │ ├── popup-menu.cpp │ ├── popup-menu.hpp │ ├── sizable.cpp │ ├── sizable.hpp │ ├── status-bar.cpp │ ├── status-bar.hpp │ ├── timer.cpp │ ├── timer.hpp │ ├── utility.cpp │ ├── widget │ │ ├── button.cpp │ │ ├── button.hpp │ │ ├── canvas.cpp │ │ ├── canvas.hpp │ │ ├── check-button.cpp │ │ ├── check-button.hpp │ │ ├── check-label.cpp │ │ ├── check-label.hpp │ │ ├── combo-button-item.cpp │ │ ├── combo-button-item.hpp │ │ ├── combo-button.cpp │ │ ├── combo-button.hpp │ │ ├── console.cpp │ │ ├── console.hpp │ │ ├── frame.cpp │ │ ├── frame.hpp │ │ ├── hex-edit.cpp │ │ ├── hex-edit.hpp │ │ ├── horizontal-scroll-bar.cpp │ │ ├── horizontal-scroll-bar.hpp │ │ ├── horizontal-slider.cpp │ │ ├── horizontal-slider.hpp │ │ ├── label.cpp │ │ ├── label.hpp │ │ ├── line-edit.cpp │ │ ├── line-edit.hpp │ │ ├── progress-bar.cpp │ │ ├── progress-bar.hpp │ │ ├── radio-button.cpp │ │ ├── radio-button.hpp │ │ ├── radio-label.cpp │ │ ├── radio-label.hpp │ │ ├── tab-frame-item.cpp │ │ ├── tab-frame-item.hpp │ │ ├── tab-frame.cpp │ │ ├── tab-frame.hpp │ │ ├── table-view-cell.cpp │ │ ├── table-view-cell.hpp │ │ ├── table-view-column.cpp │ │ ├── table-view-column.hpp │ │ ├── table-view-item.cpp │ │ ├── table-view-item.hpp │ │ ├── table-view.cpp │ │ ├── table-view.hpp │ │ ├── text-edit.cpp │ │ ├── text-edit.hpp │ │ ├── vertical-scroll-bar.cpp │ │ ├── vertical-scroll-bar.hpp │ │ ├── vertical-slider.cpp │ │ ├── vertical-slider.hpp │ │ ├── viewport.cpp │ │ ├── viewport.hpp │ │ ├── widget.cpp │ │ └── widget.hpp │ ├── window.cpp │ └── window.hpp ├── components.hpp ├── core │ ├── action │ │ ├── action.cpp │ │ ├── menu-check-item.cpp │ │ ├── menu-item.cpp │ │ ├── menu-radio-item.cpp │ │ ├── menu-separator.cpp │ │ └── menu.cpp │ ├── alignment.cpp │ ├── application.cpp │ ├── application.hpp │ ├── attribute.cpp │ ├── attribute.hpp │ ├── browser-window.cpp │ ├── color.cpp │ ├── core.cpp │ ├── core.hpp │ ├── desktop.cpp │ ├── desktop.hpp │ ├── font.cpp │ ├── font.hpp │ ├── geometry.cpp │ ├── gradient.cpp │ ├── group.cpp │ ├── group.hpp │ ├── hotkey.cpp │ ├── keyboard.cpp │ ├── lock.hpp │ ├── menu-bar.cpp │ ├── message-window.cpp │ ├── monitor.cpp │ ├── monitor.hpp │ ├── mouse-cursor.cpp │ ├── mouse-cursor.hpp │ ├── mouse.cpp │ ├── object.cpp │ ├── object.hpp │ ├── popup-menu.cpp │ ├── position.cpp │ ├── shared.hpp │ ├── sizable.cpp │ ├── sizable.hpp │ ├── size.cpp │ ├── status-bar.cpp │ ├── text-cursor.cpp │ ├── text-cursor.hpp │ ├── timer.cpp │ ├── timer.hpp │ ├── widget │ │ ├── button.cpp │ │ ├── canvas.cpp │ │ ├── canvas.hpp │ │ ├── check-button.cpp │ │ ├── check-label.cpp │ │ ├── combo-button-item.cpp │ │ ├── combo-button.cpp │ │ ├── combo-edit-item.cpp │ │ ├── combo-edit.cpp │ │ ├── console.cpp │ │ ├── frame.cpp │ │ ├── hex-edit.cpp │ │ ├── horizontal-scroll-bar.cpp │ │ ├── horizontal-slider.cpp │ │ ├── icon-view-item.cpp │ │ ├── icon-view.cpp │ │ ├── label.cpp │ │ ├── label.hpp │ │ ├── line-edit.cpp │ │ ├── progress-bar.cpp │ │ ├── radio-button.cpp │ │ ├── radio-label.cpp │ │ ├── source-edit.cpp │ │ ├── source-edit.hpp │ │ ├── tab-frame-item.cpp │ │ ├── tab-frame-item.hpp │ │ ├── tab-frame.cpp │ │ ├── tab-frame.hpp │ │ ├── table-view-cell.cpp │ │ ├── table-view-cell.hpp │ │ ├── table-view-column.cpp │ │ ├── table-view-column.hpp │ │ ├── table-view-item.cpp │ │ ├── table-view-item.hpp │ │ ├── table-view.cpp │ │ ├── table-view.hpp │ │ ├── text-edit.cpp │ │ ├── text-edit.hpp │ │ ├── tree-view-item.cpp │ │ ├── tree-view-item.hpp │ │ ├── tree-view.cpp │ │ ├── tree-view.hpp │ │ ├── vertical-scroll-bar.cpp │ │ ├── vertical-slider.cpp │ │ ├── viewport.cpp │ │ ├── viewport.hpp │ │ ├── widget.cpp │ │ └── widget.hpp │ ├── window.cpp │ └── window.hpp ├── extension │ ├── about-dialog.cpp │ ├── about-dialog.hpp │ ├── browser-dialog.cpp │ ├── browser-dialog.hpp │ ├── extension.cpp │ ├── extension.hpp │ ├── fixed-layout.cpp │ ├── fixed-layout.hpp │ ├── horizontal-layout.cpp │ ├── horizontal-layout.hpp │ ├── horizontal-resize-grip.cpp │ ├── horizontal-resize-grip.hpp │ ├── list-view.cpp │ ├── list-view.hpp │ ├── message-dialog.cpp │ ├── message-dialog.hpp │ ├── name-dialog.cpp │ ├── name-dialog.hpp │ ├── shared.hpp │ ├── table-layout.cpp │ ├── table-layout.hpp │ ├── vertical-layout.cpp │ ├── vertical-layout.hpp │ ├── vertical-resize-grip.cpp │ └── vertical-resize-grip.hpp ├── gtk │ ├── action │ │ ├── action.cpp │ │ ├── action.hpp │ │ ├── menu-check-item.cpp │ │ ├── menu-check-item.hpp │ │ ├── menu-item.cpp │ │ ├── menu-item.hpp │ │ ├── menu-radio-item.cpp │ │ ├── menu-radio-item.hpp │ │ ├── menu-separator.cpp │ │ ├── menu-separator.hpp │ │ ├── menu.cpp │ │ └── menu.hpp │ ├── application.cpp │ ├── application.hpp │ ├── browser-window.cpp │ ├── browser-window.hpp │ ├── desktop.cpp │ ├── desktop.hpp │ ├── font.cpp │ ├── font.hpp │ ├── group.cpp │ ├── group.hpp │ ├── header.hpp │ ├── keyboard.cpp │ ├── keyboard.hpp │ ├── menu-bar.cpp │ ├── menu-bar.hpp │ ├── message-window.cpp │ ├── message-window.hpp │ ├── monitor.cpp │ ├── monitor.hpp │ ├── mouse.cpp │ ├── mouse.hpp │ ├── object.cpp │ ├── object.hpp │ ├── platform.cpp │ ├── platform.hpp │ ├── popup-menu.cpp │ ├── popup-menu.hpp │ ├── settings.cpp │ ├── settings.hpp │ ├── sizable.cpp │ ├── sizable.hpp │ ├── status-bar.cpp │ ├── status-bar.hpp │ ├── timer.cpp │ ├── timer.hpp │ ├── utility.cpp │ ├── widget │ │ ├── button.cpp │ │ ├── button.hpp │ │ ├── canvas.cpp │ │ ├── canvas.hpp │ │ ├── check-button.cpp │ │ ├── check-button.hpp │ │ ├── check-label.cpp │ │ ├── check-label.hpp │ │ ├── combo-button-item.cpp │ │ ├── combo-button-item.hpp │ │ ├── combo-button.cpp │ │ ├── combo-button.hpp │ │ ├── combo-edit-item.cpp │ │ ├── combo-edit-item.hpp │ │ ├── combo-edit.cpp │ │ ├── combo-edit.hpp │ │ ├── console.cpp │ │ ├── console.hpp │ │ ├── frame.cpp │ │ ├── frame.hpp │ │ ├── hex-edit.cpp │ │ ├── hex-edit.hpp │ │ ├── horizontal-scroll-bar.cpp │ │ ├── horizontal-scroll-bar.hpp │ │ ├── horizontal-slider.cpp │ │ ├── horizontal-slider.hpp │ │ ├── icon-view-item.cpp │ │ ├── icon-view-item.hpp │ │ ├── icon-view.cpp │ │ ├── icon-view.hpp │ │ ├── label.cpp │ │ ├── label.hpp │ │ ├── line-edit.cpp │ │ ├── line-edit.hpp │ │ ├── progress-bar.cpp │ │ ├── progress-bar.hpp │ │ ├── radio-button.cpp │ │ ├── radio-button.hpp │ │ ├── radio-label.cpp │ │ ├── radio-label.hpp │ │ ├── source-edit.cpp │ │ ├── source-edit.hpp │ │ ├── tab-frame-item.cpp │ │ ├── tab-frame-item.hpp │ │ ├── tab-frame.cpp │ │ ├── tab-frame.hpp │ │ ├── table-view-cell.cpp │ │ ├── table-view-cell.hpp │ │ ├── table-view-column.cpp │ │ ├── table-view-column.hpp │ │ ├── table-view-item.cpp │ │ ├── table-view-item.hpp │ │ ├── table-view.cpp │ │ ├── table-view.hpp │ │ ├── text-edit.cpp │ │ ├── text-edit.hpp │ │ ├── tree-view-item.cpp │ │ ├── tree-view-item.hpp │ │ ├── tree-view.cpp │ │ ├── tree-view.hpp │ │ ├── vertical-scroll-bar.cpp │ │ ├── vertical-scroll-bar.hpp │ │ ├── vertical-slider.cpp │ │ ├── vertical-slider.hpp │ │ ├── viewport.cpp │ │ ├── viewport.hpp │ │ ├── widget.cpp │ │ └── widget.hpp │ ├── window.cpp │ └── window.hpp ├── hiro.cpp ├── hiro.hpp ├── platform │ ├── windows │ │ └── keyboard.hpp │ └── xorg │ │ └── keyboard.hpp ├── qt │ ├── action │ │ ├── action.cpp │ │ ├── action.hpp │ │ ├── menu-check-item.cpp │ │ ├── menu-check-item.hpp │ │ ├── menu-item.cpp │ │ ├── menu-item.hpp │ │ ├── menu-radio-item.cpp │ │ ├── menu-radio-item.hpp │ │ ├── menu-separator.cpp │ │ ├── menu-separator.hpp │ │ ├── menu.cpp │ │ └── menu.hpp │ ├── application.cpp │ ├── application.hpp │ ├── browser-window.cpp │ ├── browser-window.hpp │ ├── desktop.cpp │ ├── desktop.hpp │ ├── font.cpp │ ├── font.hpp │ ├── group.cpp │ ├── group.hpp │ ├── header.hpp │ ├── keyboard.cpp │ ├── keyboard.hpp │ ├── menu-bar.cpp │ ├── menu-bar.hpp │ ├── message-window.cpp │ ├── message-window.hpp │ ├── monitor.cpp │ ├── monitor.hpp │ ├── mouse.cpp │ ├── mouse.hpp │ ├── object.cpp │ ├── object.hpp │ ├── platform.cpp │ ├── platform.hpp │ ├── popup-menu.cpp │ ├── popup-menu.hpp │ ├── qt.hpp │ ├── settings.cpp │ ├── settings.hpp │ ├── sizable.cpp │ ├── sizable.hpp │ ├── status-bar.cpp │ ├── status-bar.hpp │ ├── timer.cpp │ ├── timer.hpp │ ├── utility.cpp │ ├── widget │ │ ├── button.cpp │ │ ├── button.hpp │ │ ├── canvas.cpp │ │ ├── canvas.hpp │ │ ├── check-button.cpp │ │ ├── check-button.hpp │ │ ├── check-label.cpp │ │ ├── check-label.hpp │ │ ├── combo-button-item.cpp │ │ ├── combo-button-item.hpp │ │ ├── combo-button.cpp │ │ ├── combo-button.hpp │ │ ├── frame.cpp │ │ ├── frame.hpp │ │ ├── hex-edit.cpp │ │ ├── hex-edit.hpp │ │ ├── horizontal-scroll-bar.cpp │ │ ├── horizontal-scroll-bar.hpp │ │ ├── horizontal-slider.cpp │ │ ├── horizontal-slider.hpp │ │ ├── label.cpp │ │ ├── label.hpp │ │ ├── line-edit.cpp │ │ ├── line-edit.hpp │ │ ├── progress-bar.cpp │ │ ├── progress-bar.hpp │ │ ├── radio-button.cpp │ │ ├── radio-button.hpp │ │ ├── radio-label.cpp │ │ ├── radio-label.hpp │ │ ├── tab-frame-item.cpp │ │ ├── tab-frame-item.hpp │ │ ├── tab-frame.cpp │ │ ├── tab-frame.hpp │ │ ├── table-view-cell.cpp │ │ ├── table-view-cell.hpp │ │ ├── table-view-column.cpp │ │ ├── table-view-column.hpp │ │ ├── table-view-item.cpp │ │ ├── table-view-item.hpp │ │ ├── table-view.cpp │ │ ├── table-view.hpp │ │ ├── text-edit.cpp │ │ ├── text-edit.hpp │ │ ├── vertical-scroll-bar.cpp │ │ ├── vertical-scroll-bar.hpp │ │ ├── vertical-slider.cpp │ │ ├── vertical-slider.hpp │ │ ├── viewport.cpp │ │ ├── viewport.hpp │ │ ├── widget.cpp │ │ └── widget.hpp │ ├── window.cpp │ └── window.hpp ├── resource │ ├── GNUmakefile │ ├── icon │ │ ├── action │ │ │ ├── add.png │ │ │ ├── attach.png │ │ │ ├── bookmark.png │ │ │ ├── close.png │ │ │ ├── full-screen.png │ │ │ ├── mute.png │ │ │ ├── new-file.png │ │ │ ├── new-folder.png │ │ │ ├── open.png │ │ │ ├── properties.png │ │ │ ├── quit.png │ │ │ ├── refresh.png │ │ │ ├── remove.png │ │ │ ├── save.png │ │ │ ├── search.png │ │ │ ├── settings.png │ │ │ └── stop.png │ │ ├── application │ │ │ ├── browser.png │ │ │ ├── calculator.png │ │ │ ├── calendar.png │ │ │ ├── chat.png │ │ │ ├── file-manager.png │ │ │ ├── mail.png │ │ │ ├── monitor.png │ │ │ ├── terminal.png │ │ │ └── text-editor.png │ │ ├── device │ │ │ ├── clock.png │ │ │ ├── display.png │ │ │ ├── joypad.png │ │ │ ├── keyboard.png │ │ │ ├── microphone.png │ │ │ ├── mouse.png │ │ │ ├── network.png │ │ │ ├── optical.png │ │ │ ├── printer.png │ │ │ ├── speaker.png │ │ │ └── storage.png │ │ ├── edit │ │ │ ├── clear.png │ │ │ ├── copy.png │ │ │ ├── cut.png │ │ │ ├── delete.png │ │ │ ├── find.png │ │ │ ├── paste.png │ │ │ ├── redo.png │ │ │ ├── replace.png │ │ │ └── undo.png │ │ ├── emblem │ │ │ ├── archive.png │ │ │ ├── audio.png │ │ │ ├── binary.png │ │ │ ├── file.png │ │ │ ├── folder-open.png │ │ │ ├── folder-template.png │ │ │ ├── folder.png │ │ │ ├── font.png │ │ │ ├── image.png │ │ │ ├── markup.png │ │ │ ├── program.png │ │ │ ├── script.png │ │ │ ├── text.png │ │ │ └── video.png │ │ ├── go │ │ │ ├── down.png │ │ │ ├── home.png │ │ │ ├── left.png │ │ │ ├── right.png │ │ │ └── up.png │ │ ├── media │ │ │ ├── back.png │ │ │ ├── eject.png │ │ │ ├── flash.png │ │ │ ├── floppy.png │ │ │ ├── next.png │ │ │ ├── optical.png │ │ │ ├── pause.png │ │ │ ├── play.png │ │ │ ├── record.png │ │ │ ├── rewind.png │ │ │ ├── skip.png │ │ │ └── stop.png │ │ ├── place │ │ │ ├── bookmarks.png │ │ │ ├── desktop.png │ │ │ ├── home.png │ │ │ ├── server.png │ │ │ ├── settings.png │ │ │ └── share.png │ │ └── prompt │ │ │ ├── error.png │ │ │ ├── information.png │ │ │ ├── question.png │ │ │ └── warning.png │ ├── resource.bml │ ├── resource.cpp │ └── resource.hpp └── windows │ ├── action │ ├── action.cpp │ ├── action.hpp │ ├── menu-check-item.cpp │ ├── menu-check-item.hpp │ ├── menu-item.cpp │ ├── menu-item.hpp │ ├── menu-radio-item.cpp │ ├── menu-radio-item.hpp │ ├── menu-separator.cpp │ ├── menu-separator.hpp │ ├── menu.cpp │ └── menu.hpp │ ├── application.cpp │ ├── application.hpp │ ├── browser-window.cpp │ ├── browser-window.hpp │ ├── desktop.cpp │ ├── desktop.hpp │ ├── font.cpp │ ├── font.hpp │ ├── group.cpp │ ├── group.hpp │ ├── header.hpp │ ├── hiro.Manifest │ ├── hiro.rc │ ├── keyboard.cpp │ ├── keyboard.hpp │ ├── menu-bar.cpp │ ├── menu-bar.hpp │ ├── message-window.cpp │ ├── message-window.hpp │ ├── monitor.cpp │ ├── monitor.hpp │ ├── mouse.cpp │ ├── mouse.hpp │ ├── object.cpp │ ├── object.hpp │ ├── platform.cpp │ ├── platform.hpp │ ├── popup-menu.cpp │ ├── popup-menu.hpp │ ├── settings.cpp │ ├── settings.hpp │ ├── sizable.cpp │ ├── sizable.hpp │ ├── status-bar.cpp │ ├── status-bar.hpp │ ├── timer.cpp │ ├── timer.hpp │ ├── tool-tip.cpp │ ├── tool-tip.hpp │ ├── utility.cpp │ ├── widget │ ├── button.cpp │ ├── button.hpp │ ├── canvas.cpp │ ├── canvas.hpp │ ├── check-button.cpp │ ├── check-button.hpp │ ├── check-label.cpp │ ├── check-label.hpp │ ├── combo-button-item.cpp │ ├── combo-button-item.hpp │ ├── combo-button.cpp │ ├── combo-button.hpp │ ├── frame.cpp │ ├── frame.hpp │ ├── hex-edit.cpp │ ├── hex-edit.hpp │ ├── horizontal-scroll-bar.cpp │ ├── horizontal-scroll-bar.hpp │ ├── horizontal-slider.cpp │ ├── horizontal-slider.hpp │ ├── label.cpp │ ├── label.hpp │ ├── line-edit.cpp │ ├── line-edit.hpp │ ├── progress-bar.cpp │ ├── progress-bar.hpp │ ├── radio-button.cpp │ ├── radio-button.hpp │ ├── radio-label.cpp │ ├── radio-label.hpp │ ├── tab-frame-item.cpp │ ├── tab-frame-item.hpp │ ├── tab-frame.cpp │ ├── tab-frame.hpp │ ├── table-view-cell.cpp │ ├── table-view-cell.hpp │ ├── table-view-column.cpp │ ├── table-view-column.hpp │ ├── table-view-item.cpp │ ├── table-view-item.hpp │ ├── table-view.cpp │ ├── table-view.hpp │ ├── text-edit.cpp │ ├── text-edit.hpp │ ├── vertical-scroll-bar.cpp │ ├── vertical-scroll-bar.hpp │ ├── vertical-slider.cpp │ ├── vertical-slider.hpp │ ├── viewport.cpp │ ├── viewport.hpp │ ├── widget.cpp │ └── widget.hpp │ ├── window.cpp │ └── window.hpp ├── libco ├── LICENSE ├── README.md ├── aarch64.c ├── amd64.c ├── arm.c ├── doc │ ├── examples │ │ ├── .gitignore │ │ ├── build.bat │ │ ├── build.sh │ │ ├── test.h │ │ ├── test_args.cpp │ │ ├── test_serialization.cpp │ │ └── test_timing.cpp │ ├── targets.md │ └── usage.md ├── fiber.c ├── libco.c ├── libco.h ├── ppc.c ├── ppc64v2.c ├── settings.h ├── sjlj.c ├── ucontext.c └── x86.c ├── mkdocs.yml ├── nall ├── GNUmakefile ├── adaptive-array.hpp ├── algorithm.hpp ├── any.hpp ├── arguments.hpp ├── arithmetic.hpp ├── arithmetic │ ├── barrett.hpp │ ├── natural.hpp │ └── unsigned.hpp ├── array-span.hpp ├── array-view.hpp ├── array.hpp ├── atoi.hpp ├── beat │ ├── archive │ │ ├── container.hpp │ │ ├── create.hpp │ │ ├── extract.hpp │ │ └── node.hpp │ └── single │ │ ├── apply.hpp │ │ └── create.hpp ├── bit.hpp ├── cd.hpp ├── cd │ ├── crc16.hpp │ ├── edc.hpp │ ├── efm.hpp │ ├── rspc.hpp │ ├── scrambler.hpp │ ├── session.hpp │ └── sync.hpp ├── chrono.hpp ├── cipher │ └── chacha20.hpp ├── counting-sort.hpp ├── database │ ├── odbc.hpp │ └── sqlite3.hpp ├── decode │ ├── base.hpp │ ├── base64.hpp │ ├── bmp.hpp │ ├── bwt.hpp │ ├── gzip.hpp │ ├── html.hpp │ ├── huffman.hpp │ ├── inflate.hpp │ ├── lzsa.hpp │ ├── mtf.hpp │ ├── png.hpp │ ├── rle.hpp │ ├── url.hpp │ └── zip.hpp ├── directory.hpp ├── dl.hpp ├── dsp │ ├── dsp.hpp │ ├── iir │ │ ├── biquad.hpp │ │ ├── dc-removal.hpp │ │ └── one-pole.hpp │ └── resampler │ │ └── cubic.hpp ├── elliptic-curve │ ├── curve25519.hpp │ ├── ed25519.hpp │ ├── modulo25519-optimized.hpp │ └── modulo25519-reference.hpp ├── emulation │ └── 21fx.hpp ├── encode │ ├── base.hpp │ ├── base64.hpp │ ├── bmp.hpp │ ├── bwt.hpp │ ├── html.hpp │ ├── huffman.hpp │ ├── lzsa.hpp │ ├── mtf.hpp │ ├── rle.hpp │ ├── url.hpp │ ├── wav.hpp │ └── zip.hpp ├── endian.hpp ├── file-buffer.hpp ├── file-map.hpp ├── file.hpp ├── function.hpp ├── galois-field.hpp ├── hash │ ├── crc16.hpp │ ├── crc32.hpp │ ├── crc64.hpp │ ├── hash.hpp │ ├── sha224.hpp │ ├── sha256.hpp │ ├── sha384.hpp │ └── sha512.hpp ├── hashset.hpp ├── hid.hpp ├── http │ ├── client.hpp │ ├── message.hpp │ ├── request.hpp │ ├── response.hpp │ ├── role.hpp │ └── server.hpp ├── image.hpp ├── image │ ├── blend.hpp │ ├── core.hpp │ ├── fill.hpp │ ├── interpolation.hpp │ ├── load.hpp │ ├── scale.hpp │ ├── static.hpp │ └── utility.hpp ├── induced-sort.hpp ├── inline-if.hpp ├── inode.hpp ├── instance.hpp ├── interpolation.hpp ├── intrinsics.hpp ├── iterator.hpp ├── literals.hpp ├── locale.hpp ├── location.hpp ├── mac │ └── poly1305.hpp ├── macos │ └── guard.hpp ├── main.hpp ├── map.hpp ├── matrix-multiply.hpp ├── matrix.hpp ├── maybe.hpp ├── memory.hpp ├── merge-sort.hpp ├── nall.hpp ├── path.hpp ├── platform.hpp ├── pointer.hpp ├── posix │ ├── service.hpp │ └── shared-memory.hpp ├── primitives.hpp ├── primitives │ ├── bit-field.hpp │ ├── bit-range.hpp │ ├── boolean.hpp │ ├── integer.hpp │ ├── literals.hpp │ ├── natural.hpp │ ├── real.hpp │ └── types.hpp ├── property.hpp ├── queue.hpp ├── random.hpp ├── range.hpp ├── reed-solomon.hpp ├── run.hpp ├── serial.hpp ├── serializer.hpp ├── service.hpp ├── set.hpp ├── shared-memory.hpp ├── shared-pointer.hpp ├── simd.hpp ├── smtp.hpp ├── stdint.hpp ├── string.hpp ├── string │ ├── allocator │ │ ├── adaptive.hpp │ │ ├── copy-on-write.hpp │ │ ├── small-string-optimization.hpp │ │ └── vector.hpp │ ├── atoi.hpp │ ├── cast.hpp │ ├── compare.hpp │ ├── convert.hpp │ ├── core.hpp │ ├── eval │ │ ├── evaluator.hpp │ │ ├── literal.hpp │ │ ├── node.hpp │ │ └── parser.hpp │ ├── find.hpp │ ├── format.hpp │ ├── markup │ │ ├── bml.hpp │ │ ├── find.hpp │ │ ├── node.hpp │ │ └── xml.hpp │ ├── match.hpp │ ├── pascal.hpp │ ├── replace.hpp │ ├── split.hpp │ ├── transform │ │ ├── cml.hpp │ │ └── dml.hpp │ ├── trim.hpp │ ├── utf8.hpp │ ├── utility.hpp │ ├── vector.hpp │ └── view.hpp ├── suffix-array.hpp ├── terminal.hpp ├── thread.hpp ├── traits.hpp ├── unique-pointer.hpp ├── utility.hpp ├── variant.hpp ├── varint.hpp ├── vector.hpp ├── vector │ ├── access.hpp │ ├── assign.hpp │ ├── compare.hpp │ ├── core.hpp │ ├── iterator.hpp │ ├── memory.hpp │ ├── modify.hpp │ ├── specialization │ │ └── uint8_t.hpp │ └── utility.hpp ├── vfs.hpp ├── vfs │ ├── fs │ │ └── file.hpp │ ├── memory │ │ └── file.hpp │ └── vfs.hpp ├── view.hpp ├── windows │ ├── detour.hpp │ ├── guard.hpp │ ├── guid.hpp │ ├── launcher.hpp │ ├── registry.hpp │ ├── service.hpp │ ├── shared-memory.hpp │ └── utf8.hpp └── xorg │ ├── clipboard.hpp │ ├── guard.hpp │ └── xorg.hpp ├── ruby ├── GNUmakefile ├── audio │ ├── alsa.cpp │ ├── ao.cpp │ ├── asio.cpp │ ├── asio.hpp │ ├── audio.cpp │ ├── audio.hpp │ ├── directsound.cpp │ ├── openal.cpp │ ├── oss.cpp │ ├── pulseaudio-simple.cpp │ ├── pulseaudio.cpp │ ├── wasapi.cpp │ ├── waveout.cpp │ ├── xaudio2.cpp │ └── xaudio2.hpp ├── input │ ├── carbon.cpp │ ├── input.cpp │ ├── input.hpp │ ├── joypad │ │ ├── directinput.cpp │ │ ├── iokit.cpp │ │ ├── sdl.cpp │ │ ├── udev.cpp │ │ └── xinput.cpp │ ├── keyboard │ │ ├── carbon.cpp │ │ ├── quartz.cpp │ │ ├── rawinput.cpp │ │ └── xlib.cpp │ ├── mouse │ │ ├── quartz.cpp │ │ ├── rawinput.cpp │ │ └── xlib.cpp │ ├── quartz.cpp │ ├── sdl.cpp │ ├── shared │ │ └── rawinput.cpp │ ├── udev.cpp │ ├── windows.cpp │ └── xlib.cpp ├── ruby.cpp ├── ruby.hpp └── video │ ├── cgl.cpp │ ├── direct3d.cpp │ ├── directdraw.cpp │ ├── gdi.cpp │ ├── glx.cpp │ ├── glx2.cpp │ ├── opengl │ ├── bind.hpp │ ├── main.hpp │ ├── opengl.hpp │ ├── program.hpp │ ├── shaders.hpp │ ├── surface.hpp │ ├── texture.hpp │ └── utility.hpp │ ├── video.cpp │ ├── video.hpp │ ├── wgl.cpp │ ├── xshm.cpp │ └── xvideo.cpp ├── shaders ├── AANN.shader │ ├── AANN.fs │ └── manifest.bml ├── CRT-Geom.shader │ ├── crt-geom.fs │ ├── crt-geom.vs │ ├── curvature.fs │ └── manifest.bml ├── CRT-Glow.shader │ ├── blur_horiz.fs │ ├── blur_horiz.vs │ ├── blur_vert.fs │ ├── blur_vert.vs │ ├── gauss_horiz.fs │ ├── gauss_horiz.vs │ ├── gauss_vert.fs │ ├── gauss_vert.vs │ ├── lanczos_horiz.fs │ ├── lanczos_horiz.vs │ ├── linearize.fs │ ├── linearize.vs │ ├── manifest.bml │ ├── resolve.fs │ ├── resolve.vs │ ├── threshold.fs │ └── threshold.vs ├── CRT-Lottes.shader │ ├── bloompass.fs │ ├── bloompass.vs │ ├── manifest.bml │ ├── scanpass.fs │ └── scanpass.vs ├── CRT-Royale.shader │ ├── bloom-approx.fs │ ├── bloom-approx.vs │ ├── bloom-horizontal-reconstitute.fs │ ├── bloom-horizontal-reconstitute.vs │ ├── bloom-vertical.fs │ ├── bloom-vertical.vs │ ├── blur9fast-horizontal.fs │ ├── blur9fast-horizontal.vs │ ├── blur9fast-vertical.fs │ ├── blur9fast-vertical.vs │ ├── brightpass.fs │ ├── brightpass.vs │ ├── first-pass-linearize-crt-gamma-bob-fields.fs │ ├── first-pass-linearize-crt-gamma-bob-fields.vs │ ├── geometry-aa-last-pass.fs │ ├── geometry-aa-last-pass.vs │ ├── manifest.bml │ ├── mask-resize-horizontal.fs │ ├── mask-resize-horizontal.vs │ ├── mask-resize-vertical.fs │ ├── mask-resize-vertical.vs │ ├── scanlines-horizontal-apply-mask.fs │ ├── scanlines-horizontal-apply-mask.vs │ ├── scanlines-vertical-interlacing.fs │ ├── scanlines-vertical-interlacing.vs │ └── textures │ │ ├── TileableLinearApertureGrille15Wide8And5d5Spacing.png │ │ ├── TileableLinearApertureGrille15Wide8And5d5SpacingResizeTo64.png │ │ ├── TileableLinearShadowMask.png │ │ ├── TileableLinearShadowMaskEDP.png │ │ ├── TileableLinearShadowMaskEDPResizeTo64.png │ │ ├── TileableLinearShadowMaskResizeTo64.png │ │ ├── TileableLinearSlotMaskTall15Wide9And4d5Horizontal9d14VerticalSpacing.png │ │ └── TileableLinearSlotMaskTall15Wide9And4d5Horizontal9d14VerticalSpacingResizeTo64.png ├── GTU.shader │ ├── GTU-pass1.fs │ ├── GTU-pass2.fs │ ├── GTU-pass2.vs │ ├── GTU-pass3.fs │ ├── GTU-pass4.fs │ ├── GTU-pass4.vs │ └── manifest.bml ├── LCD-cgwg.shader │ ├── lcd-grid.fs │ ├── manifest.bml │ └── motion-blur.fs ├── MDAPT-Dedithering.shader │ ├── manifest.bml │ ├── mdapt-pass1.fs │ ├── mdapt-pass2.fs │ ├── mdapt-pass3.fs │ └── mdapt-pass4.fs ├── NTSC-MAME.shader │ ├── mame-ntsc.fs │ ├── mame-ntsc.vs │ ├── mame-postproc.fs │ ├── mame-postproc.vs │ └── manifest.bml ├── NTSC.shader │ ├── gaussian-scanlines.fs │ ├── manifest.bml │ ├── ntsc-pass1.fs │ └── ntsc-pass2.fs ├── PAL-Composite.shader │ ├── manifest.bml │ └── pal-r57shell.fs ├── Pixellate.shader │ ├── manifest.bml │ └── pixellate.fs ├── Retro.shader │ ├── gamma.fs │ ├── manifest.bml │ └── retro.fs ├── ScaleFX.shader │ ├── advanced-aa.fs │ ├── advanced-aa.vs │ ├── manifest.bml │ ├── scalefx-pass0.fs │ ├── scalefx-pass0.vs │ ├── scalefx-pass1.fs │ ├── scalefx-pass1.vs │ ├── scalefx-pass2.fs │ ├── scalefx-pass2.vs │ ├── scalefx-pass3.fs │ ├── scalefx-pass3.vs │ ├── scalefx-pass4.fs │ └── scalefx-pass4.vs ├── Sharp-Bilinear.shader │ ├── manifest.bml │ └── sharp-bilinear.fs ├── xBR-mode7-480p.shader │ ├── custom-jinc2-sharper.fs │ ├── manifest.bml │ ├── super-2xbr-3d-pass0.fs │ ├── super-2xbr-3d-pass1.fs │ ├── super-2xbr-3d-pass2.fs │ └── super-2xbr-3d-pass2.vs ├── xBR-mode7-960p.shader │ ├── custom-jinc2-sharper.fs │ ├── manifest.bml │ ├── super-4xbr-3d-pass0.fs │ ├── super-4xbr-3d-pass1.fs │ ├── super-4xbr-3d-pass2.fs │ └── super-4xbr-3d-pass3.fs └── xBRZ.shader │ ├── fxaa.fs │ ├── manifest.bml │ ├── xBRZ-Freescale-p0.fs │ └── xBRZ-Freescale-p1.fs ├── sourcery ├── GNUmakefile ├── obj │ └── .gitignore ├── out │ └── .gitignore └── sourcery.cpp └── update-subtrees.sh /.assets/bahamut-lagoon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsnes-emu/bsnes/b815744b4cff6d6854090545b78ae8e1a6669976/.assets/bahamut-lagoon.png -------------------------------------------------------------------------------- /.assets/tengai-makyou-zero.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsnes-emu/bsnes/b815744b4cff6d6854090545b78ae8e1a6669976/.assets/tengai-makyou-zero.png -------------------------------------------------------------------------------- /.assets/user-interface.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsnes-emu/bsnes/b815744b4cff6d6854090545b78ae8e1a6669976/.assets/user-interface.png -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | *.fs linguist-detectable=false 2 | *.vs linguist-detectable=false 3 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | hiro/qt/qt.moc 2 | -------------------------------------------------------------------------------- /bsnes/emulator/emulator.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | namespace Emulator { 5 | 6 | Platform* platform = nullptr; 7 | 8 | } 9 | -------------------------------------------------------------------------------- /bsnes/filter/none.cpp: -------------------------------------------------------------------------------- 1 | namespace Filter::None { 2 | 3 | auto size(uint& width, uint& height) -> void { 4 | width = width; 5 | height = height; 6 | } 7 | 8 | auto render( 9 | uint32_t* colortable, uint32_t* output, uint outpitch, 10 | const uint16_t* input, uint pitch, uint width, uint height 11 | ) -> void { 12 | pitch >>= 1; 13 | outpitch >>= 2; 14 | 15 | for(uint y = 0; y < height; y++) { 16 | const uint16_t* in = input + y * pitch; 17 | uint32_t* out = output + y * outpitch; 18 | for(uint x = 0; x < width; x++) { 19 | *out++ = colortable[*in++]; 20 | } 21 | } 22 | } 23 | 24 | } 25 | -------------------------------------------------------------------------------- /bsnes/gb/.gitattributes: -------------------------------------------------------------------------------- 1 | # Always use LF line endings for shaders 2 | *.fsh text eol=lf 3 | *.metal text eol=lf 4 | 5 | HexFiend/* linguist-vendored 6 | *.inc linguist-language=C 7 | Core/*.h linguist-language=C 8 | SDL/*.h linguist-language=C 9 | Windows/*.h linguist-language=C 10 | Cocoa/*.h linguist-language=Objective-C 11 | -------------------------------------------------------------------------------- /bsnes/gb/.github/actions/cgb-acid2.gbc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsnes-emu/bsnes/b815744b4cff6d6854090545b78ae8e1a6669976/bsnes/gb/.github/actions/cgb-acid2.gbc -------------------------------------------------------------------------------- /bsnes/gb/.github/actions/cgb_sound.gb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsnes-emu/bsnes/b815744b4cff6d6854090545b78ae8e1a6669976/bsnes/gb/.github/actions/cgb_sound.gb -------------------------------------------------------------------------------- /bsnes/gb/.github/actions/dmg-acid2.gb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsnes-emu/bsnes/b815744b4cff6d6854090545b78ae8e1a6669976/bsnes/gb/.github/actions/dmg-acid2.gb -------------------------------------------------------------------------------- /bsnes/gb/.github/actions/dmg_sound-2.gb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsnes-emu/bsnes/b815744b4cff6d6854090545b78ae8e1a6669976/bsnes/gb/.github/actions/dmg_sound-2.gb -------------------------------------------------------------------------------- /bsnes/gb/.github/actions/oam_bug-2.gb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsnes-emu/bsnes/b815744b4cff6d6854090545b78ae8e1a6669976/bsnes/gb/.github/actions/oam_bug-2.gb -------------------------------------------------------------------------------- /bsnes/gb/.gitignore: -------------------------------------------------------------------------------- 1 | build -------------------------------------------------------------------------------- /bsnes/gb/BootROMs/SameBoyLogo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsnes-emu/bsnes/b815744b4cff6d6854090545b78ae8e1a6669976/bsnes/gb/BootROMs/SameBoyLogo.png -------------------------------------------------------------------------------- /bsnes/gb/BootROMs/agb_boot.asm: -------------------------------------------------------------------------------- 1 | AGB EQU 1 2 | include "cgb_boot.asm" -------------------------------------------------------------------------------- /bsnes/gb/BootROMs/cgb_boot_fast.asm: -------------------------------------------------------------------------------- 1 | FAST EQU 1 2 | include "cgb_boot.asm" -------------------------------------------------------------------------------- /bsnes/gb/BootROMs/sgb2_boot.asm: -------------------------------------------------------------------------------- 1 | SGB2 EQU 1 2 | include "sgb_boot.asm" -------------------------------------------------------------------------------- /bsnes/gb/CHANGES.md: -------------------------------------------------------------------------------- 1 | See https://sameboy.github.io/changelog/ -------------------------------------------------------------------------------- /bsnes/gb/Cocoa/AppIcon.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsnes-emu/bsnes/b815744b4cff6d6854090545b78ae8e1a6669976/bsnes/gb/Cocoa/AppIcon.icns -------------------------------------------------------------------------------- /bsnes/gb/Cocoa/CPU.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsnes-emu/bsnes/b815744b4cff6d6854090545b78ae8e1a6669976/bsnes/gb/Cocoa/CPU.png -------------------------------------------------------------------------------- /bsnes/gb/Cocoa/CPU@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsnes-emu/bsnes/b815744b4cff6d6854090545b78ae8e1a6669976/bsnes/gb/Cocoa/CPU@2x.png -------------------------------------------------------------------------------- /bsnes/gb/Cocoa/Cartridge.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsnes-emu/bsnes/b815744b4cff6d6854090545b78ae8e1a6669976/bsnes/gb/Cocoa/Cartridge.icns -------------------------------------------------------------------------------- /bsnes/gb/Cocoa/ColorCartridge.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsnes-emu/bsnes/b815744b4cff6d6854090545b78ae8e1a6669976/bsnes/gb/Cocoa/ColorCartridge.icns -------------------------------------------------------------------------------- /bsnes/gb/Cocoa/Display.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsnes-emu/bsnes/b815744b4cff6d6854090545b78ae8e1a6669976/bsnes/gb/Cocoa/Display.png -------------------------------------------------------------------------------- /bsnes/gb/Cocoa/Display@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsnes-emu/bsnes/b815744b4cff6d6854090545b78ae8e1a6669976/bsnes/gb/Cocoa/Display@2x.png -------------------------------------------------------------------------------- /bsnes/gb/Cocoa/GBAudioClient.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | 4 | @interface GBAudioClient : NSObject 5 | @property (nonatomic, strong) void (^renderBlock)(UInt32 sampleRate, UInt32 nFrames, GB_sample_t *buffer); 6 | @property (nonatomic, readonly) UInt32 rate; 7 | @property (nonatomic, readonly, getter=isPlaying) bool playing; 8 | -(void) start; 9 | -(void) stop; 10 | -(id) initWithRendererBlock:(void (^)(UInt32 sampleRate, UInt32 nFrames, GB_sample_t *buffer)) block 11 | andSampleRate:(UInt32) rate; 12 | @end 13 | -------------------------------------------------------------------------------- /bsnes/gb/Cocoa/GBBorderView.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @interface GBBorderView : NSView 4 | 5 | @end 6 | -------------------------------------------------------------------------------- /bsnes/gb/Cocoa/GBButtons.m: -------------------------------------------------------------------------------- 1 | #import 2 | #import "GBButtons.h" 3 | 4 | NSString const *GBButtonNames[] = {@"Right", @"Left", @"Up", @"Down", @"A", @"B", @"Select", @"Start", @"Turbo", @"Rewind", @"Slow-Motion"}; 5 | -------------------------------------------------------------------------------- /bsnes/gb/Cocoa/GBCheatTextFieldCell.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @interface GBCheatTextFieldCell : NSTextFieldCell 4 | @property (nonatomic) bool usesAddressFormat; 5 | @end 6 | -------------------------------------------------------------------------------- /bsnes/gb/Cocoa/GBColorCell.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @interface GBColorCell : NSTextFieldCell 4 | 5 | @end 6 | -------------------------------------------------------------------------------- /bsnes/gb/Cocoa/GBCompleteByteSlice.h: -------------------------------------------------------------------------------- 1 | #import "Document.h" 2 | #import "HexFiend/HexFiend.h" 3 | #import "HexFiend/HFByteSlice.h" 4 | 5 | @interface GBCompleteByteSlice : HFByteSlice 6 | - (instancetype) initWithByteArray:(HFByteArray *)array; 7 | @end 8 | -------------------------------------------------------------------------------- /bsnes/gb/Cocoa/GBCompleteByteSlice.m: -------------------------------------------------------------------------------- 1 | #import "GBCompleteByteSlice.h" 2 | 3 | @implementation GBCompleteByteSlice 4 | { 5 | HFByteArray *_array; 6 | } 7 | 8 | - (instancetype) initWithByteArray:(HFByteArray *)array 9 | { 10 | if ((self = [super init])) { 11 | _array = array; 12 | } 13 | return self; 14 | } 15 | 16 | - (unsigned long long)length 17 | { 18 | return [_array length]; 19 | } 20 | 21 | - (void)copyBytes:(unsigned char *)dst range:(HFRange)range 22 | { 23 | [_array copyBytes:dst range:range]; 24 | } 25 | 26 | @end 27 | -------------------------------------------------------------------------------- /bsnes/gb/Cocoa/GBGLShader.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "GBView.h" 3 | 4 | @interface GBGLShader : NSObject 5 | - (instancetype)initWithName:(NSString *) shaderName; 6 | - (void) renderBitmap: (void *)bitmap previous:(void*) previous sized:(NSSize)srcSize inSize:(NSSize)dstSize scale: (double) scale withBlendingMode: (GB_frame_blending_mode_t)blendingMode; 7 | @end 8 | -------------------------------------------------------------------------------- /bsnes/gb/Cocoa/GBImageCell.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @interface GBImageCell : NSImageCell 4 | 5 | @end 6 | -------------------------------------------------------------------------------- /bsnes/gb/Cocoa/GBImageCell.m: -------------------------------------------------------------------------------- 1 | #import "GBImageCell.h" 2 | 3 | @implementation GBImageCell 4 | - (void)drawWithFrame:(NSRect)cellFrame inView:(NSView *)controlView 5 | { 6 | CGContextRef context = [[NSGraphicsContext currentContext] graphicsPort]; 7 | CGContextSetInterpolationQuality(context, kCGInterpolationNone); 8 | [super drawWithFrame:cellFrame inView:controlView]; 9 | } 10 | @end 11 | -------------------------------------------------------------------------------- /bsnes/gb/Cocoa/GBMemoryByteArray.h: -------------------------------------------------------------------------------- 1 | #import "Document.h" 2 | #import "HexFiend/HexFiend.h" 3 | #import "HexFiend/HFByteArray.h" 4 | 5 | typedef enum { 6 | GBMemoryEntireSpace, 7 | GBMemoryROM, 8 | GBMemoryVRAM, 9 | GBMemoryExternalRAM, 10 | GBMemoryRAM 11 | } GB_memory_mode_t; 12 | 13 | @interface GBMemoryByteArray : HFByteArray 14 | - (instancetype) initWithDocument:(Document *)document; 15 | @property (nonatomic) uint16_t selectedBank; 16 | @property (nonatomic) GB_memory_mode_t mode; 17 | @end 18 | -------------------------------------------------------------------------------- /bsnes/gb/Cocoa/GBOSDView.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @interface GBOSDView : NSView 4 | @property bool usesSGBScale; 5 | - (void)displayText:(NSString *)text; 6 | @end 7 | -------------------------------------------------------------------------------- /bsnes/gb/Cocoa/GBOpenGLView.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "GBGLShader.h" 3 | 4 | @interface GBOpenGLView : NSOpenGLView 5 | @property (nonatomic) GBGLShader *shader; 6 | @end 7 | -------------------------------------------------------------------------------- /bsnes/gb/Cocoa/GBOptionalVisualEffectView.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | /* Fake interface so the compiler assumes it conforms to NSVisualEffectView */ 4 | @interface GBOptionalVisualEffectView : NSVisualEffectView 5 | 6 | @end 7 | -------------------------------------------------------------------------------- /bsnes/gb/Cocoa/GBOptionalVisualEffectView.m: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @interface GBOptionalVisualEffectView : NSView 4 | 5 | @end 6 | 7 | @implementation GBOptionalVisualEffectView 8 | 9 | + (instancetype)allocWithZone:(struct _NSZone *)zone 10 | { 11 | Class NSVisualEffectView = NSClassFromString(@"NSVisualEffectView"); 12 | if (NSVisualEffectView) { 13 | return (id)[NSVisualEffectView alloc]; 14 | } 15 | return [super allocWithZone:zone]; 16 | } 17 | 18 | @end 19 | -------------------------------------------------------------------------------- /bsnes/gb/Cocoa/GBSplitView.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @interface GBSplitView : NSSplitView 4 | 5 | -(void) setDividerColor:(NSColor *)color; 6 | - (NSArray *)arrangedSubviews; 7 | @end 8 | -------------------------------------------------------------------------------- /bsnes/gb/Cocoa/GBTerminalTextFieldCell.h: -------------------------------------------------------------------------------- 1 | #import 2 | #include 3 | 4 | @interface GBTerminalTextFieldCell : NSTextFieldCell 5 | @property (nonatomic) GB_gameboy_t *gb; 6 | @end 7 | -------------------------------------------------------------------------------- /bsnes/gb/Cocoa/GBViewGL.h: -------------------------------------------------------------------------------- 1 | #import "GBView.h" 2 | 3 | @interface GBViewGL : GBView 4 | 5 | @end 6 | -------------------------------------------------------------------------------- /bsnes/gb/Cocoa/GBViewMetal.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | #import "GBView.h" 4 | 5 | @interface GBViewMetal : GBView 6 | + (bool) isSupported; 7 | @end 8 | -------------------------------------------------------------------------------- /bsnes/gb/Cocoa/GBVisualizerView.h: -------------------------------------------------------------------------------- 1 | #import 2 | #include 3 | 4 | @interface GBVisualizerView : NSView 5 | - (void)addSample:(GB_sample_t *)sample; 6 | @end 7 | -------------------------------------------------------------------------------- /bsnes/gb/Cocoa/GBWarningPopover.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @interface GBWarningPopover : NSPopover 4 | 5 | + (GBWarningPopover *) popoverWithContents:(NSString *)contents onView:(NSView *)view; 6 | + (GBWarningPopover *) popoverWithContents:(NSString *)contents onWindow:(NSWindow *)window; 7 | 8 | @end 9 | -------------------------------------------------------------------------------- /bsnes/gb/Cocoa/Joypad.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsnes-emu/bsnes/b815744b4cff6d6854090545b78ae8e1a6669976/bsnes/gb/Cocoa/Joypad.png -------------------------------------------------------------------------------- /bsnes/gb/Cocoa/Joypad@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsnes-emu/bsnes/b815744b4cff6d6854090545b78ae8e1a6669976/bsnes/gb/Cocoa/Joypad@2x.png -------------------------------------------------------------------------------- /bsnes/gb/Cocoa/Joypad~dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsnes-emu/bsnes/b815744b4cff6d6854090545b78ae8e1a6669976/bsnes/gb/Cocoa/Joypad~dark.png -------------------------------------------------------------------------------- /bsnes/gb/Cocoa/Joypad~dark@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsnes-emu/bsnes/b815744b4cff6d6854090545b78ae8e1a6669976/bsnes/gb/Cocoa/Joypad~dark@2x.png -------------------------------------------------------------------------------- /bsnes/gb/Cocoa/NSObject+MavericksCompat.m: -------------------------------------------------------------------------------- 1 | #import 2 | @implementation NSObject (MavericksCompat) 3 | - (instancetype)initWithCoder:(NSCoder *)coder 4 | { 5 | return [self init]; 6 | } 7 | @end 8 | -------------------------------------------------------------------------------- /bsnes/gb/Cocoa/NSString+StringForKey.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @interface NSString (StringForKey) 4 | + (NSString *) displayStringForKeyString: (NSString *)key_string; 5 | + (NSString *) displayStringForKeyCode:(unsigned short) keyCode; 6 | @end 7 | -------------------------------------------------------------------------------- /bsnes/gb/Cocoa/Next.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsnes-emu/bsnes/b815744b4cff6d6854090545b78ae8e1a6669976/bsnes/gb/Cocoa/Next.png -------------------------------------------------------------------------------- /bsnes/gb/Cocoa/Next@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsnes-emu/bsnes/b815744b4cff6d6854090545b78ae8e1a6669976/bsnes/gb/Cocoa/Next@2x.png -------------------------------------------------------------------------------- /bsnes/gb/Cocoa/Pause.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsnes-emu/bsnes/b815744b4cff6d6854090545b78ae8e1a6669976/bsnes/gb/Cocoa/Pause.png -------------------------------------------------------------------------------- /bsnes/gb/Cocoa/Pause@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsnes-emu/bsnes/b815744b4cff6d6854090545b78ae8e1a6669976/bsnes/gb/Cocoa/Pause@2x.png -------------------------------------------------------------------------------- /bsnes/gb/Cocoa/PkgInfo: -------------------------------------------------------------------------------- 1 | APPL???? -------------------------------------------------------------------------------- /bsnes/gb/Cocoa/Play.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsnes-emu/bsnes/b815744b4cff6d6854090545b78ae8e1a6669976/bsnes/gb/Cocoa/Play.png -------------------------------------------------------------------------------- /bsnes/gb/Cocoa/Play@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsnes-emu/bsnes/b815744b4cff6d6854090545b78ae8e1a6669976/bsnes/gb/Cocoa/Play@2x.png -------------------------------------------------------------------------------- /bsnes/gb/Cocoa/Previous.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsnes-emu/bsnes/b815744b4cff6d6854090545b78ae8e1a6669976/bsnes/gb/Cocoa/Previous.png -------------------------------------------------------------------------------- /bsnes/gb/Cocoa/Previous@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsnes-emu/bsnes/b815744b4cff6d6854090545b78ae8e1a6669976/bsnes/gb/Cocoa/Previous@2x.png -------------------------------------------------------------------------------- /bsnes/gb/Cocoa/Rewind.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsnes-emu/bsnes/b815744b4cff6d6854090545b78ae8e1a6669976/bsnes/gb/Cocoa/Rewind.png -------------------------------------------------------------------------------- /bsnes/gb/Cocoa/Rewind@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsnes-emu/bsnes/b815744b4cff6d6854090545b78ae8e1a6669976/bsnes/gb/Cocoa/Rewind@2x.png -------------------------------------------------------------------------------- /bsnes/gb/Cocoa/Speaker.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsnes-emu/bsnes/b815744b4cff6d6854090545b78ae8e1a6669976/bsnes/gb/Cocoa/Speaker.png -------------------------------------------------------------------------------- /bsnes/gb/Cocoa/Speaker@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsnes-emu/bsnes/b815744b4cff6d6854090545b78ae8e1a6669976/bsnes/gb/Cocoa/Speaker@2x.png -------------------------------------------------------------------------------- /bsnes/gb/Cocoa/Speaker~dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsnes-emu/bsnes/b815744b4cff6d6854090545b78ae8e1a6669976/bsnes/gb/Cocoa/Speaker~dark.png -------------------------------------------------------------------------------- /bsnes/gb/Cocoa/Speaker~dark@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsnes-emu/bsnes/b815744b4cff6d6854090545b78ae8e1a6669976/bsnes/gb/Cocoa/Speaker~dark@2x.png -------------------------------------------------------------------------------- /bsnes/gb/Cocoa/main.m: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | int main(int argc, const char * argv[]) 4 | { 5 | return NSApplicationMain(argc, argv); 6 | } 7 | -------------------------------------------------------------------------------- /bsnes/gb/Core/gb_struct_def.h: -------------------------------------------------------------------------------- 1 | #ifndef gb_struct_def_h 2 | #define gb_struct_def_h 3 | struct GB_gameboy_s; 4 | typedef struct GB_gameboy_s GB_gameboy_t; 5 | #endif 6 | -------------------------------------------------------------------------------- /bsnes/gb/Core/random.h: -------------------------------------------------------------------------------- 1 | #ifndef random_h 2 | #define random_h 3 | 4 | #include 5 | #include 6 | 7 | uint8_t GB_random(void); 8 | uint32_t GB_random32(void); 9 | void GB_random_seed(uint64_t seed); 10 | void GB_random_set_enabled(bool enable); 11 | 12 | #endif /* random_h */ 13 | -------------------------------------------------------------------------------- /bsnes/gb/Core/rewind.h: -------------------------------------------------------------------------------- 1 | #ifndef rewind_h 2 | #define rewind_h 3 | 4 | #include 5 | #include "gb_struct_def.h" 6 | 7 | #ifdef GB_INTERNAL 8 | void GB_rewind_push(GB_gameboy_t *gb); 9 | void GB_rewind_free(GB_gameboy_t *gb); 10 | #endif 11 | bool GB_rewind_pop(GB_gameboy_t *gb); 12 | void GB_set_rewind_length(GB_gameboy_t *gb, double seconds); 13 | 14 | #endif 15 | -------------------------------------------------------------------------------- /bsnes/gb/Core/rumble.h: -------------------------------------------------------------------------------- 1 | #ifndef rumble_h 2 | #define rumble_h 3 | 4 | #include "gb_struct_def.h" 5 | 6 | typedef enum { 7 | GB_RUMBLE_DISABLED, 8 | GB_RUMBLE_CARTRIDGE_ONLY, 9 | GB_RUMBLE_ALL_GAMES 10 | } GB_rumble_mode_t; 11 | 12 | #ifdef GB_INTERNAL 13 | void GB_handle_rumble(GB_gameboy_t *gb); 14 | #endif 15 | void GB_set_rumble_mode(GB_gameboy_t *gb, GB_rumble_mode_t mode); 16 | 17 | #endif /* rumble_h */ 18 | -------------------------------------------------------------------------------- /bsnes/gb/Core/sm83_cpu.h: -------------------------------------------------------------------------------- 1 | #ifndef sm83_cpu_h 2 | #define sm83_cpu_h 3 | #include "gb_struct_def.h" 4 | #include 5 | 6 | void GB_cpu_disassemble(GB_gameboy_t *gb, uint16_t pc, uint16_t count); 7 | #ifdef GB_INTERNAL 8 | void GB_cpu_run(GB_gameboy_t *gb); 9 | #endif 10 | 11 | #endif /* sm83_cpu_h */ 12 | -------------------------------------------------------------------------------- /bsnes/gb/FreeDesktop/AppIcon/128x128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsnes-emu/bsnes/b815744b4cff6d6854090545b78ae8e1a6669976/bsnes/gb/FreeDesktop/AppIcon/128x128.png -------------------------------------------------------------------------------- /bsnes/gb/FreeDesktop/AppIcon/16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsnes-emu/bsnes/b815744b4cff6d6854090545b78ae8e1a6669976/bsnes/gb/FreeDesktop/AppIcon/16x16.png -------------------------------------------------------------------------------- /bsnes/gb/FreeDesktop/AppIcon/256x256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsnes-emu/bsnes/b815744b4cff6d6854090545b78ae8e1a6669976/bsnes/gb/FreeDesktop/AppIcon/256x256.png -------------------------------------------------------------------------------- /bsnes/gb/FreeDesktop/AppIcon/32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsnes-emu/bsnes/b815744b4cff6d6854090545b78ae8e1a6669976/bsnes/gb/FreeDesktop/AppIcon/32x32.png -------------------------------------------------------------------------------- /bsnes/gb/FreeDesktop/AppIcon/512x512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsnes-emu/bsnes/b815744b4cff6d6854090545b78ae8e1a6669976/bsnes/gb/FreeDesktop/AppIcon/512x512.png -------------------------------------------------------------------------------- /bsnes/gb/FreeDesktop/AppIcon/64x64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsnes-emu/bsnes/b815744b4cff6d6854090545b78ae8e1a6669976/bsnes/gb/FreeDesktop/AppIcon/64x64.png -------------------------------------------------------------------------------- /bsnes/gb/FreeDesktop/Cartridge/128x128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsnes-emu/bsnes/b815744b4cff6d6854090545b78ae8e1a6669976/bsnes/gb/FreeDesktop/Cartridge/128x128.png -------------------------------------------------------------------------------- /bsnes/gb/FreeDesktop/Cartridge/16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsnes-emu/bsnes/b815744b4cff6d6854090545b78ae8e1a6669976/bsnes/gb/FreeDesktop/Cartridge/16x16.png -------------------------------------------------------------------------------- /bsnes/gb/FreeDesktop/Cartridge/256x256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsnes-emu/bsnes/b815744b4cff6d6854090545b78ae8e1a6669976/bsnes/gb/FreeDesktop/Cartridge/256x256.png -------------------------------------------------------------------------------- /bsnes/gb/FreeDesktop/Cartridge/32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsnes-emu/bsnes/b815744b4cff6d6854090545b78ae8e1a6669976/bsnes/gb/FreeDesktop/Cartridge/32x32.png -------------------------------------------------------------------------------- /bsnes/gb/FreeDesktop/Cartridge/512x512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsnes-emu/bsnes/b815744b4cff6d6854090545b78ae8e1a6669976/bsnes/gb/FreeDesktop/Cartridge/512x512.png -------------------------------------------------------------------------------- /bsnes/gb/FreeDesktop/Cartridge/64x64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsnes-emu/bsnes/b815744b4cff6d6854090545b78ae8e1a6669976/bsnes/gb/FreeDesktop/Cartridge/64x64.png -------------------------------------------------------------------------------- /bsnes/gb/FreeDesktop/ColorCartridge/128x128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsnes-emu/bsnes/b815744b4cff6d6854090545b78ae8e1a6669976/bsnes/gb/FreeDesktop/ColorCartridge/128x128.png -------------------------------------------------------------------------------- /bsnes/gb/FreeDesktop/ColorCartridge/16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsnes-emu/bsnes/b815744b4cff6d6854090545b78ae8e1a6669976/bsnes/gb/FreeDesktop/ColorCartridge/16x16.png -------------------------------------------------------------------------------- /bsnes/gb/FreeDesktop/ColorCartridge/256x256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsnes-emu/bsnes/b815744b4cff6d6854090545b78ae8e1a6669976/bsnes/gb/FreeDesktop/ColorCartridge/256x256.png -------------------------------------------------------------------------------- /bsnes/gb/FreeDesktop/ColorCartridge/32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsnes-emu/bsnes/b815744b4cff6d6854090545b78ae8e1a6669976/bsnes/gb/FreeDesktop/ColorCartridge/32x32.png -------------------------------------------------------------------------------- /bsnes/gb/FreeDesktop/ColorCartridge/512x512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsnes-emu/bsnes/b815744b4cff6d6854090545b78ae8e1a6669976/bsnes/gb/FreeDesktop/ColorCartridge/512x512.png -------------------------------------------------------------------------------- /bsnes/gb/FreeDesktop/ColorCartridge/64x64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsnes-emu/bsnes/b815744b4cff6d6854090545b78ae8e1a6669976/bsnes/gb/FreeDesktop/ColorCartridge/64x64.png -------------------------------------------------------------------------------- /bsnes/gb/FreeDesktop/sameboy.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Version=1.0 3 | Type=Application 4 | Icon=sameboy 5 | Exec=sameboy 6 | Name=SameBoy 7 | Comment=Game Boy and Game Boy Color emulator 8 | Keywords=game;boy;gameboy;color;emulator 9 | Terminal=false 10 | StartupNotify=false 11 | Categories=Game;Emulator; 12 | MimeType=application/x-gameboy-rom;application/x-gameboy-color-rom;application/x-gameboy-isx 13 | -------------------------------------------------------------------------------- /bsnes/gb/HexFiend/HFByteArray_Internal.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @interface HFByteArray (HFInternal) 4 | 5 | - (BOOL)_debugIsEqual:(HFByteArray *)val; 6 | - (BOOL)_debugIsEqualToData:(NSData *)val; 7 | 8 | @end 9 | -------------------------------------------------------------------------------- /bsnes/gb/HexFiend/HFByteSlice_Private.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @interface HFByteSlice (HFByteSlice_Private) 4 | 5 | - (void)constructNewByteSlicesAboutRange:(HFRange)range first:(HFByteSlice **)first second:(HFByteSlice **)second; 6 | 7 | @end 8 | -------------------------------------------------------------------------------- /bsnes/gb/HexFiend/HFFullMemoryByteSlice.h: -------------------------------------------------------------------------------- 1 | // 2 | // HFFullMemoryByteSlice.h 3 | // HexFiend_2 4 | // 5 | // Copyright 2007 ridiculous_fish. All rights reserved. 6 | // 7 | 8 | #import 9 | 10 | /*! @class HFFullMemoryByteSlice 11 | 12 | @brief A simple subclass of HFByteSlice that wraps an NSData. For most uses, prefer HFSharedMemoryByteSlice. 13 | */ 14 | @interface HFFullMemoryByteSlice : HFByteSlice { 15 | NSData *data; 16 | } 17 | 18 | /*! Init with a given NSData, which is copied via the \c -copy message. */ 19 | - (instancetype)initWithData:(NSData *)val; 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /bsnes/gb/HexFiend/HFHexTextView.h: -------------------------------------------------------------------------------- 1 | // 2 | // HFHexTextView.h 3 | // HexFiend_2 4 | // 5 | // Copyright 2007 __MyCompanyName__. All rights reserved. 6 | // 7 | 8 | #import 9 | 10 | 11 | @interface HFHexTextView : NSTextView { 12 | 13 | } 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /bsnes/gb/HexFiend/HFHexTextView.m: -------------------------------------------------------------------------------- 1 | // 2 | // HFHexTextView.m 3 | // HexFiend_2 4 | // 5 | // Copyright 2007 __MyCompanyName__. All rights reserved. 6 | // 7 | 8 | #import "HFHexTextView.h" 9 | 10 | 11 | @implementation HFHexTextView 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /bsnes/gb/HexFiend/HFPrivilegedHelperConnection.h: -------------------------------------------------------------------------------- 1 | #ifndef HF_NO_PRIVILEGED_FILE_OPERATIONS 2 | #define HF_NO_PRIVILEGED_FILE_OPERATIONS 3 | #endif -------------------------------------------------------------------------------- /bsnes/gb/HexFiend/HFRepresenterHexTextView.h: -------------------------------------------------------------------------------- 1 | // 2 | // HFRepresenterHexTextView.h 3 | // HexFiend_2 4 | // 5 | // Copyright 2007 ridiculous_fish. All rights reserved. 6 | // 7 | 8 | #import 9 | 10 | 11 | @interface HFRepresenterHexTextView : HFRepresenterTextView { 12 | CGGlyph glyphTable[17]; 13 | CGFloat glyphAdvancement; 14 | CGFloat spaceAdvancement; 15 | 16 | BOOL hidesNullBytes; 17 | } 18 | 19 | @property(nonatomic) BOOL hidesNullBytes; 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /bsnes/gb/HexFiend/HFRepresenterTextView_Internal.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | #define GLYPH_BUFFER_SIZE 16u 4 | 5 | @interface HFRepresenterTextView (HFInternal) 6 | 7 | - (NSUInteger)_glyphsForString:(NSString *)string withGeneratingLayoutManager:(NSLayoutManager *)textView glyphs:(CGGlyph *)glyphs; 8 | - (NSUInteger)_glyphsForString:(NSString *)string withGeneratingTextView:(NSTextView *)textView glyphs:(CGGlyph *)glyphs; 9 | - (NSUInteger)_getGlyphs:(CGGlyph *)glyphs forString:(NSString *)string font:(NSFont *)font; //uses CoreText. Here glyphs must have space for [string length] glyphs. 10 | 11 | @end 12 | -------------------------------------------------------------------------------- /bsnes/gb/HexFiend/HFRepresenter_Internal.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @interface HFRepresenter (HFInternalStuff) 4 | 5 | - (void)_setController:(HFController *)controller; 6 | 7 | @end 8 | -------------------------------------------------------------------------------- /bsnes/gb/JoyKit/JOYAxes2D.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | typedef enum { 4 | JOYAxes2DUsageNone, 5 | JOYAxes2DUsageLeftStick, 6 | JOYAxes2DUsageRightStick, 7 | JOYAxes2DUsageMiddleStick, 8 | JOYAxes2DUsagePointer, 9 | JOYAxes2DUsageNonGenericMax, 10 | 11 | JOYAxes2DUsageGeneric0 = 0x10000, 12 | } JOYAxes2DUsage; 13 | 14 | @interface JOYAxes2D : NSObject 15 | - (NSString *)usageString; 16 | + (NSString *)usageToString: (JOYAxes2DUsage) usage; 17 | - (uint64_t)uniqueID; 18 | - (double)distance; 19 | - (double)angle; 20 | - (NSPoint)value; 21 | @property JOYAxes2DUsage usage; 22 | @end 23 | 24 | 25 | -------------------------------------------------------------------------------- /bsnes/gb/JoyKit/JOYEmulatedButton.h: -------------------------------------------------------------------------------- 1 | #import "JOYButton.h" 2 | #import "JOYAxis.h" 3 | #import "JOYAxes2D.h" 4 | #import "JOYHat.h" 5 | 6 | @interface JOYEmulatedButton : JOYButton 7 | - (instancetype)initWithUsage:(JOYButtonUsage)usage uniqueID:(uint64_t)uniqueID; 8 | - (bool)updateStateFromAxis:(JOYAxis *)axis; 9 | - (bool)updateStateFromAxes2D:(JOYAxes2D *)axes; 10 | - (bool)updateStateFromHat:(JOYHat *)hat; 11 | @end 12 | -------------------------------------------------------------------------------- /bsnes/gb/JoyKit/JOYFullReportElement.h: -------------------------------------------------------------------------------- 1 | #import 2 | #include 3 | #include "JOYElement.h" 4 | 5 | @interface JOYFullReportElement : JOYElement 6 | - (instancetype)initWithDevice:(IOHIDDeviceRef) device reportID:(unsigned)reportID; 7 | - (void)updateValue:(NSData *)value; 8 | @end 9 | 10 | 11 | -------------------------------------------------------------------------------- /bsnes/gb/JoyKit/JOYHat.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @interface JOYHat : NSObject 4 | - (uint64_t)uniqueID; 5 | - (double)angle; 6 | - (unsigned)resolution; 7 | @property (readonly, getter=isPressed) bool pressed; 8 | 9 | @end 10 | 11 | 12 | -------------------------------------------------------------------------------- /bsnes/gb/JoyKit/JOYMultiplayerController.h: -------------------------------------------------------------------------------- 1 | #import "JOYController.h" 2 | #include 3 | 4 | @interface JOYMultiplayerController : JOYController 5 | - (instancetype)initWithDevice:(IOHIDDeviceRef) device reportIDFilters:(NSArray *>*) reportIDFilters hacks:hacks; 6 | @end 7 | 8 | 9 | -------------------------------------------------------------------------------- /bsnes/gb/JoyKit/JOYSubElement.h: -------------------------------------------------------------------------------- 1 | #import "JOYElement.h" 2 | 3 | @interface JOYSubElement : JOYElement 4 | - (instancetype)initWithRealElement:(JOYElement *)element 5 | size:(size_t) size // in bits 6 | offset:(size_t) offset // in bits 7 | usagePage:(uint16_t)usagePage 8 | usage:(uint16_t)usage 9 | min:(int32_t)min 10 | max:(int32_t)max; 11 | 12 | @end 13 | 14 | 15 | -------------------------------------------------------------------------------- /bsnes/gb/JoyKit/JoyKit.h: -------------------------------------------------------------------------------- 1 | #ifndef JoyKit_h 2 | #define JoyKit_h 3 | 4 | #include "JOYController.h" 5 | 6 | #endif 7 | -------------------------------------------------------------------------------- /bsnes/gb/OpenDialog/open_dialog.h: -------------------------------------------------------------------------------- 1 | #ifndef open_rom_h 2 | #define open_rom_h 3 | 4 | char *do_open_rom_dialog(void); 5 | char *do_open_folder_dialog(void); 6 | #endif /* open_rom_h */ 7 | -------------------------------------------------------------------------------- /bsnes/gb/QuickLook/CartridgeTemplate.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsnes-emu/bsnes/b815744b4cff6d6854090545b78ae8e1a6669976/bsnes/gb/QuickLook/CartridgeTemplate.png -------------------------------------------------------------------------------- /bsnes/gb/QuickLook/ColorCartridgeTemplate.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsnes-emu/bsnes/b815744b4cff6d6854090545b78ae8e1a6669976/bsnes/gb/QuickLook/ColorCartridgeTemplate.png -------------------------------------------------------------------------------- /bsnes/gb/QuickLook/UniversalCartridgeTemplate.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsnes-emu/bsnes/b815744b4cff6d6854090545b78ae8e1a6669976/bsnes/gb/QuickLook/UniversalCartridgeTemplate.png -------------------------------------------------------------------------------- /bsnes/gb/QuickLook/exports.sym: -------------------------------------------------------------------------------- 1 | _QuickLookGeneratorPluginFactory 2 | -------------------------------------------------------------------------------- /bsnes/gb/QuickLook/get_image_for_rom.h: -------------------------------------------------------------------------------- 1 | #ifndef get_image_for_rom_h 2 | #define get_image_for_rom_h 3 | #include 4 | 5 | typedef bool (*cancel_callback_t)(void*); 6 | 7 | int get_image_for_rom(const char *filename, const char *boot_path, uint32_t *output, uint8_t *cgb_flag); 8 | 9 | 10 | #endif 11 | -------------------------------------------------------------------------------- /bsnes/gb/SDL/audio/audio.h: -------------------------------------------------------------------------------- 1 | #ifndef sdl_audio_h 2 | #define sdl_audio_h 3 | 4 | #include 5 | #include 6 | #include 7 | 8 | bool GB_audio_is_playing(void); 9 | void GB_audio_set_paused(bool paused); 10 | void GB_audio_clear_queue(void); 11 | unsigned GB_audio_get_frequency(void); 12 | size_t GB_audio_get_queue_length(void); 13 | void GB_audio_queue_sample(GB_sample_t *sample); 14 | void GB_audio_init(void); 15 | 16 | #endif /* sdl_audio_h */ 17 | -------------------------------------------------------------------------------- /bsnes/gb/SDL/background.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsnes-emu/bsnes/b815744b4cff6d6854090545b78ae8e1a6669976/bsnes/gb/SDL/background.bmp -------------------------------------------------------------------------------- /bsnes/gb/SDL/utils.h: -------------------------------------------------------------------------------- 1 | #ifndef utils_h 2 | #define utils_h 3 | #include 4 | 5 | char *resource_path(const char *filename); 6 | void replace_extension(const char *src, size_t length, char *dest, const char *ext); 7 | 8 | #endif /* utils_h */ 9 | -------------------------------------------------------------------------------- /bsnes/gb/Shaders/NearestNeighbor.fsh: -------------------------------------------------------------------------------- 1 | STATIC vec4 scale(sampler2D image, vec2 position, vec2 input_resolution, vec2 output_resolution) 2 | { 3 | return texture(image, position); 4 | } 5 | -------------------------------------------------------------------------------- /bsnes/gb/Windows/inttypes.h: -------------------------------------------------------------------------------- 1 | #include 2 | -------------------------------------------------------------------------------- /bsnes/gb/Windows/math.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include_next 3 | #ifndef __MINGW32__ 4 | /* "Old" (Pre-2015) Windows headers/libc don't have round. */ 5 | static inline double round(double f) 6 | { 7 | return f >= 0? (int)(f + 0.5) : (int)(f - 0.5); 8 | } 9 | #endif -------------------------------------------------------------------------------- /bsnes/gb/Windows/resources.rc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsnes-emu/bsnes/b815744b4cff6d6854090545b78ae8e1a6669976/bsnes/gb/Windows/resources.rc -------------------------------------------------------------------------------- /bsnes/gb/Windows/sameboy.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsnes-emu/bsnes/b815744b4cff6d6854090545b78ae8e1a6669976/bsnes/gb/Windows/sameboy.ico -------------------------------------------------------------------------------- /bsnes/gb/Windows/stdint.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include_next 3 | typedef intptr_t ssize_t; -------------------------------------------------------------------------------- /bsnes/gb/Windows/string.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include_next 3 | #define strdup _strdup -------------------------------------------------------------------------------- /bsnes/gb/Windows/unistd.h: -------------------------------------------------------------------------------- 1 | #include 2 | #define STDIN_FILENO 0 3 | #define STDOUT_FILENO 1 4 | #define STDERR_FILENO 2 5 | 6 | #define read(...) _read(__VA_ARGS__) 7 | #define write(...) _write(__VA_ARGS__) 8 | #define isatty(...) _isatty(__VA_ARGS__) 9 | -------------------------------------------------------------------------------- /bsnes/gb/libretro/jni/Application.mk: -------------------------------------------------------------------------------- 1 | APP_ABI := all 2 | -------------------------------------------------------------------------------- /bsnes/gb/libretro/link.T: -------------------------------------------------------------------------------- 1 | { 2 | global: retro_*; 3 | local: *; 4 | }; 5 | 6 | -------------------------------------------------------------------------------- /bsnes/gb/version.mk: -------------------------------------------------------------------------------- 1 | VERSION := 0.14.7 -------------------------------------------------------------------------------- /bsnes/lzma/7zAlloc.h: -------------------------------------------------------------------------------- 1 | /* 7zAlloc.h -- Allocation functions 2 | 2017-04-03 : Igor Pavlov : Public domain */ 3 | 4 | #ifndef __7Z_ALLOC_H 5 | #define __7Z_ALLOC_H 6 | 7 | #include "7zTypes.h" 8 | 9 | EXTERN_C_BEGIN 10 | 11 | void *SzAlloc(ISzAllocPtr p, size_t size); 12 | void SzFree(ISzAllocPtr p, void *address); 13 | 14 | void *SzAllocTemp(ISzAllocPtr p, size_t size); 15 | void SzFreeTemp(ISzAllocPtr p, void *address); 16 | 17 | EXTERN_C_END 18 | 19 | #endif 20 | -------------------------------------------------------------------------------- /bsnes/lzma/Delta.h: -------------------------------------------------------------------------------- 1 | /* Delta.h -- Delta converter 2 | 2013-01-18 : Igor Pavlov : Public domain */ 3 | 4 | #ifndef __DELTA_H 5 | #define __DELTA_H 6 | 7 | #include "7zTypes.h" 8 | 9 | EXTERN_C_BEGIN 10 | 11 | #define DELTA_STATE_SIZE 256 12 | 13 | void Delta_Init(Byte *state); 14 | void Delta_Encode(Byte *state, unsigned delta, Byte *data, SizeT size); 15 | void Delta_Decode(Byte *state, unsigned delta, Byte *data, SizeT size); 16 | 17 | EXTERN_C_END 18 | 19 | #endif 20 | -------------------------------------------------------------------------------- /bsnes/lzma/DllSecur.h: -------------------------------------------------------------------------------- 1 | /* DllSecur.h -- DLL loading for security 2 | 2018-02-19 : Igor Pavlov : Public domain */ 3 | 4 | #ifndef __DLL_SECUR_H 5 | #define __DLL_SECUR_H 6 | 7 | #include "7zTypes.h" 8 | 9 | EXTERN_C_BEGIN 10 | 11 | #ifdef _WIN32 12 | 13 | void My_SetDefaultDllDirectories(); 14 | void LoadSecurityDlls(); 15 | 16 | #endif 17 | 18 | EXTERN_C_END 19 | 20 | #endif 21 | -------------------------------------------------------------------------------- /bsnes/lzma/Precomp.h: -------------------------------------------------------------------------------- 1 | /* Precomp.h -- StdAfx 2 | 2013-11-12 : Igor Pavlov : Public domain */ 3 | 4 | #ifndef __7Z_PRECOMP_H 5 | #define __7Z_PRECOMP_H 6 | 7 | #include "Compiler.h" 8 | /* #include "7zTypes.h" */ 9 | 10 | #endif 11 | -------------------------------------------------------------------------------- /bsnes/lzma/Sha256.h: -------------------------------------------------------------------------------- 1 | /* Sha256.h -- SHA-256 Hash 2 | 2013-01-18 : Igor Pavlov : Public domain */ 3 | 4 | #ifndef __CRYPTO_SHA256_H 5 | #define __CRYPTO_SHA256_H 6 | 7 | #include "7zTypes.h" 8 | 9 | EXTERN_C_BEGIN 10 | 11 | #define SHA256_DIGEST_SIZE 32 12 | 13 | typedef struct 14 | { 15 | UInt32 state[8]; 16 | UInt64 count; 17 | Byte buffer[64]; 18 | } CSha256; 19 | 20 | void Sha256_Init(CSha256 *p); 21 | void Sha256_Update(CSha256 *p, const Byte *data, size_t size); 22 | void Sha256_Final(CSha256 *p, Byte *digest); 23 | 24 | EXTERN_C_END 25 | 26 | #endif 27 | -------------------------------------------------------------------------------- /bsnes/lzma/Sort.h: -------------------------------------------------------------------------------- 1 | /* Sort.h -- Sort functions 2 | 2014-04-05 : Igor Pavlov : Public domain */ 3 | 4 | #ifndef __7Z_SORT_H 5 | #define __7Z_SORT_H 6 | 7 | #include "7zTypes.h" 8 | 9 | EXTERN_C_BEGIN 10 | 11 | void HeapSort(UInt32 *p, size_t size); 12 | void HeapSort64(UInt64 *p, size_t size); 13 | 14 | /* void HeapSortRef(UInt32 *p, UInt32 *vals, size_t size); */ 15 | 16 | EXTERN_C_END 17 | 18 | #endif 19 | -------------------------------------------------------------------------------- /bsnes/lzma/lzma.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | namespace LZMA { 4 | 5 | auto extract(string_view filename) -> vector; 6 | 7 | } 8 | -------------------------------------------------------------------------------- /bsnes/obj/.gitignore: -------------------------------------------------------------------------------- 1 | *.o 2 | *.d 3 | -------------------------------------------------------------------------------- /bsnes/out/.gitignore: -------------------------------------------------------------------------------- 1 | bsnes 2 | bsnes.exe 3 | -------------------------------------------------------------------------------- /bsnes/processor/processor.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | -------------------------------------------------------------------------------- /bsnes/processor/sm83/registers.cpp: -------------------------------------------------------------------------------- 1 | #define AF r.af.word 2 | #define BC r.bc.word 3 | #define DE r.de.word 4 | #define HL r.hl.word 5 | #define SP r.sp.word 6 | #define PC r.pc.word 7 | 8 | #define A r.af.byte.hi 9 | #define F r.af.byte.lo 10 | #define B r.bc.byte.hi 11 | #define C r.bc.byte.lo 12 | #define D r.de.byte.hi 13 | #define E r.de.byte.lo 14 | #define H r.hl.byte.hi 15 | #define L r.hl.byte.lo 16 | 17 | #define CF bit1(r.af.byte.lo,4) 18 | #define HF bit1(r.af.byte.lo,5) 19 | #define NF bit1(r.af.byte.lo,6) 20 | #define ZF bit1(r.af.byte.lo,7) 21 | -------------------------------------------------------------------------------- /bsnes/processor/sm83/serialization.cpp: -------------------------------------------------------------------------------- 1 | auto SM83::serialize(serializer& s) -> void { 2 | s.integer(r.af.word); 3 | s.integer(r.bc.word); 4 | s.integer(r.de.word); 5 | s.integer(r.hl.word); 6 | s.integer(r.sp.word); 7 | s.integer(r.pc.word); 8 | s.integer(r.ei); 9 | s.integer(r.halt); 10 | s.integer(r.stop); 11 | s.integer(r.ime); 12 | } 13 | -------------------------------------------------------------------------------- /bsnes/processor/sm83/sm83.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include "sm83.hpp" 3 | 4 | namespace Processor { 5 | 6 | #include "registers.cpp" 7 | #include "memory.cpp" 8 | #include "algorithms.cpp" 9 | #include "instruction.cpp" 10 | #include "instructions.cpp" 11 | #include "serialization.cpp" 12 | #include "disassembler.cpp" 13 | 14 | auto SM83::power() -> void { 15 | r = {}; 16 | } 17 | 18 | } 19 | -------------------------------------------------------------------------------- /bsnes/processor/spc700/memory.cpp: -------------------------------------------------------------------------------- 1 | auto SPC700::fetch() -> uint8 { 2 | return read(PC++); 3 | } 4 | 5 | auto SPC700::load(uint8 address) -> uint8 { 6 | return read(PF << 8 | address); 7 | } 8 | 9 | auto SPC700::store(uint8 address, uint8 data) -> void { 10 | return write(PF << 8 | address, data); 11 | } 12 | 13 | auto SPC700::pull() -> uint8 { 14 | return read(1 << 8 | ++S); 15 | } 16 | 17 | auto SPC700::push(uint8 data) -> void { 18 | return write(1 << 8 | S--, data); 19 | } 20 | -------------------------------------------------------------------------------- /bsnes/processor/spc700/serialization.cpp: -------------------------------------------------------------------------------- 1 | auto SPC700::serialize(serializer& s) -> void { 2 | s.integer(r.pc.w); 3 | s.integer(r.ya.w); 4 | s.integer(r.x); 5 | s.integer(r.s); 6 | s.integer(r.p.c); 7 | s.integer(r.p.z); 8 | s.integer(r.p.i); 9 | s.integer(r.p.h); 10 | s.integer(r.p.b); 11 | s.integer(r.p.p); 12 | s.integer(r.p.v); 13 | s.integer(r.p.n); 14 | 15 | s.integer(r.wait); 16 | s.integer(r.stop); 17 | } 18 | -------------------------------------------------------------------------------- /bsnes/sfc/cartridge/serialization.cpp: -------------------------------------------------------------------------------- 1 | auto Cartridge::serialize(serializer& s) -> void { 2 | s.array(ram.data(), ram.size()); 3 | } 4 | -------------------------------------------------------------------------------- /bsnes/sfc/controller/gamepad/gamepad.hpp: -------------------------------------------------------------------------------- 1 | struct Gamepad : Controller { 2 | enum : uint { 3 | Up, Down, Left, Right, B, A, Y, X, L, R, Select, Start, 4 | }; 5 | 6 | Gamepad(uint port); 7 | 8 | auto data() -> uint2; 9 | auto latch(bool data) -> void; 10 | 11 | private: 12 | bool latched; 13 | uint counter; 14 | 15 | boolean b, y, select, start; 16 | boolean up, down, left, right; 17 | boolean a, x, l, r; 18 | }; 19 | -------------------------------------------------------------------------------- /bsnes/sfc/controller/mouse/mouse.hpp: -------------------------------------------------------------------------------- 1 | struct Mouse : Controller { 2 | enum : uint { 3 | X, Y, Left, Right, 4 | }; 5 | 6 | Mouse(uint port); 7 | 8 | auto data() -> uint2; 9 | auto latch(bool data) -> void; 10 | 11 | private: 12 | bool latched; 13 | uint counter; 14 | 15 | uint speed; //0 = slow, 1 = normal, 2 = fast 16 | int x; //x-coordinate 17 | int y; //y-coordinate 18 | bool dx; //x-direction 19 | bool dy; //y-direction 20 | bool l; //left button 21 | bool r; //right button 22 | }; 23 | -------------------------------------------------------------------------------- /bsnes/sfc/controller/super-multitap/super-multitap.hpp: -------------------------------------------------------------------------------- 1 | struct SuperMultitap : Controller { 2 | enum : uint { 3 | Up, Down, Left, Right, B, A, Y, X, L, R, Select, Start, 4 | }; 5 | 6 | SuperMultitap(uint port); 7 | 8 | auto data() -> uint2; 9 | auto latch(bool data) -> void; 10 | 11 | private: 12 | bool latched; 13 | uint counter1; 14 | uint counter2; 15 | 16 | struct Gamepad { 17 | boolean b, y, select, start; 18 | boolean up, down, left, right; 19 | boolean a, x, l, r; 20 | } gamepads[4]; 21 | }; 22 | -------------------------------------------------------------------------------- /bsnes/sfc/coprocessor/armdsp/registers.hpp: -------------------------------------------------------------------------------- 1 | struct Bridge { 2 | struct Buffer { 3 | bool ready; 4 | uint8 data; 5 | }; 6 | Buffer cputoarm; 7 | Buffer armtocpu; 8 | uint32 timer; 9 | uint32 timerlatch; 10 | bool reset; 11 | bool ready; 12 | bool signal; 13 | 14 | auto status() const -> uint8 { 15 | return ( 16 | armtocpu.ready << 0 17 | | signal << 2 18 | | cputoarm.ready << 3 19 | | ready << 7 20 | ); 21 | } 22 | } bridge; 23 | -------------------------------------------------------------------------------- /bsnes/sfc/coprocessor/dip/dip.cpp: -------------------------------------------------------------------------------- 1 | //DIP switch 2 | //used for Nintendo Super System emulation 3 | 4 | #include 5 | 6 | namespace SuperFamicom { 7 | 8 | #include "serialization.cpp" 9 | DIP dip; 10 | 11 | auto DIP::power() -> void { 12 | } 13 | 14 | auto DIP::read(uint, uint8) -> uint8 { 15 | return value; 16 | } 17 | 18 | auto DIP::write(uint, uint8) -> void { 19 | } 20 | 21 | } 22 | -------------------------------------------------------------------------------- /bsnes/sfc/coprocessor/dip/dip.hpp: -------------------------------------------------------------------------------- 1 | struct DIP { 2 | //dip.cpp 3 | auto power() -> void; 4 | 5 | auto read(uint addr, uint8 data) -> uint8; 6 | auto write(uint addr, uint8 data) -> void; 7 | 8 | //serialization.cpp 9 | auto serialize(serializer&) -> void; 10 | 11 | uint8 value = 0x00; 12 | }; 13 | 14 | extern DIP dip; 15 | -------------------------------------------------------------------------------- /bsnes/sfc/coprocessor/dip/serialization.cpp: -------------------------------------------------------------------------------- 1 | auto DIP::serialize(serializer& s) -> void { 2 | s.integer(value); 3 | } 4 | -------------------------------------------------------------------------------- /bsnes/sfc/coprocessor/dsp1/dsp1.hpp: -------------------------------------------------------------------------------- 1 | struct DSP1 { 2 | auto power() -> void; 3 | 4 | auto read(uint addr, uint8 data) -> uint8; 5 | auto write(uint addr, uint8 data) -> void; 6 | 7 | auto serialize(serializer&) -> void; 8 | }; 9 | 10 | extern DSP1 dsp1; 11 | -------------------------------------------------------------------------------- /bsnes/sfc/coprocessor/dsp4/dsp4.hpp: -------------------------------------------------------------------------------- 1 | struct DSP4 { 2 | auto power() -> void; 3 | 4 | auto read(uint addr, uint8 data) -> uint8; 5 | auto write(uint addr, uint8 data) -> void; 6 | 7 | auto serialize(serializer&) -> void; 8 | }; 9 | 10 | extern DSP4 dsp4; 11 | -------------------------------------------------------------------------------- /bsnes/sfc/coprocessor/event/serialization.cpp: -------------------------------------------------------------------------------- 1 | auto Event::serialize(serializer& s) -> void { 2 | Thread::serialize(s); 3 | s.integer(status); 4 | s.integer(select); 5 | s.integer(timerActive); 6 | s.integer(scoreActive); 7 | s.integer(timerSecondsRemaining); 8 | s.integer(scoreSecondsRemaining); 9 | } 10 | -------------------------------------------------------------------------------- /bsnes/sfc/coprocessor/hitachidsp/serialization.cpp: -------------------------------------------------------------------------------- 1 | auto HitachiDSP::firmware() const -> vector { 2 | vector buffer; 3 | if(!cartridge.has.HitachiDSP) return buffer; 4 | buffer.reserve(1024 * 3); 5 | for(auto n : range(1024)) { 6 | buffer.append(dataROM[n] >> 0); 7 | buffer.append(dataROM[n] >> 8); 8 | buffer.append(dataROM[n] >> 16); 9 | } 10 | return buffer; 11 | } 12 | 13 | auto HitachiDSP::serialize(serializer& s) -> void { 14 | HG51B::serialize(s); 15 | Thread::serialize(s); 16 | } 17 | -------------------------------------------------------------------------------- /bsnes/sfc/coprocessor/necdsp/necdsp.hpp: -------------------------------------------------------------------------------- 1 | struct NECDSP : Processor::uPD96050, Thread { 2 | auto synchronizeCPU() -> void; 3 | static auto Enter() -> void; 4 | auto main() -> void; 5 | auto step(uint clocks) -> void; 6 | 7 | auto read(uint addr, uint8 data) -> uint8; 8 | auto write(uint addr, uint8 data) -> void; 9 | 10 | auto readRAM(uint addr, uint8 data) -> uint8; 11 | auto writeRAM(uint addr, uint8 data) -> void; 12 | 13 | auto power() -> void; 14 | 15 | auto firmware() const -> vector; 16 | auto serialize(serializer&) -> void; 17 | 18 | uint Frequency = 0; 19 | }; 20 | 21 | extern NECDSP necdsp; 22 | -------------------------------------------------------------------------------- /bsnes/sfc/coprocessor/obc1/obc1.hpp: -------------------------------------------------------------------------------- 1 | struct OBC1 { 2 | auto unload() -> void; 3 | auto power() -> void; 4 | 5 | auto read(uint addr, uint8 data) -> uint8; 6 | auto write(uint addr, uint8 data) -> void; 7 | 8 | auto serialize(serializer&) -> void; 9 | 10 | WritableMemory ram; 11 | 12 | private: 13 | auto ramRead(uint addr) -> uint8; 14 | auto ramWrite(uint addr, uint8 data) -> void; 15 | 16 | struct { 17 | uint16 address; 18 | uint16 baseptr; 19 | uint16 shift; 20 | } status; 21 | }; 22 | 23 | extern OBC1 obc1; 24 | -------------------------------------------------------------------------------- /bsnes/sfc/coprocessor/obc1/serialization.cpp: -------------------------------------------------------------------------------- 1 | auto OBC1::serialize(serializer& s) -> void { 2 | s.array(ram.data(), ram.size()); 3 | 4 | s.integer(status.address); 5 | s.integer(status.baseptr); 6 | s.integer(status.shift); 7 | } 8 | -------------------------------------------------------------------------------- /bsnes/sfc/coprocessor/sharprtc/serialization.cpp: -------------------------------------------------------------------------------- 1 | auto SharpRTC::serialize(serializer& s) -> void { 2 | Thread::serialize(s); 3 | 4 | s.integer((uint&)state); 5 | s.integer(index); 6 | 7 | s.integer(second); 8 | s.integer(minute); 9 | s.integer(hour); 10 | s.integer(day); 11 | s.integer(month); 12 | s.integer(year); 13 | s.integer(weekday); 14 | } 15 | -------------------------------------------------------------------------------- /bsnes/sfc/coprocessor/st0010/serialization.cpp: -------------------------------------------------------------------------------- 1 | auto ST0010::serialize(serializer& s) -> void { 2 | s.array(ram); 3 | } 4 | -------------------------------------------------------------------------------- /bsnes/sfc/coprocessor/superfx/serialization.cpp: -------------------------------------------------------------------------------- 1 | auto SuperFX::serialize(serializer& s) -> void { 2 | GSU::serialize(s); 3 | Thread::serialize(s); 4 | 5 | s.array(ram.data(), ram.size()); 6 | } 7 | -------------------------------------------------------------------------------- /bsnes/sfc/expansion/expansion.hpp: -------------------------------------------------------------------------------- 1 | struct Expansion : Thread { 2 | Expansion(); 3 | virtual ~Expansion(); 4 | }; 5 | 6 | struct ExpansionPort { 7 | auto connect(uint deviceID) -> void; 8 | 9 | auto power() -> void; 10 | auto unload() -> void; 11 | auto serialize(serializer&) -> void; 12 | 13 | Expansion* device = nullptr; 14 | }; 15 | 16 | extern ExpansionPort expansionPort; 17 | 18 | #include 19 | //#include 20 | -------------------------------------------------------------------------------- /bsnes/sfc/expansion/satellaview/satellaview.hpp: -------------------------------------------------------------------------------- 1 | struct Satellaview : Expansion { 2 | Satellaview(); 3 | ~Satellaview(); 4 | 5 | auto read(uint addr, uint8 data) -> uint8; 6 | auto write(uint addr, uint8 data) -> void; 7 | 8 | private: 9 | struct { 10 | uint8 r2188, r2189, r218a, r218b; 11 | uint8 r218c, r218d, r218e, r218f; 12 | uint8 r2190, r2191, r2192, r2193; 13 | uint8 r2194, r2195, r2196, r2197; 14 | uint8 r2198, r2199, r219a, r219b; 15 | uint8 r219c, r219d, r219e, r219f; 16 | 17 | uint8 rtcCounter; 18 | uint8 rtcHour; 19 | uint8 rtcMinute; 20 | uint8 rtcSecond; 21 | } regs; 22 | }; 23 | -------------------------------------------------------------------------------- /bsnes/sfc/ppu/counter/serialization.cpp: -------------------------------------------------------------------------------- 1 | auto PPUcounter::serialize(serializer& s) -> void { 2 | s.integer(time.interlace); 3 | s.integer(time.field); 4 | s.integer(time.vperiod); 5 | s.integer(time.hperiod); 6 | s.integer(time.vcounter); 7 | s.integer(time.hcounter); 8 | 9 | s.integer(last.vperiod); 10 | s.integer(last.hperiod); 11 | } 12 | -------------------------------------------------------------------------------- /bsnes/sfc/ppu/mosaic.hpp: -------------------------------------------------------------------------------- 1 | struct Mosaic { 2 | //mosaic.cpp 3 | alwaysinline auto enable() const -> bool; 4 | alwaysinline auto voffset() const -> uint; 5 | auto scanline() -> void; 6 | auto power() -> void; 7 | 8 | //serialization.cpp 9 | auto serialize(serializer&) -> void; 10 | 11 | uint5 size; 12 | uint5 vcounter; 13 | }; 14 | -------------------------------------------------------------------------------- /bsnes/sfc/slot/slot.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | -------------------------------------------------------------------------------- /bsnes/sfc/slot/slot.hpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | -------------------------------------------------------------------------------- /bsnes/sfc/slot/sufamiturbo/serialization.cpp: -------------------------------------------------------------------------------- 1 | auto SufamiTurboCartridge::serialize(serializer& s) -> void { 2 | s.array(ram.data(), ram.size()); 3 | } 4 | -------------------------------------------------------------------------------- /bsnes/sfc/slot/sufamiturbo/sufamiturbo.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | namespace SuperFamicom { 4 | 5 | #include "serialization.cpp" 6 | SufamiTurboCartridge sufamiturboA; 7 | SufamiTurboCartridge sufamiturboB; 8 | 9 | auto SufamiTurboCartridge::unload() -> void { 10 | rom.reset(); 11 | ram.reset(); 12 | } 13 | 14 | auto SufamiTurboCartridge::power() -> void { 15 | } 16 | 17 | } 18 | -------------------------------------------------------------------------------- /bsnes/sfc/slot/sufamiturbo/sufamiturbo.hpp: -------------------------------------------------------------------------------- 1 | struct SufamiTurboCartridge { 2 | auto unload() -> void; 3 | auto power() -> void; 4 | auto serialize(serializer&) -> void; 5 | 6 | uint pathID = 0; 7 | ReadableMemory rom; 8 | WritableMemory ram; 9 | }; 10 | 11 | extern SufamiTurboCartridge sufamiturboA; 12 | extern SufamiTurboCartridge sufamiturboB; 13 | -------------------------------------------------------------------------------- /bsnes/target-bsnes/resource/GNUmakefile: -------------------------------------------------------------------------------- 1 | all: 2 | sourcery resource.bml resource.cpp resource.hpp 3 | 4 | clean: 5 | rm resource.cpp 6 | rm resource.hpp 7 | -------------------------------------------------------------------------------- /bsnes/target-bsnes/resource/bsnes.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Name=bsnes 3 | Comment=SNES Emulator 4 | Exec=bsnes 5 | Icon=bsnes 6 | Terminal=false 7 | Type=Application 8 | Categories=Game;Emulator; 9 | -------------------------------------------------------------------------------- /bsnes/target-bsnes/resource/bsnes.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsnes-emu/bsnes/b815744b4cff6d6854090545b78ae8e1a6669976/bsnes/target-bsnes/resource/bsnes.ico -------------------------------------------------------------------------------- /bsnes/target-bsnes/resource/bsnes.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsnes-emu/bsnes/b815744b4cff6d6854090545b78ae8e1a6669976/bsnes/target-bsnes/resource/bsnes.png -------------------------------------------------------------------------------- /bsnes/target-bsnes/resource/bsnes.rc: -------------------------------------------------------------------------------- 1 | 1 24 "bsnes.Manifest" 2 | 2 ICON DISCARDABLE "bsnes.ico" 3 | -------------------------------------------------------------------------------- /bsnes/target-bsnes/resource/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsnes-emu/bsnes/b815744b4cff6d6854090545b78ae8e1a6669976/bsnes/target-bsnes/resource/icon.png -------------------------------------------------------------------------------- /bsnes/target-bsnes/resource/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsnes-emu/bsnes/b815744b4cff6d6854090545b78ae8e1a6669976/bsnes/target-bsnes/resource/logo.png -------------------------------------------------------------------------------- /bsnes/target-bsnes/resource/resource.bml: -------------------------------------------------------------------------------- 1 | namespace name=Resource 2 | binary name=Icon file=icon.png 3 | binary name=Logo file=logo.png 4 | binary name=SameBoy file=sameboy.png 5 | namespace name=System 6 | binary name=Boards file="system/boards.bml" 7 | binary name=IPLROM file="system/ipl.rom" 8 | -------------------------------------------------------------------------------- /bsnes/target-bsnes/resource/resource.hpp: -------------------------------------------------------------------------------- 1 | namespace Resource { 2 | extern const unsigned char Icon[3463]; 3 | extern const unsigned char Logo[23467]; 4 | extern const unsigned char SameBoy[32358]; 5 | namespace System { 6 | extern const unsigned char Boards[32230]; 7 | extern const unsigned char IPLROM[64]; 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /bsnes/target-bsnes/resource/sameboy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsnes-emu/bsnes/b815744b4cff6d6854090545b78ae8e1a6669976/bsnes/target-bsnes/resource/sameboy.png -------------------------------------------------------------------------------- /bsnes/target-bsnes/resource/system/ipl.rom: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsnes-emu/bsnes/b815744b4cff6d6854090545b78ae8e1a6669976/bsnes/target-bsnes/resource/system/ipl.rom -------------------------------------------------------------------------------- /bsnes/target-libretro/jni/Application.mk: -------------------------------------------------------------------------------- 1 | APP_ABI := all 2 | APP_STL := c++_static 3 | -------------------------------------------------------------------------------- /bsnes/target-libretro/link.T: -------------------------------------------------------------------------------- 1 | { 2 | global: retro_*; 3 | local: *; 4 | }; 5 | -------------------------------------------------------------------------------- /docs/README.md: -------------------------------------------------------------------------------- 1 | # bsnes User Documentation 2 | 3 | bsnes is a multi-platform Super Nintendo (Super Famicom) emulator, originally 4 | developed by [byuu](https://byuu.org/about), which focuses on performance, 5 | features, and ease of use. 6 | -------------------------------------------------------------------------------- /hiro/cocoa/action/action.cpp: -------------------------------------------------------------------------------- 1 | #if defined(Hiro_Action) 2 | 3 | namespace hiro { 4 | 5 | auto pAction::construct() -> void { 6 | } 7 | 8 | auto pAction::destruct() -> void { 9 | } 10 | 11 | auto pAction::setEnabled(bool enabled) -> void { 12 | @autoreleasepool { 13 | [cocoaAction setEnabled:enabled]; 14 | } 15 | } 16 | 17 | auto pAction::setVisible(bool visible) -> void { 18 | @autoreleasepool { 19 | [cocoaAction setHidden:!visible]; 20 | } 21 | } 22 | 23 | } 24 | 25 | #endif 26 | -------------------------------------------------------------------------------- /hiro/cocoa/action/action.hpp: -------------------------------------------------------------------------------- 1 | #if defined(Hiro_Action) 2 | 3 | namespace hiro { 4 | 5 | struct pAction : pObject { 6 | Declare(Action, Object) 7 | 8 | auto setEnabled(bool enabled) -> void override; 9 | auto setVisible(bool visible) -> void override; 10 | 11 | NSMenuItem* cocoaAction = nullptr; 12 | }; 13 | 14 | } 15 | 16 | #endif 17 | -------------------------------------------------------------------------------- /hiro/cocoa/action/menu-check-item.hpp: -------------------------------------------------------------------------------- 1 | #if defined(Hiro_MenuCheckItem) 2 | 3 | @interface CocoaMenuCheckItem : NSMenuItem { 4 | @public 5 | hiro::mMenuCheckItem* menuCheckItem; 6 | } 7 | -(id) initWith:(hiro::mMenuCheckItem&)checkItem; 8 | -(void) activate; 9 | @end 10 | 11 | namespace hiro { 12 | 13 | struct pMenuCheckItem : pAction { 14 | Declare(MenuCheckItem, Action) 15 | 16 | auto setChecked(bool checked) -> void; 17 | auto setText(const string& text) -> void; 18 | 19 | CocoaMenuCheckItem* cocoaMenuCheckItem = nullptr; 20 | }; 21 | 22 | } 23 | 24 | #endif 25 | -------------------------------------------------------------------------------- /hiro/cocoa/action/menu-item.hpp: -------------------------------------------------------------------------------- 1 | #if defined(Hiro_MenuItem) 2 | 3 | @interface CocoaMenuItem : NSMenuItem { 4 | @public 5 | hiro::mMenuItem* menuItem; 6 | } 7 | -(id) initWith:(hiro::mMenuItem&)menuItem; 8 | -(void) activate; 9 | @end 10 | 11 | namespace hiro { 12 | 13 | struct pMenuItem : pAction { 14 | Declare(MenuItem, Action) 15 | 16 | auto setIcon(const image& icon) -> void; 17 | auto setText(const string& text) -> void; 18 | 19 | CocoaMenuItem* cocoaMenuItem = nullptr; 20 | }; 21 | 22 | } 23 | 24 | #endif 25 | -------------------------------------------------------------------------------- /hiro/cocoa/action/menu-radio-item.hpp: -------------------------------------------------------------------------------- 1 | #if defined(Hiro_MenuRadioItem) 2 | 3 | @interface CocoaMenuRadioItem : NSMenuItem { 4 | @public 5 | hiro::mMenuRadioItem* menuRadioItem; 6 | } 7 | -(id) initWith:(hiro::mMenuRadioItem&)menuRadioItem; 8 | -(void) activate; 9 | @end 10 | 11 | namespace hiro { 12 | 13 | struct pMenuRadioItem : pAction { 14 | Declare(MenuRadioItem, Action) 15 | 16 | auto setChecked() -> void; 17 | auto setGroup(sGroup group) -> void; 18 | auto setText(const string& text) -> void; 19 | 20 | CocoaMenuRadioItem* cocoaMenuRadioItem = nullptr; 21 | }; 22 | 23 | } 24 | 25 | #endif 26 | -------------------------------------------------------------------------------- /hiro/cocoa/action/menu-separator.cpp: -------------------------------------------------------------------------------- 1 | #if defined(Hiro_MenuSeparator) 2 | 3 | namespace hiro { 4 | 5 | auto pMenuSeparator::construct() -> void { 6 | @autoreleasepool { 7 | cocoaAction = cocoaSeparator = [[NSMenuItem separatorItem] retain]; 8 | pAction::construct(); 9 | } 10 | } 11 | 12 | auto pMenuSeparator::destruct() -> void { 13 | @autoreleasepool { 14 | [cocoaAction release]; 15 | } 16 | } 17 | 18 | } 19 | 20 | #endif 21 | -------------------------------------------------------------------------------- /hiro/cocoa/action/menu-separator.hpp: -------------------------------------------------------------------------------- 1 | #if defined(Hiro_MenuSeparator) 2 | 3 | namespace hiro { 4 | 5 | struct pMenuSeparator : pAction { 6 | Declare(MenuSeparator, Action) 7 | 8 | NSMenuItem* cocoaSeparator = nullptr; 9 | }; 10 | 11 | } 12 | 13 | #endif 14 | -------------------------------------------------------------------------------- /hiro/cocoa/action/menu.hpp: -------------------------------------------------------------------------------- 1 | #if defined(Hiro_Menu) 2 | 3 | @interface CocoaMenu : NSMenuItem { 4 | @public 5 | hiro::mMenu* menu; 6 | NSMenu* cocoaMenu; 7 | } 8 | -(id) initWith:(hiro::mMenu&)menu; 9 | -(NSMenu*) cocoaMenu; 10 | @end 11 | 12 | namespace hiro { 13 | 14 | struct pMenu : pAction { 15 | Declare(Menu, Action) 16 | 17 | auto append(sAction action) -> void; 18 | auto remove(sAction action) -> void; 19 | auto setIcon(const image& icon) -> void; 20 | auto setText(const string& text) -> void; 21 | 22 | CocoaMenu* cocoaMenu = nullptr; 23 | }; 24 | 25 | } 26 | 27 | #endif 28 | -------------------------------------------------------------------------------- /hiro/cocoa/browser-window.hpp: -------------------------------------------------------------------------------- 1 | #if defined(Hiro_BrowserWindow) 2 | 3 | namespace hiro { 4 | 5 | struct pBrowserWindow { 6 | static auto directory(BrowserWindow::State& state) -> string; 7 | static auto open(BrowserWindow::State& state) -> string; 8 | static auto save(BrowserWindow::State& state) -> string; 9 | }; 10 | 11 | } 12 | 13 | #endif 14 | -------------------------------------------------------------------------------- /hiro/cocoa/desktop.hpp: -------------------------------------------------------------------------------- 1 | #if defined(Hiro_Desktop) 2 | 3 | namespace hiro { 4 | 5 | struct pDesktop { 6 | static auto size() -> Size; 7 | static auto workspace() -> Geometry; 8 | }; 9 | 10 | } 11 | 12 | #endif 13 | -------------------------------------------------------------------------------- /hiro/cocoa/font.hpp: -------------------------------------------------------------------------------- 1 | #if defined(Hiro_Font) 2 | 3 | namespace hiro { 4 | 5 | struct pFont { 6 | static auto size(const Font& font, const string& text) -> Size; 7 | static auto size(NSFont* font, const string& text) -> Size; 8 | static auto family(const string& family) -> string; 9 | static auto create(const Font& font) -> NSFont*; 10 | }; 11 | 12 | } 13 | 14 | #endif 15 | -------------------------------------------------------------------------------- /hiro/cocoa/group.cpp: -------------------------------------------------------------------------------- 1 | #if defined(Hiro_Group) 2 | 3 | namespace hiro { 4 | 5 | auto pGroup::construct() -> void { 6 | } 7 | 8 | auto pGroup::destruct() -> void { 9 | } 10 | 11 | } 12 | 13 | #endif 14 | -------------------------------------------------------------------------------- /hiro/cocoa/group.hpp: -------------------------------------------------------------------------------- 1 | #if defined(Hiro_Group) 2 | 3 | namespace hiro { 4 | 5 | struct pGroup : pObject { 6 | Declare(Group, Object); 7 | }; 8 | 9 | } 10 | 11 | #endif 12 | -------------------------------------------------------------------------------- /hiro/cocoa/header.hpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | 6 | #include 7 | -------------------------------------------------------------------------------- /hiro/cocoa/keyboard.cpp: -------------------------------------------------------------------------------- 1 | #if defined(Hiro_Keyboard) 2 | 3 | namespace hiro { 4 | 5 | auto pKeyboard::poll() -> vector { 6 | vector result; 7 | return result; 8 | } 9 | 10 | auto pKeyboard::pressed(uint code) -> bool { 11 | return false; 12 | } 13 | 14 | } 15 | 16 | #endif 17 | -------------------------------------------------------------------------------- /hiro/cocoa/keyboard.hpp: -------------------------------------------------------------------------------- 1 | #if defined(Hiro_Keyboard) 2 | 3 | namespace hiro { 4 | 5 | struct pKeyboard { 6 | static auto poll() -> vector; 7 | static auto pressed(uint code) -> bool; 8 | }; 9 | 10 | } 11 | 12 | #endif 13 | -------------------------------------------------------------------------------- /hiro/cocoa/menu-bar.hpp: -------------------------------------------------------------------------------- 1 | #if defined(Hiro_MenuBar) 2 | 3 | namespace hiro { 4 | 5 | struct pMenuBar : pObject { 6 | Declare(MenuBar, Object) 7 | 8 | auto append(sMenu menu) -> void; 9 | auto remove(sMenu menu) -> void; 10 | 11 | auto _parent() -> maybe; 12 | }; 13 | 14 | } 15 | 16 | #endif 17 | -------------------------------------------------------------------------------- /hiro/cocoa/message-window.hpp: -------------------------------------------------------------------------------- 1 | #if defined(Hiro_MessageWindow) 2 | 3 | namespace hiro { 4 | 5 | struct pMessageWindow { 6 | static auto error(MessageWindow::State& state) -> MessageWindow::Response; 7 | static auto information(MessageWindow::State& state) -> MessageWindow::Response; 8 | static auto question(MessageWindow::State& state) -> MessageWindow::Response; 9 | static auto warning(MessageWindow::State& state) -> MessageWindow::Response; 10 | }; 11 | 12 | } 13 | 14 | #endif 15 | -------------------------------------------------------------------------------- /hiro/cocoa/monitor.hpp: -------------------------------------------------------------------------------- 1 | #if defined(Hiro_Monitor) 2 | 3 | namespace hiro { 4 | 5 | struct pMonitor { 6 | static auto count() -> uint; 7 | static auto dpi(uint monitor) -> Position; 8 | static auto geometry(uint monitor) -> Geometry; 9 | static auto primary() -> uint; 10 | static auto workspace(uint monitor) -> Geometry; 11 | }; 12 | 13 | } 14 | 15 | #endif 16 | -------------------------------------------------------------------------------- /hiro/cocoa/mouse.cpp: -------------------------------------------------------------------------------- 1 | #if defined(Hiro_Mouse) 2 | 3 | namespace hiro { 4 | 5 | auto pMouse::position() -> Position { 6 | return {0, 0}; 7 | } 8 | 9 | auto pMouse::pressed(Mouse::Button button) -> bool { 10 | return false; 11 | } 12 | 13 | } 14 | 15 | #endif 16 | -------------------------------------------------------------------------------- /hiro/cocoa/mouse.hpp: -------------------------------------------------------------------------------- 1 | #if defined(Hiro_Mouse) 2 | 3 | namespace hiro { 4 | 5 | struct pMouse { 6 | static auto position() -> Position; 7 | static auto pressed(Mouse::Button button) -> bool; 8 | }; 9 | 10 | } 11 | 12 | #endif 13 | -------------------------------------------------------------------------------- /hiro/cocoa/object.cpp: -------------------------------------------------------------------------------- 1 | #if defined(Hiro_Object) 2 | 3 | namespace hiro { 4 | 5 | auto pObject::construct() -> void { 6 | } 7 | 8 | auto pObject::destruct() -> void { 9 | } 10 | 11 | auto pObject::focused() const -> bool { 12 | return false; 13 | } 14 | 15 | auto pObject::remove() -> void { 16 | } 17 | 18 | auto pObject::reset() -> void { 19 | } 20 | 21 | auto pObject::setEnabled(bool enabled) -> void { 22 | } 23 | 24 | auto pObject::setFocused() -> void { 25 | } 26 | 27 | auto pObject::setFont(const Font& font) -> void { 28 | } 29 | 30 | auto pObject::setVisible(bool visible) -> void { 31 | } 32 | 33 | } 34 | 35 | #endif 36 | -------------------------------------------------------------------------------- /hiro/cocoa/popup-menu.cpp: -------------------------------------------------------------------------------- 1 | #if defined(Hiro_PopupMenu) 2 | 3 | namespace hiro { 4 | 5 | auto pPopupMenu::construct() -> void { 6 | } 7 | 8 | auto pPopupMenu::destruct() -> void { 9 | } 10 | 11 | auto pPopupMenu::append(sAction action) -> void { 12 | } 13 | 14 | auto pPopupMenu::remove(sAction action) -> void { 15 | } 16 | 17 | auto pPopupMenu::setVisible(bool visible) -> void { 18 | } 19 | 20 | } 21 | 22 | #endif 23 | -------------------------------------------------------------------------------- /hiro/cocoa/popup-menu.hpp: -------------------------------------------------------------------------------- 1 | #if defined(Hiro_PopupMenu) 2 | 3 | namespace hiro { 4 | 5 | struct pPopupMenu : pObject { 6 | Declare(PopupMenu, Object) 7 | 8 | auto append(sAction action) -> void; 9 | auto remove(sAction action) -> void; 10 | auto setVisible(bool visible) -> void; 11 | }; 12 | 13 | } 14 | 15 | #endif 16 | -------------------------------------------------------------------------------- /hiro/cocoa/sizable.cpp: -------------------------------------------------------------------------------- 1 | #if defined(Hiro_Sizable) 2 | 3 | namespace hiro { 4 | 5 | auto pSizable::construct() -> void { 6 | } 7 | 8 | auto pSizable::destruct() -> void { 9 | } 10 | 11 | auto pSizable::minimumSize() const -> Size { 12 | return {0, 0}; 13 | } 14 | 15 | auto pSizable::setCollapsible(bool collapsible) -> void { 16 | } 17 | 18 | auto pSizable::setGeometry(Geometry geometry) -> void { 19 | self().doSize(); 20 | } 21 | 22 | } 23 | 24 | #endif 25 | -------------------------------------------------------------------------------- /hiro/cocoa/sizable.hpp: -------------------------------------------------------------------------------- 1 | #if defined(Hiro_Sizable) 2 | 3 | namespace hiro { 4 | 5 | struct pSizable : pObject { 6 | Declare(Sizable, Object) 7 | 8 | virtual auto minimumSize() const -> Size; 9 | virtual auto setCollapsible(bool collapsible) -> void; 10 | virtual auto setGeometry(Geometry geometry) -> void; 11 | }; 12 | 13 | } 14 | 15 | #endif 16 | -------------------------------------------------------------------------------- /hiro/cocoa/status-bar.hpp: -------------------------------------------------------------------------------- 1 | #if defined(Hiro_StatusBar) 2 | 3 | namespace hiro { 4 | 5 | struct pStatusBar : pObject { 6 | Declare(StatusBar, Object) 7 | 8 | auto setEnabled(bool enabled) -> void override; 9 | auto setFont(const Font& font) -> void override; 10 | auto setText(const string& text) -> void; 11 | auto setVisible(bool visible) -> void override; 12 | 13 | auto _parent() -> maybe; 14 | }; 15 | 16 | } 17 | 18 | #endif 19 | -------------------------------------------------------------------------------- /hiro/cocoa/timer.hpp: -------------------------------------------------------------------------------- 1 | #if defined(Hiro_Timer) 2 | 3 | @interface CocoaTimer : NSObject { 4 | @public 5 | hiro::mTimer* timer; 6 | NSTimer* instance; 7 | } 8 | -(id) initWith:(hiro::mTimer&)timer; 9 | -(NSTimer*) instance; 10 | -(void) update; 11 | -(void) run:(NSTimer*)instance; 12 | @end 13 | 14 | namespace hiro { 15 | 16 | struct pTimer : pObject { 17 | Declare(Timer, Object) 18 | 19 | auto setEnabled(bool enabled) -> void; 20 | auto setInterval(uint interval) -> void; 21 | 22 | CocoaTimer* cocoaTimer = nullptr; 23 | }; 24 | 25 | } 26 | 27 | #endif 28 | -------------------------------------------------------------------------------- /hiro/cocoa/widget/combo-button-item.hpp: -------------------------------------------------------------------------------- 1 | #if defined(Hiro_ComboButton) 2 | 3 | namespace hiro { 4 | 5 | struct pComboButtonItem : pObject { 6 | Declare(ComboButtonItem, Object) 7 | 8 | auto setIcon(const image& icon) -> void; 9 | auto setSelected() -> void; 10 | auto setText(const string& text) -> void; 11 | 12 | auto _parent() -> maybe; 13 | }; 14 | 15 | } 16 | 17 | #endif 18 | -------------------------------------------------------------------------------- /hiro/cocoa/widget/progress-bar.hpp: -------------------------------------------------------------------------------- 1 | #if defined(Hiro_ProgressBar) 2 | 3 | @interface CocoaProgressBar : NSProgressIndicator { 4 | @public 5 | hiro::mProgressBar* progressBar; 6 | } 7 | -(id) initWith:(hiro::mProgressBar&)progressBar; 8 | @end 9 | 10 | namespace hiro { 11 | 12 | struct pProgressBar : pWidget { 13 | Declare(ProgressBar, Widget) 14 | 15 | auto minimumSize() const -> Size override; 16 | auto setPosition(uint position) -> void; 17 | 18 | CocoaProgressBar* cocoaProgressBar = nullptr; 19 | }; 20 | 21 | } 22 | 23 | #endif 24 | -------------------------------------------------------------------------------- /hiro/cocoa/widget/tab-frame-item.hpp: -------------------------------------------------------------------------------- 1 | #if defined(Hiro_TabFrame) 2 | 3 | namespace hiro { 4 | 5 | struct pTabFrameItem : pObject { 6 | Declare(TabFrameItem, Object) 7 | 8 | auto append(sSizable sizable) -> void; 9 | auto remove(sSizable sizable) -> void; 10 | auto setClosable(bool closable) -> void; 11 | auto setIcon(const image& icon) -> void; 12 | auto setMovable(bool movable) -> void; 13 | auto setSelected() -> void; 14 | auto setText(const string& text) -> void; 15 | 16 | CocoaTabFrameItem* cocoaTabFrameItem = nullptr; 17 | 18 | auto _parent() -> maybe; 19 | }; 20 | 21 | } 22 | 23 | #endif 24 | -------------------------------------------------------------------------------- /hiro/cocoa/widget/table-view-item.hpp: -------------------------------------------------------------------------------- 1 | #if defined(Hiro_TableView) 2 | 3 | namespace hiro { 4 | 5 | struct pTableViewItem : pObject { 6 | Declare(TableViewItem, Object) 7 | 8 | auto append(sTableViewCell cell) -> void; 9 | auto remove(sTableViewCell cell) -> void; 10 | auto setAlignment(Alignment alignment) -> void; 11 | auto setBackgroundColor(Color color) -> void; 12 | auto setFocused() -> void; 13 | auto setForegroundColor(Color color) -> void; 14 | auto setSelected(bool selected) -> void; 15 | 16 | auto _parent() -> maybe; 17 | }; 18 | 19 | } 20 | 21 | #endif 22 | -------------------------------------------------------------------------------- /hiro/core/action/action.cpp: -------------------------------------------------------------------------------- 1 | #if defined(Hiro_Action) 2 | 3 | auto mAction::allocate() -> pObject* { 4 | return new pAction(*this); 5 | } 6 | 7 | // 8 | 9 | auto mAction::remove() -> type& { 10 | if(auto menu = parentMenu()) menu->remove(*this); 11 | if(auto menuBar = parentMenuBar()) menuBar->remove((mMenu&)*this); 12 | #if defined(Hiro_PopupMenu) 13 | if(auto popupMenu = parentPopupMenu()) popupMenu->remove(*this); 14 | #endif 15 | return *this; 16 | } 17 | 18 | #endif 19 | -------------------------------------------------------------------------------- /hiro/core/action/menu-separator.cpp: -------------------------------------------------------------------------------- 1 | #if defined(Hiro_MenuSeparator) 2 | 3 | auto mMenuSeparator::allocate() -> pObject* { 4 | return new pMenuSeparator(*this); 5 | } 6 | 7 | #endif 8 | -------------------------------------------------------------------------------- /hiro/core/attribute.hpp: -------------------------------------------------------------------------------- 1 | #if defined(Hiro_Attribute) 2 | struct Attribute { 3 | using type = Attribute; 4 | 5 | Attribute(const string& name, const any& value = {}); 6 | 7 | auto operator==(const Attribute& source) const -> bool; 8 | auto operator< (const Attribute& source) const -> bool; 9 | 10 | auto name() const -> string; 11 | auto setValue(const any& value = {}) -> type&; 12 | auto value() const -> any&; 13 | 14 | private: 15 | struct State { 16 | string name; 17 | mutable any value; 18 | } state; 19 | }; 20 | #endif 21 | -------------------------------------------------------------------------------- /hiro/core/desktop.cpp: -------------------------------------------------------------------------------- 1 | #if defined(Hiro_Desktop) 2 | 3 | auto Desktop::size() -> Size { 4 | return pDesktop::size(); 5 | } 6 | 7 | auto Desktop::workspace() -> Geometry { 8 | return pDesktop::workspace(); 9 | } 10 | 11 | #endif 12 | -------------------------------------------------------------------------------- /hiro/core/desktop.hpp: -------------------------------------------------------------------------------- 1 | #if defined(Hiro_Desktop) 2 | struct Desktop { 3 | Desktop() = delete; 4 | 5 | static auto size() -> Size; 6 | static auto workspace() -> Geometry; 7 | }; 8 | #endif 9 | -------------------------------------------------------------------------------- /hiro/core/group.hpp: -------------------------------------------------------------------------------- 1 | #if defined(Hiro_Group) 2 | struct mGroup : mObject { 3 | Declare(Group) 4 | using mObject::remove; 5 | 6 | auto append(sObject object) -> type&; 7 | auto object(uint offset) const -> Object; 8 | auto objectCount() const -> uint; 9 | auto objects() const -> vector; 10 | auto remove(sObject object) -> type&; 11 | 12 | //private: 13 | struct State { 14 | vector objects; 15 | } state; 16 | }; 17 | #endif 18 | -------------------------------------------------------------------------------- /hiro/core/monitor.cpp: -------------------------------------------------------------------------------- 1 | #if defined(Hiro_Monitor) 2 | 3 | auto Monitor::count() -> uint { 4 | return pMonitor::count(); 5 | } 6 | 7 | auto Monitor::dpi(maybe monitor) -> Position { 8 | return pMonitor::dpi(monitor ? monitor() : primary()); 9 | } 10 | 11 | auto Monitor::geometry(maybe monitor) -> Geometry { 12 | return pMonitor::geometry(monitor ? monitor() : primary()); 13 | } 14 | 15 | auto Monitor::primary() -> uint { 16 | return pMonitor::primary(); 17 | } 18 | 19 | auto Monitor::workspace(maybe monitor) -> Geometry { 20 | return pMonitor::workspace(monitor ? monitor() : primary()); 21 | } 22 | 23 | #endif 24 | -------------------------------------------------------------------------------- /hiro/core/mouse.cpp: -------------------------------------------------------------------------------- 1 | #if defined(Hiro_Mouse) 2 | 3 | auto Mouse::position() -> Position { 4 | return pMouse::position(); 5 | } 6 | 7 | auto Mouse::pressed(Mouse::Button button) -> bool { 8 | return pMouse::pressed(button); 9 | } 10 | 11 | auto Mouse::released(Mouse::Button button) -> bool { 12 | return !pressed(button); 13 | } 14 | 15 | #endif 16 | -------------------------------------------------------------------------------- /hiro/core/status-bar.cpp: -------------------------------------------------------------------------------- 1 | #if defined(Hiro_StatusBar) 2 | 3 | auto mStatusBar::allocate() -> pObject* { 4 | return new pStatusBar(*this); 5 | } 6 | 7 | // 8 | 9 | auto mStatusBar::remove() -> type& { 10 | if(auto window = parentWindow()) window->remove(window->statusBar()); 11 | return *this; 12 | } 13 | 14 | auto mStatusBar::setText(const string& text) -> type& { 15 | state.text = text; 16 | signal(setText, text); 17 | return *this; 18 | } 19 | 20 | auto mStatusBar::text() const -> string { 21 | return state.text; 22 | } 23 | 24 | #endif 25 | -------------------------------------------------------------------------------- /hiro/core/timer.hpp: -------------------------------------------------------------------------------- 1 | #if defined(Hiro_Timer) 2 | struct mTimer : mObject { 3 | Declare(Timer) 4 | 5 | mTimer(); 6 | 7 | auto doActivate() const -> void; 8 | auto interval() const -> uint; 9 | auto onActivate(const function& callback = {}) -> type&; 10 | auto setInterval(uint interval = 0) -> type&; 11 | 12 | //private: 13 | struct State { 14 | uint interval = 0; 15 | function onActivate; 16 | } state; 17 | }; 18 | #endif 19 | -------------------------------------------------------------------------------- /hiro/core/widget/progress-bar.cpp: -------------------------------------------------------------------------------- 1 | #if defined(Hiro_ProgressBar) 2 | 3 | auto mProgressBar::allocate() -> pObject* { 4 | return new pProgressBar(*this); 5 | } 6 | 7 | // 8 | 9 | auto mProgressBar::position() const -> unsigned { 10 | return state.position; 11 | } 12 | 13 | auto mProgressBar::setPosition(unsigned position) -> type& { 14 | state.position = position; 15 | signal(setPosition, position); 16 | return *this; 17 | } 18 | 19 | #endif 20 | -------------------------------------------------------------------------------- /hiro/core/widget/viewport.cpp: -------------------------------------------------------------------------------- 1 | #if defined(Hiro_Viewport) 2 | 3 | auto mViewport::allocate() -> pObject* { 4 | return new pViewport(*this); 5 | } 6 | 7 | // 8 | 9 | auto mViewport::handle() const -> uintptr_t { 10 | return signal(handle); 11 | } 12 | 13 | #endif 14 | -------------------------------------------------------------------------------- /hiro/core/widget/viewport.hpp: -------------------------------------------------------------------------------- 1 | #if defined(Hiro_Viewport) 2 | struct mViewport : mWidget { 3 | Declare(Viewport) 4 | 5 | auto handle() const -> uintptr_t; 6 | 7 | //private: 8 | struct State { 9 | } state; 10 | }; 11 | #endif 12 | -------------------------------------------------------------------------------- /hiro/extension/extension.cpp: -------------------------------------------------------------------------------- 1 | #include "extension.hpp" 2 | using namespace nall; 3 | 4 | namespace hiro { 5 | #include "../resource/resource.cpp" 6 | #include "fixed-layout.cpp" 7 | #include "horizontal-layout.cpp" 8 | #include "vertical-layout.cpp" 9 | #include "table-layout.cpp" 10 | #include "horizontal-resize-grip.cpp" 11 | #include "vertical-resize-grip.cpp" 12 | #include "list-view.cpp" 13 | #include "message-dialog.cpp" 14 | #include "name-dialog.cpp" 15 | #include "browser-dialog.cpp" 16 | #include "about-dialog.cpp" 17 | } 18 | -------------------------------------------------------------------------------- /hiro/extension/extension.hpp: -------------------------------------------------------------------------------- 1 | namespace hiro { 2 | #include "../resource/resource.hpp" 3 | #include "fixed-layout.hpp" 4 | #include "horizontal-layout.hpp" 5 | #include "vertical-layout.hpp" 6 | #include "table-layout.hpp" 7 | #include "horizontal-resize-grip.hpp" 8 | #include "vertical-resize-grip.hpp" 9 | #include "list-view.hpp" 10 | #include "shared.hpp" 11 | #include "message-dialog.hpp" 12 | #include "name-dialog.hpp" 13 | #include "browser-dialog.hpp" 14 | #include "about-dialog.hpp" 15 | } 16 | -------------------------------------------------------------------------------- /hiro/gtk/action/action.hpp: -------------------------------------------------------------------------------- 1 | #if defined(Hiro_Action) 2 | 3 | namespace hiro { 4 | 5 | struct pAction : pObject { 6 | Declare(Action, Object) 7 | 8 | auto setEnabled(bool enabled) -> void override; 9 | auto setFont(const Font& font) -> void override; 10 | auto setVisible(bool visible) -> void override; 11 | 12 | auto _mnemonic(string text) -> string; 13 | 14 | GtkWidget* widget = nullptr; 15 | }; 16 | 17 | } 18 | 19 | #endif 20 | -------------------------------------------------------------------------------- /hiro/gtk/action/menu-check-item.hpp: -------------------------------------------------------------------------------- 1 | #if defined(Hiro_MenuCheckItem) 2 | 3 | namespace hiro { 4 | 5 | struct pMenuCheckItem : pAction { 6 | Declare(MenuCheckItem, Action) 7 | auto orphan() -> void; 8 | 9 | auto setChecked(bool checked) -> void; 10 | auto setText(const string& text) -> void; 11 | }; 12 | 13 | } 14 | 15 | #endif 16 | -------------------------------------------------------------------------------- /hiro/gtk/action/menu-item.hpp: -------------------------------------------------------------------------------- 1 | #if defined(Hiro_MenuItem) 2 | 3 | namespace hiro { 4 | 5 | struct pMenuItem : pAction { 6 | Declare(MenuItem, Action) 7 | 8 | auto setIcon(const image& icon) -> void; 9 | auto setText(const string& text) -> void; 10 | }; 11 | 12 | } 13 | 14 | #endif 15 | -------------------------------------------------------------------------------- /hiro/gtk/action/menu-radio-item.hpp: -------------------------------------------------------------------------------- 1 | #if defined(Hiro_MenuRadioItem) 2 | 3 | namespace hiro { 4 | 5 | struct pMenuRadioItem : pAction { 6 | Declare(MenuRadioItem, Action) 7 | 8 | auto setChecked() -> void; 9 | auto setGroup(sGroup group) -> void; 10 | auto setText(const string& text) -> void; 11 | 12 | auto groupLocked() const -> bool; 13 | 14 | auto _doActivate() -> void; 15 | 16 | GtkCheckMenuItem* gtkCheckMenuItem = nullptr; 17 | GtkRadioMenuItem* gtkRadioMenuItem = nullptr; 18 | }; 19 | 20 | } 21 | 22 | #endif 23 | -------------------------------------------------------------------------------- /hiro/gtk/action/menu-separator.cpp: -------------------------------------------------------------------------------- 1 | #if defined(Hiro_MenuSeparator) 2 | 3 | namespace hiro { 4 | 5 | auto pMenuSeparator::construct() -> void { 6 | widget = gtk_separator_menu_item_new(); 7 | } 8 | 9 | auto pMenuSeparator::destruct() -> void { 10 | if(widget) gtk_widget_destroy(widget), widget = nullptr; 11 | } 12 | 13 | } 14 | 15 | #endif 16 | -------------------------------------------------------------------------------- /hiro/gtk/action/menu-separator.hpp: -------------------------------------------------------------------------------- 1 | #if defined(Hiro_MenuSeparator) 2 | 3 | namespace hiro { 4 | 5 | struct pMenuSeparator : pAction { 6 | Declare(MenuSeparator, Action) 7 | }; 8 | 9 | } 10 | 11 | #endif 12 | -------------------------------------------------------------------------------- /hiro/gtk/action/menu.hpp: -------------------------------------------------------------------------------- 1 | #if defined(Hiro_Menu) 2 | 3 | namespace hiro { 4 | 5 | struct pMenu : pAction { 6 | Declare(Menu, Action) 7 | 8 | auto append(sAction action) -> void; 9 | auto remove(sAction action) -> void; 10 | auto setFont(const Font& font) -> void override; 11 | auto setIcon(const image& icon) -> void; 12 | auto setText(const string& text) -> void; 13 | 14 | GtkWidget* gtkMenu = nullptr; 15 | }; 16 | 17 | } 18 | 19 | #endif 20 | -------------------------------------------------------------------------------- /hiro/gtk/browser-window.hpp: -------------------------------------------------------------------------------- 1 | #if defined(Hiro_BrowserWindow) 2 | 3 | namespace hiro { 4 | 5 | struct pBrowserWindow { 6 | static auto directory(BrowserWindow::State& state) -> string; 7 | static auto open(BrowserWindow::State& state) -> string; 8 | static auto save(BrowserWindow::State& state) -> string; 9 | }; 10 | 11 | } 12 | 13 | #endif 14 | -------------------------------------------------------------------------------- /hiro/gtk/desktop.hpp: -------------------------------------------------------------------------------- 1 | #if defined(Hiro_Desktop) 2 | 3 | namespace hiro { 4 | 5 | struct pDesktop { 6 | static auto size() -> Size; 7 | static auto workspace() -> Geometry; 8 | }; 9 | 10 | } 11 | 12 | #endif 13 | -------------------------------------------------------------------------------- /hiro/gtk/font.hpp: -------------------------------------------------------------------------------- 1 | #if defined(Hiro_Font) 2 | 3 | namespace hiro { 4 | 5 | struct pFont { 6 | static auto size(const Font& font, const string& text) -> Size; 7 | static auto size(PangoFontDescription* font, const string& text) -> Size; 8 | static auto family(const string& family) -> string; 9 | static auto create(const Font& font) -> PangoFontDescription*; 10 | static auto free(PangoFontDescription* font) -> void; 11 | static auto setFont(GtkWidget* widget, const Font& font) -> void; 12 | static auto setFont(GtkWidget* widget, gpointer font) -> void; 13 | }; 14 | 15 | } 16 | 17 | #endif 18 | -------------------------------------------------------------------------------- /hiro/gtk/group.cpp: -------------------------------------------------------------------------------- 1 | #if defined(Hiro_Group) 2 | 3 | namespace hiro { 4 | 5 | auto pGroup::construct() -> void { 6 | } 7 | 8 | auto pGroup::destruct() -> void { 9 | } 10 | 11 | } 12 | 13 | #endif 14 | -------------------------------------------------------------------------------- /hiro/gtk/group.hpp: -------------------------------------------------------------------------------- 1 | #if defined(Hiro_Group) 2 | 3 | namespace hiro { 4 | 5 | struct pGroup : pObject { 6 | Declare(Group, Object) 7 | }; 8 | 9 | } 10 | 11 | #endif 12 | -------------------------------------------------------------------------------- /hiro/gtk/keyboard.hpp: -------------------------------------------------------------------------------- 1 | #if defined(Hiro_Keyboard) 2 | 3 | namespace hiro { 4 | 5 | struct pKeyboard { 6 | static auto poll() -> vector; 7 | static auto pressed(unsigned code) -> bool; 8 | 9 | static auto _pressed(const char* state, uint16_t code) -> bool; 10 | static auto _translate(unsigned code) -> signed; 11 | 12 | static auto initialize() -> void; 13 | }; 14 | 15 | } 16 | 17 | #endif 18 | -------------------------------------------------------------------------------- /hiro/gtk/menu-bar.hpp: -------------------------------------------------------------------------------- 1 | #if defined(Hiro_MenuBar) 2 | 3 | namespace hiro { 4 | 5 | struct pMenuBar : pObject { 6 | Declare(MenuBar, Object) 7 | 8 | auto append(sMenu menu) -> void; 9 | auto remove(sMenu menu) -> void; 10 | auto setEnabled(bool enabled) -> void override; 11 | auto setFont(const Font& font) -> void override; 12 | auto setVisible(bool visible) -> void override; 13 | 14 | auto _parent() -> pWindow*; 15 | }; 16 | 17 | } 18 | 19 | #endif 20 | -------------------------------------------------------------------------------- /hiro/gtk/message-window.hpp: -------------------------------------------------------------------------------- 1 | #if defined(Hiro_MessageWindow) 2 | 3 | namespace hiro { 4 | 5 | struct pMessageWindow { 6 | static auto error(MessageWindow::State& state) -> MessageWindow::Response; 7 | static auto information(MessageWindow::State& state) -> MessageWindow::Response; 8 | static auto question(MessageWindow::State& state) -> MessageWindow::Response; 9 | static auto warning(MessageWindow::State& state) -> MessageWindow::Response; 10 | }; 11 | 12 | } 13 | 14 | #endif 15 | -------------------------------------------------------------------------------- /hiro/gtk/monitor.hpp: -------------------------------------------------------------------------------- 1 | #if defined(Hiro_Monitor) 2 | 3 | namespace hiro { 4 | 5 | struct pMonitor { 6 | static auto count() -> uint; 7 | static auto dpi(uint monitor) -> Position; 8 | static auto geometry(uint monitor) -> Geometry; 9 | static auto primary() -> uint; 10 | static auto workspace(uint monitor) -> Geometry; 11 | }; 12 | 13 | } 14 | 15 | #endif 16 | -------------------------------------------------------------------------------- /hiro/gtk/mouse.hpp: -------------------------------------------------------------------------------- 1 | #if defined(Hiro_Mouse) 2 | 3 | namespace hiro { 4 | 5 | struct pMouse { 6 | static auto position() -> Position; 7 | static auto pressed(Mouse::Button button) -> bool; 8 | }; 9 | 10 | } 11 | 12 | #endif 13 | -------------------------------------------------------------------------------- /hiro/gtk/object.cpp: -------------------------------------------------------------------------------- 1 | #if defined(Hiro_Object) 2 | 3 | namespace hiro { 4 | 5 | auto pObject::construct() -> void { 6 | } 7 | 8 | auto pObject::destruct() -> void { 9 | } 10 | 11 | auto pObject::focused() const -> bool { 12 | return false; 13 | } 14 | 15 | auto pObject::remove() -> void { 16 | } 17 | 18 | auto pObject::reset() -> void { 19 | } 20 | 21 | auto pObject::setEnabled(bool enabled) -> void { 22 | } 23 | 24 | auto pObject::setFocused() -> void { 25 | } 26 | 27 | auto pObject::setFont(const Font& font) -> void { 28 | } 29 | 30 | auto pObject::setVisible(bool visible) -> void { 31 | } 32 | 33 | } 34 | 35 | #endif 36 | -------------------------------------------------------------------------------- /hiro/gtk/popup-menu.hpp: -------------------------------------------------------------------------------- 1 | #if defined(Hiro_PopupMenu) 2 | 3 | namespace hiro { 4 | 5 | struct pPopupMenu : pObject { 6 | Declare(PopupMenu, Object) 7 | 8 | auto append(sAction action) -> void; 9 | auto remove(sAction action) -> void; 10 | auto setFont(const Font& font) -> void override; 11 | auto setVisible(bool visible) -> void; 12 | 13 | GtkWidget* gtkMenu = nullptr; 14 | }; 15 | 16 | } 17 | 18 | #endif 19 | -------------------------------------------------------------------------------- /hiro/gtk/settings.hpp: -------------------------------------------------------------------------------- 1 | namespace hiro { 2 | 3 | struct Settings { 4 | Settings(); 5 | ~Settings(); 6 | 7 | vector keycodes; 8 | 9 | struct Geometry { 10 | int frameX = 4; 11 | int frameY = 24; 12 | int frameWidth = 8; 13 | int frameHeight = 28; 14 | int menuHeight = 8; 15 | int statusHeight = 4; 16 | } geometry; 17 | 18 | struct Theme { 19 | bool actionIcons = true; 20 | bool widgetColors = true; 21 | } theme; 22 | }; 23 | 24 | static Settings settings; 25 | 26 | } 27 | -------------------------------------------------------------------------------- /hiro/gtk/sizable.cpp: -------------------------------------------------------------------------------- 1 | #if defined(Hiro_Sizable) 2 | 3 | namespace hiro { 4 | 5 | auto pSizable::construct() -> void { 6 | } 7 | 8 | auto pSizable::destruct() -> void { 9 | } 10 | 11 | auto pSizable::minimumSize() const -> Size { 12 | return {0, 0}; 13 | } 14 | 15 | auto pSizable::setCollapsible(bool collapsible) -> void { 16 | } 17 | 18 | auto pSizable::setGeometry(Geometry geometry) -> void { 19 | self().doSize(); 20 | } 21 | 22 | } 23 | 24 | #endif 25 | -------------------------------------------------------------------------------- /hiro/gtk/sizable.hpp: -------------------------------------------------------------------------------- 1 | #if defined(Hiro_Sizable) 2 | 3 | namespace hiro { 4 | 5 | struct pSizable : pObject { 6 | Declare(Sizable, Object) 7 | 8 | virtual auto minimumSize() const -> Size; 9 | virtual auto setCollapsible(bool collapsible) -> void; 10 | virtual auto setGeometry(Geometry geometry) -> void; 11 | }; 12 | 13 | } 14 | 15 | #endif 16 | -------------------------------------------------------------------------------- /hiro/gtk/status-bar.hpp: -------------------------------------------------------------------------------- 1 | #if defined(Hiro_StatusBar) 2 | 3 | namespace hiro { 4 | 5 | struct pStatusBar : pObject { 6 | Declare(StatusBar, Object) 7 | 8 | auto setEnabled(bool enabled) -> void override; 9 | auto setFont(const Font& font) -> void override; 10 | auto setText(const string& text) -> void; 11 | auto setVisible(bool visible) -> void override; 12 | 13 | auto _parent() -> pWindow*; 14 | }; 15 | 16 | } 17 | 18 | #endif 19 | -------------------------------------------------------------------------------- /hiro/gtk/timer.hpp: -------------------------------------------------------------------------------- 1 | #if defined(Hiro_Timer) 2 | 3 | namespace hiro { 4 | 5 | struct pTimer : pObject { 6 | Declare(Timer, Object) 7 | 8 | auto setEnabled(bool enabled) -> void override; 9 | auto setInterval(uint interval) -> void; 10 | }; 11 | 12 | } 13 | 14 | #endif 15 | -------------------------------------------------------------------------------- /hiro/gtk/widget/button.hpp: -------------------------------------------------------------------------------- 1 | #if defined(Hiro_Button) 2 | 3 | namespace hiro { 4 | 5 | struct pButton : pWidget { 6 | Declare(Button, Widget) 7 | 8 | auto minimumSize() const -> Size override; 9 | auto setBordered(bool bordered) -> void; 10 | auto setIcon(const image& icon) -> void; 11 | auto setOrientation(Orientation orientation) -> void; 12 | auto setText(const string& text) -> void; 13 | 14 | auto _doActivate() -> void; 15 | 16 | GtkButton* gtkButton = nullptr; 17 | }; 18 | 19 | } 20 | 21 | #endif 22 | -------------------------------------------------------------------------------- /hiro/gtk/widget/check-button.hpp: -------------------------------------------------------------------------------- 1 | #if defined(Hiro_CheckButton) 2 | 3 | namespace hiro { 4 | 5 | struct pCheckButton : pWidget { 6 | Declare(CheckButton, Widget) 7 | 8 | auto minimumSize() const -> Size override; 9 | auto setBordered(bool bordered) -> void; 10 | auto setChecked(bool checked) -> void; 11 | auto setIcon(const image& icon) -> void; 12 | auto setOrientation(Orientation orientation) -> void; 13 | auto setText(const string& text) -> void; 14 | }; 15 | 16 | } 17 | 18 | #endif 19 | -------------------------------------------------------------------------------- /hiro/gtk/widget/check-label.hpp: -------------------------------------------------------------------------------- 1 | #if defined(Hiro_CheckLabel) 2 | 3 | namespace hiro { 4 | 5 | struct pCheckLabel : pWidget { 6 | Declare(CheckLabel, Widget) 7 | 8 | auto minimumSize() const -> Size; 9 | auto setChecked(bool checked) -> void; 10 | auto setText(const string& text) -> void; 11 | }; 12 | 13 | } 14 | 15 | #endif 16 | -------------------------------------------------------------------------------- /hiro/gtk/widget/combo-button-item.hpp: -------------------------------------------------------------------------------- 1 | #if defined(Hiro_ComboButton) 2 | 3 | namespace hiro { 4 | 5 | struct pComboButtonItem : pObject { 6 | Declare(ComboButtonItem, Object) 7 | 8 | auto setIcon(const image& icon) -> void; 9 | auto setSelected() -> void; 10 | auto setText(const string& text) -> void; 11 | 12 | auto _parent() -> maybe; 13 | 14 | GtkTreeIter gtkIter; 15 | }; 16 | 17 | } 18 | 19 | #endif 20 | -------------------------------------------------------------------------------- /hiro/gtk/widget/combo-edit-item.hpp: -------------------------------------------------------------------------------- 1 | #if defined(Hiro_ComboEdit) 2 | 3 | namespace hiro { 4 | 5 | struct pComboEditItem : pObject { 6 | Declare(ComboEditItem, Object) 7 | 8 | auto setIcon(const image& icon) -> void; 9 | auto setText(const string& text) -> void; 10 | 11 | auto _parent() -> maybe; 12 | 13 | GtkTreeIter gtkIter; 14 | }; 15 | 16 | } 17 | 18 | #endif 19 | -------------------------------------------------------------------------------- /hiro/gtk/widget/horizontal-scroll-bar.hpp: -------------------------------------------------------------------------------- 1 | #if defined(Hiro_HorizontalScrollBar) 2 | 3 | namespace hiro { 4 | 5 | struct pHorizontalScrollBar : pWidget { 6 | Declare(HorizontalScrollBar, Widget) 7 | 8 | auto minimumSize() const -> Size; 9 | auto setLength(unsigned length) -> void; 10 | auto setPosition(unsigned position) -> void; 11 | }; 12 | 13 | } 14 | 15 | #endif 16 | -------------------------------------------------------------------------------- /hiro/gtk/widget/horizontal-slider.hpp: -------------------------------------------------------------------------------- 1 | #if defined(Hiro_HorizontalSlider) 2 | 3 | namespace hiro { 4 | 5 | struct pHorizontalSlider : pWidget { 6 | Declare(HorizontalSlider, Widget) 7 | 8 | auto minimumSize() const -> Size override; 9 | auto setLength(unsigned length) -> void; 10 | auto setPosition(unsigned position) -> void; 11 | }; 12 | 13 | } 14 | 15 | #endif 16 | -------------------------------------------------------------------------------- /hiro/gtk/widget/icon-view-item.hpp: -------------------------------------------------------------------------------- 1 | #if defined(Hiro_IconView) 2 | 3 | namespace hiro { 4 | 5 | struct pIconViewItem : pObject { 6 | Declare(IconViewItem, Object) 7 | 8 | auto setIcon(const image& icon) -> void; 9 | auto setSelected(bool selected) -> void; 10 | auto setText(const string& text) -> void; 11 | 12 | auto _parent() -> pIconView*; 13 | }; 14 | 15 | } 16 | 17 | #endif 18 | -------------------------------------------------------------------------------- /hiro/gtk/widget/label.hpp: -------------------------------------------------------------------------------- 1 | #if defined(Hiro_Label) 2 | 3 | namespace hiro { 4 | 5 | struct pLabel : pWidget { 6 | Declare(Label, Widget) 7 | 8 | auto minimumSize() const -> Size override; 9 | auto setAlignment(Alignment alignment) -> void; 10 | auto setBackgroundColor(Color color) -> void; 11 | auto setForegroundColor(Color color) -> void; 12 | auto setText(const string& text) -> void; 13 | auto setVisible(bool visible) -> void override; 14 | 15 | GtkWidget* subWidget = nullptr; 16 | }; 17 | 18 | } 19 | 20 | #endif 21 | -------------------------------------------------------------------------------- /hiro/gtk/widget/line-edit.hpp: -------------------------------------------------------------------------------- 1 | #if defined(Hiro_LineEdit) 2 | 3 | namespace hiro { 4 | 5 | struct pLineEdit : pWidget { 6 | Declare(LineEdit, Widget) 7 | 8 | auto minimumSize() const -> Size; 9 | auto setBackgroundColor(Color color) -> void; 10 | auto setEditable(bool editable) -> void; 11 | auto setForegroundColor(Color color) -> void; 12 | auto setText(const string& text) -> void; 13 | }; 14 | 15 | } 16 | 17 | #endif 18 | -------------------------------------------------------------------------------- /hiro/gtk/widget/progress-bar.hpp: -------------------------------------------------------------------------------- 1 | #if defined(Hiro_ProgressBar) 2 | 3 | namespace hiro { 4 | 5 | struct pProgressBar : pWidget { 6 | Declare(ProgressBar, Widget) 7 | 8 | auto minimumSize() const -> Size; 9 | auto setPosition(unsigned position) -> void; 10 | }; 11 | 12 | } 13 | 14 | #endif 15 | -------------------------------------------------------------------------------- /hiro/gtk/widget/radio-button.hpp: -------------------------------------------------------------------------------- 1 | #if defined(Hiro_RadioButton) 2 | 3 | namespace hiro { 4 | 5 | struct pRadioButton : pWidget { 6 | Declare(RadioButton, Widget) 7 | 8 | auto minimumSize() const -> Size; 9 | auto setBordered(bool bordered) -> void; 10 | auto setChecked() -> void; 11 | auto setGroup(sGroup group) -> void; 12 | auto setIcon(const image& icon) -> void; 13 | auto setOrientation(Orientation orientation) -> void; 14 | auto setText(const string& text) -> void; 15 | 16 | auto groupLocked() const -> bool; 17 | }; 18 | 19 | } 20 | 21 | #endif 22 | -------------------------------------------------------------------------------- /hiro/gtk/widget/radio-label.hpp: -------------------------------------------------------------------------------- 1 | #if defined(Hiro_RadioLabel) 2 | 3 | namespace hiro { 4 | 5 | struct pRadioLabel : pWidget { 6 | Declare(RadioLabel, Widget) 7 | 8 | auto minimumSize() const -> Size; 9 | auto setChecked() -> void; 10 | auto setGroup(sGroup group) -> void; 11 | auto setText(const string& text) -> void; 12 | 13 | auto groupLocked() const -> bool; 14 | 15 | GtkToggleButton* gtkToggleButton = nullptr; 16 | GtkRadioButton* gtkRadioButton = nullptr; 17 | }; 18 | 19 | } 20 | 21 | #endif 22 | -------------------------------------------------------------------------------- /hiro/gtk/widget/tab-frame-item.hpp: -------------------------------------------------------------------------------- 1 | #if defined(Hiro_TabFrame) 2 | 3 | namespace hiro { 4 | 5 | struct pTabFrameItem : pObject { 6 | Declare(TabFrameItem, Object) 7 | 8 | auto append(sSizable sizable) -> void; 9 | auto remove(sSizable sizable) -> void; 10 | auto setClosable(bool closable) -> void; 11 | auto setIcon(const image& icon) -> void; 12 | auto setMovable(bool movable) -> void; 13 | auto setSelected() -> void; 14 | auto setText(const string& text) -> void; 15 | 16 | auto _parent() -> maybe; 17 | }; 18 | 19 | } 20 | 21 | #endif 22 | -------------------------------------------------------------------------------- /hiro/gtk/widget/vertical-scroll-bar.hpp: -------------------------------------------------------------------------------- 1 | #if defined(Hiro_VerticalScrollBar) 2 | 3 | namespace hiro { 4 | 5 | struct pVerticalScrollBar : pWidget { 6 | Declare(VerticalScrollBar, Widget) 7 | 8 | auto minimumSize() const -> Size; 9 | auto setLength(unsigned length) -> void; 10 | auto setPosition(unsigned position) -> void; 11 | }; 12 | 13 | } 14 | 15 | #endif 16 | -------------------------------------------------------------------------------- /hiro/gtk/widget/vertical-slider.hpp: -------------------------------------------------------------------------------- 1 | #if defined(Hiro_VerticalSlider) 2 | 3 | namespace hiro { 4 | 5 | struct pVerticalSlider : pWidget { 6 | Declare(VerticalSlider, Widget) 7 | 8 | auto minimumSize() const -> Size override; 9 | auto setLength(unsigned length) -> void; 10 | auto setPosition(unsigned position) -> void; 11 | }; 12 | 13 | } 14 | 15 | #endif 16 | -------------------------------------------------------------------------------- /hiro/gtk/widget/viewport.hpp: -------------------------------------------------------------------------------- 1 | #if defined(Hiro_Viewport) 2 | 3 | namespace hiro { 4 | 5 | struct pViewport : pWidget { 6 | Declare(Viewport, Widget) 7 | 8 | auto handle() const -> uintptr; 9 | auto setFocusable(bool focusable) -> void override; 10 | 11 | auto _onDraw(cairo_t* context) -> void; 12 | auto _onExpose(GdkEventExpose* expose) -> void; 13 | }; 14 | 15 | } 16 | 17 | #endif 18 | -------------------------------------------------------------------------------- /hiro/hiro.cpp: -------------------------------------------------------------------------------- 1 | #ifndef HIRO_CPP 2 | #define HIRO_CPP 3 | 4 | #include "components.hpp" 5 | #include "core/core.cpp" 6 | #include "extension/extension.cpp" 7 | 8 | #endif 9 | -------------------------------------------------------------------------------- /hiro/hiro.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | /* hiro 4 | * author: byuu 5 | * license: ISC 6 | * 7 | * hiro is a cross-platform GUI toolkit 8 | * it provides a consistent, minimal API wrapper to: Windows, Cocoa, GTK+ and Qt 9 | * it also provides a reference wrapper for terminal applications with optional UIs 10 | */ 11 | 12 | #include "components.hpp" 13 | #include "core/core.hpp" 14 | #include "extension/extension.hpp" 15 | 16 | #undef DeclareShared 17 | #undef DeclareSharedObject 18 | #undef DeclareSharedAction 19 | #undef DeclareSharedSizable 20 | #undef DeclareSharedLayout 21 | #undef DeclareSharedWidget 22 | -------------------------------------------------------------------------------- /hiro/qt/action/action.hpp: -------------------------------------------------------------------------------- 1 | #if defined(Hiro_Action) 2 | 3 | namespace hiro { 4 | 5 | struct pAction : pObject { 6 | Declare(Action, Object) 7 | 8 | auto setEnabled(bool enabled) -> void override; 9 | auto setFont(const Font& font) -> void override; 10 | auto setVisible(bool visible) -> void override; 11 | 12 | auto _parentMenu() -> maybe; 13 | auto _parentMenuBar() -> maybe; 14 | auto _parentPopupMenu() -> maybe; 15 | virtual auto _setState() -> void; 16 | }; 17 | 18 | } 19 | 20 | #endif 21 | -------------------------------------------------------------------------------- /hiro/qt/action/menu-check-item.hpp: -------------------------------------------------------------------------------- 1 | #if defined(Hiro_MenuCheckItem) 2 | 3 | namespace hiro { 4 | 5 | struct pMenuCheckItem : pAction { 6 | Declare(MenuCheckItem, Action) 7 | 8 | auto setChecked(bool checked) -> void; 9 | auto setText(const string& text) -> void; 10 | 11 | auto _setState() -> void override; 12 | 13 | QtMenuCheckItem* qtMenuCheckItem = nullptr; 14 | }; 15 | 16 | } 17 | 18 | #endif 19 | -------------------------------------------------------------------------------- /hiro/qt/action/menu-item.hpp: -------------------------------------------------------------------------------- 1 | #if defined(Hiro_MenuItem) 2 | 3 | namespace hiro { 4 | 5 | struct pMenuItem : pAction { 6 | Declare(MenuItem, Action) 7 | 8 | auto setIcon(const image& icon) -> void; 9 | auto setText(const string& text) -> void; 10 | 11 | auto _setState() -> void override; 12 | 13 | QtMenuItem* qtMenuItem = nullptr; 14 | }; 15 | 16 | } 17 | 18 | #endif 19 | -------------------------------------------------------------------------------- /hiro/qt/action/menu-radio-item.hpp: -------------------------------------------------------------------------------- 1 | #if defined(Hiro_MenuRadioItem) 2 | 3 | namespace hiro { 4 | 5 | struct pMenuRadioItem : pAction { 6 | Declare(MenuRadioItem, Action) 7 | 8 | auto setChecked() -> void; 9 | auto setGroup(sGroup group) -> void; 10 | auto setText(const string& text) -> void; 11 | 12 | auto _setState() -> void override; 13 | 14 | QtMenuRadioItem* qtMenuRadioItem = nullptr; 15 | QActionGroup* qtActionGroup = nullptr; 16 | }; 17 | 18 | } 19 | 20 | #endif 21 | -------------------------------------------------------------------------------- /hiro/qt/action/menu-separator.cpp: -------------------------------------------------------------------------------- 1 | #if defined(Hiro_MenuSeparator) 2 | 3 | namespace hiro { 4 | 5 | auto pMenuSeparator::construct() -> void { 6 | qtMenuSeparator = new QAction(nullptr); 7 | qtMenuSeparator->setSeparator(true); 8 | 9 | if(auto parent = _parentMenu()) { 10 | parent->qtMenu->addAction(qtMenuSeparator); 11 | } 12 | 13 | if(auto parent = _parentPopupMenu()) { 14 | parent->qtPopupMenu->addAction(qtMenuSeparator); 15 | } 16 | } 17 | 18 | auto pMenuSeparator::destruct() -> void { 19 | delete qtMenuSeparator; 20 | qtMenuSeparator = nullptr; 21 | } 22 | 23 | } 24 | 25 | #endif 26 | -------------------------------------------------------------------------------- /hiro/qt/action/menu-separator.hpp: -------------------------------------------------------------------------------- 1 | #if defined(Hiro_MenuSeparator) 2 | 3 | namespace hiro { 4 | 5 | struct pMenuSeparator : pAction { 6 | Declare(MenuSeparator, Action) 7 | 8 | QAction* qtMenuSeparator = nullptr; 9 | }; 10 | 11 | } 12 | 13 | #endif 14 | -------------------------------------------------------------------------------- /hiro/qt/action/menu.hpp: -------------------------------------------------------------------------------- 1 | #if defined(Hiro_Menu) 2 | 3 | namespace hiro { 4 | 5 | struct pMenu : public pAction { 6 | Declare(Menu, Action) 7 | 8 | auto append(sAction action) -> void; 9 | auto remove(sAction action) -> void; 10 | auto setIcon(const image& icon) -> void; 11 | auto setText(const string& text) -> void; 12 | 13 | auto _setState() -> void override; 14 | 15 | QMenu* qtMenu = nullptr; 16 | }; 17 | 18 | } 19 | 20 | #endif 21 | -------------------------------------------------------------------------------- /hiro/qt/browser-window.hpp: -------------------------------------------------------------------------------- 1 | #if defined(Hiro_BrowserWindow) 2 | 3 | namespace hiro { 4 | 5 | struct pBrowserWindow { 6 | static auto directory(BrowserWindow::State& state) -> string; 7 | static auto open(BrowserWindow::State& state) -> string; 8 | static auto save(BrowserWindow::State& state) -> string; 9 | }; 10 | 11 | } 12 | 13 | #endif 14 | -------------------------------------------------------------------------------- /hiro/qt/desktop.hpp: -------------------------------------------------------------------------------- 1 | #if defined(Hiro_Desktop) 2 | 3 | namespace hiro { 4 | 5 | struct pDesktop { 6 | static auto size() -> Size; 7 | static auto workspace() -> Geometry; 8 | }; 9 | 10 | } 11 | 12 | #endif 13 | -------------------------------------------------------------------------------- /hiro/qt/font.hpp: -------------------------------------------------------------------------------- 1 | #if defined(Hiro_Font) 2 | 3 | namespace hiro { 4 | 5 | struct pFont { 6 | static auto size(const Font& font, const string& text) -> Size; 7 | static auto size(const QFont& qtFont, const string& text) -> Size; 8 | static auto family(const string& family) -> QString; 9 | static auto create(const Font& font) -> QFont; 10 | }; 11 | 12 | } 13 | 14 | #endif 15 | -------------------------------------------------------------------------------- /hiro/qt/group.cpp: -------------------------------------------------------------------------------- 1 | #if defined(Hiro_Group) 2 | 3 | namespace hiro { 4 | 5 | auto pGroup::construct() -> void { 6 | } 7 | 8 | auto pGroup::destruct() -> void { 9 | } 10 | 11 | } 12 | 13 | #endif 14 | -------------------------------------------------------------------------------- /hiro/qt/group.hpp: -------------------------------------------------------------------------------- 1 | #if defined(Hiro_Group) 2 | 3 | namespace hiro { 4 | 5 | struct pGroup : pObject { 6 | Declare(Group, Object) 7 | }; 8 | 9 | } 10 | 11 | #endif 12 | -------------------------------------------------------------------------------- /hiro/qt/keyboard.hpp: -------------------------------------------------------------------------------- 1 | #if defined(Hiro_Keyboard) 2 | 3 | namespace hiro { 4 | 5 | struct pKeyboard { 6 | static auto poll() -> vector; 7 | static auto pressed(unsigned code) -> bool; 8 | 9 | static auto _pressed(const char* state, uint16_t code) -> bool; 10 | 11 | static auto initialize() -> void; 12 | }; 13 | 14 | } 15 | 16 | #endif 17 | -------------------------------------------------------------------------------- /hiro/qt/menu-bar.hpp: -------------------------------------------------------------------------------- 1 | #if defined(Hiro_MenuBar) 2 | 3 | namespace hiro { 4 | 5 | struct pMenuBar : pObject { 6 | Declare(MenuBar, Object) 7 | 8 | auto append(sMenu menu) -> void; 9 | auto remove(sMenu menu) -> void; 10 | auto setEnabled(bool enabled) -> void override; 11 | auto setFont(const Font& font) -> void override; 12 | auto setVisible(bool visible) -> void override; 13 | 14 | auto _parent() -> maybe; 15 | auto _setState() -> void; 16 | }; 17 | 18 | } 19 | 20 | #endif 21 | -------------------------------------------------------------------------------- /hiro/qt/message-window.hpp: -------------------------------------------------------------------------------- 1 | #if defined(Hiro_MessageWindow) 2 | 3 | namespace hiro { 4 | 5 | struct pMessageWindow { 6 | static auto error(MessageWindow::State& state) -> MessageWindow::Response; 7 | static auto information(MessageWindow::State& state) -> MessageWindow::Response; 8 | static auto question(MessageWindow::State& state) -> MessageWindow::Response; 9 | static auto warning(MessageWindow::State& state) -> MessageWindow::Response; 10 | }; 11 | 12 | } 13 | 14 | #endif 15 | -------------------------------------------------------------------------------- /hiro/qt/monitor.hpp: -------------------------------------------------------------------------------- 1 | #if defined(Hiro_Monitor) 2 | 3 | namespace hiro { 4 | 5 | struct pMonitor { 6 | static auto count() -> uint; 7 | static auto dpi(uint monitor) -> Position; 8 | static auto geometry(uint monitor) -> Geometry; 9 | static auto primary() -> uint; 10 | static auto workspace(uint monitor) -> Geometry; 11 | }; 12 | 13 | } 14 | 15 | #endif 16 | -------------------------------------------------------------------------------- /hiro/qt/mouse.cpp: -------------------------------------------------------------------------------- 1 | #if defined(Hiro_Mouse) 2 | 3 | namespace hiro { 4 | 5 | auto pMouse::position() -> Position { 6 | QPoint point = QCursor::pos(); 7 | return {point.x(), point.y()}; 8 | } 9 | 10 | auto pMouse::pressed(Mouse::Button button) -> bool { 11 | Qt::MouseButtons buttons = QApplication::mouseButtons(); 12 | switch(button) { 13 | case Mouse::Button::Left: return buttons & Qt::LeftButton; 14 | case Mouse::Button::Middle: return buttons & Qt::MidButton; 15 | case Mouse::Button::Right: return buttons & Qt::RightButton; 16 | } 17 | return false; 18 | } 19 | 20 | } 21 | 22 | #endif 23 | -------------------------------------------------------------------------------- /hiro/qt/mouse.hpp: -------------------------------------------------------------------------------- 1 | #if defined(Hiro_Mouse) 2 | 3 | namespace hiro { 4 | 5 | struct pMouse { 6 | static auto position() -> Position; 7 | static auto pressed(Mouse::Button button) -> bool; 8 | }; 9 | 10 | } 11 | 12 | #endif 13 | -------------------------------------------------------------------------------- /hiro/qt/object.cpp: -------------------------------------------------------------------------------- 1 | #if defined(Hiro_Object) 2 | 3 | namespace hiro { 4 | 5 | auto pObject::construct() -> void { 6 | } 7 | 8 | auto pObject::destruct() -> void { 9 | } 10 | 11 | auto pObject::focused() const -> bool { 12 | return false; 13 | } 14 | 15 | auto pObject::remove() -> void { 16 | } 17 | 18 | auto pObject::reset() -> void { 19 | } 20 | 21 | auto pObject::setEnabled(bool enabled) -> void { 22 | } 23 | 24 | auto pObject::setFocused() -> void { 25 | } 26 | 27 | auto pObject::setFont(const Font& font) -> void { 28 | } 29 | 30 | auto pObject::setVisible(bool visible) -> void { 31 | } 32 | 33 | } 34 | 35 | #endif 36 | -------------------------------------------------------------------------------- /hiro/qt/popup-menu.hpp: -------------------------------------------------------------------------------- 1 | #if defined(Hiro_PopupMenu) 2 | 3 | namespace hiro { 4 | 5 | struct pPopupMenu : pObject { 6 | Declare(PopupMenu, Object) 7 | 8 | auto append(sAction action) -> void; 9 | auto remove(sAction action) -> void; 10 | auto setFont(const Font& font) -> void override; 11 | auto setVisible(bool visible) -> void override; 12 | 13 | auto _setState() -> void; 14 | 15 | QMenu* qtPopupMenu = nullptr; 16 | }; 17 | 18 | } 19 | 20 | #endif 21 | -------------------------------------------------------------------------------- /hiro/qt/settings.hpp: -------------------------------------------------------------------------------- 1 | namespace hiro { 2 | 3 | struct Settings { 4 | Settings(); 5 | ~Settings(); 6 | 7 | vector keycodes; 8 | 9 | struct Geometry { 10 | int frameX = 4; 11 | int frameY = 24; 12 | int frameWidth = 8; 13 | int frameHeight = 28; 14 | int menuHeight = 9; 15 | int statusHeight = 9; 16 | } geometry; 17 | }; 18 | 19 | static Settings settings; 20 | 21 | } 22 | -------------------------------------------------------------------------------- /hiro/qt/sizable.cpp: -------------------------------------------------------------------------------- 1 | #if defined(Hiro_Sizable) 2 | 3 | namespace hiro { 4 | 5 | auto pSizable::construct() -> void { 6 | } 7 | 8 | auto pSizable::destruct() -> void { 9 | } 10 | 11 | auto pSizable::minimumSize() const -> Size { 12 | return {0, 0}; 13 | } 14 | 15 | auto pSizable::setCollapsible(bool collapsible) -> void { 16 | } 17 | 18 | auto pSizable::setGeometry(Geometry geometry) -> void { 19 | self().doSize(); 20 | } 21 | 22 | } 23 | 24 | #endif 25 | -------------------------------------------------------------------------------- /hiro/qt/sizable.hpp: -------------------------------------------------------------------------------- 1 | #if defined(Hiro_Sizable) 2 | 3 | namespace hiro { 4 | 5 | struct pSizable : pObject { 6 | Declare(Sizable, Object) 7 | 8 | virtual auto minimumSize() const -> Size; 9 | virtual auto setCollapsible(bool collapsible) -> void; 10 | virtual auto setGeometry(Geometry geometry) -> void; 11 | }; 12 | 13 | } 14 | 15 | #endif 16 | -------------------------------------------------------------------------------- /hiro/qt/status-bar.hpp: -------------------------------------------------------------------------------- 1 | #if defined(Hiro_StatusBar) 2 | 3 | namespace hiro { 4 | 5 | struct pStatusBar : pObject { 6 | Declare(StatusBar, Object) 7 | 8 | auto setEnabled(bool enabled) -> void override; 9 | auto setFont(const Font& font) -> void override; 10 | auto setText(const string& text) -> void; 11 | auto setVisible(bool visible) -> void override; 12 | 13 | auto _parent() -> maybe; 14 | auto _setState() -> void; 15 | }; 16 | 17 | } 18 | 19 | #endif 20 | -------------------------------------------------------------------------------- /hiro/qt/timer.hpp: -------------------------------------------------------------------------------- 1 | #if defined(Hiro_Timer) 2 | 3 | namespace hiro { 4 | 5 | struct pTimer : pObject { 6 | Declare(Timer, Object) 7 | 8 | auto setEnabled(bool enabled) -> void override; 9 | auto setInterval(unsigned interval) -> void; 10 | 11 | QtTimer* qtTimer = nullptr; 12 | }; 13 | 14 | } 15 | 16 | #endif 17 | -------------------------------------------------------------------------------- /hiro/qt/widget/button.hpp: -------------------------------------------------------------------------------- 1 | #if defined(Hiro_Button) 2 | 3 | namespace hiro { 4 | 5 | struct pButton : pWidget { 6 | Declare(Button, Widget) 7 | 8 | auto minimumSize() const -> Size override; 9 | auto setBordered(bool bordered) -> void; 10 | auto setIcon(const image& icon) -> void; 11 | auto setOrientation(Orientation orientation) -> void; 12 | auto setText(const string& text) -> void; 13 | 14 | QtButton* qtButton = nullptr; 15 | }; 16 | 17 | } 18 | 19 | #endif 20 | -------------------------------------------------------------------------------- /hiro/qt/widget/check-button.hpp: -------------------------------------------------------------------------------- 1 | #if defined(Hiro_CheckButton) 2 | 3 | namespace hiro { 4 | 5 | struct pCheckButton : pWidget { 6 | Declare(CheckButton, Widget) 7 | 8 | auto minimumSize() const -> Size override; 9 | auto setBordered(bool bordered) -> void; 10 | auto setChecked(bool checked) -> void; 11 | auto setIcon(const image& icon) -> void; 12 | auto setOrientation(Orientation orientation) -> void; 13 | auto setText(const string& text) -> void; 14 | 15 | auto _setState() -> void; 16 | 17 | QtCheckButton* qtCheckButton = nullptr; 18 | }; 19 | 20 | } 21 | 22 | #endif 23 | -------------------------------------------------------------------------------- /hiro/qt/widget/check-label.hpp: -------------------------------------------------------------------------------- 1 | #if defined(Hiro_CheckLabel) 2 | 3 | namespace hiro { 4 | 5 | struct pCheckLabel : pWidget { 6 | Declare(CheckLabel, Widget) 7 | 8 | auto minimumSize() const -> Size override; 9 | auto setChecked(bool checked) -> void; 10 | auto setText(const string& text) -> void; 11 | 12 | auto _setState() -> void; 13 | 14 | QtCheckLabel* qtCheckLabel = nullptr; 15 | }; 16 | 17 | } 18 | 19 | #endif 20 | -------------------------------------------------------------------------------- /hiro/qt/widget/combo-button-item.hpp: -------------------------------------------------------------------------------- 1 | #if defined(Hiro_ComboButton) 2 | 3 | namespace hiro { 4 | 5 | struct pComboButtonItem : pObject { 6 | Declare(ComboButtonItem, Object) 7 | 8 | auto setIcon(const image& icon) -> void; 9 | auto setSelected() -> void; 10 | auto setText(const string& text) -> void; 11 | 12 | auto _parent() -> maybe; 13 | auto _setState() -> void; 14 | }; 15 | 16 | } 17 | 18 | #endif 19 | -------------------------------------------------------------------------------- /hiro/qt/widget/combo-button.hpp: -------------------------------------------------------------------------------- 1 | #if defined(Hiro_ComboButton) 2 | 3 | namespace hiro { 4 | 5 | struct pComboButton : pWidget { 6 | Declare(ComboButton, Widget) 7 | 8 | auto append(sComboButtonItem item) -> void; 9 | auto minimumSize() const -> Size override; 10 | auto remove(sComboButtonItem item) -> void; 11 | auto reset() -> void; 12 | 13 | QtComboButton* qtComboButton = nullptr; 14 | }; 15 | 16 | } 17 | 18 | #endif 19 | -------------------------------------------------------------------------------- /hiro/qt/widget/frame.hpp: -------------------------------------------------------------------------------- 1 | #if defined(Hiro_Frame) 2 | 3 | namespace hiro { 4 | 5 | struct pFrame : pWidget { 6 | Declare(Frame, Widget) 7 | 8 | auto append(sSizable sizable) -> void; 9 | auto remove(sSizable sizable) -> void; 10 | auto setEnabled(bool enabled) -> void override; 11 | auto setGeometry(Geometry geometry) -> void override; 12 | auto setText(const string& text) -> void; 13 | auto setVisible(bool visible) -> void override; 14 | 15 | auto _setState() -> void; 16 | 17 | QGroupBox* qtFrame = nullptr; 18 | }; 19 | 20 | } 21 | 22 | #endif 23 | -------------------------------------------------------------------------------- /hiro/qt/widget/horizontal-scroll-bar.hpp: -------------------------------------------------------------------------------- 1 | #if defined(Hiro_HorizontalScrollBar) 2 | 3 | namespace hiro { 4 | 5 | struct pHorizontalScrollBar : pWidget { 6 | Declare(HorizontalScrollBar, Widget) 7 | 8 | auto minimumSize() const -> Size override; 9 | auto setLength(unsigned length) -> void; 10 | auto setPosition(unsigned position) -> void; 11 | 12 | auto _setState() -> void; 13 | 14 | QtHorizontalScrollBar* qtHorizontalScrollBar = nullptr; 15 | }; 16 | 17 | } 18 | 19 | #endif 20 | -------------------------------------------------------------------------------- /hiro/qt/widget/horizontal-slider.hpp: -------------------------------------------------------------------------------- 1 | #if defined(Hiro_HorizontalSlider) 2 | 3 | namespace hiro { 4 | 5 | struct pHorizontalSlider : pWidget { 6 | Declare(HorizontalSlider, Widget) 7 | 8 | auto minimumSize() const -> Size; 9 | auto setLength(unsigned length) -> void; 10 | auto setPosition(unsigned position) -> void; 11 | 12 | auto _setState() -> void; 13 | 14 | QtHorizontalSlider* qtHorizontalSlider = nullptr; 15 | }; 16 | 17 | } 18 | 19 | #endif 20 | -------------------------------------------------------------------------------- /hiro/qt/widget/label.hpp: -------------------------------------------------------------------------------- 1 | #if defined(Hiro_Label) 2 | 3 | namespace hiro { 4 | 5 | struct pLabel : pWidget { 6 | Declare(Label, Widget) 7 | 8 | auto minimumSize() const -> Size override; 9 | auto setAlignment(Alignment alignment) -> void; 10 | auto setBackgroundColor(Color color) -> void; 11 | auto setFont(const Font& font) -> void override; 12 | auto setForegroundColor(Color color) -> void; 13 | auto setText(const string& text) -> void; 14 | 15 | QtLabel* qtLabel = nullptr; 16 | }; 17 | 18 | } 19 | 20 | #endif 21 | -------------------------------------------------------------------------------- /hiro/qt/widget/line-edit.hpp: -------------------------------------------------------------------------------- 1 | #if defined(Hiro_LineEdit) 2 | 3 | namespace hiro { 4 | 5 | struct pLineEdit : pWidget { 6 | Declare(LineEdit, Widget) 7 | 8 | auto minimumSize() const -> Size override; 9 | auto setBackgroundColor(Color color) -> void; 10 | auto setEditable(bool editable) -> void; 11 | auto setForegroundColor(Color color) -> void; 12 | auto setText(const string& text) -> void; 13 | 14 | QtLineEdit* qtLineEdit = nullptr; 15 | }; 16 | 17 | } 18 | 19 | #endif 20 | -------------------------------------------------------------------------------- /hiro/qt/widget/progress-bar.hpp: -------------------------------------------------------------------------------- 1 | #if defined(Hiro_ProgressBar) 2 | 3 | namespace hiro { 4 | 5 | struct pProgressBar : pWidget { 6 | Declare(ProgressBar, Widget) 7 | 8 | auto minimumSize() const -> Size override; 9 | auto setPosition(unsigned position) -> void; 10 | 11 | auto _setState() -> void; 12 | 13 | QProgressBar* qtProgressBar = nullptr; 14 | }; 15 | 16 | } 17 | 18 | #endif 19 | -------------------------------------------------------------------------------- /hiro/qt/widget/radio-button.hpp: -------------------------------------------------------------------------------- 1 | #if defined(Hiro_RadioButton) 2 | 3 | namespace hiro { 4 | 5 | struct pRadioButton : pWidget { 6 | Declare(RadioButton, Widget) 7 | 8 | auto minimumSize() const -> Size override; 9 | auto setBordered(bool bordered) -> void; 10 | auto setChecked() -> void; 11 | auto setGroup(sGroup group) -> void; 12 | auto setIcon(const image& icon) -> void; 13 | auto setOrientation(Orientation orientation) -> void; 14 | auto setText(const string& text) -> void; 15 | 16 | auto _setState() -> void; 17 | 18 | QtRadioButton* qtRadioButton = nullptr; 19 | }; 20 | 21 | } 22 | 23 | #endif 24 | -------------------------------------------------------------------------------- /hiro/qt/widget/radio-label.hpp: -------------------------------------------------------------------------------- 1 | #if defined(Hiro_RadioLabel) 2 | 3 | namespace hiro { 4 | 5 | struct pRadioLabel : pWidget { 6 | Declare(RadioLabel, Widget) 7 | 8 | auto minimumSize() const -> Size; 9 | auto setChecked() -> void; 10 | auto setGroup(sGroup group) -> void; 11 | auto setText(const string& text) -> void; 12 | 13 | auto _setState() -> void; 14 | 15 | QtRadioLabel* qtRadioLabel = nullptr; 16 | }; 17 | 18 | } 19 | 20 | #endif 21 | -------------------------------------------------------------------------------- /hiro/qt/widget/tab-frame.hpp: -------------------------------------------------------------------------------- 1 | #if defined(Hiro_TabFrame) 2 | 3 | namespace hiro { 4 | 5 | struct pTabFrame : pWidget { 6 | Declare(TabFrame, Widget) 7 | 8 | auto append(sTabFrameItem item) -> void; 9 | auto remove(sTabFrameItem item) -> void; 10 | auto setGeometry(Geometry geometry) -> void override; 11 | auto setNavigation(Navigation navigation) -> void; 12 | 13 | auto _setState() -> void; 14 | 15 | QtTabFrame* qtTabFrame = nullptr; 16 | }; 17 | 18 | } 19 | 20 | #endif 21 | -------------------------------------------------------------------------------- /hiro/qt/widget/vertical-scroll-bar.hpp: -------------------------------------------------------------------------------- 1 | #if defined(Hiro_VerticalScrollBar) 2 | 3 | namespace hiro { 4 | 5 | struct pVerticalScrollBar : pWidget { 6 | Declare(VerticalScrollBar, Widget) 7 | 8 | auto minimumSize() const -> Size override; 9 | auto setLength(unsigned length) -> void; 10 | auto setPosition(unsigned position) -> void; 11 | 12 | auto _setState() -> void; 13 | 14 | QtVerticalScrollBar* qtVerticalScrollBar = nullptr; 15 | }; 16 | 17 | } 18 | 19 | #endif 20 | -------------------------------------------------------------------------------- /hiro/qt/widget/vertical-slider.hpp: -------------------------------------------------------------------------------- 1 | #if defined(Hiro_VerticalSlider) 2 | 3 | namespace hiro { 4 | 5 | struct pVerticalSlider : pWidget { 6 | Declare(VerticalSlider, Widget) 7 | 8 | auto minimumSize() const -> Size override; 9 | auto setLength(unsigned length) -> void; 10 | auto setPosition(unsigned position) -> void; 11 | 12 | auto _setState() -> void; 13 | 14 | QtVerticalSlider* qtVerticalSlider = nullptr; 15 | }; 16 | 17 | } 18 | 19 | #endif 20 | -------------------------------------------------------------------------------- /hiro/qt/widget/viewport.hpp: -------------------------------------------------------------------------------- 1 | #if defined(Hiro_Viewport) 2 | 3 | namespace hiro { 4 | 5 | struct pViewport : pWidget { 6 | Declare(Viewport, Widget) 7 | 8 | auto handle() const -> uintptr_t; 9 | auto setDroppable(bool droppable) -> void override; 10 | auto setFocusable(bool focusable) -> void override; 11 | 12 | auto _setState() -> void; 13 | 14 | QtViewport* qtViewport = nullptr; 15 | }; 16 | 17 | } 18 | 19 | #endif 20 | -------------------------------------------------------------------------------- /hiro/resource/GNUmakefile: -------------------------------------------------------------------------------- 1 | all: 2 | sourcery resource.bml resource.cpp resource.hpp 3 | 4 | permissions: 5 | chmod +w icon/action/*.png 6 | chmod +w icon/application/*.png 7 | chmod +w icon/device/*.png 8 | chmod +w icon/edit/*.png 9 | chmod +w icon/emblem/*.png 10 | chmod +w icon/go/*.png 11 | chmod +w icon/media/*.png 12 | chmod +w icon/place/*.png 13 | chmod +w icon/prompt/*.png 14 | -------------------------------------------------------------------------------- /hiro/resource/icon/action/add.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsnes-emu/bsnes/b815744b4cff6d6854090545b78ae8e1a6669976/hiro/resource/icon/action/add.png -------------------------------------------------------------------------------- /hiro/resource/icon/action/attach.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsnes-emu/bsnes/b815744b4cff6d6854090545b78ae8e1a6669976/hiro/resource/icon/action/attach.png -------------------------------------------------------------------------------- /hiro/resource/icon/action/bookmark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsnes-emu/bsnes/b815744b4cff6d6854090545b78ae8e1a6669976/hiro/resource/icon/action/bookmark.png -------------------------------------------------------------------------------- /hiro/resource/icon/action/close.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsnes-emu/bsnes/b815744b4cff6d6854090545b78ae8e1a6669976/hiro/resource/icon/action/close.png -------------------------------------------------------------------------------- /hiro/resource/icon/action/full-screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsnes-emu/bsnes/b815744b4cff6d6854090545b78ae8e1a6669976/hiro/resource/icon/action/full-screen.png -------------------------------------------------------------------------------- /hiro/resource/icon/action/mute.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsnes-emu/bsnes/b815744b4cff6d6854090545b78ae8e1a6669976/hiro/resource/icon/action/mute.png -------------------------------------------------------------------------------- /hiro/resource/icon/action/new-file.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsnes-emu/bsnes/b815744b4cff6d6854090545b78ae8e1a6669976/hiro/resource/icon/action/new-file.png -------------------------------------------------------------------------------- /hiro/resource/icon/action/new-folder.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsnes-emu/bsnes/b815744b4cff6d6854090545b78ae8e1a6669976/hiro/resource/icon/action/new-folder.png -------------------------------------------------------------------------------- /hiro/resource/icon/action/open.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsnes-emu/bsnes/b815744b4cff6d6854090545b78ae8e1a6669976/hiro/resource/icon/action/open.png -------------------------------------------------------------------------------- /hiro/resource/icon/action/properties.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsnes-emu/bsnes/b815744b4cff6d6854090545b78ae8e1a6669976/hiro/resource/icon/action/properties.png -------------------------------------------------------------------------------- /hiro/resource/icon/action/quit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsnes-emu/bsnes/b815744b4cff6d6854090545b78ae8e1a6669976/hiro/resource/icon/action/quit.png -------------------------------------------------------------------------------- /hiro/resource/icon/action/refresh.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsnes-emu/bsnes/b815744b4cff6d6854090545b78ae8e1a6669976/hiro/resource/icon/action/refresh.png -------------------------------------------------------------------------------- /hiro/resource/icon/action/remove.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsnes-emu/bsnes/b815744b4cff6d6854090545b78ae8e1a6669976/hiro/resource/icon/action/remove.png -------------------------------------------------------------------------------- /hiro/resource/icon/action/save.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsnes-emu/bsnes/b815744b4cff6d6854090545b78ae8e1a6669976/hiro/resource/icon/action/save.png -------------------------------------------------------------------------------- /hiro/resource/icon/action/search.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsnes-emu/bsnes/b815744b4cff6d6854090545b78ae8e1a6669976/hiro/resource/icon/action/search.png -------------------------------------------------------------------------------- /hiro/resource/icon/action/settings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsnes-emu/bsnes/b815744b4cff6d6854090545b78ae8e1a6669976/hiro/resource/icon/action/settings.png -------------------------------------------------------------------------------- /hiro/resource/icon/action/stop.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsnes-emu/bsnes/b815744b4cff6d6854090545b78ae8e1a6669976/hiro/resource/icon/action/stop.png -------------------------------------------------------------------------------- /hiro/resource/icon/application/browser.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsnes-emu/bsnes/b815744b4cff6d6854090545b78ae8e1a6669976/hiro/resource/icon/application/browser.png -------------------------------------------------------------------------------- /hiro/resource/icon/application/calculator.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsnes-emu/bsnes/b815744b4cff6d6854090545b78ae8e1a6669976/hiro/resource/icon/application/calculator.png -------------------------------------------------------------------------------- /hiro/resource/icon/application/calendar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsnes-emu/bsnes/b815744b4cff6d6854090545b78ae8e1a6669976/hiro/resource/icon/application/calendar.png -------------------------------------------------------------------------------- /hiro/resource/icon/application/chat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsnes-emu/bsnes/b815744b4cff6d6854090545b78ae8e1a6669976/hiro/resource/icon/application/chat.png -------------------------------------------------------------------------------- /hiro/resource/icon/application/file-manager.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsnes-emu/bsnes/b815744b4cff6d6854090545b78ae8e1a6669976/hiro/resource/icon/application/file-manager.png -------------------------------------------------------------------------------- /hiro/resource/icon/application/mail.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsnes-emu/bsnes/b815744b4cff6d6854090545b78ae8e1a6669976/hiro/resource/icon/application/mail.png -------------------------------------------------------------------------------- /hiro/resource/icon/application/monitor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsnes-emu/bsnes/b815744b4cff6d6854090545b78ae8e1a6669976/hiro/resource/icon/application/monitor.png -------------------------------------------------------------------------------- /hiro/resource/icon/application/terminal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsnes-emu/bsnes/b815744b4cff6d6854090545b78ae8e1a6669976/hiro/resource/icon/application/terminal.png -------------------------------------------------------------------------------- /hiro/resource/icon/application/text-editor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsnes-emu/bsnes/b815744b4cff6d6854090545b78ae8e1a6669976/hiro/resource/icon/application/text-editor.png -------------------------------------------------------------------------------- /hiro/resource/icon/device/clock.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsnes-emu/bsnes/b815744b4cff6d6854090545b78ae8e1a6669976/hiro/resource/icon/device/clock.png -------------------------------------------------------------------------------- /hiro/resource/icon/device/display.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsnes-emu/bsnes/b815744b4cff6d6854090545b78ae8e1a6669976/hiro/resource/icon/device/display.png -------------------------------------------------------------------------------- /hiro/resource/icon/device/joypad.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsnes-emu/bsnes/b815744b4cff6d6854090545b78ae8e1a6669976/hiro/resource/icon/device/joypad.png -------------------------------------------------------------------------------- /hiro/resource/icon/device/keyboard.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsnes-emu/bsnes/b815744b4cff6d6854090545b78ae8e1a6669976/hiro/resource/icon/device/keyboard.png -------------------------------------------------------------------------------- /hiro/resource/icon/device/microphone.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsnes-emu/bsnes/b815744b4cff6d6854090545b78ae8e1a6669976/hiro/resource/icon/device/microphone.png -------------------------------------------------------------------------------- /hiro/resource/icon/device/mouse.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsnes-emu/bsnes/b815744b4cff6d6854090545b78ae8e1a6669976/hiro/resource/icon/device/mouse.png -------------------------------------------------------------------------------- /hiro/resource/icon/device/network.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsnes-emu/bsnes/b815744b4cff6d6854090545b78ae8e1a6669976/hiro/resource/icon/device/network.png -------------------------------------------------------------------------------- /hiro/resource/icon/device/optical.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsnes-emu/bsnes/b815744b4cff6d6854090545b78ae8e1a6669976/hiro/resource/icon/device/optical.png -------------------------------------------------------------------------------- /hiro/resource/icon/device/printer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsnes-emu/bsnes/b815744b4cff6d6854090545b78ae8e1a6669976/hiro/resource/icon/device/printer.png -------------------------------------------------------------------------------- /hiro/resource/icon/device/speaker.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsnes-emu/bsnes/b815744b4cff6d6854090545b78ae8e1a6669976/hiro/resource/icon/device/speaker.png -------------------------------------------------------------------------------- /hiro/resource/icon/device/storage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsnes-emu/bsnes/b815744b4cff6d6854090545b78ae8e1a6669976/hiro/resource/icon/device/storage.png -------------------------------------------------------------------------------- /hiro/resource/icon/edit/clear.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsnes-emu/bsnes/b815744b4cff6d6854090545b78ae8e1a6669976/hiro/resource/icon/edit/clear.png -------------------------------------------------------------------------------- /hiro/resource/icon/edit/copy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsnes-emu/bsnes/b815744b4cff6d6854090545b78ae8e1a6669976/hiro/resource/icon/edit/copy.png -------------------------------------------------------------------------------- /hiro/resource/icon/edit/cut.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsnes-emu/bsnes/b815744b4cff6d6854090545b78ae8e1a6669976/hiro/resource/icon/edit/cut.png -------------------------------------------------------------------------------- /hiro/resource/icon/edit/delete.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsnes-emu/bsnes/b815744b4cff6d6854090545b78ae8e1a6669976/hiro/resource/icon/edit/delete.png -------------------------------------------------------------------------------- /hiro/resource/icon/edit/find.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsnes-emu/bsnes/b815744b4cff6d6854090545b78ae8e1a6669976/hiro/resource/icon/edit/find.png -------------------------------------------------------------------------------- /hiro/resource/icon/edit/paste.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsnes-emu/bsnes/b815744b4cff6d6854090545b78ae8e1a6669976/hiro/resource/icon/edit/paste.png -------------------------------------------------------------------------------- /hiro/resource/icon/edit/redo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsnes-emu/bsnes/b815744b4cff6d6854090545b78ae8e1a6669976/hiro/resource/icon/edit/redo.png -------------------------------------------------------------------------------- /hiro/resource/icon/edit/replace.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsnes-emu/bsnes/b815744b4cff6d6854090545b78ae8e1a6669976/hiro/resource/icon/edit/replace.png -------------------------------------------------------------------------------- /hiro/resource/icon/edit/undo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsnes-emu/bsnes/b815744b4cff6d6854090545b78ae8e1a6669976/hiro/resource/icon/edit/undo.png -------------------------------------------------------------------------------- /hiro/resource/icon/emblem/archive.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsnes-emu/bsnes/b815744b4cff6d6854090545b78ae8e1a6669976/hiro/resource/icon/emblem/archive.png -------------------------------------------------------------------------------- /hiro/resource/icon/emblem/audio.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsnes-emu/bsnes/b815744b4cff6d6854090545b78ae8e1a6669976/hiro/resource/icon/emblem/audio.png -------------------------------------------------------------------------------- /hiro/resource/icon/emblem/binary.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsnes-emu/bsnes/b815744b4cff6d6854090545b78ae8e1a6669976/hiro/resource/icon/emblem/binary.png -------------------------------------------------------------------------------- /hiro/resource/icon/emblem/file.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsnes-emu/bsnes/b815744b4cff6d6854090545b78ae8e1a6669976/hiro/resource/icon/emblem/file.png -------------------------------------------------------------------------------- /hiro/resource/icon/emblem/folder-open.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsnes-emu/bsnes/b815744b4cff6d6854090545b78ae8e1a6669976/hiro/resource/icon/emblem/folder-open.png -------------------------------------------------------------------------------- /hiro/resource/icon/emblem/folder-template.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsnes-emu/bsnes/b815744b4cff6d6854090545b78ae8e1a6669976/hiro/resource/icon/emblem/folder-template.png -------------------------------------------------------------------------------- /hiro/resource/icon/emblem/folder.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsnes-emu/bsnes/b815744b4cff6d6854090545b78ae8e1a6669976/hiro/resource/icon/emblem/folder.png -------------------------------------------------------------------------------- /hiro/resource/icon/emblem/font.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsnes-emu/bsnes/b815744b4cff6d6854090545b78ae8e1a6669976/hiro/resource/icon/emblem/font.png -------------------------------------------------------------------------------- /hiro/resource/icon/emblem/image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsnes-emu/bsnes/b815744b4cff6d6854090545b78ae8e1a6669976/hiro/resource/icon/emblem/image.png -------------------------------------------------------------------------------- /hiro/resource/icon/emblem/markup.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsnes-emu/bsnes/b815744b4cff6d6854090545b78ae8e1a6669976/hiro/resource/icon/emblem/markup.png -------------------------------------------------------------------------------- /hiro/resource/icon/emblem/program.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsnes-emu/bsnes/b815744b4cff6d6854090545b78ae8e1a6669976/hiro/resource/icon/emblem/program.png -------------------------------------------------------------------------------- /hiro/resource/icon/emblem/script.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsnes-emu/bsnes/b815744b4cff6d6854090545b78ae8e1a6669976/hiro/resource/icon/emblem/script.png -------------------------------------------------------------------------------- /hiro/resource/icon/emblem/text.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsnes-emu/bsnes/b815744b4cff6d6854090545b78ae8e1a6669976/hiro/resource/icon/emblem/text.png -------------------------------------------------------------------------------- /hiro/resource/icon/emblem/video.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsnes-emu/bsnes/b815744b4cff6d6854090545b78ae8e1a6669976/hiro/resource/icon/emblem/video.png -------------------------------------------------------------------------------- /hiro/resource/icon/go/down.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsnes-emu/bsnes/b815744b4cff6d6854090545b78ae8e1a6669976/hiro/resource/icon/go/down.png -------------------------------------------------------------------------------- /hiro/resource/icon/go/home.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsnes-emu/bsnes/b815744b4cff6d6854090545b78ae8e1a6669976/hiro/resource/icon/go/home.png -------------------------------------------------------------------------------- /hiro/resource/icon/go/left.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsnes-emu/bsnes/b815744b4cff6d6854090545b78ae8e1a6669976/hiro/resource/icon/go/left.png -------------------------------------------------------------------------------- /hiro/resource/icon/go/right.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsnes-emu/bsnes/b815744b4cff6d6854090545b78ae8e1a6669976/hiro/resource/icon/go/right.png -------------------------------------------------------------------------------- /hiro/resource/icon/go/up.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsnes-emu/bsnes/b815744b4cff6d6854090545b78ae8e1a6669976/hiro/resource/icon/go/up.png -------------------------------------------------------------------------------- /hiro/resource/icon/media/back.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsnes-emu/bsnes/b815744b4cff6d6854090545b78ae8e1a6669976/hiro/resource/icon/media/back.png -------------------------------------------------------------------------------- /hiro/resource/icon/media/eject.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsnes-emu/bsnes/b815744b4cff6d6854090545b78ae8e1a6669976/hiro/resource/icon/media/eject.png -------------------------------------------------------------------------------- /hiro/resource/icon/media/flash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsnes-emu/bsnes/b815744b4cff6d6854090545b78ae8e1a6669976/hiro/resource/icon/media/flash.png -------------------------------------------------------------------------------- /hiro/resource/icon/media/floppy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsnes-emu/bsnes/b815744b4cff6d6854090545b78ae8e1a6669976/hiro/resource/icon/media/floppy.png -------------------------------------------------------------------------------- /hiro/resource/icon/media/next.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsnes-emu/bsnes/b815744b4cff6d6854090545b78ae8e1a6669976/hiro/resource/icon/media/next.png -------------------------------------------------------------------------------- /hiro/resource/icon/media/optical.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsnes-emu/bsnes/b815744b4cff6d6854090545b78ae8e1a6669976/hiro/resource/icon/media/optical.png -------------------------------------------------------------------------------- /hiro/resource/icon/media/pause.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsnes-emu/bsnes/b815744b4cff6d6854090545b78ae8e1a6669976/hiro/resource/icon/media/pause.png -------------------------------------------------------------------------------- /hiro/resource/icon/media/play.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsnes-emu/bsnes/b815744b4cff6d6854090545b78ae8e1a6669976/hiro/resource/icon/media/play.png -------------------------------------------------------------------------------- /hiro/resource/icon/media/record.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsnes-emu/bsnes/b815744b4cff6d6854090545b78ae8e1a6669976/hiro/resource/icon/media/record.png -------------------------------------------------------------------------------- /hiro/resource/icon/media/rewind.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsnes-emu/bsnes/b815744b4cff6d6854090545b78ae8e1a6669976/hiro/resource/icon/media/rewind.png -------------------------------------------------------------------------------- /hiro/resource/icon/media/skip.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsnes-emu/bsnes/b815744b4cff6d6854090545b78ae8e1a6669976/hiro/resource/icon/media/skip.png -------------------------------------------------------------------------------- /hiro/resource/icon/media/stop.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsnes-emu/bsnes/b815744b4cff6d6854090545b78ae8e1a6669976/hiro/resource/icon/media/stop.png -------------------------------------------------------------------------------- /hiro/resource/icon/place/bookmarks.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsnes-emu/bsnes/b815744b4cff6d6854090545b78ae8e1a6669976/hiro/resource/icon/place/bookmarks.png -------------------------------------------------------------------------------- /hiro/resource/icon/place/desktop.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsnes-emu/bsnes/b815744b4cff6d6854090545b78ae8e1a6669976/hiro/resource/icon/place/desktop.png -------------------------------------------------------------------------------- /hiro/resource/icon/place/home.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsnes-emu/bsnes/b815744b4cff6d6854090545b78ae8e1a6669976/hiro/resource/icon/place/home.png -------------------------------------------------------------------------------- /hiro/resource/icon/place/server.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsnes-emu/bsnes/b815744b4cff6d6854090545b78ae8e1a6669976/hiro/resource/icon/place/server.png -------------------------------------------------------------------------------- /hiro/resource/icon/place/settings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsnes-emu/bsnes/b815744b4cff6d6854090545b78ae8e1a6669976/hiro/resource/icon/place/settings.png -------------------------------------------------------------------------------- /hiro/resource/icon/place/share.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsnes-emu/bsnes/b815744b4cff6d6854090545b78ae8e1a6669976/hiro/resource/icon/place/share.png -------------------------------------------------------------------------------- /hiro/resource/icon/prompt/error.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsnes-emu/bsnes/b815744b4cff6d6854090545b78ae8e1a6669976/hiro/resource/icon/prompt/error.png -------------------------------------------------------------------------------- /hiro/resource/icon/prompt/information.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsnes-emu/bsnes/b815744b4cff6d6854090545b78ae8e1a6669976/hiro/resource/icon/prompt/information.png -------------------------------------------------------------------------------- /hiro/resource/icon/prompt/question.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsnes-emu/bsnes/b815744b4cff6d6854090545b78ae8e1a6669976/hiro/resource/icon/prompt/question.png -------------------------------------------------------------------------------- /hiro/resource/icon/prompt/warning.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsnes-emu/bsnes/b815744b4cff6d6854090545b78ae8e1a6669976/hiro/resource/icon/prompt/warning.png -------------------------------------------------------------------------------- /hiro/windows/action/action.hpp: -------------------------------------------------------------------------------- 1 | #if defined(Hiro_Action) 2 | 3 | namespace hiro { 4 | 5 | struct pAction : pObject { 6 | Declare(Action, Object) 7 | 8 | auto setEnabled(bool enabled) -> void; 9 | auto setVisible(bool visible) -> void; 10 | 11 | auto _parentMenu() -> maybe; 12 | auto _parentMenuBar() -> maybe; 13 | auto _parentPopupMenu() -> maybe; 14 | auto _synchronize() -> void; 15 | 16 | unsigned position = 0; 17 | }; 18 | 19 | } 20 | 21 | #endif 22 | -------------------------------------------------------------------------------- /hiro/windows/action/menu-check-item.hpp: -------------------------------------------------------------------------------- 1 | #if defined(Hiro_MenuCheckItem) 2 | 3 | namespace hiro { 4 | 5 | struct pMenuCheckItem : pAction { 6 | Declare(MenuCheckItem, Action) 7 | 8 | auto setChecked(bool checked) -> void; 9 | auto setText(const string& text) -> void; 10 | 11 | auto onToggle() -> void; 12 | }; 13 | 14 | } 15 | 16 | #endif 17 | -------------------------------------------------------------------------------- /hiro/windows/action/menu-item.hpp: -------------------------------------------------------------------------------- 1 | #if defined(Hiro_MenuItem) 2 | 3 | namespace hiro { 4 | 5 | struct pMenuItem : pAction { 6 | Declare(MenuItem, Action) 7 | 8 | auto setIcon(const image& icon) -> void; 9 | auto setText(const string& text) -> void; 10 | 11 | auto onActivate() -> void; 12 | 13 | auto _createBitmap() -> void; 14 | 15 | HBITMAP hbitmap = 0; 16 | }; 17 | 18 | } 19 | 20 | #endif 21 | -------------------------------------------------------------------------------- /hiro/windows/action/menu-radio-item.hpp: -------------------------------------------------------------------------------- 1 | #if defined(Hiro_MenuRadioItem) 2 | 3 | namespace hiro { 4 | 5 | struct pMenuRadioItem : pAction { 6 | Declare(MenuRadioItem, Action) 7 | 8 | auto setChecked() -> void; 9 | auto setGroup(sGroup group) -> void override; 10 | auto setText(const string& text) -> void; 11 | 12 | auto onActivate() -> void; 13 | }; 14 | 15 | } 16 | 17 | #endif 18 | -------------------------------------------------------------------------------- /hiro/windows/action/menu-separator.cpp: -------------------------------------------------------------------------------- 1 | #if defined(Hiro_MenuSeparator) 2 | 3 | namespace hiro { 4 | 5 | auto pMenuSeparator::construct() -> void { 6 | } 7 | 8 | auto pMenuSeparator::destruct() -> void { 9 | } 10 | 11 | } 12 | 13 | #endif 14 | -------------------------------------------------------------------------------- /hiro/windows/action/menu-separator.hpp: -------------------------------------------------------------------------------- 1 | #if defined(Hiro_MenuSeparator) 2 | 3 | namespace hiro { 4 | 5 | struct pMenuSeparator : pAction { 6 | Declare(MenuSeparator, Action) 7 | }; 8 | 9 | } 10 | 11 | #endif 12 | -------------------------------------------------------------------------------- /hiro/windows/action/menu.hpp: -------------------------------------------------------------------------------- 1 | #if defined(Hiro_Menu) 2 | 3 | namespace hiro { 4 | 5 | struct pMenu : pAction { 6 | Declare(Menu, Action) 7 | 8 | auto append(sAction action) -> void; 9 | auto remove(sAction action) -> void; 10 | auto setIcon(const image& icon) -> void; 11 | auto setText(const string& text) -> void; 12 | 13 | auto _createBitmap() -> void; 14 | auto _update() -> void; 15 | 16 | HMENU hmenu = 0; 17 | HBITMAP hbitmap = 0; 18 | }; 19 | 20 | } 21 | 22 | #endif 23 | -------------------------------------------------------------------------------- /hiro/windows/browser-window.hpp: -------------------------------------------------------------------------------- 1 | #if defined(Hiro_BrowserWindow) 2 | 3 | namespace hiro { 4 | 5 | struct pBrowserWindow { 6 | static auto directory(BrowserWindow::State& state) -> string; 7 | static auto open(BrowserWindow::State& state) -> string; 8 | static auto save(BrowserWindow::State& state) -> string; 9 | }; 10 | 11 | } 12 | 13 | #endif 14 | -------------------------------------------------------------------------------- /hiro/windows/desktop.cpp: -------------------------------------------------------------------------------- 1 | #if defined(Hiro_Desktop) 2 | 3 | namespace hiro { 4 | 5 | auto pDesktop::size() -> Size { 6 | return {GetSystemMetrics(SM_CXVIRTUALSCREEN), GetSystemMetrics(SM_CYVIRTUALSCREEN)}; 7 | } 8 | 9 | auto pDesktop::workspace() -> Geometry { 10 | RECT rc; 11 | SystemParametersInfo(SPI_GETWORKAREA, 0, &rc, 0); 12 | return {rc.left, rc.top, rc.right - rc.left, rc.bottom - rc.top}; 13 | } 14 | 15 | } 16 | 17 | #endif 18 | -------------------------------------------------------------------------------- /hiro/windows/desktop.hpp: -------------------------------------------------------------------------------- 1 | #if defined(Hiro_Desktop) 2 | 3 | namespace hiro { 4 | 5 | struct pDesktop { 6 | static auto size() -> Size; 7 | static auto workspace() -> Geometry; 8 | }; 9 | 10 | } 11 | 12 | #endif 13 | -------------------------------------------------------------------------------- /hiro/windows/font.hpp: -------------------------------------------------------------------------------- 1 | #if defined(Hiro_Font) 2 | 3 | namespace hiro { 4 | 5 | struct pFont { 6 | static auto size(const Font& font, const string& text) -> Size; 7 | static auto size(HFONT hfont, const string& text) -> Size; 8 | static auto family(const string& family) -> string; 9 | static auto create(const Font& font) -> HFONT; 10 | static auto free(HFONT hfont) -> void; 11 | }; 12 | 13 | } 14 | 15 | #endif 16 | -------------------------------------------------------------------------------- /hiro/windows/group.cpp: -------------------------------------------------------------------------------- 1 | #if defined(Hiro_Group) 2 | 3 | namespace hiro { 4 | 5 | auto pGroup::construct() -> void { 6 | } 7 | 8 | auto pGroup::destruct() -> void { 9 | } 10 | 11 | } 12 | 13 | #endif 14 | -------------------------------------------------------------------------------- /hiro/windows/group.hpp: -------------------------------------------------------------------------------- 1 | #if defined(Hiro_Group) 2 | 3 | namespace hiro { 4 | 5 | struct pGroup : pObject { 6 | Declare(Group, Object) 7 | }; 8 | 9 | } 10 | 11 | #endif 12 | -------------------------------------------------------------------------------- /hiro/windows/hiro.rc: -------------------------------------------------------------------------------- 1 | 1 24 "hiro.Manifest" 2 | -------------------------------------------------------------------------------- /hiro/windows/keyboard.hpp: -------------------------------------------------------------------------------- 1 | #if defined(Hiro_Keyboard) 2 | 3 | namespace hiro { 4 | 5 | struct pKeyboard { 6 | static auto poll() -> vector; 7 | static auto pressed(unsigned code) -> bool; 8 | 9 | static auto initialize() -> void; 10 | 11 | static auto _translate(unsigned code, unsigned flags) -> signed; 12 | 13 | static vector keycodes; 14 | }; 15 | 16 | } 17 | 18 | #endif 19 | -------------------------------------------------------------------------------- /hiro/windows/menu-bar.hpp: -------------------------------------------------------------------------------- 1 | #if defined(Hiro_MenuBar) 2 | 3 | namespace hiro { 4 | 5 | struct pMenuBar : pObject { 6 | Declare(MenuBar, Object) 7 | 8 | auto append(sMenu menu) -> void; 9 | auto remove(sMenu menu) -> void; 10 | auto setEnabled(bool enabled) -> void override; 11 | auto setFont(const Font& font) -> void override; 12 | auto setVisible(bool visible) -> void override; 13 | 14 | auto _parent() -> maybe; 15 | auto _update() -> void; 16 | 17 | HMENU hmenu = 0; 18 | vector objects; 19 | }; 20 | 21 | } 22 | 23 | #endif 24 | -------------------------------------------------------------------------------- /hiro/windows/message-window.hpp: -------------------------------------------------------------------------------- 1 | #if defined(Hiro_MessageWindow) 2 | 3 | namespace hiro { 4 | 5 | struct pMessageWindow { 6 | static auto error(MessageWindow::State& state) -> MessageWindow::Response; 7 | static auto information(MessageWindow::State& state) -> MessageWindow::Response; 8 | static auto question(MessageWindow::State& state) -> MessageWindow::Response; 9 | static auto warning(MessageWindow::State& state) -> MessageWindow::Response; 10 | }; 11 | 12 | } 13 | 14 | #endif 15 | -------------------------------------------------------------------------------- /hiro/windows/monitor.hpp: -------------------------------------------------------------------------------- 1 | #if defined(Hiro_Monitor) 2 | 3 | namespace hiro { 4 | 5 | struct pMonitor { 6 | static auto count() -> uint; 7 | static auto dpi(uint monitor) -> Position; 8 | static auto geometry(uint monitor) -> Geometry; 9 | static auto primary() -> uint; 10 | static auto workspace(uint monitor) -> Geometry; 11 | }; 12 | 13 | } 14 | 15 | #endif 16 | -------------------------------------------------------------------------------- /hiro/windows/mouse.cpp: -------------------------------------------------------------------------------- 1 | #if defined(Hiro_Mouse) 2 | 3 | namespace hiro { 4 | 5 | auto pMouse::position() -> Position { 6 | POINT point{}; 7 | GetCursorPos(&point); 8 | return {point.x, point.y}; 9 | } 10 | 11 | auto pMouse::pressed(Mouse::Button button) -> bool { 12 | switch(button) { 13 | case Mouse::Button::Left: return GetAsyncKeyState(VK_LBUTTON) & 0x8000; 14 | case Mouse::Button::Middle: return GetAsyncKeyState(VK_MBUTTON) & 0x8000; 15 | case Mouse::Button::Right: return GetAsyncKeyState(VK_RBUTTON) & 0x8000; 16 | } 17 | return false; 18 | } 19 | 20 | } 21 | 22 | #endif 23 | -------------------------------------------------------------------------------- /hiro/windows/mouse.hpp: -------------------------------------------------------------------------------- 1 | #if defined(Hiro_Mouse) 2 | 3 | namespace hiro { 4 | 5 | struct pMouse { 6 | static auto position() -> Position; 7 | static auto pressed(Mouse::Button button) -> bool; 8 | }; 9 | 10 | } 11 | 12 | #endif 13 | -------------------------------------------------------------------------------- /hiro/windows/popup-menu.hpp: -------------------------------------------------------------------------------- 1 | #if defined(Hiro_PopupMenu) 2 | 3 | namespace hiro { 4 | 5 | struct pPopupMenu : pObject { 6 | Declare(PopupMenu, Object) 7 | 8 | auto append(sAction action) -> void; 9 | auto remove(sAction action) -> void; 10 | auto setFont(const Font& font) -> void override; 11 | auto setVisible(bool visible) -> void override; 12 | 13 | HWND hwnd = nullptr; 14 | HMENU hmenu = nullptr; 15 | }; 16 | 17 | } 18 | 19 | #endif 20 | -------------------------------------------------------------------------------- /hiro/windows/sizable.cpp: -------------------------------------------------------------------------------- 1 | #if defined(Hiro_Sizable) 2 | 3 | namespace hiro { 4 | 5 | auto pSizable::construct() -> void { 6 | } 7 | 8 | auto pSizable::destruct() -> void { 9 | } 10 | 11 | auto pSizable::minimumSize() const -> Size { 12 | return {0, 0}; 13 | } 14 | 15 | auto pSizable::setCollapsible(bool collapsible) -> void { 16 | } 17 | 18 | auto pSizable::setGeometry(Geometry geometry) -> void { 19 | self().doSize(); 20 | } 21 | 22 | } 23 | 24 | #endif 25 | -------------------------------------------------------------------------------- /hiro/windows/sizable.hpp: -------------------------------------------------------------------------------- 1 | #if defined(Hiro_Sizable) 2 | 3 | namespace hiro { 4 | 5 | struct pSizable : pObject { 6 | Declare(Sizable, Object) 7 | 8 | virtual auto minimumSize() const -> Size; 9 | virtual auto setCollapsible(bool collapsible) -> void; 10 | virtual auto setGeometry(Geometry geometry) -> void; 11 | }; 12 | 13 | } 14 | 15 | #endif 16 | -------------------------------------------------------------------------------- /hiro/windows/status-bar.hpp: -------------------------------------------------------------------------------- 1 | #if defined(Hiro_StatusBar) 2 | 3 | namespace hiro { 4 | 5 | struct pStatusBar : pObject { 6 | Declare(StatusBar, Object) 7 | 8 | auto setEnabled(bool enabled) -> void override; 9 | auto setFont(const Font& font) -> void override; 10 | auto setText(const string& text) -> void; 11 | auto setVisible(bool visible) -> void override; 12 | 13 | auto _parent() -> maybe; 14 | 15 | HWND hwnd = 0; 16 | HFONT hfont = 0; 17 | }; 18 | 19 | } 20 | 21 | #endif 22 | -------------------------------------------------------------------------------- /hiro/windows/timer.hpp: -------------------------------------------------------------------------------- 1 | #if defined(Hiro_Timer) 2 | 3 | namespace hiro { 4 | 5 | struct pTimer : pObject { 6 | Declare(Timer, Object) 7 | 8 | auto setEnabled(bool enabled) -> void override; 9 | auto setInterval(uint interval) -> void; 10 | 11 | UINT_PTR htimer = 0; 12 | }; 13 | 14 | } 15 | 16 | #endif 17 | -------------------------------------------------------------------------------- /hiro/windows/tool-tip.hpp: -------------------------------------------------------------------------------- 1 | namespace hiro { 2 | 3 | struct pToolTip { 4 | enum : uint { Delay = 1000, Timeout = 10000 }; 5 | 6 | pToolTip(const string& text); 7 | ~pToolTip(); 8 | 9 | auto drawLayered() -> void; 10 | auto drawOpaque() -> void; 11 | auto show() -> void; 12 | auto hide() -> void; 13 | auto windowProc(HWND, UINT, WPARAM, LPARAM) -> maybe; 14 | 15 | HWND hwnd = nullptr; 16 | HTHEME htheme = nullptr; 17 | POINT position{}; 18 | SIZE size{}; 19 | POINT tracking{}; 20 | string text; 21 | Timer timeout; 22 | }; 23 | 24 | } 25 | -------------------------------------------------------------------------------- /hiro/windows/widget/check-label.hpp: -------------------------------------------------------------------------------- 1 | #if defined(Hiro_CheckLabel) 2 | 3 | namespace hiro { 4 | 5 | struct pCheckLabel : pWidget { 6 | Declare(CheckLabel, Widget) 7 | 8 | auto minimumSize() const -> Size override; 9 | auto setChecked(bool checked) -> void; 10 | auto setText(const string& text) -> void; 11 | 12 | auto onToggle() -> void; 13 | }; 14 | 15 | } 16 | 17 | #endif 18 | -------------------------------------------------------------------------------- /hiro/windows/widget/combo-button-item.hpp: -------------------------------------------------------------------------------- 1 | #if defined(Hiro_ComboButton) 2 | 3 | namespace hiro { 4 | 5 | struct pComboButtonItem : pObject { 6 | Declare(ComboButtonItem, Object) 7 | 8 | auto setIcon(const image& icon) -> void; 9 | auto setSelected() -> void; 10 | auto setText(const string& text) -> void; 11 | 12 | auto _parent() -> maybe; 13 | }; 14 | 15 | } 16 | 17 | #endif 18 | -------------------------------------------------------------------------------- /hiro/windows/widget/combo-button.hpp: -------------------------------------------------------------------------------- 1 | #if defined(Hiro_ComboButton) 2 | 3 | namespace hiro { 4 | 5 | struct pComboButton : pWidget { 6 | Declare(ComboButton, Widget) 7 | 8 | auto append(sComboButtonItem item) -> void; 9 | auto minimumSize() const -> Size override; 10 | auto remove(sComboButtonItem item) -> void; 11 | auto reset() -> void; 12 | auto setGeometry(Geometry geometry) -> void override; 13 | 14 | auto onChange() -> void; 15 | }; 16 | 17 | } 18 | 19 | #endif 20 | -------------------------------------------------------------------------------- /hiro/windows/widget/frame.hpp: -------------------------------------------------------------------------------- 1 | #if defined(Hiro_Frame) 2 | 3 | namespace hiro { 4 | 5 | struct pFrame : pWidget { 6 | Declare(Frame, Widget) 7 | 8 | auto append(sSizable sizable) -> void; 9 | auto remove(sSizable sizable) -> void; 10 | auto setEnabled(bool enabled) -> void override; 11 | auto setGeometry(Geometry geometry) -> void override; 12 | auto setText(const string& text) -> void; 13 | auto setVisible(bool visible) -> void override; 14 | }; 15 | 16 | } 17 | 18 | #endif 19 | -------------------------------------------------------------------------------- /hiro/windows/widget/horizontal-scroll-bar.hpp: -------------------------------------------------------------------------------- 1 | #if defined(Hiro_HorizontalScrollBar) 2 | 3 | namespace hiro { 4 | 5 | struct pHorizontalScrollBar : pWidget { 6 | Declare(HorizontalScrollBar, Widget) 7 | 8 | auto minimumSize() const -> Size override; 9 | auto setLength(unsigned length) -> void; 10 | auto setPosition(unsigned position) -> void; 11 | 12 | auto onChange(WPARAM wparam) -> void; 13 | }; 14 | 15 | } 16 | 17 | #endif 18 | -------------------------------------------------------------------------------- /hiro/windows/widget/horizontal-slider.hpp: -------------------------------------------------------------------------------- 1 | #if defined(Hiro_HorizontalSlider) 2 | 3 | namespace hiro { 4 | 5 | struct pHorizontalSlider : pWidget { 6 | Declare(HorizontalSlider, Widget) 7 | 8 | auto minimumSize() const -> Size override; 9 | auto setLength(unsigned length) -> void; 10 | auto setPosition(unsigned position) -> void; 11 | 12 | auto onChange() -> void; 13 | }; 14 | 15 | } 16 | 17 | #endif 18 | -------------------------------------------------------------------------------- /hiro/windows/widget/label.hpp: -------------------------------------------------------------------------------- 1 | #if defined(Hiro_Label) 2 | 3 | namespace hiro { 4 | 5 | struct pLabel : pWidget { 6 | Declare(Label, Widget) 7 | 8 | auto minimumSize() const -> Size override; 9 | auto setAlignment(Alignment alignment) -> void; 10 | auto setBackgroundColor(Color color) -> void; 11 | auto setForegroundColor(Color color) -> void; 12 | auto setText(const string& text) -> void; 13 | 14 | auto windowProc(HWND, UINT, WPARAM, LPARAM) -> maybe override; 15 | }; 16 | 17 | } 18 | 19 | #endif 20 | -------------------------------------------------------------------------------- /hiro/windows/widget/line-edit.hpp: -------------------------------------------------------------------------------- 1 | #if defined(Hiro_LineEdit) 2 | 3 | namespace hiro { 4 | 5 | struct pLineEdit : pWidget { 6 | Declare(LineEdit, Widget) 7 | 8 | auto minimumSize() const -> Size; 9 | auto setBackgroundColor(Color color) -> void; 10 | auto setEditable(bool editable) -> void; 11 | auto setForegroundColor(Color color) -> void; 12 | auto setText(const string& text) -> void; 13 | 14 | auto onChange() -> void; 15 | auto windowProc(HWND, UINT, WPARAM, LPARAM) -> maybe override; 16 | 17 | auto _text() -> string; 18 | 19 | HBRUSH backgroundBrush = nullptr; 20 | }; 21 | 22 | } 23 | 24 | #endif 25 | -------------------------------------------------------------------------------- /hiro/windows/widget/progress-bar.hpp: -------------------------------------------------------------------------------- 1 | #if defined(Hiro_ProgressBar) 2 | 3 | namespace hiro { 4 | 5 | struct pProgressBar : pWidget { 6 | Declare(ProgressBar, Widget) 7 | 8 | auto minimumSize() const -> Size override; 9 | auto setPosition(unsigned position) -> void; 10 | }; 11 | 12 | } 13 | 14 | #endif 15 | -------------------------------------------------------------------------------- /hiro/windows/widget/radio-label.hpp: -------------------------------------------------------------------------------- 1 | #if defined(Hiro_RadioLabel) 2 | 3 | namespace hiro { 4 | 5 | struct pRadioLabel : pWidget { 6 | Declare(RadioLabel, Widget) 7 | 8 | auto minimumSize() const -> Size override; 9 | auto setChecked() -> void; 10 | auto setGroup(sGroup group) -> void override; 11 | auto setText(const string& text) -> void; 12 | 13 | auto onActivate() -> void; 14 | }; 15 | 16 | } 17 | 18 | #endif 19 | -------------------------------------------------------------------------------- /hiro/windows/widget/tab-frame-item.hpp: -------------------------------------------------------------------------------- 1 | #if defined(Hiro_TabFrame) 2 | 3 | namespace hiro { 4 | 5 | struct pTabFrameItem : pObject { 6 | Declare(TabFrameItem, Object) 7 | 8 | auto append(sSizable sizable) -> void; 9 | auto remove(sSizable sizable) -> void; 10 | auto setClosable(bool closable) -> void; 11 | auto setIcon(const image& icon) -> void; 12 | auto setMovable(bool movable) -> void; 13 | auto setSelected() -> void; 14 | auto setText(const string& text) -> void; 15 | 16 | auto _parent() -> maybe; 17 | }; 18 | 19 | } 20 | 21 | #endif 22 | -------------------------------------------------------------------------------- /hiro/windows/widget/table-view-item.hpp: -------------------------------------------------------------------------------- 1 | #if defined(Hiro_TableView) 2 | 3 | namespace hiro { 4 | 5 | struct pTableViewItem : pObject { 6 | Declare(TableViewItem, Object) 7 | 8 | auto append(sTableViewCell cell) -> void; 9 | auto remove(sTableViewCell cell) -> void; 10 | auto setAlignment(Alignment alignment) -> void; 11 | auto setBackgroundColor(Color color) -> void; 12 | auto setFocused() -> void; 13 | auto setForegroundColor(Color color) -> void; 14 | auto setSelected(bool selected) -> void; 15 | 16 | auto _parent() -> maybe; 17 | auto _setState() -> void; 18 | }; 19 | 20 | } 21 | 22 | #endif 23 | -------------------------------------------------------------------------------- /hiro/windows/widget/vertical-scroll-bar.hpp: -------------------------------------------------------------------------------- 1 | #if defined(Hiro_VerticalScrollBar) 2 | 3 | namespace hiro { 4 | 5 | struct pVerticalScrollBar : pWidget { 6 | Declare(VerticalScrollBar, Widget) 7 | 8 | auto minimumSize() const -> Size override; 9 | auto setLength(unsigned length) -> void; 10 | auto setPosition(unsigned position) -> void; 11 | 12 | auto onChange(WPARAM wparam) -> void; 13 | }; 14 | 15 | } 16 | 17 | #endif 18 | -------------------------------------------------------------------------------- /hiro/windows/widget/vertical-slider.hpp: -------------------------------------------------------------------------------- 1 | #if defined(Hiro_VerticalSlider) 2 | 3 | namespace hiro { 4 | 5 | struct pVerticalSlider : pWidget { 6 | Declare(VerticalSlider, Widget) 7 | 8 | auto minimumSize() const -> Size; 9 | auto setLength(unsigned length) -> void; 10 | auto setPosition(unsigned position) -> void; 11 | 12 | auto onChange() -> void; 13 | }; 14 | 15 | } 16 | 17 | #endif 18 | -------------------------------------------------------------------------------- /hiro/windows/widget/viewport.hpp: -------------------------------------------------------------------------------- 1 | #if defined(Hiro_Viewport) 2 | 3 | namespace hiro { 4 | 5 | struct pViewport : pWidget { 6 | Declare(Viewport, Widget) 7 | 8 | auto handle() const -> uintptr_t; 9 | auto setDroppable(bool droppable) -> void override; 10 | auto setFocusable(bool focusable) -> void override; 11 | 12 | auto doMouseLeave() -> void override; 13 | auto doMouseMove(int x, int y) -> void override; 14 | auto windowProc(HWND, UINT, WPARAM, LPARAM) -> maybe override; 15 | }; 16 | 17 | } 18 | 19 | #endif 20 | -------------------------------------------------------------------------------- /libco/doc/examples/.gitignore: -------------------------------------------------------------------------------- 1 | test_args 2 | test_serialization 3 | test_timing 4 | *.o 5 | -------------------------------------------------------------------------------- /libco/doc/examples/build.bat: -------------------------------------------------------------------------------- 1 | cc -O3 -fomit-frame-pointer -I../.. -o libco.o -c ../../libco.c 2 | c++ -O3 -fomit-frame-pointer -I../.. -c test_timing.cpp 3 | c++ -O3 -fomit-frame-pointer -o test_timing libco.o test_timing.o 4 | c++ -O3 -fomit-frame-pointer -I../.. -c test_args.cpp 5 | c++ -O3 -fomit-frame-pointer -o test_args libco.o test_args.o 6 | c++ -O3 -fomit-frame-pointer -I../.. -c test_serialization.cpp 7 | c++ -O3 -fomit-frame-pointer -o test_serialization libco.o test_serialization.o 8 | @del *.o 9 | -------------------------------------------------------------------------------- /libco/doc/examples/build.sh: -------------------------------------------------------------------------------- 1 | cc -O3 -fomit-frame-pointer -I../.. -o libco.o -c ../../libco.c 2 | c++ -O3 -fomit-frame-pointer -I../.. -c test_timing.cpp 3 | c++ -O3 -fomit-frame-pointer -o test_timing libco.o test_timing.o 4 | c++ -O3 -fomit-frame-pointer -I../.. -c test_args.cpp 5 | c++ -O3 -fomit-frame-pointer -o test_args libco.o test_args.o 6 | c++ -O3 -fomit-frame-pointer -I../.. -c test_serialization.cpp 7 | c++ -O3 -fomit-frame-pointer -o test_serialization libco.o test_serialization.o 8 | rm -f *.o 9 | -------------------------------------------------------------------------------- /libco/doc/examples/test.h: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | 6 | #include 7 | -------------------------------------------------------------------------------- /libco/libco.h: -------------------------------------------------------------------------------- 1 | /* 2 | libco v20 (2019-10-16) 3 | author: byuu 4 | license: ISC 5 | */ 6 | 7 | #ifndef LIBCO_H 8 | #define LIBCO_H 9 | 10 | #ifdef __cplusplus 11 | extern "C" { 12 | #endif 13 | 14 | typedef void* cothread_t; 15 | 16 | cothread_t co_active(void); 17 | cothread_t co_derive(void*, unsigned int, void (*)(void)); 18 | cothread_t co_create(unsigned int, void (*)(void)); 19 | void co_delete(cothread_t); 20 | void co_switch(cothread_t); 21 | int co_serializable(void); 22 | 23 | #ifdef __cplusplus 24 | } 25 | #endif 26 | 27 | /* ifndef LIBCO_H */ 28 | #endif 29 | -------------------------------------------------------------------------------- /mkdocs.yml: -------------------------------------------------------------------------------- 1 | site_name: bsnes User Documentation 2 | repo_url: https://github.com/bsnes-emu/bsnes/ 3 | theme: readthedocs 4 | markdown_extensions: 5 | - smarty 6 | - toc: 7 | permalink: true 8 | - tables 9 | 10 | nav: 11 | - Introduction: README.md 12 | #- Tutorial: 13 | - How-To Guides: 14 | - Override a memory map: how-to/manifest.md 15 | #- Concepts: 16 | #- Reference: 17 | -------------------------------------------------------------------------------- /nall/cd/crc16.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | //CRC-16/KERMIT 4 | 5 | namespace nall::CD { 6 | 7 | inline auto CRC16(array_view data) -> uint16_t { 8 | uint16_t crc = 0; 9 | while(data) { 10 | crc ^= *data++ << 8; 11 | for(uint bit : range(8)) { 12 | crc = crc << 1 ^ (crc & 0x8000 ? 0x1021 : 0); 13 | } 14 | } 15 | return ~crc; 16 | } 17 | 18 | } 19 | -------------------------------------------------------------------------------- /nall/decode/mtf.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | //move to front 4 | 5 | namespace nall::Decode { 6 | 7 | inline auto MTF(array_view input) -> vector { 8 | vector output; 9 | output.resize(input.size()); 10 | 11 | uint8_t order[256]; 12 | for(uint n : range(256)) order[n] = n; 13 | 14 | for(uint offset : range(input.size())) { 15 | uint data = input[offset]; 16 | uint value = order[data]; 17 | output[offset] = value; 18 | memory::move(&order[1], &order[0], data); 19 | order[0] = value; 20 | } 21 | 22 | return output; 23 | } 24 | 25 | } 26 | -------------------------------------------------------------------------------- /nall/dsp/dsp.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | namespace nall::DSP { 4 | 5 | } 6 | -------------------------------------------------------------------------------- /nall/dsp/iir/dc-removal.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | //DC offset removal IIR filter 6 | 7 | namespace nall::DSP::IIR { 8 | 9 | struct DCRemoval { 10 | inline auto reset() -> void; 11 | inline auto process(double in) -> double; //normalized sample (-1.0 to +1.0) 12 | 13 | private: 14 | double x; 15 | double y; 16 | }; 17 | 18 | auto DCRemoval::reset() -> void { 19 | x = 0.0; 20 | y = 0.0; 21 | } 22 | 23 | auto DCRemoval::process(double in) -> double { 24 | x = 0.999 * x + in - y; 25 | y = in; 26 | return x; 27 | } 28 | 29 | } 30 | -------------------------------------------------------------------------------- /nall/encode/html.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | namespace nall::Encode { 4 | 5 | inline auto HTML(const string& input) -> string { 6 | string output; 7 | for(char c : input) { 8 | if(c == '&' ) { output.append("&" ); continue; } 9 | if(c == '<' ) { output.append("<" ); continue; } 10 | if(c == '>' ) { output.append(">" ); continue; } 11 | if(c == '"' ) { output.append("""); continue; } 12 | if(c == '\'') { output.append("'"); continue; } 13 | output.append(c); 14 | } 15 | return output; 16 | } 17 | 18 | } 19 | -------------------------------------------------------------------------------- /nall/inline-if.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #warning "these defines break if statements with multiple parameters to templates" 3 | 4 | #define if1(statement) if(statement) 5 | #define if2(condition, false) ([&](auto&& value) -> decltype(condition) { \ 6 | return (bool)value ? value : (decltype(condition))false; \ 7 | })(condition) 8 | #define if3(condition, true, false) ((condition) ? (true) : (decltype(true))(false)) 9 | #define if4(type, condition, true, false) ((condition) ? (type)(true) : (type)(false)) 10 | #define if_(_1, _2, _3, _4, name, ...) name 11 | #define if(...) if_(__VA_ARGS__, if4, if3, if2, if1)(__VA_ARGS__) 12 | -------------------------------------------------------------------------------- /nall/macos/guard.hpp: -------------------------------------------------------------------------------- 1 | #ifndef NALL_MACOS_GUARD_HPP 2 | #define NALL_MACOS_GUARD_HPP 3 | 4 | #define Boolean CocoaBoolean 5 | #define decimal CocoaDecimal 6 | #define DEBUG CocoaDebug 7 | 8 | #else 9 | #undef NALL_MACOS_GUARD_HPP 10 | 11 | #undef Boolean 12 | #undef decimal 13 | #undef DEBUG 14 | 15 | #endif 16 | -------------------------------------------------------------------------------- /nall/service.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | //service model template built on top of shared-memory 4 | 5 | #include 6 | 7 | #if defined(API_POSIX) 8 | #include 9 | #endif 10 | 11 | #if defined(API_WINDOWS) 12 | #include 13 | #endif 14 | -------------------------------------------------------------------------------- /nall/shared-memory.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | 6 | #if defined(API_POSIX) 7 | #include 8 | #endif 9 | 10 | #if defined(API_WINDOWS) 11 | #include 12 | #endif 13 | -------------------------------------------------------------------------------- /nall/simd.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | namespace nall { 4 | 5 | #if defined(__AVX2__) 6 | #define SIMD 256 7 | #define SIMD_AVX2 8 | #include 9 | #endif 10 | 11 | } 12 | -------------------------------------------------------------------------------- /nall/string/atoi.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | namespace nall { 4 | 5 | auto string::boolean() const -> bool { 6 | return equals("true"); 7 | } 8 | 9 | auto string::integer() const -> intmax { 10 | return toInteger(data()); 11 | } 12 | 13 | auto string::natural() const -> uintmax { 14 | return toNatural(data()); 15 | } 16 | 17 | auto string::hex() const -> uintmax { 18 | return toHex(data()); 19 | } 20 | 21 | auto string::real() const -> double { 22 | return toReal(data()); 23 | } 24 | 25 | } 26 | -------------------------------------------------------------------------------- /nall/vector/compare.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | namespace nall { 4 | 5 | template auto vector::operator==(const vector& source) const -> bool { 6 | if(this == &source) return true; 7 | if(size() != source.size()) return false; 8 | for(uint64_t n = 0; n < size(); n++) { 9 | if(operator[](n) != source[n]) return false; 10 | } 11 | return true; 12 | } 13 | 14 | template auto vector::operator!=(const vector& source) const -> bool { 15 | return !operator==(source); 16 | } 17 | 18 | } 19 | -------------------------------------------------------------------------------- /nall/vfs.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | -------------------------------------------------------------------------------- /nall/view.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | namespace nall { 4 | 5 | template struct view; 6 | 7 | } 8 | -------------------------------------------------------------------------------- /nall/windows/guard.hpp: -------------------------------------------------------------------------------- 1 | #ifndef NALL_WINDOWS_GUARD_HPP 2 | #define NALL_WINDOWS_GUARD_HPP 3 | 4 | #define boolean WindowsBoolean 5 | #define interface WindowsInterface 6 | 7 | #undef UNICODE 8 | #undef WINVER 9 | #undef WIN32_LEAN_AND_MEAN 10 | #undef _WIN32_WINNT 11 | #undef NOMINMAX 12 | #undef PATH_MAX 13 | 14 | #define UNICODE 15 | #define WINVER 0x0601 16 | #define WIN32_LEAN_AND_MEAN 17 | #define _WIN32_WINNT WINVER 18 | #define NOMINMAX 19 | #define PATH_MAX 260 20 | 21 | #else 22 | #undef NALL_WINDOWS_GUARD_HPP 23 | 24 | #undef boolean 25 | #undef interface 26 | 27 | #undef far 28 | #undef near 29 | 30 | #endif 31 | -------------------------------------------------------------------------------- /nall/windows/guid.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | namespace nall { 6 | 7 | inline auto guid() -> string { 8 | GUID guidInstance; 9 | CoCreateGuid(&guidInstance); 10 | 11 | wchar_t guidString[39]; 12 | StringFromGUID2(guidInstance, guidString, 39); 13 | 14 | return (char*)utf8_t(guidString); 15 | } 16 | 17 | } 18 | -------------------------------------------------------------------------------- /nall/windows/service.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | namespace nall { 4 | 5 | struct service { 6 | explicit operator bool() const { return false; } 7 | auto command(const string& name, const string& command) -> bool { return false; } 8 | auto receive() -> string { return ""; } 9 | auto name() const -> string { return ""; } 10 | auto stop() const -> bool { return false; } 11 | }; 12 | 13 | } 14 | -------------------------------------------------------------------------------- /nall/xorg/clipboard.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | namespace nall::Clipboard { 6 | 7 | auto clear() -> void { 8 | XDisplay display; 9 | if(auto atom = XInternAtom(display, "CLIPBOARD", XlibTrue)) { 10 | XSetSelectionOwner(display, atom, XlibNone, XlibCurrentTime); 11 | } 12 | } 13 | 14 | } 15 | -------------------------------------------------------------------------------- /nall/xorg/xorg.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | 11 | struct XDisplay { 12 | XDisplay() { _display = XOpenDisplay(nullptr); } 13 | ~XDisplay() { XCloseDisplay(_display); } 14 | operator XlibDisplay*() const { return _display; } 15 | 16 | private: 17 | XlibDisplay* _display; 18 | }; 19 | -------------------------------------------------------------------------------- /ruby/video/opengl/texture.hpp: -------------------------------------------------------------------------------- 1 | auto OpenGLTexture::getFormat() const -> GLuint { 2 | if(format == GL_R32I) return GL_RED_INTEGER; 3 | if(format == GL_R32UI) return GL_RED_INTEGER; 4 | return GL_BGRA; 5 | } 6 | 7 | auto OpenGLTexture::getType() const -> GLuint { 8 | if(format == GL_R32I) return GL_UNSIGNED_INT; 9 | if(format == GL_R32UI) return GL_UNSIGNED_INT; 10 | if(format == GL_RGB10_A2) return GL_UNSIGNED_INT_2_10_10_10_REV; 11 | return GL_UNSIGNED_INT_8_8_8_8_REV; 12 | } 13 | -------------------------------------------------------------------------------- /shaders/AANN.shader/manifest.bml: -------------------------------------------------------------------------------- 1 | input 2 | filter: nearest 3 | 4 | program 5 | fragment: AANN.fs 6 | 7 | output 8 | filter: nearest -------------------------------------------------------------------------------- /shaders/CRT-Geom.shader/curvature.fs: -------------------------------------------------------------------------------- 1 | #version 150 2 | #define distortion 0.08 3 | 4 | uniform sampler2D source[]; 5 | uniform vec4 sourceSize[]; 6 | 7 | in Vertex { 8 | vec2 texCoord; 9 | }; 10 | 11 | out vec4 fragColor; 12 | 13 | vec2 radialDistortion(vec2 coord) { 14 | vec2 cc = coord - vec2(0.5); 15 | float dist = dot(cc, cc) * distortion; 16 | return coord + cc * (1.0 - dist) * dist; 17 | } 18 | 19 | void main(void) { 20 | fragColor = texture(source[0], radialDistortion(texCoord)); 21 | } 22 | -------------------------------------------------------------------------------- /shaders/CRT-Geom.shader/manifest.bml: -------------------------------------------------------------------------------- 1 | program 2 | vertex: crt-geom.vs 3 | fragment: crt-geom.fs 4 | modulo: 2 5 | 6 | -------------------------------------------------------------------------------- /shaders/CRT-Glow.shader/blur_horiz.vs: -------------------------------------------------------------------------------- 1 | #version 150 2 | 3 | in vec4 position; 4 | in vec2 texCoord; 5 | 6 | out Vertex { 7 | vec2 vTexCoord; 8 | }; 9 | 10 | uniform vec4 targetSize; 11 | uniform vec4 sourceSize[]; 12 | 13 | void main() { 14 | gl_Position = position; 15 | vTexCoord = texCoord; 16 | } -------------------------------------------------------------------------------- /shaders/CRT-Glow.shader/blur_vert.vs: -------------------------------------------------------------------------------- 1 | #version 150 2 | 3 | in vec4 position; 4 | in vec2 texCoord; 5 | 6 | out Vertex { 7 | vec2 vTexCoord; 8 | }; 9 | 10 | void main() { 11 | gl_Position = position; 12 | vTexCoord = texCoord; 13 | } -------------------------------------------------------------------------------- /shaders/CRT-Glow.shader/gauss_horiz.vs: -------------------------------------------------------------------------------- 1 | #version 150 2 | 3 | in vec4 position; 4 | in vec2 texCoord; 5 | 6 | out Vertex { 7 | vec2 vTexCoord; 8 | float data_pix_no; 9 | float data_one; 10 | }; 11 | 12 | uniform vec4 sourceSize[]; 13 | 14 | void main() { 15 | gl_Position = position; 16 | vTexCoord = texCoord; 17 | 18 | data_pix_no = vTexCoord.x * sourceSize[0].x; 19 | data_one = sourceSize[0].z; 20 | } -------------------------------------------------------------------------------- /shaders/CRT-Glow.shader/gauss_vert.vs: -------------------------------------------------------------------------------- 1 | #version 150 2 | 3 | in vec4 position; 4 | in vec2 texCoord; 5 | 6 | out Vertex { 7 | vec2 vTexCoord; 8 | vec2 data_pix_no; 9 | float data_one; 10 | }; 11 | 12 | uniform vec4 sourceSize[]; 13 | 14 | void main() { 15 | gl_Position = position; 16 | vTexCoord = texCoord; 17 | 18 | data_pix_no = vTexCoord.xy * sourceSize[0].xy - vec2(0.0, 0.5); 19 | data_one = sourceSize[0].w; 20 | } -------------------------------------------------------------------------------- /shaders/CRT-Glow.shader/lanczos_horiz.fs: -------------------------------------------------------------------------------- 1 | #version 150 2 | 3 | uniform sampler2D source[]; 4 | 5 | in Vertex { 6 | vec2 vTexCoord; 7 | }; 8 | 9 | out vec4 FragColor; 10 | 11 | void main() { 12 | FragColor = texture(source[0], vTexCoord); 13 | } -------------------------------------------------------------------------------- /shaders/CRT-Glow.shader/lanczos_horiz.vs: -------------------------------------------------------------------------------- 1 | #version 150 2 | 3 | in vec4 position; 4 | in vec2 texCoord; 5 | 6 | out Vertex { 7 | vec2 vTexCoord; 8 | }; 9 | 10 | uniform vec4 sourceSize[]; 11 | 12 | void main() { 13 | gl_Position = position; 14 | vTexCoord = texCoord; 15 | } -------------------------------------------------------------------------------- /shaders/CRT-Glow.shader/linearize.fs: -------------------------------------------------------------------------------- 1 | #version 150 2 | 3 | #define INPUT_GAMMA 2.2 4 | 5 | uniform sampler2D source[]; 6 | 7 | in Vertex { 8 | vec2 vTexCoord; 9 | }; 10 | 11 | out vec4 FragColor; 12 | 13 | void main() { 14 | FragColor = pow(texture(source[0], vTexCoord), vec4(INPUT_GAMMA)); 15 | } -------------------------------------------------------------------------------- /shaders/CRT-Glow.shader/linearize.vs: -------------------------------------------------------------------------------- 1 | #version 150 2 | 3 | in vec4 position; 4 | in vec2 texCoord; 5 | 6 | out Vertex { 7 | vec2 vTexCoord; 8 | }; 9 | 10 | uniform vec4 sourceSize[]; 11 | 12 | void main() { 13 | gl_Position = position; 14 | vTexCoord = texCoord; 15 | } -------------------------------------------------------------------------------- /shaders/CRT-Glow.shader/resolve.vs: -------------------------------------------------------------------------------- 1 | #version 150 2 | 3 | in vec4 position; 4 | in vec2 texCoord; 5 | 6 | out Vertex { 7 | vec2 vTexCoord; 8 | }; 9 | 10 | void main() { 11 | gl_Position = position; 12 | vTexCoord = texCoord; 13 | } -------------------------------------------------------------------------------- /shaders/CRT-Glow.shader/threshold.fs: -------------------------------------------------------------------------------- 1 | #version 150 2 | 3 | #define GLOW_WHITEPOINT 1.0 4 | #define GLOW_ROLLOFF 3.0 5 | 6 | uniform sampler2D source[]; 7 | 8 | in Vertex { 9 | vec2 vTexCoord; 10 | }; 11 | 12 | out vec4 FragColor; 13 | 14 | void main() { 15 | vec3 color = 1.15 * texture(source[0], vTexCoord).rgb; 16 | vec3 factor = clamp(color / GLOW_WHITEPOINT, 0.0, 1.0); 17 | 18 | FragColor = vec4(pow(factor, vec3(GLOW_ROLLOFF)), 1.0); 19 | } -------------------------------------------------------------------------------- /shaders/CRT-Glow.shader/threshold.vs: -------------------------------------------------------------------------------- 1 | #version 150 2 | 3 | in vec4 position; 4 | in vec2 texCoord; 5 | 6 | out Vertex { 7 | vec2 vTexCoord; 8 | }; 9 | 10 | void main() { 11 | gl_Position = position; 12 | vTexCoord = texCoord; 13 | } -------------------------------------------------------------------------------- /shaders/CRT-Lottes.shader/bloompass.vs: -------------------------------------------------------------------------------- 1 | #version 150 2 | 3 | in vec4 position; 4 | in vec2 texCoord; 5 | 6 | out Vertex { 7 | vec2 vTexCoord; 8 | }; 9 | 10 | uniform vec4 sourceSize[]; 11 | 12 | void main() { 13 | gl_Position = position; 14 | vTexCoord = texCoord; 15 | } -------------------------------------------------------------------------------- /shaders/CRT-Lottes.shader/manifest.bml: -------------------------------------------------------------------------------- 1 | input 2 | filter: nearest 3 | 4 | program 5 | filter: nearest 6 | format: srgb8 7 | height: 100% 8 | width: 100% 9 | vertex: bloompass.vs 10 | fragment: bloompass.fs 11 | 12 | program 13 | filter: nearest 14 | vertex: scanpass.vs 15 | fragment: scanpass.fs 16 | 17 | output 18 | filter: linear -------------------------------------------------------------------------------- /shaders/CRT-Lottes.shader/scanpass.vs: -------------------------------------------------------------------------------- 1 | #version 150 2 | 3 | in vec4 position; 4 | in vec2 texCoord; 5 | 6 | out Vertex { 7 | vec2 vTexCoord; 8 | }; 9 | 10 | uniform vec4 sourceSize[]; 11 | 12 | void main() { 13 | gl_Position = position; 14 | vTexCoord = texCoord; 15 | } -------------------------------------------------------------------------------- /shaders/CRT-Royale.shader/textures/TileableLinearApertureGrille15Wide8And5d5Spacing.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsnes-emu/bsnes/b815744b4cff6d6854090545b78ae8e1a6669976/shaders/CRT-Royale.shader/textures/TileableLinearApertureGrille15Wide8And5d5Spacing.png -------------------------------------------------------------------------------- /shaders/CRT-Royale.shader/textures/TileableLinearApertureGrille15Wide8And5d5SpacingResizeTo64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsnes-emu/bsnes/b815744b4cff6d6854090545b78ae8e1a6669976/shaders/CRT-Royale.shader/textures/TileableLinearApertureGrille15Wide8And5d5SpacingResizeTo64.png -------------------------------------------------------------------------------- /shaders/CRT-Royale.shader/textures/TileableLinearShadowMask.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsnes-emu/bsnes/b815744b4cff6d6854090545b78ae8e1a6669976/shaders/CRT-Royale.shader/textures/TileableLinearShadowMask.png -------------------------------------------------------------------------------- /shaders/CRT-Royale.shader/textures/TileableLinearShadowMaskEDP.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsnes-emu/bsnes/b815744b4cff6d6854090545b78ae8e1a6669976/shaders/CRT-Royale.shader/textures/TileableLinearShadowMaskEDP.png -------------------------------------------------------------------------------- /shaders/CRT-Royale.shader/textures/TileableLinearShadowMaskEDPResizeTo64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsnes-emu/bsnes/b815744b4cff6d6854090545b78ae8e1a6669976/shaders/CRT-Royale.shader/textures/TileableLinearShadowMaskEDPResizeTo64.png -------------------------------------------------------------------------------- /shaders/CRT-Royale.shader/textures/TileableLinearShadowMaskResizeTo64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsnes-emu/bsnes/b815744b4cff6d6854090545b78ae8e1a6669976/shaders/CRT-Royale.shader/textures/TileableLinearShadowMaskResizeTo64.png -------------------------------------------------------------------------------- /shaders/CRT-Royale.shader/textures/TileableLinearSlotMaskTall15Wide9And4d5Horizontal9d14VerticalSpacing.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsnes-emu/bsnes/b815744b4cff6d6854090545b78ae8e1a6669976/shaders/CRT-Royale.shader/textures/TileableLinearSlotMaskTall15Wide9And4d5Horizontal9d14VerticalSpacing.png -------------------------------------------------------------------------------- /shaders/CRT-Royale.shader/textures/TileableLinearSlotMaskTall15Wide9And4d5Horizontal9d14VerticalSpacingResizeTo64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsnes-emu/bsnes/b815744b4cff6d6854090545b78ae8e1a6669976/shaders/CRT-Royale.shader/textures/TileableLinearSlotMaskTall15Wide9And4d5Horizontal9d14VerticalSpacingResizeTo64.png -------------------------------------------------------------------------------- /shaders/GTU.shader/manifest.bml: -------------------------------------------------------------------------------- 1 | program 2 | width: 100% 3 | height: 100% 4 | format: rgba32f 5 | filter: nearest 6 | wrap: edge 7 | fragment: GTU-pass1.fs 8 | program 9 | height: 100% 10 | format: rgba32f 11 | filter: nearest 12 | wrap: edge 13 | vertex: GTU-pass2.vs 14 | fragment: GTU-pass2.fs 15 | program 16 | height: 100% 17 | format: rgba32f 18 | filter: nearest 19 | wrap: edge 20 | fragment: GTU-pass3.fs 21 | program 22 | format: rgba8 23 | filter: nearest 24 | wrap: edge 25 | vertex: GTU-pass4.vs 26 | fragment: GTU-pass4.fs 27 | output 28 | filter: nearest -------------------------------------------------------------------------------- /shaders/LCD-cgwg.shader/manifest.bml: -------------------------------------------------------------------------------- 1 | settings 2 | persistence: 0.5 3 | red: vec3(1,0,0) 4 | green: vec3(0,1,0) 5 | blue: vec3(0,0,1) 6 | gain: 1.0 7 | gamma: 3.0 8 | blacklevel: 0.05 9 | ambient: 0.0 10 | BGR 11 | 12 | input 13 | history: 8 14 | filter: nearest 15 | 16 | program 17 | fragment: motion-blur.fs 18 | filter: nearest 19 | width: 100% 20 | height: 100% 21 | 22 | program 23 | fragment: lcd-grid.fs -------------------------------------------------------------------------------- /shaders/MDAPT-Dedithering.shader/manifest.bml: -------------------------------------------------------------------------------- 1 | program 2 | width: 100% 3 | height: 100% 4 | filter: nearest 5 | fragment: mdapt-pass1.fs 6 | wrap: edge 7 | program 8 | width: 100% 9 | height: 100% 10 | filter: nearest 11 | fragment: mdapt-pass2.fs 12 | wrap: edge 13 | program 14 | width: 100% 15 | height: 100% 16 | filter: nearest 17 | fragment: mdapt-pass3.fs 18 | wrap: edge 19 | program 20 | width: 100% 21 | height: 100% 22 | filter: nearest 23 | fragment: mdapt-pass4.fs 24 | wrap: edge -------------------------------------------------------------------------------- /shaders/NTSC-MAME.shader/mame-ntsc.vs: -------------------------------------------------------------------------------- 1 | #version 150 2 | 3 | in vec4 position; 4 | in vec2 texCoord; 5 | 6 | out Vertex { 7 | vec2 vTexCoord; 8 | }; 9 | 10 | void main() { 11 | gl_Position = position; 12 | vTexCoord = texCoord; 13 | } -------------------------------------------------------------------------------- /shaders/NTSC-MAME.shader/mame-postproc.vs: -------------------------------------------------------------------------------- 1 | #version 150 2 | 3 | in vec4 position; 4 | in vec2 texCoord; 5 | 6 | out Vertex { 7 | vec2 vTexCoord; 8 | }; 9 | 10 | uniform vec4 targetSize; 11 | uniform vec4 sourceSize[]; 12 | 13 | void main() { 14 | gl_Position = position; 15 | vTexCoord = texCoord; 16 | } -------------------------------------------------------------------------------- /shaders/NTSC-MAME.shader/manifest.bml: -------------------------------------------------------------------------------- 1 | input 2 | filter: linear 3 | 4 | program 5 | filter: linear 6 | height: 100% 7 | width: 100% 8 | vertex: mame-ntsc.vs 9 | fragment: mame-ntsc.fs 10 | 11 | program 12 | filter: linear 13 | modulo: 270.0 14 | vertex: mame-postproc.vs 15 | fragment: mame-postproc.fs 16 | 17 | output 18 | height: 0 19 | width: 0 20 | filter: linear -------------------------------------------------------------------------------- /shaders/NTSC.shader/manifest.bml: -------------------------------------------------------------------------------- 1 | input 2 | filter: nearest 3 | format: rgba16f 4 | 5 | program 6 | filter: nearest 7 | format: rgba16f 8 | width: 400% 9 | height: 100% 10 | modulo: 2 11 | fragment: ntsc-pass1.fs 12 | 13 | program 14 | filter: nearest 15 | format: rgba16f 16 | width: 50% 17 | height: 100% 18 | fragment: ntsc-pass2.fs 19 | 20 | program 21 | filter: linear 22 | width: 100% 23 | height: 100% 24 | 25 | output 26 | filter: nearest -------------------------------------------------------------------------------- /shaders/PAL-Composite.shader/manifest.bml: -------------------------------------------------------------------------------- 1 | input 2 | filter: nearest 3 | 4 | program 5 | filter: nearest 6 | height: 100% 7 | fragment: pal-r57shell.fs 8 | 9 | output 10 | height: 0 11 | filter: linear -------------------------------------------------------------------------------- /shaders/Pixellate.shader/manifest.bml: -------------------------------------------------------------------------------- 1 | program 2 | filter: nearest 3 | wrap: edge 4 | fragment: pixellate.fs 5 | 6 | output 7 | filter: nearest 8 | -------------------------------------------------------------------------------- /shaders/Retro.shader/manifest.bml: -------------------------------------------------------------------------------- 1 | program 2 | filter: nearest 3 | fragment: retro.fs 4 | 5 | program 6 | filter: nearest 7 | fragment: gamma.fs 8 | 9 | output 10 | filter: nearest 11 | width: 0 12 | height: 0 -------------------------------------------------------------------------------- /shaders/ScaleFX.shader/scalefx-pass0.vs: -------------------------------------------------------------------------------- 1 | #version 150 2 | 3 | in vec4 position; 4 | in vec2 texCoord; 5 | 6 | out Vertex { 7 | vec2 vTexCoord; 8 | }; 9 | 10 | void main() { 11 | gl_Position = position; 12 | vTexCoord = texCoord; 13 | } -------------------------------------------------------------------------------- /shaders/ScaleFX.shader/scalefx-pass1.vs: -------------------------------------------------------------------------------- 1 | #version 150 2 | 3 | in vec4 position; 4 | in vec2 texCoord; 5 | 6 | out Vertex { 7 | vec2 vTexCoord; 8 | }; 9 | 10 | uniform vec4 targetSize; 11 | uniform vec4 sourceSize[]; 12 | 13 | void main() { 14 | gl_Position = position; 15 | vTexCoord = texCoord; 16 | } -------------------------------------------------------------------------------- /shaders/ScaleFX.shader/scalefx-pass2.vs: -------------------------------------------------------------------------------- 1 | #version 150 2 | 3 | in vec4 position; 4 | in vec2 texCoord; 5 | 6 | out Vertex { 7 | vec2 vTexCoord; 8 | }; 9 | 10 | uniform vec4 targetSize; 11 | uniform vec4 sourceSize[]; 12 | 13 | void main() { 14 | gl_Position = position; 15 | vTexCoord = texCoord; 16 | } -------------------------------------------------------------------------------- /shaders/ScaleFX.shader/scalefx-pass3.vs: -------------------------------------------------------------------------------- 1 | #version 150 2 | 3 | in vec4 position; 4 | in vec2 texCoord; 5 | 6 | out Vertex { 7 | vec2 vTexCoord; 8 | }; 9 | 10 | uniform vec4 targetSize; 11 | uniform vec4 sourceSize[]; 12 | 13 | void main() { 14 | gl_Position = position; 15 | vTexCoord = texCoord; 16 | } -------------------------------------------------------------------------------- /shaders/ScaleFX.shader/scalefx-pass4.vs: -------------------------------------------------------------------------------- 1 | #version 150 2 | 3 | in vec4 position; 4 | in vec2 texCoord; 5 | 6 | out Vertex { 7 | vec2 vTexCoord; 8 | }; 9 | 10 | uniform vec4 targetSize; 11 | uniform vec4 sourceSize[]; 12 | 13 | void main() { 14 | gl_Position = position; 15 | vTexCoord = texCoord; 16 | } -------------------------------------------------------------------------------- /shaders/Sharp-Bilinear.shader/manifest.bml: -------------------------------------------------------------------------------- 1 | input 2 | filter: linear 3 | 4 | program 5 | fragment: sharp-bilinear.fs 6 | 7 | output 8 | filter: linear -------------------------------------------------------------------------------- /shaders/xBR-mode7-480p.shader/manifest.bml: -------------------------------------------------------------------------------- 1 | program 2 | width: 100% 3 | height: 100% 4 | filter: nearest 5 | fragment: super-2xbr-3d-pass0.fs 6 | 7 | program 8 | width: 100% 9 | height: 100% 10 | filter: nearest 11 | fragment: super-2xbr-3d-pass1.fs 12 | 13 | program 14 | width: 100% 15 | height: 100% 16 | filter: nearest 17 | vertex: super-2xbr-3d-pass2.vs 18 | fragment: super-2xbr-3d-pass2.fs 19 | 20 | program 21 | width: 200% 22 | height: 200% 23 | filter: nearest 24 | fragment: custom-jinc2-sharper.fs 25 | 26 | output 27 | filter: linear -------------------------------------------------------------------------------- /shaders/xBRZ.shader/manifest.bml: -------------------------------------------------------------------------------- 1 | input 2 | filter: nearest 3 | 4 | program 5 | filter: nearest 6 | fragment: xBRZ-Freescale-p0.fs 7 | 8 | program 9 | filter: nearest 10 | fragment: xBRZ-Freescale-p1.fs 11 | 12 | program 13 | filter: linear 14 | fragment: fxaa.fs 15 | 16 | output 17 | filter: linear -------------------------------------------------------------------------------- /sourcery/GNUmakefile: -------------------------------------------------------------------------------- 1 | name := sourcery 2 | build := stable 3 | flags += -I.. 4 | 5 | nall.path := ../nall 6 | include $(nall.path)/GNUmakefile 7 | 8 | objects := obj/sourcery.o 9 | 10 | obj/sourcery.o: sourcery.cpp 11 | 12 | all: $(objects) 13 | $(info Linking out/$(name) ...) 14 | +@$(compiler) -o out/$(name) $(objects) $(options) 15 | 16 | verbose: nall.verbose all; 17 | 18 | clean: 19 | $(call delete,obj/*) 20 | $(call delete,out/*) 21 | 22 | install: all 23 | cp out/$(name) $(prefix)/bin/$(name) 24 | 25 | uninstall: 26 | rm -f $(prefix)/bin/$(name) 27 | -------------------------------------------------------------------------------- /sourcery/obj/.gitignore: -------------------------------------------------------------------------------- 1 | *.o 2 | *.d 3 | -------------------------------------------------------------------------------- /sourcery/out/.gitignore: -------------------------------------------------------------------------------- 1 | sourcery 2 | --------------------------------------------------------------------------------