Skip to content

Commit

Permalink
Merge branch 'release/2.1.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
JoeMatt committed Jun 15, 2022
2 parents 89c558e + 6cd9f59 commit 5b21e67
Show file tree
Hide file tree
Showing 941 changed files with 14,262 additions and 1,737 deletions.
17 changes: 17 additions & 0 deletions .all-contributorsrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"files": ["README.md"],
"imageSize": 100,
"contributorsPerLine": 7,
"contributorsSortAlphabetically": false,
"badgeTemplate": "[![All Contributors](https://img.shields.io/badge/all_contributors-<%= contributors.length %>-orange.svg?style=flat-square)](#contributors)",
"contributorTemplate": "<a href=\"<%= contributor.profile %>\"><img src=\"<%= contributor.avatar_url %>\" width=\"<%= options.imageSize %>px;\" alt=\"\"/><br /><sub><b><%= contributor.name %></b></sub></a>",
"types": {
"custom": {
"symbol": "🔭",
"description": "A custom contribution type.",
"link": "[<%= symbol %>](<%= url %> \"<%= description %>\"),"
}
},
"skipCi": "true",
"contributors": []
}
6 changes: 6 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -76,3 +76,9 @@
[submodule "Cores/FinalBurnNeo/FBNeo"]
path = Cores/FinalBurnNeo/FBNeo
url = https://github.com/Provenance-Emu/FBNeo.git
[submodule "Cores/FCEU/fceux"]
path = Cores/FCEU/fceux
url = https://github.com/Provenance-Emu/fceux.git
[submodule "Cores/DosBox/dosbox-pure"]
path = Cores/DosBox/dosbox-pure
url = https://github.com/Provenance-Emu/dosbox-pure.git
6 changes: 3 additions & 3 deletions Build.xcconfig
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// Configuration settings file format documentation can be found at:
// https://help.apple.com/xcode/#/dev745c5c974

MARKETING_VERSION = 2.1.0
CURRENT_PROJECT_VERSION = 2780
MARKETING_VERSION = 2.1.1
CURRENT_PROJECT_VERSION = 2781

// Vars to be overwritten by `CodeSigning.xcconfig` if exists
DEVELOPMENT_TEAM = S32Z3HMYVQ
Expand Down Expand Up @@ -50,7 +50,7 @@ PVLIBRARY_PRODUCT_BUNDLE_IDENTIFIER = $(ORG_PREFIX).$(PROJECT_NAME:lower).PVLibr
// MAC_CODE_SIGN_ENTITLEMENTS = $(MAC_CODE_SIGN_ENTITLEMENTS_$(DEVELOPER_ACCOUNT_VM_ACCESS:default=NO))

// Fixes XCode 13.2.1 issues
OTHER_LDFLAGS = $(inherited) -Wl,-weak-lswift_Concurrency -Wl,-rpath,/usr/lib/swift -ObjC
//OTHER_LDFLAGS = $(inherited) -Wl,-weak-lswift_Concurrency -Wl,-rpath,/usr/lib/swift -ObjC

//OTHER_LDFLAGS = $(inherited)
ENABLE_BITCODE = NO
18 changes: 18 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,24 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [2.1.1] - 2022-06-15

### Added

- Controls: PSX on-screen joystick can be disabled in settings. No longer shows when controller is connected
- Swift UI beta for tvOS
- tvOS theme support
- Metal shader 200% speedup 👉 @mrjschulte
- early dosbox testing code (no running yet)

### Fixed

- tgbdual crash on ios fixed

### Updated

- fceux update core to 2.6.2

## [2.1.0] - 2022-02-14

Special thanks to contributors on this release;
Expand Down
19 changes: 19 additions & 0 deletions Cores/Cores.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
//
// Cores.h
// Cores
//
// Created by Joseph Mattiello on 3/12/22.
// Copyright © 2022 Provenance Emu. All rights reserved.
//

#import <Foundation/Foundation.h>

//! Project version number for Cores.
FOUNDATION_EXPORT double CoresVersionNumber;

//! Project version string for Cores.
FOUNDATION_EXPORT const unsigned char CoresVersionString[];

// In this header, you should import all the public headers of your framework using statements like #import <Cores/PublicHeader.h>


25 changes: 25 additions & 0 deletions Cores/DosBox/BuildFlags.xcconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
//
// BuildFlags.xcconfig
// PVDosBox
//
// Created by Joseph Mattiello on 11/1/18.
//
//

