(WIP) Makaron WIP - 模擬器

By Jake
at 2011-06-12T12:32
at 2011-06-12T12:32
Table of Contents
2011.06.09
So, there is this guy who keeps asking about DX11 renderer progress and
I figured I might as well explain it with some pictures :)
Direct3D 11 is very different to D3D9, and this is the source of my
problems. While I want the functionality it offers, I need to properly
rewrite every part of the code. In fact the change is so big I created
a separate project that is based on NAOMI emulator code but all it does
is render one frame of previously captured data. Makes my life so much
easier.
D3D11 is a functional extension to version 10 interface except you work
on context rather than the device itself, which is only used for
creating new resources. This lets you create command lists for things
like deferred rendering, though I stil use immediate mode. Unlike in
10, the reference counters are incremented by various Get* methods and
this is more like it was in D3D9, so the behaviour was clearly reverted.
And for the better I suppose - makes much more sense this way.
The main problem is the grouping of various settings that I need to
change individually, this was much easier on D3D9. While the new
approach certainly speeds up things for games, I cannot make any
assumptions about the 3D data I'm processing and I can't sort it
nicely either, so I have to prepare many object with all possible
settings well in advance and select the right one when the time comes.
Doesn't seem that complicated, eh? Well, it's actually is much more
bothersome than it sounds.
Anyway, I decided to start with the basics and then, once it all more
or less works, try to add the layer peeling system for per-pixel depth
sorting. There will be another major obstacle on the way, namely the
fact that I can have different blending operations mixed in together.
So I will need to store the blending instruction data along with the
pixels and have pixel shader combine the fragments properly. Which is
not going to be easy or super fast :) Still, no point in worrying about
that now. It's either that or full software rendering if you want proper
PVR2 emulation.
Here are some sample screenshots I took along the way, so that you could
see there is progress. Note that I already ported and tested the text
display class - though with just one frame being rendered the log is
much better target for debug output.
http://pics.livejournal.com/dknute/pic/000x7pyx/s320x240
http://pics.livejournal.com/dknute/pic/000x85yh/s320x240
http://pics.livejournal.com/dknute/pic/000x9wsk/s320x240
http://pics.livejournal.com/dknute/pic/000xae0f/s320x240
These two are different becase I had to change the capture data format
a few times:
http://pics.livejournal.com/dknute/pic/000xbhph/s320x240
http://pics.livejournal.com/dknute/pic/000xch31/s320x240
Anyone wants to guess what game is this? Should be pretty easy by now :)
EDIT: We have a winner! It's Zero Gunner 2.
http://pics.livejournal.com/dknute/pic/000xd9px/s320x240
______________________________________________________________________________
來源:http://dknute.livejournal.com/39098.html
--
So, there is this guy who keeps asking about DX11 renderer progress and
I figured I might as well explain it with some pictures :)
Direct3D 11 is very different to D3D9, and this is the source of my
problems. While I want the functionality it offers, I need to properly
rewrite every part of the code. In fact the change is so big I created
a separate project that is based on NAOMI emulator code but all it does
is render one frame of previously captured data. Makes my life so much
easier.
D3D11 is a functional extension to version 10 interface except you work
on context rather than the device itself, which is only used for
creating new resources. This lets you create command lists for things
like deferred rendering, though I stil use immediate mode. Unlike in
10, the reference counters are incremented by various Get* methods and
this is more like it was in D3D9, so the behaviour was clearly reverted.
And for the better I suppose - makes much more sense this way.
The main problem is the grouping of various settings that I need to
change individually, this was much easier on D3D9. While the new
approach certainly speeds up things for games, I cannot make any
assumptions about the 3D data I'm processing and I can't sort it
nicely either, so I have to prepare many object with all possible
settings well in advance and select the right one when the time comes.
Doesn't seem that complicated, eh? Well, it's actually is much more
bothersome than it sounds.
Anyway, I decided to start with the basics and then, once it all more
or less works, try to add the layer peeling system for per-pixel depth
sorting. There will be another major obstacle on the way, namely the
fact that I can have different blending operations mixed in together.
So I will need to store the blending instruction data along with the
pixels and have pixel shader combine the fragments properly. Which is
not going to be easy or super fast :) Still, no point in worrying about
that now. It's either that or full software rendering if you want proper
PVR2 emulation.
Here are some sample screenshots I took along the way, so that you could
see there is progress. Note that I already ported and tested the text
display class - though with just one frame being rendered the log is
much better target for debug output.
http://pics.livejournal.com/dknute/pic/000x7pyx/s320x240
http://pics.livejournal.com/dknute/pic/000x85yh/s320x240
http://pics.livejournal.com/dknute/pic/000x9wsk/s320x240
http://pics.livejournal.com/dknute/pic/000xae0f/s320x240
These two are different becase I had to change the capture data format
a few times:
http://pics.livejournal.com/dknute/pic/000xbhph/s320x240
http://pics.livejournal.com/dknute/pic/000xch31/s320x240
Anyone wants to guess what game is this? Should be pretty easy by now :)
EDIT: We have a winner! It's Zero Gunner 2.
http://pics.livejournal.com/dknute/pic/000xd9px/s320x240
______________________________________________________________________________
來源:http://dknute.livejournal.com/39098.html
--
Tags:
模擬器
All Comments
Related Posts
任天堂紅白機遊戲-Tetris (BPS版俄羅斯 …

By Hazel
at 2011-06-12T11:35
at 2011-06-12T11:35
一個NES遊戲

By Edith
at 2011-06-12T00:16
at 2011-06-12T00:16
ゲームセンターCX 有野の挑戦 第15季 第5回

By Rae
at 2011-06-12T00:01
at 2011-06-12T00:01
SSF Test Version (2011/06/10)

By Elvira
at 2011-06-11T21:53
at 2011-06-11T21:53
MaLa v1.744 Beta

By Vanessa
at 2011-06-11T21:50
at 2011-06-11T21:50