Merged patch from Johnathan White (@accenture)
authorMartin Trojer <martin.trojer@nokia.com>
Wed, 21 Oct 2009 10:29:21 +0100
changeset 16 73107a0bc259
parent 12 5c4b0c1fa5f8
child 17 ce408b731417
Merged patch from Johnathan White (@accenture) Added sound support and estart Updated framebuffer (support landscape and portrait mode) Fixes in pointer, keyboard and hostfs
.hgignore
baseport/syborg/bld.inf
baseport/syborg/bootstrap/syborg.inc
baseport/syborg/estart/estart.mmp
baseport/syborg/estart/estartmain.cpp
baseport/syborg/estart/readme.txt
baseport/syborg/fb/fb.mmp
baseport/syborg/fb/fb_landscape.mmp
baseport/syborg/fb/fb_portrait.mmp
baseport/syborg/fb/fb_portrait_wvga.mmp
baseport/syborg/fb/syborg_fb.cpp
baseport/syborg/fb/syborg_fb.h
baseport/syborg/keyboard/syborg_keyboard.h
baseport/syborg/keymap/keymap.cpp
baseport/syborg/pointer/pointer_landscape.mmp
baseport/syborg/pointer/pointer_portrait.mmp
baseport/syborg/pointer/syborg_pointer.cpp
baseport/syborg/pointer/syborg_pointer.h
baseport/syborg/rom/base_syborg.iby
baseport/syborg/rom/kernel.iby
baseport/syborg/serial/syborg_serial.cpp
baseport/syborg/soundsc/shared_sound.h
baseport/syborg/soundsc/shared_txsound.cpp
baseport/syborg/soundsc/soundsc.mmp
baseport/syborg/soundsc/variant_sound.cpp
baseport/syborg/soundsc/variant_sound.h
baseport/syborg/specific/syborg.cpp
baseport/syborg/svphostfs/driver/svphostfsdriver.cpp
baseport/syborg/svphostfs/fs/rsvphostfsdriver.cpp
baseport/syborg/svphostfs/fs/svphostdir.cpp
baseport/syborg/svphostfs/fs/svphostmnt.cpp
baseport/syborg/syborg.oby
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/.hgignore	Wed Oct 21 10:29:21 2009 +0100
@@ -0,0 +1,3 @@
+syntax: glob
+
+*~
--- a/baseport/syborg/bld.inf	Wed Oct 14 14:20:29 2009 +0100
+++ b/baseport/syborg/bld.inf	Wed Oct 21 10:29:21 2009 +0100
@@ -48,12 +48,24 @@
 kasyborg						// Variant library
 serial/serial					// Serial / UART ports
 fb/fb							// Framebuffer
+
+fb/fb_landscape
+fb/fb_portrait
+fb/fb_portrait_wvga
+
 keyboard/keyboard				// Keyboard
 pointer/pointer					// Pointer
+
+pointer/pointer_landscape.mmp
+pointer/pointer_portrait.mmp
+
 monitor/monap					// Crash Debugger output
 
 keymap/keymap					// Key mapping library
 
+estart/estart				// Customised estart to kick-start hostfs files system
+
+
 // platform device library - for flattened device tree (FDT)
 svpplatform/fdt
 
@@ -67,6 +79,10 @@
 svpsnapdriver/svpsnapdriver
 svpsnapdriver/snapapp
 
+
+//Add Sound Driver
+soundsc\soundsc
+
 PRJ_EXTENSIONS
 start		extension		base/config
 option		PREFIX			_syborg_
--- a/baseport/syborg/bootstrap/syborg.inc	Wed Oct 14 14:20:29 2009 +0100
+++ b/baseport/syborg/bootstrap/syborg.inc	Wed Oct 21 10:29:21 2009 +0100
@@ -20,7 +20,11 @@
 ;---------------------------------------------------------------------------
 
 KHwRamBaseAddr		EQU    0x00000000
+
+; More ram required to boot SF image
 KHwRamSizeMb            EQU    128			; 128MB
