Previous 199869 Revisions Next

r23481 Thursday 6th June, 2013 at 07:03:29 UTC by Fabio Priuli
(MESS) megadriv: emulated protection for 16 Mahjong Tiles II [Fabio Priuli]

there seems to be only one address checked for protection in this...
[src/mess/drivers]megadriv.c
[src/mess/machine]md_rom.c md_rom.h md_slot.c md_slot.h

trunk/src/mess/drivers/megadriv.c
r23480r23481
395395   SLOT_INTERFACE_INTERNAL("rom_ssf2",  MD_ROM_SSF2)
396396   SLOT_INTERFACE_INTERNAL("rom_radica",  MD_ROM_RADICA)
397397// pirate mappers (protection and/or bankswitch)
398   SLOT_INTERFACE_INTERNAL("rom_16mj2",  MD_ROM_16MJ2)
398399   SLOT_INTERFACE_INTERNAL("rom_bugs",  MD_ROM_BUGSLIFE)
399400   SLOT_INTERFACE_INTERNAL("rom_chinf3",  MD_ROM_CHINF3)
400401   SLOT_INTERFACE_INTERNAL("rom_elfwor",  MD_ROM_ELFWOR)
trunk/src/mess/machine/md_rom.c
r23480r23481
4040const device_type MD_ROM_KOF99 = &device_creator<md_rom_kof99_device>;
4141const device_type MD_ROM_SOULB = &device_creator<md_rom_soulb_device>;
4242const device_type MD_ROM_CHINF3 = &device_creator<md_rom_chinf3_device>;
43const device_type MD_ROM_16MJ2 = &device_creator<md_rom_16mj2_device>;
4344const device_type MD_ROM_ELFWOR = &device_creator<md_rom_elfwor_device>;
4445const device_type MD_ROM_YASECH = &device_creator<md_rom_yasech_device>;
4546const device_type MD_ROM_LION2 = &device_creator<md_rom_lion2_device>;
r23480r23481
153154{
154155}
155156
157md_rom_16mj2_device::md_rom_16mj2_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
158               : md_std_rom_device(mconfig, MD_ROM_16MJ2, "MD 16 Mahjong Tiles II", tag, owner, clock, "md_rom_16mj2", __FILE__)
159{
160}
161
156162md_rom_elfwor_device::md_rom_elfwor_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
157163               : md_std_rom_device(mconfig, MD_ROM_ELFWOR, "MD Linghuan Daoshi Super Magician / Elf Wor", tag, owner, clock, "md_rom_elfwor", __FILE__)
158164{
r23480r23481
645651}
646652
647653/*-------------------------------------------------
654 16 MAHJONG II
655 -------------------------------------------------*/
656
657READ16_MEMBER(md_rom_16mj2_device::read)
658{
659   if (offset == 0x400004/2)   return 0xc900;
660
661   // non-protection accesses
662   if (offset < 0x400000/2)
663      return m_rom[MD_ADDR(offset)];
664   else
665      return 0xffff;
666}
667
668/*-------------------------------------------------
648669 LINGHUAN DAOSHI SUPER MAGICIAN / ELF WOR
649670 -------------------------------------------------*/
650671
trunk/src/mess/machine/md_rom.h
r23480r23481
148148   int m_bank;
149149};
150150
151// ======================> md_rom_16mj2_device
152
153class md_rom_16mj2_device : public md_std_rom_device
154{
155public:
156   // construction/destruction
157   md_rom_16mj2_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
158   
159   // reading and writing
160   virtual DECLARE_READ16_MEMBER(read);
161};
162
151163// ======================> md_rom_elfwor_device
152164
153165class md_rom_elfwor_device : public md_std_rom_device
r23480r23481
518530extern const device_type MD_ROM_SRAM;
519531extern const device_type MD_ROM_FRAM;
520532extern const device_type MD_ROM_CM2IN1;
533extern const device_type MD_ROM_16MJ2;
521534extern const device_type MD_ROM_BUGSLIFE;
522535extern const device_type MD_ROM_CHINF3;
523536extern const device_type MD_ROM_ELFWOR;
trunk/src/mess/machine/md_slot.c
r23480r23481
257257   { RADICA, "rom_radica" },
258258//  { GAME_KANDUME, "rom_gkand" },  // what's needed by this?
259259
260   { TILESMJ2, "rom_16mj2" },
260261   { BUGSLIFE, "rom_bugs" },
261262   { CHINFIGHT3, "rom_chinf3" },
262263   { ELFWOR, "rom_elfwor" },
trunk/src/mess/machine/md_slot.h
r23480r23481
4646   GAME_KANDUME,                /* Game no Kandume Otokuyou */
4747   RADICA,                      /* Radica TV games.. these probably should be a separate driver since they are a separate 'console' */
4848
49   TILESMJ2,                    /* 16 Mahjong Tiles II */
4950   BUGSLIFE,                    /* A Bug's Life */
5051   CHINFIGHT3,                  /* Chinese Fighters 3 */
5152   ELFWOR,                      /* Linghuan Daoshi Super Magician */

Previous 199869 Revisions Next


© 1997-2024 The MAME Team