22 May 2017, 11:37 | #1 |
Registered User
Join Date: Dec 2013
Location: Auckland
Posts: 3,539
|
Structure of CopList object?
I can't seem to find a list of the contents of the "CopList" structure anywhere, even on http://www.amigacoding.com/index.php/Blitz:Object_types
I've reverse engineered enough of it to keep going, but having a fully labelled version of it would be useful for future, cheers. |
22 May 2017, 12:48 | #2 |
Registered User
Join Date: Jun 2009
Location: Dublin, then Glasgow
Posts: 6,334
|
Hmmm, that is strange - it's not in the source of bb2objtypes.res either, which is where it should be... So I don't know where it's declared. Perhaps you could add what you've determined to the Blitz Object Types page to help others - partial information is better than none at all! Or send it to me and I can add it for you.
I don't know if you've already looked at it, but the AB3 object browser lets you at least see the names and types of the fields in a structure - it might be worth a look. |
22 May 2017, 12:57 | #3 | ||
Registered User
Join Date: Dec 2013
Location: Auckland
Posts: 3,539
|
Quote:
In any case.. here's what I came up with. I'm 99% sure there's more fields than just this, this was as far as I dug into it (I only wanted to poke the custom copper commands). Quote:
|
||
22 May 2017, 13:02 | #4 |
Registered User
Join Date: Jun 2009
Location: Dublin, then Glasgow
Posts: 6,334
|
Cool, I'll add them anyway and have a look myself. I haven't ever looked at the structure itself so never noticed it was missing (or at least hidden away elsewhere). I'll have a dig through it when I'm in front of my machine at home later on and see what I can find.
|
22 May 2017, 18:33 | #5 |
Registered User
Join Date: Oct 2014
Location: Europe
Posts: 470
|
It's in bb2objtypes.res, also in the sourcecode of this precompiled include:
Code:
NEWTYPE .coplist size.l ;0 = not initialised coppos.l ;location in chipmem colors.l sprites.l bpcons.l bplanes.l dot.l customs.l dob.l numbp.w:colpokes.w ;limits fetchwid.w:xand:xshift ;for show calculations (3 words) ypos.w:height:res numsprites.w:numcols:numcustoms aga.w ;24bit=$8000 fetch = $00,$10,$20,$30 resshift.w ;lo,hi,shi = 2 1 0 setup.w ;lines taken for setup cblow.w ;if custom goes below 256 sfetch.w:spres:spif:spwid:sspwid ;sprite mode for display End NEWTYPE |
23 May 2017, 00:55 | #6 |
Registered User
Join Date: Jun 2009
Location: Dublin, then Glasgow
Posts: 6,334
|
Ah, interesting... It doesn't appear to be in either the AB3 version of bb2objtypes.res or the BB2 version I have here. I've added it anyway to the AmigaCoding list.
Be careful here though, and remember that lower-case Newtypes are generally Blitz internal objects, whereas CamelCase Newtypes are generally OS structs as defined in amigalibs.res (and prepended with an underscore in all.res). I was a little confused about that earlier, and it's the OS struct that earok appears to be using in his code. The attachment is the AB3 definition of the .CopList Newtype (the OS-defined one), which is the one you appear to be using earok. It matches the struct defined in the Amiga SDK (includes/graphics/copper.h), but just like for other objects, is different to the Blitz internal .coplist Newtype. |
23 May 2017, 03:33 | #7 |
Registered User
Join Date: Dec 2013
Location: Auckland
Posts: 3,539
|
ah, thanks guys. Much appreciated
|
23 May 2017, 23:13 | #8 |
Registered User
Join Date: Sep 2007
Location: Stockholm
Posts: 4,332
|
It's also not in my bb2objtypes, which I used for adding the other objects to the Amigacoding wiki.
|
29 August 2018, 00:02 | #9 |
Registered User
Join Date: Dec 2013
Location: Auckland
Posts: 3,539
|
Is there a place where the complete bb2objtypes.res (with coplist) can be downloaded?
|
29 August 2018, 22:19 | #10 |
Registered User
Join Date: Jun 2009
Location: Dublin, then Glasgow
Posts: 6,334
|
Not that I know of. You could download the latest source for it from the AmiBlitz SourceForge site, add the extra definitions needed and compile your own...
Maybe Cylon knows where he got his version? |
22 June 2019, 05:37 | #11 |
Registered User
Join Date: Dec 2013
Location: Auckland
Posts: 3,539
|
There seems to be an odd issue with the coplist structure as defined here, there appears to be a missing word (or perhaps there's word that should have been defined as a long)
size.l ;0 = not initialised coppos.l ;location in chipmem colors.l sprites.l bpcons.l bplanes.l dot.l customs.l dob.l numbp.w:colpokes.w ;limits fetchwid.w:xand:xshift ;for show calculations (3 words) padding.w ;<- I've added this to correct offsets of ypos etc ypos.w:height:res numsprites.w:numcols:numcustoms aga.w ;24bit=$8000 fetch = $00,$10,$20,$30 resshift.w ;lo,hi,shi = 2 1 0 setup.w ;lines taken for setup cblow.w ;if custom goes below 256 sfetch.w:spres:spif:spwid:sspwid ;sprite mode for display If I don't add that "padding.w" field (and I'm not totally sure where it should go), the YPOS is in Height, Height is in Res, Res in NumSprites etc. |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Resource and Structure.offs | copse | Coders. General | 4 | 23 December 2013 23:56 |
Question for someone that understands disk structure | Djay | support.Other | 5 | 20 February 2011 16:04 |
Bitmap Font File Structure | ant512 | Coders. General | 7 | 20 October 2007 08:33 |
|
|