+;KHwRamSizeMb            EQU    256			; 256MB
+
 
 KHwNorFlashBaseAddr     EQU    0x40000000
 KHwNorFlashSize         EQU    0x04000000   ; 64MB
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/baseport/syborg/estart/estart.mmp	Wed Oct 21 10:29:21 2009 +0100
@@ -0,0 +1,58 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+
+
+#include        <variant.mmh>
+
+TARGET			VariantTarget(e32strt,exe)
+CAPABILITY		TCB WriteDeviceData DiskAdmin ProtServ AllFiles PowerMgmt
+
+TARGETTYPE		exe
+
+
+SOURCEPATH	\sf\os\kernelhwsrv\userlibandfileserver\fileserver\estart
+SOURCE			estart.cpp
+SOURCEPATH		../estart
+SOURCE			estartmain.cpp
+
+STRICTDEPEND
+
+//SOURCEPATH	.
+//DOCUMENT		 ../group/release.txt
+
+USERINCLUDE     \sf\os\kernelhwsrv\userlibandfileserver\fileserver\estart
+//SYSTEMINCLUDE	../inc /epoc32/include
+SYSTEMINCLUDE	/epoc32/include
+
+LIBRARY			efsrv.lib euser.lib hal.lib
+LIBRARY			domaincli.lib
+
+//#ifdef WINS
+//LIBRARY			emulator.lib
+//#endif
+
+//START WINS
+//BASEADDRESS		0x62000000
+//win32_library	kernel32.lib
+//END
+
+
+UID		0 0x10272C04
+VENDORID 0x70000001
+
+//#include "../group/f32.mmh"  	// Generic definitions for the whole f32 component
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/baseport/syborg/estart/estartmain.cpp	Wed Oct 21 10:29:21 2009 +0100
@@ -0,0 +1,83 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+/*
+ *
+ * This file starts the HOSTFS local drive mapping
+ *
+ */
+
+#include <e32std.h>
+#include "estart.h"
+
+#define __ENABLE_HOSTFS
+
+/*!
+ * Customised estart class
+ */
+class TSyborgFSStartup : public TFSStartup
+	{
+public:
+#ifdef __ENABLE_HOSTFS
+	virtual void InitHostFS();
+#endif
+	};
+	
+
+#ifdef __ENABLE_HOSTFS
+
+/*
+ *
+ * Run the Host FS starter program
+ *
+ */ 
+void TSyborgFSStartup::InitHostFS()
+	{ 
+_LIT(KHostFSMounter, "z:\\sys\\bin\\SVPHOSTFS.EXE");
+
+	RProcess ws;
+	TInt r=ws.Create(KHostFSMounter, KNullDesC);
+	if (r == KErrNone)
+        {
+		TRequestStatus stat;
+		ws.Rendezvous(stat);
+		ws.Resume();
+		User::WaitForRequest(stat);		// wait for start or death
+		ws.Close();
+		}
+	}	
+#endif
+
+
+/*!
+ * Estart entry point
+ */
+GLDEF_C TInt E32Main()
+	{
+	
+	TSyborgFSStartup fsStart;
+	fsStart.Init();
+	
+	fsStart.Run();
+#ifdef __ENABLE_HOSTFS
+	fsStart.InitHostFS();
+#endif
+	fsStart.StartSystem();
+			
+	fsStart.Close();
+	return(0);
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/baseport/syborg/estart/readme.txt	Wed Oct 21 10:29:21 2009 +0100
@@ -0,0 +1,21 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+
+See \sf\os\kernelhwsrv\userlibandfileserver\fileserver\estart
+
+
--- a/baseport/syborg/fb/fb.mmp	Wed Oct 14 14:20:29 2009 +0100
+++ b/baseport/syborg/fb/fb.mmp	Wed Oct 21 10:29:21 2009 +0100
@@ -21,6 +21,9 @@
 TARGET			VariantTarget(lcd,dll)
 TARGETTYPE		kext
 
+MACRO __PORTRAIT_DISPLAY__
+
+
 SYSTEMINCLUDE	AsspNKernIncludePath
 SYSTEMINCLUDE	.
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/baseport/syborg/fb/fb_landscape.mmp	Wed Oct 21 10:29:21 2009 +0100
@@ -0,0 +1,41 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+* Sosco
+*
+* Description:
+* Variant derived from fb.mmp
+*
+*/
+
+#include <variant.mmh>
+#include "kernel/kern_ext.mmh"
+
+TARGET			VariantTarget(lcd_landscape,dll)
+TARGETTYPE		kext
+
+SYSTEMINCLUDE	AsspNKernIncludePath
+SYSTEMINCLUDE	.
+
+SOURCEPATH		.
+SOURCE			syborg_fb.cpp
+
+LIBRARY			PlatformLib
+
+EPOCALLOWDLLDATA
+
+UID			    0x1000008d 0x100039e8
+VENDORID        0x70000001
+
+ROMTARGET		lcd.dll
+
+CAPABILITY		all
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/baseport/syborg/fb/fb_portrait.mmp	Wed Oct 21 10:29:21 2009 +0100
@@ -0,0 +1,43 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+* Sosco
+*
+* Description:
+* Variant derived from fb.mmp
+*
+*/
+
+#include <variant.mmh>
+#include "kernel/kern_ext.mmh"
+
+MACRO __PORTRAIT_DISPLAY__
+
+TARGET			VariantTarget(lcd_portrait,dll)
+TARGETTYPE		kext
+
+SYSTEMINCLUDE	AsspNKernIncludePath
+SYSTEMINCLUDE	.
+
+SOURCEPATH		.
+SOURCE			syborg_fb.cpp
+
+LIBRARY			PlatformLib
+
+EPOCALLOWDLLDATA
+
+UID			    0x1000008d 0x100039e8
+VENDORID        0x70000001
+
+ROMTARGET		lcd.dll
+
+CAPABILITY		all
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/baseport/syborg/fb/fb_portrait_wvga.mmp	Wed Oct 21 10:29:21 2009 +0100
@@ -0,0 +1,44 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+* Sosco
+*
+* Description:
+* Variant derived from fb.mmp
+*
+*/
+
+#include <variant.mmh>
+#include "kernel/kern_ext.mmh"
+
+MACRO __PORTRAIT_DISPLAY__
+MACRO __DISPLAY_WVGA__
+
+TARGET			VariantTarget(lcd_portrait_wvga,dll)
+TARGETTYPE		kext
+
+SYSTEMINCLUDE	AsspNKernIncludePath
+SYSTEMINCLUDE	.
+
+SOURCEPATH		.
+SOURCE			syborg_fb.cpp
+
+LIBRARY			PlatformLib
+
+EPOCALLOWDLLDATA
+
+UID			    0x1000008d 0x100039e8
+VENDORID        0x70000001
+
+ROMTARGET		lcd.dll
+
+CAPABILITY		all
\ No newline at end of file
--- a/baseport/syborg/fb/syborg_fb.cpp	Wed Oct 14 14:20:29 2009 +0100
+++ b/baseport/syborg/fb/syborg_fb.cpp	Wed Oct 21 10:29:21 2009 +0100
@@ -197,9 +197,13 @@
 
   if(aMode != aInfo.iDisplayMode)
 	{
-	  aInfo.iOffsetToFirstPixel = KCOnfigOffsetToFirstPixel;
+
+	  aInfo.iOffsetToFirstPixel = KConfigOffsetToFirstPixel;
+
 	  aInfo.iIsPalettized       = KConfigIsPalettized;
-	  aInfo.iOffsetBetweenLines = KCOnfigOffsetBetweenLines;
+
+	  aInfo.iOffsetBetweenLines = KConfigOffsetBetweenLines;
+
 	  aInfo.iBitsPerPixel       = KConfigBitsPerPixel;
 	}
   return KErrNone;
@@ -208,7 +212,10 @@
 TInt DLcdPowerHandler::AllocateFrameBuffer()
 {
 	// Allocate physical RAM for video
-	TInt vSize = TSyborg::VideoRamSize();
+
+// Added only the comments
+	TInt vSize = TSyborg::VideoRamSize(); // Maximum display now 854 x 854
+
 
 	NKern::ThreadEnterCS();
 	TInt r = Epoc::AllocPhysicalRam(vSize,Syborg::VideoRamPhys);
@@ -251,8 +258,10 @@
 	iVideoInfo.iSizeInPixels.iWidth  = KConfigLcdWidth;
 	iVideoInfo.iSizeInPixels.iHeight = KConfigLcdHeight;
 	iVideoInfo.iDisplayMode = KConfigLcdDisplayMode;
-	iVideoInfo.iOffsetToFirstPixel = KCOnfigOffsetToFirstPixel;
-	iVideoInfo.iOffsetBetweenLines = KCOnfigOffsetBetweenLines;
+
+	iVideoInfo.iOffsetToFirstPixel = KConfigOffsetToFirstPixel;
+	iVideoInfo.iOffsetBetweenLines = KConfigOffsetBetweenLines;
+
 	iVideoInfo.iIsPalettized = KConfigIsPalettized;
 	iVideoInfo.iBitsPerPixel = KConfigBitsPerPixel;
 	iVideoInfo.iSizeInTwips.iWidth = KConfigLcdWidthInTwips;
@@ -446,8 +455,10 @@
 	iVideoInfo.iSizeInPixels.iWidth  = KConfigLcdWidth;
 	iVideoInfo.iSizeInPixels.iHeight = KConfigLcdHeight;
 	iVideoInfo.iDisplayMode = KConfigLcdDisplayMode;
-	iVideoInfo.iOffsetToFirstPixel = KCOnfigOffsetToFirstPixel;
-	iVideoInfo.iOffsetBetweenLines = KCOnfigOffsetBetweenLines;
+
+	iVideoInfo.iOffsetToFirstPixel = KConfigOffsetToFirstPixel;
+	iVideoInfo.iOffsetBetweenLines = KConfigOffsetBetweenLines;
+
 	iVideoInfo.iIsPalettized = KConfigIsPalettized;
 	iVideoInfo.iBitsPerPixel = KConfigBitsPerPixel;
 	iVideoInfo.iSizeInTwips.iWidth = KConfigLcdWidthInTwips;
--- a/baseport/syborg/fb/syborg_fb.h	Wed Oct 14 14:20:29 2009 +0100
+++ b/baseport/syborg/fb/syborg_fb.h	Wed Oct 21 10:29:21 2009 +0100
@@ -24,15 +24,61 @@
 #include <kpower.h>
 #include <system.h>
 
+
+
+// The definition of __portrait_display__ in the MMP file affects
+// both the display and the pointer component, so both must be
+// rebuilt if this setting is changed.
+
+
 _LIT(KLitLcd,"SYBORG_FB");
 
-const TUint KConfigLcdWidth            = 640;
+
+#ifdef __PORTRAIT_DISPLAY__ // portrait display selected
+
+#	ifdef __DISPLAY_WVGA__
+
+#pragma comment(layout,"Portrait display enabled")
+const TUint KConfigLcdWidth            	= 854; // This must be left at 640, even with only 360 used by S60
+const TUint	KConfigLcdHeight	       	= 854;
+const TInt	KConfigLcdHeightInTwips     = 12860;
+const TInt	KConfigLcdWidthInTwips    	= 12860;
+const TUint	KConfigMouseWidth	       	= 480; // Usable width for the mouse driver
+const TUint	KConfigMouseMin			   	= 0;
+
+#	else //__DISPLAY_WVGA__
+
+#pragma comment(layout,"Portrait display enabled")
+const TUint KConfigLcdWidth            = 640; // This must be left at 640, even with only 360 used by S60
+const TUint	KConfigLcdHeight	       = 640;
+const TInt	KConfigLcdHeightInTwips     = 3550;
+const TInt	KConfigLcdWidthInTwips    = 3550;
+const TUint	KConfigMouseWidth	       = 360; // Usable width for the mouse driver
+
+const TUint	KConfigMouseMin			   = 0;
+#	endif //__DISPLAY_WVGA__
+
+
+
+
+#else // __PORTRAIT_DISPLAY__  Landscape display selected
+
+#pragma comment(layout,"Landscape display enabled")
+const TUint  KConfigLcdWidth            = 640;
 const TUint	KConfigLcdHeight	       = 480;
-const TInt	KConfigLcdWidthInTwips     = 9638;
-const TInt	KConfigLcdHeightInTwips    = 7370;
+const TInt	KConfigLcdWidthInTwips     = 3550;
+const TInt	KConfigLcdHeightInTwips    = 2670;
+const TUint	KConfigMouseWidth	       = 640; // Usable width for the mouse driver
+
+const TUint	KConfigMouseMin			   = 120; // mouse range is 120 - 480, not 0 - 360
+#endif // __PORTRAIT_DISPLAY__
+
+
 const TBool KConfigIsMono              = 0;
 const TBool KConfigIsPalettized        = 0;
-const TInt  KCOnfigOffsetToFirstPixel  = 0;
+
+const TInt  KConfigOffsetToFirstPixel  = 0;
+
 const TBool KConfigPixelOrderRGB       = 0;
 const TBool KConfigPixelOrderLandscape = 1;
 const TInt  KConfigLcdDisplayMode       = 2;
@@ -41,7 +87,13 @@
 
 
 const TInt  KConfigBitsPerPixel        = 24;
-const TInt  KCOnfigOffsetBetweenLines  = 2560;
+
+#ifdef __DISPLAY_WVGA__
+const TInt  KConfigOffsetBetweenLines  = 3416;
+#else //__DISPLAY_WVGA__
+const TInt  KConfigOffsetBetweenLines  = 2560;
+#endif //__DISPLAY_WVGA__
+
 
 class DLcdPowerHandler : public DPowerHandler
 {
@@ -72,7 +124,7 @@
   TInt GetSpecifiedDisplayModeInfo(TInt aMode, TVideoInfoV01& aInfo);
   TInt SetDisplayMode(TInt aMode);
   TInt AllocateFrameBuffer();
-  
+
   TBool iDisplayOn;
   DPlatChunkHw* iChunk;
   DPlatChunkHw* iSecureChunk;
@@ -83,7 +135,7 @@
   TDfcQue* iDfcQ;
   TMessageQue iMsgQ;					// to prevent a race condition with Power Manager trying to power up/down at the same time
   TDfc iPowerUpDfc;
-  TDfc iPowerDownDfc;	
+  TDfc iPowerDownDfc;
 
 private:
   TVideoInfoV01 iVideoInfo;
--- a/baseport/syborg/keyboard/syborg_keyboard.h	Wed Oct 14 14:20:29 2009 +0100
+++ b/baseport/syborg/keyboard/syborg_keyboard.h	Wed Oct 21 10:29:21 2009 +0100
@@ -144,11 +144,13 @@
 	/*3c*/ EStdKeyF2,
 	/*3d*/ EStdKeyF3,
 	/*3e*/ EStdKeyF4,
-	/*3f*/ EStdKeyF5,
-	
-	/*40*/ EStdKeyF6,
-	/*41*/ EStdKeyF7,
-	/*42*/ EStdKeyF8,
+
+	/*3f*/ EStdKeyDevice0,	//EStdKeyF5,	SF: Left soft-key [EStdKeyApplication0]
+
+	/*40*/ EStdKeyDevice3,	//EStdKeyF6,	SF: OK key
+	/*41*/ EStdKeyDevice1,	//EStdKeyF7,	SF: Right soft-key
+	/*42*/ EStdKeyApplication0, //EStdKeyF8, SF Menu key
+
 	/*43*/ EStdKeyF9,
 	/*44*/ EStdKeyF10,
 	/*45*/ EStdKeyNull,
@@ -161,7 +163,9 @@
 	/*4c*/ EStdKeyNull,
 	/*4d*/ EStdKeyRightArrow,
 	/*4e*/ EStdKeyNull,
-	/*4f*/ EStdKeyNull,
+
+	/*4f*/ EStdKeyEnd,
+
 	
 	/*50*/ EStdKeyDownArrow,
 	/*51*/ EStdKeyPageDown,
--- a/baseport/syborg/keymap/keymap.cpp	Wed Oct 14 14:20:29 2009 +0100
+++ b/baseport/syborg/keymap/keymap.cpp	Wed Oct 21 10:29:21 2009 +0100
@@ -1356,6 +1356,11 @@
 	{'0', '9'},
 	{'A', 'Z'},
 	{EStdKeyF1, EStdKeyDictaphoneRecord},
+
+	{EStdKeyDevice0,EStdKeyDeviceF},
+	{EStdKeyApplication0, EStdKeyApplicationF},
+	{EStdKeyYes, EStdKeyDecBrightness},
+
 	};
 
 LOCAL_D const TUint16 convKeyCodes_base[]=
@@ -1481,6 +1486,45 @@
     EKeyDictaphonePlay,
     EKeyDictaphoneStop,
     EKeyDictaphoneRecord,
+
+
+	EKeyDevice0,
+	EKeyDevice1,
+	EKeyDevice2,
+	EKeyDevice3,
+	EKeyDevice4,
+	EKeyDevice5,
+	EKeyDevice6,
+	EKeyDevice7,
+	EKeyDevice8,
+	EKeyDevice9,
+	EKeyDeviceA,
+	EKeyDeviceB,
+	EKeyDeviceC,
+	EKeyDeviceE,
+	EKeyDeviceE,
+	EKeyDeviceF,
+	EKeyApplication0,
+	EKeyApplication1,
+	EKeyApplication2,
+	EKeyApplication3,
+	EKeyApplication4,
+	EKeyApplication5,
+	EKeyApplication6,
+	EKeyApplication7,
+	EKeyApplication8,
+	EKeyApplication9,
+	EKeyApplicationA,
+	EKeyApplicationB,
+	EKeyApplicationC,
+	EKeyApplicationD,
+	EKeyApplicationE,
+	EKeyApplicationF,
+	EKeyYes,
+	EKeyNo,
+	EKeyIncBrightness,
+	EKeyDecBrightness
+
 	};
 
 // caps-lock: this table traps those scanCodes which are affected by caps-lock
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/baseport/syborg/pointer/pointer_landscape.mmp	Wed Oct 21 10:29:21 2009 +0100
@@ -0,0 +1,48 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+* Sosco - derived from pointer.mmp
+*
+* Description:
+* epointer.dll for landscape mode
+*
+*/
+
+#include <variant.mmh>
+#include "kernel/kern_ext.mmh"
+
+TARGET			VariantTarget(epointer_landscape,dll)
+TARGETTYPE		kext
+LINKAS			epointer.dll
+
+SYSTEMINCLUDE   .
+SYSTEMINCLUDE	AsspNKernIncludePath
+
+SOURCEPATH		.
+SOURCE			syborg_pointer.cpp
+
+//LIBRARY			ekern.lib
+LIBRARY			PlatformLib
+
+//NOEXPORTLIBRARY
+
+//DEFFILE			../e32/~/empty.def
+//DEFFILE			./~/cmse.def
+
+//NOSTRICTDEF
+
+UID				0x100039cf 0x100000db
+VENDORID        0x70000001
+
+CAPABILITY 		all
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/baseport/syborg/pointer/pointer_portrait.mmp	Wed Oct 21 10:29:21 2009 +0100
@@ -0,0 +1,50 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+* Sosco - derived from pointer.mmp
+*
+* Description:
+* epointer.dll for portrait mode
+*
+*/
+
+#include <variant.mmh>
+#include "kernel/kern_ext.mmh"
+
+MACRO __PORTRAIT_DISPLAY__
+
+TARGET			VariantTarget(epointer_portrait,dll)
+TARGETTYPE		kext
+LINKAS			epointer.dll
+
+SYSTEMINCLUDE   .
+SYSTEMINCLUDE	AsspNKernIncludePath
+
+SOURCEPATH		.
+SOURCE			syborg_pointer.cpp
+
+//LIBRARY			ekern.lib
+LIBRARY			PlatformLib
+
+//NOEXPORTLIBRARY
+
+//DEFFILE			../e32/~/empty.def
+//DEFFILE			./~/cmse.def
+
+//NOSTRICTDEF
+
+UID				0x100039cf 0x100000db
+VENDORID        0x70000001
+
+CAPABILITY 		all
+
+
--- a/baseport/syborg/pointer/syborg_pointer.cpp	Wed Oct 14 14:20:29 2009 +0100
+++ b/baseport/syborg/pointer/syborg_pointer.cpp	Wed Oct 21 10:29:21 2009 +0100
@@ -20,10 +20,29 @@
 #include <syborg_priv.h>
 #include "syborg_pointer.h"
 
-TPointerRv::TPointerRv():
-  iRxDfc(RxDfc,this,Kern::DfcQue0(),1)
+
+_LIT(KPointerDfcQNamePre,"PointDFC");
+const TInt KDfcQuePriority = 27;
+
+
+
+TPointerRv::TPointerRv() //sosco :
+//  iRxDfc(RxDfc,this,Kern::DfcQue0(),1)
+
 {
   __DEBUG_PRINT("TPointerRv::TPointerRv()");
+
+
+ TInt err = Kern::DfcQInit(&iDfcQue, KDfcQuePriority, &KPointerDfcQNamePre);
+ if (err)
+ 	{
+	__KTRACE_OPT(KPANIC, Kern::Printf("TPointerRv::TPointerRv() Error creating dfcq (%d)", err));
+	}
+
+  iRxDfc = new TDfc(RxDfc,this,&iDfcQue,1);
+  __ASSERT_ALWAYS(iRxDfc!=NULL,Kern::Printf("Failed to create DFC"));
+
+
   TInt r = Interrupt::Bind(EIntPointer,Isr,this);
   if(r != KErrNone)
 	__KTRACE_OPT(KPANIC, Kern::Printf("TPointerRv::TPointerRv() Interrupt::Bind(%d)=%d",
@@ -43,7 +62,7 @@
   struct TPointerRv::PData* val = &iPDataFifo[iFifoPos];
   iFifoPos++;
   iFifoCount--;
-  
+
   if (iFifoPos == FIFO_SIZE)
 	iFifoPos = 0;
 
@@ -53,10 +72,10 @@
 void TPointerRv::FifoPush(struct TPointerRv::PData* val)
 {
   TInt slot;
-  
+
   if (iFifoCount == FIFO_SIZE)
 	return;
-  
+
   slot = iFifoPos + iFifoCount;
   if (slot >= FIFO_SIZE)
 	slot -= FIFO_SIZE;
@@ -74,7 +93,7 @@
 
   TInt reg = ReadReg(KHwBaseKmiPointer,POINTER_ID);
   WriteReg(KHwBaseKmiPointer,POINTER_INT_ENABLE,1);
-  
+
   TInt r = Kern::AddHalEntry(EHalGroupMouse,DoPointerHalFunction,this);
   if(r != KErrNone)
 	__KTRACE_OPT(KPANIC, Kern::Printf("TPointerRv::Init3(): Kern::AddHalEntry()=%d", r));
@@ -86,16 +105,24 @@
   r = Kern::HalFunction(EHalGroupDisplay, EDisplayHalCurrentModeInfo, (TAny*)&buf, NULL);
   if(r != KErrNone)
 	__KTRACE_OPT(KPANIC, Kern::Printf("TPointerRv::Init3(): Kern::HalFunction(EDisplayHalCurrentModeInfo)=%d", r));
-  
+
   iScreenWidth  = videoInfo.iSizeInPixels.iWidth;
   iScreenHeight = videoInfo.iSizeInPixels.iHeight;
   iDisplayMode  = videoInfo.iDisplayMode;
+
+  iVideoMem = videoInfo.iVideoAddress + videoInfo.iOffsetToFirstPixel;
+  iOffSetBetweenEachLine = 640;
+
   ix = iy = 0;
 
   iXFactor = Fixed(iScreenWidth) / Fixed(0x8000);
   iYFactor = Fixed(iScreenHeight) / Fixed(0x8000);
-  
+
   iFifoPos = iFifoCount = 0;
+
+
+  iFirstTime= ETrue;
+
 }
 
 
@@ -108,7 +135,7 @@
 
   //  i->ix += pd->x;
   //  i->iy += pd->y;
-  
+
   i->ix = int(Fixed(pd->x) * i->iXFactor);
   i->iy = int(Fixed(pd->y) * i->iYFactor);
 
@@ -155,15 +182,98 @@
 
 	}
  fin:
+
+
+//  i->DisplayPointer();
+
+
   Kern::AddEvent(e);
   i->iLastBut = pd->but;
 }
 
+
+void TPointerRv::DisplayPointer()
+{
+
+TUint32 *pMem =0;
+TInt k=0;
+
+	if(!iFirstTime)
+	{
+
+	//restore old pointer position
+	pMem = (TUint32 *)iVideoMem;
+
+	pMem+= iYtop* iOffSetBetweenEachLine;
+	pMem+= iXleft;
+
+
+
+	for(TInt i=0;i<(iYbottom-iYtop);i++)
+	{
+		for(TInt j=0;j<(iXright-iXleft);j++)
+		{
+			*pMem = iImageStore[k];
+			pMem++;
+			k++;
+
+		}
+
+		pMem+= (iOffSetBetweenEachLine - iXright) + iXleft;
+	}
+	}
+
+	iFirstTime = EFalse;
+
+	//10*10 pixel pointer centered around position and check are within allowed bounds of screen
+	iXleft = ix - 5;
+
+	if(iXleft<0)
+		iXleft=0;
+
+	iXright = ix + 5;
+
+	if(iXright>iScreenWidth)
+		iXright = iScreenWidth;
+
+	iYtop = iy - 5;
+
+	if(iYtop<0)
+		iYtop=0;
+
+	iYbottom = iy +5;
+
+	if(iYbottom> iScreenHeight)
+		iYbottom=iScreenHeight;
+
+	pMem = (TUint32 *)iVideoMem;
+	k=0;
+
+	pMem+= iYtop* iOffSetBetweenEachLine;
+	pMem+= iXleft;
+
+	for(TInt i=0;i<(iYbottom-iYtop);i++)
+	{
+		for(TInt j=0;j<(iXright-iXleft);j++)
+		{
+			iImageStore[k] = *pMem;
+			*pMem = 0;
+			pMem++;
+			k++;
+
+		}
+
+		pMem+= (iOffSetBetweenEachLine - iXright) + iXleft;
+	}
+
+}
+
+
 void TPointerRv::RxDfc(TAny* aPtr)
 {
   __DEBUG_PRINT("TPointerRv::RxDfc");
 
-  TPointerRv* i = static_cast<TPointerRv*>(aPtr);  
+  TPointerRv* i = static_cast<TPointerRv*>(aPtr);
 
   while(i->iFifoCount>0) {
 	struct TPointerRv::PData *pd= i->FifoPop();
@@ -178,19 +288,30 @@
   TPointerRv& k = *(TPointerRv*)aPtr;
   // interrupts are now auto clear
 
-  while(ReadReg(KHwBaseKmiPointer, POINTER_FIFO_COUNT)!=0) {
+
+  while(ReadReg(KHwBaseKmiPointer, POINTER_FIFO_COUNT)!=0)
+  {
+
+	WriteReg(KHwBaseKmiPointer,POINTER_LATCH,1);
+	// SOSCO: moved to here, as the buffer seems to be running one notch out,
+	// writing to the pointer latch first seems to return the correct FIFO entry.
+
 	struct TPointerRv::PData pd;
 	pd.x = ReadReg(KHwBaseKmiPointer,POINTER_X);
 	pd.y = ReadReg(KHwBaseKmiPointer,POINTER_Y);
 	pd.z = ReadReg(KHwBaseKmiPointer,POINTER_Z);
-	pd.but = ReadReg(KHwBaseKmiPointer,POINTER_BUTTONS);  
+	pd.but = ReadReg(KHwBaseKmiPointer,POINTER_BUTTONS);
 	k.FifoPush(&pd);
-	WriteReg(KHwBaseKmiPointer,POINTER_LATCH,0);	
+
+// SOSCO - moved	WriteReg(KHwBaseKmiPointer,POINTER_LATCH,1);
+
   }
-  
+
   //  WriteReg(KHwBaseKmiPointer,POINTER_CLEAR_INT,0);
-  Interrupt::Clear(EIntPointer); 
-  k.iRxDfc.Add();
+  Interrupt::Clear(EIntPointer);
+
+  k.iRxDfc->Add();
+
 }
 
 TInt TPointerRv::DoPointerHalFunction(TAny* aThis, TInt aFunction, TAny* a1, TAny* a2)
@@ -210,24 +331,28 @@
 	  {
 		kumemput32(a1, (TBool*)&iPointerOn, sizeof(TBool));
 		break;
-	  }			
+	  }
 	case EMouseHalSetMouseState:
 	  {
+
+		  /* SOSCO - removed, causes platsec error
 	        __SECURE_KERNEL(
 	           if(!Kern::CurrentThreadHasCapability(ECapabilityMultimediaDD,
 		        __PLATSEC_DIAGNOSTIC_STRING("Checked by Hal function EMouseHalSetMouseState")))
 		     return KErrPermissionDenied;
 		   );
+		   */
+
 		if(((TBool)a1 == HAL::EMouseState_Visible) && (iPointerOn == (TBool)EFalse))
 		  {
 			iPointerOn=(TBool)ETrue;
-		  }            
-		else if(((TBool)a1 == HAL::EMouseState_Invisible) && (iPointerOn==(TBool)ETrue))        	    
+		  }
+		else if(((TBool)a1 == HAL::EMouseState_Invisible) && (iPointerOn==(TBool)ETrue))
 		  {
 			iPointerOn=(TBool)EFalse;
-		  }            
+		  }
 		break;
-	  }            
+	  }
 	case EMouseHalMouseInfo:
 	  {
 		TPckgBuf<TMouseInfoV01> vPckg;
@@ -239,30 +364,38 @@
 		xyinfo.iOffsetToDisplay.iY = 0;
 		Kern::InfoCopy(*(TDes8*)a1,vPckg);
 		break;
-	  }		    
+	  }
         case EMouseHalSetMouseSpeed:
 	  {
+
+		  /* SOSCO - removed, causes platsec error
 	        __SECURE_KERNEL(
 	           if(!Kern::CurrentThreadHasCapability(ECapabilityMultimediaDD,
 		        __PLATSEC_DIAGNOSTIC_STRING("Checked by Hal function EMouseHalSetMouseSpeed")))
 		     return KErrPermissionDenied;
 		   );
+		   */
+
 		// fall thru to NotSupported
 	  }
         case EMouseHalSetMouseAcceleration:
 	  {
+
+		  /* SOSCO - removed, causes platsec error
 	        __SECURE_KERNEL(
 	           if(!Kern::CurrentThreadHasCapability(ECapabilityMultimediaDD,
 		        __PLATSEC_DIAGNOSTIC_STRING("Checked by Hal function EMouseHalSetMouseAcceleration")))
 		     return KErrPermissionDenied;
 		   );
+		   */
+
 		// fall thru to NotSupported
 	  }
 	default:
 	  {
 		r = KErrNotSupported;
 		break;
-	  }			
+	  }
 	}
   return r;
 }
