trunk/src/mame/drivers/dreambal.c
| r21648 | r21649 | |
| 27 | 27 | |
| 28 | 28 | m_pf1_rowscroll(*this, "pf1_rowscroll"), |
| 29 | 29 | m_pf2_rowscroll(*this, "pf2_rowscroll"), |
| 30 | | m_spriteram(*this, "spriteram"), |
| 31 | | m_sprgen(*this, "spritegen") |
| 32 | 30 | */ |
| 33 | 31 | { } |
| 34 | 32 | |
| r21648 | r21649 | |
| 37 | 35 | required_shared_ptr<UINT16> m_pf1_rowscroll; |
| 38 | 36 | required_shared_ptr<UINT16> m_pf2_rowscroll; |
| 39 | 37 | required_shared_ptr<UINT16> m_spriteram; |
| 40 | | optional_device<decospr_device> m_sprgen; |
| 41 | 38 | */ |
| 42 | 39 | |
| 43 | 40 | /* devices */ |
| r21648 | r21649 | |
| 50 | 47 | UINT32 screen_update_dreambal(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 51 | 48 | }; |
| 52 | 49 | |
| 53 | | #if 0 |
| 54 | | UINT16 dreambal_pri_callback(UINT16 x) |
| 55 | | { |
| 56 | | UINT16 pri = (x & 0xc000); // 2 bits or 1? |
| 57 | | switch (pri & 0xc000) |
| 58 | | { |
| 59 | | case 0x0000: pri = 0; break; |
| 60 | | case 0x4000: pri = 0xf0; break; |
| 61 | | case 0x8000: pri = 0xf0 | 0xcc; break; |
| 62 | | case 0xc000: pri = 0xf0 | 0xcc; break; /* or 0xf0|0xcc|0xaa ? */ |
| 63 | | } |
| 64 | 50 | |
| 65 | | return pri; |
| 66 | | } |
| 67 | | #endif |
| 68 | | |
| 69 | | |
| 70 | 51 | UINT32 dreambal_state::screen_update_dreambal(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
| 71 | 52 | { |
| 72 | | #if 0 |
| 53 | |
| 73 | 54 | address_space &space = generic_space(); |
| 74 | 55 | UINT16 flip = deco16ic_pf_control_r(m_deco_tilegen1, space, 0, 0xffff); |
| 75 | 56 | |
| 76 | 57 | flip_screen_set(BIT(flip, 7)); |
| 77 | | deco16ic_pf_update(m_deco_tilegen1, m_pf1_rowscroll, m_pf2_rowscroll); |
| 58 | deco16ic_pf_update(m_deco_tilegen1, NULL, NULL); |
| 78 | 59 | |
| 79 | 60 | bitmap.fill(0, cliprect); /* not Confirmed */ |
| 80 | 61 | machine().priority_bitmap.fill(0); |
| 81 | 62 | |
| 82 | 63 | deco16ic_tilemap_2_draw(m_deco_tilegen1, bitmap, cliprect, 0, 2); |
| 83 | 64 | deco16ic_tilemap_1_draw(m_deco_tilegen1, bitmap, cliprect, 0, 4); |
| 84 | | m_sprgen->draw_sprites(bitmap, cliprect, m_spriteram, 0x400); |
| 85 | | #endif |
| 86 | 65 | return 0; |
| 87 | 66 | } |
| 88 | 67 | |
| 89 | 68 | |
| 90 | 69 | static ADDRESS_MAP_START( dreambal_map, AS_PROGRAM, 16, dreambal_state ) |
| 91 | 70 | AM_RANGE(0x000000, 0x07ffff) AM_ROM |
| 71 | AM_RANGE(0x100000, 0x100fff) AM_DEVREADWRITE_LEGACY("tilegen1", deco16ic_pf1_data_r, deco16ic_pf1_data_w) |
| 72 | AM_RANGE(0x101000, 0x101fff) AM_RAM |
| 73 | AM_RANGE(0x102000, 0x102fff) AM_DEVREADWRITE_LEGACY("tilegen1", deco16ic_pf2_data_r, deco16ic_pf2_data_w) |
| 74 | AM_RANGE(0x103000, 0x103fff) AM_RAM |
| 75 | |
| 76 | AM_RANGE(0x120000, 0x123fff) AM_RAM |
| 77 | AM_RANGE(0x140000, 0x1403ff) AM_RAM_WRITE(paletteram_xxxxBBBBGGGGRRRR_word_w) AM_SHARE("paletteram") |
| 78 | AM_RANGE(0x161000, 0x16100f) AM_DEVWRITE_LEGACY("tilegen1", deco16ic_pf_control_w) |
| 92 | 79 | ADDRESS_MAP_END |
| 93 | 80 | |
| 94 | 81 | |
| r21648 | r21649 | |
| 114 | 101 | 32*16 |
| 115 | 102 | }; |
| 116 | 103 | |
| 117 | | /* |
| 118 | | static const gfx_layout spritelayout = |
| 119 | | { |
| 120 | | 16,16, |
| 121 | | RGN_FRAC(1,1), |
| 122 | | 4, |
| 123 | | { 24,8,16,0 }, |
| 124 | | { 512,513,514,515,516,517,518,519, 0, 1, 2, 3, 4, 5, 6, 7 }, |
| 125 | | { 0*32, 1*32, 2*32, 3*32, 4*32, 5*32, 6*32, 7*32, |
| 126 | | 8*32, 9*32,10*32,11*32,12*32,13*32,14*32,15*32}, |
| 127 | | 32*32 |
| 128 | | }; |
| 129 | | */ |
| 130 | 104 | |
| 131 | 105 | static GFXDECODE_START( dreambal ) |
| 132 | 106 | GFXDECODE_ENTRY( "gfx1", 0, tile_8x8_layout, 0x000, 32 ) /* Tiles (8x8) */ |
| 133 | 107 | GFXDECODE_ENTRY( "gfx1", 0, tile_16x16_layout, 0x000, 32 ) /* Tiles (16x16) */ |
| 134 | | // GFXDECODE_ENTRY( "gfx2", 0, spritelayout, 0x200, 32 ) /* Sprites (16x16) */ |
| 135 | 108 | GFXDECODE_END |
| 136 | 109 | |
| 137 | 110 | static INPUT_PORTS_START( dreambal ) |
| r21648 | r21649 | |
| 222 | 195 | /* basic machine hardware */ |
| 223 | 196 | MCFG_CPU_ADD("maincpu", M68000, 28000000/2) |
| 224 | 197 | MCFG_CPU_PROGRAM_MAP(dreambal_map) |
| 225 | | // MCFG_CPU_VBLANK_INT_DRIVER("screen", dreambal_state, irq6_line_hold) |
| 198 | MCFG_CPU_VBLANK_INT_DRIVER("screen", dreambal_state, irq6_line_hold) // 5 valid too? |
| 226 | 199 | |
| 227 | 200 | /* video hardware */ |
| 228 | 201 | MCFG_SCREEN_ADD("screen", RASTER) |
| r21648 | r21649 | |
| 232 | 205 | MCFG_SCREEN_VISIBLE_AREA(0*8, 40*8-1, 1*8, 31*8-1) |
| 233 | 206 | MCFG_SCREEN_UPDATE_DRIVER(dreambal_state, screen_update_dreambal) |
| 234 | 207 | |
| 235 | | MCFG_PALETTE_LENGTH(4096) |
| 208 | MCFG_PALETTE_LENGTH(0x400/2) |
| 236 | 209 | MCFG_GFXDECODE(dreambal) |
| 237 | 210 | |
| 238 | 211 | MCFG_DECO16IC_ADD("tilegen1", dreambal_deco16ic_tilegen1_intf) |
| 239 | | /* |
| 240 | | MCFG_DEVICE_ADD("spritegen", DECO_SPRITE, 0) |
| 241 | | decospr_device::set_gfx_region(*device, 2); |
| 242 | | decospr_device::set_pri_callback(*device, dreambal_pri_callback); |
| 243 | | */ |
| 212 | |
| 244 | 213 | /* sound hardware */ |
| 245 | 214 | MCFG_SPEAKER_STANDARD_MONO("mono") |
| 246 | 215 | |
| r21648 | r21649 | |
| 253 | 222 | |
| 254 | 223 | ROM_START( dreambal ) |
| 255 | 224 | ROM_REGION( 0x80000, "maincpu", 0 ) |
| 256 | | ROM_LOAD16_WORD_SWAP( "mm_00-2.1c", 0x000001, 0x020000, CRC(257f6ad1) SHA1(7b232ce2d503e6f21286176974f6b74052f76d07) ) |
| 225 | ROM_LOAD16_WORD_SWAP( "mm_00-2.1c", 0x000000, 0x020000, CRC(257f6ad1) SHA1(7b232ce2d503e6f21286176974f6b74052f76d07) ) |
| 257 | 226 | |
| 258 | 227 | ROM_REGION( 0x80000, "gfx1", 0 ) |
| 259 | 228 | ROM_LOAD( "mm_01-1.12b", 0x00000, 0x80000, CRC(dc9cc708) SHA1(03b8e6aa37e0107514a2498849208d2bd51a4163) ) |
| r21648 | r21649 | |
| 271 | 240 | deco56_decrypt_gfx(machine(), "gfx1"); |
| 272 | 241 | } |
| 273 | 242 | |
| 274 | | |
| 275 | | GAME( 199?, dreambal, 0, dreambal, dreambal, dreambal_state, dreambal, ROT0, "Data East", "Dream Ball", GAME_NOT_WORKING ) |
| 243 | // Ver 2.4 JPN 93.12.02 |
| 244 | GAME( 1993, dreambal, 0, dreambal, dreambal, dreambal_state, dreambal, ROT0, "Data East", "Dream Ball (Japan V2.4)", GAME_NOT_WORKING ) |