English Amiga Board


Go Back   English Amiga Board > Coders > Coders. General > Coders. Tutorials

 
 
Thread Tools
Old 04 September 2018, 14:53   #1
Yragael
Registered User

 
Join Date: Jun 2017
Location: Paris
Posts: 43
Tutorial about zooming with BPLCON1 (102) : Looking for examples

Hi guys,


I'm finishing a little tutorial about horizontal hardware zooming using the famous BPLCON1 trick.



I am looking for examples of this zoom in famous demos. I was a bit suprised to notice that it does not seem to have been used in Elysium by Sanity. I found it is used in Jesterday by Sanity for the rolling menu.



If you know any demo that uses this trick, I may include some screenshots in my tutorial to point the reader to them.
Yragael is offline  
Old 04 September 2018, 16:14   #2
DanScott
Lemon. / Core Design

DanScott's Avatar
 
Join Date: Mar 2016
Location: Belgrade, Serbia
Posts: 319
Rink-A-Dink Redux
Desert Dream

and if you want to see a strange variation on this, disassemble my copper-list from the Star Wars scroller in "The Fall"
DanScott is offline  
Old 04 September 2018, 18:16   #3
Yragael
Registered User

 
Join Date: Jun 2017
Location: Paris
Posts: 43
Thanks. Great demos. I will definitely pick the Star Wars scroller. I had a look at the Copper list for the Star Wars scroller (nice!). The Copper updates BPLCON1, as expected, and the low address pointers for bitplanes 1 and 2. It seems that this is a way to jump by 128 pixels every 64 pixels in the middle of a line because the text is drawn in a much wider bitplane than the screen ?
Yragael is offline  
Old 10 September 2018, 18:39   #4
Yragael
Registered User

 
Join Date: Jun 2017
Location: Paris
Posts: 43
Tutorial published

Well the tutorial is published here, width downloadable code :



http://www.stashofcode.fr/zoom-hardw...on1-sur-amiga/


In french but should translate well with Google. Will translate it one day...
Yragael is offline  
Old 10 September 2018, 19:49   #5
ross
Sum, ergo Cogito

ross's Avatar
 
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 48
Posts: 1,363
Another great tutorial


The ultimate usage for the (modulo/$102) effect is sure in the rotozoomer/wobbler of Brian the Lion:
[ Show youtube player ]
(an awesome piece of code by Kreator/Anarchy)

Well, is not only $102 but also copper at best, blitter and sorcery
ross is offline  
Old 10 September 2018, 20:32   #6
Yragael
Registered User

 
Join Date: Jun 2017
Location: Paris
Posts: 43
Yes I noticed it. Awesome.

Although I just checked the Copper list with the MK III, and it does not appear that this very talented guy did use the BPLCON1 trick (which makes the FX even more impressive!). The structure of the Copper list of the menu, with "Brian" rotating in the background, is, per line, just some MOVE along with NOPs :

MOVE ?,BPLCON1
MOVE ?,BPL1MOD
MOVE ?,BPL2MOD

Most of the good zooms do not use the BPLCON1 trick for horizontal stretching, maybe because of its limitations, as explained in my tutorial... But all of them do use the BPLxMOD trick for vertical stretching.

Quote:
Originally Posted by ross View Post
Another great tutorial


The ultimate usage for the (modulo/$102) effect is sure in the rotozoomer/wobbler of Brian the Lion:
[ Show youtube player ]
(an awesome piece of code by Kreator/Anarchy)

Well, is not only $102 but also copper at best, blitter and sorcery

Last edited by Yragael; 10 September 2018 at 21:49.
Yragael is offline  
Old 10 September 2018, 22:03   #7
nogginthenog
Amigan

 
Join Date: Feb 2012
Location: London
Posts: 679
Quote:
Originally Posted by Yragael View Post
Well the tutorial is published here, width downloadable code :



http://www.stashofcode.fr/zoom-hardw...on1-sur-amiga/


In french but should translate well with Google. Will translate it one day...
Nice tutorial! Perfectly readable in English with Google translate.
nogginthenog is offline  
Old 10 September 2018, 22:50   #8
LeCaravage
Registered User

LeCaravage's Avatar
 
Join Date: May 2017
Location: AmigaLand
Posts: 135
Bravo.
LeCaravage is offline  
Old 11 September 2018, 09:49   #9
Yragael
Registered User

 
Join Date: Jun 2017
Location: Paris
Posts: 43
Some figures in the tutorial got fixed this morning: the scenario for the hardware horizontal zoom, and the matching "magic table". Not easy to translate this assembly code in Excel figures
Yragael is offline  
Old 11 September 2018, 11:24   #10
DanScott
Lemon. / Core Design

