Mail Archives: djgpp/1999/11/11/07:56:48
Tim B writes:
> There doesn't seem to be any problem when blitting to the screen and the
> problem only seems to happen in the svga modes. In particular, if the
image
> is blitted from a horizontal screen position that can be divided by 4 and
> any vertical position, the image is transferred accurately. However, if
> blitted from any other horizontal position the image sometimes becomes
> corrupted.
It would help if you told us exactly what model of graphics card you
are using, and with what software (I would guess you are talking about
Allegro programs here, but you don't actually say that). Not that this
makes much difference in the present case, unfortunately...
It sounds as if your graphics card doesn't like reading from misaligned
addresses. It's debatable whether this is a hardware flaw, or whether
the software ought not to be doing that, and good graphics code is
optimised to use aligned addresses wherever possible, but sometimes
there is no way to keep everything properly aligned (for example when
copying from a source to a dest with different byte offsets), and it is
usually faster to just do the copy and ignore the alignment problems,
than to fall back on single byte operations. This is a fairly standard
thing to do in graphics code, so I tend to think that it is a hardware
flaw if these reads are returning wrong results.
> It seems questions are always encouraged, but it's pointless advice if
> they're never answered. So I'm asking again.
If nobody answers your question, that usually means either that it was
a pointless one (which yours isn't), or that nobody knows the answer.
There isn't much point in everyone posting messages saying "huh, that's
strange, I don't know why this would happen" (even though that's what
I am doing here), so most people just don't say anything at all unless
they have something useful to suggest.
Shawn Hargreaves.
- Raw text -