09 January 2022, 18:10 | #21 | |
OctaMED Music Composer
Join Date: Jan 2009
Location: Venice - Italy
Age: 49
Posts: 666
|
Thanks, I am aware of this but I'm not sure how to figure out valuable informations from it:
Nonetheless one of my favourite glitch generators Quote:
|
|
09 January 2022, 22:58 | #22 |
Registered User
Join Date: Jul 2015
Location: The Netherlands
Posts: 3,408
|
The DMA debugger shows which DMA source is accessing which cycle in Chip Memory on a frame by frame basis. Very useful to see what is doing what and how fast/slow parts of your code are.
Anyway, the colours represent the various DMA channels. Purple = Sprites Yellow = Copper Red = audio Dark Red & Gray = CPU (read/write) Dark gray = memory refresh Cyan = Blitter Blue = Bitplanes White = Disk The screenshot you've shown here shows that almost the entire frame is spent blitting, with a pretty big chunk of DMA reserved for bitplanes as well. |
10 January 2022, 00:02 | #23 |
OctaMED Music Composer
Join Date: Jan 2009
Location: Venice - Italy
Age: 49
Posts: 666
|
Ok, thanks. I can spot where my copper waits are and where the blue part gets thicker is because bottom 12 pixel are in hi-res.
Starts to make some sense, the blue part is basically the display area where bitplane DMA usage intensify. Up, down, right and left parts are where the beam is not drawing. Is this the correct way to read it? What still doesn't make sense to me are these two profiles, using a less intense blitter routine. Audio playback off, scroll is smooth: Audio playing back, scroll is jerky: Blitter DMA usage is far from being full and yet scrolling is affected by audio. Scroll is vertical and happens between upper and lower copper waits. There's a part where audio and blitter are together, maybe this is the point? |
10 January 2022, 00:27 | #24 | ||||
OctaMED Music Composer
Join Date: Jan 2009
Location: Venice - Italy
Age: 49
Posts: 666
|
Sorry, just noticed your reply!
Quote:
I checked this by poking $dff180 just before branching to mainloop and there's a good amount of raster time left. Quote:
OctaMED playroutines from Aminet, heavily fixed by me so maybe I can fix this DMA wait problem. I'm pretty sure I had a similar problem using P61 some time ago but it was my first intro and I never worried too much. Still I think the main reason is samples' rate, I tend to digitize at maximum frequency and use high notes to keep up sound presence so music for sure is moving more data than the average .mod Quote:
This is what happens with CIA timers calling music routine, right? And can happen anytime, so checking raster position by poking as I mentioned doesn't count? is this what you mean? Quote:
Before, specifically before setting anything new on any blitter register. |
||||
10 January 2022, 10:36 | #25 | |
Registered User
Join Date: Jul 2015
Location: The Netherlands
Posts: 3,408
|
Quote:
See, it's possible the interrupt for the mod player moves the CPU writes to the Copper/Copperlist slightly in the frame, and that may be exacerbated by the using the Blitter at the same time. Which could mean that updating the Copperlist without audio still happens (just) in time, but with audio it's shifted in time by the audio DMA/mod player interrupt just enough to occasionally miss the correct time and instead update slightly too late. |
|
10 January 2022, 14:05 | #26 |
OctaMED Music Composer
Join Date: Jan 2009
Location: Venice - Italy
Age: 49
Posts: 666
|
I never update pointers in Copperlist, I assumed it's not necessary as I'm not double buffering.
Usually I go for double buffering when frames don't finish drawing in time and they flicker but in this case (and I think it's strange) there's no flickering, just scroll isn't smooth. |
10 January 2022, 14:54 | #27 | |
Registered User
Join Date: Jul 2015
Location: The Netherlands
Posts: 3,408
|
Quote:
If not and you write them directly with the CPU instead, I'm not so sure what's causing it. Looking at the Visual DMA Debugger screenshot you showed, you certainly seem to have enough raster time to do the scroll, play the audio and do the blits. |
|
10 January 2022, 17:47 | #28 |
OctaMED Music Composer
Join Date: Jan 2009
Location: Venice - Italy
Age: 49
Posts: 666
|
Thanks, knowing it sounds strange to someone more expert than me is somehow giving me hope
BTW, bpl pointers ARE poked from the Copperlist but set in the init part and never change. |
10 January 2022, 19:43 | #29 |
Registered User
Join Date: Feb 2017
Location: Denmark
Posts: 1,098
|
So what you're experiencing is this (correct me where I'm wrong): Without music you're scrolling some graphics and everything is fine, but then you enable music and the scrolling is jerky, but glitch free and music playback is also OK? And you seem to have enough raster time after your mainloop (as confirmed by setting color 0)?
I'd verify/change:
|
10 January 2022, 22:17 | #30 | |
Registered User
Join Date: Jul 2015
Location: The Netherlands
Posts: 3,408
|
Quote:
I'm with paraj on this one: check to make sure you really do have raster time free (what is the CPU doing all frame, mostly just a busy wait or is there more going on?) and try to eliminate parts of code until you find the culprit. |
|
10 January 2022, 22:55 | #31 | |
Going nowhere
Join Date: Oct 2001
Location: United Kingdom
Age: 50
Posts: 8,986
|
Quote:
Have you experimented with blitting the first bitplane you want to do, then blitting half the second bitplane, and getting the processor to copy the other half of the second bitplane? Benefit is as you're using blitwaits before all blitter operations, means your cpu copy routine will be able to run at the same time the blitter is doing the first half of the second bitplane. |
|
11 January 2022, 08:20 | #32 | |
OctaMED Music Composer
Join Date: Jan 2009
Location: Venice - Italy
Age: 49
Posts: 666
|
Quote:
Code:
MOVE.W #$12C,D0 ; No buffering, so wait until raster BSR.W WaitRaster ; is below the Display Window. Now, audio routine is attached to a CIA timer therefore it can and will kick in any raster position, sometimes more than once per frame. This would add random delays to the overall execution of code and when execution ends after $12C another complete frame was skipped in order to wait again for that position. Actually frame wasn't skipped but displayed twice then next frame would be drawn completely and this also would explain why no flickering but slowdowns. Removing the wait everything runs twice the speed which is basically that half blitter DMA free from my profiles. Of course this is not correct and I need to put another kind of wait but this is a topic for another post, for now I can say audio playback at high pitch would take more rasterlines but not affect blitter operations to a point where it slows down. Thanks for the help! |
|
11 January 2022, 08:24 | #33 |
OctaMED Music Composer
Join Date: Jan 2009
Location: Venice - Italy
Age: 49
Posts: 666
|
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Calculate offset using labels | Beska | Coders. Asm / Hardware | 7 | 09 May 2016 18:56 |
Fastest way to blit things on screen | Shatterhand | Coders. Blitz Basic | 13 | 03 February 2016 10:12 |
Calculate Time-Tracks Pixel width? | AGS | Coders. General | 22 | 10 March 2015 19:19 |
Calculate a color gradient. | AGS | Coders. Asm / Hardware | 13 | 11 February 2015 11:20 |
[BlitzBasic] blit outside bitmap error | Raislin77it | Coders. Blitz Basic | 8 | 08 February 2014 11:42 |
|
|