Compare commits

...

17 Commits

Author SHA1 Message Date
yabause
3206129d97 Merged 1397 into release branch to fix
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=455749
2009-01-05 22:25:07 +00:00
yabause
9a0a853ab0 Merged 1377 2009-01-04 00:37:20 +00:00
yabause
453a550f1c Merged 1362 into release 2009-01-04 00:21:22 +00:00
yabause
7ba1a53d5d Merging 1313 2009-01-01 22:18:26 +00:00
yabause
bd55e67a3c Reverting last change (sorry about this, but changes should
really go in trunk first)
2009-01-01 22:13:59 +00:00
luigi__
34f0bd9a80 Fixed the check for shaders availability. 2009-01-01 21:43:00 +00:00
zeromus
39f105b623 disable shaders in 0.9 release. reflect this in changelogs. change version number to 0.9 2009-01-01 21:24:32 +00:00
zeromus
608b50bf92 fix changelog to remove features which arent going to make it into 0.9 2009-01-01 19:29:53 +00:00
yabause
e3e4da645f Merged 1341 and partially merged 1334 2008-12-31 15:09:56 +00:00
yabause
783edb2e39 Merged revision 1335 to 1337 2008-12-31 14:43:28 +00:00
yabause
c05ba29944 + r1332 2008-12-30 23:47:39 +00:00
yabause
cbc2178379 Ooops... forgot 1328 in my previous merge :) 2008-12-30 21:49:16 +00:00
yabause
bfb718194d Merged revisions 1321, 1322 and 1327 2008-12-30 21:46:04 +00:00
yabause
61857f8b59 Merging revisions 1314 to 1319 into release branch. 2008-12-30 21:20:05 +00:00
yabause
2ee306e67d Merging r1306 (Fix up ARM9_struct definition.) into
release branch.
2008-12-30 15:16:43 +00:00
yabause
f40cec5177 Updating version number to 0.9 ... again :) 2008-12-30 14:49:44 +00:00
yabause
432170a3c3 Re-creating the release branch from r1302. 2008-12-30 14:37:44 +00:00
297 changed files with 613 additions and 1242 deletions

View File

@@ -15,8 +15,9 @@ Jeff Bland
Andres Delikat
Riccardo Magliocchetti
Max Tabachenko (CrazyMax/mtabachenko)
Zeromus
zeromus
Luigi__
adelikat
Contributors
------------

View File

