setup.html 34 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <link title="Purple" rel="stylesheet" href="manual-purple.css" type="text/css">
  6. <link title="Minty" rel="alternate stylesheet" href="manual-minty.css" type="text/css">
  7. <link title="Plain" rel="alternate stylesheet" href="manual.css" type="text/css">
  8. <title>openMSX Setup Guide</title>
  9. </head>
  10. <body>
  11. <h1>openMSX Setup Guide</h1>
  12. <h2>Contents</h2>
  13. <ol class="toc">
  14. <li><a class="internal" href="#intro">1. Introduction</a>
  15. <ol class="toc">
  16. <li><a class="internal" href="#newver">1.1 New Versions of this Document</a></li>
  17. <li><a class="internal" href="#purpose">1.2 Purpose</a></li>
  18. <li><a class="internal" href="#contrib">1.3 Contributors</a></li>
  19. <li><a class="internal" href="#history">1.4 Revision History</a></li>
  20. </ol>
  21. </li>
  22. <li><a class="internal" href="#machext">2. Machines and Extensions</a></li>
  23. <li><a class="internal" href="#systemroms">3. System ROMs</a>
  24. <ol class="toc">
  25. <li><a class="internal" href="#cbios">3.1 C-BIOS</a></li>
  26. <li><a class="internal" href="#dumprom">3.2 Dumping ROMs</a>
  27. <ol class="toc">
  28. <li><a class="internal" href="#dumpromtools">3.2.1 Tools</a></li>
  29. <li><a class="internal" href="#dumpromlegal">3.2.2 Legal Issues</a></li>
  30. </ol>
  31. </li>
  32. <li><a class="internal" href="#downloadrom">3.3 Downloading ROMs</a></li>
  33. <li><a class="internal" href="#installrom">3.4 Installing ROMs</a>
  34. <ol class="toc">
  35. <li><a class="internal" href="#romlocation">3.4.1 ROM Locations</a></li>
  36. <li><a class="internal" href="#romchecksums">3.4.2 Checksums</a></li>
  37. <li><a class="internal" href="#romsplit">3.4.3 How to handle split ROMs</a></li>
  38. </ol>
  39. </li>
  40. </ol>
  41. </li>
  42. <li><a class="internal" href="#laserdisc">4. Palcom Laserdiscs</a></li>
  43. <li><a class="internal" href="#settings">5. User Preferences</a></li>
  44. <li><a class="internal" href="#tuning">6. Performance Tuning</a>
  45. <ol class="toc">
  46. <li><a class="internal" href="#opengl">6.1 OpenGL</a></li>
  47. <li><a class="internal" href="#tuningvarious">6.2 Various Tuning Tips</a></li>
  48. </ol>
  49. </li>
  50. <li><a class="internal" href="#androidtips">7. Android Tips</a></li>
  51. <li><a class="internal" href="#hardwareedit">8. Writing Hardware Descriptions</a></li>
  52. <li><a class="internal" href="#contact">9. Contact Info</a></li>
  53. </ol>
  54. <h2><a id="intro">1. Introduction</a></h2>
  55. <h3><a id="newver">1.1 New Versions of this Document</a></h3>
  56. <p>
  57. The latest version of the openMSX manual can be found on the openMSX home page:
  58. </p>
  59. <p>
  60. <a class="external" href="http://openmsx.org/manual/">http://openmsx.org/manual/</a>
  61. </p>
  62. <p>
  63. You can also use this URL to get up-to-date versions of the hyper links
  64. if you printed out this manual.
  65. </p>
  66. <h3><a id="purpose">1.2 Purpose</a></h3>
  67. <p>
  68. This guide is about openMSX, the open source MSX emulator that tries to achieve
  69. near-perfect emulation by using a novel emulation model.
  70. You can find more information about openMSX on the
  71. <a class="external" href="http://openmsx.org/">openMSX home page</a>.
  72. You can also download the emulator itself from there.
  73. </p>
  74. <p>
  75. openMSX is not completed yet, which means that most things work but not all
  76. features are implemented yet.
  77. Many emulation features are implemented, but in terms of user interface
  78. it is rather bare bones.
  79. However, because the emulation is already pretty good,
  80. it would be nice if non-insiders would be able to play with it, too.
  81. For those people, we have written this guide.
  82. </p>
  83. <p>
  84. This guide describes the setup of openMSX.
  85. After installation,
  86. openMSX is ready to run using C-BIOS and the default settings.
  87. In this guide you can read how to configure openMSX
  88. to emulate actual MSX machines (such as Panasonic FS-A1GT).
  89. It also describes how you can have openMSX start up
  90. with your personal settings,
  91. how you can configure openMSX and your system for optimal performance
  92. and several other configuration related topics.
  93. </p>
  94. <p>
  95. <em>Disclaimer:</em>
  96. We do not claim this guide is complete or even correct.
  97. What you do with the information in it is entirely at your own risk.
  98. We just hope it helps you enjoy openMSX more.
  99. </p>
  100. <h3><a id="contrib">1.3 Contributors</a></h3>
  101. <p>
  102. The following people contributed to this document in one way or another:
  103. </p>
  104. <ul>
  105. <li>Jorrith Schaap</li>
  106. <li>Manuel Bilderbeek</li>
  107. <li>Maarten ter Huurne</li>
  108. <li>other openMSX developers</li>
  109. </ul>
  110. <p>
  111. Thanks to all of them!
  112. </p>
  113. <h3><a id="history">1.4 Revision History</a></h3>
  114. <p>
  115. For the revision history, please refer to the <a class="external"
  116. href="https://github.com/openMSX/openMSX/commits/master/doc/manual/setup.html">commit log</a>.
  117. </p>
  118. <h2><a id="machext">2. Machines and Extensions</a></h2>
  119. <p>
  120. We use the word <em>machine</em> to refer to a specific
  121. MSX model. For example, the Sony HB-75P is a machine.
  122. openMSX does not have a fixed machine hardcoded into it.
  123. Instead, many different MSX machines can be emulated.
  124. The details of a machine are described in an XML file.
  125. This file describes how much memory a machine has,
  126. what video processor it has, in which slots its system ROMs are located,
  127. whether the machine has a built-in disk drive etc.
  128. openMSX reads the machine description XML and will then emulate exactly
  129. that MSX machine, which can be anything from an MSX1 with 16 kB of RAM
  130. to the MSXturboR GT.
  131. </p>
  132. <p>
  133. The openMSX distribution contains XML files describing many existing MSX
  134. models.
  135. You can find them in the <code>share/machines</code> directory.
  136. If you want to run one of those machines,
  137. you also need the system ROMs for that machine.
  138. See the <a class="internal" href="#systemroms">next chapter</a> for more
  139. information on system ROMs.
  140. You can also create your own machine descriptions,
  141. to expand existing MSX models or to create your own fantasy MSX. There are currently some of such fantasy MSX machines, based on real MSX machines, shipped with openMSX. Examples are a machine called "Boosted_MSX2_EN" (a European MSX2 with loads of hardware built in) and one called "Boosted_MSX2+_JP" (a Japanese MSX2+ with loads of hardware built in). You can find some more information about them in their accompanying txt file in <code>share/machines/</code>.
  142. More about creating fantasy MSX machines in a
  143. <a class="internal" href="#hardwareedit">later chapter</a>.
  144. </p>
  145. <p>
  146. An <em>extension</em> is a piece of MSX hardware that can be
  147. inserted into a cartridge slot to extend the capabilities of an MSX.
  148. Examples of extensions are the Panasonic FMPAC, the Sunrise IDE interface
  149. and an external 4MB memory mapper.
  150. Extensions, like machines, are described in XML files.
  151. You can find a lot of predefined extensions
  152. in the <code>share/extensions</code> directory.
  153. Some extensions need ROM images in order to run, similar to system ROMs.
  154. </p>
  155. <p>In general, the XML files that describe the hardware configuration are called "hardware configuration XML files".</p>
  156. <h2><a id="systemroms">3. System ROMs</a></h2>
  157. <p>
  158. An MSX machine consists of a lot of hardware, but also contains some software.
  159. Such software includes the BIOS, MSX-BASIC, software controlling disk drives
  160. and built-in applications (firmware).
  161. openMSX emulates the MSX hardware, but it needs MSX system software to emulate
  162. a full MSX system.
  163. Because the internal software is located in ROM chips, it is referred to as
  164. <em>system ROMs</em>.
  165. </p>
  166. <p>
  167. The software in the system ROMs, like most software, is copyrighted.
  168. Depending on your local laws, there are certain things you are allowed to
  169. do with copyrighted software and certain things you are not allowed to do.
  170. In this manual, a couple of options are listed for providing system ROMs
  171. to your openMSX installation.
  172. It is up to you, the user, to select an option that is legal in your country.
  173. </p>
  174. <h3><a id="cbios">3.1 C-BIOS</a></h3>
  175. <p>
  176. C-BIOS stands for "Compatible BIOS".
  177. It tries to be compatible with the MSX BIOS found in real MSX machines,
  178. but it was written from scratch, so all copyrights belong to its authors.
  179. BouKiChi, the original author of C-BIOS, was kind enough to allow C-BIOS
  180. to be distributed together with openMSX.
  181. Since then, Reikan took over maintenance of C-BIOS and the license
  182. was changed to give users and developers even more freedom in using C-BIOS.
  183. Even later, C-BIOS was moved to a SourceForge.net project, with several new maintainers.
  184. Every now and then, an updated version of C-BIOS is released.
  185. You can wait for it to be included in the next openMSX release,
  186. or download it directly from the
  187. <a class="external" href="http://cbios.sourceforge.net/">C-BIOS web site</a>.
  188. </p>
  189. <p>
  190. C-BIOS can be used to run most MSX1, MSX2 and MSX2+ cartridge-based games.
  191. It does not include MSX-BASIC and does not support disk drives yet,
  192. so programs depending on that will not run. So, with the C-BIOS machines and
  193. ROMs that came with openMSX, you cannot run software that comes on tape, disk
  194. or any other media than cartridges with ROMs.
  195. </p>
  196. <p>
  197. openMSX contains several machine configurations using C-BIOS.
  198. The machine <code>C-BIOS_MSX1</code> is an MSX1 with 64 kB RAM.
  199. The machine <code>C-BIOS_MSX2</code> is an MSX2 with 512 kB RAM and 128 kB VRAM.
  200. The machine <code>C-BIOS_MSX2+</code> is an MSX2+ with 512 kB RAM, 128 kB VRAM and MSX-MUSIC.
  201. The latter is the default machine for openMSX after installation,
  202. so if you change nothing to the openMSX configuration,
  203. then <code>C-BIOS_MSX2+</code> is the machine that will be booted. The
  204. mentioned machines have a US English (international) keyboard layout and
  205. character set and run at 60Hz (like NTSC) interrupt frequency. From C-BIOS
  206. 0.25, there are also localized versions available: Japanese, European (like US,
  207. but 50Hz) and Brazilian types. You can recognize them easily.
  208. </p>
  209. <p>
  210. It is always legal for you to run the C-BIOS ROMs in openMSX.
  211. You are allowed to use C-BIOS and its source code in various other ways
  212. as well, read the C-BIOS license for details.
  213. It is located in the file <code>README.cbios</code> in the Contrib directory.
  214. </p>
  215. <h3><a id="dumprom">3.2 Dumping ROMs</a></h3>
  216. <p>
  217. If you own a real MSX machine, you can dump the contents of its system ROMs
  218. to create ROM images you can run in openMSX.
  219. This way, you can emulate the MSX machines you are familiar with.
  220. </p>
  221. <h4><a id="dumpromtools">3.2.1 Tools</a></h4>
  222. <p>
  223. The easiest way to dump system ROMs is to run a special dumping tool on your
  224. real MSX, which copies the contents of the system ROMs to disk.
  225. Sean Young has made such tools, you can find the
  226. <a class="external" href="http://bifi.msxnet.org/msxnet/utils/saverom.html">tools and documentation</a>
  227. on BiFi's web site.
  228. These tools can also be used to dump cartridge ROMs, which may be useful later,
  229. if you want to use certain extensions or play games.
  230. </p>
  231. <h4><a id="dumpromlegal">3.2.2 Legal Issues</a></h4>
  232. <p>
  233. Using ROMs dumped from machines you own is generally considered
  234. a proper thing to do in the MSX community.
  235. When the MSX machine was bought in a shop years ago, you or the person that
  236. originally bought it paid money for the MSX machine.
  237. A small part of that money paid for the software in the system ROMs.
  238. However, we are no legal experts, so it is up to you to check whether it
  239. is legal in your country to use dumped ROMs of machines you own.
  240. </p>
  241. <h3><a id="downloadrom">3.3 Downloading ROMs</a></h3>
  242. <p>
  243. Some WWW and FTP sites offer MSX system ROMs as a download.
  244. Some MSX emulators include system ROMs in their distribution.
  245. Downloaded system ROMs can be used in the same way as
  246. system ROMs you dumped yourself, see the previous section.
  247. </p>
  248. <p>
  249. It may be illegal in your country to download system ROMs.
  250. Please inform yourself of the legal aspects before considering this option.
  251. Whatever you decide, is your own responsibility.
  252. </p>
  253. <h3><a id="installrom">3.4 Installing ROMs</a></h3>
  254. <p>
  255. If you want to emulate real MSX machines next to the default C-BIOS based
  256. machines, you will have to install system ROMs that did not come with openMSX.
  257. This section explains how to install these, once you obtained them in one of
  258. the ways that are explained in the previous sections.
  259. </p>
  260. <h4><a id="romlocation">3.4.1 ROM Locations</a></h4>
  261. <p>The easiest way is to copy the ROM files in a so-called file pool: a special
  262. directory where openMSX will look for files (system ROMs, other ROMs, disks,
  263. tapes, etc.). The default file pool for system ROMs is the
  264. <code>systemroms</code> sub directory. The best way is to make a
  265. <code>systemroms</code> sub directory in your own user directory, which is
  266. platform dependent:
  267. </p>
  268. <table class="border_enabled">
  269. <tr><th>Platform</th><th>User directory</th></tr>
  270. <tr><td>Windows (e.g. Windows 7)</td><td><code>C:\Users\&lt;user name&gt;\Documents\openMSX\share</code> whereby <code>&lt;user name&gt;</code> stands for your Windows login name</td></tr>
  271. <tr><td>Unix and Linux</td><td><code>~/.openMSX/share</code></td></tr>
  272. <tr><td>Android</td><td><code>&lt;external storage&gt;/openMSX/share</code>, whereby <code>&lt;external storage&gt;</code> stands for the default external storage location of your Android device. On the Samsung Galaxy Nexus it is for example <code>/sdcard</code></td></tr>
  273. </table>
  274. <p>
  275. That way, you do not need special privilages. Furtermore, the installer won't
  276. touch them for sure on Windows nor on Android.
  277. </p>
  278. <p>
  279. A template for the <code>systemroms</code> sub directory is present in the installation directory of openMSX, which is also platform dependent:
  280. </p>
  281. <table class="border_enabled">
  282. <tr><th>Platform</th><th>Typical openMSX file pool installation directory</th></tr>
  283. <tr><td>Windows (any version)</td><td><code>C:\Program Files\openMSX\share</code></td></tr>
  284. <tr><td>Unix and Linux</td><td><code>/opt/openMSX/share</code> or <code>/usr/share/openmsx</code></td></tr>
  285. <tr><td>Android</td><td><code>&lt;internal app install dir&gt;/org.openmsx.android.openmsx/files/openmsx_system</code>, whereby <code>&lt;internal app install dir&gt;</code> stands for the default internal app installation directory of your Android device. On the Samsung Galaxy Nexus it is for example <code>/sdcard/Android/data</code></td></tr>
  286. </table>
  287. <p>
  288. So, you can just copy all your system ROMs to the <code>share/systemroms</code>
  289. directory of your user account. The ROM files can be zipped (or gzipped), but
  290. only one file can be in a ZIP file. If multiple ROM files are in a single ZIP
  291. file, openMSX will not find them. The directory structure below <code>share/systemroms</code> is not relevant, openMSX will search completely through it.
  292. </p>
  293. <p>
  294. More info about file pools is in the documentation of the <code><a
  295. class="external" href="commands.html#filepool">filepool</a></code> command. If
  296. you can't get this working, please read one of the next sections about
  297. Checksums.
  298. </p>
  299. <p>
  300. For advanced users, it is also possible to let openMSX load a specific set of ROM images for a machine,
  301. independent of any file pool or the checksums of the ROM images. For that you
  302. copy the ROM file with the name and path as mentioned in the hardware
  303. configuration XML file that describes the machine, relative to the path of that
  304. machine description file.
  305. For example, if you dumped the ROMs of a Philips NMS 8250 machine,
  306. copy them to <code>share/machines</code>, because in the machine
  307. description file (in <code>share/machines/Philips_NMS_8250.xml</code>) the name
  308. of the ROMs is like this: <code>nms8250_msx2sub.rom</code>. We recommend
  309. to not use this feature, but use the file pools as mentioned above.
  310. </p>
  311. <h4><a id="romchecksums">3.4.2 Checksums</a></h4>
  312. <p>
  313. All necessary system ROM files used in machines and extensions are primarily
  314. identified with a checksum: a sha1sum. This enables openMSX to find the right
  315. ROM file from one of the <a class="external" href="commands.html#filepool">file
  316. pool</a>s of type <code>system_rom</code>, without depending on the file name.
  317. So the actual content is guaranteed to be what was intended. If the ROM is
  318. explicitly specified in the configuration file (which is also supported) and
  319. the sha1sum doesn't match, a warning will be printed.
  320. </p>
  321. <p>
  322. If you are trying to run an MSX machine and get an error like <code>Fatal
  323. error: Error in "broken" machine: Couldn't find ROM file for "MSX BIOS with
  324. BASIC ROM" (sha1: 12345c041975f31dc2ab1019cfdd4967999de53e).</code> it means
  325. that the required system ROM for that machine with the given sha1sum cannot be
  326. found in one of the file pools as mentioned above (typically
  327. <code>share/systemroms</code>). This is the primary way to know that you are
  328. missing required system ROMs and thus something went wrong installing them
  329. (typically either not a file with the proper content or you put the file in the
  330. wrong place, or you put it in a large ZIP file with multiple files).
  331. </p>
  332. <p>
  333. You can also manually check whether you have the correct ROM images. The value
  334. in the &lt;sha1&gt; tag(s) in the hardware configuration XML files contain checksums of
  335. ROM images that are known to work. You can compare the checksums of your ROM
  336. images to the ones in the hardware configuration XML files with the
  337. <code>sha1sum</code> tool.
  338. It is installed by default on most UNIX systems,
  339. on Windows you would have to download it separately.
  340. If the checksums match, it is almost certain you have correct system ROMs.
  341. If the checksums do not match, it could mean something went wrong
  342. dumping the ROMs, or it could mean you have a slightly older/newer model
  343. which contains different system ROMs.
  344. </p>
  345. <p>
  346. A typical case in which you can have problems with checksums (or ROMs not getting found in a file pool) is disk ROMs.
  347. The ROM dump can be correct, and still have a different checksum. This is because part of
  348. the ROM is not actually ROM, but mapped on the registers of the floppy
  349. controller. When you are sure it is correct, don't put it in a file pool, but put it in the proper directory, which is explained above.
  350. Alternatively, you could add the checksum in the XML file that describes
  351. the machine you made the ROM dump for (multiple checksums can be present, they will be checked in the same order as they are in the file).
  352. </p>
  353. <h4><a id="romsplit">3.4.3 How to handle split ROMs</a></h4>
  354. <p>
  355. The machine configurations bundled with openMSX often refer to ROM files
  356. that span multiple 16 kB pages.
  357. For example, in the NMS 8250 configuration, the BIOS and MSX-BASIC are
  358. expected in a single 32 kB ROM image.
  359. If you created two 16 kB images when dumping or got those from downloading,
  360. you can concatenate them using tools included with your OS.
  361. In Linux and other Unix(-like) systems you can do it like this:
  362. </p>
  363. <div class="commandline">
  364. cat bios.rom basic.rom &gt; nms8250_basic-bios2.rom
  365. </div>
  366. <p>
  367. In Windows, open a command prompt and issue this command:
  368. </p>
  369. <div class="commandline">
  370. copy /b bios.rom + basic.rom nms8250_basic-bios2.rom
  371. </div>
  372. <h2><a id="laserdisc">4. Palcom Laserdiscs</a></h2>
  373. <p>
  374. The Pioneer PX-7 and Pioneer PX-V60 are both emulated including an emulated Laserdisc Player, making it possible to run Palcom Laserdisc software.
  375. </p>
  376. <p>
  377. The laserdisc must be captured before it can be used with an emulator. The file must adhere to the following rules:
  378. </p>
  379. <ul>
  380. <li>Use the Ogg container format</li>
  381. <li>Use the Vorbis codec for audio</li>
  382. <li>Use the Theora codec for video</li>
  383. <li>Captured at 640&times;480, YUV420</li>
  384. <li>A bitrate of at least 200kpbs for audio, otherwise the computer code encoded on the right audio channel will degrade too much for it to be readable</li>
  385. <li>Theora frame numbers must correspond to laserdisc frame numbers</li>
  386. <li>Some laserdiscs have chapters and/or stop frames. This is encoded in the <a href="http://www.daphne-emu.com/mediawiki/index.php/VBIInfo">VBI signal</a>, and must be converted to plain text. This must be added to the theora meta data</li>
  387. </ul>
  388. <p>
  389. The metadata for chapters and stop frames has the form "chapter: &lt;chapter-no&gt;,&lt;first-frame&gt;-&lt;last-frame&gt;" and stop frames are "stop: &lt;frame-no&gt;". For example:
  390. </p>
  391. <pre>
  392. chapter: 0,1-360
  393. chapter: 1,361-4500
  394. chapter: 2,4501-9450
  395. chapter: 3,9451-18660
  396. chapter: 4,18661-28950
  397. chapter: 5,28951-38340
  398. chapter: 6,38341-39432
  399. stop: 4796
  400. stop: 9089
  401. stop: 9178
  402. stop: 9751
  403. stop: 14818
  404. stop: 14908
  405. stop: 18270
  406. stop: 18360
  407. stop: 18968
  408. stop: 24815
  409. stop: 24903
  410. stop: 28553
  411. stop: 28641
  412. stop: 29258
  413. stop: 34561
  414. stop: 34649
  415. stop: 38095
  416. stop: 38181
  417. stop: 38341
  418. stop: 39127
  419. </pre>
  420. <p>
  421. Note that the emulated Pioneer PX-7 and Pioneer PX-V60 are virtually identical, except that the Pioneer PX-7 has pseudo-stereo for its PSG.
  422. </p>
  423. <h2><a id="settings">5. User Preferences</a></h2>
  424. <p>
  425. Almost all user preferences can be done via the openMSX console, at openMSX run time. This is more thoroughly explained in <a class="external" href="user.html#controlling">the User's Manual</a>. In short: you can save your settings with the <code><a class="external" href="commands.html#save_settings">save_settings</a></code> command, which will save the settings in your personal settings file. The settings file will be loaded every time openMSX starts.
  426. </p>
  427. <p>
  428. One of the preferences is the default machine:
  429. the machine openMSX uses if you did not specify one on the command line. The name of this setting is <code><a class="external" href="commands.html#default_machine">default_machine</a></code>. Switching machines at run time is done via the <code><a class="external" href="commands.html#machine">machine</a></code> command (more about this in <a class="external" href="user.html#controlling">the User's Manual</a>).
  430. </p>
  431. <p>
  432. By using the <code><a class="external" href="commands.html#bind">bind</a></code> command you can create custom key bindings. These bindings will also be saved as settings in your settings file if you issue a <code><a class="external" href="commands.html#save_settings">save_settings</a></code> command.
  433. </p>
  434. <p>
  435. The other settings are discussed in <a class="external" href="user.html#controlling">the User's Manual</a> and there is an overview in the <a class="external" href="commands.html">Console Command Reference</a>.
  436. </p>
  437. <p>
  438. If you're a power user and want to specify commands which are executed at the start of each openMSX start up, put those commands in a text file, one command per line (i.e. a script) and put it in the <code>share/scripts</code> directory. You can also explicitly specify a Tcl file to be loaded and executed on the openMSX commandline. For this, use the <code>-script</code> command line option, which has the filename of the Tcl script as argument.
  439. </p>
  440. <h2><a id="tuning">6. Performance Tuning</a></h2>
  441. <p>
  442. This chapter contains some tips for tuning the performance of openMSX
  443. on your system.
  444. </p>
  445. <h3><a id="opengl">6.1 OpenGL</a></h3>
  446. <p>
  447. The SDLGL-PP <a class="external" href="user.html#renderers">renderer</a> needs hardware acceleration to run at a decent speed, with support for OpenGL 2.0. Practically all modern PC hardware has this and that's why we made it the default, but if your hardware doesn't, use the SDL renderer instead.
  448. </p>
  449. <p>
  450. Getting OpenGL running hardware accelerated used to be a little cumbersome in some situations.
  451. However, nowadays there is a big chance that your system already has hardware accelerated OpenGL supported in the default installation of your Xorg or Windows environment. Just make sure you install the development header files for the OpenGL library if you want to compile openMSX with support for it.
  452. </p>
  453. <p>
  454. You can verify hardware acceleration on your Linux system by typing <code>glxinfo</code> on the command line. If you have everything working, this command should output a line like this: <code>direct rendering: Yes</code>.
  455. </p>
  456. <p>
  457. In any case: if you have a decent video card and you have hardware acceleration working, you can get a lot better performance of openMSX by using the SDLGL-PP renderer.
  458. </p>
  459. <h3><a id="tuningvarious">6.2 Various Tuning Tips</a></h3>
  460. <p>
  461. CPU and graphics performance varies a lot, depending on the openMSX
  462. settings and the MSX hardware and software you're emulating.
  463. Some things run fine on a 200MHz machine, others are slow on a 2GHz
  464. machine.
  465. </p>
  466. <p>
  467. If openMSX runs slow, you can try the following measures:
  468. </p>
  469. <ul>
  470. <li>
  471. Disable horizontal stretching (mostly useful when using the SDL renderer), which is enabled by default: <code>set <a class="external" href="commands.html#horizontal_stretch">horizontal_stretch</a> 320</code>.
  472. </li>
  473. <li>
  474. Disable the <a class="external" href="user.html#reverse">reverse</a> feature (especially if the platform you're running on has a low amount of RAM), which is enabled by default on most platforms: <code>set <a class="external" href="commands.html#auto_enable_reverse">auto_enable_reverse</a> off</code>
  475. </li>
  476. <li>
  477. Make sure there are no CPU or I/O heavy background processes is running.
  478. Downloads, P2P software, distributed calculation efforts, search indexers etc may grab
  479. the CPU from time to time, leaving less time for openMSX to do its job.
  480. Even if they only do so only once in a while, it may be enough to cause
  481. emulation to stutter.
  482. </li>
  483. <li>
  484. Increase the number of frames that may be skipped (<code>set <a class="external" href="commands.html#maxframeskip">maxframeskip</a> 10</code>, for example).
  485. </li>
  486. <li>
  487. Use a <code><a class="external" href="commands.html#scale_factor">scale_factor</a></code> of 1 with the SDL renderer (75% less pixels to fill compared to the default setting of 2). For most
  488. games (and any MSX1 software) it works perfectly, especially when using full screen. The drawback: no special effects at all, not even scanlines. Turning off special effects can also mean a speed up, of course.
  489. </li>
  490. <li>
  491. Use the <a class="external" href="commands.html#resampler">fast resampler</a> instead of the hq or blip one.
  492. </li>
  493. <li>
  494. Emulate MSX software that uses less sound channels, for example MSX-MUSIC (maximum 9 channels)
  495. instead of MoonSound (maximum 18+24 channels). Or run simpler software altogether (e.g. MSX1 software instead of turboR software).
  496. </li>
  497. </ul>
  498. <h2><a id="androidtips">7. Android Tips</a></h2>
  499. <p>This section has some tips specific to the Android version</p>
  500. <ul>
  501. <li>If the sound is choppy, you should increase the SDL audio buffer size as follows
  502. <ul>
  503. <li>Start openMSX</li>
  504. <li>Tap the button "Change device configuration" on the SDL Splash screen that is shown for 3 seconds during the startup</li>
  505. <li>Tap the button "Size of audio buffer" in the device configuration screen</li>
  506. <li>Change the buffer size from "Very small" to "Small"</li>
  507. <li>Tap "OK" to close the device configuration screen</li>
  508. </ul>
  509. </li>
  510. <li>By default, the Android build has 4 virtual buttons on the right bottom side, mapped to functions as in following table:
  511. <table class="border_enabled">
  512. <tr><td>Console</td><td>openMSX virtual keyboard</td></tr>
  513. <tr><td>Joystick button 2</td><td>Joystick button 1</td></tr>
  514. </table>
  515. </li>
  516. <li>It is possible to change these mappings using the "Change device configuration" button on the SDL Splash screen</li>
  517. <li>By default, the Android build has a button in the left upper corner of the screen to open the Android virtual keyboard</li>
  518. <li>If you use the Android keyboard a lot, then it is advisable to install the "Hackers keyboard" app from Google Play and to use that one
  519. instead of the standard Android keyboard. It is much more convenient for openMSX and other old-school applications.</li>
  520. </ul>
  521. <h2><a id="hardwareedit">8. Writing Hardware Descriptions</a></h2>
  522. <p>
  523. There are two ways to use extra devices in your emulated MSX:
  524. you can use a shipped extension
  525. (which is analogous to inserting a cartridge with the device into the MSX)
  526. or you can modify the hardware configuration file
  527. (which is analogous to open the MSX and build in the device).
  528. As in the real world, extensions are easier to use,
  529. but modifying the machine gives you more possibilities.
  530. Normal usage of machines and extensions is covered in the
  531. <a class="external" href="user.html">User's Manual</a>;
  532. this chapter tells you how you can create or modify these hardware descriptions, which is a topic for advanced users and definitely something very few people will (want to) do.
  533. By editing the hardware configuration XML files, you can for example increase
  534. the amount of RAM, add a built-in MSX-MUSIC, add a disk drive, create extra
  535. cartridge slots etc.
  536. </p>
  537. <p>
  538. You can modify an MSX machine (e.g. to add devices) by editing its hardware configration XML file. So, let's make a copy of <code>share/machines/Philips_NMS_8250.xml</code> and
  539. put it in <code>share/machines/mymsx.xml</code>.
  540. It's the config we are going to play with; our custom MSX.
  541. Note: it is convenient to use the user directory (see <a href="#romlocation">above</a>)
  542. to store your home-made machines, instead of the openMSX installation directory.
  543. </p>
  544. <p>
  545. The easiest thing to do is to copy and modify
  546. fragments from other existing configurations that can be found in
  547. <code>share/machines</code> or <code>share/extensions</code>. For example,
  548. to add an FMPAC to the 8250, just copy it from the <code>share/extensions/fmpac.xml</code> to
  549. some place in your <code>mymsx.xml</code> file (between the <code>&lt;devices&gt;</code> and
  550. <code>&lt;/devices&gt;</code> tags!):
  551. </p>
  552. <pre>
  553. &lt;primary slot="2"&gt;
  554. &lt;secondary slot="1"&gt;
  555. &lt;FMPAC id="PanaSoft SW-M004 FMPAC"&gt;
  556. &lt;io base="0x7C" num="2" type="O"/&gt;
  557. &lt;mem base="0x4000" size="0x4000"/&gt;
  558. &lt;sound&gt;
  559. &lt;volume&gt;13000&lt;/volume&gt;
  560. &lt;balance&gt;-75&lt;/balance&gt;
  561. &lt;/sound&gt;
  562. &lt;rom&gt;
  563. &lt;sha1&gt;9d789166e3caf28e4742fe933d962e99618c633d&lt;/sha1&gt;
  564. &lt;filename&gt;roms/fmpac.rom&lt;/filename&gt;
  565. &lt;/rom&gt;
  566. &lt;sramname&gt;fmpac.pac&lt;/sramname&gt;
  567. &lt;/FMPAC&gt;
  568. &lt;/secondary&gt;
  569. &lt;/primary&gt;
  570. </pre>
  571. <p>
  572. Don't forget to add the <code>fmpac.rom</code> file to one of your <code>system_rom</code> file pools.
  573. </p>
  574. <p>
  575. Because we changed the FMPAC from extension to built-in device, we have to specify in which slot the FMPAC is residing inside the modified 8250. So, we should replace the <code>slot="any"</code> stuff, with a specified slot as you can see in the above fragment.
  576. The number in the <code>slot</code> attribute of the <code>&lt;primary&gt;</code> tag indicates the
  577. primary slot of the emulated MSX you're editing. In this case the second
  578. cartridge slot of the NMS-8250 is used. <code>&lt;secondary&gt;</code> means sub slot. If we leave it out, the slot is not expanded and the primary slot is used. If we use it like in the above example, it means that slot 1 (of the <code>&lt;primary&gt;</code> tag) will be an expanded slot. If a <code>&lt;primary&gt;</code>
  579. tag has the attribute <code>external="true"</code>, this means that the slot is visible on the outside of the machine and can thus be used for external cartridges like extensions and ROM software.
  580. As explained above, the parameter filename can be adjusted to the name of your (64 kB!) FMPAC ROM
  581. file (note: if the file is not 64 kB (65536 bytes) in size, it won't work).
  582. "balance" defines to what channel the FMPAC's sound will be routed by
  583. default: in this case most of the sound goes to the left channel and a little bit goes to the right channel.
  584. "sramname" specifies the file name for file in which the SRAM contents will be
  585. saved to or loaded from. The saved files are compatible with the files that are
  586. saved by the (real) FMPAC commander's save option.
  587. </p>
  588. <p>
  589. After saving your config and running openMSX again, you should be able to get
  590. the FMPAC commander with <code>CALL FMPAC</code> in the emulated MSX!
  591. </p>
  592. <p>
  593. In a similar fashion, you can also add an MSX-Audio device
  594. (<code>&lt;MSX-AUDIO&gt;</code>, note that some programs also need the
  595. <code>MusicModuleMIDI</code> device to
  596. detect the Music Module, an empty SCC cartridge (<code>&lt;SCC&gt;</code>),
  597. etc. Just browse the existing existing extensions, the Boosted_MSX2_EN
  598. configuration file or the extensions and see what you can find.
  599. </p>
  600. <p>
  601. Devices that contain ROM or RAM will have to be put inside a slot of the MSX,
  602. using the <code>&lt;primary&gt;</code> and <code>&lt;secondary&gt;</code> tags
  603. as is demonstrated with the above mentioned FMPAC example. Other devices don't
  604. need this.
  605. Remember that you can not put two devices that have a ROM in the same (sub)slot!
  606. Just use a new free subslot if you need to add such a device and all your
  607. primary slots are full. Devices that do not need a slot, like the MSX-Audio
  608. device, you can add as many as you like.
  609. </p>
  610. <p>
  611. Another thing you may want to change: the amount of RAM of the MSX: change the
  612. "size" parameter in the <code>&lt;MemoryMapper&gt;</code> device config.
  613. </p>
  614. <p>
  615. In principle all of the above mentioned things are also valid for extensions. The main difference is the fact that you should use <code>"any"</code> for the slot specification as was already mentioned above. Just compare the fragment above with the original FMPAC extension we based it on.
  616. </p>
  617. <p>
  618. If you understand the basics of XML, you should be able to compose your MSX now!
  619. You can use the ready-made configurations in <code>share/machines</code> as
  620. examples.
  621. </p>
  622. <h2><a id="contact">9. Contact Info</a></h2>
  623. <p>
  624. Because openMSX is still in heavy development, feedback and bug reports are very
  625. welcome!
  626. </p>
  627. <p>
  628. If you encounter problems, you have several options:
  629. </p>
  630. <ol>
  631. <li>
  632. Go to our IRC channel: <code>#openMSX</code> on <code>irc.freenode.net</code>
  633. and ask your question there. Also reachable via <a class="external" href="http://webchat.freenode.net/?channels=openMSX">webchat</a>! If you don't get a reply immediately, please stick around for a while, or use one of the other contact options. The majority of the developers lives in time zone GMT+1. You may get no response if you contact them in the middle of the night...
  634. </li>
  635. <li>
  636. Post a message on <a class="external" href="http://www.msx.org/forum/semi-msx-talk/openmsx">the openMSX forum on MRC</a>.
  637. </li>
  638. <li>
  639. Create a new issue in the
  640. <a class="external" href="https://github.com/openMSX/openMSX/issues">openMSX issue tracker</a>
  641. on GitHub.
  642. You need a (free) log-in on GitHub to get access.
  643. </li>
  644. <li>
  645. Contact us and other users via one of the mailing lists. If you're a regular user and want to discuss openMSX and possible problems,
  646. join our <code>openmsx-user</code> mailing list.
  647. If you want to address the openMSX developers directly,
  648. post a message to the <code>openmsx-devel</code> mailing list.
  649. More info on the
  650. <a class="external" href="https://sourceforge.net/p/openmsx/mailman">openMSX mailing lists</a>,
  651. including an archive of old messages, can be found at SourceForge.
  652. </li>
  653. </ol>
  654. <p>
  655. For experienced users: if you get a crash,
  656. try to provide a <code>gdb</code> backtrace.
  657. This will only work if you did not strip the openMSX binary
  658. of its debug symbols.
  659. </p>
  660. <p>
  661. In any case, try to give as much information as possible when you describe your
  662. bug or request.
  663. </p>
  664. </body>
  665. </html>