home *** CD-ROM | disk | FTP | other *** search
/ GEMini Atari / GEMini_Atari_CD-ROM_Walnut_Creek_December_1993.iso / files / diskutil / mutate / mutater.c < prev    next >
Text File  |  1990-05-13  |  13KB  |  250 lines

  1. #ifndef __AES__
  2. #include <aes.h>
  3. #endif
  4. static char p_to_nul[1] = "";
  5.  
  6. TEDINFO rs_tedinfo[] = {
  7.   {"000000:0000 0000 0000 0000 0000 0000 0000 0000 ABCDEFGHIJKLMNOP", p_to_nul, p_to_nul,
  8.      3,   0,   0, 4481,   0,   0,  64,   1},
  9.   {"000010:0000 0000 0000 0000 0000 0000 0000 0000 ABCDEFGHIJKLMNOP", p_to_nul, p_to_nul,
  10.      3,   0,   0, 4481,   0,   0,  64,   1},
  11.   {"000020:0000 0000 0000 0000 0000 0000 0000 0000 ABCDEFGHIJKLMNOP", p_to_nul, p_to_nul,
  12.      3,   0,   0, 4481,   0,   0,  64,   1},
  13.   {"000030:0000 0000 0000 0000 0000 0000 0000 0000 ABCDEFGHIJKLMNOP", p_to_nul, p_to_nul,
  14.      3,   0,   0, 4481,   0,   0,  64,   1},
  15.   {"000040:0000 0000 0000 0000 0000 0000 0000 0000 ABCDEFGHIJKLMNOP", p_to_nul, p_to_nul,
  16.      3,   0,   0, 4481,   0,   0,  64,   1},
  17.   {"000050:0000 0000 0000 0000 0000 0000 0000 0000 ABCDEFGHIJKLMNOP", p_to_nul, p_to_nul,
  18.      3,   0,   0, 4481,   0,   0,  64,   1},
  19.   {"000060:0000 0000 0000 0000 0000 0000 0000 0000 ABCDEFGHIJKLMNOP", p_to_nul, p_to_nul,
  20.      3,   0,   0, 4481,   0,   0,  64,   1},
  21.   {"000070:0000 0000 0000 0000 0000 0000 0000 0000 ABCDEFGHIJKLMNOP", p_to_nul, p_to_nul,
  22.      3,   0,   0, 4481,   0,   0,  64,   1},
  23.   {"000080:0000 0000 0000 0000 0000 0000 0000 0000 ABCDEFGHIJKLMNOP", p_to_nul, p_to_nul,
  24.      3,   0,   0, 4481,   0,   0,  64,   1},
  25.   {"000090:0000 0000 0000 0000 0000 0000 0000 0000 ABCDEFGHIJKLMNOP", p_to_nul, p_to_nul,
  26.      3,   0,   0, 4481,   0,   0,  64,   1},
  27.   {"0", p_to_nul, p_to_nul,
  28.      5,   0,   2, 4481,   0,   0,   2,   1},
  29.   {"2", p_to_nul, p_to_nul,
  30.      5,   0,   2, 4481,   0,   0,   2,   1},
  31.   {"4", p_to_nul, p_to_nul,
  32.      5,   0,   2, 4481,   0,   0,   2,   1},
  33.   {"6", p_to_nul, p_to_nul,
  34.      5,   0,   2, 4481,   0,   0,   2,   1},
  35.   {"8", p_to_nul, p_to_nul,
  36.      5,   0,   2, 4481,   0,   0,   2,   1},
  37.   {"A", p_to_nul, p_to_nul,
  38.      5,   0,   2, 4481,   0,   0,   2,   1},
  39.   {"C", p_to_nul, p_to_nul,
  40.      5,   0,   2, 4481,   0,   0,   2,   1},
  41.   {"E", p_to_nul, p_to_nul,
  42.      5,   0,   2, 4481,   0,   0,   2,   1},
  43.   {"Alpha", p_to_nul, p_to_nul,
  44.      5,   0,   0, 4481,   0,   0,   6,   1},
  45.   {"I", p_to_nul, p_to_nul,
  46.      5,   0,   2, 4481,   0,   0,   2,   1},
  47.   {"N", p_to_nul, p_to_nul,
  48.      5,   0,   2, 4481,   0,   0,   2,   1},
  49.   {"F", p_to_nul, p_to_nul,
  50.      5,   0,   2, 4481,   0,   0,   2,   1},
  51.   {"O", p_to_nul, p_to_nul,
  52.      5,   0,   2, 4481,   0,   0,   2,   1},
  53.   {"MUTATE V1.0 by Gregory Mathias Lemperle-Kerr", p_to_nul, p_to_nul,
  54.      3,   0,   2, 4481,   0,   0,  45,   1},
  55.   {"Memory/Sector/File Editor.  (Handles any size sector)", p_to_nul, p_to_nul,
  56.      5,   0,   0, 4481,   0,   0,  54,   1},
  57.   {"Options on Bar: (Q)uit (F)ile (D)isk (M)emory", p_to_nul, p_to_nul,
  58.      5,   0,   0, 4481,   0,   0,  46,   1},
  59.   {"Use TAB to switch between Hex and Ascii input", p_to_nul, p_to_nul,
  60.      5,   0,   0, 4481,   0,   0,  46,   1},
  61.   {"Use UPDATE or QUIT or D/F/M to write changes", p_to_nul, p_to_nul,
  62.      5,   0,   0, 4481,   0,   0,  45,   1},
  63.   {"Use ARROWS for page, +/- for block, ◆ buttons to change", p_to_nul, p_to_nul,
  64.      5,   0,   0, 4481,   0,   0,  56,   1},
  65.   {"(C) 1990 Spieu!soft.  Call (011)(41)(61) 475146 for Update", p_to_nul, p_to_nul,
  66.      5,   0,   2, 4481,   0,   0,  59,   1}
  67. };
  68.  
  69. ICONBLK rs_iconblk[] = {
  70.   0L
  71. };
  72.  
  73. int bblock000[] = {
  74.   0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
  75.   0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
  76.   0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
  77.   0x0000,0x0000,0x4000,0x0000,0x1f00,0x0000,0x4000,0x0000,
  78.   0x1107,0x8000,0x4004,0x0000,0x214c,0xc040,0x4004,0x0000,
  79.   0x21d0,0x41e0,0x4004,0x0000,0x21f0,0x4320,0xc004,0x0000,
  80.   0x0060,0x4420,0x8000,0x0000,0x00a0,0x4400,0x8008,0x0000,
  81.   0x00c0,0x5840,0x800c,0x0000,0x00c0,0x1040,0x8008,0x0000,
  82.   0x00c0,0xa040,0x8008,0x0000,0x00c0,0xa041,0x0008,0x0000,
  83.   0x0081,0x4041,0x8018,0x0000,0x0081,0x4081,0x0018,0x0000,
  84.   0x0082,0x811f,0xf010,0x0000,0x0082,0x8102,0x0018,0x0000,
  85.   0x0086,0x8202,0x0010,0x0000,0x0085,0x0002,0x0010,0x0000,
  86.   0x0185,0x0403,0x0010,0x0000,0x010f,0x0802,0x0030,0x0000,
  87.   0x010a,0x0003,0x0e20,0x0000,0x010a,0x1902,0x1a20,0x0000,
  88.   0x010c,0x1322,0x1220,0x0000,0x0118,0x1223,0x1227,0x0000,
  89.   0x0118,0x2262,0x1225,0x0000,0x0230,0x2663,0x3225,0x0000,
  90.   0x0220,0x2443,0xf225,0x0000,0x0220,0x4e46,0x1465,0x0000,
  91.   0x0c60,0x4bec,0x1e75,0x0800,0x0000,0x7030,0x025f,0xf000,
  92.   0x0000,0x0000,0x0386,0x0000,0x0000,0x0000,0x0000,0x0000,
  93.   0x0000,0x0000,0x0000,0x0000,0x0000,0x0200,0x0000,0x0000,
  94.   0x0000,0x0203,0x0000,0x0000,0x0000,0x0206,0x8000,0x0000,
  95.   0x0000,0x0204,0xc000,0x0000,0x0000,0x0204,0x4000,0x0000,
  96.   0x0000,0x0208,0x4000,0x0000,0x0000,0x0208,0x4000,0x0000,
  97.   0x0000,0x0208,0x4000,0x0000,0x0000,0x0244,0xc000,0x0000,
  98.   0x0000,0x0207,0x8000,0x0000,0x0000,0x0000,0x0000,0x0000
  99. };
  100.  
  101. int bblock001[] = {
  102.   0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0003,
  103.   0xe000,0x0000,0x0000,0x0000,0x0000,0x0000,0x007e,0x3e00,
  104.   0x0000,0x000c,0x0007,0xc000,0x0000,0x00c0,0x0380,0x0000,
  105.   0x0038,0x0018,0x20e0,0x0000,0x0080,0x00fc,0x0000,0x03e0,
  106.   0x0010,0x2723,0xe000,0x0180,0x0007,0xff00,0x7c00,0x0018,
  107.   0x3c26,0x2000,0x0100,0x0000,0x01ff,0xc000,0x000c,0x3038,
  108.   0x2000,0x0100,0x0000,0x0000,0x0000,0x0000,0x6030,0x6000,
  109.   0x0100,0x0000,0x0000,0x0000,0x0000,0xc060,0x4000,0x0180,
  110.   0x0000,0x0000,0x0000,0x0000,0xc0c0,0xc000,0x0080,0x0000,
  111.   0x0000,0x0000,0x0001,0x8081,0x8000,0x00e0,0x3ce0,0xe000,
  112.   0xec41,0x0003,0x0181,0x0000,0x003e,0x64a1,0xf079,0xb841,
  113.   0x0007,0x0183,0x0000,0x0004,0x44e3,0x90cf,0x30c3,0x000e,
  114.   0x0306,0x0000,0x0004,0xccc7,0x1184,0x21e3,0x000c,0x0604,
  115.   0x0000,0x000f,0x88c7,0x37cc,0x3f3e,0x0018,0x041b,0x0000,
  116.   0x0008,0x077f,0xf478,0x0002,0x0000,0x0016,0x2000,0x0008,
  117.   0x0000,0x1800,0x0002,0x0000,0x001c,0x0000,0x0018,0x0000,
  118.   0x3800,0x0002,0x0000,0x0000,0x0000,0x0010,0x0000,0x6800,
  119.   0x0001,0x0000,0x0000,0x0000,0x0030,0x01ff,0xffe0,0x0000,
  120.   0x8000,0x0000,0x0000,0x0060,0x0f00,0x481f,0xffe0,0x4000,
  121.   0x0000,0x0000,0x0043,0xf800,0x4800,0x003e,0x6000,0x0000,
  122.   0x0000,0x009e,0x0000,0x7800,0x0003,0xb000,0x0000,0x0000,
  123.   0x00b0,0x0000,0x0000,0x0000,0xf000,0x0000,0x0000,0x01e0,
  124.   0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x01c0,0x0000,
  125.   0x0000,0x0000,0x0000,0x0000,0x0000,0x0180,0x0000,0x0000,
  126.   0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
  127.   0x0001,0xfc00,0x0000,0x0000,0x0000,0x0000,0x0000,0x0003,
  128.   0x0600,0x0f00,0x000c,0x0000,0x0000,0x0000,0x0002,0x0200,
  129.   0x39c0,0x001c,0x0000,0x0000,0x0002,0x0002,0x0200,0x6060,
  130.   0x0014,0x0000,0x0000,0x0002,0x0001,0x0200,0xc020,0x0014,
  131.   0x0000,0x0000,0x0006,0x0001,0xfa01,0x8030,0x039c,0x0000,
  132.   0x0000,0x0006,0x0000,0x0403,0x0010,0x00f8,0x0000,0x0000,
  133.   0x0006,0x0000,0x0406,0x0010,0x0008,0x0000,0x0000,0x0006,
  134.   0x0000,0x040c,0x0018,0x0008,0x0000,0x0000,0x0006,0x0000,
  135.   0x0c18,0x0008,0x0008,0x0000,0x0000,0x000e,0x0000,0x0830,
  136.   0x0008,0x0008,0x0000,0x0000,0x000a,0x0000,0x0860,0x0008,
  137.   0x0008,0x0000,0x0000,0x000a,0x003c,0x18c0,0x0008,0x0008,
  138.   0x0000,0x0000,0x001a,0x0000,0x3180,0x0008,0x0008,0x0000,
  139.   0x0000,0x0012,0x0000,0x2300,0x0008,0x0010,0x0000,0x0000,
  140.   0x0012,0x0000,0x3e00,0x0008,0x0010,0x0000,0x0001,0xc01a,
  141.   0x0e00,0x61e0,0x0008,0x0010,0xe0b9,0xc3f2,0x478e,0x0a00,
  142.   0x6123,0xcf08,0x0390,0xb0ea,0x430a,0x4486,0x1600,0xb122,
  143.   0x4908,0x0ef1,0x114e,0x430b,0xc487,0x1c01,0x11e2,0x4908,
  144.   0x0861,0x3344,0x4709,0x8499,0x9803,0x10c6,0x4908,0x0830,
  145.   0xa24c,0x5ddb,0x8cf0,0xf102,0x1b6c,0x5988,0x0cde,0xfe00,
  146.   0x71fe,0x78c0,0x1f02,0x0e38,0x7078,0x0783,0xf000,0x0100,
  147.   0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0100,0x0000,
  148.   0x0000,0x0000,0x0000,0x0000,0x0000,0x0100,0x0000,0x0000,
  149.   0x0000,0x0000,0x0000,0x0000,0x0100,0x0000,0x0000,0x0000,
  150.   0x0000,0x0000,0x0000,0x0100,0x0000,0x0000,0x0000,0x0000
  151. };
  152.  
  153. BITBLK rs_bitblk[] = {
  154.   {bblock000,  0x0008, 0x0032, 0x0000, 0x0000, 0x0001},
  155.   {bblock001,  0x000e, 0x0038, 0x0000, 0x0000, 0x0001}
  156. };
  157.  
  158. OBJECT rs_object[] = {
  159.   /* Tree #0*/
  160.   {  -1,   1,  45,0x0014,0x0000,0x0000, 0x000411c1L,1794,2561,  73,3854},
  161.   {  21,   2,  20,0x0014,0x0000,0x0020, 0x00011181L,   1,2048, 578,3850},
  162.   {   3,  -1,  -1,0x0015,0x0005,0x0000, (long)&rs_tedinfo[0],1025,3072, 575,   1},
  163.   {   4,  -1,  -1,0x0015,0x0005,0x0000, (long)&rs_tedinfo[1],1025,2561,  63,   1},
  164.   {   5,  -1,  -1,0x0015,0x0005,0x0000, (long)&rs_tedinfo[2],1025,2562,  63,   1},
  165.   {   6,  -1,  -1,0x0015,0x0005,0x0000, (long)&rs_tedinfo[3],1025,2563,  63,   1},
  166.   {   7,  -1,  -1,0x0015,0x0005,0x0000, (long)&rs_tedinfo[4],1025,2564,  63,   1},
  167.   {   8,  -1,  -1,0x0015,0x0005,0x0000, (long)&rs_tedinfo[5],1025,2565,  63,   1},
  168.   {   9,  -1,  -1,0x0015,0x0005,0x0000, (long)&rs_tedinfo[6],1025,2566,  63,   1},
  169.   {  10,  -1,  -1,0x0015,0x0005,0x0000, (long)&rs_tedinfo[7],1025,2567,  63,   1},
  170.   {  11,  -1,  -1,0x0015,0x0005,0x0000, (long)&rs_tedinfo[8],1025,2568,  63,   1},
  171.   {  12,  -1,  -1,0x0015,0x0005,0x0000, (long)&rs_tedinfo[9],1025,2569,  63,   1},
  172.   {  13,  -1,  -1,0x0015,0x0000,0x0000, (long)&rs_tedinfo[10],1032, 512,   1,2048},
  173.   {  14,  -1,  -1,0x0015,0x0000,0x0000, (long)&rs_tedinfo[11],1037, 512,   1,2048},
  174.   {  15,  -1,  -1,0x0015,0x0000,0x0000, (long)&rs_tedinfo[12],1042, 512,   1,2048},
  175.   {  16,  -1,  -1,0x0015,0x0000,0x0000, (long)&rs_tedinfo[13],1047, 512,   1,2048},
  176.   {  17,  -1,  -1,0x0015,0x0000,0x0000, (long)&rs_tedinfo[14],1052, 512,   1,2048},
  177.   {  18,  -1,  -1,0x0015,0x0000,0x0000, (long)&rs_tedinfo[15],1057, 512,   1,2048},
  178.   {  19,  -1,  -1,0x0015,0x0000,0x0000, (long)&rs_tedinfo[16],1062, 512,   1,2048},
  179.   {  20,  -1,  -1,0x0015,0x0000,0x0000, (long)&rs_tedinfo[17],1067, 512,   1,2048},
  180.   {   1,  -1,  -1,0x0015,0x0000,0x0000, (long)&rs_tedinfo[18],1072, 512,1539,2048},
  181.   {  25,  22,  24,0x0014,0x0041,0x0000, 0x000111c1L,  68,2048,1794,3850},
  182.   {  23,  -1,  -1,0x001b,0x0040,0x0000, 0x01011181L, 256, 256,1282, 513},
  183.   {  24,  -1,  -1,0x001b,0x0040,0x0000, 0x02011181L, 256,3081,1282, 513},
  184.   {  21,  -1,  -1,0x0014,0x0041,0x0000, 0x00011181L, 256, 769,1282,2312},
  185.   {  45,  26,  44,0x0014,0x0000,0x0000, 0x000111e1L,1792,3083, 583,3074},
  186.   {  30,  27,  29,0x0014,0x0000,0x0000, 0x000111c1L,   4,2048,1032,2049},
  187.   {  28,  -1,  -1,0x001b,0x0005,0x0000, 0x46011181L, 512, 512, 770, 769},
  188.   {  29,  -1,  -1,0x001b,0x0005,0x0000, 0x44011181L,   3, 512, 770, 769},
  189.   {  26,  -1,  -1,0x001b,0x0005,0x0000, 0x4d011181L,1541, 512, 770, 769},
  190.   {  35,  31,  34,0x0014,0x0000,0x0000, 0x00011181L,1548,2048,  16,2049},
  191.   {  32,  -1,  -1,0x001c,0x0000,0x0000, (long)"0000000",   3,1024, 263,   1},
  192.   {  33,  -1,  -1,0x001a,0x0005,0x0000, (long)"◆", 781,1024,   2,   1},
  193.   {  34,  -1,  -1,0x001a,0x0040,0x0000, (long)"+",1024,1024,   2,   1},
  194.   {  30,  -1,  -1,0x001a,0x0040,0x0000, (long)"-",1034,1024,   2,   1},
  195.   {  38,  36,  37,0x0014,0x0000,0x0000, 0x00011181L,  29,2048,  16,2049},
  196.   {  37,  -1,  -1,0x001c,0x0000,0x0000, (long)"FILENAME.EXT",1024,1024, 268,   1},
  197.   {  35,  -1,  -1,0x001a,0x0005,0x0000, (long)"◆", 781,1024,   2,   1},
  198.   {  42,  39,  41,0x0014,0x0000,0x0000, 0x00011181L, 301,2304, 775,1793},
  199.   {  40,  -1,  -1,0x001a,0x0040,0x0000, (long)"⇦",1024,1024,   2,   1},
  200.   {  41,  -1,  -1,0x001b,0x0005,0x0000, 0x43011181L,1538, 512,1537,1025},
  201.   {  38,  -1,  -1,0x001a,0x0040,0x0000, (long)"⇨",1796,1024,   2,   1},
  202.   {  43,  -1,  -1,0x001a,0x0005,0x0000, (long)"Find",1333,2048,   7,1793},
  203.   {  44,  -1,  -1,0x001a,0x0005,0x0000, (long)"Q",1792,2048,1026,2049},
  204.   {  25,  -1,  -1,0x001a,0x0007,0x0030, (long)"UPDATE", 830,1792, 775,2049},
  205.   {   0,  46,  50,0x0014,0x0000,0x0000, 0x00011181L, 327,1792, 513,3850},
  206.   {  47,  -1,  -1,0x0015,0x0000,0x0000, (long)&rs_tedinfo[19], 256,1025,   1,2560},
  207.   {  48,  -1,  -1,0x0015,0x0000,0x0000, (long)&rs_tedinfo[20], 256,3075,   1,2560},
  208.   {  49,  -1,  -1,0x0015,0x0000,0x0000, (long)&rs_tedinfo[21], 256,1030,   1,2560},
  209.   {  50,  -1,  -1,0x0015,0x0000,0x0000, (long)&rs_tedinfo[22], 256,3080,   1,2560},
  210.   {  45,  -1,  -1,0x0019,0x0025,0x0000, 0x00011181L,   0,   0, 257,3594},
  211.   /* Tree #1*/
  212.   {  -1,   1,   1,0x0014,0x0000,0x0000, 0x000a11e1L, 523,2049, 310,2832},
  213.   {   0,   2,  10,0x0014,0x0000,0x0000, 0x00011181L,1026,1281,  49, 526},
  214.   {   3,  -1,  -1,0x0017,0x0000,0x0000, (long)&rs_bitblk[0], 788, 512, 263,1795},
  215.   {   4,  -1,  -1,0x0017,0x0003,0x0030, (long)&rs_bitblk[1], 274, 778,1038,2051},
  216.   {   5,  -1,  -1,0x0015,0x0000,0x0000, (long)&rs_tedinfo[23], 258,1027,1068, 513},
  217.   {   6,  -1,  -1,0x0015,0x0000,0x0000, (long)&rs_tedinfo[24], 258,2052, 553,2304},
  218.   {   7,  -1,  -1,0x0015,0x0000,0x0000, (long)&rs_tedinfo[25], 258, 517, 553,2304},
  219.   {   8,  -1,  -1,0x0015,0x0000,0x0000, (long)&rs_tedinfo[26], 258,3077, 553,2304},
  220.   {   9,  -1,  -1,0x0015,0x0000,0x0000, (long)&rs_tedinfo[27], 258,1542, 553,2304},
  221.   {  10,  -1,  -1,0x0015,0x0000,0x0000, (long)&rs_tedinfo[28], 258,   7, 553,2304},
  222.   {   1,  -1,  -1,0x0015,0x0020,0x0000, (long)&rs_tedinfo[29],1026,1289, 812,2560}
  223. };
  224.  
  225. int rs_trloc[] = {
  226.  0,
  227.  51
  228. };
  229.  
  230. OBJECT *rs_trindex[] = {
  231.   &rs_object[0],
  232.   &rs_object[51]
  233. };
  234.  
  235. #define NUM_TI 30
  236. #define NUM_IB 0
  237. #define NUM_BB 2
  238. #define NUM_OBS 62
  239. #define NUM_TREE 2
  240.  
  241.  
  242. void fix_objects(void)
  243. {
  244.   register int i;
  245.  
  246.   for(i=0; i<NUM_OBS; i++)
  247.     rsrc_obfix(rs_object, i);
  248. }
  249.  
  250.