Amiga.org
Operating System Specific Discussions => Amiga OS => Amiga OS -- Development => Topic started by: Karlos on December 11, 2003, 03:12:04 AM
-
Hi guys,
A few questions about this card's (CyberVision64) memory arrangement, specifically under CGX
1) What alignments are required for bitmap data?
2) If a bitmap's selected width is not aligned with respect to the hardware requirements, is the actual width of the allocated data increased to the requested width + modulus with each scanline stored in a linear fashion, or is some other mechanism used?
Cheers,
-
When I first saw this thread, I thought you were asking a Commodore 64 question! :-o
Are you writing a graphics driver, or an OS, or what??
-
That would have been C=64 memory, surely?
Not writing a driver as such, just trying to track down a really awkward bug that a CV64 user is getting with some code of mine.
Basically, I have a Surface class that wraps BitMaps and supports direct (locked) access, using CGX LockBitMapTagList(). Methods are defined which return the width, modulus, span, bytes per pixel, whatever you need.
When locked, you have access to the memory, and can write directly to it.
It works fine on my BVision, and it worked fine on Voodoos and various other cards. However, it seems to be trashing VRAM on the CV64...
Not having direct access to one its hard to find the exact problem, so I thought I'd start by asking based on some hunches...
-
(while I'm searching through my documents here...)
So, what you want to know is if it's RGBA RGBA RGBA V's ABGR ABGR ABGR ?
That sort of thing?
The CV64/3D spans the addrs. out, so that what would normally be sequential bytes on the Amiga have alot of useless padding between them - I think. Could your problem be related to that?
-
iamaboringperson wrote:
The CV64/3D spans the addrs. out, so that what would normally be sequential bytes on the Amiga have alot of useless padding between them - I think. Could your problem be related to that?
Thats more likely to be at the crux of it. But seeing as the scanlines are ultimately sequential I dont see how its screwing up.
Even basic 'copy a row, add the modulus to go to the nex row' loop is going awry...
The BVision for instance has a pretty severe width alignment for visible bitmaps, with the same padding and so on, but the same code works fine :-?
-
/me bumps thead ;-)
-
@Karlos:
If you have access to a CyberVision64 card ;), is it possible to investigate the memory arrangement?
/Patrik
-
@patrik
When I get a spare moment I'll write a query tool ;-)