English Amiga Board


Go Back   English Amiga Board > Coders > Coders. System

 
 
Thread Tools
Old 07 August 2024, 15:15   #1
dissident
Registered User
 
Join Date: Sep 2015
Location: Germany
Posts: 266
OpenScreenTags() with tag SA_Colors32

A general question regarding screens on OS3.x.

When I use OpenScreenTags() with a tag list and the tag SA_Colors32 pointing to my colour table, my colors are not loaded.

I use the correct format:

Code:
color_table
  DC.W 2 ;Only 2 colours
  DC.W 0 ;Start at COLOR00
  DC.L $ffffffff ;COLOR00 32 bits red
  DC.L 0 ;COLOR00 32 bits green
  DC.L 0 ;COLOR00 32 bits blue
  DC.L 0 ;COLOR01 32 bits red
  DC.L 0 ;COLOR01 32 bits green
  DC.L 0 ;COLOR01 32 bits blue 
  DC.L 0 ;End of list
Maybe Thomas Richter could enlighten me.
dissident is offline  
Old 07 August 2024, 16:25   #2
thomas
Registered User
 
thomas's Avatar
 
Join Date: Jan 2002
Location: Germany
Posts: 7,045
Works perfectly for me.

Show some code.
Attached Thumbnails
Click image for larger version

Name:	018.png
Views:	15
Size:	1.7 KB
ID:	82848  
thomas is offline  
Old 07 August 2024, 16:55   #3
dissident
Registered User
 
Join Date: Sep 2015
Location: Germany
Posts: 266
Quote:
Originally Posted by thomas View Post
Works perfectly for me.

Show some code.
Here it is:

Code:
	lea	rd_custom_screen_colors(pc),a0
	move.w	#rd_custom_screen_colors_number,(a0)+
	moveq	#0,d0
	move.w	d0,(a0)+
	move.l	#$ffffffff,(a0)+
	move.l	d0,(a0)+
	move.l	d0,(a0)+	
	move.l	d0,(a0)+
	move.l	d0,(a0)+
	move.l	d0,(a0)+
	move.l	d0,(a0)
Code:
	lea	rd_custom_screen_tag_list(pc),a0
	move.l	#SA_Left,(a0)+
     	moveq	#rd_custom_screen_left,d2
	move.l	d2,(a0)+
	move.l	#SA_Top,(a0)+
     	moveq	#rd_custom_screen_top,d2
	move.l	d2,(a0)+
	move.l	#SA_Width,(a0)+
	moveq	#rd_custom_screen_x_size,d2
	move.l	d2,(a0)+
	move.l	#SA_Height,(a0)+
	moveq	#rd_custom_screen_y_size,d2
	move.l	d2,(a0)+
	move.l	#SA_Depth,(a0)+
	moveq	#rd_custom_screen_depth,d2
	move.l	d2,(a0)+
	move.l	#SA_DisplayID,(a0)+
	move.l	#PAL_MONITOR_ID|LORES_KEY,(a0)+
	move.l	#SA_DetailPen,(a0)+
	moveq	#0,d0
	move.l	d0,(a0)+
	move.l	#SA_BlockPen,(a0)+
	move.l	d0,(a0)+
	move.l	#SA_Title,(a0)+
	lea	rd_custom_screen_name(pc),a1
	move.l	a1,(a0)+
	move.l	#SA_Colors32,(a0)+
	lea	rd_custom_screen_colors(pc),a1
	move.l	a1,(a0)+
	move.l	#SA_Font,(a0)+
	move.l	d0,(a0)+
	move.l	#SA_SysFont,(a0)+
	move.l	d0,(a0)+
	move.l	#SA_Type,(a0)+
	move.l	#CUSTOMSCREEN,(a0)+
	move.l	#SA_Behind,(a0)+
	move.l	d0,(a0)+
	move.l	#SA_Quiet,(a0)+
	move.l	d0,(a0)+
	move.l	#SA_ShowTitle,(a0)+
	move.l	d0,(a0)+
	move.l	#SA_AutoScroll,(a0)+
	move.l	d0,(a0)+
	move.l	#SA_Draggable,(a0)+
	move.l	d0,(a0)+
	move.l	#SA_Interleaved,(a0)+
	move.l	d0,(a0)+
	moveq	#TAG_DONE,d2
	move.l	d2,(a0)

Code:
	lea	rd_custom_screen_tag_list(pc),a1
	move.l	sf_color_cache(a3),a0
	move.l	a0,sctl_SA_Colors32+ti_Data(a1)
	sub.l	a0,a0
	CALLINT OpenScreenTagList
Indeed, it works. I found the bug in my coded. I did some changes and forgot to remove the two lines marked bold.
dissident is offline  
Old 07 August 2024, 16:57   #4
thomas
Registered User
 
thomas's Avatar
 
Join Date: Jan 2002
Location: Germany
Posts: 7,045
Sometimes you only need to talk about it
thomas is offline  
Old 07 August 2024, 17:38   #5
dissident
Registered User
 
Join Date: Sep 2015
Location: Germany
Posts: 266
Quote:
Originally Posted by thomas View Post
Sometimes you only need to talk about it
Yes, you are absolutely right.
dissident is offline  
Old 07 August 2024, 18:43   #6
grond
Registered User
 
Join Date: Jun 2015
Location: Germany
Posts: 1,952
May I ask why you set up your taglist from the code you are executing? I always did something like (not sure about the #palette but the assembler can put the pointer to your palette in place for you, either with or without the #):

taglist: dc.l SA_Depth, 1, SA_Colors32, #palette, TAG_DONE
palette: dc.w 2,0
dc.l -1,0,0,0,0,0
dc.l 0
grond 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
re-tacking the serial number tag to motherboard dhe support.Hardware 2 30 October 2022 23:49
Guten Tag from Germany! MeatMan Member Introductions 3 04 April 2017 22:54
How do we use the new [HOL] tag? Leffmann project.EAB 4 19 January 2014 14:51
[code] tag? Amiga1992 project.EAB 14 07 January 2004 10:48

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 00:16.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.17458 seconds with 16 queries