@@ -1,85 +1,93 @@
0.8 -> 0.9
There have been so many changes that this list can hardly be considered complete.
The savestate system is totally changed and incompatible with old savestates.
General/Core:
- Convert to c++!
- Added "high-level" check for DMAs and Timer for minor (really minor) speed up [shash]
- Changed instruction execution to 16 at a time blocks (tested and stable) [shash]
- Really minor memory access speed up (mainly added for clarity) [shash]
- Fixes in IPC FIFO [CrazyMax]
- Add Geometry FIFO simulation (New SMB and others games not freeze now) [CrazyMax]
- Add cosine interpolation in the SPU (conditionally compiled) [zeromus,luigi__]
- Experiment: always one silent SPU core at 44.1khz synched with emu for more precision.
The audible core runs with the host, causing music to slow down but not tear or pitch bend. [zeromus]
- Change savestate code to support loosely bound chunks and more easily other parts of the emu (GE, GPU).
The savestate format is changed, but from now on it is in principle more resilient
(though it will continue to break as we tinker with the internals) [zeromus]
- Remove 16MB of WRAM at 0x01****** from arm9. Mapped to unused instead. What was this? [zeromus]
- Add RTC implementations (not fully) [CrazyMax]
- Add a GUI hud system; start adding some HUD elements
- Add functions for a lid open/close. Holding key (default "Backspace" in Windows port) while game is freeze/non freeze. [CrazyMax]
- Added a bunch of crazy templates to the cpu and mmu for minor speed boosts [zeromus]
- Add secure area decryption from ndstool [zeromus]
- change backupmem autodetection to catch more cases of unusual usage patterns [zeromus]
- Fixed Thumb LDMIA (fixes ingame Dead'n'Furious) [shash]
- Fix repeating DMA (fixes NSMB parallax BG) [zeromus]
Graphics:
- Added gfx3d module which emulates the whole GE as part of the core emu. [zeromus]
- Moved the windows/cocoa OGLRender to the emu core and replace ogl_collector.
Now every platform shares the same 3d code. [zeromus]
- Reorganize 3d code to defer rendering to after 3d vblank. eliminates tearing, and texturing artifacts. [zeromus]
- Add optional fragment shading pipeline for more precision [luigi__]
- Many tweaks and improvements to 3d precision [zeromus, CrazyMax, luigi__]
- Rewrite VRAM mapping control and rendering [CrazyMax, luigi__]
- Improvements to 2d/3d compositing aiming at better NSMB rendering; still imperfect [zeromus]
- Fix in capture display (many games with both 3D screen not blinking now) [CrazyMax]
- Fix in master brightness (this is fix games with black screens) [CrazyMax]
- Added SSE2 version for some matrix routines [CrazyMax]
- Make matrix 4x4 multiply routines use W-coordinate. [zeromus]
- Add many matrix and vector functions to matrix.cpp [zeromus]
- Added transparency and fixed material alpha support and alpha testing on the 3D core [shash]
- Changed how depth initial values are calculated (fixes SM64DS skybox) [shash]
- Some fixes in 3D core OGL (fixed textures) [CrazyMax]
- Added texture caching (speedup 3D core) [CrazyMax]
- Render shadow volumes [zeromus, luigi__]
- Toon shading system [luigi__]
- Carry w=1 from vertex() through pipeline (this will be necessary for software 3d rendering) [zeromus]
- Fix clear depth (ex. Castlevania now doesnt flip) [lugi__]
- Make GE matrix mult and load commands clear out unused rows and cols to identity correctly [zeromus]
- Fix errors in matrix operations regarding projection mode and pos-vector mode [zeromus]
- Fix error in command unpacking which caused some display lists to totally blow up [zeromus]
- Convert alpha and material values from [0,31], [0,7] etc ranges to opengl [0,maxint] ranges in a more precise way [zeromus]
- Add opengl state caching. This is of dubious performance assistance, but it is easy to take out so I am leaving it for now. [zeromus]
- Add MMU->GPU signal for when vram mappings change, which allows it to assume textures are unchanged unless vram has changed [zeromus]
- Move lighting model to software instead of using opengl for more precision [zeromus]
- Fix a bug in texture transformation mode 1 [zeromus]
- Add 3d layer h-scrolling [zeromus]
- Removed some serious inefficiencies from sprite window code [zeromus]
Mac OS X port:
- Fixed: Filenames and paths with unicode characters now work. [Jeff]
- Fixed: Load state from file button works again. [Jeff]
- Save State panel now pauses emulation while the file selection box is open. [Jeff]
- Fixed: Frozen video output (and/or messed 3d emulation) after loading a state. [Jeff]
- Added option to load the most recent file upon launching the program. [Jeff]
- Added French translation (thanks to Pierre Rudloff). [Jeff]
- Added basic key mapping configuration to application preferences (thanks to Julio GorgŽ). [Jeff]
- Added keyboard shortcuts for Execute, Pause and Reset command (thanks to Julio GorgŽ). [Jeff]
- Default key mappings are no longer case sensitive. [Jeff]
- Added ability to limit speed. [Jeff]
- Fixed: Video output should work on software-only 3D renderers. [Jeff]
Windows port:
- Removed the bug report link with a define, to avoid reports from betas/external builds [shash]
- Added the version on window bar to recognize versions from screenshots [shash]
- Changed graphics render core to DirectDraw (work faster) [CrazyMax]
- Fix a race condition in NDS_3D_Reset and NDS_glInit [zeromus]
- Tweak optimization flags and change entire source code to use fastcall [zeromus]
- Add an arm9 cpu load average calculator similar to no$ [zeromus]
- Fix the buggy auto frameskip logic which made the emu slow to a crawl. Now it runs fast! [zeromus]
- Fix resizing, rotate & aspect ration of main window. Add save window position and parameters [CrazyMax]
- Rewrite all debug tools (autoupdate works now) [CrazyMax]
- Add AVI output [zeromus]
- Remove multithreading from user interface after finding several synchronization issues [zeromus]
- Rewrite input core & replace config input dialog [CrazyMax]
For this release, we have formatted the list into a high level overview of big changes and bad bugs relative to the previous release. Hopefully what you're interested in.
This list does not include items which are solely performance boosts, for let us just say that virtually every system has been speeded up.
* The savestate system is totally changed and incompatible with old savestates.
* The 3d system should be considered rewritten.
General/Core:
enh: Convert to c++
enh: Add functions for a lid open/close. Holding key (default "Backspace" in Windows port) while game is freeze/non freeze. [CrazyMax]
enh: Add secure area decryption from ndstool [zeromus]
enh: Change savestate code to support loosely bound chunks and more easily other parts of the emu (GE, GPU).
The savestate format is changed, but from now on it is in principle more resilient
(though it will continue to break as we tinker with the internals) [zeromus]
enh: Added SSE2 optimizations for matrices. Since we now make an SSE2 build, more optimizations can be made. [CrazyMax]
enh: Add a preliminary GUI hud system [CrazyMax,zeromus]
CPU/MMU:
bug: Many fixes in IPC and GE FIFOs. Fixes freezes in NSMB, dsracing, and others. [CrazyMax,luigi__,shash]
bug: Fix ARM instructions SBC and RSC (likewise SBC in thumb) [normatt]
bug: Fixed Thumb LDMIA (fixes ingame Dead'n'Furious) [shash]
bug: Fix repeating DMA (fixes NSMB parallax BG) [zeromus]
bug: Proper handling for unaligned CPU accesses [luigi__]
bug: Proper handling for undefined instruction exceptions [Salva Peiró]
bug: correctly return vram control register values (fixes homebrew 3d games) [zeromus]
enh: Remove 16MB of WRAM at 0x01****** from arm9. Mapped to unused instead. Nobody knows what this was. [zeromus]
enh: Changed instruction execution to 16 at a time blocks (tested and stable) [shash]
Hardware:
bug: Newer and better sqrt and div emulation; makes SM64DS playable [luigi__,shash,zeromus]
bug: Add preliminary RTC implementations [CrazyMax]
enh: Add cosine interpolation in the SPU (conditionally compiled) [zeromus,luigi__]
enh: Experimental: always one silent non-mixing SPU core at 44.1khz synched with emu, for more precision.
The audible core runs with the host, causing music to slow down but not tear or pitch bend. [zeromus]
Graphics:
- Overhaul 3d:
. Move entire GE to core emu.
. Move OpenGL renderer to emu core for optional use by platforms, removing ogl_collector. Now every platform shares the same 3d code.
. Reorganize 3d code to defer rendering to after 3d vblank. Eliminates tearing, and texturing artifacts. [zeromus]
. Move lighting model to software instead of using opengl's fixed function model [zeromus]
. Render shadow volumes; toon shading and highlight table [zeromus, luigi__]
. Added texture caching! big speed up. [CrazyMax]
bug: Many assorted tweaks and improvements to 3d and 2d precision [zeromus,CrazyMax,luigi__]
bug: Fixes to GE: command unpacking, projection and pos-vector mode matrix handling, mult and load commands [zeromus]
bug: Fix a bug in texture transformation mode 1 [zeromus]
bug: Fixed GPU rendering bugs in sprites and BG [CrazyMax]
bug: Fixes to texture conversion [CrazyMax,zeromus]
bug: Fixes in capture display (no blinking in many games with dual 3D) [CrazyMax]
bug: Fixes in master brightness (this fixes some games with black screens) [CrazyMax]
bug: Fixes in screen, backdrop, and sprite blending [luigi__]
bug: Changed clear depths and how depth initial values are calculated (fixes SM64DS skybox, Castlevania) [shash,lugi__]
bug: Add 3d layer h-scrolling [zeromus]
bug: Added transparency and fixed material alpha support and alpha testing on the 3D core [shash]
bug: Rewrite VRAM mapping control and rendering (more accurate) [CrazyMax,luigi__]
bug: convert colors to opengl better to prevent alpha=31 polys from being ever so slightly transparent [zeromus]
enh: Add MMU->GPU signal for when vram mappings change to function as a texture cache invalidate signal [zeromus]
enh: Make matrix 4x4 multiply routines use W-coordinate; carry w coord through pipeline [zeromus]
Mac OS X port:
bug: Fixed: Filenames and paths with unicode characters now work. [Jeff]
bug: Fixed: Load state from file button works again. [Jeff]
enh: Save State panel now pauses emulation while the file selection box is open. [Jeff]
bug: Fixed: Frozen video output (and/or messed 3d emulation) after loading a state. [Jeff]
bug: Added option to load the most recent file upon launching the program. [Jeff]
enh: Added French translation (thanks to Pierre Rudloff). [Jeff]
enh: Added basic key mapping configuration to application preferences (thanks to Julio GorgŽ). [Jeff]
enh: Added keyboard shortcuts for Execute, Pause and Reset command (thanks to Julio GorgŽ). [Jeff]
enh: Default key mappings are no longer case sensitive. [Jeff]
enh: Added ability to limit speed. [Jeff]
enh: Fixed: Video output should work on software-only 3D renderers. [Jeff]
Windows port:
bug: Fix a race condition in NDS_3D_Reset and NDS_glInit [zeromus]
bug: Fix the buggy auto frameskip logic which made the emu slow to a crawl. Now it runs fast! [zeromus]
bug: Fix resizing, rotate & aspect ration of main window. [CrazyMax,_zeromus]
bug: Remove multithreading from user interface after finding several synchronization issues [zeromus]
enh: recent roms menu [luigi_]
enh: Changed graphics render core to DirectDraw (work faster) [CrazyMax]
enh: Add an arm9 cpu load average calculator similar to no$. but I dont think it works right. [zeromus]
enh: Rewrite all debug tools (autoupdate works now) [CrazyMax]
enh: Rewrite input core & replace config input dialog [CrazyMax]
enh: Add AVI output [zeromus]
enh: Add pause toggle and frame advance hotkeys [adelikat]
enh: Add frame counter display and hud messages framework [adelikat]
enh: Main window remembers position, size, and a few other emu preferences [adelikat]
enh: Removed directx sdk dependency for easier building. [zeromus]
enh: Savestate doesnt unpause emu if it is already paused [adelikat]
0.7.3 -> 0.8
Cocoa:

