Compare commits

...

3 Commits

Author SHA1 Message Date
1ed81f53be Unity项目设置中的DefaultCompany改为AlienTechnology(稍微正式一点) 2025-01-13 17:38:26 +08:00
ad5b792fcd 重新组织PersisdentPath路径,现在每个模拟器核心具有单独的隔离路径
修复Nes核心,读取SRAM失败的bug(SRAM是NES原生存档数据)
暂时移除ROMDB,因为目前发现这个映射并不准确
将
2025-01-13 17:36:05 +08:00
b6e6e750d4 初始时的边栏UI模板默认隐藏 2025-01-13 15:45:43 +08:00
12 changed files with 138 additions and 107 deletions

View File

@ -33,10 +33,10 @@ RectTransform:
m_Children: [] m_Children: []
m_Father: {fileID: 2450201408575734812} m_Father: {fileID: 2450201408575734812}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0} m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 0, y: 0} m_AnchoredPosition: {x: 143.5, y: -15.666667}
m_SizeDelta: {x: 0, y: 0} m_SizeDelta: {x: 183, y: 26}
m_Pivot: {x: 0.5, y: 0.5} m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &4761092020446986678 --- !u!222 &4761092020446986678
CanvasRenderer: CanvasRenderer:
@ -227,10 +227,10 @@ RectTransform:
m_Children: [] m_Children: []
m_Father: {fileID: 2450201408575734812} m_Father: {fileID: 2450201408575734812}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0} m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 0, y: 0} m_AnchoredPosition: {x: 20, y: -15.666667}
m_SizeDelta: {x: 0, y: 0} m_SizeDelta: {x: 40, y: 31.333334}
m_Pivot: {x: 0.5, y: 0.5} m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &7860273967724122996 --- !u!222 &7860273967724122996
CanvasRenderer: CanvasRenderer:
@ -323,10 +323,10 @@ RectTransform:
m_Children: [] m_Children: []
m_Father: {fileID: 2780569438310375802} m_Father: {fileID: 2780569438310375802}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0} m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 0, y: 0} m_AnchoredPosition: {x: 40, y: -25.666668}
m_SizeDelta: {x: 0, y: 0} m_SizeDelta: {x: 40, y: 31.333336}
m_Pivot: {x: 0.5, y: 0.5} m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &6442047476311195174 --- !u!222 &6442047476311195174
CanvasRenderer: CanvasRenderer:
@ -553,10 +553,10 @@ RectTransform:
- {fileID: 7754613193470953066} - {fileID: 7754613193470953066}
m_Father: {fileID: 278706555072840209} m_Father: {fileID: 278706555072840209}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0} m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 0, y: 0} m_AnchoredPosition: {x: 175.5, y: -134.66667}
m_SizeDelta: {x: 0, y: 0} m_SizeDelta: {x: 311, y: 31.333334}
m_Pivot: {x: 0.5, y: 0.5} m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &406189280625441644 --- !u!114 &406189280625441644
MonoBehaviour: MonoBehaviour:
@ -623,10 +623,10 @@ RectTransform:
- {fileID: 8076039040411293610} - {fileID: 8076039040411293610}
m_Father: {fileID: 2780569438310375802} m_Father: {fileID: 2780569438310375802}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0} m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 0, y: 0} m_AnchoredPosition: {x: 321, y: -25.666668}
m_SizeDelta: {x: 0, y: 0} m_SizeDelta: {x: 20, y: 20}
m_Pivot: {x: 0.5, y: 0.5} m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &8983615257379814102 --- !u!114 &8983615257379814102
MonoBehaviour: MonoBehaviour:
@ -902,10 +902,10 @@ RectTransform:
- {fileID: 3923554087608668260} - {fileID: 3923554087608668260}
m_Father: {fileID: 278706555072840209} m_Father: {fileID: 278706555072840209}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0} m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 0, y: 0} m_AnchoredPosition: {x: 175.5, y: -171.00002}
m_SizeDelta: {x: 0, y: 0} m_SizeDelta: {x: 311, y: 31.333334}
m_Pivot: {x: 0.5, y: 0.5} m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &1792874459052106251 --- !u!114 &1792874459052106251
MonoBehaviour: MonoBehaviour:
@ -957,7 +957,7 @@ GameObject:
m_Icon: {fileID: 0} m_Icon: {fileID: 0}
m_NavMeshLayer: 0 m_NavMeshLayer: 0
m_StaticEditorFlags: 0 m_StaticEditorFlags: 0
m_IsActive: 1 m_IsActive: 0
--- !u!224 &2780569438310375802 --- !u!224 &2780569438310375802
RectTransform: RectTransform:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -976,10 +976,10 @@ RectTransform:
- {fileID: 4264754383554125665} - {fileID: 4264754383554125665}
m_Father: {fileID: 4478785627166277610} m_Father: {fileID: 4478785627166277610}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0} m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 0, y: 0} m_AnchoredPosition: {x: 170.5, y: -25.666668}
m_SizeDelta: {x: 0, y: 0} m_SizeDelta: {x: 341, y: 51.333336}
m_Pivot: {x: 0.5, y: 0.5} m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &9142037267599823005 --- !u!114 &9142037267599823005
MonoBehaviour: MonoBehaviour:
@ -1092,10 +1092,10 @@ RectTransform:
m_Children: [] m_Children: []
m_Father: {fileID: 2780569438310375802} m_Father: {fileID: 2780569438310375802}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0} m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 0, y: 0} m_AnchoredPosition: {x: 284, y: -25.666668}
m_SizeDelta: {x: 0, y: 0} m_SizeDelta: {x: 30, y: 30}
m_Pivot: {x: 0.5, y: 0.5} m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &8134207541370216537 --- !u!222 &8134207541370216537
CanvasRenderer: CanvasRenderer:
@ -1427,7 +1427,7 @@ GameObject:
m_Icon: {fileID: 0} m_Icon: {fileID: 0}
m_NavMeshLayer: 0 m_NavMeshLayer: 0
m_StaticEditorFlags: 0 m_StaticEditorFlags: 0
m_IsActive: 1 m_IsActive: 0
--- !u!224 &278706555072840209 --- !u!224 &278706555072840209
RectTransform: RectTransform:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -1447,10 +1447,10 @@ RectTransform:
- {fileID: 816049057894123782} - {fileID: 816049057894123782}
m_Father: {fileID: 4478785627166277610} m_Father: {fileID: 4478785627166277610}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0} m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 0, y: 0} m_AnchoredPosition: {x: 170.5, y: -149.66667}
m_SizeDelta: {x: 0, y: 0} m_SizeDelta: {x: 341, y: 196.66667}
m_Pivot: {x: 0.5, y: 0.5} m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &2621485483361375335 --- !u!114 &2621485483361375335
MonoBehaviour: MonoBehaviour:
@ -1649,10 +1649,10 @@ RectTransform:
- {fileID: 7900345916139696652} - {fileID: 7900345916139696652}
m_Father: {fileID: 278706555072840209} m_Father: {fileID: 278706555072840209}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0} m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 0, y: 0} m_AnchoredPosition: {x: 175.5, y: -98.333336}
m_SizeDelta: {x: 0, y: 0} m_SizeDelta: {x: 311, y: 31.333334}
m_Pivot: {x: 0.5, y: 0.5} m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &9093150501524936851 --- !u!114 &9093150501524936851
MonoBehaviour: MonoBehaviour:
@ -1721,10 +1721,10 @@ RectTransform:
- {fileID: 3877041774025625573} - {fileID: 3877041774025625573}
m_Father: {fileID: 278706555072840209} m_Father: {fileID: 278706555072840209}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0} m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 0, y: 0} m_AnchoredPosition: {x: 175.5, y: -25.666668}
m_SizeDelta: {x: 0, y: 0} m_SizeDelta: {x: 311, y: 31.333334}
m_Pivot: {x: 0.5, y: 0.5} m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &6023196883469018230 --- !u!114 &6023196883469018230
MonoBehaviour: MonoBehaviour:
@ -1785,10 +1785,10 @@ RectTransform:
m_Children: [] m_Children: []
m_Father: {fileID: 7754613193470953066} m_Father: {fileID: 7754613193470953066}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0} m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 0, y: 0} m_AnchoredPosition: {x: 155.5, y: -15.666667}
m_SizeDelta: {x: 0, y: 0} m_SizeDelta: {x: 311, y: 31.333334}
m_Pivot: {x: 0.5, y: 0.5} m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &6646371810488858664 --- !u!222 &6646371810488858664
CanvasRenderer: CanvasRenderer:
@ -1887,10 +1887,10 @@ RectTransform:
- {fileID: 5211094055976679099} - {fileID: 5211094055976679099}
m_Father: {fileID: 7900345916139696652} m_Father: {fileID: 7900345916139696652}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0} m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 0, y: 0} m_AnchoredPosition: {x: 106.66667, y: -15.666667}
m_SizeDelta: {x: 0, y: 0} m_SizeDelta: {x: 213.33334, y: 31.333334}
m_Pivot: {x: 0.5, y: 0.5} m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &5919193658528722431 --- !u!114 &5919193658528722431
MonoBehaviour: MonoBehaviour:
@ -1996,10 +1996,10 @@ RectTransform:
- {fileID: 3411987631237892165} - {fileID: 3411987631237892165}
m_Father: {fileID: 278706555072840209} m_Father: {fileID: 278706555072840209}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0} m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 0, y: 0} m_AnchoredPosition: {x: 175.5, y: -62.000004}
m_SizeDelta: {x: 0, y: 0} m_SizeDelta: {x: 311, y: 31.333334}
m_Pivot: {x: 0.5, y: 0.5} m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &2814991476448031351 --- !u!114 &2814991476448031351
MonoBehaviour: MonoBehaviour:
@ -2068,10 +2068,10 @@ RectTransform:
m_Children: [] m_Children: []
m_Father: {fileID: 7900345916139696652} m_Father: {fileID: 7900345916139696652}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0} m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 0, y: 0} m_AnchoredPosition: {x: 264.6667, y: -15.666667}
m_SizeDelta: {x: 0, y: 0} m_SizeDelta: {x: 92.66667, y: 31.333334}
m_Pivot: {x: 0.5, y: 0.5} m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &7323868397581272064 --- !u!222 &7323868397581272064
CanvasRenderer: CanvasRenderer:
@ -2170,10 +2170,10 @@ RectTransform:
- {fileID: 839073477422163140} - {fileID: 839073477422163140}
m_Father: {fileID: 3411987631237892165} m_Father: {fileID: 3411987631237892165}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0} m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 0, y: 0} m_AnchoredPosition: {x: 106.66667, y: -15.666667}
m_SizeDelta: {x: 0, y: 0} m_SizeDelta: {x: 213.33334, y: 31.333334}
m_Pivot: {x: 0.5, y: 0.5} m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &6489571631904078165 --- !u!114 &6489571631904078165
MonoBehaviour: MonoBehaviour:
@ -2279,10 +2279,10 @@ RectTransform:
m_Children: [] m_Children: []
m_Father: {fileID: 2780569438310375802} m_Father: {fileID: 2780569438310375802}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0} m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 0, y: 0} m_AnchoredPosition: {x: 164.5, y: -25.666668}
m_SizeDelta: {x: 0, y: 0} m_SizeDelta: {x: 185, y: 26}
m_Pivot: {x: 0.5, y: 0.5} m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &6532365540230118336 --- !u!222 &6532365540230118336
CanvasRenderer: CanvasRenderer:
@ -2377,7 +2377,7 @@ RectTransform:
m_Father: {fileID: 5502792356073001137} m_Father: {fileID: 5502792356073001137}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 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_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 10, y: 0} m_SizeDelta: {x: 10, y: 0}
m_Pivot: {x: 0.5, y: 0.5} m_Pivot: {x: 0.5, y: 0.5}
@ -2515,7 +2515,7 @@ RectTransform:
m_Father: {fileID: 839073477422163140} m_Father: {fileID: 839073477422163140}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 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_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 20, y: -20} m_SizeDelta: {x: 20, y: -20}
m_Pivot: {x: 0.5, y: 0.5} m_Pivot: {x: 0.5, y: 0.5}
@ -2729,7 +2729,7 @@ RectTransform:
m_Father: {fileID: 758531668636581813} m_Father: {fileID: 758531668636581813}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 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_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 10, y: 0} m_SizeDelta: {x: 10, y: 0}
m_Pivot: {x: 0.5, y: 0.5} m_Pivot: {x: 0.5, y: 0.5}
@ -2804,10 +2804,10 @@ RectTransform:
m_Children: [] m_Children: []
m_Father: {fileID: 3411987631237892165} m_Father: {fileID: 3411987631237892165}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0} m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 0, y: 0} m_AnchoredPosition: {x: 264.6667, y: -15.666667}
m_SizeDelta: {x: 0, y: 0} m_SizeDelta: {x: 92.66667, y: 31.333334}
m_Pivot: {x: 0.5, y: 0.5} m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &7497419100168238325 --- !u!222 &7497419100168238325
CanvasRenderer: CanvasRenderer:
@ -2904,7 +2904,7 @@ RectTransform:
m_Father: {fileID: 5211094055976679099} m_Father: {fileID: 5211094055976679099}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 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_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 20, y: -20} m_SizeDelta: {x: 20, y: -20}
m_Pivot: {x: 0.5, y: 0.5} m_Pivot: {x: 0.5, y: 0.5}
@ -2979,10 +2979,10 @@ RectTransform:
m_Children: [] m_Children: []
m_Father: {fileID: 3923554087608668260} m_Father: {fileID: 3923554087608668260}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0} m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 0, y: 0} m_AnchoredPosition: {x: 155.5, y: -15.666667}
m_SizeDelta: {x: 0, y: 0} m_SizeDelta: {x: 311, y: 31.333334}
m_Pivot: {x: 0.5, y: 0.5} m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &88244861463061753 --- !u!222 &88244861463061753
CanvasRenderer: CanvasRenderer:

