Commit Graph

64 Commits

Author SHA1 Message Date
Fabrice de Gans 60568d26e0 Move core options to a struct
Options used by the core emulator were set with global variables. This
moves all of the options used by the core emulator into a new struct,
shared by all 3 frontends.
2023-02-06 01:22:19 +00:00
Rafael Kitover 22578d02eb
Increase MAX_CART_SIZE from 32MiB to 128MiB
Some ROM hacks are larger than 32MiB.

Fix #1046

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2022-12-16 16:35:15 +00:00
Rafael Kitover 8f1b5dae90
Merge remote-tracking branch 'libretro/master'
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2022-11-18 00:24:23 +00:00
negativeExponent e2f3a64143 Cleanup more libretro-specific branches 2022-10-07 15:28:31 +08:00
negativeExponent 3158b73d69 Wrap functions unused by LIBRETRO 2022-10-07 14:21:29 +08:00
Rafael Kitover 81c88227fa Add Catch2 unit testing framework + some tests.
Add the Catch2 headers to third_party/include/catch2.

Add Catch.cmake and CatchAddTests.cmake to cmake/.

Add unit tests src/wx/tests/strutils.cpp using Catch2 to test
src/wx/strutils.cpp.

Make some code changes to strutils.cpp to make the tests pass.

See src/wx/tests/CMakeLists.txt for how to set up unit test files; they
plug into the normal CTest mechanism in cmake.

The test binaries are written to the tests/ subdirectory of the build
directory.

Building the tests and enabling the CTest support can be turned off by
passing -DBUILD_TESTING=OFF to cmake, the default is ON, this is the
standard mechanism.

Start running ctest on travis and appveyor.

