{"id":15,"date":"2012-08-24T01:26:46","date_gmt":"2012-08-24T07:26:46","guid":{"rendered":"http:\/\/rastersoft.net\/?p=15"},"modified":"2012-08-29T08:17:20","modified_gmt":"2012-08-29T14:17:20","slug":"didj-development","status":"publish","type":"post","link":"http:\/\/rastersoft.net\/?p=15","title":{"rendered":"Didj development"},"content":{"rendered":"<p>I am currently in the process of porting my Worm Warrior game to the Didj:<\/p>\n<div id=\"attachment_16\" style=\"width: 330px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-16\" class=\"size-full wp-image-16 \" title=\"Worm Warrior\" src=\"http:\/\/rastersoft.net\/wp-content\/uploads\/2012\/08\/WormGG.jpg\" alt=\"Worm Warrior screenshot\" width=\"320\" height=\"240\" srcset=\"http:\/\/rastersoft.net\/wp-content\/uploads\/2012\/08\/WormGG.jpg 320w, http:\/\/rastersoft.net\/wp-content\/uploads\/2012\/08\/WormGG-300x225.jpg 300w\" sizes=\"auto, (max-width: 320px) 100vw, 320px\" \/><p id=\"caption-attachment-16\" class=\"wp-caption-text\">Worm Warrior for the Game Gadget<\/p><\/div>\n<p>Once it&#8217;s finished it will run on an unmodified Didj.<\/p>\n<p>I had to change from SDL 1.2 to an early version of SDL 1.3 to get it to start up on the Didj. It was probably linking to a missing SDL library on the Didj, I still have to fix the input and hook up the <a title=\"Hekkus Sound System\" href=\"http:\/\/www.shlzero.com\/\" target=\"_blank\">Hekkus Sound System<\/a>\u00a0(HSS). I developed a SDL 1.2 backend for HSS, which I hope will work with 1.3, and that the Didj SDL_Audio is hooked up.<\/p>\n<p>Developing on an unmodified Didj is a bit of a challenge, since there is no serial port to display debug messages. I got around that by creating a log file at \/Didj\/Data. The log file will survive a reboot; which the Didj does when exiting a program.<\/p>\n<p>Here&#8217;s a little code dump from my logging routine:<\/p>\n<pre lang=\"C\">bool\tg_bCreated;\r\n\r\nvoid logString(const char* _szFormat, ...)\r\n{\r\n    va_list sArgs;\r\n    char szString[256];\r\n\r\n    va_start(sArgs, _szFormat);\r\n\r\n    vsprintf(szString, _szFormat, sArgs);\r\n\r\n    va_end(sArgs);\r\n\r\n    FILE* pHandle = NULL;\r\n\r\n    if (false == g_bCreated)\r\n    {\r\n        g_bCreated = true;\r\n\r\n        pHandle = fopen(\"\/Didj\/Data\/Log.txt\", \"w\");\r\n    }\r\n\r\n    else\r\n    {\r\n        pHandle = fopen(\"\/Didj\/Data\/Log.txt\", \"a\");\r\n    }\r\n\r\n    if (pHandle != NULL)\r\n    {\r\n        fprintf(pHandle, \"%s\\n\", szString);\r\n\r\n        fclose(pHandle);\r\n    }\r\n}<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>I am currently in the process of porting my Worm Warrior game to the Didj: Once it&#8217;s finished it will run on an unmodified Didj. I had to change from SDL 1.2 to an early version of SDL 1.3 to get it to start up on the Didj. It was probably linking to a missing [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_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},"jetpack_post_was_ever_published":false},"categories":[9,4],"tags":[],"class_list":["post-15","post","type-post","status-publish","format-standard","hentry","category-code","category-didj"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p2GnBK-f","_links":{"self":[{"href":"http:\/\/rastersoft.net\/index.php?rest_route=\/wp\/v2\/posts\/15","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/rastersoft.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/rastersoft.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/rastersoft.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/rastersoft.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=15"}],"version-history":[{"count":9,"href":"http:\/\/rastersoft.net\/index.php?rest_route=\/wp\/v2\/posts\/15\/revisions"}],"predecessor-version":[{"id":119,"href":"http:\/\/rastersoft.net\/index.php?rest_route=\/wp\/v2\/posts\/15\/revisions\/119"}],"wp:attachment":[{"href":"http:\/\/rastersoft.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=15"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/rastersoft.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=15"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/rastersoft.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=15"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}