mirror of
https://github.com/holub/mame
synced 2025-04-16 13:34:55 +03:00
New clones marked as NOT_WORKING
-------------------------------- Dead or Alive (Export, Model 2A, Revision A) [Guru] - hnayayoi.cpp: corrected clocks and dips [MORIYA]
This commit is contained in:
parent
422185fe55
commit
cec6cd7bd8
@ -1877,8 +1877,6 @@ files {
|
||||
MAME_DIR .. "src/mame/includes/dynax.h",
|
||||
MAME_DIR .. "src/mame/video/dynax.cpp",
|
||||
MAME_DIR .. "src/mame/drivers/hnayayoi.cpp",
|
||||
MAME_DIR .. "src/mame/includes/hnayayoi.h",
|
||||
MAME_DIR .. "src/mame/video/hnayayoi.cpp",
|
||||
MAME_DIR .. "src/mame/drivers/realbrk.cpp",
|
||||
MAME_DIR .. "src/mame/includes/realbrk.h",
|
||||
MAME_DIR .. "src/mame/video/realbrk.cpp",
|
||||
|
@ -33,57 +33,379 @@ Notes:
|
||||
TODO:
|
||||
- dips/inputs for some games
|
||||
- untoucha: player high scores are lost when resetting
|
||||
- hnayayoi: with the correct clocks the game seems to run a voice test at start up that didn't
|
||||
happen with the Z80 wrongly clocked at 5 MHz. Halving the 'nmiclock' restores previous behaviour.
|
||||
Verify on PCB what's the correct behaviour.
|
||||
|
||||
15-July 2016 - DIPs added to untoucha [theguru]
|
||||
|
||||
****************************************************************************/
|
||||
|
||||
#include "emu.h"
|
||||
#include "includes/hnayayoi.h"
|
||||
|
||||
#include "cpu/z80/z80.h"
|
||||
#include "sound/msm5205.h"
|
||||
#include "sound/ymopn.h"
|
||||
#include "machine/74259.h"
|
||||
#include "machine/clock.h"
|
||||
#include "machine/nvram.h"
|
||||
#include "sound/msm5205.h"
|
||||
#include "sound/ymopn.h"
|
||||
#include "video/mc6845.h"
|
||||
|
||||
#include "emupal.h"
|
||||
#include "screen.h"
|
||||
#include "speaker.h"
|
||||
|
||||
|
||||
uint8_t hnayayoi_state::keyboard_0_r()
|
||||
// configurable logging
|
||||
#define LOG_IRQ (1U << 1)
|
||||
#define LOG_BLITTER (1U << 2)
|
||||
|
||||
//#define VERBOSE (LOG_GENERAL | LOG_IRQ | LOG_BLITTER)
|
||||
|
||||
#include "logmacro.h"
|
||||
|
||||
#define LOGIRQ(...) LOGMASKED(LOG_IRQ, __VA_ARGS__)
|
||||
#define LOGBLITTER(...) LOGMASKED(LOG_BLITTER, __VA_ARGS__)
|
||||
|
||||
|
||||
namespace {
|
||||
|
||||
class hnayayoi_state : public driver_device
|
||||
{
|
||||
public:
|
||||
hnayayoi_state(const machine_config &mconfig, device_type type, const char *tag) :
|
||||
driver_device(mconfig, type, tag),
|
||||
m_maincpu(*this, "maincpu"),
|
||||
m_mainlatch(*this, "mainlatch"),
|
||||
m_msm(*this, "msm"),
|
||||
m_palette(*this, "palette"),
|
||||
m_blitrom(*this, "blitter"),
|
||||
m_key{ { *this, "P1_KEY%u", 0U }, { *this, "P2_KEY%u", 0U } }
|
||||
{ }
|
||||
|
||||
void hnayayoi(machine_config &config);
|
||||
void hnfubuki(machine_config &config);
|
||||
void untoucha(machine_config &config);
|
||||
|
||||
void init_hnfubuki();
|
||||
|
||||
protected:
|
||||
virtual void machine_start() override;
|
||||
virtual void machine_reset() override;
|
||||
virtual void video_start() override;
|
||||
|
||||
private:
|
||||
// video-related
|
||||
std::unique_ptr<uint8_t[]> m_pixmap[8];
|
||||
uint16_t m_palbank;
|
||||
uint8_t m_blit_layer;
|
||||
uint16_t m_blit_dest;
|
||||
uint32_t m_blit_src;
|
||||
|
||||
// misc
|
||||
uint8_t m_keyb;
|
||||
bool m_nmi_enable;
|
||||
|
||||
required_device<cpu_device> m_maincpu;
|
||||
required_device<ls259_device> m_mainlatch;
|
||||
required_device<msm5205_device> m_msm;
|
||||
required_device<palette_device> m_palette;
|
||||
|
||||
required_region_ptr<uint8_t> m_blitrom;
|
||||
|
||||
required_ioport_array<5> m_key[2];
|
||||
|
||||
template <uint8_t Which> uint8_t keyboard_r();
|
||||
void keyboard_w(uint8_t data);
|
||||
void dynax_blitter_rev1_param_w(offs_t offset, uint8_t data);
|
||||
void dynax_blitter_rev1_start_w(uint8_t data);
|
||||
void dynax_blitter_rev1_clear_w(uint8_t data);
|
||||
void palbank_w(offs_t offset, uint8_t data);
|
||||
DECLARE_WRITE_LINE_MEMBER(coin_counter_w);
|
||||
DECLARE_WRITE_LINE_MEMBER(nmi_enable_w);
|
||||
DECLARE_WRITE_LINE_MEMBER(nmi_clock_w);
|
||||
DECLARE_VIDEO_START(untoucha);
|
||||
MC6845_UPDATE_ROW(hnayayoi_update_row);
|
||||
MC6845_UPDATE_ROW(untoucha_update_row);
|
||||
void common_vh_start(int num_pixmaps);
|
||||
void copy_pixel(int x, int y, int pen);
|
||||
void draw_layer_interleaved(bitmap_rgb32 &bitmap, const rectangle &cliprect, uint16_t row, uint16_t y, uint8_t x_count, int left_pixmap, int right_pixmap, int palbase, bool transp);
|
||||
DECLARE_WRITE_LINE_MEMBER(irqhandler);
|
||||
|
||||
void hnayayoi_map(address_map &map);
|
||||
void hnayayoi_io_map(address_map &map);
|
||||
void hnfubuki_map(address_map &map);
|
||||
void untoucha_map(address_map &map);
|
||||
void untoucha_io_map(address_map &map);
|
||||
};
|
||||
|
||||
|
||||
// video
|
||||
|
||||
/***************************************************************************
|
||||
|
||||
First version of the Dynax blitter.
|
||||
|
||||
Can handle up to 8 256x256 bitmaps; in the games supported, every pair of
|
||||
bitmaps is interleaved horizontally to form 4 higher res 512x256 layer.
|
||||
|
||||
The blitter reads compressed data from ROM and copies it to the bitmap RAM.
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
void hnayayoi_state::common_vh_start(int num_pixmaps)
|
||||
{
|
||||
for (int i = 0; i < num_pixmaps; i++)
|
||||
{
|
||||
m_pixmap[i] = make_unique_clear<uint8_t[]>(256 * 256);
|
||||
save_pointer(NAME(m_pixmap[i]), 256 * 256, i);
|
||||
}
|
||||
}
|
||||
|
||||
void hnayayoi_state::video_start()
|
||||
{
|
||||
common_vh_start(4); // 4 bitmaps -> 2 layers
|
||||
}
|
||||
|
||||
VIDEO_START_MEMBER(hnayayoi_state, untoucha)
|
||||
{
|
||||
common_vh_start(8); // 8 bitmaps -> 4 layers
|
||||
}
|
||||
|
||||
|
||||
|
||||
/***************************************************************************
|
||||
|
||||
Blitter support
|
||||
|
||||
three parameters:
|
||||
blit_layer: mask of the bitmaps to write to (can write to multiple bitmaps
|
||||
at the same time)
|
||||
blit_dest: position in the destination bitmap where to start blitting
|
||||
blit_src: address of source data in the gfx ROM
|
||||
|
||||
additional parameters specify the palette base, but this is handled while rendering
|
||||
the screen, not during blitting (games change the palette base without redrawing
|
||||
the screen).
|
||||
|
||||
It is not known whether the palette base control registers are part of the blitter
|
||||
hardware or latched somewhere else. Since they are mapped in memory immediately
|
||||
before the bitter parameters, they probably are part of the blitter, but I'm
|
||||
handling them separately anyway.
|
||||
|
||||
|
||||
The format of the blitter data stored in ROM is very simple:
|
||||
|
||||
7654 ---- Pen to draw with
|
||||
---- 3210 Command
|
||||
|
||||
Commands:
|
||||
|
||||
0 Stop
|
||||
1-b Draw 1-b pixels along X.
|
||||
c Followed by 1 byte (N): draw N pixels along X.
|
||||
d Followed by 2 bytes (X,N): move on the line to pixel (start+X), draw N pixels
|
||||
along X.
|
||||
e Followed by 1 byte (N): set blit_layer = N. Used to draw interleaved graphics
|
||||
with a single blitter run.
|
||||
f Move to next line.
|
||||
|
||||
At the end of the blit, blit_src is left pointing to the next data in the gfx ROM.
|
||||
This is used to draw interleaved graphics with two blitter runs without having to set
|
||||
up blit_src for the second call.
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
void hnayayoi_state::dynax_blitter_rev1_param_w(offs_t offset, uint8_t data)
|
||||
{
|
||||
switch (offset)
|
||||
{
|
||||
case 0: m_blit_dest = (m_blit_dest & 0xff00) | (data << 0); break;
|
||||
case 1: m_blit_dest = (m_blit_dest & 0x00ff) | (data << 8); break;
|
||||
case 2: m_blit_layer = data; break;
|
||||
case 3: m_blit_src = (m_blit_src & 0xffff00) | (data << 0); break;
|
||||
case 4: m_blit_src = (m_blit_src & 0xff00ff) | (data << 8); break;
|
||||
case 5: m_blit_src = (m_blit_src & 0x00ffff) | (data <<16); break;
|
||||
}
|
||||
}
|
||||
|
||||
void hnayayoi_state::copy_pixel(int x, int y, int pen)
|
||||
{
|
||||
if (x >= 0 && x <= 255 && y >= 0 && y <= 255)
|
||||
{
|
||||
for (int i = 0; i < 8; i++)
|
||||
{
|
||||
if ((~m_blit_layer & (1 << i)) && (m_pixmap[i]))
|
||||
m_pixmap[i][256 * y + x] = pen;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void hnayayoi_state::dynax_blitter_rev1_start_w(uint8_t data)
|
||||
{
|
||||
int romlen = m_blitrom.bytes();
|
||||
|
||||
int sx = m_blit_dest & 0xff;
|
||||
int sy = m_blit_dest >> 8;
|
||||
int x = sx;
|
||||
int y = sy;
|
||||
while (m_blit_src < romlen)
|
||||
{
|
||||
int cmd = m_blitrom[m_blit_src] & 0x0f;
|
||||
int pen = m_blitrom[m_blit_src] >> 4;
|
||||
|
||||
m_blit_src++;
|
||||
|
||||
switch (cmd)
|
||||
{
|
||||
case 0xf:
|
||||
y++;
|
||||
x = sx;
|
||||
break;
|
||||
|
||||
case 0xe:
|
||||
if (m_blit_src >= romlen)
|
||||
{
|
||||
LOGBLITTER("GFXROM OVER %06x", m_blit_src);
|
||||
return;
|
||||
}
|
||||
x = sx;
|
||||
m_blit_layer = m_blitrom[m_blit_src++];
|
||||
break;
|
||||
|
||||
case 0xd:
|
||||
if (m_blit_src >= romlen)
|
||||
{
|
||||
LOGBLITTER("GFXROM OVER %06x", m_blit_src);
|
||||
return;
|
||||
}
|
||||
x = sx + m_blitrom[m_blit_src++];
|
||||
[[fallthrough]];
|
||||
case 0xc:
|
||||
if (m_blit_src >= romlen)
|
||||
{
|
||||
LOGBLITTER("GFXROM OVER %06x", m_blit_src);
|
||||
return;
|
||||
}
|
||||
cmd = m_blitrom[m_blit_src++];
|
||||
[[fallthrough]];
|
||||
case 0xb:
|
||||
case 0xa:
|
||||
case 0x9:
|
||||
case 0x8:
|
||||
case 0x7:
|
||||
case 0x6:
|
||||
case 0x5:
|
||||
case 0x4:
|
||||
case 0x3:
|
||||
case 0x2:
|
||||
case 0x1:
|
||||
while (cmd--)
|
||||
copy_pixel(x++, y, pen);
|
||||
break;
|
||||
|
||||
case 0x0:
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
LOGBLITTER("GFXROM OVER %06x", m_blit_src);
|
||||
}
|
||||
|
||||
void hnayayoi_state::dynax_blitter_rev1_clear_w(uint8_t data)
|
||||
{
|
||||
int pen = data >> 4;
|
||||
|
||||
for (int i = 0; i < 8; i++)
|
||||
{
|
||||
if ((~m_blit_layer & (1 << i)) && (m_pixmap[i]))
|
||||
std::fill(&m_pixmap[i][m_blit_dest], &m_pixmap[i][0x10000], pen);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void hnayayoi_state::palbank_w(offs_t offset, uint8_t data)
|
||||
{
|
||||
offset *= 8;
|
||||
m_palbank = (m_palbank & (0xff00 >> offset)) | (data << offset);
|
||||
}
|
||||
|
||||
|
||||
void hnayayoi_state::draw_layer_interleaved(bitmap_rgb32 &bitmap, const rectangle &cliprect, uint16_t row, uint16_t y, uint8_t x_count, int left_pixmap, int right_pixmap, int palbase, bool transp)
|
||||
{
|
||||
uint8_t *src1 = &m_pixmap[left_pixmap][(row & 255) * 256];
|
||||
uint8_t *src2 = &m_pixmap[right_pixmap][(row & 255) * 256];
|
||||
uint32_t *dst = &bitmap.pix(y);
|
||||
|
||||
const pen_t *pal = &m_palette->pens()[palbase * 16];
|
||||
|
||||
if (transp)
|
||||
{
|
||||
for (int countx = x_count * 2 - 1; countx >= 0; countx--, dst += 2)
|
||||
{
|
||||
int pen = *(src1++);
|
||||
if (pen) *dst = pal[pen];
|
||||
pen = *(src2++);
|
||||
if (pen) *(dst + 1) = pal[pen];
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
for (int countx = x_count * 2 - 1; countx >= 0; countx--, dst += 2)
|
||||
{
|
||||
*dst = pal[*(src1++)];
|
||||
*(dst + 1) = pal[*(src2++)];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
MC6845_UPDATE_ROW(hnayayoi_state::hnayayoi_update_row)
|
||||
{
|
||||
int col0 = (m_palbank >> 0) & 0x0f;
|
||||
int col1 = (m_palbank >> 4) & 0x0f;
|
||||
|
||||
draw_layer_interleaved(bitmap, cliprect, y, y, x_count, 3, 2, col1, false);
|
||||
draw_layer_interleaved(bitmap, cliprect, y, y, x_count, 1, 0, col0, true);
|
||||
}
|
||||
|
||||
|
||||
MC6845_UPDATE_ROW(hnayayoi_state::untoucha_update_row)
|
||||
{
|
||||
int col0 = (m_palbank >> 0) & 0x0f;
|
||||
int col1 = (m_palbank >> 4) & 0x0f;
|
||||
int col2 = (m_palbank >> 8) & 0x0f;
|
||||
int col3 = (m_palbank >> 12) & 0x0f;
|
||||
|
||||
draw_layer_interleaved(bitmap, cliprect, y + 16, y, x_count, 7, 6, col3, false);
|
||||
draw_layer_interleaved(bitmap, cliprect, y + 16, y, x_count, 5, 4, col2, true);
|
||||
draw_layer_interleaved(bitmap, cliprect, y + 16, y, x_count, 3, 2, col1, true);
|
||||
draw_layer_interleaved(bitmap, cliprect, y + 16, y, x_count, 1, 0, col0, true);
|
||||
}
|
||||
|
||||
|
||||
// machine
|
||||
|
||||
template <uint8_t Which>
|
||||
uint8_t hnayayoi_state::keyboard_r()
|
||||
{
|
||||
int res = 0x3f;
|
||||
int i;
|
||||
static const char *const keynames[] = { "KEY0", "KEY1", "KEY2", "KEY3", "KEY4" };
|
||||
|
||||
for (i = 0; i < 5; i++)
|
||||
for (int i = 0; i < 5; i++)
|
||||
{
|
||||
if (~m_keyb & (1 << i))
|
||||
res &= ioport(keynames[i])->read();
|
||||
res &= m_key[Which][i]->read();
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
uint8_t hnayayoi_state::keyboard_1_r()
|
||||
{
|
||||
/* Player 2 not supported */
|
||||
return 0x3f;
|
||||
}
|
||||
|
||||
void hnayayoi_state::keyboard_w(uint8_t data)
|
||||
{
|
||||
m_keyb = data;
|
||||
}
|
||||
|
||||
|
||||
void hnayayoi_state::adpcm_data_w(uint8_t data)
|
||||
{
|
||||
m_msm->data_w(data);
|
||||
}
|
||||
|
||||
|
||||
WRITE_LINE_MEMBER(hnayayoi_state::coin_counter_w)
|
||||
{
|
||||
machine().bookkeeping().coin_counter_w(0, state);
|
||||
@ -118,17 +440,17 @@ void hnayayoi_state::hnayayoi_io_map(address_map &map)
|
||||
map(0x00, 0x01).w("ymsnd", FUNC(ym2203_device::write));
|
||||
map(0x02, 0x03).r("ymsnd", FUNC(ym2203_device::read));
|
||||
map(0x04, 0x04).portr("DSW3");
|
||||
map(0x06, 0x06).w(FUNC(hnayayoi_state::adpcm_data_w));
|
||||
map(0x06, 0x06).w(m_msm, FUNC(msm5205_device::data_w));
|
||||
map(0x08, 0x08).w("crtc", FUNC(hd6845s_device::address_w));
|
||||
map(0x09, 0x09).w("crtc", FUNC(hd6845s_device::register_w));
|
||||
map(0x0a, 0x0a).w(FUNC(hnayayoi_state::dynax_blitter_rev1_start_w));
|
||||
map(0x0c, 0x0c).w(FUNC(hnayayoi_state::dynax_blitter_rev1_clear_w));
|
||||
map(0x20, 0x27).w(m_mainlatch, FUNC(ls259_device::write_d0));
|
||||
map(0x40, 0x40).w(FUNC(hnayayoi_state::keyboard_w));
|
||||
map(0x41, 0x41).r(FUNC(hnayayoi_state::keyboard_0_r));
|
||||
map(0x42, 0x42).r(FUNC(hnayayoi_state::keyboard_1_r));
|
||||
map(0x41, 0x41).r(FUNC(hnayayoi_state::keyboard_r<0>));
|
||||
map(0x42, 0x42).r(FUNC(hnayayoi_state::keyboard_r<1>));
|
||||
map(0x43, 0x43).portr("COIN");
|
||||
map(0x60, 0x61).w(FUNC(hnayayoi_state::hnayayoi_palbank_w));
|
||||
map(0x60, 0x61).w(FUNC(hnayayoi_state::palbank_w));
|
||||
map(0x62, 0x67).w(FUNC(hnayayoi_state::dynax_blitter_rev1_param_w));
|
||||
}
|
||||
|
||||
@ -140,17 +462,17 @@ void hnayayoi_state::hnfubuki_map(address_map &map)
|
||||
map(0xff00, 0xff01).w("ymsnd", FUNC(ym2203_device::write));
|
||||
map(0xff02, 0xff03).r("ymsnd", FUNC(ym2203_device::read));
|
||||
map(0xff04, 0xff04).portr("DSW3");
|
||||
map(0xff06, 0xff06).w(FUNC(hnayayoi_state::adpcm_data_w));
|
||||
map(0xff06, 0xff06).w(m_msm, FUNC(msm5205_device::data_w));
|
||||
map(0xff08, 0xff08).w("crtc", FUNC(hd6845s_device::address_w));
|
||||
map(0xff09, 0xff09).w("crtc", FUNC(hd6845s_device::register_w));
|
||||
map(0xff0a, 0xff0a).w(FUNC(hnayayoi_state::dynax_blitter_rev1_start_w));
|
||||
map(0xff0c, 0xff0c).w(FUNC(hnayayoi_state::dynax_blitter_rev1_clear_w));
|
||||
map(0xff20, 0xff27).w(m_mainlatch, FUNC(ls259_device::write_d0));
|
||||
map(0xff40, 0xff40).w(FUNC(hnayayoi_state::keyboard_w));
|
||||
map(0xff41, 0xff41).r(FUNC(hnayayoi_state::keyboard_0_r));
|
||||
map(0xff42, 0xff42).r(FUNC(hnayayoi_state::keyboard_1_r));
|
||||
map(0xff41, 0xff41).r(FUNC(hnayayoi_state::keyboard_r<0>));
|
||||
map(0xff42, 0xff42).r(FUNC(hnayayoi_state::keyboard_r<1>));
|
||||
map(0xff43, 0xff43).portr("COIN");
|
||||
map(0xff60, 0xff61).w(FUNC(hnayayoi_state::hnayayoi_palbank_w));
|
||||
map(0xff60, 0xff61).w(FUNC(hnayayoi_state::palbank_w));
|
||||
map(0xff62, 0xff67).w(FUNC(hnayayoi_state::dynax_blitter_rev1_param_w));
|
||||
}
|
||||
|
||||
@ -167,12 +489,12 @@ void hnayayoi_state::untoucha_io_map(address_map &map)
|
||||
map(0x10, 0x10).w("ymsnd", FUNC(ym2203_device::address_w));
|
||||
map(0x11, 0x11).r("ymsnd", FUNC(ym2203_device::status_r));
|
||||
map(0x12, 0x12).w("crtc", FUNC(hd6845s_device::address_w));
|
||||
map(0x13, 0x13).w(FUNC(hnayayoi_state::adpcm_data_w));
|
||||
map(0x13, 0x13).w(m_msm, FUNC(msm5205_device::data_w));
|
||||
map(0x14, 0x14).portr("COIN");
|
||||
map(0x15, 0x15).r(FUNC(hnayayoi_state::keyboard_1_r));
|
||||
map(0x16, 0x16).r(FUNC(hnayayoi_state::keyboard_0_r)); // bit 7 = blitter busy flag
|
||||
map(0x15, 0x15).r(FUNC(hnayayoi_state::keyboard_r<1>));
|
||||
map(0x16, 0x16).r(FUNC(hnayayoi_state::keyboard_r<0>)); // bit 7 = blitter busy flag
|
||||
map(0x17, 0x17).w(FUNC(hnayayoi_state::keyboard_w));
|
||||
map(0x18, 0x19).w(FUNC(hnayayoi_state::hnayayoi_palbank_w));
|
||||
map(0x18, 0x19).w(FUNC(hnayayoi_state::palbank_w));
|
||||
map(0x1a, 0x1f).w(FUNC(hnayayoi_state::dynax_blitter_rev1_param_w));
|
||||
map(0x20, 0x20).w(FUNC(hnayayoi_state::dynax_blitter_rev1_clear_w));
|
||||
map(0x28, 0x28).w(FUNC(hnayayoi_state::dynax_blitter_rev1_start_w));
|
||||
@ -183,7 +505,7 @@ void hnayayoi_state::untoucha_io_map(address_map &map)
|
||||
}
|
||||
|
||||
static INPUT_PORTS_START( hf_keyboard )
|
||||
PORT_START("KEY0")
|
||||
PORT_START("P1_KEY0")
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_HANAFUDA_A )
|
||||
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_HANAFUDA_E )
|
||||
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||
@ -192,7 +514,7 @@ static INPUT_PORTS_START( hf_keyboard )
|
||||
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START1 )
|
||||
PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||
|
||||
PORT_START("KEY1")
|
||||
PORT_START("P1_KEY1")
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_HANAFUDA_B )
|
||||
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_HANAFUDA_F )
|
||||
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||
@ -201,7 +523,7 @@ static INPUT_PORTS_START( hf_keyboard )
|
||||
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_MAHJONG_BET )
|
||||
PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||
|
||||
PORT_START("KEY2")
|
||||
PORT_START("P1_KEY2")
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_HANAFUDA_C )
|
||||
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_HANAFUDA_G )
|
||||
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||
@ -209,14 +531,14 @@ static INPUT_PORTS_START( hf_keyboard )
|
||||
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||
PORT_BIT( 0xe0, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||
|
||||
PORT_START("KEY3")
|
||||
PORT_START("P1_KEY3")
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_HANAFUDA_D )
|
||||
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_HANAFUDA_H )
|
||||
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||
PORT_BIT( 0xf0, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||
|
||||
PORT_START("KEY4")
|
||||
PORT_START("P1_KEY4")
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_MAHJONG_LAST_CHANCE )
|
||||
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_MAHJONG_SCORE )
|
||||
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MAHJONG_DOUBLE_UP )
|
||||
@ -224,11 +546,53 @@ static INPUT_PORTS_START( hf_keyboard )
|
||||
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MAHJONG_BIG )
|
||||
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_MAHJONG_SMALL )
|
||||
PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||
|
||||
PORT_START("P2_KEY0")
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_HANAFUDA_A ) PORT_PLAYER(2)
|
||||
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_HANAFUDA_E ) PORT_PLAYER(2)
|
||||
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_HANAFUDA_YES ) PORT_PLAYER(2)
|
||||
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START2 )
|
||||
PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||
|
||||
PORT_START("P2_KEY1")
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_HANAFUDA_B ) PORT_PLAYER(2)
|
||||
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_HANAFUDA_F ) PORT_PLAYER(2)
|
||||
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_HANAFUDA_NO ) PORT_PLAYER(2)
|
||||
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_MAHJONG_BET ) PORT_PLAYER(2)
|
||||
PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||
|
||||
PORT_START("P2_KEY2")
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_HANAFUDA_C ) PORT_PLAYER(2)
|
||||
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_HANAFUDA_G ) PORT_PLAYER(2)
|
||||
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||
PORT_BIT( 0xe0, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||
|
||||
PORT_START("P2_KEY3")
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_HANAFUDA_D ) PORT_PLAYER(2)
|
||||
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_HANAFUDA_H ) PORT_PLAYER(2)
|
||||
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||
PORT_BIT( 0xf0, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||
|
||||
PORT_START("P2_KEY4")
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_MAHJONG_LAST_CHANCE ) PORT_PLAYER(2)
|
||||
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_MAHJONG_SCORE ) PORT_PLAYER(2)
|
||||
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MAHJONG_DOUBLE_UP ) PORT_PLAYER(2)
|
||||
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_MAHJONG_FLIP_FLOP ) PORT_PLAYER(2)
|
||||
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MAHJONG_BIG ) PORT_PLAYER(2)
|
||||
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_MAHJONG_SMALL ) PORT_PLAYER(2)
|
||||
PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||
INPUT_PORTS_END
|
||||
|
||||
|
||||
static INPUT_PORTS_START( hnayayoi )
|
||||
PORT_START("DSW1") /* DSW1 */
|
||||
static INPUT_PORTS_START( hnayayoi ) // test mode shows and test 3 dip banks, but PCB seems to have only one installed (DSW3 below)
|
||||
PORT_START("DSW1")
|
||||
PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) ) PORT_DIPLOCATION( "SW 1:8" )
|
||||
PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
|
||||
@ -254,7 +618,7 @@ static INPUT_PORTS_START( hnayayoi )
|
||||
PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
|
||||
|
||||
PORT_START("DSW2") /* DSW2 */
|
||||
PORT_START("DSW2")
|
||||
PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) ) PORT_DIPLOCATION( "SW 2:8" )
|
||||
PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
|
||||
@ -280,36 +644,35 @@ static INPUT_PORTS_START( hnayayoi )
|
||||
PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
|
||||
|
||||
PORT_START("DSW3") /* DSW3 */
|
||||
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) // blitter busy flag
|
||||
PORT_START("DSW3")
|
||||
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) // blitter busy flag, manual has DSW 8 blank
|
||||
PORT_DIPNAME( 0x02, 0x02, DEF_STR( Service_Mode ) ) PORT_DIPLOCATION( "SW 3:7" )
|
||||
PORT_DIPSETTING( 0x02, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) ) PORT_DIPLOCATION( "SW 3:6" )
|
||||
PORT_DIPNAME( 0x04, 0x04, "Disable Speech" ) PORT_DIPLOCATION( "SW 3:6" )
|
||||
PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) ) PORT_DIPLOCATION( "SW 3:5" )
|
||||
PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unused ) ) PORT_DIPLOCATION( "SW 3:5" ) // manual has it blank
|
||||
PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) ) PORT_DIPLOCATION( "SW 3:4" )
|
||||
PORT_DIPSETTING( 0x10, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) ) PORT_DIPLOCATION( "SW 3:3" )
|
||||
PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x30, 0x30, DEF_STR( Difficulty ) ) PORT_DIPLOCATION( "SW 3:4,3" )
|
||||
PORT_DIPSETTING( 0x30, DEF_STR( Easiest ) )
|
||||
PORT_DIPSETTING( 0x20, DEF_STR( Easy ) )
|
||||
PORT_DIPSETTING( 0x10, DEF_STR( Hard ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( Hardest ) )
|
||||
PORT_DIPNAME( 0xc0, 0xc0, DEF_STR( Coin_A ) ) PORT_DIPLOCATION( "SW 3:2,1" ) // coin B is always 10*coin A
|
||||
PORT_DIPSETTING( 0xc0, DEF_STR( 1C_1C ) )
|
||||
PORT_DIPSETTING( 0x80, DEF_STR( 1C_2C ) )
|
||||
PORT_DIPSETTING( 0x40, DEF_STR( 1C_5C ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( 1C_5C ) )
|
||||
|
||||
PORT_START("COIN") /* COIN */
|
||||
PORT_START("COIN")
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME(DEF_STR( Test )) // there is also a dip switch
|
||||
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) PORT_NAME("Analizer")
|
||||
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) // "Non Use" in service mode
|
||||
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN2 ) /* "Note" ("Paper Money") = 10 Credits */
|
||||
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN2 ) // "Note" ("Paper Money") = 10 Credits
|
||||
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(2)
|
||||
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SERVICE1 )
|
||||
|
||||
@ -317,7 +680,7 @@ static INPUT_PORTS_START( hnayayoi )
|
||||
INPUT_PORTS_END
|
||||
|
||||
static INPUT_PORTS_START( hnfubuki )
|
||||
PORT_START("DSW1") /* DSW1 */
|
||||
PORT_START("DSW1")
|
||||
PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
|
||||
@ -343,7 +706,7 @@ static INPUT_PORTS_START( hnfubuki )
|
||||
PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
|
||||
|
||||
PORT_START("DSW2") /* DSW2 */
|
||||
PORT_START("DSW2")
|
||||
PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
|
||||
@ -369,7 +732,7 @@ static INPUT_PORTS_START( hnfubuki )
|
||||
PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
|
||||
|
||||
PORT_START("DSW3") /* DSW3 */
|
||||
PORT_START("DSW3")
|
||||
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) // blitter busy flag
|
||||
PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x02, DEF_STR( Off ) )
|
||||
@ -393,13 +756,13 @@ static INPUT_PORTS_START( hnfubuki )
|
||||
PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
|
||||
|
||||
PORT_START("COIN") /* COIN */
|
||||
PORT_START("COIN")
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME(DEF_STR( Test ))
|
||||
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) PORT_NAME("Analizer")
|
||||
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MEMORY_RESET )
|
||||
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN2 ) /* "Note" ("Paper Money") = 10 Credits */
|
||||
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN2 ) // "Note" ("Paper Money") = 10 Credits
|
||||
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(2)
|
||||
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SERVICE1 )
|
||||
|
||||
@ -408,7 +771,7 @@ INPUT_PORTS_END
|
||||
|
||||
|
||||
static INPUT_PORTS_START( untoucha )
|
||||
PORT_START("DSW1") /* DSW1 */
|
||||
PORT_START("DSW1")
|
||||
PORT_DIPNAME( 0x01, 0x01, "Double-Up Difficulty" ) PORT_DIPLOCATION("SW1:8")
|
||||
PORT_DIPSETTING( 0x01, "Normal" )
|
||||
PORT_DIPSETTING( 0x00, "Difficult" )
|
||||
@ -429,9 +792,9 @@ static INPUT_PORTS_START( untoucha )
|
||||
PORT_DIPSETTING( 0x00, "1000, 5000, 10000, 70000" )
|
||||
PORT_DIPNAME( 0x80, 0x80, "Stages" ) PORT_DIPLOCATION("SW1:1")
|
||||
PORT_DIPSETTING( 0x80, "4" )
|
||||
PORT_DIPSETTING( 0x00, "3" ) /* nudity only seems to show when Stages = 3? */
|
||||
PORT_DIPSETTING( 0x00, "3" ) // nudity only seems to show when Stages = 3?
|
||||
|
||||
PORT_START("DSW2") /* DSW2 */
|
||||
PORT_START("DSW2")
|
||||
PORT_DIPNAME( 0x80, 0x80, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SW2:1")
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x80, DEF_STR( On ) )
|
||||
@ -439,8 +802,8 @@ static INPUT_PORTS_START( untoucha )
|
||||
PORT_DIPSETTING( 0x40, DEF_STR( On ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
|
||||
PORT_DIPNAME( 0x20, 0x20, "Unknown (Aumit?)" ) PORT_DIPLOCATION("SW2:3")
|
||||
PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) /* DIPSW sheet says 'AUMIT CUT WHEN ON' */
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( On ) ) /* Maybe it is Audit, but where/what? */
|
||||
PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) // DIPSW sheet says 'AUMIT CUT WHEN ON'
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( On ) ) // Maybe it is Audit, but where/what?
|
||||
PORT_DIPNAME( 0x10, 0x10, "Auto Hold" ) PORT_DIPLOCATION("SW2:4")
|
||||
PORT_DIPSETTING( 0x10, DEF_STR( On ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
|
||||
@ -457,17 +820,17 @@ static INPUT_PORTS_START( untoucha )
|
||||
PORT_DIPSETTING( 0x06, "1 Coin/5 Score" )
|
||||
PORT_DIPSETTING( 0x00, "1 Coin/100 Score" )
|
||||
|
||||
PORT_START("COIN") /* COIN */
|
||||
PORT_START("COIN")
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME(DEF_STR( Test ))
|
||||
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) PORT_NAME("Analizer")
|
||||
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MEMORY_RESET )
|
||||
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN2 ) /* "Note" ("Paper Money") = 5 or 8 Credits */
|
||||
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN2 ) // "Note" ("Paper Money") = 5 or 8 Credits
|
||||
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(2)
|
||||
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SERVICE1 )
|
||||
|
||||
PORT_START("KEY0") /* P1 keyboard */
|
||||
PORT_START("P1_KEY0") // P1 keyboard
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_POKER_HOLD1 )
|
||||
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_POKER_HOLD3 )
|
||||
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_POKER_HOLD5 )
|
||||
@ -476,7 +839,7 @@ static INPUT_PORTS_START( untoucha )
|
||||
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||
|
||||
PORT_START("KEY1")
|
||||
PORT_START("P1_KEY1")
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
@ -485,7 +848,7 @@ static INPUT_PORTS_START( untoucha )
|
||||
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_GAMBLE_TAKE )
|
||||
PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||
|
||||
PORT_START("KEY2")
|
||||
PORT_START("P1_KEY2")
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_POKER_HOLD2 )
|
||||
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_POKER_HOLD4 )
|
||||
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
@ -494,7 +857,7 @@ static INPUT_PORTS_START( untoucha )
|
||||
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||
|
||||
PORT_START("KEY3")
|
||||
PORT_START("P1_KEY3")
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_GAMBLE_DEAL )
|
||||
@ -503,11 +866,56 @@ static INPUT_PORTS_START( untoucha )
|
||||
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
|
||||
PORT_START("KEY4")
|
||||
PORT_START("P1_KEY4")
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_GAMBLE_D_UP )
|
||||
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Flip Flop") PORT_CODE(KEYCODE_F) /* what does this do? */
|
||||
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_MAHJONG_FLIP_FLOP)
|
||||
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||
|
||||
PORT_START("P2_KEY0") // P2 keyboard
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) PORT_NAME("P2 Hold 1")
|
||||
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2) PORT_NAME("P2 Hold 3")
|
||||
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_PLAYER(2) PORT_NAME("P2 Hold 5")
|
||||
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||
|
||||
PORT_START("P2_KEY1")
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_PLAYER(2) PORT_NAME("P2 Bet")
|
||||
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON7 ) PORT_PLAYER(2) PORT_NAME("P2 Take Score")
|
||||
PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||
|
||||
PORT_START("P2_KEY2")
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) PORT_NAME("P2 Hold 2")
|
||||
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(2) PORT_NAME("P2 Hold 4")
|
||||
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON8 ) PORT_PLAYER(2) PORT_NAME("P2 Cancel")
|
||||
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||
|
||||
PORT_START("P2_KEY3")
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON9 ) PORT_PLAYER(2) PORT_NAME("P2 Deal")
|
||||
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
|
||||
PORT_START("P2_KEY4")
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON10 ) PORT_PLAYER(2) PORT_NAME("P2 Double Up")
|
||||
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_MAHJONG_FLIP_FLOP) PORT_PLAYER(2)
|
||||
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||
@ -517,7 +925,7 @@ INPUT_PORTS_END
|
||||
|
||||
WRITE_LINE_MEMBER(hnayayoi_state::irqhandler)
|
||||
{
|
||||
popmessage("irq");
|
||||
LOGIRQ("irq");
|
||||
// m_maincpu->set_input_line(0, state ? ASSERT_LINE : CLEAR_LINE);
|
||||
}
|
||||
|
||||
@ -543,8 +951,8 @@ void hnayayoi_state::machine_reset()
|
||||
|
||||
void hnayayoi_state::hnayayoi(machine_config &config)
|
||||
{
|
||||
/* basic machine hardware */
|
||||
Z80(config, m_maincpu, 20000000/4); /* 5 MHz ???? */
|
||||
// basic machine hardware
|
||||
Z80(config, m_maincpu, 20_MHz_XTAL / 8);
|
||||
m_maincpu->set_addrmap(AS_PROGRAM, &hnayayoi_state::hnayayoi_map);
|
||||
m_maincpu->set_addrmap(AS_IO, &hnayayoi_state::hnayayoi_io_map);
|
||||
|
||||
@ -558,7 +966,7 @@ void hnayayoi_state::hnayayoi(machine_config &config)
|
||||
m_mainlatch->q_out_cb<3>().set(m_msm, FUNC(msm5205_device::vclk_w));
|
||||
m_mainlatch->q_out_cb<4>().set(FUNC(hnayayoi_state::nmi_enable_w)).invert();
|
||||
|
||||
/* video hardware */
|
||||
// video hardware
|
||||
screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
|
||||
screen.set_raw(20_MHz_XTAL / 2, 632, 0, 512, 263, 0, 243);
|
||||
screen.set_screen_update("crtc", FUNC(hd6845s_device::screen_update));
|
||||
@ -572,10 +980,10 @@ void hnayayoi_state::hnayayoi(machine_config &config)
|
||||
crtc.out_vsync_callback().set_inputline(m_maincpu, 0);
|
||||
crtc.set_update_row_callback(FUNC(hnayayoi_state::hnayayoi_update_row));
|
||||
|
||||
/* sound hardware */
|
||||
// sound hardware
|
||||
SPEAKER(config, "mono").front_center();
|
||||
|
||||
ym2203_device &ymsnd(YM2203(config, "ymsnd", 20000000/8));
|
||||
ym2203_device &ymsnd(YM2203(config, "ymsnd", 20_MHz_XTAL / 16));
|
||||
ymsnd.irq_handler().set(FUNC(hnayayoi_state::irqhandler));
|
||||
ymsnd.port_a_read_callback().set_ioport("DSW1");
|
||||
ymsnd.port_b_read_callback().set_ioport("DSW2");
|
||||
@ -627,7 +1035,7 @@ ROM_START( hnayayoi )
|
||||
ROM_LOAD( "021.4a", 0x00000, 0x08000, CRC(d9734da4) SHA1(a2c8f5113c8136bea990c282d60f67b2793f9a2c) )
|
||||
ROM_LOAD( "022.3a", 0x08000, 0x08000, CRC(e6be5af4) SHA1(cdc56705ba0d191930f892618512cb687975ecbb) )
|
||||
|
||||
ROM_REGION( 0x38000, "gfx1", 0 ) /* blitter data */
|
||||
ROM_REGION( 0x38000, "blitter", 0 )
|
||||
ROM_LOAD( "023.8f", 0x00000, 0x08000, CRC(81ae7317) SHA1(9e37dad046420138b4655d0692fe4bac3a8e09de) )
|
||||
ROM_LOAD( "024.9f", 0x08000, 0x08000, CRC(413ab77a) SHA1(4b44d2a76c37f25f126e3759ab61fadba02e2b55) )
|
||||
ROM_LOAD( "025.10f", 0x10000, 0x08000, CRC(56d16426) SHA1(38162f2a240ce6828232d4280120acc576f71200) )
|
||||
@ -646,7 +1054,7 @@ ROM_START( hnfubuki )
|
||||
ROM_REGION( 0x10000, "maincpu", 0 )
|
||||
ROM_LOAD( "s1.s2c", 0x00000, 0x10000, CRC(afe3179c) SHA1(fdfba1e7073318f9782d628f3c7dd0d9c84cbeea) )
|
||||
|
||||
ROM_REGION( 0x40000, "gfx1", 0 ) /* blitter data */
|
||||
ROM_REGION( 0x40000, "blitter", 0 )
|
||||
ROM_LOAD( "062.8f", 0x00000, 0x10000, CRC(0d96a540) SHA1(1cadf19d8fd48962acb0e45a50431fabd6f13672) )
|
||||
ROM_LOAD( "063.9f", 0x10000, 0x10000, CRC(14250093) SHA1(8459024ebe5f8c3fa146e3303a155c2cf5c487b3) )
|
||||
ROM_LOAD( "064.10f", 0x20000, 0x10000, CRC(41546fb9) SHA1(3c6028c19aa65dcb7ccfc01c223c2cba36cc9bb4) )
|
||||
@ -662,7 +1070,7 @@ ROM_START( untoucha )
|
||||
ROM_REGION( 0x10000, "maincpu", 0 )
|
||||
ROM_LOAD( "b4.10b", 0x00000, 0x10000, CRC(4df04e41) SHA1(4d5232c2f383640394d85417aa973f92c78184c9) )
|
||||
|
||||
ROM_REGION( 0x90000, "gfx1", 0 ) /* blitter data */
|
||||
ROM_REGION( 0x90000, "blitter", 0 )
|
||||
ROM_LOAD( "081.10f", 0x00000, 0x10000, CRC(36ba990d) SHA1(10b2865f1d19c01cc898029a23489f47ade2ce86) )
|
||||
ROM_LOAD( "082.12f", 0x10000, 0x10000, CRC(2beb6277) SHA1(ea57970051c674800a9bedd581d734bd9beaa894) )
|
||||
ROM_LOAD( "083.13f", 0x20000, 0x10000, CRC(c3fed8ff) SHA1(405a6563ff7420686063e04fb99dfe6f0f7378dc) )
|
||||
@ -682,11 +1090,11 @@ ROM_END
|
||||
|
||||
void hnayayoi_state::init_hnfubuki()
|
||||
{
|
||||
uint8_t *rom = memregion("gfx1")->base();
|
||||
int len = memregion("gfx1")->bytes();
|
||||
uint8_t *rom = memregion("blitter")->base();
|
||||
int len = memregion("blitter")->bytes();
|
||||
|
||||
/* interestingly, the blitter data has a slight encryption */
|
||||
/* swap address bits 4 and 5 */
|
||||
// interestingly, the blitter data has a slight encryption
|
||||
// swap address bits 4 and 5
|
||||
for (int i = 0; i < len; i += 0x40)
|
||||
{
|
||||
for (int j = 0; j < 0x10; j++)
|
||||
@ -697,13 +1105,15 @@ void hnayayoi_state::init_hnfubuki()
|
||||
}
|
||||
}
|
||||
|
||||
/* swap data bits 0 and 1 */
|
||||
// swap data bits 0 and 1
|
||||
for (int i = 0; i < len; i++)
|
||||
{
|
||||
rom[i] = bitswap<8>(rom[i],7,6,5,4,3,2,0,1);
|
||||
rom[i] = bitswap<8>(rom[i], 7, 6, 5, 4, 3, 2, 0, 1);
|
||||
}
|
||||
}
|
||||
|
||||
} // anonymous namespace
|
||||
|
||||
|
||||
GAME( 1987, hnayayoi, 0, hnayayoi, hnayayoi, hnayayoi_state, empty_init, ROT0, "Dyna Electronics", "Hana Yayoi (Japan)", MACHINE_SUPPORTS_SAVE )
|
||||
GAME( 1987, hnfubuki, hnayayoi, hnfubuki, hnfubuki, hnayayoi_state, init_hnfubuki, ROT0, "Dynax", "Hana Fubuki [BET] (Japan)", MACHINE_SUPPORTS_SAVE )
|
||||
|
@ -3125,27 +3125,27 @@ ROM_START( zeroguna ) /* Zero Gunner (Export), Model 2A */
|
||||
ROM_LOAD32_WORD("epr-20438.13", 0x000002, 0x080000, CRC(ca364408) SHA1(4672ebdd7d9ccab5e107fda9d322b70583246c7a) )
|
||||
|
||||
ROM_REGION32_LE( 0x2000000, "main_data", 0 ) // Data
|
||||
ROM_LOAD32_WORD("mpr-20296.11", 0x000000, 0x400000, CRC(072d8a5e) SHA1(7f69c90dd3c3e6e522d1065b3c4b09434cb4e634) )
|
||||
ROM_LOAD32_WORD("mpr-20297.12", 0x000002, 0x400000, CRC(ba6a825b) SHA1(670a86c3a1a78550c760cc66c0a6181928fb9054) )
|
||||
ROM_LOAD32_WORD("mpr-20294.9", 0x800000, 0x400000, CRC(a0bd1474) SHA1(c0c032adac69bd545e3aab481878b08f3c3edab8) )
|
||||
ROM_LOAD32_WORD("mpr-20295.10", 0x800002, 0x400000, CRC(c548cced) SHA1(d34f2fc9b4481c75a6824aa4bdd3f1884188d35b) )
|
||||
ROM_LOAD32_WORD("mpr-20296.10", 0x000000, 0x400000, CRC(072d8a5e) SHA1(7f69c90dd3c3e6e522d1065b3c4b09434cb4e634) )
|
||||
ROM_LOAD32_WORD("mpr-20297.11", 0x000002, 0x400000, CRC(ba6a825b) SHA1(670a86c3a1a78550c760cc66c0a6181928fb9054) )
|
||||
ROM_LOAD32_WORD("mpr-20294.8", 0x800000, 0x400000, CRC(a0bd1474) SHA1(c0c032adac69bd545e3aab481878b08f3c3edab8) )
|
||||
ROM_LOAD32_WORD("mpr-20295.9", 0x800002, 0x400000, CRC(c548cced) SHA1(d34f2fc9b4481c75a6824aa4bdd3f1884188d35b) )
|
||||
|
||||
ROM_REGION32_LE( 0x800000, "copro_data", ROMREGION_ERASE00 ) // Copro extra data (collision/height map/etc) (COPRO socket)
|
||||
|
||||
ROM_REGION( 0x800000, "polygons", 0 ) // Models
|
||||
ROM_LOAD32_WORD("mpr-20298.17", 0x000000, 0x400000, CRC(8ab782fc) SHA1(595f6fc2e9c58ce9763d51798ceead8d470f0a33) )
|
||||
ROM_LOAD32_WORD("mpr-20299.21", 0x000002, 0x400000, CRC(90e20cdb) SHA1(730d58286fb7e91aa4128dc208b0f60eb3becc78) )
|
||||
ROM_LOAD32_WORD("mpr-20298.16", 0x000000, 0x400000, CRC(8ab782fc) SHA1(595f6fc2e9c58ce9763d51798ceead8d470f0a33) )
|
||||
ROM_LOAD32_WORD("mpr-20299.20", 0x000002, 0x400000, CRC(90e20cdb) SHA1(730d58286fb7e91aa4128dc208b0f60eb3becc78) )
|
||||
|
||||
ROM_REGION( 0x400000, "textures", 0 ) // Textures
|
||||
ROM_LOAD32_WORD("mpr-20301.27", 0x000000, 0x200000, CRC(52010fb2) SHA1(8dce67c6f9e48d749c64b11d4569df413dc40e07) )
|
||||
ROM_LOAD32_WORD("mpr-20300.25", 0x000002, 0x200000, CRC(6f042792) SHA1(75db68e57ec3fbc7af377342eef81f26fae4e1c4) )
|
||||
ROM_LOAD32_WORD("mpr-20301.25", 0x000000, 0x200000, CRC(52010fb2) SHA1(8dce67c6f9e48d749c64b11d4569df413dc40e07) )
|
||||
ROM_LOAD32_WORD("mpr-20300.24", 0x000002, 0x200000, CRC(6f042792) SHA1(75db68e57ec3fbc7af377342eef81f26fae4e1c4) )
|
||||
|
||||
ROM_REGION( 0x080000, "audiocpu", 0 ) // Sound program
|
||||
ROM_LOAD16_WORD_SWAP("epr-20302.31", 0x000000, 0x080000, CRC(44ff50d2) SHA1(6ffec81042fd5708e8a5df47b63f9809f93bf0f8) )
|
||||
ROM_LOAD16_WORD_SWAP("epr-20302.30", 0x000000, 0x080000, CRC(44ff50d2) SHA1(6ffec81042fd5708e8a5df47b63f9809f93bf0f8) )
|
||||
|
||||
ROM_REGION16_BE( 0x400000, "samples", 0 ) // Samples
|
||||
ROM_LOAD16_WORD_SWAP("mpr-20303.32", 0x000000, 0x200000, CRC(c040973f) SHA1(57a496c5dcc1a3931b6e41bf8d41e45d6dac0c31) )
|
||||
ROM_LOAD16_WORD_SWAP("mpr-20304.33", 0x200000, 0x200000, CRC(6decfe83) SHA1(d73adafceff2f1776c93e53bd5677d67f1c2c08f) )
|
||||
ROM_LOAD16_WORD_SWAP("mpr-20303.31", 0x000000, 0x200000, CRC(c040973f) SHA1(57a496c5dcc1a3931b6e41bf8d41e45d6dac0c31) )
|
||||
ROM_LOAD16_WORD_SWAP("mpr-20304.32", 0x200000, 0x200000, CRC(6decfe83) SHA1(d73adafceff2f1776c93e53bd5677d67f1c2c08f) )
|
||||
|
||||
MODEL2_CPU_BOARD
|
||||
MODEL2A_VID_BOARD
|
||||
@ -3160,27 +3160,27 @@ ROM_START( zerogunaj ) /* Zero Gunner (Japan), Model 2A - Sega game ID# 833-1134
|
||||
ROM_LOAD32_WORD("epr-20289.13", 0x000002, 0x080000, CRC(b5acb940) SHA1(e4c66c6bc9d5433b76ea12cf625fc359439144bb) )
|
||||
|
||||
ROM_REGION32_LE( 0x2000000, "main_data", 0 ) // Data
|
||||
ROM_LOAD32_WORD("mpr-20296.11", 0x000000, 0x400000, CRC(072d8a5e) SHA1(7f69c90dd3c3e6e522d1065b3c4b09434cb4e634) )
|
||||
ROM_LOAD32_WORD("mpr-20297.12", 0x000002, 0x400000, CRC(ba6a825b) SHA1(670a86c3a1a78550c760cc66c0a6181928fb9054) )
|
||||
ROM_LOAD32_WORD("mpr-20294.9", 0x800000, 0x400000, CRC(a0bd1474) SHA1(c0c032adac69bd545e3aab481878b08f3c3edab8) )
|
||||
ROM_LOAD32_WORD("mpr-20295.10", 0x800002, 0x400000, CRC(c548cced) SHA1(d34f2fc9b4481c75a6824aa4bdd3f1884188d35b) )
|
||||
ROM_LOAD32_WORD("mpr-20296.10", 0x000000, 0x400000, CRC(072d8a5e) SHA1(7f69c90dd3c3e6e522d1065b3c4b09434cb4e634) )
|
||||
ROM_LOAD32_WORD("mpr-20297.11", 0x000002, 0x400000, CRC(ba6a825b) SHA1(670a86c3a1a78550c760cc66c0a6181928fb9054) )
|
||||
ROM_LOAD32_WORD("mpr-20294.8", 0x800000, 0x400000, CRC(a0bd1474) SHA1(c0c032adac69bd545e3aab481878b08f3c3edab8) )
|
||||
ROM_LOAD32_WORD("mpr-20295.9", 0x800002, 0x400000, CRC(c548cced) SHA1(d34f2fc9b4481c75a6824aa4bdd3f1884188d35b) )
|
||||
|
||||
ROM_REGION32_LE( 0x800000, "copro_data", ROMREGION_ERASE00 ) // Copro extra data (collision/height map/etc)
|
||||
|
||||
ROM_REGION( 0x800000, "polygons", 0 ) // Models
|
||||
ROM_LOAD32_WORD("mpr-20298.17", 0x000000, 0x400000, CRC(8ab782fc) SHA1(595f6fc2e9c58ce9763d51798ceead8d470f0a33) )
|
||||
ROM_LOAD32_WORD("mpr-20299.21", 0x000002, 0x400000, CRC(90e20cdb) SHA1(730d58286fb7e91aa4128dc208b0f60eb3becc78) )
|
||||
ROM_LOAD32_WORD("mpr-20298.16", 0x000000, 0x400000, CRC(8ab782fc) SHA1(595f6fc2e9c58ce9763d51798ceead8d470f0a33) )
|
||||
ROM_LOAD32_WORD("mpr-20299.20", 0x000002, 0x400000, CRC(90e20cdb) SHA1(730d58286fb7e91aa4128dc208b0f60eb3becc78) )
|
||||
|
||||
ROM_REGION( 0x400000, "textures", 0 ) // Textures
|
||||
ROM_LOAD32_WORD("mpr-20301.27", 0x000000, 0x200000, CRC(52010fb2) SHA1(8dce67c6f9e48d749c64b11d4569df413dc40e07) )
|
||||
ROM_LOAD32_WORD("mpr-20300.25", 0x000002, 0x200000, CRC(6f042792) SHA1(75db68e57ec3fbc7af377342eef81f26fae4e1c4) )
|
||||
ROM_LOAD32_WORD("mpr-20301.25", 0x000000, 0x200000, CRC(52010fb2) SHA1(8dce67c6f9e48d749c64b11d4569df413dc40e07) )
|
||||
ROM_LOAD32_WORD("mpr-20300.24", 0x000002, 0x200000, CRC(6f042792) SHA1(75db68e57ec3fbc7af377342eef81f26fae4e1c4) )
|
||||
|
||||
ROM_REGION( 0x080000, "audiocpu", 0 ) // Sound program
|
||||
ROM_LOAD16_WORD_SWAP("epr-20302.31", 0x000000, 0x080000, CRC(44ff50d2) SHA1(6ffec81042fd5708e8a5df47b63f9809f93bf0f8) )
|
||||
ROM_LOAD16_WORD_SWAP("epr-20302.30", 0x000000, 0x080000, CRC(44ff50d2) SHA1(6ffec81042fd5708e8a5df47b63f9809f93bf0f8) )
|
||||
|
||||
ROM_REGION16_BE( 0x400000, "samples", 0 ) // Samples
|
||||
ROM_LOAD16_WORD_SWAP("mpr-20303.32", 0x000000, 0x200000, CRC(c040973f) SHA1(57a496c5dcc1a3931b6e41bf8d41e45d6dac0c31) )
|
||||
ROM_LOAD16_WORD_SWAP("mpr-20304.33", 0x200000, 0x200000, CRC(6decfe83) SHA1(d73adafceff2f1776c93e53bd5677d67f1c2c08f) )
|
||||
ROM_LOAD16_WORD_SWAP("mpr-20303.31", 0x000000, 0x200000, CRC(c040973f) SHA1(57a496c5dcc1a3931b6e41bf8d41e45d6dac0c31) )
|
||||
ROM_LOAD16_WORD_SWAP("mpr-20304.32", 0x200000, 0x200000, CRC(6decfe83) SHA1(d73adafceff2f1776c93e53bd5677d67f1c2c08f) )
|
||||
|
||||
MODEL2_CPU_BOARD
|
||||
MODEL2A_VID_BOARD
|
||||
@ -5728,29 +5728,29 @@ ROM_START( doaa ) /* Dead or Alive Revision A, Model 2A, Sega Game ID# 833-11341
|
||||
ROM_LOAD32_WORD("epr-19311a.13", 0x000002, 0x080000, CRC(1be62912) SHA1(dcc2df8e28e1a107867f74248e6ffcac83afe7c0) )
|
||||
|
||||
ROM_REGION32_LE( 0x2000000, "main_data", 0 ) // Data
|
||||
ROM_LOAD32_WORD("mpr-19318.11", 0x0000000, 0x400000, CRC(ab431bfe) SHA1(45b5ccf67c91014daf6bf3c4bd8ec372b246e404) )
|
||||
ROM_LOAD32_WORD("mpr-19319.12", 0x0000002, 0x400000, CRC(c5cb694d) SHA1(448b45d30cc7a71395a49a2c5789989fd7b7b4e7) )
|
||||
ROM_LOAD32_WORD("mpr-19316.9", 0x0800000, 0x400000, CRC(2d2d1b1a) SHA1(77ce5d8aa98bdbc97ae08a452f584b30d8885cfc) )
|
||||
ROM_LOAD32_WORD("mpr-19317.10", 0x0800002, 0x400000, CRC(96b17bcf) SHA1(3aa9d2f8afad74b5626ce2cf2d7a86aef8cac80b) )
|
||||
ROM_LOAD32_WORD("mpr-19314.7", 0x1000000, 0x400000, CRC(a8d963fb) SHA1(6a1680d6380321279b0d701e4b47d4ae712f3b72) )
|
||||
ROM_LOAD32_WORD("mpr-19315.8", 0x1000002, 0x400000, CRC(90ae5682) SHA1(ec56df14f0847daf9bd0435f785a8946c94d2988) )
|
||||
ROM_LOAD32_WORD("mpr-19312.5", 0x1800000, 0x200000, CRC(1dcedb10) SHA1(a60fb9e7c0731004d0f0ff28c4cde272b21dd658) )
|
||||
ROM_LOAD32_WORD("mpr-19313.6", 0x1800002, 0x200000, CRC(8c63055e) SHA1(9f375b3f4a8884163ffcf364989499f2cd21e18b) )
|
||||
ROM_LOAD32_WORD("mpr-19318.10", 0x0000000, 0x400000, CRC(ab431bfe) SHA1(45b5ccf67c91014daf6bf3c4bd8ec372b246e404) )
|
||||
ROM_LOAD32_WORD("mpr-19319.11", 0x0000002, 0x400000, CRC(c5cb694d) SHA1(448b45d30cc7a71395a49a2c5789989fd7b7b4e7) )
|
||||
ROM_LOAD32_WORD("mpr-19316.8", 0x0800000, 0x400000, CRC(2d2d1b1a) SHA1(77ce5d8aa98bdbc97ae08a452f584b30d8885cfc) )
|
||||
ROM_LOAD32_WORD("mpr-19317.9", 0x0800002, 0x400000, CRC(96b17bcf) SHA1(3aa9d2f8afad74b5626ce2cf2d7a86aef8cac80b) )
|
||||
ROM_LOAD32_WORD("mpr-19314.6", 0x1000000, 0x400000, CRC(a8d963fb) SHA1(6a1680d6380321279b0d701e4b47d4ae712f3b72) )
|
||||
ROM_LOAD32_WORD("mpr-19315.7", 0x1000002, 0x400000, CRC(90ae5682) SHA1(ec56df14f0847daf9bd0435f785a8946c94d2988) )
|
||||
ROM_LOAD32_WORD("mpr-19312.4", 0x1800000, 0x200000, CRC(1dcedb10) SHA1(a60fb9e7c0731004d0f0ff28c4cde272b21dd658) )
|
||||
ROM_LOAD32_WORD("mpr-19313.5", 0x1800002, 0x200000, CRC(8c63055e) SHA1(9f375b3f4a8884163ffcf364989499f2cd21e18b) )
|
||||
ROM_COPY("main_data", 0x1800000, 0x1c00000, 0x400000 )
|
||||
|
||||
ROM_REGION32_LE( 0x800000, "copro_data", ROMREGION_ERASE00 ) // Copro extra data (collision/height map/etc)
|
||||
|
||||
ROM_REGION( 0x2000000, "polygons", ROMREGION_ERASEFF ) // Models
|
||||
ROM_LOAD32_WORD("mpr-19322.17", 0x0000000, 0x400000, CRC(d0e6ecf0) SHA1(1b87f6337b4286fd738856da899462e7baa92601) )
|
||||
ROM_LOAD32_WORD("mpr-19325.21", 0x0000002, 0x400000, CRC(7cbe432d) SHA1(8b31e292160b88df9c77b36096914d09ab8b6086) )
|
||||
ROM_LOAD32_WORD("mpr-19323.18", 0x0800000, 0x400000, CRC(453d3f4a) SHA1(8c0530824bb8ecb007021ee6e93412597bb0ecd6) )
|
||||
ROM_LOAD32_WORD("mpr-19326.22", 0x0800002, 0x400000, CRC(b976da02) SHA1(a154eb128604aac9e35438d8811971133eab94a1) )
|
||||
ROM_LOAD32_WORD("mpr-19324.19", 0x1000000, 0x400000, CRC(0d6bf454) SHA1(4cf48f19128d728c4ec7e9ec7014223a6c0f2362) )
|
||||
ROM_LOAD32_WORD("mpr-19327.23", 0x1000002, 0x400000, CRC(6a75634c) SHA1(8ed74c7afd95fc7a4df0f01a47479b6f44e3073c) )
|
||||
ROM_LOAD32_WORD("mpr-19322.16", 0x0000000, 0x400000, CRC(d0e6ecf0) SHA1(1b87f6337b4286fd738856da899462e7baa92601) )
|
||||
ROM_LOAD32_WORD("mpr-19325.20", 0x0000002, 0x400000, CRC(7cbe432d) SHA1(8b31e292160b88df9c77b36096914d09ab8b6086) )
|
||||
ROM_LOAD32_WORD("mpr-19323.17", 0x0800000, 0x400000, CRC(453d3f4a) SHA1(8c0530824bb8ecb007021ee6e93412597bb0ecd6) )
|
||||
ROM_LOAD32_WORD("mpr-19326.21", 0x0800002, 0x400000, CRC(b976da02) SHA1(a154eb128604aac9e35438d8811971133eab94a1) )
|
||||
ROM_LOAD32_WORD("mpr-19324.18", 0x1000000, 0x400000, CRC(0d6bf454) SHA1(4cf48f19128d728c4ec7e9ec7014223a6c0f2362) )
|
||||
ROM_LOAD32_WORD("mpr-19327.22", 0x1000002, 0x400000, CRC(6a75634c) SHA1(8ed74c7afd95fc7a4df0f01a47479b6f44e3073c) )
|
||||
|
||||
ROM_REGION( 0x800000, "textures", 0 ) // Textures
|
||||
ROM_LOAD32_WORD("mpr-19321.27", 0x000000, 0x400000, CRC(9c49e845) SHA1(344839640d9814263fa5ed00c2043cd6f18d5cb2) )
|
||||
ROM_LOAD32_WORD("mpr-19320.25", 0x000002, 0x400000, CRC(190c017f) SHA1(4c3250b9abe39fc5c8fd0fcdb5fb7ea131434516) )
|
||||
ROM_LOAD32_WORD("mpr-19321.25", 0x000000, 0x400000, CRC(9c49e845) SHA1(344839640d9814263fa5ed00c2043cd6f18d5cb2) )
|
||||
ROM_LOAD32_WORD("mpr-19320.24", 0x000002, 0x400000, CRC(190c017f) SHA1(4c3250b9abe39fc5c8fd0fcdb5fb7ea131434516) )
|
||||
|
||||
ROM_REGION( 0x080000, "audiocpu", 0 ) // Sound program
|
||||
ROM_LOAD16_WORD_SWAP("epr-19328.30", 0x000000, 0x080000, CRC(400bdbfb) SHA1(54db969fa54cf3c502d77aa6a6aaeef5d7db9f04) )
|
||||
@ -5758,8 +5758,51 @@ ROM_START( doaa ) /* Dead or Alive Revision A, Model 2A, Sega Game ID# 833-11341
|
||||
ROM_REGION16_BE( 0x800000, "samples", 0 ) // Samples
|
||||
ROM_LOAD16_WORD_SWAP("mpr-19329.31", 0x000000, 0x200000, CRC(8fd2708a) SHA1(7a341b15afa489aa95af70cb34ac3934b1a7d887) )
|
||||
ROM_LOAD16_WORD_SWAP("mpr-19330.32", 0x200000, 0x200000, CRC(0c69787d) SHA1(dc5870cd93da2babe5fc9c03b252fc6ea6e45721) )
|
||||
ROM_LOAD16_WORD_SWAP("mpr-19331.33", 0x400000, 0x200000, CRC(c18ea0b8) SHA1(0f42458829ae85fffcedd42cd9f728a7a3d75f1c) )
|
||||
ROM_LOAD16_WORD_SWAP("mpr-19332.34", 0x600000, 0x200000, CRC(2877f96f) SHA1(00e5677da30527b862e238f10762a5cbfbabde2b) )
|
||||
ROM_LOAD16_WORD_SWAP("mpr-19331.36", 0x400000, 0x200000, CRC(c18ea0b8) SHA1(0f42458829ae85fffcedd42cd9f728a7a3d75f1c) )
|
||||
ROM_LOAD16_WORD_SWAP("mpr-19332.37", 0x600000, 0x200000, CRC(2877f96f) SHA1(00e5677da30527b862e238f10762a5cbfbabde2b) )
|
||||
|
||||
MODEL2_CPU_BOARD
|
||||
MODEL2A_VID_BOARD
|
||||
ROM_END
|
||||
|
||||
ROM_START( doaab ) /* Dead or Alive Revision A, Model 2A, Sega Game ID# 833-?????, ROM board ID# 838-12885-02, 837-12880 security board, defaults to export and can't be changed in test mode */
|
||||
ROM_REGION( 0x200000, "maincpu", 0 ) // i960 program
|
||||
ROM_LOAD32_WORD("epr-19383a.12", 0x000000, 0x080000, CRC(42e61481) SHA1(ecee88b17d60924c63d01ff72acb186350265e0a) )
|
||||
ROM_LOAD32_WORD("epr-19384a.13", 0x000002, 0x080000, CRC(034a3ab9) SHA1(a01d2f0a4accfdf892228b65c25e2ad9144ecf59) )
|
||||
|
||||
ROM_REGION32_LE( 0x2000000, "main_data", 0 ) // Data
|
||||
ROM_LOAD32_WORD("mpr-19318.10", 0x0000000, 0x400000, CRC(ab431bfe) SHA1(45b5ccf67c91014daf6bf3c4bd8ec372b246e404) )
|
||||
ROM_LOAD32_WORD("mpr-19319.11", 0x0000002, 0x400000, CRC(c5cb694d) SHA1(448b45d30cc7a71395a49a2c5789989fd7b7b4e7) )
|
||||
ROM_LOAD32_WORD("mpr-19316.8", 0x0800000, 0x400000, CRC(2d2d1b1a) SHA1(77ce5d8aa98bdbc97ae08a452f584b30d8885cfc) )
|
||||
ROM_LOAD32_WORD("mpr-19317.9", 0x0800002, 0x400000, CRC(96b17bcf) SHA1(3aa9d2f8afad74b5626ce2cf2d7a86aef8cac80b) )
|
||||
ROM_LOAD32_WORD("mpr-19314.6", 0x1000000, 0x400000, CRC(a8d963fb) SHA1(6a1680d6380321279b0d701e4b47d4ae712f3b72) )
|
||||
ROM_LOAD32_WORD("mpr-19315.7", 0x1000002, 0x400000, CRC(90ae5682) SHA1(ec56df14f0847daf9bd0435f785a8946c94d2988) )
|
||||
ROM_LOAD32_WORD("mpr-19312.4", 0x1800000, 0x200000, CRC(1dcedb10) SHA1(a60fb9e7c0731004d0f0ff28c4cde272b21dd658) )
|
||||
ROM_LOAD32_WORD("mpr-19313.5", 0x1800002, 0x200000, CRC(8c63055e) SHA1(9f375b3f4a8884163ffcf364989499f2cd21e18b) )
|
||||
ROM_COPY("main_data", 0x1800000, 0x1c00000, 0x400000 )
|
||||
|
||||
ROM_REGION32_LE( 0x800000, "copro_data", ROMREGION_ERASE00 ) // Copro extra data (collision/height map/etc)
|
||||
|
||||
ROM_REGION( 0x2000000, "polygons", ROMREGION_ERASEFF ) // Models
|
||||
ROM_LOAD32_WORD("mpr-19322.16", 0x0000000, 0x400000, CRC(d0e6ecf0) SHA1(1b87f6337b4286fd738856da899462e7baa92601) )
|
||||
ROM_LOAD32_WORD("mpr-19325.20", 0x0000002, 0x400000, CRC(7cbe432d) SHA1(8b31e292160b88df9c77b36096914d09ab8b6086) )
|
||||
ROM_LOAD32_WORD("mpr-19323.17", 0x0800000, 0x400000, CRC(453d3f4a) SHA1(8c0530824bb8ecb007021ee6e93412597bb0ecd6) )
|
||||
ROM_LOAD32_WORD("mpr-19326.21", 0x0800002, 0x400000, CRC(b976da02) SHA1(a154eb128604aac9e35438d8811971133eab94a1) )
|
||||
ROM_LOAD32_WORD("mpr-19324.18", 0x1000000, 0x400000, CRC(0d6bf454) SHA1(4cf48f19128d728c4ec7e9ec7014223a6c0f2362) )
|
||||
ROM_LOAD32_WORD("mpr-19327.22", 0x1000002, 0x400000, CRC(6a75634c) SHA1(8ed74c7afd95fc7a4df0f01a47479b6f44e3073c) )
|
||||
|
||||
ROM_REGION( 0x800000, "textures", 0 ) // Textures
|
||||
ROM_LOAD32_WORD("mpr-19321.25", 0x000000, 0x400000, CRC(9c49e845) SHA1(344839640d9814263fa5ed00c2043cd6f18d5cb2) )
|
||||
ROM_LOAD32_WORD("mpr-19320.24", 0x000002, 0x400000, CRC(190c017f) SHA1(4c3250b9abe39fc5c8fd0fcdb5fb7ea131434516) )
|
||||
|
||||
ROM_REGION( 0x080000, "audiocpu", 0 ) // Sound program
|
||||
ROM_LOAD16_WORD_SWAP("epr-19328.30", 0x000000, 0x080000, CRC(400bdbfb) SHA1(54db969fa54cf3c502d77aa6a6aaeef5d7db9f04) )
|
||||
|
||||
ROM_REGION16_BE( 0x800000, "samples", 0 ) // Samples
|
||||
ROM_LOAD16_WORD_SWAP("mpr-19329.31", 0x000000, 0x200000, CRC(8fd2708a) SHA1(7a341b15afa489aa95af70cb34ac3934b1a7d887) )
|
||||
ROM_LOAD16_WORD_SWAP("mpr-19330.32", 0x200000, 0x200000, CRC(0c69787d) SHA1(dc5870cd93da2babe5fc9c03b252fc6ea6e45721) )
|
||||
ROM_LOAD16_WORD_SWAP("mpr-19331.36", 0x400000, 0x200000, CRC(c18ea0b8) SHA1(0f42458829ae85fffcedd42cd9f728a7a3d75f1c) )
|
||||
ROM_LOAD16_WORD_SWAP("mpr-19332.37", 0x600000, 0x200000, CRC(2877f96f) SHA1(00e5677da30527b862e238f10762a5cbfbabde2b) )
|
||||
|
||||
MODEL2_CPU_BOARD
|
||||
MODEL2A_VID_BOARD
|
||||
@ -7124,10 +7167,6 @@ void model2_state::model2_0229_mem(address_map &map)
|
||||
|
||||
void model2_state::init_doa()
|
||||
{
|
||||
u32 *ROM = (u32 *)memregion("maincpu")->base();
|
||||
ROM[0x630 / 4] = 0x08000004;
|
||||
ROM[0x808 / 4] = 0x08000004;
|
||||
|
||||
m_0229crypt->set_hack_mode(sega_315_5838_comp_device::HACK_MODE_DOA);
|
||||
}
|
||||
|
||||
@ -7158,7 +7197,8 @@ GAME( 1995, srallycdx, srallyc, srallyc, srallyc, model2a_state, empty_
|
||||
GAME( 1995, srallycdxa, srallyc, srallyc, srallyc, model2a_state, empty_init, ROT0, "Sega", "Sega Rally Championship - DX", MACHINE_NOT_WORKING|MACHINE_IMPERFECT_GRAPHICS )
|
||||
GAME( 1995, vcop2, 0, vcop2, vcop2, model2a_state, empty_init, ROT0, "Sega", "Virtua Cop 2", MACHINE_NOT_WORKING|MACHINE_IMPERFECT_GRAPHICS )
|
||||
GAME( 1995, skytargt, 0, skytargt, skytargt, model2a_state, empty_init, ROT0, "Sega", "Sky Target", MACHINE_NOT_WORKING|MACHINE_IMPERFECT_GRAPHICS )
|
||||
GAME( 1996, doaa, doa, model2a_0229, doa, model2a_state, init_doa, ROT0, "Tecmo", "Dead or Alive (Model 2A, Revision A)", MACHINE_NOT_WORKING|MACHINE_IMPERFECT_GRAPHICS )
|
||||
GAME( 1996, doaa, doa, model2a_0229, doa, model2a_state, init_doa, ROT0, "Tecmo", "Dead or Alive (Model 2A, Revision A)", MACHINE_NOT_WORKING|MACHINE_IMPERFECT_GRAPHICS ) // Dec 4 1996, defaults to Japan but can be changed in test mode
|
||||
GAME( 1996, doaab, doa, model2a_0229, doa, model2a_state, init_doa, ROT0, "Tecmo", "Dead or Alive (Export, Model 2A, Revision A)", MACHINE_NOT_WORKING|MACHINE_IMPERFECT_GRAPHICS ) // Nov 3 1996, fixed on Export
|
||||
GAME( 1997, zeroguna, zerogun, zeroguna, zerogun, model2a_state, init_zerogun, ROT0, "Psikyo", "Zero Gunner (Export, Model 2A)", MACHINE_NOT_WORKING|MACHINE_IMPERFECT_GRAPHICS )
|
||||
GAME( 1997, zerogunaj, zerogun, zeroguna, zerogun, model2a_state, init_zerogun, ROT0, "Psikyo", "Zero Gunner (Japan, Model 2A)", MACHINE_NOT_WORKING|MACHINE_IMPERFECT_GRAPHICS )
|
||||
GAME( 1997, motoraid, 0, manxtt, motoraid, model2a_state, empty_init, ROT0, "Sega", "Motor Raid - Twin", MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND )
|
||||
|
@ -1,83 +0,0 @@
|
||||
// license:BSD-3-Clause
|
||||
// copyright-holders:Nicola Salmoria
|
||||
/*************************************************************************
|
||||
|
||||
Hana Yayoi & other Dynax games (using 1st version of their blitter)
|
||||
|
||||
*************************************************************************/
|
||||
#ifndef MAME_INCLUDES_HNAYAYOI_H
|
||||
#define MAME_INCLUDES_HNAYAYOI_H
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "machine/74259.h"
|
||||
#include "sound/msm5205.h"
|
||||
#include "video/mc6845.h"
|
||||
#include "emupal.h"
|
||||
|
||||
class hnayayoi_state : public driver_device
|
||||
{
|
||||
public:
|
||||
hnayayoi_state(const machine_config &mconfig, device_type type, const char *tag) :
|
||||
driver_device(mconfig, type, tag),
|
||||
m_maincpu(*this, "maincpu"),
|
||||
m_mainlatch(*this, "mainlatch"),
|
||||
m_msm(*this, "msm"),
|
||||
m_palette(*this, "palette")
|
||||
{ }
|
||||
|
||||
void hnayayoi(machine_config &config);
|
||||
void hnfubuki(machine_config &config);
|
||||
void untoucha(machine_config &config);
|
||||
|
||||
void init_hnfubuki();
|
||||
|
||||
protected:
|
||||
virtual void machine_start() override;
|
||||
virtual void machine_reset() override;
|
||||
virtual void video_start() override;
|
||||
|
||||
private:
|
||||
/* video-related */
|
||||
std::unique_ptr<uint8_t[]> m_pixmap[8];
|
||||
int m_palbank;
|
||||
uint8_t m_blit_layer;
|
||||
uint16_t m_blit_dest;
|
||||
uint32_t m_blit_src;
|
||||
|
||||
/* misc */
|
||||
int m_keyb;
|
||||
bool m_nmi_enable;
|
||||
|
||||
required_device<cpu_device> m_maincpu;
|
||||
required_device<ls259_device> m_mainlatch;
|
||||
required_device<msm5205_device> m_msm;
|
||||
required_device<palette_device> m_palette;
|
||||
|
||||
uint8_t keyboard_0_r();
|
||||
uint8_t keyboard_1_r();
|
||||
void keyboard_w(uint8_t data);
|
||||
void dynax_blitter_rev1_param_w(offs_t offset, uint8_t data);
|
||||
void dynax_blitter_rev1_start_w(uint8_t data);
|
||||
void dynax_blitter_rev1_clear_w(uint8_t data);
|
||||
void hnayayoi_palbank_w(offs_t offset, uint8_t data);
|
||||
void adpcm_data_w(uint8_t data);
|
||||
DECLARE_WRITE_LINE_MEMBER(coin_counter_w);
|
||||
DECLARE_WRITE_LINE_MEMBER(nmi_enable_w);
|
||||
DECLARE_WRITE_LINE_MEMBER(nmi_clock_w);
|
||||
DECLARE_VIDEO_START(untoucha);
|
||||
MC6845_UPDATE_ROW(hnayayoi_update_row);
|
||||
MC6845_UPDATE_ROW(untoucha_update_row);
|
||||
void common_vh_start( int num_pixmaps );
|
||||
void copy_pixel( int x, int y, int pen );
|
||||
void draw_layer_interleaved(bitmap_rgb32 &bitmap, const rectangle &cliprect, uint16_t row, uint16_t y, uint8_t x_count, int left_pixmap, int right_pixmap, int palbase, bool transp);
|
||||
DECLARE_WRITE_LINE_MEMBER(irqhandler);
|
||||
|
||||
void hnayayoi_map(address_map &map);
|
||||
void hnayayoi_io_map(address_map &map);
|
||||
void hnfubuki_map(address_map &map);
|
||||
void untoucha_map(address_map &map);
|
||||
void untoucha_io_map(address_map &map);
|
||||
};
|
||||
|
||||
#endif // MAME_INCLUDES_HNAYAYOI_H
|
@ -23974,6 +23974,7 @@ desert // 1994.07 Desert Tank
|
||||
doa // 1997.01 Dead or Alive (Revision C)
|
||||
doab // 1996.12 Dead or Alive (Revision B)
|
||||
doaa // 1996.11 Dead or Alive (Revision A)
|
||||
doaab // 1996.11 Dead or Alive (Revision A)
|
||||
dynabb // 1996.08 Dynamite Baseball
|
||||
dynabb97 // 1997.04 Dynamite Baseball 97 (Revision A)
|
||||
dynamcop // 1998.09 Dynamic Cop (Export)
|
||||
|
@ -1,247 +0,0 @@
|
||||
// license:BSD-3-Clause
|
||||
// copyright-holders:Nicola Salmoria
|
||||
/***************************************************************************
|
||||
|
||||
First version of the Dynax blitter.
|
||||
|
||||
Can handle up to 8 256x256 bitmaps; in the games supported, every pair of
|
||||
bitmaps is interleaved horizontally to form 4 higher res 512x256 layer.
|
||||
|
||||
The blitter reads compressed data from ROM and copies it to the bitmap RAM.
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
#include "emu.h"
|
||||
#include "includes/hnayayoi.h"
|
||||
|
||||
void hnayayoi_state::common_vh_start( int num_pixmaps )
|
||||
{
|
||||
for (int i = 0; i < num_pixmaps; i++)
|
||||
{
|
||||
m_pixmap[i] = make_unique_clear<uint8_t[]>(256 * 256);
|
||||
save_pointer(NAME(m_pixmap[i]), 256 * 256, i);
|
||||
}
|
||||
}
|
||||
|
||||
void hnayayoi_state::video_start()
|
||||
{
|
||||
common_vh_start(4); /* 4 bitmaps -> 2 layers */
|
||||
}
|
||||
|
||||
VIDEO_START_MEMBER(hnayayoi_state,untoucha)
|
||||
{
|
||||
common_vh_start(8); /* 8 bitmaps -> 4 layers */
|
||||
}
|
||||
|
||||
|
||||
|
||||
/***************************************************************************
|
||||
|
||||
Blitter support
|
||||
|
||||
three parameters:
|
||||
blit_layer: mask of the bitmaps to write to (can write to multiple bitmaps
|
||||
at the same time)
|
||||
blit_dest: position in the destination bitmap where to start blitting
|
||||
blit_src: address of source data in the gfx ROM
|
||||
|
||||
additional parameters specify the palette base, but this is handled while rendering
|
||||
the screen, not during blitting (games change the palette base without redrawing
|
||||
the screen).
|
||||
|
||||
It is not known whether the palette base control registers are part of the blitter
|
||||
hardware or latched somewhere else. Since they are mapped in memory immediately
|
||||
before the bitter parameters, they probably are part of the blitter, but I'm
|
||||
handling them separately anyway.
|
||||
|
||||
|
||||
The format of the blitter data stored in ROM is very simple:
|
||||
|
||||
7654 ---- Pen to draw with
|
||||
---- 3210 Command
|
||||
|
||||
Commands:
|
||||
|
||||
0 Stop
|
||||
1-b Draw 1-b pixels along X.
|
||||
c Followed by 1 byte (N): draw N pixels along X.
|
||||
d Followed by 2 bytes (X,N): move on the line to pixel (start+X), draw N pixels
|
||||
along X.
|
||||
e Followed by 1 byte (N): set blit_layer = N. Used to draw interleaved graphics
|
||||
with a single blitter run.
|
||||
f Move to next line.
|
||||
|
||||
At the end of the blit, blit_src is left pointing to the next data in the gfx ROM.
|
||||
This is used to draw interleaved graphics with two blitter runs without having to set
|
||||
up blit_src for the second call.
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
void hnayayoi_state::dynax_blitter_rev1_param_w(offs_t offset, uint8_t data)
|
||||
{
|
||||
switch (offset)
|
||||
{
|
||||
case 0: m_blit_dest = (m_blit_dest & 0xff00) | (data << 0); break;
|
||||
case 1: m_blit_dest = (m_blit_dest & 0x00ff) | (data << 8); break;
|
||||
case 2: m_blit_layer = data; break;
|
||||
case 3: m_blit_src = (m_blit_src & 0xffff00) | (data << 0); break;
|
||||
case 4: m_blit_src = (m_blit_src & 0xff00ff) | (data << 8); break;
|
||||
case 5: m_blit_src = (m_blit_src & 0x00ffff) | (data <<16); break;
|
||||
}
|
||||
}
|
||||
|
||||
void hnayayoi_state::copy_pixel( int x, int y, int pen )
|
||||
{
|
||||
if (x >= 0 && x <= 255 && y >= 0 && y <= 255)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < 8; i++)
|
||||
{
|
||||
if ((~m_blit_layer & (1 << i)) && (m_pixmap[i]))
|
||||
m_pixmap[i][256 * y + x] = pen;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void hnayayoi_state::dynax_blitter_rev1_start_w(uint8_t data)
|
||||
{
|
||||
uint8_t *rom = memregion("gfx1")->base();
|
||||
int romlen = memregion("gfx1")->bytes();
|
||||
int sx = m_blit_dest & 0xff;
|
||||
int sy = m_blit_dest >> 8;
|
||||
int x = sx;
|
||||
int y = sy;
|
||||
while (m_blit_src < romlen)
|
||||
{
|
||||
int cmd = rom[m_blit_src] & 0x0f;
|
||||
int pen = rom[m_blit_src] >> 4;
|
||||
|
||||
m_blit_src++;
|
||||
|
||||
switch (cmd)
|
||||
{
|
||||
case 0xf:
|
||||
y++;
|
||||
x = sx;
|
||||
break;
|
||||
|
||||
case 0xe:
|
||||
if (m_blit_src >= romlen)
|
||||
{
|
||||
popmessage("GFXROM OVER %06x", m_blit_src);
|
||||
return;
|
||||
}
|
||||
x = sx;
|
||||
m_blit_layer = rom[m_blit_src++];
|
||||
break;
|
||||
|
||||
case 0xd:
|
||||
if (m_blit_src >= romlen)
|
||||
{
|
||||
popmessage("GFXROM OVER %06x", m_blit_src);
|
||||
return;
|
||||
}
|
||||
x = sx + rom[m_blit_src++];
|
||||
[[fallthrough]];
|
||||
case 0xc:
|
||||
if (m_blit_src >= romlen)
|
||||
{
|
||||
popmessage("GFXROM OVER %06x", m_blit_src);
|
||||
return;
|
||||
}
|
||||
cmd = rom[m_blit_src++];
|
||||
[[fallthrough]];
|
||||
case 0xb:
|
||||
case 0xa:
|
||||
case 0x9:
|
||||
case 0x8:
|
||||
case 0x7:
|
||||
case 0x6:
|
||||
case 0x5:
|
||||
case 0x4:
|
||||
case 0x3:
|
||||
case 0x2:
|
||||
case 0x1:
|
||||
while (cmd--)
|
||||
copy_pixel(x++, y, pen);
|
||||
break;
|
||||
|
||||
case 0x0:
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
popmessage("GFXROM OVER %06x", m_blit_src);
|
||||
}
|
||||
|
||||
void hnayayoi_state::dynax_blitter_rev1_clear_w(uint8_t data)
|
||||
{
|
||||
int pen = data >> 4;
|
||||
|
||||
for (int i = 0; i < 8; i++)
|
||||
{
|
||||
if ((~m_blit_layer & (1 << i)) && (m_pixmap[i]))
|
||||
std::fill(&m_pixmap[i][m_blit_dest], &m_pixmap[i][0x10000], pen);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void hnayayoi_state::hnayayoi_palbank_w(offs_t offset, uint8_t data)
|
||||
{
|
||||
offset *= 8;
|
||||
m_palbank = (m_palbank & (0xff00 >> offset)) | (data << offset);
|
||||
}
|
||||
|
||||
|
||||
void hnayayoi_state::draw_layer_interleaved(bitmap_rgb32 &bitmap, const rectangle &cliprect, uint16_t row, uint16_t y, uint8_t x_count, int left_pixmap, int right_pixmap, int palbase, bool transp)
|
||||
{
|
||||
uint8_t *src1 = &m_pixmap[left_pixmap][(row & 255) * 256];
|
||||
uint8_t *src2 = &m_pixmap[right_pixmap][(row & 255) * 256];
|
||||
uint32_t *dst = &bitmap.pix(y);
|
||||
|
||||
const pen_t *pal = &m_palette->pens()[palbase * 16];
|
||||
|
||||
if (transp)
|
||||
{
|
||||
for (int countx = x_count * 2 - 1; countx >= 0; countx--, dst += 2)
|
||||
{
|
||||
int pen = *(src1++);
|
||||
if (pen) *dst = pal[pen];
|
||||
pen = *(src2++);
|
||||
if (pen) *(dst + 1) = pal[pen];
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
for (int countx = x_count * 2 - 1; countx >= 0; countx--, dst += 2)
|
||||
{
|
||||
*dst = pal[*(src1++)];
|
||||
*(dst + 1) = pal[*(src2++)];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
MC6845_UPDATE_ROW(hnayayoi_state::hnayayoi_update_row)
|
||||
{
|
||||
int col0 = (m_palbank >> 0) & 0x0f;
|
||||
int col1 = (m_palbank >> 4) & 0x0f;
|
||||
|
||||
draw_layer_interleaved(bitmap, cliprect, y, y, x_count, 3, 2, col1, false);
|
||||
draw_layer_interleaved(bitmap, cliprect, y, y, x_count, 1, 0, col0, true);
|
||||
}
|
||||
|
||||
|
||||
MC6845_UPDATE_ROW(hnayayoi_state::untoucha_update_row)
|
||||
{
|
||||
int col0 = (m_palbank >> 0) & 0x0f;
|
||||
int col1 = (m_palbank >> 4) & 0x0f;
|
||||
int col2 = (m_palbank >> 8) & 0x0f;
|
||||
int col3 = (m_palbank >> 12) & 0x0f;
|
||||
|
||||
draw_layer_interleaved(bitmap, cliprect, y + 16, y, x_count, 7, 6, col3, false);
|
||||
draw_layer_interleaved(bitmap, cliprect, y + 16, y, x_count, 5, 4, col2, true);
|
||||
draw_layer_interleaved(bitmap, cliprect, y + 16, y, x_count, 3, 2, col1, true);
|
||||
draw_layer_interleaved(bitmap, cliprect, y + 16, y, x_count, 1, 0, col0, true);
|
||||
}
|
Loading…
Reference in New Issue
Block a user