So, we need exactly 50 words to represent a row of source (width = 1600 pixels / 32 pixelPerWord).
Trying to read nWords = 51
is asking for trouble...
We are translating 1 bit to the right, so the destination requires 51 words (1601 pixels).
What we ought to do in the BitBlt>>copyLoop
is:
Copy 12bits from 1st src word (mask1 - 16rFFF "4095"
) onto 1st dst word
Then 49 times copy the rotate thing (last bit from prev src word+31 bits from next src word) onto next dest word
skewWord := ((prevWord bitAnd: notSkewMask) bitShift: unskew)
bitOr: "32-bit rotate"
((thisWord bitAnd: skewMask) bitShift: skew).
Then last bit of prev src word to next dest word (with mask2 = 16r80000000
).
The incorrect code is in the last section, trying to read next sourceWord for nothing since it will be fully masked by mask2
after rotation (skew).
So this last code requires a protection.
We could for example try ((skewMask bitShift: skew) bitAnd: mask2)
, and if null don't fetch next sourceWord (just use 0 instead).
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/441?email_source=notifications\u0026email_token=AIJPEW5Y7ZYHAJ7H2TZJM3DQRH67HA5CNFSM4JHATQK2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOECV4RWA#issuecomment-548128984",
"url": "https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/441?email_source=notifications\u0026email_token=AIJPEW5Y7ZYHAJ7H2TZJM3DQRH67HA5CNFSM4JHATQK2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOECV4RWA#issuecomment-548128984",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>