English Amiga Board


Go Back   English Amiga Board > Coders > Coders. System

 
 
Thread Tools
Old 12 July 2014, 09:16   #941
tolkien
AmigaMan

tolkien's Avatar
 
Join Date: Oct 2012
Location: Castro Urdiales/Spain
Posts: 504
Sorry about that peterk. I want to thank you for your lib. It has changed my Amiga being more responsive.
Feel free to do what you want. I have made a very great work. Thanks again.
tolkien is offline  
Old 13 July 2014, 06:54   #942
PeterK
Registered User
 
Join Date: Apr 2005
Location: Hangover
Posts: 2,499
Thanks guys, please don't worry about me. I just wanted to explain why I can't go on holiday anymore.

Update to icon.library 46.4.358:

The "WorkbenchNotification" tagitem is not used for PutIcon() anymore at all. WB 3.0/3.1 will not update drawer or disk icons and their windows, which makes snapshot much faster. This problem was caused by my OnlyUpdatePosition tagitem that didn't care about possible changes of the drawerdata or window frames.
PeterK is offline  
Old 13 July 2014, 18:53   #943
Michael
A1260T/PPC/BV/SCSI/NET

Michael's Avatar
 
Join Date: Jan 2013
Location: Moscow / Russia
Posts: 673
Peter, can you explain in a bit more detail how the direct drawing routines work and colour allocation under hi-colour screens ?
Apparently for normal icons no pens are used, since I can clear them all to one colour in FullPalette and all icons look fine. The other situation is with the selected images, those seem to rely on the pens, since they are effected (when dragging an icon)
Michael is offline  
Old 13 July 2014, 19:52   #944
PeterK
Registered User
 
Join Date: Apr 2005
Location: Hangover
Posts: 2,499
The OS 3.5 icon format stores 1 byte for each pixel of an image. This byte points to a 24 bit RGB color. So, there are up to 256 TrueColors possible for each image (or only 255 colors + 1 for transparency).

The colormapping searches for every 24 bit RGB color for the closest screencolor and stores it as a mapping byte pointing to one of the pens. This color lookup table (CLUT) has up to 256 entries. Pen 0 is used for the color number that represents transparency, if this is really enabled in the flags. The CLUT is used by the C2P routine to generate the planar images.

The icon dragging routines are always done by the workbench.library and are relying on the colormapping and the generated planar images. The dragging is something like a third icon state besides the unselected and the selected icon. It's also one of the reasons why the mapping and the planar images are still required at least for the selected icon.

The unselected icon images won't need the colormapping because their planar images will be covered by the direct drawing which writes the 24 bit RGB colors directly to the gfx-card screen by using the cybergraphics.library WritePixelArray() function. The cgx function will convert the RGB data automatically into the correct format fitting to the screens depth. It will overwrite any previously blitted planar image. Thus, you really don't need any pens in this case. But there might exist other applications still requiring the planar images, even for the unselected icons.

Last edited by PeterK; 15 July 2014 at 20:08.
PeterK is offline  
Old 15 July 2014, 21:21   #945
Michael
A1260T/PPC/BV/SCSI/NET

Michael's Avatar
 
Join Date: Jan 2013
Location: Moscow / Russia
Posts: 673
Silent Aminet update ;-)
Michael is offline  
Old 16 July 2014, 00:55   #946
PeterK
Registered User
 
Join Date: Apr 2005
Location: Hangover
Posts: 2,499
There was no reason to ring the bell here for the Aminet release. It was nearly the same as 46.4.358 which I uploaded here before. But you can try out the next version already, ok?

Update to icon.library 46.4.360:

Removed the last 12 bytes from the extended OS 3.5 DiskObject structure, which was a list header for other extensions (maybe OS4) that has never been used by my icon.library. This saves 12 bytes for every colormapped icon, makes it a little faster to build a fresh DiskObject structure and reduces the size of the library by a few bytes. I hope that no other program relies on the original V45.1 structure, since it is internal and private and should be accessed by GetDiskObject() and FreeDiskObject() only.
PeterK is offline  
Old 16 July 2014, 05:43   #947
Michael
A1260T/PPC/BV/SCSI/NET

Michael's Avatar
 
Join Date: Jan 2013
Location: Moscow / Russia
Posts: 673
Don't know, by DOPUS uses a few odd bits for it's own icon positioning.
Michael is offline  
Old 16 July 2014, 05:53   #948
PeterK
Registered User
 
Join Date: Apr 2005
Location: Hangover
Posts: 2,499
Yes, I know that:
Code:
// Set Opus icon position
void __asm __saveds L_SetIconPosition(
	register __a0 struct DiskObject *icon,
	register __d0 short x,
	register __d1 short y)
{
	// Valid icon?
	if (!icon) return;

	// Set position
	*((ULONG *)&icon->do_Gadget.MutualExclude)=(x<<16)|y;
}


