AminetAminet
Search:
84961 packages online
About
Recent
Browse
Search
Upload
Setup
Services

driver/video/Warp3D-AllocPch.lha

Mirror:Random
Showing: m68k-amigaos iconppc-amigaos iconppc-morphos iconi386-aros iconi386-amithlon iconppc-warpup iconppc-powerup icongeneric iconother icon
No screenshot available
Short:Fix Warp3D Texture Allocation
Author: thomas.richter at alumni.tu-berlin.de (Thomas Richter)
Uploader:thomas richter alumni tu-berlin de (Thomas Richter)
Type:driver/video
Version:1.0
Architecture:m68k-amigaos
Date:2025-08-24
Requires:Warp3D-4.2a
Download:driver/video/Warp3D-AllocPch.lha - View contents
Readme:driver/video/Warp3D-AllocPch.readme
Downloads:52

This program adds a workaround for some Warp3D applications that cause
flicker or false colors on rendering, in particular on the CVisionPPC.

To apply the patch, open a Shell, unpack the archive and change the
directory to where you unpacked the archive. Then enter:

spatch -oram:W3D_Picasso96.library -pW3D_Picasso96.library.pch LIBS:Warp3D/GFXdrivers/W3D_Picasso96.library

This creates a new W3D_Picasso96.library in RAM. Keep a backup of the old
library, just in case, and copy the patched version back:

copy LIBS:Warp3D/GFXdrivers/W3D_Picasso96.library LIBS:Warp3D/GFXdrivers/W3D_Picasso96.library-old
copy ram:W3D_Picasso96.library LIBS:Warp3D/GFXdrivers/

___________________________________________________________________________

Background:


What is the issue?

Textures and shapes of some Warp3D applications show false colors, or flicker
terribly.


Why does that happen?

Warp3D allocates textures for the surfaces of these applications in the P96
RGB type "Planar". Planar bitmaps allocate in the little-endian mode, whereas
the applications expect them in 16-bit big-endian mode, e.g. with the pixel
type 16-bit hi-color big-endian. The two pixel types map into different
appertures, and the wrong apperture is picked by default.

This is *not* the fault of Warp3D nor P96. Warp3D expects applications to open
a screen or allocate a bitmap in the expected RGB pixel type, e.g. 16bit RGB
big endian, and pass this bitmap as "context" into the texture allocator
function. From there, the bitmap is passed as "friend" bitmap back into P96,
which then selects the right apperture for the texture.

Unfortunately, buggy applications simply provide a NULL pointer as context to
Warp3D. In this case, P96 falls back to the "default pixel type" given as another
argument to its bitmap allocator function, and Warp3D sets this default type to 0,
which is "planar". This makes of course no sense whatsoever as neither Warp3D nor
applications attempt to render into a planar bitmap.


What does this patch do?

It changes the default pixel type of the Warp3D allocator to 16-bit hi-color big-
endian. Thus, whenever an application allocates a texture from Warp3D without
giving a context, the texture is put into the big-endian 16-bit apperture. Apparently,
this is what the applications expect - without ever saying to Warp3D.


Ideally, such buggy applications should be fixed. The defect is really there, and
neither in Warp3D nor in P96, nor in its drivers. Everything works, "as expected",
except that these applications expect the wrong thing.

___________________________________________________________________________

Legalese:

SPatch, as included in the archive, is (c) 1992 SAS Institute, Inc.
All Rights Reserved. SPatch is freely distributable. See the SAS/C
Development System User's Guide, Volume 2, page 292.

The patch file W3D_Picasso96.library.pch is freely distributable under CC-0
conditions, "no rights reserved".

To find out more about CC-0, https://creativecommons.org/public-domain/cc0/.

___________________________________________________________________________

Thomas Richter,	August 2025





Contents of driver/video/Warp3D-AllocPch.lha
 PERMSSN    UID  GID    PACKED    SIZE  RATIO METHOD CRC     STAMP          NAME
---------- ----------- ------- ------- ------ ---------- ------------ -------------
[Amiga]                   9310   14688  63.4% -lh5- 842a Aug 23 16:26 spatch
[Amiga]                    140     160  87.5% -lh5- c7ff Aug 23 16:26 W3D_Picasso96.library.pch
[Amiga]                   1442    3409  42.3% -lh5- 8c5c Aug 24 08:56 Warp3D-AllocPch.readme
---------- ----------- ------- ------- ------ ---------- ------------ -------------
 Total         3 files   10892   18257  59.7%            Aug 24 23:50
Page generated in 0.01 seconds
Aminet © 1992-2024 Urban Müller and the Aminet team. Aminet contact address: <aminetaminet net>