22 March 2024, 12:24 | #1 |
OctaMED Music Composer
Join Date: Jan 2009
Location: Venice - Italy
Age: 49
Posts: 672
|
Tricks to blit noise or corrupted data on purpose
I'm calling all Amiga HW experts to share any known trick which would allow the blitter to copy on purpose random noise or corrupted data to a destination.
Borderline techniques also accepted and welcome. For example something like updating a register just after the blitter operation has started and without checking DMAF_BLTDONE bit, would be interesting Thanks! |
22 March 2024, 12:51 | #2 |
Lemon. / Core Design
Join Date: Mar 2016
Location: Tier 5
Posts: 1,213
|
That's a bit of a broad question.
An old trick...Random noise can be generated by blitter filling an area of memory, and writing (XOR or OR) some random data in there too. Ie.. if you have a screen buffer, and draw a line from top (random x start position) to bottom (random x end position), and fill, then keep repeating this each frame, you end up with what looks like TV static Last edited by DanScott; 22 March 2024 at 13:02. |
22 March 2024, 18:18 | #3 |
OctaMED Music Composer
Join Date: Jan 2009
Location: Venice - Italy
Age: 49
Posts: 672
|
The draw trick sounds interesting, I'll give it a try! Thanks!
|
22 March 2024, 18:55 | #4 |
Registered User
Join Date: Feb 2017
Location: Denmark
Posts: 1,204
|
There is at least one demo (from TEK IIRC) that I think just lets one bitplane pointer run wild to achieve noisy effect for free. Doesn't fit your requirements but food for thought.
|
22 March 2024, 20:58 | #5 |
Registered User
Join Date: Sep 2019
Location: Finland
Posts: 371
|
Not exactly noise but maybe worth a mention. I remember tinkering with some blits where the input was 16 white pixels on the top left of the screen, back in the day.
I don't remember what exactly I was after or what the initial parameters were, but after turning on the line mode and running it, the screen was filled with sierpinski triangles. I almost fell off the chair from amazement! I still have the source somewhere. |
24 March 2024, 00:25 | #6 |
OctaMED Music Composer
Join Date: Jan 2009
Location: Venice - Italy
Age: 49
Posts: 672
|
Would be nice if you share the source
|
24 March 2024, 12:28 | #7 |
Registered User
Join Date: Jul 2014
Location: Warsaw/Poland
Posts: 195
|
|
24 March 2024, 17:01 | #8 |
Registered User
Join Date: Jan 2012
Location: USA
Posts: 373
|
Crazy idea:
Set up line mode to draw a vertical line from top to bottom. Put random in BLTADAT. Put random in BLTBDAT. Set minterms for D= A xor B xor C. Use CPU to change BLTADAT and BLTBDAT while line draw is running. Do this 20 times to cover each vertical strip lowres. Idea is that blitter will be rotating texture in BDAT and mixing with A and C giving some apparent randomness while CPU is working to generate new random seed values. Optimization: set C and D mod to two and set line length to 780. Blitter thinks it's moving down one line at a time but instead is moving sequentially through bp. Only 8 line draws required for a bp. Another idea for black and white noise: use three interleaved bps. Now draw your 20 strips with line length of 936. Use a color pallet filled with black and white values like WWBWBBWB. Now every three writes by blitter picks random indexes for 16 pixels. Gray values might be even better to produce retro TV look. |
24 March 2024, 18:15 | #9 | |
Registered User
Join Date: Feb 2017
Location: Denmark
Posts: 1,204
|
Quote:
Yes, if start just with a couple of bits set and do what DanScott said you will get these patterns. Very nice bltcon0=BC0F_SRCA | BC0F_SRCB | BC0F_DEST | 0x3c, bltcon1 = BC1F_BLITREVERSE | BC1F_FILL_XOR, bltapt pointing to last row, b/dpt pointing to line above Yes, exactly. |
|
25 March 2024, 00:37 | #10 |
OctaMED Music Composer
Join Date: Jan 2009
Location: Venice - Italy
Age: 49
Posts: 672
|
|
25 March 2024, 00:41 | #11 |
OctaMED Music Composer
Join Date: Jan 2009
Location: Venice - Italy
Age: 49
Posts: 672
|
|
25 March 2024, 02:39 | #12 |
Registered User
Join Date: Jan 2012
Location: USA
Posts: 373
|
|
26 March 2024, 21:27 | #13 |
OctaMED Music Composer
Join Date: Jan 2009
Location: Venice - Italy
Age: 49
Posts: 672
|
Actually no, but if you're suggesting to feed real-time noise data into a SynthSound waveform... it's an idea
|
26 March 2024, 21:53 | #14 |
Registered User
Join Date: Jun 2010
Location: PL?
Posts: 2,875
|
Probably even moderately compressed data has sufficient level of entropy so they can be used as noise source. I assume you are using compression for exe/data so reusing compressed data as noise source can be option.
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
E clock signal in Zorro slot purpose? | confusion | support.Hardware | 3 | 20 February 2020 22:03 |
IDE emu: corrupted inquiry data after CMD_READ more than 16 sectors | thomas | support.WinUAE | 1 | 01 January 2017 15:43 |
Whats the purpose of... | Leandro Jardim | support.WinUAE | 4 | 14 February 2013 11:54 |
Blob - the purpose of the F10 key? | MethodGit | support.Games | 0 | 23 October 2010 01:11 |
Reviving an A4000 for a noble purpose | Flink | Amiga scene | 26 | 30 July 2008 10:23 |
|
|