Rewrote memory access handling to properly split execute from read, bus from CPU (but the mappings will still match until otherwise specified), and fixed exec[] usage by the mem_*_phys() functions.

This commit is contained in:
OBattler
2021-04-22 04:27:50 +02:00
parent b0870d5055
commit 957b538c4a
10 changed files with 445 additions and 550 deletions

View File

@@ -81,6 +81,8 @@ seg_reset(x86seg *s)
s->limit_low = 0;
s->limit_high = 0xffff;
if (s == &cpu_state.seg_cs) {
if (!cpu_inited)
fatal("seg_reset(&cpu_state.seg.cs) without an initialized CPU\n");
s->base = AT ? (cpu_16bitbus ? 0x00ff0000 : 0xffff0000) : 0x000ffff0;
s->seg = AT ? 0xf000 : 0xffff;
} else {