Changeset 7cc6ac0 in buchla-emu
- Timestamp:
- 08/05/2017 05:07:26 PM (7 years ago)
- Branches:
- master
- Children:
- 5fa5369
- Parents:
- c3f113d
- Files:
-
- 1 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
.gitignore
rc3f113d r7cc6ac0 1 1 bios.abs 2 bios.elf 2 3 midas.abs 4 midas.elf 3 5 4 6 build -
Makefile
rc3f113d r7cc6ac0 109 109 110 110 EMU_C := main.c cpu.c vid.c fpu.c tim.c lcd.c ser.c mid.c fdd.c snd.c \ 111 led.c kbd.c sdl.c 111 led.c kbd.c sdl.c gdb.c 112 112 EMU_O := $(EMU_C:.c=.o) 113 113 EMU_OP := $(EMU_O:%=build/%) … … 128 128 129 129 run: buchla buchla.disk 130 ./buchla 130 ./buchla ${EMU_OPTS} 131 131 132 132 val: buchla buchla.disk 133 133 valgrind --leak-resolution=high --track-fds=yes --leak-check=full \ 134 --show-reachable=yes --suppressions=misc/buchla.supp ./buchla 134 --show-reachable=yes --suppressions=misc/buchla.supp \ 135 ./buchla ${EMU_OPTS} 135 136 136 137 clean: -
emu/all.h
rc3f113d r7cc6ac0 48 48 49 49 extern int32_t sdl_verbose; 50 extern int32_t gdb_verbose; 50 51 extern int32_t cpu_verbose; 51 52 extern int32_t fpu_verbose; … … 68 69 extern void sdl_quit(void); 69 70 extern void sdl_loop(void); 71 72 extern void gdb_init(void); 73 extern void gdb_quit(void); 74 extern void gdb_loop(void); 75 extern void gdb_inst(void); 70 76 71 77 extern SDL_mutex *cpu_mutex; -
emu/cpu.c
rc3f113d r7cc6ac0 470 470 static void inst_cb(void) 471 471 { 472 gdb_inst(); 473 472 474 uint32_t pc = m68k_get_reg(NULL, M68K_REG_PC); 473 475 uint32_t op = m68k_read_memory_16(pc); -
emu/main.c
rc3f113d r7cc6ac0 25 25 static verb_flag_t verb_flags[] = { 26 26 { "sdl", &sdl_verbose }, 27 { "gdb", &gdb_verbose }, 27 28 { "cpu", &cpu_verbose }, 28 29 { "fpu", &fpu_verbose }, … … 128 129 } 129 130 131 static int32_t gdb_thread(void *data) 132 { 133 (void)data; 134 135 gdb_loop(); 136 return 0; 137 } 138 130 139 int32_t main(int32_t argc, char *argv[]) 131 140 { 132 141 parse_args(argc, argv); 133 142 sdl_init(); 143 gdb_init(); 134 144 cpu_init(); 135 145 136 146 SDL_AtomicSet(&run, 1); 137 SDL_Thread *thr = SDL_CreateThread(cpu_thread, "cpu", NULL);147 SDL_Thread *thr_cpu = SDL_CreateThread(cpu_thread, "cpu", NULL); 138 148 139 if (thr == NULL) { 149 if (thr_cpu == NULL) { 150 fail("SDL_CreateThread() failed: %s", SDL_GetError()); 151 } 152 153 SDL_Thread *thr_gdb = SDL_CreateThread(gdb_thread, "gdb", NULL); 154 155 if (thr_gdb == NULL) { 140 156 fail("SDL_CreateThread() failed: %s", SDL_GetError()); 141 157 } 142 158 143 159 sdl_loop(); 144 SDL_WaitThread(thr, NULL); 160 161 SDL_WaitThread(thr_cpu, NULL); 162 SDL_WaitThread(thr_gdb, NULL); 145 163 146 164 cpu_quit(); 165 gdb_quit(); 147 166 sdl_quit(); 148 167 return 0; -
emu/sdl.c
rc3f113d r7cc6ac0 18 18 #include <all.h> 19 19 20 int32_t sdl_verbose = false;20 int32_t sdl_verbose = 0; 21 21 22 22 #define ver(...) _ver(sdl_verbose, 0, __VA_ARGS__)
Note:
See TracChangeset
for help on using the changeset viewer.