[WM5] SDK samples - reversi - Windows Mobile Development and Hacking General

Found inside SDK. Compiled, UPXed.

For reversi on pocket pc, I would suggest freakOthello if you are up to the challange. I never win. I would be happy is I have more than 20 pieces left on the board at the end of the round.
http://www.freewareppc.com/games/freakothello.shtml

Related

ChARMeD Disassembler for Pocket PC Beta 2

http://blog.carolos.za.net/2007/03/charmed-disassembler-beta-02-for-pocket.html
Charmed for Pocket PC has been totally rewritten
It is now stable, fast and small
And has an open dialog
Works on Pocket PC 2003 and up
Doesn't look as pretty as it used to though, but working on that
It is very useful if you want to look at PE/MZ header information, DLL imports, and Sections information,
The disassembler only disassembles the first 29 lines (part of the pretty problem will be fixed soon)
Thank you for your patience

Windows XP Embedded on HTC devices?

Hi folks
Recenty I got the Windows XP Embedded kit, and I was really satisfied and surprised with the performance of the directly built system on an old machine like a P1 @ 200 MHz with 64 MB of RAM, without a hard disk.
The main goal would be to run truly win32 apps on mobile devices, to give better functionality and compatibility.
Yet the builder supports x86 architecture only, but cannot be a big problem to port it to ARM pocessors.
What might be difficult are these things:
-Getting win32 drivers for built-in devices (ex. integrated SDIO/USB WLAN, BT adapter, touchscreen, and sound devices, and apps for them!)
-Saving user data on turning off (Ebmedded systems are designed for a workstation, like a cash register: prebuilt apps, and nothing more comfort ) like WM200x
If anybody has any suggestion are to get a warm welcome
bye
Yet the builder supports x86 architecture only, but cannot be a big problem to port it to ARM pocessors.
Click to expand...
Click to collapse
Are you kidding me?
This would mean reverse engineering and recompiling every binary in the OS.
Do you have any idea how many hours something like that would take?
yup, you're right, but in theory it's possibe. I've seen a running DOS on a Microchip micro-controller, or for example the Atmel STK 1000 is Linux based, also seen an mPlayer app operational on the demo board at the college.
as you see, i'm not an experienced programmer, but i'm not afraid to ask
Yeah, the basic low-level binaries must be recompiled, and once it's ok, it might be usable with regular win32 apps, until you run an old DOS app, wich directly access the hardware.
A few years ago i was able to port Z80 software to 8086, and it wasn't easy.
I don't really know these things, just want to see opinions, possibilities, and suggestions.
exe files are binarys which are instructions directly for the cpu
it's not parsed by the operating system
so compiling the os is not enough every application needs to be recompiled too
The programs you mentioned have source available in one way or another (since DOS is very old there are clones, like freeDOS).
If you have the full source for an app and the right compiler, porting it to another CPU is feasible.
But, this is not the case with embedded XP. Getting the full source is impossible which means most of the system will have to be rewritten from scratch.
Just look at the Wine project to see what it takes, and they "have it easy" - they are just trying to simulate the APIs not change processor architecture. (Lets make it clear - ARM instruction set is very different from x86).
And as Rudegar said it will not let you run any program that has not been specially compiled for ARM CPU.
I know it sounds like we are trying to kill you idea here but its nothing personal, unfortunately it just isn't feasible. We would all like to be able to run desktop apps on our devices, but simply having embedded XP on them would not accomplish that. Also while many old DOS apps can be run using various emulators like pocketDOS, almost all Win32 apps take more resources than our little gadgets can offer.
I am fairly sure though that in 5 -10 years that problem will be fixed.
<_< man hours or not, reveng'ing this will have a bigger impact than just winDOS Mobile devices. Desktops have a use for this, definitely (because the Vista-Only crap is starting to hit the market). Too bad they don't provide assembly in programming classes anymore, obviously because they don't want anyone else to reverse engineer anything and spoil their foisting fun. <_<
In any case, IIRC XP Embedded is missing the install/uninstall engine, so you can't customize it after it's flashed onto the board. This isn't quite a good start - XPLite or 98Lite are better for reverse engineering from scratch (but they're too powerful for mobile devices).
The other alternative is porting ReactOS, which is a reimplementation of W2K. Those guys are "having a lot of fun" getting things to work, tho. <_<
Maybye Windows CE6 yes, but Windows XP Embedded no, because they must run at 686-AT/X platform IMB. Sorry of my English
linux would be a path
with most linux programs you can compile them yourself
using good old
./configure
make
make install
of cause gui programs could have issues displaying correct
on such a small screen
You MIGHT be able to pull it off by installing a minimal (very!) WinMo firmware and then have it autorun Bochs, which is known to be able to run the PC version of XP.. A customised, thinned-down XPe image should run fine under Bochs.
--W5i2