// All
GCC_PREPROCESSOR_DEFINITIONS = $(inherited)
OTHER_CFLAGS = $(inherited)

// Device
GCC_PREPROCESSOR_DEFINITIONS[sdk=iphoneos*] = $(inherited) TARGET_IPHONE=1
OTHER_CFLAGS[sdk=iphoneos*] = $(inherited)

// Simulator
GCC_PREPROCESSOR_DEFINITIONS[sdk=iphonesimulator*] = $(inherited) TARGET_IPHONE_SIMULATOR=1

// tvOS Device
GCC_PREPROCESSOR_DEFINITIONS[sdk=appletvos*] = $(inherited) TARGET_IPHONE=1
OTHER_CFLAGS[sdk=appletvos*] = $(inherited)

// tvOS Simulator
GCC_PREPROCESSOR_DEFINITIONS[sdk=appletvsimulator*] = $(inherited) TARGET_IPHONE_SIMULATOR=1
17 changes: 17 additions & 0 deletions Cores/DosBox/PBDosBoxCore/Core/PVDosBoxCore+Audio.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
//
// PVDosBoxCore+Audio.h
// PVDosBox
//
// Created by Joseph Mattiello on 11/1/18.
// Copyright © 2021 Provenance. All rights reserved.
//

#import <PVDosBox/PVDosBox.h>

NS_ASSUME_NONNULL_BEGIN

@interface PVDosBoxCore (Audio)

@end

NS_ASSUME_NONNULL_END
25 changes: 25 additions & 0 deletions Cores/DosBox/PBDosBoxCore/Core/PVDosBoxCore+Audio.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
//
// PVDosBoxCore+Audio.m
// PVDosBox
//
// Created by Joseph Mattiello on 11/1/18.
// Copyright © 2021 Provenance. All rights reserved.
//

#import "PVDosBoxCore+Audio.h"

@implementation PVDosBoxCore (Audio)

- (NSTimeInterval)frameInterval {
return isNTSC ? 60 : 50;
}

- (NSUInteger)channelCount {
return 2;
}

- (double)audioSampleRate {
return sampleRate;
}

@end
29 changes: 29 additions & 0 deletions Cores/DosBox/PBDosBoxCore/Core/PVDosBoxCore+Controls.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
//
// PVDosBoxCore+Controls.h
// PVDosBox
//
// Created by Joseph Mattiello on 11/1/18.
// Copyright © 2021 Provenance. All rights reserved.
//

#import <PVDosBox/PVDosBoxCore.h>

NS_ASSUME_NONNULL_BEGIN

@interface PVDosBoxCore (Controls) <PVGameCubeSystemResponderClient>

- (void)initControllBuffers;
- (void)pollControllers;

#pragma mark - Control

- (void)didPushGameCubeButton:(enum PVGameCubeButton)button forPlayer:(NSInteger)player;
- (void)didReleaseGameCubeButton:(enum PVGameCubeButton)button forPlayer:(NSInteger)player;
- (void)didMoveGameCubeJoystickDirection:(enum PVGameCubeButton)button withValue:(CGFloat)value forPlayer:(NSInteger)player;
- (void)didMoveJoystick:(NSInteger)button withValue:(CGFloat)value forPlayer:(NSInteger)player;

- (void)didPush:(NSInteger)button forPlayer:(NSInteger)player;
- (void)didRelease:(NSInteger)button forPlayer:(NSInteger)player;
@end

NS_ASSUME_NONNULL_END
202 changes: 202 additions & 0 deletions Cores/DosBox/PBDosBoxCore/Core/PVDosBoxCore+Controls.mm
Original file line number Diff line number Diff line change
@@ -0,0 +1,202 @@
//
// PVDosBoxCore+Controls.m
// PVDosBox
//
// Created by Joseph Mattiello on 11/1/18.
// Copyright © 2021 Provenance. All rights reserved.
//

#import <PVDosBox/PVDosBox.h>
#import <Foundation/Foundation.h>
#import <PVSupport/PVSupport.h>

