<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:media="http://search.yahoo.com/mrss/"><channel><title><![CDATA[R&D]]></title><description><![CDATA[Research and Development at Vink-io]]></description><link>https://a-blog.vink-io.com/</link><image><url>https://a-blog.vink-io.com/favicon.png</url><title>R&amp;D</title><link>https://a-blog.vink-io.com/</link></image><generator>Ghost 5.47</generator><lastBuildDate>Sat, 11 Apr 2026 19:36:22 GMT</lastBuildDate><atom:link href="https://a-blog.vink-io.com/rss/" rel="self" type="application/rss+xml"/><ttl>60</ttl><item><title><![CDATA[[tech] Portfolio of Bitdinar mobile applications]]></title><description><![CDATA[This is a long due list of mobile proof of concepts we built through the years. ]]></description><link>https://a-blog.vink-io.com/tech-ever-growing-portfolio-of-mobile-applications/</link><guid isPermaLink="false">64643d41db9c200518457d45</guid><category><![CDATA[bitcoin]]></category><category><![CDATA[bitdinar]]></category><category><![CDATA[Business]]></category><category><![CDATA[germany]]></category><category><![CDATA[Information Technology]]></category><category><![CDATA[risk management]]></category><category><![CDATA[strategy]]></category><category><![CDATA[tunisia]]></category><category><![CDATA[IT]]></category><dc:creator><![CDATA[OS]]></dc:creator><pubDate>Tue, 29 Mar 2022 10:47:11 GMT</pubDate><media:content url="https://a-blog.vink-io.com/content/images/2022/03/Screenshot-2022-03-29-at-12-30-45-Portfolio.png" medium="image"/><content:encoded><![CDATA[<img src="https://a-blog.vink-io.com/content/images/2022/03/Screenshot-2022-03-29-at-12-30-45-Portfolio.png" alt="[tech] Portfolio of Bitdinar mobile applications"><p>Une fois n&apos;est pas coutume, this is an up-to-date list of the mobile applications we have built over the years, to test different versions of the Bitdinar mobile wallet. </p><p>Please forgive us for the lack of inspiration for some of the designs you will see below. </p><p>And of course, none of this could be achieved without our very Belji. &#xA0; </p><h2 id="summary">Summary</h2><p>By the end of this post you will be familiar with the different iterations of the Bitdinar wallet, as well as the underlying technology or frameworks, on top of which they were built. </p><p>For the sake of clarity, we will proceed anti-chronologically.</p><h2 id="taler-implementation-2021">Taler implementation - 2021</h2><h3 id="technical-specs-">Technical specs:</h3><pre><code># Taler Wallet
- Wallet transacting in Kudos
- Protocol: GNU Taler
- Details: Transactions are settled on a central server hosted by the GNU Taler team.
- Currency code: Kudos
- Status: Minimum viable Product</code></pre><p>For our latest application version, we have been refactoring the GNU Taler framework, and Belji installed the client software on mobile targets. </p><h3 id="videos">Videos</h3><p>The demonstration consists of a full transaction video, and a Point of Sales view video. </p><h3 id="full-transaction-video">Full Transaction Video</h3><figure class="kg-card kg-embed-card"><iframe width="356" height="200" src="https://www.youtube.com/embed/tbGDXy0RlfY?feature=oembed" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe></figure><p>As demonstrated, it is possible to obtain good transactional results with the available stack developed by our friends at GNU Taler. </p><p>Alright, alright. We are aware of the quality of the video, but please keep in-mind that the good devices were used for the software itself, and none of us is a professional movie maker.</p><h3 id="payment-system-point-of-sale-view">Payment System - Point of Sale View</h3><figure class="kg-card kg-embed-card"><iframe width="356" height="200" src="https://www.youtube.com/embed/u99xKqSBjFM?feature=oembed" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe></figure><p>In this last video from 2021, we can see the Point of Sales view, where the the cashier might place the orders, or the customer does it directly from an self service point of sales. </p><h2 id="bitdinar-implementation-part-2-2017">Bitdinar Implementation part 2 - 2017</h2><h3 id="technical-specs">Technical specs</h3><pre><code># Bitdinar Wallet
- Wallet transacting in Bitdinar
- Protocol: Bitdinar&apos;s proof of work blockchain
- Details: Transactions are settled on a blockchain record hosted by Vink-io team and the Vulpem team.
- Currency code: BTD
- Status: Proof of Concept</code></pre><p>During the spring and summer of 2017, we focused with the Vulpem team on a seamless mobile wallet, that embodies the principles of Financial Inclusion in its User Interface. </p><p>The motives behind a minimalist approach was to facilitate the usage of digital currency to customers who might not be familiar with smartphones. Not everyone is a Bitcoin Ninja. </p><h3 id="videos-1">Videos</h3><p>Iteration of the Bitdinar wallet application, running on iPhone 7 and done in June 2017:</p><h3 id="bitdinar-mobile-wallet">Bitdinar mobile wallet </h3><figure class="kg-card kg-embed-card"><iframe width="267" height="200" src="https://www.youtube.com/embed/2IiVST0YGIo?feature=oembed" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe></figure><p>Before this final draft, we have had an earlier Iteration of the Bitdinar(s) wallet application, running on Android, done by April 2017. </p><p>Notice that in-between versions, we improved the payment flow, by changing the directions in which the pay/receive button behaves, so it became swipe right to pay, and swipe left to receive. </p><p>On a more relaxed note, we were still studying the amount of Bitdinar(s) to include in the logo:</p><h3 id="bitdinars-mobile-wallet">Bitdinars mobile wallet </h3><figure class="kg-card kg-embed-card"><iframe width="356" height="200" src="https://www.youtube.com/embed/3lJnxV7S_SU?feature=oembed" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe></figure><h2 id="vinkoin-implementation-2017">Vinkoin Implementation - 2017</h2><h3 id="technical-specs-1">Technical specs</h3><pre><code># Vinkoin Wallet
- Wallet transacting in Vinkoins
- Protocol: Bitcoin colored coins
- Details: Transactions are settled on the Bitcoin blockchain
- Currency code: VNK
- Status: Proof of Concept</code></pre><p>This minimal mobile wallet implementation was very interesting, since it relies on the colored coins concept.</p><p>It was possible to allocate micro amounts of Bitcoin, and peg them to atomic coins, which were then transmitted on the actual Bitcoin network, when sent between nodes. This would not be viable now, for mutiple reasons, however this technique was a precursor to the actual Lightning Network. </p><h3 id="pictures">Pictures</h3><p>Unfortunately we do not have videos of the workflow of this mobile wallet, but we kept a picture with a lot of zeros trailing. </p><h3 id="vinkoin-wallet-specs">Vinkoin Wallet Specs</h3><figure class="kg-card kg-image-card"><img src="https://a-blog.vink-io.com/content/images/2022/03/Screenshot-2022-03-29-at-12-26-51-Vink_Pitch_Business-and-Use-cases.pptx.png" class="kg-image" alt="[tech] Portfolio of Bitdinar mobile applications" loading="lazy" width="1218" height="689" srcset="https://a-blog.vink-io.com/content/images/size/w600/2022/03/Screenshot-2022-03-29-at-12-26-51-Vink_Pitch_Business-and-Use-cases.pptx.png 600w, https://a-blog.vink-io.com/content/images/size/w1000/2022/03/Screenshot-2022-03-29-at-12-26-51-Vink_Pitch_Business-and-Use-cases.pptx.png 1000w, https://a-blog.vink-io.com/content/images/2022/03/Screenshot-2022-03-29-at-12-26-51-Vink_Pitch_Business-and-Use-cases.pptx.png 1218w" sizes="(min-width: 720px) 720px"></figure><p>This iteration was very fa from being optimal, as we needed toa access the wallet application only via browser, without mentioning the many bugs and failed attempts before getting the Vinkoins right. </p><p>However, the underlying principles were here more attractive than usability. </p><h2 id="bitdinar-implementation-part-1-2016">Bitdinar Implementation part 1 - 2016</h2><p>Finally we get to the original culprit, or the very first implementation of a concept called the Bitdinar.</p><h3 id="technical-specs-2">Technical specs</h3><pre><code># Bitdinar Wallet
- Wallet transacting in Bitdinar
- Protocol: Bitdinar&apos;s proof of work blockchain
- Details: Transactions are settled on a blockchain record hosted by Vink-io team.
- Currency code: BTND
- Status: Proof of Concept</code></pre><p>Technically this is not a mobile wallet application as it comes as binary to set up on a desktop machine, or server. However it is a wallet, that transacts, validates and interacts with mining Bitdinar. </p><p>For this very very first iteration of Bitdinar, we have forked a primitive peercoin stack which claimed to provide proof of stake consensus. In truth, it was a bitcoin fork, and we mined the first Bitdinar according to the proof of work.</p><h3 id="pictures-1">Pictures</h3><p>Here too, we just kept a very bad quality image of the first ever Bitdinar mined. </p><h3 id="first-bitdinar-mined">First Bitdinar Mined </h3><figure class="kg-card kg-image-card"><img src="https://a-blog.vink-io.com/content/images/2022/03/20161019_184628.jpg" class="kg-image" alt="[tech] Portfolio of Bitdinar mobile applications" loading="lazy" width="2000" height="1125" srcset="https://a-blog.vink-io.com/content/images/size/w600/2022/03/20161019_184628.jpg 600w, https://a-blog.vink-io.com/content/images/size/w1000/2022/03/20161019_184628.jpg 1000w, https://a-blog.vink-io.com/content/images/size/w1600/2022/03/20161019_184628.jpg 1600w, https://a-blog.vink-io.com/content/images/size/w2400/2022/03/20161019_184628.jpg 2400w" sizes="(min-width: 720px) 720px"></figure><p>This first version helped us understand the dynamics of a crypto-crrency software, and its build dependencies. </p><p>The network was composed of 2 machines, one in Berlin and the other one in Tunis. If both machines were off, the network would stall, and if one machine was connected, it was effectively representing 100% of the minimg pool available. </p><h2 id="conclusion">Conclusion</h2><p>That is the end of this small time travel. During this technical journey we have been able to build software, but most importantly we built, and have been blessed by, a community around the concept of Bitdinar. </p><p></p>]]></content:encoded></item><item><title><![CDATA[[tech] Nitrokey: Analyzing security hardware business for profit and fun]]></title><description><![CDATA[Nitrokey is a German hardware provider specialized in open source security, and an established boutique in the European security community.]]></description><link>https://a-blog.vink-io.com/hardware-nitrokey-walk-around/</link><guid isPermaLink="false">64643d41db9c200518457d3e</guid><dc:creator><![CDATA[OS]]></dc:creator><pubDate>Sat, 19 Dec 2020 20:13:11 GMT</pubDate><media:content url="https://a-blog.vink-io.com/content/images/2020/12/nk-logo.jpg" medium="image"/><content:encoded/></item><item><title><![CDATA[[tech] [part 1] Pantera OS : A Financial Operating System]]></title><description><![CDATA[The following blog post will layout the motives behind Pantera OS, a custom financial engine container, currently under heavy development. 


]]></description><link>https://a-blog.vink-io.com/tech-pantera-os-a-technical-proposal/</link><guid isPermaLink="false">64643d41db9c200518457d41</guid><category><![CDATA[unikernel]]></category><category><![CDATA[btndpayments]]></category><category><![CDATA[btndlabs.io]]></category><category><![CDATA[bitdinar]]></category><category><![CDATA[Information Technology]]></category><dc:creator><![CDATA[OS]]></dc:creator><pubDate>Mon, 30 Nov 2020 18:58:50 GMT</pubDate><media:content url="https://a-blog.vink-io.com/content/images/2022/03/Engram-Synthetic-Memory_02-1-900x506.jpg" medium="image"/><content:encoded><![CDATA[<img src="https://a-blog.vink-io.com/content/images/2022/03/Engram-Synthetic-Memory_02-1-900x506.jpg" alt="[tech] [part 1] Pantera OS : A Financial Operating System"><p>This post is an early investigation into the topic of unikernels. </p><p>By the end of this entry, you will be able to understand unikernels and the logic behind architecture, before studying the use-case of an application such as <em>Bitdinar</em>, and finally test a small <em>MirageOS</em> webserver implementation.</p><p>For a detailed technical description of <em>Pantera OS</em> in its latest stage, it is possible to jump to part 2, where we discuss the Rust implementation. &#xA0;</p><h2 id="pantera-os">Pantera OS</h2><p>Our software product is the <em>Pantera Operating System</em>, or <em>Pantera OS</em> for short, an exceptionally secure software intended for critical financial operations.</p><p><em>Pantera OS</em> is named after an exceptional animal, the Pantera, to outline its stealth abilities and speed of execution. </p><p>To mimic the predator in code, our software proposal is a custom and minimal container, for which internal computation can be tightly restricted, and its exposure to the internet highly limited if not completely disconnected, without affecting its performance. </p><h2 id="critical-security-by-design">Critical Security by Design</h2><p>In this section, we will discuss if a unikernel Operating System satisfies the conditions of security and performance aforementioned, and if it is possible for a unikernel to operate as reliable banking software. </p><h3 id="requirements">Requirements</h3><p>Critical infrastructure, as in the banking sector, implies the need for a minimalist architecture, and a better compartmentalization of its critical components. Equally so, a physical bank would be harder to manage if it had non-existent, or extremely complex, security infrastructure. &#xA0;</p><p>To support these propositions, the minimal approach has been adopted by several stacks and Operating Systems such as <em>Qubes OS</em>, to emtnion a single example, so we do not have the burden of reinventing the wheel. </p><p>Nevertheless, we have been motivated by such innovations, seeing a substantial benefit for our audience and customers. </p><p>We will discuss in the following post such stack, or in other terms the implementation of a<em> Mirage OS </em>virtual machine, to demonstrate the traits that embody at best our development philosophy, and apply it to the container logical component. </p><p>For the more technically involved audience, it is possible to read about Mirage OS project <a href="https://mirage.io/?ref=a-blog.vink-io.com">here</a>.</p><h3 id="architecture-overview">Architecture Overview</h3><p>The overview below provides an idea of how unikernels would fit within the landscape of containers in the wild. </p><figure class="kg-card kg-image-card"><img src="https://a-blog.vink-io.com/content/images/2022/03/vms-containers-unikernels-1-1.PNG" class="kg-image" alt="[tech] [part 1] Pantera OS : A Financial Operating System" loading="lazy" width="774" height="329" srcset="https://a-blog.vink-io.com/content/images/size/w600/2022/03/vms-containers-unikernels-1-1.PNG 600w, https://a-blog.vink-io.com/content/images/2022/03/vms-containers-unikernels-1-1.PNG 774w" sizes="(min-width: 720px) 720px"></figure><p>The purpose of this architecture is to expose a reduced attack vector for external attackers, and limit the scope of actions of internal hostile actors, while increasing the intrusion monitoring capacity. </p><p>The possibility of using shared memory resources is drastically limited at low level. As we see in the overview, and for a similar application size, unikernels combine the benefits of containerization, with the flexiblity of hypervisor orchestration. Kernel resources (Memory) are not shared, and interactions with the hardware go through the unified hypervisor API, regardless of the kernel in-use.</p><p>Such systems can be configured to not include any accessible user interface, e.g. operate headless. However, such modular systems can be adapted to desktop environments. For instance, at User Interface level, like in <em>Qubes OS</em>, the clipboard (copy / paste) workflow is set at a sane but secure mode, where taking files from one container to another requires an additional step. &#xA0;</p><p>More closely into the internals, we can expect an enhanced security as the result of refactoring the necessary software libraries, in a more compact fashion, and in a relatively safer language. </p><h3 id="comparison">Comparison</h3><p>For instance, we can proceed to a trivial but visually significant comparison. Let&apos;s count the lines of code of the regular <em>Linux</em> Kernel usually written in C and C++, against the <em>Mirage OS</em> kernel written in Ocaml. </p><p>For the the Kernel and the Cryptography primitives, we can see below the difference between the regular <em>Linux</em> kernel size, against the size of the <em>Mirage OS</em> implementations: &#xA0;</p><p>(the following numbers are in thousands of lines of code - k LOC)</p><!--kg-card-begin: html--><table><tbody><tr><th></th><th>Linux</th><th>MirageOS</th></tr>
<tr><td>Kernel</td><td>1600</td><td>48</td></tr>
<tr><td>Crypto</td><td>230</td><td>23</td></tr></tbody></table><!--kg-card-end: html--><p>And if we combine all required components to build a full kernel, we get the following total:</p><!--kg-card-begin: html--><table><tbody><tr><th></th><th>Linux</th><th>MirageOS</th></tr>
<tr><td>Total</td><td>2560</td><td>102</td></tr></tbody></table><!--kg-card-end: html--><p>When we combine this programming paradigm, with the safety features of the <em>OCaml</em> language, we can obtain the type safety, gain in performance and reduction in attack surface. </p><h3 id="unikernels">Unikernels</h3><p>A &quot;Unikernel&quot; Operating System operates as a functioning software container, computing a compact kernel, which runs directly on a <a href="https://en.wikipedia.org/wiki/Hypervisor?ref=a-blog.vink-io.com">hypervisor</a> or <a href="https://en.wikipedia.org/wiki/Computer_hardware?ref=a-blog.vink-io.com">hardware</a> without an intervening OS such as Linux or Windows.</p><p>I came up with this less-than-scientific definition for the sake of clarity, but the <a href="https://en.wikipedia.org/wiki/Unikernel?ref=a-blog.vink-io.com">wikipedia entry</a> covers well the topic. </p><p>Nevertheless, our commercial objective is to provide our customers with the most relevant custom software stack, that lives on custom hardware, to satisfy strict requirements.</p><h2 id="real-world-applications">Real World Applications</h2><p><em>Pantera OS </em>is intended as a banking Operating System that runs a custom financial logic, while containing its dependencies and its content in a specific layout. &#xA0;</p><p>It can operate as an algorithmic trading engine for a trading firm, or operate as a digital vault (Hardware Security Module) for a bank that requires a Public Key Infrastructure for example.</p><p>Our go-to example application will be running the necessary stack, to properly operate the Bitdinar software. </p><h3 id="la-poste-tunisienne">La Poste Tunisienne</h3><p><em>Pantera OS</em> can be deployed as the core back-end of a digital bank. </p><p>We are refactoring the kernel itself, to interpret the specific business processes of the bank, into algorithmic processes. Specifically, we are refactoring the network stack, to establish secure connections to-and-from the contained kernel.</p><h2 id="under-the-hood">Under the Hood</h2><p>To capture a large scope of business requirements, we will assume that our system will need the following objects to function properly:</p><ul><li>Business logic: Custom and off-the-shelf software libraries.</li><li>Cryptographic artifacts, functions and primitives, when intended for key storage.</li><li>Networking logic, when intended to serve files on network.</li><li>Configuration files. </li></ul><p>In this context, our system follows a software containment paradigm, as a minimal library unikernel system, by removing all unnecessary components in a modular fashion. </p><h3 id="kernel-application">Kernel Application</h3><p>We will not cover the details of the kernel in this post, as it is still work-in-progress. </p><p>However to provide some context, for the following technical demonstration we can assume that access to the container is constrained, and specific kernel components are re-factored for specific needs, upstream at host hypervisor level, and downstream for internal components such as the networking stack. </p><p>For this demonstration, we test an implementation of a <em><a href="https://mirage.io/?ref=a-blog.vink-io.com">Mirage OS</a> </em>based webserver, which is a installed and mounted the same way any other kernel application would be. </p><p><em>MirageOS</em> is a library operating system that constructs unikernels for secure, high-performance network applications across a variety of cloud computing and mobile platforms. <em>Mirage OS</em> is a serious contender to become the target stack for <em>Pantera OS</em></p><h3 id="installation">Installation</h3><p>To download Mirage OS on Debian:</p><pre><code>$ sudo apt update
$ sudo apt install opam
$ opam init
$ opam install mirage</code></pre><p>By porting our kernel to <em>Mirage OS</em>, we will guarantee that our software is running under restrictive conditions. </p><p>For this example, we will use a ported webserver, that runs on a Xen Hypervisor. </p><h3 id="performance">Performance </h3><p>Let us see what gains are expecting in terms of boot process speed. </p><p>Here is a comparison between a Mirage Firewall AppVM <em>vs</em> a Minimal-Fedora Firewall AppVM, performed on a Lenovo C1X1 machine running a Xen hypervisor:</p><ul><li>Debian based firewall or sys-firewall</li></ul><pre><code class="language-bash">[user@dom0 ~]$ \time -f &quot;Program: %C\nTotal time: %E\nUser Mode (s) %U\nKernel Mode (s) %S\nCPU: %P&quot; qvm-start sys-firewall

