ShootersForever.com Forum Index

GoldenEye 007 Nintendo 64 Community, GoldenEye X, Nintendo 64 Games Discussion
GoldenEye Cheats, GoldenEye X Codes, Tips, Help, Nintendo 64 Gaming Community


[Request] Display List Opcodes

 
Post new topic   Reply to topic    ShootersForever.com Forum Index -> Q-Lab Hacking Department
View previous topic :: View next topic  
L. Spiro
Agent
Agent


Joined: 27 Feb 2009
Posts: 117
Location: Cupertino, CA

 PostPosted: Fri Feb 27, 2009 6:17 am    Post subject: [Request] Display List Opcodes Reply with quote Back to top

This is a sister topic to my release here: http://www.shootersforever.com/forums_message_boards/viewtopic.php?p=26611

zoinkity helped me years ago to parse the opcodes needed to get the geometry data from the game, and I am hoping he or someone else can help me finish the tool by helping me with the texture opcodes.

I have a deep inner feeling that someone here is hiding a document that explains all of the opcodes. Mind if I take a peek? I promise to put it to good use.


L. Spiro


Last edited by L. Spiro on Fri Feb 27, 2009 3:50 pm; edited 1 time in total
 
View user's profile Send private message
SubDrag
Administrator
Administrator


Joined: 16 Aug 2006
Posts: 6118

 PostPosted: Fri Feb 27, 2009 2:44 pm    Post subject: Reply with quote Back to top

Zoinkity made one. Some of it's in this post.
http://www.shootersforever.com/forums_message_boards/viewtopic.php?t=3383&postdays=0&postorder=asc&start=0

I'll try and dig up the full txt later. It's also in his "posting everything in a zip file" post.
 
View user's profile Send private message
zoinkity
007
007


Joined: 24 Nov 2005
Posts: 1684

 PostPosted: Tue Mar 03, 2009 7:48 am    Post subject: Reply with quote Back to top

As Sub said, the full list of all the rsp/rdp opcodes and their format is now in the big zip of doom, here:
http://www.geocities.com/nefariousdogooder/general/GoldenEye.zip
Look in Display Lists and Object Generation, ucode05.txt. It has been heavily expanded and might even be accurate now.

For convenience though, here's the document's contents:
Code:
Microcode05 - RSP SW 2.0G - GE/PD
superficially similiar to mario's, but tri4 and combiner differences
00   rsp noop
01   rsp_uc05_matrix
02   rsp_reserved0
03   rsp_uc05_movemem
04   rsp_uc05_vertex
05   rsp_reserved1
06   rsp_uc05_displaylist
07   rsp_reserved2
08   rsp_reserved3
09   rsp_uc05_sprite2d

AF   rsp_uc05_load_ucode
B0   rsp_uc05_branch_z
B1   rsp_uc05_tri4
B2   rsp_uc05_rdphalf_cont
B3   rsp_uc05_rdphalf_2
B4   rsp_uc05_rdphalf_1
B5   rsp_uc05_line3d
B6   rsp_uc05_cleargeometrymode
B7   rsp_uc05_setgeometrymode
B8   rsp_uc05_enddl
B9   rsp_uc05_setothermode_l
BA   rsp_uc05_setothermode_h
BB   rsp_uc05_texture   /   rdp_texture
BC   rsp_uc05_moveword
BD   rsp_uc05_popmatrix
BE   rsp_uc05_culldl
BF   rsp_uc05_tri1

C0   rdp_noop
C8   rdp_trifill
C9   rdp_trifillz
CA   rdp_tritxtr
CB   rdp_tritxtrz
CC   rdp_trishade
CD   rdp_trishadez
CE   rdp_trishadetxtr
CF   rdp_trishadetxtrz
E4   rdp_texrect
E5   rdp_texrectflip
E6   rdp_loadsync
E7   rdp_pipesync
E8   rdp_tilesync
E9   rdp_fullsync
EA   rdp_setkeygb
EB   rdp_setkeyr
EC   rdp_setconvert
ED   rdp_setscissor
EE   rdp_setprimdepth
EF   rdp_setothermode
F0   rdp_loadtlut
F2   rdp_settilesize
F3   rdp_loadblock
F4   rdp_loadtile
F5   rdp_settile
F6   rdp_fillrect
F7   rdp_setfillcolor
F8   rdp_setfogcolor
F9   rdp_setblendcolor
FA   rdp_setprimcolor
FB   rdp_setenvcolor
FC   rdp_setcombine
FD   rdp_settextureimage
FE   rdp_setdepthimage
FF   rdp_setcolorimage

