mirror of
https://github.com/izzy2lost/dolphin.git
synced 2026-06-19 01:16:48 -07:00
GFX: updated Dates, code formatting cleanup, code cleanup / organization, some unknown BPs uncovered, fixed OGL's config dialog bug, added another shader
DSPHLE: Some warning fixes and added some logging for unknown voice cases Please report if anything has broken. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3884 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
// Omega's 3D Stereoscopic filtering (Amber/Blue)
|
||||
// TODO: Need depth info!
|
||||
|
||||
uniform samplerRECT samp0 : register(s0);
|
||||
|
||||
void main(out float4 ocol0 : COLOR0, in float2 uv0 : TEXCOORD0)
|
||||
{
|
||||
float4 c0 = texRECT(samp0, uv0).rgba; // Source Color
|
||||
float sep = 5;
|
||||
float red = c0.r;
|
||||
float green = c0.g;
|
||||
float blue = c0.b;
|
||||
|
||||
// Left Eye (Amber)
|
||||
float4 c2 = texRECT(samp0, uv0 + float2(sep,0)).rgba;
|
||||
float amber = (c2.r + c2.g) / 2;
|
||||
red = max(c0.r, amber);
|
||||
green = max(c0.g, amber);
|
||||
|
||||
// Right Eye (Blue)
|
||||
float4 c1 = texRECT(samp0, uv0 + float2(-sep,0)).rgba;
|
||||
blue = max(c0.b, c1.b);
|
||||
|
||||
|
||||
ocol0 = float4(red, green, blue, c0.a);
|
||||
}
|
||||
@@ -73,7 +73,8 @@ bool AVIDump::CreateFile()
|
||||
NOTICE_LOG(VIDEO, "Opening AVI file (%s) for dumping", movie_file_name);
|
||||
// TODO: Make this work with AVIFileOpenW without it throwing REGDB_E_CLASSNOTREG
|
||||
HRESULT hr = AVIFileOpenA(&m_file, movie_file_name, OF_WRITE | OF_CREATE, NULL);
|
||||
if (FAILED(hr)) {
|
||||
if (FAILED(hr))
|
||||
{
|
||||
if (hr == AVIERR_BADFORMAT) NOTICE_LOG(VIDEO, "The file couldn't be read, indicating a corrupt file or an unrecognized format.");
|
||||
if (hr == AVIERR_MEMORY) NOTICE_LOG(VIDEO, "The file could not be opened because of insufficient memory.");
|
||||
if (hr == AVIERR_FILEREAD) NOTICE_LOG(VIDEO, "A disk error occurred while reading the file.");
|
||||
@@ -82,13 +83,16 @@ bool AVIDump::CreateFile()
|
||||
Stop();
|
||||
return false;
|
||||
}
|
||||
|
||||
SetBitmapFormat();
|
||||
NOTICE_LOG(VIDEO, "Setting video format...");
|
||||
if (!SetVideoFormat()) {
|
||||
if (!SetVideoFormat())
|
||||
{
|
||||
NOTICE_LOG(VIDEO, "Setting video format failed");
|
||||
Stop();
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!m_fileCount) {
|
||||
if (!SetCompressionOptions()) {
|
||||
NOTICE_LOG(VIDEO, "SetCompressionOptions failed");
|
||||
@@ -96,12 +100,16 @@ bool AVIDump::CreateFile()
|
||||
return false;
|
||||
}
|
||||
}
|
||||
if (FAILED(AVIMakeCompressedStream(&m_streamCompressed, m_stream, &m_options, NULL))) {
|
||||
|
||||
if (FAILED(AVIMakeCompressedStream(&m_streamCompressed, m_stream, &m_options, NULL)))
|
||||
{
|
||||
NOTICE_LOG(VIDEO, "AVIMakeCompressedStream failed");
|
||||
Stop();
|
||||
return false;
|
||||
}
|
||||
if (FAILED(AVIStreamSetFormat(m_streamCompressed, 0, &m_bitmap, m_bitmap.biSize))) {
|
||||
|
||||
if (FAILED(AVIStreamSetFormat(m_streamCompressed, 0, &m_bitmap, m_bitmap.biSize)))
|
||||
{
|
||||
NOTICE_LOG(VIDEO, "AVIStreamSetFormat failed");
|
||||
Stop();
|
||||
return false;
|
||||
@@ -112,18 +120,24 @@ bool AVIDump::CreateFile()
|
||||
|
||||
void AVIDump::CloseFile()
|
||||
{
|
||||
if (m_streamCompressed) {
|
||||
if (m_streamCompressed)
|
||||
{
|
||||
AVIStreamClose(m_streamCompressed);
|
||||
m_streamCompressed = NULL;
|
||||
}
|
||||
if (m_stream) {
|
||||
|
||||
if (m_stream)
|
||||
{
|
||||
AVIStreamClose(m_stream);
|
||||
m_stream = NULL;
|
||||
}
|
||||
if (m_file) {
|
||||
|
||||
if (m_file)
|
||||
{
|
||||
AVIFileRelease(m_file);
|
||||
m_file = NULL;
|
||||
}
|
||||
|
||||
AVIFileExit();
|
||||
}
|
||||
|
||||
@@ -140,7 +154,8 @@ void AVIDump::AddFrame(char *data)
|
||||
m_totalBytes += m_byteBuffer;
|
||||
// Close the recording if the file is more than 2gb
|
||||
// VfW can't properly save files over 2gb in size, but can keep writing to them up to 4gb.
|
||||
if (m_totalBytes >= 2000000000) {
|
||||
if (m_totalBytes >= 2000000000)
|
||||
{
|
||||
CloseFile();
|
||||
m_fileCount++;
|
||||
CreateFile();
|
||||
|
||||
@@ -34,4 +34,4 @@ public:
|
||||
static void AddFrame(char *data);
|
||||
};
|
||||
|
||||
#endif
|
||||
#endif // _AVIDUMP_H
|
||||
|
||||
@@ -17,11 +17,11 @@
|
||||
|
||||
|
||||
// ------------------------------------------
|
||||
// The plugins has to define these functions
|
||||
// Video plugin must define these functions
|
||||
// ------------------------------------------
|
||||
|
||||
#ifndef _BPFUNCTIONS_H_
|
||||
#define _BPFUNCTIONS_H_
|
||||
#ifndef _BPFUNCTIONS_H
|
||||
#define _BPFUNCTIONS_H
|
||||
|
||||
#include "BPMemory.h"
|
||||
#include "VideoCommon.h"
|
||||
@@ -37,22 +37,22 @@ enum
|
||||
};
|
||||
|
||||
void FlushPipeline();
|
||||
void SetGenerationMode(const Bypass &bp);
|
||||
void SetScissor(const Bypass &bp);
|
||||
void SetLineWidth(const Bypass &bp);
|
||||
void SetDepthMode(const Bypass &bp);
|
||||
void SetBlendMode(const Bypass &bp);
|
||||
void SetDitherMode(const Bypass &bp);
|
||||
void SetLogicOpMode(const Bypass &bp);
|
||||
void SetColorMask(const Bypass &bp);
|
||||
void CopyEFB(const Bypass &bp, const EFBRectangle &rc, const u32 &address, const bool &fromZBuffer, const bool &isIntensityFmt, const u32 ©fmt, const bool &scaleByHalf);
|
||||
void RenderToXFB(const Bypass &bp, const EFBRectangle &rc, const float &yScale, const float &xfbLines, u32 xfbAddr, const u32 &dstWidth, const u32 &dstHeight);
|
||||
void ClearScreen(const Bypass &bp, const EFBRectangle &rc);
|
||||
void RestoreRenderState(const Bypass &bp);
|
||||
void SetGenerationMode(const BPCmd &bp);
|
||||
void SetScissor(const BPCmd &bp);
|
||||
void SetLineWidth(const BPCmd &bp);
|
||||
void SetDepthMode(const BPCmd &bp);
|
||||
void SetBlendMode(const BPCmd &bp);
|
||||
void SetDitherMode(const BPCmd &bp);
|
||||
void SetLogicOpMode(const BPCmd &bp);
|
||||
void SetColorMask(const BPCmd &bp);
|
||||
void CopyEFB(const BPCmd &bp, const EFBRectangle &rc, const u32 &address, const bool &fromZBuffer, const bool &isIntensityFmt, const u32 ©fmt, const bool &scaleByHalf);
|
||||
void RenderToXFB(const BPCmd &bp, const EFBRectangle &rc, const float &yScale, const float &xfbLines, u32 xfbAddr, const u32 &dstWidth, const u32 &dstHeight);
|
||||
void ClearScreen(const BPCmd &bp, const EFBRectangle &rc);
|
||||
void RestoreRenderState(const BPCmd &bp);
|
||||
u8 *GetPointer(const u32 &address);
|
||||
bool GetConfig(const int &type);
|
||||
void SetSamplerState(const Bypass &bp);
|
||||
void SetInterlacingMode(const Bypass &bp);
|
||||
void SetSamplerState(const BPCmd &bp);
|
||||
void SetInterlacingMode(const BPCmd &bp);
|
||||
};
|
||||
|
||||
#endif // _BPFUNCTIONS_H_
|
||||
#endif // _BPFUNCTIONS_H
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2003-2008 Dolphin Project.
|
||||
// Copyright (C) 2003-2009 Dolphin Project.
|
||||
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
@@ -16,15 +16,14 @@
|
||||
// http://code.google.com/p/dolphin-emu/
|
||||
|
||||
#include "Common.h"
|
||||
|
||||
#include "BPMemory.h"
|
||||
|
||||
//BP state
|
||||
// BP state
|
||||
// STATE_TO_SAVE
|
||||
BPMemory bpmem;
|
||||
|
||||
// The plugin must implement this.
|
||||
void BPWritten(const Bypass& bp);
|
||||
void BPWritten(const BPCmd& bp);
|
||||
|
||||
// Call browser: OpcodeDecoding.cpp ExecuteDisplayList > Decode() > LoadBPReg()
|
||||
void LoadBPReg(u32 value0)
|
||||
@@ -35,7 +34,7 @@ void LoadBPReg(u32 value0)
|
||||
int newval = (oldval & ~bpmem.bpMask) | (value0 & bpmem.bpMask);
|
||||
int changes = (oldval ^ newval) & 0xFFFFFF;
|
||||
|
||||
Bypass bp = {opcode, changes, newval};
|
||||
BPCmd bp = {opcode, changes, newval};
|
||||
|
||||
//reset the mask register
|
||||
if (opcode != 0xFE)
|
||||
@@ -50,18 +49,19 @@ void BPReload()
|
||||
{
|
||||
for (int i = 0; i < 254; i++)
|
||||
{
|
||||
switch (i) {
|
||||
case 0x41:
|
||||
case 0x45: //GXSetDrawDone
|
||||
case 0x52:
|
||||
case 0x65:
|
||||
case 0x67: // set gp metric?
|
||||
switch (i)
|
||||
{
|
||||
case BPMEM_BLENDMODE:
|
||||
case BPMEM_SETDRAWDONE:
|
||||
case BPMEM_TRIGGER_EFB_COPY:
|
||||
case BPMEM_LOADTLUT1:
|
||||
case BPMEM_PERF1:
|
||||
case BPMEM_PE_TOKEN_ID:
|
||||
case BPMEM_PE_TOKEN_INT_ID:
|
||||
// Cases in which we DON'T want to reload the BP
|
||||
continue;
|
||||
default:
|
||||
Bypass bp = {i, 0xFFFFFF, ((u32*)&bpmem)[i]};
|
||||
BPCmd bp = {i, 0xFFFFFF, ((u32*)&bpmem)[i]};
|
||||
BPWritten(bp);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -32,8 +32,8 @@
|
||||
#define BPMEM_SCISSORTL 0x20
|
||||
#define BPMEM_SCISSORBR 0x21
|
||||
#define BPMEM_LINEPTWIDTH 0x22
|
||||
#define BPMEM_SU_COUNTER 0x23
|
||||
#define BPMEM_RAS_COUNTER 0x24
|
||||
#define BPMEM_PERF0_TRI 0x23
|
||||
#define BPMEM_PERF0_QUAD 0x24
|
||||
#define BPMEM_RAS1_SS0 0x25
|
||||
#define BPMEM_RAS1_SS1 0x26
|
||||
#define BPMEM_IREF 0x27
|
||||
@@ -46,7 +46,7 @@
|
||||
#define BPMEM_ZCOMPARE 0x43
|
||||
#define BPMEM_FIELDMASK 0x44
|
||||
#define BPMEM_SETDRAWDONE 0x45
|
||||
#define BPMEM_CLOCK0 0x46
|
||||
#define BPMEM_BUSCLOCK0 0x46
|
||||
#define BPMEM_PE_TOKEN_ID 0x47
|
||||
#define BPMEM_PE_TOKEN_INT_ID 0x48
|
||||
#define BPMEM_EFB_TL 0x49
|
||||
@@ -63,18 +63,18 @@
|
||||
#define BPMEM_CLEARBBOX1 0x55
|
||||
#define BPMEM_CLEARBBOX2 0x56
|
||||
#define BPMEM_UNKOWN_57 0x57
|
||||
#define BPMEM_UNKNOWN 0x58
|
||||
#define BPMEM_REVBITS 0x58
|
||||
#define BPMEM_SCISSOROFFSET 0x59
|
||||
#define BPMEM_UNKNOWN_60 0x60
|
||||
#define BPMEM_UNKNOWN_61 0x61
|
||||
#define BPMEM_UNKNOWN_62 0x62
|
||||
#define BPMEM_UNKNOWN_63 0x63
|
||||
#define BPMEM_TEXMODESYNC 0x63
|
||||
#define BPMEM_LOADTLUT0 0x64
|
||||
#define BPMEM_LOADTLUT1 0x65
|
||||
#define BPMEM_TEXINVALIDATE 0x66
|
||||
#define BPMEM_SETGPMETRIC 0x67
|
||||
#define BPMEM_PERF1 0x67
|
||||
#define BPMEM_FIELDMODE 0x68
|
||||
#define BPMEM_CLOCK1 0x69
|
||||
#define BPMEM_BUSCLOCK1 0x69
|
||||
#define BPMEM_TX_SETMODE0 0x80 // 0x80 + 4
|
||||
#define BPMEM_TX_SETMODE1 0x84 // 0x84 + 4
|
||||
#define BPMEM_TX_SETIMAGE0 0x88 // 0x88 + 4
|
||||
@@ -827,7 +827,7 @@ union UPE_Copy
|
||||
// All of BP memory
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
struct Bypass
|
||||
struct BPCmd
|
||||
{
|
||||
int address;
|
||||
int changes;
|
||||
@@ -911,4 +911,4 @@ extern BPMemory bpmem;
|
||||
|
||||
void LoadBPReg(u32 value0);
|
||||
|
||||
#endif
|
||||
#endif // _BPMEMORY_H
|
||||
|
||||
@@ -40,27 +40,24 @@ void BPInit()
|
||||
bpmem.bpMask = 0xFFFFFF;
|
||||
}
|
||||
|
||||
|
||||
// ----------------------------------------------------------------------------------------------------------
|
||||
// Write to the Bypass Memory (Bypass Raster State Registers)
|
||||
/* ------------------
|
||||
Called:
|
||||
At the end of every: OpcodeDecoding.cpp ExecuteDisplayList > Decode() > LoadBPReg
|
||||
TODO:
|
||||
Turn into function table. The (future) DisplayList (DL) jit can then call the functions directly,
|
||||
getting rid of dynamic dispatch. Unfortunately, few games use DLs properly - most\
|
||||
just stuff geometry in them and don't put state changes there. */
|
||||
// ----------------------------------------------------------------------------------------------------------
|
||||
void BPWritten(const Bypass& bp)
|
||||
void BPWritten(const BPCmd& bp)
|
||||
{
|
||||
// --------------------------------------------------------------------------------------------------------
|
||||
// First the pipeline is flushed then update the bpmem with the new value.
|
||||
// Some of the BP cases have to call certain functions while others just update the bpmem.
|
||||
// some bp cases check the changes variable, because they might not have to be updated all the time
|
||||
// NOTE: it seems not all bp cases like checking changes, so calling if (bp.changes == 0 ? false : true)
|
||||
// had to be ditched and the games seem to work fine with out it.
|
||||
// NOTE2: Yet Another Gamecube Documentation calls them Bypass Registers
|
||||
// --------------------------------------------------------------------------------------------------------
|
||||
/*
|
||||
----------------------------------------------------------------------------------------------------------------
|
||||
Purpose: Writes to the BP registers
|
||||
Called: At the end of every: OpcodeDecoding.cpp ExecuteDisplayList > Decode() > LoadBPReg
|
||||
How It Works: First the pipeline is flushed then update the bpmem with the new value.
|
||||
Some of the BP cases have to call certain functions while others just update the bpmem.
|
||||
some bp cases check the changes variable, because they might not have to be updated all the time
|
||||
NOTE: it seems not all bp cases like checking changes, so calling if (bp.changes == 0 ? false : true)
|
||||
had to be ditched and the games seem to work fine with out it.
|
||||
NOTE2: Yet Another Gamecube Documentation calls them Bypass Registers but possibly completely wrong
|
||||
NOTE3: This controls the register groups: RAS1/2, SU, TF, TEV, C/Z, PEC
|
||||
TODO: Turn into function table. The (future) DisplayList (DL) jit can then call the functions directly,
|
||||
getting rid of dynamic dispatch. Unfortunately, few games use DLs properly - most\
|
||||
just stuff geometry in them and don't put state changes there.
|
||||
----------------------------------------------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
// Debugging only, this lets you skip a bp update
|
||||
//static int times = 0;
|
||||
@@ -111,6 +108,9 @@ void BPWritten(const Bypass& bp)
|
||||
case BPMEM_RAS1_SS1: // Index Texture Coordinate Scale 1
|
||||
PixelShaderManager::SetIndTexScaleChanged(0x0c);
|
||||
break;
|
||||
// ----------------
|
||||
// Scissor Control
|
||||
// ----------------
|
||||
case BPMEM_SCISSORTL: // Scissor Rectable Top, Left
|
||||
case BPMEM_SCISSORBR: // Scissor Rectable Bottom, Right
|
||||
case BPMEM_SCISSOROFFSET: // Scissor Offset
|
||||
@@ -299,29 +299,32 @@ void BPWritten(const Bypass& bp)
|
||||
break;
|
||||
}
|
||||
// ----------------------------------
|
||||
// Display Copy Filtering Control
|
||||
// Display Copy Filtering Control - GX_SetCopyFilter(u8 aa,u8 sample_pattern[12][2],u8 vf,u8 vfilter[7])
|
||||
// Fields: Destination, Frame2Field, Gamma, Source
|
||||
// TODO: We might have to implement the gamma one, some games might need this, if they are too dark to see.
|
||||
// ----------------------------------
|
||||
case BPMEM_DISPLAYCOPYFILER:
|
||||
case BPMEM_DISPLAYCOPYFILER+1:
|
||||
case BPMEM_DISPLAYCOPYFILER+2:
|
||||
case BPMEM_DISPLAYCOPYFILER+3:
|
||||
case BPMEM_COPYFILTER0: //GXSetCopyFilter
|
||||
case BPMEM_COPYFILTER1:
|
||||
case BPMEM_DISPLAYCOPYFILER: // if (aa) { use sample_pattern } else { use 666666 }
|
||||
case BPMEM_DISPLAYCOPYFILER+1: // if (aa) { use sample_pattern } else { use 666666 }
|
||||
case BPMEM_DISPLAYCOPYFILER+2: // if (aa) { use sample_pattern } else { use 666666 }
|
||||
case BPMEM_DISPLAYCOPYFILER+3: // if (aa) { use sample_pattern } else { use 666666 }
|
||||
case BPMEM_COPYFILTER0: // if (vf) { use vfilter } else { use 595000 }
|
||||
case BPMEM_COPYFILTER1: // if (vf) { use vfilter } else { use 000015 }
|
||||
break;
|
||||
case BPMEM_FIELDMASK: // Interlacing Control
|
||||
case BPMEM_FIELDMODE:
|
||||
// -----------------------------------
|
||||
// Interlacing Control
|
||||
// -----------------------------------
|
||||
case BPMEM_FIELDMASK: // GX_SetFieldMask(u8 even_mask,u8 odd_mask)
|
||||
case BPMEM_FIELDMODE: // GX_SetFieldMode(u8 field_mode,u8 half_aspect_ratio)
|
||||
SetInterlacingMode(bp);
|
||||
break;
|
||||
// ---------------------------------------------------
|
||||
// Debugging/Profiling info, we don't care about them
|
||||
// ---------------------------------------------------
|
||||
case BPMEM_CLOCK0: // Some Clock
|
||||
case BPMEM_CLOCK1: // Some Clock
|
||||
case BPMEM_SU_COUNTER: // Pixel or Poly Count
|
||||
case BPMEM_RAS_COUNTER: // Sound Count of something in the Texture Units
|
||||
case BPMEM_SETGPMETRIC: // Set the Graphic Processor Metric
|
||||
// ----------------------------------------
|
||||
// Unimportant regs (Clock, Perf, ...)
|
||||
// ----------------------------------------
|
||||
case BPMEM_BUSCLOCK0: // TB Bus Clock ?
|
||||
case BPMEM_BUSCLOCK1: // TB Bus Clock ?
|
||||
case BPMEM_PERF0_TRI: // Perf: Triangles
|
||||
case BPMEM_PERF0_QUAD: // Perf: Quads
|
||||
case BPMEM_PERF1: // Perf: Some Clock, Texels, TX, TC
|
||||
break;
|
||||
// ----------------
|
||||
// EFB Copy config
|
||||
@@ -338,7 +341,7 @@ void BPWritten(const Bypass& bp)
|
||||
case BPMEM_CLEAR_Z: // Z Components (24-bit Zbuffer)
|
||||
break;
|
||||
// -------------------------
|
||||
// Bounding Box support
|
||||
// Bounding Box Control
|
||||
// -------------------------
|
||||
case BPMEM_CLEARBBOX1:
|
||||
case BPMEM_CLEARBBOX2: {
|
||||
@@ -367,8 +370,9 @@ void BPWritten(const Bypass& bp)
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
case BPMEM_TEXINVALIDATE: // Used, if game has manual control the Texture Cache, which we don't allow
|
||||
DEBUG_LOG(VIDEO, "BP Texture Invalid: %08x", bp.newvalue);
|
||||
case BPMEM_ZCOMPARE: // Set the Z-Compare and EFB pixel format
|
||||
case BPMEM_TEXINVALIDATE: // Used, if game has manual control the Texture Cache, which we don't allow
|
||||
case BPMEM_MIPMAP_STRIDE: // MipMap Stride Channel
|
||||
case BPMEM_COPYYSCALE: // Display Copy Y Scale
|
||||
case BPMEM_IREF: /* 24 RID
|
||||
@@ -379,8 +383,7 @@ void BPWritten(const Bypass& bp)
|
||||
9 BC1 - Ind. Tex Stage 1 NTexCoord
|
||||
6 BI1 - Ind. Tex Stage 1 NTexMap
|
||||
3 BC0 - Ind. Tex Stage 0 NTexCoord
|
||||
0 BI0 - Ind. Tex Stage 0 NTexMap */
|
||||
break;
|
||||
0 BI0 - Ind. Tex Stage 0 NTexMap */
|
||||
case BPMEM_TEV_KSEL: // Texture Environment Swap Mode Table 0
|
||||
case BPMEM_TEV_KSEL+1:// Texture Environment Swap Mode Table 1
|
||||
case BPMEM_TEV_KSEL+2:// Texture Environment Swap Mode Table 2
|
||||
@@ -389,27 +392,26 @@ void BPWritten(const Bypass& bp)
|
||||
case BPMEM_TEV_KSEL+5:// Texture Environment Swap Mode Table 5
|
||||
case BPMEM_TEV_KSEL+6:// Texture Environment Swap Mode Table 6
|
||||
case BPMEM_TEV_KSEL+7:// Texture Environment Swap Mode Table 7
|
||||
break;
|
||||
case BPMEM_BP_MASK: // This Register can be used to limit to which bits of BP registers is actually written to. the mask is
|
||||
// only valid for the next BP command, and will reset itself.
|
||||
case BPMEM_IND_IMASK: // Index Mask ?
|
||||
break;
|
||||
case BPMEM_UNKNOWN: // This is always set to 0xF at boot of any game, so this sounds like a useless reg
|
||||
if (bp.newvalue != 0x0F)
|
||||
PanicAlert("Unknown is not 0xF! val = 0x%08x", bp.newvalue);
|
||||
case BPMEM_REVBITS: // Always set to 0x0F when GX_InitRevBits() is called.
|
||||
break;
|
||||
|
||||
case BPMEM_UNKOWN_57: // Sunshine uses this: 0xAAA, 0x000, over and over, copy filter related?
|
||||
case BPMEM_UNKOWN_57: // Sunshine alternates this register between values 0x000 and 0xAAA
|
||||
DEBUG_LOG(VIDEO, "Uknown BP Reg 0x57: %08x", bp.newvalue);
|
||||
break;
|
||||
|
||||
case BPMEM_UNKNOWN_60:
|
||||
case BPMEM_UNKNOWN_61:
|
||||
case BPMEM_UNKNOWN_62:
|
||||
case BPMEM_UNKNOWN_63:
|
||||
// Cases added due to: http://code.google.com/p/dolphin-emu/issues/detail?id=360#c90
|
||||
// Are these related to BBox?
|
||||
break;
|
||||
|
||||
case BPMEM_TEXMODESYNC: // Always set to 0 when GX_TexModeSync() is called.
|
||||
break;
|
||||
|
||||
// ------------------------------------------------
|
||||
// On Default, we try to look for other things
|
||||
// before we give up and say its an unknown opcode
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2003-2008 Dolphin Project.
|
||||
// Copyright (C) 2003-2009 Dolphin Project.
|
||||
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2003-2008 Dolphin Project.
|
||||
// Copyright (C) 2003-2009 Dolphin Project.
|
||||
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
@@ -262,4 +262,4 @@ extern VAT g_VtxAttr[8];
|
||||
// Might move this into its own file later.
|
||||
void LoadCPReg(u32 SubCmd, u32 Value);
|
||||
|
||||
#endif
|
||||
#endif // _CPMEMORY_H
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2003-2008 Dolphin Project.
|
||||
// Copyright (C) 2003-2009 Dolphin Project.
|
||||
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2003-2008 Dolphin Project.
|
||||
// Copyright (C) 2003-2009 Dolphin Project.
|
||||
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
@@ -42,4 +42,4 @@ void VideoFifo_CheckSwapRequest();
|
||||
void VideoFifo_CheckSwapRequestAt(u32 xfbAddr, u32 fbWidth, u32 fbHeight);
|
||||
void VideoFifo_CheckEFBAccess();
|
||||
|
||||
#endif
|
||||
#endif // _FIFO_H
|
||||
|
||||
@@ -110,13 +110,15 @@ PC_TexFormat GetHiresTex(const char *fileName, int *pWidth, int *pHeight, int te
|
||||
|
||||
u8 *temp = SOIL_load_image(textureMap[key].c_str(), &width, &height, &channels, SOIL_LOAD_RGBA);
|
||||
|
||||
if (temp == NULL) {
|
||||
if (temp == NULL)
|
||||
{
|
||||
ERROR_LOG(VIDEO, "Custom texture %s failed to load", textureMap[key].c_str(), width, height);
|
||||
SOIL_free_image_data(temp);
|
||||
return PC_TEX_FMT_NONE;
|
||||
}
|
||||
|
||||
if (width > 1024 || height > 1024) {
|
||||
if (width > 1024 || height > 1024)
|
||||
{
|
||||
ERROR_LOG(VIDEO, "Custom texture %s is too large (%ix%i); textures can only be 1024 pixels tall and wide", textureMap[key].c_str(), width, height);
|
||||
SOIL_free_image_data(temp);
|
||||
return PC_TEX_FMT_NONE;
|
||||
|
||||
@@ -29,4 +29,4 @@ void Shutdown();
|
||||
PC_TexFormat GetHiresTex(const char *fileName, int *pWidth, int *pHeight, int texformat, u8 *data);
|
||||
};
|
||||
|
||||
#endif
|
||||
#endif // _HIRESTEXTURES_H
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2003-2008 Dolphin Project.
|
||||
// Copyright (C) 2003-2009 Dolphin Project.
|
||||
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2003-2008 Dolphin Project.
|
||||
// Copyright (C) 2003-2009 Dolphin Project.
|
||||
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2003-2008 Dolphin Project.
|
||||
// Copyright (C) 2003-2009 Dolphin Project.
|
||||
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2003-2008 Dolphin Project.
|
||||
// Copyright (C) 2003-2009 Dolphin Project.
|
||||
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2003-2008 Dolphin Project.
|
||||
// Copyright (C) 2003-2009 Dolphin Project.
|
||||
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
@@ -34,8 +34,10 @@ void InitLUTs()
|
||||
{
|
||||
for (int i = 0; i < 32; i++)
|
||||
shiftLookup[i] = 1.0f / float(1 << i);
|
||||
|
||||
for (int i = 0; i < 64; i++)
|
||||
lut6to8[i] = (i*255) / 63;
|
||||
|
||||
for (int i = 0; i < 256; i++)
|
||||
{
|
||||
lutu8tosfloat[i] = (float)(i - 128) / 127.0f;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2003-2008 Dolphin Project.
|
||||
// Copyright (C) 2003-2009 Dolphin Project.
|
||||
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
@@ -31,4 +31,4 @@ extern float shiftLookup[32];
|
||||
|
||||
void InitLUTs();
|
||||
|
||||
#endif
|
||||
#endif // _LOOKUPTABLES_H
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2003-2008 Dolphin Project.
|
||||
// Copyright (C) 2003-2009 Dolphin Project.
|
||||
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user