</code></pre><p>Output:</p><pre><code class="language-bash">Total time: 0:09.21User 
Mode (s) 0.04
Kernel Mode (s) 0.01
CPU: 0%</code></pre><p>Mirage OS based Firewall or mirage-firewall</p><pre><code>[user@dom0 ~]$ \time -f &quot;Program: %C\nTotal time: %E\nUser Mode (s) %U\nKernel Mode (s) %S\nCPU: %P&quot; qvm-start mirage-firewall

</code></pre><p>Output:</p><pre><code>Total time: 0:01.71
User Mode (s) 0.05
Kernel Mode (s) 0.00
CPU: 3%</code></pre><p>Here we notice a substantial gain in speed in the boot process, from 0:09.21 seconds for the <em>Debian</em> VM, to 0:01.71 seconds for the <em>Mirage OS</em> VM. </p><p>In terms of CPU usage, the CPU consumption of the <em>Mirage OS</em> test machine peaks at of 3%, and null % for the other machine. &#xA0; </p><h2 id="conclusion">Conclusion</h2><p>Thank you for making so far in the post, hoping it was informative without getting into too much details. </p><p>The <em>Mirage OS</em> stack is a serious stack to consider for critical infrastructure. It provides a ground to optimal programming, and provides an infinity of possibilities to satify stricter requirements. &#xA0;</p><p>Stay tuned, for the second part of this post, where we will take another turn and implement a similar approach to compact kernels. </p><p>Note: For the fans of generative art, the first picture is the flyer for a <a href="https://refikanadol.com/works/melting-memories/?ref=a-blog.vink-io.com">Refik Anadol exhibition</a> back in 2018. I chose it because it depicts well the contemplation process. &#xA0;</p>]]></content:encoded></item><item><title><![CDATA[[strategy] Tunisia: Business Landscape and Technical Infrastructure]]></title><description><![CDATA[To import the technical culture that is necessary to provide excellent products, we extend here the market research for the Tunisian market. ]]></description><link>https://a-blog.vink-io.com/strategy-technical-infrastructure-in-tunisia/</link><guid isPermaLink="false">64643d41db9c200518457d40</guid><category><![CDATA[tunisia]]></category><category><![CDATA[btndpayments]]></category><category><![CDATA[bitdinar]]></category><category><![CDATA[btndlabs.io]]></category><category><![CDATA[opsec]]></category><category><![CDATA[Information Technology]]></category><category><![CDATA[Business]]></category><dc:creator><![CDATA[OS]]></dc:creator><pubDate>Sat, 28 Nov 2020 17:00:00 GMT</pubDate><media:content url="https://a-blog.vink-io.com/content/images/2020/11/Tunisia-honors-first-female-doctor-on-new-bank-note-1.jpg" medium="image"/><content:encoded/></item><item><title><![CDATA[[tech] Marg0t: a Computer who says "Asslema!"]]></title><description><![CDATA[A custom computer who says "Hello, World!" in Tunisian]]></description><link>https://a-blog.vink-io.com/marg0t-says-asslema/</link><guid isPermaLink="false">64643d41db9c200518457d3d</guid><dc:creator><![CDATA[OS]]></dc:creator><pubDate>Tue, 11 Aug 2020 07:21:34 GMT</pubDate><media:content url="https://a-blog.vink-io.com/content/images/2020/08/Project-Marg0t-2-.png" medium="image"/><content:encoded><![CDATA[<img src="https://a-blog.vink-io.com/content/images/2020/08/Project-Marg0t-2-.png" alt="[tech] Marg0t: a Computer who says &quot;Asslema!&quot;"><p></p><p>Today we are going to talk about our first hardware research project, and I am very glad to introduce to the world Marg0t, a 6502 computer that says &quot;Asslema!&quot;*</p><h2 id="a-6502-computer-for-fun-and-profit">A 6502 Computer for Fun and Profit</h2><p>Marg0t is a <a href="https://en.wikipedia.org/wiki/KISS_principle?ref=a-blog.vink-io.com">h</a>and-made computer built from scratch, and which does very basic operations, i.e. display a hard-coded text on a small screen.</p><figure class="kg-card kg-image-card kg-width-wide"><img src="https://a-blog.vink-io.com/content/images/2020/08/marg0t_asslema-2.jpg" class="kg-image" alt="[tech] Marg0t: a Computer who says &quot;Asslema!&quot;" loading="lazy" width="2000" height="1500" srcset="https://a-blog.vink-io.com/content/images/size/w600/2020/08/marg0t_asslema-2.jpg 600w, https://a-blog.vink-io.com/content/images/size/w1000/2020/08/marg0t_asslema-2.jpg 1000w, https://a-blog.vink-io.com/content/images/size/w1600/2020/08/marg0t_asslema-2.jpg 1600w, https://a-blog.vink-io.com/content/images/2020/08/marg0t_asslema-2.jpg 2000w" sizes="(min-width: 1200px) 1200px"></figure><p>The main purpose of the project is not to build a high performance machine, nor to provide a sophisticated approach to hardware and software programming. </p><p>The machine built and programmed serves the purpose of building the most abstract architecture of a computer, in order to understand the fundamentals in a slow but precise manner.</p><h2 id="knowledge-base">Knowledge Base</h2><p>To sum up the knowledge base acquired, we will decompose the several sections of the project into hardware and software sections, before laying down the possible applications. </p><p>In general terms, building the computer covers a significant array of fields, from setting up the environment, to the choice of the right hardware, besides the programming and mathematical concepts that are covered. </p><h2 id="hardware-components">Hardware Components</h2><p>In the following section, we will cover the main components of the systems which form the core &quot;organs&quot; of the machines, if we wanted to use a medical analogy.</p><h3 id="1-central-processing-unit-cpu-">1. Central Processing Unit (CPU): </h3><p>The central Processing Unit is the equivalent of the brains of the computer. As its name indicates, it is the unit that is tasked to interpret the different instructions, i.e. digital signals, and process them according to the programmer&apos;s code.</p><p>For Marg0t, the CPU is composed of two hardware components:</p><ol><li>The <a href="https://eater.net/datasheets/w65c02s.pdf?ref=a-blog.vink-io.com">W65C02S 8&#x2013;bit Microprocessor</a>: The current version (from Western Design Center inc.) has a fully static core and officially runs at speeds up to 14 MHz when powered at 5 volts. The <a href="https://en.wikipedia.org/wiki/WDC_65C02?ref=a-blog.vink-io.com">Wikipedia page</a> covering the chip provides further information about the chip, its history and features. </li><li>The <a href="https://eater.net/datasheets/w65c22.pdf?ref=a-blog.vink-io.com">W65C22 Versatile Interface Adapter (VIA)</a>: As its name indicates, it&apos;s a versatile chip, that works well when coupled with the 65C02 microprocessor. In our case, we used it for latching the data from the processor, to the appropriate I/O ports. </li></ol><h3 id="2-read-only-memory-rom-">2. Read Only Memory (ROM): </h3><p>The Read Only Memory, is the place where we can store our program, or instructions, so the processor can fetch and execute them.</p><p>For our project, we used the <a href="https://eater.net/datasheets/28c256.pdf?ref=a-blog.vink-io.com">28C256 256K Parallel EEPROM</a> manufactured by Atmel. </p><p><a href="https://en.wikipedia.org/wiki/EEPROM?ref=a-blog.vink-io.com">EEPROM</a> (also E<sup>2</sup>PROM) stands for electrically erasable programmable read-only memory, and is a type of <a href="https://en.wikipedia.org/wiki/Non-volatile_memory?ref=a-blog.vink-io.com">non-volatile memory</a> used in computers, integrated in <a href="https://en.wikipedia.org/wiki/Microcontrollers?ref=a-blog.vink-io.com">micro-controllers</a> for <a href="https://en.wikipedia.org/wiki/Smart_card?ref=a-blog.vink-io.com">smart cards</a> and <a href="https://en.wikipedia.org/wiki/Remote_keyless_system?ref=a-blog.vink-io.com">remote keyless systems</a>, and other electronic devices to store relatively small amounts of data, while allowing individual bytes to be erased and reprogrammed.</p><p>This specific chip was a lot of fun to play with, since it is the component that is actually programmable, i.e. where the program lives. </p><p>I actually had to purchase an additional pair of the chip, as its handling requires removing it, and re-placing it on the bread board, which can easily break the pins. </p><h3 id="optimization-">Optimization: </h3><p>With the three previous chips, it was possible to display the text on the screen. However the code, written in Machine code and Assembly language, was far from being optimal in terms of performance, and speed of execution (i.e. number of clock cycles to display the message correctly). </p><p>For further optimization we needed to build a stack for the CPU, i.e. a form of memory that we can read from, and write-to. The microprocessor has a built-in stack pointer that can find the relevant address of a value, or in other words point to the location of the value in the stack, and use it (or reuse it). </p><p>This has the benefit of pushing &quot;redundant&quot; instructions onto the stack, and/or retrieve them if required. In this manner, the code becomes more efficient by using subroutine calls. </p><h3 id="3-random-access-memory-ram-">3. Random Access Memory (RAM):</h3><p>As explained above, The Random Access Memory will constitute the stack (or memory), where we will be able to store parts of the code for optimal performance.</p><p>Marg0t uses a <a href="https://eater.net/datasheets/hm62256b.pdf?ref=a-blog.vink-io.com">HM62256B Series chip</a>, which is a CMOS static RAM manufactured by Hitachi, and where it is possible to store 256K bits (or 32K bytes) of data. </p><h3 id="4-time-for-a-diagram-">4. Time for a Diagram:</h3><p>In the following schematics, you can see how these components are supposed to be connected with each other:</p><figure class="kg-card kg-image-card kg-width-wide"><img src="https://a-blog.vink-io.com/content/images/2020/08/6502-2.svg" class="kg-image" alt="[tech] Marg0t: a Computer who says &quot;Asslema!&quot;" loading="lazy" width="5051" height="2752"></figure><h3 id="4-other-components-and-setup-">4. Other components and setup:</h3><p>Of course, there is a bunch of other components that were necessary to build the computer, and make it function properly. However I will not go through all of these elements in this post. </p><p>If we had to mention one single component, it would be the &quot;logic gates&quot;, which are the fundamental component of any computer, transistor or chip. In my humble opinion, it is the essence of computing.</p><p>Personally, the most fun and educative part of the project was the debugging process, using a logic analyzer, as it was possible to diagnose &quot;in-vivo&quot; the machine, by single-stepping the clock. </p><p>For this project, I used 3 different machines:</p><ol><li>A Debian VM for EEPROM programming.</li><li>A Raspberry Pi 4 for debugging, and Arduino programming.</li><li>A Windows machine to follow the tutorials, and listen to music.</li></ol><h2 id="software-and-programming-languages">Software and Programming Languages</h2><p>In order to make the computer effectively speak, and display messages, the project covered different software stacks, which are leveraged by different programming languages. </p><p>The diagram below gives a fair abstraction of the different levels at which any programming would operate, in order to interact with the hardware. </p><figure class="kg-card kg-image-card kg-width-wide kg-card-hascaption"><img src="https://a-blog.vink-io.com/content/images/2020/08/MC_assembly_OC-1.png" class="kg-image" alt="[tech] Marg0t: a Computer who says &quot;Asslema!&quot;" loading="lazy" width="453" height="659"><figcaption>Thanks <a href="https://stackoverflow.com/questions/466790/assembly-code-vs-machine-code-vs-object-code?ref=a-blog.vink-io.com">Stack Overflow</a>!!</figcaption></figure><p>The diagram itself gives an abstraction of the C programming language, even though we did not use it yet in the project. </p><p><strong>Machine code</strong> is binary (1&apos;s and 0&apos;s) code that can be executed directly by the CPU. </p><p><strong>Assembly code</strong> is plain-text and (somewhat) human read-able source code that mostly has a direct 1:1 analog with machine instructions. This is accomplished using mnemonics for the actual instructions, registers, or other resources. Examples include <code>JMP</code> and <code>MULT</code> for the CPU&apos;s jump and multiplication instructions. </p><p>Unlike machine code, the CPU does not understand assembly code. You convert assembly code to machine with the use of an <strong>assembler</strong> or a <strong>compiler</strong>, though we usually think of compilers in association with high-level programming language that are abstracted further from the CPU instructions.</p><p>Building a complete program involves writing <strong>source code</strong> for the program in either assembly or a higher level language like C++. &#xA0;</p><p>The source code is assembled (for assembly code) or compiled (for higher level languages) to object code, and individual modules are linked together to become the machine code for the final program. </p><h2 id="applications">Applications</h2><p>This section covers the for-profit aspect of the &quot;Project :: Marg0t&quot;. </p><p>We are still a research and development company, that is focused on financial applications, and state-of-the solutions in this space. </p><p>However, given the length of the blog post, I will lightly describe the applications, in which we can use the knowledge acquired. </p><h3 id="customization-">Customization:</h3><p>Custom systems are at the core of our value-chain. </p><p>&quot;Project :: Marg0t&quot; was built with the intention of being the most abstract form of these systems. </p><p>Our scope covers custom operating systems, custom hardware, and the hybrid Systems-on-Chips, which can be comprehended, adapted and developed for the needs of our customers. </p><h3 id="security-">Security:</h3><p>We consider critical systems as the baseline for our products, and we understand the highly exigent requirements in this space. </p><p>Marg0t is an abstraction of the novel techniques that are possible to secure critical systems, i.e. trusted execution environments, hardware-assisted cryptography, and embedded system hardening.</p><h3 id="algorithmic-trading-">Algorithmic trading:</h3><p>This is my personal favorite application, since it is the space where we can mix and use techniques from the financial, engineering and mathematical realms. </p><p>By building Marg0t, I personally learned a lot about computers systems. However, I specifically acquired a more profound knowledge about time-sensitive systems, hardware timing requirements, and software design that relies on hardware to execute time-sensitive operations. &#xA0; </p><h2 id="fin">FIN</h2><p>At the moment of writing this entry, the &quot;Project :: Marg0t&quot; is still on-going, and I still have to wrap my head around the many topics covered. </p><p>I hope you enjoyed reading this blog post, as much as I enjoyed working on it. </p><p>Of course, here is a small video of the Marg0t in-action:</p><figure class="kg-card kg-embed-card"><iframe width="480" height="270" src="https://www.youtube.com/embed/2zqDRiRZUoE?feature=oembed" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe></figure><p>*&quot;Asslema!&quot; is a specifically Tunisian word that means &quot;Hello&quot;, and in this context it is used as substitute to &quot;Hello World!&quot;.</p><h2 id="appendix-">Appendix:</h2><p>The 65C02 8-bit microprocessor, along with the other components that compose Marg0t, part of the retro programming culture. </p><p>The first version of the 65C02 chip, the 6502, was introduced in 1975, and knew an almost immediate success for its affordable price tag of $25, and competitive computation speed. </p><blockquote>The 6502 almost single-handedly forced the price of processors to drop, helping launch the personal computer revolution. (<a href="https://spectrum.ieee.org/tech-history/silicon-revolution/chip-hall-of-fame-mos-technology-6502-microprocessor?ref=a-blog.vink-io.com">Chip Hall of Fame - IEEE)</a></blockquote><p>According to the same article, the chip, and its variants went on to become the main brains of seminal computers like the <a href="http://www.old-computers.com/museum/computer.asp?c=68&amp;st=1&amp;ref=a-blog.vink-io.com">Apple II</a>, the <a href="https://www.c64-wiki.com/index.php/C64?ref=a-blog.vink-io.com">Commodore 64</a>, and the <a href="http://www.computinghistory.org.uk/det/182/acorn-bbc-micro-model-b/?ref=a-blog.vink-io.com">BBC Micro</a>, not to mention game systems like the <a href="https://arstechnica.com/gaming/2013/07/time-to-feel-old-inside-the-nes-on-its-30th-birthday/?ref=a-blog.vink-io.com">Nintendo Entertainment System</a> and the <a href="http://www.atarimuseum.com/videogames/consoles/2600/atari_case_history.html?ref=a-blog.vink-io.com">Atari 2600</a> (also known as the Atari VCS).</p><p>The 65C02 chip, still in-production, enjoys a large adoption among hobbyists, and is adopted in commercial embedded systems. </p><p></p><p></p><p></p><p></p><p></p>]]></content:encoded></item><item><title><![CDATA[[tech] Bitdinar write-up]]></title><description><![CDATA[Bitdinar so far.]]></description><link>https://a-blog.vink-io.com/r-d1/</link><guid isPermaLink="false">64643d41db9c200518457d3c</guid><dc:creator><![CDATA[OS]]></dc:creator><pubDate>Thu, 16 Jul 2020 14:24:14 GMT</pubDate><media:content url="https://a-blog.vink-io.com/content/images/2020/07/saroukh2.jpg" medium="image"/><content:encoded/></item><item><title><![CDATA[[strategy] Doing business in a democratic Tunisia]]></title><description><![CDATA[In October 2019 the Tunisian people decided to tackle the persistent economic situation, by removing its cause. ]]></description><link>https://a-blog.vink-io.com/doing-business-in-a-democratic-tunisia-2/</link><guid isPermaLink="false">64643d41db9c200518457d3b</guid><category><![CDATA[tunisia]]></category><category><![CDATA[risk management]]></category><dc:creator><![CDATA[OS]]></dc:creator><pubDate>Tue, 22 Oct 2019 05:48:13 GMT</pubDate><media:content url="https://a-blog.vink-io.com/content/images/2020/07/ibnkhaldun3.jpg" medium="image"/><content:encoded/></item><item><title><![CDATA[[strategy] Comments on the German federal government Blockchain Strategy]]></title><description><![CDATA[We will try to provide a progressive understanding of the technology in-play, assess the functional and operational need for a blockchain, deduce from it the notions of security and integrity, and then determine the scenarios available for an efficient and competitive usage of the technology.]]></description><link>https://a-blog.vink-io.com/comments-on-the-report/</link><guid isPermaLink="false">64643d41db9c200518457d39</guid><category><![CDATA[germany]]></category><category><![CDATA[bitcoin]]></category><category><![CDATA[blockchain]]></category><category><![CDATA[bitdinar]]></category><dc:creator><![CDATA[OS]]></dc:creator><pubDate>Mon, 23 Sep 2019 16:43:32 GMT</pubDate><media:content url="https://a-blog.vink-io.com/content/images/2019/09/1-TXg_rwmX0ZOJzd3n9qRUgA.png" medium="image"/><content:encoded/></item><item><title><![CDATA[[tech] Bitdinar: A PoC mobile wallet]]></title><description><![CDATA[We are proud to anounce that we have successfully developed a proof of concept for the Bitdinar mobile application. You can see the mini test here done on an iPhone 7.]]></description><link>https://a-blog.vink-io.com/bitdinar-the-mobile-wallet/</link><guid isPermaLink="false">64643d41db9c200518457d37</guid><dc:creator><![CDATA[OS]]></dc:creator><pubDate>Fri, 12 May 2017 10:00:00 GMT</pubDate><media:content url="https://a-blog.vink-io.com/content/images/2020/08/btnd_app.jpg" medium="image"/><content:encoded/></item><item><title><![CDATA[[tech] Bitdinar: An experimental centralized crypto-currency]]></title><description><![CDATA[Vink-io is a software company which researches and develops crypto currency software for financial institutions in emerging markets. ]]></description><link>https://a-blog.vink-io.com/btnd/</link><guid isPermaLink="false">64643d41db9c200518457d36</guid><dc:creator><![CDATA[OS]]></dc:creator><pubDate>Thu, 03 Nov 2016 12:00:00 GMT</pubDate><content:encoded/></item></channel></rss>