forked from sin365/AxibugEmuOnline
Compare commits
3 Commits
35a5f03a66
...
1ed81f53be
| Author | SHA1 | Date | |
|---|---|---|---|
| 1ed81f53be | |||
| ad5b792fcd | |||
| b6e6e750d4 |
@ -33,10 +33,10 @@ RectTransform:
|
||||
m_Children: []
|
||||
m_Father: {fileID: 2450201408575734812}
|
||||
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: 0, y: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 143.5, y: -15.666667}
|
||||
m_SizeDelta: {x: 183, y: 26}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &4761092020446986678
|
||||
CanvasRenderer:
|
||||
@ -227,10 +227,10 @@ RectTransform:
|
||||
m_Children: []
|
||||
m_Father: {fileID: 2450201408575734812}
|
||||
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: 0, y: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 20, y: -15.666667}
|
||||
m_SizeDelta: {x: 40, y: 31.333334}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &7860273967724122996
|
||||
CanvasRenderer:
|
||||
@ -323,10 +323,10 @@ RectTransform:
|
||||
m_Children: []
|
||||
m_Father: {fileID: 2780569438310375802}
|
||||
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: 0, y: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 40, y: -25.666668}
|
||||
m_SizeDelta: {x: 40, y: 31.333336}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &6442047476311195174
|
||||
CanvasRenderer:
|
||||
@ -553,10 +553,10 @@ RectTransform:
|
||||
- {fileID: 7754613193470953066}
|
||||
m_Father: {fileID: 278706555072840209}
|
||||
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: 0, y: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 175.5, y: -134.66667}
|
||||
m_SizeDelta: {x: 311, y: 31.333334}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &406189280625441644
|
||||
MonoBehaviour:
|
||||
@ -623,10 +623,10 @@ RectTransform:
|
||||
- {fileID: 8076039040411293610}
|
||||
m_Father: {fileID: 2780569438310375802}
|
||||
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: 0, y: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 321, y: -25.666668}
|
||||
m_SizeDelta: {x: 20, y: 20}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &8983615257379814102
|
||||
MonoBehaviour:
|
||||
@ -902,10 +902,10 @@ RectTransform:
|
||||
- {fileID: 3923554087608668260}
|
||||
m_Father: {fileID: 278706555072840209}
|
||||
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: 0, y: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 175.5, y: -171.00002}
|
||||
m_SizeDelta: {x: 311, y: 31.333334}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &1792874459052106251
|
||||
MonoBehaviour:
|
||||
@ -957,7 +957,7 @@ GameObject:
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
m_IsActive: 0
|
||||
--- !u!224 &2780569438310375802
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -976,10 +976,10 @@ RectTransform:
|
||||
- {fileID: 4264754383554125665}
|
||||
m_Father: {fileID: 4478785627166277610}
|
||||
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: 0, y: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 170.5, y: -25.666668}
|
||||
m_SizeDelta: {x: 341, y: 51.333336}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &9142037267599823005
|
||||
MonoBehaviour:
|
||||
@ -1092,10 +1092,10 @@ RectTransform:
|
||||
m_Children: []
|
||||
m_Father: {fileID: 2780569438310375802}
|
||||
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: 0, y: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 284, y: -25.666668}
|
||||
m_SizeDelta: {x: 30, y: 30}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &8134207541370216537
|
||||
CanvasRenderer:
|
||||
@ -1427,7 +1427,7 @@ GameObject:
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
m_IsActive: 0
|
||||
--- !u!224 &278706555072840209
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -1447,10 +1447,10 @@ RectTransform:
|
||||
- {fileID: 816049057894123782}
|
||||
m_Father: {fileID: 4478785627166277610}
|
||||
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: 0, y: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 170.5, y: -149.66667}
|
||||
m_SizeDelta: {x: 341, y: 196.66667}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &2621485483361375335
|
||||
MonoBehaviour:
|
||||
@ -1649,10 +1649,10 @@ RectTransform:
|
||||
- {fileID: 7900345916139696652}
|
||||
m_Father: {fileID: 278706555072840209}
|
||||
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: 0, y: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 175.5, y: -98.333336}
|
||||
m_SizeDelta: {x: 311, y: 31.333334}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &9093150501524936851
|
||||
MonoBehaviour:
|
||||
@ -1721,10 +1721,10 @@ RectTransform:
|
||||
- {fileID: 3877041774025625573}
|
||||
m_Father: {fileID: 278706555072840209}
|
||||
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: 0, y: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 175.5, y: -25.666668}
|
||||
m_SizeDelta: {x: 311, y: 31.333334}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &6023196883469018230
|
||||
MonoBehaviour:
|
||||
@ -1785,10 +1785,10 @@ RectTransform:
|
||||
m_Children: []
|
||||
m_Father: {fileID: 7754613193470953066}
|
||||
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: 0, y: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 155.5, y: -15.666667}
|
||||
m_SizeDelta: {x: 311, y: 31.333334}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &6646371810488858664
|
||||
CanvasRenderer:
|
||||
@ -1887,10 +1887,10 @@ RectTransform:
|
||||
- {fileID: 5211094055976679099}
|
||||
m_Father: {fileID: 7900345916139696652}
|
||||
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: 0, y: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 106.66667, y: -15.666667}
|
||||
m_SizeDelta: {x: 213.33334, y: 31.333334}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &5919193658528722431
|
||||
MonoBehaviour:
|
||||
@ -1996,10 +1996,10 @@ RectTransform:
|
||||
- {fileID: 3411987631237892165}
|
||||
m_Father: {fileID: 278706555072840209}
|
||||
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: 0, y: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 175.5, y: -62.000004}
|
||||
m_SizeDelta: {x: 311, y: 31.333334}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &2814991476448031351
|
||||
MonoBehaviour:
|
||||
@ -2068,10 +2068,10 @@ RectTransform:
|
||||
m_Children: []
|
||||
m_Father: {fileID: 7900345916139696652}
|
||||
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: 0, y: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 264.6667, y: -15.666667}
|
||||
m_SizeDelta: {x: 92.66667, y: 31.333334}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &7323868397581272064
|
||||
CanvasRenderer:
|
||||
@ -2170,10 +2170,10 @@ RectTransform:
|
||||
- {fileID: 839073477422163140}
|
||||
m_Father: {fileID: 3411987631237892165}
|
||||
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: 0, y: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 106.66667, y: -15.666667}
|
||||
m_SizeDelta: {x: 213.33334, y: 31.333334}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &6489571631904078165
|
||||
MonoBehaviour:
|
||||
@ -2279,10 +2279,10 @@ RectTransform:
|
||||
m_Children: []
|
||||
m_Father: {fileID: 2780569438310375802}
|
||||
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: 0, y: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 164.5, y: -25.666668}
|
||||
m_SizeDelta: {x: 185, y: 26}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &6532365540230118336
|
||||
CanvasRenderer:
|
||||
@ -2377,7 +2377,7 @@ RectTransform:
|
||||
m_Father: {fileID: 5502792356073001137}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 10, y: 0}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
@ -2515,7 +2515,7 @@ RectTransform:
|
||||
m_Father: {fileID: 839073477422163140}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 20, y: -20}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
@ -2729,7 +2729,7 @@ RectTransform:
|
||||
m_Father: {fileID: 758531668636581813}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 10, y: 0}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
@ -2804,10 +2804,10 @@ RectTransform:
|
||||
m_Children: []
|
||||
m_Father: {fileID: 3411987631237892165}
|
||||
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: 0, y: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 264.6667, y: -15.666667}
|
||||
m_SizeDelta: {x: 92.66667, y: 31.333334}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &7497419100168238325
|
||||
CanvasRenderer:
|
||||
@ -2904,7 +2904,7 @@ RectTransform:
|
||||
m_Father: {fileID: 5211094055976679099}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 20, y: -20}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
@ -2979,10 +2979,10 @@ RectTransform:
|
||||
m_Children: []
|
||||
m_Father: {fileID: 3923554087608668260}
|
||||
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: 0, y: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 155.5, y: -15.666667}
|
||||
m_SizeDelta: {x: 311, y: 31.333334}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &88244861463061753
|
||||
CanvasRenderer:
|
||||
|
||||
@ -49,11 +49,19 @@ namespace AxibugEmuOnline.Client.ClientCore
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
static string s_persistentRoot =
|
||||
#if UNITY_PSP2 && !UNITY_EDITOR //PSV真机
|
||||
public static string PersistentDataPath => "ux0:data/AxibugEmu";
|
||||
"ux0:data/AxibugEmu";
|
||||
#else
|
||||
public static string PersistentDataPath => Application.persistentDataPath;
|
||||
Application.persistentDataPath;
|
||||
#endif
|
||||
public static string PersistentDataPath(RomPlatformType emuPlatform)
|
||||
{
|
||||
return s_persistentRoot + "/" + emuPlatform.ToString();
|
||||
}
|
||||
public static string PersistentDataRoot() => s_persistentRoot;
|
||||
|
||||
public static void Init(bool isTest = false, string testSrvIP = "", bool bUseLocalWebApi = false, string mLocalWebApi = "")
|
||||
{
|
||||
log = new LogManager(OnLogOut);
|
||||
@ -100,8 +108,8 @@ namespace AxibugEmuOnline.Client.ClientCore
|
||||
private static void PSP2Init()
|
||||
{
|
||||
//PSVita最好手动创建目录
|
||||
if (!Directory.Exists(PersistentDataPath))
|
||||
Directory.CreateDirectory(PersistentDataPath);
|
||||
if (!Directory.Exists("ux0:data/AxibugEmu"))
|
||||
Directory.CreateDirectory("ux0:data/AxibugEmu");
|
||||
|
||||
#if UNITY_PSP2
|
||||
//创建PSV弹窗UI
|
||||
|
||||
@ -9,7 +9,7 @@ namespace AxibugEmuOnline.Client
|
||||
{
|
||||
public class CacheManager
|
||||
{
|
||||
static readonly string CacheDirPath = $"{App.PersistentDataPath}/Caches";
|
||||
static readonly string CacheDirPath = $"{App.PersistentDataRoot()}/Caches";
|
||||
static readonly string TextureCacheDirPath = $"{CacheDirPath}/Texture";
|
||||
|
||||
public void GetSpriteCache(string url, Action<Sprite, string> callback)
|
||||
|
||||
@ -21,8 +21,8 @@ namespace AxibugEmuOnline.Client
|
||||
/// <summary> 指示该Rom文件的存放路径 </summary>
|
||||
public string LocalFilePath =>
|
||||
IsUserRom ?
|
||||
$"{App.PersistentDataPath}/UserRoms/{Platform}/{FileName}" :
|
||||
$"{App.PersistentDataPath}/RemoteRoms/{Platform}/{FileName}";
|
||||
$"{App.PersistentDataPath(Platform)}/UserRoms/{FileName}" :
|
||||
$"{App.PersistentDataPath(Platform)}/RemoteRoms/{FileName}";
|
||||
|
||||
/// <summary> 指示该Rom文件是否已下载完毕 </summary>
|
||||
public bool RomReady => hasLocalFile;
|
||||
|
||||
@ -61,7 +61,7 @@ namespace AxibugEmuOnline.Client
|
||||
/// <summary> 清除所有下载的Rom文件 </summary>
|
||||
public void ClearRomFile()
|
||||
{
|
||||
var path = $"{App.PersistentDataPath}/RemoteRoms/{m_platform}";
|
||||
var path = $"{App.PersistentDataPath(m_platform)}/RemoteRoms";
|
||||
if (Directory.Exists(path)) Directory.Delete(path, true);
|
||||
}
|
||||
|
||||
|
||||
@ -48,7 +48,7 @@ namespace AxibugEmuOnline.Client
|
||||
|
||||
public void SaveSRAMToFile(byte[] sramContent, string romName)
|
||||
{
|
||||
string sramDirectoryPath = $"{App.PersistentDataPath}/sav";
|
||||
string sramDirectoryPath = $"{App.PersistentDataPath(AxibugProtobuf.RomPlatformType.Nes)}/{Config.path.szSavePath}";
|
||||
Directory.CreateDirectory(sramDirectoryPath);
|
||||
romName = Path.GetFileNameWithoutExtension(romName);
|
||||
File.WriteAllBytes($"{sramDirectoryPath}/{romName}.sav", sramContent);
|
||||
@ -56,7 +56,7 @@ namespace AxibugEmuOnline.Client
|
||||
|
||||
public void SaveDISKToFile(byte[] diskFileContent, string romName)
|
||||
{
|
||||
string diskFileDirectoryPath = $"{App.PersistentDataPath}/dsv";
|
||||
string diskFileDirectoryPath = $"{App.PersistentDataPath(AxibugProtobuf.RomPlatformType.Nes)}/dsv";
|
||||
Directory.CreateDirectory(diskFileDirectoryPath);
|
||||
romName = Path.GetFileNameWithoutExtension(romName);
|
||||
File.WriteAllBytes($"{diskFileDirectoryPath}/{romName}.dsv", diskFileContent);
|
||||
@ -65,14 +65,14 @@ namespace AxibugEmuOnline.Client
|
||||
public EmulatorConfig Config { get; private set; } = new EmulatorConfig();
|
||||
public void PrepareDirectory(string directPath)
|
||||
{
|
||||
Directory.CreateDirectory($"{App.PersistentDataPath}/{directPath}");
|
||||
Directory.CreateDirectory($"{App.PersistentDataPath(AxibugProtobuf.RomPlatformType.Nes)}/{directPath}");
|
||||
}
|
||||
|
||||
public void SaveFile(byte[] fileData, string directPath, string fileName)
|
||||
{
|
||||
PrepareDirectory(directPath);
|
||||
|
||||
var fileFullpath = $"{App.PersistentDataPath}/{directPath}/{fileName}";
|
||||
var fileFullpath = $"{App.PersistentDataPath(AxibugProtobuf.RomPlatformType.Nes)}/{directPath}/{fileName}";
|
||||
File.WriteAllBytes(fileFullpath, fileData);
|
||||
}
|
||||
|
||||
@ -80,7 +80,8 @@ namespace AxibugEmuOnline.Client
|
||||
{
|
||||
try
|
||||
{
|
||||
var data = File.ReadAllBytes($"{App.PersistentDataPath}/{directPath}/{fileName}");
|
||||
var path = $"{App.PersistentDataPath(AxibugProtobuf.RomPlatformType.Nes)}/{directPath}/{fileName}";
|
||||
var data = File.ReadAllBytes(path);
|
||||
if (data == null) return null;
|
||||
return new MemoryStream(data);
|
||||
}
|
||||
@ -88,7 +89,6 @@ namespace AxibugEmuOnline.Client
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public bool TryGetMapperNo(ROM rom, out int mapperNo)
|
||||
|
||||
@ -216,6 +216,9 @@ namespace AxibugEmuOnline.Client
|
||||
return ControllerMapper;
|
||||
}
|
||||
|
||||
public void Dispose() { }
|
||||
public void Dispose()
|
||||
{
|
||||
StopGame();
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -319,6 +319,12 @@ namespace VirtualNes.Core
|
||||
return false;
|
||||
}
|
||||
|
||||
internal void QueueClear()
|
||||
{
|
||||
queue.Clear();
|
||||
exqueue.Clear();
|
||||
}
|
||||
|
||||
private void QueueFlush()
|
||||
{
|
||||
while (queue.wrptr != queue.rdptr)
|
||||
@ -651,5 +657,11 @@ namespace VirtualNes.Core
|
||||
public int rdptr;
|
||||
public int wrptr;
|
||||
public QUEUEDATA[] data = new QUEUEDATA[8192];
|
||||
|
||||
public void Clear()
|
||||
{
|
||||
rdptr = 0;wrptr = 0;
|
||||
data = new QUEUEDATA[8192];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -355,6 +355,7 @@ namespace VirtualNes.Core
|
||||
private void LoadDISK()
|
||||
{
|
||||
//todo : 磁碟机读取支持
|
||||
Debuger.LogError($"磁碟机尚未支持");
|
||||
}
|
||||
|
||||
private void LoadSRAM()
|
||||
@ -1070,6 +1071,10 @@ namespace VirtualNes.Core
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
SaveSRAM();
|
||||
SaveDISK();
|
||||
SaveTurboFile();
|
||||
|
||||
cpu?.Dispose();
|
||||
ppu?.Dispose();
|
||||
apu?.Dispose();
|
||||
@ -1081,7 +1086,7 @@ namespace VirtualNes.Core
|
||||
{
|
||||
int i;
|
||||
if (rom.IsNSF()) return;
|
||||
if (rom.IsSAVERAM()) return;
|
||||
if (!rom.IsSAVERAM()) return;
|
||||
|
||||
for (i = 0; i < SAVERAM_SIZE; i++)
|
||||
{
|
||||
@ -1841,10 +1846,11 @@ namespace VirtualNes.Core
|
||||
);
|
||||
|
||||
|
||||
cpu.SetDmaCycles(state.reg.cpureg.DMA_cycles);
|
||||
emul_cycles = state.reg.cpureg.emul_cycles;
|
||||
base_cycles = state.reg.cpureg.base_cycles;
|
||||
|
||||
cpu.SetDmaCycles(state.reg.cpureg.DMA_cycles);
|
||||
|
||||
// LOAD PPU STATE
|
||||
MMU.PPUREG[0] = state.reg.ppureg.reg0;
|
||||
MMU.PPUREG[1] = state.reg.ppureg.reg1;
|
||||
@ -1857,6 +1863,8 @@ namespace VirtualNes.Core
|
||||
MMU.PPU56Toggle = state.reg.ppureg.toggle56;
|
||||
}
|
||||
|
||||
apu.QueueClear();
|
||||
|
||||
//RAM STATE
|
||||
{
|
||||
// SAVE RAM STATE
|
||||
|
||||
@ -244,11 +244,11 @@ namespace VirtualNes.Core
|
||||
|
||||
FileNameCheck(fname);
|
||||
|
||||
if (Supporter.S.TryGetMapperNo(this, out int mapperNo))
|
||||
{
|
||||
Debuger.Log($"ROMDB Set Mapper #{mapper:000} to #{mapperNo:000}");
|
||||
mapper = mapperNo;
|
||||
}
|
||||
//if (Supporter.S.TryGetMapperNo(this, out int mapperNo))
|
||||
//{
|
||||
// Debuger.Log($"ROMDB Set Mapper #{mapper:000} to #{mapperNo:000}");
|
||||
// mapper = mapperNo;
|
||||
//}
|
||||
|
||||
RomPatch.DoPatch(ref crc, ref lpPRG, ref lpCHR, ref mapper, ref header);
|
||||
|
||||
|
||||
@ -12,7 +12,7 @@
|
||||
public bool bIpsPath = true;
|
||||
|
||||
public string szRomPath = "roms";
|
||||
public string szSavePath = "save";
|
||||
public string szSavePath = "sav";
|
||||
public string szStatePath = "state";
|
||||
public string szSnapshotPath = "snapshot";
|
||||
public string szMoviePath = "movie";
|
||||
|
||||
@ -12,7 +12,7 @@ PlayerSettings:
|
||||
targetDevice: 2
|
||||
useOnDemandResources: 0
|
||||
accelerometerFrequency: 60
|
||||
companyName: DefaultCompany
|
||||
companyName: AlienTechnology
|
||||
productName: AxibugEmuOnline.Client
|
||||
defaultCursor: {fileID: 0}
|
||||
cursorHotspot: {x: 0, y: 0}
|
||||
@ -164,7 +164,7 @@ PlayerSettings:
|
||||
androidMinAspectRatio: 1
|
||||
applicationIdentifier:
|
||||
Android: com.DefaultCompany.AxibugEmuOnline.Client
|
||||
Standalone: com.DefaultCompany.AxibugEmuOnline.Client
|
||||
Standalone: com.AlienTechnology.AxibugEmuOnline.Client
|
||||
buildNumber:
|
||||
Standalone: 0
|
||||
VisionOS: 0
|
||||
|
||||
Loading…
Reference in New Issue
Block a user