English Amiga Board


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

 
 
Thread Tools
Old 22 March 2024, 12:24   #1
KONEY
OctaMED Music Composer
 
KONEY's Avatar
 
Join Date: Jan 2009
Location: Venice - Italy
Age: 49
Posts: 667
Big grin 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!
KONEY is offline  
Old 22 March 2024, 12:51   #2
DanScott
Lemon. / Core Design
 
DanScott's Avatar
 
Join Date: Mar 2016
Location: Tier 5
Posts: 1,212
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.
DanScott is offline  
Old 22 March 2024, 18:18   #3
KONEY
OctaMED Music Composer
 
KONEY's Avatar
 
Join Date: Jan 2009
Location: Venice - Italy
Age: 49
Posts: 667
The draw trick sounds interesting, I'll give it a try! Thanks!
KONEY is offline  
Old 22 March 2024, 18:55   #4
paraj
Registered User
 
paraj's Avatar
 
Join Date: Feb 2017
Location: Denmark
Posts: 1,107
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.
paraj is offline  
Old 22 March 2024, 20:58   #5
koobo
Registered User
 
koobo's Avatar
 
Join Date: Sep 2019
Location: Finland
Posts: 363
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.
koobo is offline  
Old 24 March 2024, 00:25   #6
KONEY
OctaMED Music Composer
 
KONEY's Avatar
 
Join Date: Jan 2009
Location: Venice - Italy
Age: 49
Posts: 667
Would be nice if you share the source
KONEY is offline  
Old 24 March 2024, 12:28   #7
Cyprian
Registered User
 
Join Date: Jul 2014
Location: Warsaw/Poland
Posts: 187
Quote:
Originally Posted by paraj View Post
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.
do you mean this one?
[ Show youtube player ]
Cyprian is offline  
Old 24 March 2024, 17:01   #8
mc6809e
Registered User
 
Join Date: Jan 2012
Location: USA
Posts: 372
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.
mc6809e is offline  
Old 24 March 2024, 18:15   #9
paraj
Registered User
 
paraj's Avatar
 
Join Date: Feb 2017
Location: Denmark
Posts: 1,107
Quote:
Originally Posted by koobo View Post
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.

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



Quote:
Originally Posted by Cyprian View Post
do you mean this one?
[ Show youtube player ]
Yes, exactly.
paraj is offline  
Old 25 March 2024, 00:37   #10
KONEY
OctaMED Music Composer
 
KONEY's Avatar
 
Join Date: Jan 2009
Location: Venice - Italy
Age: 49
Posts: 667
Thumbs up

As crazy as I was hoping for!



Quote:
Originally Posted by mc6809e View Post
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.
KONEY is offline  
Old 25 March 2024, 00:41   #11
KONEY
OctaMED Music Composer
 
KONEY's Avatar
 
Join Date: Jan 2009
Location: Venice - Italy
Age: 49
Posts: 667
Eek

Nice one! In fact I've already some random bpl pointers trick in place



Quote:
Originally Posted by paraj View Post
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.
KONEY is offline  
Old 25 March 2024, 02:39   #12
mc6809e
Registered User
 
Join Date: Jan 2012
Location: USA
Posts: 372
Quote:
Originally Posted by KONEY View Post
As crazy as I was hoping for!
Hope you get it working!

Noticed you use octamed. You trying to generate noise for percussive sounds?
mc6809e is offline  
Old 26 March 2024, 21:27   #13
KONEY
OctaMED Music Composer
 
KONEY's Avatar
 
Join Date: Jan 2009
Location: Venice - Italy
Age: 49
Posts: 667
Actually no, but if you're suggesting to feed real-time noise data into a SynthSound waveform... it's an idea
KONEY is offline  
Old 26 March 2024, 21:53   #14
pandy71
Registered User
 
Join Date: Jun 2010
Location: PL?
Posts: 2,771
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.
pandy71 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
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

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 23:17.

Top

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