Previous 199869 Revisions Next

r34985 Thursday 12th February, 2015 at 17:31:58 UTC by Stiletto
According to the MAME Plus Chinese gamelist, bigd2 is Zhong Guo Chu Da D.
[src/emu]audit.c fileio.c fileio.h
[src/mame/drivers]igs_m027.c

trunk/src/emu/audit.c
r243496r243497
421421
422422   // find the file and checksum it, getting the file length along the way
423423   emu_file file(m_enumerator.options().media_path(), OPEN_FLAG_READ | OPEN_FLAG_NO_PRELOAD);
424   file.set_restrict_to_mediapath(true);
425424   path_iterator path(m_searchpath);
426425   astring curpath;
427426   while (path.next(curpath, record.name()))
trunk/src/emu/fileio.c
r243496r243497
141141emu_file::emu_file(UINT32 openflags)
142142   : m_file(NULL),
143143      m_iterator(""),
144      m_mediapaths(""),
145144      m_crc(0),
146145      m_openflags(openflags),
147146      m_zipfile(NULL),
148147      m_ziplength(0),
149148      m__7zfile(NULL),
150149      m__7zlength(0),
151      m_remove_on_close(false),
152      m_restrict_to_mediapath(false)
150      m_remove_on_close(false)
153151{
154152   // sanity check the open flags
155153   if ((m_openflags & OPEN_FLAG_HAS_CRC) && (m_openflags & OPEN_FLAG_WRITE))
r243496r243497
159157emu_file::emu_file(const char *searchpath, UINT32 openflags)
160158   : m_file(NULL),
161159      m_iterator(searchpath),
162      m_mediapaths(searchpath),
163160      m_crc(0),
164161      m_openflags(openflags),
165162      m_zipfile(NULL),
166163      m_ziplength(0),
167164      m__7zfile(NULL),
168165      m__7zlength(0),
169      m_remove_on_close(false),
170      m_restrict_to_mediapath(false)
166      m_remove_on_close(false)
171167{
172168   // sanity check the open flags
173169   if ((m_openflags & OPEN_FLAG_HAS_CRC) && (m_openflags & OPEN_FLAG_WRITE))
r243496r243497
358354      {
359355         astring tempfullpath = m_fullpath;
360356
361         filerr = attempt_zipped();
357         filerr = attempt__7zped();
362358         if (filerr == FILERR_NONE)
363359            break;
364360
365361         m_fullpath = tempfullpath;
366362
367         filerr = attempt__7zped();
363         filerr = attempt_zipped();
368364         if (filerr == FILERR_NONE)
369365            break;
366
367
370368      }
371369   }
372370   return filerr;
r243496r243497
652650}
653651
654652
655//-------------------------------------------------
656//  part_of_mediapath - checks if 'path' is part of
657//  any media path
658//-------------------------------------------------
659653
660bool emu_file::part_of_mediapath(astring path)
661{
662   bool result = false;
663   astring mediapath;
664   m_mediapaths.reset();
665   while (m_mediapaths.next(mediapath, NULL) && !result)
666      if (path.cmpsubstr(mediapath, 0, mediapath.len()))
667         result = true;
668   return result;
669}
670
671654//-------------------------------------------------
672655//  attempt_zipped - attempt to open a ZIPped file
673656//-------------------------------------------------
r243496r243497
684667      if (dirsep == -1)
685668         return FILERR_NOT_FOUND;
686669
687      if (restrict_to_mediapath())
688         if ( !part_of_mediapath(m_fullpath) )
689            return FILERR_NOT_FOUND;
690
691670      // insert the part from the right of the separator into the head of the filename
692671      if (filename.len() > 0)
693672         filename.ins(0, "/");
r243496r243497
819798      if (dirsep == -1)
820799         return FILERR_NOT_FOUND;
821800
822      if (restrict_to_mediapath())
823         if ( !part_of_mediapath(m_fullpath) )
824            return FILERR_NOT_FOUND;
825
826801      // insert the part from the right of the separator into the head of the filename
827802      if (filename.len() > 0)
828803         filename.ins(0, "/");
trunk/src/emu/fileio.h
r243496r243497
9797   const char *fullpath() const { return m_fullpath; }
9898   UINT32 openflags() const { return m_openflags; }
9999   hash_collection &hashes(const char *types);
100   bool restrict_to_mediapath() { return m_restrict_to_mediapath; }
101   bool part_of_mediapath(astring path);
102100
103101   // setters
104102   void remove_on_close() { m_remove_on_close = true; }
105103   void set_openflags(UINT32 openflags) { assert(m_file == NULL); m_openflags = openflags; }
106   void set_restrict_to_mediapath(bool rtmp = true) { m_restrict_to_mediapath = rtmp; }
107104
108105   // open/close
109106   file_error open(const char *name);
r243496r243497
154151   astring         m_fullpath;                     // full filename
155152   core_file *     m_file;                         // core file pointer
156153   path_iterator   m_iterator;                     // iterator for paths
157   path_iterator   m_mediapaths;         // media-path iterator
158   UINT32          m_crc;                          // file's CRC
154   UINT32          m_crc;                          // iterator for paths
159155   UINT32          m_openflags;                    // flags we used for the open
160156   hash_collection m_hashes;                       // collection of hashes
161157
r243496r243497
168164   UINT64          m__7zlength;                    // 7Z file length
169165
170166   bool            m_remove_on_close;              // flag: remove the file when closing
171   bool      m_restrict_to_mediapath;   // flag: restrict to paths inside the media-path
172167};
173168
174169
trunk/src/mame/drivers/igs_m027.c
r243496r243497
6161   DECLARE_DRIVER_INIT(gonefsh2);
6262   DECLARE_DRIVER_INIT(sddz);
6363   DECLARE_DRIVER_INIT(hauntedh);
64   DECLARE_DRIVER_INIT(bigd2);
64   DECLARE_DRIVER_INIT(zhongguo);
6565   DECLARE_DRIVER_INIT(klxyj);
6666   DECLARE_DRIVER_INIT(fearless);
6767   TILE_GET_INFO_MEMBER(get_tx_tilemap_tile_info);
r243496r243497
569569
570570/*
571571
572Big D2
572Zhong Guo Chu Da D
573573IGS, 2000
574574
575575PCB Layout
r243496r243497
612612
613613*/
614614
615ROM_START( bigd2 )
615ROM_START( zhongguo )
616616   ROM_REGION( 0x04000, "maincpu", 0 )
617617   /* Internal rom of IGS027A ARM based MCU */
618   ROM_LOAD( "bigd2_igs027a", 0x00000, 0x4000, NO_DUMP )
618   ROM_LOAD( "zhongguo_igs027a", 0x00000, 0x4000, NO_DUMP )
619619
620620   ROM_REGION( 0x80000, "user1", 0 ) // external ARM data / prg
621621   ROM_LOAD( "p2600.u10", 0x000000, 0x80000, CRC(9ad34135) SHA1(54717753d1296efe49946369fd4a27181f19dbc0) )
r243496r243497
953953   pgm_create_dummy_internal_arm_region();
954954}
955955
956DRIVER_INIT_MEMBER(igs_m027_state,bigd2)
956DRIVER_INIT_MEMBER(igs_m027_state,zhongguo)
957957{
958   big2_decrypt(machine());
958   zhongguo_decrypt(machine());
959959   //sdwx_gfx_decrypt(machine());
960960   pgm_create_dummy_internal_arm_region();
961961}
r243496r243497
968968
969969GAME( 2002,  sdwx,      0, igs_majhong, sdwx, igs_m027_state, sdwx,        ROT0, "IGS", "Sheng Dan Wu Xian", GAME_IS_SKELETON ) // aka Christmas 5 Line?
970970GAME( 200?,  sddz,      0, igs_majhong, sdwx, igs_m027_state, sddz,        ROT0, "IGS", "Super Dou Di Zhu",  GAME_IS_SKELETON )
971GAME( 2000,  bigd2   0, igs_majhong, sdwx, igs_m027_state, bigd2,       ROT0, "IGS", "Big D2",  GAME_IS_SKELETON )
971GAME( 2000,  zhongguo,  0, igs_majhong, sdwx, igs_m027_state, zhongguo,    ROT0, "IGS", "Zhong Guo Chu Da D",  GAME_IS_SKELETON )
972972GAME( 200?,  lhzb3,     0, igs_majhong, sdwx, igs_m027_state, lhzb3,       ROT0, "IGS", "Long Hu Zheng Ba 3", GAME_IS_SKELETON )
973973GAME( 200?,  lhzb4,     0, igs_majhong, sdwx, igs_m027_state, lhzb4,       ROT0, "IGS", "Long Hu Zheng Ba 4", GAME_IS_SKELETON )
974974GAME( 200?,  klxyj,     0, igs_majhong, sdwx, igs_m027_state, klxyj,       ROT0, "IGS", "Kuai Le Xi You Ji",  GAME_IS_SKELETON )


Previous 199869 Revisions Next


© 1997-2024 The MAME Team