DebugMyLife
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee
    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Engagement control
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Versions and GitHub Sync Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee
  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       owned this note    owned this note      
    Published Linked with GitHub
    Subscribed
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    Subscribe
    # 2025q1 Homework5 (assessment) contributed by < `NeedToDebugMyLife` > :::danger 確保所有作業和測驗均使用 `NeedToDebugMyLife` 帳號提交 ::: ## 閱讀〈[因為自動飲料機而延畢的那一年](https://blog.opasschang.com/the-story-of-auto-beverage-machine-1)〉的啟發 > 於是我愉快的把飲料杯放上去,開始期待他按照我想像的設計運作,接著悲劇就出現了。 > 杯子掉不下去。 > 掉不下去,掉不下去,掉不下去(抱頭)。 > 為什麼會出問題呢?因為這裡是他媽的真實世界啊。 這或許就是理論和實作的差別 :::danger 列出針對前六週教材 (含測驗題目) 的疑惑。 誠實面對自己。 ::: ## 期末專題目標 (構想) 前陣子在 FaceBook 看到老師在系統軟體系列課程討論區社團分享的[貼文](https://www.facebook.com/share/v/16ZLRth6tg/),這則貼文是在 rv32emu 運行毀滅戰士 (DOOM) 遊戲的展示。這讓我產生了很大的興趣,究竟該如何讓一款遊戲運行在 Linux 系統上。 起初的打算是想效仿曾益铭學長,想辦法讓一款遊戲運行在 rv32emu 或 Linux 系統上。 原先選定的遊戲是 Minecraft 這款遊戲,原因是我本身對這款遊戲的瞭解比較多。但經過研究後,我發現了一些問題 1. Minecraft 雖然提供了官方的 API 讓玩家可以針對遊戲進行修改,但本質上仍然是不開源的。因此要執行仍需要仰賴官方的啟動器。 2. Minecraft 使用 Java 編寫,如果是要在 Linux 上運行,那只需要安裝 JVM <small>(Java Virtual Machine)</small> 和[啟動器](https://www.minecraft.net/zh-hant/download#alternate-versions)就可以 <br> ⇒ 要讓 Minecraft 在 Linux 上運行本身就不是一件太難的事。 3. 從毀滅戰士的 demo 影片的發現,雖然遊戲可以運行,但遊戲的幀數表現似乎不是很好 <small>(也或許是遊戲本身的問題?)</small>。考量到 Minecraft 遊戲本身對 CPU 效能的需求,能否在 rv32emu 上順利運行,可能仍然是個問號。 考量到以上幾點,這個方向或許不適合作為 term project 的題目,所以改為選擇其他方案。 <br> 目前的方向大致上有兩種: * 讓遊戲運行在 rv32emu 上,但是選擇較簡單的遊戲<br> ⇒ (?) * 讓遊戲運行在一般的 Linux 系統上,但是選擇以其他程式語言編寫的遊戲 <small>(不仰賴 JVM)</small><br> ⇒ Proton <br> ### Proton 對於在 Linux 系統上玩遊戲,我首先想到的是 Valve 開發的 Proton,Proton 整合了需多工具 (例如: Wine, DXVK, ...等)。目的是讓一些只能在 Windows 上運行的遊戲也能在 Linux 上執行,目前已經整合到 Steam 平台,約有2萬種遊戲可以透過 Proton 在 Linux 系統上成功運行。 #### Wine Wine 可以說是 Proton 得以成功運作的核心。簡單來說,Wine 就是一個轉譯系統,它會把執行程式使用的 System Call 轉換 (映射) 為對應的 Linux System Call。 <br> >##### Windows NT architecture >![image](https://hackmd.io/_uploads/ByAssZibex.png) > >##### Wine architecture >![image](https://hackmd.io/_uploads/H1tAI-obxe.png) > > 基於某些原因 (Wine 的官方 wiki 也沒有明確說名是什麼原因),Wine 的架構比較接近傳統的 Windows NT 架構。而 Wine 的運作必須完全覆蓋三大 DLLs (KERNEL/KERNEL32, GDI/GDI32, and USER/USER32) > >[參考資料](https://gitlab.winehq.org/wine/wine/-/wikis/Wine-Developer's-Guide/Architecture-Overview) <br> #### DXVK <修正中> DXVK,一種將 DirectX 轉譯為 Vulkan * DirectX: 由 Microsoft 建立的遊戲開發 API,多數可運行在 Windows 的遊戲都是使用此 API * Vulkan: 為一個跨平台的由圖形程式 API, 為少數 Linux 上原生支援的 API 之一 <small>(另一個是 OpenGL)</small> 當遊戲使用 DirectX 進行繪圖時,DXVK 會把指令即時轉換為 Vulkan 指令,並交由 Linux 的 GPU driver 運行。 <br> #### FAudio #### SDL2 ### 一對一討論

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully