{"id":271,"date":"2011-06-17T21:44:51","date_gmt":"2011-06-17T19:44:51","guid":{"rendered":"http:\/\/lallafa.de\/blog\/?p=271"},"modified":"2011-08-18T19:58:04","modified_gmt":"2011-08-18T17:58:04","slug":"dice-3-15-revisited-on-mac","status":"publish","type":"post","link":"https:\/\/lallafa.de\/blog\/2011\/06\/dice-3-15-revisited-on-mac\/","title":{"rendered":"DICE 3.15 revisited on Mac"},"content":{"rendered":"<p>DICE (Matt Dillon\u00e2\u20ac\u2122s C Compiler Environment) was one of the first C  compiler I came in touch with back in the days on my A500.  Recently,while scanning the Net for a m68k Amiga Cross Compiler solution for my  Mac I stumbled across the <a href=\"http:\/\/www.obviously.com\/dice\/\">source code release of DICE<\/a> by Matt himself\u00e2\u20ac\u00a6<\/p>\n<p>Here is the story of getting this old pearl running on my Mac\u00e2\u20ac\u00a6<br \/>\n<!--more--><\/p>\n<h3>Building DICE 3.15<\/h3>\n<ul>\n<li>First download the source code and unpack it.<\/li>\n<li>Apply this patch: <a href=\"https:\/\/www.lallafa.de\/files\/dice-rel-3.15-mac.patch.gz\">dice-rel-3.15-mac.patch.gz<\/a>\n<pre>&gt; cd dice-rel-3.15\r\n&gt; gunzip -c dice-3.15-mac.patch | patch -p1\r\n<\/pre>\n<\/li>\n<li>Compile the whole stuff:\n<pre>&gt; (cd suplib &amp;&amp;make all install)\r\n&gt; (cd src &amp;&amp;make all install)<\/pre>\n<\/li>\n<li>Voli\u00c3\u00a1! All binaries now reside in <strong>dice-rel-3.15\/ubin<\/strong><\/li>\n<\/ul>\n<h3>Setup Compiler Environment<\/h3>\n<p>There is a simple script called <strong>dice.env<\/strong> in the main directory. You can call this to set up your compiler environment automatically. Note that I introduced a new variable <strong>DHOME<\/strong> to describe where the compiler resides<\/p>\n<pre>&gt; . dice.env<\/pre>\n<p>Calling dcc should give you the following<\/p>\n<pre>&gt; dcc\r\nDCC 1.12 (24.12.95)\r\nCopyright (c) 1992,1993,1994 Obvious Implementations Corp., Redistribution &amp; Use under DICE-LICENSE.TXT.<\/pre>\n<h3>Building Amiga OS 1.3 and 2.0 Libs<\/h3>\n<p>First you need to copy your Amiga OS C includes (preferably from a Amiga developer CD, like ADCD 2.1) to <strong>include\/amiga13 or amig20<\/strong>.<\/p>\n<pre>&gt; cp -r ADCD_2.1\/NDK\/NDK_1.3\/Includes1.3\/include.h\/* include\/amiga13\r\n&gt; cp -r ADCD_2.1\/NDK\/NDK_2.0\/NDK2.0-4\/include\/* include\/amiga20<\/pre>\n<p>Like the README already tells you, now do a:<\/p>\n<pre>&gt; cd lib\r\n&gt; export DCCOPTS=\"-\/\/ -1.3\"\r\n&gt; dmake -f DMakefile.unix amiga13\r\n&gt; export DCCOPTS=\"-\/\/ -2.0\"\r\n&gt; dmake -f DMakefile.unix amiga20<\/pre>\n<p>Ok! Libs are now ready&#8230;<\/p>\n<h3>A simple Test<\/h3>\n<p>To test the compiler I took one of the Amiga utility programs supplied with <a href=\"https:\/\/github.com\/GnoStiC\/PUAE\">PUAE<\/a>: transdisk.<\/p>\n<p>The source <a href=\"https:\/\/raw.github.com\/GnoStiC\/PUAE\/master\/amiga\/source\/transdisk.c\">transdisk.c<\/a> can be directly downloaded from the repository.<\/p>\n<p>Setup your compiler environment as above, download the source, and the following line does the trick (see <strong>doc\/dcc.doc<\/strong> for details on the command line switches):<\/p>\n<pre>&gt; dcc -mRR transdisk.c<\/pre>\n<p>Now a shiny new Amiga binary called <strong>transdisk<\/strong> was created in this directory and waits for execution in PUAE or on a real machine&#8230;<\/p>\n<p>So much for now&#8230; I hope you enjoy your shiny new compiler!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>DICE (Matt Dillon\u00e2\u20ac\u2122s C Compiler Environment) was one of the first C compiler I came in touch with back in the days on my A500. Recently,while scanning the Net for a m68k Amiga Cross Compiler solution for my Mac I &hellip; <a href=\"https:\/\/lallafa.de\/blog\/2011\/06\/dice-3-15-revisited-on-mac\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"ngg_post_thumbnail":0,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[11,9],"tags":[],"class_list":["post-271","post","type-post","status-publish","format-standard","hentry","category-amiga","category-software"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/piBMF-4n","jetpack_sharing_enabled":true,"jetpack_likes_enabled":true,"jetpack-related-posts":[],"_links":{"self":[{"href":"https:\/\/lallafa.de\/blog\/wp-json\/wp\/v2\/posts\/271","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lallafa.de\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lallafa.de\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lallafa.de\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lallafa.de\/blog\/wp-json\/wp\/v2\/comments?post=271"}],"version-history":[{"count":23,"href":"https:\/\/lallafa.de\/blog\/wp-json\/wp\/v2\/posts\/271\/revisions"}],"predecessor-version":[{"id":343,"href":"https:\/\/lallafa.de\/blog\/wp-json\/wp\/v2\/posts\/271\/revisions\/343"}],"wp:attachment":[{"href":"https:\/\/lallafa.de\/blog\/wp-json\/wp\/v2\/media?parent=271"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lallafa.de\/blog\/wp-json\/wp\/v2\/categories?post=271"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lallafa.de\/blog\/wp-json\/wp\/v2\/tags?post=271"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}