Jump to content
IGNORED

OP scaled bitmap


swapd0

Recommended Posts

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 by swapd0
Link to comment
Share on other sites

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?

Link to comment
Share on other sites

"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.

 

Link to comment
Share on other sites

It's been a LONG time since I looked, but IIRC the Scaled objects have a bug.. sorry, feature :D  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

  • Like 1
Link to comment
Share on other sites

  • 2 months later...

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.

 

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...