mirror of
https://github.com/pevans/erc-c.git
synced 2025-01-31 04:31:01 +00:00
Use DI to obtain the reflect struct
This commit is contained in:
parent
8450ccd3c5
commit
09017aa171
@ -3,7 +3,7 @@
|
||||
|
||||
#include "vm_reflect.h"
|
||||
|
||||
extern void apple2_reflect_init(vm_reflect *);
|
||||
extern void apple2_reflect_init();
|
||||
|
||||
extern REFLECT(apple2_reflect_cpu_info);
|
||||
|
||||
|
@ -4,18 +4,22 @@
|
||||
|
||||
#include "apple2.reflect.h"
|
||||
#include "mos6502.h"
|
||||
#include "vm_di.h"
|
||||
|
||||
#define CPU(x) \
|
||||
mos6502 *x = (mos6502 *)ref->cpu
|
||||
|
||||
void
|
||||
apple2_reflect_init(vm_reflect *ref)
|
||||
apple2_reflect_init()
|
||||
{
|
||||
vm_reflect *ref = (vm_reflect *)vm_di_get(VM_REFLECT);
|
||||
|
||||
ref->cpu_info = apple2_reflect_cpu_info;
|
||||
}
|
||||
|
||||
REFLECT(apple2_reflect_cpu_info)
|
||||
{
|
||||
CPU(cpu);
|
||||
// CPU(cpu);
|
||||
|
||||
printf("hey\n");
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user