20 December 2018, 01:05 | #1 |
Banana
Join Date: Jul 2016
Location: Darmstadt
Posts: 1,217
|
Sprite multiplexing & copper bars?
I like the background gradient effects the copper gives, and this is relatively easy to get with DisplayRGB, but that's incompatible with CustomSprites (one is per line, one is per display, so far so understood). I'd really like both, and I'm sure it must be possible.
I've read the post here about CustomColours but I can't see how to make that work in practice - the palette change would have to take place in between the scanlines. One sets up the "changed" palette and CustomColours effects those changes at a given vertical position - difficult to repeatedly bang the same register. If I've misunderstood please let me know! Which leaves us with CustomStrings, which is a Copper Wait for vertical position, from what I can tell. Can I use this to trigger a Copper Interrupt at a given vpos, which I then process with an interrupt handler? (SetInt 4). Am I overthinking it? |
20 December 2018, 01:12 | #2 | |
Banana
Join Date: Jul 2016
Location: Darmstadt
Posts: 1,217
|
Ah, no, it can do it directly, but the question is how do I get this into the "string" format Blitz wants? I've tried #1800000 and "1800000" but no luck
Quote:
|
|
20 December 2018, 22:59 | #3 |
Banana
Join Date: Jul 2016
Location: Darmstadt
Posts: 1,217
|
This is apparently how one uses CustomStrings
Code:
co$=Mki$($180)+Mki$($0f00) ; move f to col0 CustomString 0,0,8,co$ |
22 December 2018, 01:42 | #4 |
Warhasneverbeensomuchfun
Join Date: Jun 2001
Location: Rio de Janeiro / Brazil
Age: 41
Posts: 3,450
|
I've managed to use CustomSprites in both my games Roadtrip and Santa Chaos, but it's VERY limited and it eats a lot of Copper time.
With it you can basically divide your display on 2 sections... the upper one have its own sprites ( from 0 to 7) and the lower one will get their own sprites too (from 8 to 15). If you try to draw sprites from one section on the other section you'll get lots of glitches on screen. That's all you can do with it. You can do some interesting stuff with it with some planning, but you can't pull off a Mega Typhoon thing with a shitload of sprites all around the screen I really would love to be able to draw sprites with the Copper on Blitz Basic, but I have no idea of how to do it. I am pretty sure it can be done without wasting so much time from the copper as CustomSprites does. |
22 December 2018, 09:31 | #5 |
Banana
Join Date: Jul 2016
Location: Darmstadt
Posts: 1,217
|
I see from your Santa Chaos source (thanks, by the way!) that you have managed to get both DisplayRGB and CustomSprites working together. I totally failed at that, always getting errors about not enough copper space, no matter how many "custom coppers" I allocated in InitCopper.
Why CCOffset=6? I don't really understand what that variable does. |
22 December 2018, 13:38 | #6 | |
Warhasneverbeensomuchfun
Join Date: Jun 2001
Location: Rio de Janeiro / Brazil
Age: 41
Posts: 3,450
|
Quote:
... because I have NO IDEA and the manual doesn't explain it either! I got it right by luck! (Well, actually after testing it for a while, I cound half understand it) I can tell you what I did If you look at the mess that's my code, I use a Display RGB to do the gradient on the sky. With CCOffset = 0, the DisplayRGB there does not work, but the sprite split was done properly. As I use higher values, it's like the split is done at lower parts of the screen, as DisplayRGB works partially. With the value I inserted, I could use display RGB up until the first horizontal orange line on the image. The vertical area shows an area where if I try to draw ANY sprites there, I get glitches. So I figured out all this area is used by the copper to "reset" the sprites. So I feel the CCOffset somehow tells the display where it should start doing the "sprite reset", and from this line up to the next few lines you won't be able to use any other copper commands.. But I am not sure about that. On Roadtrip I usde CCOffset = 0 and on the next argument I just passed the height I wanted the sprite reset to be done, but as the space between the "upper" sprites and the "lower" sprites was rather big, I had no trouble with it. And the DisplayRGB I used there was way below on screen, so I had zero trouble using everything together. |
|
22 December 2018, 17:07 | #7 |
Registered User
Join Date: Jan 2014
Location: Belgrade / Serbia
Age: 41
Posts: 1,008
|
Once I used displayscroll that has ccoffset at the end and after experimenting i figured out that its value actully has to match the value of custom copper space at the end of the initcop.
Meaning, the way I understood it, if you already use some command like displayrgb that allocates certain number of copper instructions per line, thats the number that ccoffset's gonna be. For example in my instance I had AGA copper bars and if I had ccoffset lower than 4 copper bars appeared less colorful(ocs like). Last edited by Cobe; 22 December 2018 at 20:21. |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Sprite multiplexing on Amiga | majikeyric | Coders. General | 51 | 27 April 2023 11:06 |
Midi and Bars & Pipes and presentation | Gustau | support.Amiga Forever | 1 | 15 July 2018 19:42 |
Bars & Pipes Internal Sounds? | Vaninna | support.Apps | 4 | 06 August 2016 12:55 |
Bars & Pipes Professional | Ricebug | New to Emulation or Amiga scene | 0 | 08 February 2012 03:32 |
Copper Bars | Vortex | Coders. Tutorials | 51 | 26 June 2009 23:23 |
|
|