diff options
Diffstat (limited to 'src/mame/includes/konamigx.h')
-rw-r--r-- | src/mame/includes/konamigx.h | 118 |
1 files changed, 90 insertions, 28 deletions
diff --git a/src/mame/includes/konamigx.h b/src/mame/includes/konamigx.h index 5921cabbb1f..0a4f1a497cd 100644 --- a/src/mame/includes/konamigx.h +++ b/src/mame/includes/konamigx.h @@ -16,58 +16,59 @@ public: m_maincpu(*this,"maincpu"), m_soundcpu(*this, "soundcpu"), m_dasp(*this, "dasp"), - m_workram(*this,"workram"), - m_psacram(*this,"psacram"), - m_subpaletteram32(*this,"subpaletteram"), m_k055673(*this, "k055673"), m_k055555(*this, "k055555"), m_k056832(*this, "k056832"), m_k054338(*this, "k054338"), + m_k056800(*this, "k056800"), + m_k054539_1(*this,"k054539_1"), + m_k054539_2(*this,"k054539_2"), + m_gfxdecode(*this, "gfxdecode"), + m_screen(*this, "screen"), + m_palette(*this, "palette"), + m_workram(*this,"workram"), + m_psacram(*this,"psacram"), + m_subpaletteram32(*this,"subpaletteram"), m_k053936_0_ctrl(*this,"k053936_0_ctrl",32), m_k053936_0_linectrl(*this,"k053936_0_line",32), m_k053936_0_ctrl_16(*this,"k053936_0_ct16",16), m_k053936_0_linectrl_16(*this,"k053936_0_li16",16), m_konamigx_type3_psac2_bank(*this,"psac2_bank"), - m_k056800(*this, "k056800"), - m_k054539_1(*this,"k054539_1"), - m_k054539_2(*this,"k054539_2"), + m_generic_paletteram_32(*this, "paletteram"), m_an0(*this, "AN0"), m_an1(*this, "AN1"), m_light0_x(*this, "LIGHT0_X"), m_light0_y(*this, "LIGHT0_Y"), m_light1_x(*this, "LIGHT1_X"), m_light1_y(*this, "LIGHT1_Y"), - m_eepromout(*this, "EEPROMOUT"), - m_gfxdecode(*this, "gfxdecode"), - m_screen(*this, "screen"), - m_palette(*this, "palette"), - m_generic_paletteram_32(*this, "paletteram") + m_eepromout(*this, "EEPROMOUT") { } required_device<cpu_device> m_maincpu; optional_device<cpu_device> m_soundcpu; optional_device<tms57002_device> m_dasp; - - optional_shared_ptr<UINT32> m_workram; - optional_shared_ptr<UINT32> m_psacram; - optional_shared_ptr<UINT32> m_subpaletteram32; required_device<k055673_device> m_k055673; required_device<k055555_device> m_k055555; required_device<k056832_device> m_k056832; optional_device<k054338_device> m_k054338; - optional_shared_ptr<UINT16> m_k053936_0_ctrl; - optional_shared_ptr<UINT16> m_k053936_0_linectrl; - optional_shared_ptr<UINT16> m_k053936_0_ctrl_16; - optional_shared_ptr<UINT16> m_k053936_0_linectrl_16; - optional_shared_ptr<UINT32> m_konamigx_type3_psac2_bank; optional_device<k056800_device> m_k056800; optional_device<k054539_device> m_k054539_1; optional_device<k054539_device> m_k054539_2; - optional_ioport m_an0, m_an1, m_light0_x, m_light0_y, m_light1_x, m_light1_y, m_eepromout; required_device<gfxdecode_device> m_gfxdecode; required_device<screen_device> m_screen; required_device<palette_device> m_palette; + + optional_shared_ptr<UINT32> m_workram; + optional_shared_ptr<UINT32> m_psacram; + optional_shared_ptr<UINT32> m_subpaletteram32; + optional_shared_ptr<UINT16> m_k053936_0_ctrl; + optional_shared_ptr<UINT16> m_k053936_0_linectrl; + optional_shared_ptr<UINT16> m_k053936_0_ctrl_16; + optional_shared_ptr<UINT16> m_k053936_0_linectrl_16; + optional_shared_ptr<UINT32> m_konamigx_type3_psac2_bank; optional_shared_ptr<UINT32> m_generic_paletteram_32; + + optional_ioport m_an0, m_an1, m_light0_x, m_light0_y, m_light1_x, m_light1_y, m_eepromout; DECLARE_WRITE32_MEMBER(esc_w); DECLARE_WRITE32_MEMBER(eeprom_w); @@ -166,23 +167,84 @@ public: void fantjour_dma_install(); void konamigx_mixer_primode(int mode); + + typedef void (konamigx_state::*esc_cb)(address_space &space, UINT32 p1, UINT32 p2, UINT32 p3, UINT32 p4); + + void tkmmpzdm_esc(address_space &space, UINT32 p1, UINT32 p2, UINT32 p3, UINT32 p4); + void dragoonj_esc(address_space &space, UINT32 p1, UINT32 p2, UINT32 p3, UINT32 p4); + void sal2_esc(address_space &space, UINT32 p1, UINT32 p2, UINT32 p3, UINT32 p4); + void sexyparo_esc(address_space &space, UINT32 p1, UINT32 p2, UINT32 p3, UINT32 p4); + void tbyahhoo_esc(address_space &space, UINT32 p1, UINT32 p2, UINT32 p3, UINT32 p4); + void daiskiss_esc(address_space &space, UINT32 p1, UINT32 p2, UINT32 p3, UINT32 p4); + + inline int K053247GX_combine_c18(int attrib); + inline int K055555GX_decode_objcolor(int c18); + inline int K055555GX_decode_inpri(int c18); + int K055555GX_decode_vmixcolor(int layer, int *color); UINT8 m_sound_ctrl; UINT8 m_sound_intck; UINT32 m_fantjour_dma[8]; int m_konamigx_current_frame; int m_gx_objdma, m_gx_primode; -}; - + emu_timer *m_dmadelay_timer; + emu_timer *m_boothack_timer; + int m_gx_rdport1_3, m_gx_syncen; + int m_gx_cfgport; + int m_suspension_active, m_resume_trigger; + int m_last_prot_op, m_last_prot_clk; + + UINT8 m_esc_program[4096]; + esc_cb m_esc_cb; + + UINT16 m_prot_data[0x20]; + + // 1st-Tier GX/MW Variables + // frequently used registers + int m_k053247_vrcbk[4]; + int m_k053247_coreg, m_k053247_coregshift, m_k053247_opset; + int m_opri, m_oinprion; + int m_vcblk[6], m_ocblk; + int m_vinmix, m_vmixon, m_osinmix, m_osmixon; + UINT8 m_gx_wrport1_0, m_gx_wrport1_1; + UINT16 m_gx_wrport2; + + // 2nd-Tier GX/MW Graphics Variables + UINT8 *m_gx_objzbuf, *m_gx_shdzbuf; + int m_layer_colorbase[4]; + INT32 m_gx_tilebanks[8], m_gx_oldbanks[8]; + int m_gx_tilemode, m_gx_rozenable, m_psac_colorbase, m_last_psac_colorbase; + int m_gx_specialrozenable; // type 1 roz, with voxel height-map, rendered from 2 source tilemaps (which include height data) to temp bitmap for further processing + int m_gx_rushingheroes_hack; + int m_gx_le2_textcolour_hack; + tilemap_t *m_gx_psac_tilemap, *m_gx_psac_tilemap2; + bitmap_ind16 *m_type3_roz_temp_bitmap; + tilemap_t *m_gx_psac_tilemap_alt; + int m_konamigx_has_dual_screen; + int m_konamigx_palformat; + bitmap_rgb32 *m_dualscreen_left_tempbitmap; + bitmap_rgb32 *m_dualscreen_right_tempbitmap; + + /* On Type-1 the K053936 output is rendered to these temporary bitmaps as raw data + the 'voxel' effect to give the pixels height is a post-process operation on the + output of the K053936 (this can clearly be seen in videos as large chunks of + scenary flicker when in the distance due to single pixels in the K053936 output + becoming visible / invisible due to drawing precision. -/*----------- defined in video/konamigx.c -----------*/ + -- however, progress on this has stalled as our K053936 doesn't seem to give + the right output for post processing, I suspect the game is using some + unsupported flipping modes (probably due to the way it's hooked up to the + rest of the chips) which is causing entirely the wrong output. - -// 1st-Tier GX/MW Variables and Functions -extern UINT8 konamigx_wrport1_0, konamigx_wrport1_1; -extern UINT16 konamigx_wrport2; + -- furthermore video/konamigx.c contains it's own implementation of + the K053936_zoom_draw named K053936GP_zoom_draw ... + */ + bitmap_ind16 *m_gxtype1_roz_dstbitmap; + bitmap_ind16 *m_gxtype1_roz_dstbitmap2; + rectangle m_gxtype1_roz_dstbitmapclip; +}; // Sprite Callbacks |