{"id":25435354,"url":"https://github.com/ghosteater1311/risc-v_bitmap_image_display","last_synced_at":"2025-07-24T00:33:12.514Z","repository":{"id":270255639,"uuid":"909776538","full_name":"ghosteater1311/RISC-V_Bitmap_Image_Display","owner":"ghosteater1311","description":"This is a program of Assembly language to process and display a bitmap image into ARGB Bitmap Display.","archived":false,"fork":false,"pushed_at":"2025-04-08T17:16:05.000Z","size":28066,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-08T18:26:31.431Z","etag":null,"topics":["assembly-language","bitmap-graphics","bitmap-images","risc-v"],"latest_commit_sha":null,"homepage":"","language":"Assembly","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ghosteater1311.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-12-29T18:35:10.000Z","updated_at":"2025-04-08T17:16:08.000Z","dependencies_parsed_at":"2024-12-29T19:27:45.048Z","dependency_job_id":"056e3ab1-18eb-42a2-b06e-760ba9e15486","html_url":"https://github.com/ghosteater1311/RISC-V_Bitmap_Image_Display","commit_stats":null,"previous_names":["ghosteater1311/risc-v_bitmap_image_display"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ghosteater1311/RISC-V_Bitmap_Image_Display","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ghosteater1311%2FRISC-V_Bitmap_Image_Display","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ghosteater1311%2FRISC-V_Bitmap_Image_Display/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ghosteater1311%2FRISC-V_Bitmap_Image_Display/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ghosteater1311%2FRISC-V_Bitmap_Image_Display/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ghosteater1311","download_url":"https://codeload.github.com/ghosteater1311/RISC-V_Bitmap_Image_Display/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ghosteater1311%2FRISC-V_Bitmap_Image_Display/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266774780,"owners_count":23982247,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-23T02:00:09.312Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["assembly-language","bitmap-graphics","bitmap-images","risc-v"],"created_at":"2025-02-17T07:22:55.408Z","updated_at":"2025-07-24T00:33:12.497Z","avatar_url":"https://github.com/ghosteater1311.png","language":"Assembly","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003c!-- Improved compatibility of back to top link: See: https://github.com/othneildrew/Best-README-Template/pull/73 --\u003e\n\u003ca id=\"readme-top\"\u003e\u003c/a\u003e\n\u003c!--\n*** Thanks for checking out the Best-README-Template. If you have a suggestion\n*** that would make this better, please fork the repo and create a pull request\n*** or simply open an issue with the tag \"enhancement\".\n*** Don't forget to give the project a star!\n*** Thanks again! Now go create something AMAZING! :D\n--\u003e\n\n\n\n\u003c!-- PROJECT SHIELDS --\u003e\n\u003c!--\n*** I'm using markdown \"reference style\" links for readability.\n*** Reference links are enclosed in brackets [ ] instead of parentheses ( ).\n*** See the bottom of this document for the declaration of the reference variables\n*** for contributors-url, forks-url, etc. This is an optional, concise syntax you may use.\n*** https://www.markdownguide.org/basic-syntax/#reference-style-links\n--\u003e\n\n\n\u003c!-- PROJECT LOGO --\u003e\n\u003cbr /\u003e\n\u003cdiv align=\"center\"\u003e\n  \u003ca href=\"https://github.com/ghosteater1311/RISC-V_Bitmap_Image_Display\"\u003e\n    \u003cimg src=\"https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQi9cz7M89DM9pcc8WKlIAk03hHlAjxNIQgGg\u0026s\" alt=\"Logo\"\u003e\n  \u003c/a\u003e\n\n\u003ch3 align=\"center\"\u003eRISC-V_Bitmap_Image_Display\u003c/h3\u003e\n    \u003ca href=\"Report.pdf\"\u003e\u003cstrong\u003eExplore the docs »\u003c/strong\u003e\u003c/a\u003e\n  \u003c/p\u003e\n\u003c/div\u003e\n\n\n\n\u003c!-- TABLE OF CONTENTS --\u003e\n\u003cdetails\u003e\n  \u003csummary\u003eTable of Contents\u003c/summary\u003e\n  \u003col\u003e\n    \u003cli\u003e\n      \u003ca href=\"#about-the-project\"\u003eAbout The Project\u003c/a\u003e\n      \u003cul\u003e\n        \u003cli\u003e\u003ca href=\"#built-with\"\u003eBuilt With\u003c/a\u003e\u003c/li\u003e\n      \u003c/ul\u003e\n    \u003c/li\u003e\n    \u003cli\u003e\n      \u003ca href=\"#getting-started\"\u003eGetting Started\u003c/a\u003e\n      \u003cul\u003e\n        \u003cli\u003e\u003ca href=\"#prerequisites\"\u003ePrerequisites\u003c/a\u003e\u003c/li\u003e\n        \u003cli\u003e\u003ca href=\"#installation-guide\"\u003eInstallation Guide\u003c/a\u003e\u003c/li\u003e\n        \u003cul\u003e\n            \u003cli\u003e\u003ca href=\"#environment\"\u003eEnvironment\u003c/a\u003e\u003c/li\u003e\n            \u003cli\u003e\u003ca href=\"#rars-installation\"\u003eRARS Installation\u003c/a\u003e\u003c/li\u003e\n        \u003c/ul\u003e\n      \u003c/ul\u003e\n    \u003c/li\u003e\n    \u003cli\u003e\u003ca href=\"#usage\"\u003eUsage\u003c/a\u003e\u003c/li\u003e\n    \u003cul\u003e\n      \u003cli\u003e\u003ca href=\"#download-program\"\u003eDownload Program\u003c/a\u003e\u003c/li\u003e\n      \u003cli\u003e\u003ca href=\"#setting-up\"\u003eSetting Up\u003c/a\u003e\u003c/li\u003e\n      \u003cli\u003e\u003ca href=\"#initialize\"\u003eInitailize\u003c/a\u003e\u003c/li\u003e\n      \u003cli\u003e\u003ca href=\"#explaination\"\u003eExplaination\u003c/a\u003e\u003c/li\u003e\n      \u003cli\u003e\u003ca href=\"#demo\"\u003eDemo\u003c/a\u003e\u003c/li\u003e\n    \u003c/ul\u003e\n    \u003cli\u003e\u003ca href=\"#license\"\u003eLicense\u003c/a\u003e\u003c/li\u003e\n    \u003cli\u003e\u003ca href=\"#acknowledgments\"\u003eAcknowledgments\u003c/a\u003e\u003c/li\u003e\n  \u003c/ol\u003e\n\u003c/details\u003e\n\n\n\n\u003c!-- ABOUT THE PROJECT --\u003e\n## About The Project\n\nThe program process the bitmap image display into ARGB Bitmap Display based on RARS.\n\n### Built With\n\n* [![RISC-V (RARS IDE)][RarsIcon]](RARS) \n* [![RISC-V Assembly][AsmIcon]](AssemblyLang)\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#readme-top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n\n\u003c!-- GETTING STARTED --\u003e\n## Getting Started\n### Prerequisites\n- Basic knowledge about Assembly language.\n- Ability to understand Algorithms for solving problems.\n- Depth knowledge about General Computer Architecture and RISC-V Architecture \u0026 Instructions Set.\n- The program only execute the bitmap image with the format (.bmp or first 2 Hex Value BM), maximum resolution 512x512 and 24-bit depth color.\n\n_For more information about Assembly language and RISC-V instructions set: [Documentation][doc1]_\n\n### Installation Guide\n#### Environment\nJava Development Kit Environment\n\nWindows:\n  * Download via link: [Here](https://www.oracle.com/java/technologies/downloads/#jdk24-windows)\n  * Run the installer.\n  * To verify the installation:\n  - Run PowerShell as Adminstrator\n  ```sh\n  java --version\n  ```\n\nMac OS:\n  * Download DMG installer via link: [Here](https://www.oracle.com/java/technologies/downloads/#jdk24-mac)\n  * Run the DMG installer.\n  * To verify the installation:\n  - Open terminal\n  ```sh\n  java -version\n  ```\n\nLinux:\n\nSuggestion: In Linux, it's easier to download and install java via terminal instead of download through a file.\n* apt Package\n  ```sh\n  sudo apt update\n  sudo apt upgrade\n  sudo apt install default-jdk\n  ```\n  - To verify the installation:\n  ```sh\n  javac -version\n  ```\n* pacman aarch Package\n  ```sh\n  sudo pacman -Syu\n  sudo pacman -S jdk-openjdk\n  ```\n  - To verify the installation:\n  ```sh\n  jdk -v\n  ```\n* Specific Linux (Red Hat) with Yum or Rpm packages management\n  + For Yum\n    ```sh\n    sudo yum update\n    sudo yum upgrade\n    sudo yum install java\n    ```\n    - To verify the installation:\n    ```sh\n    yum info \"java\"\n    ```\n  + For Rpm \n    * Download via link: [Here](https://www.oracle.com/java/technologies/downloads/#jdk24-linux)\n    * Installation:\n    - Become root:\n    ```sh\n    su\n    ```\n    - Change to the directory in which you want to install:\n    ```sh\n    cd directory_path_name\n    ```\n    - For example, to install the software in the /usr/java/ directory:\n    ```sh\n    cd /usr/java\n    ```\n    - Uninstall any earlier installations of the Java packages:\n    ```sh\n    rpm -e package_name\n    ```\n    - Install the package:\n    ```sh\n    rpm -ivh jdk-24_linux-x64_bin.rpm\n    ```\n    - To upgrade a package:\n    ```sh\n    rpm -Uvh jdk-24_linux-x64_bin.rpm\n    ```\n\n#### RARS Installation\nRARS 1.6 IDE and Simulator\n\nWindows/Mac OS:\n* Download the rars1_6.jar via release link: [Here](https://github.com/TheThirdOne/rars/releases/tag/v1.6)\n* Run the rars1_6.jar\n\nLinux:\n* Download the rars1_6.jar via release link: [Here](https://github.com/TheThirdOne/rars/releases/tag/v1.6)\n* To Use the IDE\n  - Open File Manager\n  - Open the Folder contain the rars1_6.jar\n  - Open with terminal\n  ```sh\n  java rars1_6.jar\n  ```\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#readme-top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n\n\u003c!-- USAGE EXAMPLES --\u003e\n## Usage\n### Download Program\n* Download the source code from [Source code](https://github.com/ghosteater1311/RISC-V_Bitmap_Image_Display/archive/refs/heads/main.zip).\n  - Extract the zip file. \n\n* Or using git:\n  ```sh\n  git clone https://github.com/ghosteater1311/RISC-V_Bitmap_Image_Display.git\n  ```\n* Open rars1_6.jar.\n\n_If you don't know how to open rars1_6.jar, please read [RARS Installation](#rars-installation)_\n\n### Setting Up\n* In [File] options, choose [Open...] and open the [source.asm] in [src] Folder.\n\n* [Execute] the program.\n\n* In [Tools] options, choose [Bitmap Display].\n\n* Remain the Unit Width and Height in Pixels at 1, modify the Display Width and Height in Pixels to 512 (maximum resolution).\n\n* Press [Connect to Program].\n\n* [Run] the program after execution.\n\n### Initialize \n* Input the full path that contain the image file.\n\n* Press [Enter] to observe the result on the [Bitmap Display].\n\n### Explaination\n* Open File and Read File Header:\n  - Opens the BMP file in read-only mode.\n  - Reads the first 54 bytes (header) of the BMP file.\n\n* Validate the information of the image:\n  - Validate File Format: Checks the first two bytes of the BMP header to ensure they are ’B’ and ’M’.\n  - Validate Image Resolution: Validates the width and height of the image (both must be smaller or equal 512)\n\n* Read Pixel Data:\n  - Extracts the offset to the pixel data from the header.\n  - Calculates the total size of the pixel data.\n\n* Displaying Algorithm:\n  - Initial the width and height of the image into 2 register labels.\n  - Loop from bottom up for each rows (the purpose is to access first row of bitmap image). \n  - For each rows, loop from left to right to access each columns refers for each pixels. \n  - For each columns (aka pixels) in the row, process the color and display immediately to the display. \n  - The default color format of bitmap image it's BGR. Implementation of pixel in a row of bitmap image: [B1 G1 R1] [B2 G2 R2] [B3 G3 R3] ... \n  - To display image on Bitmap Display, we need to convert BGR color format into RGB color format, It means convert 0x00BBGGRR -\u003e 0x00RRGGBB. \n  - Each value on the hexadecimal value it's 4 bit. \n  - To do that, we use shift left logic and bitwise operation to evaluate the exactly value of the color refers to RGB format to display the image with right color as accurately as possible. \n\n### Demo\n\nhttps://github.com/user-attachments/assets/1aad201a-29f3-4ff5-bf9f-4f3088aa0c08\n\nThis demo displays a 512x512 .bmp image after processing.\n\n_For more information about how the program works, please read the [Report][doc2]_\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#readme-top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n\n\n\u003c!-- ROADMAP --\u003e\n\n\n\u003c!-- CONTRIBUTING --\u003e\n\n\n\u003c!-- LICENSE --\u003e\n## License\n\nDistributed under the project_license. See `LICENSE.txt` for more information.\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#readme-top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n\u003c!-- CONTACT --\u003e\n\n\n\u003c!-- ACKNOWLEDGMENTS --\u003e\n## Acknowledgments\n\n* [RISC-V Computer Architecture](https://en.wikipedia.org/wiki/RISC-V)\n* [RISC-V Assembly Language](https://en.wikipedia.org/wiki/RISC-V_assembly_language#:~:text=RISC%2DV%20assembly%20language%20is,for%20precise%20control%20over%20hardware.)\n* [Assembly Language](https://en.wikipedia.org/wiki/Assembly_language#:~:text=In%20computer%20programming%2C%20assembly%20language,the%20language%20and%20the%20architecture's)\n* [Computer Architecture](https://en.wikipedia.org/wiki/Computer_architecture)\n* [RISC-V Reference](https://www.cs.sfu.ca/~ashriram/Courses/CS295/assets/notebooks/RISCV/RISCV_CARD.pdf)\n* [Bitmap File Format](https://en.wikipedia.org/wiki/BMP_file_format)\n* [Bitmap](https://en.wikipedia.org/wiki/Bitmap)\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#readme-top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n\n\n\u003c!-- MARKDOWN LINKS \u0026 IMAGES --\u003e\n\u003c!-- https://www.markdownguide.org/basic-syntax/#reference-style-links --\u003e\n[product-demo]: demo/demo.mp4\n[doc1]: risc-v-asm-manual.pdf\n[doc2]: Report.pdf\n[RARS]: https://github.com/TheThirdOne/rars\n[AssemblyLang]: https://en.wikipedia.org/wiki/RISC-V_assembly_language#:~:text=RISC%2DV%20assembly%20language%20is,for%20precise%20control%20over%20hardware.\n[AsmIcon]: https://img.shields.io/badge/RISC--V%20Assembly-%235391FE.svg?style=flat\u0026logo=riscv\u0026logoColor=yellow\n[RarsIcon]: https://img.shields.io/badge/RISC--V%20(RARS%20IDE)-%235391FE.svg?style=flat\u0026logo=riscv\u0026logoColor=yellow\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fghosteater1311%2Frisc-v_bitmap_image_display","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fghosteater1311%2Frisc-v_bitmap_image_display","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fghosteater1311%2Frisc-v_bitmap_image_display/lists"}