{"id":85,"date":"2025-08-11T16:51:00","date_gmt":"2025-08-11T16:51:00","guid":{"rendered":"http:\/\/192.168.3.28\/?p=85"},"modified":"2025-12-08T16:53:36","modified_gmt":"2025-12-08T16:53:36","slug":"to-a-better-smartloader","status":"publish","type":"post","link":"https:\/\/www.r3tr0.net\/index.php\/2025\/08\/11\/to-a-better-smartloader\/","title":{"rendered":"To a Better Smartloader"},"content":{"rendered":"\n<p>Well, up to the current version (0.36), smartloader was relying on Prodos 2.4 and the MLI kernel to execute Read Write Block.&nbsp;<\/p>\n\n\n\n<p>The main drawback are launch time (mainly to load prodos (a few second) and the fact that only Apple II with a language card (16k RAM) are able to run ProDos.<\/p>\n\n\n\n<p>A new approach has been considered to address the speed and the compatibility issue.&nbsp;<\/p>\n\n\n\n<p>This new approach relies on:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>A custom bootloader on track 0 sector 0,<\/li>\n\n\n\n<li>Fast RWTS library<\/li>\n\n\n\n<li>The adaptation of the smartloader to use RWTS<\/li>\n\n\n\n<li>Everything on a single track 0<\/li>\n<\/ul>\n\n\n\n<p>The boot loader is the so called stage 1 of the boot process, and it starts at 0x801 (Org is at 0x800 the first byte is 0x01 and used by the boot ROM).<\/p>\n\n\n\n<p>The bootloader will perform 4 steps:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Display immediately the Mask of the main screen,\u00a0<\/li>\n\n\n\n<li>Load the RWTS routines (from sector 0x01 to 0x08) to $BD00,<\/li>\n\n\n\n<li>Load the Smartloader main routines (from sector 0x09 to 0x0E) at $4000<\/li>\n\n\n\n<li>Hand over to Smartloader<\/li>\n<\/ul>\n\n\n\n<p>Dos3.3C RWTS are very commonly used, the main issue is the double buffering when reading and write from and to the disk. The performance could be better.<\/p>\n\n\n\n<p>There were many alternative such as DavidDos, DiversiDos, FastDos, ProntoDos with alternative &amp; optimized RWTS.&nbsp;<\/p>\n\n\n\n<p>On most of the Dos and alternatives RWTS routines stands on disk from sector 0x02 to 0x09, (bootloader is sector 0x0 &amp; 0x1).&nbsp;<\/p>\n\n\n\n<p>Because the aim is to have everything on a single track to avoid drive head move &amp; latency, every single space available need to be used.&nbsp;<\/p>\n\n\n\n<p>The Smartloader disk is organized as :<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Bootloader single sector: track 0 sector 0<\/li>\n\n\n\n<li>Fast RWTS sector 0x01 to 0x08<\/li>\n\n\n\n<li>Main Smartloader sector 0x09 to 0x0F (currently 0x0D)\u00a0<\/li>\n<\/ul>\n\n\n\n<p>Memory location is :&nbsp;<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>0x800 bootloader<\/li>\n\n\n\n<li>0x4000 smartloader<\/li>\n\n\n\n<li>0x2000 SetCommand to send Command to the SmartDisk II<\/li>\n\n\n\n<li>0x2100 2&#215;256 Bytes for Read buffer from the smart disk II<\/li>\n<\/ul>\n\n\n\n<p>Track Allocation:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Bootloader, RWTS, Main Smartloader is on track 0<\/li>\n\n\n\n<li>Track 2 sector 0 &amp; 1 Read sector from SmartDisk II<\/li>\n\n\n\n<li>Track 3 sector 1 Write sector to SmartDisk II<\/li>\n<\/ul>\n\n\n\n<p>The trick used by the SmartDisk is to have a dedicated driver to send \/ receive information between SmartDisk \/ Smartloader using 2 tracks.&nbsp;<\/p>\n\n\n\n<p>The specific driver on the SmartDisk detects a write on Track 3, capture the command, and reply on track 2 with the contents.<\/p>\n\n\n\n<p>Commands are :<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>List content of current directory,<\/li>\n\n\n\n<li>Next page (next 16 items)<\/li>\n\n\n\n<li>Preventions page (previous 16 items)<\/li>\n\n\n\n<li>Navigate to directory<\/li>\n\n\n\n<li>Mount Disk Image and reset to 0xC600 to execute boot the disk<\/li>\n<\/ul>\n\n\n\n<p>Using the same approach, in a near future SmartDisk setting will be exposed to Smartloader, as well as Smartport image mounted for IIGS<\/p>\n\n\n\n<p>The performance of the new version (0.37) are very good&nbsp;<\/p>\n\n\n\n<p>The new release will be available soon after some tests.<\/p>\n\n\n\n<p>Hope you will enjoy it.<\/p>\n\n\n\n<p>Vincent&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Well, up to the current version (0.36), smartloader was relying on Prodos 2.4 and the MLI kernel to execute Read Write Block.&nbsp; The main drawback are launch time (mainly to load prodos (a few second) and the fact that only Apple II with a language card (16k RAM) are able to run ProDos. A new [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[18,17],"tags":[],"class_list":["post-85","post","type-post","status-publish","format-standard","hentry","category-appleii","category-smartdiskii"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.r3tr0.net\/index.php\/wp-json\/wp\/v2\/posts\/85","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.r3tr0.net\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.r3tr0.net\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.r3tr0.net\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.r3tr0.net\/index.php\/wp-json\/wp\/v2\/comments?post=85"}],"version-history":[{"count":1,"href":"https:\/\/www.r3tr0.net\/index.php\/wp-json\/wp\/v2\/posts\/85\/revisions"}],"predecessor-version":[{"id":86,"href":"https:\/\/www.r3tr0.net\/index.php\/wp-json\/wp\/v2\/posts\/85\/revisions\/86"}],"wp:attachment":[{"href":"https:\/\/www.r3tr0.net\/index.php\/wp-json\/wp\/v2\/media?parent=85"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.r3tr0.net\/index.php\/wp-json\/wp\/v2\/categories?post=85"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.r3tr0.net\/index.php\/wp-json\/wp\/v2\/tags?post=85"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}