trunk/src/mame/drivers/m58.cpp
| r252900 | r252901 | |
| 211 | 211 | |
| 212 | 212 | /* sound hardware */ |
| 213 | 213 | MCFG_DEVICE_ADD("irem_audio", IREM_M52_LARGE_AUDIO, 0) |
| 214 | |
| 214 | 215 | MACHINE_CONFIG_END |
| 215 | 216 | |
| 216 | 217 | |
| r252900 | r252901 | |
| 221 | 222 | * |
| 222 | 223 | *************************************/ |
| 223 | 224 | |
| 224 | | ROM_START( 10yard ) // Dumped from an original Irem M52 board. Serial no. 307761/License Seal 09461. |
| 225 | ROM_START( 10yard ) |
| 226 | // Dumped from an original Irem M52 board. Serial no. 307761/License Seal 09461. |
| 225 | 227 | ROM_REGION( 0x10000, "maincpu", 0 ) |
| 226 | 228 | ROM_LOAD( "yf-a-3p-b", 0x0000, 0x2000, CRC(2e205ec2) SHA1(fcfa08f45423b35f2c99d4e6b5474ab1b3a84fec) ) |
| 227 | 229 | ROM_LOAD( "yf-a-3n-b", 0x2000, 0x2000, CRC(82fcd980) SHA1(7846705b29961cb95ee1571ee7e16baceea522d4) ) |
| r252900 | r252901 | |
| 382 | 384 | ROM_LOAD( "yf-b-5j.5j", 0x08000, 0x2000, CRC(713ef31f) SHA1(b48df9ed4f26fded3c7eaac3a52b580b2dd60477) ) |
| 383 | 385 | ROM_LOAD( "yf-b-5k.5k", 0x0a000, 0x2000, CRC(f49651cc) SHA1(5b87d7360bcd5883ec265b2a01a3e02e10a85345) ) |
| 384 | 386 | |
| 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? |
| 387 | ROM_REGION( 0x0520, "proms", 0 ) |
| 386 | 388 | ROM_LOAD( "yf-a-5c.5c", 0x0000, 0x0100, CRC(08fa5103) SHA1(98af48dafbbaa42f58232bf74ccbf5da41723e71) ) /* chars palette low 4 bits */ |
| 387 | 389 | ROM_LOAD( "yf-a-5d.5d", 0x0100, 0x0100, CRC(7c04994c) SHA1(790bf1616335b9df4943cffcafa48d8e8aee009e) ) /* chars palette high 4 bits */ |
| 388 | | ROMX_LOAD( "yf-b-2b.2b", 0x0200, 0x0020, CRC(fcd283ea) SHA1(6ebc3e966bb920685250f38edab5fe1f8a27c316), ROM_GROUPSIZE(16) | ROM_REVERSE ) /* sprites palette */ |
| 390 | ROM_LOAD( "yf-b-2b.2b", 0x0200, 0x0020, CRC(fcd283ea) SHA1(6ebc3e966bb920685250f38edab5fe1f8a27c316) ) /* sprites palette */ |
| 389 | 391 | ROM_LOAD( "yf-b-3l.3l", 0x0220, 0x0100, CRC(e1cdfb06) SHA1(a8cc3456cfc272e3faac80370b2298d8e1f8c2fe) ) /* sprites lookup table */ |
| 390 | 392 | ROM_LOAD( "yf-b-2r.2r", 0x0320, 0x0100, CRC(cd85b646) SHA1(5268db705006058eec308afe474f4df3c15465bb) ) /* radar palette low 4 bits */ |
| 391 | 393 | ROM_LOAD( "yf-b-2p.2p", 0x0420, 0x0100, CRC(45384397) SHA1(e4c662ee81aef63efd8b4a45f85c4a78dc2d419e) ) /* radar palette high 4 bits */ |
| r252900 | r252901 | |
| 416 | 418 | ROM_LOAD( "yf-b-5j.5j", 0x08000, 0x2000, CRC(713ef31f) SHA1(b48df9ed4f26fded3c7eaac3a52b580b2dd60477) ) |
| 417 | 419 | ROM_LOAD( "yf-b-5k.5k", 0x0a000, 0x2000, CRC(f49651cc) SHA1(5b87d7360bcd5883ec265b2a01a3e02e10a85345) ) |
| 418 | 420 | |
| 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? |
| 421 | ROM_REGION( 0x0520, "proms", 0 ) |
| 420 | 422 | ROM_LOAD( "yf-a-5c.5c", 0x0000, 0x0100, CRC(08fa5103) SHA1(98af48dafbbaa42f58232bf74ccbf5da41723e71) ) /* chars palette low 4 bits */ |
| 421 | 423 | ROM_LOAD( "yf-a-5d.5d", 0x0100, 0x0100, CRC(7c04994c) SHA1(790bf1616335b9df4943cffcafa48d8e8aee009e) ) /* chars palette high 4 bits */ |
| 422 | | ROMX_LOAD( "yf-b-2b.2b", 0x0200, 0x0020, CRC(fcd283ea) SHA1(6ebc3e966bb920685250f38edab5fe1f8a27c316), ROM_GROUPSIZE(16) | ROM_REVERSE ) /* sprites palette */ |
| 424 | ROM_LOAD( "yf-b-2b.2b", 0x0200, 0x0020, CRC(fcd283ea) SHA1(6ebc3e966bb920685250f38edab5fe1f8a27c316) ) /* sprites palette */ |
| 423 | 425 | ROM_LOAD( "yf-b-3l.3l", 0x0220, 0x0100, CRC(e1cdfb06) SHA1(a8cc3456cfc272e3faac80370b2298d8e1f8c2fe) ) /* sprites lookup table */ |
| 424 | 426 | ROM_LOAD( "yf-b-2r.2r", 0x0320, 0x0100, CRC(cd85b646) SHA1(5268db705006058eec308afe474f4df3c15465bb) ) /* radar palette low 4 bits */ |
| 425 | 427 | ROM_LOAD( "yf-b-2p.2p", 0x0420, 0x0100, CRC(45384397) SHA1(e4c662ee81aef63efd8b4a45f85c4a78dc2d419e) ) /* radar palette high 4 bits */ |
| 426 | 428 | ROM_END |
| 427 | 429 | |
| 430 | /************************************* |
| 431 | * |
| 432 | * Game drivers |
| 433 | * |
| 434 | *************************************/ |
| 428 | 435 | |
| 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 ) |
| 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 ) |
trunk/src/mame/video/m58.cpp
| r252900 | r252901 | |
| 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) |
| 14 | 16 | |
| 15 | 17 | |
| 18 | |
| 16 | 19 | /************************************* |
| 17 | 20 | * |
| 18 | 21 | * Palette configuration |
| r252900 | r252901 | |
| 111 | 114 | |
| 112 | 115 | WRITE8_MEMBER(m58_state::scroll_panel_w) |
| 113 | 116 | { |
| 114 | | int sx = ( offset % 16 ); |
| 115 | | int sy = ( offset / 16 ); |
| 117 | int sx,sy,i; |
| 116 | 118 | |
| 119 | sx = ( offset % 16 ); |
| 120 | sy = ( offset / 16 ); |
| 121 | |
| 117 | 122 | if (sx < 1 || sx > 14) |
| 118 | 123 | return; |
| 119 | 124 | |
| 120 | 125 | sx = 4 * (sx - 1); |
| 121 | 126 | |
| 122 | | for (int i = 0;i < 4;i++) |
| 127 | for (i = 0;i < 4;i++) |
| 123 | 128 | { |
| 124 | 129 | int col; |
| 125 | 130 | |
| 126 | 131 | col = (data >> i) & 0x11; |
| 127 | 132 | col = ((col >> 3) | col) & 3; |
| 128 | 133 | |
| 129 | | m_scroll_panel_bitmap.pix16(sy, sx + i) = 0x100 + (sy & 0xfc) + col; |
| 134 | m_scroll_panel_bitmap.pix16(sy, sx + i) = RADAR_PALETTE_BASE + (sy & 0xfc) + col; |
| 130 | 135 | } |
| 131 | 136 | } |
| 132 | 137 | |
| r252900 | r252901 | |
| 173 | 178 | int height = m_screen->height(); |
| 174 | 179 | const rectangle &visarea = m_screen->visible_area(); |
| 175 | 180 | |
| 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); |
| 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); |
| 177 | 182 | m_bg_tilemap->set_scrolldx(visarea.min_x, width - (visarea.max_x + 1)); |
| 178 | 183 | m_bg_tilemap->set_scrolldy(visarea.min_y - 8, height + 16 - (visarea.max_y + 1)); |
| 179 | 184 | |
| 185 | //m_scroll_panel_bitmap = std::make_unique<bitmap_ind16>(SCROLL_PANEL_WIDTH, height); |
| 180 | 186 | m_screen->register_screen_bitmap(m_scroll_panel_bitmap); |
| 181 | 187 | save_item(NAME(m_scroll_panel_bitmap)); |
| 182 | 188 | } |
| r252900 | r252901 | |
| 206 | 212 | * |
| 207 | 213 | *************************************/ |
| 208 | 214 | |
| 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 | |
| 209 | 217 | void m58_state::draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect ) |
| 210 | 218 | { |
| 219 | int offs; |
| 211 | 220 | const rectangle &visarea = m_screen->visible_area(); |
| 212 | 221 | |
| 213 | | for (int offs = m_spriteram.bytes() - 4; offs >= 0; offs -= 4) |
| 222 | for (offs = m_spriteram.bytes() - 4; offs >= 0; offs -= 4) |
| 214 | 223 | { |
| 215 | 224 | int attr = m_spriteram[offs + 1]; |
| 216 | 225 | int bank = (attr & 0x20) >> 5; |
| r252900 | r252901 | |
| 245 | 254 | { |
| 246 | 255 | sy2 = sy1 + 0x10; |
| 247 | 256 | } |
| 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 | | ); |
| 257 | |
| 258 | DRAW_SPRITE(code1 + 256 * bank, visarea.min_y + sy1) |
| 259 | DRAW_SPRITE(code2 + 256 * bank, visarea.min_y + sy2) |
| 259 | 260 | } |
| 260 | 261 | } |
| 261 | 262 | |
| r252900 | r252901 | |
| 275 | 276 | const rectangle clippanelflip(0*8, 6*8-1, 1*8, 31*8-1); |
| 276 | 277 | rectangle clip = flip_screen() ? clippanelflip : clippanel; |
| 277 | 278 | const rectangle &visarea = m_screen->visible_area(); |
| 278 | | int sx = flip_screen() ? cliprect.min_x - 8 : cliprect.max_x + 1 - 14*4; |
| 279 | int sx = flip_screen() ? cliprect.min_x - 8 : cliprect.max_x + 1 - SCROLL_PANEL_WIDTH; |
| 279 | 280 | int yoffs = flip_screen() ? -40 : -16; |
| 280 | 281 | |
| 281 | 282 | clip.min_y += visarea.min_y + yoffs; |
| 282 | 283 | clip.max_y += visarea.max_y + yoffs; |
| 283 | 284 | clip &= cliprect; |
| 284 | 285 | |
| 285 | | copybitmap(bitmap, m_scroll_panel_bitmap, flip_screen(), flip_screen(), sx, visarea.min_y + yoffs, clip); |
| 286 | copybitmap(bitmap, m_scroll_panel_bitmap, flip_screen(), flip_screen(), |
| 287 | sx, visarea.min_y + yoffs, clip); |
| 286 | 288 | } |
| 287 | 289 | } |
| 288 | 290 | |