Previous 199869 Revisions Next

r21183 Tuesday 19th February, 2013 at 15:03:07 UTC by Angelo Salese
Basic hook-up of sound
[src/emu/video]stvvdp2.c
[src/mame/drivers]coolridr.c

trunk/src/emu/video/stvvdp2.c
r21182r21183
44394439
44404440      /* Bio Hazard 0x400 = extended color calculation enabled */
44414441      /* Advanced World War 0x200 = color calculation ratio mode */
4442      /* Whizz = 0x8100 */
44424443      //if(STV_VDP2_CCCR & 0xf600)
4443      if(STV_VDP2_CCCR & 0xf000)
4444      if(STV_VDP2_CCCR & 0x7000)
44444445         popmessage("Gradation enabled %04x, contact MAMEdev",STV_VDP2_CCCR);
44454446
44464447      /* Advanced VG, Shining Force III */
trunk/src/mame/drivers/coolridr.c
r21182r21183
278278      m_txt_vram(*this, "txt_vram"),
279279      m_sysh1_txt_blit(*this, "sysh1_txt_blit"),
280280      m_sysh1_workram_h(*this, "sysh1_workrah"),
281      m_h1_unk(*this, "h1_unk")
281      m_h1_unk(*this, "h1_unk"),
282      m_soundram(*this, "soundram")
282283      { }
283284
284285   // Blitter state
r21182r21183
304305   required_shared_ptr<UINT32> m_sysh1_txt_blit;
305306   required_shared_ptr<UINT32> m_sysh1_workram_h;
306307   required_shared_ptr<UINT32> m_h1_unk;
308   required_shared_ptr<UINT16> m_soundram;
307309   bitmap_rgb32 m_temp_bitmap_sprites;
308310   bitmap_rgb32 m_temp_bitmap_sprites2;
309311   UINT32 m_test_offs;
310312   int m_color;
311313   UINT8 m_vblank;
314   int m_scsp_last_line;
312315
313316
314
315317   DECLARE_READ32_MEMBER(sysh1_unk_r);
316318   DECLARE_WRITE32_MEMBER(sysh1_unk_w);
317319   DECLARE_READ32_MEMBER(sysh1_ioga_r);
r21182r21183
323325   DECLARE_READ32_MEMBER(coolridr_hack1_r);
324326   DECLARE_READ32_MEMBER(coolridr_hack2_r);
325327   DECLARE_DRIVER_INIT(coolridr);
328   virtual void machine_start();
326329   virtual void machine_reset();
327330   virtual void video_start();
328331   UINT32 screen_update_coolridr(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect, int which);
r21182r21183
423426   if(m_test_offs > 0x100000*4)
424427      m_test_offs = 0;
425428
426   popmessage("%08x %04x",m_test_offs,m_color);
429//   popmessage("%08x %04x",m_test_offs,m_color);
427430
428431   return screen_update_coolridr(screen,bitmap,cliprect,0);
429432}
r21182r21183
560563            {
561564               const UINT32 memOffset = data;
562565               bitmap_rgb32* drawbitmap;
563               
566
564567               // guess, you can see the different sizes of bike cross from the left screen to the right where the attract text is
565568               if (m_blitterMode == 0x30 || m_blitterMode == 0x40 || m_blitterMode == 0x50 || m_blitterMode == 0x60)
566569                  drawbitmap = &m_temp_bitmap_sprites;
r21182r21183
588591                     {
589592                        for (int y = 1; y < 15; y++)
590593                        {
591                           
594
592595                           UINT32 color = 0xffffffff;
593596                           // HACKS to draw coloured blocks in easy to distinguish colours
594597                           if (m_blitterMode == 0x30 || m_blitterMode == 0x90)
595                           {   
598                           {
596599                              if (m_colorNumber == 0x5b)
597600                                 color = 0xffff0000;
598601                              else if (m_colorNumber == 0x5d)
r21182r21183
816819// the SCSP is believed to be hardcoded to decode the first 4 MB like this for a master/slave config
817820// (see also Model 3):
818821static ADDRESS_MAP_START( system_h1_sound_map, AS_PROGRAM, 16, coolridr_state )
819   AM_RANGE(0x000000, 0x07ffff) AM_ROM
820//  AM_RANGE(0x100000, 0x100fff) AM_DEVREADWRITE_LEGACY("scsp1", scsp_r, scsp_w)
822   AM_RANGE(0x000000, 0x07ffff) AM_RAM AM_REGION("scsp1",0) AM_SHARE("soundram")
823   AM_RANGE(0x100000, 0x100fff) AM_DEVREADWRITE_LEGACY("scsp1", scsp_r, scsp_w)
824   AM_RANGE(0x200000, 0x27ffff) AM_RAM AM_REGION("scsp2",0)
825   AM_RANGE(0x300000, 0x300fff) AM_DEVREADWRITE_LEGACY("scsp2", scsp_r, scsp_w)
821826   AM_RANGE(0x800000, 0x80ffff) AM_RAM
822//  AM_RANGE(0x300000, 0x300fff) AM_DEVREADWRITE_LEGACY("scsp2", scsp_r, scsp_w)
823827ADDRESS_MAP_END
824828
825829
r21182r21183
12191223   }
12201224}
12211225
1226
1227void coolridr_state::machine_start()
1228{
1229//  machine().device("maincpu")->execute().set_input_line(INPUT_LINE_HALT, ASSERT_LINE);
1230//   machine().device("soundcpu")->execute().set_input_line(INPUT_LINE_HALT, ASSERT_LINE);
1231
1232//   memcpy(memregion("soundcpu")->base(), memregion("maincpu")->base()+0x100000, 0x80000);
1233//   m_soundcpu->reset();
1234}
1235
12221236void coolridr_state::machine_reset()
12231237{
12241238//  machine().device("maincpu")->execute().set_input_line(INPUT_LINE_HALT, ASSERT_LINE);
1225   machine().device("soundcpu")->execute().set_input_line(INPUT_LINE_HALT, ASSERT_LINE);
1239//   machine().device("soundcpu")->execute().set_input_line(INPUT_LINE_HALT, ASSERT_LINE);
1240
1241   memcpy(m_soundram, memregion("soundcpu")->base()+0x80000, 0x80000);
1242   m_soundcpu->reset();
12261243}
12271244
12281245
r21182r21183
12401257      DEVCB_NULL/*DEVCB_DRIVER_LINE_MEMBER(coolridr_state, coolridr_dack3_w)*/ }
12411258};
12421259
1260static void scsp_irq(device_t *device, int irq)
1261{
1262   coolridr_state *state = device->machine().driver_data<coolridr_state>();
1263   if (irq > 0)
1264   {
1265      state->m_scsp_last_line = irq;
1266      device->machine().device("soundcpu")->execute().set_input_line(irq, ASSERT_LINE);
1267   }
1268   else
1269      device->machine().device("soundcpu")->execute().set_input_line(-irq, CLEAR_LINE);
1270}
1271
1272static const scsp_interface scsp_config =
1273{
1274   0,
1275   scsp_irq,
1276   DEVCB_NULL
1277};
1278
1279static const scsp_interface scsp2_interface =
1280{
1281   0,
1282   NULL
1283};
1284
12431285#define MAIN_CLOCK XTAL_28_63636MHz
12441286
12451287static MACHINE_CONFIG_START( coolridr, coolridr_state )
r21182r21183
12761318   MCFG_PALETTE_LENGTH(0x10000)
12771319   MCFG_DEFAULT_LAYOUT(layout_dualhsxs)
12781320
1321   MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
1322   MCFG_SOUND_ADD("scsp1", SCSP, 0)
1323   MCFG_SOUND_CONFIG(scsp_config)
1324   MCFG_SOUND_ROUTE(0, "lspeaker", 1.0)
1325   MCFG_SOUND_ROUTE(0, "rspeaker", 1.0)
1326
1327   MCFG_SOUND_ADD("scsp2", SCSP, 0)
1328   MCFG_SOUND_CONFIG(scsp2_interface)
1329   MCFG_SOUND_ROUTE(0, "lspeaker", 1.0)
1330   MCFG_SOUND_ROUTE(0, "rspeaker", 1.0)
12791331MACHINE_CONFIG_END
12801332
12811333ROM_START( coolridr )
r21182r21183
12991351   ROM_REGION32_BE( 0x100000, "ram_gfx", ROMREGION_ERASE00 ) /* SH2 code */
13001352
13011353   ROM_REGION( 0x100000, "soundcpu", ROMREGION_ERASE00 )   /* 68000 */
1302   ROM_COPY( "maincpu", 0x100000, 0x000000, 0x080000 ) //hardcoded from SH-2 roms? no, It doesn't seem so... (missing a DMA transfer for it?)
1354   ROM_COPY( "maincpu", 0x100000, 0x080000, 0x080000 ) //hardcoded from SH-2 roms? no, It doesn't seem so... (missing a DMA transfer for it?)
13031355
13041356   ROM_REGION( 0x100000, "sub", 0 ) /* SH1 */
13051357   ROM_LOAD16_WORD_SWAP( "ep17662.12", 0x000000, 0x020000,  CRC(50d66b1f) SHA1(f7b7f2f5b403a13b162f941c338a3e1207762a0b) )
r21182r21183
13171369   ROM_LOAD32_WORD_SWAP( "mpr-17648.ic9", 0x1800000, 0x0400000, CRC(bf184cce) SHA1(62c004ea279f9a649d21426369336c2e1f9d24da) )
13181370   ROM_LOAD32_WORD_SWAP( "mpr-17644.ic5", 0x2000002, 0x0400000, CRC(80199c79) SHA1(e525d8ee9f9176101629853e50cca73b02b16a38) )
13191371   ROM_LOAD32_WORD_SWAP( "mpr-17649.ic10",0x2000000, 0x0400000, CRC(618c47ae) SHA1(5b69ad36fcf8e70d34c3b2fc71412ce953c5ceb3) )
1372
1373   ROM_REGION( 0x80000, "scsp1", 0 )   /* first SCSP's RAM */
1374   ROM_FILL( 0x000000, 0x80000, 0 )
1375
1376   ROM_REGION( 0x80000, "scsp2", 0 )   /* second SCSP's RAM */
1377   ROM_FILL( 0x000000, 0x80000, 0 )
13201378ROM_END
13211379
13221380#if 0

Previous 199869 Revisions Next


© 1997-2024 The MAME Team