Merged default branch into graphics-phase-3 graphics-phase-3
authorGareth Stockwell <gareth.stockwell@accenture.com>
Fri, 24 Sep 2010 13:30:20 +0100
branchgraphics-phase-3
changeset 114 19c4533e1567
parent 113 b842c0cb760e (diff)
parent 108 78b83e1454a6 (current diff)
child 115 7fc47a6656f3
Merged default branch into graphics-phase-3
baseport/syborg/bootstrap/syborg.inc
baseport/syborg/bootstrap/syborg.s
baseport/syborg/specific/syborg.h
baseport/syborg/syborg.dtb
baseport/syborg/syborg.dts
symbian-qemu-0.9.1-12/model-libraries/Makefile
symbian-qemu-0.9.1-12/model-libraries/commoninc/platformtypes.h
--- a/baseport/syborg/bootstrap/syborg.inc	Thu Sep 09 12:06:21 2010 +0100
+++ b/baseport/syborg/bootstrap/syborg.inc	Fri Sep 24 13:30:20 2010 +0100
@@ -53,9 +53,8 @@
 KHwBaseNand		EQU     KHwBaseRegisters + 0x0d000
 KHwBaseAudio		EQU     KHwBaseRegisters + 0x0e000
 KHwBaseWebcamera	EQU     KHwBaseRegisters + 0x0f000
-KHwNVMemoryDevice			EQU		KHwBaseRegisters + 0x10000
-; NTT Docomo - Defect 1291 fix - E32test t_tock.exe failed to load Logical Device - start
-; KHwBasePlatform		EQU     KHwBaseRegisters + 0x12000
+KHwNVMemoryDevice	EQU	KHwBaseRegisters + 0x10000
+KHwGraphicsRegBase	EQU	KHwBaseRegisters + 0x11000
 KHwBaseTimer2		EQU	KHwBaseRegisters + 0x12000
 KHwBasePlatform		EQU     KHwBaseRegisters + 0x13000
 ; NTT Docomo - Defect 1291 fix - E32test t_tock.exe failed to load Logical Device - end
@@ -86,8 +85,7 @@
 KHwLinBaseAudio		EQU	KHwLinBaseRegisters + 0x0e*KHwLinSeparation
 KHwLinBaseWebcameraDevice	EQU	KHwLinBaseRegisters + 0x0f*KHwLinSeparation
 KHwLinBaseNVMemory	EQU	KHwLinBaseRegisters + 0x10*KHwLinSeparation
-; NTT Docomo - Defect 1291 fix - E32test t_tock.exe failed to load Logical Device - start
-; KHwLinBasePlatform	EQU	KHwLinBaseRegisters + 0x12*KHwLinSeparation
+KHwLinBaseGraphics	EQU	KHwLinBaseRegisters + 0x11*KHwLinSeparation
 KHwLinBaseTimer2		EQU	KHwLinBaseRegisters + 0x12*KHwLinSeparation
 KHwLinBasePlatform	EQU	KHwLinBaseRegisters + 0x13*KHwLinSeparation
 ; NTT Docomo - Defect 1291 fix - E32test t_tock.exe failed to load Logical Device - end
--- a/baseport/syborg/bootstrap/syborg.s	Thu Sep 09 12:06:21 2010 +0100
+++ b/baseport/syborg/bootstrap/syborg.s	Fri Sep 24 13:30:20 2010 +0100
@@ -185,7 +185,7 @@
 		HW_MAPPING		KHwBaseAudio,    		1,	HW_MULT_4K
 		HW_MAPPING		KHwBaseWebcamera,    		1,	HW_MULT_4K
 		HW_MAPPING		KHwNVMemoryDevice,		1,	HW_MULT_4K
-; NTT Docomo - Defect 1291 fix - E32test t_tock.exe failed to load Logical Device - start
+                HW_MAPPING              KHwGraphicsRegBase,             1,      HW_MULT_4K
 		HW_MAPPING		KHwBaseTimer2,			1,	HW_MULT_4K
 ; NTT Docomo - Defect 1291 fix - E32test t_tock.exe failed to load Logical Device - end
 		HW_MAPPING		KHwBasePlatform,    		8,	HW_MULT_4K
--- a/baseport/syborg/pointer/syborg_pointer.cpp	Thu Sep 09 12:06:21 2010 +0100
+++ b/baseport/syborg/pointer/syborg_pointer.cpp	Fri Sep 24 13:30:20 2010 +0100
@@ -108,10 +108,14 @@
 
   iScreenWidth  = videoInfo.iSizeInPixels.iWidth;
   iScreenHeight = videoInfo.iSizeInPixels.iHeight;
+  Kern::Printf("TPointerRv::Init3(): width: %d height: %d", iScreenWidth, iScreenHeight);
+
   iDisplayMode  = videoInfo.iDisplayMode;
 
+
   iVideoMem = videoInfo.iVideoAddress + videoInfo.iOffsetToFirstPixel;
   iOffSetBetweenEachLine = iScreenWidth;
