Bonjour, J'ai réuni quelques commentaires de Karl West et d'Andy Seed datant de 1995 inclus dans les sources d'I-War (Netwar) ...
*************************************************************************************************************************
GPU :
* ALL GPU programs should be placed on a phrase boundary
* because the blitter copies the code to GPU RAM in phrases
* All variables for GPU programs should be defined in 'equates.s'
* This is to prevent clashes when changing programs
*************************************************************************************************************************
Equates ( ça donne une idée du moteur 3D d'I-War ...)
persp equ 8
maxpoints equ 1500 ;maximum number of points
maxshaded equ 2000 ;maximum number of shaded polygons
maxtextured equ 500 ;maximum number of textured polygons
endram equ $200000
rastersize equ (320*280)
stacksize equ 4*1024
flatmode equ $0000 ;various modes for the polygon draws
shadedmode equ $4000
texturedmode equ $8000
********************************* GPU Equates ********************************
viewxcoord equ G_RAM
viewycoord equ viewxcoord+4
viewzcoord equ viewycoord+4
viewxx equ viewzcoord+4
viewxy equ viewxx+4
viewxz equ viewxy+4
viewyx equ viewxz+4
viewyy equ viewyx+4
viewyz equ viewyy+4
viewzx equ viewyz+4
viewzy equ viewzx+4
viewzz equ viewzy+4
viewlx equ viewzz+4
viewly equ viewlx+4
viewlz equ viewly+4
viewhx equ viewlz+4
viewhy equ viewhx+4
viewhz equ viewhy+4
shapeitem equ viewhz+4
shapelist equ shapeitem+4
shapepoints equ shapelist+4
nextshaded equ shapepoints+4
nexttextured equ nextshaded+4
clx equ nexttextured+4
cly equ clx+4
chx equ cly+4
chy equ chx+4
gox equ chy+4
goy equ gox+4
rasterd equ goy+4
rezz equ rasterd+4
numpoints equ rezz+4
colour equ numpoints+4
pixelmap equ colour+4
points1 equ pixelmap+4
points2 equ points1+(24*20) ;up to 24 points per polygon
lasty equ points2+(24*20)
lastpoint equ lasty+4
INBUF equ lastpoint+4
pp_in equ INBUF
pp_out equ INBUF+4
pp_errors equ INBUF+8
pp_crc equ INBUF+12
pp_semaphore equ INBUF+16
semaphore equ pp_semaphore+4
gpu_scr_height equ semaphore+4
endvars equ gpu_scr_height+4
gpuprog equ (endvars&$fffffff8)+8
***************************** Texture Width Equates **************************
screenpixelmap equ PITCH4|PIXEL16|WID320|XADDINC
pixelmapwidth32 equ PITCH1|PIXEL16|WID32|XADDINC
pixelmapwidth48 equ PITCH1|PIXEL16|WID48|XADDINC
pixelmapwidth64 equ PITCH1|PIXEL16|WID64|XADDINC
***********************************************************************************************************************
Texture Mapping Data :
* Notes:
* Without a doubt the texture coordinates should be in the 3ds/vdf files
* but without totally rewriting Marvin's converter this is the best
* method I could come up with.
* It's actually very convenient because you don't need to bother with
* mapping coordinates in 3ds
* At least it makes the artists happy....
**********************************************************************************************************************
Draw A List Of Textured Polygons :
* Notes:
* The polygon filler scales and offsets zcoordinates
* This is to prevent the blitter z registers from saturating
* Useable zvalues range from 0 to 114686
* Polygons should not be too 'deep'
* ie furthest zcoord - closest zcoord < 16384
* Also the filler is very optimised to the GPU's pipelining
* So things are not always in the order they seem to be
* You have been warned!
* The source and destination pointers ( A1 and A2 )
* have been reversed to allow reading the texture
* Unforunately this means we can't tile the textures
* but you can't have everything, eh?
*********************************************************************************************************************
Draw A List Of Shaded Polygons :
* Notes:
* The polygon filler does a preclip on all the polygons
* this is quicker and more flexible than
* trying to clip them as you draw them
* I know what I'm talking about here.....
* The polygon filler scales and offsets zcoordinates
* This is to prevent the blitter z registers from saturating
* Same for ivalues
* Useable zvalues range from 0 to 114686
* Usable ivalues range from $18 to $e7
* Polygons should not be too 'deep'
* ie furthest zcoord - closest zcoord < 16384
* Also the filler is very optimised to the GPU's pipelining
* So things are not always in the order they seem to be
* You have been warned!
*********************************************************************************************************
Les sources 100% assembleur (contrairement à Hover Strike) presque complètes sont dispo sur le net et Facebook il me semble