Thursday, December 20, 2007

No time for anything....

So folks,
pretty long no update, I know. But this term is quite stressful - my Informatics I Tutorial needs some time for correcting the exercise sheets, for preparation the material and holding the tutorial and the computer execercise lessons. Then I attend some lectures, all of them about computer graphics. Some of them are quite difficult to follow cause of the complicated mathematics involved. And last but not least the most time-consuming thing in the last time: my study thesis. I did not even managed it to update the study page on my homepage with information about it.
Well I'm working with a Xilinx Fpga Board Virtex4 Fx-100 where a Hypertransport Core is running on (I got it working). My task is to extend the core with a monitoring feature - till now I managed it to log the write and read accesses in an associative memory. But now I have to write these information to the main memory using DMA - and this does not work (damn!). Either the linux kernel panics or the computer just hangs up. I really don't know how to achieve the right behaviour, this drives my crazy. I have no simulator, there is no possibility to 'debug' it and synthesizing my design with ISE and upload it to the board takes every time more than 45min. This is definitely no fun! As soon as I get it working, I will post more detailed information about my study thesis.
Anyhow, I got round to code and publish a nice applet demonstrating the Cohen-Sutherland-Algorithm last week. And guess what? The implementation of the Sutherland-Hodgman-Algorithm is nearly finished and waits to be uploaded on my page :-)
But for now, Christmas is coming soon, I still have to organize some presents and I'm looking forward to some relaxing days. So I wish you all a merry christmas and a happy new year!!!
Greetz Sunshine

Friday, October 26, 2007

My hook doesn't work :-(

A few days ago I rummaged through my old code snippets and sources on my harddisk. I noticed that I coded quite many PE tools, especially with Delphi, but something I have never created - an Api hook!
I read pretty much about it (there are many code snippets in the net about this), but most of them are complicated and badly commented so that it's difficult to undertstand what's going on. So I tried myself and began coding the most simple and clean api hook possible (in c cause it's better to read than asm): a little Messagebox hook which should alter the caption of all messageboxes.
Ok I thought, the most simple approach is to code a loader which starts a target process and loads my selfcoded 'hook dll file' into the address space with the well-known CreateRemoteThread trick. Inside the dll file is all the work: as soon as injected and attached, it travels through the import table of the process, searches for MessageBoxA API from user32.dll and replaces the RVA (called Thunk) with the RVA of my own function I declared in my dll file. Hm... sounds not bad although I know that this works just with exes with a straightforward import table - even loading the MessageBox API with GetProcAddress would bypass my approach. But that's not bad - if it would work.... Damn!
With some targets it works, but in others it corrups the stack!? That's a bit strange to me - either it should work always or never. Of course, I took special care about the arguments and the stack. And debugging with olly is quite boring and not that easy... I think I give up and I put up with the fact that I'm never gonna code a nice Api hook :-(

Moreover, studies suck also -> 'thank god it's friday' and I will relax the whole weekend!

Friday, October 05, 2007

Skyscraper Solver

So folks,
I removed the last bugs and cleaned up the code faster than I thought - so my Skyscraper solver waits to be downloaded from my site :-)
But unfortunately it is pretty timeconsuming to check if a solution is valid so it's quite slower than I thought! For example to go through all possibilities in a 6x6 quest with my backtracking algorithm can take several minutes in the worst case - even on my new laptop! That's bad - but I don't see many places for optimization which would really speed it up.
Of course this makes me thinking about another approach: it is possible and worth the time to solve it with Dancing Links like a Sudoku quest? Well, in fact I don't know and I didn't (and won't) try it. That's not an exercise which could be easily solved in a few hours in my opinion! But if anybody will do it and succeed, mail me please! I would be very interested in it.
So far so good. It's Friday afternoon, I have already done everything I had to do - it's time to relax and waiting for the weekend to begin :-)
Greetz, Sunshine

Monday, October 01, 2007

Again I'm coding...

Hey folks,
well at the moment I have some free time. No exams, the lectures are going to start not until middle of October and there are some problems with my study thesis. I cannot begin cause the HTX-Board (a special board to study the hypertransport bus) is not working properly, so this week seems to be idle too.
But not that bad. I came across a little game similar to sudoku and I decided to code a nice applet to play it. And of course even more: also a solver which gives all solutions to a quest (which is even finished and fully working) and a generator to create new games which has only one valid solution. This in fact is pretty more difficult to code - till now it takes in some cases nearly one minute to generate a quest which is sometimes not even solvable! Ok this tool I hacked in really short time without thinking about a clever algorithm so this is something I have to recode I think. The applet coding comes slowly to an end, here a screenshot from its current state:

As you see, I coded also some kind of lame visualization of the currently game. Well, that's not important for the game. It's more my first try of coding a simple wireframe 3D software rendering engine! Not that easy to code - you find only little information about camera and screen projection, but I succeeded :-) Let's see if I will also implement solid filled polygons...
So keep cool, I'm going to proceed with coding!
Cya

