Previous 199869 Revisions Next

r41827 Sunday 22nd November, 2015 at 15:54:03 UTC by kazblox
fmopl: partially revert ksl order fix

<hap> it only applies to opl3
[src/devices/sound]fmopl.cpp
[src/lib/util]delegate.h
[src/mame]arcade.lst
[src/mame/drivers]namcos86.cpp

trunk/src/devices/sound/fmopl.cpp
r250338r250339
390390#undef DV
391391
392392/* 0 / 3.0 / 1.5 / 6.0 dB/OCT */
393static const UINT32 ksl_shift[4] = { 31, 2, 1, 0 };
393static const UINT32 ksl_shift[4] = { 31, 1, 2, 0 };
394394
395395
396396/* sustain level table (3dB per step) */
trunk/src/lib/util/delegate.h
r250338r250339
9090// types of delegates supported
9191#define DELEGATE_TYPE_COMPATIBLE 0
9292#define DELEGATE_TYPE_INTERNAL 1
93#define DELEGATE_TYPE_MSVC 2
9493
9594// select which one we will be using
9695#if defined(__GNUC__)
r250338r250339
111110      #define MEMBER_ABI
112111      #define HAS_DIFFERENT_ABI 0
113112   #endif
114#elif defined(_MSC_VER) && defined (PTR64)
115#define MEMBER_ABI
116#define HAS_DIFFERENT_ABI 0
117#define USE_DELEGATE_TYPE DELEGATE_TYPE_MSVC
118113#else
119114#define USE_DELEGATE_TYPE DELEGATE_TYPE_COMPATIBLE
120115#endif
r250338r250339
546541   int                     m_this_delta;       // delta to apply to the 'this' pointer
547542};
548543
549#elif (USE_DELEGATE_TYPE == DELEGATE_TYPE_MSVC)
550
551// ======================> delegate_mfp
552const int SINGLE_MEMFUNCPTR_SIZE = sizeof(void (delegate_generic_class::*)());
553
554// struct describing the contents of a member function pointer
555class delegate_mfp
556{
557public:
558   // default constructor
559   delegate_mfp()
560      : m_function(0) { }
561
562   // copy constructor
563   delegate_mfp(const delegate_mfp &src)
564      : m_function(src.m_function) { }
565
566   // construct from any member function pointer
567   template<typename _MemberFunctionType, class _MemberFunctionClass, typename _ReturnType, typename _StaticFunctionType>
568   delegate_mfp(_MemberFunctionType mfp, _MemberFunctionClass *, _ReturnType *, _StaticFunctionType)
569   {
570      //assert(sizeof(mfp) == 12 || sizeof(mfp) == 16);
571      m_size = sizeof(mfp);
572      *reinterpret_cast<_MemberFunctionType *>(this) = mfp;
573   }
574
575   // comparison helpers
576   bool operator==(const delegate_mfp &rhs) const { return (m_function == rhs.m_function); }
577   bool isnull() const { return (m_function == 0); }
578
579   // getters
580   delegate_generic_class *real_object(delegate_generic_class *original) const { return original; }
581
582   // binding helper
583   template<typename _FunctionType>
584   void update_after_bind(_FunctionType &funcptr, delegate_generic_class *&object)
585   {
586      funcptr = reinterpret_cast<_FunctionType>(m_function);
587      if (m_size == SINGLE_MEMFUNCPTR_SIZE + sizeof(int))
588         object = reinterpret_cast<delegate_generic_class *>(reinterpret_cast<UINT8 *>(object) + m_this_delta);
589   }
590
591private:
592   // extract the generic function and adjust the object pointer
593   delegate_generic_function convert_to_generic(delegate_generic_class *&object) const;
594
595   // actual state
596   FPTR                    m_function;         // first item can be one of two things:
597                                    //    if even, it's a pointer to the function
598                                    //    if odd, it's the byte offset into the vtable
599   int                     m_this_delta;       // delta to apply to the 'this' pointer
600
601   int                  m_dummy1;
602   int                  m_dummy2;
603
604   int                  m_size;   
605};
606
607544#endif
608545
609546
trunk/src/mame/arcade.lst
r250338r250339
848848rthunder2       // (c) 1986
849849rthunder1       // (c) 1986
850850rthunder0       // (c) 1986
851rthundera
852851wndrmomo        // (c) 1987
853852
854853// Thunder Ceptor HW
trunk/src/mame/drivers/namcos86.cpp
r250338r250339
14001400   /* m3 empty */
14011401ROM_END
14021402
1403// original PCB, but with a piggyback board as replacement for the custom '130' with what appears to be 2x BPROMs and 4x simple TTL chips.  The program also appears to have been hacked
1404ROM_START( rthundera )
1405   ROM_REGION( 0x10000, "cpu1", 0 )
1406   /* 9d empty */
1407   ROM_LOAD( "1.9c",    0x8000, 0x8000, CRC(13c92678) SHA1(e241fd6067d37f1986905c56f180c687dc536803) ) // 12 bytes differ, looks hacked from above
1408
1409   ROM_REGION( 0x10000, "cpu2", 0 )
1410   ROM_LOAD( "rt3_3.12d",    0x00000, 0x8000, CRC(a13f601c) SHA1(8987174e364d20eeab706c3e0d4e0d3c2b96723c) )
1411   ROM_LOAD( "rt3_2b.12c",   0x08000, 0x8000, CRC(a7ea46ee) SHA1(52e8757aacb4e01f8432125729e2323c48ebc4f5) )
1412
1413   ROM_REGION( 0x18000, "gfx1", 0 )
1414   ROM_LOAD( "rt1_7.7r",     0x00000, 0x10000, CRC(a85efa39) SHA1(1ed63b421a93960668cb4558c1ca1b3c86b1f6be) )  /* plane 1,2 */
1415   ROM_LOAD( "rt1_8.7s",     0x10000, 0x08000, CRC(f7a95820) SHA1(82fe0adf6c5b3abef19031646e1eca1585dcc481) )  /* plane 3 */
1416
1417   ROM_REGION( 0x0c000, "gfx2", 0 )
1418   ROM_LOAD( "rt1_5.4r",     0x00000, 0x08000, CRC(d0fc470b) SHA1(70f7f1e29527044eae405f58af08bad3097990bd) )  /* plane 1,2 */
1419   ROM_LOAD( "rt1_6.4s",     0x08000, 0x04000, CRC(6b57edb2) SHA1(4a8f1e024e5be4d76f2c99d506ae7da86af3d1f5) )  /* plane 3 */
1420
1421   ROM_REGION( 0x80000, "gfx3", 0 )
1422   ROM_LOAD( "rt1_9.12h",    0x00000, 0x10000, CRC(8e070561) SHA1(483b4de79f2429236f45c32ec56b97a9a90574a3) )
1423   ROM_LOAD( "rt1_10.12k",   0x10000, 0x10000, CRC(cb8fb607) SHA1(ba9400fb19d29a285897cc3a2d4d739ce845f897) )
1424   ROM_LOAD( "rt1_11.12l",   0x20000, 0x10000, CRC(2bdf5ed9) SHA1(a771e922ad868ca1e008d08a8ff5fdf28aa315fc) )
1425   ROM_LOAD( "rt1_12.12m",   0x30000, 0x10000, CRC(e6c6c7dc) SHA1(ead143c2730a77911839a25734550188533c7b96) )
1426   ROM_LOAD( "rt1_13.12p",   0x40000, 0x10000, CRC(489686d7) SHA1(a04b57424acbf2584f736b55740d613a1aae2b8b) )
1427   ROM_LOAD( "rt1_14.12r",   0x50000, 0x10000, CRC(689e56a8) SHA1(b4d6de4eec47856a62f396f55d531fbf345cf12a) )
1428   ROM_LOAD( "rt1_15.12t",   0x60000, 0x10000, CRC(1d8bf2ca) SHA1(949ae8b00b94bfa5bc2d07888aafbaaaea559b06) )
1429   ROM_LOAD( "rt1_16.12u",   0x70000, 0x10000, CRC(1bbcf37b) SHA1(8d27c49b36d5e23dd446c150ada3853eec75e4c1) )
1430
1431   ROM_REGION( 0x1420, "proms", 0 )
1432   ROM_LOAD( "rt1-1.3r",     0x0000, 0x0200, CRC(8ef3bb9d) SHA1(4636d6b8ba7611b11d4863fab02475dc4a619eaf) )    /* red & green components */
1433   ROM_LOAD( "rt1-2.3s",     0x0200, 0x0200, CRC(6510a8f2) SHA1(935f140bfa7e6f8cebafa7f1b0de99dd319273d4) )    /* blue component */
1434   ROM_LOAD( "rt1-3.4v",     0x0400, 0x0800, CRC(95c7d944) SHA1(ca5fea028674882a61507ac7c89ada96f5b2674d) )    /* tiles color table */
1435   ROM_LOAD( "rt1-4.5v",     0x0c00, 0x0800, CRC(1391fec9) SHA1(8ca94e22110b20d2ecdf03610bcc89ff4245920f) )    /* sprites color table */
1436   ROM_LOAD( "rt1-5.6u",     0x1400, 0x0020, CRC(e4130804) SHA1(e1a3e1383186d036fba6dc8a8681f48f24f59281) )    /* tile address decoder (used at runtime) */
1437
1438   ROM_REGION( 0x10000, "mcu", 0 )
1439   ROM_LOAD( "rt3_4.6b",       0x4000, 0x8000, CRC(00cf293f) SHA1(bc441d21bb4c54a01d2393fbe99201714cd4439d) )  /* subprogram for the MCU */
1440   ROM_LOAD( "cus60-60a1.mcu", 0xf000, 0x1000, CRC(076ea82a) SHA1(22b5e62e26390d7d5cacc0503c7aa5ed524204df) )  /* MCU internal code */
1441
1442   ROM_REGION( 0x40000, "user1", 0 ) /* bank switched data for CPU1 */
1443   ROM_LOAD( "rt1_17.f1",    0x00000, 0x10000, CRC(766af455) SHA1(8c71772795e783d6c4b88af9a311d55e363c298a) )
1444   ROM_LOAD( "rt1_18.h1",    0x10000, 0x10000, CRC(3f9f2f5d) SHA1(541b8f80800cb55e4b81ac48771d00fe10c90743) )
1445   ROM_LOAD( "rt3_19.k1",    0x20000, 0x10000, CRC(c16675e9) SHA1(e31c28cb95ffa85392c74e1d81bfa89acbaefeb9) )
1446   ROM_LOAD( "20.m1",        0x30000, 0x10000, CRC(05d5db25) SHA1(39f531a7605b653d827957087797f86e83d867e1) ) // 1 bit differs in an unused area, could be bitrot.
1447
1448   ROM_REGION( 0x80000, "namco2", 0 ) /* PCM samples for Hitachi CPU */
1449   ROM_LOAD( "rt1_21.f3",    0x00000, 0x10000, CRC(454968f3) SHA1(e0a679353491190b6d4f0355324456a1bd7c8a7a) )
1450   ROM_LOAD( "rt2_22.h3",    0x20000, 0x10000, CRC(fe963e72) SHA1(4c9ce4e4c8e756a743c541f670a6741b520125e3) )
1451   /* k3 empty */
1452   /* m3 empty */
1453ROM_END
1454
14551403ROM_START( rthunder2 ) // program updated to rt2, 19/20 banked CPU code updated to rt3
14561404   ROM_REGION( 0x10000, "cpu1", 0 )
14571405   /* 9d empty */
r250338r250339
17171665
17181666
17191667
1720GAME( 1986, skykiddx, 0,        hopmappy, skykiddx,  namcos86_state, namco86, ROT180, "Namco",   "Sky Kid Deluxe (set 1)", MACHINE_SUPPORTS_SAVE )
1721GAME( 1986, skykiddxo,skykiddx, hopmappy, skykiddx,  namcos86_state, namco86, ROT180, "Namco",   "Sky Kid Deluxe (set 2)", MACHINE_SUPPORTS_SAVE )
1668GAME( 1986, skykiddx, 0,        hopmappy, skykiddx,  namcos86_state, namco86, ROT180, "Namco", "Sky Kid Deluxe (set 1)", MACHINE_SUPPORTS_SAVE )
1669GAME( 1986, skykiddxo,skykiddx, hopmappy, skykiddx,  namcos86_state, namco86, ROT180, "Namco", "Sky Kid Deluxe (set 2)", MACHINE_SUPPORTS_SAVE )
17221670
1723GAME( 1986, hopmappy, 0,        hopmappy, hopmappy,  namcos86_state, namco86, ROT0,   "Namco",   "Hopping Mappy", MACHINE_SUPPORTS_SAVE )
1671GAME( 1986, hopmappy, 0,        hopmappy, hopmappy,  namcos86_state, namco86, ROT0,   "Namco", "Hopping Mappy", MACHINE_SUPPORTS_SAVE )
17241672
1725GAME( 1986, roishtar, 0,        roishtar, roishtar,  namcos86_state, namco86, ROT0,   "Namco",   "The Return of Ishtar", MACHINE_SUPPORTS_SAVE )
1673GAME( 1986, roishtar, 0,        roishtar, roishtar,  namcos86_state, namco86, ROT0,   "Namco", "The Return of Ishtar", MACHINE_SUPPORTS_SAVE )
17261674
1727GAME( 1986, genpeitd, 0,        genpeitd, genpeitd,  namcos86_state, namco86, ROT0,   "Namco",   "Genpei ToumaDen", MACHINE_SUPPORTS_SAVE )
1675GAME( 1986, genpeitd, 0,        genpeitd, genpeitd,  namcos86_state, namco86, ROT0,   "Namco", "Genpei ToumaDen", MACHINE_SUPPORTS_SAVE )
17281676
1729GAME( 1986, rthunder, 0,        rthunder, rthunder,  namcos86_state, namco86, ROT0,   "Namco",   "Rolling Thunder (rev 3)", MACHINE_SUPPORTS_SAVE )
1730GAME( 1986, rthundera,rthunder, rthunder, rthunder1, namcos86_state, namco86, ROT0,   "bootleg", "Rolling Thunder (rev 3, hack)", MACHINE_SUPPORTS_SAVE )
1731GAME( 1986, rthunder2,rthunder, rthunder, rthunder1, namcos86_state, namco86, ROT0,   "Namco",   "Rolling Thunder (rev 2)", MACHINE_SUPPORTS_SAVE )
1732GAME( 1986, rthunder1,rthunder, rthunder, rthunder1, namcos86_state, namco86, ROT0,   "Namco",   "Rolling Thunder (rev 1)", MACHINE_SUPPORTS_SAVE )
1733GAME( 1986, rthunder0,rthunder, rthunder, rthunder1, namcos86_state, namco86, ROT0,   "Namco",   "Rolling Thunder (oldest)", MACHINE_SUPPORTS_SAVE )
1677GAME( 1986, rthunder, 0,        rthunder, rthunder,  namcos86_state, namco86, ROT0,   "Namco", "Rolling Thunder (rev 3)", MACHINE_SUPPORTS_SAVE )
1678GAME( 1986, rthunder2,rthunder, rthunder, rthunder1, namcos86_state, namco86, ROT0,   "Namco", "Rolling Thunder (rev 2)", MACHINE_SUPPORTS_SAVE )
1679GAME( 1986, rthunder1,rthunder, rthunder, rthunder1, namcos86_state, namco86, ROT0,   "Namco", "Rolling Thunder (rev 1)", MACHINE_SUPPORTS_SAVE )
1680GAME( 1986, rthunder0,rthunder, rthunder, rthunder1, namcos86_state, namco86, ROT0,   "Namco", "Rolling Thunder (oldest)", MACHINE_SUPPORTS_SAVE )
17341681
1735GAME( 1987, wndrmomo, 0,        wndrmomo, wndrmomo,  namcos86_state, namco86, ROT0,   "Namco",   "Wonder Momo", MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE )
1682GAME( 1987, wndrmomo, 0,        wndrmomo, wndrmomo,  namcos86_state, namco86, ROT0,   "Namco", "Wonder Momo", MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE )


Previous 199869 Revisions Next


© 1997-2024 The MAME Team