home *** CD-ROM | disk | FTP | other *** search
/ Executor 2.0 / executorv2.0.iso / pc / linux / extra / docs / maillist / text / archive.92 / text0069.txt < prev    next >
Encoding:
Text File  |  1996-04-02  |  7.7 KB  |  134 lines

  1. Dear Folks,
  2.  
  3.     A recent letter of mine compared Soft-PC to Executor.  I claimed that  
  4. Executor is much more difficult a task than Soft-PC (and implicitly did the same  
  5. for "Liken", a Mac emulator available for the SPARC).  The letter to which I am  
  6. replying here implies that either I don't understand the issues, or that I am  
  7. misleading you.  Neither is the case.  In the text below, I will refer to  
  8. Soft-PC, Liken, and Executor in some contexts where I'm really talking about the  
  9. developers of same (Insignia, Excellerated, and ARDI respectively).  I believe  
  10. people are more familiar with the products than the companies, so I  
  11. anthropomorphize.
  12.  
  13. >>THe one thing I'd like to say in response is that:
  14. >>Liken and Quorum both have to emulate the processor, like SoftPC.  The NeXT
  15. >>on the other hand has a 68K family processor.  So instead of emulating the 
  16.  
  17. >>whole processor you grab the graphics and system calls.  This is a lot  
  18. different
  19. >>than SoftPC and the emulation of a PC on NeXT hardware.  This is the big  
  20. reason
  21. >>that SoftPC is slow.  It not only has to emulate the processor but it has to 
  22.  
  23. >>intercept graphic calls to the bios and hardware.  A much more difficult job
  24. >>than what's done in Executor.  Liken is the same in that respect.
  25.  
  26.     Writing a synthetic CPU is not a difficult task (compared to what we're  
  27. doing).  I speak as the designer and major implementer of our synthetic CPU*  
  28. that will be used when we support Executor on other platforms (we will).  There  
  29. are two major ways to go about emulating a CPU:  interpretation and dynamic  
  30. recompilation.  I believe SoftPC uses the latter and Liken uses the former.  The  
  31. former is easier, but to get good speed you usually have to revert to a lot of  
  32. assembly language which makes porting your synthetic CPU difficult.  Insignia  
  33. claims that the biggest speed problems with Soft-PC on the NeXT are related to  
  34. the "BitmapImage" bottleneck and that with NeXTstep-3.0, much of the graphics  
  35. slowness will be alleviated.  I believe them; I know much about the  
  36. "BitmapImage" bottleneck, it plagues us as well (Yes, Executor should be much  
  37. faster if the 3.0 imaging mods live up to NeXT's claims).
  38.  
  39.     Why is writing a synthetic CPU so much more easy than rewriting the  
  40. Macintosh ROMs from scratch?  Regularity, documentation and bulk are the three  
  41. major reasons.  The implementers of Soft-PC had a more difficult job than those  
  42. of Liken, because the Intel 80x86 architecture isn't as regular as the Motorola  
  43. 680x0 architecture, but by and large, a synthetic CPU is a fairly regular piece  
  44. of work (i.e. you design the synthetic environment and implement a bunch of  
  45. routines for manipulating that environment, but "add" is more or less like  
  46. "subtract", which is similar, but not the same as "multiply", etc.).  The 80x86  
  47. documentation is much more complete than is the specification for what various  
  48. "A-line" traps do.  The major source of information for the latter is "Inside  
  49. Macintosh" Volumes I through VI.  Inside Macintosh is often incorrect, but is  
  50. almost always incomplete.  There are other sources of information, but the  
  51. bottom line is that you have a much greater state-space to watch after each  
  52. A-line trap (that's how Mac programs make operating system calls) then you do  
  53. after each synthetic instruction.  Should the first two reasons not be  
  54. compelling, consider bulk.  There are more user callable routines within the  
  55. MacOS then there are instructions in a 80x86.  The routines are significantly  
  56. larger and more complex than the instructions as well.
  57.  
  58.     Both Soft-PC and Liken have glue that is necessary in addition to the  
  59. synthetic CPU.  Soft-PC needs also emulate the BIOS and Liken needs to emulate  
  60. just enough of the ROMs to be able to use all of Apple's code present in the  
  61. Apple System file that you must acquire to use their product.  Both of these are  
  62. tricky things to do; however they are both miniature versions of what we have to  
  63. do (i.e. BIOS is a major subset of DOS; the portions of the ROMs that Liken has  
  64. to replicate constitute a major subset of the code that we have to support from  
  65. the ROMs and System File).  Remember, Soft-PC gets MS-DOS from Microsoft; Liken  
  66. gets MacOS from Apple (although you have to supply it yourself; I guess they  
  67. don't feel comfortable purchasing it on your behalf).  We have rewritten the  
  68. majority of MacOS-6.
  69.  
  70.     NOTE:  Several companies have reverse-engineered the BIOS; Phoenix  
  71. Technologies pioneered the legal technique (clean room/dirty room), but several  
  72. other companies have done it.  A few companies have written glue similar in  
  73. scope to what's found in Liken for their Mac compatibility products which, like  
  74. Liken, require that the majority of the MacOS code come directly from Apple  
  75. itself.  I've been told that there are also other companies that have done  
  76. IBM-PC emulators, Acorn for instance, but I don't know; Soft-PC is certainly the  
  77. one that everyone thinks of.
  78.  
  79. >>I would say that Executor is more in the same line of emulators for the Mac  
  80. that
  81. >>run on the Amiga and Atari, that is same family of processors so instruction
  82. >>set mapping or emulation is not needed.
  83. >>
  84. >>I understand that for the Atari and Amiga you need the ROMS, etc.
  85. >>I'm not trying to take anything away from Executor, I think it's a great 
  86.  
  87. >>program.  But I also think that SoftPC and Liken were more difficult to write 
  88.  
  89. >>just because you have the added difficulty of supporting the native processor
  90. >>that the stuff originally ran on through software.
  91.  
  92.  
  93.     You are mistaken.  We are the first (and currently only) company to have  
  94. released a product that has any degree of binary compatibility with the  
  95. Macintosh that doesn't require any code being supplied by Apple.  If you believe  
  96. "Mac the Knife" in MacWeek 4-6-92, then Apple themselves are having a hard time  
  97. reimplementing their code on the PowerPC.  There are synthetic CPUs of various  
  98. degrees of usability all over the place, as there are reverse-engineered BIOSs  
  99. and various little Mac compatibility things that require Apple code.  The reason  
  100. we are unique is not totally because of fear of lawsuits.  What we've done and  
  101. what we are doing *is* harder than what Soft-PC and Liken do, and that's not  
  102. even taking into consideration the legal hassle of what we do (although Liken  
  103. certainly has concerns similar to Executor).
  104.  
  105.     For anyone doubting my claims, I suggest one of two exercises that may  
  106. help settle uncertain minds:
  107.  
  108.     1) Go to your nearest computer technical bookstore and look at an 80x86  
  109. reference, an 680x0 reference and "Inside Macintosh" Volumes I-VI.  Compare the  
  110. sizes.  Read a little out of any volume of "Inside Macintosh" and consider  
  111. carefully the OS routine that they are documenting.  Think about the various  
  112. aspects of the routine that aren't well defined (such as what order to do  
  113. various subtasks in, what happens on an error, etc) and then remember that  
  114. enough of the information therein is wrong to tick off a large number of  
  115. Macintosh software developers, much less someone who is trying to do reverse  
  116. engineering.
  117.  
  118.     2) Sit back and wait.  We will be on non-68k platforms.  When we are,  
  119. ask about the amount of development time that was spent on the synthetic CPU.   
  120. So far we have been working on the reverse-engineered ROMs for six years.  We  
  121. plan to have fewer people working on the synthetic CPU than the ROMs and we plan  
  122. to have the synthetic CPU out in one quarter of the time.  Since plans can go  
  123. awry, wait until it's shipping; I don't think you'll have to wait for NeXTWORLD  
  124. Expo '92.
  125.  
  126.     --Cliff
  127.  
  128.  
  129. __________________
  130. *I wrote a more detailed explanation of synthetic CPU theory and practice,  
  131. including just what we were doing in a post to comp.sys.next.misc a few months  
  132. back.  I didn't save the article, but it should be available in the archives.
  133.  
  134.