Model.java
     1: //========================================================================================
     2: //  Model.java
     3: //    en:Model
     4: //    ja:機種
     5: //  Copyright (C) 2003-2022 Makoto Kamada
     6: //
     7: //  This file is part of the XEiJ (X68000 Emulator in Java).
     8: //  You can use, modify and redistribute the XEiJ if the conditions are met.
     9: //  Read the XEiJ License for more details.
    10: //  https://stdkmd.net/xeij/
    11: //========================================================================================
    12: 
    13: package xeij;
    14: 
    15: public class Model {
    16: 
    17:   //コード
    18:   public static final int CODE_X68000      = 0b00000000;
    19:   public static final int CODE_X68030      = 0b10000000;
    20:   public static final int CODE_SHODAI      = 0b00000000;
    21:   public static final int CODE_ACE         = 0b00010000;
    22:   public static final int CODE_EXPERT      = 0b00100000;
    23:   public static final int CODE_PRO         = 0b00110000;
    24:   public static final int CODE_SUPER       = 0b01000000;
    25:   public static final int CODE_XVI         = 0b01010000;
    26:   public static final int CODE_COMPACT     = 0b01100000;
    27:   public static final int CODE_II          = 0b00001000;
    28:   public static final int CODE_HD          = 0b00000100;
    29:   public static final int CODE_OFFICE_GRAY = 0b00000000;
    30:   public static final int CODE_GRAY        = 0b00000001;
    31:   public static final int CODE_TITAN_BLACK = 0b00000010;
    32:   public static final int CODE_BLACK       = 0b00000011;
    33:   public static final String[] COLOR_NAMES = {
    34:     "Office Gray",  //0
    35:     "Gray",  //1
    36:     "Titan Black",  //2
    37:     "Black",  //3
    38:   };
    39: 
    40:   //MPU
    41:   public static final int MPU_MC68000   = 1;
    42:   public static final int MPU_MC68010   = 2;
    43:   public static final int MPU_MC68020   = 3;
    44:   public static final int MPU_MC68EC030 = 4;
    45:   public static final int MPU_MC68030   = 5;
    46:   public static final int MPU_MC68LC040 = 6;
    47:   public static final int MPU_MC68040   = 7;
    48:   public static final int MPU_MC68LC060 = 8;
    49:   public static final int MPU_MC68060   = 9;
    50:   public static final String[] MPU_NAMES = {
    51:     "",  //0
    52:     "MC68000",  //1
    53:     "MC68010",  //2
    54:     "MC68020",  //3
    55:     "MC68EC030",  //4
    56:     "MC68030",  //5
    57:     "MC68LC040",  //6
    58:     "MC68040",  //7
    59:     "MC68LC060",  //8
    60:     "MC68060",  //9
    61:   };
    62: 
    63:   //FPU
    64:   public static final int FPU_MC68881 = 1;
    65:   public static final int FPU_MC68882 = 2;
    66:   public static final int FPU_MC68040 = 3;
    67:   public static final int FPU_MC68060 = 4;
    68:   public static final String[] FPU_NAMES = {
    69:     "",  //0
    70:     "MC68881",  //1
    71:     "MC68882",  //2
    72:     "MC68040",  //3
    73:     "MC68060",  //4
    74:   };
    75: 
    76:   //機種
    77:   //  初代 オフィスグレー
    78:   public static final Model CZ_600CE = new Model ("CZ-600CE",  //type
    79:                                                   CODE_X68000 + CODE_OFFICE_GRAY,  //code
    80:                                                   false,  //scsi
    81:                                                   1,  //memory
    82:                                                   MPU_MC68000,  //mpu
    83:                                                   10.0,  //clock
    84:                                                   100,  //iplrom
    85:                                                   "Shodai"  //synonym
    86:                                                   );  //1987-03
    87:   //  初代 ブラック
    88:   public static final Model CZ_600CB = new Model ("CZ-600CB",  //type
    89:                                                   CODE_X68000 + CODE_BLACK,  //code
    90:                                                   false,  //scsi
    91:                                                   1,  //memory
    92:                                                   MPU_MC68000,  //mpu
    93:                                                   10.0,  //clock
    94:                                                   101,  //iplrom
    95:                                                   null  //synonym
    96:                                                   );  //1987-11
    97:   //  ACE ブラック
    98:   public static final Model CZ_601C_BK = new Model ("CZ-601C-BK",  //type
    99:                                                     CODE_X68000 + CODE_ACE + CODE_BLACK,  //code
   100:                                                     false,  //scsi
   101:                                                     1,  //memory
   102:                                                     MPU_MC68000,  //mpu
   103:                                                     10.0,  //clock
   104:                                                     102,  //iplrom
   105:                                                     null  //synonym
   106:                                                     );  //1988-03
   107:   //  ACE グレー
   108:   public static final Model CZ_601C_GY = new Model ("CZ-601C-GY",  //type
   109:                                                     CODE_X68000 + CODE_ACE + CODE_GRAY,  //code
   110:                                                     false,  //scsi
   111:                                                     1,  //memory
   112:                                                     MPU_MC68000,  //mpu
   113:                                                     10.0,  //clock
   114:                                                     102,  //iplrom
   115:                                                     "ACE"  //synonym
   116:                                                     );  //1988-03
   117:   //  ACE HD ブラック
   118:   public static final Model CZ_611C_BK = new Model ("CZ-611C-BK",  //type
   119:                                                     CODE_X68000 + CODE_ACE + CODE_HD + CODE_BLACK,  //code
   120:                                                     false,  //scsi
   121:                                                     1,  //memory
   122:                                                     MPU_MC68000,  //mpu
   123:                                                     10.0,  //clock
   124:                                                     102,  //iplrom
   125:                                                     null  //synonym
   126:                                                     );  //1988-03
   127:   //  ACE HD グレー
   128:   public static final Model CZ_611C_GY = new Model ("CZ-611C-GY",  //type
   129:                                                     CODE_X68000 + CODE_ACE + CODE_HD + CODE_GRAY,  //code
   130:                                                     false,  //scsi
   131:                                                     1,  //memory
   132:                                                     MPU_MC68000,  //mpu
   133:                                                     10.0,  //clock
   134:                                                     102,  //iplrom
   135:                                                     null  //synonym
   136:                                                     );  //1988-03
   137:   //  EXPERT ブラック
   138:   public static final Model CZ_602C_BK = new Model ("CZ-602C-BK",  //type
   139:                                                     CODE_X68000 + CODE_EXPERT + CODE_BLACK,  //code
   140:                                                     false,  //scsi
   141:                                                     2,  //memory
   142:                                                     MPU_MC68000,  //mpu
   143:                                                     10.0,  //clock
   144:                                                     102,  //iplrom
   145:                                                     "EXPERT"  //synonym
   146:                                                     );  //1989-03
   147:   //  EXPERT グレー
   148:   public static final Model CZ_602C_GY = new Model ("CZ-602C-GY",  //type
   149:                                                     CODE_X68000 + CODE_EXPERT + CODE_GRAY,  //code
   150:                                                     false,  //scsi
   151:                                                     2,  //memory
   152:                                                     MPU_MC68000,  //mpu
   153:                                                     10.0,  //clock
   154:                                                     102,  //iplrom
   155:                                                     null  //synonym
   156:                                                     );  //1989-03
   157:   //  EXPERT HD ブラック
   158:   public static final Model CZ_612C_BK = new Model ("CZ-612C-BK",  //type
   159:                                                     CODE_X68000 + CODE_EXPERT + CODE_HD + CODE_BLACK,  //code
   160:                                                     false,  //scsi
   161:                                                     2,  //memory
   162:                                                     MPU_MC68000,  //mpu
   163:                                                     10.0,  //clock
   164:                                                     102,  //iplrom
   165:                                                     null  //synonym
   166:                                                     );  //1989-03
   167:   //  PRO ブラック
   168:   public static final Model CZ_652C_BK = new Model ("CZ-652C-BK",  //type
   169:                                                     CODE_X68000 + CODE_PRO + CODE_BLACK,  //code
   170:                                                     false,  //scsi
   171:                                                     1,  //memory
   172:                                                     MPU_MC68000,  //mpu
   173:                                                     10.0,  //clock
   174:                                                     102,  //iplrom
   175:                                                     null  //synonym
   176:                                                     );  //1989-03
   177:   //  PRO グレー
   178:   public static final Model CZ_652C_GY = new Model ("CZ-652C-GY",  //type
   179:                                                     CODE_X68000 + CODE_PRO + CODE_GRAY,  //code
   180:                                                     false,  //scsi
   181:                                                     1,  //memory
   182:                                                     MPU_MC68000,  //mpu
   183:                                                     10.0,  //clock
   184:                                                     102,  //iplrom
   185:                                                     "PRO"  //synonym
   186:                                                     );  //1989-03
   187:   //  PRO HD ブラック
   188:   public static final Model CZ_662C_BK = new Model ("CZ-662C-BK",  //type
   189:                                                     CODE_X68000 + CODE_PRO + CODE_HD + CODE_BLACK,  //code
   190:                                                     false,  //scsi
   191:                                                     1,  //memory
   192:                                                     MPU_MC68000,  //mpu
   193:                                                     10.0,  //clock
   194:                                                     102,  //iplrom
   195:                                                     null  //synonym
   196:                                                     );  //1989-03
   197:   //  PRO HD グレー
   198:   public static final Model CZ_662C_GY = new Model ("CZ-662C-GY",  //type
   199:                                                     CODE_X68000 + CODE_PRO + CODE_HD + CODE_GRAY,  //code
   200:                                                     false,  //scsi
   201:                                                     1,  //memory
   202:                                                     MPU_MC68000,  //mpu
   203:                                                     10.0,  //clock
   204:                                                     102,  //iplrom
   205:                                                     null  //synonym
   206:                                                     );  //1989-03
   207:   //  EXPERTII ブラック
   208:   public static final Model CZ_603C_BK = new Model ("CZ-603C-BK",  //type
   209:                                                     CODE_X68000 + CODE_EXPERT + CODE_II + CODE_BLACK,  //code
   210:                                                     false,  //scsi
   211:                                                     2,  //memory
   212:                                                     MPU_MC68000,  //mpu
   213:                                                     10.0,  //clock
   214:                                                     102,  //iplrom
   215:                                                     "EXPERTII"  //synonym
   216:                                                     );  //1990-03
   217:   //  EXPERTII グレー
   218:   public static final Model CZ_603C_GY = new Model ("CZ-603C-GY",  //type
   219:                                                     CODE_X68000 + CODE_EXPERT + CODE_II + CODE_GRAY,  //code
   220:                                                     false,  //scsi
   221:                                                     2,  //memory
   222:                                                     MPU_MC68000,  //mpu
   223:                                                     10.0,  //clock
   224:                                                     102,  //iplrom
   225:                                                     null  //synonym
   226:                                                     );  //1990-03
   227:   //  EXPERTII HD ブラック
   228:   public static final Model CZ_613C_BK = new Model ("CZ-613C-BK",  //type
   229:                                                     CODE_X68000 + CODE_EXPERT + CODE_II + CODE_HD + CODE_BLACK,  //code
   230:                                                     false,  //scsi
   231:                                                     2,  //memory
   232:                                                     MPU_MC68000,  //mpu
   233:                                                     10.0,  //clock
   234:                                                     102,  //iplrom
   235:                                                     null  //synonym
   236:                                                     );  //1990-03
   237:   //  PROII ブラック
   238:   public static final Model CZ_653C_BK = new Model ("CZ-653C-BK",  //type
   239:                                                     CODE_X68000 + CODE_PRO + CODE_II + CODE_BLACK,  //code
   240:                                                     false,  //scsi
   241:                                                     1,  //memory
   242:                                                     MPU_MC68000,  //mpu
   243:                                                     10.0,  //clock
   244:                                                     102,  //iplrom
   245:                                                     null  //synonym
   246:                                                     );  //1990-04
   247:   //  PROII グレー
   248:   public static final Model CZ_653C_GY = new Model ("CZ-653C-GY",  //type
   249:                                                     CODE_X68000 + CODE_PRO + CODE_II + CODE_GRAY,  //code
   250:                                                     false,  //scsi
   251:                                                     1,  //memory
   252:                                                     MPU_MC68000,  //mpu
   253:                                                     10.0,  //clock
   254:                                                     102,  //iplrom
   255:                                                     "PROII"  //synonym
   256:                                                     );  //1990-04
   257:   //  PROII HD ブラック
   258:   public static final Model CZ_663C_BK = new Model ("CZ-663C-BK",  //type
   259:                                                     CODE_X68000 + CODE_PRO + CODE_II + CODE_HD + CODE_BLACK,  //code
   260:                                                     false,  //scsi
   261:                                                     1,  //memory
   262:                                                     MPU_MC68000,  //mpu
   263:                                                     10.0,  //clock
   264:                                                     102,  //iplrom
   265:                                                     null  //synonym
   266:                                                     );  //1990-04
   267:   //  PROII HD グレー
   268:   public static final Model CZ_663C_GY = new Model ("CZ-663C-GY",  //type
   269:                                                     CODE_X68000 + CODE_PRO + CODE_II + CODE_HD + CODE_GRAY,  //code
   270:                                                     false,  //scsi
   271:                                                     1,  //memory
   272:                                                     MPU_MC68000,  //mpu
   273:                                                     10.0,  //clock
   274:                                                     102,  //iplrom
   275:                                                     null  //synonym
   276:                                                     );  //1990-04
   277:   //  SUPER HD ブラック
   278:   public static final Model CZ_623C_TN = new Model ("CZ-623C-TN",  //type
   279:                                                     CODE_X68000 + CODE_SUPER + CODE_HD + CODE_TITAN_BLACK,  //code
   280:                                                     true,  //scsi
   281:                                                     2,  //memory
   282:                                                     MPU_MC68000,  //mpu
   283:                                                     10.0,  //clock
   284:                                                     103,  //iplrom
   285:                                                     null  //synonym
   286:                                                     );  //1990-06
   287:   //  SUPER チタンブラック
   288:   public static final Model CZ_604C_TN = new Model ("CZ-604C-TN",  //type
   289:                                                     CODE_X68000 + CODE_SUPER + CODE_TITAN_BLACK,  //code
   290:                                                     true,  //scsi
   291:                                                     2,  //memory
   292:                                                     MPU_MC68000,  //mpu
   293:                                                     10.0,  //clock
   294:                                                     103,  //iplrom
   295:                                                     "SUPER"  //synonym
   296:                                                     );  //1991-01
   297:   //  XVI チタンブラック
   298:   public static final Model CZ_634C_TN = new Model ("CZ-634C-TN",  //type
   299:                                                     CODE_X68000 + CODE_XVI + CODE_TITAN_BLACK, //code
   300:                                                     true,  //scsi
   301:                                                     2,  //memory
   302:                                                     MPU_MC68000,  //mpu
   303:                                                     50.0 / 3.0,  //clock
   304:                                                     110,  //iplrom
   305:                                                     "XVI"  //synonym
   306:                                                     );  //1991-05
   307:   //  XVI HD チタンブラック
   308:   public static final Model CZ_644C_TN = new Model ("CZ-644C-TN",  //type
   309:                                                     CODE_X68000 + CODE_XVI + CODE_HD + CODE_TITAN_BLACK,  //code
   310:                                                     true,  //scsi
   311:                                                     2,  //memory
   312:                                                     MPU_MC68000,  //mpu
   313:                                                     50.0 / 3.0,  //clock
   314:                                                     110,  //iplrom
   315:                                                     null  //synonym
   316:                                                     );  //1991-05
   317:   //  Compact グレー
   318:   public static final Model CZ_674C_H = new Model ("CZ-674C-H",  //type
   319:                                                    CODE_X68000 + CODE_COMPACT + CODE_GRAY,  //code
   320:                                                    true,  //scsi
   321:                                                    2,  //memory
   322:                                                    MPU_MC68000,  //mpu
   323:                                                    50.0 / 3.0,  //clock
   324:                                                    120,  //iplrom
   325:                                                    "Compact"  //synonym
   326:                                                    );  //1992-02
   327:   //  X68030 チタンブラック
   328:   public static final Model CZ_500C_B = new Model ("CZ-500C-B",  //type
   329:                                                    CODE_X68030 + CODE_TITAN_BLACK,  //code
   330:                                                    true,  //scsi
   331:                                                    4,  //memory
   332:                                                    MPU_MC68EC030,  //mpu
   333:                                                    25.0,  //clock
   334:                                                    130,  //iplrom
   335:                                                    "X68030"  //synonym
   336:                                                    );  //1993-03
   337:   //  X68030 HD チタンブラック
   338:   public static final Model CZ_510C_B = new Model ("CZ-510C-B",  //type
   339:                                                    CODE_X68030 + CODE_HD + CODE_TITAN_BLACK,  //code
   340:                                                    true,  //scsi
   341:                                                    4,  //memory
   342:                                                    MPU_MC68EC030,  //mpu
   343:                                                    25.0,  //clock
   344:                                                    130,  //iplrom
   345:                                                    null  //synonym
   346:                                                    );  //1993-03
   347:   //  X68030 Compact チタンブラック
   348:   public static final Model CZ_300C_B = new Model ("CZ-300C-B",  //type
   349:                                                    CODE_X68030 + CODE_COMPACT + CODE_TITAN_BLACK,  //code
   350:                                                    true,  //scsi
   351:                                                    4,  //memory
   352:                                                    MPU_MC68EC030,  //mpu
   353:                                                    25.0,  //clock
   354:                                                    130,  //iplrom
   355:                                                    "030Compact"  //synonym
   356:                                                    );  //1993-05
   357:   //  X68030 Compact HD チタンブラック
   358:   public static final Model CZ_310C_B = new Model ("CZ-310C-B",  //type
   359:                                                    CODE_X68030 + CODE_COMPACT + CODE_HD + CODE_TITAN_BLACK,  //code
   360:                                                    true,  //scsi
   361:                                                    4,  //memory
   362:                                                    MPU_MC68EC030,  //mpu
   363:                                                    25.0,  //clock
   364:                                                    130,  //iplrom
   365:                                                    null  //synonym
   366:                                                    );  //1993-05
   367: 
   368:   //機種の別名
   369:   public static final Model SHODAI        = CZ_600CE;    //  初代 オフィスグレー
   370:   public static final Model ACE           = CZ_601C_GY;  //  ACE オフィスグレー
   371:   public static final Model EXPERT        = CZ_602C_BK;  //  EXPERT ブラック
   372:   public static final Model PRO           = CZ_652C_GY;  //  PRO グレー
   373:   public static final Model EXPERTII      = CZ_603C_BK;  //  EXPERTII ブラック
   374:   public static final Model PROII         = CZ_653C_GY;  //  PROII オフィスグレー
   375:   public static final Model SUPER         = CZ_604C_TN;  //  SUPER チタンブラック
   376:   public static final Model XVI           = CZ_634C_TN;  //  XVI チタンブラック
   377:   public static final Model COMPACT       = CZ_674C_H;   //  Compact グレー
   378:   public static final Model X68030        = CZ_500C_B;   //  X68030 チタンブラック
   379:   public static final Model X68030COMPACT = CZ_300C_B;   //  X68030 Compact チタンブラック
   380: 
   381:   //機種の配列
   382:   public static final Model[] MODELS = {
   383:     CZ_600CE,    //  初代 オフィスグレー
   384:     CZ_600CB,    //  初代 ブラック
   385:     CZ_601C_BK,  //  ACE ブラック
   386:     CZ_601C_GY,  //  ACE オフィスグレー
   387:     CZ_611C_BK,  //  ACE HD ブラック
   388:     CZ_611C_GY,  //  ACE HD オフィスグレー
   389:     CZ_602C_BK,  //  EXPERT ブラック
   390:     CZ_602C_GY,  //  EXPERT オフィスグレー
   391:     CZ_612C_BK,  //  EXPERT HD ブラック
   392:     CZ_652C_BK,  //  PRO ブラック
   393:     CZ_652C_GY,  //  PRO グレー
   394:     CZ_662C_BK,  //  PRO HD ブラック
   395:     CZ_662C_GY,  //  PRO HD オフィスグレー
   396:     CZ_603C_BK,  //  EXPERTII ブラック
   397:     CZ_603C_GY,  //  EXPERTII オフィスグレー
   398:     CZ_613C_BK,  //  EXPERTII HD ブラック
   399:     CZ_653C_BK,  //  PROII ブラック
   400:     CZ_653C_GY,  //  PROII オフィスグレー
   401:     CZ_663C_BK,  //  PROII HD ブラック
   402:     CZ_663C_GY,  //  PROII HD オフィスグレー
   403:     CZ_623C_TN,  //  SUPER HD ブラック
   404:     CZ_604C_TN,  //  SUPER チタンブラック
   405:     CZ_634C_TN,  //  XVI チタンブラック
   406:     CZ_644C_TN,  //  XVI HD チタンブラック
   407:     CZ_674C_H,   //  Compact グレー
   408:     CZ_500C_B,   //  X68030 チタンブラック
   409:     CZ_510C_B,   //  X68030 HD チタンブラック
   410:     CZ_300C_B,   //  X68030 Compact チタンブラック
   411:     CZ_310C_B,   //  X68030 Compact HD チタンブラック
   412:   };
   413: 
   414:   //型名または別名から機種を求める
   415:   public static Model fromTypeOrSynonym (String typeOrSynonym) {
   416:     for (Model model : MODELS) {
   417:       if (model.type.equalsIgnoreCase (typeOrSynonym) ||
   418:           (model.synonym != null && model.synonym.equalsIgnoreCase (typeOrSynonym))) {
   419:         return model;
   420:       }
   421:     }
   422:     return null;
   423:   }
   424: 
   425:   //MPUの名前
   426:   public static String mpuNameOf (int mpu) {
   427:     return MPU_NAMES[mpu];
   428:   }
   429: 
   430:   //FPUの名前
   431:   public static String fpuNameOf (int fpu) {
   432:     return FPU_NAMES[fpu];
   433:   }
   434: 
   435:   //インスタンスフィールド
   436:   private String type;  //型名
   437:   private int code;  //コード
   438:   private boolean scsi;  //内蔵ハードディスクインターフェイスはSCSIか
   439:   private int memory;  //標準のメモリ容量(MB)
   440:   private int mpu;  //MPU
   441:   private double clock;  //クロック(MHz)。10.0,50.0/3.0,25.0
   442:   private int iplrom;  //IPLROMのバージョン。100,101,102,103,110,120,130
   443:   private String synonym;  //別名
   444: 
   445:   //コンストラクタ
   446:   private Model (String type, int code, boolean scsi, int memory, int mpu, double clock, int iplrom, String synonym) {
   447:     this.type = type;
   448:     this.code = code;
   449:     this.scsi = scsi;
   450:     this.memory = memory;
   451:     this.mpu = mpu;
   452:     this.clock = clock;
   453:     this.iplrom = iplrom;
   454:     this.synonym = synonym;
   455:   }
   456: 
   457:   //型名
   458:   public String getType () {
   459:     return type;
   460:   }
   461: 
   462:   //コード
   463:   public int getCode () {
   464:     return code;
   465:   }
   466: 
   467:   //内蔵ハードディスクインターフェイスはSCSIか
   468:   public boolean isSCSI () {
   469:     return scsi;
   470:   }
   471: 
   472:   //標準のメモリ容量(MB)
   473:   public int getMemory () {
   474:     return memory;
   475:   }
   476: 
   477:   //MPU
   478:   public int getMPU () {
   479:     return mpu;
   480:   }
   481: 
   482:   //クロック(MHz)
   483:   public double getClock () {
   484:     return clock;
   485:   }
   486: 
   487:   //IPLROMのバージョン
   488:   public int getIPLROM () {
   489:     return iplrom;
   490:   }
   491: 
   492:   //別名
   493:   public String getSynonym () {
   494:     return synonym;
   495:   }
   496: 
   497:   //機種名
   498:   public String getName () {
   499:     StringBuilder sb = new StringBuilder ();
   500:     switch (code & 0b10000000) {
   501:     case CODE_X68000:
   502:       sb.append ("X68000");
   503:       break;
   504:     case CODE_X68030:
   505:       sb.append ("X68030");
   506:       break;
   507:     }
   508:     switch (code & 0b01110000) {
   509:     case CODE_ACE:
   510:       sb.append (" ACE");
   511:       break;
   512:     case CODE_EXPERT:
   513:       sb.append (" EXPERT");
   514:       break;
   515:     case CODE_PRO:
   516:       sb.append (" PRO");
   517:       break;
   518:     case CODE_SUPER:
   519:       sb.append (" SUPER");
   520:       break;
   521:     case CODE_XVI:
   522:       sb.append (" XVI");
   523:       break;
   524:     case CODE_COMPACT:
   525:       sb.append (" Compact");
   526:       break;
   527:     }
   528:     if ((code & CODE_II) != 0) {
   529:       sb.append ("II");
   530:     }
   531:     if ((code & CODE_HD) != 0) {
   532:       sb.append (" HD");
   533:     }
   534:     return sb.toString ();
   535:   }
   536: 
   537:   //X68030/X68030 Compactか
   538:   public boolean isX68030 () {
   539:     return (code & CODE_X68030) != 0;
   540:   }
   541: 
   542:   //X68000初代か
   543:   public boolean isShodai () {
   544:     return (code & 0b11110000) == CODE_X68000 + CODE_SHODAI;
   545:   }
   546: 
   547:   //ACEか
   548:   public boolean isACE () {
   549:     return (code & 0b01110000) == CODE_ACE;
   550:   }
   551: 
   552:   //EXPERT/EXPERTIIか
   553:   public boolean isEXPERT () {
   554:     return (code & 0b01110000) == CODE_EXPERT;
   555:   }
   556: 
   557:   //PRO/PROIIか
   558:   public boolean isPRO () {
   559:     return (code & 0b01110000) == CODE_PRO;
   560:   }
   561: 
   562:   //SUPERか
   563:   public boolean isSUPER () {
   564:     return (code & 0b01110000) == CODE_SUPER;
   565:   }
   566: 
   567:   //XVIか
   568:   public boolean isXVI () {
   569:     return (code & 0b01110000) == CODE_XVI;
   570:   }
   571: 
   572:   //Compact/X68030 Compactか
   573:   public boolean isCompact () {
   574:     return (code & 0b01110000) == CODE_COMPACT;
   575:   }
   576: 
   577:   //色コード
   578:   public int getColorCode () {
   579:     return code & 0b00000011;
   580:   }
   581: 
   582:   //色名
   583:   public String getColorName () {
   584:     return COLOR_NAMES[code & 0b00000011];
   585:   }
   586: 
   587: }