--- a/baseport/syborg/pointer/syborg_pointer.h	Wed Oct 14 14:20:29 2009 +0100
+++ b/baseport/syborg/pointer/syborg_pointer.h	Wed Oct 21 10:29:21 2009 +0100
@@ -60,16 +60,35 @@
   static void RxDfc(TAny* aPtr );
   static void Process(TPointerRv *i, struct PData *);
 
-  TDfc iRxDfc;
+  void DisplayPointer();
+
+
+
+  //TDfc iRxDfc;
+  TDfcQue iDfcQue;
+  TDfc* iRxDfc;
+
 	
   TBool iPointerOn;       // cursor visiability
   TInt  iScreenWidth;
   TInt  iScreenHeight;
   TInt  iDisplayMode;
 
+  TInt  iVideoMem;
+  TInt  iOffSetBetweenEachLine;
+
+
   TInt ix,iy;
   TInt iLastBut;
 
+
+  TBool iFirstTime;
+  TInt iXleft;
+  TInt iXright;
+  TInt iYtop;
+  TInt iYbottom;
+  TInt iImageStore[100];
+
   
  public:
 
--- a/baseport/syborg/rom/base_syborg.iby	Wed Oct 14 14:20:29 2009 +0100
+++ b/baseport/syborg/rom/base_syborg.iby	Wed Oct 21 10:29:21 2009 +0100
@@ -32,7 +32,11 @@
 bootbinary=		KERNEL_DIR\_PLATFORM_NAME_bootloader_bootrom.bin
 
 debugport 0
