English Amiga Board


Go Back   English Amiga Board > Coders > Coders. Language > Coders. C/C++

 
 
Thread Tools
Old 20 February 2021, 13:28   #21
TCH
Newbie Amiga programmer
 
TCH's Avatar
 
Join Date: Jun 2012
Location: Front of my A500+
Age: 38
Posts: 372
Quote:
Originally Posted by redblade View Post
Probably to calculate how much CHIPMEM it needs to allocate and if it fails to return the error. It could have saved the programmers bytes in the 256K rom.
So, it's just a pre-check and not actual allocation? The manual says otherwise, beside
CBump()
's manual page
does not says anything about extending the structure, just incrementing the pointer.
Quote:
Originally Posted by redblade View Post
Also the later RKM examples for OS 2+ modify the UCopperList to open up on a custom screen, code is 90% identical tho.
Yes, they do, but the original 1.3 one also could use a custom screen, not with taglists of course.
Quote:
Originally Posted by redblade View Post
Glad the battery didn't destroy your 500+
Me too, especially because neither battery didn't. Both the original and the replacement barrel lasted for roughly one and a half decade, but now a CR-2032 socket resides inside; easy to change the battery and no need to fear the chemicals anymore.

BTW, how can i suppress the error messages for this approach?
Code:
extern struct Custom custom;

...

CMOVE(copperlist, custom.color[4], cc[i]);
Code:
4096colors.c:91:3: warning: passing argument 2 of 'CMove' discards 'volatile' qualifier from pointer target type [-Wdiscarded-qualifiers]
   CMOVE(copperlist, custom.color[4], cc[i]);
   ^~~~~
In file included from 4096colors.c:4:0:
/opt/amiga/m68k-amigaos/ndk13-include/clib/graphics_protos.h:114:6: note: expected 'APTR {aka void *}' but argument is of type 'volatile UWORD * {aka volatile short unsigned int *}'
 VOID CMove( struct UCopList *copList, APTR destination, LONG data );
      ^~~~~
Aside from not using the
discarded-qualifiers
flag or write the code like this
Code:
CMove(copperlist, (void *)0x0188, cc[i]);
CBump(copperlist);
Works both way, but the warnings are flooding the console...
TCH is offline  
Old 20 February 2021, 20:46   #22
TCH
Newbie Amiga programmer
 
TCH's Avatar
 
Join Date: Jun 2012
Location: Front of my A500+
Age: 38
Posts: 372
The program is now available here:
http://oscomp.hu/?details/4096_Colors_v1.0.0_Amiga_1575
TCH is offline  
Old 22 February 2021, 20:07   #23
BippyM
Global Moderator
 
BippyM's Avatar
 
Join Date: Nov 2001
Location: Derby, UK
Age: 48
Posts: 9,355
I have moved this thread into c/c++. I appreciate it is hardware related, but it's more c/c++ related
BippyM is offline  
Old 22 February 2021, 20:52   #24
TCH
Newbie Amiga programmer
 
TCH's Avatar
 
Join Date: Jun 2012
Location: Front of my A500+
Age: 38
Posts: 372
Well, the language itself was secondary, but okay. (It was more like AmigaOS related as the solution itself was to use the AmigaOS API.)
TCH 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
Copperlist explanation Clydos Coders. General 37 06 July 2023 20:56
Advice on copperlist for borders MrD Coders. General 3 03 March 2012 07:25
Modifying a copperlist CmdrVimes Coders. General 5 06 September 2010 12:08
Setting up a copperlist oRBIT Coders. General 5 08 April 2010 14:18
Error in copperlist? Nyarlathotep support.WinUAE 7 12 August 2003 23:44

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 05:51.

Top

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