View File

@ -49,11 +49,19 @@ namespace AxibugEmuOnline.Client.ClientCore
#endregion #endregion
static string s_persistentRoot =
#if UNITY_PSP2 && !UNITY_EDITOR //PSV真机 #if UNITY_PSP2 && !UNITY_EDITOR //PSV真机
public static string PersistentDataPath => "ux0:data/AxibugEmu"; "ux0:data/AxibugEmu";
#else #else
public static string PersistentDataPath => Application.persistentDataPath; Application.persistentDataPath;
#endif #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 = "") public static void Init(bool isTest = false, string testSrvIP = "", bool bUseLocalWebApi = false, string mLocalWebApi = "")
{ {
log = new LogManager(OnLogOut); log = new LogManager(OnLogOut);
@ -100,8 +108,8 @@ namespace AxibugEmuOnline.Client.ClientCore
private static void PSP2Init() private static void PSP2Init()
{ {
//PSVita最好手动创建目录 //PSVita最好手动创建目录
if (!Directory.Exists(PersistentDataPath)) if (!Directory.Exists("ux0:data/AxibugEmu"))
Directory.CreateDirectory(PersistentDataPath); Directory.CreateDirectory("ux0:data/AxibugEmu");
#if UNITY_PSP2 #if UNITY_PSP2
//创建PSV弹窗UI //创建PSV弹窗UI

View File

@ -9,7 +9,7 @@ namespace AxibugEmuOnline.Client
{ {
public class CacheManager public class CacheManager
{ {
static readonly string CacheDirPath = $"{App.PersistentDataPath}/Caches"; static readonly string CacheDirPath = $"{App.PersistentDataRoot()}/Caches";
static readonly string TextureCacheDirPath = $"{CacheDirPath}/Texture"; static readonly string TextureCacheDirPath = $"{CacheDirPath}/Texture";
public void GetSpriteCache(string url, Action<Sprite, string> callback) public void GetSpriteCache(string url, Action<Sprite, string> callback)

View File

@ -21,8 +21,8 @@ namespace AxibugEmuOnline.Client
/// <summary> 指示该Rom文件的存放路径 </summary> /// <summary> 指示该Rom文件的存放路径 </summary>
public string LocalFilePath => public string LocalFilePath =>
IsUserRom ? IsUserRom ?
$"{App.PersistentDataPath}/UserRoms/{Platform}/{FileName}" : $"{App.PersistentDataPath(Platform)}/UserRoms/{FileName}" :
$"{App.PersistentDataPath}/RemoteRoms/{Platform}/{FileName}"; $"{App.PersistentDataPath(Platform)}/RemoteRoms/{FileName}";
/// <summary> 指示该Rom文件是否已下载完毕 </summary> /// <summary> 指示该Rom文件是否已下载完毕 </summary>
public bool RomReady => hasLocalFile; public bool RomReady => hasLocalFile;

View File

@ -61,7 +61,7 @@ namespace AxibugEmuOnline.Client
/// <summary> 清除所有下载的Rom文件 </summary> /// <summary> 清除所有下载的Rom文件 </summary>
public void ClearRomFile() 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); if (Directory.Exists(path)) Directory.Delete(path, true);
} }

View File

@ -48,7 +48,7 @@ namespace AxibugEmuOnline.Client
public void SaveSRAMToFile(byte[] sramContent, string romName) 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); Directory.CreateDirectory(sramDirectoryPath);
romName = Path.GetFileNameWithoutExtension(romName); romName = Path.GetFileNameWithoutExtension(romName);
File.WriteAllBytes($"{sramDirectoryPath}/{romName}.sav", sramContent); File.WriteAllBytes($"{sramDirectoryPath}/{romName}.sav", sramContent);
@ -56,7 +56,7 @@ namespace AxibugEmuOnline.Client
public void SaveDISKToFile(byte[] diskFileContent, string romName) public void SaveDISKToFile(byte[] diskFileContent, string romName)
{ {
string diskFileDirectoryPath = $"{App.PersistentDataPath}/dsv"; string diskFileDirectoryPath = $"{App.PersistentDataPath(AxibugProtobuf.RomPlatformType.Nes)}/dsv";
Directory.CreateDirectory(diskFileDirectoryPath); Directory.CreateDirectory(diskFileDirectoryPath);
romName = Path.GetFileNameWithoutExtension(romName); romName = Path.GetFileNameWithoutExtension(romName);
File.WriteAllBytes($"{diskFileDirectoryPath}/{romName}.dsv", diskFileContent); File.WriteAllBytes($"{diskFileDirectoryPath}/{romName}.dsv", diskFileContent);
@ -65,14 +65,14 @@ namespace AxibugEmuOnline.Client
public EmulatorConfig Config { get; private set; } = new EmulatorConfig(); public EmulatorConfig Config { get; private set; } = new EmulatorConfig();
public void PrepareDirectory(string directPath) 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) public void SaveFile(byte[] fileData, string directPath, string fileName)
{ {
PrepareDirectory(directPath); PrepareDirectory(directPath);
var fileFullpath = $"{App.PersistentDataPath}/{directPath}/{fileName}"; var fileFullpath = $"{App.PersistentDataPath(AxibugProtobuf.RomPlatformType.Nes)}/{directPath}/{fileName}";
File.WriteAllBytes(fileFullpath, fileData); File.WriteAllBytes(fileFullpath, fileData);
} }
@ -80,7 +80,8 @@ namespace AxibugEmuOnline.Client
{ {
try 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; if (data == null) return null;
return new MemoryStream(data); return new MemoryStream(data);
} }
@ -88,7 +89,6 @@ namespace AxibugEmuOnline.Client
{ {
return null; return null;
} }
} }
public bool TryGetMapperNo(ROM rom, out int mapperNo) public bool TryGetMapperNo(ROM rom, out int mapperNo)

View File

@ -216,6 +216,9 @@ namespace AxibugEmuOnline.Client
return ControllerMapper; return ControllerMapper;
} }
public void Dispose() { } public void Dispose()
{
StopGame();
}
} }
} }