-romsize=0x2000000
+
+// Fixed rom over flow
+//romsize=0x2000000
+romsize=0x8000000
+
 romlinearbase=0x80000000
 romalign=0x10
 kerneldataaddress=0xC8000000
@@ -64,14 +68,35 @@
 // IEEE-mode VFP support
 extension[VARID]=	KERNEL_DIR\DEBUG_DIR\evfp.dll			        \sys\bin\evfp.dll
 
-extension[VARID]=	KERNEL_DIR\DEBUG_DIR\_PLATFORM_NAME_lcd.dll		\sys\bin\lcd.dll
+
+// Changes allowing us of either portrait or landscape mode
+//extension[VARID]=	KERNEL_DIR\DEBUG_DIR\_PLATFORM_NAME_lcd.dll		\sys\bin\lcd.dll
+#ifdef _PORTRAIT_
+
+#	ifdef _WVGA_
+extension[VARID]=KERNEL_DIR\DEBUG_DIR\_PLATFORM_NAME_lcd_portrait_wvga.dll		    \sys\bin\lcd.dll
+#	else //_WVGA_
+extension[VARID]=KERNEL_DIR\DEBUG_DIR\_PLATFORM_NAME_lcd_portrait.dll		    \sys\bin\lcd.dll
+#	endif //_WVGA_
+
+#else
+extension[VARID]=KERNEL_DIR\DEBUG_DIR\_PLATFORM_NAME_lcd_landscape.dll		    \sys\bin\lcd.dll
+#endif
 
 device[VARID]=		KERNEL_DIR\DEBUG_DIR\_PLATFORM_NAME_eserial.pdd		\sys\bin\euart1.pdd
 device[VARID]=		KERNEL_DIR\DEBUG_DIR\ecomm.ldd				\sys\bin\ecomm.ldd
 
 extension[VARID]=	KERNEL_DIR\DEBUG_DIR\elocd.ldd				\sys\bin\elocd.ldd
 
