# HG changeset patch # User johnathan.white@2718R8BGH51 # Date 1256477387 0 # Node ID 2dd1d22cb0f377d2a53f9bfbbc32a8820d212f5f # Parent 0b7d3b28f025517b1c0607aed26d26a63e40dab8 Add TextShell example application, enable display pointer, fix issue with abstract class in sounddriver diff -r 0b7d3b28f025 -r 2dd1d22cb0f3 applications/SymbianLogo_TextShell/BLD.INF --- /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 + diff -r 0b7d3b28f025 -r 2dd1d22cb0f3 applications/SymbianLogo_TextShell/README.txt --- /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 + +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 + diff -r 0b7d3b28f025 -r 2dd1d22cb0f3 applications/SymbianLogo_TextShell/SymbianLogo.cpp --- /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 +#include +#include +#include +#include + +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; + } diff -r 0b7d3b28f025 -r 2dd1d22cb0f3 applications/SymbianLogo_TextShell/SymbianLogo.iby --- /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 diff -r 0b7d3b28f025 -r 2dd1d22cb0f3 applications/SymbianLogo_TextShell/SymbianLogo.mmp --- /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 diff -r 0b7d3b28f025 -r 2dd1d22cb0f3 baseport/syborg/pointer/syborg_pointer.cpp --- 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);