+  Kern::Printf("TPointerRv::Init3(): iOffsetToFirstPixel: %d", iVideoMem);
 
   ix = iy = 0;
 
@@ -198,11 +202,18 @@
 TUint32 *pMem =0;
 TInt k=0;
 
+	TLinAddr activeFrameLin = ReadReg( KHwBaseClcd, 14 /*FB_VBASE*/ ); 
+	Kern::Printf("activeFrameLin: 0x%08x", activeFrameLin);
+	if( activeFrameLin == 0 )
+		{
+		return;
+		}
+
 	if(!iFirstTime)
 	{
 
 	//restore old pointer position
-	pMem = (TUint32 *)iVideoMem;
+	pMem = (TUint32 *)(activeFrameLin + iVideoMem);
 
 	pMem+= iYtop* iOffSetBetweenEachLine;
 	pMem+= iXleft;
@@ -246,7 +257,7 @@
 	if(iYbottom> iScreenHeight)
 		iYbottom=iScreenHeight;
 
-	pMem = (TUint32 *)iVideoMem;
+	pMem = (TUint32 *)(activeFrameLin + iVideoMem);
 	k=0;
 
 	pMem+= iYtop* iOffSetBetweenEachLine;
--- a/baseport/syborg/specific/syborg.h	Thu Sep 09 12:06:21 2010 +0100
+++ b/baseport/syborg/specific/syborg.h	Fri Sep 24 13:30:20 2010 +0100
@@ -55,9 +55,8 @@
 const TUint KHwSVPNandDevice			= KHwBasePeripherals + 0x0d*KHwLinSeparation;
 const TUint KHwSVPAudioDevice			= KHwBasePeripherals + 0x0e*KHwLinSeparation;
 const TUint KHwSVPWebcameraDevice		= KHwBasePeripherals + 0x0f*KHwLinSeparation;
-const TUint KHwNVMemoryDevice			= KHwBasePeripherals + 0x10*KHwLinSeparation;
-// NTT Docomo - Defect 1291 fix - E32test t_tock.exe failed to load Logical Device - start
-//const TUint KHwSVPPlatformDevice		= KHwBasePeripherals + 0x12*KHwLinSeparation;
+const TUint KHwNVMemoryDevice           	= KHwBasePeripherals + 0x10*KHwLinSeparation;
+const TUint KHwGraphicsRegBase          	= KHwBasePeripherals + 0x11*KHwLinSeparation;
 const TUint KHwBaseCounterTimer2		= KHwBasePeripherals + 0x12*KHwLinSeparation;
 const TUint KHwSVPPlatformDevice		= KHwBasePeripherals + 0x13*KHwLinSeparation;
 // NTT Docomo - Defect 1291 fix - E32test t_tock.exe failed to load Logical Device - end
@@ -77,7 +76,7 @@
   EIntNet0 = 9,
   EIntAudio0 = 10,
   EIntNVMemoryDevice = 12,
-// NTT Docomo - Defect 1291 fix - E32test t_tock.exe failed to load Logical Device - start
+  EIntGraphics = 13,
   EIntTimer2 = 14
 // NTT Docomo - Defect 1291 fix - E32test t_tock.exe failed to load Logical Device - end
 };
Binary file baseport/syborg/syborg.dtb has changed
--- a/baseport/syborg/syborg.dts	Thu Sep 09 12:06:21 2010 +0100
+++ b/baseport/syborg/syborg.dts	Fri Sep 24 13:30:20 2010 +0100
@@ -130,6 +130,12 @@
             interrupts = <c>;
             interrupt-parent = <&intc>;
         };
