diff cpu_dsl.py @ 2499:d74d3998482c

Make some progress on compiling full emulator with new 68K core
author Michael Pavone <pavone@retrodev.com>
date Tue, 30 Apr 2024 00:02:14 -0700
parents 95d9809a3973
children d44fe974fb85
line wrap: on
line diff
--- a/cpu_dsl.py	Mon Apr 29 22:57:49 2024 -0700
+++ b/cpu_dsl.py	Tue Apr 30 00:02:14 2024 -0700
@@ -1598,6 +1598,7 @@
 		hFile.write('\n#include "backend.h"')
 		hFile.write('\n\ntypedef struct {')
 		hFile.write('\n\tcpu_options gen;')
+		hFile.write('\n\tuint8_t address_log;')
 		hFile.write('\n}} {0}options;'.format(self.prefix))
 		hFile.write('\n\ntypedef struct {')
 		hFile.write('\n\t{0}options *opts;'.format(self.prefix))
@@ -1606,6 +1607,8 @@
 		hFile.write('\n')
 		hFile.write('\nvoid {pre}execute({type} *context, uint32_t target_cycle);'.format(pre = self.prefix, type = self.context_type))
 		for decl in self.declares:
+			if decl.startswith('define '):
+				decl = '#' + decl
 			hFile.write('\n' + decl)
 		hFile.write('\n#endif //{0}_'.format(macro))
 		hFile.write('\n')