// Get the icon type
short __asm __saveds L_GetIconType(register __a0 struct DiskObject *icon)
{
	if (!icon) return 0;

	if (icon->do_Gadget.SpecialInfo==(APTR)icon)
		return ICON_CACHED;
	else
	if (icon->do_Gadget.SpecialInfo==(APTR)(icon+1))
		return ICON_NEWICON;

	return ICON_NORMAL;
}
And I also use "SpecialInfo" for GetIcon() / PutIcon() to make a reference to the OS 3.5 extended DiskObject structure for WB 3.0/3.1. But I couldn't find any conflicts with DOpus5 yet.

Btw, these entries belong to the old standard DiskObject structure. The removal of the last 12 bytes from the OS 3.5 extension has no effect on it.

Last edited by PeterK; 16 July 2014 at 05:58.
PeterK is offline  
Old 16 July 2014, 16:59   #949
Michael
A1260T/PPC/BV/SCSI/NET

Michael's Avatar
 
Join Date: Jan 2013
Location: Moscow / Russia
Posts: 673
Have you checked the later v50+ includes ? They define a few tags as reserved, so it might not be a very good idea to kill them just yet.
Michael is offline  
Old 16 July 2014, 17:43   #950
PeterK
Registered User
 
Join Date: Apr 2005
Location: Hangover
Posts: 2,499
From where can I get the v50 includes? OK, just found SDK_53.24.lha

Found everything in base.lha now inside of the bigpack

@Michael

Which are the tags you are referring to? What problems do you expect exactly?

Last edited by PeterK; 16 July 2014 at 19:47.
PeterK is offline  
Old 16 July 2014, 21:16   #951
Michael
A1260T/PPC/BV/SCSI/NET

Michael's Avatar
 
Join Date: Jan 2013
Location: Moscow / Russia
Posts: 673
icon.h
workbench.h

there you can spot a few of this and a few new tags that might be handy for your lib too, just see how it evolved since v44/45, what's new ;-)

eg....
/* Reserved tags; don't use! */
#define ICONA_Reserved1 (ICONA_Dummy+73)
#define ICONA_Reserved2 (ICONA_Dummy+74)
#define ICONA_Reserved3 (ICONA_Dummy+76)
#define ICONA_Reserved4 (ICONA_Dummy+81)
#define ICONA_Reserved5 (ICONA_Dummy+85)
#define ICONA_Reserved6 (ICONA_Dummy+86)
#define ICONA_Reserved7 (ICONA_Dummy+87)
#define ICONA_Reserved8 (ICONA_Dummy+88)
#define ICONA_Reserved9 (ICONA_Dummy+99)
#define ICONA_Reserved10 (ICONA_Dummy+100)
#define ICONA_Reserved11 (ICONA_Dummy+109)
#define ICONA_Reserved12 (ICONA_Dummy+110)
#define ICONA_Reserved13 (ICONA_Dummy+121)
Michael is offline  
Old 17 July 2014, 16:51   #952
8bitbubsy
Registered User

8bitbubsy's Avatar
 
Join Date: Sep 2009
Location: Norway
Posts: 1,290
Is this icon.library optimization also suited for a stock Amiga 600 with Kickstart 3.1, Workbench 3.1 and 2MB of graphics RAM?
8bitbubsy is offline  
Old 17 July 2014, 17:00   #953
ancalimon
Supernormal

ancalimon's Avatar
 
Join Date: Jul 2007
Location: Istanbul / Turkey
Age: 37
Posts: 1,229
Quote:
Originally Posted by 8bitbubsy View Post
Is this icon.library optimization also suited for a stock Amiga 600 with Kickstart 3.1, Workbench 3.1 and 2MB of graphics RAM?
It is as far as I know. But really get yourself some fast ram at least!
ancalimon is offline  
Old 17 July 2014, 19:43   #954
PeterK
Registered User
 
Join Date: Apr 2005
Location: Hangover
Posts: 2,499
Quote:
Originally Posted by Michael View Post
icon.h
workbench.h

there you can spot a few of this and a few new tags that might be handy for your lib too, just see how it evolved since v44/45, what's new ;-)

eg....
/* Reserved tags; don't use! */
....
Yes, I've seen that and I will also have a deeper look at all other new features of v50+. But I don't think that there is a conflict caused by latest update, where I removed the last 12 bytes from the internal DiskObject structure.

If I can find anything usefull among the new features in the v50 icon.library
I may try to port that to my library. But not every toy or gadget will make it.

@8bitbubsy
Quote:
Is this icon.library optimization also suited for a stock Amiga 600 with Kickstart 3.1, Workbench 3.1 and 2MB of graphics RAM?
Yes. it is. The easiest way for your system configuration to make use of my library is to install BetterWB, which also comes with a lot of very useful tools and is optimized for low-end Amigas.
http://lilliput.amiga-projects.net/BetterWB.htm

