flat assembler
Message board for the users of flat assembler.

flat assembler > MenuetOS > MenuetOS clock

Author
Thread Post new topic Reply to topic
Krulj



Joined: 03 May 2007
Posts: 12
Location: Serbia
Hello everyone.
I am watching Menuetos project almost from beginning (~2001).
I am reading posts almost every day and I must say: Great job people (especially you Ville).
I have always wanted to participate in development but I don't think I'am good
enough and I'am always short with time.
Some time ago I saw Analog clock for Menuet and it was written in NASM but I think that Menuet deserve a cool looking clock written in pure FASM so I wrote this one afternoon. Hope you will like it. Don't be confused by the size of the files because background image takes over 40kB but it looks great Wink.
Keep up the good work Smile


Description: This file contains 3 versions
Download
Filename: Clock.zip
Filesize: 56.38 KB
Downloaded: 684 Time(s)

Post 03 May 2007, 08:15
View user's profile Send private message Reply with quote
Krulj



Joined: 03 May 2007
Posts: 12
Location: Serbia
Ops, I just realized that I forgot to post source code.
Some reply would be really nice Wink


Description: Source code for clock
Download
Filename: Clock.7z
Filesize: 24.23 KB
Downloaded: 637 Time(s)

Post 08 Jun 2007, 18:45
View user's profile Send private message Reply with quote
Ville



Joined: 17 Jun 2003
Posts: 215
Good work ! Stylish and functional. We're waiting for your second application. Smile
Post 09 Jun 2007, 15:18
View user's profile Send private message Reply with quote
Krulj



Joined: 03 May 2007
Posts: 12
Location: Serbia
Thanks!
As for my second application you will probably have to wait
for some time because I am writing mp3 decoder in pure asm.
Problem is that I am working on it for quite some time now
and I have only done about 10% Sad
Post 09 Jun 2007, 17:13
View user's profile Send private message Reply with quote
Madis731



Joined: 25 Sep 2003
Posts: 2145
Location: Estonia
I hope you succeed - you are already further than I was. I did about 3% and gave up because I saw that I didn't have the time to finish it.
Post 11 Jun 2007, 17:23
View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger Reply with quote
Krulj



Joined: 03 May 2007
Posts: 12
Location: Serbia
Hi everyone Wink

There are only two things that I don't like
about my clock:
1) background image takes ~50kB
2) second, minute and hour pointer's are
basic lines so they are not smooth

I was bored this afternoon so I decided
to try implementing some basic antialiased
lines in Menuet.
In my opinion we can't achieve any quality graphic
project in Menuet without antialiasing.
You can see result in Antialiased binary file.
Since it took me just one afternoon I think that
result is very nice. I used 255 levels for black because
of 16 bit division.
Better result can be achieved with 32 bit precision.
NonAntiaAliesed binary file is application with basic rough
lines so you can compare results.

So far I have only done black lines on white background
but I will try to find a way to draw any color line on any
color background.
If anyone has done something similar I would greatly appreciate
any advice.

NOTE: App is tested only in 1024x768 resolution.


Happy coding Wink


Description:
Download
Filename: AntiAliased.7z
Filesize: 1.2 KB
Downloaded: 525 Time(s)

Post 15 Nov 2007, 23:53
View user's profile Send private message Reply with quote
Krulj



Joined: 03 May 2007
Posts: 12
Location: Serbia
Hi everyone Wink

After couple of day’s hard work I finally have some good results to show for.
Now Antialiasing sub routine will work for every color line on any background color.

After this I have to figure out how to take out that bulky picture and still keep the cool looks. Smile))

In zip file you will find two version that are done without antialiasing and three versions with
antialiasing effect. I have also included and couple of screenshots.

NOTE: App will work only in 1024x768 resolution , because I yet have to
adapt function for reading color of background pixel for other resolutions.


Happy coding Wink


Description: 5 versions + 2 screenshoots
Download
Filename: Final1.7z
Filesize: 35.12 KB
Downloaded: 555 Time(s)

Post 18 Nov 2007, 14:34
View user's profile Send private message Reply with quote
Madis731



Joined: 25 Sep 2003
Posts: 2145
Location: Estonia
Hmm, are you using GS selector to do that? There are some neat tricks to read the width&height and then calculate appropriately...

Btw, nice job!
Post 19 Nov 2007, 12:51
View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger Reply with quote
Krulj



Joined: 03 May 2007
Posts: 12
Location: Serbia
Hi Wink

Thanks Madis Smile
No I don't use GS selector.

NOTE: I have finished commenting code so you will find source code in zip file.
I have also upgraded clock so now it will work on all resolutions.
Code still needs a lot of optimization.


Happy coding Wink


Description: App + source file
Download
Filename: Archive.7z
Filesize: 40.26 KB
Downloaded: 551 Time(s)

Post 20 Nov 2007, 17:55
View user's profile Send private message Reply with quote
Krulj



Joined: 03 May 2007
Posts: 12
Location: Serbia
Hi Wink

I am trying to make clock background image external
so everyone in menuetos community could make pictures and dinamicly load it into application.

But I have stumbled into a problem.
Function 58 says that you have to provide file name and path to that file in order to load it.
I know picture name but how can I determine in which directory it's located?
Currently my application is in C:\menuetos\ but what if someone wants to copy
clock.bin and clock.raw into eg D:\App\ ?

So the question is:
How to get information about current dir ?

Thanks Wink
Post 05 Dec 2007, 20:46
View user's profile Send private message Reply with quote
JN
Guest




Hi

You could exclude the image as a RAW file e.g. clockbg.raw and include it as binary data using the 'file' instruction:
Code:
mask:
file 'clockbg.raw'
image_end:    

This doesn't allow to load the image dynamically, but it is out of the source code.
Post 30 Sep 2008, 12:02
Reply with quote
Krulj



Joined: 03 May 2007
Posts: 12
Location: Serbia
Thanks JN
but that will lead to the same end,
all images would be compiled into the
same file.
What I need to do is modify Menuetos kernel
but since I have lot of work that won't be any time soon Sad
Post 07 Oct 2008, 09:52
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Copyright © 1999-2019, Tomasz Grysztar.

Powered by rwasa.