swapd0 Posted December 12, 2019 Share Posted December 12, 2019 (edited) How do I calculate the correct value of REMAINER field in a vertical scaled object? I've tried to put it to zero, use the same value as the VSCALE field, but all of them have some issues. Some times the OP draw more scanlines(extra scan line with random pixels), or it draws first scan line bigger than the others. Edited December 12, 2019 by swapd0 Quote Link to comment Share on other sites More sharing options...
jguff Posted December 13, 2019 Share Posted December 13, 2019 22 hours ago, swapd0 said: How do I calculate the correct value of REMAINER field in a vertical scaled object? I've tried to put it to zero, use the same value as the VSCALE field, but all of them have some issues. Some times the OP draw more scanlines(extra scan line with random pixels), or it draws first scan line bigger than the others. " Some times the OP draw more scanlines(extra scan line with random pixels) " Are extra scanlines drawn before your bitmap, or after your bitmap? Quote Link to comment Share on other sites More sharing options...
swapd0 Posted December 13, 2019 Author Share Posted December 13, 2019 The extra scanline it's at the bottom of the bitmap, it's drawing one extra scaline and it's drawn scaled. The other issue it's that the first scanline it's drawn two times. Quote Link to comment Share on other sites More sharing options...
jguff Posted December 14, 2019 Share Posted December 14, 2019 Unsure of your experience with Jaguar programming. 1) Have you successfully displayed other image data in scaled fashion? 2) Successfully displayed other image data in non-scaled fashion? Quote Link to comment Share on other sites More sharing options...
swapd0 Posted December 14, 2019 Author Share Posted December 14, 2019 1. Yes but if it's scaled all images have the same issue. 2. of course. Quote Link to comment Share on other sites More sharing options...
jguff Posted December 15, 2019 Share Posted December 15, 2019 "How do I calculate the correct value of REMAINER field in a vertical scaled object?" Do you need to calculate REMAINDER bits, or just initialize REMAINDER bits? My understanding, from a version of the Software Reference, is: ...that you initialize the REMAINDER bits when create object list and when you recreate the object list after every vertical blank. ...the hardware updates this on a per scanline basis, in between vertical blanks. Quote Link to comment Share on other sites More sharing options...
LinkoVitch Posted December 16, 2019 Share Posted December 16, 2019 It's been a LONG time since I looked, but IIRC the Scaled objects have a bug.. sorry, feature Which is the random extra scan line you see. I *think* the solution to this is to add a blank line to the bottom of your source object. Sorry I cannot help with the remainder calcs, I haven't looked into those yet 1 Quote Link to comment Share on other sites More sharing options...
+CyranoJ Posted December 16, 2019 Share Posted December 16, 2019 Yep, its 'featured' - just pad an extra blank line at the top and bottom of the image 1 Quote Link to comment Share on other sites More sharing options...
swapd0 Posted December 16, 2019 Author Share Posted December 16, 2019 Cool, more wasted cycles drawing nothing. Quote Link to comment Share on other sites More sharing options...
swapd0 Posted February 21, 2020 Author Share Posted February 21, 2020 I've done some testing and I think that this is the best way to draw scaled bitmaps without wasting some cycles drawing an extra scan line (scaled), and without leaving an empty scan line in the bitmap. 1. always decrement object height by one (even if y scale it's $20) 2. set remainder = scale y I haven't done many test with smaller objects (y scale < $20) but for now it looks ok. 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.