#include <stdint.h>
#include <stdlib.h>
#include "../libcpu/m68k.h"
+#include "../libcpu/execute.h"
#include "mercenary.h"
#define INITIAL_STACK 0x7fffa
#define RESET_VECTOR 0x5a16c
// #define RESET_VECTOR 0x5a1a4 /* strange reset vector that causes the player to fly around */
-const uint32_t mercenary_stop_at[] = {
- 0x5a826, /* done with rendering, waiting for VBL */
- 0x55d8c, /* after pressing 'HELP' key before showing menu line on benson */
- 0x56398, /* waiting for menu command */
- 0x55d94, /* after pressing 'HELP' key while showing menu line on benson */
- 0x563a6, /* after pressing 'RETURN' while game waits for other key to resume */
- 0x52946, /* after dying, waiting for VBL to fade out palette */
- 0x0 /* end */
-}; /* break points for rendering and continue with processing loop */
+
+/* interrupt CPU execution at special break points and tell emulation what to do */
+const struct cpu_stop mercenary_stop_at[] = {
+ { 0x5a826, STOP_AT_WAIT_VBL }, /* done with rendering, waiting for VBL */
+ { 0x55d8c, STOP_AT_WAIT_VBL }, /* after pressing 'HELP' key before showing menu line on benson */
+ { 0x56398, STOP_AT_WAIT_VBL }, /* waiting for menu command */
+ { 0x55d94, STOP_AT_WAIT_VBL }, /* after pressing 'HELP' key while showing menu line on benson */
+ { 0x563a6, STOP_AT_WAIT_VBL }, /* after pressing 'RETURN' while game waits for other key to resume */
+ { 0x52946, STOP_AT_WAIT_VBL }, /* after dying, waiting for VBL to fade out palette */
+ { 0x0, STOP_AT_END }, /* end */
+};
extern const uint32_t mercenary3_hex[];
extern int mercenary3_hex_size;