Commit graph

318 commits

Author SHA1 Message Date
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
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
Bobby Smiles
82a9e947d3 Only compile recomp.c when hacktarux dynarec is compiled.
Also get rid of empty_dynarec.c
2018-03-24 13:30:31 +01:00
Bobby Smiles
9852ba6a73 Isolate instruction decoding logic. 2018-03-24 13:30:30 +01:00
Bobby Smiles
57de368627 Don't require empty_dynarec for new_dynarec. 2018-03-24 13:30:30 +01:00
Richard Goedeken
b75f06500b disable compiler optimizations when DEBUG is set, so that the debugger is actually useful 2018-03-12 21:51:30 -07:00
Logan
84ad8c1092 Fix compile on MinGW
Pipe strings output to tr
2018-02-09 08:25:38 -07:00
Richard Goedeken
132e397b18 fix libopcodes check for gentoo 2018-02-07 22:01:29 -08:00
Bobby Smiles
0bfe65b550 Fix undefined reference to print_insn_i386 with libopcode >= 2.29
This broke with upstream commit 6394c606997f88acfc80de4dff33a4ae2de987b4
"Don't use print_insn_XXX in GDB".
2018-02-02 00:13:16 +01:00
Bobby Smiles
908a2736f4 Move exception code into cp0 module. 2018-01-09 01:06:49 +01:00
Richard Goedeken
3004e80ae2
Merge pull request #494 from StenApp/patch-2
Update Makefile
2018-01-05 18:41:04 -08:00
Anthony J. Bentley
934a72cbcb Update homepage. 2017-12-28 16:51:59 -07:00
Anthony J. Bentley
e7ffde15fa Update link to bug tracker. 2017-12-28 16:03:57 -07:00
Bobby Smiles
28f7c868c1 Implement enough of RDRAM subsystem to remove rdram detection hack.
Previously, the RDRAM detection/initialization was wrong and a post
RDRAM initialization hack was triggered (just before initial PI DMA)
to force specified amount of RDRAM to be recognized.

With this PR, several aspects of the RDRAM have been implemented which
results in proper detection of RDRAM by the IPL3:
- support for up to 8 (IPL3 hardcoded limitation) RDRAM modules
- partial support for individual rdram address mapping,
ADDR_SELECT has not been implemented though
- support broadcast register writes
- simulating read failure when current calibration is not done yet
2017-12-14 00:19:24 +01:00
Sten
b8bef349d1
Update Makefile
fix2
2017-12-03 17:17:37 +01:00
Bobby Smiles
5da92c1d10 Implement preliminary gb camera. 2017-12-03 12:35:31 +01:00
Sten
abdee5522f
Update Makefile
fix
2017-12-03 11:27:44 +01:00
Sten
a28eebe00b
Update Makefile
First try to get it fixed for macOS
2017-12-02 21:40:17 +01:00
Richard Goedeken
6b53176d6f
Merge pull request #490 from bsmiles32/warnings
Warnings
2017-11-30 20:06:27 -08:00
Logan
8439b2aaf8
If DEBUG not set, set NDEBUG 2017-11-30 10:46:53 -07:00
Bobby Smiles
f6bb6662b5 Use osal_inline and remove -Wno-unused-function form the cflags. 2017-11-28 03:17:25 +01:00
Bobby Smiles
7cb1f03e6e Compile screenshot.c as a C file not CPP. 2017-11-28 03:11:55 +01:00
Bobby Smiles
c038761614 Avoid compilation of empty translation unit (profile). 2017-11-28 03:10:47 +01:00
Bobby Smiles
3e45897c11 Avoid compilation of empty translation unit (instr_counters).
Fixes pedantic warning.
2017-11-28 03:07:16 +01:00
Bobby Smiles
366dd5d03f Extract RDRAM module. 2017-11-20 19:14:00 +01:00
Bobby Smiles
2ff020d1f1 Regroup all rcp submodules inside rcp module. 2017-11-18 17:13:35 +01:00
Bobby Smiles
d8876f91c3 Extract pif module from si module. 2017-11-18 17:13:35 +01:00
Bobby Smiles
e1c1f82cf4 Extract mi from r4300. 2017-11-18 17:13:35 +01:00
Richard Goedeken
2b31626d9f update Makefile method for finding OSX_SDK_PATH 2017-11-14 16:12:28 -08:00
Logan McNaughton
d4799392bb Get rid of USE_SDL flag 2017-10-28 09:21:26 -06:00
Bobby Smiles
273ae923d8 Move cart_rom, flashram and sram into cart module. 2017-10-19 14:26:50 +02:00
Bobby Smiles
8682a7ce8b Separate interfaces from mutable state in all backends.
Also
* Move backends implementations under backends directory.
* Rework file_storage to be a real implementation of storage_backend.
* Fixup PIF_PDT_EEPROM types
* Extract joybus stuff from pif module.
* Extract cart stuff from pif module.
* Extract controllers and paks from si module.
2017-10-14 03:20:41 +02:00
Conn O'Griofa
ba45a51fcb Raspberry Pi: use new vendor library names 2017-10-07 08:07:45 +01:00
Bobby Smiles
752a7354b2 Rewrite PIF emulation.
Main changes in this partial rewrite are:
- channel processing is done in 2 separate steps. First is the channel
setup done when 0x1 is written in the "pif status byte". The second step
is the effective channel processing which allow each channel device to
answer. This step is done just before DMA reads. This is in accordance
with Patent 6394905. (Fig5B - Pif Macro). This allowed to greatly
simplify pif channel processing (no more strange bytes to parse in pif
ram and no duplicated code for that).
- "pif status byte" is treated as a bitfield with each flag indicating
which action to take.
- command processing interface has been reworked to separate the
transmitted data (Tx,TxBuf) from the the received data (Rx, RxBuf).
- reworked the code to allow custom pif channel processing
callback. This should allow to implement "raw" processor to let an
external device (such as a Raphnet controller) do the channel
processing.
- Validate pif commands
- Fixed eeprom write command which missed the status byte.
- Updated the controller input backend to split pak detection from
controller connection test.
- Consolidated all input plugin compatibility code inside one module
(eg. controller_input, rumble and pif processings functions).
- Added PIF channel printing debug
2017-09-15 04:46:15 +02:00
Logan McNaughton
36fb170b09 Switch from adler32 to xxHash 2017-09-13 10:28:47 -06:00
comex
214a142fda Nevermind, that doesn't actually work. Use strings instead. 2017-06-26 16:38:43 +02:00
comex
986cf30c90 Fix asm_defines w/ mawk by setting LANG=C 2017-06-26 05:46:55 -04:00
Bobby Smiles
7f1c22a6cb Revert "Allow using compiler other than gcc"
This reverts commit c6506eccc4.
2017-06-24 13:34:06 -06:00
bsmiles32
949625d965 Merge branch 'master' into mac-fixes 2017-06-22 20:24:05 -06:00
Logan McNaughton
c6506eccc4 Allow using compiler other than gcc 2017-06-20 21:13:13 -06:00
comex
8b82dc6a57 Makefile fixes:
- Explicitly name asm_defines_gas.h and asm_defines_nasm.h rather than
using a wildcard rule: otherwise make automatically deletes the latter
after the build is complete(!?) - see [1].

