diff --git a/doc/DevInfo.txt b/doc/DevInfo.txt index e574727d..2ba9c5c1 100644 --- a/doc/DevInfo.txt +++ b/doc/DevInfo.txt @@ -16,6 +16,7 @@ Known preprocessor switches: - NO_D3D: Exclude Direct3D code - NO_OAL: Exclude OpenAL code - NO_XAUDIO2: Exclude XAudio2 code (the XAudio2 interface is DirectSound's successor) +- NO_LINK: Exclude linking code (joybus, multilink, ...) - WIN64: This macro is only defined for 64 bit builds @@ -35,19 +36,24 @@ They are built with the static C runtime (this is what the release builds use). -################################# -# Visual C++ 2008 project files # -################################# - -Using Microsoft Visual C++ 2008, you can build the Windows/MFC version. -Refer to the instructions below for further assistance: +########################### +# --- Build Systems --- # +########################### ===Win32/MFC=== This is the full-featured Windows build using the MFC GUI. The project files are located in /project/vc2008_mfc (VBA2008.sln) and /project/vs2010_mfc (VBA2010.sln). You also have to install Microsoft's DirectX SDK for Direct3D, DirectInput & XAudio2. -If you want to enable OpenAL sound output, install the OpenAL SDK. If you do not want it, #define NO_OAL. -Some pixel filters come with assembler code, which is compatible to the NASM syntax. -Install NASM somewhere and add it to your compiler's executable file paths. -All .asm files will be handled with the "nasm.rules" build rules file which comes with this project file. -SubWCRev.exe is used to append the svn versioning to the output executable, this should already be present if you pulled from the svn, but will require installing if you downloaded the project as a tarball. \ No newline at end of file +If you want to enable OpenAL sound output, install the OpenAL SDK. If you do not want it, add NO_OAL to the VBA-M project's preprocessor definitions. +SubWCRev.exe is used to append the svn versioning to the output executable, this should already be present if you pulled from the svn, but will require installing if you downloaded the project as a tarball. +All other dependencies for MSVC builds may be found in the ../dependencies directory (above /trunk). +Normally, Windows users will want to checkout the root of the repository instead of just the trunk directory. Afterwards, simply opening the .sln of choice, setting preprocessor definitions, and hitting build is all that's required. + +===*nix/GTK=== +This is the standard build configuration on non-Windows. +Running cmake will inform you of any packages you need to install. + +===*/wxw=== +The wxWidgets interface is an in-development frontend meant to be more cross-platform friendly than MFC and GTK. +Running cmake will inform you of any packages you need to install. +NOTE: In addition to what cmake currently checks for, you will also need the wxrc tool and libgdiplus. \ No newline at end of file diff --git a/src/Util.cpp b/src/Util.cpp index bb346a09..95b1028d 100644 --- a/src/Util.cpp +++ b/src/Util.cpp @@ -442,6 +442,11 @@ static bool utilIsImage(const char *file) IMAGE_TYPE utilFindType(const char *file) { char buffer [2048]; + return utilFindType(file, buffer); +} + +IMAGE_TYPE utilFindType(const char *file, char (&buffer)[2048]) +{ #ifdef WIN32 DWORD dwNum = MultiByteToWideChar (CP_ACP, 0, file, -1, NULL, 0); wchar_t *pwText; diff --git a/src/Util.h b/src/Util.h index cee770be..7393e7a2 100644 --- a/src/Util.h +++ b/src/Util.h @@ -23,6 +23,7 @@ bool utilIsGBImage(const char *); bool utilIsGzipFile(const char *); void utilStripDoubleExtension(const char *, char *); IMAGE_TYPE utilFindType(const char *); +IMAGE_TYPE utilFindType(const char *, char (&)[2048]); u8 *utilLoad(const char *, bool (*)(const char*), u8 *, int &); void utilPutDword(u8 *, u32); diff --git a/src/wx/opts.cpp b/src/wx/opts.cpp index 4928a578..fe7d4434 100644 --- a/src/wx/opts.cpp +++ b/src/wx/opts.cpp @@ -126,10 +126,12 @@ wxAcceleratorEntry_v sys_accels; // Note: this table must be sorted in option name order // Both for better user display and for (fast) searching by name opt_desc opts[] = { + + /// Display BOOLOPT("Display/Bilinear", wxTRANSLATE("Use bilinear filter with 3d renderer"), gopts.bilinear), BOOLOPT("Display/DisableStatus", wxTRANSLATE("Disable on-screen status messages"), gopts.no_osd_status), #ifdef MMX - BOOLOPT("Display/EnableMMX", wxTRANSLATE("Enable MMX"), cpu_mmx), + BOOLOPT("Display/EnableMMX", wxTRANSLATE("Enable MMX"), gopts.cpu_mmx), #endif ENUMOPT("Display/Filter", wxTRANSLATE("Full-screen filter to apply"), gopts.filter, wxTRANSLATE("none|2xsai|super2xsai|supereagle|pixelate|advmame|" @@ -160,16 +162,18 @@ opt_desc opts[] = { BOOLOPT("Display/Stretch", wxTRANSLATE("Retain aspect ratio when resizing"), gopts.retain_aspect), BOOLOPT("Display/Transparent", wxTRANSLATE("Draw on-screen messages transparently"), gopts.osd_transparent), BOOLOPT("Display/Vsync", wxTRANSLATE("Wait for vertical sync"), gopts.vsync), - BOOLOPT("GB/AutomaticBorder", wxTRANSLATE("Automatically enable border for Super GameBoy games"), gbBorderAutomatic), + + /// GB + BOOLOPT("GB/AutomaticBorder", wxTRANSLATE("Automatically enable border for Super GameBoy games"), gopts.gbBorderAutomatic), STROPT ("GB/BiosFile", wxTRANSLATE("BIOS file to use for GB, if enabled"), gopts.gb_bios), - BOOLOPT("GB/Border", wxTRANSLATE("Always enable border"), gbBorderOn), - ENUMOPT("GB/EmulatorType", wxTRANSLATE("Type of system to emulate"), gbEmulatorType, wxTRANSLATE("auto|gba|gbc|sgb|sgb2|gb")), + BOOLOPT("GB/Border", wxTRANSLATE("Always enable border"), gopts.gbBorderOn), + ENUMOPT("GB/EmulatorType", wxTRANSLATE("Type of system to emulate"), gopts.gbEmulatorType, wxTRANSLATE("auto|gba|gbc|sgb|sgb2|gb")), BOOLOPT("GB/EnablePrinter", wxTRANSLATE("Enable printer emulation"), gopts.gbprint), INTOPT ("GB/FrameSkip", wxTRANSLATE("Skip frames. Values are 0-9 or -1 to skip automatically based on time."), gopts.gb_frameskip, -1, 9), STROPT ("GB/GBCBiosFile", wxTRANSLATE("BIOS file to use for GBC, if enabled"), gopts.gbc_bios), BOOLOPT("GB/GBCUseBiosFile", wxTRANSLATE("Use the specified BIOS file for GBC"), gopts.gbc_use_bios), - BOOLOPT("GB/LCDColor", wxTRANSLATE("Emulate washed colors of LCD"), gbColorOption), - ENUMOPT("GB/Palette", wxTRANSLATE("The palette to use"), gbPaletteOption, wxTRANSLATE("default|user1|user2")), + BOOLOPT("GB/LCDColor", wxTRANSLATE("Emulate washed colors of LCD"), gopts.gbcColorOption), + ENUMOPT("GB/Palette", wxTRANSLATE("The palette to use"), gopts.gbPaletteOption, wxTRANSLATE("default|user1|user2")), { wxT("GB/Palette0"), wxTRANSLATE("The default palette, as 8 comma-separated 4-digit hex integers (rgb555).") }, { wxT("GB/Palette1"), wxTRANSLATE("The first user palette, as 8 comma-separated 4-digit hex integers (rgb555).") }, { wxT("GB/Palette2"), wxTRANSLATE("The second user palette, as 8 comma-separated 4-digit hex integers (rgb555).") }, @@ -177,20 +181,22 @@ opt_desc opts[] = { BOOLOPT("GB/PrintScreenCap", wxTRANSLATE("Automatically save printouts as screen captures with -print suffix"), gopts.print_screen_cap), STROPT ("GB/ROMDir", wxTRANSLATE("Directory to look for ROM files"), gopts.gb_rom_dir), BOOLOPT("GB/UseBiosFile", wxTRANSLATE("Use the specified BIOS file for GB"), gopts.gb_use_bios), + + /// GBA BOOLOPT("GBA/AGBPrinter", wxTRANSLATE("Enable AGB printer"), gopts.agbprint), STROPT ("GBA/BiosFile", wxTRANSLATE("BIOS file to use, if enabled"), gopts.gba_bios), BOOLOPT("GBA/EnableRTC", wxTRANSLATE("Enable RTC (vba-over.ini override is rtcEnabled"), gopts.rtc), ENUMOPT("GBA/FlashSize", wxTRANSLATE("Flash size (kb) (vba-over.ini override is flashSize in bytes)"), gopts.flash_size, wxTRANSLATE("64|128")), INTOPT ("GBA/FrameSkip", wxTRANSLATE("Skip frames. Values are 0-9 or -1 to skip automatically based on time."), gopts.gba_frameskip, -1, 9), #ifndef NO_LINK - BOOLOPT("GBA/Joybus", wxTRANSLATE("Enable joybus"), gba_joybus_enabled), + BOOLOPT("GBA/Joybus", wxTRANSLATE("Enable joybus"), gopts.gba_joybus_enabled), STROPT ("GBA/JoybusHost", wxTRANSLATE("Joybus host address"), gopts.joybus_host), - BOOLOPT("GBA/Link", wxTRANSLATE("Enable link cable"), gba_link_enabled), - BOOLOPT("GBA/LinkFast", wxTRANSLATE("Enable faster network protocol by default"), lanlink.speed), + BOOLOPT("GBA/Link", wxTRANSLATE("Enable link cable"), gopts.gba_link_enabled), + BOOLOPT("GBA/LinkFast", wxTRANSLATE("Enable faster network protocol by default"), gopts.lanlink_speed), STROPT ("GBA/LinkHost", wxTRANSLATE("Default network link client host"), gopts.link_host), ENUMOPT("GBA/LinkProto", wxTRANSLATE("Default network protocol"), gopts.link_proto, wxTRANSLATE("tcp|udp")), - BOOLOPT("GBA/LinkRFU", wxTRANSLATE("Enable RFU for link"), rfu_enabled), - INTOPT ("GBA/LinkTimeout", wxTRANSLATE("Link timeout (ms)"), linktimeout, 0, 9999999), + BOOLOPT("GBA/LinkRFU", wxTRANSLATE("Enable RFU for link"), gopts.rfu_enabled), + INTOPT ("GBA/LinkTimeout", wxTRANSLATE("Link timeout (ms)"), gopts.linktimeout, 0, 9999999), #endif STROPT ("GBA/ROMDir", wxTRANSLATE("Directory to look for ROM files"), gopts.gba_rom_dir), ENUMOPT("GBA/SaveType", wxTRANSLATE("Native save (\"battery\") hardware type (vba-over.ini override is saveType integer 0-5)"), gopts.save_type, wxTRANSLATE("auto|eeprom|sram|flash|eeprom+sensor|none")), @@ -198,46 +204,56 @@ opt_desc opts[] = { BOOLOPT("GBA/SkipIntro", wxTRANSLATE("Skip intro"), gopts.skip_intro), #endif BOOLOPT("GBA/UseBiosFile", wxTRANSLATE("Use the specified BIOS file"), gopts.gba_use_bios), + + /// General BOOLOPT("General/ApplyPatches", wxTRANSLATE("Apply IPS/UPS/IPF patches if found"), gopts.apply_patches), BOOLOPT("General/AutoLoadLastState", wxTRANSLATE("Automatically load last saved state"), gopts.autoload_state), BOOLOPT("General/AutoSaveCheatList", wxTRANSLATE("Automatically save and load cheat list"), gopts.autoload_cheats), STROPT ("General/BatteryDir", wxTRANSLATE("Directory to store game save files (relative paths are relative to ROM; blank is config dir)"), gopts.battery_dir), ENUMOPT("General/CaptureFormat", wxTRANSLATE("Screen capture file format"), gopts.cap_format, wxTRANSLATE("png|bmp")), - BOOLOPT("General/EnableCheats", wxTRANSLATE("Enable cheats"), cheatsEnabled), + BOOLOPT("General/EnableCheats", wxTRANSLATE("Enable cheats"), gopts.cheatsEnabled), BOOLOPT("General/FreezeRecent", wxTRANSLATE("Freeze recent load list"), gopts.recent_freeze), BOOLOPT("General/PauseWhenInactive", wxTRANSLATE("Pause game when main window loses focus"), gopts.defocus_pause), STROPT ("General/RecordingDir", wxTRANSLATE("Directory to store A/V and game recordings (relative paths are relative to ROM)"), gopts.recording_dir), INTOPT ("General/RewindInterval", wxTRANSLATE("Number of seconds between rewind snapshots (0 to disable)"), gopts.rewind_interval, 0, 600), STROPT ("General/ScreenshotDir", wxTRANSLATE("Directory to store screenshots (relative paths are relative to ROM)"), gopts.scrshot_dir), - BOOLOPT("General/SkipBios", wxTRANSLATE("Skip BIOS initialization"), skipBios), + BOOLOPT("General/SkipBios", wxTRANSLATE("Skip BIOS initialization"), gopts.skipBios), STROPT ("General/StateDir", wxTRANSLATE("Directory to store saved state files (relative paths are relative to BatteryDir)"), gopts.state_dir), - BOOLOPT("General/StateLoadNoBattery", wxTRANSLATE("Do not overwrite native (battery) save when loading state"), skipSaveGameBattery), - BOOLOPT("General/StateLoadNoCheat", wxTRANSLATE("Do not overwrite cheat list when loading state"), skipSaveGameCheats), + BOOLOPT("General/StateLoadNoBattery", wxTRANSLATE("Do not overwrite native (battery) save when loading state"), gopts.skipSaveGameBattery), + BOOLOPT("General/StateLoadNoCheat", wxTRANSLATE("Do not overwrite cheat list when loading state"), gopts.skipSaveGameCheats), INTOPT ("General/Throttle", wxTRANSLATE("Throttle game speed, even when accelerated (0-1000%, 0 = disabled)"), gopts.throttle, 0, 1000), + + /// Joypad { wxT("Joypad/*/*"), wxTRANSLATE("The parameter Joypad//