--------------

01   rsp_uc05_matrix
a 4x4 veiwing matrix. It can be multiplied and pushed to the stack.

upper word
xxx0xxxx   modelview   mul   nopush
xxx1xxxx   projection   mul   nopush
xxx2xxxx   modelview   load   nopush
xxx3xxxx   projection   load   nopush
xxx4xxxx   modelview   mul   push
xxx5xxxx   projection   mul   push
xxx6xxxx   modelview   load   push
xxx7xxxx   projection   load   push

lower word
address or offset in file

-

03   rsp_uc05_movemem

upper word
xx80xxxx   move viewport
xx82xxxx   look at y
xx84xxxx   look at x
xx86xxxx   light [0]
xx88xxxx   light [1]
xx8Axxxx   light [2]
xx8Cxxxx   light [3]
xx8Exxxx   light [4]
xx90xxxx   light [5]
xx92xxxx   light [6]
xx94xxxx   light [7]
xx96xxxx   texture at T
xx98xxxx   matrix [0]
xx9Axxxx   matrix [1]
xx9Cxxxx   matrix [2]
xx9Exxxx   matrix [3]

lower word
0f000000   segment (like 05 used for offsets)
00ffffff   address or offset in file

-

04   rsp_uc05_vertex

upper word
00F00000   number of points
000FFFFF   number of bytes to grab

lower word
0f000000   segment
00ffffff   offset in point table

-

06   rsp_uc05_displaylist

upper word
xx00xxxx   push display list
xx01xxxx   branch to display list

lower word
0f000000   segment (like 05 used for offsets)
00ffffff   address or offset in file

--------------------------
07   rsp_color
This PD-specific command declares offset to RGBA data

upper word
00FF0000   number of bytes to grab, -4
0000FFFF   number of bytes to grab

lower word
0f000000   segment
00ffffff   address or offset in file

--------------------------
AF   rsp_load_ucode
Loads ucode
Preceeded by rdp_half_1

upper word
0000FFFF   size of data section, -1

lower word
FFFFFFFF   start text section


--------------------------
B0   rsp_branch_z
Branch if the z position of model is <screen>alpha(env)

upper word
0000FF00   minimum level
000000FF   level

lower word
rrggbbaa   red, green, blue, alpha components

-

FB   rdp_setenvcolor
Sets background color applied to generated triads.
If a IA image is used, the black is the enviroment color, the white the primary color.

upper word
0000FF00   minimum level
000000FF   level

lower word
rrggbbaa

-

FC   rdp_setcombine
upper word
00F00000   a0
000F8000   c0
00007000   Aa0
00000E00   Ac0
000001E0   a1
0000001F   c1

lower word
F0000000   b0
0F000000   b1
00E00000   Aa1
001C0000   Ac1
00038000   d0
00007000   Ab0
00000E00   Ad0
000001C0   d1
00000038   Ab1
00000007   Ad1

0   combined
1   texel0
2   texel1
3   primitive
4   shade
5   enviroment
6   center
   scale
   1
7   combined alpha
8   texel0 alpha
9   texel1 alpha
A   primitive alpha
B   shade alpha
C   enviroment alpha
D   LOD fraction
E   primitive LOD fraction
F   K5
1F   0

alpha combiner:
0   combined
   LOD fraction
1   texel0
2   texel1
3   primitive
4   shade
5   enviroment
6   primitive LOD fraction
   1
7   0

These are some common pattern names.  They're probably from source, since they were gleaned from the internal names you see in some roms.  At the very least, the patterns are very consistant from game to game.
Note that there are two sets of these for each command: x0 and x1

