OSDN Git Service

[VM][FMTOWNS][CDROM] Fix around re-calculate TOC table.
authorK.Ohta <whatisthis.sowhat@gmail.com>
Tue, 16 Mar 2021 15:51:36 +0000 (00:51 +0900)
committerK.Ohta <whatisthis.sowhat@gmail.com>
Tue, 16 Mar 2021 15:51:36 +0000 (00:51 +0900)
source/src/vm/fmtowns/cdrom_cue.cpp
source/src/vm/fmtowns/cdrom_skelton.cpp
source/src/vm/fmtowns/cdrom_skelton.h

index c891323..91fbbec 100644 (file)
@@ -273,9 +273,6 @@ void CDROM_CUE::recalc_index_table(int num)
        toc_table[num].index0 = index0;
        toc_table[num].index1 = index1;
        
-       toc_table[num].physical_size = physical_size;
-       toc_table[num].logical_size = logical_size;
-       toc_table[num].real_physical_size = real_physical_size;
        memset(toc_table[num].filename, 0x00, sizeof(_TCHAR) * _MAX_PATH);
        if(!(current_filename.empty())) {
                current_filename.copy(toc_table[num].filename, _MAX_PATH - 1);
index e4840b6..4aee3df 100644 (file)
@@ -1017,9 +1017,13 @@ uint32_t CDROM_SKELTON::get_logical_block_size() const
  * @brief Parse CUE/CCD sheet, check track data and construct tracks table.
  * @return true if succeeded.
  * @note Must open sheet file before using.
+ * @note Initialize TOC table when calling.
  */
 bool CDROM_SKELTON::parse_sheet()
 {
+       for(int trk = 0; trk < 102; trk++) {
+               init_toc_table(trk);
+       }
        return true;
 }
 
index de10f36..58a7035 100644 (file)
@@ -249,6 +249,7 @@ protected:
         * @brief Parse CUE/CCD sheet, check track data and construct tracks table.
         * @return true if succeeded.
         * @note Must open sheet file before using.
+        * @note Initialize TOC table when calling.
         */
        virtual bool parse_sheet();
        /*!