Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Libretro
melonDS
Commits
383093c5
Commit
383093c5
authored
Mar 06, 2017
by
StapleButter
Browse files
make NEG update flags correctly (oops).
also misc graphics notes added.
parent
52d866fa
Changes
3
Hide whitespace changes
Inline
Side-by-side
ARMInterpreter_ALU.cpp
View file @
383093c5
...
...
@@ -1301,8 +1301,10 @@ void T_NEG_REG(ARM* cpu)
u32
b
=
cpu
->
R
[(
cpu
->
CurInstr
>>
3
)
&
0x7
];
u32
res
=
-
b
;
cpu
->
R
[
cpu
->
CurInstr
&
0x7
]
=
res
;
cpu
->
SetNZ
(
res
&
0x80000000
,
!
res
);
cpu
->
SetNZCV
(
res
&
0x80000000
,
!
res
,
CARRY_SUB
(
0
,
b
),
OVERFLOW_SUB
(
0
,
b
,
res
));
}
void
T_CMP_REG
(
ARM
*
cpu
)
...
...
GPU2D.cpp
View file @
383093c5
...
...
@@ -54,7 +54,8 @@
//
// 3D/2D blending rules
// * if destination selected as 2nd target:
// blending is applied instead of the selected color effect, using full 31bit alpha from 3D layer
// blending is applied instead of the selected color effect, using full 5bit alpha from 3D layer
// (or 6bit alpha? TODO: check it)
// this even if the selected color effect is 'none'.
// apparently this works even if BG0 isn't selected as 1st target
// * if BG0 is selected as 1st target, destination not selected as 2nd target:
...
...
@@ -231,7 +232,7 @@ void GPU2D::Write16(u32 addr, u16 val)
EVB
=
(
val
>>
8
)
&
0x1F
;
if
(
EVB
>
16
)
EVB
=
16
;
return
;
case
0x54
:
case
0x
0
54
:
EVY
=
val
&
0x1F
;
if
(
EVY
>
16
)
EVY
=
16
;
return
;
...
...
GPU3D.cpp
View file @
383093c5
...
...
@@ -44,11 +44,12 @@
// the added bias affects interpolation.
//
// depth buffer:
// Z-buffering mode: val = ((Z * 0x800 * 0x1000) / W) + 0x7FFCFF
// W-buffering mode: val = W - 0x1FF
// TODO: confirm W, because it's weird
// ... nope, that shit above isn't right
// also, the formula for the clear depth on GBAtek appears to be wrong
// Z-buffering mode: val = ((Z * 0x800 * 0x1000) / W) + 0x7FFEFF
// W-buffering mode: val = W
//
// formula for clear depth: (GBAtek is wrong there)
// clearZ = (val * 0x200) + 0x1FF;
// if (clearZ >= 0x010000 && clearZ < 0xFFFFFF) clearZ++;
namespace
GPU3D
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment