dev_4VirtualNes #23
@ -123,51 +123,6 @@ NavMeshSettings:
|
|||||||
debug:
|
debug:
|
||||||
m_Flags: 0
|
m_Flags: 0
|
||||||
m_NavMeshData: {fileID: 0}
|
m_NavMeshData: {fileID: 0}
|
||||||
--- !u!1 &149545946
|
|
||||||
GameObject:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
serializedVersion: 6
|
|
||||||
m_Component:
|
|
||||||
- component: {fileID: 149545948}
|
|
||||||
- component: {fileID: 149545947}
|
|
||||||
m_Layer: 0
|
|
||||||
m_Name: NesEmulator
|
|
||||||
m_TagString: Untagged
|
|
||||||
m_Icon: {fileID: 0}
|
|
||||||
m_NavMeshLayer: 0
|
|
||||||
m_StaticEditorFlags: 0
|
|
||||||
m_IsActive: 1
|
|
||||||
--- !u!114 &149545947
|
|
||||||
MonoBehaviour:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 149545946}
|
|
||||||
m_Enabled: 1
|
|
||||||
m_EditorHideFlags: 0
|
|
||||||
m_Script: {fileID: 11500000, guid: 39557e19783acee499ace6c68549e8f8, type: 3}
|
|
||||||
m_Name:
|
|
||||||
m_EditorClassIdentifier:
|
|
||||||
VideoProvider: {fileID: 1295252151}
|
|
||||||
--- !u!4 &149545948
|
|
||||||
Transform:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 149545946}
|
|
||||||
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: 1295252150}
|
|
||||||
m_Father: {fileID: 0}
|
|
||||||
m_RootOrder: 3
|
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
|
||||||
--- !u!1 &708549044
|
--- !u!1 &708549044
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
@ -261,78 +216,6 @@ Transform:
|
|||||||
m_Father: {fileID: 0}
|
m_Father: {fileID: 0}
|
||||||
m_RootOrder: 0
|
m_RootOrder: 0
|
||||||
m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0}
|
m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0}
|
||||||
--- !u!1 &861747459
|
|
||||||
GameObject:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
serializedVersion: 6
|
|
||||||
m_Component:
|
|
||||||
- component: {fileID: 861747460}
|
|
||||||
- component: {fileID: 861747462}
|
|
||||||
- component: {fileID: 861747461}
|
|
||||||
m_Layer: 5
|
|
||||||
m_Name: RawImage
|
|
||||||
m_TagString: Untagged
|
|
||||||
m_Icon: {fileID: 0}
|
|
||||||
m_NavMeshLayer: 0
|
|
||||||
m_StaticEditorFlags: 0
|
|
||||||
m_IsActive: 1
|
|
||||||
--- !u!224 &861747460
|
|
||||||
RectTransform:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 861747459}
|
|
||||||
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: 1727033528}
|
|
||||||
m_RootOrder: 0
|
|
||||||
m_LocalEulerAnglesHint: {x: 0, 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: 100, y: 100}
|
|
||||||
m_Pivot: {x: 0.5, y: 0.5}
|
|
||||||
--- !u!114 &861747461
|
|
||||||
MonoBehaviour:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 861747459}
|
|
||||||
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!222 &861747462
|
|
||||||
CanvasRenderer:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 861747459}
|
|
||||||
m_CullTransparentMesh: 1
|
|
||||||
--- !u!1 &1232273651
|
--- !u!1 &1232273651
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
@ -416,51 +299,6 @@ Transform:
|
|||||||
m_Father: {fileID: 0}
|
m_Father: {fileID: 0}
|
||||||
m_RootOrder: 2
|
m_RootOrder: 2
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
--- !u!1 &1295252149
|
|
||||||
GameObject:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
serializedVersion: 6
|
|
||||||
m_Component:
|
|
||||||
- component: {fileID: 1295252150}
|
|
||||||
- component: {fileID: 1295252151}
|
|
||||||
m_Layer: 0
|
|
||||||
m_Name: VideoProvider
|
|
||||||
m_TagString: Untagged
|
|
||||||
m_Icon: {fileID: 0}
|
|
||||||
m_NavMeshLayer: 0
|
|
||||||
m_StaticEditorFlags: 0
|
|
||||||
m_IsActive: 1
|
|
||||||
--- !u!4 &1295252150
|
|
||||||
Transform:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 1295252149}
|
|
||||||
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: 1727033528}
|
|
||||||
m_Father: {fileID: 149545948}
|
|
||||||
m_RootOrder: 0
|
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
|
||||||
--- !u!114 &1295252151
|
|
||||||
MonoBehaviour:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 1295252149}
|
|
||||||
m_Enabled: 1
|
|
||||||
m_EditorHideFlags: 0
|
|
||||||
m_Script: {fileID: 11500000, guid: 83fbe375412d1af4482ae76e81c1dda2, type: 3}
|
|
||||||
m_Name:
|
|
||||||
m_EditorClassIdentifier:
|
|
||||||
Image: {fileID: 861747461}
|
|
||||||
--- !u!1 &1359344831
|
--- !u!1 &1359344831
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
@ -527,103 +365,60 @@ Transform:
|
|||||||
m_Father: {fileID: 0}
|
m_Father: {fileID: 0}
|
||||||
m_RootOrder: 1
|
m_RootOrder: 1
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
--- !u!1 &1727033527
|
--- !u!1001 &4232056520998800727
|
||||||
GameObject:
|
PrefabInstance:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
serializedVersion: 6
|
|
||||||
m_Component:
|
|
||||||
- component: {fileID: 1727033528}
|
|
||||||
- component: {fileID: 1727033531}
|
|
||||||
- component: {fileID: 1727033530}
|
|
||||||
- component: {fileID: 1727033529}
|
|
||||||
m_Layer: 5
|
|
||||||
m_Name: Canvas
|
|
||||||
m_TagString: Untagged
|
|
||||||
m_Icon: {fileID: 0}
|
|
||||||
m_NavMeshLayer: 0
|
|
||||||
m_StaticEditorFlags: 0
|
|
||||||
m_IsActive: 1
|
|
||||||
--- !u!224 &1727033528
|
|
||||||
RectTransform:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 1727033527}
|
|
||||||
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: 861747460}
|
|
||||||
m_Father: {fileID: 1295252150}
|
|
||||||
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!114 &1727033529
|
|
||||||
MonoBehaviour:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 1727033527}
|
|
||||||
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
|
serializedVersion: 2
|
||||||
m_Bits: 4294967295
|
m_Modification:
|
||||||
--- !u!114 &1727033530
|
m_TransformParent: {fileID: 0}
|
||||||
MonoBehaviour:
|
m_Modifications:
|
||||||
m_ObjectHideFlags: 0
|
- target: {fileID: 4232056521131536011, guid: f8bea3f8aa351bb46ada33b2274729ea, type: 3}
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
propertyPath: m_RootOrder
|
||||||
m_PrefabInstance: {fileID: 0}
|
value: 3
|
||||||
m_PrefabAsset: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
m_GameObject: {fileID: 1727033527}
|
- target: {fileID: 4232056521131536011, guid: f8bea3f8aa351bb46ada33b2274729ea, type: 3}
|
||||||
m_Enabled: 1
|
propertyPath: m_LocalPosition.x
|
||||||
m_EditorHideFlags: 0
|
value: 0
|
||||||
m_Script: {fileID: 11500000, guid: 0cd44c1031e13a943bb63640046fad76, type: 3}
|
objectReference: {fileID: 0}
|
||||||
m_Name:
|
- target: {fileID: 4232056521131536011, guid: f8bea3f8aa351bb46ada33b2274729ea, type: 3}
|
||||||
m_EditorClassIdentifier:
|
propertyPath: m_LocalPosition.y
|
||||||
m_UiScaleMode: 0
|
value: 0
|
||||||
m_ReferencePixelsPerUnit: 100
|
objectReference: {fileID: 0}
|
||||||
m_ScaleFactor: 1
|
- target: {fileID: 4232056521131536011, guid: f8bea3f8aa351bb46ada33b2274729ea, type: 3}
|
||||||
m_ReferenceResolution: {x: 800, y: 600}
|
propertyPath: m_LocalPosition.z
|
||||||
m_ScreenMatchMode: 0
|
value: 0
|
||||||
m_MatchWidthOrHeight: 0
|
objectReference: {fileID: 0}
|
||||||
m_PhysicalUnit: 3
|
- target: {fileID: 4232056521131536011, guid: f8bea3f8aa351bb46ada33b2274729ea, type: 3}
|
||||||
m_FallbackScreenDPI: 96
|
propertyPath: m_LocalRotation.w
|
||||||
m_DefaultSpriteDPI: 96
|
value: 1
|
||||||
m_DynamicPixelsPerUnit: 1
|
objectReference: {fileID: 0}
|
||||||
m_PresetInfoIsWorld: 0
|
- target: {fileID: 4232056521131536011, guid: f8bea3f8aa351bb46ada33b2274729ea, type: 3}
|
||||||
--- !u!223 &1727033531
|
propertyPath: m_LocalRotation.x
|
||||||
Canvas:
|
value: 0
|
||||||
m_ObjectHideFlags: 0
|
objectReference: {fileID: 0}
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
- target: {fileID: 4232056521131536011, guid: f8bea3f8aa351bb46ada33b2274729ea, type: 3}
|
||||||
m_PrefabInstance: {fileID: 0}
|
propertyPath: m_LocalRotation.y
|
||||||
m_PrefabAsset: {fileID: 0}
|
value: 0
|
||||||
m_GameObject: {fileID: 1727033527}
|
objectReference: {fileID: 0}
|
||||||
m_Enabled: 1
|
- target: {fileID: 4232056521131536011, guid: f8bea3f8aa351bb46ada33b2274729ea, type: 3}
|
||||||
serializedVersion: 3
|
propertyPath: m_LocalRotation.z
|
||||||
m_RenderMode: 0
|
value: 0
|
||||||
m_Camera: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
m_PlaneDistance: 100
|
- target: {fileID: 4232056521131536011, guid: f8bea3f8aa351bb46ada33b2274729ea, type: 3}
|
||||||
m_PixelPerfect: 0
|
propertyPath: m_LocalEulerAnglesHint.x
|
||||||
m_ReceivesEvents: 1
|
value: 0
|
||||||
m_OverrideSorting: 0
|
objectReference: {fileID: 0}
|
||||||
m_OverridePixelPerfect: 0
|
- target: {fileID: 4232056521131536011, guid: f8bea3f8aa351bb46ada33b2274729ea, type: 3}
|
||||||
m_SortingBucketNormalizedSize: 0
|
propertyPath: m_LocalEulerAnglesHint.y
|
||||||
m_AdditionalShaderChannelsFlag: 0
|
value: 0
|
||||||
m_SortingLayerID: 0
|
objectReference: {fileID: 0}
|
||||||
m_SortingOrder: 0
|
- target: {fileID: 4232056521131536011, guid: f8bea3f8aa351bb46ada33b2274729ea, type: 3}
|
||||||
m_TargetDisplay: 0
|
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}
|
||||||
|
@ -41,6 +41,7 @@ namespace AxibugEmuOnline.Client
|
|||||||
m_nesIns = null;
|
m_nesIns = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private void Update()
|
private void Update()
|
||||||
{
|
{
|
||||||
if (m_nesIns != null)
|
if (m_nesIns != null)
|
||||||
@ -53,10 +54,5 @@ namespace AxibugEmuOnline.Client
|
|||||||
VideoProvider.SetDrawData(screenBuffer, lineColorMode, 256, 240);
|
VideoProvider.SetDrawData(screenBuffer, lineColorMode, 256, 240);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OnDestroy()
|
|
||||||
{
|
|
||||||
File.WriteAllLines("E:/log.txt", Debuger.logRecords);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,264 @@
|
|||||||
|
%YAML 1.1
|
||||||
|
%TAG !u! tag:unity3d.com,2011:
|
||||||
|
--- !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:
|
||||||
|
- {fileID: 4232056520494431727}
|
||||||
|
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:
|
||||||
|
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}
|
||||||
|
m_Father: {fileID: 4232056520112715745}
|
||||||
|
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 &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}
|
||||||
|
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}
|
||||||
|
--- !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
|
@ -0,0 +1,7 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: f8bea3f8aa351bb46ada33b2274729ea
|
||||||
|
PrefabImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
@ -4,8 +4,10 @@ using System;
|
|||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using System.Runtime.InteropServices;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
using UnityEngine.Playables;
|
||||||
using UnityEngine.UI;
|
using UnityEngine.UI;
|
||||||
using VirtualNes.Core;
|
using VirtualNes.Core;
|
||||||
|
|
||||||
@ -15,24 +17,32 @@ namespace AxibugEmuOnline.Client
|
|||||||
{
|
{
|
||||||
public RawImage Image;
|
public RawImage Image;
|
||||||
|
|
||||||
|
private Color32[] wrapTexBuffer;
|
||||||
|
private IntPtr wrapTexBufferPointer;
|
||||||
private Texture2D wrapTex;
|
private Texture2D wrapTex;
|
||||||
|
|
||||||
public void SetDrawData(byte[] screenData, byte[] lineColorMode, int screenWidth, int screenHeight)
|
public void SetDrawData(byte[] screenData, byte[] lineColorMode, int screenWidth, int screenHeight)
|
||||||
{
|
{
|
||||||
if (wrapTex == null) wrapTex = new Texture2D(screenWidth, screenHeight);
|
if (wrapTex == null)
|
||||||
|
{
|
||||||
var str = Encoding.ASCII.GetString(screenData, 0, screenData.Length);
|
wrapTex = new Texture2D(screenWidth, screenHeight, TextureFormat.BGRA32, false);
|
||||||
|
wrapTexBuffer = new Color32[screenWidth * screenHeight];
|
||||||
|
// 固定数组,防止垃圾回收器移动它
|
||||||
|
GCHandle handle = GCHandle.Alloc(wrapTexBuffer, GCHandleType.Pinned);
|
||||||
|
// 获取数组的指针
|
||||||
|
wrapTexBufferPointer = handle.AddrOfPinnedObject();
|
||||||
|
}
|
||||||
|
|
||||||
uint[] pPal;
|
uint[] pPal;
|
||||||
int pScn = 0;
|
int pScn = 0;
|
||||||
int width;
|
int width;
|
||||||
|
|
||||||
var Dst = wrapTex.GetPixels32();
|
var Dst = wrapTexBuffer;
|
||||||
var pDst = 0;
|
var pDst = 0;
|
||||||
|
|
||||||
for (int line = 0; line < screenHeight; line++)
|
for (int line = 0; line < screenHeight; line++)
|
||||||
{
|
{
|
||||||
if ((lineColorMode[line] & 0x80) != 0)
|
if ((lineColorMode[line] & 0x80) == 0)
|
||||||
{
|
{
|
||||||
pPal = PaletteDefine.m_cnPalette[lineColorMode[line] & 0x07];
|
pPal = PaletteDefine.m_cnPalette[lineColorMode[line] & 0x07];
|
||||||
}
|
}
|
||||||
@ -45,8 +55,7 @@ namespace AxibugEmuOnline.Client
|
|||||||
|
|
||||||
while (width > 0)
|
while (width > 0)
|
||||||
{
|
{
|
||||||
Color32 temp = new Color32(255, 255, 255, 255);
|
var edx = screenData[pScn + 8];
|
||||||
var edx = screenData[pScn];
|
|
||||||
|
|
||||||
byte index = (byte)(edx & 0xFF);
|
byte index = (byte)(edx & 0xFF);
|
||||||
var colorData = pPal[index];
|
var colorData = pPal[index];
|
||||||
@ -61,7 +70,8 @@ namespace AxibugEmuOnline.Client
|
|||||||
pScn += PPU.SCREEN_WIDTH - screenWidth;
|
pScn += PPU.SCREEN_WIDTH - screenWidth;
|
||||||
}
|
}
|
||||||
|
|
||||||
wrapTex.SetPixels32(Dst);
|
//wrapTex.SetPixels32(wrapTexBuffer);
|
||||||
|
wrapTex.LoadRawTextureData(wrapTexBufferPointer, screenWidth * screenHeight * 4);
|
||||||
wrapTex.Apply();
|
wrapTex.Apply();
|
||||||
|
|
||||||
Graphics.Blit(wrapTex, Image.mainTexture as RenderTexture);
|
Graphics.Blit(wrapTex, Image.mainTexture as RenderTexture);
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
#undef DPCM_SYNCCLOCK
|
#undef DPCM_SYNCCLOCK
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
|
using VirtualNes.Core.Debug;
|
||||||
|
|
||||||
namespace VirtualNes.Core
|
namespace VirtualNes.Core
|
||||||
{
|
{
|
||||||
@ -42,7 +43,7 @@ namespace VirtualNes.Core
|
|||||||
private int DMA_cycles;
|
private int DMA_cycles;
|
||||||
private Mapper mapper;
|
private Mapper mapper;
|
||||||
private APU apu;
|
private APU apu;
|
||||||
private R6502 R = new R6502();
|
internal R6502 R = new R6502();
|
||||||
private byte[] ZN_Table = new byte[256];
|
private byte[] ZN_Table = new byte[256];
|
||||||
private Memory<byte> STACK;
|
private Memory<byte> STACK;
|
||||||
|
|
||||||
@ -132,75 +133,77 @@ namespace VirtualNes.Core
|
|||||||
|
|
||||||
switch (opcode)
|
switch (opcode)
|
||||||
{
|
{
|
||||||
case 0x69:
|
case 0x69: // ADC #$??
|
||||||
MR_IM(); ADC();
|
MR_IM(); ADC();
|
||||||
ADD_CYCLE(2);
|
ADD_CYCLE(2);
|
||||||
break;
|
break;
|
||||||
case 0x65:
|
case 0x65: // ADC $??
|
||||||
MR_ZP(); ADC();
|
MR_ZP(); ADC();
|
||||||
ADD_CYCLE(3);
|
ADD_CYCLE(3);
|
||||||
break;
|
break;
|
||||||
case 0x75:
|
case 0x75: // ADC $??,X
|
||||||
MR_ZX(); ADC();
|
MR_ZX(); ADC();
|
||||||
ADD_CYCLE(4);
|
ADD_CYCLE(4);
|
||||||
break;
|
break;
|
||||||
case 0x6D:
|
case 0x6D: // ADC $????
|
||||||
MR_AB(); ADC();
|
MR_AB(); ADC();
|
||||||
ADD_CYCLE(4);
|
ADD_CYCLE(4);
|
||||||
break;
|
break;
|
||||||
case 0x7D:
|
case 0x7D: // ADC $????,X
|
||||||
MR_AX(); ADC(); CHECK_EA();
|
MR_AX(); ADC(); CHECK_EA();
|
||||||
ADD_CYCLE(4);
|
ADD_CYCLE(4);
|
||||||
break;
|
break;
|
||||||
case 0x79:
|
case 0x79: // ADC $????,Y
|
||||||
MR_AY(); ADC(); CHECK_EA();
|
MR_AY(); ADC(); CHECK_EA();
|
||||||
ADD_CYCLE(4);
|
ADD_CYCLE(4);
|
||||||
break;
|
break;
|
||||||
case 0x61:
|
case 0x61: // ADC ($??,X)
|
||||||
MR_IX(); ADC();
|
MR_IX(); ADC();
|
||||||
ADD_CYCLE(6);
|
ADD_CYCLE(6);
|
||||||
break;
|
break;
|
||||||
case 0x71:
|
case 0x71: // ADC ($??),Y
|
||||||
MR_IY(); ADC(); CHECK_EA();
|
MR_IY(); ADC(); CHECK_EA();
|
||||||
ADD_CYCLE(4);
|
ADD_CYCLE(4);
|
||||||
break;
|
break;
|
||||||
case 0xE9:
|
|
||||||
|
case 0xE9: // SBC #$??
|
||||||
MR_IM(); SBC();
|
MR_IM(); SBC();
|
||||||
ADD_CYCLE(2);
|
ADD_CYCLE(2);
|
||||||
break;
|
break;
|
||||||
case 0xE5:
|
case 0xE5: // SBC $??
|
||||||
MR_ZP(); SBC();
|
MR_ZP(); SBC();
|
||||||
ADD_CYCLE(3);
|
ADD_CYCLE(3);
|
||||||
break;
|
break;
|
||||||
case 0xF5:
|
case 0xF5: // SBC $??,X
|
||||||
MR_ZX(); SBC();
|
MR_ZX(); SBC();
|
||||||
ADD_CYCLE(4);
|
ADD_CYCLE(4);
|
||||||
break;
|
break;
|
||||||
case 0xED:
|
case 0xED: // SBC $????
|
||||||
MR_AB(); SBC();
|
MR_AB(); SBC();
|
||||||
ADD_CYCLE(4);
|
ADD_CYCLE(4);
|
||||||
break;
|
break;
|
||||||
case 0xFD:
|
case 0xFD: // SBC $????,X
|
||||||
MR_AX(); SBC(); CHECK_EA();
|
MR_AX(); SBC(); CHECK_EA();
|
||||||
ADD_CYCLE(4);
|
ADD_CYCLE(4);
|
||||||
break;
|
break;
|
||||||
case 0xF9: // SBC $????Y
|
case 0xF9: // SBC $????,Y
|
||||||
MR_AY(); SBC(); CHECK_EA();
|
MR_AY(); SBC(); CHECK_EA();
|
||||||
ADD_CYCLE(4);
|
ADD_CYCLE(4);
|
||||||
break;
|
break;
|
||||||
case 0xE1: // SBC ($??X)
|
case 0xE1: // SBC ($??,X)
|
||||||
MR_IX(); SBC();
|
MR_IX(); SBC();
|
||||||
ADD_CYCLE(6);
|
ADD_CYCLE(6);
|
||||||
break;
|
break;
|
||||||
case 0xF1: // SBC ($??)Y
|
case 0xF1: // SBC ($??),Y
|
||||||
MR_IY(); SBC(); CHECK_EA();
|
MR_IY(); SBC(); CHECK_EA();
|
||||||
ADD_CYCLE(5);
|
ADD_CYCLE(5);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 0xC6: // DEC $??
|
case 0xC6: // DEC $??
|
||||||
MR_ZP(); DEC(); MW_ZP();
|
MR_ZP(); DEC(); MW_ZP();
|
||||||
ADD_CYCLE(5);
|
ADD_CYCLE(5);
|
||||||
break;
|
break;
|
||||||
case 0xD6: // DEC $??X
|
case 0xD6: // DEC $??,X
|
||||||
MR_ZX(); DEC(); MW_ZP();
|
MR_ZX(); DEC(); MW_ZP();
|
||||||
ADD_CYCLE(6);
|
ADD_CYCLE(6);
|
||||||
break;
|
break;
|
||||||
@ -208,10 +211,11 @@ namespace VirtualNes.Core
|
|||||||
MR_AB(); DEC(); MW_EA();
|
MR_AB(); DEC(); MW_EA();
|
||||||
ADD_CYCLE(6);
|
ADD_CYCLE(6);
|
||||||
break;
|
break;
|
||||||
case 0xDE: // DEC $????X
|
case 0xDE: // DEC $????,X
|
||||||
MR_AX(); DEC(); MW_EA();
|
MR_AX(); DEC(); MW_EA();
|
||||||
ADD_CYCLE(7);
|
ADD_CYCLE(7);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 0xCA: // DEX
|
case 0xCA: // DEX
|
||||||
DEX();
|
DEX();
|
||||||
ADD_CYCLE(2);
|
ADD_CYCLE(2);
|
||||||
@ -220,11 +224,12 @@ namespace VirtualNes.Core
|
|||||||
DEY();
|
DEY();
|
||||||
ADD_CYCLE(2);
|
ADD_CYCLE(2);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 0xE6: // INC $??
|
case 0xE6: // INC $??
|
||||||
MR_ZP(); INC(); MW_ZP();
|
MR_ZP(); INC(); MW_ZP();
|
||||||
ADD_CYCLE(5);
|
ADD_CYCLE(5);
|
||||||
break;
|
break;
|
||||||
case 0xF6: // INC $??X
|
case 0xF6: // INC $??,X
|
||||||
MR_ZX(); INC(); MW_ZP();
|
MR_ZX(); INC(); MW_ZP();
|
||||||
ADD_CYCLE(6);
|
ADD_CYCLE(6);
|
||||||
break;
|
break;
|
||||||
@ -232,10 +237,11 @@ namespace VirtualNes.Core
|
|||||||
MR_AB(); INC(); MW_EA();
|
MR_AB(); INC(); MW_EA();
|
||||||
ADD_CYCLE(6);
|
ADD_CYCLE(6);
|
||||||
break;
|
break;
|
||||||
case 0xFE: // INC $????X
|
case 0xFE: // INC $????,X
|
||||||
MR_AX(); INC(); MW_EA();
|
MR_AX(); INC(); MW_EA();
|
||||||
ADD_CYCLE(7);
|
ADD_CYCLE(7);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 0xE8: // INX
|
case 0xE8: // INX
|
||||||
INX();
|
INX();
|
||||||
ADD_CYCLE(2);
|
ADD_CYCLE(2);
|
||||||
@ -244,6 +250,7 @@ namespace VirtualNes.Core
|
|||||||
INY();
|
INY();
|
||||||
ADD_CYCLE(2);
|
ADD_CYCLE(2);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 0x29: // AND #$??
|
case 0x29: // AND #$??
|
||||||
MR_IM(); AND();
|
MR_IM(); AND();
|
||||||
ADD_CYCLE(2);
|
ADD_CYCLE(2);
|
||||||
@ -252,7 +259,7 @@ namespace VirtualNes.Core
|
|||||||
MR_ZP(); AND();
|
MR_ZP(); AND();
|
||||||
ADD_CYCLE(3);
|
ADD_CYCLE(3);
|
||||||
break;
|
break;
|
||||||
case 0x35: // AND $??X
|
case 0x35: // AND $??,X
|
||||||
MR_ZX(); AND();
|
MR_ZX(); AND();
|
||||||
ADD_CYCLE(4);
|
ADD_CYCLE(4);
|
||||||
break;
|
break;
|
||||||
@ -260,22 +267,23 @@ namespace VirtualNes.Core
|
|||||||
MR_AB(); AND();
|
MR_AB(); AND();
|
||||||
ADD_CYCLE(4);
|
ADD_CYCLE(4);
|
||||||
break;
|
break;
|
||||||
case 0x3D: // AND $????X
|
case 0x3D: // AND $????,X
|
||||||
MR_AX(); AND(); CHECK_EA();
|
MR_AX(); AND(); CHECK_EA();
|
||||||
ADD_CYCLE(4);
|
ADD_CYCLE(4);
|
||||||
break;
|
break;
|
||||||
case 0x39: // AND $????Y
|
case 0x39: // AND $????,Y
|
||||||
MR_AY(); AND(); CHECK_EA();
|
MR_AY(); AND(); CHECK_EA();
|
||||||
ADD_CYCLE(4);
|
ADD_CYCLE(4);
|
||||||
break;
|
break;
|
||||||
case 0x21: // AND ($??X)
|
case 0x21: // AND ($??,X)
|
||||||
MR_IX(); AND();
|
MR_IX(); AND();
|
||||||
ADD_CYCLE(6);
|
ADD_CYCLE(6);
|
||||||
break;
|
break;
|
||||||
case 0x31: // AND ($??)Y
|
case 0x31: // AND ($??),Y
|
||||||
MR_IY(); AND(); CHECK_EA();
|
MR_IY(); AND(); CHECK_EA();
|
||||||
ADD_CYCLE(5);
|
ADD_CYCLE(5);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 0x0A: // ASL A
|
case 0x0A: // ASL A
|
||||||
ASL_A();
|
ASL_A();
|
||||||
ADD_CYCLE(2);
|
ADD_CYCLE(2);
|
||||||
@ -705,7 +713,7 @@ namespace VirtualNes.Core
|
|||||||
ADD_CYCLE(6);
|
ADD_CYCLE(6);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
// 僼儔僌惂屼宯
|
// フラグ制御系
|
||||||
case 0x18: // CLC
|
case 0x18: // CLC
|
||||||
CLC();
|
CLC();
|
||||||
ADD_CYCLE(2);
|
ADD_CYCLE(2);
|
||||||
@ -736,7 +744,7 @@ namespace VirtualNes.Core
|
|||||||
ADD_CYCLE(2);
|
ADD_CYCLE(2);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
// 僗僞僢僋宯
|
// スタック系
|
||||||
case 0x48: // PHA
|
case 0x48: // PHA
|
||||||
PUSH(R.A);
|
PUSH(R.A);
|
||||||
ADD_CYCLE(3);
|
ADD_CYCLE(3);
|
||||||
@ -755,7 +763,7 @@ namespace VirtualNes.Core
|
|||||||
ADD_CYCLE(4);
|
ADD_CYCLE(4);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
// 偦偺懠
|
// その他
|
||||||
case 0x00: // BRK
|
case 0x00: // BRK
|
||||||
BRK();
|
BRK();
|
||||||
ADD_CYCLE(7);
|
ADD_CYCLE(7);
|
||||||
@ -765,7 +773,7 @@ namespace VirtualNes.Core
|
|||||||
ADD_CYCLE(2);
|
ADD_CYCLE(2);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
// 枹岞奐柦椷孮
|
// 未公開命令群
|
||||||
case 0x0B: // ANC #$??
|
case 0x0B: // ANC #$??
|
||||||
case 0x2B: // ANC #$??
|
case 0x2B: // ANC #$??
|
||||||
MR_IM(); ANC();
|
MR_IM(); ANC();
|
||||||
@ -1105,7 +1113,7 @@ namespace VirtualNes.Core
|
|||||||
default:
|
default:
|
||||||
if (!Supporter.Config.emulator.bIllegalOp)
|
if (!Supporter.Config.emulator.bIllegalOp)
|
||||||
{
|
{
|
||||||
throw new Exception("Illegal Opcode");
|
throw new Exception("IllegalOp");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -1113,6 +1121,8 @@ namespace VirtualNes.Core
|
|||||||
ADD_CYCLE(4);
|
ADD_CYCLE(4);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
// default:
|
||||||
|
// __assume(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (nmi_request != 0)
|
if (nmi_request != 0)
|
||||||
@ -1143,7 +1153,6 @@ namespace VirtualNes.Core
|
|||||||
#endif
|
#endif
|
||||||
return TOTAL_cycles - OLD_cycles;
|
return TOTAL_cycles - OLD_cycles;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void _IRQ()
|
private void _IRQ()
|
||||||
{
|
{
|
||||||
PUSH((byte)(R.PC >> 8));
|
PUSH((byte)(R.PC >> 8));
|
||||||
@ -1836,7 +1845,7 @@ namespace VirtualNes.Core
|
|||||||
{
|
{
|
||||||
ET = OP6502W(R.PC);
|
ET = OP6502W(R.PC);
|
||||||
R.PC += 2;
|
R.PC += 2;
|
||||||
EA = (byte)(ET + R.X);
|
EA = (ushort)(ET + R.X);
|
||||||
DT = RD6502(EA);
|
DT = RD6502(EA);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4,8 +4,6 @@ namespace VirtualNes.Core.Debug
|
|||||||
{
|
{
|
||||||
public static class Debuger
|
public static class Debuger
|
||||||
{
|
{
|
||||||
public static List<string> logRecords = new List<string>();
|
|
||||||
|
|
||||||
private static IDebugerImpl s_debuger;
|
private static IDebugerImpl s_debuger;
|
||||||
public static void Setup(IDebugerImpl debuger)
|
public static void Setup(IDebugerImpl debuger)
|
||||||
{
|
{
|
||||||
@ -14,7 +12,6 @@ namespace VirtualNes.Core.Debug
|
|||||||
public static void Log(string message)
|
public static void Log(string message)
|
||||||
{
|
{
|
||||||
s_debuger.Log(message);
|
s_debuger.Log(message);
|
||||||
logRecords.Add(message);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void LogError(string message)
|
public static void LogError(string message)
|
||||||
|
@ -486,8 +486,11 @@ namespace VirtualNes.Core
|
|||||||
m_CheatCode.Clear();
|
m_CheatCode.Clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private int FrameCount = 0;
|
||||||
public void EmulateFrame(bool bDraw)
|
public void EmulateFrame(bool bDraw)
|
||||||
{
|
{
|
||||||
|
FrameCount++;
|
||||||
|
|
||||||
int scanline = 0;
|
int scanline = 0;
|
||||||
if (rom.IsNSF())
|
if (rom.IsNSF())
|
||||||
{
|
{
|
||||||
@ -498,6 +501,7 @@ namespace VirtualNes.Core
|
|||||||
CheatCodeProcess();
|
CheatCodeProcess();
|
||||||
|
|
||||||
NES_scanline = scanline;
|
NES_scanline = scanline;
|
||||||
|
bool NotTile = RenderMethod != EnumRenderMethod.TILE_RENDER;
|
||||||
|
|
||||||
if (RenderMethod != EnumRenderMethod.TILE_RENDER)
|
if (RenderMethod != EnumRenderMethod.TILE_RENDER)
|
||||||
{
|
{
|
||||||
@ -917,6 +921,7 @@ namespace VirtualNes.Core
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int CPU_CALL_COUNT = 0;
|
||||||
internal void EmulationCPU(int basecycles)
|
internal void EmulationCPU(int basecycles)
|
||||||
{
|
{
|
||||||
int cycles;
|
int cycles;
|
||||||
@ -926,8 +931,11 @@ namespace VirtualNes.Core
|
|||||||
|
|
||||||
if (cycles > 0)
|
if (cycles > 0)
|
||||||
{
|
{
|
||||||
emul_cycles += cpu.EXEC(cycles);
|
var cycleAdd = cpu.EXEC(cycles);
|
||||||
|
emul_cycles += cycleAdd;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
CPU_CALL_COUNT++;
|
||||||
}
|
}
|
||||||
|
|
||||||
internal void Reset()
|
internal void Reset()
|
||||||
@ -1041,10 +1049,7 @@ namespace VirtualNes.Core
|
|||||||
apu.SoundSetup();
|
apu.SoundSetup();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SetRenderMethod(EnumRenderMethod type)
|
|
||||||
{
|
|
||||||
RenderMethod = type;
|
|
||||||
}
|
|
||||||
|
|
||||||
internal void SoftReset()
|
internal void SoftReset()
|
||||||
{
|
{
|
||||||
@ -1514,14 +1519,12 @@ namespace VirtualNes.Core
|
|||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
public void SetRenderMethod(EnumRenderMethod type)
|
||||||
static int NESWRITECOUNT = 0;
|
{
|
||||||
|
RenderMethod = type;
|
||||||
|
}
|
||||||
internal void Write(ushort addr, byte data)
|
internal void Write(ushort addr, byte data)
|
||||||
{
|
{
|
||||||
NESWRITECOUNT++;
|
|
||||||
|
|
||||||
Debuger.Log($"[{NESWRITECOUNT}] addr:{addr},data:{data}");
|
|
||||||
|
|
||||||
switch (addr >> 13)
|
switch (addr >> 13)
|
||||||
{
|
{
|
||||||
case 0x00: // $0000-$1FFF
|
case 0x00: // $0000-$1FFF
|
||||||
|
@ -34,12 +34,18 @@
|
|||||||
|
|
||||||
public static void Load(uint crc)
|
public static void Load(uint crc)
|
||||||
{
|
{
|
||||||
|
nRenderMethod = defRenderMethod;
|
||||||
|
nIRQtype = defIRQtype;
|
||||||
|
bFrameIRQ = defFrameIRQ;
|
||||||
|
bVideoMode = defVideoMode;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void Load(uint gid, uint mid)
|
public static void Load(uint gid, uint mid)
|
||||||
{
|
{
|
||||||
|
nRenderMethod = defRenderMethod;
|
||||||
|
nIRQtype = defIRQtype;
|
||||||
|
bFrameIRQ = defFrameIRQ;
|
||||||
|
bVideoMode = defVideoMode;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue
Block a user