comparison genesis.c @ 1915:53faef14cbdb

Don't lockup on writes to !TIME or !FDC regions regardless of whether anything is mapped there
author Michael Pavone <pavone@retrodev.com>
date Thu, 02 Apr 2020 20:32:09 -0700
parents 5b94e0e7c5a5
children 9fd4bedc1a31
comparison
equal deleted inserted replaced
1914:5b94e0e7c5a5 1915:53faef14cbdb
1118 uint8_t has_tmss = gen->version_reg & 0xF; 1118 uint8_t has_tmss = gen->version_reg & 0xF;
1119 if (has_tmss && (location == 0xA14000 || location == 0xA14002)) { 1119 if (has_tmss && (location == 0xA14000 || location == 0xA14002)) {
1120 gen->tmss_lock[location >> 1 & 1] = value; 1120 gen->tmss_lock[location >> 1 & 1] = value;
1121 } else if (has_tmss && location == 0xA14100) { 1121 } else if (has_tmss && location == 0xA14100) {
1122 //TODO: implement TMSS control register 1122 //TODO: implement TMSS control register
1123 } else { 1123 } else if (location < 0xA12000 || location >= 0xA13100 || (location >= 0xA12100 && location < 0xA13000)) {
1124 fatal_error("Machine freeze due to unmapped write to %X\n", location); 1124 fatal_error("Machine freeze due to unmapped write to %X\n", location);
1125 } 1125 }
1126 return vcontext; 1126 return vcontext;
1127 } 1127 }
1128 1128
1140 gen->tmss_lock[offset] &= 0xFF; 1140 gen->tmss_lock[offset] &= 0xFF;
1141 gen->tmss_lock[offset] |= value << 8; 1141 gen->tmss_lock[offset] |= value << 8;
1142 } 1142 }
1143 } else if (has_tmss && (location == 0xA14100 || location == 0xA14101)) { 1143 } else if (has_tmss && (location == 0xA14100 || location == 0xA14101)) {
1144 //TODO: implement TMSS control register 1144 //TODO: implement TMSS control register
1145 } else { 1145 } else if (location < 0xA12000 || location >= 0xA13100 || (location >= 0xA12100 && location < 0xA13000)) {
1146 fatal_error("Machine freeze due to unmapped byte write to %X\n", location); 1146 fatal_error("Machine freeze due to unmapped byte write to %X\n", location);
1147 } 1147 }
1148 return vcontext; 1148 return vcontext;
1149 } 1149 }
1150 1150