-extension[VARID]=	KERNEL_DIR\DEBUG_DIR\_PLATFORM_NAME_epointer.dll	\sys\bin\epointer.dll
+
+// Changes allowing us of either portrait or landscape mode
+//extension[VARID]=	KERNEL_DIR\DEBUG_DIR\_PLATFORM_NAME_epointer.dll	\sys\bin\epointer.dll
+#ifdef _PORTRAIT_
+extension[VARID]=	KERNEL_DIR\DEBUG_DIR\_PLATFORM_NAME_epointer_portrait.dll	\sys\bin\epointer.dll
+#else
+extension[VARID]=KERNEL_DIR\DEBUG_DIR\_PLATFORM_NAME_epointer_landscape.dll	        \sys\bin\epointer.dll
+#endif
+
 extension[VARID]=	KERNEL_DIR\DEBUG_DIR\_PLATFORM_NAME_medint.pdd	        \sys\bin\medint.pdd
 
 extension[VARID]=	KERNEL_DIR\DEBUG_DIR\exstart.dll		 	\sys\bin\exstart.dll
@@ -80,13 +105,18 @@
 extension[VARID]=	KERNEL_DIR\DEBUG_DIR\_PLATFORM_NAME_ekeyb.dll		\sys\bin\ekeyb.dll
 
 // Kernel pipe
-device[VARID]=		KERNEL_DIR\DEBUG_DIR\pipelib.ldd			\sys\bin\pipelib.ldd
+
+//device[VARID]	=KERNEL_DIR\DEBUG_DIR\pipelib.ldd					    \sys\bin\pipelib.ldd
+
 
 // Host Filesystem
 extension[VARID]=	KERNEL_DIR\DEBUG_DIR\_PLATFORM_NAME_svphostfsdriver.ldd sys\bin\svphostfsdriver.ldd
 file=			KERNEL_DIR\DEBUG_DIR\svphostfsy.fsy			sys\bin\svphostfsy.fsy
 file=			KERNEL_DIR\DEBUG_DIR\svphostfs.exe			sys\bin\svphostfs.exe
-file=			KERNEL_DIR\DEBUG_DIR\svphostfsstart.exe			sys\bin\sysstart.exe
+
+// Conflicts with /epoc32/rom/include/core/os/starter.iby
+//file=			KERNEL_DIR\DEBUG_DIR\svphostfsstart.exe			sys\bin\sysstart.exe
+
 
 // file=			KERNEL_DIR\DEBUG_DIR\stdnew.dll				sys\bin\stdnew.dll
 
@@ -98,10 +128,17 @@
 data=			EPOCROOT##epoc32\rom\syborg\estart.txt			\sys\data\estart.txt
 
 define	HAL_DLL		_PLATFORM_NAME_hal.dll
-define	ESTART_EXE	e32strt.exe
+
+//define	ESTART_EXE	e32strt.exe
+define	ESTART_EXE		_PLATFORM_NAME_e32strt.exe	// customised ESTART
+
 define	KEYMAP_FILE	_PLATFORM_NAME_ekdata
 #define	SCDV_DLL        _PLATFORM_NAME_scdv.dll
 #define	EUSER_DLL	_PLATFORM_NAME_euser.dll
 
+
+device[VARID]	=KERNEL_DIR\DEBUG_DIR\_PLATFORM_NAME_soundsc.pdd	    \sys\bin\soundsc.pdd
+device[VARID]	=KERNEL_DIR\DEBUG_DIR\esoundsc.ldd				            \sys\bin\esoundsc.ldd
+
 #endif  // __BASE_SYBORG_IBY__
 
--- a/baseport/syborg/rom/kernel.iby	Wed Oct 14 14:20:29 2009 +0100
+++ b/baseport/syborg/rom/kernel.iby	Wed Oct 21 10:29:21 2009 +0100
@@ -53,7 +53,11 @@
 extension[VARID]=	\epoc32\release\##KMAIN##\##BUILD##\_##VARIANT##_svphostfsdriver.ldd	\sys\bin\svphostfsdriver.ldd
 file=			\epoc32\release\##KMAIN##\##BUILD##\svphostfsy.fsy			\sys\bin\svphostfsy.fsy
 file=			\epoc32\release\##KMAIN##\##BUILD##\svphostfs.exe			\sys\bin\svphostfs.exe
-file=			\epoc32\release\##KMAIN##\##BUILD##\svphostfsstart.exe			\sys\bin\sysstart.exe
+
+//file=			\epoc32\release\##KMAIN##\##BUILD##\svphostfsstart.exe			\sys\bin\sysstart.exe
+#define CUSTOM_ESTART
+file=				\epoc32\release\##KMAIN##\##BUILD##\_##VARIANT##_e32strt.exe		sys\bin\estart.exe HEAPMAX (0x10000)
+
 
 // Snap Driver
 extension[VARID]=	\epoc32\release\##KMAIN##\##BUILD##\_##VARIANT##_svpsnapdriver.ldd  \sys\bin\svpsnapdriver.ldd
@@ -68,3 +72,7 @@
 
 extension[VARID]=	\epoc32\release\##KMAIN##\##BUILD##\_##VARIANT##_MEDINT.PDD	    \sys\bin\MEDINT.PDD
 //device[VARID]=	\epoc32\release\##KMAIN##\##BUILD##\D_DEBUG.LDD					\sys\bin\D_DEBUG.LDD
+
+device[VARID]	= \epoc32\release\##KMAIN##\##BUILD##\_##VARIANT##_soundsc.pdd	    \sys\bin\soundsc.pdd
+device[VARID]	= \epoc32\release\##KMAIN##\##BUILD##\esoundsc.ldd				            \sys\bin\esoundsc.ldd
+
--- a/baseport/syborg/serial/syborg_serial.cpp	Wed Oct 14 14:20:29 2009 +0100
+++ b/baseport/syborg/serial/syborg_serial.cpp	Wed Oct 21 10:29:21 2009 +0100
@@ -156,6 +156,10 @@
 		break;
 	  WriteReg(iPortAddr, SERIAL_DATA, r);
 	}
