OSDN Git Service

[VM][PCENGINE][SCSI_CDROM] Merge Upstream 2020-12-21.
authorK.Ohta <whatisthis.sowhat@gmail.com>
Sun, 31 Jan 2021 14:25:25 +0000 (23:25 +0900)
committerK.Ohta <whatisthis.sowhat@gmail.com>
Sun, 31 Jan 2021 14:25:25 +0000 (23:25 +0900)
source/history.txt
source/revision.txt
source/src/res/credits.html
source/src/vm/pcengine/pce.cpp
source/src/vm/scsi_cdrom.cpp

index 9d2e29d..b87622b 100644 (file)
@@ -1,3 +1,10 @@
+12/21/2020
+
+[VM/SCSI_CDROM] fix start frame of CD-DA playing when track number is specified
+
+[PCENGINE/PCE] fix issue that ADPCM is mistakenly looped
+
+
 12/19/2020
 
 [VM/SCSI_CDROM] fix pre-gap of first track when it is audio track
index 1a45147..537f4db 100644 (file)
@@ -1,3 +1,3 @@
-<B><FONT SIZE=-1>Upstream 2020-12-19<BR>
+<B><FONT SIZE=-1>Upstream 2020-12-21<BR>
 Qt Port and FM7 series 2021-xx-xx<BR>
 </FONT></B>
index e828ee3..4f06c5d 100644 (file)
@@ -18,7 +18,7 @@
 </FONT>
 
 <DIV ALIGN=RIGHT><FONT SIZE=4>
-Upstream Version: 2020-12-19<BR>
+Upstream Version: 2020-12-21<BR>
 Qt Port and FM7 series 2021-xx-xx<BR>
 FFMPEG 4.3 + liblame 3.100 + libx264-161<BR>
 @@RevisionString@@
index 7ccf4c0..1cf7fbd 100644 (file)
@@ -2072,10 +2072,12 @@ uint8_t PCE::cdrom_read(uint16_t addr)
                        return data & ~0x40; // Clear REQ
                }                               
                data = 0;
-//             if(d_cpu->get_pc() == 0xf34b) {
-//                     // XXX: Hack to wait the CD-DA will be finished for the Manhole
-//                     data |= d_scsi_cdrom->read_signal(SIG_SCSI_CDROM_PLAYING) ? 0x80 : 0;
-//             }
+#ifdef _PCENGINE
+               if(d_cpu->get_pc() == 0xf34b) {
+                       // XXX: Hack to wait the CD-DA will be finished for the Manhole
+                       data |= d_scsi_cdrom->read_signal(SIG_SCSI_CDROM_PLAYING) ? 0x80 : 0;
+               }
+#endif
                data |= d_scsi_host->read_signal(SIG_SCSI_BSY) ? 0x80 : 0;
                data |= d_scsi_host->read_signal(SIG_SCSI_REQ) ? 0x40 : 0;
                data |= d_scsi_host->read_signal(SIG_SCSI_MSG) ? 0x20 : 0;
index 2d53635..e9980d6 100644 (file)
@@ -648,16 +648,16 @@ void SCSI_CDROM::start_command()
                                register_event(this, EVENT_CDROM_DELAY_INTERRUPT_ON, delay_time, false, &event_delay_interrupt);
                                //set_phase_delay(SCSI_PHASE_STATUS, delay_time + 10.0);
                                //write_signals(&outputs_done, 0xffffffff);
-                               set_phase_delay(SCSI_PHASE_STATUS, 10.0);
+                               set_phase_delay(SCSI_PHASE_STATUS, delay_time);
+                               if(__SCSI_DEBUG_LOG) {
+                                       uint32_t s_msf = lba_to_msf(cdda_start_frame);
+                                       uint32_t e_msf = lba_to_msf(cdda_end_frame);
+                                       this->out_debug_log(_T("[SCSI_DEV:ID=%d] Start=%02x:%02x:%02x End=%02x:%02x:%02x Mode=%d\n"), scsi_id,
+                                                                               (s_msf >> 16) & 0xff, (s_msf >> 8) & 0xff, s_msf & 0xff,
+                                                                               (e_msf >> 16) & 0xff, (e_msf >> 8) & 0xff, e_msf & 0xff, cdda_play_mode);
+                               }
                                return;
                        }
-                       if(__SCSI_DEBUG_LOG) {
-                               uint32_t s_msf = lba_to_msf(cdda_start_frame);
-                               uint32_t e_msf = lba_to_msf(cdda_end_frame);
-                               this->out_debug_log(_T("[SCSI_DEV:ID=%d] Start=%02x:%02x:%02x End=%02x:%02x:%02x Mode=%d\n"), scsi_id,
-                                       (s_msf >> 16) & 0xff, (s_msf >> 8) & 0xff, s_msf & 0xff,
-                                       (e_msf >> 16) & 0xff, (e_msf >> 8) & 0xff, e_msf & 0xff, cdda_play_mode);
-                       }
                }
                // change to status phase
                set_dat(is_device_ready() ? SCSI_STATUS_GOOD : SCSI_STATUS_CHKCOND);
@@ -708,11 +708,12 @@ void SCSI_CDROM::start_command()
                                        }
                                        int _track = FROM_BCD(command[2]) - 1;
                                        if((_track >= 0) && ((_track + 1) <= track_num)) {
-                                               cdda_end_frame = toc_table[_track].index0;
+                                               //cdda_end_frame = toc_table[_track].index0;
                                                if(is_cue) {
                                                        if(current_track != _track) {
                                                                get_track_by_track_num(_track);
-                                                               cdda_start_frame = toc_table[_track].index0;
+                                                               cdda_start_frame = toc_table[_track].index1;
+//                                                             cdda_start_frame = toc_table[_track].index0;
                                                                cdda_end_frame = toc_table[_track].lba_size + toc_table[_track].lba_offset;
                                                                cdda_playing_frame = cdda_start_frame;
                                                                if(is_cue) {
@@ -725,7 +726,8 @@ void SCSI_CDROM::start_command()
                                                        }
                                                }
                                        } else {
-                                               cdda_end_frame = toc_table[track_num].index0;
+//                                             cdda_end_frame = toc_table[track_num].index0;
+                                               cdda_start_frame = toc_table[track_num].index0;
                                        }
                                }
                                break;