Пример #1
0
        //-------------------------------------------------
        //  audit_one_disk - validate a single disk entry
        //-------------------------------------------------
        audit_record audit_one_disk(ListPointer <rom_entry> rom, string locationtag = null)  //const rom_entry *rom
        {
            // allocate and append a new record
            audit_record record = m_record_list.emplace_back(new audit_record(rom, audit_record.media_type.MEDIA_DISK)).Value;  //audit_record &record = *m_record_list.emplace(m_record_list.end(), *rom, media_type::DISK);

            // open the disk
            chd_file  source = new chd_file();
            chd_error err    = (chd_error)romload_global.open_disk_image(m_enumerator.options(), m_enumerator.driver(), rom[0], source, locationtag);

            // if we succeeded, get the hashes
            if (err == chd_error.CHDERR_NONE)
            {
                util.hash_collection hashes = new util.hash_collection();

                // if there's a SHA1 hash, add them to the output hash
                if (source.sha1() != null)
                {
                    hashes.add_sha1(source.sha1());
                }

                // update the actual values
                record.set_actual(hashes);
            }

            // compute the final status
            compute_status(record, rom[0], err == chd_error.CHDERR_NONE);
            return(record);
        }
Пример #2
0
        //-------------------------------------------------
        //  audit_one_disk - validate a single disk entry
        //-------------------------------------------------
        audit_record audit_one_disk(Pointer <rom_entry> rom, object args)  //template <typename... T> audit_record &audit_one_disk(const rom_entry *rom, T &&... args);
        {
            // allocate and append a new record
            audit_record record = m_record_list.emplace_back(new audit_record(rom, media_type.DISK)).Value;  //audit_record &record = *m_record_list.emplace(m_record_list.end(), *rom, media_type::DISK);

            // open the disk
            chd_file source = new chd_file();

            throw new emu_unimplemented();
#if false
#endif
        }
Пример #3
0
 /**
  * @fn  chd_error chd_file::open(core_file &file, bool writeable, chd_file *parent)
  *
  * @brief   -------------------------------------------------
  *            open - open an existing file for read or read/write
  *          -------------------------------------------------.
  *
  * @param [in,out]  file    The file.
  * @param   writeable       true if writeable.
  * @param [in,out]  parent  If non-null, the parent.
  *
  * @return  A chd_error.
  */
 public std.error_condition open(util.core_file file, bool writeable = false, chd_file parent = null)
 {
     throw new emu_unimplemented();
 }
Пример #4
0
        //sha1_t raw_sha1();
        //sha1_t parent_sha1();
        //std::error_condition hunk_info(uint32_t hunknum, chd_codec_type &compressor, uint32_t &compbytes);


        // setters
        //void set_raw_sha1(sha1_t rawdata);
        //void set_parent_sha1(sha1_t parent);


        // file create
        //std::error_condition create(std::string_view filename, uint64_t logicalbytes, uint32_t hunkbytes, uint32_t unitbytes, chd_codec_type compression[4]);
        //std::error_condition create(util::random_read_write::ptr &&file, uint64_t logicalbytes, uint32_t hunkbytes, uint32_t unitbytes, chd_codec_type compression[4]);
        //std::error_condition create(std::string_view filename, uint64_t logicalbytes, uint32_t hunkbytes, chd_codec_type compression[4], chd_file &parent);
        //std::error_condition create(util::random_read_write::ptr &&file, uint64_t logicalbytes, uint32_t hunkbytes, chd_codec_type compression[4], chd_file &parent);


        // file open

        /**
         * @fn  chd_error chd_file::open(const char *filename, bool writeable, chd_file *parent)
         *
         * @brief   -------------------------------------------------
         *            open - open an existing file for read or read/write
         *          -------------------------------------------------.
         *
         * @param   filename        Filename of the file.
         * @param   writeable       true if writeable.
         * @param [in,out]  parent  If non-null, the parent.
         *
         * @return  A chd_error.
         */
        public std.error_condition open(string filename, bool writeable = false, chd_file parent = null)
        {
            throw new emu_unimplemented();
        }
Пример #5
0
Файл: chd.cs Проект: kwanboy/mcs
 /**
  * @fn  chd_error chd_file::open(core_file &file, bool writeable, chd_file *parent)
  *
  * @brief   -------------------------------------------------
  *            open - open an existing file for read or read/write
  *          -------------------------------------------------.
  *
  * @param [in,out]  file    The file.
  * @param   writeable       true if writeable.
  * @param [in,out]  parent  If non-null, the parent.
  *
  * @return  A chd_error.
  */
 public chd_error open(util.core_file file, bool writeable = false, chd_file parent = null)
 {
     throw new emu_unimplemented();
 }
Пример #6
0
Файл: chd.cs Проект: kwanboy/mcs
        //sha1_t raw_sha1();
        //sha1_t parent_sha1();
        //chd_error hunk_info(UINT32 hunknum, chd_codec_type &compressor, UINT32 &compbytes);


        // setters
        //void set_raw_sha1(sha1_t rawdata);
        //void set_parent_sha1(sha1_t parent);


        // file create
        //chd_error create(const char *filename, UINT64 logicalbytes, UINT32 hunkbytes, UINT32 unitbytes, chd_codec_type compression[4]);
        //chd_error create(core_file &file, UINT64 logicalbytes, UINT32 hunkbytes, UINT32 unitbytes, chd_codec_type compression[4]);
        //chd_error create(const char *filename, UINT64 logicalbytes, UINT32 hunkbytes, chd_codec_type compression[4], chd_file &parent);
        //chd_error create(core_file &file, UINT64 logicalbytes, UINT32 hunkbytes, chd_codec_type compression[4], chd_file &parent);


        // file open

        /**
         * @fn  chd_error chd_file::open(const char *filename, bool writeable, chd_file *parent)
         *
         * @brief   -------------------------------------------------
         *            open - open an existing file for read or read/write
         *          -------------------------------------------------.
         *
         * @param   filename        Filename of the file.
         * @param   writeable       true if writeable.
         * @param [in,out]  parent  If non-null, the parent.
         *
         * @return  A chd_error.
         */
        public chd_error open(string filename, bool writeable = false, chd_file parent = null)
        {
            throw new emu_unimplemented();
        }