Compare commits
151 Commits
bak_AlphaF
...
master
Author | SHA1 | Date | |
---|---|---|---|
62fbb6e11b | |||
fca038e67d | |||
64b9c02ef7 | |||
dc9d42de5c | |||
7ed77bb499 | |||
4a75cae653 | |||
7f2792bbdc | |||
acd4c69ae4 | |||
|
d9a5f40190 | ||
|
c0af4d4009 | ||
51a4419d25 | |||
3bbc24fc91 | |||
|
13cadd90a0 | ||
|
ecdfd507d9 | ||
886422e8ea | |||
|
02693523a3 | ||
|
55b0752c2f | ||
|
a0c5da7a07 | ||
a3cce34044 | |||
4792b7da98 | |||
4c42b40199 | |||
|
bac3e514b6 | ||
|
91ca428269 | ||
|
f129651e99 | ||
|
35548687d0 | ||
e21093d419 | |||
5f1fbdd41f | |||
94fb19c4db | |||
34c7eef257 | |||
80f4e950e0 | |||
063e256c35 | |||
42a5e31557 | |||
de897936a2 | |||
160867b037 | |||
d57e3c3382 | |||
4fbfd2cfc1 | |||
68155d69ff | |||
294e6ac177 | |||
e5e7beb52c | |||
f705b947c3 | |||
8191ff4b57 | |||
7c1a2af6f0 | |||
af82cff70a | |||
765b62c7cc | |||
ad5d2cf35a | |||
3e91952330 | |||
7c5934bc6b | |||
9f3c8ea7c5 | |||
|
e5f0816061 | ||
|
6022cafe64 | ||
abddf3c0b5 | |||
417390227c | |||
|
7092797481 | ||
|
557dd0e870 | ||
6d4acb5698 | |||
bdd5415839 | |||
de1d81536b | |||
4fdd142c13 | |||
d38802dac0 | |||
69cfd7969f | |||
f609feace5 | |||
21d6063290 | |||
1ba9269d1c | |||
6c6761c4e3 | |||
|
ea5fb508e3 | ||
|
07bb092839 | ||
30dd2ee9aa | |||
183ec611e1 | |||
e9428e2cc6 | |||
fe616214a9 | |||
|
c5ff8fd4ae | ||
1d3a602dd6 | |||
|
7123103fd6 | ||
|
839a711637 | ||
feb5158ffe | |||
b6292f1d4d | |||
|
0506120ede | ||
f923d14100 | |||
|
48c27553e1 | ||
9fa862441a | |||
|
382322c8c8 | ||
|
b5942edc22 | ||
|
cac6ec0f9b | ||
51385dca36 | |||
|
ce0cf563d4 | ||
|
e23ea483c9 | ||
|
f9a2e82cd0 | ||
|
ed91d48cc8 | ||
bdc26c7fe5 | |||
3e1f5b9de8 | |||
f8cbdc1df7 | |||
2dc84085eb | |||
5b9cb9bc5e | |||
54cf6e695b | |||
e74c04adc9 | |||
|
26cb57b2f1 | ||
2094bda9db | |||
a40052ade3 | |||
4d70b44c8e | |||
752ed0b955 | |||
ae3471fd5e | |||
|
ee65797a6a | ||
|
5ecdf999d3 | ||
|
94eda481f9 | ||
|
3eee3b1c63 | ||
|
9049d905c8 | ||
a04495dfee | |||
d6fa9772b9 | |||
c421466b84 | |||
4722473896 | |||
|
cc281a9ea2 | ||
|
14f5621827 | ||
135517065e | |||
|
12a8b94050 | ||
|
b5950fca9c | ||
|
69ae1ed949 | ||
dc9963a431 | |||
29f231a3be | |||
5b5da2767e | |||
|
ace25f4a3f | ||
|
4b855c5695 | ||
404c70ab09 | |||
075d6c1427 | |||
|
8239e70c9e | ||
02e94317e4 | |||
d1ded3446d | |||
|
0783d7d90e | ||
|
c3d0bce281 | ||
|
946141ed61 | ||
4a56c1a74d | |||
|
7233e17888 | ||
|
2ecf190107 | ||
11eb77724e | |||
36293af2b1 | |||
4d3a19df2a | |||
e9aac3072d | |||
4a97e69409 | |||
029044cc0e | |||
|
fd853f3723 | ||
1ffe9e79c0 | |||
|
490a5584d8 | ||
|
84d7112c90 | ||
|
d05b2018eb | ||
|
73a5b9d258 | ||
|
adde033fa1 | ||
|
e0a87a2737 | ||
|
d7269175cd | ||
|
08bdb552c9 | ||
|
ae66360466 | ||
|
c316d77f6a | ||
|
3d7142ec04 |
11
.gitignore
vendored
11
.gitignore
vendored
@ -13,7 +13,10 @@
|
||||
/AxibugEmuOnline.Client/ProjectSettings/ProjectVersion.txt
|
||||
/AxibugEmuOnline.Client/ProjectSettings/AutoStreamingSettings.asset
|
||||
/AxibugEmuOnline.Client/Logs
|
||||
/virtuanessrc097-master/save
|
||||
/virtuanessrc097-master/.vs
|
||||
/virtuanessrc097-master/Debug
|
||||
/virtuanessrc097-master/VirtuaNES.ini
|
||||
|
||||
/virtuanessrc097-master
|
||||
/AxibugEmuOnline.Server/config.cfg
|
||||
/AxibugEmuOnline.Server/bin/
|
||||
/AxibugEmuOnline.Client/.editorconfig
|
||||
/AxibugEmuOnline.Client/*.user
|
||||
/AxibugEmuOnline.Client/.idea
|
||||
|
436
AxibugEmuOnline.Client.PSVita/Assets/Debugger.cs
Normal file
436
AxibugEmuOnline.Client.PSVita/Assets/Debugger.cs
Normal file
@ -0,0 +1,436 @@
|
||||
using UnityEngine;
|
||||
using System.Collections.Generic;
|
||||
using System;
|
||||
using UnityEngine.Profiling;
|
||||
|
||||
public class Debugger : MonoBehaviour
|
||||
{
|
||||
/// <summary>
|
||||
/// 是否允许调试
|
||||
/// </summary>
|
||||
public bool AllowDebugging = true;
|
||||
|
||||
private DebugType _debugType = DebugType.Console;
|
||||
private List<LogData> _logInformations = new List<LogData>();
|
||||
private int _currentLogIndex = -1;
|
||||
private int _infoLogCount = 0;
|
||||
private int _warningLogCount = 0;
|
||||
private int _errorLogCount = 0;
|
||||
private int _fatalLogCount = 0;
|
||||
private bool _showInfoLog = true;
|
||||
private bool _showWarningLog = true;
|
||||
private bool _showErrorLog = true;
|
||||
private bool _showFatalLog = true;
|
||||
private Vector2 _scrollLogView = Vector2.zero;
|
||||
private Vector2 _scrollCurrentLogView = Vector2.zero;
|
||||
private Vector2 _scrollSystemView = Vector2.zero;
|
||||
private bool _expansion = false;
|
||||
private Rect _windowRect = new Rect(0, 0, 100, 60);
|
||||
|
||||
private int _fps = 0;
|
||||
private Color _fpsColor = Color.white;
|
||||
private int _frameNumber = 0;
|
||||
private float _lastShowFPSTime = 0f;
|
||||
|
||||
private void Start()
|
||||
{
|
||||
DontDestroyOnLoad(this.gameObject);
|
||||
if (AllowDebugging)
|
||||
{
|
||||
Application.logMessageReceived += LogHandler;
|
||||
}
|
||||
}
|
||||
private void Update()
|
||||
{
|
||||
if (AllowDebugging)
|
||||
{
|
||||
_frameNumber += 1;
|
||||
float time = Time.realtimeSinceStartup - _lastShowFPSTime;
|
||||
if (time >= 1)
|
||||
{
|
||||
_fps = (int)(_frameNumber / time);
|
||||
_frameNumber = 0;
|
||||
_lastShowFPSTime = Time.realtimeSinceStartup;
|
||||
}
|
||||
}
|
||||
}
|
||||
private void OnDestory()
|
||||
{
|
||||
if (AllowDebugging)
|
||||
{
|
||||
Application.logMessageReceived -= LogHandler;
|
||||
}
|
||||
}
|
||||
|
||||
bool bUnityWaterFrist = false;
|
||||
private void LogHandler(string condition, string stackTrace, LogType type)
|
||||
{
|
||||
if (condition.Contains("UnityWater") || stackTrace.Contains("UnityWater"))
|
||||
{
|
||||
if(bUnityWaterFrist)
|
||||
return;
|
||||
|
||||
bUnityWaterFrist = true;
|
||||
}
|
||||
|
||||
LogData log = new LogData();
|
||||
log.time = DateTime.Now.ToString("HH:mm:ss");
|
||||
log.message = condition;
|
||||
log.stackTrace = stackTrace;
|
||||
|
||||
if (type == LogType.Assert)
|
||||
{
|
||||
log.type = "Fatal";
|
||||
_fatalLogCount += 1;
|
||||
}
|
||||
else if (type == LogType.Exception || type == LogType.Error)
|
||||
{
|
||||
log.type = "Error";
|
||||
_errorLogCount += 1;
|
||||
}
|
||||
else if (type == LogType.Warning)
|
||||
{
|
||||
log.type = "Warning";
|
||||
_warningLogCount += 1;
|
||||
}
|
||||
else if (type == LogType.Log)
|
||||
{
|
||||
log.type = "Info";
|
||||
_infoLogCount += 1;
|
||||
}
|
||||
|
||||
_logInformations.Add(log);
|
||||
|
||||
if (_warningLogCount > 0)
|
||||
{
|
||||
_fpsColor = Color.yellow;
|
||||
}
|
||||
if (_errorLogCount > 0)
|
||||
{
|
||||
_fpsColor = Color.red;
|
||||
}
|
||||
}
|
||||
|
||||
private void OnGUI()
|
||||
{
|
||||
if (AllowDebugging)
|
||||
{
|
||||
if (_expansion)
|
||||
{
|
||||
_windowRect = GUI.Window(0, _windowRect, ExpansionGUIWindow, "DEBUGGER");
|
||||
}
|
||||
else
|
||||
{
|
||||
_windowRect = GUI.Window(0, _windowRect, ShrinkGUIWindow, "DEBUGGER");
|
||||
}
|
||||
}
|
||||
}
|
||||
private void ExpansionGUIWindow(int windowId)
|
||||
{
|
||||
GUI.DragWindow(new Rect(0, 0, 10000, 20));
|
||||
|
||||
#region title
|
||||
GUILayout.BeginHorizontal();
|
||||
GUI.contentColor = _fpsColor;
|
||||
if (GUILayout.Button("FPS:" + _fps, GUILayout.Height(30)))
|
||||
{
|
||||
_expansion = false;
|
||||
_windowRect.width = 100;
|
||||
_windowRect.height = 60;
|
||||
}
|
||||
GUI.contentColor = (_debugType == DebugType.Console ? Color.white : Color.gray);
|
||||
if (GUILayout.Button("Console", GUILayout.Height(30)))
|
||||
{
|
||||
_debugType = DebugType.Console;
|
||||
}
|
||||
GUI.contentColor = (_debugType == DebugType.Memory ? Color.white : Color.gray);
|
||||
if (GUILayout.Button("Memory", GUILayout.Height(30)))
|
||||
{
|
||||
_debugType = DebugType.Memory;
|
||||
}
|
||||
GUI.contentColor = (_debugType == DebugType.System ? Color.white : Color.gray);
|
||||
if (GUILayout.Button("System", GUILayout.Height(30)))
|
||||
{
|
||||
_debugType = DebugType.System;
|
||||
}
|
||||
GUI.contentColor = (_debugType == DebugType.Screen ? Color.white : Color.gray);
|
||||
if (GUILayout.Button("Screen", GUILayout.Height(30)))
|
||||
{
|
||||
_debugType = DebugType.Screen;
|
||||
}
|
||||
GUI.contentColor = (_debugType == DebugType.Quality ? Color.white : Color.gray);
|
||||
if (GUILayout.Button("Quality", GUILayout.Height(30)))
|
||||
{
|
||||
_debugType = DebugType.Quality;
|
||||
}
|
||||
GUI.contentColor = (_debugType == DebugType.Environment ? Color.white : Color.gray);
|
||||
if (GUILayout.Button("Environment", GUILayout.Height(30)))
|
||||
{
|
||||
_debugType = DebugType.Environment;
|
||||
}
|
||||
GUI.contentColor = Color.white;
|
||||
GUILayout.EndHorizontal();
|
||||
#endregion
|
||||
|
||||
#region console
|
||||
if (_debugType == DebugType.Console)
|
||||
{
|
||||
GUILayout.BeginHorizontal();
|
||||
if (GUILayout.Button("Clear"))
|
||||
{
|
||||
_logInformations.Clear();
|
||||
_fatalLogCount = 0;
|
||||
_warningLogCount = 0;
|
||||
_errorLogCount = 0;
|
||||
_infoLogCount = 0;
|
||||
_currentLogIndex = -1;
|
||||
_fpsColor = Color.white;
|
||||
}
|
||||
GUI.contentColor = (_showInfoLog ? Color.white : Color.gray);
|
||||
_showInfoLog = GUILayout.Toggle(_showInfoLog, "Info [" + _infoLogCount + "]");
|
||||
GUI.contentColor = (_showWarningLog ? Color.white : Color.gray);
|
||||
_showWarningLog = GUILayout.Toggle(_showWarningLog, "Warning [" + _warningLogCount + "]");
|
||||
GUI.contentColor = (_showErrorLog ? Color.white : Color.gray);
|
||||
_showErrorLog = GUILayout.Toggle(_showErrorLog, "Error [" + _errorLogCount + "]");
|
||||
GUI.contentColor = (_showFatalLog ? Color.white : Color.gray);
|
||||
_showFatalLog = GUILayout.Toggle(_showFatalLog, "Fatal [" + _fatalLogCount + "]");
|
||||
GUI.contentColor = Color.white;
|
||||
GUILayout.EndHorizontal();
|
||||
|
||||
_scrollLogView = GUILayout.BeginScrollView(_scrollLogView, "Box", GUILayout.Height(165));
|
||||
for (int i = 0; i < _logInformations.Count; i++)
|
||||
{
|
||||
bool show = false;
|
||||
Color color = Color.white;
|
||||
switch (_logInformations[i].type)
|
||||
{
|
||||
case "Fatal":
|
||||
show = _showFatalLog;
|
||||
color = Color.red;
|
||||
break;
|
||||
case "Error":
|
||||
show = _showErrorLog;
|
||||
color = Color.red;
|
||||
break;
|
||||
case "Info":
|
||||
show = _showInfoLog;
|
||||
color = Color.white;
|
||||
break;
|
||||
case "Warning":
|
||||
show = _showWarningLog;
|
||||
color = Color.yellow;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
if (show)
|
||||
{
|
||||
GUILayout.BeginHorizontal();
|
||||
if (GUILayout.Toggle(_currentLogIndex == i, ""))
|
||||
{
|
||||
_currentLogIndex = i;
|
||||
}
|
||||
GUI.contentColor = color;
|
||||
GUILayout.Label("[" + _logInformations[i].type + "] ");
|
||||
GUILayout.Label("[" + _logInformations[i].time + "] ");
|
||||
GUILayout.Label(_logInformations[i].message);
|
||||
GUILayout.FlexibleSpace();
|
||||
GUI.contentColor = Color.white;
|
||||
GUILayout.EndHorizontal();
|
||||
}
|
||||
}
|
||||
GUILayout.EndScrollView();
|
||||
|
||||
_scrollCurrentLogView = GUILayout.BeginScrollView(_scrollCurrentLogView, "Box", GUILayout.Height(100));
|
||||
if (_currentLogIndex != -1)
|
||||
{
|
||||
GUILayout.Label(_logInformations[_currentLogIndex].message + "\r\n\r\n" + _logInformations[_currentLogIndex].stackTrace);
|
||||
}
|
||||
GUILayout.EndScrollView();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region memory
|
||||
else if (_debugType == DebugType.Memory)
|
||||
{
|
||||
GUILayout.BeginHorizontal();
|
||||
GUILayout.Label("Memory Information");
|
||||
GUILayout.EndHorizontal();
|
||||
|
||||
GUILayout.BeginVertical("Box");
|
||||
#if UNITY_5
|
||||
GUILayout.Label("总内存:" + Profiler.GetTotalReservedMemory() / 1000000 + "MB");
|
||||
GUILayout.Label("已占用内存:" + Profiler.GetTotalAllocatedMemory() / 1000000 + "MB");
|
||||
GUILayout.Label("空闲中内存:" + Profiler.GetTotalUnusedReservedMemory() / 1000000 + "MB");
|
||||
GUILayout.Label("总Mono堆内存:" + Profiler.GetMonoHeapSize() / 1000000 + "MB");
|
||||
GUILayout.Label("已占用Mono堆内存:" + Profiler.GetMonoUsedSize() / 1000000 + "MB");
|
||||
#endif
|
||||
#if UNITY_7
|
||||
GUILayout.Label("总内存:" + Profiler.GetTotalReservedMemoryLong() / 1000000 + "MB");
|
||||
GUILayout.Label("已占用内存:" + Profiler.GetTotalAllocatedMemoryLong() / 1000000 + "MB");
|
||||
GUILayout.Label("空闲中内存:" + Profiler.GetTotalUnusedReservedMemoryLong() / 1000000 + "MB");
|
||||
GUILayout.Label("总Mono堆内存:" + Profiler.GetMonoHeapSizeLong() / 1000000 + "MB");
|
||||
GUILayout.Label("已占用Mono堆内存:" + Profiler.GetMonoUsedSizeLong() / 1000000 + "MB");
|
||||
#endif
|
||||
GUILayout.EndVertical();
|
||||
|
||||
GUILayout.BeginHorizontal();
|
||||
if (GUILayout.Button("卸载未使用的资源"))
|
||||
{
|
||||
Resources.UnloadUnusedAssets();
|
||||
}
|
||||
GUILayout.EndHorizontal();
|
||||
|
||||
GUILayout.BeginHorizontal();
|
||||
if (GUILayout.Button("使用GC垃圾回收"))
|
||||
{
|
||||
GC.Collect();
|
||||
}
|
||||
GUILayout.EndHorizontal();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region system
|
||||
else if (_debugType == DebugType.System)
|
||||
{
|
||||
GUILayout.BeginHorizontal();
|
||||
GUILayout.Label("System Information");
|
||||
GUILayout.EndHorizontal();
|
||||
|
||||
_scrollSystemView = GUILayout.BeginScrollView(_scrollSystemView, "Box");
|
||||
GUILayout.Label("操作系统:" + SystemInfo.operatingSystem);
|
||||
GUILayout.Label("系统内存:" + SystemInfo.systemMemorySize + "MB");
|
||||
GUILayout.Label("处理器:" + SystemInfo.processorType);
|
||||
GUILayout.Label("处理器数量:" + SystemInfo.processorCount);
|
||||
GUILayout.Label("显卡:" + SystemInfo.graphicsDeviceName);
|
||||
GUILayout.Label("显卡类型:" + SystemInfo.graphicsDeviceType);
|
||||
GUILayout.Label("显存:" + SystemInfo.graphicsMemorySize + "MB");
|
||||
GUILayout.Label("显卡标识:" + SystemInfo.graphicsDeviceID);
|
||||
GUILayout.Label("显卡供应商:" + SystemInfo.graphicsDeviceVendor);
|
||||
GUILayout.Label("显卡供应商标识码:" + SystemInfo.graphicsDeviceVendorID);
|
||||
GUILayout.Label("设备模式:" + SystemInfo.deviceModel);
|
||||
GUILayout.Label("设备名称:" + SystemInfo.deviceName);
|
||||
GUILayout.Label("设备类型:" + SystemInfo.deviceType);
|
||||
GUILayout.Label("设备标识:" + SystemInfo.deviceUniqueIdentifier);
|
||||
GUILayout.EndScrollView();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region screen
|
||||
else if (_debugType == DebugType.Screen)
|
||||
{
|
||||
GUILayout.BeginHorizontal();
|
||||
GUILayout.Label("Screen Information");
|
||||
GUILayout.EndHorizontal();
|
||||
|
||||
GUILayout.BeginVertical("Box");
|
||||
GUILayout.Label("DPI:" + Screen.dpi);
|
||||
GUILayout.Label("分辨率:" + Screen.currentResolution.ToString());
|
||||
GUILayout.EndVertical();
|
||||
|
||||
GUILayout.BeginHorizontal();
|
||||
if (GUILayout.Button("全屏"))
|
||||
{
|
||||
Screen.SetResolution(Screen.currentResolution.width, Screen.currentResolution.height, !Screen.fullScreen);
|
||||
}
|
||||
GUILayout.EndHorizontal();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Quality
|
||||
else if (_debugType == DebugType.Quality)
|
||||
{
|
||||
GUILayout.BeginHorizontal();
|
||||
GUILayout.Label("Quality Information");
|
||||
GUILayout.EndHorizontal();
|
||||
|
||||
GUILayout.BeginVertical("Box");
|
||||
string value = "";
|
||||
if (QualitySettings.GetQualityLevel() == 0)
|
||||
{
|
||||
value = " [最低]";
|
||||
}
|
||||
else if (QualitySettings.GetQualityLevel() == QualitySettings.names.Length - 1)
|
||||
{
|
||||
value = " [最高]";
|
||||
}
|
||||
|
||||
GUILayout.Label("图形质量:" + QualitySettings.names[QualitySettings.GetQualityLevel()] + value);
|
||||
GUILayout.EndVertical();
|
||||
|
||||
GUILayout.BeginHorizontal();
|
||||
if (GUILayout.Button("降低一级图形质量"))
|
||||
{
|
||||
QualitySettings.DecreaseLevel();
|
||||
}
|
||||
GUILayout.EndHorizontal();
|
||||
|
||||
GUILayout.BeginHorizontal();
|
||||
if (GUILayout.Button("提升一级图形质量"))
|
||||
{
|
||||
QualitySettings.IncreaseLevel();
|
||||
}
|
||||
GUILayout.EndHorizontal();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Environment
|
||||
else if (_debugType == DebugType.Environment)
|
||||
{
|
||||
GUILayout.BeginHorizontal();
|
||||
GUILayout.Label("Environment Information");
|
||||
GUILayout.EndHorizontal();
|
||||
|
||||
GUILayout.BeginVertical("Box");
|
||||
GUILayout.Label("项目名称:" + Application.productName);
|
||||
#if UNITY_5
|
||||
GUILayout.Label("项目ID:" + Application.bundleIdentifier);
|
||||
#endif
|
||||
#if UNITY_7
|
||||
GUILayout.Label("项目ID:" + Application.identifier);
|
||||
#endif
|
||||
GUILayout.Label("项目版本:" + Application.version);
|
||||
GUILayout.Label("Unity版本:" + Application.unityVersion);
|
||||
GUILayout.Label("公司名称:" + Application.companyName);
|
||||
GUILayout.EndVertical();
|
||||
|
||||
GUILayout.BeginHorizontal();
|
||||
if (GUILayout.Button("退出程序"))
|
||||
{
|
||||
Application.Quit();
|
||||
}
|
||||
GUILayout.EndHorizontal();
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
private void ShrinkGUIWindow(int windowId)
|
||||
{
|
||||
GUI.DragWindow(new Rect(0, 0, 10000, 20));
|
||||
|
||||
GUI.contentColor = _fpsColor;
|
||||
if (GUILayout.Button("FPS:" + _fps, GUILayout.Width(80), GUILayout.Height(30)))
|
||||
{
|
||||
_expansion = true;
|
||||
_windowRect.width = 600;
|
||||
_windowRect.height = 360;
|
||||
}
|
||||
GUI.contentColor = Color.white;
|
||||
}
|
||||
}
|
||||
public struct LogData
|
||||
{
|
||||
public string time;
|
||||
public string type;
|
||||
public string message;
|
||||
public string stackTrace;
|
||||
}
|
||||
public enum DebugType
|
||||
{
|
||||
Console,
|
||||
Memory,
|
||||
System,
|
||||
Screen,
|
||||
Quality,
|
||||
Environment
|
||||
}
|
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a90914c97f6349a4e96302cc0ceeeed0
|
||||
guid: 4f6742d2e5aa8bf40b765aa44eca65d2
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1045b92cbd63c45bab65c540449a8ad3
|
||||
guid: 3072205f33d4ee84d8117484f05398b2
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
Binary file not shown.
@ -0,0 +1,30 @@
|
||||
fileFormatVersion: 2
|
||||
guid: dbd119f599580a244b1858693cc49865
|
||||
PluginImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
iconMap: {}
|
||||
executionOrder: {}
|
||||
isPreloaded: 0
|
||||
isOverridable: 0
|
||||
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:
|
Binary file not shown.
@ -0,0 +1,30 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7783572e2d0e10145b5a94249ebd46d5
|
||||
PluginImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
iconMap: {}
|
||||
executionOrder: {}
|
||||
isPreloaded: 0
|
||||
isOverridable: 0
|
||||
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:
|
Binary file not shown.
@ -0,0 +1,30 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a870099e75652f540b865b7a83e4a232
|
||||
PluginImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
iconMap: {}
|
||||
executionOrder: {}
|
||||
isPreloaded: 0
|
||||
isOverridable: 0
|
||||
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:
|
Binary file not shown.
@ -0,0 +1,30 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 68c1d0e6ce0a09444999776ea1f3c0e4
|
||||
PluginImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
iconMap: {}
|
||||
executionOrder: {}
|
||||
isPreloaded: 0
|
||||
isOverridable: 0
|
||||
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:
|
8
AxibugEmuOnline.Client.PSVita/Assets/Prefabs.meta
Normal file
8
AxibugEmuOnline.Client.PSVita/Assets/Prefabs.meta
Normal file
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8d7ded91aab4c0b42abba5042aaceb39
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
625
AxibugEmuOnline.Client.PSVita/Assets/Prefabs/NesCoreProxy.prefab
Normal file
625
AxibugEmuOnline.Client.PSVita/Assets/Prefabs/NesCoreProxy.prefab
Normal file
@ -0,0 +1,625 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1 &1575933574
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1575933575}
|
||||
- component: {fileID: 1575933577}
|
||||
- component: {fileID: 1575933576}
|
||||
m_Layer: 5
|
||||
m_Name: notify
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &1575933575
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1575933574}
|
||||
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: 8662582775439058149}
|
||||
m_RootOrder: 2
|
||||
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: 160, y: 30}
|
||||
m_Pivot: {x: 0, y: 0}
|
||||
--- !u!222 &1575933577
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1575933574}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &1575933576
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1575933574}
|
||||
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: 0.19607843, g: 0.19607843, b: 0.19607843, 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_FontData:
|
||||
m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
|
||||
m_FontSize: 14
|
||||
m_FontStyle: 0
|
||||
m_BestFit: 0
|
||||
m_MinSize: 10
|
||||
m_MaxSize: 40
|
||||
m_Alignment: 6
|
||||
m_AlignByGeometry: 0
|
||||
m_RichText: 1
|
||||
m_HorizontalOverflow: 1
|
||||
m_VerticalOverflow: 1
|
||||
m_LineSpacing: 1
|
||||
m_Text:
|
||||
--- !u!1 &319390252125274553
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 3543948837876491845}
|
||||
- component: {fileID: 2496653285840897638}
|
||||
m_Layer: 0
|
||||
m_Name: Input
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &3543948837876491845
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 319390252125274553}
|
||||
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: 8662582775964487076}
|
||||
m_RootOrder: 2
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &2496653285840897638
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 319390252125274553}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: d79c33962dea7dc48b2c5fcd45afe1ad, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
--- !u!1 &8662582774585465456
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 8662582774585465455}
|
||||
- component: {fileID: 8662582774585465453}
|
||||
- component: {fileID: 8662582774585465454}
|
||||
m_Layer: 5
|
||||
m_Name: canvas
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &8662582774585465455
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 8662582774585465456}
|
||||
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: 8662582775439058149}
|
||||
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 &8662582774585465453
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 8662582774585465456}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &8662582774585465454
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 8662582774585465456}
|
||||
m_Enabled: 0
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 1344c3c82d62a2a41a3576d8abb8e3ea, 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_Texture: {fileID: 8400000, guid: 5d4a385f133f9074583d64ab2172a03b, type: 2}
|
||||
m_UVRect:
|
||||
serializedVersion: 2
|
||||
x: 0
|
||||
y: 0
|
||||
width: 1
|
||||
height: 1
|
||||
--- !u!1 &8662582774971523582
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 3209572454846341542}
|
||||
- component: {fileID: 8662582774971523580}
|
||||
- component: {fileID: 8662582774971523579}
|
||||
m_Layer: 5
|
||||
m_Name: Audio
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &3209572454846341542
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 8662582774971523582}
|
||||
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: 8662582775964487076}
|
||||
m_RootOrder: 1
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!82 &8662582774971523580
|
||||
AudioSource:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 8662582774971523582}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 4
|
||||
OutputAudioMixerGroup: {fileID: 0}
|
||||
m_audioClip: {fileID: 0}
|
||||
m_PlayOnAwake: 0
|
||||
m_Volume: 1
|
||||
m_Pitch: 1
|
||||
Loop: 0
|
||||
Mute: 0
|
||||
Spatialize: 0
|
||||
SpatializePostEffects: 0
|
||||
Priority: 128
|
||||
DopplerLevel: 1
|
||||
MinDistance: 1
|
||||
MaxDistance: 500
|
||||
Pan2D: 0
|
||||
rolloffMode: 0
|
||||
BypassEffects: 0
|
||||
BypassListenerEffects: 0
|
||||
BypassReverbZones: 0
|
||||
rolloffCustomCurve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 3
|
||||
time: 0
|
||||
value: 1
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
weightedMode: 0
|
||||
inWeight: 0.33333334
|
||||
outWeight: 0.33333334
|
||||
- serializedVersion: 3
|
||||
time: 1
|
||||
value: 0
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
weightedMode: 0
|
||||
inWeight: 0.33333334
|
||||
outWeight: 0.33333334
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
panLevelCustomCurve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 3
|
||||
time: 0
|
||||
value: 0
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
weightedMode: 0
|
||||
inWeight: 0.33333334
|
||||
outWeight: 0.33333334
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
spreadCustomCurve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 3
|
||||
time: 0
|
||||
value: 0
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
weightedMode: 0
|
||||
inWeight: 0.33333334
|
||||
outWeight: 0.33333334
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
reverbZoneMixCustomCurve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 3
|
||||
time: 0
|
||||
value: 1
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
weightedMode: 0
|
||||
inWeight: 0.33333334
|
||||
outWeight: 0.33333334
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
--- !u!114 &8662582774971523579
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 8662582774971523582}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 765129d4fad76714191795975893ea9c, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_coreProxy: {fileID: 8662582775964487075}
|
||||
m_as: {fileID: 8662582774971523580}
|
||||
--- !u!1 &8662582775350046795
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 7667066390141474019}
|
||||
- component: {fileID: 8662582775350046791}
|
||||
- component: {fileID: 8662582775350046790}
|
||||
m_Layer: 5
|
||||
m_Name: Video
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &7667066390141474019
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 8662582775350046795}
|
||||
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: 8662582775439058149}
|
||||
m_Father: {fileID: 8662582775964487076}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!222 &8662582775350046791
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 8662582775350046795}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &8662582775350046790
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 8662582775350046795}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: f2632911774df3c488ec24b39651c4de, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_coreProxy: {fileID: 8662582775964487075}
|
||||
m_drawCanvas: {fileID: 8662582774585465454}
|
||||
m_fpsText: {fileID: 8662582775359084754}
|
||||
m_nofity: {fileID: 1575933576}
|
||||
--- !u!1 &8662582775359084756
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 8662582775359084755}
|
||||
- component: {fileID: 8662582775359084753}
|
||||
- component: {fileID: 8662582775359084754}
|
||||
m_Layer: 5
|
||||
m_Name: fps
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &8662582775359084755
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 8662582775359084756}
|
||||
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: 8662582775439058149}
|
||||
m_RootOrder: 1
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 1, y: 0}
|
||||
m_AnchorMax: {x: 1, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 160, y: 30}
|
||||
m_Pivot: {x: 1, y: 0}
|
||||
--- !u!222 &8662582775359084753
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 8662582775359084756}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &8662582775359084754
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 8662582775359084756}
|
||||
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: 0.19607843, g: 0.19607843, b: 0.19607843, 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_FontData:
|
||||
m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
|
||||
m_FontSize: 14
|
||||
m_FontStyle: 0
|
||||
m_BestFit: 0
|
||||
m_MinSize: 10
|
||||
m_MaxSize: 40
|
||||
m_Alignment: 8
|
||||
m_AlignByGeometry: 0
|
||||
m_RichText: 1
|
||||
m_HorizontalOverflow: 1
|
||||
m_VerticalOverflow: 1
|
||||
m_LineSpacing: 1
|
||||
m_Text:
|
||||
--- !u!1 &8662582775439058150
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 8662582775439058149}
|
||||
- component: {fileID: 8662582775439058146}
|
||||
- component: {fileID: 8662582775439058147}
|
||||
- component: {fileID: 8662582775439058148}
|
||||
m_Layer: 5
|
||||
m_Name: Canvas
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &8662582775439058149
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 8662582775439058150}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 0, y: 0, z: 0}
|
||||
m_Children:
|
||||
- {fileID: 8662582774585465455}
|
||||
- {fileID: 8662582775359084755}
|
||||
- {fileID: 1575933575}
|
||||
m_Father: {fileID: 7667066390141474019}
|
||||
m_RootOrder: 0
|
||||
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_Pivot: {x: 0, y: 0}
|
||||
--- !u!223 &8662582775439058146
|
||||
Canvas:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 8662582775439058150}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 3
|
||||
m_RenderMode: 0
|
||||
m_Camera: {fileID: 0}
|
||||
m_PlaneDistance: 100
|
||||
m_PixelPerfect: 0
|
||||
m_ReceivesEvents: 1
|
||||
m_OverrideSorting: 0
|
||||
m_OverridePixelPerfect: 0
|
||||
m_SortingBucketNormalizedSize: 0
|
||||
m_AdditionalShaderChannelsFlag: 0
|
||||
m_SortingLayerID: 0
|
||||
m_SortingOrder: 0
|
||||
m_TargetDisplay: 0
|
||||
--- !u!114 &8662582775439058147
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 8662582775439058150}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 0cd44c1031e13a943bb63640046fad76, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_UiScaleMode: 0
|
||||
m_ReferencePixelsPerUnit: 100
|
||||
m_ScaleFactor: 1
|
||||
m_ReferenceResolution: {x: 800, y: 600}
|
||||
m_ScreenMatchMode: 0
|
||||
m_MatchWidthOrHeight: 0
|
||||
m_PhysicalUnit: 3
|
||||
m_FallbackScreenDPI: 96
|
||||
m_DefaultSpriteDPI: 96
|
||||
m_DynamicPixelsPerUnit: 1
|
||||
m_PresetInfoIsWorld: 0
|
||||
--- !u!114 &8662582775439058148
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 8662582775439058150}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: dc42784cf147c0c48a680349fa168899, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_IgnoreReversedGraphics: 1
|
||||
m_BlockingObjects: 0
|
||||
m_BlockingMask:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
--- !u!1 &8662582775964487077
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 8662582775964487076}
|
||||
- component: {fileID: 8662582775964487075}
|
||||
m_Layer: 0
|
||||
m_Name: NesCoreProxy
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &8662582775964487076
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 8662582775964487077}
|
||||
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: 7667066390141474019}
|
||||
- {fileID: 3209572454846341542}
|
||||
- {fileID: 3543948837876491845}
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &8662582775964487075
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 8662582775964487077}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: ac8cd27a180bf3e489b2ca27c821bffe, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
VideoCom: {fileID: 8662582775350046790}
|
||||
AudioCom: {fileID: 8662582774971523579}
|
||||
InputManager: {fileID: 2496653285840897638}
|
@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d75df7d1f5a2c824ab5013cbd79da7a4
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
8
AxibugEmuOnline.Client.PSVita/Assets/Resources.meta
Normal file
8
AxibugEmuOnline.Client.PSVita/Assets/Resources.meta
Normal file
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 481be8b9dd1218749a75bf1bd4612c04
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -0,0 +1 @@
|
||||
{"androidStore":"GooglePlay"}
|
@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8ce858366bedbe74f989c336dd5b1986
|
||||
TextScriptImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
8
AxibugEmuOnline.Client.PSVita/Assets/Resources/NES.meta
Normal file
8
AxibugEmuOnline.Client.PSVita/Assets/Resources/NES.meta
Normal file
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 319a1a12506a5334ebd963b4fd991c2a
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
Binary file not shown.
@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ccf426abdad56c74682de4e38b3048e3
|
||||
TextScriptImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
18103
AxibugEmuOnline.Client.PSVita/Assets/Resources/NES/ROMDB.asset
Normal file
18103
AxibugEmuOnline.Client.PSVita/Assets/Resources/NES/ROMDB.asset
Normal file
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 42cbfafb123e63b45841ae95eb432053
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -1,133 +1,131 @@
|
||||
Shader "AleinUI/Clip"
|
||||
{
|
||||
Properties
|
||||
{
|
||||
_MainTex ("Sprite Texture", 2D) = "white" {}
|
||||
_PalTex ("PAL", 2D) = "white" {}
|
||||
_Color ("Tint", Color) = (1,1,1,1)
|
||||
|
||||
_StencilComp ("Stencil Comparison", Float) = 8
|
||||
_Stencil ("Stencil ID", Float) = 0
|
||||
_StencilOp ("Stencil Operation", Float) = 0
|
||||
_StencilWriteMask ("Stencil Write Mask", Float) = 255
|
||||
_StencilReadMask ("Stencil Read Mask", Float) = 255
|
||||
|
||||
_ColorMask ("Color Mask", Float) = 15
|
||||
|
||||
|
||||
[Toggle(UNITY_UI_ALPHACLIP)] _UseUIAlphaClip ("Use Alpha Clip", Float) = 0
|
||||
}
|
||||
|
||||
SubShader
|
||||
{
|
||||
Tags
|
||||
{
|
||||
"Queue"="Transparent"
|
||||
"IgnoreProjector"="True"
|
||||
"RenderType"="Transparent"
|
||||
"PreviewType"="Plane"
|
||||
"CanUseSpriteAtlas"="True"
|
||||
}
|
||||
|
||||
Stencil
|
||||
{
|
||||
Ref [_Stencil]
|
||||
Comp [_StencilComp]
|
||||
Pass [_StencilOp]
|
||||
ReadMask [_StencilReadMask]
|
||||
WriteMask [_StencilWriteMask]
|
||||
}
|
||||
|
||||
Cull Off
|
||||
Lighting Off
|
||||
ZWrite Off
|
||||
ZTest [unity_GUIZTestMode]
|
||||
Blend SrcAlpha OneMinusSrcAlpha
|
||||
ColorMask [_ColorMask]
|
||||
|
||||
Pass
|
||||
{
|
||||
Name "Default"
|
||||
CGPROGRAM
|
||||
#pragma vertex vert
|
||||
#pragma fragment frag
|
||||
#pragma target 2.0
|
||||
|
||||
#include "UnityCG.cginc"
|
||||
#include "UnityUI.cginc"
|
||||
|
||||
#pragma multi_compile_local _ UNITY_UI_CLIP_RECT
|
||||
#pragma multi_compile_local _ UNITY_UI_ALPHACLIP
|
||||
|
||||
struct appdata_t
|
||||
{
|
||||
float4 vertex : POSITION;
|
||||
float4 color : COLOR;
|
||||
float2 texcoord : TEXCOORD0;
|
||||
UNITY_VERTEX_INPUT_INSTANCE_ID
|
||||
};
|
||||
|
||||
struct v2f
|
||||
{
|
||||
float4 vertex : SV_POSITION;
|
||||
fixed4 color : COLOR;
|
||||
float2 texcoord : TEXCOORD0;
|
||||
float4 worldPosition : TEXCOORD1;
|
||||
UNITY_VERTEX_OUTPUT_STEREO
|
||||
};
|
||||
|
||||
sampler2D _MainTex;
|
||||
fixed4 _Color;
|
||||
fixed4 _TextureSampleAdd;
|
||||
float4 _ClipRect;
|
||||
float4 _MainTex_ST;
|
||||
float4 _MainTex_TexelSize;
|
||||
sampler2D _PalTex;
|
||||
|
||||
v2f vert(appdata_t v)
|
||||
{
|
||||
v2f OUT;
|
||||
UNITY_SETUP_INSTANCE_ID(v);
|
||||
UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(OUT);
|
||||
OUT.worldPosition = v.vertex;
|
||||
OUT.vertex = UnityObjectToClipPos(OUT.worldPosition);
|
||||
|
||||
OUT.texcoord = TRANSFORM_TEX(v.texcoord, _MainTex);
|
||||
|
||||
OUT.color = v.color * _Color;
|
||||
return OUT;
|
||||
}
|
||||
|
||||
fixed4 frag(v2f IN) : SV_Target
|
||||
{
|
||||
float2 mapUV = IN.texcoord;
|
||||
|
||||
float start= 8.0/272.0;
|
||||
float end = (272.0-8.0)/272.0;
|
||||
|
||||
mapUV.x = lerp(start,end, mapUV.x);
|
||||
|
||||
|
||||
|
||||
half4 color = tex2D(_MainTex,mapUV);
|
||||
|
||||
//float rawIndex = color.b;
|
||||
float rawIndex = color.r;
|
||||
|
||||
color = tex2D(_PalTex,float2(rawIndex,0.5));
|
||||
|
||||
#ifdef UNITY_UI_CLIP_RECT
|
||||
color.a *= UnityGet2DClipping(IN.worldPosition.xy, _ClipRect);
|
||||
#endif
|
||||
|
||||
#ifdef UNITY_UI_ALPHACLIP
|
||||
clip (color.a - 0.001);
|
||||
#endif
|
||||
|
||||
|
||||
return color;
|
||||
}
|
||||
ENDCG
|
||||
}
|
||||
}
|
||||
Shader "AleinUI/Clip"
|
||||
{
|
||||
Properties
|
||||
{
|
||||
_MainTex ("Sprite Texture", 2D) = "white" {}
|
||||
_PalTex ("PAL", 2D) = "white" {}
|
||||
_Color ("Tint", Color) = (1,1,1,1)
|
||||
|
||||
_StencilComp ("Stencil Comparison", Float) = 8
|
||||
_Stencil ("Stencil ID", Float) = 0
|
||||
_StencilOp ("Stencil Operation", Float) = 0
|
||||
_StencilWriteMask ("Stencil Write Mask", Float) = 255
|
||||
_StencilReadMask ("Stencil Read Mask", Float) = 255
|
||||
|
||||
_ColorMask ("Color Mask", Float) = 15
|
||||
|
||||
|
||||
[Toggle(UNITY_UI_ALPHACLIP)] _UseUIAlphaClip ("Use Alpha Clip", Float) = 0
|
||||
}
|
||||
|
||||
SubShader
|
||||
{
|
||||
Tags
|
||||
{
|
||||
"Queue"="Transparent"
|
||||
"IgnoreProjector"="True"
|
||||
"RenderType"="Transparent"
|
||||
"PreviewType"="Plane"
|
||||
"CanUseSpriteAtlas"="True"
|
||||
}
|
||||
|
||||
Stencil
|
||||
{
|
||||
Ref [_Stencil]
|
||||
Comp [_StencilComp]
|
||||
Pass [_StencilOp]
|
||||
ReadMask [_StencilReadMask]
|
||||
WriteMask [_StencilWriteMask]
|
||||
}
|
||||
|
||||
Cull Off
|
||||
Lighting Off
|
||||
ZWrite Off
|
||||
ZTest [unity_GUIZTestMode]
|
||||
Blend SrcAlpha OneMinusSrcAlpha
|
||||
ColorMask [_ColorMask]
|
||||
|
||||
Pass
|
||||
{
|
||||
Name "Default"
|
||||
CGPROGRAM
|
||||
#pragma vertex vert
|
||||
#pragma fragment frag
|
||||
#pragma target 2.0
|
||||
|
||||
#include "UnityCG.cginc"
|
||||
#include "UnityUI.cginc"
|
||||
|
||||
#pragma multi_compile_local _ UNITY_UI_CLIP_RECT
|
||||
#pragma multi_compile_local _ UNITY_UI_ALPHACLIP
|
||||
|
||||
struct appdata_t
|
||||
{
|
||||
float4 vertex : POSITION;
|
||||
float4 color : COLOR;
|
||||
float2 texcoord : TEXCOORD0;
|
||||
UNITY_VERTEX_INPUT_INSTANCE_ID
|
||||
};
|
||||
|
||||
struct v2f
|
||||
{
|
||||
float4 vertex : SV_POSITION;
|
||||
fixed4 color : COLOR;
|
||||
float2 texcoord : TEXCOORD0;
|
||||
float4 worldPosition : TEXCOORD1;
|
||||
UNITY_VERTEX_OUTPUT_STEREO
|
||||
};
|
||||
|
||||
sampler2D _MainTex;
|
||||
fixed4 _Color;
|
||||
fixed4 _TextureSampleAdd;
|
||||
float4 _ClipRect;
|
||||
float4 _MainTex_ST;
|
||||
float4 _MainTex_TexelSize;
|
||||
sampler2D _PalTex;
|
||||
|
||||
v2f vert(appdata_t v)
|
||||
{
|
||||
v2f OUT;
|
||||
UNITY_SETUP_INSTANCE_ID(v);
|
||||
UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(OUT);
|
||||
OUT.worldPosition = v.vertex;
|
||||
OUT.vertex = UnityObjectToClipPos(OUT.worldPosition);
|
||||
|
||||
OUT.texcoord = TRANSFORM_TEX(v.texcoord, _MainTex);
|
||||
|
||||
OUT.color = v.color * _Color;
|
||||
return OUT;
|
||||
}
|
||||
|
||||
fixed4 frag(v2f IN) : SV_Target
|
||||
{
|
||||
float2 mapUV = IN.texcoord;
|
||||
|
||||
float start= 8.0/272.0;
|
||||
float end = (272.0-8.0)/272.0;
|
||||
|
||||
mapUV.x = lerp(start,end, mapUV.x);
|
||||
|
||||
half4 color = tex2D(_MainTex,mapUV);
|
||||
|
||||
//float rawIndex = color.b;
|
||||
float rawIndex = color.r;
|
||||
|
||||
color = tex2D(_PalTex,float2(rawIndex,0.5));
|
||||
|
||||
#ifdef UNITY_UI_CLIP_RECT
|
||||
color.a *= UnityGet2DClipping(IN.worldPosition.xy, _ClipRect);
|
||||
#endif
|
||||
|
||||
#ifdef UNITY_UI_ALPHACLIP
|
||||
clip (color.a - 0.001);
|
||||
#endif
|
||||
|
||||
|
||||
return color;
|
||||
}
|
||||
ENDCG
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3dd2917646ccf2b4baee8a5d1c15247f
|
||||
ShaderImporter:
|
||||
externalObjects: {}
|
||||
defaultTextures: []
|
||||
nonModifiableTextures: []
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -0,0 +1,87 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_Name: VirtuaNesMaterial
|
||||
m_Shader: {fileID: 4800000, guid: 3dd2917646ccf2b4baee8a5d1c15247f, type: 3}
|
||||
m_ShaderKeywords:
|
||||
m_LightmapFlags: 4
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap: {}
|
||||
disabledShaderPasses: []
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
- _BumpMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailAlbedoMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailMask:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailNormalMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _EmissionMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MetallicGlossMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _OcclusionMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _PalTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _ParallaxMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Floats:
|
||||
- _BumpScale: 1
|
||||
- _ColorMask: 15
|
||||
- _Cutoff: 0.5
|
||||
- _DetailNormalMapScale: 1
|
||||
- _DstBlend: 0
|
||||
- _GlossMapScale: 1
|
||||
- _Glossiness: 0.5
|
||||
- _GlossyReflections: 1
|
||||
- _Metallic: 0
|
||||
- _Mode: 0
|
||||
- _OcclusionStrength: 1
|
||||
- _Parallax: 0.02
|
||||
- _SmoothnessTextureChannel: 0
|
||||
- _SpecularHighlights: 1
|
||||
- _SrcBlend: 1
|
||||
- _Stencil: 0
|
||||
- _StencilComp: 8
|
||||
- _StencilOp: 0
|
||||
- _StencilReadMask: 255
|
||||
- _StencilWriteMask: 255
|
||||
- _UVSec: 0
|
||||
- _UseUIAlphaClip: 0
|
||||
- _ZWrite: 1
|
||||
m_Colors:
|
||||
- _Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
|
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 374f5ecbae26b7149be2a078f37ad800
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 2100000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
8
AxibugEmuOnline.Client.PSVita/Assets/Scene.meta
Normal file
8
AxibugEmuOnline.Client.PSVita/Assets/Scene.meta
Normal file
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 97287d4650544eb4daa041e4a384a06b
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -0,0 +1,588 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!29 &1
|
||||
OcclusionCullingSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_OcclusionBakeSettings:
|
||||
smallestOccluder: 5
|
||||
smallestHole: 0.25
|
||||
backfaceThreshold: 100
|
||||
m_SceneGUID: 00000000000000000000000000000000
|
||||
m_OcclusionCullingData: {fileID: 0}
|
||||
--- !u!104 &2
|
||||
RenderSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 9
|
||||
m_Fog: 0
|
||||
m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1}
|
||||
m_FogMode: 3
|
||||
m_FogDensity: 0.01
|
||||
m_LinearFogStart: 0
|
||||
m_LinearFogEnd: 300
|
||||
m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1}
|
||||
m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1}
|
||||
m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1}
|
||||
m_AmbientIntensity: 1
|
||||
m_AmbientMode: 0
|
||||
m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1}
|
||||
m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_HaloStrength: 0.5
|
||||
m_FlareStrength: 1
|
||||
m_FlareFadeSpeed: 3
|
||||
m_HaloTexture: {fileID: 0}
|
||||
m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0}
|
||||
m_DefaultReflectionMode: 0
|
||||
m_DefaultReflectionResolution: 128
|
||||
m_ReflectionBounces: 1
|
||||
m_ReflectionIntensity: 1
|
||||
m_CustomReflection: {fileID: 0}
|
||||
m_Sun: {fileID: 0}
|
||||
m_IndirectSpecularColor: {r: 0.44657898, g: 0.4964133, b: 0.5748178, a: 1}
|
||||
m_UseRadianceAmbientProbe: 0
|
||||
--- !u!157 &3
|
||||
LightmapSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 12
|
||||
m_GIWorkflowMode: 1
|
||||
m_GISettings:
|
||||
serializedVersion: 2
|
||||
m_BounceScale: 1
|
||||
m_IndirectOutputScale: 1
|
||||
m_AlbedoBoost: 1
|
||||
m_EnvironmentLightingMode: 0
|
||||
m_EnableBakedLightmaps: 1
|
||||
m_EnableRealtimeLightmaps: 0
|
||||
m_LightmapEditorSettings:
|
||||
serializedVersion: 12
|
||||
m_Resolution: 2
|
||||
m_BakeResolution: 40
|
||||
m_AtlasSize: 1024
|
||||
m_AO: 0
|
||||
m_AOMaxDistance: 1
|
||||
m_CompAOExponent: 1
|
||||
m_CompAOExponentDirect: 0
|
||||
m_ExtractAmbientOcclusion: 0
|
||||
m_Padding: 2
|
||||
m_LightmapParameters: {fileID: 0}
|
||||
m_LightmapsBakeMode: 1
|
||||
m_TextureCompression: 1
|
||||
m_FinalGather: 0
|
||||
m_FinalGatherFiltering: 1
|
||||
m_FinalGatherRayCount: 256
|
||||
m_ReflectionCompression: 2
|
||||
m_MixedBakeMode: 2
|
||||
m_BakeBackend: 1
|
||||
m_PVRSampling: 1
|
||||
m_PVRDirectSampleCount: 32
|
||||
m_PVRSampleCount: 512
|
||||
m_PVRBounces: 2
|
||||
m_PVREnvironmentSampleCount: 256
|
||||
m_PVREnvironmentReferencePointCount: 2048
|
||||
m_PVRFilteringMode: 1
|
||||
m_PVRDenoiserTypeDirect: 1
|
||||
m_PVRDenoiserTypeIndirect: 1
|
||||
m_PVRDenoiserTypeAO: 1
|
||||
m_PVRFilterTypeDirect: 0
|
||||
m_PVRFilterTypeIndirect: 0
|
||||
m_PVRFilterTypeAO: 0
|
||||
m_PVREnvironmentMIS: 1
|
||||
m_PVRCulling: 1
|
||||
m_PVRFilteringGaussRadiusDirect: 1
|
||||
m_PVRFilteringGaussRadiusIndirect: 5
|
||||
m_PVRFilteringGaussRadiusAO: 2
|
||||
m_PVRFilteringAtrousPositionSigmaDirect: 0.5
|
||||
m_PVRFilteringAtrousPositionSigmaIndirect: 2
|
||||
m_PVRFilteringAtrousPositionSigmaAO: 1
|
||||
m_ExportTrainingData: 0
|
||||
m_TrainingDataDestination: TrainingData
|
||||
m_LightProbeSampleCountMultiplier: 4
|
||||
m_LightingDataAsset: {fileID: 0}
|
||||
m_LightingSettings: {fileID: 0}
|
||||
--- !u!196 &4
|
||||
NavMeshSettings:
|
||||
serializedVersion: 2
|
||||
m_ObjectHideFlags: 0
|
||||
m_BuildSettings:
|
||||
serializedVersion: 2
|
||||
agentTypeID: 0
|
||||
agentRadius: 0.5
|
||||
agentHeight: 2
|
||||
agentSlope: 45
|
||||
agentClimb: 0.4
|
||||
ledgeDropHeight: 0
|
||||
maxJumpAcrossDistance: 0
|
||||
minRegionArea: 2
|
||||
manualCellSize: 0
|
||||
cellSize: 0.16666667
|
||||
manualTileSize: 0
|
||||
tileSize: 256
|
||||
accuratePlacement: 0
|
||||
maxJobWorkers: 0
|
||||
preserveTilesOutsideBounds: 0
|
||||
debug:
|
||||
m_Flags: 0
|
||||
m_NavMeshData: {fileID: 0}
|
||||
--- !u!1 &537454904
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 537454906}
|
||||
- component: {fileID: 537454905}
|
||||
m_Layer: 0
|
||||
m_Name: Directional Light
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!108 &537454905
|
||||
Light:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 537454904}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 10
|
||||
m_Type: 1
|
||||
m_Shape: 0
|
||||
m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1}
|
||||
m_Intensity: 1
|
||||
m_Range: 10
|
||||
m_SpotAngle: 30
|
||||
m_InnerSpotAngle: 21.80208
|
||||
m_CookieSize: 10
|
||||
m_Shadows:
|
||||
m_Type: 2
|
||||
m_Resolution: -1
|
||||
m_CustomResolution: -1
|
||||
m_Strength: 1
|
||||
m_Bias: 0.05
|
||||
m_NormalBias: 0.4
|
||||
m_NearPlane: 0.2
|
||||
m_CullingMatrixOverride:
|
||||
e00: 1
|
||||
e01: 0
|
||||
e02: 0
|
||||
e03: 0
|
||||
e10: 0
|
||||
e11: 1
|
||||
e12: 0
|
||||
e13: 0
|
||||
e20: 0
|
||||
e21: 0
|
||||
e22: 1
|
||||
e23: 0
|
||||
e30: 0
|
||||
e31: 0
|
||||
e32: 0
|
||||
e33: 1
|
||||
m_UseCullingMatrixOverride: 0
|
||||
m_Cookie: {fileID: 0}
|
||||
m_DrawHalo: 0
|
||||
m_Flare: {fileID: 0}
|
||||
m_RenderMode: 0
|
||||
m_CullingMask:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_RenderingLayerMask: 1
|
||||
m_Lightmapping: 4
|
||||
m_LightShadowCasterMode: 0
|
||||
m_AreaSize: {x: 1, y: 1}
|
||||
m_BounceIntensity: 1
|
||||
m_ColorTemperature: 6570
|
||||
m_UseColorTemperature: 0
|
||||
m_BoundingSphereOverride: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_UseBoundingSphereOverride: 0
|
||||
m_UseViewFrustumForShadowCasterCull: 1
|
||||
m_ShadowRadius: 0
|
||||
m_ShadowAngle: 0
|
||||
--- !u!4 &537454906
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 537454904}
|
||||
m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261}
|
||||
m_LocalPosition: {x: 0, y: 3, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 1
|
||||
m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0}
|
||||
--- !u!1 &589359925
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 589359928}
|
||||
- component: {fileID: 589359927}
|
||||
- component: {fileID: 589359926}
|
||||
m_Layer: 0
|
||||
m_Name: EventSystem
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!114 &589359926
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 589359925}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 4f231c4fb786f3946a6b90b886c48677, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_HorizontalAxis: Horizontal
|
||||
m_VerticalAxis: Vertical
|
||||
m_SubmitButton: Submit
|
||||
m_CancelButton: Cancel
|
||||
m_InputActionsPerSecond: 10
|
||||
m_RepeatDelay: 0.5
|
||||
m_ForceModuleActive: 0
|
||||
--- !u!114 &589359927
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 589359925}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 76c392e42b5098c458856cdf6ecaaaa1, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_FirstSelected: {fileID: 0}
|
||||
m_sendNavigationEvents: 1
|
||||
m_DragThreshold: 10
|
||||
--- !u!4 &589359928
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 589359925}
|
||||
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_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 3
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &622947734
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 622947735}
|
||||
- component: {fileID: 622947737}
|
||||
- component: {fileID: 622947736}
|
||||
m_Layer: 5
|
||||
m_Name: Game
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &622947735
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 622947734}
|
||||
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_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 1361633018}
|
||||
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!114 &622947736
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 622947734}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 1344c3c82d62a2a41a3576d8abb8e3ea, 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: 0
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_Texture: {fileID: 8400000, guid: 6645567e4c11d9447b1aee2406f681c5, type: 2}
|
||||
m_UVRect:
|
||||
serializedVersion: 2
|
||||
x: 0
|
||||
y: 0
|
||||
width: 1
|
||||
height: 1
|
||||
--- !u!222 &622947737
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 622947734}
|
||||
m_CullTransparentMesh: 0
|
||||
--- !u!1 &1355724343
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1355724346}
|
||||
- component: {fileID: 1355724345}
|
||||
- component: {fileID: 1355724344}
|
||||
m_Layer: 0
|
||||
m_Name: Main Camera
|
||||
m_TagString: MainCamera
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!81 &1355724344
|
||||
AudioListener:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1355724343}
|
||||
m_Enabled: 1
|
||||
--- !u!20 &1355724345
|
||||
Camera:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1355724343}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 2
|
||||
m_ClearFlags: 1
|
||||
m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0}
|
||||
m_projectionMatrixMode: 1
|
||||
m_GateFitMode: 2
|
||||
m_FOVAxisMode: 0
|
||||
m_SensorSize: {x: 36, y: 24}
|
||||
m_LensShift: {x: 0, y: 0}
|
||||
m_FocalLength: 50
|
||||
m_NormalizedViewPortRect:
|
||||
serializedVersion: 2
|
||||
x: 0
|
||||
y: 0
|
||||
width: 1
|
||||
height: 1
|
||||
near clip plane: 0.3
|
||||
far clip plane: 1000
|
||||
field of view: 60
|
||||
orthographic: 0
|
||||
orthographic size: 5
|
||||
m_Depth: -1
|
||||
m_CullingMask:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_RenderingPath: -1
|
||||
m_TargetTexture: {fileID: 0}
|
||||
m_TargetDisplay: 0
|
||||
m_TargetEye: 3
|
||||
m_HDR: 1
|
||||
m_AllowMSAA: 1
|
||||
m_AllowDynamicResolution: 0
|
||||
m_ForceIntoRT: 0
|
||||
m_OcclusionCulling: 1
|
||||
m_StereoConvergence: 10
|
||||
m_StereoSeparation: 0.022
|
||||
--- !u!4 &1355724346
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1355724343}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 1, z: -10}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &1361633014
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1361633018}
|
||||
- component: {fileID: 1361633017}
|
||||
- component: {fileID: 1361633016}
|
||||
- component: {fileID: 1361633015}
|
||||
m_Layer: 5
|
||||
m_Name: UI
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!114 &1361633015
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1361633014}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: dc42784cf147c0c48a680349fa168899, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_IgnoreReversedGraphics: 1
|
||||
m_BlockingObjects: 0
|
||||
m_BlockingMask:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
--- !u!114 &1361633016
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1361633014}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 0cd44c1031e13a943bb63640046fad76, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_UiScaleMode: 0
|
||||
m_ReferencePixelsPerUnit: 100
|
||||
m_ScaleFactor: 1
|
||||
m_ReferenceResolution: {x: 800, y: 600}
|
||||
m_ScreenMatchMode: 0
|
||||
m_MatchWidthOrHeight: 0
|
||||
m_PhysicalUnit: 3
|
||||
m_FallbackScreenDPI: 96
|
||||
m_DefaultSpriteDPI: 96
|
||||
m_DynamicPixelsPerUnit: 1
|
||||
m_PresetInfoIsWorld: 0
|
||||
--- !u!223 &1361633017
|
||||
Canvas:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1361633014}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 3
|
||||
m_RenderMode: 0
|
||||
m_Camera: {fileID: 0}
|
||||
m_PlaneDistance: 100
|
||||
m_PixelPerfect: 0
|
||||
m_ReceivesEvents: 1
|
||||
m_OverrideSorting: 0
|
||||
m_OverridePixelPerfect: 0
|
||||
m_SortingBucketNormalizedSize: 0
|
||||
m_AdditionalShaderChannelsFlag: 0
|
||||
m_SortingLayerID: 0
|
||||
m_SortingOrder: 0
|
||||
m_TargetDisplay: 0
|
||||
--- !u!224 &1361633018
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1361633014}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 0, y: 0, z: 0}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
- {fileID: 622947735}
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 2
|
||||
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_Pivot: {x: 0, y: 0}
|
||||
--- !u!1 &1498586261
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 3
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1498586263}
|
||||
- component: {fileID: 1498586262}
|
||||
m_Layer: 0
|
||||
m_Name: UndoProRecords
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!114 &1498586262
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 3
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1498586261}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: df9ab10aeab793d47a27405557d0b929, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
--- !u!4 &1498586263
|
||||
Transform:
|
||||
m_ObjectHideFlags: 3
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1498586261}
|
||||
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_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 4
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: eb0c18a619175384d95147898a43054b
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
424
AxibugEmuOnline.Client.PSVita/Assets/Scene/EmuTest.unity
Normal file
424
AxibugEmuOnline.Client.PSVita/Assets/Scene/EmuTest.unity
Normal file
@ -0,0 +1,424 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!29 &1
|
||||
OcclusionCullingSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_OcclusionBakeSettings:
|
||||
smallestOccluder: 5
|
||||
smallestHole: 0.25
|
||||
backfaceThreshold: 100
|
||||
m_SceneGUID: 00000000000000000000000000000000
|
||||
m_OcclusionCullingData: {fileID: 0}
|
||||
--- !u!104 &2
|
||||
RenderSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 9
|
||||
m_Fog: 0
|
||||
m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1}
|
||||
m_FogMode: 3
|
||||
m_FogDensity: 0.01
|
||||
m_LinearFogStart: 0
|
||||
m_LinearFogEnd: 300
|
||||
m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1}
|
||||
m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1}
|
||||
m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1}
|
||||
m_AmbientIntensity: 1
|
||||
m_AmbientMode: 0
|
||||
m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1}
|
||||
m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_HaloStrength: 0.5
|
||||
m_FlareStrength: 1
|
||||
m_FlareFadeSpeed: 3
|
||||
m_HaloTexture: {fileID: 0}
|
||||
m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0}
|
||||
m_DefaultReflectionMode: 0
|
||||
m_DefaultReflectionResolution: 128
|
||||
m_ReflectionBounces: 1
|
||||
m_ReflectionIntensity: 1
|
||||
m_CustomReflection: {fileID: 0}
|
||||
m_Sun: {fileID: 0}
|
||||
m_IndirectSpecularColor: {r: 0.44657898, g: 0.4964133, b: 0.5748178, a: 1}
|
||||
m_UseRadianceAmbientProbe: 0
|
||||
--- !u!157 &3
|
||||
LightmapSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 12
|
||||
m_GIWorkflowMode: 1
|
||||
m_GISettings:
|
||||
serializedVersion: 2
|
||||
m_BounceScale: 1
|
||||
m_IndirectOutputScale: 1
|
||||
m_AlbedoBoost: 1
|
||||
m_EnvironmentLightingMode: 0
|
||||
m_EnableBakedLightmaps: 1
|
||||
m_EnableRealtimeLightmaps: 0
|
||||
m_LightmapEditorSettings:
|
||||
serializedVersion: 12
|
||||
m_Resolution: 2
|
||||
m_BakeResolution: 40
|
||||
m_AtlasSize: 1024
|
||||
m_AO: 0
|
||||
m_AOMaxDistance: 1
|
||||
m_CompAOExponent: 1
|
||||
m_CompAOExponentDirect: 0
|
||||
m_ExtractAmbientOcclusion: 0
|
||||
m_Padding: 2
|
||||
m_LightmapParameters: {fileID: 0}
|
||||
m_LightmapsBakeMode: 1
|
||||
m_TextureCompression: 1
|
||||
m_FinalGather: 0
|
||||
m_FinalGatherFiltering: 1
|
||||
m_FinalGatherRayCount: 256
|
||||
m_ReflectionCompression: 2
|
||||
m_MixedBakeMode: 2
|
||||
m_BakeBackend: 1
|
||||
m_PVRSampling: 1
|
||||
m_PVRDirectSampleCount: 32
|
||||
m_PVRSampleCount: 512
|
||||
m_PVRBounces: 2
|
||||
m_PVREnvironmentSampleCount: 256
|
||||
m_PVREnvironmentReferencePointCount: 2048
|
||||
m_PVRFilteringMode: 1
|
||||
m_PVRDenoiserTypeDirect: 1
|
||||
m_PVRDenoiserTypeIndirect: 1
|
||||
m_PVRDenoiserTypeAO: 1
|
||||
m_PVRFilterTypeDirect: 0
|
||||
m_PVRFilterTypeIndirect: 0
|
||||
m_PVRFilterTypeAO: 0
|
||||
m_PVREnvironmentMIS: 1
|
||||
m_PVRCulling: 1
|
||||
m_PVRFilteringGaussRadiusDirect: 1
|
||||
m_PVRFilteringGaussRadiusIndirect: 5
|
||||
m_PVRFilteringGaussRadiusAO: 2
|
||||
m_PVRFilteringAtrousPositionSigmaDirect: 0.5
|
||||
m_PVRFilteringAtrousPositionSigmaIndirect: 2
|
||||
m_PVRFilteringAtrousPositionSigmaAO: 1
|
||||
m_ExportTrainingData: 0
|
||||
m_TrainingDataDestination: TrainingData
|
||||
m_LightProbeSampleCountMultiplier: 4
|
||||
m_LightingDataAsset: {fileID: 0}
|
||||
m_LightingSettings: {fileID: 0}
|
||||
--- !u!196 &4
|
||||
NavMeshSettings:
|
||||
serializedVersion: 2
|
||||
m_ObjectHideFlags: 0
|
||||
m_BuildSettings:
|
||||
serializedVersion: 2
|
||||
agentTypeID: 0
|
||||
agentRadius: 0.5
|
||||
agentHeight: 2
|
||||
agentSlope: 45
|
||||
agentClimb: 0.4
|
||||
ledgeDropHeight: 0
|
||||
maxJumpAcrossDistance: 0
|
||||
minRegionArea: 2
|
||||
manualCellSize: 0
|
||||
cellSize: 0.16666667
|
||||
manualTileSize: 0
|
||||
tileSize: 256
|
||||
accuratePlacement: 0
|
||||
maxJobWorkers: 0
|
||||
preserveTilesOutsideBounds: 0
|
||||
debug:
|
||||
m_Flags: 0
|
||||
m_NavMeshData: {fileID: 0}
|
||||
--- !u!1 &708549044
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 708549046}
|
||||
- component: {fileID: 708549045}
|
||||
m_Layer: 0
|
||||
m_Name: Directional Light
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!108 &708549045
|
||||
Light:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 708549044}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 10
|
||||
m_Type: 1
|
||||
m_Shape: 0
|
||||
m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1}
|
||||
m_Intensity: 1
|
||||
m_Range: 10
|
||||
m_SpotAngle: 30
|
||||
m_InnerSpotAngle: 21.80208
|
||||
m_CookieSize: 10
|
||||
m_Shadows:
|
||||
m_Type: 2
|
||||
m_Resolution: -1
|
||||
m_CustomResolution: -1
|
||||
m_Strength: 1
|
||||
m_Bias: 0.05
|
||||
m_NormalBias: 0.4
|
||||
m_NearPlane: 0.2
|
||||
m_CullingMatrixOverride:
|
||||
e00: 1
|
||||
e01: 0
|
||||
e02: 0
|
||||
e03: 0
|
||||
e10: 0
|
||||
e11: 1
|
||||
e12: 0
|
||||
e13: 0
|
||||
e20: 0
|
||||
e21: 0
|
||||
e22: 1
|
||||
e23: 0
|
||||
e30: 0
|
||||
e31: 0
|
||||
e32: 0
|
||||
e33: 1
|
||||
m_UseCullingMatrixOverride: 0
|
||||
m_Cookie: {fileID: 0}
|
||||
m_DrawHalo: 0
|
||||
m_Flare: {fileID: 0}
|
||||
m_RenderMode: 0
|
||||
m_CullingMask:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_RenderingLayerMask: 1
|
||||
m_Lightmapping: 4
|
||||
m_LightShadowCasterMode: 0
|
||||
m_AreaSize: {x: 1, y: 1}
|
||||
m_BounceIntensity: 1
|
||||
m_ColorTemperature: 6570
|
||||
m_UseColorTemperature: 0
|
||||
m_BoundingSphereOverride: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_UseBoundingSphereOverride: 0
|
||||
m_UseViewFrustumForShadowCasterCull: 1
|
||||
m_ShadowRadius: 0
|
||||
m_ShadowAngle: 0
|
||||
--- !u!4 &708549046
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 708549044}
|
||||
m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261}
|
||||
m_LocalPosition: {x: 0, y: 3, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0}
|
||||
--- !u!1 &1232273651
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1232273654}
|
||||
- component: {fileID: 1232273653}
|
||||
- component: {fileID: 1232273652}
|
||||
m_Layer: 0
|
||||
m_Name: Main Camera
|
||||
m_TagString: MainCamera
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!81 &1232273652
|
||||
AudioListener:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1232273651}
|
||||
m_Enabled: 1
|
||||
--- !u!20 &1232273653
|
||||
Camera:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1232273651}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 2
|
||||
m_ClearFlags: 1
|
||||
m_BackGroundColor: {r: 1, g: 1, b: 1, a: 0}
|
||||
m_projectionMatrixMode: 1
|
||||
m_GateFitMode: 2
|
||||
m_FOVAxisMode: 0
|
||||
m_SensorSize: {x: 36, y: 24}
|
||||
m_LensShift: {x: 0, y: 0}
|
||||
m_FocalLength: 50
|
||||
m_NormalizedViewPortRect:
|
||||
serializedVersion: 2
|
||||
x: 0
|
||||
y: 0
|
||||
width: 1
|
||||
height: 1
|
||||
near clip plane: 0.3
|
||||
far clip plane: 1000
|
||||
field of view: 60
|
||||
orthographic: 0
|
||||
orthographic size: 5
|
||||
m_Depth: -1
|
||||
m_CullingMask:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_RenderingPath: -1
|
||||
m_TargetTexture: {fileID: 0}
|
||||
m_TargetDisplay: 0
|
||||
m_TargetEye: 3
|
||||
m_HDR: 1
|
||||
m_AllowMSAA: 1
|
||||
m_AllowDynamicResolution: 0
|
||||
m_ForceIntoRT: 0
|
||||
m_OcclusionCulling: 1
|
||||
m_StereoConvergence: 10
|
||||
m_StereoSeparation: 0.022
|
||||
--- !u!4 &1232273654
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1232273651}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 1, z: -10}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 2
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &1359344831
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1359344834}
|
||||
- component: {fileID: 1359344833}
|
||||
- component: {fileID: 1359344832}
|
||||
m_Layer: 0
|
||||
m_Name: EventSystem
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!114 &1359344832
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1359344831}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 4f231c4fb786f3946a6b90b886c48677, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_HorizontalAxis: Horizontal
|
||||
m_VerticalAxis: Vertical
|
||||
m_SubmitButton: Submit
|
||||
m_CancelButton: Cancel
|
||||
m_InputActionsPerSecond: 10
|
||||
m_RepeatDelay: 0.5
|
||||
m_ForceModuleActive: 0
|
||||
--- !u!114 &1359344833
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1359344831}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 76c392e42b5098c458856cdf6ecaaaa1, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_FirstSelected: {fileID: 0}
|
||||
m_sendNavigationEvents: 1
|
||||
m_DragThreshold: 10
|
||||
--- !u!4 &1359344834
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1359344831}
|
||||
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: 0}
|
||||
m_RootOrder: 1
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1001 &4232056520998800727
|
||||
PrefabInstance:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_Modification:
|
||||
m_TransformParent: {fileID: 0}
|
||||
m_Modifications:
|
||||
- target: {fileID: 4232056521131536011, guid: f8bea3f8aa351bb46ada33b2274729ea, type: 3}
|
||||
propertyPath: m_RootOrder
|
||||
value: 3
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4232056521131536011, guid: f8bea3f8aa351bb46ada33b2274729ea, type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4232056521131536011, guid: f8bea3f8aa351bb46ada33b2274729ea, type: 3}
|
||||
propertyPath: m_LocalPosition.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4232056521131536011, guid: f8bea3f8aa351bb46ada33b2274729ea, type: 3}
|
||||
propertyPath: m_LocalPosition.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4232056521131536011, guid: f8bea3f8aa351bb46ada33b2274729ea, type: 3}
|
||||
propertyPath: m_LocalRotation.w
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4232056521131536011, guid: f8bea3f8aa351bb46ada33b2274729ea, type: 3}
|
||||
propertyPath: m_LocalRotation.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4232056521131536011, guid: f8bea3f8aa351bb46ada33b2274729ea, type: 3}
|
||||
propertyPath: m_LocalRotation.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4232056521131536011, guid: f8bea3f8aa351bb46ada33b2274729ea, type: 3}
|
||||
propertyPath: m_LocalRotation.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4232056521131536011, guid: f8bea3f8aa351bb46ada33b2274729ea, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4232056521131536011, guid: f8bea3f8aa351bb46ada33b2274729ea, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4232056521131536011, guid: f8bea3f8aa351bb46ada33b2274729ea, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4232056521131536013, guid: f8bea3f8aa351bb46ada33b2274729ea, type: 3}
|
||||
propertyPath: m_Name
|
||||
value: NesEmulator
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_SourcePrefab: {fileID: 100100000, guid: f8bea3f8aa351bb46ada33b2274729ea, type: 3}
|
8
AxibugEmuOnline.Client.PSVita/Assets/Scenes.meta
Normal file
8
AxibugEmuOnline.Client.PSVita/Assets/Scenes.meta
Normal file
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 4f704ae4b4f98ae41a0bce26658850c1
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
933
AxibugEmuOnline.Client.PSVita/Assets/Scenes/SampleScene.unity
Normal file
933
AxibugEmuOnline.Client.PSVita/Assets/Scenes/SampleScene.unity
Normal file
@ -0,0 +1,933 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!29 &1
|
||||
OcclusionCullingSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_OcclusionBakeSettings:
|
||||
smallestOccluder: 5
|
||||
smallestHole: 0.25
|
||||
backfaceThreshold: 100
|
||||
m_SceneGUID: 00000000000000000000000000000000
|
||||
m_OcclusionCullingData: {fileID: 0}
|
||||
--- !u!104 &2
|
||||
RenderSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 9
|
||||
m_Fog: 0
|
||||
m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1}
|
||||
m_FogMode: 3
|
||||
m_FogDensity: 0.01
|
||||
m_LinearFogStart: 0
|
||||
m_LinearFogEnd: 300
|
||||
m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1}
|
||||
m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1}
|
||||
m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1}
|
||||
m_AmbientIntensity: 1
|
||||
m_AmbientMode: 0
|
||||
m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1}
|
||||
m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_HaloStrength: 0.5
|
||||
m_FlareStrength: 1
|
||||
m_FlareFadeSpeed: 3
|
||||
m_HaloTexture: {fileID: 0}
|
||||
m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0}
|
||||
m_DefaultReflectionMode: 0
|
||||
m_DefaultReflectionResolution: 128
|
||||
m_ReflectionBounces: 1
|
||||
m_ReflectionIntensity: 1
|
||||
m_CustomReflection: {fileID: 0}
|
||||
m_Sun: {fileID: 0}
|
||||
m_IndirectSpecularColor: {r: 0.37311953, g: 0.38074014, b: 0.3587274, a: 1}
|
||||
m_UseRadianceAmbientProbe: 0
|
||||
--- !u!157 &3
|
||||
LightmapSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 11
|
||||
m_GIWorkflowMode: 0
|
||||
m_GISettings:
|
||||
serializedVersion: 2
|
||||
m_BounceScale: 1
|
||||
m_IndirectOutputScale: 1
|
||||
m_AlbedoBoost: 1
|
||||
m_TemporalCoherenceThreshold: 1
|
||||
m_EnvironmentLightingMode: 0
|
||||
m_EnableBakedLightmaps: 1
|
||||
m_EnableRealtimeLightmaps: 0
|
||||
m_LightmapEditorSettings:
|
||||
serializedVersion: 10
|
||||
m_Resolution: 2
|
||||
m_BakeResolution: 10
|
||||
m_AtlasSize: 512
|
||||
m_AO: 0
|
||||
m_AOMaxDistance: 1
|
||||
m_CompAOExponent: 1
|
||||
m_CompAOExponentDirect: 0
|
||||
m_Padding: 2
|
||||
m_LightmapParameters: {fileID: 0}
|
||||
m_LightmapsBakeMode: 1
|
||||
m_TextureCompression: 1
|
||||
m_FinalGather: 0
|
||||
m_FinalGatherFiltering: 1
|
||||
m_FinalGatherRayCount: 256
|
||||
m_ReflectionCompression: 2
|
||||
m_MixedBakeMode: 2
|
||||
m_BakeBackend: 1
|
||||
m_PVRSampling: 1
|
||||
m_PVRDirectSampleCount: 32
|
||||
m_PVRSampleCount: 256
|
||||
m_PVRBounces: 2
|
||||
m_PVRFilterTypeDirect: 0
|
||||
m_PVRFilterTypeIndirect: 0
|
||||
m_PVRFilterTypeAO: 0
|
||||
m_PVRFilteringMode: 1
|
||||
m_PVRCulling: 1
|
||||
m_PVRFilteringGaussRadiusDirect: 1
|
||||
m_PVRFilteringGaussRadiusIndirect: 5
|
||||
m_PVRFilteringGaussRadiusAO: 2
|
||||
m_PVRFilteringAtrousPositionSigmaDirect: 0.5
|
||||
m_PVRFilteringAtrousPositionSigmaIndirect: 2
|
||||
m_PVRFilteringAtrousPositionSigmaAO: 1
|
||||
m_ShowResolutionOverlay: 1
|
||||
m_LightingDataAsset: {fileID: 0}
|
||||
m_UseShadowmask: 1
|
||||
--- !u!196 &4
|
||||
NavMeshSettings:
|
||||
serializedVersion: 2
|
||||
m_ObjectHideFlags: 0
|
||||
m_BuildSettings:
|
||||
serializedVersion: 2
|
||||
agentTypeID: 0
|
||||
agentRadius: 0.5
|
||||
agentHeight: 2
|
||||
agentSlope: 45
|
||||
agentClimb: 0.4
|
||||
ledgeDropHeight: 0
|
||||
maxJumpAcrossDistance: 0
|
||||
minRegionArea: 2
|
||||
manualCellSize: 0
|
||||
cellSize: 0.16666667
|
||||
manualTileSize: 0
|
||||
tileSize: 256
|
||||
accuratePlacement: 0
|
||||
debug:
|
||||
m_Flags: 0
|
||||
m_NavMeshData: {fileID: 0}
|
||||
--- !u!1 &85201915
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 85201916}
|
||||
- component: {fileID: 85201919}
|
||||
- component: {fileID: 85201918}
|
||||
- component: {fileID: 85201917}
|
||||
m_Layer: 5
|
||||
m_Name: btnStart
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &85201916
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 85201915}
|
||||
m_LocalRotation: {x: -1, y: -0, z: -0, w: 0}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children:
|
||||
- {fileID: 422799409}
|
||||
m_Father: {fileID: 1067981924}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 44, y: -499}
|
||||
m_SizeDelta: {x: 67.6, y: 28.2}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &85201917
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 85201915}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 1392445389, guid: f70555f144d8491a825f0804e09c671c, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Navigation:
|
||||
m_Mode: 3
|
||||
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_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_DisabledSprite: {fileID: 0}
|
||||
m_AnimationTriggers:
|
||||
m_NormalTrigger: Normal
|
||||
m_HighlightedTrigger: Highlighted
|
||||
m_PressedTrigger: Pressed
|
||||
m_DisabledTrigger: Disabled
|
||||
m_Interactable: 1
|
||||
m_TargetGraphic: {fileID: 85201918}
|
||||
m_OnClick:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0,
|
||||
Culture=neutral, PublicKeyToken=null
|
||||
--- !u!114 &85201918
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 85201915}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
|
||||
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
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
|
||||
--- !u!222 &85201919
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 85201915}
|
||||
m_CullTransparentMesh: 0
|
||||
--- !u!1 &97286095
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 97286097}
|
||||
- component: {fileID: 97286096}
|
||||
- component: {fileID: 97286098}
|
||||
m_Layer: 0
|
||||
m_Name: NesEmu
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!114 &97286096
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 97286095}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 39557e19783acee499ace6c68549e8f8, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
VideoProvider: {fileID: 1168232458}
|
||||
AudioProvider: {fileID: 1963186404}
|
||||
btnStart: {fileID: 85201917}
|
||||
RomName: KickMaster.nes
|
||||
--- !u!4 &97286097
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 97286095}
|
||||
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: 1168232457}
|
||||
- {fileID: 1963186403}
|
||||
- {fileID: 1179864540}
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 1
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &97286098
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 97286095}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 4f6742d2e5aa8bf40b765aa44eca65d2, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
AllowDebugging: 1
|
||||
--- !u!1 &422799408
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 422799409}
|
||||
- component: {fileID: 422799411}
|
||||
- component: {fileID: 422799410}
|
||||
m_Layer: 5
|
||||
m_Name: Text
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &422799409
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 422799408}
|
||||
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: 85201916}
|
||||
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!114 &422799410
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 422799408}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
|
||||
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
m_FontData:
|
||||
m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
|
||||
m_FontSize: 14
|
||||
m_FontStyle: 0
|
||||
m_BestFit: 0
|
||||
m_MinSize: 10
|
||||
m_MaxSize: 40
|
||||
m_Alignment: 4
|
||||
m_AlignByGeometry: 0
|
||||
m_RichText: 1
|
||||
m_HorizontalOverflow: 0
|
||||
m_VerticalOverflow: 0
|
||||
m_LineSpacing: 1
|
||||
m_Text: Start
|
||||
--- !u!222 &422799411
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 422799408}
|
||||
m_CullTransparentMesh: 0
|
||||
--- !u!1 &534669902
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 534669905}
|
||||
- component: {fileID: 534669904}
|
||||
- component: {fileID: 534669903}
|
||||
- component: {fileID: 534669906}
|
||||
m_Layer: 0
|
||||
m_Name: Main Camera
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!81 &534669903
|
||||
AudioListener:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 534669902}
|
||||
m_Enabled: 0
|
||||
--- !u!20 &534669904
|
||||
Camera:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 534669902}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 2
|
||||
m_ClearFlags: 1
|
||||
m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0}
|
||||
m_projectionMatrixMode: 1
|
||||
m_SensorSize: {x: 36, y: 24}
|
||||
m_LensShift: {x: 0, y: 0}
|
||||
m_FocalLength: 50
|
||||
m_NormalizedViewPortRect:
|
||||
serializedVersion: 2
|
||||
x: 0
|
||||
y: 0
|
||||
width: 1
|
||||
height: 1
|
||||
near clip plane: 0.3
|
||||
far clip plane: 1000
|
||||
field of view: 60
|
||||
orthographic: 0
|
||||
orthographic size: 5
|
||||
m_Depth: -1
|
||||
m_CullingMask:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_RenderingPath: -1
|
||||
m_TargetTexture: {fileID: 0}
|
||||
m_TargetDisplay: 0
|
||||
m_TargetEye: 3
|
||||
m_HDR: 1
|
||||
m_AllowMSAA: 1
|
||||
m_AllowDynamicResolution: 0
|
||||
m_ForceIntoRT: 0
|
||||
m_OcclusionCulling: 1
|
||||
m_StereoConvergence: 10
|
||||
m_StereoSeparation: 0.022
|
||||
--- !u!4 &534669905
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 534669902}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 1, z: -10}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &534669906
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 534669902}
|
||||
m_Enabled: 0
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 24d3dec34287f264d9d50bd278042e4b, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
--- !u!1 &683409679
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 683409682}
|
||||
- component: {fileID: 683409681}
|
||||
- component: {fileID: 683409680}
|
||||
m_Layer: 0
|
||||
m_Name: EventSystem
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!114 &683409680
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 683409679}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 1077351063, guid: f70555f144d8491a825f0804e09c671c, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_HorizontalAxis: Horizontal
|
||||
m_VerticalAxis: Vertical
|
||||
m_SubmitButton: Submit
|
||||
m_CancelButton: Cancel
|
||||
m_InputActionsPerSecond: 10
|
||||
m_RepeatDelay: 0.5
|
||||
m_ForceModuleActive: 0
|
||||
--- !u!114 &683409681
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 683409679}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: -619905303, guid: f70555f144d8491a825f0804e09c671c, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_FirstSelected: {fileID: 0}
|
||||
m_sendNavigationEvents: 1
|
||||
m_DragThreshold: 10
|
||||
--- !u!4 &683409682
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 683409679}
|
||||
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: 0}
|
||||
m_RootOrder: 2
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &1067981923
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1067981924}
|
||||
- component: {fileID: 1067981926}
|
||||
- component: {fileID: 1067981925}
|
||||
m_Layer: 5
|
||||
m_Name: RawImage
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &1067981924
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 1067981923}
|
||||
m_LocalRotation: {x: 1, y: 0, z: 0, w: 0}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children:
|
||||
- {fileID: 85201916}
|
||||
m_Father: {fileID: 1179864540}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 180, 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!114 &1067981925
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 1067981923}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: -98529514, guid: f70555f144d8491a825f0804e09c671c, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 2100000, guid: 374f5ecbae26b7149be2a078f37ad800, type: 2}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
|
||||
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
m_Texture: {fileID: 8400000, guid: ffe34aaf87e4b9942b4c2ac05943d444, type: 2}
|
||||
m_UVRect:
|
||||
serializedVersion: 2
|
||||
x: 0
|
||||
y: 0
|
||||
width: 1
|
||||
height: 1
|
||||
--- !u!222 &1067981926
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 1067981923}
|
||||
m_CullTransparentMesh: 0
|
||||
--- !u!1 &1168232456
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1168232457}
|
||||
- component: {fileID: 1168232458}
|
||||
m_Layer: 0
|
||||
m_Name: VideoProvider
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &1168232457
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 1168232456}
|
||||
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: 97286097}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &1168232458
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 1168232456}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 83fbe375412d1af4482ae76e81c1dda2, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
NesEmu: {fileID: 0}
|
||||
Image: {fileID: 1067981925}
|
||||
fpstext: {fileID: 1559076253}
|
||||
detalTime: 0
|
||||
--- !u!1 &1179864539
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1179864540}
|
||||
- component: {fileID: 1179864543}
|
||||
- component: {fileID: 1179864542}
|
||||
- component: {fileID: 1179864541}
|
||||
m_Layer: 5
|
||||
m_Name: Canvas
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &1179864540
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 1179864539}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 0, y: 0, z: 0}
|
||||
m_Children:
|
||||
- {fileID: 1067981924}
|
||||
- {fileID: 1559076252}
|
||||
m_Father: {fileID: 97286097}
|
||||
m_RootOrder: 2
|
||||
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_Pivot: {x: 0, y: 0}
|
||||
--- !u!114 &1179864541
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 1179864539}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 1301386320, guid: f70555f144d8491a825f0804e09c671c, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_IgnoreReversedGraphics: 1
|
||||
m_BlockingObjects: 0
|
||||
m_BlockingMask:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
--- !u!114 &1179864542
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 1179864539}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 1980459831, guid: f70555f144d8491a825f0804e09c671c, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_UiScaleMode: 0
|
||||
m_ReferencePixelsPerUnit: 100
|
||||
m_ScaleFactor: 1
|
||||
m_ReferenceResolution: {x: 800, y: 600}
|
||||
m_ScreenMatchMode: 0
|
||||
m_MatchWidthOrHeight: 0
|
||||
m_PhysicalUnit: 3
|
||||
m_FallbackScreenDPI: 96
|
||||
m_DefaultSpriteDPI: 96
|
||||
m_DynamicPixelsPerUnit: 1
|
||||
--- !u!223 &1179864543
|
||||
Canvas:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 1179864539}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 3
|
||||
m_RenderMode: 0
|
||||
m_Camera: {fileID: 0}
|
||||
m_PlaneDistance: 100
|
||||
m_PixelPerfect: 0
|
||||
m_ReceivesEvents: 1
|
||||
m_OverrideSorting: 0
|
||||
m_OverridePixelPerfect: 0
|
||||
m_SortingBucketNormalizedSize: 0
|
||||
m_AdditionalShaderChannelsFlag: 0
|
||||
m_SortingLayerID: 0
|
||||
m_SortingOrder: 0
|
||||
m_TargetDisplay: 0
|
||||
--- !u!1 &1559076251
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1559076252}
|
||||
- component: {fileID: 1559076254}
|
||||
- component: {fileID: 1559076253}
|
||||
m_Layer: 5
|
||||
m_Name: FPS
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &1559076252
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 1559076251}
|
||||
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: 1179864540}
|
||||
m_RootOrder: 1
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 89, y: -26.25}
|
||||
m_SizeDelta: {x: 152.2, y: 30.5}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &1559076253
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 1559076251}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 1, g: 0.009791947, b: 0, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
|
||||
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
m_FontData:
|
||||
m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
|
||||
m_FontSize: 17
|
||||
m_FontStyle: 0
|
||||
m_BestFit: 0
|
||||
m_MinSize: 0
|
||||
m_MaxSize: 50
|
||||
m_Alignment: 0
|
||||
m_AlignByGeometry: 0
|
||||
m_RichText: 1
|
||||
m_HorizontalOverflow: 0
|
||||
m_VerticalOverflow: 0
|
||||
m_LineSpacing: 1
|
||||
m_Text: FPS
|
||||
--- !u!222 &1559076254
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 1559076251}
|
||||
m_CullTransparentMesh: 0
|
||||
--- !u!1 &1963186402
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1963186403}
|
||||
- component: {fileID: 1963186404}
|
||||
- component: {fileID: 1963186405}
|
||||
m_Layer: 0
|
||||
m_Name: AudioProvider
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &1963186403
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 1963186402}
|
||||
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: 97286097}
|
||||
m_RootOrder: 1
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &1963186404
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 1963186402}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: a6a09b6a4cf4c2d4f994a13fd7e89d6f, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_as: {fileID: 1963186405}
|
||||
--- !u!82 &1963186405
|
||||
AudioSource:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 1963186402}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 4
|
||||
OutputAudioMixerGroup: {fileID: 0}
|
||||
m_audioClip: {fileID: 0}
|
||||
m_PlayOnAwake: 1
|
||||
m_Volume: 1
|
||||
m_Pitch: 1
|
||||
Loop: 0
|
||||
Mute: 0
|
||||
Spatialize: 0
|
||||
SpatializePostEffects: 0
|
||||
Priority: 128
|
||||
DopplerLevel: 1
|
||||
MinDistance: 1
|
||||
MaxDistance: 500
|
||||
Pan2D: 0
|
||||
rolloffMode: 0
|
||||
BypassEffects: 0
|
||||
BypassListenerEffects: 0
|
||||
BypassReverbZones: 0
|
||||
rolloffCustomCurve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 3
|
||||
time: 0
|
||||
value: 1
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
weightedMode: 0
|
||||
inWeight: 0.33333334
|
||||
outWeight: 0.33333334
|
||||
- serializedVersion: 3
|
||||
time: 1
|
||||
value: 0
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
weightedMode: 0
|
||||
inWeight: 0.33333334
|
||||
outWeight: 0.33333334
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
panLevelCustomCurve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 3
|
||||
time: 0
|
||||
value: 0
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
weightedMode: 0
|
||||
inWeight: 0.33333334
|
||||
outWeight: 0.33333334
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
spreadCustomCurve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 3
|
||||
time: 0
|
||||
value: 0
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
weightedMode: 0
|
||||
inWeight: 0.33333334
|
||||
outWeight: 0.33333334
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
reverbZoneMixCustomCurve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 3
|
||||
time: 0
|
||||
value: 1
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
weightedMode: 0
|
||||
inWeight: 0.33333334
|
||||
outWeight: 0.33333334
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 99c9720ab356a0642a771bea13969a05
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
8
AxibugEmuOnline.Client.PSVita/Assets/Script.meta
Normal file
8
AxibugEmuOnline.Client.PSVita/Assets/Script.meta
Normal file
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: cb2f15a5cdbcfcc498fecad6768c5ec9
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -0,0 +1,10 @@
|
||||
{
|
||||
"name": "AxibugEmuOnline.Client",
|
||||
"references": [
|
||||
"VirtualNes.Core"
|
||||
],
|
||||
"optionalUnityReferences": [],
|
||||
"includePlatforms": [],
|
||||
"excludePlatforms": [],
|
||||
"allowUnsafeCode": false
|
||||
}
|
12
AxibugEmuOnline.Client.PSVita/Assets/Script/CorePath.cs
Normal file
12
AxibugEmuOnline.Client.PSVita/Assets/Script/CorePath.cs
Normal file
@ -0,0 +1,12 @@
|
||||
using UnityEngine;
|
||||
|
||||
public static class CorePath
|
||||
{
|
||||
#if UNITY_EDITOR
|
||||
public static string DataPath => Application.persistentDataPath;
|
||||
#elif UNITY_PSP2
|
||||
public static string DataPath => Application.dataPath;
|
||||
#else
|
||||
public static string DataPath => Application.persistentDataPath;
|
||||
#endif
|
||||
}
|
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d43d5934b9afba14782405dc1b6eb455
|
||||
guid: d39954e798484ba44a30cfbd2ebb7fc7
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
@ -0,0 +1,52 @@
|
||||
using UnityEngine;
|
||||
using VirtualNes.Core;
|
||||
|
||||
namespace AxibugEmuOnline.Client
|
||||
{
|
||||
public class AudioProvider : MonoBehaviour
|
||||
{
|
||||
public NesEmulator NesEmu { get; set; }
|
||||
|
||||
[SerializeField]
|
||||
private AudioSource m_as;
|
||||
|
||||
private SoundBuffer _buffer = new SoundBuffer(4096);
|
||||
public void Start()
|
||||
{
|
||||
var dummy = AudioClip.Create("dummy", 1, 1, AudioSettings.outputSampleRate, false);
|
||||
|
||||
dummy.SetData(new float[] { 1 }, 0);
|
||||
m_as.clip = dummy; //just to let unity play the audiosource
|
||||
m_as.loop = true;
|
||||
m_as.spatialBlend = 1;
|
||||
m_as.Play();
|
||||
}
|
||||
|
||||
void OnAudioFilterRead(float[] data, int channels)
|
||||
{
|
||||
int step = channels;
|
||||
|
||||
if (NesEmu == null || NesEmu.NesCore == null) return;
|
||||
|
||||
ProcessSound(NesEmu.NesCore, (uint)(data.Length / channels));
|
||||
|
||||
for (int i = 0; i < data.Length; i += step)
|
||||
{
|
||||
float rawFloat = 0;
|
||||
byte rawData;
|
||||
if (_buffer.TryRead(out rawData))
|
||||
rawFloat = rawData / 255f;
|
||||
|
||||
data[i] = rawFloat;
|
||||
for (int fill = 1; fill < step; fill++)
|
||||
data[i + fill] = rawFloat;
|
||||
}
|
||||
}
|
||||
|
||||
void ProcessSound(NES nes, uint feedCount)
|
||||
{
|
||||
nes.apu.Process(_buffer, feedCount);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,21 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using VirtualNes.Core.Debug;
|
||||
|
||||
namespace AxibugEmuOnline.Client
|
||||
{
|
||||
public class CoreDebuger : IDebugerImpl
|
||||
{
|
||||
|
||||
public void Log(string message)
|
||||
{
|
||||
Debug.Log(message);
|
||||
}
|
||||
|
||||
public void LogError(string message)
|
||||
{
|
||||
Debug.LogError(message);
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,113 @@
|
||||
using AxibugEmuOnline.Client.ClientCore;
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Xml.Linq;
|
||||
using UnityEngine;
|
||||
using VirtualNes.Core;
|
||||
|
||||
namespace AxibugEmuOnline.Client
|
||||
{
|
||||
public class CoreSupporter : ISupporterImpl
|
||||
{
|
||||
private static string RomDirectoryPath
|
||||
{
|
||||
get
|
||||
{
|
||||
#if UNITY_EDITOR
|
||||
return "Assets/StreamingAssets/NES/Roms";
|
||||
#elif UNITY_PSP2
|
||||
return $"{Application.dataPath}/StreamingAssets/NES/Roms";
|
||||
#else
|
||||
return $"{Application.streamingAssetsPath}/NES/Roms";
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
public Stream OpenRom(string fname)
|
||||
{
|
||||
Debug.Log($" OpenRom -> {RomDirectoryPath}/{fname}");
|
||||
try
|
||||
{
|
||||
var stream = File.Open($"{RomDirectoryPath}/{fname}", FileMode.Open,FileAccess.Read);
|
||||
Debug.Log($" OpenRom -> OK!");
|
||||
return stream;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Debug.Log($" OpenRom -> Err!");
|
||||
Debug.LogError(ex);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public void GetRomPathInfo(string fname, out string fullPath, out string directPath)
|
||||
{
|
||||
directPath = RomDirectoryPath;
|
||||
fullPath = $"{directPath}/{fname}";
|
||||
}
|
||||
|
||||
public Stream OpenFile_DISKSYS()
|
||||
{
|
||||
return new MemoryStream(Resources.Load<TextAsset>("NES/Disksys.rom").bytes);
|
||||
}
|
||||
|
||||
public void SaveSRAMToFile(byte[] sramContent, string romName)
|
||||
{
|
||||
string sramDirectoryPath = $"{CorePath.DataPath}/sav";
|
||||
Directory.CreateDirectory(sramDirectoryPath);
|
||||
romName = Path.GetFileNameWithoutExtension(romName);
|
||||
File.WriteAllBytes($"{sramDirectoryPath}/{romName}.sav", sramContent);
|
||||
}
|
||||
|
||||
public void SaveDISKToFile(byte[] diskFileContent, string romName)
|
||||
{
|
||||
string diskFileDirectoryPath = $"{CorePath.DataPath}/dsv";
|
||||
Directory.CreateDirectory(diskFileDirectoryPath);
|
||||
romName = Path.GetFileNameWithoutExtension(romName);
|
||||
File.WriteAllBytes($"{diskFileDirectoryPath}/{romName}.dsv", diskFileContent);
|
||||
}
|
||||
|
||||
public EmulatorConfig Config { get; private set; } = new EmulatorConfig();
|
||||
|
||||
public void PrepareDirectory(string directPath)
|
||||
{
|
||||
Directory.CreateDirectory($"{CorePath.DataPath}/{directPath}");
|
||||
}
|
||||
|
||||
public void SaveFile(byte[] fileData, string directPath, string fileName)
|
||||
{
|
||||
PrepareDirectory(directPath);
|
||||
|
||||
var fileFullpath = $"{CorePath.DataPath}/{directPath}/{fileName}";
|
||||
File.WriteAllBytes(fileFullpath, fileData);
|
||||
}
|
||||
|
||||
public Stream OpenFile(string directPath, string fileName)
|
||||
{
|
||||
try
|
||||
{
|
||||
var data = File.ReadAllBytes($"{CorePath.DataPath}/{directPath}/{fileName}");
|
||||
if (data == null) return null;
|
||||
return new MemoryStream(data);
|
||||
}
|
||||
catch
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public bool TryGetMapperNo(ROM rom, out int mapperNo)
|
||||
{
|
||||
var db = Resources.Load<RomDB>("NES/ROMDB");
|
||||
return db.GetMapperNo(rom.GetPROM_CRC(), out mapperNo);
|
||||
}
|
||||
|
||||
public ControllerState GetControllerState()
|
||||
{
|
||||
var mapper = NesControllerMapper.Get();
|
||||
return mapper.CreateState();
|
||||
}
|
||||
}
|
||||
}
|
@ -1,131 +1,135 @@
|
||||
using AxibugEmuOnline.Client.ClientCore;
|
||||
using System;
|
||||
using System.IO;
|
||||
using UnityEngine;
|
||||
using VirtualNes.Core;
|
||||
|
||||
namespace AxibugEmuOnline.Client
|
||||
{
|
||||
public class NesControllerMapper
|
||||
{
|
||||
private static readonly string ConfigFilePath = $"{App.PersistentDataPath}/NES/ControllerMapper.json";
|
||||
|
||||
public MapperSetter Player1 = new MapperSetter();
|
||||
public MapperSetter Player2 = new MapperSetter();
|
||||
public MapperSetter Player3 = new MapperSetter();
|
||||
public MapperSetter Player4 = new MapperSetter();
|
||||
|
||||
public NesControllerMapper()
|
||||
{
|
||||
Player1.UP.keyCode = KeyCode.W;
|
||||
Player1.DOWN.keyCode = KeyCode.S;
|
||||
Player1.LEFT.keyCode = KeyCode.A;
|
||||
Player1.RIGHT.keyCode = KeyCode.D;
|
||||
Player1.B.keyCode = KeyCode.J;
|
||||
Player1.A.keyCode = KeyCode.K;
|
||||
Player1.SELECT.keyCode = KeyCode.V;
|
||||
Player1.START.keyCode = KeyCode.B;
|
||||
|
||||
//PC XBOX
|
||||
//Player1.B.keyCode = Common.PC_XBOXKEY.A;
|
||||
//Player1.A.keyCode = Common.PC_XBOXKEY.B;
|
||||
//Player1.SELECT.keyCode = Common.PC_XBOXKEY.ViewBtn;
|
||||
//Player1.START.keyCode = Common.PC_XBOXKEY.MenuBtn;
|
||||
}
|
||||
|
||||
public void Save()
|
||||
{
|
||||
var jsonStr = JsonUtility.ToJson(this);
|
||||
File.WriteAllText(ConfigFilePath, jsonStr);
|
||||
}
|
||||
|
||||
public ControllerState CreateState()
|
||||
{
|
||||
var state1 = Player1.GetButtons();
|
||||
var state2 = Player2.GetButtons();
|
||||
var state3 = Player3.GetButtons();
|
||||
var state4 = Player4.GetButtons();
|
||||
|
||||
return new ControllerState(state1, state2, state3, state4);
|
||||
}
|
||||
|
||||
private static NesControllerMapper s_setting;
|
||||
public static NesControllerMapper Get()
|
||||
{
|
||||
if (s_setting == null)
|
||||
{
|
||||
try
|
||||
{
|
||||
var json = File.ReadAllText($"{App.PersistentDataPath}/Nes/ControllerMapper.json");
|
||||
s_setting = JsonUtility.FromJson<NesControllerMapper>(json);
|
||||
}
|
||||
catch
|
||||
{
|
||||
s_setting = new NesControllerMapper();
|
||||
}
|
||||
}
|
||||
|
||||
return s_setting;
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class Mapper
|
||||
{
|
||||
public EnumButtonType buttonType;
|
||||
public KeyCode keyCode;
|
||||
|
||||
public Mapper(EnumButtonType buttonType)
|
||||
{
|
||||
this.buttonType = buttonType;
|
||||
}
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class MapperSetter
|
||||
{
|
||||
public Mapper UP = new Mapper(EnumButtonType.UP);
|
||||
public Mapper DOWN = new Mapper(EnumButtonType.DOWN);
|
||||
public Mapper LEFT = new Mapper(EnumButtonType.LEFT);
|
||||
public Mapper RIGHT = new Mapper(EnumButtonType.RIGHT);
|
||||
public Mapper A = new Mapper(EnumButtonType.A);
|
||||
public Mapper B = new Mapper(EnumButtonType.B);
|
||||
public Mapper SELECT = new Mapper(EnumButtonType.SELECT);
|
||||
public Mapper START = new Mapper(EnumButtonType.START);
|
||||
public Mapper MIC = new Mapper(EnumButtonType.MIC);
|
||||
|
||||
public EnumButtonType GetButtons()
|
||||
{
|
||||
EnumButtonType res = 0;
|
||||
|
||||
if (Input.GetKey(UP.keyCode))
|
||||
res |= EnumButtonType.UP;
|
||||
|
||||
if (Input.GetKey(DOWN.keyCode))
|
||||
res |= EnumButtonType.DOWN;
|
||||
|
||||
if (Input.GetKey(LEFT.keyCode))
|
||||
res |= EnumButtonType.LEFT;
|
||||
|
||||
if (Input.GetKey(RIGHT.keyCode))
|
||||
res |= EnumButtonType.RIGHT;
|
||||
|
||||
if (Input.GetKey(A.keyCode))
|
||||
res |= EnumButtonType.A;
|
||||
|
||||
if (Input.GetKey(B.keyCode))
|
||||
res |= EnumButtonType.B;
|
||||
|
||||
if (Input.GetKey(SELECT.keyCode))
|
||||
res |= EnumButtonType.SELECT;
|
||||
|
||||
if (Input.GetKey(START.keyCode))
|
||||
res |= EnumButtonType.START;
|
||||
|
||||
if (Input.GetKey(MIC.keyCode))
|
||||
res |= EnumButtonType.MIC;
|
||||
|
||||
return res;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
using System;
|
||||
using System.IO;
|
||||
using UnityEngine;
|
||||
using VirtualNes.Core;
|
||||
|
||||
namespace AxibugEmuOnline.Client
|
||||
{
|
||||
public class NesControllerMapper
|
||||
{
|
||||
private static readonly string ConfigFilePath = $"{CorePath.DataPath}/NES/ControllerMapper.json";
|
||||
|
||||
public MapperSetter Player1 = new MapperSetter();
|
||||
public MapperSetter Player2 = new MapperSetter();
|
||||
public MapperSetter Player3 = new MapperSetter();
|
||||
public MapperSetter Player4 = new MapperSetter();
|
||||
|
||||
public NesControllerMapper()
|
||||
{
|
||||
Player1.UP.keyCode = KeyCode.JoystickButton8;
|
||||
Player1.DOWN.keyCode = KeyCode.JoystickButton10;
|
||||
Player1.LEFT.keyCode = KeyCode.JoystickButton11;
|
||||
Player1.RIGHT.keyCode = KeyCode.JoystickButton9;
|
||||
Player1.B.keyCode = KeyCode.JoystickButton0;
|
||||
Player1.A.keyCode = KeyCode.JoystickButton1;
|
||||
Player1.SELECT.keyCode = KeyCode.JoystickButton6;
|
||||
Player1.START.keyCode = KeyCode.JoystickButton7;
|
||||
|
||||
//dictKeyCfgs.Add(KeyCode.JoystickButton7, MotionKey.P1_GAMESTART);
|
||||
//dictKeyCfgs.Add(KeyCode.JoystickButton6, MotionKey.P1_INSERT_COIN);
|
||||
//dictKeyCfgs.Add(KeyCode.JoystickButton8, MotionKey.P1_UP);
|
||||
//dictKeyCfgs.Add(KeyCode.JoystickButton10, MotionKey.P1_DOWN);
|
||||
//dictKeyCfgs.Add(KeyCode.JoystickButton11, MotionKey.P1_LEFT);
|
||||
//dictKeyCfgs.Add(KeyCode.JoystickButton9, MotionKey.P1_RIGHT);
|
||||
//dictKeyCfgs.Add(KeyCode.JoystickButton2, MotionKey.P1_BTN_1);
|
||||
//dictKeyCfgs.Add(KeyCode.JoystickButton0, MotionKey.P1_BTN_2);
|
||||
//dictKeyCfgs.Add(KeyCode.JoystickButton1, MotionKey.P1_BTN_3);
|
||||
//dictKeyCfgs.Add(KeyCode.JoystickButton3, MotionKey.P1_BTN_4);
|
||||
}
|
||||
|
||||
public void Save()
|
||||
{
|
||||
var jsonStr = JsonUtility.ToJson(this);
|
||||
File.WriteAllText(ConfigFilePath, jsonStr);
|
||||
}
|
||||
|
||||
public ControllerState CreateState()
|
||||
{
|
||||
var state1 = Player1.GetButtons();
|
||||
var state2 = Player2.GetButtons();
|
||||
var state3 = Player3.GetButtons();
|
||||
var state4 = Player4.GetButtons();
|
||||
|
||||
return new ControllerState(state1, state2, state3, state4);
|
||||
}
|
||||
|
||||
private static NesControllerMapper s_setting;
|
||||
public static NesControllerMapper Get()
|
||||
{
|
||||
if (s_setting == null)
|
||||
{
|
||||
try
|
||||
{
|
||||
var json = File.ReadAllText($"{CorePath.DataPath}/Nes/ControllerMapper.json");
|
||||
s_setting = JsonUtility.FromJson<NesControllerMapper>(json);
|
||||
}
|
||||
catch
|
||||
{
|
||||
s_setting = new NesControllerMapper();
|
||||
}
|
||||
}
|
||||
|
||||
return s_setting;
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class Mapper
|
||||
{
|
||||
public EnumButtonType buttonType;
|
||||
public KeyCode keyCode;
|
||||
|
||||
public Mapper(EnumButtonType buttonType)
|
||||
{
|
||||
this.buttonType = buttonType;
|
||||
}
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class MapperSetter
|
||||
{
|
||||
public Mapper UP = new Mapper(EnumButtonType.UP);
|
||||
public Mapper DOWN = new Mapper(EnumButtonType.DOWN);
|
||||
public Mapper LEFT = new Mapper(EnumButtonType.LEFT);
|
||||
public Mapper RIGHT = new Mapper(EnumButtonType.RIGHT);
|
||||
public Mapper A = new Mapper(EnumButtonType.A);
|
||||
public Mapper B = new Mapper(EnumButtonType.B);
|
||||
public Mapper SELECT = new Mapper(EnumButtonType.SELECT);
|
||||
public Mapper START = new Mapper(EnumButtonType.START);
|
||||
public Mapper MIC = new Mapper(EnumButtonType.MIC);
|
||||
|
||||
public EnumButtonType GetButtons()
|
||||
{
|
||||
EnumButtonType res = 0;
|
||||
|
||||
if (Input.GetKey(UP.keyCode))
|
||||
res |= EnumButtonType.UP;
|
||||
|
||||
if (Input.GetKey(DOWN.keyCode))
|
||||
res |= EnumButtonType.DOWN;
|
||||
|
||||
if (Input.GetKey(LEFT.keyCode))
|
||||
res |= EnumButtonType.LEFT;
|
||||
|
||||
if (Input.GetKey(RIGHT.keyCode))
|
||||
res |= EnumButtonType.RIGHT;
|
||||
|
||||
if (Input.GetKey(A.keyCode))
|
||||
res |= EnumButtonType.A;
|
||||
|
||||
if (Input.GetKey(B.keyCode))
|
||||
res |= EnumButtonType.B;
|
||||
|
||||
if (Input.GetKey(SELECT.keyCode))
|
||||
res |= EnumButtonType.SELECT;
|
||||
|
||||
if (Input.GetKey(START.keyCode))
|
||||
res |= EnumButtonType.START;
|
||||
|
||||
if (Input.GetKey(MIC.keyCode))
|
||||
res |= EnumButtonType.MIC;
|
||||
|
||||
return res;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,121 @@
|
||||
using AxibugEmuOnline.Client.ClientCore;
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Xml.Linq;
|
||||
using UnityEngine;
|
||||
using UnityEngine.EventSystems;
|
||||
using UnityEngine.UI;
|
||||
using VirtualNes.Core;
|
||||
using VirtualNes.Core.Debug;
|
||||
|
||||
namespace AxibugEmuOnline.Client
|
||||
{
|
||||
public class NesEmulator : MonoBehaviour
|
||||
{
|
||||
public NES NesCore { get; private set; }
|
||||
|
||||
public VideoProvider VideoProvider;
|
||||
public AudioProvider AudioProvider;
|
||||
|
||||
public Button btnStart;
|
||||
|
||||
#if UNITY_EDITOR || UNITY_PSP2
|
||||
public string RomName;
|
||||
#endif
|
||||
|
||||
private void Start()
|
||||
{
|
||||
Application.targetFrameRate = 60;
|
||||
VideoProvider.NesEmu = this;
|
||||
AudioProvider.NesEmu = this;
|
||||
|
||||
#if UNITY_EDITOR || UNITY_PSP2
|
||||
//StartGame(RomName);
|
||||
#endif
|
||||
|
||||
btnStart.onClick.AddListener(()
|
||||
=>
|
||||
{
|
||||
StartGame(RomName);
|
||||
//失去焦点
|
||||
EventSystem.current.SetSelectedGameObject(null);
|
||||
});
|
||||
}
|
||||
|
||||
public void StartGame(string romName)
|
||||
{
|
||||
StopGame();
|
||||
|
||||
Supporter.Setup(new CoreSupporter());
|
||||
Debuger.Setup(new CoreDebuger());
|
||||
|
||||
try
|
||||
{
|
||||
NesCore = new NES(romName);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
NesCore = null;
|
||||
UnityEngine.Debug.LogError(ex);
|
||||
}
|
||||
}
|
||||
|
||||
public void StopGame()
|
||||
{
|
||||
NesCore?.Dispose();
|
||||
NesCore = null;
|
||||
}
|
||||
|
||||
private void Update()
|
||||
{
|
||||
if (NesCore != null)
|
||||
{
|
||||
var controlState = Supporter.GetControllerState();
|
||||
NesCore.pad.Sync(controlState);
|
||||
|
||||
Stopwatch stopwatch = new Stopwatch();
|
||||
stopwatch.Reset();
|
||||
stopwatch.Start();
|
||||
|
||||
NesCore.EmulateFrame(true);
|
||||
|
||||
stopwatch.Stop();
|
||||
// 获取计时器的总时间
|
||||
TimeSpan ts = stopwatch.Elapsed;
|
||||
|
||||
UnityEngine.Debug.Log($"-> {(ts.Ticks / 10)}μs");
|
||||
|
||||
var screenBuffer = NesCore.ppu.GetScreenPtr();
|
||||
var lineColorMode = NesCore.ppu.GetLineColorMode();
|
||||
VideoProvider.SetDrawData(screenBuffer, lineColorMode, 256, 240);
|
||||
}
|
||||
}
|
||||
|
||||
#if UNITY_EDITOR
|
||||
[ContextMenu("IMPORT")]
|
||||
public void TTTA()
|
||||
{
|
||||
var db = Resources.Load<RomDB>("NES/ROMDB");
|
||||
db.Clear();
|
||||
|
||||
var xmlStr = File.ReadAllText("nes20db.xml");
|
||||
var xml = XDocument.Parse(xmlStr);
|
||||
var games = xml.Element("nes20db").Elements("game");
|
||||
foreach (var game in games)
|
||||
{
|
||||
var crcStr = game.Element("rom").Attribute("crc32").Value;
|
||||
var crc = uint.Parse($"{crcStr}", System.Globalization.NumberStyles.HexNumber);
|
||||
|
||||
var mapper = int.Parse($"{game.Element("pcb").Attribute("mapper").Value}");
|
||||
|
||||
if (mapper > 255) continue;
|
||||
db.AddInfo(new RomDB.RomInfo { CRC = crc, Mapper = mapper });
|
||||
}
|
||||
|
||||
UnityEditor.EditorUtility.SetDirty(db);
|
||||
UnityEditor.AssetDatabase.SaveAssets();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 39557e19783acee499ace6c68549e8f8
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -0,0 +1,528 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1 &9760340517325694
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 4785916497946256520}
|
||||
- component: {fileID: 9003897287163669553}
|
||||
- component: {fileID: 8726979175317618791}
|
||||
m_Layer: 0
|
||||
m_Name: AudioProvider
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &4785916497946256520
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 9760340517325694}
|
||||
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: 4232056521131536011}
|
||||
m_RootOrder: 2
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &9003897287163669553
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 9760340517325694}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: a6a09b6a4cf4c2d4f994a13fd7e89d6f, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
NesEmu: {fileID: 4232056521131536012}
|
||||
m_as: {fileID: 8726979175317618791}
|
||||
--- !u!82 &8726979175317618791
|
||||
AudioSource:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 9760340517325694}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 4
|
||||
OutputAudioMixerGroup: {fileID: 0}
|
||||
m_audioClip: {fileID: 0}
|
||||
m_PlayOnAwake: 1
|
||||
m_Volume: 1
|
||||
m_Pitch: 1
|
||||
Loop: 0
|
||||
Mute: 0
|
||||
Spatialize: 0
|
||||
SpatializePostEffects: 0
|
||||
Priority: 128
|
||||
DopplerLevel: 1
|
||||
MinDistance: 1
|
||||
MaxDistance: 500
|
||||
Pan2D: 0
|
||||
rolloffMode: 0
|
||||
BypassEffects: 0
|
||||
BypassListenerEffects: 0
|
||||
BypassReverbZones: 0
|
||||
rolloffCustomCurve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 3
|
||||
time: 0
|
||||
value: 1
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
weightedMode: 0
|
||||
inWeight: 0.33333334
|
||||
outWeight: 0.33333334
|
||||
- serializedVersion: 3
|
||||
time: 1
|
||||
value: 0
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
weightedMode: 0
|
||||
inWeight: 0.33333334
|
||||
outWeight: 0.33333334
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
panLevelCustomCurve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 3
|
||||
time: 0
|
||||
value: 0
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
weightedMode: 0
|
||||
inWeight: 0.33333334
|
||||
outWeight: 0.33333334
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
spreadCustomCurve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 3
|
||||
time: 0
|
||||
value: 0
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
weightedMode: 0
|
||||
inWeight: 0.33333334
|
||||
outWeight: 0.33333334
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
reverbZoneMixCustomCurve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 3
|
||||
time: 0
|
||||
value: 1
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
weightedMode: 0
|
||||
inWeight: 0.33333334
|
||||
outWeight: 0.33333334
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
--- !u!1 &3545890545112170401
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1038087993597378172}
|
||||
- component: {fileID: 3032498056073774270}
|
||||
- component: {fileID: 634277252673086327}
|
||||
m_Layer: 5
|
||||
m_Name: Viewer
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 0
|
||||
--- !u!224 &1038087993597378172
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3545890545112170401}
|
||||
m_LocalRotation: {x: 1, y: 0, z: 0, w: 0}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 4232056520494431727}
|
||||
m_RootOrder: 1
|
||||
m_LocalEulerAnglesHint: {x: 180, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 128, y: 256}
|
||||
m_Pivot: {x: 0, y: 0}
|
||||
--- !u!222 &3032498056073774270
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3545890545112170401}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &634277252673086327
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3545890545112170401}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 1344c3c82d62a2a41a3576d8abb8e3ea, 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_Texture: {fileID: 8400000, guid: ffe34aaf87e4b9942b4c2ac05943d444, type: 2}
|
||||
m_UVRect:
|
||||
serializedVersion: 2
|
||||
x: 0
|
||||
y: 0
|
||||
width: 1
|
||||
height: 1
|
||||
--- !u!1 &4232056520112715746
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 4232056520112715745}
|
||||
- component: {fileID: 4232056520112715744}
|
||||
m_Layer: 0
|
||||
m_Name: VideoProvider
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &4232056520112715745
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4232056520112715746}
|
||||
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: 4232056521131536011}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &4232056520112715744
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4232056520112715746}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 83fbe375412d1af4482ae76e81c1dda2, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
NesEmu: {fileID: 4232056521131536012}
|
||||
Image: {fileID: 4232056521759880274}
|
||||
--- !u!1 &4232056520494431712
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 4232056520494431727}
|
||||
- component: {fileID: 4232056520494431724}
|
||||
- component: {fileID: 4232056520494431725}
|
||||
- component: {fileID: 4232056520494431726}
|
||||
m_Layer: 5
|
||||
m_Name: Canvas
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &4232056520494431727
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4232056520494431712}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 0, y: 0, z: 0}
|
||||
m_Children:
|
||||
- {fileID: 4232056521759880275}
|
||||
- {fileID: 1038087993597378172}
|
||||
m_Father: {fileID: 4232056521131536011}
|
||||
m_RootOrder: 3
|
||||
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_Pivot: {x: 0, y: 0}
|
||||
--- !u!223 &4232056520494431724
|
||||
Canvas:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4232056520494431712}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 3
|
||||
m_RenderMode: 0
|
||||
m_Camera: {fileID: 0}
|
||||
m_PlaneDistance: 100
|
||||
m_PixelPerfect: 0
|
||||
m_ReceivesEvents: 1
|
||||
m_OverrideSorting: 0
|
||||
m_OverridePixelPerfect: 0
|
||||
m_SortingBucketNormalizedSize: 0
|
||||
m_AdditionalShaderChannelsFlag: 0
|
||||
m_SortingLayerID: 0
|
||||
m_SortingOrder: 0
|
||||
m_TargetDisplay: 0
|
||||
--- !u!114 &4232056520494431725
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4232056520494431712}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 0cd44c1031e13a943bb63640046fad76, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_UiScaleMode: 0
|
||||
m_ReferencePixelsPerUnit: 100
|
||||
m_ScaleFactor: 1
|
||||
m_ReferenceResolution: {x: 800, y: 600}
|
||||
m_ScreenMatchMode: 0
|
||||
m_MatchWidthOrHeight: 0
|
||||
m_PhysicalUnit: 3
|
||||
m_FallbackScreenDPI: 96
|
||||
m_DefaultSpriteDPI: 96
|
||||
m_DynamicPixelsPerUnit: 1
|
||||
m_PresetInfoIsWorld: 0
|
||||
--- !u!114 &4232056520494431726
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4232056520494431712}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: dc42784cf147c0c48a680349fa168899, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_IgnoreReversedGraphics: 1
|
||||
m_BlockingObjects: 0
|
||||
m_BlockingMask:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
--- !u!1 &4232056521131536013
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 4232056521131536011}
|
||||
- component: {fileID: 4232056521131536012}
|
||||
m_Layer: 0
|
||||
m_Name: NesEmulator
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &4232056521131536011
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4232056521131536013}
|
||||
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: 4232056520112715745}
|
||||
- {fileID: 393435831810118449}
|
||||
- {fileID: 4785916497946256520}
|
||||
- {fileID: 4232056520494431727}
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &4232056521131536012
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4232056521131536013}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 39557e19783acee499ace6c68549e8f8, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
VideoProvider: {fileID: 4232056520112715744}
|
||||
AudioProvider: {fileID: 9003897287163669553}
|
||||
RomName:
|
||||
--- !u!1 &4232056521759880276
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 4232056521759880275}
|
||||
- component: {fileID: 4232056521759880273}
|
||||
- component: {fileID: 4232056521759880274}
|
||||
m_Layer: 5
|
||||
m_Name: RawImage
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &4232056521759880275
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4232056521759880276}
|
||||
m_LocalRotation: {x: 1, y: 0, z: 0, w: 0}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 4232056520494431727}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 180, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 272, y: 240}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &4232056521759880273
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4232056521759880276}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &4232056521759880274
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4232056521759880276}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 1344c3c82d62a2a41a3576d8abb8e3ea, 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_Texture: {fileID: 8400000, guid: ffe34aaf87e4b9942b4c2ac05943d444, type: 2}
|
||||
m_UVRect:
|
||||
serializedVersion: 2
|
||||
x: 0
|
||||
y: 0
|
||||
width: 1
|
||||
height: 1
|
||||
--- !u!1 &7856060136050839404
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 393435831810118449}
|
||||
- component: {fileID: 499856625911497759}
|
||||
m_Layer: 0
|
||||
m_Name: PatternViewer
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 0
|
||||
--- !u!4 &393435831810118449
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 7856060136050839404}
|
||||
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: 4232056521131536011}
|
||||
m_RootOrder: 1
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &499856625911497759
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 7856060136050839404}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: c7a50c189f5be5b4ea54de444f8488a0, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
img: {fileID: 634277252673086327}
|
@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f8bea3f8aa351bb46ada33b2274729ea
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -0,0 +1,296 @@
|
||||
using VirtualNes.Core;
|
||||
|
||||
namespace AxibugEmuOnline.Client
|
||||
{
|
||||
public static class PaletteDefine
|
||||
{
|
||||
public struct RGBQUAD
|
||||
{
|
||||
public byte rgbBlue;
|
||||
public byte rgbGreen;
|
||||
public byte rgbRed;
|
||||
public byte rgbReserved;
|
||||
}
|
||||
|
||||
public class PALBUF
|
||||
{
|
||||
public byte r;
|
||||
public byte g;
|
||||
public byte b;
|
||||
|
||||
public PALBUF(byte r, byte g, byte b)
|
||||
{
|
||||
this.r = r;
|
||||
this.g = g;
|
||||
this.b = b;
|
||||
}
|
||||
}
|
||||
|
||||
// スキャンラインカラー
|
||||
private static int m_nScanlineColor => Supporter.Config.graphics.nScanlineColor;
|
||||
|
||||
public static float[][] PalConvTbl = new float[8][]
|
||||
{
|
||||
new float[3]{1.00f, 1.00f, 1.00f},
|
||||
new float[3]{1.00f, 0.80f, 0.73f},
|
||||
new float[3]{0.73f, 1.00f, 0.70f},
|
||||
new float[3]{0.76f, 0.78f, 0.58f},
|
||||
new float[3]{0.86f, 0.80f, 1.00f},
|
||||
new float[3]{0.83f, 0.68f, 0.85f},
|
||||
new float[3]{0.67f, 0.77f, 0.83f},
|
||||
new float[3]{0.68f, 0.68f, 0.68f},
|
||||
};
|
||||
|
||||
public static PALBUF[] m_PaletteBuf = new PALBUF[64]
|
||||
{
|
||||
new PALBUF(0x7F, 0x7F, 0x7F),
|
||||
new PALBUF(0x20, 0x00, 0xB0),
|
||||
new PALBUF(0x28, 0x00, 0xB8),
|
||||
new PALBUF(0x60, 0x10, 0xA0),
|
||||
new PALBUF(0x98, 0x20, 0x78),
|
||||
new PALBUF(0xB0, 0x10, 0x30),
|
||||
new PALBUF(0xA0, 0x30, 0x00),
|
||||
new PALBUF(0x78, 0x40, 0x00),
|
||||
new PALBUF(0x48, 0x58, 0x00),
|
||||
new PALBUF(0x38, 0x68, 0x00),
|
||||
new PALBUF(0x38, 0x6C, 0x00),
|
||||
new PALBUF(0x30, 0x60, 0x40),
|
||||
new PALBUF(0x30, 0x50, 0x80),
|
||||
new PALBUF(0x00, 0x00, 0x00),
|
||||
new PALBUF(0x00, 0x00, 0x00),
|
||||
new PALBUF(0x00, 0x00, 0x00),
|
||||
new PALBUF(0xBC, 0xBC, 0xBC),
|
||||
new PALBUF(0x40, 0x60, 0xF8),
|
||||
new PALBUF(0x40, 0x40, 0xFF),
|
||||
new PALBUF(0x90, 0x40, 0xF0),
|
||||
new PALBUF(0xD8, 0x40, 0xC0),
|
||||
new PALBUF(0xD8, 0x40, 0x60),
|
||||
new PALBUF(0xE0, 0x50, 0x00),
|
||||
new PALBUF(0xC0, 0x70, 0x00),
|
||||
new PALBUF(0x88, 0x88, 0x00),
|
||||
new PALBUF(0x50, 0xA0, 0x00),
|
||||
new PALBUF(0x48, 0xA8, 0x10),
|
||||
new PALBUF(0x48, 0xA0, 0x68),
|
||||
new PALBUF(0x40, 0x90, 0xC0),
|
||||
new PALBUF(0x00, 0x00, 0x00),
|
||||
new PALBUF(0x00, 0x00, 0x00),
|
||||
new PALBUF(0x00, 0x00, 0x00),
|
||||
new PALBUF(0xFF, 0xFF, 0xFF),
|
||||
new PALBUF(0x60, 0xA0, 0xFF),
|
||||
new PALBUF(0x50, 0x80, 0xFF),
|
||||
new PALBUF(0xA0, 0x70, 0xFF),
|
||||
new PALBUF(0xF0, 0x60, 0xFF),
|
||||
new PALBUF(0xFF, 0x60, 0xB0),
|
||||
new PALBUF(0xFF, 0x78, 0x30),
|
||||
new PALBUF(0xFF, 0xA0, 0x00),
|
||||
new PALBUF(0xE8, 0xD0, 0x20),
|
||||
new PALBUF(0x98, 0xE8, 0x00),
|
||||
new PALBUF(0x70, 0xF0, 0x40),
|
||||
new PALBUF(0x70, 0xE0, 0x90),
|
||||
new PALBUF(0x60, 0xD0, 0xE0),
|
||||
new PALBUF(0x60, 0x60, 0x60),
|
||||
new PALBUF(0x00, 0x00, 0x00),
|
||||
new PALBUF(0x00, 0x00, 0x00),
|
||||
new PALBUF(0xFF, 0xFF, 0xFF),
|
||||
new PALBUF(0x90, 0xD0, 0xFF),
|
||||
new PALBUF(0xA0, 0xB8, 0xFF),
|
||||
new PALBUF(0xC0, 0xB0, 0xFF),
|
||||
new PALBUF(0xE0, 0xB0, 0xFF),
|
||||
new PALBUF(0xFF, 0xB8, 0xE8),
|
||||
new PALBUF(0xFF, 0xC8, 0xB8),
|
||||
new PALBUF(0xFF, 0xD8, 0xA0),
|
||||
new PALBUF(0xFF, 0xF0, 0x90),
|
||||
new PALBUF(0xC8, 0xF0, 0x80),
|
||||
new PALBUF(0xA0, 0xF0, 0xA0),
|
||||
new PALBUF(0xA0, 0xFF, 0xC8),
|
||||
new PALBUF(0xA0, 0xFF, 0xF0),
|
||||
new PALBUF(0xA0, 0xA0, 0xA0),
|
||||
new PALBUF(0x00, 0x00, 0x00),
|
||||
new PALBUF(0x00, 0x00, 0x00),
|
||||
};
|
||||
|
||||
#region 256色モード用
|
||||
// Color
|
||||
public static RGBQUAD[][] m_cpPalette = new RGBQUAD[8][]
|
||||
{
|
||||
new RGBQUAD[64*2],
|
||||
new RGBQUAD[64*2],
|
||||
new RGBQUAD[64*2],
|
||||
new RGBQUAD[64*2],
|
||||
new RGBQUAD[64*2],
|
||||
new RGBQUAD[64*2],
|
||||
new RGBQUAD[64*2],
|
||||
new RGBQUAD[64*2],
|
||||
};
|
||||
// Monochrome
|
||||
public static RGBQUAD[][] m_mpPalette = new RGBQUAD[8][]
|
||||
{
|
||||
new RGBQUAD[64*2],
|
||||
new RGBQUAD[64*2],
|
||||
new RGBQUAD[64*2],
|
||||
new RGBQUAD[64*2],
|
||||
new RGBQUAD[64*2],
|
||||
new RGBQUAD[64*2],
|
||||
new RGBQUAD[64*2],
|
||||
new RGBQUAD[64*2],
|
||||
};
|
||||
#endregion
|
||||
|
||||
#region ピクセルフォーマットに変換したパレット
|
||||
// Color
|
||||
public static uint[][] m_cnPalette = new uint[8][]
|
||||
{
|
||||
new uint[256],
|
||||
new uint[256],
|
||||
new uint[256],
|
||||
new uint[256],
|
||||
new uint[256],
|
||||
new uint[256],
|
||||
new uint[256],
|
||||
new uint[256],
|
||||
};
|
||||
// Color/Scanline
|
||||
public static uint[][] m_csPalette = new uint[8][]
|
||||
{
|
||||
new uint[256],
|
||||
new uint[256],
|
||||
new uint[256],
|
||||
new uint[256],
|
||||
new uint[256],
|
||||
new uint[256],
|
||||
new uint[256],
|
||||
new uint[256],
|
||||
};
|
||||
|
||||
// Monochrome
|
||||
public static uint[][] m_mnPalette = new uint[8][]
|
||||
{
|
||||
new uint[256],
|
||||
new uint[256],
|
||||
new uint[256],
|
||||
new uint[256],
|
||||
new uint[256],
|
||||
new uint[256],
|
||||
new uint[256],
|
||||
new uint[256],
|
||||
};
|
||||
|
||||
// Monochrome/Scanline
|
||||
public static uint[][] m_msPalette = new uint[8][]
|
||||
{
|
||||
new uint[256],
|
||||
new uint[256],
|
||||
new uint[256],
|
||||
new uint[256],
|
||||
new uint[256],
|
||||
new uint[256],
|
||||
new uint[256],
|
||||
new uint[256],
|
||||
};
|
||||
#endregion
|
||||
|
||||
public static RGBQUAD[] GetPaletteData()
|
||||
{
|
||||
RGBQUAD[] rgb = new RGBQUAD[256];
|
||||
for (int i = 0; i < 64; i++)
|
||||
{
|
||||
rgb[i] = m_cpPalette[0][i];
|
||||
rgb[i + 0x40] = m_mpPalette[0][i];
|
||||
}
|
||||
|
||||
return rgb;
|
||||
}
|
||||
|
||||
static PaletteDefine()
|
||||
{
|
||||
int Rbit = 0, Gbit = 0, Bbit = 0;
|
||||
int Rsft = 0, Gsft = 0, Bsft = 0;
|
||||
|
||||
GetBitMask(0xFF0000, ref Rsft, ref Rbit);
|
||||
GetBitMask(0x00FF00, ref Gsft, ref Gbit);
|
||||
GetBitMask(0x0000FF, ref Bsft, ref Bbit);
|
||||
|
||||
for (int j = 0; j < 8; j++)
|
||||
{
|
||||
for (int i = 0; i < 64; i++)
|
||||
{
|
||||
uint Rn, Gn, Bn;
|
||||
uint Rs, Gs, Bs;
|
||||
|
||||
// Normal
|
||||
Rn = (uint)(PalConvTbl[j][0] * m_PaletteBuf[i].r);
|
||||
Gn = (uint)(PalConvTbl[j][1] * m_PaletteBuf[i].g);
|
||||
Bn = (uint)(PalConvTbl[j][2] * m_PaletteBuf[i].b);
|
||||
// Scanline
|
||||
Rs = (uint)(PalConvTbl[j][0] * m_PaletteBuf[i].r * m_nScanlineColor / 100.0f);
|
||||
Gs = (uint)(PalConvTbl[j][1] * m_PaletteBuf[i].g * m_nScanlineColor / 100.0f);
|
||||
Bs = (uint)(PalConvTbl[j][2] * m_PaletteBuf[i].b * m_nScanlineColor / 100.0f);
|
||||
|
||||
m_cpPalette[j][i + 0x00].rgbRed = (byte)Rn;
|
||||
m_cpPalette[j][i + 0x00].rgbGreen = (byte)Gn;
|
||||
m_cpPalette[j][i + 0x00].rgbBlue = (byte)Bn;
|
||||
m_cpPalette[j][i + 0x40].rgbRed = (byte)Rs;
|
||||
m_cpPalette[j][i + 0x40].rgbGreen = (byte)Gs;
|
||||
m_cpPalette[j][i + 0x40].rgbBlue = (byte)Bs;
|
||||
|
||||
m_cnPalette[j][i] = ((Rn >> (8 - Rbit)) << Rsft) | ((Gn >> (8 - Gbit)) << Gsft) | ((Bn >> (8 - Bbit)) << Bsft);
|
||||
m_csPalette[j][i] = ((Rs >> (8 - Rbit)) << Rsft) | ((Gs >> (8 - Gbit)) << Gsft) | ((Bs >> (8 - Bbit)) << Bsft);
|
||||
|
||||
// Monochrome
|
||||
Rn = (uint)(m_PaletteBuf[i & 0x30].r);
|
||||
Gn = (uint)(m_PaletteBuf[i & 0x30].g);
|
||||
Bn = (uint)(m_PaletteBuf[i & 0x30].b);
|
||||
Rn =
|
||||
Gn =
|
||||
Bn = (uint)(0.299f * Rn + 0.587f * Gn + 0.114f * Bn);
|
||||
Rn = (uint)(PalConvTbl[j][0] * Rn);
|
||||
Gn = (uint)(PalConvTbl[j][1] * Gn);
|
||||
Bn = (uint)(PalConvTbl[j][2] * Bn);
|
||||
if (Rn > 0xFF) Rs = 0xFF;
|
||||
if (Gn > 0xFF) Gs = 0xFF;
|
||||
if (Bn > 0xFF) Bs = 0xFF;
|
||||
// Scanline
|
||||
Rs = (uint)(m_PaletteBuf[i & 0x30].r * m_nScanlineColor / 100.0f);
|
||||
Gs = (uint)(m_PaletteBuf[i & 0x30].g * m_nScanlineColor / 100.0f);
|
||||
Bs = (uint)(m_PaletteBuf[i & 0x30].b * m_nScanlineColor / 100.0f);
|
||||
Rs =
|
||||
Gs =
|
||||
Bs = (uint)(0.299f * Rs + 0.587f * Gs + 0.114f * Bs);
|
||||
Rs = (uint)(PalConvTbl[j][0] * Rs);
|
||||
Gs = (uint)(PalConvTbl[j][1] * Gs);
|
||||
Bs = (uint)(PalConvTbl[j][2] * Bs);
|
||||
if (Rs > 0xFF) Rs = 0xFF;
|
||||
if (Gs > 0xFF) Gs = 0xFF;
|
||||
if (Bs > 0xFF) Bs = 0xFF;
|
||||
|
||||
m_mpPalette[j][i + 0x00].rgbRed = (byte)Rn;
|
||||
m_mpPalette[j][i + 0x00].rgbGreen = (byte)Gn;
|
||||
m_mpPalette[j][i + 0x00].rgbBlue = (byte)Bn;
|
||||
m_mpPalette[j][i + 0x40].rgbRed = (byte)Rs;
|
||||
m_mpPalette[j][i + 0x40].rgbGreen = (byte)Gs;
|
||||
m_mpPalette[j][i + 0x40].rgbBlue = (byte)Bs;
|
||||
|
||||
m_mnPalette[j][i] = ((Rn >> (8 - Rbit)) << Rsft) | ((Gn >> (8 - Gbit)) << Gsft) | ((Bn >> (8 - Bbit)) << Bsft);
|
||||
m_msPalette[j][i] = ((Rs >> (8 - Rbit)) << Rsft) | ((Gs >> (8 - Gbit)) << Gsft) | ((Bs >> (8 - Bbit)) << Bsft);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// ビット位置の取得
|
||||
static void GetBitMask(uint val, ref int shift, ref int bits)
|
||||
{
|
||||
shift = 0;
|
||||
while (((val & (1 << shift)) == 0) && (shift < 32))
|
||||
{
|
||||
shift++;
|
||||
}
|
||||
|
||||
bits = 32;
|
||||
while (((val & (1 << (bits - 1))) == 0) && (bits > 0))
|
||||
{
|
||||
bits--;
|
||||
}
|
||||
bits = bits - shift;
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,85 @@
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
using VirtualNes;
|
||||
using static AxibugEmuOnline.Client.PaletteDefine;
|
||||
|
||||
namespace AxibugEmuOnline.Client
|
||||
{
|
||||
public class PatternViewer : MonoBehaviour
|
||||
{
|
||||
public RawImage img;
|
||||
|
||||
private Color32[] m_lpPattern = new Color32[128 * 256];
|
||||
private Texture2D m_texture;
|
||||
private Dictionary<byte, RGBQUAD> colors = new Dictionary<byte, RGBQUAD>();
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
m_texture = new Texture2D(128, 256);
|
||||
}
|
||||
|
||||
private void Update()
|
||||
{
|
||||
Paint();
|
||||
}
|
||||
|
||||
private void OnEnable()
|
||||
{
|
||||
img.gameObject.SetActive(true);
|
||||
}
|
||||
|
||||
private void OnDisable()
|
||||
{
|
||||
img.gameObject.SetActive(false);
|
||||
}
|
||||
|
||||
public void Paint()
|
||||
{
|
||||
img.texture = m_texture;
|
||||
|
||||
var pal = MMU.SPPAL;
|
||||
var palette = PaletteDefine.GetPaletteData();
|
||||
colors[0] = palette[pal[0]];
|
||||
colors[1] = palette[pal[1]];
|
||||
colors[2] = palette[pal[2]];
|
||||
colors[3] = palette[pal[3]];
|
||||
|
||||
for (int i = 0; i < 8; i++)
|
||||
{
|
||||
var Ptn = MMU.PPU_MEM_BANK[i];
|
||||
int lpPtn = 0;
|
||||
for (int p = 0; p < 64; p++)
|
||||
{
|
||||
int lpScn = i * 32 * 128 + (p & 15) * 8 + (p / 16) * 8 * 128;
|
||||
for (int y = 0; y < 8; y++)
|
||||
{
|
||||
byte chr_l = Ptn[lpPtn + y];
|
||||
byte chr_h = Ptn[lpPtn + y + 8];
|
||||
m_lpPattern[lpScn + 0] = ToColor32(colors, (((chr_h >> 6) & 2) | ((chr_l >> 7) & 1)));
|
||||
m_lpPattern[lpScn + 4] = ToColor32(colors, (((chr_h >> 2) & 2) | ((chr_l >> 3) & 1)));
|
||||
m_lpPattern[lpScn + 1] = ToColor32(colors, (((chr_h >> 5) & 2) | ((chr_l >> 6) & 1)));
|
||||
m_lpPattern[lpScn + 5] = ToColor32(colors, (((chr_h >> 1) & 2) | ((chr_l >> 2) & 1)));
|
||||
m_lpPattern[lpScn + 2] = ToColor32(colors, (((chr_h >> 4) & 2) | ((chr_l >> 5) & 1)));
|
||||
m_lpPattern[lpScn + 6] = ToColor32(colors, (((chr_h >> 0) & 2) | ((chr_l >> 1) & 1)));
|
||||
m_lpPattern[lpScn + 3] = ToColor32(colors, (((chr_h >> 3) & 2) | ((chr_l >> 4) & 1)));
|
||||
m_lpPattern[lpScn + 7] = ToColor32(colors, (((chr_h << 1) & 2) | ((chr_l >> 0) & 1)));
|
||||
// Next line
|
||||
lpScn += 128;
|
||||
}
|
||||
// Next pattern
|
||||
lpPtn += 16;
|
||||
}
|
||||
}
|
||||
|
||||
m_texture.SetPixels32(m_lpPattern);
|
||||
m_texture.Apply();
|
||||
}
|
||||
|
||||
private Color32 ToColor32(Dictionary<byte, RGBQUAD> map, int v)
|
||||
{
|
||||
var raw = map[(byte)v];
|
||||
return new Color32(raw.rgbRed, raw.rgbGreen, raw.rgbBlue, 255);
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,56 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
namespace AxibugEmuOnline.Client.ClientCore
|
||||
{
|
||||
public class RomDB : ScriptableObject
|
||||
{
|
||||
[SerializeField]
|
||||
private List<RomInfo> romInfos = new List<RomInfo>();
|
||||
|
||||
private Dictionary<uint, RomInfo> crc_Info_mapper;
|
||||
|
||||
public void AddInfo(RomInfo romInfo)
|
||||
{
|
||||
romInfos.Add(romInfo);
|
||||
}
|
||||
|
||||
public void Clear()
|
||||
{
|
||||
romInfos.Clear();
|
||||
}
|
||||
|
||||
public bool GetMapperNo(uint crc, out int mapperNo)
|
||||
{
|
||||
if (crc_Info_mapper == null)
|
||||
{
|
||||
crc_Info_mapper = new Dictionary<uint, RomInfo>();
|
||||
foreach (var info in romInfos)
|
||||
{
|
||||
crc_Info_mapper[info.CRC] = info;
|
||||
}
|
||||
}
|
||||
RomInfo romInfo;
|
||||
|
||||
if (crc_Info_mapper.TryGetValue(crc, out romInfo))
|
||||
{
|
||||
mapperNo = romInfo.Mapper;
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
mapperNo = -1;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class RomInfo
|
||||
{
|
||||
public uint CRC;
|
||||
public int Mapper;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,69 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
namespace AxibugEmuOnline.Client
|
||||
{
|
||||
public class VideoProvider : MonoBehaviour
|
||||
{
|
||||
public NesEmulator NesEmu;
|
||||
|
||||
public RawImage Image;
|
||||
public Text fpstext;
|
||||
|
||||
private UInt32[] wrapTexBuffer;
|
||||
private IntPtr wrapTexBufferPointer;
|
||||
private Texture2D wrapTex;
|
||||
private int TexBufferSize;
|
||||
|
||||
private Texture2D pPal;
|
||||
float lasttime;
|
||||
public float detalTime;
|
||||
public void SetDrawData(uint[] screenData, byte[] lineColorMode, int screenWidth, int screenHeight)
|
||||
{
|
||||
if (wrapTex == null)
|
||||
{
|
||||
//wrapTex = new Texture2D(272, 240, TextureFormat.BGRA32, false);
|
||||
wrapTex = new Texture2D(272, 240, TextureFormat.RGBA32, false);
|
||||
wrapTex.filterMode = FilterMode.Point;
|
||||
wrapTexBuffer = screenData;
|
||||
|
||||
// 固定数组,防止垃圾回收器移动它
|
||||
GCHandle handle = GCHandle.Alloc(wrapTexBuffer, GCHandleType.Pinned);
|
||||
// 获取数组的指针
|
||||
wrapTexBufferPointer = handle.AddrOfPinnedObject();
|
||||
|
||||
Image.texture = wrapTex;
|
||||
Image.material.SetTexture("_MainTex", wrapTex);
|
||||
|
||||
TexBufferSize = wrapTexBuffer.Length * 4;
|
||||
|
||||
var palRaw = PaletteDefine.m_cnPalette[0];
|
||||
//pPal = new Texture2D(palRaw.Length, 1, TextureFormat.BGRA32, 1, true);
|
||||
pPal = new Texture2D(palRaw.Length, 1, TextureFormat.RGBA32, true);
|
||||
pPal.filterMode = FilterMode.Point;
|
||||
for (int i = 0; i < palRaw.Length; i++)
|
||||
{
|
||||
uint colorRaw = palRaw[i];
|
||||
var argbColor = BitConverter.GetBytes(colorRaw);
|
||||
Color temp = Color.white;
|
||||
temp.r = argbColor[2] / 255f;
|
||||
temp.g = argbColor[1] / 255f;
|
||||
temp.b = argbColor[0] / 255f;
|
||||
temp.a = 1;
|
||||
pPal.SetPixel(i, 0, temp);
|
||||
}
|
||||
pPal.Apply();
|
||||
Image.material.SetTexture("_PalTex", pPal);
|
||||
}
|
||||
|
||||
wrapTex.LoadRawTextureData(wrapTexBufferPointer, TexBufferSize);
|
||||
wrapTex.Apply();
|
||||
|
||||
detalTime = Time.time - lasttime;
|
||||
lasttime = Time.time;
|
||||
fpstext.text = (1f / detalTime).ToString();
|
||||
}
|
||||
}
|
||||
}
|
@ -1,72 +1,72 @@
|
||||
using System.Threading;
|
||||
|
||||
public class RingBuffer<T>
|
||||
{
|
||||
private readonly T[] buffer;
|
||||
private readonly int capacity;
|
||||
private int writePos;
|
||||
private int readPos;
|
||||
private int count;
|
||||
|
||||
public RingBuffer(int capacity)
|
||||
{
|
||||
this.capacity = capacity;
|
||||
this.buffer = new T[capacity];
|
||||
this.writePos = 0;
|
||||
this.readPos = 0;
|
||||
this.count = 0;
|
||||
}
|
||||
|
||||
public void Write(T item)
|
||||
{
|
||||
int localWritePos;
|
||||
int localReadPos;
|
||||
|
||||
do
|
||||
{
|
||||
localWritePos = Volatile.Read(ref writePos);
|
||||
localReadPos = Volatile.Read(ref readPos);
|
||||
|
||||
int nextWritePos = (localWritePos + 1) % capacity;
|
||||
|
||||
if (nextWritePos == localReadPos)
|
||||
{
|
||||
// 缓冲区已满,覆盖最旧的未读数据
|
||||
Interlocked.CompareExchange(ref readPos, (localReadPos + 1) % capacity, localReadPos);
|
||||
}
|
||||
}
|
||||
while (Interlocked.CompareExchange(ref writePos, (localWritePos + 1) % capacity, localWritePos) != localWritePos);
|
||||
|
||||
buffer[localWritePos] = item;
|
||||
Interlocked.Increment(ref count);
|
||||
}
|
||||
|
||||
public bool TryRead(out T item)
|
||||
{
|
||||
item = default(T);
|
||||
|
||||
int localReadPos;
|
||||
int localWritePos;
|
||||
|
||||
do
|
||||
{
|
||||
localReadPos = Volatile.Read(ref readPos);
|
||||
localWritePos = Volatile.Read(ref writePos);
|
||||
|
||||
if (localReadPos == localWritePos)
|
||||
{
|
||||
return false; // 缓冲区为空
|
||||
}
|
||||
}
|
||||
while (Interlocked.CompareExchange(ref readPos, (localReadPos + 1) % capacity, localReadPos) != localReadPos);
|
||||
|
||||
item = buffer[localReadPos];
|
||||
Interlocked.Decrement(ref count);
|
||||
return true;
|
||||
}
|
||||
|
||||
public int Available()
|
||||
{
|
||||
return Volatile.Read(ref count);
|
||||
}
|
||||
}
|
||||
using System.Threading;
|
||||
|
||||
public class RingBuffer<T>
|
||||
{
|
||||
private readonly T[] buffer;
|
||||
private readonly int capacity;
|
||||
private int writePos;
|
||||
private int readPos;
|
||||
private int count;
|
||||
|
||||
public RingBuffer(int capacity)
|
||||
{
|
||||
this.capacity = capacity;
|
||||
this.buffer = new T[capacity];
|
||||
this.writePos = 0;
|
||||
this.readPos = 0;
|
||||
this.count = 0;
|
||||
}
|
||||
|
||||
public void Write(T item)
|
||||
{
|
||||
int localWritePos;
|
||||
int localReadPos;
|
||||
|
||||
do
|
||||
{
|
||||
localWritePos = Volatile.Read(ref writePos);
|
||||
localReadPos = Volatile.Read(ref readPos);
|
||||
|
||||
int nextWritePos = (localWritePos + 1) % capacity;
|
||||
|
||||
if (nextWritePos == localReadPos)
|
||||
{
|
||||
// 缓冲区已满,覆盖最旧的未读数据
|
||||
Interlocked.CompareExchange(ref readPos, (localReadPos + 1) % capacity, localReadPos);
|
||||
}
|
||||
}
|
||||
while (Interlocked.CompareExchange(ref writePos, (localWritePos + 1) % capacity, localWritePos) != localWritePos);
|
||||
|
||||
buffer[localWritePos] = item;
|
||||
Interlocked.Increment(ref count);
|
||||
}
|
||||
|
||||
public bool TryRead(out T item)
|
||||
{
|
||||
item = default(T);
|
||||
|
||||
int localReadPos;
|
||||
int localWritePos;
|
||||
|
||||
do
|
||||
{
|
||||
localReadPos = Volatile.Read(ref readPos);
|
||||
localWritePos = Volatile.Read(ref writePos);
|
||||
|
||||
if (localReadPos == localWritePos)
|
||||
{
|
||||
return false; // 缓冲区为空
|
||||
}
|
||||
}
|
||||
while (Interlocked.CompareExchange(ref readPos, (localReadPos + 1) % capacity, localReadPos) != localReadPos);
|
||||
|
||||
item = buffer[localReadPos];
|
||||
Interlocked.Decrement(ref count);
|
||||
return true;
|
||||
}
|
||||
|
||||
public int Available()
|
||||
{
|
||||
return Volatile.Read(ref count);
|
||||
}
|
||||
}
|
@ -1,11 +1,11 @@
|
||||
using VirtualNes.Core;
|
||||
|
||||
public class SoundBuffer : RingBuffer<byte>, ISoundDataBuffer
|
||||
{
|
||||
public SoundBuffer(int capacity) : base(capacity) { }
|
||||
|
||||
public void WriteByte(byte value)
|
||||
{
|
||||
Write(value);
|
||||
}
|
||||
}
|
||||
using VirtualNes.Core;
|
||||
|
||||
public class SoundBuffer : RingBuffer<byte>, ISoundDataBuffer
|
||||
{
|
||||
public SoundBuffer(int capacity) : base(capacity) { }
|
||||
|
||||
public void WriteByte(byte value)
|
||||
{
|
||||
Write(value);
|
||||
}
|
||||
}
|
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1bb2987740587b44e90ef7dfc1832a23
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
Binary file not shown.
@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8cc6e346f997e294c9dcea50436c1757
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2c5bcc6d5df67f04d93e0ab812c36b4e
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
559
AxibugEmuOnline.Client.PSVita/Assets/VirtualNes.Core/APU.cs
Normal file
559
AxibugEmuOnline.Client.PSVita/Assets/VirtualNes.Core/APU.cs
Normal file
@ -0,0 +1,559 @@
|
||||
//using Codice.CM.Client.Differences;
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Security.Principal;
|
||||
using UnityEngine;
|
||||
using VirtualNes.Core;
|
||||
using VirtualNes.Core.Debug;
|
||||
|
||||
namespace VirtualNes.Core
|
||||
{
|
||||
public class APU
|
||||
{
|
||||
public const uint QUEUE_LENGTH = 8192;
|
||||
|
||||
// Volume adjust
|
||||
// Internal sounds
|
||||
public const uint RECTANGLE_VOL = 0x0F0;
|
||||
public const uint TRIANGLE_VOL = 0x130;
|
||||
public const uint NOISE_VOL = 0x0C0;
|
||||
public const uint DPCM_VOL = 0x0F0;
|
||||
// Extra sounds
|
||||
public const uint VRC6_VOL = 0x0F0;
|
||||
public const uint VRC7_VOL = 0x130;
|
||||
public const uint FDS_VOL = 0x0F0;
|
||||
public const uint MMC5_VOL = 0x0F0;
|
||||
public const uint N106_VOL = 0x088;
|
||||
public const uint FME7_VOL = 0x130;
|
||||
|
||||
private NES nes;
|
||||
private byte exsound_select;
|
||||
private APU_INTERNAL @internal = new APU_INTERNAL();
|
||||
private APU_VRC6 vrc6 = new APU_VRC6();
|
||||
private APU_VRC7 vrc7 = new APU_VRC7();
|
||||
private APU_MMC5 mmc5 = new APU_MMC5();
|
||||
private APU_FDS fds = new APU_FDS();
|
||||
private APU_N106 n106 = new APU_N106();
|
||||
private APU_FME7 fme7 = new APU_FME7();
|
||||
private int last_data;
|
||||
private int last_diff;
|
||||
protected short[] m_SoundBuffer = new short[256];
|
||||
protected int[] lowpass_filter = new int[4];
|
||||
protected QUEUE queue = new QUEUE();
|
||||
protected QUEUE exqueue = new QUEUE();
|
||||
protected bool[] m_bMute = new bool[16];
|
||||
protected double elapsed_time;
|
||||
|
||||
public APU(NES parent)
|
||||
{
|
||||
exsound_select = 0;
|
||||
|
||||
nes = parent;
|
||||
@internal.SetParent(parent);
|
||||
|
||||
last_data = last_diff = 0;
|
||||
|
||||
Array.Clear(m_SoundBuffer, 0, m_SoundBuffer.Length);
|
||||
Array.Clear(lowpass_filter, 0, lowpass_filter.Length);
|
||||
|
||||
for (int i = 0; i < m_bMute.Length; i++)
|
||||
m_bMute[i] = true;
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
@internal.Dispose();
|
||||
vrc6.Dispose();
|
||||
vrc7.Dispose();
|
||||
mmc5.Dispose();
|
||||
fds.Dispose();
|
||||
n106.Dispose();
|
||||
fme7.Dispose();
|
||||
}
|
||||
|
||||
private int[] vol = new int[24];
|
||||
static double cutofftemp = (2.0 * 3.141592653579 * 40.0);
|
||||
static double tmp = 0.0;
|
||||
|
||||
public void Process(ISoundDataBuffer lpBuffer, uint dwSize)
|
||||
{
|
||||
int nBits = Supporter.Config.sound.nBits;
|
||||
uint dwLength = (uint)(dwSize / (nBits / 8));
|
||||
int output;
|
||||
QUEUEDATA q = new QUEUEDATA();
|
||||
uint writetime;
|
||||
|
||||
var pSoundBuf = m_SoundBuffer;
|
||||
int nCcount = 0;
|
||||
|
||||
int nFilterType = Supporter.Config.sound.nFilterType;
|
||||
|
||||
if (!Supporter.Config.sound.bEnable)
|
||||
{
|
||||
byte empty = (byte)(Supporter.Config.sound.nRate == 8 ? 128 : 0);
|
||||
for (int i = 0; i < dwSize; i++)
|
||||
lpBuffer.WriteByte(empty);
|
||||
return;
|
||||
}
|
||||
|
||||
// Volume setup
|
||||
// 0:Master
|
||||
// 1:Rectangle 1
|
||||
// 2:Rectangle 2
|
||||
// 3:Triangle
|
||||
// 4:Noise
|
||||
// 5:DPCM
|
||||
// 6:VRC6
|
||||
// 7:VRC7
|
||||
// 8:FDS
|
||||
// 9:MMC5
|
||||
// 10:N106
|
||||
// 11:FME7
|
||||
MemoryUtility.ZEROMEMORY(vol, vol.Length);
|
||||
|
||||
var bMute = m_bMute;
|
||||
var nVolume = Supporter.Config.sound.nVolume;
|
||||
|
||||
int nMasterVolume = bMute[0] ? nVolume[0] : 0;
|
||||
|
||||
// Internal
|
||||
vol[0] = (int)(bMute[1] ? (RECTANGLE_VOL * nVolume[1] * nMasterVolume) / (100 * 100) : 0);
|
||||
vol[1] = (int)(bMute[2] ? (RECTANGLE_VOL * nVolume[2] * nMasterVolume) / (100 * 100) : 0);
|
||||
vol[2] = (int)(bMute[3] ? (TRIANGLE_VOL * nVolume[3] * nMasterVolume) / (100 * 100) : 0);
|
||||
vol[3] = (int)(bMute[4] ? (NOISE_VOL * nVolume[4] * nMasterVolume) / (100 * 100) : 0);
|
||||
vol[4] = (int)(bMute[5] ? (DPCM_VOL * nVolume[5] * nMasterVolume) / (100 * 100) : 0);
|
||||
|
||||
// VRC6
|
||||
vol[5] = (int)(bMute[6] ? (VRC6_VOL * nVolume[6] * nMasterVolume) / (100 * 100) : 0);
|
||||
vol[6] = (int)(bMute[7] ? (VRC6_VOL * nVolume[6] * nMasterVolume) / (100 * 100) : 0);
|
||||
vol[7] = (int)(bMute[8] ? (VRC6_VOL * nVolume[6] * nMasterVolume) / (100 * 100) : 0);
|
||||
|
||||
// VRC7
|
||||
vol[8] = (int)(bMute[6] ? (VRC7_VOL * nVolume[7] * nMasterVolume) / (100 * 100) : 0);
|
||||
|
||||
// FDS
|
||||
vol[9] = (int)(bMute[6] ? (FDS_VOL * nVolume[8] * nMasterVolume) / (100 * 100) : 0);
|
||||
|
||||
// MMC5
|
||||
vol[10] = (int)(bMute[6] ? (MMC5_VOL * nVolume[9] * nMasterVolume) / (100 * 100) : 0);
|
||||
vol[11] = (int)(bMute[7] ? (MMC5_VOL * nVolume[9] * nMasterVolume) / (100 * 100) : 0);
|
||||
vol[12] = (int)(bMute[8] ? (MMC5_VOL * nVolume[9] * nMasterVolume) / (100 * 100) : 0);
|
||||
|
||||
// N106
|
||||
vol[13] = (int)(bMute[6] ? (N106_VOL * nVolume[10] * nMasterVolume) / (100 * 100) : 0);
|
||||
vol[14] = (int)(bMute[7] ? (N106_VOL * nVolume[10] * nMasterVolume) / (100 * 100) : 0);
|
||||
vol[15] = (int)(bMute[8] ? (N106_VOL * nVolume[10] * nMasterVolume) / (100 * 100) : 0);
|
||||
vol[16] = (int)(bMute[9] ? (N106_VOL * nVolume[10] * nMasterVolume) / (100 * 100) : 0);
|
||||
vol[17] = (int)(bMute[10] ? (N106_VOL * nVolume[10] * nMasterVolume) / (100 * 100) : 0);
|
||||
vol[18] = (int)(bMute[11] ? (N106_VOL * nVolume[10] * nMasterVolume) / (100 * 100) : 0);
|
||||
vol[19] = (int)(bMute[12] ? (N106_VOL * nVolume[10] * nMasterVolume) / (100 * 100) : 0);
|
||||
vol[20] = (int)(bMute[13] ? (N106_VOL * nVolume[10] * nMasterVolume) / (100 * 100) : 0);
|
||||
|
||||
// FME7
|
||||
vol[21] = (int)(bMute[6] ? (FME7_VOL * nVolume[11] * nMasterVolume) / (100 * 100) : 0);
|
||||
vol[22] = (int)(bMute[7] ? (FME7_VOL * nVolume[11] * nMasterVolume) / (100 * 100) : 0);
|
||||
vol[23] = (int)(bMute[8] ? (FME7_VOL * nVolume[11] * nMasterVolume) / (100 * 100) : 0);
|
||||
|
||||
// double cycle_rate = ((double)FRAME_CYCLES*60.0/12.0)/(double)Config.sound.nRate;
|
||||
double cycle_rate = (nes.nescfg.FrameCycles * 60.0 / 12.0) / Supporter.Config.sound.nRate;
|
||||
|
||||
// CPUサイクル数がループしてしまった時の対策処理
|
||||
if (elapsed_time > nes.cpu.GetTotalCycles())
|
||||
{
|
||||
QueueFlush();
|
||||
}
|
||||
|
||||
while ((dwLength--) != 0)
|
||||
{
|
||||
writetime = (uint)elapsed_time;
|
||||
|
||||
while (GetQueue((int)writetime, ref q))
|
||||
{
|
||||
WriteProcess(q.addr, q.data);
|
||||
}
|
||||
|
||||
while (GetExQueue((int)writetime, ref q))
|
||||
{
|
||||
WriteExProcess(q.addr, q.data);
|
||||
}
|
||||
|
||||
// 0-4:internal 5-7:VRC6 8:VRC7 9:FDS 10-12:MMC5 13-20:N106 21-23:FME7
|
||||
output = 0;
|
||||
output += @internal.Process(0) * vol[0];
|
||||
output += @internal.Process(1) * vol[1];
|
||||
output += @internal.Process(2) * vol[2];
|
||||
output += @internal.Process(3) * vol[3];
|
||||
output += @internal.Process(4) * vol[4];
|
||||
|
||||
if ((exsound_select & 0x01) != 0)
|
||||
{
|
||||
output += vrc6.Process(0) * vol[5];
|
||||
output += vrc6.Process(1) * vol[6];
|
||||
output += vrc6.Process(2) * vol[7];
|
||||
}
|
||||
if ((exsound_select & 0x02) != 0)
|
||||
{
|
||||
output += vrc7.Process(0) * vol[8];
|
||||
}
|
||||
if ((exsound_select & 0x04) != 0)
|
||||
{
|
||||
output += fds.Process(0) * vol[9];
|
||||
}
|
||||
if ((exsound_select & 0x08) != 0)
|
||||
{
|
||||
output += mmc5.Process(0) * vol[10];
|
||||
output += mmc5.Process(1) * vol[11];
|
||||
output += mmc5.Process(2) * vol[12];
|
||||
}
|
||||
if ((exsound_select & 0x10) != 0)
|
||||
{
|
||||
output += n106.Process(0) * vol[13];
|
||||
output += n106.Process(1) * vol[14];
|
||||
output += n106.Process(2) * vol[15];
|
||||
output += n106.Process(3) * vol[16];
|
||||
output += n106.Process(4) * vol[17];
|
||||
output += n106.Process(5) * vol[18];
|
||||
output += n106.Process(6) * vol[19];
|
||||
output += n106.Process(7) * vol[20];
|
||||
}
|
||||
if ((exsound_select & 0x20) != 0)
|
||||
{
|
||||
fme7.Process(3); // Envelope & Noise
|
||||
output += fme7.Process(0) * vol[21];
|
||||
output += fme7.Process(1) * vol[22];
|
||||
output += fme7.Process(2) * vol[23];
|
||||
}
|
||||
|
||||
output >>= 8;
|
||||
|
||||
if (nFilterType == 1)
|
||||
{
|
||||
//ローパスフィルターTYPE 1(Simple)
|
||||
output = (lowpass_filter[0] + output) / 2;
|
||||
lowpass_filter[0] = output;
|
||||
}
|
||||
else if (nFilterType == 2)
|
||||
{
|
||||
//ローパスフィルターTYPE 2(Weighted type 1)
|
||||
output = (lowpass_filter[1] + lowpass_filter[0] + output) / 3;
|
||||
lowpass_filter[1] = lowpass_filter[0];
|
||||
lowpass_filter[0] = output;
|
||||
}
|
||||
else if (nFilterType == 3)
|
||||
{
|
||||
//ローパスフィルターTYPE 3(Weighted type 2)
|
||||
output = (lowpass_filter[2] + lowpass_filter[1] + lowpass_filter[0] + output) / 4;
|
||||
lowpass_filter[2] = lowpass_filter[1];
|
||||
lowpass_filter[1] = lowpass_filter[0];
|
||||
lowpass_filter[0] = output;
|
||||
}
|
||||
else if (nFilterType == 4)
|
||||
{
|
||||
//ローパスフィルターTYPE 4(Weighted type 3)
|
||||
output = (lowpass_filter[1] + lowpass_filter[0] * 2 + output) / 4;
|
||||
lowpass_filter[1] = lowpass_filter[0];
|
||||
lowpass_filter[0] = output;
|
||||
}
|
||||
// DC成分のカット(HPF TEST)
|
||||
{
|
||||
// static double cutoff = (2.0*3.141592653579*40.0/44100.0);
|
||||
double cutoff = cutofftemp / Supporter.Config.sound.nRate;
|
||||
double @in, @out;
|
||||
|
||||
@in = output;
|
||||
@out = (@in - tmp);
|
||||
tmp = tmp + cutoff * @out;
|
||||
|
||||
output = (int)@out;
|
||||
}
|
||||
|
||||
// Limit
|
||||
if (output > 0x7FFF)
|
||||
{
|
||||
output = 0x7FFF;
|
||||
}
|
||||
else if (output < -0x8000)
|
||||
{
|
||||
output = -0x8000;
|
||||
}
|
||||
|
||||
if (nBits != 8)
|
||||
{
|
||||
byte highByte = (byte)(output >> 8); // 获取高8位
|
||||
byte lowByte = (byte)(output & 0xFF); // 获取低8位
|
||||
lpBuffer.WriteByte(highByte);
|
||||
lpBuffer.WriteByte(lowByte);
|
||||
}
|
||||
else
|
||||
{
|
||||
lpBuffer.WriteByte((byte)((output >> 8) ^ 0x80));
|
||||
}
|
||||
|
||||
if (nCcount < 0x0100)
|
||||
pSoundBuf[nCcount++] = (short)output;
|
||||
|
||||
// elapsedtime += cycle_rate;
|
||||
elapsed_time += cycle_rate;
|
||||
}
|
||||
|
||||
|
||||
if (elapsed_time > ((nes.nescfg.FrameCycles / 24) + nes.cpu.GetTotalCycles()))
|
||||
{
|
||||
elapsed_time = nes.cpu.GetTotalCycles();
|
||||
}
|
||||
if ((elapsed_time + (nes.nescfg.FrameCycles / 6)) < nes.cpu.GetTotalCycles())
|
||||
{
|
||||
elapsed_time = nes.cpu.GetTotalCycles();
|
||||
}
|
||||
}
|
||||
|
||||
private bool GetExQueue(int writetime, ref QUEUEDATA ret)
|
||||
{
|
||||
if (exqueue.wrptr == exqueue.rdptr)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
if (exqueue.data[exqueue.rdptr].time <= writetime)
|
||||
{
|
||||
ret = exqueue.data[exqueue.rdptr];
|
||||
exqueue.rdptr++;
|
||||
exqueue.rdptr = (int)(exqueue.rdptr & (QUEUE_LENGTH - 1));
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private void QueueFlush()
|
||||
{
|
||||
while (queue.wrptr != queue.rdptr)
|
||||
{
|
||||
WriteProcess(queue.data[queue.rdptr].addr, queue.data[queue.rdptr].data);
|
||||
queue.rdptr++;
|
||||
queue.rdptr = (int)(queue.rdptr & (QUEUE_LENGTH - 1));
|
||||
}
|
||||
|
||||
while (exqueue.wrptr != exqueue.rdptr)
|
||||
{
|
||||
WriteExProcess(exqueue.data[exqueue.rdptr].addr, exqueue.data[exqueue.rdptr].data);
|
||||
exqueue.rdptr++;
|
||||
exqueue.rdptr = (int)(exqueue.rdptr & (QUEUE_LENGTH - 1));
|
||||
}
|
||||
}
|
||||
|
||||
private void WriteExProcess(ushort addr, byte data)
|
||||
{
|
||||
if ((exsound_select & 0x01) != 0)
|
||||
{
|
||||
vrc6.Write(addr, data);
|
||||
}
|
||||
if ((exsound_select & 0x02) != 0)
|
||||
{
|
||||
vrc7.Write(addr, data);
|
||||
}
|
||||
if ((exsound_select & 0x04) != 0)
|
||||
{
|
||||
fds.Write(addr, data);
|
||||
}
|
||||
if ((exsound_select & 0x08) != 0)
|
||||
{
|
||||
mmc5.Write(addr, data);
|
||||
}
|
||||
if ((exsound_select & 0x10) != 0)
|
||||
{
|
||||
if (addr == 0x0000)
|
||||
{
|
||||
byte dummy = n106.Read(addr);
|
||||
}
|
||||
else
|
||||
{
|
||||
n106.Write(addr, data);
|
||||
}
|
||||
}
|
||||
if ((exsound_select & 0x20) != 0)
|
||||
{
|
||||
fme7.Write(addr, data);
|
||||
}
|
||||
}
|
||||
|
||||
private void WriteProcess(ushort addr, byte data)
|
||||
{
|
||||
// $4018はVirtuaNES固有ポート
|
||||
if (addr >= 0x4000 && addr <= 0x401F)
|
||||
{
|
||||
@internal.Write(addr, data);
|
||||
}
|
||||
}
|
||||
|
||||
internal void SyncDPCM(int cycles)
|
||||
{
|
||||
@internal.Sync(cycles);
|
||||
}
|
||||
|
||||
internal byte Read(ushort addr)
|
||||
{
|
||||
return @internal.SyncRead(addr);
|
||||
}
|
||||
|
||||
internal void Write(ushort addr, byte data)
|
||||
{
|
||||
// $4018偼VirtuaNES屌桳億乕僩
|
||||
if (addr >= 0x4000 && addr <= 0x401F)
|
||||
{
|
||||
@internal.SyncWrite(addr, data);
|
||||
SetQueue(nes.cpu.GetTotalCycles(), addr, data);
|
||||
}
|
||||
}
|
||||
|
||||
private void SetQueue(int writetime, ushort addr, byte data)
|
||||
{
|
||||
queue.data[queue.wrptr].time = writetime;
|
||||
queue.data[queue.wrptr].addr = addr;
|
||||
queue.data[queue.wrptr].data = data;
|
||||
queue.wrptr++;
|
||||
|
||||
var newwrptr = (int)(queue.wrptr & (QUEUE_LENGTH - 1));
|
||||
queue.wrptr = newwrptr;
|
||||
|
||||
if (queue.wrptr == queue.rdptr)
|
||||
{
|
||||
Debuger.LogError("queue overflow.");
|
||||
}
|
||||
}
|
||||
|
||||
private bool GetQueue(int writetime, ref QUEUEDATA ret)
|
||||
{
|
||||
if (queue.wrptr == queue.rdptr)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
if (queue.data[queue.rdptr].time <= writetime)
|
||||
{
|
||||
ret = queue.data[queue.rdptr];
|
||||
queue.rdptr++;
|
||||
var newrdptr = (int)(queue.rdptr & (QUEUE_LENGTH - 1));
|
||||
queue.rdptr = newrdptr;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public void SoundSetup()
|
||||
{
|
||||
float fClock = nes.nescfg.CpuClock;
|
||||
int nRate = Supporter.Config.sound.nRate;
|
||||
|
||||
@internal.Setup(fClock, nRate);
|
||||
vrc6.Setup(fClock, nRate);
|
||||
vrc7.Setup(fClock, nRate);
|
||||
mmc5.Setup(fClock, nRate);
|
||||
fds.Setup(fClock, nRate);
|
||||
n106.Setup(fClock, nRate);
|
||||
fme7.Setup(fClock, nRate);
|
||||
}
|
||||
|
||||
internal void SelectExSound(byte data)
|
||||
{
|
||||
exsound_select = data;
|
||||
}
|
||||
|
||||
internal void Reset()
|
||||
{
|
||||
queue = new QUEUE();
|
||||
exqueue = new QUEUE();
|
||||
|
||||
elapsed_time = 0;
|
||||
|
||||
float fClock = nes.nescfg.CpuClock;
|
||||
int nRate = Supporter.Config.sound.nRate;
|
||||
|
||||
@internal.Reset(fClock, nRate);
|
||||
vrc6.Reset(fClock, nRate);
|
||||
vrc7.Reset(fClock, nRate);
|
||||
mmc5.Reset(fClock, nRate);
|
||||
fds.Reset(fClock, nRate);
|
||||
n106.Reset(fClock, nRate);
|
||||
fme7.Reset(fClock, nRate);
|
||||
|
||||
SoundSetup();
|
||||
}
|
||||
|
||||
internal void ExWrite(ushort addr, byte data)
|
||||
{
|
||||
SetExQueue(nes.cpu.GetTotalCycles(), addr, data);
|
||||
|
||||
if ((exsound_select & 0x04) != 0)
|
||||
{
|
||||
if (addr >= 0x4040 && addr < 0x4100)
|
||||
{
|
||||
fds.SyncWrite(addr, data);
|
||||
}
|
||||
}
|
||||
|
||||
if ((exsound_select & 0x08) != 0)
|
||||
{
|
||||
if (addr >= 0x5000 && addr <= 0x5015)
|
||||
{
|
||||
mmc5.SyncWrite(addr, data);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void SetExQueue(int writetime, ushort addr, byte data)
|
||||
{
|
||||
exqueue.data[exqueue.wrptr].time = writetime;
|
||||
exqueue.data[exqueue.wrptr].addr = addr;
|
||||
exqueue.data[exqueue.wrptr].data = data;
|
||||
exqueue.wrptr++;
|
||||
var temp = QUEUE_LENGTH - 1;
|
||||
exqueue.wrptr = (int)(exqueue.wrptr & temp);
|
||||
if (exqueue.wrptr == exqueue.rdptr)
|
||||
{
|
||||
Debuger.LogError("exqueue overflow.");
|
||||
}
|
||||
}
|
||||
|
||||
internal byte ExRead(ushort addr)
|
||||
{
|
||||
byte data = 0;
|
||||
|
||||
if ((exsound_select & 0x10) != 0)
|
||||
{
|
||||
if (addr == 0x4800)
|
||||
{
|
||||
SetExQueue(nes.cpu.GetTotalCycles(), 0, 0);
|
||||
}
|
||||
}
|
||||
if ((exsound_select & 0x04) != 0)
|
||||
{
|
||||
if (addr >= 0x4040 && addr < 0x4100)
|
||||
{
|
||||
data = fds.SyncRead(addr);
|
||||
}
|
||||
}
|
||||
if ((exsound_select & 0x08) != 0)
|
||||
{
|
||||
if (addr >= 0x5000 && addr <= 0x5015)
|
||||
{
|
||||
data = mmc5.SyncRead(addr);
|
||||
}
|
||||
}
|
||||
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
public struct QUEUEDATA
|
||||
{
|
||||
public int time;
|
||||
public ushort addr;
|
||||
public byte data;
|
||||
public byte reserved;
|
||||
}
|
||||
|
||||
public class QUEUE
|
||||
{
|
||||
public int rdptr;
|
||||
public int wrptr;
|
||||
public QUEUEDATA[] data = new QUEUEDATA[8192];
|
||||
}
|
||||
}
|
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: cb5a8e579d35b9a4ca7966225235265a
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e6179c4bc7e6fa744901b21b63e98aba
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -0,0 +1,472 @@
|
||||
using System;
|
||||
|
||||
namespace VirtualNes.Core
|
||||
{
|
||||
public class APU_FDS : APU_INTERFACE
|
||||
{
|
||||
FDSSOUND fds = new FDSSOUND();
|
||||
FDSSOUND fds_sync = new FDSSOUND();
|
||||
int[] output_buf = new int[8];
|
||||
int sampling_rate;
|
||||
|
||||
public APU_FDS()
|
||||
{
|
||||
fds.ZeroMemory();
|
||||
fds_sync.ZeroMemory();
|
||||
|
||||
Array.Clear(output_buf, 0, output_buf.Length);
|
||||
|
||||
sampling_rate = 22050;
|
||||
}
|
||||
|
||||
public override void Reset(float fClock, int nRate)
|
||||
{
|
||||
fds.ZeroMemory();
|
||||
fds_sync.ZeroMemory();
|
||||
|
||||
sampling_rate = 22050;
|
||||
}
|
||||
|
||||
public override void Setup(float fClock, int nRate)
|
||||
{
|
||||
sampling_rate = nRate;
|
||||
}
|
||||
|
||||
int[] tbl_writesub = { 30, 20, 15, 12 };
|
||||
|
||||
private void WriteSub(ushort addr, byte data, FDSSOUND ch, double rate)
|
||||
{
|
||||
if (addr < 0x4040 || addr > 0x40BF)
|
||||
return;
|
||||
|
||||
ch.reg[addr - 0x4040] = data;
|
||||
if (addr >= 0x4040 && addr <= 0x407F)
|
||||
{
|
||||
if (ch.wave_setup != 0)
|
||||
{
|
||||
ch.main_wavetable[addr - 0x4040] = 0x20 - (data & 0x3F);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
switch (addr)
|
||||
{
|
||||
case 0x4080: // Volume Envelope
|
||||
ch.volenv_mode = (byte)(data >> 6);
|
||||
if ((data & 0x80) != 0)
|
||||
{
|
||||
ch.volenv_gain = (byte)(data & 0x3F);
|
||||
|
||||
// 即時反映
|
||||
if (ch.main_addr == 0)
|
||||
{
|
||||
ch.now_volume = (ch.volenv_gain < 0x21) ? ch.volenv_gain : 0x20;
|
||||
}
|
||||
}
|
||||
// エンベロープ1段階の演算
|
||||
ch.volenv_decay = (byte)(data & 0x3F);
|
||||
ch.volenv_phaseacc = (double)ch.envelope_speed * (double)(ch.volenv_decay + 1) * rate / (232.0 * 960.0);
|
||||
break;
|
||||
|
||||
case 0x4082: // Main Frequency(Low)
|
||||
ch.main_frequency = (ch.main_frequency & ~0x00FF) | data;
|
||||
break;
|
||||
case 0x4083: // Main Frequency(High)
|
||||
ch.main_enable = (byte)((~data) & (1 << 7));
|
||||
ch.envelope_enable = (byte)((~data) & (1 << 6));
|
||||
if (ch.main_enable == 0)
|
||||
{
|
||||
ch.main_addr = 0;
|
||||
ch.now_volume = (ch.volenv_gain < 0x21) ? ch.volenv_gain : 0x20;
|
||||
}
|
||||
// ch.main_frequency = (ch.main_frequency&0x00FF)|(((INT)data&0x3F)<<8);
|
||||
ch.main_frequency = (ch.main_frequency & 0x00FF) | ((data & 0x0F) << 8);
|
||||
break;
|
||||
|
||||
case 0x4084: // Sweep Envelope
|
||||
ch.swpenv_mode = (byte)(data >> 6);
|
||||
if ((data & 0x80) != 0)
|
||||
{
|
||||
ch.swpenv_gain = (byte)(data & 0x3F);
|
||||
}
|
||||
// エンベロープ1段階の演算
|
||||
ch.swpenv_decay = (byte)(data & 0x3F);
|
||||
ch.swpenv_phaseacc = (double)ch.envelope_speed * (double)(ch.swpenv_decay + 1) * rate / (232.0 * 960.0);
|
||||
break;
|
||||
|
||||
case 0x4085: // Sweep Bias
|
||||
if ((data & 0x40) != 0) ch.sweep_bias = (data & 0x3f) - 0x40;
|
||||
else ch.sweep_bias = data & 0x3f;
|
||||
ch.lfo_addr = 0;
|
||||
break;
|
||||
|
||||
case 0x4086: // Effector(LFO) Frequency(Low)
|
||||
ch.lfo_frequency = (ch.lfo_frequency & (~0x00FF)) | data;
|
||||
break;
|
||||
case 0x4087: // Effector(LFO) Frequency(High)
|
||||
ch.lfo_enable = (byte)((~data & 0x80));
|
||||
ch.lfo_frequency = (ch.lfo_frequency & 0x00FF) | ((data & 0x0F) << 8);
|
||||
break;
|
||||
|
||||
case 0x4088: // Effector(LFO) wavetable
|
||||
if (ch.lfo_enable == 0)
|
||||
{
|
||||
// FIFO?
|
||||
for (byte i = 0; i < 31; i++)
|
||||
{
|
||||
ch.lfo_wavetable[i * 2 + 0] = ch.lfo_wavetable[(i + 1) * 2 + 0];
|
||||
ch.lfo_wavetable[i * 2 + 1] = ch.lfo_wavetable[(i + 1) * 2 + 1];
|
||||
}
|
||||
ch.lfo_wavetable[31 * 2 + 0] = (byte)(data & 0x07);
|
||||
ch.lfo_wavetable[31 * 2 + 1] = (byte)(data & 0x07);
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x4089: // Sound control
|
||||
{
|
||||
ch.master_volume = tbl_writesub[data & 3];
|
||||
ch.wave_setup = (byte)(data & 0x80);
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x408A: // Sound control 2
|
||||
ch.envelope_speed = data;
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override void Write(ushort addr, byte data)
|
||||
{
|
||||
WriteSub(addr, data, fds, sampling_rate);
|
||||
}
|
||||
|
||||
public override byte Read(ushort addr)
|
||||
{
|
||||
byte data = (byte)(addr >> 8);
|
||||
|
||||
if (addr >= 0x4040 && addr <= 0x407F)
|
||||
{
|
||||
data = (byte)(fds.main_wavetable[addr & 0x3F] | 0x40);
|
||||
}
|
||||
else
|
||||
if (addr == 0x4090)
|
||||
{
|
||||
data = (byte)((fds.volenv_gain & 0x3F) | 0x40);
|
||||
}
|
||||
else
|
||||
if (addr == 0x4092)
|
||||
{
|
||||
data = (byte)((fds.swpenv_gain & 0x3F) | 0x40);
|
||||
}
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
int[] tbl_process = { 0, 1, 2, 4, 0, -4, -2, -1 };
|
||||
public override int Process(int channel)
|
||||
{
|
||||
// Envelope unit
|
||||
if (fds.envelope_enable != 0 && fds.envelope_speed != 0)
|
||||
{
|
||||
// Volume envelope
|
||||
if (fds.volenv_mode < 2)
|
||||
{
|
||||
double decay = ((double)fds.envelope_speed * (double)(fds.volenv_decay + 1) * (double)sampling_rate) / (232.0 * 960.0);
|
||||
fds.volenv_phaseacc -= 1.0;
|
||||
while (fds.volenv_phaseacc < 0.0)
|
||||
{
|
||||
fds.volenv_phaseacc += decay;
|
||||
|
||||
if (fds.volenv_mode == 0)
|
||||
{
|
||||
// 減少モード
|
||||
if (fds.volenv_gain != 0)
|
||||
fds.volenv_gain--;
|
||||
}
|
||||
else
|
||||
if (fds.volenv_mode == 1)
|
||||
{
|
||||
if (fds.volenv_gain < 0x20)
|
||||
fds.volenv_gain++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Sweep envelope
|
||||
if (fds.swpenv_mode < 2)
|
||||
{
|
||||
double decay = ((double)fds.envelope_speed * (double)(fds.swpenv_decay + 1) * (double)sampling_rate) / (232.0 * 960.0);
|
||||
fds.swpenv_phaseacc -= 1.0;
|
||||
while (fds.swpenv_phaseacc < 0.0)
|
||||
{
|
||||
fds.swpenv_phaseacc += decay;
|
||||
|
||||
if (fds.swpenv_mode == 0)
|
||||
{
|
||||
// 減少モード
|
||||
if (fds.swpenv_gain != 0)
|
||||
fds.swpenv_gain--;
|
||||
}
|
||||
else
|
||||
if (fds.swpenv_mode == 1)
|
||||
{
|
||||
if (fds.swpenv_gain < 0x20)
|
||||
fds.swpenv_gain++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Effector(LFO) unit
|
||||
int sub_freq = 0;
|
||||
// if( fds.lfo_enable && fds.envelope_speed && fds.lfo_frequency ) {
|
||||
if (fds.lfo_enable != 0)
|
||||
{
|
||||
if (fds.lfo_frequency != 0)
|
||||
{
|
||||
fds.lfo_phaseacc -= (1789772.5 * (double)fds.lfo_frequency) / 65536.0;
|
||||
while (fds.lfo_phaseacc < 0.0)
|
||||
{
|
||||
fds.lfo_phaseacc += (double)sampling_rate;
|
||||
|
||||
if (fds.lfo_wavetable[fds.lfo_addr] == 4)
|
||||
fds.sweep_bias = 0;
|
||||
else
|
||||
fds.sweep_bias += tbl_process[fds.lfo_wavetable[fds.lfo_addr]];
|
||||
|
||||
fds.lfo_addr = (fds.lfo_addr + 1) & 63;
|
||||
}
|
||||
}
|
||||
|
||||
if (fds.sweep_bias > 63)
|
||||
fds.sweep_bias -= 128;
|
||||
else if (fds.sweep_bias < -64)
|
||||
fds.sweep_bias += 128;
|
||||
|
||||
int sub_multi = fds.sweep_bias * fds.swpenv_gain;
|
||||
|
||||
if ((sub_multi & 0x0F) != 0)
|
||||
{
|
||||
// 16で割り切れない場合
|
||||
sub_multi = (sub_multi / 16);
|
||||
if (fds.sweep_bias >= 0)
|
||||
sub_multi += 2; // 正の場合
|
||||
else
|
||||
sub_multi -= 1; // 負の場合
|
||||
}
|
||||
else
|
||||
{
|
||||
// 16で割り切れる場合
|
||||
sub_multi = (sub_multi / 16);
|
||||
}
|
||||
// 193を超えると-258する(-64へラップ)
|
||||
if (sub_multi > 193)
|
||||
sub_multi -= 258;
|
||||
// -64を下回ると+256する(192へラップ)
|
||||
if (sub_multi < -64)
|
||||
sub_multi += 256;
|
||||
|
||||
sub_freq = (fds.main_frequency) * sub_multi / 64;
|
||||
}
|
||||
|
||||
// Main unit
|
||||
int output = 0;
|
||||
if (fds.main_enable != 0 && fds.main_frequency != 0 && fds.wave_setup == 0)
|
||||
{
|
||||
int freq;
|
||||
int main_addr_old = fds.main_addr;
|
||||
|
||||
freq = (int)((fds.main_frequency + sub_freq) * 1789772.5 / 65536.0);
|
||||
|
||||
fds.main_addr = (fds.main_addr + freq + 64 * sampling_rate) % (64 * sampling_rate);
|
||||
|
||||
// 1周期を超えたらボリューム更新
|
||||
if (main_addr_old > fds.main_addr)
|
||||
fds.now_volume = (fds.volenv_gain < 0x21) ? fds.volenv_gain : 0x20;
|
||||
|
||||
output = fds.main_wavetable[(fds.main_addr / sampling_rate) & 0x3f] * 8 * fds.now_volume * fds.master_volume / 30;
|
||||
|
||||
if (fds.now_volume != 0)
|
||||
fds.now_freq = freq * 4;
|
||||
else
|
||||
fds.now_freq = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
fds.now_freq = 0;
|
||||
output = 0;
|
||||
}
|
||||
|
||||
// LPF
|
||||
output = (output_buf[0] * 2 + output) / 3;
|
||||
output_buf[0] = output;
|
||||
|
||||
fds.output = output;
|
||||
return fds.output;
|
||||
}
|
||||
|
||||
internal void SyncWrite(ushort addr, byte data)
|
||||
{
|
||||
WriteSub(addr, data, fds_sync, 1789772.5d);
|
||||
}
|
||||
|
||||
|
||||
|
||||
internal byte SyncRead(ushort addr)
|
||||
{
|
||||
byte data = (byte)(addr >> 8);
|
||||
|
||||
if (addr >= 0x4040 && addr <= 0x407F)
|
||||
{
|
||||
data = (byte)(fds_sync.main_wavetable[addr & 0x3F] | 0x40);
|
||||
}
|
||||
else
|
||||
if (addr == 0x4090)
|
||||
{
|
||||
data = (byte)((fds_sync.volenv_gain & 0x3F) | 0x40);
|
||||
}
|
||||
else
|
||||
if (addr == 0x4092)
|
||||
{
|
||||
data = (byte)((fds_sync.swpenv_gain & 0x3F) | 0x40);
|
||||
}
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
public override bool Sync(int cycles)
|
||||
{
|
||||
// Envelope unit
|
||||
if (fds_sync.envelope_enable != 0 && fds_sync.envelope_speed != 0)
|
||||
{
|
||||
// Volume envelope
|
||||
double decay;
|
||||
if (fds_sync.volenv_mode < 2)
|
||||
{
|
||||
decay = ((double)fds_sync.envelope_speed * (double)(fds_sync.volenv_decay + 1) * 1789772.5) / (232.0 * 960.0);
|
||||
fds_sync.volenv_phaseacc -= (double)cycles;
|
||||
while (fds_sync.volenv_phaseacc < 0.0)
|
||||
{
|
||||
fds_sync.volenv_phaseacc += decay;
|
||||
|
||||
if (fds_sync.volenv_mode == 0)
|
||||
{
|
||||
// 減少モード
|
||||
if (fds_sync.volenv_gain != 0)
|
||||
fds_sync.volenv_gain--;
|
||||
}
|
||||
else
|
||||
if (fds_sync.volenv_mode == 1)
|
||||
{
|
||||
// 増加モード
|
||||
if (fds_sync.volenv_gain < 0x20)
|
||||
fds_sync.volenv_gain++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Sweep envelope
|
||||
if (fds_sync.swpenv_mode < 2)
|
||||
{
|
||||
decay = ((double)fds_sync.envelope_speed * (double)(fds_sync.swpenv_decay + 1) * 1789772.5) / (232.0 * 960.0);
|
||||
fds_sync.swpenv_phaseacc -= (double)cycles;
|
||||
while (fds_sync.swpenv_phaseacc < 0.0)
|
||||
{
|
||||
fds_sync.swpenv_phaseacc += decay;
|
||||
|
||||
if (fds_sync.swpenv_mode == 0)
|
||||
{
|
||||
// 減少モード
|
||||
if (fds_sync.swpenv_gain != 0)
|
||||
fds_sync.swpenv_gain--;
|
||||
}
|
||||
else
|
||||
if (fds_sync.swpenv_mode == 1)
|
||||
{
|
||||
// 増加モード
|
||||
if (fds_sync.swpenv_gain < 0x20)
|
||||
fds_sync.swpenv_gain++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public override int GetFreq(int channel)
|
||||
{
|
||||
return fds.now_freq;
|
||||
}
|
||||
|
||||
private class FDSSOUND
|
||||
{
|
||||
public byte[] reg = new byte[0x80];
|
||||
public byte volenv_mode; // Volume Envelope
|
||||
public byte volenv_gain;
|
||||
public byte volenv_decay;
|
||||
public double volenv_phaseacc;
|
||||
public byte swpenv_mode; // Sweep Envelope
|
||||
public byte swpenv_gain;
|
||||
public byte swpenv_decay;
|
||||
public double swpenv_phaseacc;
|
||||
// For envelope unit
|
||||
public byte envelope_enable; // $4083 bit6
|
||||
public byte envelope_speed; // $408A
|
||||
// For $4089
|
||||
public byte wave_setup; // bit7
|
||||
public int master_volume; // bit1-0
|
||||
// For Main unit
|
||||
public int[] main_wavetable = new int[64];
|
||||
public byte main_enable;
|
||||
public int main_frequency;
|
||||
public int main_addr;
|
||||
// For Effector(LFO) unit
|
||||
public byte[] lfo_wavetable = new byte[64];
|
||||
public byte lfo_enable; // 0:Enable 1:Wavetable setup
|
||||
public int lfo_frequency;
|
||||
public int lfo_addr;
|
||||
public double lfo_phaseacc;
|
||||
// For Sweep unit
|
||||
public int sweep_bias;
|
||||
// Misc
|
||||
public int now_volume;
|
||||
public int now_freq;
|
||||
public int output;
|
||||
|
||||
public void ZeroMemory()
|
||||
{
|
||||
Array.Clear(reg, 0, reg.Length);
|
||||
volenv_mode = 0;
|
||||
volenv_gain = 0;
|
||||
volenv_decay = 0;
|
||||
volenv_phaseacc = 0.0;
|
||||
swpenv_mode = 0;
|
||||
swpenv_gain = 0;
|
||||
swpenv_decay = 0;
|
||||
swpenv_phaseacc = 0.0;
|
||||
envelope_enable = 0;
|
||||
envelope_speed = 0;
|
||||
wave_setup = 0;
|
||||
master_volume = 0;
|
||||
Array.Clear(main_wavetable, 0, main_wavetable.Length);
|
||||
main_enable = 0;
|
||||
main_frequency = 0;
|
||||
main_addr = 0;
|
||||
Array.Clear(lfo_wavetable, 0, lfo_wavetable.Length);
|
||||
lfo_enable = 0;
|
||||
lfo_frequency = 0;
|
||||
lfo_addr = 0;
|
||||
lfo_phaseacc = 0.0;
|
||||
sweep_bias = 0;
|
||||
now_volume = 0;
|
||||
now_freq = 0;
|
||||
output = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5e16912525198924a860e53ab4ef0c81
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -0,0 +1,28 @@
|
||||
using System;
|
||||
|
||||
namespace VirtualNes.Core
|
||||
{
|
||||
public class APU_FME7 : APU_INTERFACE
|
||||
{
|
||||
public override void Reset(float fClock, int nRate)
|
||||
{
|
||||
//todo : 实现
|
||||
}
|
||||
|
||||
public override void Setup(float fClock, int nRate)
|
||||
{
|
||||
//todo : 实现
|
||||
}
|
||||
|
||||
public override void Write(ushort addr, byte data)
|
||||
{
|
||||
//todo : 实现
|
||||
}
|
||||
|
||||
public override int Process(int channel)
|
||||
{
|
||||
//todo : 实现
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 03e0258857a7134438a497aec27ea607
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -0,0 +1,36 @@
|
||||
namespace VirtualNes.Core
|
||||
{
|
||||
public abstract class APU_INTERFACE
|
||||
{
|
||||
public const float APU_CLOCK = 1789772.5f;
|
||||
|
||||
public virtual void Dispose() { }
|
||||
|
||||
public abstract void Reset(float fClock, int nRate);
|
||||
public abstract void Setup(float fClock, int nRate);
|
||||
public abstract void Write(ushort addr, byte data);
|
||||
public abstract int Process(int channel);
|
||||
public virtual byte Read(ushort addr)
|
||||
{
|
||||
return (byte)(addr >> 8);
|
||||
}
|
||||
public virtual void WriteSync(ushort addr, byte data) { }
|
||||
public virtual byte ReadSync(ushort addr) { return 0; }
|
||||
public virtual void VSync() { }
|
||||
public virtual bool Sync(int cycles) { return false; }
|
||||
public virtual int GetFreq(int channel) { return 0; }
|
||||
public virtual int GetStateSize() { return 0; }
|
||||
public virtual void SaveState(byte[] p) { }
|
||||
public virtual void LoadState(byte[] p) { }
|
||||
|
||||
public static int INT2FIX(int x)
|
||||
{
|
||||
return x << 16;
|
||||
}
|
||||
|
||||
public static int FIX2INT(int x)
|
||||
{
|
||||
return x >> 16;
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: cc44be42b66d6ac4aade437e81960274
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d5f443ad7d5ef1d4394c7fe540f2e3e4
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -0,0 +1,415 @@
|
||||
//using Codice.CM.Client.Differences;
|
||||
using System;
|
||||
|
||||
namespace VirtualNes.Core
|
||||
{
|
||||
public class APU_MMC5 : APU_INTERFACE
|
||||
{
|
||||
public const int RECTANGLE_VOL_SHIFT = 8;
|
||||
public const int DAOUT_VOL_SHIFT = 6;
|
||||
|
||||
SYNCRECTANGLE sch0 = new SYNCRECTANGLE();
|
||||
SYNCRECTANGLE sch1 = new SYNCRECTANGLE();
|
||||
RECTANGLE ch0 = new RECTANGLE();
|
||||
RECTANGLE ch1 = new RECTANGLE();
|
||||
|
||||
byte reg5010;
|
||||
byte reg5011;
|
||||
byte reg5015;
|
||||
byte sync_reg5015;
|
||||
int FrameCycle;
|
||||
float cpu_clock;
|
||||
int cycle_rate;
|
||||
|
||||
// Tables
|
||||
static int[] vbl_length = new int[32];
|
||||
static int[] duty_lut = new int[4];
|
||||
|
||||
static int[] decay_lut = new int[16];
|
||||
static int[] vbl_lut = new int[32];
|
||||
|
||||
public APU_MMC5()
|
||||
{
|
||||
// 仮設定
|
||||
Reset(APU_INTERFACE.APU_CLOCK, 22050);
|
||||
}
|
||||
|
||||
public override void Reset(float fClock, int nRate)
|
||||
{
|
||||
sch0.ZeroMemory();
|
||||
sch1.ZeroMemory();
|
||||
|
||||
reg5010 = reg5011 = reg5015 = 0;
|
||||
|
||||
sync_reg5015 = 0;
|
||||
FrameCycle = 0;
|
||||
|
||||
Setup(fClock, nRate);
|
||||
|
||||
for (ushort addr = 0x5000; addr <= 0x5015; addr++)
|
||||
{
|
||||
Write(addr, 0);
|
||||
}
|
||||
}
|
||||
|
||||
public override void Setup(float fClock, int nRate)
|
||||
{
|
||||
cpu_clock = fClock;
|
||||
cycle_rate = (int)(fClock * 65536.0f / nRate);
|
||||
|
||||
// Create Tables
|
||||
int i;
|
||||
int samples = (int)(nRate / 60.0f);
|
||||
for (i = 0; i < 16; i++)
|
||||
decay_lut[i] = (i + 1) * samples * 5;
|
||||
for (i = 0; i < 32; i++)
|
||||
vbl_lut[i] = vbl_length[i] * samples * 5;
|
||||
}
|
||||
|
||||
public override void Write(ushort addr, byte data)
|
||||
{
|
||||
switch (addr)
|
||||
{
|
||||
// MMC5 CH0 rectangle
|
||||
case 0x5000:
|
||||
ch0.reg[0] = data;
|
||||
ch0.volume = (byte)(data & 0x0F);
|
||||
ch0.holdnote = (byte)(data & 0x20);
|
||||
ch0.fixed_envelope = (byte)(data & 0x10);
|
||||
ch0.env_decay = decay_lut[data & 0x0F];
|
||||
ch0.duty_flip = duty_lut[data >> 6];
|
||||
break;
|
||||
case 0x5001:
|
||||
ch0.reg[1] = data;
|
||||
break;
|
||||
case 0x5002:
|
||||
ch0.reg[2] = data;
|
||||
ch0.freq = INT2FIX(((ch0.reg[3] & 0x07) << 8) + data + 1);
|
||||
break;
|
||||
case 0x5003:
|
||||
ch0.reg[3] = data;
|
||||
ch0.vbl_length = vbl_lut[data >> 3];
|
||||
ch0.env_vol = 0;
|
||||
ch0.freq = INT2FIX(((data & 0x07) << 8) + ch0.reg[2] + 1);
|
||||
if ((reg5015 & 0x01) != 0)
|
||||
ch0.enable = 0xFF;
|
||||
break;
|
||||
// MMC5 CH1 rectangle
|
||||
case 0x5004:
|
||||
ch1.reg[0] = data;
|
||||
ch1.volume = (byte)(data & 0x0F);
|
||||
ch1.holdnote = (byte)(data & 0x20);
|
||||
ch1.fixed_envelope = (byte)(data & 0x10);
|
||||
ch1.env_decay = decay_lut[data & 0x0F];
|
||||
ch1.duty_flip = duty_lut[data >> 6];
|
||||
break;
|
||||
case 0x5005:
|
||||
ch1.reg[1] = data;
|
||||
break;
|
||||
case 0x5006:
|
||||
ch1.reg[2] = data;
|
||||
ch1.freq = INT2FIX(((ch1.reg[3] & 0x07) << 8) + data + 1);
|
||||
break;
|
||||
case 0x5007:
|
||||
ch1.reg[3] = data;
|
||||
ch1.vbl_length = vbl_lut[data >> 3];
|
||||
ch1.env_vol = 0;
|
||||
ch1.freq = INT2FIX(((data & 0x07) << 8) + ch1.reg[2] + 1);
|
||||
if ((reg5015 & 0x02) != 0)
|
||||
ch1.enable = 0xFF;
|
||||
break;
|
||||
case 0x5010:
|
||||
reg5010 = data;
|
||||
break;
|
||||
case 0x5011:
|
||||
reg5011 = data;
|
||||
break;
|
||||
case 0x5012:
|
||||
case 0x5013:
|
||||
case 0x5014:
|
||||
break;
|
||||
case 0x5015:
|
||||
reg5015 = data;
|
||||
if ((reg5015 & 0x01) != 0)
|
||||
{
|
||||
ch0.enable = 0xFF;
|
||||
}
|
||||
else
|
||||
{
|
||||
ch0.enable = 0;
|
||||
ch0.vbl_length = 0;
|
||||
}
|
||||
if ((reg5015 & 0x02) != 0)
|
||||
{
|
||||
ch1.enable = 0xFF;
|
||||
}
|
||||
else
|
||||
{
|
||||
ch1.enable = 0;
|
||||
ch1.vbl_length = 0;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
internal void SyncWrite(ushort addr, byte data)
|
||||
{
|
||||
switch (addr)
|
||||
{
|
||||
// MMC5 CH0 rectangle
|
||||
case 0x5000:
|
||||
sch0.reg[0] = data;
|
||||
sch0.holdnote = (byte)(data & 0x20);
|
||||
break;
|
||||
case 0x5001:
|
||||
case 0x5002:
|
||||
sch0.reg[addr & 3] = data;
|
||||
break;
|
||||
case 0x5003:
|
||||
sch0.reg[3] = data;
|
||||
sch0.vbl_length = vbl_length[data >> 3];
|
||||
if ((sync_reg5015 & 0x01) != 0)
|
||||
sch0.enable = 0xFF;
|
||||
break;
|
||||
// MMC5 CH1 rectangle
|
||||
case 0x5004:
|
||||
sch1.reg[0] = data;
|
||||
sch1.holdnote = (byte)(data & 0x20);
|
||||
break;
|
||||
case 0x5005:
|
||||
case 0x5006:
|
||||
sch1.reg[addr & 3] = data;
|
||||
break;
|
||||
case 0x5007:
|
||||
sch1.reg[3] = data;
|
||||
sch1.vbl_length = vbl_length[data >> 3];
|
||||
if ((sync_reg5015 & 0x02) != 0)
|
||||
sch1.enable = 0xFF;
|
||||
break;
|
||||
case 0x5010:
|
||||
case 0x5011:
|
||||
case 0x5012:
|
||||
case 0x5013:
|
||||
case 0x5014:
|
||||
break;
|
||||
case 0x5015:
|
||||
sync_reg5015 = data;
|
||||
if ((sync_reg5015 & 0x01) != 0)
|
||||
{
|
||||
sch0.enable = 0xFF;
|
||||
}
|
||||
else
|
||||
{
|
||||
sch0.enable = 0;
|
||||
sch0.vbl_length = 0;
|
||||
}
|
||||
if ((sync_reg5015 & 0x02) != 0)
|
||||
{
|
||||
sch1.enable = 0xFF;
|
||||
}
|
||||
else
|
||||
{
|
||||
sch1.enable = 0;
|
||||
sch1.vbl_length = 0;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
internal byte SyncRead(ushort addr)
|
||||
{
|
||||
byte data = 0;
|
||||
|
||||
if (addr == 0x5015)
|
||||
{
|
||||
if ((sch0.enable != 0) && sch0.vbl_length > 0) data |= (1 << 0);
|
||||
if ((sch1.enable != 0) && sch1.vbl_length > 0) data |= (1 << 1);
|
||||
}
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
public override bool Sync(int cycles)
|
||||
{
|
||||
FrameCycle += cycles;
|
||||
if (FrameCycle >= 7457 * 5 / 2)
|
||||
{
|
||||
FrameCycle -= 7457 * 5 / 2;
|
||||
|
||||
if (sch0.enable != 0 && sch0.holdnote == 0)
|
||||
{
|
||||
if ((sch0.vbl_length) != 0)
|
||||
{
|
||||
sch0.vbl_length--;
|
||||
}
|
||||
}
|
||||
if (sch1.enable != 0 && sch1.holdnote == 0)
|
||||
{
|
||||
if ((sch1.vbl_length) != 0)
|
||||
{
|
||||
sch1.vbl_length--;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public override int Process(int channel)
|
||||
{
|
||||
switch (channel)
|
||||
{
|
||||
case 0:
|
||||
return RectangleRender(ch0);
|
||||
case 1:
|
||||
return RectangleRender(ch1);
|
||||
case 2:
|
||||
return reg5011 << DAOUT_VOL_SHIFT;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
public override int GetFreq(int channel)
|
||||
{
|
||||
if (channel == 0 || channel == 1)
|
||||
{
|
||||
RECTANGLE ch = null;
|
||||
if (channel == 0) ch = ch0;
|
||||
else ch = ch1;
|
||||
|
||||
if (ch.enable == 0 || ch.vbl_length <= 0)
|
||||
return 0;
|
||||
if (ch.freq < INT2FIX(8))
|
||||
return 0;
|
||||
if (ch.fixed_envelope != 0)
|
||||
{
|
||||
if (ch.volume == 0)
|
||||
return 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
if ((0x0F - ch.env_vol) == 0)
|
||||
return 0;
|
||||
}
|
||||
|
||||
return (int)(256.0f * cpu_clock / (FIX2INT(ch.freq) * 16.0f));
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
private int RectangleRender(RECTANGLE ch)
|
||||
{
|
||||
if (ch.enable == 0 || ch.vbl_length <= 0)
|
||||
return 0;
|
||||
|
||||
// vbl length counter
|
||||
if (ch.holdnote == 0)
|
||||
ch.vbl_length -= 5;
|
||||
|
||||
// envelope unit
|
||||
ch.env_phase -= 5 * 4;
|
||||
while (ch.env_phase < 0)
|
||||
{
|
||||
ch.env_phase += ch.env_decay;
|
||||
if ((ch.holdnote) != 0)
|
||||
ch.env_vol = (byte)((ch.env_vol + 1) & 0x0F);
|
||||
else if (ch.env_vol < 0x0F)
|
||||
ch.env_vol++;
|
||||
}
|
||||
|
||||
if (ch.freq < INT2FIX(8))
|
||||
return 0;
|
||||
|
||||
int volume;
|
||||
if ((ch.fixed_envelope) != 0)
|
||||
volume = ch.volume;
|
||||
else
|
||||
volume = (0x0F - ch.env_vol);
|
||||
|
||||
int output = volume << RECTANGLE_VOL_SHIFT;
|
||||
|
||||
ch.phaseacc -= cycle_rate;
|
||||
if (ch.phaseacc >= 0)
|
||||
{
|
||||
if (ch.adder < ch.duty_flip)
|
||||
ch.output_vol = output;
|
||||
else
|
||||
ch.output_vol = -output;
|
||||
return ch.output_vol;
|
||||
}
|
||||
|
||||
if (ch.freq > cycle_rate)
|
||||
{
|
||||
ch.phaseacc += ch.freq;
|
||||
ch.adder = (ch.adder + 1) & 0x0F;
|
||||
if (ch.adder < ch.duty_flip)
|
||||
ch.output_vol = output;
|
||||
else
|
||||
ch.output_vol = -output;
|
||||
}
|
||||
else
|
||||
{
|
||||
// 加重平均
|
||||
int num_times, total;
|
||||
num_times = total = 0;
|
||||
while (ch.phaseacc < 0)
|
||||
{
|
||||
ch.phaseacc += ch.freq;
|
||||
ch.adder = (ch.adder + 1) & 0x0F;
|
||||
if (ch.adder < ch.duty_flip)
|
||||
total += output;
|
||||
else
|
||||
total -= output;
|
||||
num_times++;
|
||||
}
|
||||
ch.output_vol = total / num_times;
|
||||
}
|
||||
|
||||
return ch.output_vol;
|
||||
}
|
||||
|
||||
public class SYNCRECTANGLE
|
||||
{
|
||||
// For sync
|
||||
public byte[] reg = new byte[4];
|
||||
public byte enable;
|
||||
public byte holdnote;
|
||||
public byte[] dummy = new byte[2];
|
||||
public int vbl_length;
|
||||
|
||||
public void ZeroMemory()
|
||||
{
|
||||
Array.Clear(reg, 0, reg.Length);
|
||||
enable = 0;
|
||||
holdnote = 0;
|
||||
Array.Clear(dummy, 0, dummy.Length);
|
||||
vbl_length = 0;
|
||||
}
|
||||
}
|
||||
|
||||
public class RECTANGLE
|
||||
{
|
||||
public byte[] reg = new byte[4];
|
||||
public byte enable;
|
||||
|
||||
public int vbl_length;
|
||||
|
||||
public int phaseacc;
|
||||
public int freq;
|
||||
|
||||
public int output_vol;
|
||||
public byte fixed_envelope;
|
||||
public byte holdnote;
|
||||
public byte volume;
|
||||
|
||||
public byte env_vol;
|
||||
public int env_phase;
|
||||
public int env_decay;
|
||||
|
||||
public int adder;
|
||||
public int duty_flip;
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 15b983a12234c3c47baefb9fa2751351
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -0,0 +1,245 @@
|
||||
using RECTANGLE = VirtualNes.Core.APU_VRC6.RECTANGLE;
|
||||
using SAWTOOTH = VirtualNes.Core.APU_VRC6.SAWTOOTH;
|
||||
|
||||
namespace VirtualNes.Core
|
||||
{
|
||||
public class APU_N106 : APU_INTERFACE
|
||||
{
|
||||
RECTANGLE ch0 = new RECTANGLE();
|
||||
RECTANGLE ch1 = new RECTANGLE();
|
||||
SAWTOOTH ch2 = new SAWTOOTH();
|
||||
float cpu_clock;
|
||||
int cycle_rate;
|
||||
|
||||
public APU_N106()
|
||||
{
|
||||
Reset(APU_CLOCK, 22050);
|
||||
}
|
||||
|
||||
public override void Reset(float fClock, int nRate)
|
||||
{
|
||||
ch0.ZeroMemory();
|
||||
ch1.ZeroMemory();
|
||||
ch2.ZeroMemory();
|
||||
|
||||
Setup(fClock, nRate);
|
||||
}
|
||||
|
||||
public override void Setup(float fClock, int nRate)
|
||||
{
|
||||
cpu_clock = fClock;
|
||||
cycle_rate = (int)(fClock * 65536.0f / nRate);
|
||||
}
|
||||
|
||||
public override void Write(ushort addr, byte data)
|
||||
{
|
||||
switch (addr)
|
||||
{
|
||||
// VRC6 CH0 rectangle
|
||||
case 0x9000:
|
||||
ch0.reg[0] = data;
|
||||
ch0.gate = (byte)(data & 0x80);
|
||||
ch0.volume = (byte)(data & 0x0F);
|
||||
ch0.duty_pos = (byte)((data >> 4) & 0x07);
|
||||
break;
|
||||
case 0x9001:
|
||||
ch0.reg[1] = data;
|
||||
ch0.freq = INT2FIX((((ch0.reg[2] & 0x0F) << 8) | data) + 1);
|
||||
break;
|
||||
case 0x9002:
|
||||
ch0.reg[2] = data;
|
||||
ch0.enable = (byte)(data & 0x80);
|
||||
ch0.freq = INT2FIX((((data & 0x0F) << 8) | ch0.reg[1]) + 1);
|
||||
break;
|
||||
// VRC6 CH1 rectangle
|
||||
case 0xA000:
|
||||
ch1.reg[0] = data;
|
||||
ch1.gate = (byte)(data & 0x80);
|
||||
ch1.volume = (byte)(data & 0x0F);
|
||||
ch1.duty_pos = (byte)((data >> 4) & 0x07);
|
||||
break;
|
||||
case 0xA001:
|
||||
ch1.reg[1] = data;
|
||||
ch1.freq = INT2FIX((((ch1.reg[2] & 0x0F) << 8) | data) + 1);
|
||||
break;
|
||||
case 0xA002:
|
||||
ch1.reg[2] = data;
|
||||
ch1.enable = (byte)(data & 0x80);
|
||||
ch1.freq = INT2FIX((((data & 0x0F) << 8) | ch1.reg[1]) + 1);
|
||||
break;
|
||||
// VRC6 CH2 sawtooth
|
||||
case 0xB000:
|
||||
ch2.reg[1] = data;
|
||||
ch2.phaseaccum = (byte)(data & 0x3F);
|
||||
break;
|
||||
case 0xB001:
|
||||
ch2.reg[1] = data;
|
||||
ch2.freq = INT2FIX((((ch2.reg[2] & 0x0F) << 8) | data) + 1);
|
||||
break;
|
||||
case 0xB002:
|
||||
ch2.reg[2] = data;
|
||||
ch2.enable = (byte)(data & 0x80);
|
||||
ch2.freq = INT2FIX((((data & 0x0F) << 8) | ch2.reg[1]) + 1);
|
||||
// ch2.adder = 0; // クリアするとノイズの原因になる
|
||||
// ch2.accum = 0; // クリアするとノイズの原因になる
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
public override int Process(int channel)
|
||||
{
|
||||
switch (channel)
|
||||
{
|
||||
case 0:
|
||||
return RectangleRender(ch0);
|
||||
case 1:
|
||||
return RectangleRender(ch1);
|
||||
case 2:
|
||||
return SawtoothRender(ch2);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
public override int GetFreq(int channel)
|
||||
{
|
||||
if (channel == 0 || channel == 1)
|
||||
{
|
||||
RECTANGLE ch;
|
||||
if (channel == 0) ch = ch0;
|
||||
else ch = ch1;
|
||||
if (ch.enable == 0 || ch.gate != 0 || ch.volume == 0)
|
||||
return 0;
|
||||
if (ch.freq < INT2FIX(8))
|
||||
return 0;
|
||||
return (int)((256.0f * cpu_clock / (FIX2INT(ch.freq) * 16.0f)));
|
||||
}
|
||||
if (channel == 2)
|
||||
{
|
||||
SAWTOOTH ch = ch2;
|
||||
if (ch.enable == 0 || ch.phaseaccum == 0)
|
||||
return 0;
|
||||
if (ch.freq < INT2FIX(8))
|
||||
return 0;
|
||||
return (int)(256.0f * cpu_clock / (FIX2INT(ch.freq) * 14.0f));
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int RectangleRender(RECTANGLE ch)
|
||||
{
|
||||
// Enable?
|
||||
if (ch.enable == 0)
|
||||
{
|
||||
ch.output_vol = 0;
|
||||
ch.adder = 0;
|
||||
return ch.output_vol;
|
||||
}
|
||||
|
||||
// Digitized output
|
||||
if (ch.gate != 0)
|
||||
{
|
||||
ch.output_vol = ch.volume << APU_VRC6.RECTANGLE_VOL_SHIFT;
|
||||
return ch.output_vol;
|
||||
}
|
||||
|
||||
// 一定以上の周波数は処理しない(無駄)
|
||||
if (ch.freq < INT2FIX(8))
|
||||
{
|
||||
ch.output_vol = 0;
|
||||
return ch.output_vol;
|
||||
}
|
||||
|
||||
ch.phaseacc -= cycle_rate;
|
||||
if (ch.phaseacc >= 0)
|
||||
return ch.output_vol;
|
||||
|
||||
int output = ch.volume << APU_VRC6.RECTANGLE_VOL_SHIFT;
|
||||
|
||||
if (ch.freq > cycle_rate)
|
||||
{
|
||||
// add 1 step
|
||||
ch.phaseacc += ch.freq;
|
||||
ch.adder = (byte)((ch.adder + 1) & 0x0F);
|
||||
if (ch.adder <= ch.duty_pos)
|
||||
ch.output_vol = output;
|
||||
else
|
||||
ch.output_vol = -output;
|
||||
}
|
||||
else
|
||||
{
|
||||
// average calculate
|
||||
int num_times, total;
|
||||
num_times = total = 0;
|
||||
while (ch.phaseacc < 0)
|
||||
{
|
||||
ch.phaseacc += ch.freq;
|
||||
ch.adder = (byte)((ch.adder + 1) & 0x0F);
|
||||
if (ch.adder <= ch.duty_pos)
|
||||
total += output;
|
||||
else
|
||||
total += -output;
|
||||
num_times++;
|
||||
}
|
||||
ch.output_vol = total / num_times;
|
||||
}
|
||||
|
||||
return ch.output_vol;
|
||||
}
|
||||
|
||||
int SawtoothRender(SAWTOOTH ch)
|
||||
{
|
||||
// Digitized output
|
||||
if (ch.enable == 0)
|
||||
{
|
||||
ch.output_vol = 0;
|
||||
return ch.output_vol;
|
||||
}
|
||||
|
||||
// 一定以上の周波数は処理しない(無駄)
|
||||
if (ch.freq < INT2FIX(9))
|
||||
{
|
||||
return ch.output_vol;
|
||||
}
|
||||
|
||||
ch.phaseacc -= cycle_rate / 2;
|
||||
if (ch.phaseacc >= 0)
|
||||
return ch.output_vol;
|
||||
|
||||
if (ch.freq > cycle_rate / 2)
|
||||
{
|
||||
// add 1 step
|
||||
ch.phaseacc += ch.freq;
|
||||
if (++ch.adder >= 7)
|
||||
{
|
||||
ch.adder = 0;
|
||||
ch.accum = 0;
|
||||
}
|
||||
ch.accum += ch.phaseaccum;
|
||||
ch.output_vol = ch.accum << APU_VRC6.SAWTOOTH_VOL_SHIFT;
|
||||
}
|
||||
else
|
||||
{
|
||||
// average calculate
|
||||
int num_times, total;
|
||||
num_times = total = 0;
|
||||
while (ch.phaseacc < 0)
|
||||
{
|
||||
ch.phaseacc += ch.freq;
|
||||
if (++ch.adder >= 7)
|
||||
{
|
||||
ch.adder = 0;
|
||||
ch.accum = 0;
|
||||
}
|
||||
ch.accum += ch.phaseaccum;
|
||||
total += ch.accum << APU_VRC6.SAWTOOTH_VOL_SHIFT;
|
||||
num_times++;
|
||||
}
|
||||
ch.output_vol = (total / num_times);
|
||||
}
|
||||
|
||||
return ch.output_vol;
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6a47ed257e942d4478215338d8fe4c35
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user