DanScott's Avatar
 
Join Date: Mar 2016
Location: Belgrade, Serbia
Posts: 319
Quote:
Originally Posted by Yragael View Post
Thanks. Great demos. I will definitely pick the Star Wars scroller. I had a look at the Copper list for the Star Wars scroller (nice!). The Copper updates BPLCON1, as expected, and the low address pointers for bitplanes 1 and 2. It seems that this is a way to jump by 128 pixels every 64 pixels in the middle of a line because the text is drawn in a much wider bitplane than the screen ?
Exactly

But there are some DMA glitches... so I used dual playfield, and hid the glitches with sprites (with strange priority values i seem to remember)
DanScott is offline  
Old 11 September 2018, 15:10   #11
Yragael
Registered User

 
Join Date: Jun 2017
Location: Paris
Posts: 43
Well done. Hiding the problem if it cannot be solved easily, or cannot be solved at all, is definitely part of the art of demomaking.
Quote:
Originally Posted by DanScott View Post
Exactly

But there are some DMA glitches... so I used dual playfield, and hid the glitches with sprites (with strange priority values i seem to remember)
Yragael is offline  
Old 14 September 2018, 15:46   #12
sandruzzo
Registered User
 
Join Date: Feb 2011
Location: Italy/Rome
Posts: 1,267
Since blitter has a barrel schift, is it possible to do the same thing with it?
sandruzzo is offline  
Old 26 September 2018, 02:23   #13
Toffee
Registered User
 
Join Date: Sep 2008
Location: Farnborough
Posts: 114
I'm assuming scroll register zoom doesn't work with AGA fmode register set to 3 as you can only shrink at every 64 pixels?
Toffee is offline  
Old 26 September 2018, 11:58   #14
DanScott
Lemon. / Core Design

DanScott's Avatar
 
Join Date: Mar 2016
Location: Belgrade, Serbia
Posts: 319
Quote:
Originally Posted by sandruzzo View Post
Since blitter has a barrel schift, is it possible to do the same thing with it?
Theoretically.. although you would have to work on word wide strips, and probably multiple passes to mask and merge adjacent edges.

This $102 register trick is just making use of a hardware "feature" and is effectively free (less the copper instructions to move to the register)
DanScott is offline  
Old 26 September 2018, 12:07   #15
Yragael
Registered User

 
Join Date: Jun 2017
Location: Paris
Posts: 43
Quote:
Originally Posted by Toffee View Post
I'm assuming scroll register zoom doesn't work with AGA fmode register set to 3 as you can only shrink at every 64 pixels?

Yes. This won't work because of this reason. You would only be able to shrink the image every 64 pixels. I did not try.
Yragael is offline  
Old 26 September 2018, 12:13   #16
Yragael
Registered User

 
Join Date: Jun 2017
Location: Paris
Posts: 43
Quote:
Originally Posted by DanScott View Post
Theoretically.. although you would have to work on word wide strips, and probably multiple passes to mask and merge adjacent edges.

This $102 register trick is just making use of a hardware "feature" and is effectively free (less the copper instructions to move to the register)

zoom3.s and zoom4.s contain the code to shrink horizontally the picture using the Blitter. Such code is required to shrink the picture horizontally when the possibilities of the hardware horizontal zoom are exhausted (ie: when BPLCON1 has reached 15). This kind of software horizontal zoom is done in real-time, but it should be run before the zoom to precompute intermediate pictures.

Last edited by Yragael; 26 September 2018 at 12:18.
Yragael is offline  
Old 26 September 2018, 22:36   #17
Toffee
Registered User
 
Join Date: Sep 2008
Location: Farnborough
Posts: 114
It's a shame AGA doesn't help this trick. Would be cool doing a full screen 8 bitplane zoomer.

If you increase scroll register between reads does it give you blank data?

I still find it incredible how someone stumbled upon this. I'm sure Chaos said he got the trick from another Sanity coder before Jesterday.
Toffee 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
Zooming on screenshots? Decypher support.FS-UAE 4 25 August 2015 00:17
Zooming using BPLCON1 (horiz. shift) — am I doing it wrong? losso Coders. Asm / Hardware 10 14 January 2014 18:00
Amiga Future issue 102 released AndreasM News 0 02 May 2013 09:17
Matt Chat 102: Darkstar with Jeff Williams Part 1 gilgamesh Retrogaming General Discussion 4 31 May 2011 14:19
WinUAE handling of ECS:BPLCON1:DOFF flag RedskullDC support.WinUAE 1 26 December 2007 18:12

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 19:30.


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