• R/O
  • HTTP
  • SSH
  • HTTPS

common_source_project-fm7: Commit

Common Source Code Project for Qt (a.k.a for FM-7).


Commit MetaInfo

Revisionbd1ac6784d2bd95e17571460b556841d34a30b42 (tree)
Time2018-12-13 20:18:14
AuthorK.Ohta <whatisthis.sowhat@gmai...>
CommiterK.Ohta

Log Message

[VM][PCENGINE][OOPS] Fix dummy reading/writing bytes @ $180D:W.

Change Summary

Incremental Difference

--- a/source/src/vm/pcengine/pce.cpp
+++ b/source/src/vm/pcengine/pce.cpp
@@ -1989,14 +1989,14 @@ void PCE::cdrom_write(uint16_t addr, uint8_t data)
19891989 if(data & 0x02) {
19901990 // ADPCM set write address
19911991 adpcm_write_ptr = (cdrom_regs[0x09] << 8) | cdrom_regs[0x08];
1992- adpcm_write_buf = data & 1;
1992+ adpcm_write_buf = ((data & 1) == 0) ? 1 : 0;
19931993 adpcm_written = 0;
19941994 out_debug_log(_T("ADPCM SET WRITE ADDRESS ADDR=%04x\n"), adpcm_write_ptr);
19951995 }
19961996 if(data & 0x08) {
19971997 // ADPCM set read address
19981998 adpcm_read_ptr = (cdrom_regs[0x09] << 8) | cdrom_regs[0x08];
1999- adpcm_read_buf = 2;
1999+ adpcm_read_buf = ((data & 0x04) == 0) ? 2 : 1;
20002000 out_debug_log(_T("ADPCM SET READ ADDRESS ADDR=%04x\n"), adpcm_read_ptr);
20012001 }
20022002 if(data & 0x10) {
Show on old repository browser