22 February 2016, 19:18 | #1 |
Zone Friend
Join Date: Jan 2005
Location: italy
Age: 46
Posts: 244
|
equivalent of block but with x not power of 2
there is a blit shape mode equivalent of block , but with position not of power of 2 ?
because i want the shape completely replace the underlying bitmap like the block command the manual say : blitmode CookieMode Using CookieMode as a blitting mode will cause a shape to be blitted cleanly, 'as is',onto a bitmap. EraseMode Using EraseMode as a blitting mode will cause a blitted shape to erase a section of a bitmap corresponding to the outline of the shape. InvMode Using InvMode as a blitting mode will cause a shape to 'invert' a section of a bitmap corresponding to the outline of the blitted shape. SolidMode Using SolidMode as a blitting mode will cause a shape to overwrite a section of a bitmap corresponding to the outline of the blitted shape. unfortunately none of this modes replace the underlying gfx i've tried also to create the shape without the cookie, but without cookie i cannot use any of the blit command. what can i do? btw i'm using a 1 bitplane shape, and the color 0 seems always trasparent and can't delete the old shape |
22 February 2016, 19:45 | #2 |
Registered User
Join Date: Oct 2014
Location: Europe
Posts: 471
|
is your routine time critical? If not, you could use an equal sized full rectangle shape and eraseblit it before or draw (maybe with cpu:16x1 move.w) a rectangle (Box) to kill the underlying gfx.
If your source shape could be on a bmap (even ShapesBitmap would do) you could use the Scroll command to transfer blit this shape. Or you find a way to align the destination coords to meet Block requirements. It really depends on your needs, what is it for? I hope, you did actually tried cookiemode blit? Last edited by Cylon; 22 February 2016 at 19:53. |
22 February 2016, 20:14 | #3 |
Registered User
Join Date: Oct 2014
Location: Europe
Posts: 471
|
I should add that all "Cookiemode" etc parameters are (in this case - Blit) just values, so if you find out the correct blitter parameters (minterms) you could use those instead.
I've just tried a few with no results, there is a minterm+channels description for blitter dma somewhere in the blitz appendix. Code:
; XINCLUDE "BlitzINC:macros/stdblitz.mac.bb" !stdblitz {320,256,2} For a=0To9 Locate a,a Print"thisisjustsometexthere" Next a GetaShape 0,0,0,16,16 Boxf 20,90,150,120,2 BlitMode CookieMode Blit 0,20,100 Blit 0,20,140 BlitMode EraseMode Blit 0,40,100 Blit 0,40,140 BlitMode SolidMode Blit 0,60,100 Blit 0,60,140 BlitMode InvMode Blit 0,80,100 Blit 0,80,140 ;BlitMode %111100010111 ;EraseMode|CookieMode|InvMode|SolidMode ;Blit 0,100,100 ;Blit 0,100,140 ShapesBitMap 0,2 Use BitMap0 Scroll 0,0,16,16,120,100,2 Scroll 0,0,16,16,120,140,2 MouseWait End Last edited by Cylon; 22 February 2016 at 21:03. |
22 February 2016, 21:35 | #4 |
Zone Friend
Join Date: Jan 2005
Location: italy
Age: 46
Posts: 244
|
i will study this example, thanks for now
ah! the idea is with only one bitmap of 3 bitplanes create a static background (redrawing it every frame) and a 2 bitplane playfield, like in agony the idea of something like block is to save time not erasing the old bitplane but overwriting it maybe i've solved it, the correct blitmode for something like block is : BlitMode % 111111110000 BlitMode % 110111110000 works too Last edited by Raislin77it; 22 February 2016 at 22:14. Reason: maybe the solution :) |
22 February 2016, 22:48 | #5 |
Amigan - an' lovin' it!!
Join Date: Nov 2010
Location: Nottingham, UK
Age: 55
Posts: 557
|
I may be missing the point here, but are you looking at some sort of dual playfield approach? Blitz does this as a standard feature, by using the Dual Playfield Slice, or Display File. You can have up to 8 colours per playfield on an OCS machine.
If you really want to Blit non-rectangular tiles, overwriting the whole rectangular shape of the previous tile, then create the tile in DPaint (or your favourite paint program ) and use a different tile background colour than 0 as black. Or, do a CLS 0 before each tile Blit routine - but this will be slower. Whatever it is that you're doing, remember to post pics, code, vids or playable demos, as this inspires the rest of us to work on our projects too |
22 February 2016, 23:14 | #6 | ||
Zone Friend
Join Date: Jan 2005
Location: italy
Age: 46
Posts: 244
|
Quote:
Quote:
or maybe every 2 frames the cls unfortunately is slower also on one bitplane only and with the block approach i can erase+update the background in one single pass. yes, maybe with the avi function of winuae i can make some video Last edited by Raislin77it; 22 February 2016 at 23:35. |
||
22 February 2016, 23:37 | #7 |
Zone Friend
Join Date: Jan 2005
Location: italy
Age: 46
Posts: 244
|
|
23 February 2016, 11:48 | #8 |
Amigan - an' lovin' it!!
Join Date: Nov 2010
Location: Nottingham, UK
Age: 55
Posts: 557
|
Ah, I see. So, you have 1 bitmap, which is 3 bitplanes deep, and you're using 1 of the biplanes for the static background, and then offsetting the bitmap before showing the other 2 bitplanes? Is that right.
If so, it's an interesting way of doing things, but does look to work |
23 February 2016, 16:02 | #9 | ||
Zone Friend
Join Date: Jan 2005
Location: italy
Age: 46
Posts: 244
|
Quote:
maybe playing with the copper and the offsets of the bitplanes there are better solution, but i suspect it would involve too much assembler. and i don't know much assembler (and not too much of the internal working of an a500) , and blitz is much more easy to program Quote:
offcourse you lost half the colors from the bitmap, but with the copper and some trick, you can even animate the background and loss (depending of the picture displayed ) none of the colors like this animation for a "unofficial conversion" i'm trying to create [ Show youtube player ] and with this solution i have another 8 color playfiled to use Last edited by Raislin77it; 23 February 2016 at 16:11. Reason: fixed some spaghetti english :) |
||
23 February 2016, 22:11 | #10 |
Phone Homer
Join Date: Jun 2006
Location: 5150
Posts: 5,775
|
Good demo
|
23 February 2016, 23:33 | #11 |
Zone Friend
Join Date: Jan 2005
Location: italy
Age: 46
Posts: 244
|
thanks
|
25 February 2016, 22:12 | #12 |
Registered User
Join Date: Oct 2014
Location: Europe
Posts: 471
|
I've done some tests for myself now.
This is the result: It is a bit slow due to the giant boing blit, but it works. The parallax <tries> to scroll once per frame. I did not use your CustomCop hack, as it is to complicated, instead i have used the old cmds not suited for displaylib. Way easier. Please note the transparency on the text above: I'm actually printing onto a fake bmap, the blitting is done the same way, so there is no need to restore the far-behind-back - a simple CLS would do the trick. The Boingball could be transparent, too. Please try, 020+ recommended. Last edited by Cylon; 27 February 2016 at 02:57. |
26 February 2016, 00:36 | #13 | |
Zone Friend
Join Date: Jan 2005
Location: italy
Age: 46
Posts: 244
|
Quote:
yes the boing ball is very large, but with ony 4 sprites , you can plot and animate the ball for free (and have some "blitter time" to update the tilemap ) in my case , i was forced to use the CustomCop and the blitmode hack, because i want to use this "trick" on a vanilla 500 i want to "prove myself" (just for the fun of it) the a500 is capable of pulling some trick to stay in par with some recent "retro" production ^_^ but your demo is very effektfull very well done |
|
26 February 2016, 19:09 | #14 |
Registered User
Join Date: Oct 2014
Location: Europe
Posts: 471
|
@Raislin77it
Thanks. It's still possible to make my demo faster: i could just wave the bmap around without blitting at all. Also i currently BBlit, which is unnessessary because there is nothing to restore on this empty bmap. |
27 February 2016, 00:35 | #15 | |
Zone Friend
Join Date: Jan 2005
Location: italy
Age: 46
Posts: 244
|
Quote:
i don't know yours source code, but from the iff images it loads, it seems so from what i've come of your demo, the bitplane 1 is still, but the 2 and 3rd in the bottom bitplane scroll with the displayscroll command. you bblit the background and the ball image you can optimize the background blitting using the block command, but you can't wave it or the bottom dispaly doesn't scroll like the example. it waves too. (this is some speculation in relation of the use of the various display command, maybe the slices ones are different) Last edited by Raislin77it; 27 February 2016 at 00:42. |
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Equivalent Atari ST site like EAB? | kamelito | Retrogaming General Discussion | 31 | 30 January 2010 22:32 |
SnoopDos equivalent tool for Windows? | Shoonay | request.Apps | 36 | 20 March 2009 18:46 |
Skate Or Die - Amiga Equivalent? | Fingerlickin_B | Retrogaming General Discussion | 18 | 01 July 2007 14:47 |
An RZX Equivalent? | frankyboy | request.UAE Wishlist | 1 | 25 November 2006 17:28 |
PIC interesting a1200 m/b power hack: takes power from normal HDD power cable plug! | keropi | Hardware pics | 40 | 16 July 2006 21:16 |
|
|