Commit graph

1883 commits

Author SHA1 Message Date
Richard Goedeken
3e510a5f57 fix issue flagged by coverity scan 2018-11-04 18:04:53 -08:00
Richard Goedeken
1c6bb9cf2c update API version info for debugger changes 2018-11-03 20:35:41 -07:00
Daniel Selifonov
693b7aa3bd
Added 'DebugVirtualToPhysical' API
Given a virtual address, translate it into a physical address.

Physical addresses are required by memory read/write breakpoints.
2018-10-28 16:43:04 -07:00
Daniel Selifonov
5653596989
Added 'DebugBreakpointTriggeredBy' API
Provides programmatic access to the most recent breakpoint hit flags and address.
2018-10-26 21:36:33 -07:00
Bobby Smiles
0b2d8ef381 Fix missing header in biopak.c 2018-09-23 22:31:00 +02:00
Bobby Smiles
f405ae4b5f Fix illegal cast between void* and function pointers.
These casts are not allowed by strict C standard, and a complying
compiler must emit a warning in such a case.
In practice most platforms support these casts just fine as they've been
de-facto standard practice given dlsym, GetProcAddress,
SDL_GL_GetProcAddress functions.

So we introduce the possibility to disable such warning at the line
scope through the OSAL_WARNING_{PUSH,POP,NO_WARNING_XXX} macros.
Also to avoid overusing this extreme macro, we wrap the 3 mandated cases
such that they return a generic function pointer (eg. m64p_function)
which can then be casted to the effective function pointer type.
2018-09-22 16:01:46 +02:00
Bobby Smiles
3a99afb14d Fix some trailling white spaces. 2018-09-22 15:46:03 +02:00
Corey Hickey
c6eb68b38b Do not automatically save core configuration sections.
This patch makes saving the configuration the responsibility of the UI.
The mupen64plus-ui-console plugin currently saves configuration already,
by default.
2018-08-27 21:39:24 -07:00
Bobby Smiles
3223154993 Prefer __typeof__ instead of typeof to avoid erros with ISO C compilers. 2018-08-28 01:04:22 +02:00
Bobby Smiles
e1b2047c2f Fix missing strings.h header (for strcasecmp) 2018-08-28 01:04:22 +02:00
Bobby Smiles
a4865a28a5 Fix some trailing whitespaces. 2018-08-28 01:04:22 +02:00
Bobby Smiles
f7d37181c0 Don't use aggregate initializer for mpk_storages in main.c 2018-08-28 01:04:22 +02:00
Bobby Smiles
05a2dd5dec Fix formatting in workqueue.c 2018-08-28 01:04:22 +02:00
Bobby Smiles
c6169607e3 Prefer for(;;) over while(true) to avoid msvc warning. 2018-08-28 01:04:22 +02:00
Bobby Smiles
38bf693cf9 Remove unused declaration of recomp_ops. 2018-08-28 01:04:22 +02:00
Bobby Smiles
df5c68e9b0 Use explicit conversion in byte2bcd function. 2018-08-28 01:04:22 +02:00
Bobby Smiles
75e5285df6 Expose a minimal C API for OGLFT, so that we don't leak C++ in our codebase
Also:
- remove uneeded #ifdef __cplusplus extern "C" danse.
- replace gluOrtho2D with equivalent glOrtho(near=-1, far = 1) to avoid requiring glu header.
2018-08-28 01:04:22 +02:00
Bobby Smiles
f8a497cfe6 Explicit cast to uint16_t for ri id field to avoid warning. 2018-08-27 21:22:06 +02:00
Bobby Smiles
482928129c Add header guards to screenshot header. 2018-08-27 21:17:59 +02:00
Bobby Smiles
cc48d8311d Move screenshot files to main. 2018-08-27 21:15:43 +02:00
Richard Goedeken
cd7d18dca2
Merge pull request #582 from bsmiles32/subprojects
Move third-party code into subprojects directory.
2018-08-26 22:29:14 -07:00
Bobby Smiles
629d8ed57a Move third-party code into subprojects directory. 2018-08-17 00:26:19 +02:00
Bobby Smiles
cd195246f8 Fix variable declaration inside default case. 2018-08-16 22:58:35 +02:00
Bobby Smiles
5ca72dc441 Fix missing idec header in cached_interp.h 2018-08-16 22:58:07 +02:00
Richard Goedeken
2c66c257cb
Merge pull request #573 from bsmiles32/vcap
Rework Video Capture backend to allow better isolation.
2018-07-29 09:32:13 -07:00
Bobby Smiles
156b78a80f Rework Video Capture backend to allow better isolation.
By adding init and release methods to video capture backend interface
we can completely separate implementation details from usage.
We don't need to include (nor have) implementation header,
and therefore can use true C++ for opencv implementation
(no need for in-place ctor, explicit call to dtor, ...).

Also, backend selection is done by name and multiple instanciation (with
different parameters) can be done by selecting the right config section.

Default video capture backend may be overrided at compile-time by
defining DEFAULT_VIDEO_CAPTURE_BACKEND to appropriate value.

Video input has been renamed to Video Capture.
2018-06-04 00:28:28 +02:00
Bobby Smiles
31298dc87b Cleanup tpak savestate loading.
This may help fixing some edge-cases of crashes while loading
savetstates.

