mirror of
https://github.com/holub/mame
synced 2025-04-23 00:39:36 +03:00
Merge branch 'master' of https://github.com/mamedev/mame
This commit is contained in:
commit
50755482d5
@ -211,7 +211,6 @@ static MACHINE_CONFIG_START( yard, m58_state )
|
||||
|
||||
/* sound hardware */
|
||||
MCFG_DEVICE_ADD("irem_audio", IREM_M52_LARGE_AUDIO, 0)
|
||||
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
|
||||
@ -222,8 +221,7 @@ MACHINE_CONFIG_END
|
||||
*
|
||||
*************************************/
|
||||
|
||||
ROM_START( 10yard )
|
||||
// Dumped from an original Irem M52 board. Serial no. 307761/License Seal 09461.
|
||||
ROM_START( 10yard ) // Dumped from an original Irem M52 board. Serial no. 307761/License Seal 09461.
|
||||
ROM_REGION( 0x10000, "maincpu", 0 )
|
||||
ROM_LOAD( "yf-a-3p-b", 0x0000, 0x2000, CRC(2e205ec2) SHA1(fcfa08f45423b35f2c99d4e6b5474ab1b3a84fec) )
|
||||
ROM_LOAD( "yf-a-3n-b", 0x2000, 0x2000, CRC(82fcd980) SHA1(7846705b29961cb95ee1571ee7e16baceea522d4) )
|
||||
@ -384,10 +382,10 @@ ROM_START( vs10yardu )
|
||||
ROM_LOAD( "yf-b-5j.5j", 0x08000, 0x2000, CRC(713ef31f) SHA1(b48df9ed4f26fded3c7eaac3a52b580b2dd60477) )
|
||||
ROM_LOAD( "yf-b-5k.5k", 0x0a000, 0x2000, CRC(f49651cc) SHA1(5b87d7360bcd5883ec265b2a01a3e02e10a85345) )
|
||||
|
||||
ROM_REGION( 0x0520, "proms", 0 )
|
||||
ROM_REGION( 0x0520, "proms", 0 ) // on these sets the content of the sprite color PROM needs reversing - are the proms on the other sets from bootleg boards, or hand modified?
|
||||
ROM_LOAD( "yf-a-5c.5c", 0x0000, 0x0100, CRC(08fa5103) SHA1(98af48dafbbaa42f58232bf74ccbf5da41723e71) ) /* chars palette low 4 bits */
|
||||
ROM_LOAD( "yf-a-5d.5d", 0x0100, 0x0100, CRC(7c04994c) SHA1(790bf1616335b9df4943cffcafa48d8e8aee009e) ) /* chars palette high 4 bits */
|
||||
ROM_LOAD( "yf-b-2b.2b", 0x0200, 0x0020, CRC(fcd283ea) SHA1(6ebc3e966bb920685250f38edab5fe1f8a27c316) ) /* sprites palette */
|
||||
ROMX_LOAD( "yf-b-2b.2b", 0x0200, 0x0020, CRC(fcd283ea) SHA1(6ebc3e966bb920685250f38edab5fe1f8a27c316), ROM_GROUPSIZE(16) | ROM_REVERSE ) /* sprites palette */
|
||||
ROM_LOAD( "yf-b-3l.3l", 0x0220, 0x0100, CRC(e1cdfb06) SHA1(a8cc3456cfc272e3faac80370b2298d8e1f8c2fe) ) /* sprites lookup table */
|
||||
ROM_LOAD( "yf-b-2r.2r", 0x0320, 0x0100, CRC(cd85b646) SHA1(5268db705006058eec308afe474f4df3c15465bb) ) /* radar palette low 4 bits */
|
||||
ROM_LOAD( "yf-b-2p.2p", 0x0420, 0x0100, CRC(45384397) SHA1(e4c662ee81aef63efd8b4a45f85c4a78dc2d419e) ) /* radar palette high 4 bits */
|
||||
@ -418,40 +416,20 @@ ROM_START( 10yard85 )
|
||||
ROM_LOAD( "yf-b-5j.5j", 0x08000, 0x2000, CRC(713ef31f) SHA1(b48df9ed4f26fded3c7eaac3a52b580b2dd60477) )
|
||||
ROM_LOAD( "yf-b-5k.5k", 0x0a000, 0x2000, CRC(f49651cc) SHA1(5b87d7360bcd5883ec265b2a01a3e02e10a85345) )
|
||||
|
||||
ROM_REGION( 0x0520, "proms", 0 )
|
||||
ROM_REGION( 0x0520, "proms", 0 ) // on these sets the content of the sprite color PROM needs reversing - are the proms on the other sets from bootleg boards, or hand modified?
|
||||
ROM_LOAD( "yf-a-5c.5c", 0x0000, 0x0100, CRC(08fa5103) SHA1(98af48dafbbaa42f58232bf74ccbf5da41723e71) ) /* chars palette low 4 bits */
|
||||
ROM_LOAD( "yf-a-5d.5d", 0x0100, 0x0100, CRC(7c04994c) SHA1(790bf1616335b9df4943cffcafa48d8e8aee009e) ) /* chars palette high 4 bits */
|
||||
ROM_LOAD( "yf-b-2b.2b", 0x0200, 0x0020, CRC(fcd283ea) SHA1(6ebc3e966bb920685250f38edab5fe1f8a27c316) ) /* sprites palette */
|
||||
ROMX_LOAD( "yf-b-2b.2b", 0x0200, 0x0020, CRC(fcd283ea) SHA1(6ebc3e966bb920685250f38edab5fe1f8a27c316), ROM_GROUPSIZE(16) | ROM_REVERSE ) /* sprites palette */
|
||||
ROM_LOAD( "yf-b-3l.3l", 0x0220, 0x0100, CRC(e1cdfb06) SHA1(a8cc3456cfc272e3faac80370b2298d8e1f8c2fe) ) /* sprites lookup table */
|
||||
ROM_LOAD( "yf-b-2r.2r", 0x0320, 0x0100, CRC(cd85b646) SHA1(5268db705006058eec308afe474f4df3c15465bb) ) /* radar palette low 4 bits */
|
||||
ROM_LOAD( "yf-b-2p.2p", 0x0420, 0x0100, CRC(45384397) SHA1(e4c662ee81aef63efd8b4a45f85c4a78dc2d419e) ) /* radar palette high 4 bits */
|
||||
ROM_END
|
||||
|
||||
/*************************************
|
||||
*
|
||||
* Game drivers
|
||||
*
|
||||
*************************************/
|
||||
|
||||
DRIVER_INIT_MEMBER(m58_state,yard85)
|
||||
{
|
||||
// on these sets the content of the sprite color PROM needs reversing
|
||||
// are the proms on the other sets from bootleg boards, or hand modified?
|
||||
std::unique_ptr<UINT8[]> buffer = std::make_unique<UINT8[]>(0x10);
|
||||
UINT8* region = memregion("proms")->base();
|
||||
int i;
|
||||
|
||||
for (i=0;i<0x10;i++)
|
||||
{
|
||||
buffer[i] = region[0x20f-i];
|
||||
}
|
||||
memcpy(region+0x200, buffer.get(), 0x10);
|
||||
m_palette->update();
|
||||
}
|
||||
|
||||
GAME( 1983, 10yard, 0, yard, yard, driver_device, 0, ROT0, "Irem", "10-Yard Fight (World, set 1)", MACHINE_SUPPORTS_SAVE ) // no copyright
|
||||
GAME( 1983, 10yardj, 10yard, yard, yard, driver_device, 0, ROT0, "Irem", "10-Yard Fight (Japan)", MACHINE_SUPPORTS_SAVE )
|
||||
GAME( 1984, vs10yard, 10yard, yard, vs10yard, driver_device, 0, ROT0, "Irem", "Vs 10-Yard Fight (World, 11/05/84)", MACHINE_SUPPORTS_SAVE )
|
||||
GAME( 1984, vs10yardj,10yard, yard, vs10yarj, driver_device, 0, ROT0, "Irem", "Vs 10-Yard Fight (Japan)", MACHINE_SUPPORTS_SAVE )
|
||||
GAME( 1984, vs10yardu,10yard, yard, vs10yard, m58_state, yard85, ROT0, "Irem (Taito license)", "Vs 10-Yard Fight (US, Taito license)", MACHINE_SUPPORTS_SAVE ) // had '85 stickers, but doesn't have '85 on the title screen like the set below
|
||||
GAME( 1985, 10yard85, 10yard, yard, yard, m58_state, yard85, ROT0, "Irem (Taito license)", "10-Yard Fight '85 (US, Taito license)", MACHINE_SUPPORTS_SAVE )
|
||||
/* YEAR NAME PARENT MACHINE INPUT INIT MONITOR, COMPANY, FULLNAME, FLAGS */
|
||||
GAME( 1983, 10yard, 0, yard, yard, driver_device, 0, ROT0, "Irem", "10-Yard Fight (World, set 1)", MACHINE_SUPPORTS_SAVE ) // no copyright
|
||||
GAME( 1983, 10yardj, 10yard, yard, yard, driver_device, 0, ROT0, "Irem", "10-Yard Fight (Japan)", MACHINE_SUPPORTS_SAVE )
|
||||
GAME( 1984, vs10yard, 10yard, yard, vs10yard, driver_device, 0, ROT0, "Irem", "Vs 10-Yard Fight (World, 11/05/84)", MACHINE_SUPPORTS_SAVE )
|
||||
GAME( 1984, vs10yardj, 10yard, yard, vs10yarj, driver_device, 0, ROT0, "Irem", "Vs 10-Yard Fight (Japan)", MACHINE_SUPPORTS_SAVE )
|
||||
GAME( 1984, vs10yardu, 10yard, yard, vs10yard, driver_device, 0, ROT0, "Irem (Taito license)", "Vs 10-Yard Fight (US, Taito license)", MACHINE_SUPPORTS_SAVE ) // had '85 stickers, but doesn't have '85 on the title screen like the set below
|
||||
GAME( 1985, 10yard85, 10yard, yard, yard, driver_device, 0, ROT0, "Irem (Taito license)", "10-Yard Fight '85 (US, Taito license)", MACHINE_SUPPORTS_SAVE )
|
||||
|
@ -1,6 +1,12 @@
|
||||
// license:BSD-3-Clause
|
||||
// copyright-holders:Lee Taylor
|
||||
// thanks-to:John Clegg
|
||||
/****************************************************************************
|
||||
|
||||
Irem M58 hardware
|
||||
|
||||
****************************************************************************/
|
||||
|
||||
class m58_state : public driver_device
|
||||
{
|
||||
public:
|
||||
@ -15,7 +21,8 @@ public:
|
||||
m_scroll_x_low(*this, "scroll_x_low"),
|
||||
m_scroll_x_high(*this, "scroll_x_high"),
|
||||
m_scroll_y_low(*this, "scroll_y_low"),
|
||||
m_score_panel_disabled(*this, "score_disable") { }
|
||||
m_score_panel_disabled(*this, "score_disable")
|
||||
{ }
|
||||
|
||||
/* devices */
|
||||
required_device<cpu_device> m_maincpu;
|
||||
@ -32,14 +39,13 @@ public:
|
||||
required_shared_ptr<UINT8> m_score_panel_disabled;
|
||||
|
||||
/* video-related */
|
||||
tilemap_t* m_bg_tilemap;
|
||||
bitmap_ind16 m_scroll_panel_bitmap;
|
||||
tilemap_t* m_bg_tilemap;
|
||||
bitmap_ind16 m_scroll_panel_bitmap;
|
||||
|
||||
DECLARE_WRITE8_MEMBER(videoram_w);
|
||||
DECLARE_WRITE8_MEMBER(scroll_panel_w);
|
||||
DECLARE_WRITE8_MEMBER(flipscreen_w);
|
||||
|
||||
DECLARE_DRIVER_INIT(yard85);
|
||||
virtual void video_start() override;
|
||||
DECLARE_PALETTE_INIT(m58);
|
||||
|
||||
|
@ -11,9 +11,6 @@
|
||||
#include "video/resnet.h"
|
||||
#include "includes/m58.h"
|
||||
|
||||
#define SCROLL_PANEL_WIDTH (14*4)
|
||||
#define RADAR_PALETTE_BASE (256)
|
||||
|
||||
|
||||
|
||||
/*************************************
|
||||
@ -114,24 +111,22 @@ WRITE8_MEMBER(m58_state::videoram_w)
|
||||
|
||||
WRITE8_MEMBER(m58_state::scroll_panel_w)
|
||||
{
|
||||
int sx,sy,i;
|
||||
|
||||
sx = ( offset % 16 );
|
||||
sy = ( offset / 16 );
|
||||
int sx = ( offset % 16 );
|
||||
int sy = ( offset / 16 );
|
||||
|
||||
if (sx < 1 || sx > 14)
|
||||
return;
|
||||
|
||||
sx = 4 * (sx - 1);
|
||||
|
||||
for (i = 0;i < 4;i++)
|
||||
for (int i = 0;i < 4;i++)
|
||||
{
|
||||
int col;
|
||||
|
||||
col = (data >> i) & 0x11;
|
||||
col = ((col >> 3) | col) & 3;
|
||||
|
||||
m_scroll_panel_bitmap.pix16(sy, sx + i) = RADAR_PALETTE_BASE + (sy & 0xfc) + col;
|
||||
m_scroll_panel_bitmap.pix16(sy, sx + i) = 0x100 + (sy & 0xfc) + col;
|
||||
}
|
||||
}
|
||||
|
||||
@ -178,11 +173,10 @@ void m58_state::video_start()
|
||||
int height = m_screen->height();
|
||||
const rectangle &visarea = m_screen->visible_area();
|
||||
|
||||
m_bg_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(m58_state::get_bg_tile_info),this), tilemap_mapper_delegate(FUNC(m58_state::tilemap_scan_rows),this), 8, 8, 64, 32);
|
||||
m_bg_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(m58_state::get_bg_tile_info),this), tilemap_mapper_delegate(FUNC(m58_state::tilemap_scan_rows),this), 8, 8, 64, 32);
|
||||
m_bg_tilemap->set_scrolldx(visarea.min_x, width - (visarea.max_x + 1));
|
||||
m_bg_tilemap->set_scrolldy(visarea.min_y - 8, height + 16 - (visarea.max_y + 1));
|
||||
|
||||
//m_scroll_panel_bitmap = std::make_unique<bitmap_ind16>(SCROLL_PANEL_WIDTH, height);
|
||||
m_screen->register_screen_bitmap(m_scroll_panel_bitmap);
|
||||
save_item(NAME(m_scroll_panel_bitmap));
|
||||
}
|
||||
@ -212,14 +206,11 @@ WRITE8_MEMBER(m58_state::flipscreen_w)
|
||||
*
|
||||
*************************************/
|
||||
|
||||
#define DRAW_SPRITE(code, sy) m_gfxdecode->gfx(1)->transmask(bitmap,cliprect, code, color, flipx, flipy, sx, sy, m_palette->transpen_mask(*m_gfxdecode->gfx(1), color, 512));
|
||||
|
||||
void m58_state::draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect )
|
||||
{
|
||||
int offs;
|
||||
const rectangle &visarea = m_screen->visible_area();
|
||||
|
||||
for (offs = m_spriteram.bytes() - 4; offs >= 0; offs -= 4)
|
||||
for (int offs = m_spriteram.bytes() - 4; offs >= 0; offs -= 4)
|
||||
{
|
||||
int attr = m_spriteram[offs + 1];
|
||||
int bank = (attr & 0x20) >> 5;
|
||||
@ -254,9 +245,17 @@ void m58_state::draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect )
|
||||
{
|
||||
sy2 = sy1 + 0x10;
|
||||
}
|
||||
|
||||
DRAW_SPRITE(code1 + 256 * bank, visarea.min_y + sy1)
|
||||
DRAW_SPRITE(code2 + 256 * bank, visarea.min_y + sy2)
|
||||
|
||||
m_gfxdecode->gfx(1)->transmask(bitmap, cliprect,
|
||||
code1 + 256 * bank, color,
|
||||
flipx, flipy, sx, visarea.min_y + sy1,
|
||||
m_palette->transpen_mask(*m_gfxdecode->gfx(1), color, 512)
|
||||
);
|
||||
m_gfxdecode->gfx(1)->transmask(bitmap, cliprect,
|
||||
code2 + 256 * bank, color,
|
||||
flipx, flipy, sx, visarea.min_y + sy2,
|
||||
m_palette->transpen_mask(*m_gfxdecode->gfx(1), color, 512)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@ -276,15 +275,14 @@ void m58_state::draw_panel( bitmap_ind16 &bitmap, const rectangle &cliprect )
|
||||
const rectangle clippanelflip(0*8, 6*8-1, 1*8, 31*8-1);
|
||||
rectangle clip = flip_screen() ? clippanelflip : clippanel;
|
||||
const rectangle &visarea = m_screen->visible_area();
|
||||
int sx = flip_screen() ? cliprect.min_x - 8 : cliprect.max_x + 1 - SCROLL_PANEL_WIDTH;
|
||||
int sx = flip_screen() ? cliprect.min_x - 8 : cliprect.max_x + 1 - 14*4;
|
||||
int yoffs = flip_screen() ? -40 : -16;
|
||||
|
||||
clip.min_y += visarea.min_y + yoffs;
|
||||
clip.max_y += visarea.max_y + yoffs;
|
||||
clip &= cliprect;
|
||||
|
||||
copybitmap(bitmap, m_scroll_panel_bitmap, flip_screen(), flip_screen(),
|
||||
sx, visarea.min_y + yoffs, clip);
|
||||
copybitmap(bitmap, m_scroll_panel_bitmap, flip_screen(), flip_screen(), sx, visarea.min_y + yoffs, clip);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user