20 April 2021, 12:48 | #1 |
Registered User
Join Date: May 2019
Location: Norway
Posts: 32
|
Short newbie question: is this the correct way to fill an area with a static value?
Hi,
Another newbie question: I need to fill a large rectangular area with some static value. So, this is more or less the same as clearing the screenbuffer, but instead of filling with 0's I need to fill with a static value. What I have done (and actually looks like working?) is based on the code snippet from Photon of Scoopex "Clearing the screen buffer" ( http://coppershade.org/articles/Code...Dream_in_Code/), but I've done a few changes to this code: 1) I've changed the word in BLTCON0 from $0100 to $01F0. This is because I want what's in source A to copied to destination D. 2) I've set my wanted static data word in BLTADAT This seems to work very nice, but is this the "correct" (or smartest) way to fill an area with some static data? I've not enabled the source A channel, but if I understand the HW reference manual the blitter will repeat the value that is set in BLTADAT when it's not enabled? |
20 April 2021, 13:18 | #2 |
Lemon. / Core Design
Join Date: Mar 2016
Location: Tier 5
Posts: 1,212
|
Yes, this looks like the way I'd do it. Have the word you want to fill memory with in BLTADAT, and set D=A minterms, with channel A disabled.
|
20 April 2021, 14:19 | #3 |
Registered User
Join Date: May 2019
Location: Norway
Posts: 32
|
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
area fill max mem used | meynaf | Coders. General | 12 | 31 August 2018 18:30 |
Area-fill operation examples? | LuigiThirty | Coders. System | 9 | 08 April 2017 10:53 |
Short Midi interface / Octamed SS question | Vegas | support.Hardware | 13 | 16 January 2012 22:35 |
Area fill advice | pmc | Coders. General | 4 | 11 October 2010 08:50 |
|
|