Human68k CUI emulator with sound.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

v68fecall.c 13KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524
  1. #include <stdint.h>
  2. #include <stdio.h>
  3. #include <string.h>
  4. #include <time.h>
  5. #include <math.h>
  6. #include "v68.h"
  7. #include "v68io.h"
  8. #include "musashi/m68k.h"
  9. #include "musashi/m68kcpu.h"
  10. #include "sjis.h"
  11. #define FE_CALL_LMUL 0x00
  12. #define FE_CALL_LDIV 0x01
  13. #define FE_CALL_LMOD 0x02
  14. #define FE_CALL_UMUL 0x04
  15. #define FE_CALL_UDIV 0x05
  16. #define FE_CALL_UMOD 0x06
  17. #define FE_CALL_IMUL 0x08
  18. #define FE_CALL_IDIV 0x09
  19. #define FE_CALL_RANDOMIZE 0x0c
  20. #define FE_CALL_SRAND 0x0d
  21. #define FE_CALL_RAND 0x0e
  22. #define FE_CALL_STOL 0x10
  23. #define FE_CALL_LTOS 0x11
  24. #define FE_CALL_STOH 0x12
  25. #define FE_CALL_HTOS 0x13
  26. #define FE_CALL_STOO 0x14
  27. #define FE_CALL_OTOS 0x15
  28. #define FE_CALL_STOB 0x16
  29. #define FE_CALL_BTOS 0x17
  30. #define FE_CALL_IUSING 0x18
  31. #define FE_CALL_LTOD 0x1a
  32. #define FE_CALL_DTOL 0x1b
  33. #define FE_CALL_LTOF 0x1c
  34. #define FE_CALL_FTOL 0x1d
  35. #define FE_CALL_FTOD 0x1e
  36. #define FE_CALL_DTOF 0x1f
  37. #define FE_CALL_VAL 0x20
  38. #define FE_CALL_USING 0x21
  39. #define FE_CALL_STOD 0x22
  40. #define FE_CALL_DTOS 0x23
  41. #define FE_CALL_ECVT 0x24
  42. #define FE_CALL_FCVT 0x25
  43. #define FE_CALL_GCVT 0x26
  44. #define FE_CALL_DTST 0x28
  45. #define FE_CALL_DCMP 0x29
  46. #define FE_CALL_DNEG 0x2a
  47. #define FE_CALL_DADD 0x2b
  48. #define FE_CALL_DSUB 0x2c
  49. #define FE_CALL_DMUL 0x2d
  50. #define FE_CALL_DDIV 0x2e
  51. #define FE_CALL_DMOD 0x2f
  52. #define FE_CALL_DABS 0x30
  53. #define FE_CALL_DCEIL 0x31
  54. #define FE_CALL_DFIX 0x32
  55. #define FE_CALL_DFLOOR 0x33
  56. #define FE_CALL_DFRAC 0x34
  57. #define FE_CALL_DSGN 0x35
  58. #define FE_CALL_SIN 0x36
  59. #define FE_CALL_COS 0x37
  60. #define FE_CALL_TAN 0x38
  61. #define FE_CALL_ATAN 0x39
  62. #define FE_CALL_LOG 0x3a
  63. #define FE_CALL_EXP 0x3b
  64. #define FE_CALL_SQR 0x3c
  65. #define FE_CALL_PI 0x3d
  66. #define FE_CALL_NPI 0x3e
  67. #define FE_CALL_POWER 0x3f
  68. #define FE_CALL_RND 0x40
  69. #define FE_CALL_SINH 0x41
  70. #define FE_CALL_COSH 0x42
  71. #define FE_CALL_TANH 0x43
  72. #define FE_CALL_ATANH 0x44
  73. #define FE_CALL_ASIN 0x45
  74. #define FE_CALL_ACOS 0x46
  75. #define FE_CALL_LOG10 0x47
  76. #define FE_CALL_LOG2 0x48
  77. #define FE_CALL_DFREXP 0x49
  78. #define FE_CALL_DLDEXP 0x4a
  79. #define FE_CALL_DADDONE 0x4b
  80. #define FE_CALL_DSUBONE 0x4c
  81. #define FE_CALL_DDIVTWO 0x4d
  82. #define FE_CALL_DIEECNV 0x4e
  83. #define FE_CALL_IEEDCNV 0x4f
  84. #define FE_CALL_FVAL 0x50
  85. #define FE_CALL_FUSING 0x51
  86. #define FE_CALL_STOF 0x52
  87. #define FE_CALL_FTOS 0x53
  88. #define FE_CALL_FECVT 0x54
  89. #define FE_CALL_FFCVT 0x55
  90. #define FE_CALL_FGCVT 0x56
  91. #define FE_CALL_FTST 0x58
  92. #define FE_CALL_FCMP 0x59
  93. #define FE_CALL_FNEG 0x5a
  94. #define FE_CALL_FADD 0x5b
  95. #define FE_CALL_FSUB 0x5c
  96. #define FE_CALL_FMUL 0x5d
  97. #define FE_CALL_FDIV 0x5e
  98. #define FE_CALL_FMOD 0x5f
  99. #define FE_CALL_FABS 0x60
  100. #define FE_CALL_FCEIL 0x61
  101. #define FE_CALL_FFIX 0x62
  102. #define FE_CALL_FFLOOR 0x63
  103. #define FE_CALL_FFRAC 0x64
  104. #define FE_CALL_FSGN 0x65
  105. #define FE_CALL_FSIN 0x66
  106. #define FE_CALL_FCOS 0x67
  107. #define FE_CALL_FTAN 0x68
  108. #define FE_CALL_FATAN 0x69
  109. #define FE_CALL_FLOG 0x6a
  110. #define FE_CALL_FEXP 0x6b
  111. #define FE_CALL_FSQR 0x6c
  112. #define FE_CALL_FPI 0x6d
  113. #define FE_CALL_FNPI 0x6e
  114. #define FE_CALL_FPOWER 0x6f
  115. #define FE_CALL_FRND 0x70
  116. #define FE_CALL_FSINH 0x71
  117. #define FE_CALL_FCOSH 0x72
  118. #define FE_CALL_FTANH 0x73
  119. #define FE_CALL_FATANH 0x74
  120. #define FE_CALL_FASIN 0x75
  121. #define FE_CALL_FACOS 0x76
  122. #define FE_CALL_FLOG10 0x77
  123. #define FE_CALL_FLOG2 0x78
  124. #define FE_CALL_FFREXP 0x79
  125. #define FE_CALL_FLDEXP 0x7a
  126. #define FE_CALL_FADDONE 0x7b
  127. #define FE_CALL_FSUBONE 0x7c
  128. #define FE_CALL_FDIVTWO 0x7d
  129. #define FE_CALL_FIEECNV 0x7e
  130. #define FE_CALL_IEEFCNV 0x7f
  131. #define FE_CALL_CLMUL 0xe0
  132. #define FE_CALL_CLDIV 0xe1
  133. #define FE_CALL_CLMOD 0xe2
  134. #define FE_CALL_CUMUL 0xe3
  135. #define FE_CALL_CUDIV 0xe4
  136. #define FE_CALL_CUMOD 0xe5
  137. #define FE_CALL_CLTOD 0xe6
  138. #define FE_CALL_CDTOL 0xe7
  139. #define FE_CALL_CLTOF 0xe8
  140. #define FE_CALL_CFTOL 0xe9
  141. #define FE_CALL_CFTOD 0xea
  142. #define FE_CALL_CDTOF 0xeb
  143. #define FE_CALL_CDCMP 0xec
  144. #define FE_CALL_CDADD 0xed
  145. #define FE_CALL_CDSUB 0xee
  146. #define FE_CALL_CDMUL 0xef
  147. #define FE_CALL_CDDIV 0xf0
  148. #define FE_CALL_CDMOD 0xf1
  149. #define FE_CALL_CFCMP 0xf2
  150. #define FE_CALL_CFADD 0xf3
  151. #define FE_CALL_CFSUB 0xf4
  152. #define FE_CALL_CFMUL 0xf5
  153. #define FE_CALL_CFDIV 0xf6
  154. #define FE_CALL_CFMOD 0xf7
  155. #define FE_CALL_CDTST 0xf8
  156. #define FE_CALL_CFTST 0xf9
  157. #define FE_CALL_CDINC 0xfa
  158. #define FE_CALL_CFINC 0xfb
  159. #define FE_CALL_CDDEC 0xfc
  160. #define FE_CALL_CFDEC 0xfd
  161. #define FE_CALL_FEVARG 0xfe
  162. #define FE_CALL_FEVECS 0xff
  163. static const char *fe_call_names[256] = {
  164. /* fe00 */ "LMUL",
  165. /* fe01 */ "LDIV",
  166. /* fe02 */ "LMOD",
  167. /* fe03 */ "?",
  168. /* fe04 */ "UMUL",
  169. /* fe05 */ "UDIV",
  170. /* fe06 */ "UMOD",
  171. /* fe07 */ "?",
  172. /* fe08 */ "IMUL",
  173. /* fe09 */ "IDIV",
  174. /* fe0a */ "?",
  175. /* fe0b */ "?",
  176. /* fe0c */ "RANDOMIZE",
  177. /* fe0d */ "SRAND",
  178. /* fe0e */ "RAND",
  179. /* fe0f */ "?",
  180. /* fe10 */ "STOL",
  181. /* fe11 */ "LTOS",
  182. /* fe12 */ "STOH",
  183. /* fe13 */ "HTOS",
  184. /* fe14 */ "STOO",
  185. /* fe15 */ "OTOS",
  186. /* fe16 */ "STOB",
  187. /* fe17 */ "BTOS",
  188. /* fe18 */ "IUSING",
  189. /* fe19 */ "?",
  190. /* fe1a */ "LTOD",
  191. /* fe1b */ "DTOL",
  192. /* fe1c */ "LTOF",
  193. /* fe1d */ "FTOL",
  194. /* fe1e */ "FTOD",
  195. /* fe1f */ "DTOF",
  196. /* fe20 */ "VAL",
  197. /* fe21 */ "USING",
  198. /* fe22 */ "STOD",
  199. /* fe23 */ "DTOS",
  200. /* fe24 */ "ECVT",
  201. /* fe25 */ "FCVT",
  202. /* fe26 */ "GCVT",
  203. /* fe27 */ "?",
  204. /* fe28 */ "DTST",
  205. /* fe29 */ "DCMP",
  206. /* fe2a */ "DNEG",
  207. /* fe2b */ "DADD",
  208. /* fe2c */ "DSUB",
  209. /* fe2d */ "DMUL",
  210. /* fe2e */ "DDIV",
  211. /* fe2f */ "DMOD",
  212. /* fe30 */ "DABS",
  213. /* fe31 */ "DCEIL",
  214. /* fe32 */ "DFIX",
  215. /* fe33 */ "DFLOOR",
  216. /* fe34 */ "DFRAC",
  217. /* fe35 */ "DSGN",
  218. /* fe36 */ "SIN",
  219. /* fe37 */ "COS",
  220. /* fe38 */ "TAN",
  221. /* fe39 */ "ATAN",
  222. /* fe3a */ "LOG",
  223. /* fe3b */ "EXP",
  224. /* fe3c */ "SQR",
  225. /* fe3d */ "PI",
  226. /* fe3e */ "NPI",
  227. /* fe3f */ "POWER",
  228. /* fe40 */ "RND",
  229. /* fe41 */ "SINH",
  230. /* fe42 */ "COSH",
  231. /* fe43 */ "TANH",
  232. /* fe44 */ "ATANH",
  233. /* fe45 */ "ASIN",
  234. /* fe46 */ "ACOS",
  235. /* fe47 */ "LOG10",
  236. /* fe48 */ "LOG2",
  237. /* fe49 */ "DFREXP",
  238. /* fe4a */ "DLDEXP",
  239. /* fe4b */ "DADDONE",
  240. /* fe4c */ "DSUBONE",
  241. /* fe4d */ "DDIVTWO",
  242. /* fe4e */ "DIEECNV",
  243. /* fe4f */ "IEEDCNV",
  244. /* fe50 */ "FVAL",
  245. /* fe51 */ "FUSING",
  246. /* fe52 */ "STOF",
  247. /* fe53 */ "FTOS",
  248. /* fe54 */ "FECVT",
  249. /* fe55 */ "FFCVT",
  250. /* fe56 */ "FGCVT",
  251. /* fe57 */ "?",
  252. /* fe58 */ "FTST",
  253. /* fe59 */ "FCMP",
  254. /* fe5a */ "FNEG",
  255. /* fe5b */ "FADD",
  256. /* fe5c */ "FSUB",
  257. /* fe5d */ "FMUL",
  258. /* fe5e */ "FDIV",
  259. /* fe5f */ "FMOD",
  260. /* fe60 */ "FABS",
  261. /* fe61 */ "FCEIL",
  262. /* fe62 */ "FFIX",
  263. /* fe63 */ "FFLOOR",
  264. /* fe64 */ "FFRAC",
  265. /* fe65 */ "FSGN",
  266. /* fe66 */ "FSIN",
  267. /* fe67 */ "FCOS",
  268. /* fe68 */ "FTAN",
  269. /* fe69 */ "FATAN",
  270. /* fe6a */ "FLOG",
  271. /* fe6b */ "FEXP",
  272. /* fe6c */ "FSQR",
  273. /* fe6d */ "FPI",
  274. /* fe6e */ "FNPI",
  275. /* fe6f */ "FPOWER",
  276. /* fe70 */ "FRND",
  277. /* fe71 */ "FSINH",
  278. /* fe72 */ "FCOSH",
  279. /* fe73 */ "FTANH",
  280. /* fe74 */ "FATANH",
  281. /* fe75 */ "FASIN",
  282. /* fe76 */ "FACOS",
  283. /* fe77 */ "FLOG10",
  284. /* fe78 */ "FLOG2",
  285. /* fe79 */ "FFREXP",
  286. /* fe7a */ "FLDEXP",
  287. /* fe7b */ "FADDONE",
  288. /* fe7c */ "FSUBONE",
  289. /* fe7d */ "FDIVTWO",
  290. /* fe7e */ "FIEECNV",
  291. /* fe7f */ "IEEFCNV",
  292. /* fe80 */ "?",
  293. /* fe81 */ "?",
  294. /* fe82 */ "?",
  295. /* fe83 */ "?",
  296. /* fe84 */ "?",
  297. /* fe85 */ "?",
  298. /* fe86 */ "?",
  299. /* fe87 */ "?",
  300. /* fe88 */ "?",
  301. /* fe89 */ "?",
  302. /* fe8a */ "?",
  303. /* fe8b */ "?",
  304. /* fe8c */ "?",
  305. /* fe8d */ "?",
  306. /* fe8e */ "?",
  307. /* fe8f */ "?",
  308. /* fe90 */ "?",
  309. /* fe91 */ "?",
  310. /* fe92 */ "?",
  311. /* fe93 */ "?",
  312. /* fe94 */ "?",
  313. /* fe95 */ "?",
  314. /* fe96 */ "?",
  315. /* fe97 */ "?",
  316. /* fe98 */ "?",
  317. /* fe99 */ "?",
  318. /* fe9a */ "?",
  319. /* fe9b */ "?",
  320. /* fe9c */ "?",
  321. /* fe9d */ "?",
  322. /* fe9e */ "?",
  323. /* fe9f */ "?",
  324. /* fea0 */ "?",
  325. /* fea1 */ "?",
  326. /* fea2 */ "?",
  327. /* fea3 */ "?",
  328. /* fea4 */ "?",
  329. /* fea5 */ "?",
  330. /* fea6 */ "?",
  331. /* fea7 */ "?",
  332. /* fea8 */ "?",
  333. /* fea9 */ "?",
  334. /* feaa */ "?",
  335. /* feab */ "?",
  336. /* feac */ "?",
  337. /* fead */ "?",
  338. /* feae */ "?",
  339. /* feaf */ "?",
  340. /* feb0 */ "?",
  341. /* feb1 */ "?",
  342. /* feb2 */ "?",
  343. /* feb3 */ "?",
  344. /* feb4 */ "?",
  345. /* feb5 */ "?",
  346. /* feb6 */ "?",
  347. /* feb7 */ "?",
  348. /* feb8 */ "?",
  349. /* feb9 */ "?",
  350. /* feba */ "?",
  351. /* febb */ "?",
  352. /* febc */ "?",
  353. /* febd */ "?",
  354. /* febe */ "?",
  355. /* febf */ "?",
  356. /* fec0 */ "?",
  357. /* fec1 */ "?",
  358. /* fec2 */ "?",
  359. /* fec3 */ "?",
  360. /* fec4 */ "?",
  361. /* fec5 */ "?",
  362. /* fec6 */ "?",
  363. /* fec7 */ "?",
  364. /* fec8 */ "?",
  365. /* fec9 */ "?",
  366. /* feca */ "?",
  367. /* fecb */ "?",
  368. /* fecc */ "?",
  369. /* fecd */ "?",
  370. /* fece */ "?",
  371. /* fecf */ "?",
  372. /* fed0 */ "?",
  373. /* fed1 */ "?",
  374. /* fed2 */ "?",
  375. /* fed3 */ "?",
  376. /* fed4 */ "?",
  377. /* fed5 */ "?",
  378. /* fed6 */ "?",
  379. /* fed7 */ "?",
  380. /* fed8 */ "?",
  381. /* fed9 */ "?",
  382. /* feda */ "?",
  383. /* fedb */ "?",
  384. /* fedc */ "?",
  385. /* fedd */ "?",
  386. /* fede */ "?",
  387. /* fedf */ "?",
  388. /* fee0 */ "CLMUL",
  389. /* fee1 */ "CLDIV",
  390. /* fee2 */ "CLMOD",
  391. /* fee3 */ "CUMUL",
  392. /* fee4 */ "CUDIV",
  393. /* fee5 */ "CUMOD",
  394. /* fee6 */ "CLTOD",
  395. /* fee7 */ "CDTOL",
  396. /* fee8 */ "CLTOF",
  397. /* fee9 */ "CFTOL",
  398. /* feea */ "CFTOD",
  399. /* feeb */ "CDTOF",
  400. /* feec */ "CDCMP",
  401. /* feed */ "CDADD",
  402. /* feee */ "CDSUB",
  403. /* feef */ "CDMUL",
  404. /* fef0 */ "CDDIV",
  405. /* fef1 */ "CDMOD",
  406. /* fef2 */ "CFCMP",
  407. /* fef3 */ "CFADD",
  408. /* fef4 */ "CFSUB",
  409. /* fef5 */ "CFMUL",
  410. /* fef6 */ "CFDIV",
  411. /* fef7 */ "CFMOD",
  412. /* fef8 */ "CDTST",
  413. /* fef9 */ "CFTST",
  414. /* fefa */ "CDINC",
  415. /* fefb */ "CFINC",
  416. /* fefc */ "CDDEC",
  417. /* fefd */ "CFDEC",
  418. /* fefe */ "FEVARG",
  419. /* feff */ "FEVECS",
  420. };
  421. int v68_fe_call(uint16_t instr) {
  422. uint8_t call = instr & 0xff;
  423. if(v68.log_calls)
  424. printf("V68 FE CALL %04x %s\n", instr, fe_call_names[call]);
  425. switch(call) {
  426. case FE_CALL_LTOS: {
  427. char *buf = (char *)&v68.ram[m68k_get_reg(0, M68K_REG_A0)];
  428. sprintf(buf, "%d", m68k_get_reg(0, M68K_REG_D0));
  429. m68k_set_reg(M68K_REG_A0, m68k_get_reg(0, M68K_REG_A0) + strlen(buf));
  430. }
  431. break;
  432. case FE_CALL_CLMOD: {
  433. uint32_t n = m68k_read_memory_32(m68k_get_reg(0, M68K_REG_A7));
  434. uint32_t d = m68k_read_memory_32(m68k_get_reg(0, M68K_REG_A7) + 4);
  435. m68k_write_memory_32(m68k_get_reg(0, M68K_REG_A7), d ? n % d : 0);
  436. if(d == 0) FLAG_C = 1;
  437. }
  438. break;
  439. case FE_CALL_CLDIV: {
  440. uint32_t n = m68k_read_memory_32(m68k_get_reg(0, M68K_REG_A7));
  441. uint32_t d = m68k_read_memory_32(m68k_get_reg(0, M68K_REG_A7) + 4);
  442. m68k_write_memory_32(m68k_get_reg(0, M68K_REG_A7), d ? n / d : 0);
  443. if(d == 0) FLAG_C = 1;
  444. }
  445. break;
  446. case FE_CALL_CLMUL: {
  447. uint32_t n = m68k_read_memory_32(m68k_get_reg(0, M68K_REG_A7));
  448. uint32_t d = m68k_read_memory_32(m68k_get_reg(0, M68K_REG_A7) + 4);
  449. m68k_write_memory_32(m68k_get_reg(0, M68K_REG_A7), d ? n * d : 0);
  450. // if(d == 0) FLAG_C = 1;
  451. }
  452. break;
  453. case FE_CALL_CLTOD: {
  454. double d = m68k_read_memory_32(m68k_get_reg(0, M68K_REG_A7));
  455. uint32_t *p = (uint32_t *)&d;
  456. m68k_write_memory_32(m68k_get_reg(0, M68K_REG_A7), *p++);
  457. m68k_write_memory_32(m68k_get_reg(0, M68K_REG_A7), *p);
  458. }
  459. break;
  460. case FE_CALL_DTST: {
  461. double d = 0;
  462. uint32_t *p = (uint32_t *)&d;
  463. *p++ = m68k_get_reg(0, M68K_REG_D0);
  464. *p = m68k_get_reg(0, M68K_REG_D1);
  465. FLAG_Z = d == 0;
  466. FLAG_N = d < 0;
  467. }
  468. break;
  469. case FE_CALL_POWER: {
  470. double d1 = 0, d2 = 0;
  471. uint32_t *p1 = (uint32_t *)&d1;
  472. uint32_t *p2 = (uint32_t *)&d2;
  473. *p1++ = m68k_get_reg(0, M68K_REG_D0);
  474. *p1 = m68k_get_reg(0, M68K_REG_D1);
  475. *p2++ = m68k_get_reg(0, M68K_REG_D2);
  476. *p2 = m68k_get_reg(0, M68K_REG_D3);
  477. double r = pow(d1, d2);
  478. uint32_t *p = (uint32_t *)&r;
  479. m68k_set_reg(M68K_REG_D0, *p++);
  480. m68k_set_reg(M68K_REG_D1, *p);
  481. }
  482. break;
  483. case FE_CALL_CDTOL: {
  484. double d = 0;
  485. uint32_t *p = (uint32_t *)&d;
  486. *p++ = m68k_read_memory_32(m68k_get_reg(0, M68K_REG_A7));
  487. *p = m68k_read_memory_32(m68k_get_reg(0, M68K_REG_A7) + 4);
  488. m68k_write_memory_32(m68k_get_reg(0, M68K_REG_A7), (int32_t)d);
  489. }
  490. break;
  491. case FE_CALL_IDIV: {
  492. uint32_t d0 = m68k_get_reg(0, M68K_REG_D0);
  493. uint32_t d1 = m68k_get_reg(0, M68K_REG_D1);
  494. if(d1 == 0) {
  495. FLAG_C = 1;
  496. } else {
  497. m68k_set_reg(M68K_REG_D0, d0 / d1);
  498. m68k_set_reg(M68K_REG_D1, d0 % d1);
  499. }
  500. }
  501. break;
  502. case FE_CALL_UMOD: {
  503. uint32_t d0 = m68k_get_reg(0, M68K_REG_D0);
  504. uint32_t d1 = m68k_get_reg(0, M68K_REG_D1);
  505. if(d1 == 0) {
  506. FLAG_C = 1;
  507. } else {
  508. m68k_set_reg(M68K_REG_D0, d0 % d1);
  509. }
  510. }
  511. break;
  512. default:
  513. printf("V68 FE CALL %04x %s\n", instr, fe_call_names[call]);
  514. break;
  515. }
  516. return 0;
  517. }