Skip to content

Commit

Permalink
Merge pull request #98 from muter3000/thecl-185
Browse files Browse the repository at this point in the history
Support th185 in thecl
  • Loading branch information
32th-System authored Aug 14, 2022
2 parents e873db7 + 7bdb712 commit 546350b
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 5 deletions.
5 changes: 2 additions & 3 deletions thecl/thecl.c
Original file line number Diff line number Diff line change
Expand Up @@ -252,8 +252,7 @@ print_usage(void)
" -r output raw ECL opcodes, applying minimal transformations\n"
" -s use simple creation, which doesn't add any instructions automatically\n"
"VERSION can be:\n"
" 6, 7, 8, 9, 95, 10, 103 (for Uwabami Breakers), 11, 12, 125, 128, 13, 14, 143, 15, 16, 165, 17 or 18\n"
/* NEWHU: 18 */
" 6, 7, 8, 9, 95, 10, 103 (for Uwabami Breakers), 11, 12, 125, 128, 13, 14, 143, 15, 16, 165, 17, 18 or 185\n"
"Report bugs to <" PACKAGE_BUGREPORT ">.\n", argv0);
}

Expand Down Expand Up @@ -337,7 +336,7 @@ main(int argc, char* argv[])
case 165:
case 17:
case 18:
/* NEWHU: 18 */
case 185:
module = &th10_ecl;
break;
default:
Expand Down
23 changes: 21 additions & 2 deletions thecl/thecl10.c
Original file line number Diff line number Diff line change
Expand Up @@ -1007,7 +1007,25 @@ static const id_format_pair_t th18_fmts[] = {
{ -1, NULL }
};

/* NEWHU: 18 */
static const id_format_pair_t th185_fmts[] = {
{ 535, "SSSSSSSSS" },
{ 1001, "S" },
{ 1002, "" },
{ 1004, "S" },
{ 1006, "m" },
{ 1011, "SS" },
{ 1013, "SSSSSSSSS" },
{ 1015, "SS" },
{ 1017, "" },
{ 1018, "S" },
{ 1019, "" },
{ 1021, "SS" },
{ 1022, "S" },
{ 1023, "S" },
{ 1024, "S" },
{ 1025, "" },
{ -1, NULL }
};

static const char*
th10_find_format(
Expand All @@ -1024,7 +1042,8 @@ th10_find_format(
const char* ret = NULL;

switch (version) {
/* NEWHU: 18 */
case 185:
if ((ret = find_format(th185_fmts, id))) break; /* fallthrough */
case 18:
if ((ret = find_format(th18_fmts, id))) break; /* fallthrough */
case 17:
Expand Down

0 comments on commit 546350b

Please sign in to comment.