+
+	iLdd->iTxError = KErrNone;
+	iLdd->iTxCompleteDfc.Add();
+
 }
 
 TUint DCommSyborgSoc::Signals() const
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/baseport/syborg/soundsc/shared_sound.h	Wed Oct 21 10:29:21 2009 +0100
@@ -0,0 +1,90 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#ifndef __SYBORGSHARED_SOUND_H__
+#define __SYBORGSHARED_SOUND_H__
+
+#include <soundsc.h>
+
+#ifdef _DEBUG
+#define SYBORG_SOUND_DEBUG(x...) Kern::Printf(x)
+#else
+#define SYBORG_SOUND_DEBUG(x...)
+#endif
+
+class DDriverSyborgSoundScPddFactory;
+
+class DDriverSyborgSoundScPdd : public DSoundScPdd
+	{
+public:
+
+	DDriverSyborgSoundScPdd();
+	~DDriverSyborgSoundScPdd();
+	TInt DoCreate();
+	void GetChunkCreateInfo(TChunkCreateInfo& aChunkCreateInfo);
+	void Caps(TDes8& aCapsBuf) const;
+	TInt MaxTransferLen() const;
+	TInt SetConfig(const TDesC8& aConfigBuf);
+	TInt SetVolume(TInt aVolume);
+	TInt StartTransfer();
+	TInt TransferData(TUint aTransferID, TLinAddr aLinAddr, TPhysAddr aPhysAddr, TInt aNumBytes);
+	void StopTransfer();
+	TInt PauseTransfer();
+	TInt ResumeTransfer();
+	TInt PowerUp();
+	void PowerDown();
+	TInt CustomConfig(TInt aFunction, TAny* aParam);
+	void Callback(TUint aTransferID, TInt aTransferResult, TInt aBytesTransferred);
+
+	void SetCaps();
+	TDfcQue* DfcQ();
+	
+	TInt CalculateBufferTime(TInt aNumBytes);
+
+public:
+	
+	DDriverSyborgSoundScPddFactory*	iPhysicalDevice;
+	
+	class TTransferArrayInfo{
+
+public:
+	TUint 						iTransferID;
+	TLinAddr 					iLinAddr;
+	TInt 						iNumBytes;
+	TInt						iPlayTime;
+	};
+	
+	RArray<TTransferArrayInfo> iTransferArray;
+	
+	NTimer						iTimer;
+	
+	TInt						iUnitType; //Play or Record
+	
+private:
+
+	TSoundFormatsSupportedV02	iCaps;
+	
+	TCurrentSoundFormatV02		iConfig;
+	
+
+
+	};
+
+
+
+
+#endif 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/baseport/syborg/soundsc/shared_txsound.cpp	Wed Oct 21 10:29:21 2009 +0100
@@ -0,0 +1,312 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#include "shared_sound.h"
+#include "variant_sound.h"
+
+void TimerCallback(TAny* aData)
+	{
+	DDriverSyborgSoundScPdd * soundscpdd = (DDriverSyborgSoundScPdd*) aData;
+		
+	soundscpdd->Callback(soundscpdd->iTransferArray[0].iTransferID, KErrNone, soundscpdd->iTransferArray[0].iNumBytes);
+	
+	}
+
+
+DDriverSyborgSoundScPdd::DDriverSyborgSoundScPdd() : iTimer(TimerCallback,this)
+	{
+
+	}
+
+DDriverSyborgSoundScPdd::~DDriverSyborgSoundScPdd()
+	{
+	iTimer.Cancel();
+	}
+
+
+TInt DDriverSyborgSoundScPdd::DoCreate()
+	{
+
+	SetCaps();
+
+	SYBORG_SOUND_DEBUG("DDriverSyborgSoundScPdd::DoCreate TxPdd");
+	
+	return KErrNone;
+	}
+
+void DDriverSyborgSoundScPdd::GetChunkCreateInfo(TChunkCreateInfo& aChunkCreateInfo)
+	{
+	SYBORG_SOUND_DEBUG("DDriverSyborgSoundScPdd::GetChunkCreateInfo TxPdd");
+	
+	aChunkCreateInfo.iType = TChunkCreateInfo::ESharedKernelMultiple;
+	aChunkCreateInfo.iMapAttr = EMapAttrFullyBlocking; 	// No caching
+	aChunkCreateInfo.iOwnsMemory = ETrue; 				// Using RAM pages
+	aChunkCreateInfo.iDestroyedDfc = NULL; 				// No chunk destroy DFC
+	}
+
+void DDriverSyborgSoundScPdd::Caps(TDes8& aCapsBuf) const
+	{
+
+	SYBORG_SOUND_DEBUG("DDriverSyborgSoundScPdd::Caps TxPdd");
+	
+	// Fill the structure with zeros in case it is a newer version than we know about
+	aCapsBuf.FillZ(aCapsBuf.MaxLength());
+
+	// And copy the capabilities into the packaged structure
+	TPtrC8 ptr((const TUint8*) &iCaps, sizeof(iCaps));
+	aCapsBuf = ptr.Left(Min(ptr.Length(), aCapsBuf.MaxLength()));
+	}
+
+TInt DDriverSyborgSoundScPdd::SetConfig(const TDesC8& aConfigBuf)
+	{
+
+	SYBORG_SOUND_DEBUG("DDriverSyborgSoundScPdd::SetConfig TxPdd");
+	
+	// Read the new configuration from the LDD
+	TCurrentSoundFormatV02 config;
+	TPtr8 ptr((TUint8*) &config, sizeof(config));
+	Kern::InfoCopy(ptr, aConfigBuf);
+
+	iConfig = config;
+	
+	return KErrNone;
+	}
+
+
+TInt DDriverSyborgSoundScPdd::SetVolume(TInt aVolume)
+	{
+	
+	SYBORG_SOUND_DEBUG("DDriverSyborgSoundScPdd::Setvolume TxPdd");
+	
+	return KErrNone;
+	}
+
+
+TInt DDriverSyborgSoundScPdd::StartTransfer()
+	{
+	
+	SYBORG_SOUND_DEBUG("DDriverSyborgSoundScPdd::starttransfer TxPdd");
+	
+	//Prepare for transfer
+	return KErrNone;
+	
+	}
+
+TInt DDriverSyborgSoundScPdd::CalculateBufferTime(TInt aNumBytes)
+	{
+	
+	TUint samplerate=0;
+
+	// Let the compiler perform an integer division of rates
+	switch(iConfig.iRate)
+		{
+		case ESoundRate7350Hz: 	samplerate = 7350; break;
+		case ESoundRate8000Hz: 	samplerate = 8000; break;
+		case ESoundRate8820Hz: 	samplerate = 8820; break;
+		case ESoundRate9600Hz: 	samplerate = 9600; break;
+		case ESoundRate11025Hz: samplerate = 11025; break;
+		case ESoundRate12000Hz: samplerate = 12000; break;
+		case ESoundRate14700Hz:	samplerate = 14700; break;
+		case ESoundRate16000Hz: samplerate = 16000; break;
+		case ESoundRate22050Hz: samplerate = 22050; break;
+		case ESoundRate24000Hz: samplerate = 24000; break;
+		case ESoundRate29400Hz: samplerate = 29400; break;
+		case ESoundRate32000Hz: samplerate = 32000; break;
+		case ESoundRate44100Hz: samplerate = 44100; break;
+		case ESoundRate48000Hz: samplerate = 48000; break;
+		}
+
+
+	// integer division by number of channels
+	aNumBytes /= iConfig.iChannels;
+
+	SYBORG_SOUND_DEBUG("DDriverSyborgSoundScPdd::iChannels =%d", iConfig.iChannels);
+	SYBORG_SOUND_DEBUG("DDriverSyborgSoundScPdd::iEncoding =%d", iConfig.iEncoding);
+	
+	// integer division by bytes per sample
+	switch(iConfig.iEncoding)
+		{
+		case ESoundEncoding8BitPCM: break;
+		case ESoundEncoding16BitPCM: aNumBytes /= 2; break;
+		case ESoundEncoding24BitPCM: aNumBytes /= 3; break;
+		}
+
+	return (aNumBytes * 1000) / samplerate; //return time in milliseconds
+	
+
+	}
+
+TInt DDriverSyborgSoundScPdd::TransferData(TUint aTransferID, TLinAddr aLinAddr, TPhysAddr /*aPhysAddr*/, TInt aNumBytes)
+	{
+
+	//function wil get called multiple times while transfer is in progress therefore keep fifo queue of requests
+	TTransferArrayInfo transfer;	
+		
+	transfer.iTransferID = aTransferID;
+	transfer.iLinAddr = aLinAddr;
+	transfer.iNumBytes = aNumBytes;
+	
+	//calculate the amount of time required to play/record buffer
+	TInt buffer_play_time = CalculateBufferTime(aNumBytes);
+	TInt timerticks = NKern::TimerTicks(buffer_play_time);
+	transfer.iPlayTime = timerticks;
+	
+	iTransferArray.Append(transfer);
+	
+	//Timer will callback when correct time has elapsed, will return KErrInUse if transfer
+	//already active, this is ok becuase will be started again in callback
+	TInt err = iTimer.OneShot(timerticks, ETrue);
+	
+	
+	return KErrNone;
+	}
+
+void DDriverSyborgSoundScPdd::StopTransfer()
+	{
+	// Stop transfer
+	SYBORG_SOUND_DEBUG("DDriverSyborgSoundScPdd::stoptransfer TxPdd");
+	
+	//If timer is currently active then cancel it and call back buffer
+	if(iTimer.Cancel())
+		{
+		Callback(iTransferArray[0].iTransferID, KErrNone, iTransferArray[0].iNumBytes);
+		}
+		
+
+	}
+
+
+TInt DDriverSyborgSoundScPdd::PauseTransfer()
+	{
+	SYBORG_SOUND_DEBUG("DDriverSyborgSoundScPdd::pausetransfer TxPdd");
+	//Pause Transfer
+	
+	return KErrNone;
+	}
+
+
+TInt DDriverSyborgSoundScPdd::ResumeTransfer()
+	{
+	SYBORG_SOUND_DEBUG("DDriverSyborgSoundScPdd::resumetransfer TxPdd");
+	//Resume Transfer
+	
+	return KErrNone;
+	}
+
+TInt DDriverSyborgSoundScPdd::PowerUp()
+	{
+	SYBORG_SOUND_DEBUG("DDriverSyborgSoundScPdd::PowerUp TxPdd");
+	return KErrNone;
+	}
+
+void DDriverSyborgSoundScPdd::PowerDown()
+	{
+	SYBORG_SOUND_DEBUG("DDriverSyborgSoundScPdd::Powerdown TxPdd");
+	}
+
+TInt DDriverSyborgSoundScPdd::CustomConfig(TInt /*aFunction*/,TAny* /*aParam*/)
+	{
+	SYBORG_SOUND_DEBUG("DDriverSyborgSoundScPdd::customconfig TxPdd");
+	return KErrNotSupported;
+	}
+
+
+void DDriverSyborgSoundScPdd::Callback(TUint aTransferID, TInt aTransferResult, TInt aBytesTransferred)
+	{
+	SYBORG_SOUND_DEBUG("DDriverSyborgSoundScPdd::playcallback TxPdd");
+	//Callback when Transfer completes or is stopped
+	
+	iTransferArray.Remove(0);
+	
+	if(iUnitType == KSoundScTxUnit0)
+		{
+		Ldd()->PlayCallback(aTransferID, aTransferResult, aBytesTransferred);
+		}
+	else if(iUnitType == KSoundScRxUnit0)
+		{
+		Ldd()->RecordCallback(aTransferID, aTransferResult, aBytesTransferred);
+		}
+	
+	if(	iTransferArray.Count()>0)
+		{
+		iTimer.OneShot(iTransferArray[0].iPlayTime, ETrue);
+		}
+	
+	}
+
+TDfcQue*DDriverSyborgSoundScPdd::DfcQ()
+	{
+	return iPhysicalDevice->iDfcQ;
+	}
+
+
+TInt DDriverSyborgSoundScPdd::MaxTransferLen() const
+	{
+	
+	SYBORG_SOUND_DEBUG("DDriverSyborgSoundScPdd::MaxTransferLen TxPdd");
+	
+	TInt maxlength = 200*1024;
+	return maxlength;
+	}
+
+
+void DDriverSyborgSoundScPdd::SetCaps()
+	{
+	SYBORG_SOUND_DEBUG("DDriverSyborgSoundScPdd::SetCaps TxPdd");
+	
+	if(iUnitType == KSoundScTxUnit0)
+		{
+		// The data transfer direction for this unit is play
+		iCaps.iDirection = ESoundDirPlayback;
+		}
+	else if(iUnitType == KSoundScTxUnit0)
+		{
+		// The data transfer direction for this unit is play
+		iCaps.iDirection = ESoundDirRecord;
+		}
+	
+	// This unit supports both mono and stereo
+	iCaps.iChannels = (KSoundMonoChannel | KSoundStereoChannel);
+
+	// This unit supports only some of the sample rates offered by Symbian OS
+	iCaps.iRates = (KSoundRate8000Hz | KSoundRate11025Hz | KSoundRate12000Hz | KSoundRate16000Hz |
+					KSoundRate22050Hz | KSoundRate24000Hz | KSoundRate32000Hz | KSoundRate44100Hz |
+					KSoundRate48000Hz);
+
+	// This unit only supports 16bit PCM encoding
+	iCaps.iEncodings = KSoundEncoding16BitPCM;
+
+	// This unit only supports interleaved data format when playing stereo;  that is, a PCM data
+	// stream where the left and right channel samples are interleaved as L-R-L-R-L-R etc.
+	iCaps.iDataFormats = KSoundDataFormatInterleaved;
+
+	// The iRequestMinSize member is named badly.  It is actually the value of which the length samples
+	// must be a multiple of.  ie.  The sample length % iRequestMinSize must == 0.  This value must always
+	// be a power of 2
+	iCaps.iRequestMinSize = 4;
+
+	// The logarithm to base 2 of the alignment required for request arguments.  DMA requests must be
+	// aligned to a 32 bit boundary
+	iCaps.iRequestAlignment = 2;
+
+	// This unit is not capable of detecting changes in hardware configuration
+	iCaps.iHwConfigNotificationSupport = EFalse;
+	}
+
+
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/baseport/syborg/soundsc/soundsc.mmp	Wed Oct 21 10:29:21 2009 +0100
@@ -0,0 +1,32 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#include		<variant.mmh>
+#include		"kernel/kern_ext.mmh"
+
+SYSTEMINCLUDE		/epoc32/include/drivers
+
+
+TARGET			VariantTarget(soundsc,pdd)
+TARGETTYPE		pdd
+ROMTARGET		soundsc.pdd
+
+SOURCE			shared_txsound.cpp
+SOURCE			variant_sound.cpp
+
+CAPABILITY		all
+EPOCALLOWDLLDATA
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/baseport/syborg/soundsc/variant_sound.cpp	Wed Oct 21 10:29:21 2009 +0100
@@ -0,0 +1,128 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#include "variant_sound.h"
+
+_LIT(KSoundScPddName, "SoundSc.Syborg");
+
+
+DECLARE_STANDARD_PDD()
+	{
+	return new DDriverSyborgSoundScPddFactory;
+	}
+
+
+DDriverSyborgSoundScPddFactory::DDriverSyborgSoundScPddFactory()
+	{
+
+	iUnitsMask = ((1 << KSoundScTxUnit0) | (1 << KSoundScRxUnit0));
+
+	iVersion = RSoundSc::VersionRequired();
+	}
+
+
+TInt DDriverSyborgSoundScPddFactory::Install()
+	{
+	_LIT(KAudioDFC, "AUDIO DFC");
+	// Get a pointer to the the McBSP's DFC Queue so that handling of both McBSP callbacks and requests
+	// made to the LDD from user mode can be processed in the same thread, to avoid the use of semaphores
+	TInt r = Kern::DfcQCreate(iDfcQ, 26, &KAudioDFC);
+
+	SYBORG_SOUND_DEBUG("DDriverSyborgSoundScPddFactory::PDD install");
+
+	if(r==KErrNone)
+		{
+		// All PDD factories must have a unique name
+		TInt r = SetName(&KSoundScPddName);
+		}
+
+	return r;
+	}
+
+void DDriverSyborgSoundScPddFactory::GetCaps(TDes8& /*aDes*/) const
+	{
+	}
+
+
+TInt DDriverSyborgSoundScPddFactory::Validate(TInt aUnit, const TDesC8* /*aInfo*/, const TVersion& aVer)
+	{
+	// Check that the version requested is less than or equal to the version of this PDD
+	if (!Kern::QueryVersionSupported(RSoundSc::VersionRequired(), aVer))
+		{
+		SYBORG_SOUND_DEBUG("DDriverSyborgSoundScPddFactory::Validate KErrNotSup1");
+		return KErrNotSupported;
+		}
+
+	// Check the unit number specifies either playback or recording
+	if ((aUnit != KSoundScTxUnit0) && (aUnit != KSoundScRxUnit0))
+		{
+		SYBORG_SOUND_DEBUG("DDriverSyborgSoundScPddFactory::Validate KErrNotSup2");
+		return KErrNotSupported;
+		}
+
+	SYBORG_SOUND_DEBUG("DDriverSyborgSoundScPddFactory::Validate KErrNone");
+	return KErrNone;
+	}
+
+TInt DDriverSyborgSoundScPddFactory::Create(DBase*& aChannel, TInt aUnit, const TDesC8* /*aInfo*/, const TVersion& /*aVer*/)
+	{
+
+	DSoundScPdd* pD = NULL;
+
+	SYBORG_SOUND_DEBUG("DDriverSyborgSoundScPddFactory::PDD create aUnit %d TxUnitId %d", aUnit, KSoundScTxUnit0);
+
+	// Assume failure
+	TInt r = KErrNoMemory;
+	aChannel = NULL;
+
+				
+	DDriverSyborgSoundScPdd* pTxD = new DDriverSyborgSoundScPdd;
+
+	SYBORG_SOUND_DEBUG("DDriverSyborgSoundScPddFactory::TxPdd %d", pTxD);
+		
+	if (pTxD)
+		{
+		pD = pTxD;
+
+		// Save a pointer to the factory so that it is accessible by the PDD and call the PDD's
+		// second stage constructor
+		pTxD->iPhysicalDevice = this;
+			
+		pTxD->iUnitType = aUnit; // Either KSoundScTxUnit0 or KSoundScRxUnit0 (play or record)
+			
+		SYBORG_SOUND_DEBUG("DDriverSyborgSoundScPddFactory::TxPdd2 %d", pTxD);
+			
+		r = pTxD->DoCreate();
+			
+		SYBORG_SOUND_DEBUG("DDriverSyborgSoundScPddFactory::Create ret %d", r);
+			
+		}
+	
+	// If everything succeeded, save a pointer to the PDD.  This should only be done if DoCreate() succeeded,
+	// as some LDDs have been known to access this pointer even if Create() returns an error!
+	if (r == KErrNone)
+		{
+		aChannel = pD;
+		SYBORG_SOUND_DEBUG("DDriverSyborgSoundScPddFactory::TxPdd set AChannel %d", aChannel);
+		}
+	else
+		{
+		delete pD;
+		}
+
+	return r;
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/baseport/syborg/soundsc/variant_sound.h	Wed Oct 21 10:29:21 2009 +0100
@@ -0,0 +1,40 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* 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".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#ifndef __SYBORGVARIANT_SOUND_H__
+#define __SYBORGVARIANT_SOUND_H__
+
+#include "shared_sound.h"
+
+class DDriverSyborgSoundScPddFactory : public DPhysicalDevice
+	{
+public:
+
+	DDriverSyborgSoundScPddFactory();
+	TInt Install();
+	void GetCaps(TDes8 &aDes) const;
+	TInt Create(DBase*& aChannel, TInt aUnit, const TDesC8* anInfo, const TVersion &aVer);
+	TInt Validate(TInt aUnit, const TDesC8* anInfo, const TVersion &aVer);
+
+public:
+
+	/** The DFC queue to be used by both the LDD and the PDD to serialise access to the PDD */
+	TDfcQue*		iDfcQ;
+
+	};
+
+#endif 
--- a/baseport/syborg/specific/syborg.cpp	Wed Oct 14 14:20:29 2009 +0100
+++ b/baseport/syborg/specific/syborg.cpp	Wed Oct 21 10:29:21 2009 +0100
@@ -27,7 +27,7 @@
 
 void TSyborg::Init3()
 {
-//  SetTimerMode(KHwBaseCounterTimer, ETimerModePeriodic); 
+//  SetTimerMode(KHwBaseCounterTimer, ETimerModePeriodic);
 //  EnableTimer(KHwBaseCounterTimer, EEnable);
 }
 
@@ -105,10 +105,12 @@
 
 EXPORT_C TInt TSyborg::VideoRamSize()
 {
-  return 4*640*480;
+
+  return 4*854*854; // Now allow for 854 x 854 display, instead of 480 x 640
+
 }
 
-// !@! 
+// !@!
 EXPORT_C TPhysAddr TSyborg::VideoRamPhys()
 {
 #if 0
--- a/baseport/syborg/svphostfs/driver/svphostfsdriver.cpp	Wed Oct 14 14:20:29 2009 +0100
+++ b/baseport/syborg/svphostfs/driver/svphostfsdriver.cpp	Wed Oct 21 10:29:21 2009 +0100
@@ -416,7 +416,14 @@
 	
 	if (KErrNone != err)
 		{
-		DP("Error %d from DoRequest", err);
+
+		if (err == KErrNotSupported)
+			{
+			err = KErrNone; // trap KErrNotSupported
+			}
+				
+		DP("Error %d from DoRequest %d", err, aReqNo);
+
 		}
 	
 	return err;
@@ -437,6 +444,12 @@
 
 	if (KErrNone != err)
 		{
+
+		if (err == KErrNotSupported)
+			{
+			err = KErrNone; // trap KErrNotSupported
+			}
+
 		DP("** (SVPHOSTFSDRIVER) Error %d from control function", err);
 		}
 	
@@ -501,7 +514,16 @@
 	SVPWriteReg(device, EArg2, info.iFlags);
 	SVPInvoke(device, RSVPHostFsDriver::EMkDir);
 
-	return SVPReadReg(device, EResult);
+
+	//return SVPReadReg(device, EResult);
+	
+	err = SVPReadReg(device, EResult);
+	
+	if(err == KErrPathNotFound)
+		err = KErrNotFound;
+	
+	return err;
+
 
 	}
 
@@ -637,7 +659,20 @@
 	SVPWriteReg(device, EArg1, info.iLength);
 	SVPInvoke(device, RSVPHostFsDriver::EEntry);
 
-	RET_IF_ERROR(err, SVPReadReg(device, EResult));
+
+	//RET_IF_ERROR(err, SVPReadReg(device, EResult));
+	
+	err = SVPReadReg(device, EResult);
+	
+	if(err!=KErrNone)
+		{
+		if(err == KErrPathNotFound)
+			err = KErrNotFound;
+		
+		return err;
+		}
+
+	
 
 	TUint32 att = SVPReadReg(device, EArg0);
 	TUint32 modified = SVPReadReg(device, EArg1);
@@ -690,7 +725,20 @@
 	SVPWriteReg(device, EArg1, info.iLength);
 	SVPInvoke(device, RSVPHostFsDriver::EDirOpen);
 
-	RET_IF_ERROR(err, SVPReadReg(device, EResult));
+
+	//RET_IF_ERROR(err, SVPReadReg(device, EResult));
+	
+	err = SVPReadReg(device, EResult);
+	
+	if(err!=KErrNone)
+		{
+		
+		if(err==KErrPathNotFound)
+			err=KErrNotFound;
+		
+		return err;
+		}
+
 
 	// handle is in arg 0
 	TUint32 handle = SVPReadReg(device, EArg0);
@@ -719,7 +767,20 @@
 	SVPWriteReg(device, EArg3, info.iOpen);
 	SVPInvoke(device, RSVPHostFsDriver::EFileOpen);
 
-	RET_IF_ERROR(err, SVPReadReg(device, EResult));
+
+	//RET_IF_ERROR(err, SVPReadReg(device, EResult));
+	
+	err = SVPReadReg(device, EResult);
+		
+	if(err!=KErrNone)
+		{
+		if(err == KErrPathNotFound)
+			err = KErrNotFound;
+		
+		return err;
+		}
+
+	
 
 	TUint32 handle = SVPReadReg(device, EArg0);
 	TUint32 att = SVPReadReg(device, EArg1);
@@ -797,7 +858,20 @@
 	SVPWriteReg(device, EArg3, info.iLength);	
 	SVPInvoke(device, RSVPHostFsDriver::EFileWrite);
 
-	RET_IF_ERROR(err, SVPReadReg(device, EResult));
+
+	// RET_IF_ERROR(err, SVPReadReg(device, EResult));
+	
+	err = SVPReadReg(device, EResult);
+	
+	if(err!=KErrNone)
+		{
+		if(err == KErrPathNotFound)
+			err = KErrNotFound;
+		
+		return err;
+		}
+
+	
 
 	TUint32 len = SVPReadReg(device, EArg0);
 
@@ -831,7 +905,9 @@
 	{
         DP("** (SVPHOSTFSDRIVER) DSVPHostFsChannel::FileSetEntry()");
 
-	return KErrNotSupported;
+
+	return KErrNone;
+
 	}
 
 TInt DSVPHostFsChannel::DirClose(TUint32 aDrive, TUint32 aHandle)
--- a/baseport/syborg/svphostfs/fs/rsvphostfsdriver.cpp	Wed Oct 14 14:20:29 2009 +0100
+++ b/baseport/syborg/svphostfs/fs/rsvphostfsdriver.cpp	Wed Oct 21 10:29:21 2009 +0100
@@ -10,6 +10,7 @@
 * Nokia Corporation - initial contribution.
 *
 * Contributors:
+* Sosco - bug fixes
 *
 * Description:
 *
@@ -92,6 +93,19 @@
 TInt RSVPHostFsDriver::FileClose(TUint32 aDrive, TUint32 aHandle)
 	{
 	DP(_L("** (rsvphostfsdriver.cpp) RSVPHostFsDriver::FileClose()"));
+
+	// If attempt is made to access a file which does
+	// not exist, it will not give a handle to close afterwards.
+	// Attempting to call FileClose on this with an invalid handle
+	// results in the error code KErrBadHandle (-8) being returned.
+	// Some UI's cannot cope properly with this error code, resulting
+	// in various servers repeatedly closing and reopening. To prevent
+	// this,we trap it here and return KErrNone as though the call
+	// completed properly without error.
+	if (aHandle == 0)  
+	  return KErrNone; // Bad handle, so exit immediately with KErrNone
+	else
+
 	return DoSVPRequest(EFileClose, (TAny *)aDrive, (TAny *)aHandle);
 	}
 
@@ -140,6 +154,20 @@
 TInt RSVPHostFsDriver::DirClose(TUint32 aDrive, TUint32 aHandle)
 	{
 	DP(_L("** (rsvphostfsdriver.cpp) RSVPHostFsDriver::DirClose()"));
+
+
+	// If attempt is made to read a directory which does
+	// not exist, it will not give a handle to close afterwards.
+	// Attempting to call DirClose on this with an invalid handle
+	// results in the error code KErrBadHandle (-8) being returned.
+	// Some UI's cannot cope properly with this error code, resulting
+	// in various servers repeatedly closing and reopening. To prevent
+	// this,we trap it here and return KErrNone as though the call
+	// completed properly without error.
+	if (aHandle == 0)  
+	  return KErrNone; // Bad handle, so exit immediately with KErrNone
+	else
+
 	return DoSVPRequest(EDirClose, (TAny *)aDrive, (TAny *)aHandle);
 	}
 
--- a/baseport/syborg/svphostfs/fs/svphostdir.cpp	Wed Oct 14 14:20:29 2009 +0100
+++ b/baseport/syborg/svphostfs/fs/svphostdir.cpp	Wed Oct 21 10:29:21 2009 +0100
@@ -116,9 +116,14 @@
 			}
 		iPending=EFalse;
 		anEntry=iEntry;
