{"id":359,"date":"2020-05-11T09:00:00","date_gmt":"2020-05-11T07:00:00","guid":{"rendered":"https:\/\/blog.japanese-cake.io\/?p=359"},"modified":"2020-07-01T22:26:04","modified_gmt":"2020-07-01T20:26:04","slug":"catching-up-part-2-fish-n-chips","status":"publish","type":"post","link":"https:\/\/blog.japanese-cake.io\/index.php\/2020\/05\/11\/catching-up-part-2-fish-n-chips\/","title":{"rendered":"Catching up part 2: Fish &#8216;n&#8217; FlashChip"},"content":{"rendered":"\n<p><\/p>\n\n\n\n<p>Have you heard of Fish Life? Honestly if you end up reading this article, you have probably already read all the other websites related to the Dreamcast, from the most well known to those dead for decades, desperately seeking for any kind of content as long it doesn\u2019t appear in your browser history&#8230;. Seems like you and I would surely get along \ud83d\ude42<\/p>\n\n\n\n<p>Fish Life is a set of fish tank simulators developed by SEGA in 2000. Several editions were made, each featuring a different part of the sea life. While some may challenge the fish simulation market SEGA tried to penetrate, Fish Life definitely pushed a little bit forward the Dreamcast capabilities.<\/p>\n\n\n\n<p>Before going any further, I would like to thank Laurent C. for sharing the Fish Life GDI dump. Having early access to the game\/app gave me the opportunity to patch it so that it runs on basically any Dreamcast.<\/p>\n\n\n\n<p>First of all, the hardware. Fish Life was made to run on a specific revision of the Dreamcast, HKS-0300, that comes in a DVD reader enclosure along with a SEGA branded touch screen, HKS-0100. A touch screen you said? It seems like indeed that it is possible on the Dreamcast and I will detail this point later.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"580\" height=\"435\" src=\"https:\/\/i0.wp.com\/blog.japanese-cake.io\/wp-content\/uploads\/2020\/04\/fish_life_unit.jpg?resize=580%2C435&#038;ssl=1\" alt=\"\" class=\"wp-image-615\" srcset=\"https:\/\/i0.wp.com\/blog.japanese-cake.io\/wp-content\/uploads\/2020\/04\/fish_life_unit.jpg?w=640&amp;ssl=1 640w, https:\/\/i0.wp.com\/blog.japanese-cake.io\/wp-content\/uploads\/2020\/04\/fish_life_unit.jpg?resize=300%2C225&amp;ssl=1 300w\" sizes=\"auto, (max-width: 580px) 100vw, 580px\" \/><figcaption>Fish Life unit with its touch screen (<a href=\"https:\/\/segafish.museebolo.ch\/en\/heritage\/\" target=\"_blank\" rel=\"noreferrer noopener\">source<\/a>)<\/figcaption><\/figure><\/div>\n\n\n\n<p>From the few pictures available, you can easily tell that SEGA kept the retail Dreamcast hardware almost untouched, just change the way the GDROM tray opens, squeezed a controller board inside and mapped its controls to external buttons at the back of the case. A closer look gives you some hints on the touch screen functionality: there are a couple of wires from the motherboard that are connected to a serial port.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"580\" height=\"435\" src=\"https:\/\/i0.wp.com\/blog.japanese-cake.io\/wp-content\/uploads\/2020\/04\/fish-life-inside.png?resize=580%2C435&#038;ssl=1\" alt=\"\" class=\"wp-image-618\" srcset=\"https:\/\/i0.wp.com\/blog.japanese-cake.io\/wp-content\/uploads\/2020\/04\/fish-life-inside.png?w=800&amp;ssl=1 800w, https:\/\/i0.wp.com\/blog.japanese-cake.io\/wp-content\/uploads\/2020\/04\/fish-life-inside.png?resize=300%2C225&amp;ssl=1 300w, https:\/\/i0.wp.com\/blog.japanese-cake.io\/wp-content\/uploads\/2020\/04\/fish-life-inside.png?resize=768%2C576&amp;ssl=1 768w\" sizes=\"auto, (max-width: 580px) 100vw, 580px\" \/><figcaption>Inside the Fish Life unit (<a rel=\"noreferrer noopener\" href=\"https:\/\/segafish.museebolo.ch\/materiel\/\" target=\"_blank\">source<\/a>)<br>Please check out the source, Mus\u00e9e Bolo took many pictures!<\/figcaption><\/figure><\/div>\n\n\n\n<p>The Hitachi SH4 processor offers a serial interface you have probably used to link your system to another Dreamcast, a Neogeo Pocket or to a serial SD card adapter. Well there is more. The processor actually has two serial interfaces and the Fish Life unit uses the second one, not used on retail Dreamcasts, to receive touch packets from the screen. The packet format has already been <a rel=\"noreferrer noopener\" href=\"https:\/\/github.com\/mamedev\/mame\/commit\/dfb4f700fc95d2464cd85402c4845094a8ac426b\" target=\"_blank\">reversed engineered<\/a> (thanks to <a rel=\"noreferrer noopener\" href=\"https:\/\/github.com\/p1pkin\" target=\"_blank\">MetalliC<\/a>) and even though I haven\u2019t tested it myself, I wouldn\u2019t be surprised if any serial touch screen would work out of the box.<\/p>\n\n\n\n<p>The other main hardware specificity is not noticeable on the picture. When Laurent C. sent me the GDI files, he also provided the bios and the flash memory dumps. The bios is just the regular bootROM v1.01d. The flash memory however is different. First it is not 128Kb long but 256Kb, divided into two identical 128Kb halves (so one is just mirrored). Was the 128Kb chip getting old? Was the 256Kb flash chip cheaper? That is what I think but so far I have no information to back this up.<\/p>\n\n\n\n<p>Anyway, it is now time to talk about the software. As I said earlier, the game supports the touch screen. It means that with the touch screen connected, if you put your finger on the screen the fish will, depending on their mood, follow it. All the routines to receive the \u00ab touch packets \u00bb from the screen are in the program file. So with a little bit of work (if not already done) it would be possible to recreate the touch mechanism and port it to KOS for future use in homebrew. Isn\u2019t that cool!? Additionally to that, the game supports the mic so that you can interact with the fish. It seems that the voice recognition has a japanese and also an english word dictionary so that you don\u2019t have to bother learning japanese to tell the fish to eat. And by the way \u00ab to eat \u00bb is \u00ab taberu \u00bb in japanese and if you have the feeling the fish are a little bit deaf when you say it in japanese it\u2019s probably due to your accent&#8230; Sorry to say so but they are a bit picky \ud83d\ude09<\/p>\n\n\n\n<p class=\"has-text-align-center\">\u00ab Great, but can I play the game now? \u00bb<\/p>\n\n\n\n<p>When I first put my hands on it, I tried to load it up on my GDEMU. The game refused to boot (hanged on the license screen). I disassembled the binary and found out that the game, early in its execution, reads the flash memory, which it is not very common, at least for licensed games. The code revealed that the game actually checks that the machine name\/code stored in the flash is correct. And correct on retail Dreamcast would be the string \u00ab Dreamcast \u00bb located at two different places in the read-only partition #0 of the flash memory. But here, we have a special hardware thus a special machine name: \u00ab Fish Life \u00bb.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><a href=\"https:\/\/i0.wp.com\/blog.japanese-cake.io\/wp-content\/uploads\/2020\/04\/fishlife-amazon-flashmem-retail-product-name.png?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"580\" height=\"85\" src=\"https:\/\/i0.wp.com\/blog.japanese-cake.io\/wp-content\/uploads\/2020\/04\/fishlife-amazon-flashmem-retail-product-name.png?resize=580%2C85&#038;ssl=1\" alt=\"\" class=\"wp-image-612\" srcset=\"https:\/\/i0.wp.com\/blog.japanese-cake.io\/wp-content\/uploads\/2020\/04\/fishlife-amazon-flashmem-retail-product-name.png?w=816&amp;ssl=1 816w, https:\/\/i0.wp.com\/blog.japanese-cake.io\/wp-content\/uploads\/2020\/04\/fishlife-amazon-flashmem-retail-product-name.png?resize=300%2C44&amp;ssl=1 300w, https:\/\/i0.wp.com\/blog.japanese-cake.io\/wp-content\/uploads\/2020\/04\/fishlife-amazon-flashmem-retail-product-name.png?resize=768%2C112&amp;ssl=1 768w\" sizes=\"auto, (max-width: 580px) 100vw, 580px\" \/><\/a><figcaption>Flash partition #0 from a retail Dreamcast<\/figcaption><\/figure><\/div>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><a href=\"https:\/\/i0.wp.com\/blog.japanese-cake.io\/wp-content\/uploads\/2020\/04\/fishlife-amazon-flashmem-product-name.png?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"580\" height=\"84\" src=\"https:\/\/i0.wp.com\/blog.japanese-cake.io\/wp-content\/uploads\/2020\/04\/fishlife-amazon-flashmem-product-name.png?resize=580%2C84&#038;ssl=1\" alt=\"\" class=\"wp-image-613\" srcset=\"https:\/\/i0.wp.com\/blog.japanese-cake.io\/wp-content\/uploads\/2020\/04\/fishlife-amazon-flashmem-product-name.png?w=818&amp;ssl=1 818w, https:\/\/i0.wp.com\/blog.japanese-cake.io\/wp-content\/uploads\/2020\/04\/fishlife-amazon-flashmem-product-name.png?resize=300%2C43&amp;ssl=1 300w, https:\/\/i0.wp.com\/blog.japanese-cake.io\/wp-content\/uploads\/2020\/04\/fishlife-amazon-flashmem-product-name.png?resize=768%2C111&amp;ssl=1 768w\" sizes=\"auto, (max-width: 580px) 100vw, 580px\" \/><\/a><figcaption>Flash partition #0 from a Fish Life unit<\/figcaption><\/figure><\/div>\n\n\n\n<p>A quick patch that bypass this check was enough to make the GDI image to boot on any Dreamcast.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><a href=\"https:\/\/i0.wp.com\/blog.japanese-cake.io\/wp-content\/uploads\/2020\/04\/fishlife-amazon-machine-code-check-ida-1.png?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"580\" height=\"334\" src=\"https:\/\/i0.wp.com\/blog.japanese-cake.io\/wp-content\/uploads\/2020\/04\/fishlife-amazon-machine-code-check-ida-1.png?resize=580%2C334&#038;ssl=1\" alt=\"\" class=\"wp-image-624\" srcset=\"https:\/\/i0.wp.com\/blog.japanese-cake.io\/wp-content\/uploads\/2020\/04\/fishlife-amazon-machine-code-check-ida-1.png?w=808&amp;ssl=1 808w, https:\/\/i0.wp.com\/blog.japanese-cake.io\/wp-content\/uploads\/2020\/04\/fishlife-amazon-machine-code-check-ida-1.png?resize=300%2C173&amp;ssl=1 300w, https:\/\/i0.wp.com\/blog.japanese-cake.io\/wp-content\/uploads\/2020\/04\/fishlife-amazon-machine-code-check-ida-1.png?resize=768%2C442&amp;ssl=1 768w\" sizes=\"auto, (max-width: 580px) 100vw, 580px\" \/><\/a><figcaption>The function that checks the machine code. If &#8220;0x30FF&#8221; at 0x8c000070 if not found, it sets &#8220;usrMainMenuAction&#8221; to &#8220;0x09&#8221; which later on makes the code loop forever. <\/figcaption><\/figure><\/div>\n\n\n\n<p>By the way, the patch and the patched GDI image are available at the end of this article.<\/p>\n\n\n\n<p class=\"has-text-align-center\">\u00ab Why can\u2019t I create a Fish Life CDI image? \u00bb<\/p>\n\n\n\n<p>Having a working GDI image is nice but not enough to have working CDI image. It\u2019s where comes the last feature I wanted to talk about. In the Katana SDK, there is the IPMaker tool that was used to create the boot program, injected in the ISO9660 boot sectors. With this tool developers could set meta informations (game name, region, VGA flag, etc.) and also activate some feature such as the <em>playlog<\/em>. As its name suggests, it activates a log that contains the current time, the game actually booting and other information. The log is then stored in a the flash memory. I think SEGA didn\u2019t have enough time to deploy this feature, very similar to what you can find in newer system. Anyway, when the game code boots it ensures that the playlog contains an entry for Fish Life (based on the product number found in the boot sector). Why? If you look at the Fish Life unit, there is no VMU port accessible and the game has a settings menu. Guess what? It stores the settings in the log, in the last entry found. I haven&#8217;t had the chance yet to investigate why the boot sector has to create the entry but I think it works like a session where booting the game creates it so that the game code can store the settings later on. And usually when you create a CDI image, you re-use a working boot sector or create one from non official tools that do not having the playlog library embedded: the game starts, cannot find the game playlog and finally displays an error screen. Several workarounds exist but I won\u2019t mention them here as this article is already longer then expected \ud83d\ude09<\/p>\n\n\n\n<p><span style=\"text-decoration: underline;\">Download:<\/span><\/p>\n\n\n\n<p>Patch: <a rel=\"noreferrer noopener\" href=\"http:\/\/www.mediafire.com\/file\/w8vjmkl0zt4dlpq\/jc-fishlife-flashchk-patch-v1.0.zip\/file\" target=\"_blank\">jc-fishlife-flashchk-patch-v1.0.zip<\/a><\/p>\n\n\n\n<p>Patched GDI Image: <a rel=\"noreferrer noopener\" href=\"https:\/\/mega.nz\/file\/NooWSaBB#U0CeSRgviAzLVfHsYsdCDNSfHVWmsb2d0LcqDfdQ4wc\" target=\"_blank\">Fish Life Amazon (2000)(SEGA)(JP)[h flashmem-check japanese_cake].zip<\/a><\/p>\n\n\n\n<p><span style=\"text-decoration: underline;\">Additional links:<\/span><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><a rel=\"noreferrer noopener\" href=\"https:\/\/segafish.museebolo.ch\/en\/\" target=\"_blank\">Mus\u00e9e Bolo Fish Life dedicated page<\/a><\/li><li><a rel=\"noreferrer noopener\" href=\"https:\/\/github.com\/mamedev\/mame\/blob\/master\/src\/mame\/drivers\/dccons.cpp\" target=\"_blank\">src\/mame\/drivers\/dccons.cpp<\/a> from Mame project<\/li><\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Have you heard of Fish Life? Honestly if you end up reading this article, you have probably already read all the other websites related to the Dreamcast, from the most well known to those dead for decades, desperately seeking for any kind of content as long it doesn\u2019t appear in your browser history&#8230;. Seems like&hellip;<a href=\"https:\/\/blog.japanese-cake.io\/index.php\/2020\/05\/11\/catching-up-part-2-fish-n-chips\/\" class=\"more-link\"><span>Continue reading<\/span><span class=\"screen-reader-text\">Catching up part 2: Fish &#8216;n&#8217; FlashChip<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":358,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[1,52],"tags":[],"class_list":["post-359","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-all-posts","category-game-hacks"],"jetpack_featured_media_url":"https:\/\/i0.wp.com\/blog.japanese-cake.io\/wp-content\/uploads\/2020\/04\/fishlife-amazon-cover.png?fit=1400%2C768&ssl=1","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/blog.japanese-cake.io\/index.php\/wp-json\/wp\/v2\/posts\/359","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.japanese-cake.io\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.japanese-cake.io\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.japanese-cake.io\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.japanese-cake.io\/index.php\/wp-json\/wp\/v2\/comments?post=359"}],"version-history":[{"count":65,"href":"https:\/\/blog.japanese-cake.io\/index.php\/wp-json\/wp\/v2\/posts\/359\/revisions"}],"predecessor-version":[{"id":732,"href":"https:\/\/blog.japanese-cake.io\/index.php\/wp-json\/wp\/v2\/posts\/359\/revisions\/732"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.japanese-cake.io\/index.php\/wp-json\/wp\/v2\/media\/358"}],"wp:attachment":[{"href":"https:\/\/blog.japanese-cake.io\/index.php\/wp-json\/wp\/v2\/media?parent=359"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.japanese-cake.io\/index.php\/wp-json\/wp\/v2\/categories?post=359"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.japanese-cake.io\/index.php\/wp-json\/wp\/v2\/tags?post=359"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}