Welcome to the MP3Car.com forums.
You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. Registering will also remove advertisements. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!
If you have any problems with the registration process or your account login, please contact contact us.
|
06-06-2006, 04:56 PM
|
#1
|
|
Newbie
Join Date: May 2006
Location: Belgium
Vehicle: BMW 3 1.8
Posts: 40
|
PocketPC Emulator for TomTom plugin in development
Hello,
I'm creating a plugin for CF wich will enables you to emulate a pocket pc inside CF. My idea has been based on this thread:
http://www.mp3car.com/vbulletin/showthread.php?t=77149
Why u ask?
TomTom is the one and only navigator that satisfies me. Expecially because of the checkpoint add-in for TT navigators (huge PIO database).
Because of some limitations of the ppc emulator i'll try extending the functionality as much as possible for usage in CF.
How it will work:
I'm not creating a real plugin, but some sort of "container" app for the ppc emulator.
My app will embed the ppc window which allows me to easily controll the ppc window. Maybe you wonder why's that needed. Well its simple. The ppc needs has quite a long boot time. When you start CF my app will already launch the ppc and start booting (you won't see this). When you press the button in the CF menu, CF will embed my app wich already has a booted ppc window in it. So no waiting for that thing to boot.
Another advantage is the fact that when you close an external app in CF it completly closes it. This will not happen here. My app is gonne hide itself untill you need it again. Again, no waiting untill the ppc boots when you "restart" the app.
But don't worry, you'll actualy be able to close the emulator if you want to.
Limitations:
You will only be able to run the emulator inside CF in fullscreen OR non-fullscreen mode. The emulator is not resizable. When you do try to resize you'll just lose a part of the screen (see screenshots below).
Fixes:
- My app contains a bugfix for the emulator. Some USB -> Serials gps receivers are not detected by tomtom because of a bug in the emulator not opening the comport correctly. That should be solved.
Screenshots:
This is how you'll have to run the ppc emulator:
http://users.pandora.be/_freakz/ppc_.../preview01.jpg
if you don't you'll get this:
http://users.pandora.be/_freakz/ppc_.../preview02.jpg
Later on i'll add an option where u can chose if you wish to run in fullscreen of non-fullscreen. But you have to know you cant switch between them.
A beta version of the app will be posted in this thread at the end of the week (i hope  )
PS: sorry for my bad english, i'm dutch
CURRENT RELEASE:
http://www.mp3car.com/vbulletin/show...7&postcount=29
Last edited by CoolCow : 07-04-2006 at 05:43 PM.
|
|
|
06-06-2006, 05:12 PM
|
#2
|
|
Constant Bitrate
Join Date: Jan 2004
Posts: 142
|
Looking good, but what with the 100% cpu tomtom problem?
|
|
|
06-06-2006, 05:13 PM
|
#3
|
|
MySQL Error
Join Date: Apr 2004
Posts: 4,955
|
You might be able to use a Win32 call in your plugin on the window handle of PocketPC emulator, SetWindowPos to modify it's size... You should be able to so you can still allow the application to be resized...
Most, if not all, needed Win32 calls should be in the CFPlugin DLL in the Win32 class...
david
__________________
__________________
CENTRAFUSE http://www.centrafuse.com
01 Jeep Cherokee Sport 4x4 Installed
M10000/512Mb/20GB, Lilliput 7", Holux GM-210
|
|
|
06-06-2006, 05:17 PM
|
#4
|
|
Constant Bitrate
Join Date: Mar 2006
Posts: 120
|
Sounds great! Looking forward to seeing how this turns out.
Tip: Add the TomTom to the Startup folder inside the PPC emu, then it will autostart TomTom as well 
|
|
|
06-06-2006, 05:26 PM
|
#5
|
|
FLAC
Join Date: Feb 2006
Location: London, UK
Vehicle: BMW 850CSi
Posts: 1,280
|
hey coolcow
here's some more ideas for ya
if you go to the control panel on the ppc emulator, then the today option, you can disable all that stuff on the today screen.
Also, you can install something like pocket plus on the ppc, and that'll give you the ability to stick custom launchers (like a tomtom button) on the today screen
and... tomtom works through keys. if you try to do things on the keyboard, you'll find the actually have functions on tomtom. so + will zoom in and - will zoom out. tab switches from 2D to 3D mode. I can't remmeber all the functions, but there are lots. and you know how tomtom has 6 icons on each screen (the sixth is usually next screen) well those map to buttons 1-6. I know that's useless when you can just touch the actual icons, but the cool thing is you can have a button for postcode that will press 6,1,1 (I think that gets the postcode entry screen!)
finally... it would be good if when your skinner loaded the ppc emulator, it would also start tomtom. it would be wise to stick the emulator's process priority to low.
I'd love to see this work for roadrunner too!
btw, are you booting from scratch each time? you know you can boot from a state file right? it's only tomtom that takes a min to load. if you are booting from a state file, then the startup won't work!
|
|
|
06-06-2006, 05:37 PM
|
#6
|
|
MySQL Error
Join Date: Apr 2004
Posts: 4,955
|
You can also not run it as an external application, but create a new CFPlugin... You can download the SDK and examples on the website...
This way you could have a different top header, or design it however you want... You could create zoom in/out buttons like the integrated GPS and have them send keyboard commands for the actions to trigger tom tom in the emulator...
david
__________________
__________________
CENTRAFUSE http://www.centrafuse.com
01 Jeep Cherokee Sport 4x4 Installed
M10000/512Mb/20GB, Lilliput 7", Holux GM-210
|
|
|
06-06-2006, 05:51 PM
|
#7
|
|
FLAC
Join Date: Feb 2006
Location: London, UK
Vehicle: BMW 850CSi
Posts: 1,280
|
no offence to centrafuse btw 
|
|
|
06-07-2006, 01:21 AM
|
#8
|
|
Newbie
Join Date: May 2006
Location: Belgium
Vehicle: BMW 3 1.8
Posts: 40
|
100% CPU is not a bug an cannot be solved. A PPC has an ARM processor which uses other instructions than a PC. So those instructions need to be emulated (translated), and that just needs CPU power...
However the arm instuctions have been optimized since version 2. So it will be a little faster.
I know the windows api calls, i already work with them for embedding the window (SetParent). And besides, the function is MoveWindow since SetWindowPos only works on top-level windows 
And like i said (maybe i should have explained myself better), the window of the emulator itself is resizeble, but the content dousn't resize.
@sama
- I know about the today options, but that's a users chouse, i'm not creating an emulator for TomTom only, i'm just creating an emulator. The PPC itself can be customized like a normal ppc by every user itself.
- I'll look into that plus thing
- Communication between TomTom and CF was an idea i had, but first i want to make my app stable and easy to use. I'll be extending it as we go.
- PPC priority is already al "Below Normal"  If i don't do that the emulator practicly freezes the pc untill its booted.
- The way of booting is chosen by my app. In my app's config you need to set an image that has to be booted. You can create a new one or select an existing one u may already have. When my app finds the existing image it simply boots that one (fast boot time). If there's no boot image found, it boots an new one which will be automaticly saved when you close the emu. Next time u boot it will boot the saved state.
- My "plugin" will be aviable in each program thats able to embed a window.
- NO i'm not booting from scratch every time, that would mean you'll have to install TomTom every time
@veetid:
Well that was a hard choice by me. I know i could make a real plugin, but that would stick my app to CF only. I know i'll lose nice features from CF by not making a plugin, but i think thats not so bad since the emulator fills the screen completly and has its own zoom buttons...
The great advantage of my method is the fact you'll be able to run my app in every software that's able to embed a window, or even as a standalone application. On the other hand, it would increase CF's value.
|
|
|
06-09-2006, 01:21 AM
|
#9
|
|
Newbie
Join Date: May 2006
Location: Belgium
Vehicle: BMW 3 1.8
Posts: 40
|
I'm having a little problem with the method CF uses to close an external app. Looks like CF uses 2 method's to close an external app.
1. It sends a WM_CLOSE message to the window (normal application shutdown)
2. It just kills the process (forced application shutdown)
Now i can't figure out when CF uses one of these methods, can anyone tell me if there's a perticular strategy CF trys to close an app (looking @ veetid  )?
|
|
|
06-09-2006, 01:49 AM
|
#10
|
|
MySQL Error
Join Date: Apr 2004
Posts: 4,955
|
I use SendMessage to send the clean WM_CLOSE and wait for a response from the application. If the application will not properly close in a reasonable amount of time, then I kill the process so it will not hang Centrafuse.
david
__________________
__________________
CENTRAFUSE http://www.centrafuse.com
01 Jeep Cherokee Sport 4x4 Installed
M10000/512Mb/20GB, Lilliput 7", Holux GM-210
|
|
|
06-09-2006, 02:27 AM
|
#11
|
|
Newbie
Join Date: May 2006
Location: Belgium
Vehicle: BMW 3 1.8
Posts: 40
|
And what response of the app do you expect? The main window (or the window that CF has embedded) closes, or the entire process stops?
|
|
|
06-09-2006, 10:22 AM
|
#12
|
|
MySQL Error
Join Date: Apr 2004
Posts: 4,955
|
Here is exactly what I do to close apps, if interested..
if(Win32.IsWindow(_Handle))
{
int ProcessId;
int ThreadId = Win32.GetWindowThreadProcessId(_Handle, out ProcessId);
IntPtr hProcess = Win32.OpenProcess(Win32.PROCESS_TERMINATE, 0, ProcessId);
Win32.PostMessage(_Handle, Win32.WM_CLOSE, 0, 0);
Win32.WaitForSingleObject(hProcess, 3000);
if(Win32.IsWindow(_Handle))
Win32.TerminateProcess(hProcess, 0);
Win32.CloseHandle(hProcess);
}
_Handle = IntPtr.Zero;
I basically give it 3 seconds to properly close and no longer be a window, if that does not work it gets terminated.
david
__________________
__________________
CENTRAFUSE http://www.centrafuse.com
01 Jeep Cherokee Sport 4x4 Installed
M10000/512Mb/20GB, Lilliput 7", Holux GM-210
|
|
|
06-10-2006, 04:45 PM
|
#13
|
|
Newbie
Join Date: May 2006
Location: Belgium
Vehicle: BMW 3 1.8
Posts: 40
|
My app needs more time to close, ppc emu needs to save its state before its closed. And since my app is in controll of the emulator i cannot save it. Even not when i send the save messages to the ppc window before my app closes.
You know what, i'll just start writing a plugin.
I've looked into the sdk, and it really has some nice things to use.
btw, just curious, are you the only coder of CF or is there actually a great master mind team behind it? 
|
|
|
06-11-2006, 03:11 PM
|
#14
|
|
Newbie
Join Date: May 2006
Location: Belgium
Vehicle: BMW 3 1.8
Posts: 40
|
Update:
Emulator is being ported to a plugin. Since the setup gui has to be rebuild for CF the first release is delayed.
Advantages:
I'll be able to communicate in a much easyer way with CF itself.
And for veetid:
There's a wierd thing with the CF msi setup.
I needed to reinstall CF because i messed with it to much. Now when i tried reinstalling ive got a 0x8002802F setup error. Ive been looking aroud for a solution and its a thing in the .net framework. My problem was the fact i uninstalled .NET 2.0, that may of corrupted some .NET 1.1 files. So i reinstalled .NET 2.0 and setup worked again.
I'm just telling you this because it may happen again to someone else. And since you are going to be selling CF, the support is important. Maybe you can add it to a "Known Issues" list or something, or just disgard it
Ah and i ported the web example plugin to VB.NET 2003 code. In the first place i did it for myself. I find it easyer to read VB code instead of C code. The syntax is somewhat different so it may be usefull to add it to the SDK for other VB.NET coders as an example.
You can find it here: http://users.pandora.be/_freakz/ppc_...b%20Plugin.rar
Last edited by CoolCow : 06-11-2006 at 03:14 PM.
|
|
|
06-12-2006, 10:00 AM
|
#15
|
|
MySQL Error
Join Date: Apr 2004
Posts: 4,955
|
Quote: Originally Posted by CoolCow
Update:
Emulator is being ported to a plugin. Since the setup gui has to be rebuild for CF the first release is delayed.
Advantages:
I'll be able to communicate in a much easyer way with CF itself.
And for veetid:
There's a wierd thing with the CF msi setup.
I needed to reinstall CF because i messed with it to much. Now when i tried reinstalling ive got a 0x8002802F setup error. Ive been looking aroud for a solution and its a thing in the .net framework. My problem was the fact i uninstalled .NET 2.0, that may of corrupted some .NET 1.1 files. So i reinstalled .NET 2.0 and setup worked again.
I'm just telling you this because it may happen again to someone else. And since you are going to be selling CF, the support is important. Maybe you can add it to a "Known Issues" list or something, or just disgard it
Ah and i ported the web example plugin to VB.NET 2003 code. In the first place i did it for myself. I find it easyer to read VB code instead of C code. The syntax is somewhat different so it may be usefull to add it to the SDK for other VB.NET coders as an example.
You can find it here: http://users.pandora.be/_freakz/ppc_...b%20Plugin.rar
I appreciate all the information! I will check into this .NET 2.0 problem and add it to our FAQ, unless I find the problem and can fix it...
I appreciate the VB examples... I do plan to include both languages...
david
__________________
__________________
CENTRAFUSE http://www.centrafuse.com
01 Jeep Cherokee Sport 4x4 Installed
M10000/512Mb/20GB, Lilliput 7", Holux GM-210
|
|
|
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
|
|
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 01:44 AM.
|
|