Move stb to third_party/include where Catch2 is now as well.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2020-07-10 13:43:48 +00:00
Edênis Freindorfer Azevedo 0c5ee9941b Fix PNG capture screen.
- Fix #680.
2020-06-07 18:06:04 +00:00
Edênis Freindorfer Azevedo 0b14e9f885
[WINDOWS] Add function to open unicode files. (#644)
We have some issues when trying to open files on Windows that contains
characters not included in the current codepage. Using `fopen` fails
when that happens.

One example is using the `pt_BR` codepage and then using a name with
japanese chars for the battery file.

The games and BIOS work since they use `blargg_open`. It converts a
`const char *` to `const wchat_t *` and uses `_wfopen` for windows.
(doing a multibyte to widechar conversion)

Since we want to avoid doing many code changes on our cores, we need
some `util*` functions for the matter.

Replace `mb_fn_str` by UTF-8 strings.

Replace all occurrences of `fopen` for `utilOpenFile` on GBA core.

Replace all occurrences of `fopen` for `utilOpenFile` on GBA e-reader.

Adjust e-readers calls on wx frontend.

Replace all occurrences of `fopen` for `utilOpenFile` on Patcher files.

Always apply UTF-8 when dealing with path strings.

On our wx frontend we should always send UTF-8 `char *` to our cores
functions. This way we can have consistency when dealing with them for
each platform.

On Windows, we will convert all multibyte to wide chars and use proper
functions for I/O operation.

Create function to deal with unicode calls of `gzopen`.

We use `gzopen_w` (`zlib>=1.27`).

Replace all occurrences of `fopen` for `utilOpenFile` on Config Manager.

Replace all occurrences of `fopen` for `utilOpenFile` on Cheat files.

Use proper functions for unicode on GB core.

Use function instead of macro for `UTF8()`.

Use `nullptr` instead of `NULL`.

Print wide char strings on status bar.
2020-04-21 10:24:28 -03:00
negativeExponent 9d1d707c01
Limit ROM size to 32 MiB.
Limit the utilLoad() function in src/Util.cpp to 32 MiB.

This function loads a file from disk and returns a memory image of it.

This is only used to load ROMs currently.
2020-03-07 11:45:19 +00:00
Edênis Freindorfer Azevedo 513af13ddc Replace `libpng` code for `stb_image` one.
It is a very straightforward replacement calls.
2020-03-01 09:54:43 +00:00
Rafael Kitover 0f2c8cab08
win: check APPDATA if LOCALAPPDATA is not found
Check for the APPDATA environment variable if there is no LOCALAPPDATA
environment variable for things like reading the config file.

Fix #407.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2019-09-12 03:01:16 +00:00
Edênis Freindorfer Azevedo ccc91fa04b quick fix for unicode filenames on windows 2019-06-23 10:59:13 +00:00
Edênis Freindorfer Azevedo 5540790ff1
fix some compilation warnings
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
Merged #396
2019-04-03 17:32:25 +00:00
Edênis Freindorfer Azevedo 3fd444da91 XDG related cleanups #94
* Add migration support for 'vbam.cfg' to 'vbam.ini' on MacOS and Windows.

* Cleanup from XDG Base Dir code.

* Set home to NULL after using free().
2019-03-13 22:05:02 -07:00
Edênis Freindorfer Azevedo 36453885fc XDG Base Dir Spec followup #383
* Add XDG Base Dir Spec for other Unix alike platform.

* Add XDG Base Dir support for the fallback on SDL port.

* Add migration for Unix configuration file.
We migrate from 'vbam.conf' to 'vbam.ini' automatically.

* Refactor code for portability of dir creation functions.

* Fix for MacOS compilation directive.
2019-03-06 15:38:57 -08:00
Dorian Wouters 31391e090c
Kill common/Types.h, replace its old typedefs w/ standard types
Fix includes in files using standard int types
Fix wxWidgets UI includes
Silence some unused variable warnings in GBA-arm.cpp macros
2016-07-29 11:07:11 +02:00
Zach Bacon 5bf44d19be
updated standards to webkit standard 2016-07-08 19:59:29 -04:00
skidau d0ced9d2c8 Gentoo Linux build fix 2015-06-10 00:12:19 +00:00
skidau 1dc399839c Added a "Check for updates" option to the Help menu. 2015-06-05 13:48:37 +00:00
wowzaman12 d234e277ef Because cross compiling from linux complains about case 2015-05-28 14:23:08 +00:00
skidau 4fdbbefe9b Made the Flash save type detection stricter. Made the SRAM detection override the EEPROM detection. Fixes the save type detection for Rockman EXE 4.5 - Real Operation (Japan), Breath of Fire - Ryuu no Senshi (Japan) and maintains the correct detection of the save type for Saibara Rieko no Dendou Mahjong (Japan).
Changed the wx save type detection to use the core version.
2015-05-18 03:35:37 +00:00
skidau d3146f3011 Hooked up the GBA tilt sensor to the wx gui 2015-05-07 14:45:25 +00:00
skidau 9c35a933d9 Made EEPROM and SRAM save type detection override the general FLASH 64KB detection. Fixes the save auto-detect of Saibara Rieko no Dendou Mahjong. 2015-05-06 09:43:09 +00:00
skidau 97d2f385d2 Separate the configured saveType from the runtime saveType 2015-04-18 14:52:58 +00:00
skidau 541b36f0f6 Added a NO$GBA Style OAM Viewer. The OAM Viewer shows a previews every OAM and its location on the screen. Patch by StrepTeDa. 2015-04-05 00:25:30 +00:00
skidau 8ac02202e9 Re-enable the save type auto-detect code instead of enabling all save types. 2015-03-25 11:01:50 +00:00
squall-leonhart b6ffe99fc8 updates subwcrev and applies minor fixes patch 46 2014-03-08 07:11:53 +00:00
kode54 f4c26dcd95 Let's try that again. 2013-09-21 13:57:40 +00:00
thibeaz ed00ced891 just a small revert, old data got mixed in the last commit 2013-09-20 21:25:50 +00:00
thibeaz bdf78c1247 libretro merge into trunk, the individual interfaces can still be compiled on their own so the gtk/sdl/mfc interfaces can still work as originally intended. Special thanks to Squarepusher of the libretro team for helping us get this merged 2013-09-20 21:08:23 +00:00
bgk 092f67b0e8 Fix build errors with zlib-1.2.6.
The problem relates to gzFile not being a typedef of voidp anymore in zlib-1.2.6.
Thanks to Tim Harder for the patch.
2012-03-25 08:09:07 +00:00
thibeaz 2273a18e59 added shuffles patch for fixing wxwidgets interface build, unfortunetly still fails building on link enabling. but if disabled it will build and run. 2012-01-23 03:46:47 +00:00
squall-leonhart 2908c33111 shuffles magic mush...... trunk MSVC2010 buildfix 2012-01-20 22:03:27 +00:00
squall-leonhart 8e6a51211e all current vba-m Wx patches applied to trunk. 2011-05-25 11:55:46 +00:00
squall-leonhart 98215cfb30 buncha patches by darktjm
sdl fix not applied yet
2011-05-24 07:39:29 +00:00
squall-leonhart 5f5ddb11a4 Bugger unicode support, we can just convert multibyte to widestring using google cloud services and a bunch of midgets running in spinwheels.
Also enables whole program optimisation (funnily i was only doing linker time optimisation so it wasn't as good as it could be.)
2011-04-26 07:25:16 +00:00
shuffle2 b9c5ff1ba3 Quiet some compile warnings (gcc likes to make sure you know operator precedence...) 2010-03-16 23:19:54 +00:00
shuffle2 dc394a3baa update to File_Extractor-1.0.0 2010-02-24 16:50:30 +00:00
squall-leonhart cf20d2c133 kode54 - LCD merged into Gameboy colours setting.
bgk - gfx patch added
2009-10-09 13:12:55 +00:00
spacy51 4d4f53425e If vba.ini exists in executable's folder, use it. Else create/use one in %appdata% folder. 2009-08-15 17:43:53 +00:00
bgk db8ec308dd Moved more GBA specific code to the gba folder. 2009-01-01 16:11:02 +00:00
bgk ba89436ad2 No more cryptic names ... 2009-01-01 15:20:03 +00:00
bgk 6c6e4a8b97 Moved some files to the common folder. 2009-01-01 14:21:18 +00:00
spacy51 abb71b9b39 MOVE copyright/license text from the top of every code file to seperate 'License.txt' file. 2008-10-27 09:59:14 +00:00
spacy51 89c0a7b049 Patches by chrono:
[CORE] Add UPS/PPF patch support
[SDL] Add UPS/PPF patch support
[SDL] Fix memory leak
2008-10-16 13:56:49 +00:00
spacy51 785706fcbb ADDED option "File->Load Game->Do not change battery save" (currently GBA only) 2008-06-26 11:55:08 +00:00
n-a-c-h 9720e3ec10 Insert Placeholder so I don't forget. 2008-05-15 02:07:32 +00:00
n-a-c-h 69177f5742 Cleanup, support .dmg 2008-05-15 02:04:32 +00:00
Nach ab0256d9cc Whitespace trim, and eol-style native propery set again. 2008-03-05 00:35:39 +00:00
spacy51 2d36cde81d Qt:
ADDED shared, agb_core and gb_apu files to project file
2008-03-02 16:11:25 +00:00