mirror of
https://github.com/pevans/erc-c.git
synced 2025-01-03 00:29:38 +00:00
Move reflect to event
This commit is contained in:
parent
8a899f87a2
commit
c665df3531
@ -6,12 +6,12 @@ set(erc_sources
|
|||||||
apple2/dec.c
|
apple2/dec.c
|
||||||
apple2/draw.c
|
apple2/draw.c
|
||||||
apple2/enc.c
|
apple2/enc.c
|
||||||
|
apple2/event.c
|
||||||
apple2/hires.c
|
apple2/hires.c
|
||||||
apple2/kb.c
|
apple2/kb.c
|
||||||
apple2/lores.c
|
apple2/lores.c
|
||||||
apple2/mem.c
|
apple2/mem.c
|
||||||
apple2/pc.c
|
apple2/pc.c
|
||||||
apple2/reflect.c
|
|
||||||
apple2/text.c
|
apple2/text.c
|
||||||
log.c
|
log.c
|
||||||
mos6502/mos6502.c
|
mos6502/mos6502.c
|
||||||
|
@ -341,7 +341,7 @@ apple2_run_loop(apple2 *mach)
|
|||||||
int sleep = 5;
|
int sleep = 5;
|
||||||
|
|
||||||
if (dlog != NULL) {
|
if (dlog != NULL) {
|
||||||
vm_reflect_disasm(NULL);
|
mach->disasm = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
int i = 0;
|
int i = 0;
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "apple2/apple2.h"
|
#include "apple2/apple2.h"
|
||||||
#include "apple2/reflect.h"
|
#include "apple2/event.h"
|
||||||
#include "vm_di.h"
|
#include "vm_di.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -13,11 +13,10 @@
|
|||||||
|
|
||||||
#include "apple2/apple2.h"
|
#include "apple2/apple2.h"
|
||||||
#include "apple2/draw.h"
|
#include "apple2/draw.h"
|
||||||
#include "apple2/reflect.h"
|
#include "apple2/event.h"
|
||||||
#include "log.h"
|
#include "log.h"
|
||||||
#include "option.h"
|
#include "option.h"
|
||||||
#include "vm_di.h"
|
#include "vm_di.h"
|
||||||
#include "vm_reflect.h"
|
|
||||||
#include "vm_screen.h"
|
#include "vm_screen.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -93,7 +92,6 @@ main(int argc, char **argv)
|
|||||||
{
|
{
|
||||||
apple2 *mach;
|
apple2 *mach;
|
||||||
vm_screen *screen;
|
vm_screen *screen;
|
||||||
vm_reflect *ref;
|
|
||||||
int err;
|
int err;
|
||||||
|
|
||||||
init(argc, argv);
|
init(argc, argv);
|
||||||
@ -117,9 +115,6 @@ main(int argc, char **argv)
|
|||||||
// _to_ define a cpu field.
|
// _to_ define a cpu field.
|
||||||
vm_di_set(VM_CPU, mach->cpu);
|
vm_di_set(VM_CPU, mach->cpu);
|
||||||
|
|
||||||
ref = vm_reflect_create();
|
|
||||||
vm_di_set(VM_REFLECT, ref);
|
|
||||||
|
|
||||||
apple2_event_init();
|
apple2_event_init();
|
||||||
|
|
||||||
// Ok, it's time to boot this up!
|
// Ok, it's time to boot this up!
|
||||||
@ -137,7 +132,6 @@ main(int argc, char **argv)
|
|||||||
|
|
||||||
// We're all done, so let's tear everything down.
|
// We're all done, so let's tear everything down.
|
||||||
apple2_free(mach);
|
apple2_free(mach);
|
||||||
vm_reflect_free(ref);
|
|
||||||
|
|
||||||
// ha ha ha ha #nervous #laughter
|
// ha ha ha ha #nervous #laughter
|
||||||
printf("Hello, world\n");
|
printf("Hello, world\n");
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
#include "mos6502/dis.h"
|
#include "mos6502/dis.h"
|
||||||
#include "vm_debug.h"
|
#include "vm_debug.h"
|
||||||
#include "vm_di.h"
|
#include "vm_di.h"
|
||||||
#include "vm_reflect.h"
|
#include "vm_event.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The largest address size we can set a breakpoint for
|
* The largest address size we can set a breakpoint for
|
||||||
@ -321,13 +321,13 @@ DEBUG_CMD(help)
|
|||||||
*/
|
*/
|
||||||
DEBUG_CMD(resume)
|
DEBUG_CMD(resume)
|
||||||
{
|
{
|
||||||
mos6502 *cpu = (mos6502 *)vm_di_get(VM_CPU);
|
apple2 *mach = (apple2 *)vm_di_get(VM_MACHINE);
|
||||||
|
|
||||||
// If we paused because of a breakpoint, then we need to clear it
|
// If we paused because of a breakpoint, then we need to clear it
|
||||||
// before we can really keep moving.
|
// before we can really keep moving.
|
||||||
vm_debug_unbreak(cpu->PC);
|
vm_debug_unbreak(mach->cpu->PC);
|
||||||
|
|
||||||
vm_reflect_pause(NULL);
|
mach->paused = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -365,9 +365,6 @@ DEBUG_CMD(printaddr)
|
|||||||
*/
|
*/
|
||||||
DEBUG_CMD(jump)
|
DEBUG_CMD(jump)
|
||||||
{
|
{
|
||||||
// FIXME: same issue as for printaddr -- overall we need to refactor
|
|
||||||
// vm_reflect quite a bit
|
|
||||||
|
|
||||||
mos6502 *cpu = (mos6502 *)vm_di_get(VM_CPU);
|
mos6502 *cpu = (mos6502 *)vm_di_get(VM_CPU);
|
||||||
cpu->PC = args->addr1;
|
cpu->PC = args->addr1;
|
||||||
}
|
}
|
||||||
@ -439,7 +436,7 @@ DEBUG_CMD(disasm)
|
|||||||
apple2 *mach = (apple2 *)vm_di_get(VM_MACHINE);
|
apple2 *mach = (apple2 *)vm_di_get(VM_MACHINE);
|
||||||
FILE *stream = (FILE *)vm_di_get(VM_OUTPUT);
|
FILE *stream = (FILE *)vm_di_get(VM_OUTPUT);
|
||||||
|
|
||||||
vm_reflect_disasm(NULL);
|
mach->disasm = true;
|
||||||
|
|
||||||
fprintf(stream, "disassembly %s\n", mach->disasm ? "ON" : "OFF");
|
fprintf(stream, "disassembly %s\n", mach->disasm ? "ON" : "OFF");
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user