English Amiga Board

Go Back   English Amiga Board > Coders > Coders. Asm / Hardware

Thread Tools
Old 10 April 2015, 22:50   #1
Zone Friend
Join Date: Apr 2006
Location: Gothenburg/Sweden
Age: 43
Posts: 232
Hardware scrolling question

Assume this scenario:
Two screens, horizontal scrolling. When screen 2 has passed, it automatically goes back to screen 1. Loop.
I am no graphics-hardware-guru at all, but is there a clever way of doing this without blitting?
Last time I tried this (>10 years ago ), obviously there was a problem when going from screen 2 -> screen 1 (screen 1 was one vertical line off, due to the nature of bitplanepointers & hardwarescrolling).
Anyone understand what I mean?
oRBIT is offline  
Old 11 April 2015, 01:46   #2
Fernando Cabrera

Join Date: Oct 2013
Location: Spain
Posts: 86
I can't see the problem though I'm not an experienced Amiga coder at all so... Isn't it enough detecting when you have arrived at the end of screen 2 and, then, reset bitplane pointers to top left corner of screen 1? I think you wouldn't even have to reset BPLCON1 if screen width is 320 as it would be looping from 0 to 15 and back to 0 (this would also happen at the end of screen 2).
nandius_c is offline  
Old 11 April 2015, 11:08   #3
Registered User
Join Date: Nov 2006
Location: Stockholm, Sweden
Posts: 198
One option is to just continue scrolling, and never jumping back. This will make your screen gradually progress through chipmem so it only works if you will scroll a finite distance. If you do this then you do not need two full screens' worth of space; you just need some extra space for soft-scrolling and whatever you need to make your background & bob rendering code simple.

Another option (which is probably what you were thinking of), which allows infinite scrolling, is to have two screenbuffers just like you do now, but when you have reached screen 2, you jump back to screen 1. Now, instead of doing a full blit screen 2->screen 1 when it's time to jump back, you distribute that rendering cost over several frames. One way of doing that for backgrounds is, when you draw some new background graphics, draw it both to screen 1 and screen 2. When you have scrolled all the way to screen 2 this will result in screen 1 having identical background contents, and you can jump back there (just needing to redraw any dynamic content first).
Kalms is offline  
Old 11 April 2015, 11:57   #4

phx's Avatar
Join Date: Nov 2009
Location: Herford / Germany
Posts: 1,250
It's not completely clear, but I assume the key points are:
- scroll an area, which is two screens wide (i.e. 640 pixels), horizontally to the right(?)
- scroll in an endless loop, so it starts with pixel 0 again, after pixel 639
- the bitmap is static and will never change, no Blitter use

The easiest solution would be to use a bitmap area which is three screens wide and you have to make sure that the last screen and the first screen are identical.

This makes it possible to scroll from offset 0 to 639 and reset the bitplane pointers to offset 0, when reaching 640.
phx 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
Indivision 1200 AGA MK2cr scrolling question schneidas support.Hardware 46 16 January 2018 21:20
Vintage Hardware Adverts on the Amiga Hardware Database thals News 4 21 October 2014 19:00
MiniMig Video generation question... Hardware guru's help :) bloodline support.Hardware 19 16 January 2013 12:46
Hardware compatability question gtrmn01 support.Hardware 1 25 January 2010 23:00
Silly Question: articles and hardware reviews chiark AMR suggestions and feedback 5 18 January 2008 13:42

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 11:58.

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