mirror of
https://github.com/yuzu-emu/unicorn
synced 2024-11-24 11:08:17 +00:00
target/m68k: Fix initialization of m68k targets
m68k is now able to be used for emulation again. It just needed to properly have the unicorn context be set within the base type for the CPUs
This commit is contained in:
parent
3dc1c40462
commit
44ca501cd3
2 changed files with 4 additions and 3 deletions
|
@ -20,9 +20,8 @@
|
|||
static int dummy_m68k_init(struct uc_struct *uc, MachineState *machine)
|
||||
{
|
||||
CPUM68KState *env;
|
||||
const char *cpu_type = parse_cpu_model(uc, "cf4ve");
|
||||
|
||||
uc->cpu = cpu_create(uc, cpu_type);
|
||||
uc->cpu = cpu_create(uc, machine->cpu_type);
|
||||
if (!uc->cpu) {
|
||||
fprintf(stderr, "Unable to find m68k CPU definition\n");
|
||||
return -1;
|
||||
|
|
|
@ -268,7 +268,7 @@ static void m68k_cpu_class_init(struct uc_struct *uc, ObjectClass *c, void *data
|
|||
initfn, \
|
||||
}
|
||||
|
||||
static const TypeInfo m68k_cpus_type_infos[] = {
|
||||
static TypeInfo m68k_cpus_type_infos[] = {
|
||||
{ /* base class should be registered first */
|
||||
TYPE_M68K_CPU,
|
||||
TYPE_CPU,
|
||||
|
@ -302,5 +302,7 @@ static const TypeInfo m68k_cpus_type_infos[] = {
|
|||
|
||||
void m68k_cpu_register_types(void *opaque)
|
||||
{
|
||||
m68k_cpus_type_infos[0].instance_userdata = opaque;
|
||||
|
||||
type_register_static_array(opaque, m68k_cpus_type_infos, ARRAY_SIZE(m68k_cpus_type_infos));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue