struct block_list *next, *current = *blist;
while (current != NULL) {
next = current->next;
- current->next = blist_free;
- blist_free = current;
+ rm_from_block_lists(current->block);
current = next;
}
*blist = NULL;
block_tables[i] = calloc(BLOCK_MAX_COUNT(i), sizeof(*block_tables[0]));
if (block_tables[i] == NULL)
goto fail;
- // max 2 block links (exits) per block
block_link_pool[i] = calloc(BLOCK_LINK_MAX_COUNT(i),
sizeof(*block_link_pool[0]));
if (block_link_pool[i] == NULL)
case 0x2e:
case 0x2f:
if (REG8IN16(r, a) != d) {
- int cycles = SekCyclesDone();
+ unsigned int cycles = SekCyclesDone();
- if (cycles - (int)msh2.m68krcycles_done > 30)
+ if (CYCLES_GT(cycles - msh2.m68krcycles_done, 64))
p32x_sync_sh2s(cycles);
REG8IN16(r, a) = d;