Backport F3DTEX/A ucode from GLideN64
This commit is contained in:
parent
bfbc70a88a
commit
03d86887d1
|
@ -15,6 +15,9 @@
|
|||
// 6 - S2DEX 1.XX (Yoshi's Story - SimCity 2000)
|
||||
// 7 - RSP SW PD (Perfect Dark)
|
||||
// 8 - F3DEXBG 2.08 (Conker's Bad Fur Day)
|
||||
// 9 - zSort
|
||||
// 10 - F3DTEXA (64 de Hakken)
|
||||
// 21 - Turbo 3D
|
||||
[ucode]
|
||||
006bd77f=0
|
||||
03044b84=2
|
||||
|
@ -158,7 +161,7 @@ e89c2b92=1
|
|||
e9231df2=1
|
||||
ec040469=1
|
||||
ee47381b=1
|
||||
ef54ee35=1
|
||||
ef54ee35=10
|
||||
f9893f70=21
|
||||
fb816260=1
|
||||
ff372492=21
|
||||
|
|
|
@ -0,0 +1,58 @@
|
|||
/***************************************************************************
|
||||
* *
|
||||
* Project64-video - A Nintendo 64 gfx plugin. *
|
||||
* http://www.pj64-emu.com/ *
|
||||
* Copyright (C) 2017 Project64. All rights reserved. *
|
||||
* Copyright (C) 2003-2009 Sergey 'Gonetz' Lipski *
|
||||
* Copyright (C) 2002 Dave2001 *
|
||||
* *
|
||||
* License: *
|
||||
* GNU/GPLv2 http://www.gnu.org/licenses/gpl-2.0.html *
|
||||
* version 2 of the License, or (at your option) any later version. *
|
||||
* *
|
||||
****************************************************************************/
|
||||
#pragma once
|
||||
#include <Project64-video/rdp.h>
|
||||
#include <Project64-video/Gfx_1.3.h>
|
||||
#include "F3DTEXA.h"
|
||||
|
||||
void f3dttexa_loadtex()
|
||||
{
|
||||
uint32_t cmd0, cmd1;
|
||||
cmd0 = rdp.cmd0;
|
||||
cmd1 = rdp.cmd1;
|
||||
|
||||
rdp.cmd0 = 0x3d100000;
|
||||
rdp_settextureimage();
|
||||
|
||||
rdp.cmd0 = 0x35100000;
|
||||
rdp.cmd1 = 0x07000000;
|
||||
rdp_settile();
|
||||
|
||||
rdp.cmd0 = 0x33000000;
|
||||
rdp.cmd1 = 0x27000000 | (cmd0 & 0x00FFFFFF);
|
||||
rdp_loadblock();
|
||||
|
||||
rdp.cmd0 = cmd0; //restore to original values
|
||||
rdp.cmd1 = cmd1;
|
||||
}
|
||||
|
||||
void f3dttexa_settilesize()
|
||||
{
|
||||
uint32_t cmd0, cmd1, firstHalf;
|
||||
cmd0 = rdp.cmd0;
|
||||
cmd1 = rdp.cmd1;
|
||||
|
||||
firstHalf = (cmd1 & 0xFF000000) >> 15;
|
||||
|
||||
rdp.cmd0 = 0x35400000 | firstHalf;
|
||||
rdp.cmd1 = cmd0 & 0x00FFFFFF;
|
||||
rdp_settile();
|
||||
|
||||
rdp.cmd0 = 0x32000000;
|
||||
rdp.cmd1 = cmd1 & 0x00FFFFFF;
|
||||
rdp_settilesize();
|
||||
|
||||
rdp.cmd0 = cmd0; //restore to original values
|
||||
rdp.cmd1 = cmd1;
|
||||
}
|
|
@ -0,0 +1,17 @@
|
|||
/***************************************************************************
|
||||
* *
|
||||
* Project64-video - A Nintendo 64 gfx plugin. *
|
||||
* http://www.pj64-emu.com/ *
|
||||
* Copyright (C) 2017 Project64. All rights reserved. *
|
||||
* Copyright (C) 2003-2009 Sergey 'Gonetz' Lipski *
|
||||
* Copyright (C) 2002 Dave2001 *
|
||||
* *
|
||||
* License: *
|
||||
* GNU/GPLv2 http://www.gnu.org/licenses/gpl-2.0.html *
|
||||
* version 2 of the License, or (at your option) any later version. *
|
||||
* *
|
||||
****************************************************************************/
|
||||
#pragma once
|
||||
|
||||
void f3dttexa_loadtex();
|
||||
void f3dttexa_settilesize();
|
|
@ -47,6 +47,7 @@
|
|||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="F3DTEXA.h" />
|
||||
<ClInclude Include="Gfx_1.3.h" />
|
||||
<ClInclude Include="Renderer\Renderer.h" />
|
||||
<ClInclude Include="Renderer\types.h" />
|
||||
|
@ -120,6 +121,7 @@
|
|||
<ItemGroup>
|
||||
<ClCompile Include="Android.cpp" />
|
||||
<ClCompile Include="CRC.cpp" />
|
||||
<ClCompile Include="F3DTEXA.cpp" />
|
||||
<ClCompile Include="Renderer\OGLcombiner.cpp" />
|
||||
<ClCompile Include="Renderer\OGLEScombiner.cpp">
|
||||
<ExcludedFromBuild>true</ExcludedFromBuild>
|
||||
|
|
|
@ -160,6 +160,9 @@
|
|||
<ClInclude Include="Renderer\types.h">
|
||||
<Filter>Renderer</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="F3DTEXA.h">
|
||||
<Filter>ucode</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="CRC.cpp">
|
||||
|
@ -275,6 +278,9 @@
|
|||
<ClCompile Include="Renderer\Renderer.cpp">
|
||||
<Filter>Renderer</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="F3DTEXA.cpp">
|
||||
<Filter>ucode</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Text Include="gpl.txt">
|
||||
|
|
|
@ -164,6 +164,7 @@ public:
|
|||
ucode_PerfectDark = 7,
|
||||
ucode_CBFD = 8,
|
||||
ucode_zSort = 9,
|
||||
ucode_F3DTEXA = 10,
|
||||
ucode_Turbo3d = 21,
|
||||
};
|
||||
|
||||
|
|
|
@ -25,8 +25,9 @@
|
|||
#include "ucode07.h"
|
||||
#include "ucode08.h"
|
||||
#include "ucode09.h"
|
||||
#include "F3DTEXA.h"
|
||||
|
||||
rdp_instr gfx_instruction[10][256] =
|
||||
rdp_instr gfx_instruction[11][256] =
|
||||
{
|
||||
{
|
||||
// uCode 0 - RSP SW 2.0X
|
||||
|
@ -774,4 +775,81 @@ rdp_instr gfx_instruction[10][256] =
|
|||
rdp_setfogcolor, rdp_setblendcolor, rdp_setprimcolor, rdp_setenvcolor,
|
||||
rdp_setcombine, rdp_settextureimage, rdp_setdepthimage, rdp_setcolorimage
|
||||
},
|
||||
|
||||
{
|
||||
// uCode 10 - F3DTEXA
|
||||
// games: 64 de Hakken
|
||||
// 00-3f
|
||||
spnoop, uc0_matrix, rsp_reserved0, uc0_movemem,
|
||||
uc1_vertex, rsp_reserved1, uc0_displaylist, rsp_reserved2,
|
||||
rsp_reserved3, uc6_sprite2d, undef, undef,
|
||||
undef, undef, undef, undef,
|
||||
|
||||
undef, undef, undef, undef,
|
||||
undef, undef, undef, undef,
|
||||
undef, undef, undef, undef,
|
||||
undef, undef, undef, undef,
|
||||
undef, undef, undef, undef,
|
||||
undef, undef, undef, undef,
|
||||
undef, undef, undef, undef,
|
||||
undef, undef, undef, undef,
|
||||
undef, undef, undef, undef,
|
||||
undef, undef, undef, undef,
|
||||
undef, undef, undef, undef,
|
||||
undef, undef, undef, undef,
|
||||
// 40-7f: unused
|
||||
undef, undef, undef, undef,
|
||||
undef, undef, undef, undef,
|
||||
undef, undef, undef, undef,
|
||||
undef, undef, undef, undef,
|
||||
undef, undef, undef, undef,
|
||||
undef, undef, undef, undef,
|
||||
undef, undef, undef, undef,
|
||||
undef, undef, undef, undef,
|
||||
undef, undef, undef, undef,
|
||||
undef, undef, undef, undef,
|
||||
undef, undef, undef, undef,
|
||||
undef, undef, undef, undef,
|
||||
undef, undef, undef, undef,
|
||||
undef, undef, undef, undef,
|
||||
undef, undef, undef, undef,
|
||||
undef, undef, undef, undef,
|
||||
// 80-bf
|
||||
undef, undef, undef, undef,
|
||||
undef, undef, undef, undef,
|
||||
undef, undef, undef, undef,
|
||||
undef, undef, undef, undef,
|
||||
undef, undef, undef, undef,
|
||||
undef, undef, undef, undef,
|
||||
undef, undef, undef, undef,
|
||||
undef, undef, undef, undef,
|
||||
undef, undef, undef, undef,
|
||||
undef, undef, undef, undef,
|
||||
undef, undef, undef, undef,
|
||||
undef, undef, undef, uc2_load_ucode,
|
||||
|
||||
uc1_branch_z, uc2_quad, uc2_modifyvtx, rdphalf_2,
|
||||
rdphalf_1, f3dttexa_loadtex, uc0_cleargeometrymode, uc0_setgeometrymode,
|
||||
uc0_enddl, uc0_setothermode_l, uc0_setothermode_h, uc0_texture,
|
||||
uc0_moveword, uc0_popmatrix, f3dttexa_settilesize, uc1_tri1,
|
||||
// c0-ff: RDP commands
|
||||
undef, undef, undef, undef,
|
||||
undef, undef, undef, undef,
|
||||
undef, undef, undef, undef,
|
||||
undef, undef, undef, undef,
|
||||
undef, undef, undef, undef,
|
||||
undef, undef, undef, undef,
|
||||
undef, undef, undef, undef,
|
||||
undef, undef, undef, undef,
|
||||
|
||||
undef, undef, undef, undef,
|
||||
rdp_texrect, rdp_texrect, rdp_loadsync, rdp_pipesync,
|
||||
rdp_tilesync, rdp_fullsync, rdp_setkeygb, rdp_setkeyr,
|
||||
rdp_setconvert, rdp_setscissor, rdp_setprimdepth, rdp_setothermode,
|
||||
|
||||
rdp_loadtlut, undef, rdp_settilesize, rdp_loadblock,
|
||||
rdp_loadtile, rdp_settile, rdp_fillrect, rdp_setfillcolor,
|
||||
rdp_setfogcolor, rdp_setblendcolor, rdp_setprimcolor, rdp_setenvcolor,
|
||||
rdp_setcombine, rdp_settextureimage, rdp_setdepthimage, rdp_setcolorimage
|
||||
},
|
||||
};
|
||||
|
|
|
@ -15,4 +15,4 @@
|
|||
|
||||
typedef void(*rdp_instr)();
|
||||
|
||||
extern rdp_instr gfx_instruction[10][256];
|
||||
extern rdp_instr gfx_instruction[11][256];
|
Loading…
Reference in New Issue