if(address >= read_addr[i] && address < read_upper[i]) {
cache->lower = read_addr[i] + pc_address_diff;
cache->upper = read_upper[i] + pc_address_diff;
- cache->data = read_data[i];
+ cache->offset = read_data[i] - cache->lower;
REG_PC += 2;
return be16toh(((unsigned short *)(read_data[i] + (address - read_addr[i])))[0]);
}
{
unsigned int lower;
unsigned int upper;
- unsigned char *data;
+ unsigned char *offset;
} address_translation_cache;
if(pc >= cache->lower && pc < cache->upper)
{
REG_PC += 2;
- return be16toh(((unsigned short *)(cache->data + (pc - cache->lower)))[0]);
+ return be16toh(((unsigned short *)(cache->offset + pc))[0]);
}
return m68ki_read_imm6_addr_slowpath(pc, cache);
}