13 June 2014, 23:21 | #1 |
Registered User
Join Date: Jun 2014
Location: milan / italy
Posts: 174
|
Hflip and capital punishment
Hello
This link says the game has a special blob routine performing hflip on the fly http://clickboom.com/capitalpunishment/faq.shtml#tech Is it possible? How? Thanks! |
19 June 2014, 20:34 | #2 |
Glastonbridge Software
Join Date: Jan 2012
Location: Edinburgh/Scotland
Posts: 2,243
|
even AMOSPro can do this, i never measured how fast it was though.
it would take several blits I think to hflip an image, or the CPU could do it with the help of look-up tables. |
20 June 2014, 16:05 | #3 | |
Registered User
Join Date: Jun 2014
Location: milan / italy
Posts: 174
|
Quote:
and this is the reason I was so interested in a fast way to hflip blobs... After all it would mean halve the memory for blobs in some games... I hoped for some magic .. |
|
20 June 2014, 17:01 | #4 | |
Registered User
Join Date: Apr 2014
Location: Germany
Posts: 154
|
Quote:
A HFLIP is a mirror on the horizontal = X achis right? Flipping on the X-achis is no problem just count down instead up with the modulo |
|
20 June 2014, 18:02 | #5 | |
Registered User
Join Date: Jun 2014
Location: milan / italy
Posts: 174
|
Quote:
Even if you use the reverse mode the blitter doesn't flip each single word. |
|
21 June 2014, 19:12 | #6 |
Glastonbridge Software
Join Date: Jan 2012
Location: Edinburgh/Scotland
Posts: 2,243
|
reverse mode reverses both source and data anyway so it wouldn't be any help.
I'm guessing it relies on the fact that the player doesn't switch directions too often though, and stores the "flipped" version permanently until it needs to be flipped again, instead of flipping it every time it is drawn. |
21 June 2014, 21:59 | #7 |
Registered User
Join Date: Jun 2014
Location: milan / italy
Posts: 174
|
This is definitivelly possible. It is trading fill rate for animation quality.
I guess this impacts the game play since to flip the animations takes time and therefore some moves are not available immediatly after changing orientation. I have to try the game and see if it is true. |
22 June 2014, 09:53 | #8 |
Registered User
Join Date: Apr 2014
Location: Germany
Posts: 154
|
off topic side note:
The Coldfire/68K cores have a CPU instruction which does a LEFT/RIGHT flip. Its called BITREV. This instruction makes coding this real easy. |
04 February 2015, 14:47 | #9 | |
Banned
Join Date: Dec 2014
Location: Montreal
Posts: 129
|
Quote:
Hflip is one of those things which could have been implemented for an insignificant hardware cost but that the Amiga designers did somehow not include. (Scaling and negative/fractional modulos are another.) I have been thinking that it might be possible to do some crude flipping using the Blitter with all three sources pointing to the same address but with different masks and shift values so that the masked bits of a source will lie at a different place at the destination. Problems are that you can only work on a one word column at a time otherwise you will end up mixing bits of successive words together; and you need several passes before all bits are inverted. And of course it's dog slow since it uses all four channels, despite the three sources being identical (another missed Blitter optimization opportunity). |
|
04 February 2015, 14:58 | #10 |
Registered User
Join Date: Jun 2014
Location: milan / italy
Posts: 174
|
No, I didn't try.
In the moment it was not in the fly I lost interest. Just advertisement. I think you can hflip with 4 blits. Yes is not cheap. And you are absolutely right that the Amiga Blitter could have been much better with just few tweaks. |
08 February 2015, 15:12 | #11 |
Posts: n/a
|
What we did at Core (for Wolfchild if I remember correctly, and possibly other games) is...
To store half of the sprite flipped one way, and the other half flipped the other. So for a 16 pixel high sprite, the top 8 pixels are flipped. When drawing, you only then have to flip half the sprite (either the top of the bottom) depending on which way you want the sprite to face. You can use a 256 byte lookup table for flipping the bytes (or a 64k for flipping words) |
08 February 2015, 15:43 | #12 |
CaptainM68K-SPS France
|
welcome dansauk And thanks for sharing these informations
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Capital Punishment on HD | bull4342 | support.WinUAE | 20 | 14 November 2021 18:44 |
capital punishment | stuntpup | support.Games | 11 | 04 September 2007 19:44 |
Capital Punishment | formater | support.Games | 5 | 08 June 2007 07:44 |
Capital Punishment | staticgerbil | Retrogaming General Discussion | 12 | 26 May 2003 22:15 |
Capital Punishment | colin2712 | support.Games | 0 | 10 February 2002 01:25 |
|
|