Add TextShell example application, enable display pointer, fix issue with abstract class in sounddriver
authorjohnathan.white@2718R8BGH51
Sun, 25 Oct 2009 13:29:47 +0000
changeset 19 2dd1d22cb0f3
parent 18 0b7d3b28f025
child 21 05914789ab43
Add TextShell example application, enable display pointer, fix issue with abstract class in sounddriver
applications/SymbianLogo_TextShell/BLD.INF
applications/SymbianLogo_TextShell/README.txt
applications/SymbianLogo_TextShell/SymbianLogo.cpp
applications/SymbianLogo_TextShell/SymbianLogo.iby
applications/SymbianLogo_TextShell/SymbianLogo.mmp
baseport/syborg/pointer/syborg_pointer.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/applications/SymbianLogo_TextShell/BLD.INF	Sun Oct 25 13:29:47 2009 +0000
@@ -0,0 +1,22 @@
+/*******************************************************************************
+* Copyright (c) 2009 Accenture
+* All rights reserved. This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+* Accenture - Johnathan White
+
+*******************************************************************************/
+
+PRJ_PLATFORMS
+ARMV5
+
+PRJ_EXPORTS
+symbian_logo.bmp \svphostfs\symbian_logo.bmp
+symbianlogo.iby \epoc32\rom\include\symbianlogo.iby
+
+PRJ_MMPFILES
+SymbianLogo
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/applications/SymbianLogo_TextShell/README.txt	Sun Oct 25 13:29:47 2009 +0000
@@ -0,0 +1,30 @@
+/*******************************************************************************
+* Copyright (c) 2009 Accenture
+* All rights reserved. This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+* Accenture - Johnathan White
+
+*******************************************************************************/
+
+Submitter - Johnathan.White@accenture.com	
+
+Purpose - Simple TextShell console application which reads image file from filesystem and outputs to display
+
+Build from -  \sf\adaptation\qemu\applications\SymbianLogo_TextShell
+
+Using command - sbs -b bld.inf -c armv5 -j 1
+
+To include in textshell build modify \sf\os\kernelhwsrv\kernel\eka\rombuild\tshell.oby and add the line -
+
+#include <rom\include\symbianlogo.iby>
+
+Then Build textshell rom from \sf\os\kernelhwsrv\kernel\eka\rombuild\ using command - rom -v syborg -i armv5 -b udeb -noheader
+
+Then run QEMU from \symbian-qemu-0.9.1\bin using command -
+
+arm-none-symbianelf-qemu-system.exe -kernel \sf\os\kernelhwsrv\kernel\eka\rombuild\syborgarmv5d.img -M \sf\adaptation\qemu\baseport\syborg\syborg.dtb
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/applications/SymbianLogo_TextShell/SymbianLogo.cpp	Sun Oct 25 13:29:47 2009 +0000
@@ -0,0 +1,101 @@
+/*******************************************************************************
+* Copyright (c) 2009 Accenture
+* All rights reserved. This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+* Accenture - Johnathan White
+
+*******************************************************************************/
+// SymbianLogo.cpp
+
+#include <e32std.h>
+#include <e32cons.h>
+#include <f32file.h>
+#include <hal.h>
+#include <S32FILE.H> 
+
+void SetupConsoleL();
+void DisplayLogoL(CConsoleBase* aConsole);
+
+CConsoleBase* console;
+
+GLDEF_C TInt E32Main()									
+    {
+	CTrapCleanup* cleanup=CTrapCleanup::New();			
+	TRAPD(error,SetupConsoleL());	
+	if(error)
+		RDebug::Printf("SymbianLogo SetupError %d", error);
+	delete cleanup;										
+	return 0;									
+    }
+
+void SetupConsoleL()									
+    {
+	console=Console::NewL(_L("SymbianLogo"),
+	TSize(KConsFullScreen,KConsFullScreen));
+	
+	CleanupStack::PushL(console);
+	TRAPD(error,DisplayLogoL(console));					
+	if(error)
+		RDebug::Printf("SymbianLogo DisplayLogo Error %d", error);
+	CleanupStack::PopAndDestroy();						
+    }
+
+
+GLDEF_C void DisplayLogoL(CConsoleBase* aConsole)
+    {
+	TInt err =KErrNone;
+
+	//Connect to FileServer
+    RFs fs;
+    err = fs.Connect();
+
+	User::LeaveIfError(err);
+    
+	//Open file 
+	
+	/*
+	File \sf\adaptation\qemu\baseport\syborg\syborg.dts contains board model description, the hostfs@0 block defines both the host path
+	and target drive. The hostpath is by default set to \svphostfs\ and default drive number is 19 (S:\). If you would like to change this 
+	edit the dts file and use arm-none-symbianelf-dtc.exe to create updated dtb file
+	*/
+    RFile file; 
+    err = file.Open(fs, _L("S:\\symbian_logo.bmp"), EFileRead);
+    
+	User::LeaveIfError(err);
+
+	//Use to read stream from file on HostFs, first 54 bytes are header so skip
+	/*
+	symbian_logo.bmp is a 480*480 bmp file
+	*/
+    RFileReadStream filestream(file, 54);
+    
+	
+	//Obtain base address of framebuffer which will copy bitmap data into to display
+    TInt iScreenAddress;
+    HAL::Get(HAL::EDisplayMemoryAddress, iScreenAddress);
+	TUint8* pointer = (TUint8*)iScreenAddress;
+    
+
+
+
+    pointer+=640*479*4; //bitmap is 480*480 where as display is 640 *640, start by incrementing display pointer to last line required
+	for(TInt i=0;i<480;i++)
+		{
+		for(TInt j=0;j<1920;j++)
+    		{
+			*pointer = filestream.ReadUint8L(); //reads byte from file into correct offset in framebuffer
+			pointer++;
+    		}
+		
+		pointer-=1920; //decrement over offset between each line
+		pointer-=640*4; //decrement to start of next line    
+	}
+    
+    //Wait for User to press key then return
+	aConsole->Getch();
+	return;
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/applications/SymbianLogo_TextShell/SymbianLogo.iby	Sun Oct 25 13:29:47 2009 +0000
@@ -0,0 +1,23 @@
+/*******************************************************************************
+* Copyright (c) 2009 Accenture
+* All rights reserved. This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+* Accenture - Johnathan White
+
+*******************************************************************************/
+
+#ifndef __SYMBIANLOGO_IBY__
+#define __SYMBIANLOGO_IBY__
+
+
+//actual logo console app
+file=\epoc32\release\armv5\urel\symbianlogo.exe sys\bin\symbianlogo.exe
+
+//library containing RFileReadStream
+file=\epoc32\release\armv5\urel\estor.dll sys\bin\estor.dll
+
+#endif
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/applications/SymbianLogo_TextShell/SymbianLogo.mmp	Sun Oct 25 13:29:47 2009 +0000
@@ -0,0 +1,18 @@
+/*******************************************************************************
+* Copyright (c) 2009 Accenture
+* All rights reserved. This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+* Accenture - Johnathan White
+
+*******************************************************************************/
+
+TARGET			SYMBIANLOGO.EXE
+TARGETTYPE		EXE
+SOURCEPATH		.
+SOURCE			symbianlogo.cpp
+SYSTEMINCLUDE		\epoc32\include
+LIBRARY			efsrv.lib euser.lib hal.lib estor.lib 
--- a/baseport/syborg/pointer/syborg_pointer.cpp	Thu Oct 22 14:22:06 2009 -0700
+++ b/baseport/syborg/pointer/syborg_pointer.cpp	Sun Oct 25 13:29:47 2009 +0000
@@ -184,7 +184,7 @@
  fin:
 
 
-//  i->DisplayPointer();
+  i->DisplayPointer();
 
 
   Kern::AddEvent(e);