![]() |
![]() |
#1 |
Registered User
Join Date: Sep 2015
Location: Germany
Posts: 278
|
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 ![]() |
![]() |
![]() |
#2 |
Registered User
Join Date: Jan 2002
Location: Germany
Posts: 7,047
|
Works perfectly for me.
Show some code. |
![]() |
![]() |
#3 |
Registered User
Join Date: Sep 2015
Location: Germany
Posts: 278
|
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 |
![]() |
![]() |
#4 |
Registered User
Join Date: Jan 2002
Location: Germany
Posts: 7,047
|
Sometimes you only need to talk about it
![]() |
![]() |
![]() |
#5 |
Registered User
Join Date: Sep 2015
Location: Germany
Posts: 278
|
|
![]() |
![]() |
#6 |
Registered User
Join Date: Jun 2015
Location: Germany
Posts: 1,961
|
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 |
![]() |
![]() |
#7 | |
Registered User
Join Date: Sep 2015
Location: Germany
Posts: 278
|
Quote:
Because it‘s a much cleaner way and more comprehensive. |
|
![]() |
![]() |
#8 |
Registered User
Join Date: Jan 2019
Location: Germany
Posts: 3,491
|
Is it? I would understand why to build it on the stack, namely in order to create a reentrant function that can be used from multiple tasks simultaneously, or for code that can be made resident. Building it in the text segment does not provide an advantage - actually that segment should better be used for constant data only.
|
![]() |
![]() |
#9 | |
Registered User
Join Date: Sep 2015
Location: Germany
Posts: 278
|
Quote:
Last edited by dissident; 18 August 2024 at 11:40. |
|
![]() |
![]() |
#10 |
Registered User
Join Date: Jan 2019
Location: Germany
Posts: 3,491
|
Well, as said, "in case of doubt, program reentrant and keep your segments constant". It avoids trouble later if you make changes in the architecture and, by pure chance, reuse one function or another.
|
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
![]() |
||||
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 |
|
|