42bs Posted April 27, 2022 Author Share Posted April 27, 2022 (edited) What I did first was loop: prepare line wait for blitter start blitter goto loop Then I did remove the 'wait for blitter' and saw no glitches. Means the blitter reads the line quicker than the GPU can write to it. _But_ while doing this the 68k was doing a lot of stuff. Stopping it helped a lot to speed up GPU only code. Next is using the blitter again. Edited April 27, 2022 by 42bs Quote Link to comment Share on other sites More sharing options...
Zerosquare Posted April 27, 2022 Share Posted April 27, 2022 (edited) I'm not sure if this is what you're talking about, but the Blitter has a higher bus priority than the 68K. Which means that from the 68K's point of view, the blitter is never busy -- when it actually is, the 68K is paused and can't execute code, so it doesn't see it. Edited April 27, 2022 by Zerosquare Quote Link to comment Share on other sites More sharing options...
JagMod Posted April 27, 2022 Share Posted April 27, 2022 1 hour ago, 42bs said: What I did first was loop: prepare line wait for blitter start blitter goto loop This has the potential danger of the GPU overwriting parts of the line before the Blitter has finished reading it. If you see no glitches, its most likely the GPU is spending enough time doing something besides writing to the line buffer, and the blitter stays ahead of the GPU. It's still a race. Quote Link to comment Share on other sites More sharing options...
42bs Posted April 28, 2022 Author Share Posted April 28, 2022 7 hours ago, JagMod said: This has the potential danger of the GPU overwriting parts of the line before the Blitter has finished reading it. If you see no glitches, its most likely the GPU is spending enough time doing something besides writing to the line buffer, and the blitter stays ahead of the GPU. It's still a race. Sure, in a non-size limited program I would not remove the test. Quote Link to comment Share on other sites More sharing options...
42bs Posted April 29, 2022 Author Share Posted April 29, 2022 Added double buffering and it works w/o glitches and w/o waiting for the blitter. The "gain" is not mind boggling, but at least a few dozen scan lines. Not enough to draw 320x240x16 pixel image in one frame, though. 1 Quote Link to comment Share on other sites More sharing options...
Cyprian Posted April 29, 2022 Share Posted April 29, 2022 2 minutes ago, 42bs said: Not enough to draw 320x240x16 pixel image in one frame, though. well, let's do some math: 320 x 240 means 76 800 pixels. This is 3 840 000 pixels per second in case of 50 FPS. Therefore when we have 30 cycles per pixel, the GPU should be clocked with 115MHz Quote Link to comment Share on other sites More sharing options...
+CyranoJ Posted April 29, 2022 Share Posted April 29, 2022 3 minutes ago, Cyprian said: Therefore when we have 30 cycles per pixel, the GPU should be clocked with 115MHz movei #115,r0 movei #GPU_CLK_SPD,r1 store r0,(r1) Simplez! 3 Quote Link to comment Share on other sites More sharing options...
42bs Posted April 29, 2022 Author Share Posted April 29, 2022 41 minutes ago, CyranoJ said: movei #115,r0 movei #GPU_CLK_SPD,r1 store r0,(r1) Simplez! Boy, such a simple solution. And I waste hours looking to speed up ? 1 1 Quote Link to comment Share on other sites More sharing options...
Cyprian Posted April 29, 2022 Share Posted April 29, 2022 @CyranoJ awesome 1 Quote Link to comment Share on other sites More sharing options...
42bs Posted April 29, 2022 Author Share Posted April 29, 2022 50 minutes ago, Cyprian said: well, let's do some math: 320 x 240 means 76 800 pixels. This is 3 840 000 pixels per second in case of 50 FPS. Luckily the Blitter can at least write 64bit at once. Quote Link to comment Share on other sites More sharing options...
Cyprian Posted April 29, 2022 Share Posted April 29, 2022 Just now, 42bs said: Luckily the Blitter can at least write 64bit at once. yep, would be cool to have MMX instructions and calculate 4 pixels at once. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.