diff --git a/MAME.Unity/Assets/Plugins/AxiReplay.dll b/MAME.Unity/Assets/Plugins/AxiReplay.dll new file mode 100644 index 0000000..f1ca52e Binary files /dev/null and b/MAME.Unity/Assets/Plugins/AxiReplay.dll differ diff --git a/MAME.Unity/Assets/Plugins/AxiReplay.dll.meta b/MAME.Unity/Assets/Plugins/AxiReplay.dll.meta new file mode 100644 index 0000000..2359c49 --- /dev/null +++ b/MAME.Unity/Assets/Plugins/AxiReplay.dll.meta @@ -0,0 +1,33 @@ +fileFormatVersion: 2 +guid: 03ba7721c0d6ddf48bb3d6575497a990 +PluginImporter: + externalObjects: {} + serializedVersion: 2 + iconMap: {} + executionOrder: {} + defineConstraints: [] + isPreloaded: 0 + isOverridable: 0 + isExplicitlyReferenced: 0 + validateReferences: 1 + platformData: + - first: + Any: + second: + enabled: 1 + settings: {} + - first: + Editor: Editor + second: + enabled: 0 + settings: + DefaultValueInitialized: true + - first: + Windows Store Apps: WindowsStoreApps + second: + enabled: 0 + settings: + CPU: AnyCPU + userData: + assetBundleName: + assetBundleVariant: diff --git a/MAME.Unity/Assets/Plugins/MAME.Core.dll b/MAME.Unity/Assets/Plugins/MAME.Core.dll index e4028a5..d3d0636 100644 Binary files a/MAME.Unity/Assets/Plugins/MAME.Core.dll and b/MAME.Unity/Assets/Plugins/MAME.Core.dll differ diff --git a/MAME.Unity/Assets/Plugins/MAME.Core.dll.meta b/MAME.Unity/Assets/Plugins/MAME.Core.dll.meta index 8ace7cf..d9b20c5 100644 --- a/MAME.Unity/Assets/Plugins/MAME.Core.dll.meta +++ b/MAME.Unity/Assets/Plugins/MAME.Core.dll.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: fae13461b22160c47b5ee9964058b719 +guid: 111763684b017184c8de7d0d4efbfeb1 PluginImporter: externalObjects: {} serializedVersion: 2 diff --git a/MAME.Unity/Assets/Resources/UMAME.prefab b/MAME.Unity/Assets/Resources/UMAME.prefab index c528d53..abcc5b3 100644 --- a/MAME.Unity/Assets/Resources/UMAME.prefab +++ b/MAME.Unity/Assets/Resources/UMAME.prefab @@ -79,6 +79,127 @@ MonoBehaviour: m_VerticalOverflow: 0 m_LineSpacing: 1 m_Text: ABC +--- !u!1 &446848407035987849 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 6847488682063653578} + - component: {fileID: 6625627535717767643} + - component: {fileID: 2753125594270044178} + - component: {fileID: 6924041762110484820} + m_Layer: 5 + m_Name: btnLoad + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &6847488682063653578 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 446848407035987849} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 6331623794631336949} + m_Father: {fileID: 8762631453511816514} + m_RootOrder: 6 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 272, y: 83.6} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &6625627535717767643 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 446848407035987849} + m_CullTransparentMesh: 1 +--- !u!114 &2753125594270044178 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 446848407035987849} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 0.33333334} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!114 &6924041762110484820 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 446848407035987849} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + m_WrapAround: 0 + m_SelectOnUp: {fileID: 0} + m_SelectOnDown: {fileID: 0} + m_SelectOnLeft: {fileID: 0} + m_SelectOnRight: {fileID: 0} + m_Transition: 1 + m_Colors: + m_NormalColor: {r: 1, g: 1, b: 1, a: 1} + m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} + m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} + m_ColorMultiplier: 1 + m_FadeDuration: 0.1 + m_SpriteState: + m_HighlightedSprite: {fileID: 0} + m_PressedSprite: {fileID: 0} + m_SelectedSprite: {fileID: 0} + m_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_SelectedTrigger: Selected + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 2753125594270044178} + m_OnClick: + m_PersistentCalls: + m_Calls: [] --- !u!1 &735973971104927243 GameObject: m_ObjectHideFlags: 0 @@ -110,7 +231,6 @@ RectTransform: m_LocalScale: {x: 1, y: 1, z: 1} m_Children: - {fileID: 2033103958267837304} - - {fileID: 8961692714759443488} m_Father: {fileID: 6218974894225195416} m_RootOrder: 2 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} @@ -179,7 +299,7 @@ MonoBehaviour: m_ScrollSensitivity: 1 m_Viewport: {fileID: 2033103958267837304} m_HorizontalScrollbar: {fileID: 0} - m_VerticalScrollbar: {fileID: 3623266850434387373} + m_VerticalScrollbar: {fileID: 0} m_HorizontalScrollbarVisibility: 0 m_VerticalScrollbarVisibility: 2 m_HorizontalScrollbarSpacing: 0 @@ -262,6 +382,85 @@ MonoBehaviour: m_FillOrigin: 0 m_UseSpriteMesh: 0 m_PixelsPerUnitMultiplier: 1 +--- !u!1 &1019708513577614487 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 6613759939199388688} + - component: {fileID: 2807696985358969157} + - component: {fileID: 6109141421296914820} + m_Layer: 5 + m_Name: Text + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &6613759939199388688 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1019708513577614487} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 1553850566392038418} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &2807696985358969157 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1019708513577614487} + m_CullTransparentMesh: 1 +--- !u!114 &6109141421296914820 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1019708513577614487} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 0.7882353} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 40 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 4 + m_MaxSize: 107 + m_Alignment: 4 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: RePlay --- !u!1 &1244089954157635171 GameObject: m_ObjectHideFlags: 0 @@ -352,7 +551,7 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: m_ShowMaskGraphic: 0 ---- !u!1 &2224239227481110219 +--- !u!1 &1437815169579299131 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} @@ -360,57 +559,59 @@ GameObject: m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - - component: {fileID: 7064418047822670067} - - component: {fileID: 1422568292032313953} - - component: {fileID: 6905515581518689164} + - component: {fileID: 1553850566392038418} + - component: {fileID: 3583342698216063191} + - component: {fileID: 5564381799821319330} + - component: {fileID: 1808625196046226116} m_Layer: 5 - m_Name: Handle + m_Name: btnRePlay m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 ---- !u!224 &7064418047822670067 +--- !u!224 &1553850566392038418 RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2224239227481110219} + m_GameObject: {fileID: 1437815169579299131} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: [] - m_Father: {fileID: 6797262407646209223} - m_RootOrder: 0 + m_Children: + - {fileID: 6613759939199388688} + m_Father: {fileID: 8762631453511816514} + m_RootOrder: 3 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 1, y: 0.2} + m_AnchorMax: {x: 0, y: 0} m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 20, y: 20} + m_SizeDelta: {x: 272, y: 83.6} m_Pivot: {x: 0.5, y: 0.5} ---- !u!222 &1422568292032313953 +--- !u!222 &3583342698216063191 CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2224239227481110219} + m_GameObject: {fileID: 1437815169579299131} m_CullTransparentMesh: 1 ---- !u!114 &6905515581518689164 +--- !u!114 &5564381799821319330 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2224239227481110219} + m_GameObject: {fileID: 1437815169579299131} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} m_Name: m_EditorClassIdentifier: m_Material: {fileID: 0} - m_Color: {r: 1, g: 1, b: 1, a: 1} + m_Color: {r: 1, g: 1, b: 1, a: 0.33333334} m_RaycastTarget: 1 m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} m_Maskable: 1 @@ -427,6 +628,50 @@ MonoBehaviour: m_FillOrigin: 0 m_UseSpriteMesh: 0 m_PixelsPerUnitMultiplier: 1 +--- !u!114 &1808625196046226116 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1437815169579299131} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + m_WrapAround: 0 + m_SelectOnUp: {fileID: 0} + m_SelectOnDown: {fileID: 0} + m_SelectOnLeft: {fileID: 0} + m_SelectOnRight: {fileID: 0} + m_Transition: 1 + m_Colors: + m_NormalColor: {r: 1, g: 1, b: 1, a: 1} + m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} + m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} + m_ColorMultiplier: 1 + m_FadeDuration: 0.1 + m_SpriteState: + m_HighlightedSprite: {fileID: 0} + m_PressedSprite: {fileID: 0} + m_SelectedSprite: {fileID: 0} + m_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_SelectedTrigger: Selected + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 5564381799821319330} + m_OnClick: + m_PersistentCalls: + m_Calls: [] --- !u!1 &2485685374361276959 GameObject: m_ObjectHideFlags: 0 @@ -506,6 +751,154 @@ MonoBehaviour: m_VerticalOverflow: 0 m_LineSpacing: 1 m_Text: STOP +--- !u!1 &2783850550704876949 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 6331623794631336949} + - component: {fileID: 5599844924239372268} + - component: {fileID: 3956337351363395646} + m_Layer: 5 + m_Name: Text + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &6331623794631336949 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2783850550704876949} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 6847488682063653578} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &5599844924239372268 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2783850550704876949} + m_CullTransparentMesh: 1 +--- !u!114 &3956337351363395646 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2783850550704876949} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 0.7882353} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 40 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 4 + m_MaxSize: 107 + m_Alignment: 4 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: Load +--- !u!1 &2912838931821055855 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 8762631453511816514} + - component: {fileID: 5807838970110454280} + m_Layer: 5 + m_Name: tfTopBtn + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &8762631453511816514 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2912838931821055855} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 6218974894225195416} + - {fileID: 3471319445208116032} + - {fileID: 4817073881051249870} + - {fileID: 1553850566392038418} + - {fileID: 8635128341793952131} + - {fileID: 97142682492627208} + - {fileID: 6847488682063653578} + m_Father: {fileID: 3471319444171359701} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 1} + m_AnchorMax: {x: 0.5, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 1909, y: 83.6} + m_Pivot: {x: 0.5, y: 1} +--- !u!114 &5807838970110454280 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2912838931821055855} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 30649d3a9faa99c48a7b1166b86bf2a0, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Padding: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_ChildAlignment: 1 + m_Spacing: 0 + m_ChildForceExpandWidth: 1 + m_ChildForceExpandHeight: 1 + m_ChildControlWidth: 0 + m_ChildControlHeight: 0 + m_ChildScaleWidth: 1 + m_ChildScaleHeight: 0 + m_ReverseArrangement: 0 --- !u!1 &3141505760941311097 GameObject: m_ObjectHideFlags: 0 @@ -540,7 +933,7 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 1, y: 1} - m_AnchoredPosition: {x: -7.5, y: -0.5} + m_AnchoredPosition: {x: -7.5, y: -0.5000038} m_SizeDelta: {x: -35, y: -13} m_Pivot: {x: 0.5, y: 0.5} --- !u!222 &1753025863916362211 @@ -573,10 +966,10 @@ MonoBehaviour: m_Calls: [] m_FontData: m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} - m_FontSize: 14 + m_FontSize: 12 m_FontStyle: 0 m_BestFit: 0 - m_MinSize: 10 + m_MinSize: 1 m_MaxSize: 40 m_Alignment: 3 m_AlignByGeometry: 0 @@ -616,9 +1009,7 @@ RectTransform: m_Children: - {fileID: 3471319446025011658} - {fileID: 3471319444327146586} - - {fileID: 6218974894225195416} - - {fileID: 3471319445208116032} - - {fileID: 4817073881051249870} + - {fileID: 8762631453511816514} m_Father: {fileID: 3471319444310732615} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} @@ -834,10 +1225,15 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 49349ac585d920c4f937c48232c8dfd7, type: 3} m_Name: m_EditorClassIdentifier: + mUniVideoPlayer: {fileID: 0} mFPS: {fileID: 0} btnStop: {fileID: 1268518242613896174} btnStart: {fileID: 3471319445208116035} + btnRePlay: {fileID: 1808625196046226116} + btnRePayySave: {fileID: 3095025330983461179} btnRomDir: {fileID: 0} + btnSaveState: {fileID: 826435461718981191} + btnLoadState: {fileID: 6924041762110484820} bQuickTestRom: 0 mQuickTestRom: --- !u!114 &3471319444260926879 @@ -1453,8 +1849,6 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 89abab1d3b1020340a147d74e60751ce, type: 3} m_Name: m_EditorClassIdentifier: - mWrite_position: 0 - mPlay_position: 0 m_as: {fileID: 3471319445075249864} --- !u!1 &3471319445128725534 GameObject: @@ -1566,13 +1960,13 @@ RectTransform: m_LocalScale: {x: 1, y: 1, z: 1} m_Children: - {fileID: 3471319444533317885} - m_Father: {fileID: 3471319444171359701} - m_RootOrder: 3 + m_Father: {fileID: 8762631453511816514} + m_RootOrder: 1 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0.5, y: 1} - m_AnchorMax: {x: 0.5, y: 1} - m_AnchoredPosition: {x: 112, y: -51} - m_SizeDelta: {x: 201.00024, y: 79.6129} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 272, y: 83.6} m_Pivot: {x: 0.5, y: 0.5} --- !u!222 &3471319445208116061 CanvasRenderer: @@ -3014,6 +3408,85 @@ MonoBehaviour: m_PersistentCalls: m_Calls: [] Key: +--- !u!1 &3835299399508936505 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 9066416618223326296} + - component: {fileID: 2478340026607732837} + - component: {fileID: 8657508609825532414} + m_Layer: 5 + m_Name: Text + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &9066416618223326296 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3835299399508936505} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 8635128341793952131} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &2478340026607732837 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3835299399508936505} + m_CullTransparentMesh: 1 +--- !u!114 &8657508609825532414 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3835299399508936505} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 0.7882353} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 40 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 4 + m_MaxSize: 107 + m_Alignment: 4 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: RePlaySave --- !u!1 &4375073953846500077 GameObject: m_ObjectHideFlags: 0 @@ -3090,6 +3563,127 @@ MonoBehaviour: m_FillOrigin: 0 m_UseSpriteMesh: 0 m_PixelsPerUnitMultiplier: 1 +--- !u!1 &4421915297501455044 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 8635128341793952131} + - component: {fileID: 676665665408867004} + - component: {fileID: 3237298007287822389} + - component: {fileID: 3095025330983461179} + m_Layer: 5 + m_Name: btnRePlaySave + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &8635128341793952131 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4421915297501455044} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 9066416618223326296} + m_Father: {fileID: 8762631453511816514} + m_RootOrder: 4 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 272, y: 83.6} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &676665665408867004 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4421915297501455044} + m_CullTransparentMesh: 1 +--- !u!114 &3237298007287822389 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4421915297501455044} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 0.33333334} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!114 &3095025330983461179 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4421915297501455044} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + m_WrapAround: 0 + m_SelectOnUp: {fileID: 0} + m_SelectOnDown: {fileID: 0} + m_SelectOnLeft: {fileID: 0} + m_SelectOnRight: {fileID: 0} + m_Transition: 1 + m_Colors: + m_NormalColor: {r: 1, g: 1, b: 1, a: 1} + m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} + m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} + m_ColorMultiplier: 1 + m_FadeDuration: 0.1 + m_SpriteState: + m_HighlightedSprite: {fileID: 0} + m_PressedSprite: {fileID: 0} + m_SelectedSprite: {fileID: 0} + m_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_SelectedTrigger: Selected + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 3237298007287822389} + m_OnClick: + m_PersistentCalls: + m_Calls: [] --- !u!1 &4483518124739417390 GameObject: m_ObjectHideFlags: 0 @@ -3572,13 +4166,13 @@ RectTransform: m_LocalScale: {x: 1, y: 1, z: 1} m_Children: - {fileID: 463116617999830540} - m_Father: {fileID: 3471319444171359701} - m_RootOrder: 4 + m_Father: {fileID: 8762631453511816514} + m_RootOrder: 2 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0.5, y: 1} - m_AnchorMax: {x: 0.5, y: 1} - m_AnchoredPosition: {x: 311, y: -51} - m_SizeDelta: {x: 201.00024, y: 79.6129} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 272, y: 83.6} m_Pivot: {x: 0.5, y: 0.5} --- !u!222 &3174268075294018647 CanvasRenderer: @@ -3863,132 +4457,6 @@ MonoBehaviour: m_VerticalOverflow: 0 m_LineSpacing: 1 m_Text: CD ---- !u!1 &6410236863728965468 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 8961692714759443488} - - component: {fileID: 1505797604473754342} - - component: {fileID: 1787307475468551968} - - component: {fileID: 3623266850434387373} - m_Layer: 5 - m_Name: Scrollbar - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!224 &8961692714759443488 -RectTransform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 6410236863728965468} - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: - - {fileID: 6797262407646209223} - m_Father: {fileID: 4470767732898190461} - m_RootOrder: 1 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 1, y: 0} - m_AnchorMax: {x: 1, y: 1} - m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 20, y: 0} - m_Pivot: {x: 1, y: 1} ---- !u!222 &1505797604473754342 -CanvasRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 6410236863728965468} - m_CullTransparentMesh: 1 ---- !u!114 &1787307475468551968 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 6410236863728965468} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Material: {fileID: 0} - m_Color: {r: 1, g: 1, b: 1, a: 1} - m_RaycastTarget: 1 - m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} - m_Maskable: 1 - m_OnCullStateChanged: - m_PersistentCalls: - m_Calls: [] - m_Sprite: {fileID: 10907, guid: 0000000000000000f000000000000000, type: 0} - m_Type: 1 - m_PreserveAspect: 0 - m_FillCenter: 1 - m_FillMethod: 4 - m_FillAmount: 1 - m_FillClockwise: 1 - m_FillOrigin: 0 - m_UseSpriteMesh: 0 - m_PixelsPerUnitMultiplier: 1 ---- !u!114 &3623266850434387373 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 6410236863728965468} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 2a4db7a114972834c8e4117be1d82ba3, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Navigation: - m_Mode: 3 - m_WrapAround: 0 - m_SelectOnUp: {fileID: 0} - m_SelectOnDown: {fileID: 0} - m_SelectOnLeft: {fileID: 0} - m_SelectOnRight: {fileID: 0} - m_Transition: 1 - m_Colors: - m_NormalColor: {r: 1, g: 1, b: 1, a: 1} - m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} - m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} - m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} - m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} - m_ColorMultiplier: 1 - m_FadeDuration: 0.1 - m_SpriteState: - m_HighlightedSprite: {fileID: 0} - m_PressedSprite: {fileID: 0} - m_SelectedSprite: {fileID: 0} - m_DisabledSprite: {fileID: 0} - m_AnimationTriggers: - m_NormalTrigger: Normal - m_HighlightedTrigger: Highlighted - m_PressedTrigger: Pressed - m_SelectedTrigger: Selected - m_DisabledTrigger: Disabled - m_Interactable: 1 - m_TargetGraphic: {fileID: 6905515581518689164} - m_HandleRect: {fileID: 7064418047822670067} - m_Direction: 2 - m_Value: 0 - m_Size: 0.2 - m_NumberOfSteps: 0 - m_OnValueChanged: - m_PersistentCalls: - m_Calls: [] --- !u!1 &6615988889681424056 GameObject: m_ObjectHideFlags: 0 @@ -4256,21 +4724,21 @@ RectTransform: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 7458401057327763036} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 3, y: 3, z: 3} m_Children: - {fileID: 6107147286413277515} - {fileID: 3601399255798847723} - {fileID: 4470767732898190461} - m_Father: {fileID: 3471319444171359701} - m_RootOrder: 2 + m_Father: {fileID: 8762631453511816514} + m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0.5, y: 1} - m_AnchorMax: {x: 0.5, y: 1} - m_AnchoredPosition: {x: -154.32263, y: -51} - m_SizeDelta: {x: 112.45386, y: 30} - m_Pivot: {x: 0.5, y: 0.5} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 126.7, y: 27.867} + m_Pivot: {x: 0, y: 1} --- !u!222 &8557132758972819746 CanvasRenderer: m_ObjectHideFlags: 0 @@ -4584,6 +5052,206 @@ MonoBehaviour: m_VerticalOverflow: 0 m_LineSpacing: 1 m_Text: Option A +--- !u!1 &7998856529478910520 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 97142682492627208} + - component: {fileID: 2904532930967918652} + - component: {fileID: 2135545646078433766} + - component: {fileID: 826435461718981191} + m_Layer: 5 + m_Name: btnSave + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &97142682492627208 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7998856529478910520} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 8133175915324050873} + m_Father: {fileID: 8762631453511816514} + m_RootOrder: 5 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 272, y: 83.6} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &2904532930967918652 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7998856529478910520} + m_CullTransparentMesh: 1 +--- !u!114 &2135545646078433766 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7998856529478910520} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 0.33333334} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!114 &826435461718981191 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7998856529478910520} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + m_WrapAround: 0 + m_SelectOnUp: {fileID: 0} + m_SelectOnDown: {fileID: 0} + m_SelectOnLeft: {fileID: 0} + m_SelectOnRight: {fileID: 0} + m_Transition: 1 + m_Colors: + m_NormalColor: {r: 1, g: 1, b: 1, a: 1} + m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} + m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} + m_ColorMultiplier: 1 + m_FadeDuration: 0.1 + m_SpriteState: + m_HighlightedSprite: {fileID: 0} + m_PressedSprite: {fileID: 0} + m_SelectedSprite: {fileID: 0} + m_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_SelectedTrigger: Selected + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 2135545646078433766} + m_OnClick: + m_PersistentCalls: + m_Calls: [] +--- !u!1 &8644852888110654678 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 8133175915324050873} + - component: {fileID: 7102774558147783044} + - component: {fileID: 2057959495512705964} + m_Layer: 5 + m_Name: Text + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &8133175915324050873 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8644852888110654678} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 97142682492627208} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &7102774558147783044 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8644852888110654678} + m_CullTransparentMesh: 1 +--- !u!114 &2057959495512705964 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8644852888110654678} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 0.7882353} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 40 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 4 + m_MaxSize: 107 + m_Alignment: 4 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: Save --- !u!1 &8688038151152524254 GameObject: m_ObjectHideFlags: 0 @@ -4742,39 +5410,3 @@ MonoBehaviour: m_PersistentCalls: m_Calls: [] Key: ---- !u!1 &8975338110634819875 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 6797262407646209223} - m_Layer: 5 - m_Name: Sliding Area - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!224 &6797262407646209223 -RectTransform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 8975338110634819875} - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: - - {fileID: 7064418047822670067} - m_Father: {fileID: 8961692714759443488} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 1, y: 1} - m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: -20, y: -20} - m_Pivot: {x: 0.5, y: 0.5} diff --git a/MAME.Unity/Assets/Resources/axibug.jpg b/MAME.Unity/Assets/Resources/axibug.jpg new file mode 100644 index 0000000..436a98c Binary files /dev/null and b/MAME.Unity/Assets/Resources/axibug.jpg differ diff --git a/MAME.Unity/Assets/Resources/axibug.jpg.meta b/MAME.Unity/Assets/Resources/axibug.jpg.meta new file mode 100644 index 0000000..b5566e2 --- /dev/null +++ b/MAME.Unity/Assets/Resources/axibug.jpg.meta @@ -0,0 +1,96 @@ +fileFormatVersion: 2 +guid: d3ccc3158bc938e4caa62373c8ee3b78 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapU: 0 + wrapV: 0 + wrapW: 0 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/MAME.Unity/Assets/Script/UMAME/Common/UniMAMESetting.cs b/MAME.Unity/Assets/Script/UMAME/Common/UniMAMESetting.cs index c8faf0b..7363958 100644 --- a/MAME.Unity/Assets/Script/UMAME/Common/UniMAMESetting.cs +++ b/MAME.Unity/Assets/Script/UMAME/Common/UniMAMESetting.cs @@ -1,35 +1,33 @@ 锘縰sing UnityEngine; -namespace Assets.Script.UMAME.Common + +public class UniMAMESetting { - public class UniMAMESetting + public static UniMAMESetting instance { - public static UniMAMESetting instance + get { - get - { - if (mInstance == null) - mInstance = new UniMAMESetting(); - return mInstance; - } + if (mInstance == null) + mInstance = new UniMAMESetting(); + return mInstance; } - private static UniMAMESetting mInstance; - - const string KEY_LASTGAMEROM = "MAME_LASTGAMEROM"; - - public string LastGameRom - { - get - { - if(PlayerPrefs.HasKey(KEY_LASTGAMEROM)) - return PlayerPrefs.GetString(KEY_LASTGAMEROM); - return string.Empty; - } - set - { - PlayerPrefs.SetString(KEY_LASTGAMEROM, value); - } - } - } -} + private static UniMAMESetting mInstance; + + const string KEY_LASTGAMEROM = "MAME_LASTGAMEROM"; + + public string LastGameRom + { + get + { + if (PlayerPrefs.HasKey(KEY_LASTGAMEROM)) + return PlayerPrefs.GetString(KEY_LASTGAMEROM); + return string.Empty; + } + set + { + PlayerPrefs.SetString(KEY_LASTGAMEROM, value); + } + } + +} \ No newline at end of file diff --git a/MAME.Unity/Assets/Script/UMAME/UILongClickButton.cs b/MAME.Unity/Assets/Script/UMAME/UILongClickButton.cs index bbd773b..edd0209 100644 --- a/MAME.Unity/Assets/Script/UMAME/UILongClickButton.cs +++ b/MAME.Unity/Assets/Script/UMAME/UILongClickButton.cs @@ -1,11 +1,11 @@ -using MAME.Core.run_interface; +using MAME.Core; using UnityEngine.EventSystems; using UnityEngine.UI; public class UILongClickButton : Button { public bool bHotKey { get; private set; } = false; - public MotionKey[] Key; + public long[] Key; protected override void OnEnable() { base.OnEnable(); diff --git a/MAME.Unity/Assets/Script/UMAME/UMAME.cs b/MAME.Unity/Assets/Script/UMAME/UMAME.cs index cb1d493..3c661c5 100644 --- a/MAME.Unity/Assets/Script/UMAME/UMAME.cs +++ b/MAME.Unity/Assets/Script/UMAME/UMAME.cs @@ -1,31 +1,39 @@ -using Assets.Script.UMAME.Common; -using mame; -using MAME.Core.Motion; +using AxiReplay; +using MAME.Core; using System; using System.Collections.Generic; using System.IO; using System.Linq; +using System.Text; using UnityEngine; using UnityEngine.UI; public class UMAME : MonoBehaviour { - MameMainMotion emu; + public static UMAME instance { get; private set; } + MAMEEmu emu; UniLog mUniLog; UniMouse mUniMouse; - UniVideoPlayer mUniVideoPlayer; + [HideInInspector] + public UniVideoPlayer mUniVideoPlayer; UniSoundPlayer mUniSoundPlayer; UniKeyboard mUniKeyboard; UniResources mUniResources; public Text mFPS; public Button btnStop; public Button btnStart; + public Button btnRePlay; + public Button btnRePayySave; public Button btnRomDir; + public Button btnSaveState; + public Button btnLoadState; public Dictionary ALLGame; public List HadGameList = new List(); string mChangeRomName = string.Empty; public bool bQuickTestRom = false; public string mQuickTestRom = string.Empty; + public ReplayWriter mReplayWriter; + public ReplayReader mReplayReader; Dropdown optionDropdown; @@ -34,20 +42,27 @@ public class UMAME : MonoBehaviour #if UNITY_EDITOR_WIN - public static string RomPath => "G:\\MAME.NET.Rom"; + public static string EmuDataPath => "G:/MAME.Core"; #elif UNITY_ANDROID - public static string RomPath => Application.persistentDataPath; + public static string EmuDataPath => Application.persistentDataPath; #elif UNITY_PSP2 - public static string RomPath => Application.dataPath; + public static string EmuDataPath => Application.dataPath; #else - public static string RomPath => Application.persistentDataPath; + public static string EmuDataPath => Application.persistentDataPath; #endif + public static string RomPath => EmuDataPath + "/roms/"; + public static string SavePath => EmuDataPath + "/sav/"; + private void Awake() { + // 强制横屏 + Screen.orientation = ScreenOrientation.LandscapeLeft; + + instance = this; mFPS = GameObject.Find("FPS").GetComponent(); optionDropdown = GameObject.Find("optionDropdown").GetComponent(); - emu = new MameMainMotion(); + emu = new MAMEEmu(); mUniLog = new UniLog(); mUniMouse = this.gameObject.AddComponent(); mUniVideoPlayer = this.gameObject.AddComponent(); @@ -56,7 +71,7 @@ public class UMAME : MonoBehaviour mUniResources = new UniResources(); mChangeRomName = UniMAMESetting.instance.LastGameRom; - emu.Init(RomPath, mUniLog, mUniResources, mUniVideoPlayer, mUniSoundPlayer, mUniKeyboard, mUniMouse); + emu.Init(RomPath, mUniLog, mUniResources, mUniVideoPlayer, mUniSoundPlayer, mUniKeyboard.mKeyCodeCore, mUniMouse); ALLGame = emu.GetGameList(); Debug.Log($"ALLGame:{ALLGame.Count}"); @@ -77,11 +92,21 @@ public class UMAME : MonoBehaviour void OnEnable() { btnStop.onClick.AddListener(StopGame); - btnStart.onClick.AddListener(LoadGame); + btnStart.onClick.AddListener(() => { LoadGame(false); }); + btnRePlay.onClick.AddListener(() => { LoadGame(true); }); + btnRePayySave.onClick.AddListener(() => SaveReplay()); + btnSaveState.onClick.AddListener(SaveState); + btnLoadState.onClick.AddListener(LoadState); } - void LoadGame() + void OnDisable() { + StopGame(); + } + + void LoadGame(bool bReplay = false) + { + mReplayWriter = new ReplayWriter(mChangeRomName, "fuck", ReplayData.ReplayFormat.FM32IP64, Encoding.UTF8); mChangeRomName = HadGameList[optionDropdown.value].Name; UniMAMESetting.instance.LastGameRom = mChangeRomName; StopGame(); @@ -90,6 +115,13 @@ public class UMAME : MonoBehaviour //读取成功 if (emu.bRom) { + if (bReplay) + { + string Path = SavePath + Machine.sName + ".rp"; + mReplayReader = new ReplayReader(Path); + mUniKeyboard.mKeyCodeCore.SetRePlay(true); + } + //读取ROM之后获得宽高初始化画面 emu.GetGameScreenSize(out int _width, out int _height, out IntPtr _framePtr); Debug.Log($"_width->{_width}, _height->{_height}, _framePtr->{_framePtr}"); @@ -108,6 +140,26 @@ public class UMAME : MonoBehaviour private void Update() { mFPS.text = ($"fpsv {mUniVideoPlayer.videoFPS.ToString("F2")} fpsa {mUniSoundPlayer.audioFPS.ToString("F2")}"); + + if (Input.GetKeyDown(KeyCode.F1)) + { + SaveReplay(); + } + + if (Input.GetKeyDown(KeyCode.F2)) + { + string Path = SavePath + Machine.sName + ".rp"; + string dbgPath = SavePath + Machine.sName + ".rpread"; + mReplayReader = new ReplayReader(Path, true, dbgPath); + mUniKeyboard.mKeyCodeCore.Init(mUniKeyboard, true); + } + } + + void SaveReplay() + { + string Path = SavePath + Machine.sName + ".rp"; + string dbgPath = SavePath + Machine.sName + ".rpwrite"; + mReplayWriter.SaveData(Path, true, dbgPath); } void StopGame() @@ -126,14 +178,14 @@ public class UMAME : MonoBehaviour HadGameList.Clear(); optionDropdown.options.Clear(); - Debug.Log($"GetHadRomList:{RomPath + "/roms/"}"); - string[] directoryEntries = Directory.GetDirectories(RomPath + "/roms/"); + Debug.Log($"GetHadRomList:{RomPath}"); + string[] directoryEntries = Directory.GetDirectories(RomPath); for (int i = 0; i < directoryEntries.Length; i++) { string path = directoryEntries[i]; string dirName = Path.GetFileName(path); if (ALLGame.ContainsKey(dirName)) - { + { HadGameList.Add(ALLGame[dirName]); optionDropdown.options.Add(new Dropdown.OptionData(dirName)); } @@ -156,4 +208,37 @@ public class UMAME : MonoBehaviour { System.Diagnostics.Process.Start("explorer.exe", "/select," + RomPath); } + + void SaveState() + { + if (!Directory.Exists(SavePath)) + Directory.CreateDirectory(SavePath); + + FileStream fs = new FileStream(SavePath + Machine.sName + ".sta", FileMode.Create); + BinaryWriter bw = new BinaryWriter(fs); + emu.SaveState(bw); + bw.Close(); + fs.Close(); + + byte[] screenData = UMAME.instance.mUniVideoPlayer.GetScreenImg(); + + FileStream fsImg = new FileStream(SavePath + Machine.sName + ".jpg", FileMode.Create); + fsImg.Write(screenData, 0, screenData.Length); + fsImg.Close(); + } + void LoadState() + { + string Path = SavePath + Machine.sName + ".sta"; + if (!File.Exists(Path)) + { + Debug.Log($"文件不存在{Path}"); + return; + } + + FileStream fs = new FileStream(Path, FileMode.Open, FileAccess.Read); + BinaryReader br = new BinaryReader(fs); + emu.LoadState(br); + br.Close(); + fs.Close(); + } } diff --git a/MAME.Unity/Assets/Script/UMAME/UniInterface/KeyCodeCore.cs b/MAME.Unity/Assets/Script/UMAME/UniInterface/KeyCodeCore.cs new file mode 100644 index 0000000..95e66bb --- /dev/null +++ b/MAME.Unity/Assets/Script/UMAME/UniInterface/KeyCodeCore.cs @@ -0,0 +1,164 @@ +锘縰sing AxiReplay; +using MAME.Core; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Runtime.InteropServices.ComTypes; +using UnityEngine; + +public class KeyCodeCore : IKeyboard +{ + public Dictionary dictKeyCfgs = new Dictionary(); + public KeyCode[] CheckList; + public MotionKey[] mCurrKey = new MotionKey[0]; + public ulong CurryInpuAllData = 0; + List temp = new List(); + ulong tempInputAllData = 0; + UniKeyboard mUniKeyboard; + bool bReplayMode; + List ReplayCheckKey = new List(); + + public MotionKey[] GetPressedKeys() + { + if (!bReplayMode) + { + //UMAME.instance.mReplayWriter.NextFrame(CurryInpuAllData); + UMAME.instance.mReplayWriter.NextFramebyFrameIdx((int)UMAME.instance.mUniVideoPlayer.mFrame, CurryInpuAllData); + return mCurrKey; + } + else + { + //鏈夊彉鍖 + + //if (UMAME.instance.mReplayReader.NextFrame(out AxiReplay.ReplayStep stepData)) + if (UMAME.instance.mReplayReader.NextFramebyFrameIdx((int)UMAME.instance.mUniVideoPlayer.mFrame, out AxiReplay.ReplayStep stepData)) + { + temp.Clear(); + //鏈夋暟鎹 + for (int i = 0; i < ReplayCheckKey.Count; i++) + { + if ((stepData.InPut & (ulong)ReplayCheckKey[i]) > 0) + temp.Add(ReplayCheckKey[i]); + } + mCurrKey = temp.ToArray(); + } + +#if UNITY_EDITOR + string TempStr = ""; + foreach (var item in mCurrKey) + { + TempStr += $"{item.ToString()}|"; + } + if (!string.IsNullOrEmpty(TempStr)) + Debug.Log($"Input-銆媨CurryInpuAllData} => {TempStr}"); +#endif + return mCurrKey; + } + } + + public void SetRePlay(bool IsReplay) + { + bReplayMode = IsReplay; + } + public void Init(UniKeyboard uniKeyboard, bool IsReplay) + { + bReplayMode = IsReplay; + mUniKeyboard = uniKeyboard; + foreach (MotionKey mkey in Enum.GetValues(typeof(MotionKey))) + { + ReplayCheckKey.Add(mkey); + } + + dictKeyCfgs.Clear(); + dictKeyCfgs.Add(KeyCode.P, MotionKey.EMU_PAUSED); + dictKeyCfgs.Add(KeyCode.Alpha1, MotionKey.P1_GAMESTART); + dictKeyCfgs.Add(KeyCode.Alpha5, MotionKey.P1_INSERT_COIN); + dictKeyCfgs.Add(KeyCode.W, MotionKey.P1_UP); + dictKeyCfgs.Add(KeyCode.S, MotionKey.P1_DOWN); + dictKeyCfgs.Add(KeyCode.A, MotionKey.P1_LEFT); + dictKeyCfgs.Add(KeyCode.D, MotionKey.P1_RIGHT); + dictKeyCfgs.Add(KeyCode.J, MotionKey.P1_BTN_1); + dictKeyCfgs.Add(KeyCode.K, MotionKey.P1_BTN_2); + dictKeyCfgs.Add(KeyCode.L, MotionKey.P1_BTN_3); + dictKeyCfgs.Add(KeyCode.U, MotionKey.P1_BTN_4); + dictKeyCfgs.Add(KeyCode.KeypadDivide, MotionKey.P2_GAMESTART); + dictKeyCfgs.Add(KeyCode.KeypadMultiply, MotionKey.P2_INSERT_COIN); + dictKeyCfgs.Add(KeyCode.UpArrow, MotionKey.P2_UP); + dictKeyCfgs.Add(KeyCode.DownArrow, MotionKey.P2_DOWN); + dictKeyCfgs.Add(KeyCode.LeftArrow, MotionKey.P2_LEFT); + dictKeyCfgs.Add(KeyCode.RightArrow, MotionKey.P2_RIGHT); + dictKeyCfgs.Add(KeyCode.Keypad1, MotionKey.P2_BTN_1); + dictKeyCfgs.Add(KeyCode.Keypad2, MotionKey.P2_BTN_2); + dictKeyCfgs.Add(KeyCode.Keypad3, MotionKey.P2_BTN_3); + dictKeyCfgs.Add(KeyCode.Keypad4, MotionKey.P2_BTN_4); + CheckList = dictKeyCfgs.Keys.ToArray(); + + + mUniKeyboard.btnP1.Key = new long[] { (long)MotionKey.P1_GAMESTART }; + mUniKeyboard.btnCoin1.Key = new long[] { (long)MotionKey.P1_INSERT_COIN }; + mUniKeyboard.btnA.Key = new long[] { (long)MotionKey.P1_BTN_1 }; + mUniKeyboard.btnB.Key = new long[] { (long)MotionKey.P1_BTN_2 }; + mUniKeyboard.btnC.Key = new long[] { (long)MotionKey.P1_BTN_3 }; + mUniKeyboard.btnD.Key = new long[] { (long)MotionKey.P1_BTN_4 }; + //mUniKeyboard.btnE.Key = new long[] { (long)MotionKey.P1_BTN_5 }; + //mUniKeyboard.btnF.Key = new long[] { (long)MotionKey.P1_BTN_6 }; + mUniKeyboard.btnAB.Key = new long[] { (long)MotionKey.P1_BTN_1, (long)MotionKey.P1_BTN_2 }; + mUniKeyboard.btnCD.Key = new long[] { (long)MotionKey.P1_BTN_3, (long)MotionKey.P1_BTN_4 }; + mUniKeyboard.btnABC.Key = new long[] { (long)MotionKey.P1_BTN_1, (long)MotionKey.P1_BTN_2, (long)MotionKey.P1_BTN_3 }; + } + + public void UpdateLogic() + { + if (bReplayMode) return; + tempInputAllData = 0; + temp.Clear(); + for (int i = 0; i < CheckList.Length; i++) + { + if (Input.GetKey(CheckList[i])) + { + MotionKey mk = dictKeyCfgs[CheckList[i]]; + temp.Add(mk); + tempInputAllData |= (ulong)mk; + } + } + + for (int i = 0; i < mUniKeyboard.mUIBtns.Count; i++) + { + if (mUniKeyboard.mUIBtns[i].bHotKey) + { + for (int j = 0; j < mUniKeyboard.mUIBtns[i].Key.Length; j++) + { + MotionKey mk = (MotionKey)mUniKeyboard.mUIBtns[i].Key[j]; + temp.Add(mk); + tempInputAllData |= (ulong)mk; + } + } + } + + Vector2Int inputV2 = mUniKeyboard.mJoystick.RawInputV2; + //Debug.Log($"{inputV2.x},{inputV2.y}"); + if (inputV2.x > 0) + { + temp.Add(MotionKey.P1_RIGHT); + tempInputAllData |= (ulong)MotionKey.P1_RIGHT; + } + else if (inputV2.x < 0) + { + temp.Add(MotionKey.P1_LEFT); + tempInputAllData |= (ulong)MotionKey.P1_LEFT; + } + if (inputV2.y > 0) + { + temp.Add(MotionKey.P1_UP); + tempInputAllData |= (ulong)MotionKey.P1_UP; + } + else if (inputV2.y < 0) + { + temp.Add(MotionKey.P1_DOWN); + tempInputAllData |= (ulong)MotionKey.P1_DOWN; + } + CurryInpuAllData = tempInputAllData; + mCurrKey = temp.ToArray(); + + } +} \ No newline at end of file diff --git a/MAME.Unity/Assets/Script/UMAME/UniInterface/KeyCodeCore.cs.meta b/MAME.Unity/Assets/Script/UMAME/UniInterface/KeyCodeCore.cs.meta new file mode 100644 index 0000000..00f0299 --- /dev/null +++ b/MAME.Unity/Assets/Script/UMAME/UniInterface/KeyCodeCore.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 3054336185b15f84d9543bdafb49907f +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/MAME.Unity/Assets/Script/UMAME/UniInterface/UniKeyboard.cs b/MAME.Unity/Assets/Script/UMAME/UniInterface/UniKeyboard.cs index e96fe86..91f05fe 100644 --- a/MAME.Unity/Assets/Script/UMAME/UniInterface/UniKeyboard.cs +++ b/MAME.Unity/Assets/Script/UMAME/UniInterface/UniKeyboard.cs @@ -1,15 +1,9 @@ -using MAME.Core.run_interface; using System.Collections.Generic; -using System.Linq; using UnityEngine; -public class UniKeyboard : MonoBehaviour, IKeyboard +public class UniKeyboard : MonoBehaviour { - Dictionary dictKeyCfgs = new Dictionary(); - KeyCode[] CheckList; - MotionKey[] mCurrKey = new MotionKey[0]; - List temp = new List(); - + public KeyCodeCore mKeyCodeCore = new KeyCodeCore(); #region public UILongClickButton btnP1; public UILongClickButton btnCoin1; @@ -17,16 +11,16 @@ public class UniKeyboard : MonoBehaviour, IKeyboard public UILongClickButton btnB; public UILongClickButton btnC; public UILongClickButton btnD; - public UILongClickButton btnE; - public UILongClickButton btnF; + //public UILongClickButton btnE; + //public UILongClickButton btnF; public UILongClickButton btnAB; public UILongClickButton btnCD; public UILongClickButton btnABC; - FloatingJoystick mJoystick; public Transform tfKeyPad; + public FloatingJoystick mJoystick; #endregion - List mUIBtns = new List(); + public List mUIBtns = new List(); void Awake() { @@ -38,112 +32,46 @@ public class UniKeyboard : MonoBehaviour, IKeyboard btnB = GameObject.Find("btnB").GetComponent(); btnC = GameObject.Find("btnC").GetComponent(); btnD = GameObject.Find("btnD").GetComponent(); - btnE = GameObject.Find("btnE").GetComponent(); - btnF = GameObject.Find("btnF").GetComponent(); + //btnE = GameObject.Find("btnE")?.GetComponent(); + //btnF = GameObject.Find("btnF")?.GetComponent(); btnAB = GameObject.Find("btnAB").GetComponent(); btnCD = GameObject.Find("btnCD").GetComponent(); btnABC = GameObject.Find("btnABC").GetComponent(); - btnE.gameObject.SetActive(false); - btnF.gameObject.SetActive(false); - -#if UNITY_STANDALONE_WIN || UNITY_EDITOR - tfKeyPad.gameObject.SetActive(false); -#endif - dictKeyCfgs.Add(KeyCode.P, MotionKey.EMU_PAUSED); - - dictKeyCfgs.Add(KeyCode.Alpha1, MotionKey.P1_GAMESTART); - dictKeyCfgs.Add(KeyCode.Alpha5, MotionKey.P1_INSERT_COIN); - dictKeyCfgs.Add(KeyCode.W, MotionKey.P1_UP); - dictKeyCfgs.Add(KeyCode.S, MotionKey.P1_DOWN); - dictKeyCfgs.Add(KeyCode.A, MotionKey.P1_LEFT); - dictKeyCfgs.Add(KeyCode.D, MotionKey.P1_RIGHT); - dictKeyCfgs.Add(KeyCode.J, MotionKey.P1_BTN_1); - dictKeyCfgs.Add(KeyCode.K, MotionKey.P1_BTN_2); - dictKeyCfgs.Add(KeyCode.L, MotionKey.P1_BTN_3); - dictKeyCfgs.Add(KeyCode.U, MotionKey.P1_BTN_4); - - dictKeyCfgs.Add(KeyCode.KeypadDivide, MotionKey.P2_GAMESTART); - dictKeyCfgs.Add(KeyCode.KeypadMultiply, MotionKey.P2_INSERT_COIN); - dictKeyCfgs.Add(KeyCode.UpArrow, MotionKey.P2_UP); - dictKeyCfgs.Add(KeyCode.DownArrow, MotionKey.P2_DOWN); - dictKeyCfgs.Add(KeyCode.LeftArrow, MotionKey.P2_LEFT); - dictKeyCfgs.Add(KeyCode.RightArrow, MotionKey.P2_RIGHT); - dictKeyCfgs.Add(KeyCode.Keypad1, MotionKey.P2_BTN_1); - dictKeyCfgs.Add(KeyCode.Keypad2, MotionKey.P2_BTN_2); - dictKeyCfgs.Add(KeyCode.Keypad3, MotionKey.P2_BTN_3); - dictKeyCfgs.Add(KeyCode.Keypad4, MotionKey.P2_BTN_4); - - CheckList = dictKeyCfgs.Keys.ToArray(); - - btnP1.Key = new MotionKey[] { MotionKey.P1_GAMESTART }; - btnCoin1.Key = new MotionKey[] { MotionKey.P1_INSERT_COIN }; - btnA.Key = new MotionKey[] { MotionKey.P1_BTN_1 }; - btnB.Key = new MotionKey[] { MotionKey.P1_BTN_2 }; - btnC.Key = new MotionKey[] { MotionKey.P1_BTN_3 }; - btnD.Key = new MotionKey[] { MotionKey.P1_BTN_4 }; - btnE.Key = new MotionKey[] { MotionKey.P1_BTN_5 }; - btnF.Key = new MotionKey[] { MotionKey.P1_BTN_6 }; - - btnAB.Key = new MotionKey[] { MotionKey.P1_BTN_1, MotionKey.P1_BTN_2 }; - btnCD.Key = new MotionKey[] { MotionKey.P1_BTN_3, MotionKey.P1_BTN_4 }; - btnABC.Key = new MotionKey[] { MotionKey.P1_BTN_1, MotionKey.P1_BTN_2, MotionKey.P1_BTN_3 }; - mUIBtns.Add(btnP1); mUIBtns.Add(btnCoin1); mUIBtns.Add(btnA); mUIBtns.Add(btnB); mUIBtns.Add(btnC); mUIBtns.Add(btnD); - mUIBtns.Add(btnE); - mUIBtns.Add(btnF); mUIBtns.Add(btnAB); mUIBtns.Add(btnCD); mUIBtns.Add(btnABC); + + //if (btnE != null) + //{ + // mUIBtns.Add(btnE); + // btnE.gameObject.SetActive(false); + //} + //else + //{ + // mUIBtns.Add(btnF); + // btnF.gameObject.SetActive(false); + //} + + +#if UNITY_STANDALONE_WIN || UNITY_EDITOR + tfKeyPad.gameObject.SetActive(false); +#endif + mKeyCodeCore.Init(this,false); } void OnEnable() { } - public MotionKey[] GetPressedKeys() - { - return mCurrKey; - } - void Update() { - temp.Clear(); - for (int i = 0; i < CheckList.Length; i++) - { - if (Input.GetKey(CheckList[i])) - temp.Add(dictKeyCfgs[CheckList[i]]); - } - - for (int i = 0; i < mUIBtns.Count; i++) - { - if (mUIBtns[i].bHotKey) - { - for (int j = 0; j < mUIBtns[i].Key.Length; j++) - temp.Add(mUIBtns[i].Key[j]); - } - } - - Vector2Int inputV2 = mJoystick.RawInputV2; - //Debug.Log($"{inputV2.x},{inputV2.y}"); - if (inputV2.x > 0) temp.Add(MotionKey.P1_RIGHT); else if (inputV2.x < 0) temp.Add(MotionKey.P1_LEFT); - if (inputV2.y > 0) temp.Add(MotionKey.P1_UP); else if (inputV2.y < 0) temp.Add(MotionKey.P1_DOWN); - - mCurrKey = temp.ToArray(); - -#if UNITY_EDITOR - string TempStr = ""; - foreach (var item in mCurrKey) - { - TempStr += $"{item.ToString()}|"; - } - if(!string.IsNullOrEmpty(TempStr)) - Debug.Log(TempStr); -#endif + mKeyCodeCore.UpdateLogic(); } } \ No newline at end of file diff --git a/MAME.Unity/Assets/Script/UMAME/UniInterface/UniLog.cs b/MAME.Unity/Assets/Script/UMAME/UniInterface/UniLog.cs index c4277e8..df77147 100644 --- a/MAME.Unity/Assets/Script/UMAME/UniInterface/UniLog.cs +++ b/MAME.Unity/Assets/Script/UMAME/UniInterface/UniLog.cs @@ -1,4 +1,4 @@ -using MAME.Core.run_interface; +using MAME.Core; using UnityEngine; public class UniLog : ILog diff --git a/MAME.Unity/Assets/Script/UMAME/UniInterface/UniMouse.cs b/MAME.Unity/Assets/Script/UMAME/UniInterface/UniMouse.cs index 2d2b729..e4a1af5 100644 --- a/MAME.Unity/Assets/Script/UMAME/UniInterface/UniMouse.cs +++ b/MAME.Unity/Assets/Script/UMAME/UniInterface/UniMouse.cs @@ -1,4 +1,4 @@ -using MAME.Core.run_interface; +using MAME.Core; using UnityEngine; public class UniMouse : MonoBehaviour, IMouse diff --git a/MAME.Unity/Assets/Script/UMAME/UniInterface/UniResources.cs b/MAME.Unity/Assets/Script/UMAME/UniInterface/UniResources.cs index b7a4f65..28aab6e 100644 --- a/MAME.Unity/Assets/Script/UMAME/UniInterface/UniResources.cs +++ b/MAME.Unity/Assets/Script/UMAME/UniInterface/UniResources.cs @@ -1,4 +1,4 @@ -using MAME.Core.run_interface; +using MAME.Core; using UnityEngine; public class UniResources : IResources diff --git a/MAME.Unity/Assets/Script/UMAME/UniInterface/UniSoundPlayer.cs b/MAME.Unity/Assets/Script/UMAME/UniInterface/UniSoundPlayer.cs index 19d4eae..fd0a8dc 100644 --- a/MAME.Unity/Assets/Script/UMAME/UniInterface/UniSoundPlayer.cs +++ b/MAME.Unity/Assets/Script/UMAME/UniInterface/UniSoundPlayer.cs @@ -1,4 +1,4 @@ -using MAME.Core.run_interface; +using MAME.Core; using System; using UnityEngine; @@ -71,35 +71,6 @@ public class UniSoundPlayer : MonoBehaviour, ISoundPlayer _buffer.Write(left / 32767.0f); //_buffer.Write(right / 32767.0f); } - return; - - float[] floatdata = ConvertByteArrayToFloatArray(buffer, samples_a, 2); - for (int i = 0; i < samples_a; i++) - { - _buffer.Write(floatdata[i]); - } - } - - float[] floatArray = new float[960]; - public float[] ConvertByteArrayToFloatArray(byte[] buffer, int samples_a, int channels) - { - //int sampleCount = buffer.Length / (channels * 2); // 16位,所以每个样本2字节 - - - for (int i = 0; i < samples_a; i++) - { - // 读取左右声道 - //short left = BitConverter.ToInt16(buffer, i * channels * 2); - //short right = BitConverter.ToInt16(buffer, i * channels * 2 + 2); - // 转换为-1.0到1.0的浮点数 - //floatArray[i] = left / 32767.0f; // 32767是16位整数的最大值 - //floatArray[i + 1] = right / 32767.0f; - - short onedata = BitConverter.ToInt16(buffer, i * channels * 2); - floatArray[i] = onedata / 32767.0f; - } - - return floatArray; } public void BufferWirte(int Off, byte[] Data) diff --git a/MAME.Unity/Assets/Script/UMAME/UniInterface/UniVideoPlayer.cs b/MAME.Unity/Assets/Script/UMAME/UniInterface/UniVideoPlayer.cs index aad0232..cd4ec06 100644 --- a/MAME.Unity/Assets/Script/UMAME/UniInterface/UniVideoPlayer.cs +++ b/MAME.Unity/Assets/Script/UMAME/UniInterface/UniVideoPlayer.cs @@ -1,7 +1,8 @@ -using MAME.Core.run_interface; +using MAME.Core; using System; using UnityEngine; using UnityEngine.UI; +using static TMPro.SpriteAssetUtilities.TexturePacker_JsonArray; public class UniVideoPlayer : MonoBehaviour, IVideoPlayer { @@ -22,10 +23,12 @@ public class UniVideoPlayer : MonoBehaviour, IVideoPlayer private TimeSpan lastElapsed; public double videoFPS { get; private set; } + public ulong mFrame { get; private set; } bool bInit = false; private void Awake() { + mFrame = 0; m_drawCanvas = GameObject.Find("GameRawImage").GetComponent(); m_drawCanvasrect = m_drawCanvas.GetComponent(); } @@ -66,12 +69,20 @@ public class UniVideoPlayer : MonoBehaviour, IVideoPlayer m_rawBufferWarper.Apply(); } - public void SubmitVideo(int[] data) + public void SubmitVideo(int[] data, long frame_number) { + mFrame = (ulong)frame_number; var current = UMAME.sw.Elapsed; var delta = current - lastElapsed; lastElapsed = current; videoFPS = 1d / delta.TotalSeconds; mFrameData = data; + + //Debug.Log($"frame_number -> {frame_number}"); + } + + public byte[] GetScreenImg() + { + return (m_drawCanvas.texture as Texture2D).EncodeToJPG(); } }