trunk/src/mame/drivers/m58.cpp
| r252899 | r252900 | |
| 211 | 211 | |
| 212 | 212 | /* sound hardware */ |
| 213 | 213 | MCFG_DEVICE_ADD("irem_audio", IREM_M52_LARGE_AUDIO, 0) |
| 214 | | |
| 215 | 214 | MACHINE_CONFIG_END |
| 216 | 215 | |
| 217 | 216 | |
| r252899 | r252900 | |
| 222 | 221 | * |
| 223 | 222 | *************************************/ |
| 224 | 223 | |
| 225 | | ROM_START( 10yard ) |
| 226 | | // Dumped from an original Irem M52 board. Serial no. 307761/License Seal 09461. |
| 224 | ROM_START( 10yard ) // Dumped from an original Irem M52 board. Serial no. 307761/License Seal 09461. |
| 227 | 225 | ROM_REGION( 0x10000, "maincpu", 0 ) |
| 228 | 226 | ROM_LOAD( "yf-a-3p-b", 0x0000, 0x2000, CRC(2e205ec2) SHA1(fcfa08f45423b35f2c99d4e6b5474ab1b3a84fec) ) |
| 229 | 227 | ROM_LOAD( "yf-a-3n-b", 0x2000, 0x2000, CRC(82fcd980) SHA1(7846705b29961cb95ee1571ee7e16baceea522d4) ) |
| r252899 | r252900 | |
| 384 | 382 | ROM_LOAD( "yf-b-5j.5j", 0x08000, 0x2000, CRC(713ef31f) SHA1(b48df9ed4f26fded3c7eaac3a52b580b2dd60477) ) |
| 385 | 383 | ROM_LOAD( "yf-b-5k.5k", 0x0a000, 0x2000, CRC(f49651cc) SHA1(5b87d7360bcd5883ec265b2a01a3e02e10a85345) ) |
| 386 | 384 | |
| 387 | | ROM_REGION( 0x0520, "proms", 0 ) |
| 385 | 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? |
| 388 | 386 | ROM_LOAD( "yf-a-5c.5c", 0x0000, 0x0100, CRC(08fa5103) SHA1(98af48dafbbaa42f58232bf74ccbf5da41723e71) ) /* chars palette low 4 bits */ |
| 389 | 387 | ROM_LOAD( "yf-a-5d.5d", 0x0100, 0x0100, CRC(7c04994c) SHA1(790bf1616335b9df4943cffcafa48d8e8aee009e) ) /* chars palette high 4 bits */ |
| 390 | | ROM_LOAD( "yf-b-2b.2b", 0x0200, 0x0020, CRC(fcd283ea) SHA1(6ebc3e966bb920685250f38edab5fe1f8a27c316) ) /* sprites palette */ |
| 388 | ROMX_LOAD( "yf-b-2b.2b", 0x0200, 0x0020, CRC(fcd283ea) SHA1(6ebc3e966bb920685250f38edab5fe1f8a27c316), ROM_GROUPSIZE(16) | ROM_REVERSE ) /* sprites palette */ |
| 391 | 389 | ROM_LOAD( "yf-b-3l.3l", 0x0220, 0x0100, CRC(e1cdfb06) SHA1(a8cc3456cfc272e3faac80370b2298d8e1f8c2fe) ) /* sprites lookup table */ |
| 392 | 390 | ROM_LOAD( "yf-b-2r.2r", 0x0320, 0x0100, CRC(cd85b646) SHA1(5268db705006058eec308afe474f4df3c15465bb) ) /* radar palette low 4 bits */ |
| 393 | 391 | ROM_LOAD( "yf-b-2p.2p", 0x0420, 0x0100, CRC(45384397) SHA1(e4c662ee81aef63efd8b4a45f85c4a78dc2d419e) ) /* radar palette high 4 bits */ |
| r252899 | r252900 | |
| 418 | 416 | ROM_LOAD( "yf-b-5j.5j", 0x08000, 0x2000, CRC(713ef31f) SHA1(b48df9ed4f26fded3c7eaac3a52b580b2dd60477) ) |
| 419 | 417 | ROM_LOAD( "yf-b-5k.5k", 0x0a000, 0x2000, CRC(f49651cc) SHA1(5b87d7360bcd5883ec265b2a01a3e02e10a85345) ) |
| 420 | 418 | |
| 421 | | ROM_REGION( 0x0520, "proms", 0 ) |
| 419 | 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? |
| 422 | 420 | ROM_LOAD( "yf-a-5c.5c", 0x0000, 0x0100, CRC(08fa5103) SHA1(98af48dafbbaa42f58232bf74ccbf5da41723e71) ) /* chars palette low 4 bits */ |
| 423 | 421 | ROM_LOAD( "yf-a-5d.5d", 0x0100, 0x0100, CRC(7c04994c) SHA1(790bf1616335b9df4943cffcafa48d8e8aee009e) ) /* chars palette high 4 bits */ |
| 424 | | ROM_LOAD( "yf-b-2b.2b", 0x0200, 0x0020, CRC(fcd283ea) SHA1(6ebc3e966bb920685250f38edab5fe1f8a27c316) ) /* sprites palette */ |
| 422 | ROMX_LOAD( "yf-b-2b.2b", 0x0200, 0x0020, CRC(fcd283ea) SHA1(6ebc3e966bb920685250f38edab5fe1f8a27c316), ROM_GROUPSIZE(16) | ROM_REVERSE ) /* sprites palette */ |
| 425 | 423 | ROM_LOAD( "yf-b-3l.3l", 0x0220, 0x0100, CRC(e1cdfb06) SHA1(a8cc3456cfc272e3faac80370b2298d8e1f8c2fe) ) /* sprites lookup table */ |
| 426 | 424 | ROM_LOAD( "yf-b-2r.2r", 0x0320, 0x0100, CRC(cd85b646) SHA1(5268db705006058eec308afe474f4df3c15465bb) ) /* radar palette low 4 bits */ |
| 427 | 425 | ROM_LOAD( "yf-b-2p.2p", 0x0420, 0x0100, CRC(45384397) SHA1(e4c662ee81aef63efd8b4a45f85c4a78dc2d419e) ) /* radar palette high 4 bits */ |
| 428 | 426 | ROM_END |
| 429 | 427 | |
| 430 | | /************************************* |
| 431 | | * |
| 432 | | * Game drivers |
| 433 | | * |
| 434 | | *************************************/ |
| 435 | 428 | |
| 436 | | DRIVER_INIT_MEMBER(m58_state,yard85) |
| 437 | | { |
| 438 | | // on these sets the content of the sprite color PROM needs reversing |
| 439 | | // are the proms on the other sets from bootleg boards, or hand modified? |
| 440 | | std::unique_ptr<UINT8[]> buffer = std::make_unique<UINT8[]>(0x10); |
| 441 | | UINT8* region = memregion("proms")->base(); |
| 442 | | int i; |
| 443 | | |
| 444 | | for (i=0;i<0x10;i++) |
| 445 | | { |
| 446 | | buffer[i] = region[0x20f-i]; |
| 447 | | } |
| 448 | | memcpy(region+0x200, buffer.get(), 0x10); |
| 449 | | m_palette->update(); |
| 450 | | } |
| 451 | | |
| 452 | | GAME( 1983, 10yard, 0, yard, yard, driver_device, 0, ROT0, "Irem", "10-Yard Fight (World, set 1)", MACHINE_SUPPORTS_SAVE ) // no copyright |
| 453 | | GAME( 1983, 10yardj, 10yard, yard, yard, driver_device, 0, ROT0, "Irem", "10-Yard Fight (Japan)", MACHINE_SUPPORTS_SAVE ) |
| 454 | | GAME( 1984, vs10yard, 10yard, yard, vs10yard, driver_device, 0, ROT0, "Irem", "Vs 10-Yard Fight (World, 11/05/84)", MACHINE_SUPPORTS_SAVE ) |
| 455 | | GAME( 1984, vs10yardj,10yard, yard, vs10yarj, driver_device, 0, ROT0, "Irem", "Vs 10-Yard Fight (Japan)", MACHINE_SUPPORTS_SAVE ) |
| 456 | | 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 |
| 457 | | GAME( 1985, 10yard85, 10yard, yard, yard, m58_state, yard85, ROT0, "Irem (Taito license)", "10-Yard Fight '85 (US, Taito license)", MACHINE_SUPPORTS_SAVE ) |
| 429 | /* YEAR NAME PARENT MACHINE INPUT INIT MONITOR, COMPANY, FULLNAME, FLAGS */ |
| 430 | GAME( 1983, 10yard, 0, yard, yard, driver_device, 0, ROT0, "Irem", "10-Yard Fight (World, set 1)", MACHINE_SUPPORTS_SAVE ) // no copyright |
| 431 | GAME( 1983, 10yardj, 10yard, yard, yard, driver_device, 0, ROT0, "Irem", "10-Yard Fight (Japan)", MACHINE_SUPPORTS_SAVE ) |
| 432 | GAME( 1984, vs10yard, 10yard, yard, vs10yard, driver_device, 0, ROT0, "Irem", "Vs 10-Yard Fight (World, 11/05/84)", MACHINE_SUPPORTS_SAVE ) |
| 433 | GAME( 1984, vs10yardj, 10yard, yard, vs10yarj, driver_device, 0, ROT0, "Irem", "Vs 10-Yard Fight (Japan)", MACHINE_SUPPORTS_SAVE ) |
| 434 | 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 |
| 435 | GAME( 1985, 10yard85, 10yard, yard, yard, driver_device, 0, ROT0, "Irem (Taito license)", "10-Yard Fight '85 (US, Taito license)", MACHINE_SUPPORTS_SAVE ) |
trunk/src/mame/video/m58.cpp
| r252899 | r252900 | |
| 11 | 11 | #include "video/resnet.h" |
| 12 | 12 | #include "includes/m58.h" |
| 13 | 13 | |
| 14 | | #define SCROLL_PANEL_WIDTH (14*4) |
| 15 | | #define RADAR_PALETTE_BASE (256) |
| 16 | 14 | |
| 17 | 15 | |
| 18 | | |
| 19 | 16 | /************************************* |
| 20 | 17 | * |
| 21 | 18 | * Palette configuration |
| r252899 | r252900 | |
| 114 | 111 | |
| 115 | 112 | WRITE8_MEMBER(m58_state::scroll_panel_w) |
| 116 | 113 | { |
| 117 | | int sx,sy,i; |
| 114 | int sx = ( offset % 16 ); |
| 115 | int sy = ( offset / 16 ); |
| 118 | 116 | |
| 119 | | sx = ( offset % 16 ); |
| 120 | | sy = ( offset / 16 ); |
| 121 | | |
| 122 | 117 | if (sx < 1 || sx > 14) |
| 123 | 118 | return; |
| 124 | 119 | |
| 125 | 120 | sx = 4 * (sx - 1); |
| 126 | 121 | |
| 127 | | for (i = 0;i < 4;i++) |
| 122 | for (int i = 0;i < 4;i++) |
| 128 | 123 | { |
| 129 | 124 | int col; |
| 130 | 125 | |
| 131 | 126 | col = (data >> i) & 0x11; |
| 132 | 127 | col = ((col >> 3) | col) & 3; |
| 133 | 128 | |
| 134 | | m_scroll_panel_bitmap.pix16(sy, sx + i) = RADAR_PALETTE_BASE + (sy & 0xfc) + col; |
| 129 | m_scroll_panel_bitmap.pix16(sy, sx + i) = 0x100 + (sy & 0xfc) + col; |
| 135 | 130 | } |
| 136 | 131 | } |
| 137 | 132 | |
| r252899 | r252900 | |
| 178 | 173 | int height = m_screen->height(); |
| 179 | 174 | const rectangle &visarea = m_screen->visible_area(); |
| 180 | 175 | |
| 181 | | 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); |
| 176 | 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); |
| 182 | 177 | m_bg_tilemap->set_scrolldx(visarea.min_x, width - (visarea.max_x + 1)); |
| 183 | 178 | m_bg_tilemap->set_scrolldy(visarea.min_y - 8, height + 16 - (visarea.max_y + 1)); |
| 184 | 179 | |
| 185 | | //m_scroll_panel_bitmap = std::make_unique<bitmap_ind16>(SCROLL_PANEL_WIDTH, height); |
| 186 | 180 | m_screen->register_screen_bitmap(m_scroll_panel_bitmap); |
| 187 | 181 | save_item(NAME(m_scroll_panel_bitmap)); |
| 188 | 182 | } |
| r252899 | r252900 | |
| 212 | 206 | * |
| 213 | 207 | *************************************/ |
| 214 | 208 | |
| 215 | | #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)); |
| 216 | | |
| 217 | 209 | void m58_state::draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect ) |
| 218 | 210 | { |
| 219 | | int offs; |
| 220 | 211 | const rectangle &visarea = m_screen->visible_area(); |
| 221 | 212 | |
| 222 | | for (offs = m_spriteram.bytes() - 4; offs >= 0; offs -= 4) |
| 213 | for (int offs = m_spriteram.bytes() - 4; offs >= 0; offs -= 4) |
| 223 | 214 | { |
| 224 | 215 | int attr = m_spriteram[offs + 1]; |
| 225 | 216 | int bank = (attr & 0x20) >> 5; |
| r252899 | r252900 | |
| 254 | 245 | { |
| 255 | 246 | sy2 = sy1 + 0x10; |
| 256 | 247 | } |
| 257 | | |
| 258 | | DRAW_SPRITE(code1 + 256 * bank, visarea.min_y + sy1) |
| 259 | | DRAW_SPRITE(code2 + 256 * bank, visarea.min_y + sy2) |
| 248 | |
| 249 | m_gfxdecode->gfx(1)->transmask(bitmap, cliprect, |
| 250 | code1 + 256 * bank, color, |
| 251 | flipx, flipy, sx, visarea.min_y + sy1, |
| 252 | m_palette->transpen_mask(*m_gfxdecode->gfx(1), color, 512) |
| 253 | ); |
| 254 | m_gfxdecode->gfx(1)->transmask(bitmap, cliprect, |
| 255 | code2 + 256 * bank, color, |
| 256 | flipx, flipy, sx, visarea.min_y + sy2, |
| 257 | m_palette->transpen_mask(*m_gfxdecode->gfx(1), color, 512) |
| 258 | ); |
| 260 | 259 | } |
| 261 | 260 | } |
| 262 | 261 | |
| r252899 | r252900 | |
| 276 | 275 | const rectangle clippanelflip(0*8, 6*8-1, 1*8, 31*8-1); |
| 277 | 276 | rectangle clip = flip_screen() ? clippanelflip : clippanel; |
| 278 | 277 | const rectangle &visarea = m_screen->visible_area(); |
| 279 | | int sx = flip_screen() ? cliprect.min_x - 8 : cliprect.max_x + 1 - SCROLL_PANEL_WIDTH; |
| 278 | int sx = flip_screen() ? cliprect.min_x - 8 : cliprect.max_x + 1 - 14*4; |
| 280 | 279 | int yoffs = flip_screen() ? -40 : -16; |
| 281 | 280 | |
| 282 | 281 | clip.min_y += visarea.min_y + yoffs; |
| 283 | 282 | clip.max_y += visarea.max_y + yoffs; |
| 284 | 283 | clip &= cliprect; |
| 285 | 284 | |
| 286 | | copybitmap(bitmap, m_scroll_panel_bitmap, flip_screen(), flip_screen(), |
| 287 | | sx, visarea.min_y + yoffs, clip); |
| 285 | copybitmap(bitmap, m_scroll_panel_bitmap, flip_screen(), flip_screen(), sx, visarea.min_y + yoffs, clip); |
| 288 | 286 | } |
| 289 | 287 | } |
| 290 | 288 | |