Tuesday, September 18, 2007

Disabling HP Quickplay buttons

As I wrote some weeks ago, I got a new laptop - a HP Pavillon dv6XXX. Well, everything works and I have no problems so I'm quite satisfied... but one thing really nerves me . There are some so-called quickplay buttons above the normal keyboard, look here:



The problem is that I often accidentally push it. Well, push it is too much, let's say smoothly touch it. This often occurs while coding and I push F5, F8 etc. to compile, build or test something. Then every time it the dvd programm slowly starts and I have to close it down. If this happens a few times, it really pisses me off so I tried to disable them.

Looking at the taskmanager, I noticed some HP programms running. Interesting sounded QPService.exe ("HP QuickPlay Resident Program") and Qlbctrl.exe ("HP Quick Launch Buttons"). But killing these two processes didn't helped.
The only way to solve our problem is to avoid even loading them, so we have to delete the registry keys in HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run.
Be sure to make an backup of these keys to be able to re-enable it later! Here you have my 2 reg files: the first one disables QuickPlay by deleting the regkeys while the other one enables it by adding the regkeys.
I think that will be useful for some other nerved HP laptop users :-)
Use at your own risk! If they don't work and damage your system, don't blame me.

--- Download Reg Files ---

Update: It seems that I can't re-enable these buttons! So be careful - I don't take any responsibility.

Greetz, Sunshine

Wednesday, September 12, 2007

Holidays are over :-(

Hm, what a nice time I had in August - 4 weeks free! Three weeks relaxing at home, meeting with friends, shopping, going to parties, relaxing and sleeping... But everything has an end and real life comes back. Next week my last oral exam in my minor subject, then I am going to begin with my study thesis - it will be about examining/monitoring the hypertransport bus system. Let's see how it will be - I hope easy :-)
I noticed that I haven't done anything in reversing for a long time but somehow I currently don't feel motivated to do something concerning this topic. But I dived into bezier curves and coded some nice applets (look in the java section of my site). An applet about b-splines is already finished - some little bugs have to be killed. In a few days I'll release two short articles about polygons with a nice applet so stay tuned and keep coding!

Friday, July 27, 2007

Still there

Hey,

well long time no sign from me. Last time was pretty stressful, as always when the term-time reaches the end. On Monday I have a written exam in 'Communication and Databases' so no time for coding or doing anything else. Then I have 3 weeks holidays which I spent at my parents and one week in Spain; but that also means no updates on my website cause I have no access to the internet the whole August! In fact I have no idea what to code or reverse anyway...
Apropos Internet: I changed from German Telecom to o2 and this caused a lot of problems! In fact I had no telephone and no access to the net for more than two weeks! o2 is completely incompetent - they really suck!
So, I hope all of you reading this enjoy the summer and relax in the sun - exactly as I will do in the next weeks!
bye Sunshine

Thursday, June 28, 2007

'Hexen hexen'

Hey out there,

just updated my website yesterday evening with a page about the game 'Hexen hexen' in the java section. This is a little card game from my childhood which I accidentally recovered. In fact that is already 2 months ago, but I didn't had time for coding. Interestingly I was quite motivated to create the backtracking solver and finished it quite soon but I was too lazy to code the applet. This was somehow less fun and that's why only now everything was finished. Putting the solver online without applet had been stupid cause you wouldn't have known what's all about. So hopefully you tried the game yourself :-) Perhaps you even found both solutions...
What I will do next (concerning my website) is not clear. I noticed that everywhere you come across the CRC32 (like in all packing programs) but I don't know much about it. Perhaps I will try to code it myself. But let's see... Now I have to go to university to attend some lectures...
So keep cool & see you soon.

Monday, June 04, 2007

Huffman finished

Ok, today I finished my implementation of Huffman compression. It works quite stable and fast but the compression ratio sucks. Perhaps I'm gonna improve it a bit, but I'm not sure if and when. But as it was not easy to code, I hope somebody will find the source useful when trying to code it himself.
As always, you find the executable and source on my website (in the C section).
Have fun!

Thursday, May 31, 2007

Huffman Compression

