03 March 2024, 20:36 | #1 |
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? |
03 March 2024, 23:36 | #2 |
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. |
04 March 2024, 20:44 | #3 |
German Translator
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. |
04 March 2024, 21:12 | #4 |
Going nowhere
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). |
10 March 2024, 11:47 | #5 |
Registered User
Join Date: Mar 2021
Location: SWEDEN
Posts: 40
|
Great thanks, will try the copperlist to make a chessboard pattern.
|
14 March 2024, 17:21 | #6 |
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. |
14 March 2024, 19:09 | #7 |
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.
|
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 |
|
|