- Add missing dependency of the awk rule on ../../tools/gen_asm_defines.awk.

[1]
https://www.gnu.org/software/make/manual/html_node/Chained-Rules.html
2017-05-28 17:07:22 -04:00
comex
7b6ffc26a2 Change how asm_defines works to fix Mac build.
This didn't work correctly for two reasons:
- The symbols were being marked as undefined (imported) rather than
exported.  I could fix that by adding an initializer (= {0}), but then
the binary gets huge; not sure if there's a way around that.
- Mach-O binaries don't store symbol sizes.  You can get nm to try to
calculate them with --size-sort, but I'm not sure if this will always
output the correct result.

In lieu of more complicated platform-specific fixes, I switched to an
approach that renders the value as hex, allowing the object file to be
piped directly to awk on all platforms.
2017-05-28 17:02:05 -04:00
comex
3d36c05562 Minor Mac build fixes:
- Fix BITS=32 build (-Wl,-m,elf_i386 obviously doesn't work, and -m32
isn't needed since another part adds '-arch i686' to CFLAGS).

- Change -bundle to -dynamiclib.  (-bundle has been effectively
deprecated altogether since the early days of OS X, and was never the
right setting for .dylib files.)

- Only pass '-read_only_relocs suppress' on 32-bit.  On x86-64 this flag
just emits a warning saying that it has no effect, and evidently isn't
necessary.  (On 32-bit x86 it enables text relocations, which are used
by some of the asm stuff.)
2017-05-28 16:59:57 -04:00
Bobby Smiles
c2d7d36072 Merge dynarec instructions generations into a single file.
Also does proper formatting and adopt same function order than
mips_interpreter.def
2017-04-01 12:09:58 +02:00
Bobby Smiles
efdeaf32c7 Fix interrupt spelling.
s/interupt/interrupt/
2017-03-07 06:17:04 +01:00
Richard Goedeken
72f29082d9 fix up makefile 2017-02-17 22:25:56 -08:00
Richard Goedeken
29cd4baba9 fix build error 2017-02-17 22:03:46 -08:00
Richard Goedeken
ee6c28d40e Merge branch 'master' into dyna_start 2017-02-17 21:14:30 -08:00
Gillou68310
3e5bd0f848 Add PIC support for x86 dyna_start.asm 2017-02-16 10:39:54 +01:00