summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/includes/chihiro.h
diff options
context:
space:
mode:
author yz70s <yz70s@users.noreply.github.com>2015-05-11 23:52:10 +0200
committer yz70s <yz70s@users.noreply.github.com>2015-05-12 00:00:14 +0200
commit9bdeedb52bd39163d4e93832a9f509b3d00e3dd8 (patch)
tree44dae619d630cb3d46c283cb068ee390404aa89b /src/mame/includes/chihiro.h
parent88c04136c83e43d6e441704f7ad1e78dc898738a (diff)
chihiro.c: add 3d method 1808 puls a few misc. changes (nw)
Diffstat (limited to 'src/mame/includes/chihiro.h')
-rw-r--r--src/mame/includes/chihiro.h63
1 files changed, 60 insertions, 3 deletions
diff --git a/src/mame/includes/chihiro.h b/src/mame/includes/chihiro.h
index 73acd6ae920..896b7985f0a 100644
--- a/src/mame/includes/chihiro.h
+++ b/src/mame/includes/chihiro.h
@@ -70,6 +70,32 @@ struct vertex_nv {
*/
class vertex_program_simulator {
public:
+ enum VectorialOperation {
+ VecNOP=0,
+ VecMOV,
+ VecMUL,
+ VecADD,
+ VecMAD,
+ VecDP3,
+ VecDPH,
+ VecDP4,
+ VecDST,
+ VecMIN,
+ VecMAX,
+ VecSLT,
+ VecSGE,
+ VecARL
+ };
+ enum ScalarOperation {
+ ScaNOP=0,
+ ScaIMV,
+ ScaRCP,
+ ScaRCC,
+ ScaRSQ,
+ ScaEXP,
+ ScaLOG,
+ ScaLIT
+ };
vertex_program_simulator();
// input vertex
vertex_nv *input;
@@ -92,7 +118,8 @@ public:
int SwizzleA[4], SignA, ParameterTypeA, TempIndexA;
int SwizzleB[4], SignB, ParameterTypeB, TempIndexB;
int SwizzleC[4], SignC, ParameterTypeC, TempIndexC;
- int VecOperation, ScaOperation;
+ VectorialOperation VecOperation;
+ ScalarOperation ScaOperation;
int OutputWriteMask, MultiplexerControl;
int VecTempWriteMask, ScaTempWriteMask;
int VecTempIndex, OutputIndex;
@@ -190,6 +217,12 @@ public:
limits_rendertarget.set(0, 0, 640, 480);
pitch_rendertarget = 0;
pitch_depthbuffer = 0;
+ height_rendertarget=0;
+ width_rendertarget=0;
+ antialiasing_rendertarget=0;
+ type_rendertarget=nv2a_renderer::LINEAR;
+ depth_rendertarget=nv2a_renderer::NV2A_RT_DEPTH_FORMAT_Z24S8;
+ color_rendertarget=nv2a_renderer::NV2A_COLOR_FORMAT_A8R8G8B8;
rendertarget = NULL;
depthbuffer = NULL;
displayedtarget = NULL;
@@ -247,13 +280,15 @@ public:
int toggle_wait_vblank_support();
void debug_grab_texture(int type, const char *filename);
void debug_grab_vertex_program_slot(int slot, UINT32 *instruction);
- void start();
+ void start(address_space *cpu_space);
void savestate_items();
void read_vertex(address_space & space, offs_t address, vertex_nv &vertex, int attrib);
- int read_vertices_0x1810(address_space & space, vertex_nv *destination, int offset, int limit);
int read_vertices_0x1800(address_space & space, vertex_nv *destination, UINT32 address, int limit);
+ int read_vertices_0x1808(address_space & space, vertex_nv *destination, UINT32 address, int limit);
+ int read_vertices_0x1810(address_space & space, vertex_nv *destination, int offset, int limit);
int read_vertices_0x1818(address_space & space, vertex_nv *destination, UINT32 address, int limit);
void convert_vertices_poly(vertex_nv *source, vertex_t *destination, int count);
+ inline UINT8 *direct_access_ptr(offs_t address);
TIMER_CALLBACK_MEMBER(puller_timer_work);
struct {
@@ -270,9 +305,16 @@ public:
UINT32 ramin[0x100000 / 4];
UINT32 dma_offset[2];
UINT32 dma_size[2];
+ UINT8 *basemempointer;
rectangle limits_rendertarget;
UINT32 pitch_rendertarget;
UINT32 pitch_depthbuffer;
+ int height_rendertarget;
+ int width_rendertarget;
+ int antialiasing_rendertarget;
+ int type_rendertarget;
+ int depth_rendertarget;
+ int color_rendertarget;
UINT32 *rendertarget;
UINT32 *depthbuffer;
UINT32 *displayedtarget;
@@ -595,4 +637,19 @@ public:
INCR_WRAP = 0x8507,
DECR_WRAP = 0x8508
};
+ enum NV2A_RT_TYPE {
+ LINEAR = 1,
+ SWIZZLED = 2
+ };
+ enum NV2A_RT_DEPTH_FORMAT {
+ NV2A_RT_DEPTH_FORMAT_Z16 = 0x0001,
+ NV2A_RT_DEPTH_FORMAT_Z24S8 = 0x0002
+ };
+
+ enum NV2A_COLOR_FORMAT {
+ NV2A_COLOR_FORMAT_R5G6B5 = 0x0003,
+ NV2A_COLOR_FORMAT_X8R8G8B8 = 0x0005,
+ NV2A_COLOR_FORMAT_A8R8G8B8 = 0x0008,
+ NV2A_COLOR_FORMAT_B8 = 0x0009
+ };
};