Skip to content

Commit

Permalink
Add Odyssey2 O2EM core
Browse files Browse the repository at this point in the history
Signed-off-by: Joseph Mattello <[email protected]>
  • Loading branch information
JoeMatt committed Dec 15, 2021
1 parent 7ba0760 commit c3c3150
Show file tree
Hide file tree
Showing 10 changed files with 442 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,6 @@
[submodule "Cores/Desmume2015/desmume2015"]
path = Cores/Desmume2015/desmume2015
url = https://github.com/libretro/desmume2015.git
[submodule "Cores/O2EM"]
path = Cores/O2EM
url = https://github.com/Provenance-Emu/O2EM-Core.git
1 change: 1 addition & 0 deletions Cores/O2EM
Submodule O2EM added at e09e59
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ public enum SystemIdentifier: String {
case NES = "com.provenance.nes"
case NGP = "com.provenance.ngp"
case NGPC = "com.provenance.ngpc"
case Odyssey2 = "com.provenance.odyssey2"
case PCE = "com.provenance.pce"
case PCECD = "com.provenance.pcecd"
case PCFX = "com.provenance.pcfx"
Expand Down
50 changes: 50 additions & 0 deletions PVLibrary/PVLibrary/Resources/systems.plist
Original file line number Diff line number Diff line change
Expand Up @@ -3363,5 +3363,55 @@
</dict>
</array>
</dict>
<dict>
<key>PVManufacturer</key>
<string>Magnavox</string>
<key>PVSystemName</key>
<string>Magnavox Odyssey2</string>
<key>PVSystemShortName</key>
<string>Odyssey2</string>
<key>PVReleaseYear</key>
<string>1978</string>
<key>PVBit</key>
<string>8</string>
<key>PVPortable</key>
<false/>
<key>PVSystemIdentifier</key>
<string>com.provenance.odyssey2</string>
<key>PVDatabaseID</key>
<string></string>
<key>PVSupportedExtensions</key>
<array>
<string>bin</string>
</array>
<key>PVControlLayout</key>
<array>
<dict>
<key>PVControlType</key>
<string>PVButtonGroup</string>
<key>PVControlSize</key>
<string>{180,180}</string>
<key>PVGroupedButtons</key>
<array>
<dict>
<key>PVControlType</key>
<string>PVButton</string>
<key>PVControlTitle</key>
<string>Action</string>
<key>PVControlFrame</key>
<string>{{76,84},{60,60}}</string>
<key>PVControlTint</key>
<string>#f96763</string>
</dict>
</array>
</dict>
<dict>
<key>PVControlType</key>
<string>PVDPad</string>
<key>PVControlSize</key>
<string>{180,180}</string>
</dict>
</array>
</dict>
</array>
</plist>
19 changes: 19 additions & 0 deletions PVO2EM/PVO2EM.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
//
// PVO2EM.h
// PVO2EM
//
// Created by Joseph Mattiello on 12/15/21.
// Copyright © 2021 Provenance Emu. All rights reserved.
//

#import <Foundation/Foundation.h>

//! Project version number for PVO2EM.
FOUNDATION_EXPORT double PVO2EMVersionNumber;

//! Project version string for PVO2EM.
FOUNDATION_EXPORT const unsigned char PVO2EMVersionString[];

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


19 changes: 19 additions & 0 deletions PVSupport/EmulatorCore/Features/Controls.swift
Original file line number Diff line number Diff line change
Expand Up @@ -802,3 +802,22 @@ import Foundation
@objc(didReleaseSSButton:forPlayer:)
func didRelease(_ button: PVSaturnButton, forPlayer player: Int)
}


// MARK: - Magnavox Odyssey2/Videopac+

@objc public enum PVOdyssey2Button: Int {
case up
case down
case left
case right
case action
case count
}

@objc public protocol PVOdyssey2SystemResponderClient: ResponderClient, ButtonResponder {
@objc(didPushOdyssey2Button:forPlayer:)
func didPush(_ button: PVOdyssey2Button, forPlayer player: Int)
@objc(didReleaseOdyssey2Button:forPlayer:)
func didRelease(_ button: PVOdyssey2Button, forPlayer player: Int)
}
Loading

0 comments on commit c3c3150

Please sign in to comment.