Well, as mentioned above, I spend more time with coding in the last few weeks. I tried myself with my own implementation of Huffman Compression. (see Huffman Compression for more information).
While doing the huffman compression for a sentence with pen&paper is really easy and intuitive, writing a C programm is quite difficult: it took my really some time to build the huffman tree. Ok, I made two stupid typo-errors and linked the child leafes wrong... this resulted in time-consuming debugging. Well, sometimes I'm an idiot ;-)
But the compression itself was really hard! First I printed the huffman codes out as strings to be sure it works... not that big thing. But really save the codes as bits was pretty difficult and time-consuming and needed some fancy 'bit action'. Again, I made a stupid mistake by saving the codes in wrong direction in the compressed file, so decompressing failed for sure.
Finally, it works... but: it's really really slow and the compressed file is bigger than the original file cause of the overhead I save (the huffman tree). This must definitely optimized. But what sucks most is that my little programm hangs if compressing files larger than about 5MB. I fuckin' don't know why! So it will take some time till I will release the source on my site.
Have a nice weekend!

Monday, May 28, 2007

Got a new laptop... and Vista.

So,

a few days ago I started with some coding and reversing after I had done nothing for a long time. I code a little game in Java and also a bruteforcer which can give the solution, but there will be more information about that on my website in a few weeks. I also thought about coding my own implementation of Huffman-Encoding-Algorithm, but I'm not sure if I should do that.
Anyway, one incident stopped me: my laptop finally broke down. I had problems with it for some time: the battery didn't charge anymore, the touchpad didn't react and, most important, the display often flickered and switched itself off. And now the graphic card broke down, more than some purple lines on the display could not be seen.
So I decided to spend my saved money for a new laptop: I decided myself for a HP Pavilion dv6000. Main features: Core 2 Duo, 1GB Ram, 160GB and a lot of additional stuff. Runs very nice, but... oh no... no XP was shipped but Vista!!! Well after 3 days I slowly feel comfortable with this new OS, but I like XP more. Perhaps it will just take some time.
But I needed a patch to start Visual Studio 2005!!! What's that? Up-to-date Microsoft products are not compatible with Vista? They are all stupid...
Fortunately till now I had no further problems, but they will come... Let's see what will be next...

Tuesday, April 24, 2007

Exams are over!

Wow, now I'm feeling relaxed :-)
Had three oral exams during the last seven weeks: in Automotive Mechatronics, Automotive Engineering and the most important one, in Embedded System, which was today.
I'm really fed up of learning... it's too strenous and takes too much time. I had no time for coding or anything else that's why there was no update in this blog and on my website. Hopefully that will change now and I'll get more constructive...

Friday, February 23, 2007

Brainfuck Studio released!

Finally I have managed to finish the first public release of Sunshine's Brainfuck Studio and put it online at my site.
If you don't know: it's a little development environment/interpreter for Brainfuck files written in C#.
This version (0.6) should be to some extent stable ;-) It works quite fine, but syntax colouring and interpreting sources is even slower than I thought... As it's my first c# project, I don't know how to improve the performance, but let's see.
Also many features I am thinking of are not implemented yet. But there are newer versions to come, one day or other...

Enjoy it and keep cool!

Wednesday, February 14, 2007

Working at my Brainfuck Studio

So, today I had some time, so I continued coding my Brainfuck interpreter in c#.
Well, most basic things work: step-by-step, run-to-cursor and normal execution work fine. Also do saving/loading files, syntax highlighting, a comment feature and much more do what they should... But also a lot of minor bugs impede working with it. And when I look at some parts of the source code, my eyes bleed... too ugly, but it gets better :-)

Also I have really many ideas I want to implement, so it will last a couple of weeks till I'm going to publish a beta version on my site.

But here a screenshot of its current state:

Monday, February 12, 2007

A visit @ IBM

Last week a group of students from the courses of Embedded Systems (including me :-) made a study trip to the IBM research center in Böblingen. Quite cool to have a look behind the scences...
First the building is quite modern and has a nice atmosphere. And very important: the meals at the staff restaurant taste really good! ;-)
We listened to some interesting speeches about IBM servers and of course about the architecture and development of the brandnew Cell processor! Wow! We got also some information about the 'blue gene' and made an excercise for training soft skills.
I think working at IBM is really interesting and must be fun! But to get there a job is very hard for sure... Well, that's future. I have some terms left with learning and exams... So I should get back to work...
Bye

Tuesday, January 30, 2007

Touching .NET

Hey,

again long time no post :-( Well, as always: friends, family and my studies are more important and time is limited...

But I finally managed to have a look at .NET and C#. As you perhaps know, I code Java and C/C++ (with Windows API) for some time. And I'm pretty impressed!
C# looks as I could like it - but as I'm used to Java I have still some problems to find the right commands. And a C language without real pointers? Unusual ;-)
But it seems that you can really fast develop windows applications. Compared to GUI Programming with Windows API, it's like heaven!

Interestingly it remembered me coding with Delphi and its VCL several years ago. So Microsoft needed more 5 years longer than Borland to provide us coders with a useful 'forms designer'. Better late than never...

Currently I'm working with Visual Studio 2003 and .NET FrameWork 1.1; I really like it although it's always difficult to dive into a new language. I thought as a first project (to get familiar with all those new things) of a simple Brainfuck Interpreter. I know, there are more than enough to find in the www, but I wanted to start easy :-)

