comparison genesis.c @ 1914:5b94e0e7c5a5

Reading from Z80 bus when Z80 is not bus requested should return open bus. Fixes regression in Metal Sonic Rebooted
author Michael Pavone <pavone@retrodev.com>
date Thu, 02 Apr 2020 20:17:08 -0700
parents 508522f08e4d
children 53faef14cbdb
comparison
equal deleted inserted replaced
1913:2c742812bcbb 1914:5b94e0e7c5a5
886 } else { 886 } else {
887 fatal_error("Machine freeze due to read of Z80 VDP memory window by 68K: %X\n", location | 0xA00000); 887 fatal_error("Machine freeze due to read of Z80 VDP memory window by 68K: %X\n", location | 0xA00000);
888 value = 0xFF; 888 value = 0xFF;
889 } 889 }
890 } else { 890 } else {
891 value = 0xFF; 891 uint16_t word = get_open_bus_value(&gen->header);
892 value = location & 1 ? word : word >> 8;
892 } 893 }
893 } else { 894 } else {
894 if (location < 0x10100) { 895 if (location < 0x10100) {
895 switch(location >> 1 & 0xFF) 896 switch(location >> 1 & 0xFF)
896 { 897 {