#define DC_BTN_C (1<<0)
#define DC_BTN_B (1<<1)
#define DC_BTN_A (1<<2)
#define DC_BTN_START (1<<3)
#define DC_DPAD_UP (1<<4)
#define DC_DPAD_DOWN (1<<5)
#define DC_DPAD_LEFT (1<<6)
#define DC_DPAD_RIGHT (1<<7)
#define DC_BTN_Z (1<<8)
#define DC_BTN_Y (1<<9)
#define DC_BTN_X (1<<10)
#define DC_BTN_D (1<<11)
#define DC_DPAD2_UP (1<<12)
#define DC_DPAD2_DOWN (1<<13)
#define DC_DPAD2_LEFT (1<<14)
#define DC_DPAD2_RIGHT (1<<15)

#define DC_AXIS_LT (0X10000)
#define DC_AXIS_RT (0X10001)
#define DC_AXIS_X (0X20000)
#define DC_AXIS_Y (0X20001)

static const int GameCubeMap[] = {
DC_DPAD_UP, DC_DPAD_DOWN, DC_DPAD_LEFT, DC_DPAD_RIGHT,
DC_BTN_A, DC_BTN_B, DC_BTN_X, DC_BTN_Y,
DC_AXIS_LT, DC_AXIS_RT,
DC_BTN_START
};

typedef unsigned char u8;
typedef signed char s8;
typedef unsigned short u16;
typedef unsigned int u32;

// Reicast controller data
u16 kcode[4];
u8 rt[4];
u8 lt[4];
u32 vks[4];
s8 joyx[4], joyy[4];

@implementation PVDosBoxCore (Controls)

- (void)initControllBuffers {
memset(&kcode, 0xFFFF, sizeof(kcode));
bzero(&rt, sizeof(rt));
bzero(&lt, sizeof(lt));
}

#pragma mark - Control

- (void)pollControllers {
for (NSInteger playerIndex = 0; playerIndex < 4; playerIndex++)
{
GCController *controller = nil;

if (self.controller1 && playerIndex == 0)
{
controller = self.controller1;
}
else if (self.controller2 && playerIndex == 1)
{
controller = self.controller2;
}
else if (self.controller3 && playerIndex == 3)
{
controller = self.controller3;
}
else if (self.controller4 && playerIndex == 4)
{
controller = self.controller4;
}

if ([controller extendedGamepad])
{
GCExtendedGamepad *gamepad = [controller extendedGamepad];
GCControllerDirectionPad *dpad = [gamepad dpad];

dpad.up.isPressed ? kcode[playerIndex] &= ~(DC_DPAD_UP) : kcode[playerIndex] |= (DC_DPAD_UP);
dpad.down.isPressed ? kcode[playerIndex] &= ~(DC_DPAD_DOWN) : kcode[playerIndex] |= (DC_DPAD_DOWN);
dpad.left.isPressed ? kcode[playerIndex] &= ~(DC_DPAD_LEFT) : kcode[playerIndex] |= (DC_DPAD_LEFT);
dpad.right.isPressed ? kcode[playerIndex] &= ~(DC_DPAD_RIGHT) : kcode[playerIndex] |= (DC_DPAD_RIGHT);

gamepad.buttonA.isPressed ? kcode[playerIndex] &= ~(DC_BTN_A) : kcode[playerIndex] |= (DC_BTN_A);
gamepad.buttonB.isPressed ? kcode[playerIndex] &= ~(DC_BTN_B) : kcode[playerIndex] |= (DC_BTN_B);
gamepad.buttonX.isPressed ? kcode[playerIndex] &= ~(DC_BTN_X) : kcode[playerIndex] |= (DC_BTN_X);
gamepad.buttonY.isPressed ? kcode[playerIndex] &= ~(DC_BTN_Y) : kcode[playerIndex] |= (DC_BTN_Y);

gamepad.leftShoulder.isPressed ? kcode[playerIndex] &= ~(DC_AXIS_LT) : kcode[playerIndex] |= (DC_AXIS_LT);
gamepad.rightShoulder.isPressed ? kcode[playerIndex] &= ~(DC_AXIS_RT) : kcode[playerIndex] |= (DC_AXIS_RT);

gamepad.leftTrigger.isPressed ? kcode[playerIndex] &= ~(DC_BTN_Z) : kcode[playerIndex] |= (DC_BTN_Z);
gamepad.rightTrigger.isPressed ? kcode[playerIndex] &= ~(DC_BTN_START) : kcode[playerIndex] |= (DC_BTN_START);


float xvalue = gamepad.leftThumbstick.xAxis.value;
s8 x=(s8)(xvalue*127);
joyx[0] = x;

float yvalue = gamepad.leftThumbstick.yAxis.value;
s8 y=(s8)(yvalue*127 * - 1); //-127 ... + 127 range
joyy[0] = y;

} else if ([controller gamepad]) {
GCGamepad *gamepad = [controller gamepad];
GCControllerDirectionPad *dpad = [gamepad dpad];

dpad.up.isPressed ? kcode[playerIndex] &= ~(DC_DPAD_UP) : kcode[playerIndex] |= (DC_DPAD_UP);
dpad.down.isPressed ? kcode[playerIndex] &= ~(DC_DPAD_DOWN) : kcode[playerIndex] |= (DC_DPAD_DOWN);
dpad.left.isPressed ? kcode[playerIndex] &= ~(DC_DPAD_LEFT) : kcode[playerIndex] |= (DC_DPAD_LEFT);
dpad.right.isPressed ? kcode[playerIndex] &= ~(DC_DPAD_RIGHT) : kcode[playerIndex] |= (DC_DPAD_RIGHT);

gamepad.buttonA.isPressed ? kcode[playerIndex] &= ~(DC_BTN_A) : kcode[playerIndex] |= (DC_BTN_A);
gamepad.buttonB.isPressed ? kcode[playerIndex] &= ~(DC_BTN_B) : kcode[playerIndex] |= (DC_BTN_B);
gamepad.buttonX.isPressed ? kcode[playerIndex] &= ~(DC_BTN_X) : kcode[playerIndex] |= (DC_BTN_X);
gamepad.buttonY.isPressed ? kcode[playerIndex] &= ~(DC_BTN_Y) : kcode[playerIndex] |= (DC_BTN_Y);

gamepad.leftShoulder.isPressed ? kcode[playerIndex] &= ~(DC_AXIS_LT) : kcode[playerIndex] |= (DC_AXIS_LT);
gamepad.rightShoulder.isPressed ? kcode[playerIndex] &= ~(DC_AXIS_RT) : kcode[playerIndex] |= (DC_AXIS_RT);
}
#if TARGET_OS_TV
else if ([controller microGamepad]) {
GCMicroGamepad *gamepad = [controller microGamepad];
GCControllerDirectionPad *dpad = [gamepad dpad];
}
#endif
}
}