In case, that you just want to use my icon.library, download the full package from Aminet, read the docs and copy the 68000 version of the lib into LIBS: and LoadModule or LoadResident into C:. Then add a line for LoadModule or a few lines for LoadResident to your startup-sequence above the SetPatch line.

Adding FastRam is always a good idea, but as long as your A600 has no 68020 CPU you will not be able to use it for the icons, since FBlit won't work on a 68000.
PeterK is offline  
Old 17 July 2014, 23:49   #955
PeterK
Registered User
 
Join Date: Apr 2005
Location: Hangover
Posts: 2,499
Update to icon.library 46.4.361:

Fixed a bug in the 68000 version on WB 3.0/3.1 with the delayed loading of the selected image for default icons. This occurred for example when you tried to create a new drawer.

Update to icon.library 46.4.362:

Cleaned up the 68000 version a bit more and reduced the size by 96 bytes.


Update to icon.library 46.4.363:

Fixed another bug, a very old one which nobody ever complained about. The saving of an icon in ENVARC:Sys as a deficon by WB-Info or IconEdit did never work, no matter if by type or by name.

Last edited by PeterK; 18 July 2014 at 16:39.
PeterK is offline  
Old 18 July 2014, 23:46   #956
Lonewolf10
AMOS Extensions Developer
Lonewolf10's Avatar
 
Join Date: Jun 2007
Location: near Cambridge, UK
Age: 39
Posts: 1,919
Quote:
Originally Posted by PeterK View Post
No, I can't go on holiday anymore, since my health condition is very poor for many years already. I stopped working end of 1998 and the last five years I did not even leave the house where live. The end of the project will be the final. Nothing comes next...
Sorry to here that. You are due a well-deserved rest though (and loads of praise from us )
Lonewolf10 is offline  
Old 20 July 2014, 12:48   #957
PeterK
Registered User
 
Join Date: Apr 2005
Location: Hangover
Posts: 2,499
@Lonewolf10 I will have a long rest when I'm dead.

Update to icon.library 46.4.364 and 46.4.365:

Tried to optimize the direct drawing as far as possible, but don't expect any big speed gains > 1%.

No changes in the 68000 version, of course.

Added 365 as an alternative version, because I can't say which is faster, if there really is a difference at all. Maybe on a real Amiga with a gfx-card ?

Last edited by PeterK; 20 July 2014 at 14:53.
PeterK is offline  
Old 20 July 2014, 17:27   #958
AGS
XoXo/Tasko Developer
AGS's Avatar
 
Join Date: Dec 2013
Location: Munich
Age: 43
Posts: 450
Hi Peter,

is there away to convert an icon .info file into asm sourcecode so that i can use it for appicon purposes w/o loading it from disk?

greets, A
AGS is offline  
Old 20 July 2014, 22:44   #959
PeterK
Registered User
 
Join Date: Apr 2005
Location: Hangover
Posts: 2,499
Maybe, you can find the information that you are looking for here:

http://www.evillabs.net/wiki/index.p...a_Icon_Formats

http://krashan.ppa.pl/articles/amigaicons/


Update to icon.library 46.4.366(a):

It seems that using MOVEM to replace 5-6 MOVE instructions for space saving was not a good idea. MOVEM EA RL is really slow. So, the two versions 366 and 366a are my last effort to make the direct drawing a bit faster. If this can't be achieved then I will use the code from 46.4.363 again.

For speed tests you can use the "OpenWin.rexx" script from daxb which can be found in the ThirdParty/Benchmark drawer of my Aminet release.

Last edited by PeterK; 22 July 2014 at 00:32.
PeterK is offline  
Old 25 July 2014, 17:25   #960
Michael
A1260T/PPC/BV/SCSI/NET

Michael's Avatar
 
Join Date: Jan 2013
Location: Moscow / Russia
Posts: 673
Done some speed test on my real miggy...

Open SYS:Prefs/ ~100 icons, mostly OS35 format


Lib, 8-bit, 16bit, 24bit
359, 1.68s, 1.92s, 2.18s
366, 1.68s, 1.92s, 2.18s
366a 1.70s, 1.94s, 2.20s


So, personally, I see no difference. Maybe I am missing something?
Michael is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
ClassicWB Full and icon.library 46.4 Retroplay project.ClassicWB 8 05 August 2018 14:57
WB library conflict/versions Akira support.Apps 3 22 July 2010 19:47
PNG Icon to Color Icon Converter? Leandro Jardim request.Apps 1 24 May 2010 05:39
What's the latest version of icon.library for OS3.9? NovaCoder support.Apps 3 30 June 2009 16:43
Requesting icon.library v44+... nikvest request.Other 2 16 September 2007 02:58

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 10:15.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2019, vBulletin Solutions Inc.
Page generated in 0.13599 seconds with 14 queries