Previous 199869 Revisions Next

r45189 Wednesday 24th February, 2016 at 02:51:35 UTC by David Haywood
Merge branch 'master' of https://github.com/mamedev/mame
[src/mame/drivers]system16.cpp
[src/mame/includes]system16.h
[src/mame/video]system16.cpp

trunk/src/mame/drivers/system16.cpp
r253700r253701
13541354   return 0xffff;//rand();
13551355}
13561356
1357WRITE16_MEMBER(segas1x_bootleg_state::ddcrewbl_spritebank_w)
1358{
1359//   printf("banking write %08x: %04x (%04x %04x)\n", space.device().safe_pc(), offset*2, data&mem_mask, mem_mask);
1360
1361   data &= mem_mask;
1362//   offset &= 0x7;
1363   offset += 4;
1364
1365   int maxbanks = memregion("sprites")->bytes() / 0x40000;
1366   if (data >= maxbanks)
1367      data = 255;
1368   m_sprites->set_bank((offset) * 2 + 0, data * 2 + 0);
1369   m_sprites->set_bank((offset) * 2 + 1, data * 2 + 1);
1370}
1371
1372
13571373// todo: this
1358static ADDRESS_MAP_START( ddcrewbl_map, AS_PROGRAM, 16, segas1x_bootleg_state )
1359   AM_RANGE(0x000000, 0x07ffff) AM_ROM
1360   AM_RANGE(0x200000, 0x27ffff) AM_ROM
1374static ADDRESS_MAP_START(ddcrewbl_map, AS_PROGRAM, 16, segas1x_bootleg_state)
1375   AM_RANGE(0x000000, 0x07ffff) AM_ROM // ok
1376   AM_RANGE(0x200000, 0x27ffff) AM_ROM // ok
13611377
13621378   AM_RANGE(0x400000, 0x40ffff) AM_RAM_WRITE(sys16_tileram_w) AM_SHARE("tileram")
13631379   AM_RANGE(0x410000, 0x410fff) AM_RAM_WRITE(sys16_textram_w) AM_SHARE("textram")
1364   AM_RANGE(0x440000, 0x440fff) AM_RAM AM_SHARE("sprites")
1365//   AM_RANGE(0xa00000, 0xa00001) AM_READ_PORT("COINAGE")
1366//   AM_RANGE(0xa00002, 0xa00003) AM_READ_PORT("DSW1")
1380   AM_RANGE(0x440000, 0x440fff) AM_RAM AM_SHARE("sprites") // ok
13671381
1368//   AM_RANGE(0xa0000e, 0xa0000f) AM_WRITE(sys18_tilebank_w)
1369//   AM_RANGE(0xa01000, 0xa01001) AM_READ_PORT("SERVICE")
1370//   AM_RANGE(0xa01002, 0xa01003) AM_READ_PORT("P1")
1371//   AM_RANGE(0xa01004, 0xa01005) AM_READ_PORT("P2")
1372//   AM_RANGE(0xa01006, 0xa01007) AM_READ_PORT("P3")
1382   AM_RANGE(0x840000, 0x840fff) AM_RAM_WRITE(paletteram_w) AM_SHARE("paletteram") // ok
13731383
1374   AM_RANGE(0x840000, 0x840fff) AM_RAM_WRITE(paletteram_w) AM_SHARE("paletteram")
1384   AM_RANGE(0xC00000, 0xC00001) AM_WRITENOP // vdp leftovers maybe?
1385   AM_RANGE(0xC00004, 0xC00005) AM_WRITENOP
1386   AM_RANGE(0xC00006, 0xC00007) AM_WRITENOP
1387   
13751388
1376   AM_RANGE(0xC00000, 0xC00001) AM_WRITENOP
1377
13781389   AM_RANGE(0xC40000, 0xC40001) AM_READ(ddcrew_c41006_r)
13791390   AM_RANGE(0xC40002, 0xC40003) AM_READ(ddcrew_c41006_r)
1380
1381
13821391   AM_RANGE(0xC41000, 0xC41001) AM_READ(ddcrew_c41006_r)
1392   AM_RANGE(0xC41002, 0xC41003) AM_READ(ddcrew_c41006_r)
1393   AM_RANGE(0xC41004, 0xC41005) AM_READ(ddcrew_c41006_r)
13831394   AM_RANGE(0xC41006, 0xC41007) AM_READ(ddcrew_c41006_r)
13841395
1396
1397   
1398   AM_RANGE(0xC44000, 0xC44001) AM_WRITENOP
1399
13851400   AM_RANGE(0xc46600, 0xc46601) AM_WRITE(sys18_refreshenable_w)
1386   AM_RANGE(0xffc000, 0xffffff) AM_RAM
1401
1402   AM_RANGE(0xC46038, 0xC4603f) AM_WRITE(ddcrewbl_spritebank_w) // ok
1403
1404   AM_RANGE(0xC46000, 0xC46001) AM_WRITENOP
1405   AM_RANGE(0xC46010, 0xC46011) AM_WRITENOP
1406   AM_RANGE(0xC46020, 0xC46021) AM_WRITENOP
1407
1408   AM_RANGE(0xC46040, 0xC46041) AM_WRITENOP
1409   AM_RANGE(0xC46050, 0xC46051) AM_WRITENOP
1410
1411   AM_RANGE(0xC46060, 0xC46061) AM_WRITENOP
1412   AM_RANGE(0xC46062, 0xC46063) AM_WRITENOP
1413   AM_RANGE(0xC46064, 0xC46065) AM_WRITENOP
1414
1415   AM_RANGE(0xC46070, 0xC46071) AM_WRITENOP
1416   
1417   AM_RANGE(0xffc000, 0xffffff) AM_RAM // ok
13871418ADDRESS_MAP_END
13881419
13891420/*************************************
r253700r253701
24722503MACHINE_CONFIG_END
24732504
24742505
2506MACHINE_RESET_MEMBER(segas1x_bootleg_state,ddcrewbl)
2507{
2508   // set up the initial banks for this game
2509   // because it doesn't appear to actually program banks 0-3.
2510   for (int i = 0; i < 4; i++)
2511   {
2512      m_sprites->set_bank((i)* 2 + 0, i * 2 + 0);
2513      m_sprites->set_bank((i)* 2 + 1, i * 2 + 1);
2514   }
2515}
2516
2517
24752518static MACHINE_CONFIG_START( ddcrewbl, segas1x_bootleg_state )
24762519
24772520   /* basic machine hardware */
r253700r253701
24942537   MCFG_VIDEO_START_OVERRIDE(segas1x_bootleg_state,system18old)
24952538
24962539   MCFG_BOOTLEG_SYS16B_SPRITES_ADD("sprites")
2497   MCFG_BOOTLEG_SYS16B_SPRITES_XORIGIN(189-107)
2540   MCFG_BOOTLEG_SYS16B_SPRITES_XORIGIN(189-124)
24982541
2542   MCFG_MACHINE_RESET_OVERRIDE(segas1x_bootleg_state,ddcrewbl)
2543
24992544MACHINE_CONFIG_END
25002545
25012546
r253700r253701
37403785DRIVER_INIT_MEMBER(segas1x_bootleg_state,ddcrewbl)
37413786{
37423787   DRIVER_INIT_CALL(common);
3743   m_spritebank_type = 0;
37443788}
37453789
37463790
trunk/src/mame/includes/system16.h
r253700r253701
131131   DECLARE_READ16_MEMBER(passht4b_io3_r);
132132   DECLARE_READ16_MEMBER(ddcrew_c41006_r);
133133   DECLARE_WRITE16_MEMBER(sys16_tilebank_w);
134   DECLARE_WRITE16_MEMBER(ddcrewbl_spritebank_w);
134135   DECLARE_WRITE8_MEMBER(tturfbl_msm5205_data_w);
135136   DECLARE_READ8_MEMBER(tturfbl_soundbank_r);
136137   DECLARE_WRITE8_MEMBER(tturfbl_soundbank_w);
r253700r253701
187188   DECLARE_DRIVER_INIT(goldnaxeb1);
188189   DECLARE_DRIVER_INIT(ddcrewbl);
189190   DECLARE_DRIVER_INIT(common);
191   DECLARE_MACHINE_RESET(ddcrewbl);
190192   TILEMAP_MAPPER_MEMBER(sys16_bg_map);
191193   TILEMAP_MAPPER_MEMBER(sys16_text_map);
192194   TILE_GET_INFO_MEMBER(get_bg_tile_info);
trunk/src/mame/video/system16.cpp
r253700r253701
3434
3535void segas1x_bootleg_state::setup_system16_bootleg_spritebanking(  )
3636{
37   if (m_spritebank_type == 1)
37   if (m_spritebank_type == 0)
3838   {
39      static const UINT8 default_banklist[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 };
40      int i;
41      for (i = 0; i < 16; i++)
42         m_sprites->set_bank(i, default_banklist[i]);
43   }
44   else
45   {
4639      static const UINT8 alternate_banklist[] = { 0,255,255,255, 255,255,255,3, 255,255,255,2, 255,1,0,255 };
4740      int i;
4841      for (i = 0; i < 16; i++)


Previous 199869 Revisions Next


© 1997-2024 The MAME Team