Pre-compiled TodayScreenSupport-UnManaged?

I'm trying to follow these instructions for creating a Today Screen Plugin, but I can't compile the unmanaged code. I can't even get eVC to run on my Vista machine, and I don't know enough about c++ to manually convert it to a VS.NET 2008 project.
Is there a reason that I have to compile it myself? Is there somewhere I could download a "pre-compiled" version without having to struggle through this?
I managed to get the eVC++ projects imported into VS.NET 2008 and built, hooray!.
Next I opened the "Managed" solution that is supposed to build the cab files for the device and an installer for my dev box. With some tweaking of paths, I was able to get this to build too.
However, it looks like it's building a new project type for vs.net2003, not 2005. So installing the custom project doesn't actually seem to work. And I still can't actually start working on what I *REALLY* want to do, which is writing a today screen plugin.
So now I have to figure out how to make this project type compatible with vs.net 2008.
What a convoluted and weird way to distribute this stuff. Why didn't they just distribute some binaries?
You could try memwatcher project from WM5 SDK which came with Visual Studio 2008 or to convert the project from WM6 SDK that is created for VS2005. The example shows free memory (SD card and RAM) and is useful as starting point for new projects in VC++ (unmanaged).
MemWatcher is written to support different screen sizes and orientation by calculating the size of bars according the device screen size.
Read more about Memory Watcher here:
http://msdn.microsoft.com/en-us/library/bb158711.aspx
I had no problems with these examples and created simple today screen for my needs with added to RAM/SD bars a battery level and large clock with date.
Thank you for the suggestion, but my C++ skills are negligible. I tried briefly to figure out how to write my own based on those samples, but since I don't even know string manipulation it was very much an uphill battle.
Later I found this, which allowed me to write something useable in C#. It's still alpha, but it seems to be stable. And it let me get on with the fun part of developing instead of trying to figure out linkers and static libraries.

5x5 Updated...... V1.5 The Knights Gauntlet.......... Now with demo mode.

