Misc : build fix for debug x64, assorted cleanup.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4127 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
hrydgard 2009-08-31 22:42:10 +00:00
parent fdf94d7d2b
commit 0b5c993076
10 changed files with 154 additions and 135 deletions

View File

@ -153,7 +153,7 @@
/>
<Tool
Name="VCLibrarianTool"
OutputFile="$(OutDir)\wxmsw28ud_$(ProjectName).lib"
OutputFile="$(OutDir)\wxmsw28ud_adv.lib"
SuppressStartupBanner="true"
/>
<Tool
@ -309,7 +309,7 @@
/>
<Tool
Name="VCLibrarianTool"
OutputFile="$(OutDir)\wxmsw28u_$(ProjectName).lib"
OutputFile="$(OutDir)\wxmsw28u_adv.lib"
SuppressStartupBanner="true"
/>
<Tool
@ -1473,6 +1473,10 @@
<Filter
Name="Setup Headers"
>
<File
RelativePath="..\..\include\wx\univ\setup.h"
>
</File>
<File
RelativePath="..\..\include\wx\msw\setup.h"
>
@ -1517,10 +1521,6 @@
/>
</FileConfiguration>
</File>
<File
RelativePath="..\..\include\wx\univ\setup.h"
>
</File>
</Filter>
<Filter
Name="MSW Headers"

View File

@ -229,11 +229,11 @@ void Read16(u16& _uReturnValue, const u32 _iAddress)
case PE_PERF_4H:
case PE_PERF_5L:
case PE_PERF_5H:
WARN_LOG(PIXELENGINE, "(r16) perf counter @ %08x", _iAddress);
INFO_LOG(PIXELENGINE, "(r16) perf counter @ %08x", _iAddress);
break;
default:
WARN_LOG(PIXELENGINE, "(r16) unknown @ %08x", _iAddress);
INFO_LOG(PIXELENGINE, "(r16) unknown @ %08x", _iAddress);
_uReturnValue = 1;
break;
}

View File

@ -263,7 +263,7 @@ bool CNANDContentLoader::CreateFromDirectory(const std::string& _rPath)
}
else
{
PanicAlert("NANDContentLoader: error opening %s", szFilename);
ERROR_LOG(DISCIO, "NANDContentLoader: error opening %s", szFilename);
}
}

View File

@ -27,42 +27,35 @@ namespace DiscIO
{
class IVolume
{
public:
public:
IVolume() {}
virtual ~IVolume() {}
IVolume()
{}
virtual bool Read(u64 _Offset, u64 _Length, u8* _pBuffer) const = 0;
virtual bool RAWRead(u64 _Offset, u64 _Length, u8* _pBuffer) const = 0;
virtual bool GetTitleID(u8*) const { return false; }
virtual std::string GetUniqueID() const = 0;
virtual std::string GetMakerID() const = 0;
virtual std::string GetName() const = 0;
virtual u32 GetFSTSize() const = 0;
virtual std::string GetApploaderDate() const = 0;
enum ECountry
{
COUNTRY_EUROPE = 0,
COUNTRY_FRANCE = 1,
COUNTRY_USA = 2,
COUNTRY_JAPAN,
COUNTRY_KOREA,
COUNTRY_ITALY,
COUNTRY_TAIWAN,
COUNTRY_SDK,
COUNTRY_UNKNOWN,
NUMBER_OF_COUNTRIES
};
virtual ~IVolume()
{}
virtual bool Read(u64 _Offset, u64 _Length, u8* _pBuffer) const = 0;
virtual bool RAWRead(u64 _Offset, u64 _Length, u8* _pBuffer) const = 0;
virtual bool GetTitleID(u8*) const { return false; }
virtual std::string GetUniqueID() const = 0;
virtual std::string GetMakerID() const = 0;
virtual std::string GetName() const = 0;
virtual u32 GetFSTSize() const = 0;
virtual std::string GetApploaderDate() const = 0;
enum ECountry
{
COUNTRY_EUROPE = 0,
COUNTRY_FRANCE = 1,
COUNTRY_USA = 2,
COUNTRY_JAPAN,
COUNTRY_KOREA,
COUNTRY_ITALY,
COUNTRY_TAIWAN,
COUNTRY_SDK,
COUNTRY_UNKNOWN,
NUMBER_OF_COUNTRIES
};
virtual ECountry GetCountry() const = 0;
virtual u64 GetSize() const = 0;
virtual ECountry GetCountry() const = 0;
virtual u64 GetSize() const = 0;
};
// Generic Switch function for all volumes

View File

@ -15,7 +15,8 @@
// Official SVN repository and contact information can be found at
// http://code.google.com/p/dolphin-emu/
#pragma once
#ifndef _VOLUME_DIRECTORY
#define _VOLUME_DIRECTORY
#include "Volume.h"
#include "Common.h"
@ -30,8 +31,7 @@
namespace DiscIO
{
class CVolumeDirectory
: public IVolume
class CVolumeDirectory : public IVolume
{
public:
@ -105,3 +105,5 @@ class CVolumeDirectory
};
} // namespace
#endif

View File

@ -15,7 +15,8 @@
// Official SVN repository and contact information can be found at
// http://code.google.com/p/dolphin-emu/
#pragma once
#ifndef _VOLUME_GC
#define _VOLUME_GC
#include "Volume.h"
#include "Blob.h"
@ -44,3 +45,5 @@ private:
};
} // namespace
#endif