-		if ((iFullName.NameAndExt()==_L("*.*") || anEntry.iName.MatchF(iFullName.NameAndExt())!=KErrNotFound) 
-		    && Mount().MatchEntryAtt(anEntry.iAtt&KEntryAttMaskSupported,iAtt))
-			{
+
+
+		if (Mount().MatchEntryAtt(anEntry.iAtt&KEntryAttMaskSupported,iAtt) == EFalse)
+			continue;
+
+		if (iFullName.NameAndExt()==_L("*.*") || anEntry.iName.MatchF(iFullName.NameAndExt())!=KErrNotFound) 
+
+   			{
 			if (MatchUid())
 				{
 				TParse fileName;
--- a/baseport/syborg/svphostfs/fs/svphostmnt.cpp	Wed Oct 14 14:20:29 2009 +0100
+++ b/baseport/syborg/svphostfs/fs/svphostmnt.cpp	Wed Oct 21 10:29:21 2009 +0100
@@ -23,7 +23,11 @@
 #include "svphostfsy.h"
 
 #define HOST_SVP_DRIVE_SIZE 1024*1024*1024
-#define HOST_SVP_DRIVE_FREE_SIZE 10*1024*1024
+
+// Fixed low mass-memory warning at startup
+//#define HOST_SVP_DRIVE_FREE_SIZE 10*1024*1024
+#define HOST_SVP_DRIVE_FREE_SIZE 100*1024*1024
+
 
 LOCAL_C TInt GetMediaSize(TInt /*aDriveNumber*/,TInt64& aSize,TInt64& aFree)
 //
--- a/baseport/syborg/syborg.oby	Wed Oct 14 14:20:29 2009 +0100
+++ b/baseport/syborg/syborg.oby	Wed Oct 21 10:29:21 2009 +0100
@@ -35,7 +35,11 @@
 define VARIANT			syborg
 define VARID			SYBORG_L1
 define ASSP_DIR			EPOCROOT##epoc32\release\syborg
-define ROMMEGS			15		/* !! HEX !! */
+
+// increased size of ROM, due to overflow
+//define ROMMEGS			15		/* !! HEX !! */
+
+define ROMMEGS			50		/* !! HEX !! */
 define PLATFORM_NAME		syborg
 
 #define COLOR
@@ -50,7 +54,9 @@
 define BLUETOOTH_ESK bt_port2.esk
 
 REM Define whether or not to include USB client support:
-//#define EUSBC
+
+#define EUSBC
+
 
 ROMBUILD_OPTION -no-header