View File

View File

View File

@@ -1,7 +1,7 @@
dnl --- Package name is first argument to AC_INIT
dnl --- Release version is second argument to AC_INIT
AC_INIT(desmume, [0.8])
AC_INIT(desmume, [0.9])
dnl -- find target architecture for some os specific libraries
AC_CANONICAL_TARGET

View File

@@ -139,51 +139,31 @@ NULL
};
//static BOOL setFinalColorDirect (const GPU *gpu, u32 passing, u8 bgnum, u8 *dst, u16 color, u16 x, u16 y);
static BOOL setFinalBGColorSpecialNone (GPU *gpu, u32 passing, u8 bgnum, u8 *dst, u16 color, u16 x, u16 y);
static BOOL setFinalBGColorSpecialBlend (GPU *gpu, u32 passing, u8 bgnum, u8 *dst, u16 color, u16 x, u16 y);
static BOOL setFinalBGColorSpecialIncrease (GPU *gpu, u32 passing, u8 bgnum, u8 *dst, u16 color, u16 x, u16 y);
static BOOL setFinalBGColorSpecialDecrease (GPU *gpu, u32 passing, u8 bgnum, u8 *dst, u16 color, u16 x, u16 y);
static BOOL setFinalColorSpecialNone (const GPU *gpu, u32 passing, u8 bgnum, u8 *dst, u16 color, u16 x, u16 y);
static BOOL setFinalColorSpecialBlend (const GPU *gpu, u32 passing, u8 bgnum, u8 *dst, u16 color, u16 x, u16 y);
static BOOL setFinalColorSpecialIncrease (const GPU *gpu, u32 passing, u8 bgnum, u8 *dst, u16 color, u16 x, u16 y);
static BOOL setFinalColorSpecialDecrease (const GPU *gpu, u32 passing, u8 bgnum, u8 *dst, u16 color, u16 x, u16 y);
//static BOOL setFinalColorDirectWnd (const GPU *gpu, u32 passing, u8 bgnum, u8 *dst, u16 color, u16 x, u16 y);
static BOOL setFinalBGColorSpecialNoneWnd (GPU *gpu, u32 passing, u8 bgnum, u8 *dst, u16 color, u16 x, u16 y);
static BOOL setFinalBGColorSpecialBlendWnd (GPU *gpu, u32 passing, u8 bgnum, u8 *dst, u16 color, u16 x, u16 y);
static BOOL setFinalBGColorSpecialIncreaseWnd (GPU *gpu, u32 passing, u8 bgnum, u8 *dst, u16 color, u16 x, u16 y);
static BOOL setFinalBGColorSpecialDecreaseWnd (GPU *gpu, u32 passing, u8 bgnum, u8 *dst, u16 color, u16 x, u16 y);
static BOOL setFinal3DColorSpecialNone (GPU *gpu, u32 passing, u8 *dst, u16 color, u8 alpha, u16 x, u16 y);
static BOOL setFinal3DColorSpecialBlend (GPU *gpu, u32 passing, u8 *dst, u16 color, u8 alpha, u16 x, u16 y);
static BOOL setFinal3DColorSpecialIncrease (GPU *gpu, u32 passing, u8 *dst, u16 color, u8 alpha, u16 x, u16 y);
static BOOL setFinal3DColorSpecialDecrease (GPU *gpu, u32 passing, u8 *dst, u16 color, u8 alpha, u16 x, u16 y);
static BOOL setFinal3DColorSpecialNoneWnd (GPU *gpu, u32 passing, u8 *dst, u16 color, u8 alpha, u16 x, u16 y);
static BOOL setFinal3DColorSpecialBlendWnd (GPU *gpu, u32 passing, u8 *dst, u16 color, u8 alpha, u16 x, u16 y);
static BOOL setFinal3DColorSpecialIncreaseWnd (GPU *gpu, u32 passing, u8 *dst, u16 color, u8 alpha, u16 x, u16 y);
static BOOL setFinal3DColorSpecialDecreaseWnd (GPU *gpu, u32 passing, u8 *dst, u16 color, u8 alpha, u16 x, u16 y);
static BOOL setFinalColorSpecialNoneWnd (const GPU *gpu, u32 passing, u8 bgnum, u8 *dst, u16 color, u16 x, u16 y);
static BOOL setFinalColorSpecialBlendWnd (const GPU *gpu, u32 passing, u8 bgnum, u8 *dst, u16 color, u16 x, u16 y);
static BOOL setFinalColorSpecialIncreaseWnd (const GPU *gpu, u32 passing, u8 bgnum, u8 *dst, u16 color, u16 x, u16 y);
static BOOL setFinalColorSpecialDecreaseWnd (const GPU *gpu, u32 passing, u8 bgnum, u8 *dst, u16 color, u16 x, u16 y);
typedef BOOL (*FinalBGColFunct)(GPU *gpu, u32 passing, u8 bgnum, u8 *dst, u16 color, u16 x, u16 y);
typedef BOOL (*Final3DColFunct)(GPU *gpu, u32 passing, u8 *dst, u16 color, u8 alpha, u16 x, u16 y);
typedef BOOL (*FinalColFunct)(const GPU *gpu, u32 passing, u8 bgnum, u8 *dst, u16 color, u16 x, u16 y);
FinalBGColFunct pixelBlittersBG[8] = { //setFinalColorDirect,
setFinalBGColorSpecialNone,
setFinalBGColorSpecialBlend,
setFinalBGColorSpecialIncrease,
setFinalBGColorSpecialDecrease,
FinalColFunct pixelBlitters[8] = { //setFinalColorDirect,
setFinalColorSpecialNone,
setFinalColorSpecialBlend,
setFinalColorSpecialIncrease,
setFinalColorSpecialDecrease,
//setFinalColorDirectWnd,
setFinalBGColorSpecialNoneWnd,
setFinalBGColorSpecialBlendWnd,
setFinalBGColorSpecialIncreaseWnd,
setFinalBGColorSpecialDecreaseWnd};
Final3DColFunct pixelBlitters3D[8] = {
setFinal3DColorSpecialNone,
setFinal3DColorSpecialBlend,
setFinal3DColorSpecialIncrease,
setFinal3DColorSpecialDecrease,
setFinal3DColorSpecialNoneWnd,
setFinal3DColorSpecialBlendWnd,
setFinal3DColorSpecialIncreaseWnd,
setFinal3DColorSpecialDecreaseWnd};
setFinalColorSpecialNoneWnd,
setFinalColorSpecialBlendWnd,
setFinalColorSpecialIncreaseWnd,
setFinalColorSpecialDecreaseWnd};
u16 fadeInColors[17][0x8000];
u16 fadeOutColors[17][0x8000];
@@ -223,9 +203,8 @@ GPU * GPU_Init(u8 l)
}
}
g->setFinalColorBck = setFinalBGColorSpecialNone;
g->setFinalColorSpr = setFinalBGColorSpecialNone;
g->setFinalColor3D = setFinal3DColorSpecialNone;
g->setFinalColorBck = setFinalColorSpecialNone;
g->setFinalColorSpr = setFinalColorSpecialNone;
return g;
}
@@ -234,9 +213,8 @@ void GPU_Reset(GPU *g, u8 l)
{
memset(g, 0, sizeof(GPU));
g->setFinalColorBck = setFinalBGColorSpecialNone;
g->setFinalColorSpr = setFinalBGColorSpecialNone;
g->setFinalColor3D = setFinal3DColorSpecialNone;
g->setFinalColorBck = setFinalColorSpecialNone;
g->setFinalColorSpr = setFinalColorSpecialNone;
g->core = l;
g->BGSize[0][0] = g->BGSize[1][0] = g->BGSize[2][0] = g->BGSize[3][0] = 256;
g->BGSize[0][1] = g->BGSize[1][1] = g->BGSize[2][1] = g->BGSize[3][1] = 256;
@@ -341,9 +319,8 @@ void SetupFinalPixelBlitter (GPU *gpu)
u8 windowUsed = (gpu->WIN0_ENABLED | gpu->WIN1_ENABLED | gpu->WINOBJ_ENABLED);
u8 blendMode = (gpu->BLDCNT >> 6)&3;
gpu->setFinalColorSpr = pixelBlittersBG[windowUsed*4 + blendMode];
gpu->setFinalColorBck = pixelBlittersBG[windowUsed*4 + blendMode];
gpu->setFinalColor3D = pixelBlitters3D[windowUsed*4 + blendMode];
gpu->setFinalColorSpr = pixelBlitters[windowUsed*4 + blendMode];
gpu->setFinalColorBck = pixelBlitters[windowUsed*4 + blendMode];
}
/* Sets up LCD control variables for Display Engines A and B for quick reading */
@@ -558,10 +535,10 @@ static INLINE void renderline_checkWindows(const GPU *gpu, u8 bgnum, u16 x, u16
}
/*****************************************************************************/
// PIXEL RENDERING - BGS
// PIXEL RENDERING
/*****************************************************************************/
static BOOL setFinalBGColorSpecialNone (GPU *gpu, u32 passing, u8 bgnum, u8 *dst, u16 color, u16 x, u16 y)
static BOOL setFinalColorSpecialNone (const GPU *gpu, u32 passing, u8 bgnum, u8 *dst, u16 color, u16 x, u16 y)
{
//sprwin test hack - use this code
//BOOL windowDraw = TRUE, windowEffect = TRUE;
@@ -570,11 +547,10 @@ static BOOL setFinalBGColorSpecialNone (GPU *gpu, u32 passing, u8 bgnum, u8 *dst
//return 1;
T2WriteWord(dst, passing, color);
gpu->bgPixels[x] = bgnum;
return 1;
}
static BOOL setFinalBGColorSpecialBlend (GPU *gpu, u32 passing, u8 bgnum, u8 *dst, u16 color, u16 x, u16 y)
static BOOL setFinalColorSpecialBlend (const GPU *gpu, u32 passing, u8 bgnum, u8 *dst, u16 color, u16 x, u16 y)
{
if ((gpu->BLDCNT >> bgnum)&1 && gpu->BLDALPHA_EVA)
{
@@ -605,18 +581,16 @@ static BOOL setFinalBGColorSpecialBlend (GPU *gpu, u32 passing, u8 bgnum, u8 *ds
color = (sourceR & 0x1F) | ((sourceG & 0x1F) << 5) | ((sourceB & 0x1F) << 10) | 0x8000 ;
T2WriteWord(dst, passing, color);
gpu->bgPixels[x] = bgnum;
}
else
{
T2WriteWord(dst, passing, color);
gpu->bgPixels[x] = bgnum;
}
return 1;
}
static BOOL setFinalBGColorSpecialIncrease (GPU *gpu, u32 passing, u8 bgnum, u8 *dst, u16 color, u16 x, u16 y)
static BOOL setFinalColorSpecialIncrease (const GPU *gpu, u32 passing, u8 bgnum, u8 *dst, u16 color, u16 x, u16 y)
{
if ((gpu->BLDCNT >> bgnum)&1) // the bg to draw has a special color effect
{
@@ -636,18 +610,16 @@ static BOOL setFinalBGColorSpecialIncrease (GPU *gpu, u32 passing, u8 bgnum, u8
}
T2WriteWord(dst, passing, color) ;
gpu->bgPixels[x] = bgnum;
}
else
{
T2WriteWord(dst, passing, color);
gpu->bgPixels[x] = bgnum;
}
return 1;
}
static BOOL setFinalBGColorSpecialDecrease (GPU *gpu, u32 passing, u8 bgnum, u8 *dst, u16 color, u16 x, u16 y)
static BOOL setFinalColorSpecialDecrease (const GPU *gpu, u32 passing, u8 bgnum, u8 *dst, u16 color, u16 x, u16 y)
{
if ((gpu->BLDCNT >> bgnum)&1) // the bg to draw has a special color effect
{
@@ -666,18 +638,16 @@ static BOOL setFinalBGColorSpecialDecrease (GPU *gpu, u32 passing, u8 bgnum, u8
color = (fadeOutColors[gpu->BLDY_EVY][color&0x7FFF] | 0x8000);
}
T2WriteWord(dst, passing, color) ;
gpu->bgPixels[x] = bgnum;
}
else
{
T2WriteWord(dst, passing, color);
gpu->bgPixels[x] = bgnum;
}
return 1;
}
static BOOL setFinalBGColorSpecialNoneWnd (GPU *gpu, u32 passing, u8 bgnum, u8 *dst, u16 color, u16 x, u16 y)
static BOOL setFinalColorSpecialNoneWnd (const GPU *gpu, u32 passing, u8 bgnum, u8 *dst, u16 color, u16 x, u16 y)
{
BOOL windowDraw = TRUE, windowEffect = TRUE;
@@ -686,21 +656,17 @@ static BOOL setFinalBGColorSpecialNoneWnd (GPU *gpu, u32 passing, u8 bgnum, u8 *
if (((gpu->BLDCNT >> bgnum)&1) && windowEffect) // the bg to draw has a special color effect
{
T2WriteWord(dst, passing, color);
gpu->bgPixels[x] = bgnum;
}
else
{
if ((windowEffect && (gpu->BLDCNT & (0x100 << bgnum))) || windowDraw)
{
T2WriteWord(dst, passing, color);
gpu->bgPixels[x] = bgnum;
}
}
return windowDraw;
}
static BOOL setFinalBGColorSpecialBlendWnd (GPU *gpu, u32 passing, u8 bgnum, u8 *dst, u16 color, u16 x, u16 y)
static BOOL setFinalColorSpecialBlendWnd (const GPU *gpu, u32 passing, u8 bgnum, u8 *dst, u16 color, u16 x, u16 y)
{
BOOL windowDraw = TRUE, windowEffect = TRUE;
@@ -736,21 +702,17 @@ static BOOL setFinalBGColorSpecialBlendWnd (GPU *gpu, u32 passing, u8 bgnum, u8
color = (sourceR & 0x1F) | ((sourceG & 0x1F) << 5) | ((sourceB & 0x1F) << 10) | 0x8000 ;
T2WriteWord(dst, passing, color);
gpu->bgPixels[x] = bgnum;
}
else
{
if ((windowEffect && (gpu->BLDCNT & (0x100 << bgnum))) || windowDraw)
{
T2WriteWord(dst, passing, color);
gpu->bgPixels[x] = bgnum;
}
}
return windowDraw;
}
static BOOL setFinalBGColorSpecialIncreaseWnd (GPU *gpu, u32 passing, u8 bgnum, u8 *dst, u16 color, u16 x, u16 y)
static BOOL setFinalColorSpecialIncreaseWnd (const GPU *gpu, u32 passing, u8 bgnum, u8 *dst, u16 color, u16 x, u16 y)
{
BOOL windowDraw = TRUE, windowEffect = TRUE;
@@ -774,21 +736,17 @@ static BOOL setFinalBGColorSpecialIncreaseWnd (GPU *gpu, u32 passing, u8 bgnum,
}
T2WriteWord(dst, passing, color) ;
gpu->bgPixels[x] = bgnum;
}
else
{
if ((windowEffect && (gpu->BLDCNT & (0x100 << bgnum))) || windowDraw)
{
T2WriteWord(dst, passing, color);
gpu->bgPixels[x] = bgnum;
}
}
return windowDraw;
}
static BOOL setFinalBGColorSpecialDecreaseWnd (GPU *gpu, u32 passing, u8 bgnum, u8 *dst, u16 color, u16 x, u16 y)
static BOOL setFinalColorSpecialDecreaseWnd (const GPU *gpu, u32 passing, u8 bgnum, u8 *dst, u16 color, u16 x, u16 y)
{
BOOL windowDraw = TRUE, windowEffect = TRUE;
@@ -811,241 +769,11 @@ static BOOL setFinalBGColorSpecialDecreaseWnd (GPU *gpu, u32 passing, u8 bgnum,
color = (fadeOutColors[gpu->BLDY_EVY][color&0x7FFF] | 0x8000);
}
T2WriteWord(dst, passing, color) ;
gpu->bgPixels[x] = bgnum;
}
else
{
if ((windowEffect && (gpu->BLDCNT & (0x100 << bgnum))) || windowDraw)
{
T2WriteWord(dst, passing, color);
gpu->bgPixels[x] = bgnum;
}
}
return windowDraw;
}
/*****************************************************************************/
// PIXEL RENDERING - 3D
/*****************************************************************************/
static BOOL setFinal3DColorSpecialNone(GPU *gpu, u32 passing, u8 *dst, u16 color, u8 alpha, u16 x, u16 y)
{
T2WriteWord(dst, passing, (color | 0x8000));
return 1;
}
static BOOL setFinal3DColorSpecialBlend(GPU *gpu, u32 passing, u8 *dst, u16 color, u8 alpha, u16 x, u16 y)
{
/* We can blend if the 3D layer is selected as 1st target, */
/* but also if the 3D layer has the highest prio. */
if((gpu->BLDCNT & 0x1) || (gpu->dispx_st->dispx_BGxCNT[0].bits.Priority == 0))
{
int bg_under = gpu->bgPixels[x];
u16 final = color;
/* If the layer we are drawing on is selected as 2nd source, we can blend */
if(gpu->BLDCNT & (1 << (8 + bg_under)))
{
/* Test for easy cases like alpha = min or max */
if(alpha == 16)
{
final = color;
}
else if(alpha == 0)
{
final = T2ReadWord(dst, passing);
}
else
{
COLOR c1, c2, cfinal;
c1.val = color;
c2.val = T2ReadWord(dst, passing);
cfinal.bits.red = ((c1.bits.red * alpha / 16) + (c2.bits.red * (16 - alpha) / 16));
cfinal.bits.green = ((c1.bits.green * alpha / 16) + (c2.bits.green * (16 - alpha) / 16));
cfinal.bits.blue = ((c1.bits.blue * alpha / 16) + (c2.bits.blue * (16 - alpha) / 16));
final = cfinal.val;
}
}
T2WriteWord(dst, passing, (final | 0x8000));
gpu->bgPixels[x] = 0;
}
else
{
T2WriteWord(dst, passing, (color | 0x8000));
gpu->bgPixels[x] = 0;
}
return 1;
}
static BOOL setFinal3DColorSpecialIncrease(GPU *gpu, u32 passing, u8 *dst, u16 color, u8 alpha, u16 x, u16 y)
{
if(gpu->BLDCNT & 0x1)
{
if (gpu->BLDY_EVY != 0x0)
{
color = fadeInColors[gpu->BLDY_EVY][color&0x7FFF];
}
T2WriteWord(dst, passing, (color | 0x8000));
gpu->bgPixels[x] = 0;
}
else
{
T2WriteWord(dst, passing, (color | 0x8000));
gpu->bgPixels[x] = 0;
}
return 1;
}
static BOOL setFinal3DColorSpecialDecrease(GPU *gpu, u32 passing, u8 *dst, u16 color, u8 alpha, u16 x, u16 y)
{
if(gpu->BLDCNT & 0x1)
{
if (gpu->BLDY_EVY != 0x0)
{
color = fadeOutColors[gpu->BLDY_EVY][color&0x7FFF];
}
T2WriteWord(dst, passing, (color | 0x8000));
gpu->bgPixels[x] = 0;
}
else
{
T2WriteWord(dst, passing, (color | 0x8000));
gpu->bgPixels[x] = 0;
}
return 1;
}
static BOOL setFinal3DColorSpecialNoneWnd(GPU *gpu, u32 passing, u8 *dst, u16 color, u8 alpha, u16 x, u16 y)
{
BOOL windowDraw = TRUE, windowEffect = TRUE;
renderline_checkWindows(gpu, 0, x, y, &windowDraw, &windowEffect);
if(windowDraw)
{
T2WriteWord(dst, passing, (color | 0x8000));
gpu->bgPixels[x] = 0;
}
return windowDraw;
}
static BOOL setFinal3DColorSpecialBlendWnd(GPU *gpu, u32 passing, u8 *dst, u16 color, u8 alpha, u16 x, u16 y)
{
BOOL windowDraw = TRUE, windowEffect = TRUE;
renderline_checkWindows(gpu, 0, x, y, &windowDraw, &windowEffect);
if(windowDraw)
{
/* We can blend if the 3D layer is selected as 1st target, */
/* but also if the 3D layer has the highest prio. */
if(((gpu->BLDCNT & 0x1) && windowEffect) || (gpu->dispx_st->dispx_BGxCNT[0].bits.Priority == 0))
{
int bg_under = gpu->bgPixels[x];
u16 final = color;
/* If the layer we are drawing on is selected as 2nd source, we can blend */
if(gpu->BLDCNT & (1 << (8 + bg_under)))
{
/* Test for easy cases like alpha = min or max */
if(alpha == 16)
{
final = color;
}
else if(alpha == 0)
{
final = T2ReadWord(dst, passing);
}
else
{
COLOR c1, c2, cfinal;
c1.val = color;
c2.val = T2ReadWord(dst, passing);
cfinal.bits.red = ((c1.bits.red * alpha / 16) + (c2.bits.red * (16 - alpha) / 16));
cfinal.bits.green = ((c1.bits.green * alpha / 16) + (c2.bits.green * (16 - alpha) / 16));
cfinal.bits.blue = ((c1.bits.blue * alpha / 16) + (c2.bits.blue * (16 - alpha) / 16));
final = cfinal.val;
}
}
T2WriteWord(dst, passing, (final | 0x8000));
gpu->bgPixels[x] = 0;
}
else
{
T2WriteWord(dst, passing, (color | 0x8000));
gpu->bgPixels[x] = 0;
}
}
return windowDraw;
}
static BOOL setFinal3DColorSpecialIncreaseWnd(GPU *gpu, u32 passing, u8 *dst, u16 color, u8 alpha, u16 x, u16 y)
{
BOOL windowDraw = TRUE, windowEffect = TRUE;
renderline_checkWindows(gpu, 0, x, y, &windowDraw, &windowEffect);
if(windowDraw)
{
if((gpu->BLDCNT & 0x1) && windowEffect)
{
if (gpu->BLDY_EVY != 0x0)
{
color = fadeInColors[gpu->BLDY_EVY][color&0x7FFF];
}
T2WriteWord(dst, passing, (color | 0x8000));
gpu->bgPixels[x] = 0;
}
else
{
T2WriteWord(dst, passing, (color | 0x8000));
gpu->bgPixels[x] = 0;
}
}
return windowDraw;
}
static BOOL setFinal3DColorSpecialDecreaseWnd(GPU *gpu, u32 passing, u8 *dst, u16 color, u8 alpha, u16 x, u16 y)
{
BOOL windowDraw = TRUE, windowEffect = TRUE;
renderline_checkWindows(gpu, 0, x, y, &windowDraw, &windowEffect);
if(windowDraw)
{
if((gpu->BLDCNT & 0x1) && windowEffect)
{
if (gpu->BLDY_EVY != 0x0)
{
color = fadeOutColors[gpu->BLDY_EVY][color&0x7FFF];
}
T2WriteWord(dst, passing, (color | 0x8000));
gpu->bgPixels[x] = 0;
}
else
{
T2WriteWord(dst, passing, (color | 0x8000));
gpu->bgPixels[x] = 0;
}
}
return windowDraw;
@@ -1055,7 +783,7 @@ static BOOL setFinal3DColorSpecialDecreaseWnd(GPU *gpu, u32 passing, u8 *dst, u1
// BACKGROUND RENDERING -TEXT-
/*****************************************************************************/
// render a text background to the combined pixelbuffer
INLINE void renderline_textBG(GPU * gpu, u8 num, u8 * dst, u32 Y, u16 XBG, u16 YBG, u16 LG)
INLINE void renderline_textBG(const GPU * gpu, u8 num, u8 * dst, u32 Y, u16 XBG, u16 YBG, u16 LG)
{
struct _BGxCNT * bgCnt = &(gpu->dispx_st)->dispx_BGxCNT[num].bits;
struct _DISPCNT * dispCnt = &(gpu->dispx_st)->dispx_DISPCNT.bits;
@@ -1460,7 +1188,7 @@ void lineExtRot(GPU * gpu, u8 num, u16 l, u8 * DST)
256);
}
void textBG(GPU * gpu, u8 num, u8 * DST)
void textBG(const GPU * gpu, u8 num, u8 * DST)
{
u32 i;
for(i = 0; i < gpu->BGSize[num][1]; ++i)
@@ -2464,9 +2192,6 @@ static INLINE void GPU_ligne_layer(NDS_Screen * screen, u16 l)
for(int i = 0; i< 256; ++i) T2WriteWord(dst, i << 1, c);
/* reset them to backdrop */
memset(gpu->bgPixels, 5, 256);
if (!gpu->LayersEnable[0] && !gpu->LayersEnable[1] &&
!gpu->LayersEnable[2] && !gpu->LayersEnable[3] &&
!gpu->LayersEnable[4]) return;
@@ -2520,9 +2245,6 @@ static INLINE void GPU_ligne_layer(NDS_Screen * screen, u16 l)
{
if (i16 == 0 && dispCnt->BG0_3D)
{
u16 line3Dcolor[256];
u8 line3Dalpha[256];
//determine the 3d range to grab
BGxOFS * bgofs = &gpu->dispx_st->dispx_BGxOFS[i16];
s16 hofs = (s16)T1ReadWord((u8 *)&bgofs->BGxHOFS, 0);
@@ -2531,13 +2253,7 @@ static INLINE void GPU_ligne_layer(NDS_Screen * screen, u16 l)
else if(hofs<0) { start = -hofs; end=255; ofs=0; }
else { start = 0; end=255-hofs; ofs=hofs; }
//gpu3D->NDS_3D_GetLine (l, start, end, (u16*)dst+ofs);
gpu3D->NDS_3D_GetLine(l, start, end, line3Dcolor + ofs, line3Dalpha + ofs);
for(int k = start; k <= end; k++)
if(line3Dcolor[k] & 0x8000)
gpu->setFinalColor3D(gpu, (k << 1), dst, line3Dcolor[k], line3Dalpha[k], k, l);
gpu3D->NDS_3D_GetLine (l, start, end, (u16*)dst+ofs);
continue;
}
}

View File

@@ -661,11 +661,8 @@ struct _GPU
u8 MasterBrightMode;
u32 MasterBrightFactor;
u8 bgPixels[256];
BOOL (*setFinalColorSpr)(GPU *gpu, u32 passing, u8 bgnum, u8 *dst, u16 color, u16 x, u16 y);
BOOL (*setFinalColorBck)(GPU *gpu, u32 passing, u8 bgnum, u8 *dst, u16 color, u16 x, u16 y);
BOOL (*setFinalColor3D) (GPU *gpu, u32 passing, u8 *dst, u16 color, u8 alpha, u16 x, u16 y);
BOOL (*setFinalColorSpr)(const GPU *gpu, u32 passing, u8 bgnum, u8 *dst, u16 color, u16 x, u16 y);
BOOL (*setFinalColorBck)(const GPU *gpu, u32 passing, u8 bgnum, u8 *dst, u16 color, u16 x, u16 y);
void (*spriteRender) (GPU * gpu, u16 l, u8 * dst, u8 * prioTab);
};
/*
@@ -695,7 +692,7 @@ GPU * GPU_Init(u8 l);
void GPU_Reset(GPU *g, u8 l);
void GPU_DeInit(GPU *);
void textBG(GPU * gpu, u8 num, u8 * DST); //Draw text based background
void textBG(const GPU * gpu, u8 num, u8 * DST); //Draw text based background
void rotBG(GPU * gpu, u8 num, u8 * DST);
void extRotBG(GPU * gpu, u8 num, u8 * DST);
void sprite1D(GPU * gpu, u16 l, u8 * dst, u8 * prioTab);

View File

@@ -39,9 +39,14 @@
#include "gfx3d.h"
#include "rtc.h"
#include "GPU_osd.h"
#include "zero_private.h"
#include "mc.h"
#ifdef DO_ASSERT_UNALIGNED
#define ASSERT_UNALIGNED(x) assert(x)
#else
#define ASSERT_UNALIGNED(x)
#endif
static void FASTCALL _MMU_ARM9_write08(u32 adr, u8 val);
static void FASTCALL _MMU_ARM9_write16(u32 adr, u16 val);
static void FASTCALL _MMU_ARM9_write32(u32 adr, u32 val);
@@ -2368,7 +2373,7 @@ static void FASTCALL _MMU_ARM9_write32(u32 adr, u32 val)
MMU_VRAMmapControl(adr-REG_VRAMCNTA+1, (val >> 8) & 0xFF);
MMU_VRAMmapControl(adr-REG_VRAMCNTA+2, (val >> 16) & 0xFF);
MMU_VRAMmapControl(adr-REG_VRAMCNTA+3, (val >> 24) & 0xFF);
return;
break;
case REG_VRAMCNTE:
MMU_VRAMmapControl(adr-REG_VRAMCNTA, val & 0xFF);
MMU_VRAMmapControl(adr-REG_VRAMCNTA+1, (val >> 8) & 0xFF);

View File

@@ -37,7 +37,7 @@ libdesmume_a_SOURCES = \
matrix.cpp matrix.h \
gfx3d.cpp gfx3d.h \
thumb_instructions.cpp thumb_instructions.h types.h \
zero_private.h shaders.h \
shaders.h \
movie.cpp movie.h \
PACKED.h PACKED_END.h \
utils/ConvertUTF.c utils/ConvertUTF.h utils/guid.cpp utils/guid.h \

View File

@@ -476,7 +476,7 @@ void NDS_Reset( void)
unsigned int i;
u32 src;
u32 dst;
FILE* inf;
FILE* inf = 0;
NDS_header * header = NDS_getROMHeader();
if (!header) return ;
@@ -550,7 +550,7 @@ void NDS_Reset( void)
//_MMU_write32[ARMCPU_ARM9](0x02007FFC, 0xE92D4030);
//ARM7 BIOS IRQ HANDLER
inf = fopen("BiosNds7.ROM","rb");
//inf = fopen("BiosNds7.ROM","rb");
if(inf) {
fread(MMU.ARM7_BIOS,1,16384,inf);
fclose(inf);
@@ -569,7 +569,7 @@ void NDS_Reset( void)
}
//ARM9 BIOS IRQ HANDLER
inf = fopen("BiosNds9.ROM","rb");
//inf = fopen("BiosNds9.ROM","rb");
if(inf) {
fread(ARM9Mem.ARM9_BIOS,1,4096,inf);
fclose(inf);

View File

@@ -74,7 +74,7 @@ static void ENDGL() {
#endif
static ALIGN(16) unsigned char GPU_screen3D [256*256*4];
//static ALIGN(16) unsigned char GPU_screenStencil[256*256];
static ALIGN(16) unsigned char GPU_screenStencil[256*256];
static const unsigned short map3d_cull[4] = {GL_FRONT_AND_BACK, GL_FRONT, GL_BACK, 0};
static const int texEnv[4] = { GL_MODULATE, GL_DECAL, GL_MODULATE, GL_MODULATE };
@@ -367,7 +367,7 @@ static void OGLReset()
texcache_stop=MAX_TEXTURE<<1;
//clear the framebuffers
// memset(GPU_screenStencil,0,sizeof(GPU_screenStencil));
memset(GPU_screenStencil,0,sizeof(GPU_screenStencil));
memset(GPU_screen3D,0,sizeof(GPU_screen3D));
}
@@ -426,7 +426,9 @@ static char OGLInit(void)
#endif
/* Create the shaders */
createShaders();
//as a hack for 0.9 release, we're disabling shaders.
hasShaders = false;
//createShaders();
/* Assign the texture units : 0 for main textures, 1 for toon table */
/* Also init the locations for some variables in the shaders */
@@ -1037,7 +1039,7 @@ static void OGLRender()
//printf("%d\n",gfx3d.projlist->count);
//we're not using the alpha clear color right now
glClearColor(gfx3d.clearColor[0],gfx3d.clearColor[1],gfx3d.clearColor[2], gfx3d.clearColor[3]);
glClearColor(gfx3d.clearColor[0],gfx3d.clearColor[1],gfx3d.clearColor[2], clearAlpha);
glClearDepth(gfx3d.clearDepth);
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT);
@@ -1118,7 +1120,7 @@ static void GL_ReadFramebuffer()
{
if(!BEGINGL()) return;
glFinish();
// glReadPixels(0,0,256,192,GL_STENCIL_INDEX, GL_UNSIGNED_BYTE, GPU_screenStencil);
glReadPixels(0,0,256,192,GL_STENCIL_INDEX, GL_UNSIGNED_BYTE, GPU_screenStencil);
glReadPixels(0,0,256,192,GL_BGRA_EXT, GL_UNSIGNED_BYTE, GPU_screen3D);
ENDGL();
@@ -1160,31 +1162,30 @@ static void OGLGetLineCaptured(int line, u16* dst)
}
u8 *screen3D = (u8*)GPU_screen3D+((191-line)<<10);
// u8 *screenStencil = (u8*)GPU_screenStencil+((191-line)<<8);
u8 *screenStencil = (u8*)GPU_screenStencil+((191-line)<<8);
for(int i = 0; i < 256; i++)
{
/* u32 stencil = screenStencil[i];
u32 stencil = screenStencil[i];
if(!stencil)
{
dst[i] = 0x0000;
continue;
}*/
}
int t=i<<2;
/* u8 r = screen3D[t+2];
u8 g = screen3D[t+1];
u8 b = screen3D[t+0];*/
u32 r = screen3D[t+2];
u32 g = screen3D[t+1];
u32 b = screen3D[t+0];
//if this math strikes you as wrong, be sure to look at GL_ReadFramebuffer() where the pixel format in screen3D is changed
//dst[i] = (b<<10) | (g<<5) | (r) | 0x8000;
dst[i] = (screen3D[t+2] | (screen3D[t+1] << 5) | (screen3D[t+0] << 10) | ((screen3D[t+3] > 0) ? 0x8000 : 0x0000));
dst[i] = (b<<10) | (g<<5) | (r) | 0x8000;
}
}
static void OGLGetLine(int line, int start, int end_inclusive, u16* dst, u8* dstAlpha)
static void OGLGetLine(int line, int start, int end_inclusive, u16* dst)
{
assert(line<192 && line>=0);
@@ -1194,7 +1195,7 @@ static void OGLGetLine(int line, int start, int end_inclusive, u16* dst, u8* dst
}
u8 *screen3D = (u8*)GPU_screen3D+((191-line)<<10);
//u8 *screenStencil = (u8*)GPU_screenStencil+((191-line)<<8);
u8 *screenStencil = (u8*)GPU_screenStencil+((191-line)<<8);
//the renderer clears the stencil to 0
//then it sets it to 1 whenever it renders a pixel that passes the alpha test
@@ -1208,18 +1209,15 @@ static void OGLGetLine(int line, int start, int end_inclusive, u16* dst, u8* dst
for(int i = start, j=0; i <= end_inclusive; ++i, ++j)
{
// u32 stencil = screenStencil[i];
u32 stencil = screenStencil[i];
//you would use this if you wanted to use the stencil buffer to make decisions here
// if(!stencil) continue;
if(!stencil) continue;
// u16 oldcolor = dst[j];
u16 oldcolor = dst[j];
int t=i<<2;
// u32 dstpixel;
dst[j] = (screen3D[t+2] | (screen3D[t+1] << 5) | (screen3D[t+0] << 10) | ((screen3D[t+3] > 0) ? 0x8000 : 0x0000));
dstAlpha[j] = (screen3D[t+3] / 2);
u32 dstpixel;
//old debug reminder: display alpha channel
//u32 r = screen3D[t+3];
@@ -1228,7 +1226,7 @@ static void OGLGetLine(int line, int start, int end_inclusive, u16* dst, u8* dst
//if this math strikes you as wrong, be sure to look at GL_ReadFramebuffer() where the pixel format in screen3D is changed
/* u32 a = screen3D[t+3];
u32 a = screen3D[t+3];
typedef u8 mixtbl[32][32];
mixtbl & mix = mixTable555[a];
@@ -1251,7 +1249,7 @@ static void OGLGetLine(int line, int start, int end_inclusive, u16* dst, u8* dst
newpix = mix[newpix][oldpix];
dstpixel |= (newpix<<10);
dst[j] = dstpixel;*/
dst[j] = dstpixel;
}
}

View File

@@ -1,6 +1,4 @@
#ifdef __GNUC__
__attribute__((packed))
#else
#ifndef __GNUC__
#pragma pack(push, 1)
#pragma warning(disable : 4103)
#endif

View File

@@ -1,5 +1,3 @@
#if defined(_MSC_VER) || defined(__INTEL_COMPILER)
#pragma pack(pop)
#else
#endif

View File

@@ -40,12 +40,12 @@ extern SoundInterface_struct *SNDCoreList[];
#define CHANSTAT_STOPPED 0
#define CHANSTAT_PLAY 1
s8 indextbl[8] =
const s8 indextbl[8] =
{
-1, -1, -1, -1, 2, 4, 6, 8
};
u16 adpcmtbl[89] =
const u16 adpcmtbl[89] =
{
0x0007, 0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x0010,
0x0011, 0x0013, 0x0015, 0x0017, 0x0019, 0x001C, 0x001F, 0x0022, 0x0025,
@@ -59,7 +59,7 @@ u16 adpcmtbl[89] =
0x41B2, 0x4844, 0x4F7E, 0x5771, 0x602F, 0x69CE, 0x7462, 0x7FFF
};
s16 wavedutytbl[8][8] = {
const s16 wavedutytbl[8][8] = {
{ -0x7FFF, -0x7FFF, -0x7FFF, -0x7FFF, -0x7FFF, -0x7FFF, -0x7FFF, 0x7FFF },
{ -0x7FFF, -0x7FFF, -0x7FFF, -0x7FFF, -0x7FFF, -0x7FFF, 0x7FFF, 0x7FFF },
{ -0x7FFF, -0x7FFF, -0x7FFF, -0x7FFF, -0x7FFF, 0x7FFF, 0x7FFF, 0x7FFF },

View File

@@ -22,11 +22,6 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
//zero 9/8/08 - fixed a bug
//SIGNED_UNDERFLOW(a, (!cpu->CPSR.bits.C), tmp)
//was being called. but SIGNED_UNDERFLOW expects values in bit31. replaced with
//SIGNED_UNDERFLOW(a, (cpu->CPSR.bits.C?0:0x80000000), tmp)
#include "cp15.h"
#include "debug.h"
#include "MMU.h"

View File

@@ -32,11 +32,11 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>0.8</string>
<string>0.9</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>0.8</string>
<string>0.9</string>
<key>NSMainNibFile</key>
<string>MainMenu</string>
<key>NSPrincipalClass</key>

View File

@@ -3,6 +3,7 @@ EXTRA_DIST = cocoa_util.m DeSmuME.cbp globals.h main.m main_window.h main_w
makeapp.sh PkgInfo preferences.h screenshot.h screenshot.m \
screen_state.h screen_state.m sndOSX.h sndOSX.mm video_output_view.h video_output_view.m \
DeSmuME.xcodeproj/project.pbxproj Rakefile \
dialogs/rom_info.h dialogs/rom_info.m dialogs/speed_limit_selection_window.h dialogs/speed_limit_selection_window.m \
English.strings English.nib/classes.nib English.nib/info.nib English.nib/keyedobjects.nib \
French.strings French.nib/classes.nib French.nib/info.nib French.nib/keyedobjects.nib \
Japanese.strings Japanese.nib/classes.nib Japanese.nib/info.nib Japanese.nib/keyedobjects.nib

Some files were not shown because too many files have changed in this diff Show More