View File

@ -15,7 +15,8 @@
// Official SVN repository and contact information can be found at
// http://code.google.com/p/dolphin-emu/
#pragma once
#ifndef _VOLUME_WAD
#define _VOLUME_WAD
#include "Volume.h"
#include "Blob.h"
@ -50,3 +51,5 @@ private:
};
} // namespace
#endif

View File

@ -455,11 +455,11 @@ const char *GenerateVertexShader(u32 components, bool D3D)
WRITE(p, "o.tex3.w = o.pos.w;\n");
}
// Why are we adding w to z?
if (!D3D) {
// scale to gl clip space
// scale to gl clip space - which is -o.pos.w to o.pos.w, hence the addition.
WRITE(p, "o.pos.z = (o.pos.z * 2.0f) + o.pos.w;\n");
} else {
WRITE(p, "o.pos.z = o.pos.z + o.pos.w;\n");
}

View File

@ -174,13 +174,13 @@ void LoadXFReg(u32 transferSize, u32 baseAddress, u32 *pData)
// paper mario writes 16777216.0f, 1677721.75
// Killer 7 writes 16777216.0f here
case XFMEM_SETZSCALE:
WARN_LOG(VIDEO, "Set ZScale : %x=%x\n", address, data);
INFO_LOG(VIDEO, "Set ZScale : %x=%x\n", address, data);
break;
// paper mario writes 16777216.0f, 5033165.0f
// Killer 7 alterns this between 16777216.0f and 16710107.0f
case XFMEM_SETZOFFSET:
WARN_LOG(VIDEO, "Set ZOffset : %x=%x\n", address, data);
INFO_LOG(VIDEO, "Set ZOffset : %x=%x\n", address, data);
break;
// --------------

View File

