English Amiga Board


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

 
 
Thread Tools
Old 03 March 2024, 20:36   #1
REAKTOR BEAR
Registered User
 
Join Date: Mar 2021
Location: SWEDEN
Posts: 40
Divide screen into blocks

We are trying to divide the screen into 64x64px blocks, and change the background color on each block individually.

We have tried Copperlist and reading raster VHPOSR, but we can only produce vertical divisions (copperbars)... Does anyone know how to do this type of block division?

REAKTOR BEAR is offline  
Old 03 March 2024, 23:36   #2
roondar
Registered User
 
Join Date: Jul 2015
Location: The Netherlands
Posts: 3,427
I'm not sure what the problem is?

Assuming you're not running in a screen mode where the Copper doesn't get any cycles during bitplane DMA, you can simply wait for the desired vertical and horizontal position with the Copper, change the background colour, wait for the next horizontal position, change the background colour again, etc.

Just repeat this for every line of the effect and it should work.
Or, if you prefer, use Copper loops instead.

At any rate, you should not need to do anything with VHPOSR if you use the Copper to change colours.
roondar is offline  
Old 04 March 2024, 20:44   #3
Rock'n Roll
German Translator
 
Rock'n Roll's Avatar
 
Join Date: Aug 2018
Location: Drübeck / Germany
Age: 49
Posts: 190
The title suggests that you intend to use the DIWSTRT, DIWSTOP, (DDFSTRT and DDFSTOP)
to divide the screen into 64x64 blocks. This is not possible.
Setting up several screens in this way is only possible to a very limited extent and only vertically.

For a background in blocks (chessboard pattern), 1-5 bitplanes are usually used.

Otherwise a copper screen would also be possible. (where all colours are only changed with the copper)
By waiting and setting the colours at certain vertical and horizontal positions, it is possible to create
a chessboard pattern. Copper loops can be used here.

With AGA, 64x64px sprites would also be conceivable to create a block pattern.

However, my favourite would be the variant with the bitplanes.
Rock'n Roll is offline  
Old 04 March 2024, 21:12   #4
Galahad/FLT
Going nowhere
 
Galahad/FLT's Avatar
 
Join Date: Oct 2001
Location: United Kingdom
Age: 50
Posts: 9,014
Easiest way is to setup a 32 colour screen, and each block is an individual colour within that.

That way you can change the colours of the blocks individually by poking the relevant colour registers.

For example. First block in top left corner would be colour 00, block next to it to the right would be colour 01 and so on (layout the graphics in a logical way).
Galahad/FLT is offline  
Old 10 March 2024, 11:47   #5
REAKTOR BEAR
Registered User
 
Join Date: Mar 2021
Location: SWEDEN
Posts: 40
Great thanks, will try the copperlist to make a chessboard pattern.
REAKTOR BEAR is offline  
Old 14 March 2024, 17:21   #6
REAKTOR BEAR
Registered User
 
Join Date: Mar 2021
Location: SWEDEN
Posts: 40
How far to top of screen can we push copperoperations... meaning how many lines needed for vblank (lowres)?

Last edited by REAKTOR BEAR; 14 March 2024 at 17:44.
REAKTOR BEAR is offline  
Old 14 March 2024, 19:09   #7
a/b
Registered User
 
Join Date: Jun 2016
Location: europe
Posts: 1,046
Copper doesn't care about that, you can push to line 0. But in general, I wouldn't bother with anything under line $24 (normal is $2c, so 8 lines of vertical overscan) because it won't be visible unless you have unusually high overscan.
a/b is online now  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
Are there any compressors/tools that re-arrange/block-divide data(pictures)? NorthWay Coders. General 15 15 May 2019 21:18
Fast divide by 50 or 60 without tables? mcgeezer Coders. Asm / Hardware 29 21 March 2019 14:57
Fast multiply / divide by 64? mcgeezer Coders. Asm / Hardware 10 06 April 2018 19:29
DivIDE Type Device for Amstrad CPC 464 manic23 request.Other 9 16 August 2014 10:55
ERROR: Dalek Attack (Integer Divide By Zero) Hungry Horace project.Killergorilla's WHD packs 18 20 September 2009 22:17

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 13:50.

Top

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