View File

@ -319,6 +319,12 @@ namespace VirtualNes.Core
return false; return false;
} }
internal void QueueClear()
{
queue.Clear();
exqueue.Clear();
}
private void QueueFlush() private void QueueFlush()
{ {
while (queue.wrptr != queue.rdptr) while (queue.wrptr != queue.rdptr)
@ -651,5 +657,11 @@ namespace VirtualNes.Core
public int rdptr; public int rdptr;
public int wrptr; public int wrptr;
public QUEUEDATA[] data = new QUEUEDATA[8192]; public QUEUEDATA[] data = new QUEUEDATA[8192];
public void Clear()
{
rdptr = 0;wrptr = 0;
data = new QUEUEDATA[8192];
}
} }
} }

View File

@ -355,6 +355,7 @@ namespace VirtualNes.Core
private void LoadDISK() private void LoadDISK()
{ {
//todo : 磁碟机读取支持 //todo : 磁碟机读取支持
Debuger.LogError($"磁碟机尚未支持");
} }
private void LoadSRAM() private void LoadSRAM()
@ -1070,6 +1071,10 @@ namespace VirtualNes.Core
public void Dispose() public void Dispose()
{ {
SaveSRAM();
SaveDISK();
SaveTurboFile();
cpu?.Dispose(); cpu?.Dispose();
ppu?.Dispose(); ppu?.Dispose();
apu?.Dispose(); apu?.Dispose();
@ -1081,7 +1086,7 @@ namespace VirtualNes.Core
{ {
int i; int i;
if (rom.IsNSF()) return; if (rom.IsNSF()) return;
if (rom.IsSAVERAM()) return; if (!rom.IsSAVERAM()) return;
for (i = 0; i < SAVERAM_SIZE; i++) 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; emul_cycles = state.reg.cpureg.emul_cycles;
base_cycles = state.reg.cpureg.base_cycles; base_cycles = state.reg.cpureg.base_cycles;
cpu.SetDmaCycles(state.reg.cpureg.DMA_cycles);
// LOAD PPU STATE // LOAD PPU STATE
MMU.PPUREG[0] = state.reg.ppureg.reg0; MMU.PPUREG[0] = state.reg.ppureg.reg0;
MMU.PPUREG[1] = state.reg.ppureg.reg1; MMU.PPUREG[1] = state.reg.ppureg.reg1;
@ -1857,6 +1863,8 @@ namespace VirtualNes.Core
MMU.PPU56Toggle = state.reg.ppureg.toggle56; MMU.PPU56Toggle = state.reg.ppureg.toggle56;
} }
apu.QueueClear();
//RAM STATE //RAM STATE
{ {
// SAVE RAM STATE // SAVE RAM STATE

View File

@ -244,11 +244,11 @@ namespace VirtualNes.Core
FileNameCheck(fname); FileNameCheck(fname);
if (Supporter.S.TryGetMapperNo(this, out int mapperNo)) //if (Supporter.S.TryGetMapperNo(this, out int mapperNo))
{ //{
Debuger.Log($"ROMDB Set Mapper #{mapper:000} to #{mapperNo:000}"); // Debuger.Log($"ROMDB Set Mapper #{mapper:000} to #{mapperNo:000}");
mapper = mapperNo; // mapper = mapperNo;
} //}
RomPatch.DoPatch(ref crc, ref lpPRG, ref lpCHR, ref mapper, ref header); RomPatch.DoPatch(ref crc, ref lpPRG, ref lpCHR, ref mapper, ref header);

View File

@ -12,7 +12,7 @@
public bool bIpsPath = true; public bool bIpsPath = true;
public string szRomPath = "roms"; public string szRomPath = "roms";
public string szSavePath = "save"; public string szSavePath = "sav";
public string szStatePath = "state"; public string szStatePath = "state";
public string szSnapshotPath = "snapshot"; public string szSnapshotPath = "snapshot";
public string szMoviePath = "movie"; public string szMoviePath = "movie";

View File

@ -12,7 +12,7 @@ PlayerSettings:
targetDevice: 2 targetDevice: 2
useOnDemandResources: 0 useOnDemandResources: 0
accelerometerFrequency: 60 accelerometerFrequency: 60
companyName: DefaultCompany companyName: AlienTechnology
productName: AxibugEmuOnline.Client productName: AxibugEmuOnline.Client
defaultCursor: {fileID: 0} defaultCursor: {fileID: 0}
cursorHotspot: {x: 0, y: 0} cursorHotspot: {x: 0, y: 0}
@ -164,7 +164,7 @@ PlayerSettings:
androidMinAspectRatio: 1 androidMinAspectRatio: 1
applicationIdentifier: applicationIdentifier:
Android: com.DefaultCompany.AxibugEmuOnline.Client Android: com.DefaultCompany.AxibugEmuOnline.Client
Standalone: com.DefaultCompany.AxibugEmuOnline.Client Standalone: com.AlienTechnology.AxibugEmuOnline.Client
buildNumber: buildNumber:
Standalone: 0 Standalone: 0
VisionOS: 0 VisionOS: 0