{"id":57,"date":"2010-10-10T21:43:43","date_gmt":"2010-10-10T21:43:43","guid":{"rendered":"http:\/\/www.basoft.co.uk\/wordpress"},"modified":"2011-01-05T15:14:28","modified_gmt":"2011-01-05T15:14:28","slug":"osca-emulator","status":"publish","type":"page","link":"http:\/\/www.basoft.co.uk\/wordpress\/emulation\/computer-system-emulation\/v6z80p\/osca-emulator\/","title":{"rendered":"OSCA Emulator"},"content":{"rendered":"<p>The OSCA emulator emulates the standard configuration designed for the V6Z80P board. When first run, the IPL code is run and this loads the bootstrap loader from EEPROM. A picture of the bootstrap loader is shown below:<\/p>\n<p style=\"text-align: center;\">\n<div id=\"attachment_61\" style=\"width: 310px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/www.basoft.co.uk\/wordpress\/wp-content\/uploads\/2010\/10\/v6_boot.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-61\" class=\"size-medium wp-image-61 \" title=\"V6Z80P OSCA Bootstrap\" src=\"http:\/\/www.basoft.co.uk\/wordpress\/wp-content\/uploads\/2010\/10\/v6_boot-300x222.png\" alt=\"V6Z80P OSCA Bootstrap\" width=\"300\" height=\"222\" srcset=\"http:\/\/www.basoft.co.uk\/wordpress\/wp-content\/uploads\/2010\/10\/v6_boot-300x222.png 300w, http:\/\/www.basoft.co.uk\/wordpress\/wp-content\/uploads\/2010\/10\/v6_boot.png 632w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><p id=\"caption-attachment-61\" class=\"wp-caption-text\">OSCA Bootstrap on V6Z80P<\/p><\/div>\n<p>From here, the FLOS Operating System is loaded from the emulated SD Card image and boots:<\/p>\n<p style=\"text-align: left;\">\n<div id=\"attachment_62\" style=\"width: 310px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/www.basoft.co.uk\/wordpress\/wp-content\/uploads\/2010\/10\/v6_flos.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-62\" class=\"size-medium wp-image-62 \" title=\"V6Z80P FLOS\" src=\"http:\/\/www.basoft.co.uk\/wordpress\/wp-content\/uploads\/2010\/10\/v6_flos-300x222.png\" alt=\"V6Z80P FLOS\" width=\"300\" height=\"222\" srcset=\"http:\/\/www.basoft.co.uk\/wordpress\/wp-content\/uploads\/2010\/10\/v6_flos-300x222.png 300w, http:\/\/www.basoft.co.uk\/wordpress\/wp-content\/uploads\/2010\/10\/v6_flos.png 629w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><p id=\"caption-attachment-62\" class=\"wp-caption-text\">FLOS on emulated V6Z80P<\/p><\/div>\n<p style=\"text-align: left;\">Emulation of OSCA is somewhat limited at present: much of the graphics subsystem is not yet emulated, for instance. However &#8211; bitmap graphics mode is fully emulated as can be seen in this 512K Big Blit Demo:<\/p>\n<p style=\"text-align: left;\">\n<div id=\"attachment_63\" style=\"width: 310px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/www.basoft.co.uk\/wordpress\/wp-content\/uploads\/2010\/10\/v6_bigblit.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-63\" class=\"size-medium wp-image-63\" title=\"V6Z80P Big Blit Demo\" src=\"http:\/\/www.basoft.co.uk\/wordpress\/wp-content\/uploads\/2010\/10\/v6_bigblit-300x221.png\" alt=\"V6Z80P Big Blit Demo\" width=\"300\" height=\"221\" srcset=\"http:\/\/www.basoft.co.uk\/wordpress\/wp-content\/uploads\/2010\/10\/v6_bigblit-300x221.png 300w, http:\/\/www.basoft.co.uk\/wordpress\/wp-content\/uploads\/2010\/10\/v6_bigblit.png 629w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><p id=\"caption-attachment-63\" class=\"wp-caption-text\">Big Blit Demo for FLOS on V6Z80P<\/p><\/div>\n<p style=\"text-align: left;\">With a little creativity, it is also possible to run other operating systems. Below is a screenshot showing a custom version of CP\/M 2.2 running inside the emulator:<\/p>\n<p style=\"text-align: left;\">\n<div id=\"attachment_64\" style=\"width: 310px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/www.basoft.co.uk\/wordpress\/wp-content\/uploads\/2010\/10\/v6_cpm.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-64\" class=\"size-medium wp-image-64\" title=\"CP\/M 2.2 on V6Z80P\" src=\"http:\/\/www.basoft.co.uk\/wordpress\/wp-content\/uploads\/2010\/10\/v6_cpm-300x221.png\" alt=\"CP\/M 2.2 on V6Z80P\" width=\"300\" height=\"221\" srcset=\"http:\/\/www.basoft.co.uk\/wordpress\/wp-content\/uploads\/2010\/10\/v6_cpm-300x221.png 300w, http:\/\/www.basoft.co.uk\/wordpress\/wp-content\/uploads\/2010\/10\/v6_cpm.png 632w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><p id=\"caption-attachment-64\" class=\"wp-caption-text\">Custom CP\/M 2.2 running on emulated V6Z80P<\/p><\/div>\n<h4>Configuration<\/h4>\n<p>In the main folder containing the emulator (once you have unpacked it, of course!), the file config.txt contains the configuration options for the emulator and can be edited using notepad (or similar text editor). Available options:<\/p>\n<pre>BOOTROM filename<em>\r\n<\/em><\/pre>\n<p><em>Load contents of <\/em><strong>filename <\/strong><em>as the boot ROM image (at location 0x0000)<\/em><\/p>\n<pre>EEPROM address filename<\/pre>\n<p><em>Load contents of <\/em><strong>filename <\/strong><em>into the virtual EEPROM beginning at hex <\/em><strong>address <\/strong><em>specified<\/em><\/p>\n<pre>SDCARD address filename<\/pre>\n<p><em>Load contents of <\/em><strong>filename <\/strong><em>as a &#8220;virtual&#8221; disk image. <\/em><strong>Address <\/strong><em>is unused for now.<\/em><\/p>\n<pre>WRITEENABLE<\/pre>\n<p><em>Allow writes to SD card to be persisted to the real disk image<\/em><\/p>\n<pre>NOWRITEPROMPT<\/pre>\n<p><em>Don&#8217;t ask whether to commit SD writes to disk at exit\/reset &#8211; assume a &#8220;yes&#8221; response<\/em><\/p>\n<p>A sample config.txt follows:<\/p>\n<blockquote>\n<pre>BOOTROM roms\/rom.bin<\/pre>\n<pre>EEPROM F000 roms\/bootcode.epr<\/pre>\n<pre>SDCARD 0 roms\/flos.img<\/pre>\n<pre>WRITEENABLE<\/pre>\n<\/blockquote>\n<p>Directory names can be included (as shown in the example),<br \/>\nand the path separator may be \/ or \\ depending on preference.<br \/>\nBoth work identically. Absolute paths or relative paths are OK.<\/p>\n<p>2. Boot ROM &#8211; this must be 512 bytes exactly<\/p>\n<p>3. EEPROM contents &#8211; anything can be loaded here.<\/p>\n<p>The sample above shows a typical setup where the original rom and<br \/>\nbootcode are used. Using the original ROM means that the bootcode<\/p>\n<p>image loaded from<\/p>\n<pre>0xF000<\/pre>\n<p>must be correctly checksummed as it would<\/p>\n<p>on a real board. This further means that any operating system file loaded<br \/>\ninto the EEPROM from<\/p>\n<pre>0x800<\/pre>\n<p>onwards must have the correct signature.<\/p>\n<h4>CAPABILITIES<\/h4>\n<p>1. PIC is simulated enough to load databurst images from the<br \/>\n(virtual) EEPROM. Data can be loaded to the EEPROM for this<br \/>\npurpose.<\/p>\n<p>2. Z80 core with integrated debugger (of sorts!) with user-triggerable<br \/>\nreset and nmi<\/p>\n<p>3. Ability to view certain device I\/O calls as they are made in<br \/>\na separate Diagnostic Monitor<\/p>\n<p>4. Most I\/O ports and MMIO implemented correctly, although many<br \/>\nentries return dummy values due to missing hardware emulation. All<br \/>\nmemory banking is implemented, including new &#8220;entire 64k&#8221; mode<br \/>\nintroduced in v0656 OSCA.<\/p>\n<p>5. Keyboard implemented in a very basic manner. Clock and Data lines<br \/>\nare not yet returned back to the emulator<\/p>\n<p>6. VGA mode display emulated &#8211; includes Blitter, Chunky Bitmap Mode,<br \/>\nPlanar Bitmap Mode, Raster IRQ and active palette.<\/p>\n<p>7. Maths Assist unit fully implemented<\/p>\n<p>8. Basic SD\/MMC Support provided &#8211; only single block read\/write is supported, as well as<br \/>\ncard identification requests and reset command.<\/p>\n<p>9. Full Audio is supported, including IRQ trigger at the end of sample playback (where enabled\/used)<\/p>\n<h4>INCAPABILITIES<\/h4>\n<p>Notably absent: Secondary palette,<br \/>\ntilemap mode, sprites, hardware scrolling<\/p>\n<p>1. No Tilemap Mode (*)<br \/>\n2. No Sprites (*)<br \/>\n3. No LineCop (*)<br \/>\n4. No Joystick Emulation<br \/>\n5. Video modulo not implemented yet except for the blitter (*)<br \/>\n6. No Secondary Palette (*)<br \/>\n7. No Hardware Scrolling<\/p>\n<p>(*) These features are mostly included in the Experimental Build (with some limitations &#8211; no sprite mirroring for example) at the cost of performance<\/p>\n<h4>KNOWN ISSUES<\/h4>\n<p>1. Speed indicated inside the emulator is incorrect at the moment, and the<br \/>\nautothrottle routine does not perform correctly. This is because the CPU<br \/>\nexecution is not performed in a separate thread as it would be in a &#8220;final<br \/>\nversion&#8221;, but polled using a timer to aid debugging.<\/p>\n<p>2. Probably much much more \ud83d\ude09<\/p>\n<h4>Download Binaries:<\/h4>\n<p><img decoding=\"async\" src=\"http:\/\/www.basoft.co.uk\/wordpress\/wp-content\/plugins\/wp-downloadmanager\/images\/ext\/rar.gif\" alt=\"\" title=\"\" style=\"vertical-align: middle;\" \/>&nbsp;&nbsp;<strong><a href=\"http:\/\/www.basoft.co.uk\/wordpress\/download\/OSCA_Emulator.rar\">OSCA Emulator Binaries<\/a><\/strong> (3.7 MiB, 4,033 hits)<\/p>\n<h4>Download Source:<\/h4>\n<p><img decoding=\"async\" src=\"http:\/\/www.basoft.co.uk\/wordpress\/wp-content\/plugins\/wp-downloadmanager\/images\/ext\/rar.gif\" alt=\"\" title=\"\" style=\"vertical-align: middle;\" \/>&nbsp;&nbsp;<strong><a href=\"http:\/\/www.basoft.co.uk\/wordpress\/download\/OSCA_Emulator_0.4src.rar\">OSCA Emulator Source<\/a><\/strong> (134.1 KiB, 623 hits)<\/p>\n<h4>Download Experimental Build (Binary):<\/h4>\n<p><b>Caution: This is experimental. Do not attempt to resize the window, or use the processor controls inside the debugger window, as these will likely crash the emulator, and who knows what else?!!<\/b><br \/>\n<p><img decoding=\"async\" src=\"http:\/\/www.basoft.co.uk\/wordpress\/wp-content\/plugins\/wp-downloadmanager\/images\/ext\/rar.gif\" alt=\"\" title=\"\" style=\"vertical-align: middle;\" \/>&nbsp;&nbsp;<strong><a href=\"http:\/\/www.basoft.co.uk\/wordpress\/download\/OSCA_v0.7.rar\">OSCA Experimental Binary<\/a><\/strong> (519.1 KiB, 1,522 hits)<\/p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>The OSCA emulator emulates the standard configuration designed for the V6Z80P board. When first run, the IPL code is run and this loads the bootstrap loader from EEPROM. A picture of the bootstrap loader is shown below: From here, the FLOS Operating System is loaded from the emulated SD Card image and boots: Emulation of [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":39,"menu_order":0,"comment_status":"open","ping_status":"closed","template":"","meta":{"footnotes":""},"_links":{"self":[{"href":"http:\/\/www.basoft.co.uk\/wordpress\/wp-json\/wp\/v2\/pages\/57"}],"collection":[{"href":"http:\/\/www.basoft.co.uk\/wordpress\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"http:\/\/www.basoft.co.uk\/wordpress\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"http:\/\/www.basoft.co.uk\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.basoft.co.uk\/wordpress\/wp-json\/wp\/v2\/comments?post=57"}],"version-history":[{"count":13,"href":"http:\/\/www.basoft.co.uk\/wordpress\/wp-json\/wp\/v2\/pages\/57\/revisions"}],"predecessor-version":[{"id":60,"href":"http:\/\/www.basoft.co.uk\/wordpress\/wp-json\/wp\/v2\/pages\/57\/revisions\/60"}],"up":[{"embeddable":true,"href":"http:\/\/www.basoft.co.uk\/wordpress\/wp-json\/wp\/v2\/pages\/39"}],"wp:attachment":[{"href":"http:\/\/www.basoft.co.uk\/wordpress\/wp-json\/wp\/v2\/media?parent=57"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}