Started some days ago, I found some strange things. Most annoying till now was the RichtextBox control. I derived a new class from it just to add some simple special functionality. Surprisingly that was not that easy!
* There is no function to get the line and column of the caret - you have to code it yourself (column is not that easy).
* You can specify automatic scrollbars if the content fits not into the visible area. But how to set/get the position of a scrollbar (as with GetScrollPos/SetScrollPos in WinAPI)? How to scroll by code?
In the end, I created my own scrollbar as a child window of the richtext control, but that meant some work and still contains errors... Not the best solution.
* Also using syntax highlighting/coloring (for which the richtextbox was designed) need pretty much programming effort.

Well, I thought these things would be easier than they actually are. Hopefully in Framework 2.0 or 3.0 there are some improvements concering these points.

So in the next days I want to continue coding... hope it progresses faster.

Till then, here is a image from the current status: (as you see, still a lot to do)

Tuesday, November 14, 2006

Sudoku Solver finished!

So,
I finally get my sudoku solver finished. While the bruteforce-backtracking variant is still not properly working, I completed the (in my opinion) more difficult one:
It's using Algorithm X by Knuth along with it's 'Dancing Links': That's a clever method for handling a spare matrix with a double-linked list, make changes to this matrix and later easily undo these changes. Algorithm X is non-deterministic alogrithm for solving an exact cover problem given in matrix form.
The point is now that: a sudoku puzzle can be transformed into an exact cover problem and therefore be solved with the algorithm X.
It took me really some time to understand how this all works, and even longer to implement it correctly (!), but it's pretty fast (much faster than the bruteforce-backtracking approach)! And once you understand it, it looks so elegant :-)
You can download the source from my site of course.

Apart form that, everything is fine. A lot to do for my study, but it's fun and quite interesting. A very good friend of mine moved into my flat, so now there is even more party in the evening.

And I want to emphasize it again: listen to Flyleaf. Such great music, I listened to them all the time while coding. So give it a try!

Ok, so keep on coding & reversing,
Sunshine

Monday, October 30, 2006

Life sign from me....

So, I'm back again... Last week the new university term began and I have a lot to do. It's the first time I could choose all the subjects myself... I decided to attend all about embedded systems and as minor field of study vehicle construction. Seems quite interesting, hopefully it's not getting too difficult!
I haven't coded nearly anything during the last weeks cause I have broken my arm on October 3rd :-( And typing with just one hand is not that funny... A few days ago, I started my own sudoku solver. It's working, a bit slow but working. But testing if a self-generated puzzle has just one solution is NOT working. I don't know why... I hope I get it soon but my motivation is fading away...
Furthermore, I have a new girlfriend, and spending my spare time with her is much more better than sitting in front of a monitor. So let's see what comes next...
I'm out...
C ya

Tuesday, September 19, 2006

Infected by a trojan...

Yesterday I went mad... Altough I use Antivir, a firewall and have all windows updates installed, I fucking little file called 'ibm00001.exe' infiltrated my system. It injects itself into explorer.exe, opens some ports and as soon as there is an internet connection, it sends data out in the world and you cannot use your internet connection anymore.
So I searched from another pc for information and first it looked pretty easy: booting in windows emergency mode, kill the file, kill some registry settings and everything should be fine... and I tried really a lot! And altough I killed everything (all registry info etc.) and there was no sign that this fucking thing is running, as soon as I connected to the web, the same shit again. It has been a long time ago that I was so angry than yesterday. I wasted hours to kill this bastard, but it didn't worked. Seemed I had another harder version than the users in the forums out there. Finally I re-installed my windows and after nearly 6 hours, my system was running again....
WHAT A FUCK!!!!!!! HATE!
If I ever meet a trojan coder, I will kill him!
Bye!

Tuesday, September 12, 2006

Came across a new band...

Hi,
while surfing the net and listening to some music on amazon, I found a new band which I definitely like. Perhaps you had a look at the music section on my website, so you probably know that it's a rockband :-) I'm talking about 'Flyleaf'. I've seen their best song (in my opinion) on TV and bought the album. The come from Texas and played already as introducing band for Korn. Although the music is not as hard as I wish it to be (some songs sound like a harder version of Avril Lavigne), they have some awesome songs! Be sure to check it out > http://www.flyleafmusic.com/

Keep cool...
Sunshine