internal names      a   c   Alphaa0   Alphac   b   d   Alphab   Alphad
PRIMITIVE      0   0   0   prim.   0   0   0   prim.
SHADE         0   0   0   shade   0   0   0   shade
SHADEDECALA      0   0   0   shade   0   0   0   texel0
DECALRGB      0   0   0   texel0   0   0   0   shade
DECALRGBA      0   0   0   texel0   0   0   0   texel0
ADDRGB         1   0   texel0   shade   0   0   0   shade
ADDRGBDECALA      1   0   texel0   shade   0   0   0   texel0
MODULATERGB
MODULATEI      texel0   0   shade   0   0   0   0   shade
MODULATERGBA
MODULATEIA      texel0   0   shade   0   texel0   0   shade   0
MODULATERGBDECALA
MODULATEIDECALA      texel0   0   shade   0   0   0   0   texel0
MODULATERGB_PRIM
MODULATEI_PRIM      texel0   0   prim.   0   0   0   0   prim.
MODULATERGBA_PRIM
MODULATEIA_PRIM      texel0   0   prim.   0   texel0   0   prim.   0
MODULATERGBDECALA_PRIM
MODULATEIDECALA_PRIM   texel0   0   prim.   0   0   0   0   texel0
REFLECTRGB      enviro.   0   texel0   shade   0   0   0   shade
REFLECTRGBDECALA   enviro.   0   texel0   shade   0   0   0   texel0
BLENDI         enviro.   shade   texel0   shade   0   0   0   shade
BLENDIA         enviro.   shade   texel0   shade   texel0   0   shade   0
BLENDIDECALA      enviro.   shade   texel0   shade   0   0   0   texel0
BLENDRGBA      texel0   shade   texel0A   shade   0   0   0   shade
BLENDRGBDECALA      texel0   shade   texel0A   shade   0   0   0   texel0
BLENDPE         prim.   enviro.   texel0   enviro.   texel0   0   shade   0
BLENDPEDECALA      prim.   enviro.   texel0   enviro.   0   0   0   texel0
BLENDPE_ALT      enviro.   prim.   texel0   prim.   texel0   0   shade   0
BLENDPEDECALA_ALT   enviro.   prim.   texel0   prim.   0   0   0   texel0
HILITERGB      prim.   shade   texel0   shade   0   0   0   shade
HILITERGBA      prim.   shade   texel0   shade   prim.   shade   texel0   shade
HILITERGBDECALA      prim.   shade   texel0   shade   0   0   0   texel0
TWOCOLORTEX      prim.   shade   texel0   shade   0   0   0   shade

-

FD   rdp_settextureimage
also used for camspy effect in PD, but that's just crazy and not included here
upper word
format   0x00000000   rgba
   0x00200000   yuv
   0x00400000   ci
   0x00600000   ia
   0x00800000   i
size   0x00000000   4bit
   0x00080000   8bit
   0x00100000   16bit
   0x00180000   32bit
   0x00000FFF   width-1

lower word
0f000000   segment (like 05 used for offsets)
00ffffff   address or offset in file

-

FE   rdp_setdepthimage
Not certain, but seems like the format and size always equal 0, and width always equals 1
Most likely only accepts a 1bit alpha table or something silly like that

upper word
format   0x00000000   rgba
   0x00200000   yuv
   0x00400000   ci
   0x00600000   ia
   0x00800000   i
size   0x00000000   4bit
   0x00080000   8bit
   0x00100000   16bit
   0x00180000   32bit
   0x00000FFF   width-1

lower word
0f000000   segment (like 05 used for offsets)
00ffffff   address or offset in file

-

FF   rdp_setcolorimage
format   0x00000000   rgba
   0x00200000   yuv
   0x00400000   ci
   0x00600000   ia
   0x00800000   i
size   0x00000000   4bit
   0x00080000   8bit
   0x00100000   16bit
   0x00180000   32bit
   0x00000FFF   width

lower word
0f000000   segment (like 05 used for offsets)
00ffffff   address or offset in file

_________________
(\_/) Beware
(O.o) ze
(> <) Hoppentruppen!
 
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    ShootersForever.com Forum Index -> Q-Lab Hacking Department All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Cobalt 2.0 BB theme/template by Jakob Persson.
Copyright © 2002-2004 Jakob Persson


Powered by BB © 01, 02 BB Group

 


Please Visit My Other Sites: GoldenEyeForever.com | GrandTheftAutoForever.com

Got kids? Check out my Dora The Explorer site with games and coloring pages!

Our forums feature Nintendo 64 games, GoldenEye 007 N64 New Maps and Missions, GoldenEye Cheats, N64 Emulator, Gameshark, GoldenEye Multiplayer and more!

[ Privacy Policy ]