~random-stuff/random-stuff/+git/visualboyadvance-m:kode54-patch-1

Last commit made on 2020-05-04
Get this branch:
git clone -b kode54-patch-1 https://git.launchpad.net/~random-stuff/random-stuff/+git/visualboyadvance-m

Branch merges

Branch information

Recent commits

b3585e3... by Christopher Snowhill

Added a boatload of range checks to ELF loader

This should hopefully fix most possible attempts to crash the loader, I hope. Kindly shoot me for making this change from the Github editor.

ad3327d... by Rafael Kitover

Transifex pull.

Signed-off-by: Rafael Kitover <email address hidden>

504ca08... by Rafael Kitover

Hide menubar + minor UI refactor.

Add ui/hideMenuBar boolean option, defaulting to on, which hides the
main menubar when the mouse is idle or outside the frame.

This is disabled on mac, because on macs the main menubar is not part of
the application window.

Fix pointer hiding/unhiding by connecting panel events to the gamearea
mouse event handler.

Clean up the pausing when menus are opened code, make it actually work
on Windows.

Signed-off-by: Rafael Kitover <email address hidden>

2868c1b... by Rafael Kitover

Fix changing aspect ratio option.

When toggling "retain aspect ratio", destroy the drawing panel so it is
recreated with the desired aspect ratio settings.

Only add the vertical spacers when aspect ratio is on, they are not
needed when it's off.

Set the sizer priority of the DrawingPanel to 1 if aspect ratio is off
so that wxEXPAND always works.

Clear the GameArea sizer when attaching a new DrawingPanel, this is so
that the vertical spacers used when aspect ratio is on are not included
when aspect ratio is off.

Signed-off-by: Rafael Kitover <email address hidden>

0f55b5d... by Rafael Kitover

Transifex pull.

Signed-off-by: Rafael Kitover <email address hidden>

3041e32... by Josh Smith <email address hidden>

Removing meaningless conditional

reg[0].I is unsigned so checking if it is greater than or equal to zero is always true by definition.

Fixes #578

045e95a... by Rafael Kitover

GB: Support 4MiB MBC30 ROM bank select.

MBC30 is a variant of MBC3 with a 4MiB ROM size and a larger RAM size.

https://gekkio.fi/files/gb-docs/gbctr.pdf

Allow addressing 4MiB of the ROM in MBC3 ROM bank select if the ROM size
is 4MiB.

Fix provided by roytam1.

- Fix #652.

Signed-off-by: Rafael Kitover <email address hidden>

a972da8... by Rafael Kitover

Update github issue template.

Use html comments for section instructions that shouldn't be visible in
the completed form.

Signed-off-by: Rafael Kitover <email address hidden>

eecde42... by Rafael Kitover

Transifex pull.

Signed-off-by: Rafael Kitover <email address hidden>

0b14e9f... by =?utf-8?q?Ed=C3=AAnis_Freindorfer_Azevedo?= <email address hidden>

[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.