@ -2545,19 +2545,26 @@ void 0717_InitializeDecoderState() // 0xff88 to 0xff8B
// 071a 00fe 04fb sr @0x04fb, $AC0.M
(*0x4fb)++;
071c 8100 clr $ACC0
071d 2e32 srs @0x0032, $AC0.M
071e 2e66 srs @0x0066, $AC0.M
071f 2e67 srs @0x0067, $AC0.M
0720 268a lrs $AC0.M, @0xff8a
0721 248b lrs $AC0.L, @0xff8b
0722 2e3a srs @0x003a, $AC0.M
0723 2c3b srs @0x003b, $AC0.L
0724 268c lrs $AC0.M, @0xff8c
0725 248d lrs $AC0.L, @0xff8d
0726 2e38 srs @0x0038, $AC0.M
0727 2c39 srs @0x0039, $AC0.L
0728 02df ret
// 071c 8100 clr $ACC0
// 071d 2e32 srs @0x0032, $AC0.M
// 071e 2e66 srs @0x0066, $AC0.M
// 071f 2e67 srs @0x0067, $AC0.M
CurBlock = 0
YN1 = 0
YN2 = 0
// 0720 268a lrs $AC0.M, @0xff8a
// 0721 248b lrs $AC0.L, @0xff8b
// 0722 2e3a srs @0x003a, $AC0.M
// 0723 2c3b srs @0x003b, $AC0.L
RemLength = Length
// 0724 268c lrs $AC0.M, @0xff8c
// 0725 248d lrs $AC0.L, @0xff8d
// 0726 2e38 srs @0x0038, $AC0.M
// 0727 2c39 srs @0x0039, $AC0.L
CurAddr = StartAddr
// 0728 02df ret
}
void 0729_UpdateDecoderState()
@ -2567,6 +2574,7 @@ void 0729_UpdateDecoderState()
// 072b 0240 000f andi $AC0.M, #0x000f
ACC0 = 0;
AC0.M = *0x0489 & 0xF;
// 072d 1f5e mrr $AX0.H, $AC0.M
// 072e 8100 clr $ACC0
// 072f 0e10 lris $AC0.M, #0x10
@ -2581,12 +2589,12 @@ void 0729_UpdateDecoderState()
// 0734 2288 lrs $AX0.H, @0xff88
// 0735 2089 lrs $AX0.L, @0xff89
// 0736 5800 subax $ACC0, $AX0
ACC0 = [8a,8b] - [88,89];
ACC0 = Length[8a,8b] - LoopStartPos[88,89];
// 0737 0a00 lris $AX0.H, #0x00
// 0738 2032 lrs $AX0.L, @0x0032
// 0739 5800 subax $ACC0, $AX0
ACC0 -= *0x0432;
ACC0 -= CurBlock? (*0x0432);
// 073a 2e3a srs @0x003a, $AC0.M
// 073b 2c3b srs @0x003b, $AC0.L
@ -2727,76 +2735,86 @@ void 073d_DECODE_0x05_0x09(_dest($AR3), _numberOfSamples($AC1.M), _len(AX1)) /
}
else
{
07ab b100 tst $ACC0
07ac 0295 07bb jz 0x07bb
07ae 5d00 sub $ACC1, $ACC0
07af 040f addis $ACC0, #0x0f
07b0 147c lsr $ACC0, #-4
07b1 0c00 lris $AC0.L, #0x00
07b2 00e3 0363 sr @0x0363, $AR3
// 07b4 02bf 07eb call 0x07eb
07eb_AFCDecoder();
07b6 00de 0363 lr $AC0.M, @0x0363
07b8 223b lrs $AX0.H, @0x003b
07b9 4400 addr $ACC0, $AX0.H
07ba 1c7e mrr $AR3, $AC0.M
07bb 8100 clr $ACC0
07bc 2681 lrs $AC0.M, @0xff81
07bd b100 tst $ACC0
07be 0295 07e3 jz 0x07e3 // stop rendering, see below 7e3
07c0 2380 lrs $AX1.H, @0xff80
07c1 2688 lrs $AC0.M, @0xff88
07c2 2489 lrs $AC0.L, @0xff89
07c3 1408 lsl $ACC0, #8
07c4 14f4 asr $ACC0, #-12
07c5 2380 lrs $AX1.H, @0xff80
07c6 8d00 set15
07c7 c810 mulc'mv $AC0.M, $AX1.H : $AX0.L, $AC0.L
07c8 ae00 mulxmv $AX0.L, $AX1.H, $ACC0
07c9 8c00 clr15
07ca f000 lsl16 $ACC0
07cb 4e00 addp $ACC0
07cc 238c lrs $AX1.H, @0xff8c
07cd 218d lrs $AX1.L, @0xff8d
07ce 4a00 addax $ACC0, $AX1
07cf 2e38 srs @0x0038, $AC0.M
07d0 2c39 srs @0x0039, $AC0.L
07d1 2682 lrs $AC0.M, @0xff82
07d2 2e67 srs @0x0067, $AC0.M
07d3 2683 lrs $AC0.M, @0xff83
07d4 2e66 srs @0x0066, $AC0.M
07d5 00e3 0363 sr @0x0363, $AR3
07d7 0083 0458 lri $AR3, #0x0458
07d9 8100 clr $ACC0
07da 0e01 lris $AC0.M, #0x01
// 07db 02bf 07eb call 0x07eb
07eb_AFCDecoder();
07dd 00c3 0363 lr $AR3, @0x0363
07df 02bf 0729 call 0x0729
07e1 029f 0749 jmp 0x0749
// stop rendering of this PB (0x401 == 1) and clear the output buffer with zeroes...
07e3 0e01 lris $AC0.M, #0x01
07e4 2e01 srs @0x0001, $AC0.M
07ab b100 tst $ACC0
07ac 0295 07bb jz 0x07bb
07ae 5d00 sub $ACC1, $ACC0
07af 040f addis $ACC0, #0x0f
07b0 147c lsr $ACC0, #-4
07b1 0c00 lris $AC0.L, #0x00
07b2 00e3 0363 sr @0x0363, $AR3
// 07b4 02bf 07eb call 0x07eb
07eb_AFCDecoder();
07b6 00de 0363 lr $AC0.M, @0x0363
07b8 223b lrs $AX0.H, @0x003b
07b9 4400 addr $ACC0, $AX0.H
07ba 1c7e mrr $AR3, $AC0.M
07bb 8100 clr $ACC0
// Check repeat mode.
07bc 2681 lrs $AC0.M, @0xff81
07bd b100 tst $ACC0
07be 0295 07e3 jz 0x07e3 // stop rendering, see below 7e3
// Repeat.
07c0 2380 lrs $AX1.H, @0xff80
// 07c1 2688 lrs $AC0.M, @0xff88
// 07c2 2489 lrs $AC0.L, @0xff89
// 07c3 1408 lsl $ACC0, #8
// 07c4 14f4 asr $ACC0, #-12
$AC0 = PB.LoopStartPos >> 4
07c5 2380 lrs $AX1.H, @0xff80
07c6 8d00 set15
07c7 c810 mulc'mv $AC0.M, $AX1.H : $AX0.L, $AC0.L
07c8 ae00 mulxmv $AX0.L, $AX1.H, $ACC0
07c9 8c00 clr15
07ca f000 lsl16 $ACC0
07cb 4e00 addp $ACC0
// The above is a 32 bit mul - loopstart * format
// 07cc 238c lrs $AX1.H, @0xff8c
// 07cd 218d lrs $AX1.L, @0xff8d
// 07ce 4a00 addax $ACC0, $AX1
// 07cf 2e38 srs @0x0038, $AC0.M
// 07d0 2c39 srs @0x0039, $AC0.L
So, CurAddr = Loopstart * format + Startaddr
// 07d1 2682 lrs $AC0.M, @0xff82
// 07d2 2e67 srs @0x0067, $AC0.M
// 07d3 2683 lrs $AC0.M, @0xff83
// 07d4 2e66 srs @0x0066, $AC0.M
Unconditionally (!) copy YN1 and YN2 from loopyn2 and loopyn1
07d5 00e3 0363 sr @0x0363, $AR3
07d7 0083 0458 lri $AR3, #0x0458
07d9 8100 clr $ACC0
07da 0e01 lris $AC0.M, #0x01
// 07db 02bf 07eb call 0x07eb
07eb_AFCDecoder();
07dd 00c3 0363 lr $AR3, @0x0363
07df 02bf 0729 call 0x0729
07e1 029f 0749 jmp 0x0749
// No repeat
// stop rendering of this PB (0x401 == 1) and clear the output buffer with zeroes...
07e3 0e01 lris $AC0.M, #0x01
07e4 2e01 srs @0x0001, $AC0.M
early_out:
// Zero the buffer.
07e5 8100 clr $ACC0
07e6 005f loop $AC1.M
07e7 1b7e srri @$AR3, $AC0.M
07e8 0092 00ff lri $CR, #0x00ff
// 07ea 02df ret
return
07e5 8100 clr $ACC0
07e6 005f loop $AC1.M
07e7 1b7e srri @$AR3, $AC0.M
07e8 0092 00ff lri $CR, #0x00ff
// 07ea 02df ret
return
}
}
@ -2823,9 +2841,9 @@ void 07eb_AFCDecoder(_numberOfSample(AC0.M))
// 07fc 4c00 add $ACC0, $ACC1
// 07fd 2e38 srs @0x0038, $AC0.M
// 07fe 2c39 srs @0x0039, $AC0.L
//inrease sample offset in ARAM
// increase sample offset in ARAM
AC0 = (*0x0038 << 16) | *0x0039
AC1 = _numberOfSample * *0x0480 // bytes per sample
AC1 = AC0 + _numberOfSample * *0x0480 // bytes per sample
*0x0038 = AC0.M
*0x0039 = AC0.L