We isolate the savestate data extraction part from the state committing
part so that curr offset don't depends on external factors which could
lead to crashes.
2018-05-30 02:32:40 +02:00
Richard Goedeken
12c668408d bugfix: only byte-swap the ROM into little endian byte order if we are building for a little-endian machine 2018-05-27 14:38:28 -07:00
Richard Goedeken
f47b06e637
Merge pull request #564 from bsmiles32/gbcam
GB Camera support
2018-05-21 22:05:12 -07:00
Bobby Smiles
63c36846a3 Add support for GameBoy Camera
All the reverse-engineering work comes from AntonioND [1].
A new video backend API has been added to grab video images.
By default, a dummy backend is provided.
However, an OpenCV based backend is also provided (if enabled at
compile-time with OPENCV=1 in Makefile).
Other implementation should be possible (GStreamer for instance ?) in
the future.

With the OpenCV backend, the video device selection can be done using
the Core parameter:

[Core]
GbCameraVideoDevice=<my_device>

Where <my_device> can be either an integer which represent the device
number (0 for default) or a string which specify the video device path.

Tested with 64DD Mario Talent Studio (Japan), a transfer pak plugged
in the first controller with a Japanese GameBoy camera. Also since the
core currently requires a cart ROM (even if should strictly be required)
I used Perfect Dark (Japan) to allow using the Transfer Pak. This is a
core/ui limitation not related to this PR.

[1] https://github.com/AntonioND/gbcam-rev-engineer
2018-05-21 23:32:30 +02:00
Bobby Smiles
88cc037aac Initial bio pak support.
For now, the bio pak only report hard-coded BPM value.

In future work remote heart rate monitoring methods (rPPG) could be
implemented to provide an experience similar to the Bio Sensor pak using
a regular webcam. However it could be quite CPU intensive and may prove
challenging in multi-player context.

Another idea to create an "equivalent" Bio Sensor experience without the
original device, could be to derive the reported heart rate from the
BPM (or any relevant quantity) from a user specified audio clip.
2018-05-17 19:10:28 +02:00
Bobby Smiles
283a624fbe Fix homepage link in dd_controller files. 2018-05-14 22:51:52 +02:00
Richard Goedeken
61ab56fab8
Merge pull request #561 from loganmc10/xx
Update xxHash to 0.6.5
2018-05-07 22:15:04 -07:00
Richard Goedeken
61c6a8567f use vsnprintf to ensure that we never overwrite the string buffer in our debug message handler 2018-05-07 21:57:53 -07:00
Richard Goedeken
8fee9378fd
Merge pull request #557 from Provenance-Emu/DebugMessageOverflow
Increase DebugMessage buffer size to prevent overflows
2018-05-07 21:51:14 -07:00
Richard Goedeken
32099bc27f
Merge pull request #556 from loganmc10/vidext
Add VidExt_GL_GetDefaultFramebuffer
2018-05-07 21:45:29 -07:00
Richard Goedeken
e302bc249c
Merge pull request #446 from bsmiles32/dd
[WIP] Add support for 64 Disk Drive.
2018-05-07 21:23:50 -07:00
Logan McNaughton
b75fdfbbe4 Update xxHash to 0.6.5 2018-04-18 15:37:18 -06:00
luigiblood
740406ff15 Add support for 64 Disk Drive.
Original porting effort has been done by LuigiBlood.
Original reverse engineering made by Happy-yppaH
2018-04-04 21:50:25 +02:00
Joseph Mattiello
c75438b6f8
Increase buffer size to prevent overflows 2018-04-03 17:12:56 -04:00
Logan McNaughton
146d3e276a Add VidExt_GL_GetDefaultFramebuffer 2018-04-02 12:31:38 -07:00
Robin Allen
c7cb4fe93d Fix write_memory_8
This was overflowing a u8, causing zeroes to be written most of
the time instead of the intended value.
2018-03-29 16:49:37 +01:00
Richard Goedeken
678210c002
Merge pull request #548 from steto-scope/joymappings
Added missing Joy Mappings
2018-03-27 22:35:19 -07:00
Richard Goedeken
111c39d352
Merge pull request #547 from bsmiles32/r4300_refac
R4300 refactorings
2018-03-27 20:36:06 -07:00
Bobby Smiles
b7e7c2c599 Fix: remove last occurences of cached_interpreter_table. 2018-03-24 13:30:31 +01:00
Bobby Smiles
7b5b44683d Fix: dynarec_gen_interrupt is needed by both x86 and arm new_dynarec backends 2018-03-24 13:30:31 +01:00
Bobby Smiles
b7fd9e3013 Use cached_interp struct pointer instead of r4300_core for {init,free}_blocks 2018-03-24 13:30:31 +01:00
Bobby Smiles
05b1d78622 Rework idec_u53 to return offsets instead of pointers. 2018-03-24 13:30:31 +01:00
Bobby Smiles
46fdf9efff Fix constant array of function pointer declaration caught by clang. 2018-03-24 13:30:31 +01:00
Bobby Smiles
82d0f869a0 Fix unresolved symbols when compiling with new_dynarec. 2018-03-24 13:30:31 +01:00