+        graphicsdevice@0 {
+            compatible = "syborg,graphicsdevice";
+            reg = <c0011000>;
+            interrupts = <d>;
+            interrupt-parent = <&intc>;
+        };
         timer@1 {
             compatible = "syborg,timer";
             reg = <c0012000>;
--- a/symbian-qemu-0.9.1-12/model-libraries/Makefile	Thu Sep 09 12:06:21 2010 +0100
+++ b/symbian-qemu-0.9.1-12/model-libraries/Makefile	Fri Sep 24 13:30:20 2010 +0100
@@ -14,7 +14,7 @@
 .phony: all clean install distclean
 
 # Append new model library dirs here.
-subdirs := nvmemmory
+subdirs := nvmemmory syborg-graphicswrapper
 
 all clean install distclean:
 	for d in $(subdirs); do $(MAKE) -C $$d $@; done
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/symbian-qemu-0.9.1-12/model-libraries/syborg-graphicswrapper/Makefile	Fri Sep 24 13:30:20 2010 +0100
@@ -0,0 +1,24 @@
+# Copyright (c) 2010 Symbian Foundation.
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of the License "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Description:
+# Toplevel Makefile to build syborg-graphicswrapper library in either debug or release mode
+
+.phony: all clean install distclean
+
+
+# Ensure DEBUG_LIBS is defined to make a debug build
+ifneq ($(DEBUG_LIBS),)
+build_dir=Debug 
+else
+build_dir=Release 
+endif
+
+all clean install distclean:
+	$(MAKE) -C $(build_dir) $@ -f ../target.mak
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/symbian-qemu-0.9.1-12/model-libraries/syborg-graphicswrapper/ReadMe.txt	Fri Sep 24 13:30:20 2010 +0100
@@ -0,0 +1,31 @@
+========================================================================
+    DYNAMIC LINK LIBRARY : syborg-graphicswrapper Project Overview
+========================================================================
+
+AppWizard has created this syborg-graphicswrapper DLL for you.  
+
+This file contains a summary of what you will find in each of the files that
+make up your syborg-graphicswrapper application.
+
+syborg-graphicswrapper.vcproj
+    This is the main project file for VC++ projects generated using an Application Wizard. 
+    It contains information about the version of Visual C++ that generated the file, and 
+    information about the platforms, configurations, and project features selected with the
+    Application Wizard.
+
+syborg-graphicswrapper.cpp
+    This is the main DLL source file.
+
+syborg-graphicswrapper.h
+    This file contains a class declaration.
+
+AssemblyInfo.cpp
+	Contains custom attributes for modifying assembly metadata.
+
+/////////////////////////////////////////////////////////////////////////////
+Other notes:
+
+AppWizard uses "TODO:" to indicate parts of the source code you
+should add to or customize.
+
+/////////////////////////////////////////////////////////////////////////////
Binary file symbian-qemu-0.9.1-12/model-libraries/syborg-graphicswrapper/Release/BuildLog.htm has changed
Binary file symbian-qemu-0.9.1-12/model-libraries/syborg-graphicswrapper/Release/RCa04556 has changed
Binary file symbian-qemu-0.9.1-12/model-libraries/syborg-graphicswrapper/app.ico has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/symbian-qemu-0.9.1-12/model-libraries/syborg-graphicswrapper/syborg-graphicswrapper.cpp	Fri Sep 24 13:30:20 2010 +0100
@@ -0,0 +1,150 @@
+// This is the main DLL file.
+
+#include "platformtypes.h"
+#include <KhronosAPIWrapper.h>
+#include <guestvideodriverinterfaceconstants.h>  //Registers and enums 
+#include <platformthreading.h>  //mutex
+#include <graphicsvhwcallback.h>
+#include "syborg-graphicswrapper.h"
+
+SyborgGraphicsWrapper::SyborgGraphicsWrapper()
+    {															
+    }
+
+SyborgGraphicsWrapper::~SyborgGraphicsWrapper()
+    {
+    delete m_wrapper;
+    m_wrapper = 0;
+
+    Psu::platform_release_semaphore(m_outputBufferSemaphore);
+    }
+
+int SyborgGraphicsWrapper::Reset( uint32_t *aGraphicsMemBase,  uint32_t *aCommandMemBase )
+    {
+    int ret = -1;
+    if ( m_wrapper )
+        {
+        delete m_wrapper;
+	    }
+    m_wrapper = NULL;
+
+    uint8_t *cmd_buffer = (uint8_t *)aCommandMemBase;
+    uint8_t *frame_buffer = (uint8_t *)aGraphicsMemBase;
+    if( (cmd_buffer != NULL) && (frame_buffer != NULL) )
+        {
+        m_wrapper = new KhronosAPIWrapper( (MGraphicsVHWCallback*)this,
+            frame_buffer, &cmd_buffer[VVHW_INPUT_BASE], &cmd_buffer[VVHW_OUTPUT_BASE] );
+        //Reset synchronisation mechanisms
+        Psu::platform_release_semaphore(m_outputBufferSemaphore);
+        Psu::platform_create_semaphore(m_outputBufferSemaphore, 1, 1);
+        ret = 0;
+        }
+    else
+        {
+        ret = -1;
+        }
+    return ret;
+    }
+
+void SyborgGraphicsWrapper::LockOutputBuffer()
+    {
+    #ifdef KHRONOS_API_W_MULTITHREAD
+    Psu::platform_wait_for_signal(m_outputBufferSemaphore);
+    #endif
+    }
+
+void SyborgGraphicsWrapper::ReleaseOutputBuffer(){}
+
+void SyborgGraphicsWrapper::ProcessingDone(int i)
+    {
+    m_pythonCallBack( i );
+    }
+
+extern "C"
+    {
+    SYBORG_GRAPHICSWRAPPER_API SyborgGraphicsWrapper* create_SyborgGraphicsWrapper()
+        {
+        return new SyborgGraphicsWrapper();
+        }
+    SYBORG_GRAPHICSWRAPPER_API int initialize_SyborgGraphicsWrapper( SyborgGraphicsWrapper* aSyborgGraphicsWrapper )
+        {
+        Psu::platform_create_semaphore(m_outputBufferSemaphore, 1, 1);
+        // Change to proper error handling
+        return 0;
+        }
+
+    SYBORG_GRAPHICSWRAPPER_API int set_GraphicsCallBack( SyborgGraphicsWrapper* aSyborgGraphicsWrapper, int (*aGraphicsCallBack) (int) )
+        {
+        m_pythonCallBack = aGraphicsCallBack;
+        // Change to proper error handling
+        return 0;
+        }
+
+    SYBORG_GRAPHICSWRAPPER_API int reset_SyborgGraphicsWrapper(  SyborgGraphicsWrapper* aSyborgGraphicsWrapper, uint32_t *aGraphicsMemBase,  uint32_t *aCommandMemBase )
+        {
+        return aSyborgGraphicsWrapper->Reset( aGraphicsMemBase, aCommandMemBase );
+        }
+
+    SYBORG_GRAPHICSWRAPPER_API uint32_t get_InputBufferTail(  SyborgGraphicsWrapper* aSyborgGraphicsWrapper )
+        {
+        return m_wrapper->InputBufferTail();
+        }
+    SYBORG_GRAPHICSWRAPPER_API uint32_t get_InputBufferHead(  SyborgGraphicsWrapper* aSyborgGraphicsWrapper )
+        {
+        return m_wrapper->InputBufferHead( );
+        }
+    SYBORG_GRAPHICSWRAPPER_API uint32_t get_InputBufferReadCount(  SyborgGraphicsWrapper* aSyborgGraphicsWrapper )
+        {
+        return m_wrapper->InputBufferReadCount( );
+        }
+    SYBORG_GRAPHICSWRAPPER_API uint32_t get_InputBufferWriteCount(  SyborgGraphicsWrapper* aSyborgGraphicsWrapper )
+        {
+        return m_wrapper->InputBufferWriteCount( );
+        }
+    SYBORG_GRAPHICSWRAPPER_API uint32_t get_InputMaxTailIndex(  SyborgGraphicsWrapper* aSyborgGraphicsWrapper )
+        {
+        return m_wrapper->InputMaxTailIndex( );
+        }
+    SYBORG_GRAPHICSWRAPPER_API uint32_t get_cmd_memsize( void )
+        {
+        return (VVI_PARAMETERS_INPUT_MEMORY_SIZE +
+                VVI_PARAMETERS_OUTPUT_MEMORY_SIZE);
+        }
+    SYBORG_GRAPHICSWRAPPER_API uint32_t get_framebuffer_memsize( void )
+        {
+        return VVI_FRAMEBUFFER_MEMORY_SIZE;
+        }
+
+    
+    SYBORG_GRAPHICSWRAPPER_API unsigned int execute_command(  SyborgGraphicsWrapper* aSyborgGraphicsWrapper )
+        {
+        return m_wrapper->Execute( );
+        }
+    SYBORG_GRAPHICSWRAPPER_API void set_InputBufferTail(  SyborgGraphicsWrapper* aSyborgGraphicsWrapper, uint32_t aVal )
+        {
+        m_wrapper->SetInputBufferTail( aVal );
+        }
+    SYBORG_GRAPHICSWRAPPER_API void set_InputBufferHead(  SyborgGraphicsWrapper* aSyborgGraphicsWrapper, uint32_t aVal )
+        {
+        m_wrapper->SetInputBufferHead( aVal );
+        }
+    SYBORG_GRAPHICSWRAPPER_API void set_InputBufferReadCount(  SyborgGraphicsWrapper* aSyborgGraphicsWrapper, uint32_t aVal )
+        {
+        m_wrapper->SetInputBufferReadCount( aVal );
+        }
+    SYBORG_GRAPHICSWRAPPER_API void set_InputBufferWriteCount(  SyborgGraphicsWrapper* aSyborgGraphicsWrapper, uint32_t aVal )
+        {
+        m_wrapper->SetInputBufferWriteCount( aVal );
+        }
+    SYBORG_GRAPHICSWRAPPER_API void set_InputMaxTailIndex(  SyborgGraphicsWrapper* aSyborgGraphicsWrapper, uint32_t aVal )
+        {
+        m_wrapper->SetInputMaxTailIndex( aVal );
+        }
+    SYBORG_GRAPHICSWRAPPER_API void signal_outputbuffer_semafore(  SyborgGraphicsWrapper* aSyborgGraphicsWrapper )
+        {
+        #ifdef KHRONOS_API_W_MULTITHREAD
+            Psu::platform_signal_semaphore(m_outputBufferSemaphore);
+        #endif
+        }
+
+    }
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/symbian-qemu-0.9.1-12/model-libraries/syborg-graphicswrapper/syborg-graphicswrapper.h	Fri Sep 24 13:30:20 2010 +0100
@@ -0,0 +1,47 @@
+#ifndef _SYBORG_GRAPHICSWRAPPER_H
+#define _SYBORG_GRAPHICSWRAPPER_H
+
+#pragma once
+					  
+#ifdef WIN32
+#ifdef SYBORG_GRAPHICSWRAPPER_EXPORTS
+#define SYBORG_GRAPHICSWRAPPER_API __declspec(dllexport)
+#else
+#define SYBORG_GRAPHICSWRAPPER_API __declspec(dllimport)
+#endif
+#else
+#define SYBORG_GRAPHICSWRAPPER_API
+#endif
+
+Psu::PLATFORM_SEMAPHORE_T m_outputBufferSemaphore;
+int (*m_pythonCallBack)(int); 
+KhronosAPIWrapper* m_wrapper;
+														   
+
+// Derived from GraphicsVirtualHW.lisa
+static const int VVHW_BUFFER (0x3000000);
+static const int VVHW_INPUT_BUFFER (0x1000000);
+static const int VVHW_INPUT_BASE(0x0);
+static const int VVHW_OUTPUT_BUFFER (0x1000000);
+static const int VVHW_OUTPUT_BASE(0x1000000);
+static const int VVHW_FRAME_BUFFER (0x1000000);
+static const int VVHW_FRAME_BASE(0x2000000);
+
+class SyborgGraphicsWrapper : public MGraphicsVHWCallback
+    {
+    public:
+
+        SyborgGraphicsWrapper();
+        ~SyborgGraphicsWrapper();
+
+        int Reset( uint32_t *aGraphicsMemBase,  uint32_t *aCommandMemBase );
+
+        virtual void LockOutputBuffer();
+	    virtual void ReleaseOutputBuffer();
+	    virtual void ProcessingDone(int i);
+
+    private:
+    };
+
+
+#endif // _SYBORG_GRAPHICSWRAPPER_H
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/symbian-qemu-0.9.1-12/model-libraries/syborg-graphicswrapper/syborg-graphicswrapper.sln	Fri Sep 24 13:30:20 2010 +0100
@@ -0,0 +1,20 @@
+
+Microsoft Visual Studio Solution File, Format Version 9.00
+# Visual C++ Express 2005
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "syborg-graphicswrapper", "syborg-graphicswrapper.vcproj", "{93690C8A-9167-4A2D-9682-3E437A31347D}"
+EndProject
+Global
+	GlobalSection(SolutionConfigurationPlatforms) = preSolution
+		Debug|Win32 = Debug|Win32
+		Release|Win32 = Release|Win32
+	EndGlobalSection
+	GlobalSection(ProjectConfigurationPlatforms) = postSolution
+		{93690C8A-9167-4A2D-9682-3E437A31347D}.Debug|Win32.ActiveCfg = Debug|Win32
+		{93690C8A-9167-4A2D-9682-3E437A31347D}.Debug|Win32.Build.0 = Debug|Win32
+		{93690C8A-9167-4A2D-9682-3E437A31347D}.Release|Win32.ActiveCfg = Release|Win32
+		{93690C8A-9167-4A2D-9682-3E437A31347D}.Release|Win32.Build.0 = Release|Win32
+	EndGlobalSection
+	GlobalSection(SolutionProperties) = preSolution
+		HideSolutionNode = FALSE
+	EndGlobalSection
+EndGlobal
Binary file symbian-qemu-0.9.1-12/model-libraries/syborg-graphicswrapper/syborg-graphicswrapper.suo has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/symbian-qemu-0.9.1-12/model-libraries/syborg-graphicswrapper/syborg-graphicswrapper.vcproj	Fri Sep 24 13:30:20 2010 +0100
@@ -0,0 +1,220 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="8.00"
+	Name="syborg-graphicswrapper"
+	ProjectGUID="{93690C8A-9167-4A2D-9682-3E437A31347D}"
+	RootNamespace="syborggraphicswrapper"
+	Keyword="ManagedCProj"
+	>
+	<Platforms>
+		<Platform
+			Name="Win32"
+		/>
+	</Platforms>
+	<ToolFiles>
+	</ToolFiles>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+			IntermediateDirectory="$(ConfigurationName)"
+			ConfigurationType="2"
+			CharacterSet="1"
+			ManagedExtensions="1"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				PreprocessorDefinitions="WIN32;_DEBUG"
+				RuntimeLibrary="3"
+				UsePrecompiledHeader="2"
+				WarningLevel="3"
+				DebugInformationFormat="3"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="$(NoInherit)"
+				LinkIncremental="2"
+				GenerateDebugInformation="true"
+				AssemblyDebug="1"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+			IntermediateDirectory="$(ConfigurationName)"
+			ConfigurationType="2"
+			CharacterSet="1"
+			ManagedExtensions="0"
+			WholeProgramOptimization="1"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				AdditionalIncludeDirectories="&quot;$(SolutionDir)\..\..\..\..\..\adapt\graphics.simulator\hostsupport\hostthreadadapter\inc&quot;;&quot;$(SolutionDir)\..\..\..\..\..\os\graphics\graphics_plat\guestvideodriver_api\inc&quot;;&quot;$(SolutionDir)\..\..\..\..\..\adapt\graphics.simulator\holdingarea\serialization\Graphics\KhronosAPIWrapper\inc&quot;;&quot;$(SolutionDir)\..\..\..\..\..\adapt\graphics.simulator\guestrendering\vghwserialiser\inc&quot;"
+				PreprocessorDefinitions="WIN32;NDEBUG;_USRDLL;SYBORG_GRAPHICSWRAPPER_EXPORTS;WIN32_LEAN_AND_MEAN"
+				RuntimeLibrary="2"
+				UsePrecompiledHeader="0"
+				WarningLevel="3"
+				DebugInformationFormat="3"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="hostthreadadapter.lib KhronosApiWrapper.lib"
+				LinkIncremental="1"
+				AdditionalLibraryDirectories="&quot;$(SolutionDir)\..\..\..\..\..\adapt\graphics.simulator\holdingarea\lib&quot;"
+				GenerateDebugInformation="true"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+	</Configurations>
+	<References>
+		<AssemblyReference
+			RelativePath="System.dll"
+			AssemblyName="System, Version=2.0.0.0, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL"
+		/>
+		<AssemblyReference
+			RelativePath="System.Data.dll"
+			AssemblyName="System.Data, Version=2.0.0.0, PublicKeyToken=b77a5c561934e089, processorArchitecture=x86"
+		/>
+		<AssemblyReference
+			RelativePath="System.XML.dll"
+			AssemblyName="System.Xml, Version=2.0.0.0, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL"
+		/>
+	</References>
+	<Files>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+			UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+			>
+			<File
+				RelativePath=".\syborg-graphicswrapper.cpp"
+				>
+			</File>
+		</Filter>
+		<Filter
+			Name="Header Files"
+			Filter="h;hpp;hxx;hm;inl;inc;xsd"
+			UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+			>
+			<File
+				RelativePath=".\syborg-graphicswrapper.h"
+				>
+			</File>
+		</Filter>
+		<Filter
+			Name="Resource Files"
+			Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
+			UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
+			>
+			<File
+				RelativePath=".\app.ico"
+				>
+			</File>
+		</Filter>
+		<File
+			RelativePath=".\ReadMe.txt"
+			>
+		</File>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/symbian-qemu-0.9.1-12/model-libraries/syborg-graphicswrapper/syborg-graphicswrapper.vcproj.NOE.jahyvone.user	Fri Sep 24 13:30:20 2010 +0100
@@ -0,0 +1,65 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioUserFile
+	ProjectType="Visual C++"
+	Version="8.00"
+	ShowAllFiles="false"
+	>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			>
+			<DebugSettings
+				Command=""
+				WorkingDirectory=""
+				CommandArguments=""
+				Attach="false"
+				DebuggerType="3"
+				Remote="1"
+				RemoteMachine="4FIL49437"
+				RemoteCommand=""
+				HttpUrl=""
+				PDBPath=""
+				SQLDebugging=""
+				Environment=""
+				EnvironmentMerge="true"
+				DebuggerFlavor=""
+				MPIRunCommand=""
+				MPIRunArguments=""
+				MPIRunWorkingDirectory=""
+				ApplicationCommand=""
+				ApplicationArguments=""
+				ShimCommand=""
+				MPIAcceptMode=""
+				MPIAcceptFilter=""
+			/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			>
+			<DebugSettings
+				Command=""
+				WorkingDirectory=""
+				CommandArguments=""
+				Attach="false"
+				DebuggerType="3"
+				Remote="1"
+				RemoteMachine="4FIL49437"
+				RemoteCommand=""
+				HttpUrl=""
+				PDBPath=""
+				SQLDebugging=""
+				Environment=""
+				EnvironmentMerge="true"
+				DebuggerFlavor=""
+				MPIRunCommand=""
+				MPIRunArguments=""
+				MPIRunWorkingDirectory=""
+				ApplicationCommand=""
+				ApplicationArguments=""
+				ShimCommand=""
+				MPIAcceptMode=""
+				MPIAcceptFilter=""
+			/>
+		</Configuration>
+	</Configurations>
+</VisualStudioUserFile>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/symbian-qemu-0.9.1-12/model-libraries/syborg-graphicswrapper/target.mak	Fri Sep 24 13:30:20 2010 +0100
@@ -0,0 +1,58 @@
+# Copyright (c) 2010 Symbian Foundation.
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of the License "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Description:
+# Bottom level Makefile to build syborg-graphicswrapper library in the current directory
+
+include ../../../qemu-symbian-svp/config-host.mak
+
+sources := syborg-graphicswrapper.cpp
+objs := syborg-graphicswrapper.o
+libname := libsyborg-graphicswrapper.so
+soname := $(libname).1
+targ := $(soname).0
+ 
+.phony: all build clean install distclean uninstall
+
+cflags=-DHAVE_STDINT_H -DSYBORG_GRAPHICSWRAPPER_EXPORTS
+ifneq ($(DEBUG_LIBS),)
+cflags+="-O0 -g"
+else
+cflags+=-O2
+endif
+
+vpath %.cpp ..
+
+all: $(targ)
+
+%.o : %.cpp
+	g++ $(cflags) -fPIC -I../../commoninc -c -o $@ $<
+
+$(objs): $(sources)
+
+$(targ): $(objs)
+	g++ $(cflags) -shared -Wl,-soname,$(soname) -Wl,-l,stdc++ -o $@ $(objs)
+
+clean:
+	rm -f $(objs) $(targ)
+
+install: $(targ)
+	if [ ! -d "$(DESTDIR)$(libdir)" ]; then mkdir -p "$(DESTDIR)$(libdir)"; fi && \
+	$(INSTALL) -m 755 $(targ) "$(DESTDIR)$(libdir)" && \
+	rm -f "$(DESTDIR)$(libdir)/$(libname)" && \
+	ln -s "$(DESTDIR)$(libdir)/$(targ)" "$(DESTDIR)$(libdir)/$(libname)"
+
+distclean: clean
+#	Nothing for distclean
+
+uninstall:
+	rm -f "$(DESTDIR)$(libdir)/$(libname)" "$(DESTDIR)$(libdir)/$(targ)" && \
+	files=`ls -A "$(DESTDIR)$(libdir)"` && \
+	if [ -z "$$files" ]; then rmdir "$(DESTDIR)$(libdir)"; fi
+
+
+ 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/symbian-qemu-0.9.1-12/qemu-symbian-svp/plugins/syborg_graphicsdevice.py	Fri Sep 24 13:30:20 2010 +0100
@@ -0,0 +1,178 @@
+#
+# Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description: syborg_graphicsdevice.py
+#
+# Represents a graphics device register interface for quest OS in QEMU Syborg environment.
+#
+#
+
+import ctypes
+import qemu
+import sys
+import platform
+
+class syborg_graphicsdevice(qemu.devclass):
+    # Graphics device registers derived from VirtualVideoInterfaceConstants.h
+    VVI_R_ID                                = 0x0000
+    VVI_R_IRQ_ENABLE                        = 0x0004
+    VVI_R_IRQ_STATUS                        = 0x0008
+    VVI_R_COMMAND                           = 0x000c
+    VVI_R_PARAMETER_LOAD                    = 0x0010
+    VVI_R_ERROR                             = 0x0014
+    VVI_R_INPUT_BUFFER_TAIL                 = 0x0018
+    VVI_R_INPUT_BUFFER_HEAD                 = 0x001c
+    VVI_R_INPUT_BUFFER_READ_COUNT           = 0x0020
+    VVI_R_INPUT_BUFFER_WRITE_COUNT          = 0x0024
+    VVI_R_INPUT_BUFFER_MAX_TAIL             = 0x0028
+    VVI_R_REQUEST_ID                        = 0x002c
+    VVI_R_SHARED_CMD_MEMORY_BASE            = 0x0030
+    VVI_R_SHARED_FRAMEBUFFER_MEMORY_BASE    = 0x0034
+    VVI_R_LASTREG                           = 0x0038  # not a register, address of last register
+    
+    VVI_EXECUTE                             = 0
+    shared_cmd_memory_base                  = 0
+    shared_framebuffer_memory_base          = 0
+    m_request_id_reg = 0
+
+    host_os                             = platform.system()
+    # List of operating systems for this device
+    OS_WINDOWS                          = "Windows"
+    OS_LINUX                            = "Linux"
+
+    def create(self):
+        print "syborg_graphicsdevice: running on ", self.host_os
+        
+        # Add the supported and validated operating systems to the condition below
+        if( (self.host_os != self.OS_WINDOWS) ):
+            error_msg = "syborg_graphicsdevice: os support not validated: ", self.host_os
+            sys.exit( error_msg )
+
+        # Try open the syborg graphicswrapper library
+        try:
+            if( self.host_os == self.OS_WINDOWS ):
+                libname = "syborg-graphicswrapper.dll"
+            elif( self.host_os == self.OS_LINUX ):
+                libname = "syborg-graphicswrapper.so"
+            else:
+                # We should never end up here since the operating system check is done above
+                sys.exit( "syborg_graphicsdevice: library loading failed. Os not supported!" )
+            self.library = ctypes.CDLL(libname)
+        except Exception, e:
+            print repr(e)
+            error_msg = "syborg_graphicsdevice: " + libname + " load failed";
+            sys.exit( error_msg )
+
+        # Create an instance of syborg graphics wrapper
+        self.obj = self.library.create_SyborgGraphicsWrapper()
+            
+        self.library.initialize_SyborgGraphicsWrapper( self.obj )
+        self.initialize_graphics_callback()
+
+        self.irqenable = 0
+        self.irqstatus = 0
+        self.command = 0
+        self.parameterload = 0
+
+    def updateIrq(self,new_value):
+        self.set_irq_level(0, new_value)
+
+    def graphics_request_callback(self, request_id):
+        #print "graphics_request_callback: " , request_id
+        self.m_request_id_reg = request_id
+        self.updateIrq(1)
+        return 0
+        
+    def initialize_graphics_callback(self):
+        self.CALLBACKFUNC = ctypes.CFUNCTYPE(ctypes.c_int, ctypes.c_int)
+        self.graphics_callback = self.CALLBACKFUNC(self.graphics_request_callback)
+        self.library.set_GraphicsCallBack( self.obj, self.graphics_callback )
+            
+    def read_reg(self, offset):
+        offset >>= 2
+        if offset == self.VVI_R_ID:
+            return 0xDEADBEEF
+        elif offset == self.VVI_R_IRQ_ENABLE:
+            return self.irqenable
+        elif offset == self.VVI_R_IRQ_STATUS:
+            return self.irqstatus
+        elif offset == self.VVI_R_COMMAND:
+            return self.command
+        elif offset == self.VVI_R_PARAMETER_LOAD:
+            return self.parameterload
+        elif offset == self.VVI_R_ERROR:
+            self.lasterror = 0
+            return self.lasterror
+        elif offset == self.VVI_R_INPUT_BUFFER_TAIL:
+            return self.library.get_InputBufferTail( self.obj )
+        elif offset == self.VVI_R_INPUT_BUFFER_HEAD:
+            return self.library.get_InputBufferHead( self.obj )
+        elif offset == self.VVI_R_INPUT_BUFFER_READ_COUNT:
+            return self.library.get_InputBufferReadCount( self.obj )
+        elif offset == self.VVI_R_INPUT_BUFFER_WRITE_COUNT:
+            return self.library.get_InputBufferWriteCount( self.obj )
+        elif offset == self.VVI_R_INPUT_BUFFER_MAX_TAIL:
+            return self.library.get_InputMaxTailIndex( self.obj )
+        elif offset == self.VVI_R_REQUEST_ID:
+            return self.m_request_id_reg
+        elif offset == self.VVI_R_SHARED_CMD_MEMORY_BASE:
+            return self.shared_cmd_memory_base
+        elif offset == self.VVI_R_SHARED_FRAMEBUFFER_MEMORY_BASE:
+            return self.shared_framebuffer_memory_base
+        else:
+            reg_read_error = "syborg_graphicsdevice: Illegal register read at: ", offset 
+            sys.exit( reg_read_error )
+
+    def write_reg(self, offset, value):
+        offset >>= 2
+        if offset == self.VVI_R_IRQ_STATUS:
+            self.updateIrq(0);
+            self.library.signal_outputbuffer_semafore( self.obj )
+            self.library.execute_command( self.obj );
+        elif offset == self.VVI_R_COMMAND:
+            if value == self.VVI_EXECUTE:
+                self.library.execute_command( self.obj );
+            else:
+                sys.exit("syborg_graphicsdevice: Unknown command issued!")
+        elif offset == self.VVI_R_INPUT_BUFFER_TAIL:
+            self.library.set_InputBufferTail(  self.obj, value );
+        elif offset == self.VVI_R_INPUT_BUFFER_HEAD:
+            self.library.set_InputBufferHead( self.obj, value );
+        elif offset == self.VVI_R_INPUT_BUFFER_READ_COUNT:
+            self.library.set_InputBufferReadCount( self.obj, value );
+        elif offset == self.VVI_R_INPUT_BUFFER_WRITE_COUNT:
+            self.library.set_InputBufferWriteCount( self.obj, value );
+        elif offset == self.VVI_R_INPUT_BUFFER_MAX_TAIL:
+            self.library.set_InputMaxTailIndex( self.obj, value );
+        elif offset == self.VVI_R_SHARED_CMD_MEMORY_BASE:
+            gmemsize = self.library.get_cmd_memsize()
+            self.cmd_memregion = qemu.memregion( value, gmemsize )
+            self.memregion_cmd_base = self.cmd_memregion.region_host_addr()
+        elif offset == self.VVI_R_SHARED_FRAMEBUFFER_MEMORY_BASE:
+            gmemsize = self.library.get_framebuffer_memsize()
+            self.framebuffer_memregion = qemu.memregion( value, gmemsize )
+            self.memregion_framebuffer_base = self.framebuffer_memregion.region_host_addr()
+            # Ready to finalise graphics initialization
+            if( self.library.reset_SyborgGraphicsWrapper( self.obj, self.memregion_framebuffer_base, self.memregion_cmd_base ) != 0 ):
+                sys.exit("syborg_graphicsdevice: Syborg graphicsutils library not initialized correctly!")
+        else:
+            reg_write_error = "syborg_graphicsdevice: Illegal register write to: ", offset 
+            sys.exit( reg_write_error )
+
+    # Device class properties
+    regions = [qemu.ioregion(0x1000, readl=read_reg, writel=write_reg)]
+    irqs = 1
+    name = "syborg,graphicsdevice"
+    properties = {}
+
+qemu.register_device(syborg_graphicsdevice)