There is a game on the iPhone called Lights Out where the object of the game is to light up or knock out all the lights in a 5x5 grid. When a square is selected that square and its four immediate neighbours, above, below, and to each side invert. There is no wraparound. The object of the game is to get all the squares black.
At the risk of revealing my age, I saw a hand held version of this game in the early 1980's.
When mastering any new programming platform, this application becomes the standard with which I start. I know the logic, so the problem merely becomes getting the thing to run under the new platform. I wrote this in 2005 while fighting my way through the very steep learning curve of Embedded C++. Previous platforms for this program have been, ZX81, BBC Micro, DOS, Windows and finally Windows Mobile. Next stop Linux!
It is an example of minimalist programming on WM. Written in Embedded C++ as a Win32 application it is targetted at ARMv4 chipsets. As such it should run on all PPC versions from Windows Mobile 2002 onwards. The menu is limited to two main items, so WM 5/6 will display it as a WM 5/6 app. Minimalist programming means it can be distributed as as a single .EXE file of a mere 9.5 Kb in size. The DLLs it calls are already on your device, there is no need for a .CAB installation.
It has 5x5, 7x7 and 9x9 grids, all are solvable.
I hope you enjoy it. It will keep you quiet but it might drive you totally nuts!
UPDATE!!! Now works with 480x800/240x400 devices, see later posts for the details.
UPDATED!! Version 1.2 released.
Changes: 11x11 grid added. It is solvable, but it took me a while to figure it out!. You may need a stylus as fingers may be a bit too awkward. For that reason, I do not intend to go to 13x13 and beyond.
The short display glitch on initial program load now fixed.
Game and drawing code optimised. (There are often better and faster ways to do things, if you take the time to look.)
UPDATED!! Version 1.3 released.
Now also runs on both Pocket PC and SmartPhone devices. Now runs on any sized screen, even those that have not been released yet! The blank screens that were reported in later posts are now a thing of the past. Here's the method, take the width and height of of the client area and size the game to 90% of smaller of the two. Why did I not think of that in the first place?
SmartPhone users:- Welcome aboard! Image attached below: The white square is the target square. Move it to the square you want to change with the D-Pad/Arrow buttons, then press 'Enter' to change it. Smartphones prior to Mobile 6.0 may not have the 'File Explorer' application. (It depends on the OEM build). In this case, use ActiveSync. Connect to your phone and drop the unzipped 5x5.exe file via the 'Explore' option into the \Windows\Start Menu\Programs\Games\ directory, and it will appear alongside Solitaire and BubbleBreaker in the games menu of your device. Smartphone 2002/2003 users need to use \Storage\Windows\Start Menu\Programs\Games\
Pocket PC users won't see any change, just tap the square you want to change. The program looks at which platform it is running on, and behaves accordingly.
UPDATED!! Version 1.4 released. - The Knight's Gauntlet.
Just when you thought you've mastered it, the Knight's Gauntlet is firmly thrown down. Selecting Knights from the main 5x5 menu, changes the pattern of squares that are inverted to those a knight's move away in chess, (two forward, then one to the side), as per the Knights image below. Up to 9 squares will invert on each move. As per changing the grid size, toggling the knights game on and off will restart the game.
All four grid sizes are solvable, but you are warned, it is a lot harder than the normal cross game.
It was only a small change to the game logic, and this program was all ready to go in September, but I would not release it, until I had proved to myself that it could be done. A brute force attack can be used to break the 5x5 Knight's game but as the grid gets bigger the problem grows exponentially. A quad core processor running a console C++ application, using the SSE3 PC registers (XMM) macros to play one move on the entire board in one machine instruction, was not enough.
I had to use a special version of the mobile program that could dump the state of the board and moves out to a file to be analysed by the PC later by a suite of programs that could combine boards together by the thousands. All good fun!
On and off, it has taken me three months to find the knights solutions to the 7x7, 9x9 and 11x11 games.
UPDATED!! Version 1.5 released. Now with demo mode.
For those who think it is impossible, let the demo mode show you how to do it.... But there is a slight twist........ You will be shown the same solution for each puzzle each time, but the moves are shuffled and they may also be reflected or rotated, just to confuse matters further. Shuffling the moves, rotating, or reflecting, logically, has no effect on the final result.
Happy puzzling!
18th Feb 2010 update fixes WinMo 6.5.3 Dialog box issue mentioned in http://forum.xda-developers.com/showthread.php?t=635063
23 June 2011 CE version added. Note this version is for Windows CE, ARM powered devices only, as is displayed in the last of the images below. Don't run this version on a WinMo device the display will look awful! As an extra caveat, it will only run properly if the OEM of your CE device has built the OS with components that are expected by the 'Standard' version of the SDK as used by EVC 4.0.
Any screenshot?
Thanks!
Nice little game.
Small problem
Hi,
I'm probably missing something here, but I get a white screen without anything I can actually do with it (using Omnia).
Any help?
Grief that is going to be addictive.
So simple yet so tricky at the same time.
works fine on a SQVGA (320x320) device to, and im after 1 minute angry ....
very nice; solved 5x5 - 9 clicks. going to try to crack 7x7
this is lot's of fun & a little tricky!
nice game
Does not work with my HTC Touch HD (WVGA 800x480)
I got a white screen.
stephj said:
At the risk of revealing my age, I saw a hand held version of this game in the early 1980's.
Click to expand...
Click to collapse
LOL at remark above ^^
Nice little time waster you have here! Thanks!
Anybody thown their phone out the window in frustration yet?
To the members having trouble with high resolution devices, it was only written to run on 'standard' Pocket PC screens, 240x320 portrait/landscape and 240 square devices.
Sorry it doesn't work properly on larger screens. I'll have a look at it. I may have to borrow one of these later wizzo phones from someone, and find out what's going wrong, or I'll see what's in the WM6 SDK emulator.
May take a while, but I'm on it. Watch this space.
doesn't work on touch diamond 2 with 800x480?
any solution you might know?
anybody??
seems like a great hit, this game.....
tnx in advance
marcel
I have downloaded the WM 6.1.4 SDK from Microsoft's site. It includes a 800x480 device image.
The bad news is the program produces the effect mentioned above. i.e white screen, and nothing.
The good news is exactly that, the bug can be reproduced. This will allow me to step through it, figure out exactly what the hell is going wrong, and fix the code.
This may take few days to sort out, more later.
Fixed! Now works on 800x480 devices as well, in landscape or portrait. Use the zip file in the original post at the top, it has been updated with the new program.
The reason for the fault was that 800x480 devices return a bigger value for the long side of the screen when using GetClientRect();
The program did not recognise this value and could not figure out whether it was landscape, portrait or square, which fouled up the WM_PAINT code.
The code automatically centres the grid in the window, so that bit was OK.
Have fun, until a new screen format comes along.........
This little game is f***ng addicting!
Thanks a lot!
Keep up the good work!
[email protected] said:
Hi,
I'm probably missing something here, but I get a white screen without anything I can actually do with it (using Omnia).
Any help?
Click to expand...
Click to collapse
I'm using Samsung Omnia and I get the same problem when starting 5x5. What to do?
HOLLY BALLS! lol this game is addicting and hard. i am yet to beat it!! haha. great game thanks!
It is a kind of drug........
Reply to GreenOmnia
GreenOmnia,
This program will run on 480x800 devices as marcelvanblankers above can confirm. The problem may be that you still have the old version of 5x5 active in your phone.
On a PC you can run multiple versions of Word, Excel etc. until you run out of memory. Under WM only one version of any program is allowed to run at any one time. When a program starts it looks for the same named process. If it finds it it, it activates that copy, and then kills itself. Later versions of WM may correct this, but earlier programs still run to these rules. If you load a new version of the program to your phone and have the old version still active in memory, when you run the new one you only reactivate the old one.
Listen up everybody! Think about the above paragraph. If you have understood it, that is a real WM pearl of wisdom!
To fix the problem, if your version of WM has Task Manager, use that to kill the running version of 5x5, or use Settings->System->Memory->Running Programs and then select 5x5 and end it. Delete all versions of 5x5 from your phone, then reload the new version from the top post in this thread and retry it.
If all this still doesn't work, I will post a test program to run on your device that reports the actual size of the client area window.
We'll take it from there.

