Mercurial > repos > blastem
view gen.c @ 667:30ccf56842d6
All cycle counters are now based off the master clock. This seems to have messed up Z80 interrupt timing (music in Sonic 2 is too slow for instance), but things are generally working
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Sat, 03 Jan 2015 16:08:23 -0800 |
parents | c8fefa140c80 |
children | 724bbec47f86 |
line wrap: on
line source
#include <stdio.h> #include <stdlib.h> #include "gen.h" #include "mem.h" void init_code_info(code_info *code) { size_t size = CODE_ALLOC_SIZE; code->cur = alloc_code(&size); if (!code->cur) { fputs("Failed to allocate memory for generated code\n", stderr); exit(1); } code->last = code->cur + size/sizeof(code_word) - RESERVE_WORDS; }