-(void)didPushGameCubeButton:(enum PVGameCubeButton)button forPlayer:(NSInteger)player {
// if(_isInitialized)
// {
// }
}

-(void)didReleaseGameCubeButton:(enum PVGameCubeButton)button forPlayer:(NSInteger)player {
// if(_isInitialized)
// {
// }
}

- (void)didMoveGameCubeJoystickDirection:(enum PVGameCubeButton)button withValue:(CGFloat)value forPlayer:(NSInteger)player {
// if(_isInitialized)
// {
// }
}

-(void)didMoveJoystick:(NSInteger)button withValue:(CGFloat)value forPlayer:(NSInteger)player {
[self didMoveGameCubeJoystickDirection:(enum PVGameCubeButton)button withValue:value forPlayer:player];
}

- (void)didPush:(NSInteger)button forPlayer:(NSInteger)player {
[self didPushGameCubeButton:(PVGameCubeButton)button forPlayer:player];
}

- (void)didRelease:(NSInteger)button forPlayer:(NSInteger)player {
[self didReleaseGameCubeButton:(PVGameCubeButton)button forPlayer:player];
}


# pragma mark - Input Wii
//- (oneway void)didMoveWiiJoystickDirection:(OEWiiButton)button withValue:(CGFloat)value forPlayer:(NSUInteger)player
//{
// if(_isInitialized)
// {
// dol_host->SetAxis(button, value, (int)player);
// }
//}
//
//- (oneway void)didPushWiiButton:(OEWiiButton)button forPlayer:(NSUInteger)player
//{
// if(_isInitialized)
// {
// if (button > OEWiiButtonCount) {
// dol_host->processSpecialKeys(button , (int)player);
// } else {
// dol_host->setButtonState(button, 1, (int)player);
// }
// }
//}
//
//- (oneway void)didReleaseWiiButton:(OEWiiButton)button forPlayer:(NSUInteger)player
//{
// if(_isInitialized && button != OEWiimoteSideways && button != OEWiimoteUpright)
// {
// dol_host->setButtonState(button, 0, (int)player);
// }
//}

@end
Loading

0 comments on commit 5b21e67

Please sign in to comment.