mirror of
https://github.com/holub/mame
synced 2025-07-05 09:57:47 +03:00
dynax/dynax.cpp: Started splitting up the state class according to hardware features.
This commit is contained in:
parent
0b93402dcf
commit
8667e13e42
@ -177,6 +177,7 @@ public:
|
||||
ddenlovr_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||
: dynax_state(mconfig, type, tag)
|
||||
, m_blitter_irq_handler(*this)
|
||||
, m_oki(*this, "oki")
|
||||
, m_protection1(*this, "protection1")
|
||||
, m_protection2(*this, "protection2")
|
||||
{ }
|
||||
@ -409,6 +410,7 @@ private:
|
||||
|
||||
protected:
|
||||
devcb_write_line m_blitter_irq_handler;
|
||||
optional_device<okim6295_device> m_oki;
|
||||
|
||||
private:
|
||||
optional_shared_ptr<uint16_t> m_protection1;
|
||||
@ -416,7 +418,11 @@ private:
|
||||
protected:
|
||||
std::unique_ptr<uint8_t[]> m_ddenlovr_pixmap[8];
|
||||
|
||||
/* blitter (TODO: merge with the dynax.h, where possible) */
|
||||
// input/output
|
||||
uint8_t m_coins = 0U;
|
||||
uint8_t m_hopper = 0U;
|
||||
|
||||
// blitter (TODO: merge with the dynax.h, where possible)
|
||||
int m_extra_layers;
|
||||
int m_ddenlovr_dest_layer;
|
||||
int m_ddenlovr_blit_flip;
|
||||
@ -453,7 +459,7 @@ protected:
|
||||
int m_ddenlovr_blit_regs[2];
|
||||
|
||||
private:
|
||||
/* ddenlovr misc (TODO: merge with dynax.h, where possible) */
|
||||
// ddenlovr misc (TODO: merge with dynax.h, where possible)
|
||||
uint8_t m_palram[0x200];
|
||||
int m_okibank;
|
||||
protected:
|
||||
@ -471,9 +477,15 @@ class htengoku_state : public ddenlovr_state
|
||||
public:
|
||||
htengoku_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||
: ddenlovr_state(mconfig, type, tag)
|
||||
, m_highview(*this, "highmem")
|
||||
, m_rombank(*this, "bank1")
|
||||
, m_dsw(*this, "DSW%u", 0U)
|
||||
{ }
|
||||
|
||||
void htengoku(machine_config &config);
|
||||
void htengoku(machine_config &config) ATTR_COLD;
|
||||
|
||||
protected:
|
||||
virtual void machine_start() override ATTR_COLD;
|
||||
|
||||
private:
|
||||
uint32_t screen_update_htengoku(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
|
||||
@ -488,10 +500,12 @@ private:
|
||||
void htengoku_dsw_w(uint8_t data);
|
||||
uint8_t htengoku_dsw_r();
|
||||
|
||||
void htengoku_io_map(address_map &map);
|
||||
void htengoku_mem_map(address_map &map);
|
||||
void htengoku_banked_map(address_map &map);
|
||||
void htengoku_io_map(address_map &map) ATTR_COLD;
|
||||
void htengoku_mem_map(address_map &map) ATTR_COLD;
|
||||
|
||||
memory_view m_highview;
|
||||
required_memory_bank m_rombank;
|
||||
required_ioport_array<5> m_dsw;
|
||||
bitmap_ind16 m_htengoku_layer;
|
||||
};
|
||||
|
||||
@ -500,6 +514,7 @@ class mmpanic_state : public ddenlovr_state
|
||||
public:
|
||||
mmpanic_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||
: ddenlovr_state(mconfig, type, tag)
|
||||
, m_soundcpu(*this, "soundcpu")
|
||||
, m_soundlatch(*this, "soundlatch")
|
||||
, m_leds(*this, "led%u", 0U)
|
||||
{ }
|
||||
@ -544,10 +559,11 @@ private:
|
||||
void mmpanic_sound_map(address_map &map);
|
||||
void mmpanic_sound_portmap(address_map &map);
|
||||
|
||||
required_device<cpu_device> m_soundcpu;
|
||||
required_device<generic_latch_8_device> m_soundlatch;
|
||||
output_finder<2> m_leds;
|
||||
|
||||
uint16_t m_mmpanic_leds = 0; /* A led for each of the 9 buttons */
|
||||
uint16_t m_mmpanic_leds = 0; // A led for each of the 9 buttons
|
||||
uint8_t m_funkyfig_lockout = 0;
|
||||
};
|
||||
|
||||
@ -4269,6 +4285,15 @@ void ddenlovr_state::seljan2_portmap(address_map &map)
|
||||
***************************************************************************/
|
||||
// htengoku uses the mixer chip from ddenlovr
|
||||
|
||||
void htengoku_state::machine_start()
|
||||
{
|
||||
ddenlovr_state::machine_start();
|
||||
|
||||
m_rombank->configure_entries(0, 8, memregion("maincpu")->base(), 0x8000);
|
||||
m_rombank->set_entry(0);
|
||||
m_highview.select(0);
|
||||
}
|
||||
|
||||
VIDEO_START_MEMBER(htengoku_state,htengoku)
|
||||
{
|
||||
VIDEO_START_CALL_MEMBER(ddenlovr);
|
||||
@ -4307,14 +4332,13 @@ void htengoku_state::htengoku_dsw_w(uint8_t data)
|
||||
|
||||
uint8_t htengoku_state::htengoku_dsw_r()
|
||||
{
|
||||
if (!BIT(m_dsw_sel, 0)) return ioport("DSW0")->read();
|
||||
if (!BIT(m_dsw_sel, 1)) return ioport("DSW1")->read();
|
||||
if (!BIT(m_dsw_sel, 2)) return ioport("DSW2")->read();
|
||||
if (!BIT(m_dsw_sel, 3)) return ioport("DSW3")->read();
|
||||
if (!BIT(m_dsw_sel, 4)) return ioport("DSW4")->read();
|
||||
logerror("%s: warning, unknown bits read, dsw_sel = %02x\n", machine().describe_context(), m_dsw_sel);
|
||||
|
||||
return 0xff;
|
||||
uint8_t result = 0xff;
|
||||
if (!BIT(m_dsw_sel, 0)) result &= m_dsw[0]->read();
|
||||
if (!BIT(m_dsw_sel, 1)) result &= m_dsw[1]->read();
|
||||
if (!BIT(m_dsw_sel, 2)) result &= m_dsw[2]->read();
|
||||
if (!BIT(m_dsw_sel, 3)) result &= m_dsw[3]->read();
|
||||
if (!BIT(m_dsw_sel, 4)) result &= m_dsw[4]->read();
|
||||
return result;
|
||||
}
|
||||
|
||||
void htengoku_state::htengoku_coin_w(uint8_t data)
|
||||
@ -4371,7 +4395,8 @@ uint8_t htengoku_state::htengoku_coin_r()
|
||||
|
||||
void htengoku_state::htengoku_rombank_w(uint8_t data)
|
||||
{
|
||||
m_bankdev->set_bank(data & 0x1f);
|
||||
m_highview.select(BIT(data, 4));
|
||||
m_rombank->set_entry(BIT(data, 0, 3));
|
||||
}
|
||||
|
||||
void htengoku_state::htengoku_blit_romregion_w(uint8_t data)
|
||||
@ -4423,16 +4448,12 @@ void htengoku_state::htengoku_io_map(address_map &map)
|
||||
|
||||
void htengoku_state::htengoku_mem_map(address_map &map)
|
||||
{
|
||||
map(0x0000, 0x5fff).rom();
|
||||
map(0x0000, 0x5fff).rom().region("maincpu", 0);
|
||||
map(0x6000, 0x6fff).ram().share("nvram");
|
||||
map(0x7000, 0x7fff).ram();
|
||||
map(0x8000, 0xffff).m(m_bankdev, FUNC(address_map_bank_device::amap8));
|
||||
}
|
||||
|
||||
void htengoku_state::htengoku_banked_map(address_map &map)
|
||||
{
|
||||
map(0x00000, 0x3ffff).rom().region("maincpu", 0x10000);
|
||||
map(0x80000, 0x801ff).w(FUNC(htengoku_state::tenkai_palette_w));
|
||||
map(0x8000, 0xffff).view(m_highview);
|
||||
m_highview[0](0x8000, 0xffff).bankr(m_rombank);
|
||||
m_highview[1](0x0000, 0x01ff).w(FUNC(htengoku_state::tenkai_palette_w));
|
||||
}
|
||||
|
||||
void htengoku_state::htengoku(machine_config &config)
|
||||
@ -4443,15 +4464,6 @@ void htengoku_state::htengoku(machine_config &config)
|
||||
m_maincpu->set_addrmap(AS_IO, &htengoku_state::htengoku_io_map);
|
||||
m_maincpu->set_irq_acknowledge_callback("mainirq", FUNC(rst_pos_buffer_device::inta_cb)); // IM 0 needs an opcode on the data bus
|
||||
|
||||
ADDRESS_MAP_BANK(config, m_bankdev, 0);
|
||||
m_bankdev->set_addrmap(0, &htengoku_state::htengoku_banked_map);
|
||||
m_bankdev->set_data_width(8);
|
||||
m_bankdev->set_addr_width(20);
|
||||
m_bankdev->set_stride(0x8000);
|
||||
|
||||
MCFG_MACHINE_START_OVERRIDE(htengoku_state,dynax)
|
||||
MCFG_MACHINE_RESET_OVERRIDE(htengoku_state,dynax)
|
||||
|
||||
NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0);
|
||||
|
||||
RST_POS_BUFFER(config, "mainirq", 0).int_callback().set_inputline(m_maincpu, 0);
|
||||
@ -13106,9 +13118,8 @@ DSWs - 4x 10-position, 1x 4-position
|
||||
***************************************************************************/
|
||||
|
||||
ROM_START( htengoku )
|
||||
ROM_REGION( 0x50000, "maincpu", 0 ) // Z80 Code
|
||||
ROM_REGION( 0x40000, "maincpu", 0 ) // Z80 Code
|
||||
ROM_LOAD( "6501.4b", 0x00000, 0x40000, CRC(29a7fc83) SHA1(5d3cf0a72918e58b5b60f7c978e559c7c1306bce) )
|
||||
ROM_RELOAD( 0x10000, 0x40000 )
|
||||
|
||||
ROM_REGION( 0x300000, "blitter", 0 ) // blitter data
|
||||
ROM_LOAD( "6506.4c", 0x000000, 0x80000, CRC(7de17b26) SHA1(326667063ab045ac50e850f2f7821a65317879ad) )
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -10,69 +10,43 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "dynax_blitter_rev2.h"
|
||||
|
||||
#include "machine/bankdev.h"
|
||||
#include "machine/gen_latch.h"
|
||||
#include "machine/rstbuf.h"
|
||||
#include "sound/msm5205.h"
|
||||
#include "sound/okim6295.h"
|
||||
#include "machine/74259.h"
|
||||
#include "dynax_blitter_rev2.h"
|
||||
|
||||
#include "emupal.h"
|
||||
#include "screen.h"
|
||||
|
||||
|
||||
class dynax_state : public driver_device
|
||||
{
|
||||
public:
|
||||
dynax_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||
: driver_device(mconfig, type, tag)
|
||||
, m_maincpu(*this, "maincpu")
|
||||
, m_soundcpu(*this, "soundcpu")
|
||||
, m_oki(*this, "oki")
|
||||
, m_screen(*this, "screen")
|
||||
, m_palette(*this, "palette")
|
||||
, m_mainlatch(*this, "mainlatch")
|
||||
, m_bankdev(*this, "bankdev")
|
||||
, m_blitter(*this, "blitter")
|
||||
, m_msm(*this, "msm")
|
||||
, m_bankdev(*this, "bankdev")
|
||||
, m_mainirq(*this, "mainirq")
|
||||
, m_soundirq(*this, "soundirq")
|
||||
, m_soundlatch(*this, "soundlatch")
|
||||
, m_blitter2(*this, "blitter2")
|
||||
, m_blitter_gfx(*this, "blitter")
|
||||
, m_led(*this, "led0")
|
||||
{
|
||||
}
|
||||
|
||||
void mjfriday(machine_config &config);
|
||||
void yarunara(machine_config &config);
|
||||
void janyuki(machine_config &config);
|
||||
void hnoridur(machine_config &config);
|
||||
void gekisha(machine_config &config);
|
||||
void majrjhdx(machine_config &config);
|
||||
void mcnpshnt(machine_config &config);
|
||||
void nanajign(machine_config &config);
|
||||
void cdracula(machine_config &config);
|
||||
void tenkai(machine_config &config);
|
||||
void ougonhai(machine_config &config);
|
||||
void hjingi(machine_config &config);
|
||||
void mjreach(machine_config &config);
|
||||
void neruton(machine_config &config);
|
||||
void mjdialq2(machine_config &config);
|
||||
void jantouki(machine_config &config);
|
||||
void quiztvqq(machine_config &config);
|
||||
void mjelctrn(machine_config &config);
|
||||
void mjembase(machine_config &config);
|
||||
void mjangels(machine_config &config);
|
||||
void hanamai(machine_config &config);
|
||||
void sprtmtch(machine_config &config);
|
||||
|
||||
void init_mjelct3();
|
||||
void init_blktouch();
|
||||
void init_mjelct3a();
|
||||
void init_maya_common();
|
||||
void init_mayac();
|
||||
void init_maya();
|
||||
|
||||
DECLARE_WRITE_LINE_MEMBER(blitter_ack_w);
|
||||
DECLARE_WRITE_LINE_MEMBER(sprtmtch_blitter_irq_w);
|
||||
DECLARE_WRITE_LINE_MEMBER(sprtmtch_vblank_w);
|
||||
@ -86,12 +60,9 @@ public:
|
||||
|
||||
protected:
|
||||
required_device<cpu_device> m_maincpu;
|
||||
optional_device<cpu_device> m_soundcpu;
|
||||
optional_device<okim6295_device> m_oki;
|
||||
optional_device<screen_device> m_screen;
|
||||
required_device<palette_device> m_palette;
|
||||
optional_device<ls259_device> m_mainlatch;
|
||||
optional_device<address_map_bank_device> m_bankdev;
|
||||
optional_device<dynax_blitter_rev2_device> m_blitter;
|
||||
|
||||
/* input / output */
|
||||
@ -99,10 +70,6 @@ protected:
|
||||
uint8_t m_input_mode = 0U;
|
||||
uint8_t m_dsw_sel = 0U;
|
||||
uint8_t m_keyb = 0U;
|
||||
uint8_t m_coins = 0U;
|
||||
uint8_t m_hopper = 0U;
|
||||
|
||||
DECLARE_VIDEO_START(hnoridur);
|
||||
|
||||
void dynax_vblank_ack_w(uint8_t data);
|
||||
void dynax_blit_dest_w(uint8_t data);
|
||||
@ -112,18 +79,13 @@ protected:
|
||||
|
||||
void tenkai_palette_w(offs_t offset, uint8_t data);
|
||||
|
||||
void hanamai_copylayer(bitmap_ind16 &bitmap, const rectangle &cliprect, int i );
|
||||
void hanamai_copylayer(bitmap_ind16 &bitmap, const rectangle &cliprect, int i);
|
||||
|
||||
DECLARE_MACHINE_START(dynax);
|
||||
DECLARE_MACHINE_RESET(dynax);
|
||||
virtual void machine_start() override ATTR_COLD;
|
||||
virtual void machine_reset() override ATTR_COLD;
|
||||
|
||||
private:
|
||||
void jantouki_vblank_ack_w(uint8_t data);
|
||||
DECLARE_WRITE_LINE_MEMBER(jantouki_blitter_ack_w);
|
||||
DECLARE_WRITE_LINE_MEMBER(jantouki_blitter_irq_w);
|
||||
DECLARE_WRITE_LINE_MEMBER(jantouki_blitter2_ack_w);
|
||||
DECLARE_WRITE_LINE_MEMBER(jantouki_blitter2_irq_w);
|
||||
void jantouki_sound_vblank_ack_w(uint8_t data);
|
||||
// Nothing below here is used by ddenlovr.cpp
|
||||
// TODO: further decouple dynax.cpp and ddenlovr.cpp
|
||||
DECLARE_WRITE_LINE_MEMBER(coincounter_0_w);
|
||||
DECLARE_WRITE_LINE_MEMBER(coincounter_1_w);
|
||||
uint8_t ret_ff();
|
||||
@ -131,33 +93,62 @@ private:
|
||||
uint8_t hanamai_keyboard_1_r();
|
||||
void hanamai_keyboard_w(uint8_t data);
|
||||
void dynax_rombank_w(uint8_t data);
|
||||
void jantouki_sound_rombank_w(uint8_t data);
|
||||
void cdracula_sound_rombank_w(uint8_t data);
|
||||
void hnoridur_rombank_w(uint8_t data);
|
||||
void hnoridur_palbank_w(uint8_t data);
|
||||
void hnoridur_palette_lo_w(offs_t offset, uint8_t data);
|
||||
void hnoridur_palette_hi_w(offs_t offset, uint8_t data);
|
||||
void hnoridur_palette_update(offs_t offset);
|
||||
void nanajign_palette_lo_w(offs_t offset, uint8_t data);
|
||||
void nanajign_palette_hi_w(offs_t offset, uint8_t data);
|
||||
void nanajign_palette_update(offs_t offset);
|
||||
void adpcm_data_w(uint8_t data);
|
||||
DECLARE_WRITE_LINE_MEMBER(hjingi_lockout_w);
|
||||
DECLARE_WRITE_LINE_MEMBER(hjingi_hopper_w);
|
||||
uint8_t hjingi_hopper_bit();
|
||||
uint8_t hjingi_keyboard_0_r();
|
||||
uint8_t hjingi_keyboard_1_r();
|
||||
void yarunara_input_w(offs_t offset, uint8_t data);
|
||||
uint8_t yarunara_input_r(offs_t offset);
|
||||
void yarunara_rombank_w(uint8_t data);
|
||||
void yarunara_blit_romregion_w(uint8_t data);
|
||||
uint8_t jantouki_soundlatch_ack_r();
|
||||
void jantouki_soundlatch_w(uint8_t data);
|
||||
uint8_t jantouki_blitter_busy_r();
|
||||
void jantouki_rombank_w(uint8_t data);
|
||||
uint8_t jantouki_soundlatch_status_r();
|
||||
uint8_t mjelctrn_keyboard_1_r();
|
||||
uint8_t mjelctrn_dsw_r();
|
||||
void dynax_blit_palette23_w(uint8_t data);
|
||||
DECLARE_WRITE_LINE_MEMBER(blit_palbank_w);
|
||||
void dynax_blit_backpen_w(uint8_t data);
|
||||
void dynax_blit_palette01_w(uint8_t data);
|
||||
void dynax_layer_enable_w(uint8_t data);
|
||||
|
||||
uint32_t screen_update_hanamai(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
uint32_t screen_update_hnoridur(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
|
||||
void sprtmtch_palette(palette_device &palette) const;
|
||||
DECLARE_VIDEO_START(hanamai);
|
||||
DECLARE_VIDEO_START(hnoridur);
|
||||
DECLARE_VIDEO_START(mjelctrn);
|
||||
|
||||
int debug_mask();
|
||||
int debug_viewer(bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
void dynax_common_reset();
|
||||
|
||||
void sprtmtch_mem_map(address_map &map) ATTR_COLD;
|
||||
|
||||
// devices
|
||||
optional_device<address_map_bank_device> m_bankdev;
|
||||
optional_device<rst_pos_buffer_device> m_mainirq;
|
||||
|
||||
// up to 8 layers, 2 images per layer (interleaved on screen)
|
||||
std::unique_ptr<uint8_t[]> m_pixmap[8][2]{};
|
||||
|
||||
/* irq */
|
||||
bool m_blitter_irq_mask = false;
|
||||
|
||||
/* blitters */
|
||||
int m_blit_scroll_x = 0;
|
||||
int m_blit_scroll_y = 0;
|
||||
int m_blit_dest = 0;
|
||||
int m_blit_palbank = 0;
|
||||
int m_blit_palettes = 0;
|
||||
int m_layer_enable = 0;
|
||||
int m_blit_backpen = 0;
|
||||
|
||||
int m_hanamai_layer_half = 0;
|
||||
int m_hnoridur_layer_half2 = 0;
|
||||
|
||||
int m_extra_scroll_x = 0;
|
||||
int m_extra_scroll_y = 0;
|
||||
int m_flipscreen = 0;
|
||||
|
||||
int m_layer_layout = 0;
|
||||
|
||||
const int *m_priority_table = nullptr;
|
||||
int m_hanamai_priority = 0;
|
||||
|
||||
/* misc */
|
||||
uint8_t m_palette_ram[16*256*2]{};
|
||||
int m_palbank = 0;
|
||||
|
||||
private:
|
||||
void tenkai_ipsel_w(offs_t offset, uint8_t data);
|
||||
void tenkai_ip_w(uint8_t data);
|
||||
uint8_t tenkai_ip_r(offs_t offset);
|
||||
@ -178,177 +169,292 @@ private:
|
||||
uint8_t gekisha_keyboard_1_r();
|
||||
void gekisha_hopper_w(offs_t offset, uint8_t data);
|
||||
void gekisha_p4_w(uint8_t data);
|
||||
//void dynax_blit_pen_w(uint8_t data);
|
||||
void dynax_blit2_dest_w(uint8_t data);
|
||||
void tenkai_blit_dest_w(uint8_t data);
|
||||
void mjembase_blit_dest_w(uint8_t data);
|
||||
void dynax_blit_backpen_w(uint8_t data);
|
||||
void dynax_blit_palette01_w(uint8_t data);
|
||||
void tenkai_blit_palette01_w(uint8_t data);
|
||||
void dynax_blit_palette45_w(uint8_t data);
|
||||
void dynax_blit_palette23_w(uint8_t data);
|
||||
void tenkai_blit_palette23_w(uint8_t data);
|
||||
void mjembase_blit_palette23_w(uint8_t data);
|
||||
void dynax_blit_palette67_w(uint8_t data);
|
||||
DECLARE_WRITE_LINE_MEMBER(blit_palbank_w);
|
||||
DECLARE_WRITE_LINE_MEMBER(blit2_palbank_w);
|
||||
DECLARE_WRITE_LINE_MEMBER(mjdialq2_blit_dest0_w);
|
||||
DECLARE_WRITE_LINE_MEMBER(mjdialq2_blit_dest1_w);
|
||||
void dynax_layer_enable_w(uint8_t data);
|
||||
void jantouki_layer_enable_w(offs_t offset, uint8_t data);
|
||||
DECLARE_WRITE_LINE_MEMBER(mjdialq2_layer0_enable_w);
|
||||
DECLARE_WRITE_LINE_MEMBER(mjdialq2_layer1_enable_w);
|
||||
void dynax_blit2_romregion_w(uint8_t data);
|
||||
void hanamai_blit_pixel_w(offs_t offset, uint8_t data);
|
||||
void cdracula_blit_pixel_w(offs_t offset, uint8_t data);
|
||||
void drgpunch_blit_pixel_w(offs_t offset, uint8_t data);
|
||||
void jantouki_blit_pixel_w(offs_t offset, uint8_t data);
|
||||
void jantouki_blit2_pixel_w(offs_t offset, uint8_t data);
|
||||
void mjdialq2_blit_pixel_w(offs_t offset, uint8_t data);
|
||||
void dynax_blit2_scrollx_w(uint8_t data);
|
||||
void dynax_blit2_scrolly_w(uint8_t data);
|
||||
void tenkai_blit_scrollx_w(uint8_t data);
|
||||
void tenkai_blit_scrolly_w(uint8_t data);
|
||||
void hanamai_priority_w(uint8_t data);
|
||||
void tenkai_priority_w(uint8_t data);
|
||||
void mjembase_priority_w(uint8_t data);
|
||||
|
||||
uint32_t screen_update_hanamai(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
uint32_t screen_update_hnoridur(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
uint32_t screen_update_sprtmtch(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
uint32_t screen_update_mjdialq2(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
uint32_t screen_update_jantouki_top(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
uint32_t screen_update_jantouki_bottom(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
uint32_t screen_update_cdracula(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
|
||||
DECLARE_WRITE_LINE_MEMBER(jantouki_vblank_w);
|
||||
DECLARE_WRITE_LINE_MEMBER(mjfriday_vblank_w);
|
||||
|
||||
void tenkai_update_rombank();
|
||||
|
||||
DECLARE_WRITE_LINE_MEMBER(adpcm_int);
|
||||
DECLARE_WRITE_LINE_MEMBER(adpcm_int_cpu1);
|
||||
|
||||
DECLARE_MACHINE_RESET(adpcm);
|
||||
void adpcm_reset_w(uint8_t data);
|
||||
DECLARE_WRITE_LINE_MEMBER(adpcm_reset_kludge_w);
|
||||
void tenkai_dswsel_w(uint8_t data);
|
||||
uint8_t tenkai_dsw_r();
|
||||
DECLARE_WRITE_LINE_MEMBER(tenkai_blitter_irq_w);
|
||||
DECLARE_WRITE_LINE_MEMBER(tenkai_blitter_ack_w);
|
||||
DECLARE_MACHINE_START(hanamai);
|
||||
DECLARE_MACHINE_START(hjingi);
|
||||
DECLARE_VIDEO_START(hanamai);
|
||||
void sprtmtch_palette(palette_device &palette) const;
|
||||
DECLARE_MACHINE_START(sprtmtch);
|
||||
DECLARE_VIDEO_START(sprtmtch);
|
||||
DECLARE_MACHINE_START(jantouki);
|
||||
DECLARE_VIDEO_START(jantouki);
|
||||
DECLARE_VIDEO_START(mjelctrn);
|
||||
DECLARE_VIDEO_START(mjembase);
|
||||
DECLARE_VIDEO_START(mjdialq2);
|
||||
DECLARE_VIDEO_START(mcnpshnt);
|
||||
void janyuki_palette(palette_device &palette) const;
|
||||
DECLARE_VIDEO_START(neruton);
|
||||
|
||||
//int blitter_drawgfx( int layer, int mask, memory_region *gfx, int src, int pen, int x, int y, int wrap, int flags );
|
||||
void jantouki_copylayer( bitmap_ind16 &bitmap, const rectangle &cliprect, int i, int y );
|
||||
void mjdialq2_copylayer( bitmap_ind16 &bitmap, const rectangle &cliprect, int i );
|
||||
int debug_mask();
|
||||
int debug_viewer( bitmap_ind16 &bitmap, const rectangle &cliprect );
|
||||
void dynax_common_reset();
|
||||
void tenkai_show_6c();
|
||||
void cdracula_io_map(address_map &map);
|
||||
void cdracula_mem_map(address_map &map);
|
||||
void gekisha_banked_map(address_map &map);
|
||||
void gekisha_map(address_map &map);
|
||||
void hanamai_io_map(address_map &map);
|
||||
void hjingi_banked_map(address_map &map);
|
||||
void hjingi_io_map(address_map &map);
|
||||
void hjingi_mem_map(address_map &map);
|
||||
void hnoridur_banked_map(address_map &map);
|
||||
void hnoridur_io_map(address_map &map);
|
||||
void hnoridur_mem_map(address_map &map);
|
||||
void jantouki_io_map(address_map &map);
|
||||
void jantouki_mem_map(address_map &map);
|
||||
void jantouki_sound_io_map(address_map &map);
|
||||
void jantouki_sound_mem_map(address_map &map);
|
||||
void mcnpshnt_io_map(address_map &map);
|
||||
void mcnpshnt_mem_map(address_map &map);
|
||||
void mjangels_banked_map(address_map &map);
|
||||
void mjdialq2_mem_map(address_map &map);
|
||||
void mjelctrn_banked_map(address_map &map);
|
||||
void mjelctrn_io_map(address_map &map);
|
||||
void mjembase_io_map(address_map &map);
|
||||
void mjfriday_io_map(address_map &map);
|
||||
void nanajign_banked_map(address_map &map);
|
||||
void nanajign_io_map(address_map &map);
|
||||
void nanajign_mem_map(address_map &map);
|
||||
void quiztvqq_mem_map(address_map &map);
|
||||
void sprtmtch_io_map(address_map &map);
|
||||
void sprtmtch_mem_map(address_map &map);
|
||||
void tenkai_banked_map(address_map &map);
|
||||
void tenkai_map(address_map &map);
|
||||
void yarunara_banked_map(address_map &map);
|
||||
void yarunara_io_map(address_map &map);
|
||||
void yarunara_mem_map(address_map &map);
|
||||
|
||||
/* devices */
|
||||
optional_device<msm5205_device> m_msm;
|
||||
optional_device<rst_pos_buffer_device> m_mainirq;
|
||||
optional_device<rst_pos_buffer_device> m_soundirq;
|
||||
optional_device<generic_latch_8_device> m_soundlatch;
|
||||
optional_device<dynax_blitter_rev2_device> m_blitter2;
|
||||
optional_region_ptr<uint8_t> m_blitter_gfx;
|
||||
output_finder<> m_led;
|
||||
void mjdialq2_mem_map(address_map &map) ATTR_COLD;
|
||||
|
||||
// up to 8 layers, 2 images per layer (interleaved on screen)
|
||||
std::unique_ptr<uint8_t[]> m_pixmap[8][2]{};
|
||||
void sprtmtch_io_map(address_map &map) ATTR_COLD;
|
||||
void mjfriday_io_map(address_map &map) ATTR_COLD;
|
||||
|
||||
/* irq */
|
||||
bool m_blitter_irq_mask = false;
|
||||
bool m_blitter2_irq_mask = false;
|
||||
void tenkai_map(address_map &map) ATTR_COLD;
|
||||
void tenkai_banked_map(address_map &map) ATTR_COLD;
|
||||
|
||||
/* blitters */
|
||||
int m_blit_scroll_x = 0;
|
||||
int m_blit2_scroll_x = 0;
|
||||
int m_blit_scroll_y = 0;
|
||||
int m_blit2_scroll_y = 0;
|
||||
int m_blit_dest = 0;
|
||||
int m_blit2_dest = 0;
|
||||
int m_blit_palbank = 0;
|
||||
int m_blit2_palbank = 0;
|
||||
int m_blit_palettes = 0;
|
||||
int m_blit2_palettes = 0;
|
||||
int m_layer_enable = 0;
|
||||
int m_blit_backpen = 0;
|
||||
void gekisha_map(address_map &map) ATTR_COLD;
|
||||
void gekisha_banked_map(address_map &map) ATTR_COLD;
|
||||
|
||||
int m_hanamai_layer_half = 0;
|
||||
int m_hnoridur_layer_half2 = 0;
|
||||
|
||||
int m_extra_scroll_x = 0;
|
||||
int m_extra_scroll_y = 0;
|
||||
int m_flipscreen = 0;
|
||||
|
||||
int m_layer_layout = 0;
|
||||
|
||||
const int *m_priority_table = nullptr;
|
||||
int m_hanamai_priority = 0;
|
||||
|
||||
/* misc */
|
||||
uint8_t m_palette_ram[16*256*2]{};
|
||||
int m_palbank = 0;
|
||||
int m_msm5205next = 0;
|
||||
int m_resetkludge = 0;
|
||||
int m_toggle = 0;
|
||||
int m_toggle_cpu1 = 0;
|
||||
// misc
|
||||
int m_rombank = 0;
|
||||
uint8_t m_tenkai_p5_val = 0U;
|
||||
int m_tenkai_6c = 0;
|
||||
int m_tenkai_70 = 0;
|
||||
uint8_t m_gekisha_val[2]{};
|
||||
|
||||
};
|
||||
|
||||
INPUT_PORTS_EXTERN( HANAFUDA_KEYS_BET );
|
||||
|
||||
class dynax_adpcm_state : public dynax_state
|
||||
{
|
||||
public:
|
||||
dynax_adpcm_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||
: dynax_state(mconfig, type, tag)
|
||||
, m_msm(*this, "msm")
|
||||
{
|
||||
}
|
||||
|
||||
void hanamai(machine_config &config) ATTR_COLD;
|
||||
void hnoridur(machine_config &config) ATTR_COLD;
|
||||
void hjingi(machine_config &config) ATTR_COLD;
|
||||
void yarunara(machine_config &config) ATTR_COLD;
|
||||
void mjangels(machine_config &config) ATTR_COLD;
|
||||
void quiztvqq(machine_config &config) ATTR_COLD;
|
||||
void mcnpshnt(machine_config &config) ATTR_COLD;
|
||||
void nanajign(machine_config &config) ATTR_COLD;
|
||||
void mjelctrn(machine_config &config) ATTR_COLD;
|
||||
void mjembase(machine_config &config) ATTR_COLD;
|
||||
void neruton(machine_config &config) ATTR_COLD;
|
||||
|
||||
void init_mjelct3() ATTR_COLD;
|
||||
void init_mjelct3a() ATTR_COLD;
|
||||
|
||||
protected:
|
||||
required_device<msm5205_device> m_msm;
|
||||
|
||||
// misc
|
||||
int m_msm5205next = 0;
|
||||
int m_resetkludge = 0;
|
||||
|
||||
virtual void machine_start() override ATTR_COLD;
|
||||
virtual void machine_reset() override ATTR_COLD;
|
||||
|
||||
void adpcm_data_w(uint8_t data);
|
||||
void adpcm_reset_w(uint8_t data);
|
||||
|
||||
private:
|
||||
// input/output
|
||||
uint8_t m_hopper = 0U; // hjingi
|
||||
|
||||
// misc
|
||||
int m_toggle = 0;
|
||||
|
||||
void hnoridur_rombank_w(uint8_t data);
|
||||
void hnoridur_palbank_w(uint8_t data);
|
||||
void hnoridur_palette_lo_w(offs_t offset, uint8_t data);
|
||||
void hnoridur_palette_hi_w(offs_t offset, uint8_t data);
|
||||
void hnoridur_palette_update(offs_t offset);
|
||||
void nanajign_palette_lo_w(offs_t offset, uint8_t data);
|
||||
void nanajign_palette_hi_w(offs_t offset, uint8_t data);
|
||||
void nanajign_palette_update(offs_t offset);
|
||||
DECLARE_WRITE_LINE_MEMBER(hjingi_lockout_w);
|
||||
DECLARE_WRITE_LINE_MEMBER(hjingi_hopper_w);
|
||||
uint8_t hjingi_hopper_bit();
|
||||
uint8_t hjingi_keyboard_0_r();
|
||||
uint8_t hjingi_keyboard_1_r();
|
||||
void yarunara_input_w(offs_t offset, uint8_t data);
|
||||
uint8_t yarunara_input_r(offs_t offset);
|
||||
void yarunara_rombank_w(uint8_t data);
|
||||
void yarunara_blit_romregion_w(uint8_t data);
|
||||
uint8_t mjelctrn_keyboard_1_r();
|
||||
uint8_t mjelctrn_dsw_r();
|
||||
void mjembase_blit_dest_w(uint8_t data);
|
||||
void mjembase_blit_palette23_w(uint8_t data);
|
||||
void hanamai_blit_pixel_w(offs_t offset, uint8_t data);
|
||||
void hanamai_priority_w(uint8_t data);
|
||||
void mjembase_priority_w(uint8_t data);
|
||||
|
||||
DECLARE_WRITE_LINE_MEMBER(adpcm_int);
|
||||
DECLARE_WRITE_LINE_MEMBER(adpcm_reset_kludge_w);
|
||||
|
||||
DECLARE_MACHINE_START(hanamai);
|
||||
DECLARE_MACHINE_START(hjingi);
|
||||
DECLARE_VIDEO_START(mcnpshnt);
|
||||
DECLARE_VIDEO_START(mjembase);
|
||||
DECLARE_VIDEO_START(neruton);
|
||||
|
||||
void hnoridur_mem_map(address_map &map) ATTR_COLD;
|
||||
void mcnpshnt_mem_map(address_map &map) ATTR_COLD;
|
||||
void nanajign_mem_map(address_map &map) ATTR_COLD;
|
||||
void yarunara_mem_map(address_map &map) ATTR_COLD;
|
||||
void quiztvqq_mem_map(address_map &map) ATTR_COLD;
|
||||
|
||||
void hnoridur_banked_map(address_map &map) ATTR_COLD;
|
||||
void mjelctrn_banked_map(address_map &map) ATTR_COLD;
|
||||
void nanajign_banked_map(address_map &map) ATTR_COLD;
|
||||
void yarunara_banked_map(address_map &map) ATTR_COLD;
|
||||
void mjangels_banked_map(address_map &map) ATTR_COLD;
|
||||
|
||||
void hanamai_io_map(address_map &map) ATTR_COLD;
|
||||
void hnoridur_io_map(address_map &map) ATTR_COLD;
|
||||
void yarunara_io_map(address_map &map) ATTR_COLD;
|
||||
void mcnpshnt_io_map(address_map &map) ATTR_COLD;
|
||||
void nanajign_io_map(address_map &map) ATTR_COLD;
|
||||
|
||||
void hjingi_mem_map(address_map &map) ATTR_COLD;
|
||||
void hjingi_banked_map(address_map &map) ATTR_COLD;
|
||||
void hjingi_io_map(address_map &map) ATTR_COLD;
|
||||
|
||||
void mjelctrn_io_map(address_map &map) ATTR_COLD;
|
||||
void mjembase_io_map(address_map &map) ATTR_COLD;
|
||||
};
|
||||
|
||||
|
||||
class jantouki_state : public dynax_adpcm_state
|
||||
{
|
||||
public:
|
||||
jantouki_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||
: dynax_adpcm_state(mconfig, type, tag)
|
||||
, m_soundcpu(*this, "soundcpu")
|
||||
, m_soundlatch(*this, "soundlatch")
|
||||
, m_soundirq(*this, "soundirq")
|
||||
, m_blitter2(*this, "blitter2")
|
||||
, m_soundbank(*this, "bank2")
|
||||
, m_led(*this, "led0")
|
||||
{
|
||||
}
|
||||
|
||||
void jantouki(machine_config &config) ATTR_COLD;
|
||||
void janyuki(machine_config &config) ATTR_COLD;
|
||||
|
||||
protected:
|
||||
virtual void machine_start() override ATTR_COLD;
|
||||
virtual void machine_reset() override ATTR_COLD;
|
||||
|
||||
private:
|
||||
// devices
|
||||
required_device<cpu_device> m_soundcpu;
|
||||
required_device<generic_latch_8_device> m_soundlatch;
|
||||
required_device<rst_pos_buffer_device> m_soundirq;
|
||||
required_device<dynax_blitter_rev2_device> m_blitter2;
|
||||
required_memory_bank m_soundbank;
|
||||
output_finder<> m_led;
|
||||
|
||||
// IRQ
|
||||
bool m_blitter2_irq_mask = false;
|
||||
|
||||
// blitters
|
||||
int m_blit2_scroll_x = 0;
|
||||
int m_blit2_scroll_y = 0;
|
||||
int m_blit2_dest = 0;
|
||||
int m_blit2_palbank = 0;
|
||||
int m_blit2_palettes = 0;
|
||||
|
||||
// misc
|
||||
int m_toggle_cpu1 = 0;
|
||||
|
||||
void jantouki_vblank_ack_w(uint8_t data);
|
||||
DECLARE_WRITE_LINE_MEMBER(jantouki_blitter_ack_w);
|
||||
DECLARE_WRITE_LINE_MEMBER(jantouki_blitter_irq_w);
|
||||
DECLARE_WRITE_LINE_MEMBER(jantouki_blitter2_ack_w);
|
||||
DECLARE_WRITE_LINE_MEMBER(jantouki_blitter2_irq_w);
|
||||
DECLARE_WRITE_LINE_MEMBER(jantouki_vblank_w);
|
||||
void jantouki_sound_vblank_ack_w(uint8_t data);
|
||||
void jantouki_sound_rombank_w(uint8_t data);
|
||||
uint8_t jantouki_soundlatch_ack_r();
|
||||
uint8_t jantouki_blitter_busy_r();
|
||||
void jantouki_rombank_w(uint8_t data);
|
||||
uint8_t jantouki_soundlatch_status_r();
|
||||
|
||||
void jantouki_layer_enable_w(offs_t offset, uint8_t data);
|
||||
void dynax_blit2_romregion_w(uint8_t data);
|
||||
void dynax_blit2_dest_w(uint8_t data);
|
||||
void dynax_blit_palette45_w(uint8_t data);
|
||||
void dynax_blit_palette67_w(uint8_t data);
|
||||
DECLARE_WRITE_LINE_MEMBER(blit2_palbank_w);
|
||||
void jantouki_blit_pixel_w(offs_t offset, uint8_t data);
|
||||
void jantouki_blit2_pixel_w(offs_t offset, uint8_t data);
|
||||
void dynax_blit2_scrollx_w(uint8_t data);
|
||||
void dynax_blit2_scrolly_w(uint8_t data);
|
||||
|
||||
void janyuki_palette(palette_device &palette) const ATTR_COLD;
|
||||
|
||||
uint32_t screen_update_jantouki_top(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
uint32_t screen_update_jantouki_bottom(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
|
||||
void jantouki_copylayer(bitmap_ind16 &bitmap, const rectangle &cliprect, int i, int y);
|
||||
|
||||
DECLARE_WRITE_LINE_MEMBER(adpcm_int_cpu1);
|
||||
|
||||
DECLARE_VIDEO_START(jantouki);
|
||||
|
||||
void jantouki_mem_map(address_map &map) ATTR_COLD;
|
||||
void jantouki_sound_mem_map(address_map &map) ATTR_COLD;
|
||||
void jantouki_io_map(address_map &map) ATTR_COLD;
|
||||
void jantouki_sound_io_map(address_map &map) ATTR_COLD;
|
||||
};
|
||||
|
||||
|
||||
class blktouch_state : public dynax_state
|
||||
{
|
||||
public:
|
||||
blktouch_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||
: dynax_state(mconfig, type, tag)
|
||||
, m_blitter_gfx(*this, "blitter")
|
||||
{
|
||||
}
|
||||
|
||||
void init_blktouch() ATTR_COLD;
|
||||
void init_mayac() ATTR_COLD;
|
||||
void init_maya() ATTR_COLD;
|
||||
|
||||
private:
|
||||
required_region_ptr<uint8_t> m_blitter_gfx;
|
||||
|
||||
void init_maya_common() ATTR_COLD;
|
||||
};
|
||||
|
||||
|
||||
class cdracula_state : public dynax_state
|
||||
{
|
||||
public:
|
||||
cdracula_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||
: dynax_state(mconfig, type, tag)
|
||||
, m_oki(*this, "oki")
|
||||
{
|
||||
}
|
||||
|
||||
void cdracula(machine_config &config) ATTR_COLD;
|
||||
|
||||
private:
|
||||
required_device<okim6295_device> m_oki;
|
||||
|
||||
void cdracula_sound_rombank_w(uint8_t data);
|
||||
void cdracula_blit_pixel_w(offs_t offset, uint8_t data);
|
||||
|
||||
uint32_t screen_update_cdracula(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
|
||||
void cdracula_mem_map(address_map &map) ATTR_COLD;
|
||||
void cdracula_io_map(address_map &map) ATTR_COLD;
|
||||
};
|
||||
|
||||
|
||||
INPUT_PORTS_EXTERN(HANAFUDA_KEYS_BET);
|
||||
|
||||
#endif // MAME_DYNAX_DYNAX_H
|
||||
|
@ -46,7 +46,7 @@ void dynax_state::sprtmtch_palette(palette_device &palette) const
|
||||
}
|
||||
|
||||
// x xB0123 xG0123 xR0123
|
||||
void dynax_state::janyuki_palette(palette_device &palette) const
|
||||
void jantouki_state::janyuki_palette(palette_device &palette) const
|
||||
{
|
||||
uint8_t const *const color_prom = memregion("proms")->base();
|
||||
if (!color_prom)
|
||||
@ -98,7 +98,7 @@ void dynax_state::dynax_blit_dest_w(uint8_t data)
|
||||
LOG("D=%02X ", data);
|
||||
}
|
||||
|
||||
void dynax_state::dynax_blit2_dest_w(uint8_t data)
|
||||
void jantouki_state::dynax_blit2_dest_w(uint8_t data)
|
||||
{
|
||||
m_blit2_dest = data;
|
||||
LOG("D'=%02X ", data);
|
||||
@ -113,7 +113,7 @@ void dynax_state::tenkai_blit_dest_w(uint8_t data)
|
||||
mjelctrn: 7 d e -> 1 - 4 8
|
||||
mjembase: b d e -> - 2 4 8
|
||||
*/
|
||||
void dynax_state::mjembase_blit_dest_w(uint8_t data)
|
||||
void dynax_adpcm_state::mjembase_blit_dest_w(uint8_t data)
|
||||
{
|
||||
dynax_blit_dest_w(bitswap<8>(data, 7, 6, 5, 4, 2, 3, 1, 0));
|
||||
}
|
||||
@ -145,7 +145,7 @@ void dynax_state::tenkai_blit_palette01_w(uint8_t data)
|
||||
|
||||
|
||||
/* Layers 4&5 Palettes (Low Bits) */
|
||||
void dynax_state::dynax_blit_palette45_w(uint8_t data)
|
||||
void jantouki_state::dynax_blit_palette45_w(uint8_t data)
|
||||
{
|
||||
if (m_layer_layout == LAYOUT_HNORIDUR)
|
||||
m_blit2_palettes = (m_blit2_palettes & 0x00ff) | ((data & 0x0f) << 12) | ((data & 0xf0) << 4);
|
||||
@ -171,14 +171,14 @@ void dynax_state::tenkai_blit_palette23_w(uint8_t data)
|
||||
LOG("P23=%02X ", data);
|
||||
}
|
||||
|
||||
void dynax_state::mjembase_blit_palette23_w(uint8_t data)
|
||||
void dynax_adpcm_state::mjembase_blit_palette23_w(uint8_t data)
|
||||
{
|
||||
dynax_blit_palette23_w(bitswap<8>(data, 3, 2, 1, 0, 7, 6, 5, 4));
|
||||
}
|
||||
|
||||
|
||||
/* Layer 6&7 Palettes (Low Bits) */
|
||||
void dynax_state::dynax_blit_palette67_w(uint8_t data)
|
||||
void jantouki_state::dynax_blit_palette67_w(uint8_t data)
|
||||
{
|
||||
if (m_layer_layout == LAYOUT_HNORIDUR)
|
||||
m_blit2_palettes = (m_blit2_palettes & 0xff00) | ((data & 0x0f) << 4) | ((data & 0xf0) >> 4);
|
||||
@ -195,13 +195,13 @@ WRITE_LINE_MEMBER(dynax_state::blit_palbank_w)
|
||||
LOG("PB=%d ", state);
|
||||
}
|
||||
|
||||
WRITE_LINE_MEMBER(dynax_state::blit2_palbank_w)
|
||||
WRITE_LINE_MEMBER(jantouki_state::blit2_palbank_w)
|
||||
{
|
||||
m_blit2_palbank = state;
|
||||
LOG("PB'=%d ", state);
|
||||
}
|
||||
|
||||
void dynax_state::hnoridur_palbank_w(uint8_t data)
|
||||
void dynax_adpcm_state::hnoridur_palbank_w(uint8_t data)
|
||||
{
|
||||
m_palbank = data & 0x0f;
|
||||
m_blit_palbank = data; // ???
|
||||
@ -245,7 +245,7 @@ void dynax_state::dynax_layer_enable_w(uint8_t data)
|
||||
LOG("E=%02X ", data);
|
||||
}
|
||||
|
||||
void dynax_state::jantouki_layer_enable_w(offs_t offset, uint8_t data)
|
||||
void jantouki_state::jantouki_layer_enable_w(offs_t offset, uint8_t data)
|
||||
{
|
||||
int mask = 1 << (7 - offset);
|
||||
m_layer_enable = (m_layer_enable & ~mask) | ((data & 1) ? mask : 0);
|
||||
@ -283,7 +283,7 @@ void dynax_state::dynax_blit_romregion_w(uint8_t data)
|
||||
LOG("GFX%X ", data + 1);
|
||||
}
|
||||
|
||||
void dynax_state::dynax_blit2_romregion_w(uint8_t data)
|
||||
void jantouki_state::dynax_blit2_romregion_w(uint8_t data)
|
||||
{
|
||||
if (data + 1 < 8)
|
||||
m_blitter2->set_rom_bank(data);
|
||||
@ -291,7 +291,7 @@ void dynax_state::dynax_blit2_romregion_w(uint8_t data)
|
||||
}
|
||||
|
||||
|
||||
void dynax_state::hanamai_blit_pixel_w(offs_t offset, uint8_t data)
|
||||
void dynax_adpcm_state::hanamai_blit_pixel_w(offs_t offset, uint8_t data)
|
||||
{
|
||||
if (m_flipscreen)
|
||||
offset ^= 0xffff;
|
||||
@ -308,7 +308,7 @@ void dynax_state::hanamai_blit_pixel_w(offs_t offset, uint8_t data)
|
||||
}
|
||||
}
|
||||
|
||||
void dynax_state::cdracula_blit_pixel_w(offs_t offset, uint8_t data)
|
||||
void cdracula_state::cdracula_blit_pixel_w(offs_t offset, uint8_t data)
|
||||
{
|
||||
if (m_flipscreen)
|
||||
offset ^= 0xffff;
|
||||
@ -355,7 +355,7 @@ void dynax_state::drgpunch_blit_pixel_w(offs_t offset, uint8_t data)
|
||||
}
|
||||
|
||||
// two blitters/screens
|
||||
void dynax_state::jantouki_blit_pixel_w(offs_t offset, uint8_t data)
|
||||
void jantouki_state::jantouki_blit_pixel_w(offs_t offset, uint8_t data)
|
||||
{
|
||||
if (m_flipscreen)
|
||||
offset ^= 0xffff;
|
||||
@ -369,7 +369,7 @@ void dynax_state::jantouki_blit_pixel_w(offs_t offset, uint8_t data)
|
||||
}
|
||||
}
|
||||
|
||||
void dynax_state::jantouki_blit2_pixel_w(offs_t offset, uint8_t data)
|
||||
void jantouki_state::jantouki_blit2_pixel_w(offs_t offset, uint8_t data)
|
||||
{
|
||||
if (m_flipscreen)
|
||||
offset ^= 0xffff;
|
||||
@ -405,12 +405,12 @@ void dynax_state::dynax_blit_scrolly_w(uint8_t data)
|
||||
m_blit_scroll_y = data;
|
||||
}
|
||||
|
||||
void dynax_state::dynax_blit2_scrollx_w(uint8_t data)
|
||||
void jantouki_state::dynax_blit2_scrollx_w(uint8_t data)
|
||||
{
|
||||
m_blit2_scroll_x = data;
|
||||
}
|
||||
|
||||
void dynax_state::dynax_blit2_scrolly_w(uint8_t data)
|
||||
void jantouki_state::dynax_blit2_scrolly_w(uint8_t data)
|
||||
{
|
||||
m_blit2_scroll_y = data;
|
||||
}
|
||||
@ -445,11 +445,8 @@ static const int priority_mjembase[8] = { 0x0231, 0x2031, 0x0321, 0x3021, 0x2301
|
||||
void dynax_state::dynax_common_reset()
|
||||
{
|
||||
m_blit_dest = -1;
|
||||
m_blit2_dest = -1;
|
||||
m_blit_palbank = 0;
|
||||
m_blit2_palbank = 0;
|
||||
m_blit_palettes = 0;
|
||||
m_blit2_palettes = 0;
|
||||
m_layer_enable = -1;
|
||||
m_blit_backpen = 0;
|
||||
|
||||
@ -459,19 +456,14 @@ void dynax_state::dynax_common_reset()
|
||||
m_hnoridur_layer_half2 = 0;
|
||||
|
||||
m_blit_scroll_x = 0;
|
||||
m_blit2_scroll_x = 0;
|
||||
m_blit_scroll_y = 0;
|
||||
m_blit2_scroll_y = 0;
|
||||
m_hanamai_layer_half = 0;
|
||||
m_flipscreen = 0;
|
||||
m_hanamai_priority = 0;
|
||||
|
||||
save_item(NAME(m_blit_dest));
|
||||
save_item(NAME(m_blit2_dest));
|
||||
save_item(NAME(m_blit_palbank));
|
||||
save_item(NAME(m_blit2_palbank));
|
||||
save_item(NAME(m_blit_palettes));
|
||||
save_item(NAME(m_blit2_palettes));
|
||||
save_item(NAME(m_layer_enable));
|
||||
save_item(NAME(m_blit_backpen));
|
||||
save_item(NAME(m_extra_scroll_x));
|
||||
@ -479,15 +471,13 @@ void dynax_state::dynax_common_reset()
|
||||
save_item(NAME(m_hnoridur_layer_half2));
|
||||
|
||||
save_item(NAME(m_blit_scroll_x));
|
||||
save_item(NAME(m_blit2_scroll_x));
|
||||
save_item(NAME(m_blit_scroll_y));
|
||||
save_item(NAME(m_blit2_scroll_y));
|
||||
save_item(NAME(m_hanamai_layer_half));
|
||||
save_item(NAME(m_flipscreen));
|
||||
save_item(NAME(m_hanamai_priority));
|
||||
}
|
||||
|
||||
VIDEO_START_MEMBER(dynax_state,hanamai)
|
||||
VIDEO_START_MEMBER(dynax_state, hanamai)
|
||||
{
|
||||
m_pixmap[0][0] = std::make_unique<uint8_t[]>(256 * 256);
|
||||
m_pixmap[0][1] = std::make_unique<uint8_t[]>(256 * 256);
|
||||
@ -511,7 +501,7 @@ VIDEO_START_MEMBER(dynax_state,hanamai)
|
||||
save_pointer(NAME(m_pixmap[3][1]), 256 * 256);
|
||||
}
|
||||
|
||||
VIDEO_START_MEMBER(dynax_state,hnoridur)
|
||||
VIDEO_START_MEMBER(dynax_state, hnoridur)
|
||||
{
|
||||
m_pixmap[0][0] = std::make_unique<uint8_t[]>(256 * 256);
|
||||
m_pixmap[0][1] = std::make_unique<uint8_t[]>(256 * 256);
|
||||
@ -537,13 +527,13 @@ VIDEO_START_MEMBER(dynax_state,hnoridur)
|
||||
save_pointer(NAME(m_pixmap[3][1]), 256 * 256);
|
||||
}
|
||||
|
||||
VIDEO_START_MEMBER(dynax_state,mcnpshnt)
|
||||
VIDEO_START_MEMBER(dynax_adpcm_state, mcnpshnt)
|
||||
{
|
||||
VIDEO_START_CALL_MEMBER(hnoridur);
|
||||
m_priority_table = priority_mcnpshnt;
|
||||
}
|
||||
|
||||
VIDEO_START_MEMBER(dynax_state,sprtmtch)
|
||||
VIDEO_START_MEMBER(dynax_state, sprtmtch)
|
||||
{
|
||||
m_pixmap[0][0] = std::make_unique<uint8_t[]>(256 * 256);
|
||||
m_pixmap[0][1] = std::make_unique<uint8_t[]>(256 * 256);
|
||||
@ -563,7 +553,7 @@ VIDEO_START_MEMBER(dynax_state,sprtmtch)
|
||||
save_pointer(NAME(m_pixmap[2][1]), 256 * 256);
|
||||
}
|
||||
|
||||
VIDEO_START_MEMBER(dynax_state,jantouki)
|
||||
VIDEO_START_MEMBER(jantouki_state, jantouki)
|
||||
{
|
||||
m_pixmap[0][0] = std::make_unique<uint8_t[]>(256 * 256);
|
||||
m_pixmap[0][1] = std::make_unique<uint8_t[]>(256 * 256);
|
||||
@ -585,6 +575,20 @@ VIDEO_START_MEMBER(dynax_state,jantouki)
|
||||
dynax_common_reset();
|
||||
m_layer_layout = LAYOUT_JANTOUKI;
|
||||
|
||||
m_blit2_dest = -1;
|
||||
m_blit2_palbank = 0;
|
||||
m_blit2_palettes = 0;
|
||||
|
||||
m_blit2_scroll_x = 0;
|
||||
m_blit2_scroll_y = 0;
|
||||
|
||||
save_item(NAME(m_blit2_dest));
|
||||
save_item(NAME(m_blit2_palbank));
|
||||
save_item(NAME(m_blit2_palettes));
|
||||
|
||||
save_item(NAME(m_blit2_scroll_x));
|
||||
save_item(NAME(m_blit2_scroll_y));
|
||||
|
||||
save_pointer(NAME(m_pixmap[0][0]), 256 * 256);
|
||||
save_pointer(NAME(m_pixmap[0][1]), 256 * 256);
|
||||
save_pointer(NAME(m_pixmap[1][0]), 256 * 256);
|
||||
@ -603,7 +607,7 @@ VIDEO_START_MEMBER(dynax_state,jantouki)
|
||||
save_pointer(NAME(m_pixmap[7][1]), 256 * 256);
|
||||
}
|
||||
|
||||
VIDEO_START_MEMBER(dynax_state,mjdialq2)
|
||||
VIDEO_START_MEMBER(dynax_state, mjdialq2)
|
||||
{
|
||||
m_pixmap[0][0] = std::make_unique<uint8_t[]>(256 * 256);
|
||||
m_pixmap[1][0] = std::make_unique<uint8_t[]>(256 * 256);
|
||||
@ -615,21 +619,21 @@ VIDEO_START_MEMBER(dynax_state,mjdialq2)
|
||||
save_pointer(NAME(m_pixmap[1][0]), 256 * 256);
|
||||
}
|
||||
|
||||
VIDEO_START_MEMBER(dynax_state,mjelctrn)
|
||||
VIDEO_START_MEMBER(dynax_state, mjelctrn)
|
||||
{
|
||||
VIDEO_START_CALL_MEMBER(hnoridur);
|
||||
|
||||
m_priority_table = priority_mjelctrn;
|
||||
}
|
||||
|
||||
VIDEO_START_MEMBER(dynax_state,mjembase)
|
||||
VIDEO_START_MEMBER(dynax_adpcm_state, mjembase)
|
||||
{
|
||||
VIDEO_START_CALL_MEMBER(hnoridur);
|
||||
|
||||
m_priority_table = priority_mjembase;
|
||||
}
|
||||
|
||||
VIDEO_START_MEMBER(dynax_state,neruton)
|
||||
VIDEO_START_MEMBER(dynax_adpcm_state, neruton)
|
||||
{
|
||||
VIDEO_START_CALL_MEMBER(hnoridur);
|
||||
|
||||
@ -706,7 +710,7 @@ void dynax_state::hanamai_copylayer(bitmap_ind16 &bitmap, const rectangle &clipr
|
||||
}
|
||||
|
||||
|
||||
void dynax_state::jantouki_copylayer( bitmap_ind16 &bitmap, const rectangle &cliprect, int i, int y )
|
||||
void jantouki_state::jantouki_copylayer(bitmap_ind16 &bitmap, const rectangle &cliprect, int i, int y)
|
||||
{
|
||||
int color, scrollx, scrolly, palettes, palbank;
|
||||
|
||||
@ -828,7 +832,7 @@ void dynax_state::mjdialq2_copylayer( bitmap_ind16 &bitmap, const rectangle &cli
|
||||
}
|
||||
}
|
||||
|
||||
void dynax_state::hanamai_priority_w(uint8_t data)
|
||||
void dynax_adpcm_state::hanamai_priority_w(uint8_t data)
|
||||
{
|
||||
m_hanamai_priority = data;
|
||||
}
|
||||
@ -843,7 +847,7 @@ mjembase: priority: 00 08 10 18 20 28; enable: 1,2,4
|
||||
Convert to:
|
||||
mjelctrn: priority: 00 20 10 40 30 50; enable: 1,2,8
|
||||
*/
|
||||
void dynax_state::mjembase_priority_w(uint8_t data)
|
||||
void dynax_adpcm_state::mjembase_priority_w(uint8_t data)
|
||||
{
|
||||
m_hanamai_priority = bitswap<8>(data, 6, 5, 4, 3, 2, 7, 1, 0);
|
||||
}
|
||||
@ -1016,7 +1020,7 @@ uint32_t dynax_state::screen_update_sprtmtch(screen_device &screen, bitmap_ind16
|
||||
return 0;
|
||||
}
|
||||
|
||||
uint32_t dynax_state::screen_update_jantouki_bottom(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
|
||||
uint32_t jantouki_state::screen_update_jantouki_bottom(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
|
||||
{
|
||||
int layers_ctrl = m_layer_enable;
|
||||
|
||||
@ -1034,7 +1038,7 @@ uint32_t dynax_state::screen_update_jantouki_bottom(screen_device &screen, bitma
|
||||
return 0;
|
||||
}
|
||||
|
||||
uint32_t dynax_state::screen_update_jantouki_top(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
|
||||
uint32_t jantouki_state::screen_update_jantouki_top(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
|
||||
{
|
||||
int layers_ctrl = m_layer_enable;
|
||||
|
||||
@ -1071,7 +1075,7 @@ uint32_t dynax_state::screen_update_mjdialq2(screen_device &screen, bitmap_ind16
|
||||
}
|
||||
|
||||
|
||||
uint32_t dynax_state::screen_update_cdracula(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
|
||||
uint32_t cdracula_state::screen_update_cdracula(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
|
||||
{
|
||||
int layers_ctrl = ~m_layer_enable;
|
||||
|
||||
|
@ -12,9 +12,11 @@
|
||||
|
||||
#include "machine/bankdev.h"
|
||||
#include "machine/timer.h"
|
||||
|
||||
#include "emupal.h"
|
||||
#include "tilemap.h"
|
||||
|
||||
|
||||
class fantasy_sound_device;
|
||||
|
||||
class snk6502_state : public driver_device
|
||||
|
@ -15,6 +15,7 @@
|
||||
#include "machine/gen_latch.h"
|
||||
#include "machine/timer.h"
|
||||
#include "sound/msm5205.h"
|
||||
|
||||
#include "emupal.h"
|
||||
#include "screen.h"
|
||||
#include "tilemap.h"
|
||||
|
Loading…
Reference in New Issue
Block a user