2017-04-26 10:23:36 +00:00
|
|
|
/***************************************************************************
|
|
|
|
* *
|
|
|
|
* 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. *
|
|
|
|
* *
|
|
|
|
****************************************************************************/
|
2017-05-16 07:41:05 +00:00
|
|
|
#include <Project64-video/rdp.h>
|
|
|
|
#include <Project64-video/Gfx_1.3.h>
|
|
|
|
#include <Project64-video/trace.h>
|
|
|
|
#include <Project64-video/ucode.h>
|
2013-04-04 21:22:19 +00:00
|
|
|
|
2016-01-25 11:14:01 +00:00
|
|
|
void uc9_rpdcmd()
|
2013-04-04 21:22:19 +00:00
|
|
|
{
|
2016-01-25 11:14:01 +00:00
|
|
|
uint32_t a = segoffset(rdp.cmd1) >> 2;
|
2016-02-11 09:58:42 +00:00
|
|
|
WriteTrace(TraceRDP, TraceDebug, "uc9:rdpcmd addr: %08lx", a);
|
2016-01-25 11:14:01 +00:00
|
|
|
if (a)
|
2013-04-04 21:22:19 +00:00
|
|
|
{
|
2016-01-25 11:14:01 +00:00
|
|
|
rdp.LLE = 1;
|
|
|
|
uint32_t cmd = 0;
|
|
|
|
while (1)
|
|
|
|
{
|
|
|
|
rdp.cmd0 = ((uint32_t*)gfx.RDRAM)[a++];
|
|
|
|
cmd = rdp.cmd0 >> 24;
|
|
|
|
if (cmd == 0xDF)
|
|
|
|
break;
|
|
|
|
rdp.cmd1 = ((uint32_t*)gfx.RDRAM)[a++];
|
|
|
|
if (cmd == 0xE4 || cmd == 0xE5)
|
|
|
|
{
|
|
|
|
a++;
|
|
|
|
rdp.cmd2 = ((uint32_t*)gfx.RDRAM)[a++];
|
|
|
|
a++;
|
|
|
|
rdp.cmd3 = ((uint32_t*)gfx.RDRAM)[a++];
|
|
|
|
}
|
2017-01-30 17:34:36 +00:00
|
|
|
gfx_instruction[CSettings::ucode_zSort][cmd]();
|
2016-01-25 11:14:01 +00:00
|
|
|
};
|
|
|
|
rdp.LLE = 0;
|
|
|
|
}
|
2013-04-04 21:22:19 +00:00
|
|
|
}
|