Windows Phone SDK 8.0 Download

The Windows Phone Software Development Kit (SDK) 8.0 provides you with the tools that you need to develop apps and games for Windows Phone 8 and Windows Phone 7.5.
Overview
The Windows Phone SDK 8.0 is a full-featured development environment to use for building apps and games for Windows Phone 8.0 and Windows Phone 7.5. The Windows Phone SDK provides a stand-alone Visual Studio Express 2012 edition for Windows Phone or works as an add-in to Visual Studio 2012 Professional, Premium or Ultimate editions. With the SDK, you can use your existing programming skills and code to build managed or native code apps. In addition, the SDK includes multiple emulators and additional tools for profiling and testing your Windows Phone app under real-world conditions.
System requirements
Supported operating systems: Windows 8, Windows 8 Pro
Windows 8 64-bit (x64) client versions
Hardware:
4 GB of free hard disk space
4 GB RAM
64-bit (x64) CPU
Windows Phone 8 Emulator:
Windows 8 Pro edition or greater
Requires a processor that supports Second Level Address Translation (SLAT)
If your computer meets the hardware and operating system requirements, but does meet the requirements for the Windows Phone 8 Emulator, the Windows Phone SDK 8.0 will install and run. However, the Windows Phone 8 Emulator will not function and you will not be able to deploy or test apps on the Windows Phone 8 Emulator.
Instructions
Choose the language version you want to install and click the Download button for the WPexpress_full.exe file. Follow the instructions to install the SDK. Note that each localized version of Windows Phone SDK 8.0 is designed to function with the corresponding localized operating system and localized version of Visual Studio 2012.
Note - Windows Phone SDK 8.0 installs side-by-side with previous versions of the Windows Phone SDK. You don't need to uninstall previous versions before beginning this installation.
Download the release notes which are in a separate file. For Windows Phone SDK 8.0 documentation and samples, see the Windows Phone Dev Center.
To start VS Express for Windows Phone, click the application in the Apps list. If you have Visual Studio Professional, Premium or Ultimate installed on the computer, the VS Express for Windows Phone shortcut won't appear. Instead, start your Visual Studio instance as usual and then create Windows Phone SDK 8.0 projects using the installed Windows Phone templates.
If you try to run a project in Windows Phone Emulator and Hyper-V is not enabled, you will be prompted to turn on Hyper-V. Turning on Hyper-V requires you to restart your computer.
Note: this release is also available in .iso format. Choose one of the following options for handling downloaded ISO images:
(Recommended) Write the image file to a blank DVD.
(Alternative) Mount the image file virtually as DVD devices.
Download WebSite: http://www.microsoft.com/en-us/download/details.aspx?id=35471
So how do you learn how to use an SDK? I've always had an interest but there is never any obvious guide of how to program. I picked up UE3 SDK quickly but that is because there was like 30GB of tutorials on it, where can I do the same for this SDK?
Thanx.
You learn visual C#/B/C++. You do not directly use the SDK, you use the development tools in it
Venekor said:
So how do you learn how to use an SDK? I've always had an interest but there is never any obvious guide of how to program. I picked up UE3 SDK quickly but that is because there was like 30GB of tutorials on it, where can I do the same for this SDK?
Thanx.
Click to expand...
Click to collapse
First learn Silverlight/C# and then read the SDK documentation,
To put it in simple words SDK just gives all the functions that u can use on Windows Phone.
Typically, if you learn any C# API (other than windows forms) you will learn all the others. They are very similar to each other, only some few twinks here and there due to platform differences.
---------- Post added at 11:46 PM ---------- Previous post was at 11:28 PM ----------
The SDk is bugged, emulator does not work. Says it wants virtualization and my PC doesn't have it, when it clearly does. Both Android and Windows Phone 7.5 emulators work fine.
Kinda failish...from Microsoft.
oh well...the SDK system requirements are pretty damned huge. My CPU does not support SLAT apparently...
So I can just go to the Visual Studio website and follow the tutorials there? I have bad eye sight so I learn better from videos and listening instead of reading lots of text which takes me far longer to do. Luckily typing is easier as you know what you're typing on the keyboard so you don't have to pay as much attention on reading the text on screen.
Your processor needs SLAT support (extended Virtualization) also called VT-x by Intel. It is available from the Core i3/i5/i7 processors or newer AMD processors. This is due to the fact that the WP8 Emulator relies on Hyper-V instead of VirtualPC which was used for WP7. So if you have a Core 2 processor your hardware does lack required features. This is not a bug in the SDK.
On learning development of WP Apps there are series that take you around the SDK like this one: http://www.jeffblankenburg.com/2010/09/30/31-days-of-windows-phone-7/ It's still for WP7 but almost everything said there still applies for WP8, although in WP8 it was much extended. There are also Development Webcasts and Hands-On Labs you can try out. You can Google for those - there is lots of content on the topic.
But as was said before - it would be beneficial to know some C# beforehand.
I keep installing the SDK but visual studio express 2012 for windows phone doesnt appear in my start menu, says everything is installed fine, Any ideas?
Edit:btw using windows 8 x64 Evaluation Version
Do you have a regular version of Visual Studio 2012 installed? In that case the SDK integrates itself with the regular version and just adds the project type there.
StevieBallz said:
Do you have a regular version of Visual Studio 2012 installed? In that case the SDK integrates itself with the regular version and just adds the project type there.
Click to expand...
Click to collapse
That will be the one,, Cheers for reply.
Since no college near me teaches any programming and I have to work, I better start teaching myself.
Can any one tell me where to start?
Thanx.
Venekor said:
Since no college near me teaches any programming and I have to work, I better start teaching myself.
Can any one tell me where to start?
Thanx.
Click to expand...
Click to collapse
https://dev.windowsphone.com/en-us
http://www.windowsphonegeek.com/Resources
http://www.freebookspot.es/Comments.aspx?Element_ID=259285 (book)
Does WP8 have any new ringtones/notifications or wallpapers?
I dunno if that stuff would be in the SDK, but it'd be cool to have a dump of those files.
Weird Visual Studio basically does everything for you, I was expecting you'd have to make everything from scratch. Not what I wish'd for really as I did want that experience, those guides don't teach you how to understand the language, just how to create something quickly. Kinda like when you were at school reading from a text book and they never taught you the foundations of how to create your own sentences, always taught pre existing ones.
You can look for manuals for Visual C# around the web, there are a couple of free ones created by Microsoft, but you won't find any videos.
Once you understand the basics, it will be pretty easy to get started on creating complex apps. This is the beauty of C#
can anyone give me MD5 or SHA-1 hash of the iso? thx.
If you want to learn programming from the ground up I guess it would be best to start with a regular book on programming with Visual C# 2010 or something along those lines (2012 books are still rare I guess).
The problem with starting out on Smartphone platforms is simply that there is nothing like Console programs that allow you to easily experiment with language features without having to care a lot about more complex concepts like asynchronicity, Event-models, data-binding, etc.
While I can do a simple:
public static void main(String[] args) {
Console.WriteLine("Hello World!");
}
on the Desktop to arrive at a program that outputs those famous words to the screen on the phone it is more like with a PCs GUI programming.
There you have to instantiate a Window (or Page on the Phone), place a Label control (both of which are classes) and assign a property of the label to the text. Algorithmically a lot of information is hidden in those classes. This is mainly due to the fact that during actual development people don't want to and don't need to care about the details behind those things but for learning how to do things the effect is pretty devastating.
So my suggestion would be: Take a book on C# development and work through the basic concepts of Methods, Classes, Properties, EventHandlers and then before diving into the details of WinForms development switch over to the Phone SDK and acquaint yourself with the workings of the according UI Toolkit.
how can i tell if my computer has a processor that supports Second Level Address Translation (SLAT)
my laptp is intell pentum and my desktop is amd phantom x4?
Your laptop won;t support it.
I am not entirely sure about the AMD though.
There is a tool for that in the SDK download page.

Categories

Resources