Navigation

    全志在线开发者论坛

    • Register
    • Login
    • Search
    • Categories
    • Tags
    • 在线文档
    • 社区主页

    Gaviar Handheld (小志掌機)

    爱搞机专区
    21
    134
    89057
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • steward
      司徒 LV 6 last edited by steward

      1.jpg
      中文名稱:小志掌機
      英文名稱:Gaviar Handheld
      開源方式:GPL License
      開發人員:bankbank (銀行銀行)、steward (司徒)
      開發目的:學習 RISC-V、體驗 KOF97 振動版
      面向玩家:喜愛 DIY 樂趣、掌機的玩家
      更新時間:由於我們的本業都跟這些無關, 只能利用閒餘時間研究, 因此, 每次更新的時間有可能長達一個月

      功能簡介:
      RISC-V 是一個趨勢, 只是目前比較少有掌機面市, 因此, bankbank 和司徒將會以軟件面向, 從頭做起, 並且將這些過程紀錄下來, 以供日後參考, 除了可以學習 RISC-V 的軟件開發之外, bankbank 也會進行 KOF97 遊戲逆向分析, 分析的目的並不是要修改 KOF97 ROM, 而是要讓模擬器知道哪些角色的招式可以去驅動振動馬達, 因為讓 KOF97 具備振動功能是 bankbank 跟司徒的夢想, KOF97 振動版相信可以再度勾起童年的快樂回憶, 由於逆向遊戲比較敏感, 因此, 盡量以點到為止

      購買事項:
      小志掌機是由暈哥製作並提供給 bankbank 和司徒,因此,如果想要購買的人可以去找暈哥,bankbank 和司徒並沒有參與任何販賣事項,司徒跟 bankbank 只是以開源的方向來研究這台掌機,當然所有的資源都是公開,因此,司徒比較建議玩家從 GitHub 下載並且自己動手列印製作,這樣會更有樂趣

      資料倉庫:
      https://github.com/Strugglemeat/gngeo
      https://github.com/steward-fu/archives/releases/tag/f133

      預計流程:

      • 逆向 KOF97
      • 硬件說明
      • 硬件功能確認
        • 點屏
        • 按鍵
        • 聲音
      • 移植 Boot Loader
      • 移植 Linux Kernel
        • 屏幕驅動
        • 按鍵驅動
        • 聲音驅動
        • 電池驅動
      • 建置 Linux OS
      • 移植 GNGEO 模擬器
        • 支援振動功能

      結帖時間:視情況而定
      贊助連結:
      https://store.steampowered.com/search/?developer=bankbank&ndl=1
      https://play.google.com/store/apps/details?id=com.stylus.cavesweeper&gl=US&pli=1

      注意事項:
      由於此貼屬於開源專案, 因此, 司徒的仇家預計將前來尋仇, 這部分需要請管理員幫忙過濾惡意攻擊的言論, 如果無法有效制止, 此帖將提早結束, 我們將繼續漂流尋找下一個可以撰寫文章的地方

      關於 bankbank (銀行銀行):
      romhacker and retro gamedev bankbank ( bankbank.net ), very focused on 68000, also interested in SH-2. my favorite game is Tetris the Grand Master 2 Plus. my dream is to make games and hacks that many people can enjoy. YouTube: https://www.youtube.com/bankbank

      關於 steward (司徒):
      喜歡惡搞掌機, 賦予掌機另一種生命力, 藉由惡搞掌機來回味童年的美好, 誰叫掌機要惡搞當年的我

      前言:
      司徒相當高興可以遇到 Hack ROM 的高手 bankbank, bankbank 除了喜愛 Hack ROM 之外, 也熱愛 DIY 的樂趣, bankbank 本身可以閱讀簡單的中文, 因此, 如果需要詢問 bankbank 問題, 請盡量使用簡單的中文詞彙或者使用英文發問, 由於這個開源專案是從頭做起, 難免會遇到無法預期的開發問題, 加上 bankbank 和司徒的本業並非這個領域, 因此, 只能利用瑣碎時間研究, 基於熱愛掌機所發起的開源專案, 因此, 請不要催促開發進度

      振動原理簡介:
      左、右馬達用來代表左、右的方向, 此例使用大門武郎的岚之山, 大絕招一發動時, 同時振動馬達
      2.png

      右摔時,右邊振動馬達開始振動
      3.png

      左摔時,左邊振動馬達開始振動
      4.png

      1 Reply Last reply Reply Quote Share 6
      • steward
        司徒 LV 6 last edited by steward

        Allwinner F133(D1s) 是 RISC-V 64位元架構, 就規格面來看, 應該是可以對應到 Ingenic JZ4760B 600MHz, 也就是 RS-97 掌機 (RetroGame), LDK GAME 掌機(小龍王)這一系列的等級, 當然 bankbank 和司徒是以 RISC-V 的軟件角度切入, 因此, 剛好可以趁機來看一下 RISC-V 跟 MIPS 的差距會有多大~

        簡要規格
        1.jpg

        TRIMUI SMART
        1.jpg

        GAME GEAR Micro
        2.jpg

        Arduboy
        3.jpg

        FunKeyS (對不起只剩下屍體)
        4.jpg

        舊 3DS
        5.jpg

        正面
        6.jpg

        USB-TypeC、耳機孔
        7.jpg

        電源開關
        8.jpg

        R、MicroSD、L
        9.jpg

        音量開關
        10.jpg

        背面
        11.jpg

        拆掉類比搖桿帽子才可以提起A面
        12.jpg

        提起 A 面
        13.jpg

        A 面
        14.jpg

        屏
        15.jpg
        16.jpg
        17.jpg

        PCB
        18.jpg

        電源開關往下才可以取出 PCB
        19.jpg

        電池物品禁止發送到台灣,因此,司徒需要自行焊接電池,這個空間相當適合其它改造
        20.jpg

        正面
        21.jpg

        Allwinner F133 (D1s)
        22.jpg

        bankbank L 2 Replies Last reply Reply Quote Share 5
        • bankbank
          bankbank LV 3 @steward last edited by

          In order to accomplish the vibration function, which never previously existed in this game's programming, we need to build it into the emulator. We must constantly watch several areas in RAM, and based on the conditions, we will execute vibration on the left, right, or both simultaneously. It's still not yet determined whether there will be another parameter regarding intensity of vibration, that will come later.

          Here are a few locations in RAM we will continuously monitor:
          0x10843B (byte) - P2 damage accumulator - when P1 hits P2, the value of the damage will be added here (normally 0x00)
          0x108102 (word) - P1 move pointer - when P1 does a move, this will reflect the unique BP (normally 0xF464)
          0x108175 (byte) - P1 trigger - if P1 move pointer isn't enough or needs restriction, this byte will work. I believe it's a pointer to which animation is playing for P1.

          For discovering conditions, debugging, and preliminary testing, I will use MAME emulator with LUA scripting. Let's take the character 'Daimon' for example:

          54783113-5909-4e97-91f0-e11e3c7a420e-image.png

          I am using this MAME cheat file so I can have infinite time, infinite super meter, P2 infinite HP https://github.com/Strugglemeat/kof97/blob/main/kof97.xml

          When Daimon is doing his HCB+C throw, 0x108102 will be as follows:
          871442b2-fa9b-4816-874f-3271e76b2994-image.png

          In addition, we can see the P2 damage accumulator has been modified by the game: d8360351-0166-4de7-8f67-76bedccea6b7-image.png

          In the LUA script, we can see corresponding code:
          26ec42e4-186a-4eb1-9a54-286ce6d6e620-image.png

          https://github.com/Strugglemeat/kof97/blob/main/kof97.lua

          And now when we play the game with the LUA script enabled:
          0a9af6a3-3232-4947-b2c5-1f9525c82aee-image.png

          We can see a box has been drawn on the right side, indicating that this is where vibration should happen.

          Ultimately, we do not want to draw boxes in MAME on our PC, we want to feel vibration in the Gaviar handheld. So now we need to port this logic to the gngeo emulator which will run on the Allwinner D1s SoC.

          https://github.com/Strugglemeat/gngeo/blob/master/src/rumble.c

          Within this file, we can see reading of the same bytes as the LUA script:
          72d3631f-a284-4d68-a322-61a8e76c6c3d-image.png

          And the same watching for conditions to trigger the rumble vibration motors:
          db317757-51a8-4c43-8392-28d6cf3687df-image.png

          Discovering these triggers takes about 2 hours per character. If other people want to contribute, it would be very helpful, since there are about 30 characters. Here you can see a finished Kyo super/special move set for LUA, which needs to be ported to gngeo:

          dfdb2948-aac0-46e6-b6e5-49997c683a09-image.png

          https://docs.google.com/spreadsheets/d/18-3FkS40NmaozHA6sqhKlpHiS5KeQoTrdatqnMOBWYY/edit?usp=sharing

          For more information, you can look at the lower pages of this document to see more:

          https://docs.google.com/document/d/1g9EnpCVbQXWMn-xd5w0bgmlUGuHL5kMT-kHZRkNL0VY/edit?usp=sharing

          fc27daaa-4798-4d76-af1a-2443cc46d792-image.png

          Thank you for your interest in this project, and I hope one day you can enjoy the feeling of KoF '97 rumbling in your hands!

          1 Reply Last reply Reply Quote Share 2
          • Kirin
            陈塘关李靖 LV 6 last edited by Kirin

            @steward 感谢司徒大佬的分享&给游戏机赐名,这个论坛由我负责,每一条发言都会经过我或者我的小伙伴们人工审核,不会有乱七八糟的言论出现的,希望您在这里玩得开心😁

            steward 1 Reply Last reply Reply Quote Share 1
            • steward
              司徒 LV 6 @Kirin last edited by

              @kirin
              相當感謝你們團隊的幫忙, 我跟 bankbank 在此致上謝意, 相信仇家已經準備提刀過來了~哈💃💃

              1 Reply Last reply Reply Quote Share 1
              • steward
                司徒 LV 6 last edited by

                @Kirin
                另外, 想請問一下可以增加文字顏色這個功能嗎 ?

                Kirin 1 Reply Last reply Reply Quote Share 0
                • hsinyuwang
                  hsinyuwang LV 6 last edited by

                  支持司徒大佬!!!

                  1 Reply Last reply Reply Quote Share 1
                  • livpo
                    livpo LV 6 last edited by

                    小志掌机的意思是未来还会有中志、大志掌机吗🕺

                    steward 1 Reply Last reply Reply Quote Share 0
                    • steward
                      司徒 LV 6 @livpo last edited by

                      @livpo
                      恭喜你答錯了💃💃
                      取名小志是因為機器夠小而且使用全志晶片, 所以才使用小志這個名字, 至於未來是否還會有中志、大志掌機, 你可以建議給暈哥, 因為機器是由他們製作, 至於我們之後會玩什麼掌機, 目前不知道~

                      1 Reply Last reply Reply Quote Share 0
                      • Kirin
                        陈塘关李靖 LV 6 @steward last edited by

                        @steward 在 Gaviar Handheld (小志掌機) 中说:

                        @Kirin
                        另外, 想請問一下可以增加文字顏色這個功能嗎 ?

                        这个建议很棒,但是很抱歉短期内无法实现,因为功能的功能的升级要依赖公司做网站的同事,但是他们目前都比较忙,暂时排不上日程

                        steward 1 Reply Last reply Reply Quote Share 0
                        • steward
                          司徒 LV 6 @Kirin last edited by

                          @kirin
                          了解~感謝

                          1 Reply Last reply Reply Quote Share 0
                          • steward
                            司徒 LV 6 last edited by steward

                            逆向工程並非用於破壞攻擊的目的, 取而代之, 它是一個可以更了解細節的技術, 以這樣的角度, 則逆向變得更有趣, 就如同 bankbank 介紹的過程一樣, 透過查看變數而知道一些細節, 或許有些人不好意思詢問 bankbank 問題, 因此, 司徒帶大家走一下步驟:

                            準備好 kof97.zip, neogeo.zip 後, 開啟 debug 模式

                            $ mame kof97.zip -debug -resolution 320x240
                            

                            可以設定WatchPoint的地方
                            1.jpg

                            按下F11並且輸入wp 0x10843B,1,w,接著再按下F5執行
                            2.jpg

                            P2被攻擊後就會觸發中斷, 是不是很簡單~
                            3.jpg
                            4.jpg

                            bankbank 透過尋找出一些位址, 讓大家知道模擬器是如何知道一些細節, 這也是振動需要判斷的數值, 這些看似很高深的技術, 其實透過說明, 大家都可以很容易上手, 因此, 如何讓懷舊遊戲變得更有趣, 有時候, 你也可以好好思考如何讓你喜愛的遊戲變得更好玩, 這才是樂趣所在, 當然, 大家更應該正向來看待逆向工程技術, 而基於一些原因, 我們盡量點到就好, 相信 bankbank 之後會為我們帶來更好玩的東西~

                            L 1 Reply Last reply Reply Quote Share 1
                            • L
                              lovexulu LV 7 @steward last edited by

                              @steward 😢 在大佬看很简单,我已经看不明白了。。。

                              steward bankbank 2 Replies Last reply Reply Quote Share 1
                              • steward
                                司徒 LV 6 @lovexulu last edited by

                                @lovexulu
                                有問題歡迎提問, 畢竟大家一起同樂比較有趣~

                                1 Reply Last reply Reply Quote Share 0
                                • bankbank
                                  bankbank LV 3 @lovexulu last edited by

                                  @lovexulu 在 68000 CPU NEOGEO 程序中,有两个主要元素:ROM 和 RAM

                                  ROM:程序员在 1990 年代编写的代码。 它改变 RAM 的值,并跳转到 ROM 上的新区域。 它的代码,说明。

                                  RAM:内存中的临时值。 如果我使用造成 10 点伤害的特殊攻击,那 10 点必须存储在临时内存中的某个地方。

                                  在任何计算机中,操作都是完全相同的:在“P.C.”处计算当前指令。 程序计数器。 完成那个之后,去下一个。 唯一的变化是指令是否跳转到或分支到某个不同的区域。 否则,我们将始终转到下一条指令。 继续一个接一个地吃,就像吃零食一样,不断地。 这通常是 ROM(有时可以从 RAM 中以这种方式执行代码)。

                                  MAME 调试器可以通过以下方式作用于 ROM:
                                  BP“断点”
                                  如果仿真器发现 CPU 当前为“P.C.” 程序计数器匹配用户请求的 BP 命令,执行将完全停止。 例如,在 Marvel vs Capcom 1 CPS2 中,PC=0x12BA2 处的代码将导致游戏计时器减少 1 秒:
                                  bd9d9f6b-685f-491b-b9a9-515f168ec1b7-image.png
                                  如果我在调试器“BP 12BA2”中使用命令,那么执行将每秒停止一次,直到计时器达到 00 或匹配结束。 然后,该代码将不会“中断”。

                                  MAME 调试器可以通过以下方式作用于 RAM:
                                  匹配的计时器存储在地址为 0xFF4008 的 RAM 中(我通过检查其他人制作的 MAME 作弊文件发现了这一点 - 这些作弊文件是发现有用内存地址的非常有用的快捷方式)。
                                  “wp FF4008,1,w”
                                  每次程序写入这个内存地址时,执行都会停止。 w 代表写作。 您还可以提供 r 用于读取,或者同时提供 r 和 w。 1 代表 1 个字节。
                                  bd57854f-06e9-42a2-84b8-05b6a1721616-image.png
                                  309cc073-94e7-4146-b3e6-f65ae499c2f4-image.png
                                  使用这种类型的调试,您可以了解任何计算机程序的工作原理。 gdb是一个专业的调试程序,它有类似的操作,非常相似。

                                  如果您有任何问题,请毫不犹豫地提出。 我是这方面的专家,因为我已经在这方面花费了数千小时。 但我不是其他方面的专家,我想学习如何设计自己的 PCB,如何使用 LCD 屏幕的设备驱动程序,如何结合软件和硬件来做出以前没人想过的创新和独特的新事物 .

                                  我用的是翻译软件,如有不妥之处请见谅。

                                  L 1 Reply Last reply Reply Quote Share 1
                                  • L
                                    lovehex99 LV 5 @steward last edited by

                                    @steward 找了很久
                                    终于有人愿意弄开源掌机开发板(感谢晕哥)
                                    只为学习研究
                                    希望司徒和bankbank大佬能持续更新 带新手入门

                                    steward 1 Reply Last reply Reply Quote Share 1
                                    • steward
                                      司徒 LV 6 @lovehex99 last edited by

                                      @lovehex99
                                      感謝支持, 大家一起學習, 開發過程如果有遇到問題, 都歡迎提問~

                                      1 Reply Last reply Reply Quote Share 0
                                      • L
                                        lovexulu LV 7 @bankbank last edited by

                                        @bankbank 谢谢 bankbank大佬详细解释,原来两位大佬打算从这些数据中找出何时驱动震动的数据,这太专业了。

                                        J 1 Reply Last reply Reply Quote Share 1
                                        • J
                                          jordonwu LV 6 @lovexulu last edited by

                                          哪里能买到这款游戏机呢?

                                          1 Reply Last reply Reply Quote Share 0
                                          • bankbank
                                            bankbank LV 3 last edited by

                                            @jordonwu 在 Gaviar Handheld (小志掌機) 中说:

                                            哪里能买到这款游戏机呢?

                                            它还没有完成。 我们正在做一些独特的事情,所以这需要时间。 全志 D1s 加振动等于兴奋!

                                            1 Reply Last reply Reply Quote Share 2
                                            • steward
                                              司徒 LV 6 last edited by steward

                                              由於 KOF97 角色很多, 逆向需要花費相當多的時間去分析, 感謝 bankbank 的時間, 😁 , 於此同時, 司徒也會開始針對系統做移植, 而依照司徒的慣例, 都是先從硬件下手, 等待比較熟悉硬件後, 才會開始做移植的東西~感謝暈哥的開源文件, 將硬件原理圖開源出來, 原理圖設計得相當好, 如果有想要改版, 司徒這邊有一些想法, 或許可以參考一下

                                              1.jpg

                                              2.jpg

                                              3.jpg

                                              建議把CTRL拉到GPIO,方便用來控制雜音
                                              4.jpg

                                              MicroSD訊號沒有上拉電阻,因此,要注意PCB線長
                                              5.jpg

                                              GPIO都拉到獨立GPIO使用,避免鬼鍵問題,不過,可以使用晶片內部的提昇電阻,這樣可以減少電阻拉線
                                              6.jpg

                                              背光建議使用IC,避免壓降問題,屏使用RGB-565,建議找有TE(FRAME)的屏,這樣可以有效控制閃屏問題
                                              7.jpg

                                              whycan 1 Reply Last reply Reply Quote Share 3
                                              • whycan
                                                whycan晕哥 LV 9 @steward last edited by

                                                @steward 在 Gaviar Handheld (小志掌機) 中说:

                                                司徒這邊有一些想法, 或許可以參考一下

                                                收到司徒大佬的热心反馈,我和小伙伴商量一下,方便修改的地方预计下个版本就能改好。

                                                steward L 2 Replies Last reply Reply Quote Share 1
                                                • steward
                                                  司徒 LV 6 @whycan last edited by steward

                                                  @whycan
                                                  暈哥, 記得左右兩邊要加振動馬達, 然後 UART 的 PCB 腳位記得灌孔~😊

                                                  whycan 1 Reply Last reply Reply Quote Share 0
                                                  • L
                                                    looklike LV 3 last edited by

                                                    终于看到司徒大佬回归了,好鸡动,希望你能带我们继续搞机。

                                                    1 Reply Last reply Reply Quote Share 1
                                                    • bigniudiy
                                                      柚子爱DIY LV 3 last edited by

                                                      终于来了,我一直想自己弄一个游戏机,这下可以跟着大佬一步一步来了

                                                      1 Reply Last reply Reply Quote Share 1
                                                      • L
                                                        lovexulu LV 7 last edited by

                                                        跟着司徒大佬学习系统,应用移植。。。要 开始了嘛!!太好了。

                                                        1 Reply Last reply Reply Quote Share 1
                                                        • whycan
                                                          whycan晕哥 LV 9 @steward last edited by

                                                          @steward 在 Gaviar Handheld (小志掌機) 中说:

                                                          @whycan
                                                          暈哥, 記得左右兩邊要加振動馬達, 然後 UART 的 PCB 腳位記得灌孔~😊

                                                          感谢司徒大佬提出的建议,对于这个打算开源的游戏机版本本着尽量易于制作,易于复刻的理念设计,因此:

                                                          功放的控制部分直接上拉 默认开启,此处要修改为gpio控制,需要添加电平转换。所以简化了控制部分!

                                                          2,关于sd卡的上拉电阻问题,D1S芯片与上一代F1S100不同,其内部上拉电阻有3个等级可选,体现在设备树对pin 驱动能力选择上,因此 适配不同的上拉电阻已经可以进行有效的阻抗匹配。故无需额外添加上拉电阻,

                                                          关于按键的硬件消抖问题,设计之初已经考虑到了,但是为了简化某些软件设计,添加了全按键的硬件消抖,这个在实际使用中可以选择不焊接这些电阻电容,且论坛发现过适配gpio key时选择内部上拉失效的问题。所以为了保险起见此次板子焊接了这些硬件消抖电路。

                                                          添加震动电机是个很好的想法,但是这会引起额外的电能消耗,不利于续航,但是本着娱乐精神,已经添加了电机驱动,将在下个版本适配。

                                                          至于串口debug焊盘 穿孔问题,因为此处中间层及底层有走线,打孔会让走线变得困难。且游戏机调试好正式使用时 debug串口几乎用不到,所以仅引出了2.54mm间距的焊盘,当然 这些焊盘上可以焊接 贴片式2.54mm插针。

                                                          steward 1 Reply Last reply Reply Quote Share 2
                                                          • steward
                                                            司徒 LV 6 @whycan last edited by

                                                            @whycan
                                                            沒問題~感謝 👍

                                                            whycan 1 Reply Last reply Reply Quote Share 0
                                                            • whycan
                                                              whycan晕哥 LV 9 @steward last edited by

                                                              @steward
                                                              关于显示屏,选了一个性价比相对合适的,司徒大佬也可以推荐。

                                                              i80屏一般不会撕裂,因为屏内置GRAM,只要CPU能稳定输出60FPS显示屏就能正常工作。

                                                              steward ufbycd 2 Replies Last reply Reply Quote Share 1
                                                              • steward
                                                                司徒 LV 6 @whycan last edited by

                                                                @whycan
                                                                沒關係, 屏的部份先這樣就可以, 我之後在移植 Linux Kernel 時, 再來說明一下撕裂的原因, 感謝 😊

                                                                1 Reply Last reply Reply Quote Share 0
                                                                • steward
                                                                  司徒 LV 6 last edited by steward

                                                                  拿到打樣後的 PCB, 緊接著就需要進行驗證的動作, 一般在這個環節會有簡單的量產測試工具, 用來快速驗證某些模塊的功能是否正常, 這就是司徒接下來要介紹的東西, 如何寫出簡單的測試程序並下載到小志掌機做測試~
                                                                   
                                                                  由於需要用到平頭哥的編譯器 (司徒一開始以為平頭哥是一個人...), 因此, 需要手動下載安裝

                                                                  $ cd
                                                                  $ wget https://github.com/steward-fu/archives/releases/download/f133/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.6.1-20220906.tar.gz
                                                                  $ tar xvf Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.6.1-20220906.tar.gz
                                                                  $ sudo mv Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.6.1 /opt/f133
                                                                  $ export PATH=/opt/f133/bin:$PATH
                                                                  $ riscv64-unknown-linux-gnu-gcc --version
                                                                      riscv64-unknown-linux-gnu-gcc (Xuantie-900 linux-5.10.4 glibc gcc Toolchain V2.6.1 B-20220906) 10.2.0
                                                                      Copyright (C) 2020 Free Software Foundation, Inc.
                                                                      This is free software; see the source for copying conditions.  There is NO
                                                                      warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
                                                                  

                                                                   
                                                                  這階段的測試驗證將會使用 xfel 工具, 安裝方式如下

                                                                  $ cd
                                                                  $ git clone https://github.com/xboot/xfel
                                                                  $ cd xfel
                                                                  $ make
                                                                  $ sudo make install
                                                                  $ xfel --help
                                                                      xfel(v1.3.1) - https://github.com/xboot/xfel
                                                                  

                                                                   
                                                                  接下來, 司徒將會說明如何驗證 LED 部份, 確定你拿到的 PCB 是可以正常工作的, PE5 用來控制 LED,不過這顆 LED 是 WS2812C,它需要透過串列訊號控制, F133 本身就支援 LEDC 控制, 因此, 司徒將介紹如何透過 LEDC 點亮 LED
                                                                   
                                                                  1.jpg
                                                                   
                                                                  WS2812C 裡面有 R、G、B 三顆 LED,每顆 LED 用一個 Byte 來代表亮度,傳送的串列訊號如下:
                                                                   
                                                                  2.jpg
                                                                   
                                                                  因為只有一隻 DI 腳位,因此,對於時序有一些要求,如果要傳送 0,需要的時序是 T0H(300ns)+T0L(850ns),而傳送 1 則是 T1H(800ns)+T1L(400ns),結尾需要傳送 RET(>280us)
                                                                   
                                                                  3.jpg
                                                                   
                                                                  GPIO 位址
                                                                   
                                                                  4.jpg
                                                                   
                                                                  PE_CFG0 (0x0101 = LEDC-DO)
                                                                   
                                                                  5.jpg
                                                                   
                                                                  LEDC Clock 可以使用 HOSC、PeriPLL1x
                                                                   
                                                                  6.jpg
                                                                   
                                                                  CCU 位址
                                                                   
                                                                  7.jpg
                                                                   
                                                                  LEDC Clock
                                                                   
                                                                  8.jpg
                                                                   
                                                                  目前使用 HOSC
                                                                   
                                                                  9.jpg
                                                                   
                                                                  Clock Reset、Gating
                                                                   
                                                                  10.jpg
                                                                   
                                                                  目前關閉 DMA
                                                                   
                                                                  10.jpg
                                                                   
                                                                  main.s

                                                                      .global _start
                                                                    
                                                                      .equ CCU_BASE,     0x02001000
                                                                      .equ GPIO_BASE,    0x02000000
                                                                      .equ LEDC_BASE,    0x02008000
                                                                      .equ PE_CFG0,      0x00c0
                                                                      .equ _1S,          200000000
                                                                   
                                                                      .equ LEDC_CLK_REG,              0x0bf0
                                                                      .equ LEDC_BGR_REG,              0x0bfc
                                                                      .equ LEDC_CTRL_REG,             0x0000
                                                                      .equ LED_T01_TIMING_CTRL_REG,   0x0004
                                                                      .equ LEDC_DATA_FINISH_CNT_REG,  0x0008
                                                                      .equ LED_RESET_TIMING_CTRL_REG, 0x000c
                                                                      .equ LEDC_WAIT_TIME0_CTRL_REG,  0x0010
                                                                      .equ LEDC_DATA_REG,             0x0014
                                                                      .equ LEDC_DMA_CTRL_REG,         0x0018
                                                                      .equ LEDC_INT_CTRL_REG,         0x001c
                                                                      .equ LEDC_INT_STS_REG,          0x0020
                                                                      .equ LEDC_WAIT_TIME1_CTRL_REG,  0x0028
                                                                      
                                                                      .text
                                                                      .long 0x4000006f
                                                                      .byte 'e','G','O','N','.','B','T','0'
                                                                      .long 0x5F0A6C39
                                                                      .long 0x8000
                                                                      .long 0, 0
                                                                      .long 0, 0, 0, 0, 0, 0, 0, 0
                                                                      .long 0, 0, 0, 0, 0, 0, 0, 0
                                                                    
                                                                      .org 0x0400
                                                                  _start:
                                                                      li t0, (1 << 16) | (1 << 0)
                                                                      li a0, CCU_BASE + LEDC_BGR_REG
                                                                      sw t0, 0(a0)
                                                                   
                                                                      li t0, (1 << 31)
                                                                      li a0, CCU_BASE + LEDC_CLK_REG
                                                                      sw t0, 0(a0)
                                                                   
                                                                      li t0, 0x500000
                                                                      li a0, GPIO_BASE + PE_CFG0
                                                                      sw t0, 0(a0)
                                                                       
                                                                      li t0, (0x14 << 21) | (0x06 << 16) | (0x07 << 6) | (0x13 << 0)
                                                                      li a0, LEDC_BASE + LED_T01_TIMING_CTRL_REG
                                                                      sw t0, 0(a0)
                                                                       
                                                                      li t0, (0x1d4c << 16)
                                                                      li a0, LEDC_BASE + LEDC_DATA_FINISH_CNT_REG
                                                                      sw t0, 0(a0)
                                                                       
                                                                      li t0, (0x1d4c << 16)
                                                                      li a0, LEDC_BASE + LED_RESET_TIMING_CTRL_REG
                                                                      sw t0, 0(a0)
                                                                       
                                                                      li t0, (0xff << 0)
                                                                      li a0, LEDC_BASE + LEDC_WAIT_TIME0_CTRL_REG
                                                                      sw t0, 0(a0)
                                                                       
                                                                      li t0, 0
                                                                      li a0, LEDC_BASE + LEDC_DMA_CTRL_REG
                                                                      sw t0, 0(a0)
                                                                       
                                                                      li t0, 0
                                                                      li a0, LEDC_BASE + LEDC_INT_CTRL_REG
                                                                      sw t0, 0(a0)
                                                                   
                                                                      li t1, 0
                                                                      li t2, (1 << 12)
                                                                  0:
                                                                      li t0, (1 << 16) | (1 << 5) | (1 << 4) | (1 << 3) | (1 << 2) | (1 << 0)
                                                                      li a0, LEDC_BASE + LEDC_CTRL_REG
                                                                      sw t0, 0(a0)
                                                                   
                                                                      xor t1, t1, t2
                                                                      li a0, LEDC_BASE + LEDC_DATA_REG
                                                                      sw t1, 0(a0)
                                                                  1:
                                                                      li a0, LEDC_BASE + LEDC_INT_STS_REG
                                                                      lw t0, 0(a0)
                                                                      and t0, t0, 1
                                                                      beqz t0, 1b
                                                                      sw t0, 0(a0)
                                                                   
                                                                      li t0, _1S
                                                                      jal delay
                                                                      j 0b
                                                                   
                                                                  delay:
                                                                      addi t0, t0, -1
                                                                      bgtz t0, delay
                                                                      jr ra
                                                                      .end
                                                                  

                                                                   
                                                                  main.ld

                                                                  MEMORY {
                                                                      FLASH : ORIGIN = 0, LENGTH = 32M
                                                                  }
                                                                  
                                                                  SECTIONS {
                                                                      .text : { *(.text*) } > FLASH
                                                                      .rodata : { *(.rodata*) } > FLASH
                                                                      .bss : { *(.bss*) } > FLASH
                                                                  }
                                                                  

                                                                   
                                                                  gen_checksum.py

                                                                  import struct
                                                                  import os
                                                                   
                                                                  blocksize       = 0x4000
                                                                  stamp           = 0x5f0a6C39
                                                                  checksum_offset = 0x0c
                                                                  length_offset   = 0x10
                                                                  def pad_to_roundup(data: bytearray, boundary):
                                                                      excess = len(data) % boundary
                                                                      if excess:
                                                                          data += b'\0' * (boundary - excess)
                                                                   
                                                                  def main():
                                                                      # little endian + unsigned int 
                                                                      uint32iter = struct.Struct('<I')
                                                                      input_img = open(os.sys.argv[1], 'rb')
                                                                      rawbytes = bytearray(input_img.read())
                                                                      pad_to_roundup(rawbytes, blocksize)
                                                                      uint32iter.pack_into(rawbytes, checksum_offset, stamp)
                                                                      uint32iter.pack_into(rawbytes, length_offset, len(rawbytes))
                                                                      checksum = 0
                                                                      for uint32 in uint32iter.iter_unpack(rawbytes):
                                                                          checksum += uint32[0]
                                                                      uint32iter.pack_into(rawbytes, checksum_offset, checksum % (2**32))
                                                                      output_img = open(os.sys.argv[2], 'wb')
                                                                      output_img.write(rawbytes)
                                                                      output_img.close()
                                                                      input_img.close()
                                                                   
                                                                  if __name__ == '__main__':
                                                                      main()
                                                                  

                                                                   
                                                                  Makefile

                                                                  all:
                                                                  	riscv64-unknown-linux-gnu-as -o main.o main.s
                                                                  	riscv64-unknown-linux-gnu-ld -T main.ld -o main.elf main.o
                                                                  	riscv64-unknown-linux-gnu-objcopy -O binary main.elf tmp.bin
                                                                  	python3 gen_checksum.py tmp.bin main.bin
                                                                  
                                                                  run:
                                                                  	xfel ddr f133 && xfel write 0x40000000 main.bin && xfel exec 0x40000000
                                                                  
                                                                  clean:
                                                                  	rm -rf main.bin main.o main.elf tmp.bin
                                                                  

                                                                   
                                                                  連接 USB 到 PC

                                                                  $ lsusb
                                                                      Bus 002 Device 064: ID 1f3a:efe8 Onda (unverified) V972 tablet in flashing mode
                                                                  

                                                                   
                                                                  編譯

                                                                  $ make
                                                                      riscv64-unknown-linux-gnu-as -o main.o main.s
                                                                      riscv64-unknown-linux-gnu-ld -T main.ld -o main.elf main.o
                                                                      riscv64-unknown-linux-gnu-objcopy -O binary main.elf tmp.bin
                                                                      python3 gen_checksum.py tmp.bin main.bin
                                                                  

                                                                   
                                                                  下載

                                                                  $ sudo make run
                                                                      xfel ddr f133 && xfel write 0x40000000 main.bin && xfel exec 0x40000000
                                                                      100% [================================================] 16.000 KB, 383.004 KB/s
                                                                  

                                                                   
                                                                  完成
                                                                   
                                                                  12.jpg

                                                                  13.jpg
                                                                   
                                                                  開頭使用 0x4000006f,它是一個跳躍指令,因為第 4 個 Byte 後的資料會由 BROM 使用,至於司徒為何要保留長度 1024 (0x400)?因為 F133 的中斷向量總共有 223 個,中斷向量位址達到 0x380,因此,司徒就從 0x400 開始執行,至於 BROM 使用的資料格式,可以參考 https://github.com/Ouyancheng/FlatHeadBro/blob/master/boot0/boot0-header.c

                                                                  $ /opt/f133/bin/riscv64-unknown-linux-gnu-objdump -bbinary -mriscv:rv64 -D main.bin | head -n20
                                                                  
                                                                  main.bin:     file format binary
                                                                  
                                                                  
                                                                  Disassembly of section .data:
                                                                  
                                                                  0000000000000000 <.data>:
                                                                         0:    4000006f              j     0x400
                                                                         4:    4765                  li    a4,25
                                                                         6:    422e4e4f              fnmadd.d    ft8,ft8,ft2,fs0,rmm
                                                                         a:    3054                  fld   fa3,160(s0)
                                                                         c:    8c78                  0x8c78
                                                                         e:    9a24                  0x9a24
                                                                        10:    4000                  lw    s0,0(s0)
                                                                      ...
                                                                       3fe:    0000                  unimp
                                                                       400:    001002b7              lui   t0,0x100
                                                                       404:    02000537              lui   a0,0x2000
                                                                       408:    0c05051b              addiw a0,a0,192
                                                                       40c:    00552023              sw    t0,0(a0) # 0x2000000
                                                                  

                                                                   
                                                                  仔細的玩家應該可以發現,RISC-V 沒有 MIPS 的 Delay Slot,不需要在跳躍指令後面塞一個 nop 或者做指令排序,在開發 PSP 模擬器踩到的坑洞,看來 RISC-V 應該解決了,而所謂的 Delay Slot 指的就是如下狀況:

                                                                  lw   v0,4(v1)   # load word from address v1+4 into v0
                                                                  nop             # wasted load delay slot
                                                                  jr   v0         # jump to the address specified by v0
                                                                  nop             # wasted branch delay slot
                                                                  

                                                                  如果 jr 後面沒有插入 nop,則會跑飛,因為 jr 慢了一步執行(提取、解碼、執行),這種 Delay Slot 狀況是跟架構設計有關係,不過,司徒可以看到 RISC-V 的進步,真是感動流淚~

                                                                  1 Reply Last reply Reply Quote Share 1
                                                                  • Q
                                                                    qq1847123212 LV 3 last edited by

                                                                    看司徒大佬一直是用汇编分析,太牛了

                                                                    1 Reply Last reply Reply Quote Share 1
                                                                    • steward
                                                                      司徒 LV 6 last edited by steward

                                                                      UART 是嵌入式開發最常用來除錯的一個介面, 因此, 在開始移植 Boot Loader 或者 Linux Kernel 之前, 必須先確保 UART 可以正常工作, 接下來, 司徒將說明如何驗證 UART 的輸出功能, 目前司徒是直接在 PCB 上面焊上排針
                                                                      1.jpg
                                                                       
                                                                      接線方式
                                                                      2.jpg
                                                                       
                                                                      UART 連接到 PB2, PB3
                                                                      8.jpg
                                                                       
                                                                      PB2, PB3
                                                                      19.jpg
                                                                       
                                                                      GPIO Multiplex Function
                                                                      20.jpg
                                                                       
                                                                      CCU 位址
                                                                      3.jpg
                                                                       
                                                                      APB1 (HOSC 24MHz)
                                                                      4.jpg
                                                                       
                                                                      Baudrate Table (24MHz)
                                                                      5.jpg
                                                                       
                                                                      UART4 位址
                                                                      6.jpg
                                                                       
                                                                      UART 暫存器
                                                                      7.jpg
                                                                       
                                                                      main.s

                                                                          .global _start
                                                                       
                                                                          .equ CCU_BASE,   0x02001000
                                                                          .equ GPIO_BASE,  0x02000000
                                                                          .equ UART4_BASE, 0x02501000
                                                                       
                                                                          .equ PB_CFG0,      0x0030
                                                                          .equ UART_BGR_REG, 0x090c
                                                                       
                                                                          .equ RBR,  0x0000
                                                                          .equ THR,  0x0000
                                                                          .equ DLL,  0x0000
                                                                          .equ DLH,  0x0004
                                                                          .equ IER,  0x0004
                                                                          .equ IIR,  0x0008
                                                                          .equ LCR,  0x000c
                                                                          .equ MCR,  0x0010
                                                                          .equ LSR,  0x0014
                                                                          .equ USR,  0x007c
                                                                           
                                                                          .text
                                                                          .long 0x4000006f
                                                                          .byte 'e','G','O','N','.','B','T','0'
                                                                          .long 0x5F0A6C39
                                                                          .long 0x8000
                                                                          .long 0, 0
                                                                          .long 0, 0, 0, 0, 0, 0, 0, 0
                                                                          .long 0, 0, 0, 0, 0, 0, 0, 0
                                                                         
                                                                          .org 0x0400
                                                                      _start:
                                                                          li t0, 0x7700
                                                                          li a0, GPIO_BASE + PB_CFG0
                                                                          sw t0, 0(a0)
                                                                       
                                                                          li t0, (1 << 20) | (1 << 4)
                                                                          li a0, CCU_BASE + UART_BGR_REG
                                                                          sw t0, 0(a0)
                                                                       
                                                                          li t0, 0
                                                                          li a0, UART4_BASE + IER
                                                                          sw t0, 0(a0)
                                                                           
                                                                          li t0, 0
                                                                          li a0, UART4_BASE + MCR
                                                                          sw t0, 0(a0)
                                                                           
                                                                          li a0, UART4_BASE + LCR
                                                                          lw t0, 0(a0)
                                                                          li t1, (1 << 7)
                                                                          or t0, t0, t1
                                                                          sw t0, 0(a0)
                                                                       
                                                                          li t0, 13
                                                                          li a0, UART4_BASE + DLL
                                                                          sw t0, 0(a0)
                                                                           
                                                                          li t0, 0
                                                                          li a0, UART4_BASE + DLH
                                                                          sw t0, 0(a0)
                                                                           
                                                                          li a0, UART4_BASE + LCR
                                                                          lw t0, 0(a0)
                                                                          li t1, ~(1 << 7)
                                                                          and t0, t0, t1
                                                                          sw t0, 0(a0)
                                                                          lw t0, 0(a0)
                                                                          li t1, ~(0x1f)
                                                                          and t0, t0, t1
                                                                          li t1, 0x03
                                                                          or t0, t0, t1
                                                                          sw t0, 0(a0)
                                                                       
                                                                          la a1, hello
                                                                      0:
                                                                          li a0, UART4_BASE + LSR
                                                                          lw t0, 0(a0)
                                                                          li t1, (1 << 5)
                                                                          and t0, t0, t1
                                                                          beqz t0, 0b
                                                                       
                                                                          li t0, 0
                                                                          lb t0, 0(a1)
                                                                          li a0, UART4_BASE + THR
                                                                          sb t0, 0(a0)
                                                                       
                                                                          add a1, a1, 1
                                                                          bgtz t0, 0b
                                                                       
                                                                      1:
                                                                          j 1b
                                                                       
                                                                          .align
                                                                      hello: .asciz "Hello, world!"
                                                                          .end
                                                                      

                                                                       
                                                                      完成
                                                                      9.jpg
                                                                       
                                                                      不過, 目前小志掌機的外殼缺少 UART 洞口, 因此, 司徒基於暈哥的外殼, 使用 OpenSCAD 改造一下
                                                                       

                                                                      difference(){
                                                                          import("V20-bottom.stl");
                                                                          translate([-23, 10, -5]){
                                                                              cube([10, 10, 10]);
                                                                          }
                                                                      }
                                                                       
                                                                      translate([42.1, -4.5, -3]){
                                                                          cube([1.5, 3, 3]);
                                                                      }
                                                                      translate([42.1, 8.1, -3]){
                                                                          cube([1.5, 3, 3]);
                                                                      }
                                                                      

                                                                       
                                                                      UART位置
                                                                      10.jpg
                                                                       
                                                                      因為司徒的3D印表機精度不夠,只好補強音量鍵
                                                                      11.jpg
                                                                       
                                                                      3D印表機列印
                                                                      12.jpg
                                                                       
                                                                      還不錯
                                                                      13.jpg
                                                                       
                                                                      下邊
                                                                      14.jpg
                                                                       
                                                                      側邊
                                                                      15.jpg
                                                                       
                                                                      上邊
                                                                      16.jpg
                                                                       
                                                                      側邊
                                                                      17.jpg
                                                                       
                                                                      背面
                                                                      18.jpg

                                                                      1 Reply Last reply Reply Quote Share 2
                                                                      • L
                                                                        lovehex99 LV 5 @whycan last edited by

                                                                        @whycan 在 Gaviar Handheld (小志掌機) 中说:

                                                                        @steward 在 Gaviar Handheld (小志掌機) 中说:

                                                                        司徒這邊有一些想法, 或許可以參考一下

                                                                        收到司徒大佬的热心反馈,我和小伙伴商量一下,方便修改的地方预计下个版本就能改好。

                                                                        晕哥 到时套件能否卖有壳版本 没3D打印机

                                                                        xiaowenge 1 Reply Last reply Reply Quote Share 1
                                                                        • xiaowenge
                                                                          DOT小文哥 LV 8 @lovehex99 last edited by

                                                                          @lovehex99 在 Gaviar Handheld (小志掌機) 中说:

                                                                          @whycan 在 Gaviar Handheld (小志掌機) 中说:

                                                                          @steward 在 Gaviar Handheld (小志掌機) 中说:

                                                                          司徒這邊有一些想法, 或許可以參考一下

                                                                          收到司徒大佬的热心反馈,我和小伙伴商量一下,方便修改的地方预计下个版本就能改好。

                                                                          晕哥 到时套件能否卖有壳版本 没3D打印机

                                                                          会有的。而且根据过往的经验,会有一些商家或者学生,自己做一些外壳在淘宝或者闲鱼上卖的

                                                                          1 Reply Last reply Reply Quote Share 2
                                                                          • hsinyuwang
                                                                            hsinyuwang LV 6 last edited by

                                                                            司徒大佬,有没有可能移植一个RetroArch

                                                                            steward L 2 Replies Last reply Reply Quote Share 0
                                                                            • steward
                                                                              司徒 LV 6 @hsinyuwang last edited by

                                                                              @hsinyuwang
                                                                              RetroArch 本身支援 MIPS32, 因此, 有蠻大的機會可以移植給 RISC-V 使用, 只是目前移植 RetroArch 不在我們的計畫中, 之後如果有時間, 或許可以評估看看, 感謝你的建議~

                                                                              https://buildbot.libretro.com/nightly/dingux/
                                                                              1.jpg

                                                                              1 Reply Last reply Reply Quote Share 0
                                                                              • L
                                                                                lovehex99 LV 5 @hsinyuwang last edited by

                                                                                @hsinyuwang 在 Gaviar Handheld (小志掌機) 中说:

                                                                                司徒大佬,有没有可能移植一个RetroArch

                                                                                funkeys呢

                                                                                1 Reply Last reply Reply Quote Share 0
                                                                                • aldfaaa
                                                                                  whycan矿工-小叶 LV 7 last edited by

                                                                                  @steward 我们"爱搞机"小板块背后有着一大班热爱开源掌机的小伙伴社区期待着 司徒大佬 加入, 敢问司徒能加下QQ群吗?😊 😊 😊

                                                                                  1 Reply Last reply Reply Quote Share 0
                                                                                  • steward
                                                                                    司徒 LV 6 last edited by

                                                                                    @lovehex99
                                                                                    請問是移植 FunKeys 系統嗎?目前我們的重心都是放在驗證硬件的工作上, 而移植模擬器、系統是屬於比較後期的工作, 所以目前我們無法確定會移植哪些東西, 目前能確定的是 GNGEO 模擬器一定會移植, 因為那是目前用來驗證逆向工程的模擬器~

                                                                                    @aldfaaa
                                                                                    這板塊竟然還有 QQ 群, 厲害了~
                                                                                    司徒最近剛從撕逼群退出, 已經具備神龍護體、金剛不死之身, 你可以貼出 QQ群號, 讓我加入~

                                                                                    L aldfaaa 2 Replies Last reply Reply Quote Share 0
                                                                                    • L
                                                                                      lovehex99 LV 5 @steward last edited by

                                                                                      @steward 在 Gaviar Handheld (小志掌機) 中说:

                                                                                      @lovehex99
                                                                                      請問是移植 FunKeys 系統嗎?目前我們的重心都是放在驗證硬件的工作上, 而移植模擬器、系統是屬於比較後期的工作, 所以目前我們無法確定會移植哪些東西, 目前能確定的是 GNGEO 模擬器一定會移植, 因為那是目前用來驗證逆向工程的模擬器~

                                                                                      了解 反正能學到東西就好
                                                                                      因為自己本來想移植FunKeys 系統到IMX6 但不知如何下手
                                                                                      哈哈

                                                                                      steward 1 Reply Last reply Reply Quote Share 0
                                                                                      • steward
                                                                                        司徒 LV 6 @lovehex99 last edited by steward

                                                                                        @lovehex99
                                                                                        一般建議先去搞系統再去做移植, 感觸會比較深, 提供一些想法給你:

                                                                                        1. 將 FunKeys rootfs 替換到 i.MX6 上面 (解開覆蓋掉原本的)
                                                                                        2. 應該可以從 UART (serial port) 看到一些東西
                                                                                        3. 開始看看系統裡面有什麼東西, 破壞它
                                                                                        4. 如果 i.MX6 有 Framebuffer Driver, 你應該就可以看到顯示的畫面

                                                                                        做完上面的, 你這時候再去做移植或者重新編譯 OS, 將會有很深的體驗~

                                                                                        L 1 Reply Last reply Reply Quote Share 1
                                                                                        • L
                                                                                          lovehex99 LV 5 @steward last edited by

                                                                                          @steward 在 Gaviar Handheld (小志掌機) 中说:

                                                                                          @lovehex99
                                                                                          一般建議先去搞系統再去做移植, 感觸會比較深, 提供一些想法給你:

                                                                                          1. 將 FunKeys rootfs 替換到 i.MX6 上面 (解開覆蓋掉原本的)
                                                                                          2. 應該可以從 UART (serial port) 看到一些東西
                                                                                          3. 開始看看系統裡面有什麼東西, 破壞它
                                                                                          4. 如果 i.MX6 有 Framebuffer Driver, 你應該就可以看到顯示的畫面

                                                                                          做完上面的, 你這時候再去做移植或者重新編譯 OS, 將會有很深的體驗~

                                                                                          感謝分享

                                                                                          1 Reply Last reply Reply Quote Share 1
                                                                                          • aldfaaa
                                                                                            whycan矿工-小叶 LV 7 @steward last edited by

                                                                                            @steward "爱搞机" QQ群: 139642475
                                                                                            麻烦司徒高调点跟管理员打招呼~

                                                                                            L 1 Reply Last reply Reply Quote Share 1
                                                                                            • L
                                                                                              lovehex99 LV 5 @aldfaaa last edited by

                                                                                              @aldfaaa
                                                                                              @whycan 硬件啥時上架阿

                                                                                              whycan 1 Reply Last reply Reply Quote Share 0
                                                                                              • whycan
                                                                                                whycan晕哥 LV 9 @lovehex99 last edited by whycan

                                                                                                @lovehex99

                                                                                                3a627f25-4e75-4724-a439-b14c95063c05-image.png

                                                                                                过几天就可以了

                                                                                                L 1 Reply Last reply Reply Quote Share 1
                                                                                                • L
                                                                                                  lovehex99 LV 5 @whycan last edited by

                                                                                                  @whycan 在 Gaviar Handheld (小志掌機) 中说:

                                                                                                  @lovehex99

                                                                                                  3a627f25-4e75-4724-a439-b14c95063c05-image.png

                                                                                                  过几天就可以了

                                                                                                  好的 谢谢

                                                                                                  1 Reply Last reply Reply Quote Share 0
                                                                                                  • steward
                                                                                                    司徒 LV 6 last edited by steward

                                                                                                    司徒接下來介紹點屏的步驟,而在點屏之前,我們需要先了解一下屏的一些特性,這樣才可以跑順後面的開發,一般常說的 8080 屏、i80 屏、MCU 屏,指的就是傳輸資料的方式是使用 Intel 8080 的讀寫方式,其實早期是有兩大派別,分別是 Intel 8080 和 Motorola 6800,至於為何後來都用 Intel 8080,這應該不用多說,8080 和 6800 的格式可以從下圖知曉
                                                                                                    1.jpg
                                                                                                     
                                                                                                    那為何 i80 屏需要做初始化呢 ?因為裡面有專門用來做顯示處理的 MCU,因此,需要設定一些參數,如:width=320, height=240, fps=60 等參數,所以傳送給屏的資料會分成 Data 和 Command,當然,有些特殊制定規格的屏就不須要初始化,因為參數都已經寫死並且固定在 MCU 裡,不過,市面上比較難購買到這類產品
                                                                                                    2.jpg
                                                                                                    MCU 在顯示圖像時,會固定從 RAM(或稱呼:顯示記憶體、Graphic RAM、GRAM)讀取資料並顯示在屏上面
                                                                                                     
                                                                                                    那該如何初始化呢?目前市面上的屏大約可以分成兩種作法:1. 使用 DB0~DB15 傳送初始化 Data 和 Command, 2. 使用 I2C 傳送 Data 和 Command
                                                                                                    3.jpg
                                                                                                    兩種方式都可以達到初始化的目的,因此,在購買 i80 屏後,記得跟賣家索取初始化命令
                                                                                                     
                                                                                                    那問題來了,當我們正在刷屏(寫入 RAM)時,MCU 是否有可能正在讀取 RAM ?答案:沒錯,這種狀況一定會發生,假如寫入跟讀取沒有一個同步機制,那就會發生這種狀況,而這種狀況就是一般俗稱:撕裂、閃屏、Screen Tearing,司徒畫了一張流程圖,下圖是 MCU 讀取 RAM 並且顯示在屏上的流程
                                                                                                    4.jpg
                                                                                                     
                                                                                                    當 F133 透過 TCON_LCD i80 介面傳送資料給屏時(黃色的像素),由於共用同一塊 RAM,因此,RAM 的內容被更新成黃色,同時,屏的 MCU 也正在更新圖像到屏上,因此,變成第一個畫面(紅色)和第二個畫面(黃色)的交疊狀況,如下圖
                                                                                                    5.jpg
                                                                                                     
                                                                                                    那 i80 屏的撕裂問題如何解決呢?其實,一般 i80 屏都會拉出 TE/FRAME 腳位,這個腳位一般不使用,因為它跟時序高度相關,需要同步處理,同常 TE/FRAME 腳位都會懸空,不過,TE/FRAME 腳位其實是用來告知屏的 MCU 是否正在更新圖像(讀取 RAM),因此,為了避免撕裂,F133 TCON_LCD 可以在 MCU 空閒時,傳送更新的資料,這樣就可以避免撕裂
                                                                                                    6.jpg
                                                                                                     
                                                                                                    那是不是搞定 TE/FRAME 腳位後,屏就不會撕裂?答案:不是,因為,從模擬器、顯示驅動到硬件傳送都可能會有撕裂問題,所以要確保顯示品質,任何經過的地方都必須仔細處理才可以保證畫面不撕裂
                                                                                                    7.jpg
                                                                                                     
                                                                                                    根據司徒的經驗,在不同地方的所造成的撕裂,將會有不一樣的結果,下圖是司徒整理的有趣現象,模擬器因為是像素更新居多,因此,覆蓋一般是從起始像素開始,所以撕裂比較像是上下分層,而顯示驅動一般使用區塊複製,因此,撕裂是屬於左右分層,屏的撕裂,由於更新跟寫入是屬於追跑的現象,因此,撕裂屬於三角分層
                                                                                                    8.jpg
                                                                                                     
                                                                                                    LCD 電路
                                                                                                    9.jpg
                                                                                                    10.jpg
                                                                                                     
                                                                                                    main.s

                                                                                                        .global _start
                                                                                                     
                                                                                                        .equ GPIO_BASE,  0x02000000
                                                                                                        .equ PD_CFG0,    0x0090
                                                                                                        .equ PD_CFG1,    0x0094
                                                                                                        .equ PD_CFG2,    0x0098
                                                                                                        .equ PD_DAT,     0x00a0
                                                                                                     
                                                                                                        .equ LCD_RST,    (1 << 0)
                                                                                                        .equ LCD_WR,     (1 << 18)
                                                                                                        .equ LCD_RS,     (1 << 19)
                                                                                                        .equ LCD_RD,     (1 << 20)
                                                                                                        .equ LCD_CS,     (1 << 21)
                                                                                                        .equ LCD_BL,     (1 << 22)
                                                                                                     
                                                                                                        .equ _250MS,     50000000
                                                                                                        .equ _500MS,     100000000
                                                                                                        .equ _1S,        200000000
                                                                                                     
                                                                                                        .text
                                                                                                        .long 0x4000006f
                                                                                                        .byte 'e','G','O','N','.','B','T','0'
                                                                                                        .long 0x5F0A6C39
                                                                                                        .long 0x8000
                                                                                                        .long 0, 0
                                                                                                        .long 0, 0, 0, 0, 0, 0, 0, 0
                                                                                                        .long 0, 0, 0, 0, 0, 0, 0, 0
                                                                                                       
                                                                                                        .org 0x0400
                                                                                                    _start:
                                                                                                        li t0, 0x11111111
                                                                                                        li a0, GPIO_BASE + PD_CFG0
                                                                                                        sw t0, 0(a0)
                                                                                                        li a0, GPIO_BASE + PD_CFG1
                                                                                                        sw t0, 0(a0)
                                                                                                        li a0, GPIO_BASE + PD_CFG2
                                                                                                        sw t0, 0(a0)
                                                                                                     
                                                                                                        li t0, 0xffffffff
                                                                                                        li a0, GPIO_BASE + PD_DAT
                                                                                                        sw t0, 0(a0)
                                                                                                     
                                                                                                        jal lcd_rst
                                                                                                     
                                                                                                        li t0, 0xb2
                                                                                                        jal lcd_cmd
                                                                                                        li t0, 0x5c
                                                                                                        jal lcd_dat
                                                                                                        li t0, 0x5c
                                                                                                        jal lcd_dat
                                                                                                        li t0, 0x00
                                                                                                        jal lcd_dat
                                                                                                        li t0, 0x33
                                                                                                        jal lcd_dat
                                                                                                        li t0, 0x33
                                                                                                        jal lcd_dat
                                                                                                         
                                                                                                        li t0, 0xb7
                                                                                                        jal lcd_cmd
                                                                                                        li t0, 0x35
                                                                                                        jal lcd_dat
                                                                                                         
                                                                                                        li t0, 0x21
                                                                                                        jal lcd_cmd
                                                                                                         
                                                                                                        li t0, 0x11
                                                                                                        jal lcd_cmd
                                                                                                     
                                                                                                        li t0, _250MS
                                                                                                        jal delay
                                                                                                     
                                                                                                        li t0, 0xe0
                                                                                                        jal lcd_cmd
                                                                                                        li t0, 0xd0
                                                                                                        jal lcd_dat
                                                                                                        li t0, 0x06
                                                                                                        jal lcd_dat
                                                                                                        li t0, 0x0b
                                                                                                        jal lcd_dat
                                                                                                        li t0, 0x07
                                                                                                        jal lcd_dat
                                                                                                        li t0, 0x07
                                                                                                        jal lcd_dat
                                                                                                        li t0, 0x24
                                                                                                        jal lcd_dat
                                                                                                        li t0, 0x2e
                                                                                                        jal lcd_dat
                                                                                                        li t0, 0x32
                                                                                                        jal lcd_dat
                                                                                                        li t0, 0x46
                                                                                                        jal lcd_dat
                                                                                                        li t0, 0x37
                                                                                                        jal lcd_dat
                                                                                                        li t0, 0x13
                                                                                                        jal lcd_dat
                                                                                                        li t0, 0x13
                                                                                                        jal lcd_dat
                                                                                                        li t0, 0x2d
                                                                                                        jal lcd_dat
                                                                                                        li t0, 0x33
                                                                                                        jal lcd_dat
                                                                                                         
                                                                                                        li t0, 0xe1
                                                                                                        jal lcd_cmd
                                                                                                        li t0, 0xd0
                                                                                                        jal lcd_dat
                                                                                                        li t0, 0x02
                                                                                                        jal lcd_dat
                                                                                                        li t0, 0x06
                                                                                                        jal lcd_dat
                                                                                                        li t0, 0x09
                                                                                                        jal lcd_dat
                                                                                                        li t0, 0x08
                                                                                                        jal lcd_dat
                                                                                                        li t0, 0x05
                                                                                                        jal lcd_dat
                                                                                                        li t0, 0x29
                                                                                                        jal lcd_dat
                                                                                                        li t0, 0x44
                                                                                                        jal lcd_dat
                                                                                                        li t0, 0x42
                                                                                                        jal lcd_dat
                                                                                                        li t0, 0x38
                                                                                                        jal lcd_dat
                                                                                                        li t0, 0x14
                                                                                                        jal lcd_dat
                                                                                                        li t0, 0x14
                                                                                                        jal lcd_dat
                                                                                                        li t0, 0x2a
                                                                                                        jal lcd_dat
                                                                                                        li t0, 0x30
                                                                                                        jal lcd_dat
                                                                                                         
                                                                                                        li t0, 0x36
                                                                                                        jal lcd_cmd
                                                                                                        li t0, 0xb0
                                                                                                        jal lcd_dat
                                                                                                         
                                                                                                        li t0, 0x2a
                                                                                                        jal lcd_cmd
                                                                                                        li t0, 0x00
                                                                                                        jal lcd_dat
                                                                                                        li t0, 0x00
                                                                                                        jal lcd_dat
                                                                                                        li t0, 0x01
                                                                                                        jal lcd_dat
                                                                                                        li t0, 0x3f
                                                                                                        jal lcd_dat
                                                                                                         
                                                                                                        li t0, 0x2b
                                                                                                        jal lcd_cmd
                                                                                                        li t0, 0x00
                                                                                                        jal lcd_dat
                                                                                                        li t0, 0x00
                                                                                                        jal lcd_dat
                                                                                                        li t0, 0x00
                                                                                                        jal lcd_dat
                                                                                                        li t0, 0xef
                                                                                                        jal lcd_dat
                                                                                                         
                                                                                                        li t0, 0x3a
                                                                                                        jal lcd_cmd
                                                                                                        li t0, 0x55
                                                                                                        jal lcd_dat
                                                                                                     
                                                                                                        li t0, 0x29
                                                                                                        jal lcd_cmd
                                                                                                         
                                                                                                        li t0, 0x2c
                                                                                                        jal lcd_cmd
                                                                                                     
                                                                                                        li t6, 320 * 80
                                                                                                    red:
                                                                                                        li t0, 0xf800
                                                                                                        jal lcd_dat
                                                                                                        addi t6, t6, -1
                                                                                                        bgtz t6, red
                                                                                                         
                                                                                                        li t6, 320 * 80
                                                                                                    green:
                                                                                                        li t0, 0x7e0
                                                                                                        jal lcd_dat
                                                                                                        addi t6, t6, -1
                                                                                                        bgtz t6, green
                                                                                                         
                                                                                                        li t6, 320 * 80
                                                                                                    blue:
                                                                                                        li t0, 0x1f
                                                                                                        jal lcd_dat
                                                                                                        addi t6, t6, -1
                                                                                                        bgtz t6, blue
                                                                                                    1:
                                                                                                        j 1b
                                                                                                     
                                                                                                    lcd_wr:
                                                                                                        li a0, GPIO_BASE + PD_DAT
                                                                                                     
                                                                                                        li t4, 0x00ff
                                                                                                        and t2, t0, t4
                                                                                                        li t4, 0xff00
                                                                                                        and t3, t0, t4
                                                                                                        sll t2, t2, 1
                                                                                                        sll t3, t3, 2
                                                                                                     
                                                                                                        move t5, t1
                                                                                                        or t5, t5, t2
                                                                                                        or t5, t5, t3
                                                                                                        sw t5, 0(a0)
                                                                                                     
                                                                                                        li t0, LCD_WR
                                                                                                        or t5, t5, t0
                                                                                                        sw t5, 0(a0)
                                                                                                        jr ra
                                                                                                     
                                                                                                    lcd_dat:
                                                                                                        move a1, ra
                                                                                                        li t1, LCD_RS | LCD_RD | LCD_BL | LCD_RST
                                                                                                        jal lcd_wr
                                                                                                        jr a1
                                                                                                     
                                                                                                    lcd_cmd:
                                                                                                        move a1, ra
                                                                                                        li t1, LCD_RD | LCD_BL | LCD_RST
                                                                                                        jal lcd_wr
                                                                                                        jr a1
                                                                                                     
                                                                                                    lcd_rst:
                                                                                                        move a1, ra
                                                                                                        li t0, 0x00000000
                                                                                                        li a0, GPIO_BASE + PD_DAT
                                                                                                        sw t0, 0(a0)
                                                                                                     
                                                                                                        li t0, _250MS
                                                                                                        jal delay
                                                                                                     
                                                                                                        li t0, 0xffffffff
                                                                                                        li a0, GPIO_BASE + PD_DAT
                                                                                                        sw t0, 0(a0)
                                                                                                     
                                                                                                        li t0, _250MS
                                                                                                        jal delay
                                                                                                        jr a1
                                                                                                     
                                                                                                    delay:
                                                                                                        addi t0, t0, -1
                                                                                                        bgtz t0, delay
                                                                                                        jr ra
                                                                                                        .end
                                                                                                    

                                                                                                     
                                                                                                    完成
                                                                                                    11.jpg

                                                                                                    Y 1 Reply Last reply Reply Quote Share 0
                                                                                                    • hsinyuwang
                                                                                                      hsinyuwang LV 6 last edited by

                                                                                                      @steward 那这个屏没有TE脚,传送过程的撕裂还有办法解决吗
                                                                                                      20180213231002635.gif

                                                                                                      steward 1 Reply Last reply Reply Quote Share 1
                                                                                                      • steward
                                                                                                        司徒 LV 6 @hsinyuwang last edited by steward

                                                                                                        @hsinyuwang
                                                                                                        你這個 GIF 圖片是相當好的展示 💃💃

                                                                                                        如果沒有 TE 腳位, 但要解決閃屏, 難度比較高一點, 不過還是有機會, 只是需要依靠觀察做微調, 幾個建議提供給你參考:

                                                                                                        1. 屏的初始化步驟到第一筆送出的像素必須固定住時間
                                                                                                        2. 傳送像素完成後, 中斷的處理必須固定住時間
                                                                                                        3. 利用 0x2c Command 去抓延遲間隔(每個 Frame 的間隔)

                                                                                                        依據這樣微調, 你有機會可以解決閃屏, 但是, 你如果是跑 Linux 系統, 難度就很高, 因為你應該是會被 Context Switch, 時間固定不住, RTOS 就有機會, 然後, MCU 在每片屏上的時間差異, 還需要考慮~

                                                                                                        1 Reply Last reply Reply Quote Share 0
                                                                                                        • steward
                                                                                                          司徒 LV 6 last edited by

                                                                                                          司徒接著說明如何驗證按鍵功能,不過,在進行按鍵驗證之前,我們必須先了解一下按鍵的一些細節,這樣才會更了解按鍵特性,一般掌機使用的按鍵,大部分都是使用十字鍵、4 個功能鍵、SELECT、START、L、R 等按鍵,這也是早期 Nintendo 掌機的標準配備,而用來耦合按鍵和 PCB 的橋樑則是以導電膠、鍋仔片為大宗,這些看似簡單的東西,其實背後隱藏的許多設計的小細節,司徒嘗試來解說一下過程,下圖是 NDSL 掌機的 PCB 圖片
                                                                                                          1.jpg
                                                                                                          從上圖可以發現一個設計小細節,十字鍵的 PCB 缺口,它的長相跟 4 個功能鍵並不一致,這是因為十字鍵是連通按鍵(上下左右連在一起),而 4 個功能鍵則是各自分開的按鍵,因此,當十字鍵的其中一個方向被按下時,其餘方向也會受影響,因此 PCB 設計必須做些保護措施,避免鬼鍵的問題發生
                                                                                                           
                                                                                                          司徒使用如下圖片說明一下鬼鍵發生的過程,當十字鍵的下方向被按下時,左、右方向的按鍵也會稍微往下傾斜,所以最壞的情況下,系統將會收到下、左、右三個按鍵的訊息
                                                                                                          2.jpg
                                                                                                           
                                                                                                          十字鍵正常位置
                                                                                                          3.jpg
                                                                                                           
                                                                                                          下方鍵被按下時,左、右方向的按鍵也往下傾斜,說明導電膠會有誤觸到 PCB 的狀況發生
                                                                                                          4.jpg
                                                                                                           
                                                                                                          因此,為了避免十字鍵的鬼鍵問題,十字鍵的 PCB 缺口必須依照方向做適當排列,這樣就可以避免誤觸的問題,如下圖所示,十字鍵的左右按鍵會設計成上下導通,而十字鍵的上下按鍵則會設計成左右導通
                                                                                                          5.jpg
                                                                                                           
                                                                                                          至於鍋仔片,由於導通點是位於中央,因此,十字鍵的鬼鍵問題得以改善
                                                                                                          6.jpg
                                                                                                          7.jpg
                                                                                                           
                                                                                                          下圖是小志掌機使用的按鍵,由於按壓力道需要比較用力,因此,這種按鍵比較少用於掌機,不過,如果使用此類的按鍵,則需要注意彈跳的問題
                                                                                                          8.jpg
                                                                                                           
                                                                                                          一般按鍵使用彈片做導通,如下所示
                                                                                                          9.jpg
                                                                                                           
                                                                                                          因此,按下或者放開時,會有一段不穩定的彈跳時間,如下圖所示,這就是一般按鍵的彈跳問題
                                                                                                          10.jpg
                                                                                                           
                                                                                                          針對軟體的解法,可以延遲一段時間後,一般是 10ms,接著再判斷按鍵是否確實被按下
                                                                                                          11.jpg
                                                                                                           
                                                                                                          針對硬體的解法,最常見到的作法就是 RC 濾波,在按鍵旁邊加上電容,基於 10ms 計算,最常使用的是:10K 電阻 + 1uF 電容、47K 電阻 + 220nF 電容,透過電容的充、放電效應,來修飾爬升曲線
                                                                                                          12.jpg
                                                                                                          市面上,有些晶片已經有內建 Debounce 功能,這樣就可以很方便解決按鍵彈跳問題
                                                                                                           
                                                                                                          當然,有些掌機會使用類比搖桿當作十字鍵使用,如:Caanoo 掌機(類比電阻)、Neo Geo Pocket 掌機(4 顆按鍵),如果是使用 4 顆按鍵則可以使用如上的彈跳解法,但是,如果是使用類比電阻,則需要加入 Dead Zone 判斷,避免漂移問題
                                                                                                          13.jpg
                                                                                                           
                                                                                                          Dead Zone 一般用於無效區域設定,當類比搖桿的移動是處於這些區域時,則不會發送任何移動訊號,而類比搖桿最常遇到就是靜止不動時,搖桿自動漂移(鬼鍵問題),因此,如果使用類比搖桿當作十字鍵使用時,記得加入 Dead Zone 判斷,避免漂移問題發生
                                                                                                          15.jpg
                                                                                                          14.jpg
                                                                                                           
                                                                                                          按鍵電路
                                                                                                          16.jpg
                                                                                                           
                                                                                                          ASCII 字型
                                                                                                          17.jpg
                                                                                                           
                                                                                                          對應按鍵
                                                                                                          18.jpg
                                                                                                           
                                                                                                          main.s

                                                                                                              .global _start
                                                                                                           
                                                                                                              .equ GPIO_BASE,  0x02000000
                                                                                                              .equ PD_CFG0,    0x0090
                                                                                                              .equ PD_CFG1,    0x0094
                                                                                                              .equ PD_CFG2,    0x0098
                                                                                                              .equ PD_DAT,     0x00a0
                                                                                                              .equ PE_CFG0,    0x00c0
                                                                                                              .equ PE_CFG1,    0x00c4
                                                                                                              .equ PE_DAT,     0x00d0
                                                                                                           
                                                                                                              .equ LCD_RST,    (1 << 0)
                                                                                                              .equ LCD_WR,     (1 << 18)
                                                                                                              .equ LCD_RS,     (1 << 19)
                                                                                                              .equ LCD_RD,     (1 << 20)
                                                                                                              .equ LCD_CS,     (1 << 21)
                                                                                                              .equ LCD_BL,     (1 << 22)
                                                                                                           
                                                                                                              .equ _250MS,     50000000
                                                                                                              .equ _500MS,     100000000
                                                                                                              .equ _1S,        200000000
                                                                                                              .equ BG,         0x0000
                                                                                                              .equ FG,         0xffff
                                                                                                           
                                                                                                              .text
                                                                                                              .long 0x4000006f
                                                                                                              .byte 'e','G','O','N','.','B','T','0'
                                                                                                              .long 0x5F0A6C39
                                                                                                              .long 0x8000
                                                                                                              .long 0, 0
                                                                                                              .long 0, 0, 0, 0, 0, 0, 0, 0
                                                                                                              .long 0, 0, 0, 0, 0, 0, 0, 0
                                                                                                             
                                                                                                              .org 0x0400
                                                                                                          _start:
                                                                                                              li t0, 0x00000000
                                                                                                              li a0, GPIO_BASE + PE_CFG0
                                                                                                              sw t0, 0(a0)
                                                                                                              li a0, GPIO_BASE + PE_CFG1
                                                                                                              sw t0, 0(a0)
                                                                                                           
                                                                                                              li t0, 0x11111111
                                                                                                              li a0, GPIO_BASE + PD_CFG0
                                                                                                              sw t0, 0(a0)
                                                                                                              li a0, GPIO_BASE + PD_CFG1
                                                                                                              sw t0, 0(a0)
                                                                                                              li a0, GPIO_BASE + PD_CFG2
                                                                                                              sw t0, 0(a0)
                                                                                                           
                                                                                                              li t0, 0xffffffff
                                                                                                              li a0, GPIO_BASE + PD_DAT
                                                                                                              sw t0, 0(a0)
                                                                                                           
                                                                                                              jal lcd_rst
                                                                                                           
                                                                                                              li t0, 0xb2
                                                                                                              jal lcd_cmd
                                                                                                              li t0, 0x5c
                                                                                                              jal lcd_dat
                                                                                                              li t0, 0x5c
                                                                                                              jal lcd_dat
                                                                                                              li t0, 0x00
                                                                                                              jal lcd_dat
                                                                                                              li t0, 0x33
                                                                                                              jal lcd_dat
                                                                                                              li t0, 0x33
                                                                                                              jal lcd_dat
                                                                                                               
                                                                                                              li t0, 0xb7
                                                                                                              jal lcd_cmd
                                                                                                              li t0, 0x35
                                                                                                              jal lcd_dat
                                                                                                               
                                                                                                              li t0, 0x21
                                                                                                              jal lcd_cmd
                                                                                                               
                                                                                                              li t0, 0x11
                                                                                                              jal lcd_cmd
                                                                                                           
                                                                                                              li t0, _250MS
                                                                                                              jal delay
                                                                                                           
                                                                                                              li t0, 0xe0
                                                                                                              jal lcd_cmd
                                                                                                              li t0, 0xd0
                                                                                                              jal lcd_dat
                                                                                                              li t0, 0x06
                                                                                                              jal lcd_dat
                                                                                                              li t0, 0x0b
                                                                                                              jal lcd_dat
                                                                                                              li t0, 0x07
                                                                                                              jal lcd_dat
                                                                                                              li t0, 0x07
                                                                                                              jal lcd_dat
                                                                                                              li t0, 0x24
                                                                                                              jal lcd_dat
                                                                                                              li t0, 0x2e
                                                                                                              jal lcd_dat
                                                                                                              li t0, 0x32
                                                                                                              jal lcd_dat
                                                                                                              li t0, 0x46
                                                                                                              jal lcd_dat
                                                                                                              li t0, 0x37
                                                                                                              jal lcd_dat
                                                                                                              li t0, 0x13
                                                                                                              jal lcd_dat
                                                                                                              li t0, 0x13
                                                                                                              jal lcd_dat
                                                                                                              li t0, 0x2d
                                                                                                              jal lcd_dat
                                                                                                              li t0, 0x33
                                                                                                              jal lcd_dat
                                                                                                               
                                                                                                              li t0, 0xe1
                                                                                                              jal lcd_cmd
                                                                                                              li t0, 0xd0
                                                                                                              jal lcd_dat
                                                                                                              li t0, 0x02
                                                                                                              jal lcd_dat
                                                                                                              li t0, 0x06
                                                                                                              jal lcd_dat
                                                                                                              li t0, 0x09
                                                                                                              jal lcd_dat
                                                                                                              li t0, 0x08
                                                                                                              jal lcd_dat
                                                                                                              li t0, 0x05
                                                                                                              jal lcd_dat
                                                                                                              li t0, 0x29
                                                                                                              jal lcd_dat
                                                                                                              li t0, 0x44
                                                                                                              jal lcd_dat
                                                                                                              li t0, 0x42
                                                                                                              jal lcd_dat
                                                                                                              li t0, 0x38
                                                                                                              jal lcd_dat
                                                                                                              li t0, 0x14
                                                                                                              jal lcd_dat
                                                                                                              li t0, 0x14
                                                                                                              jal lcd_dat
                                                                                                              li t0, 0x2a
                                                                                                              jal lcd_dat
                                                                                                              li t0, 0x30
                                                                                                              jal lcd_dat
                                                                                                               
                                                                                                              li t0, 0x36
                                                                                                              jal lcd_cmd
                                                                                                              li t0, 0xb0
                                                                                                              jal lcd_dat
                                                                                                               
                                                                                                              li t0, 0x2a
                                                                                                              jal lcd_cmd
                                                                                                              li t0, 0x00
                                                                                                              jal lcd_dat
                                                                                                              li t0, 0x00
                                                                                                              jal lcd_dat
                                                                                                              li t0, 0x01
                                                                                                              jal lcd_dat
                                                                                                              li t0, 0x3f
                                                                                                              jal lcd_dat
                                                                                                               
                                                                                                              li t0, 0x2b
                                                                                                              jal lcd_cmd
                                                                                                              li t0, 0x00
                                                                                                              jal lcd_dat
                                                                                                              li t0, 0x00
                                                                                                              jal lcd_dat
                                                                                                              li t0, 0x00
                                                                                                              jal lcd_dat
                                                                                                              li t0, 0xef
                                                                                                              jal lcd_dat
                                                                                                               
                                                                                                              li t0, 0x3a
                                                                                                              jal lcd_cmd
                                                                                                              li t0, 0x55
                                                                                                              jal lcd_dat
                                                                                                           
                                                                                                              li t0, 0x29
                                                                                                              jal lcd_cmd
                                                                                                               
                                                                                                              li t0, 0x2c
                                                                                                              jal lcd_cmd
                                                                                                           
                                                                                                          loop:
                                                                                                              li a0, GPIO_BASE + PE_DAT
                                                                                                              lw t0, 0(a0)
                                                                                                           
                                                                                                              li t1, (1 << 0)
                                                                                                              and t1, t1, t0
                                                                                                              bgtz t1, 0f
                                                                                                              li t0, 30
                                                                                                              j draw
                                                                                                          0:
                                                                                                              li t1, (1 << 7)
                                                                                                              and t1, t1, t0
                                                                                                              bgtz t1, 1f
                                                                                                              li t0, 31
                                                                                                              j draw
                                                                                                          1:
                                                                                                              li t1, (1 << 4)
                                                                                                              and t1, t1, t0
                                                                                                              bgtz t1, 2f
                                                                                                              li t0, 16
                                                                                                              j draw
                                                                                                          2:
                                                                                                              li t1, (1 << 6)
                                                                                                              and t1, t1, t0
                                                                                                              bgtz t1, 3f
                                                                                                              li t0, 17
                                                                                                              j draw
                                                                                                          3:
                                                                                                              li t1, (1 << 12)
                                                                                                              and t1, t1, t0
                                                                                                              bgtz t1, 4f
                                                                                                              li t0, 'B'
                                                                                                              j draw
                                                                                                          4:
                                                                                                              li t1, (1 << 11)
                                                                                                              and t1, t1, t0
                                                                                                              bgtz t1, 5f
                                                                                                              li t0, 'X'
                                                                                                              j draw
                                                                                                          5:
                                                                                                              li t1, (1 << 1)
                                                                                                              and t1, t1, t0
                                                                                                              bgtz t1, 6f
                                                                                                              li t0, 'L'
                                                                                                              j draw
                                                                                                          6:
                                                                                                              li t1, (1 << 10)
                                                                                                              and t1, t1, t0
                                                                                                              bgtz t1, 7f
                                                                                                              li t0, 'R'
                                                                                                              j draw
                                                                                                          7:
                                                                                                              li t1, (1 << 2)
                                                                                                              and t1, t1, t0
                                                                                                              bgtz t1, 8f
                                                                                                              li t0, 'Y'
                                                                                                              j draw
                                                                                                          8:
                                                                                                              li t1, (1 << 9)
                                                                                                              and t1, t1, t0
                                                                                                              bgtz t1, 9f
                                                                                                              li t0, 'T'
                                                                                                              j draw
                                                                                                          9:
                                                                                                              li t1, (1 << 8)
                                                                                                              and t1, t1, t0
                                                                                                              bgtz t1, 10f
                                                                                                              li t0, 'S'
                                                                                                              j draw
                                                                                                          10:
                                                                                                              li t1, (1 << 3)
                                                                                                              and t1, t1, t0
                                                                                                              bgtz t1, 11f
                                                                                                              li t0, 'M'
                                                                                                              j draw
                                                                                                          11:
                                                                                                              li t1, (1 << 13)
                                                                                                              and t1, t1, t0
                                                                                                              bgtz t1, 12f
                                                                                                              li t0, 'A'
                                                                                                              j draw
                                                                                                          12:
                                                                                                              li x8, 0
                                                                                                              li x9, 0
                                                                                                              jal set_pos
                                                                                                           
                                                                                                              li t6, 320 * 240
                                                                                                          bg:
                                                                                                              li t0, BG
                                                                                                              jal lcd_dat
                                                                                                              addi t6, t6, -1
                                                                                                              bgtz t6, bg
                                                                                                           
                                                                                                              li t0, _250MS
                                                                                                              jal delay
                                                                                                              j loop
                                                                                                           
                                                                                                          draw:
                                                                                                              sll t0, t0, 3
                                                                                                              la a3, font
                                                                                                              add a3, a3, t0
                                                                                                              li t6, 8
                                                                                                              li x8, 135
                                                                                                              li x9, 100
                                                                                                          nbyte:
                                                                                                              li t5, 8
                                                                                                              lb a4, 0(a3)
                                                                                                              jal set_pos
                                                                                                          byte:
                                                                                                              li t1, 0x80
                                                                                                              and t0, a4, t1
                                                                                                              sll a4, a4, 1
                                                                                                              beqz t0, w0
                                                                                                          w1:
                                                                                                              li t0, FG
                                                                                                              jal lcd_dat
                                                                                                              li t0, FG
                                                                                                              jal lcd_dat
                                                                                                              li t0, FG
                                                                                                              jal lcd_dat
                                                                                                              li t0, FG
                                                                                                              jal lcd_dat
                                                                                                              j next
                                                                                                          w0:
                                                                                                              li t0, BG
                                                                                                              jal lcd_dat
                                                                                                              li t0, BG
                                                                                                              jal lcd_dat
                                                                                                              li t0, BG
                                                                                                              jal lcd_dat
                                                                                                              li t0, BG
                                                                                                              jal lcd_dat
                                                                                                          next:
                                                                                                              addi t5, t5, -1
                                                                                                              bgtz t5, byte
                                                                                                           
                                                                                                              add a3, a3, 1
                                                                                                              add x9, x9, 2
                                                                                                              addi t6, t6, -1
                                                                                                              bgtz t6, nbyte
                                                                                                              j loop
                                                                                                           
                                                                                                          set_pos:
                                                                                                              move a2, ra
                                                                                                              li t0, 0x2a
                                                                                                              jal lcd_cmd
                                                                                                              li t0, 0
                                                                                                              jal lcd_dat
                                                                                                              move t0, x8
                                                                                                              jal lcd_dat
                                                                                                           
                                                                                                              li t0, 0x2b
                                                                                                              jal lcd_cmd
                                                                                                              li t0, 0
                                                                                                              jal lcd_dat
                                                                                                              move t0, x9
                                                                                                              jal lcd_dat
                                                                                                           
                                                                                                              li t0, 0x2c
                                                                                                              jal lcd_cmd
                                                                                                              jr a2
                                                                                                           
                                                                                                          lcd_wr:
                                                                                                              li a0, GPIO_BASE + PD_DAT
                                                                                                           
                                                                                                              li t4, 0x00ff
                                                                                                              and t2, t0, t4
                                                                                                              li t4, 0xff00
                                                                                                              and t3, t0, t4
                                                                                                              sll t2, t2, 1
                                                                                                              sll t3, t3, 2
                                                                                                           
                                                                                                              move t4, t1
                                                                                                              or t4, t4, t2
                                                                                                              or t4, t4, t3
                                                                                                              sw t4, 0(a0)
                                                                                                           
                                                                                                              li t0, LCD_WR
                                                                                                              or t4, t4, t0
                                                                                                              sw t4, 0(a0)
                                                                                                              jr ra
                                                                                                           
                                                                                                          lcd_dat:
                                                                                                              move a1, ra
                                                                                                              li t1, LCD_RS | LCD_RD | LCD_BL | LCD_RST
                                                                                                              jal lcd_wr
                                                                                                              jr a1
                                                                                                           
                                                                                                          lcd_cmd:
                                                                                                              move a1, ra
                                                                                                              li t1, LCD_RD | LCD_BL | LCD_RST
                                                                                                              jal lcd_wr
                                                                                                              jr a1
                                                                                                           
                                                                                                          lcd_rst:
                                                                                                              move a1, ra
                                                                                                              li t0, 0x00000000
                                                                                                              li a0, GPIO_BASE + PD_DAT
                                                                                                              sw t0, 0(a0)
                                                                                                           
                                                                                                              li t0, _250MS
                                                                                                              jal delay
                                                                                                           
                                                                                                              li t0, 0xffffffff
                                                                                                              li a0, GPIO_BASE + PD_DAT
                                                                                                              sw t0, 0(a0)
                                                                                                           
                                                                                                              li t0, _250MS
                                                                                                              jal delay
                                                                                                              jr a1
                                                                                                           
                                                                                                          delay:
                                                                                                              addi t0, t0, -1
                                                                                                              bgtz t0, delay
                                                                                                              jr ra
                                                                                                           
                                                                                                          font:
                                                                                                              .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
                                                                                                              .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
                                                                                                              .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
                                                                                                              .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
                                                                                                              .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
                                                                                                              .byte 0x3C,0x42,0x99,0xBD,0xBD,0x99,0x42,0x3C,0x3C,0x42,0x81,0x81,0x81,0x81,0x42,0x3C
                                                                                                              .byte 0xFE,0x82,0x8A,0xD2,0xA2,0x82,0xFE,0x00,0xFE,0x82,0x82,0x82,0x82,0x82,0xFE,0x00
                                                                                                              .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x38,0x64,0x74,0x7C,0x38,0x00,0x00
                                                                                                              .byte 0x80,0xC0,0xF0,0xFC,0xF0,0xC0,0x80,0x00,0x01,0x03,0x0F,0x3F,0x0F,0x03,0x01,0x00
                                                                                                              .byte 0x18,0x3C,0x7E,0x18,0x7E,0x3C,0x18,0x00,0xEE,0xEE,0xEE,0xCC,0x00,0xCC,0xCC,0x00
                                                                                                              .byte 0x00,0x00,0x30,0x68,0x78,0x30,0x00,0x00,0x00,0x38,0x64,0x74,0x7C,0x38,0x00,0x00
                                                                                                              .byte 0x3C,0x66,0x7A,0x7A,0x7E,0x7E,0x3C,0x00,0x0E,0x3E,0x3A,0x22,0x26,0x6E,0xE4,0x40
                                                                                                              .byte 0x18,0x3C,0x7E,0x3C,0x3C,0x3C,0x3C,0x00,0x3C,0x3C,0x3C,0x3C,0x7E,0x3C,0x18,0x00
                                                                                                              .byte 0x08,0x7C,0x7E,0x7E,0x7C,0x08,0x00,0x00,0x10,0x3E,0x7E,0x7E,0x3E,0x10,0x00,0x00
                                                                                                              .byte 0x58,0x2A,0xDC,0xC8,0xDC,0x2A,0x58,0x00,0x24,0x66,0xFF,0xFF,0x66,0x24,0x00,0x00
                                                                                                              .byte 0x00,0x10,0x10,0x38,0x38,0x7C,0xFE,0x00,0xFE,0x7C,0x38,0x38,0x10,0x10,0x00,0x00
                                                                                                              .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1C,0x1C,0x1C,0x18,0x00,0x18,0x18,0x00
                                                                                                              .byte 0x6C,0x6C,0x24,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x7C,0x28,0x7C,0x28,0x00,0x00
                                                                                                              .byte 0x10,0x38,0x60,0x38,0x0C,0x78,0x10,0x00,0x40,0xA4,0x48,0x10,0x24,0x4A,0x04,0x00
                                                                                                              .byte 0x18,0x34,0x18,0x3A,0x6C,0x66,0x3A,0x00,0x18,0x18,0x20,0x00,0x00,0x00,0x00,0x00
                                                                                                              .byte 0x30,0x60,0x60,0x60,0x60,0x60,0x30,0x00,0x0C,0x06,0x06,0x06,0x06,0x06,0x0C,0x00
                                                                                                              .byte 0x10,0x54,0x38,0x7C,0x38,0x54,0x10,0x00,0x00,0x18,0x18,0x7E,0x18,0x18,0x00,0x00
                                                                                                              .byte 0x00,0x00,0x00,0x00,0x18,0x18,0x30,0x00,0x00,0x00,0x00,0x00,0x3E,0x00,0x00,0x00
                                                                                                              .byte 0x00,0x00,0x00,0x00,0x18,0x18,0x00,0x00,0x00,0x04,0x08,0x10,0x20,0x40,0x00,0x00
                                                                                                              .byte 0x38,0x4C,0xC6,0xC6,0xC6,0x64,0x38,0x00,0x18,0x38,0x18,0x18,0x18,0x18,0x7E,0x00
                                                                                                              .byte 0x7C,0xC6,0x0E,0x3C,0x78,0xE0,0xFE,0x00,0x7E,0x0C,0x18,0x3C,0x06,0xC6,0x7C,0x00
                                                                                                              .byte 0x1C,0x3C,0x6C,0xCC,0xFE,0x0C,0x0C,0x00,0xFC,0xC0,0xFC,0x06,0x06,0xC6,0x7C,0x00
                                                                                                              .byte 0x3C,0x60,0xC0,0xFC,0xC6,0xC6,0x7C,0x00,0xFE,0xC6,0x0C,0x18,0x30,0x30,0x30,0x00
                                                                                                              .byte 0x78,0xC4,0xE4,0x78,0x86,0x86,0x7C,0x00,0x7C,0xC6,0xC6,0x7E,0x06,0x0C,0x78,0x00
                                                                                                              .byte 0x00,0x00,0x18,0x00,0x00,0x18,0x00,0x00,0x00,0x00,0x18,0x00,0x00,0x18,0x18,0x30
                                                                                                              .byte 0x1C,0x38,0x70,0xE0,0x70,0x38,0x1C,0x00,0x00,0x7C,0x00,0x00,0x7C,0x00,0x00,0x00
                                                                                                              .byte 0x70,0x38,0x1C,0x0E,0x1C,0x38,0x70,0x00,0x7C,0xC6,0xC6,0x1C,0x18,0x00,0x18,0x00
                                                                                                              .byte 0x3C,0x42,0x99,0xA1,0xA5,0x99,0x42,0x3C,0x38,0x6C,0xC6,0xC6,0xFE,0xC6,0xC6,0x00
                                                                                                              .byte 0xFC,0xC6,0xC6,0xFC,0xC6,0xC6,0xFC,0x00,0x3C,0x66,0xC0,0xC0,0xC0,0x66,0x3C,0x00
                                                                                                              .byte 0xF8,0xCC,0xC6,0xC6,0xC6,0xCC,0xF8,0x00,0xFE,0xC0,0xC0,0xFC,0xC0,0xC0,0xFE,0x00
                                                                                                              .byte 0xFE,0xC0,0xC0,0xFC,0xC0,0xC0,0xC0,0x00,0x3E,0x60,0xC0,0xCE,0xC6,0x66,0x3E,0x00
                                                                                                              .byte 0xC6,0xC6,0xC6,0xFE,0xC6,0xC6,0xC6,0x00,0x7E,0x18,0x18,0x18,0x18,0x18,0x7E,0x00
                                                                                                              .byte 0x06,0x06,0x06,0x06,0xC6,0xC6,0x7C,0x00,0xC6,0xCC,0xD8,0xF0,0xF8,0xDC,0xCE,0x00
                                                                                                              .byte 0x60,0x60,0x60,0x60,0x60,0x60,0x7E,0x00,0xC6,0xEE,0xFE,0xFE,0xD6,0xC6,0xC6,0x00
                                                                                                              .byte 0xC6,0xE6,0xF6,0xFE,0xDE,0xCE,0xC6,0x00,0x7C,0xC6,0xC6,0xC6,0xC6,0xC6,0x7C,0x00
                                                                                                              .byte 0xFC,0xC6,0xC6,0xC6,0xFC,0xC0,0xC0,0x00,0x7C,0xC6,0xC6,0xC6,0xDE,0xCC,0x7A,0x00
                                                                                                              .byte 0xFC,0xC6,0xC6,0xCE,0xF8,0xDC,0xCE,0x00,0x78,0xCC,0xC0,0x7C,0x06,0xC6,0x7C,0x00
                                                                                                              .byte 0x7E,0x18,0x18,0x18,0x18,0x18,0x18,0x00,0xC6,0xC6,0xC6,0xC6,0xC6,0xC6,0x7C,0x00
                                                                                                              .byte 0xC6,0xC6,0xC6,0xEE,0x7C,0x38,0x10,0x00,0xC6,0xC6,0xD6,0xFE,0xFE,0xEE,0xC6,0x00
                                                                                                              .byte 0xC6,0xEE,0x3C,0x38,0x7C,0xEE,0xC6,0x00,0x66,0x66,0x66,0x3C,0x18,0x18,0x18,0x00
                                                                                                              .byte 0xFE,0x0E,0x1C,0x38,0x70,0xE0,0xFE,0x00,0x3C,0x30,0x30,0x30,0x30,0x30,0x3C,0x00
                                                                                                              .byte 0x60,0x60,0x30,0x18,0x0C,0x06,0x06,0x00,0x3C,0x0C,0x0C,0x0C,0x0C,0x0C,0x3C,0x00
                                                                                                              .byte 0x18,0x3C,0x66,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF
                                                                                                              .byte 0x30,0x30,0x18,0x00,0x00,0x00,0x00,0x00,0x00,0x3C,0x06,0x3E,0x66,0x66,0x3C,0x00
                                                                                                              .byte 0x60,0x7C,0x66,0x66,0x66,0x66,0x7C,0x00,0x00,0x3C,0x66,0x60,0x60,0x66,0x3C,0x00
                                                                                                              .byte 0x06,0x3E,0x66,0x66,0x66,0x66,0x3E,0x00,0x00,0x3C,0x66,0x66,0x7E,0x60,0x3C,0x00
                                                                                                              .byte 0x1C,0x30,0x78,0x30,0x30,0x30,0x30,0x00,0x00,0x3E,0x66,0x66,0x66,0x3E,0x06,0x3C
                                                                                                              .byte 0x60,0x7C,0x76,0x66,0x66,0x66,0x66,0x00,0x18,0x00,0x38,0x18,0x18,0x18,0x18,0x00
                                                                                                              .byte 0x0C,0x00,0x1C,0x0C,0x0C,0x0C,0x0C,0x38,0x60,0x60,0x66,0x6C,0x78,0x6C,0x66,0x00
                                                                                                              .byte 0x38,0x18,0x18,0x18,0x18,0x18,0x18,0x00,0x00,0xEC,0xFE,0xFE,0xFE,0xD6,0xC6,0x00
                                                                                                              .byte 0x00,0x7C,0x76,0x66,0x66,0x66,0x66,0x00,0x00,0x3C,0x66,0x66,0x66,0x66,0x3C,0x00
                                                                                                              .byte 0x00,0x7C,0x66,0x66,0x66,0x7C,0x60,0x60,0x00,0x3E,0x66,0x66,0x66,0x3E,0x06,0x06
                                                                                                              .byte 0x00,0x7E,0x70,0x60,0x60,0x60,0x60,0x00,0x00,0x3C,0x60,0x3C,0x06,0x66,0x3C,0x00
                                                                                                              .byte 0x30,0x78,0x30,0x30,0x30,0x30,0x1C,0x00,0x00,0x66,0x66,0x66,0x66,0x6E,0x3E,0x00
                                                                                                              .byte 0x00,0x66,0x66,0x66,0x66,0x3C,0x18,0x00,0x00,0xC6,0xD6,0xFE,0xFE,0x7C,0x6C,0x00
                                                                                                              .byte 0x00,0x66,0x3C,0x18,0x3C,0x66,0x66,0x00,0x00,0x66,0x66,0x66,0x66,0x3E,0x06,0x3C
                                                                                                              .byte 0x00,0x7E,0x0C,0x18,0x30,0x60,0x7E,0x00,0x0E,0x18,0x0C,0x38,0x0C,0x18,0x0E,0x00
                                                                                                              .byte 0x18,0x18,0x18,0x00,0x18,0x18,0x18,0x00,0x70,0x18,0x30,0x1C,0x30,0x18,0x70,0x00
                                                                                                              .byte 0x00,0x00,0x76,0xDC,0x00,0x00,0x00,0x00,0x10,0x28,0x10,0x54,0xAA,0x44,0x00,0x00
                                                                                                              .end
                                                                                                          

                                                                                                           
                                                                                                          完成
                                                                                                          19.jpg
                                                                                                          20.jpg

                                                                                                          W L 2 Replies Last reply Reply Quote Share 2
                                                                                                          • xiaowenge
                                                                                                            DOT小文哥 LV 8 last edited by

                                                                                                            原来光按键都有这么多细节

                                                                                                            1 Reply Last reply Reply Quote Share 0
                                                                                                            • W
                                                                                                              whycanservice2 LV 8 @steward last edited by

                                                                                                              @steward 学习了!居然有这么多细节在里面!

                                                                                                              1 Reply Last reply Reply Quote Share 0
                                                                                                              • L
                                                                                                                lovehex99 LV 5 @steward last edited by

                                                                                                                @steward 等拿到硬件再來玩~

                                                                                                                1 Reply Last reply Reply Quote Share 0
                                                                                                                • steward
                                                                                                                  司徒 LV 6 last edited by steward

                                                                                                                  司徒接著說明一下如何編譯 Tina-Linux 做聲音測試, 不過在編譯 Tina-Linux 之前, 我們先來看一下小志掌機的聲音電路
                                                                                                                  1.jpg
                                                                                                                  上圖是一般最常使用的聲音電路, 直接從晶片的聲音輸出(類比訊號)拉到功率放大器, 由於是類比訊號, 因此, 在走線的過程中, 很容易受到干擾, 這方面的佈線, 比較需要經驗的累積, 當然, 如果要有比較好的聲音效果, 一般建議使用專門的 Audio Codec 晶片, 而使用的介面可以使用 I2S or PCM, 訊號傳遞的部份使用數位訊號, 可以有效抑制雜訊, 如下圖所示, 不過缺點就是需要移植聲音驅動, 這部份也是比較費時~
                                                                                                                  2.jpg
                                                                                                                   
                                                                                                                  司徒接著說明如何編譯 Tina-Linux for F133, 首先, 感謝 lovexulu 的協助,提供 Tina-Linux 的移植結果給司徒參考,由於 Tina-Linux 下載相當費時也比較麻煩,因此,司徒將其搬遷到 GitHub,編譯步驟如下:

                                                                                                                  $ cd
                                                                                                                  $ git clone https://github.com/steward-fu/tina-linux_sdk
                                                                                                                  $ cd tina-linux_sdk
                                                                                                                  
                                                                                                                  $ wget https://github.com/steward-fu/archives/releases/download/f133/tina-linux_sdk_dl.7z.001
                                                                                                                  $ wget https://github.com/steward-fu/archives/releases/download/f133/tina-linux_sdk_dl.7z.002
                                                                                                                  $ wget https://github.com/steward-fu/archives/releases/download/f133/tina-linux_sdk_toolchain.tar.gz
                                                                                                                  $ tar xvf https://github.com/steward-fu/archives/releases/download/f133/tina-linux_sdk_toolchain.tar.gz
                                                                                                                  $ 7za x https://github.com/steward-fu/archives/releases/download/f133/tina-linux_sdk_dl.7z.001
                                                                                                                  
                                                                                                                  $ source ./build/envsetup.sh
                                                                                                                  $ lunch
                                                                                                                      You're building on Linux
                                                                                                                  
                                                                                                                      Lunch menu... pick a combo:
                                                                                                                           1. d1-h_nezha_min-tina
                                                                                                                           2. d1-h_nezha-tina
                                                                                                                           3. d1s_nezha-tina
                                                                                                                  
                                                                                                                      Which would you like? [Default d1s_nezha]:3
                                                                                                                  
                                                                                                                  $ make
                                                                                                                  $ pack
                                                                                                                      /home/steward/Data/tina-linux_sdk/out/d1s-nezha/tina_d1s-nezha_uart4.img
                                                                                                                  
                                                                                                                      pack finish
                                                                                                                  

                                                                                                                   
                                                                                                                  燒錄步驟:

                                                                                                                  1. 下載 https://github.com/steward-fu/archives/releases/download/f133/PhoenixCardv4.2.7.7z 並且解壓縮
                                                                                                                  2. 執行 PhoenixCard.exe
                                                                                                                  3. 選擇好 Image、Start up 後,按下 Burn 開始燒錄
                                                                                                                    3.jpg
                                                                                                                     
                                                                                                                    燒錄完成
                                                                                                                    4.jpg
                                                                                                                     
                                                                                                                    預設分區如下圖,如果想要使用自己編譯的 buildroot 系統,只要替換到 rootfs 分區就可以,不過預設只有 25MB
                                                                                                                    5.jpg
                                                                                                                     
                                                                                                                    對 /dev/sdb8 進行擴充,這樣就可以放檔案進入測試
                                                                                                                    6.jpg
                                                                                                                     
                                                                                                                    開機後,可以直接使用 adb shell 進入 console, 接著就可以手動測試聲音部份~
                                                                                                                  $ adb devices
                                                                                                                      * daemon not running; starting now at tcp:5037
                                                                                                                      * daemon started successfully
                                                                                                                      List of devices attached
                                                                                                                      20080411	device
                                                                                                                  
                                                                                                                  $ adb shell
                                                                                                                      BusyBox v1.27.2 () built-in shell (ash)
                                                                                                                  
                                                                                                                      ------run profile file-----
                                                                                                                       _____  _              __     _
                                                                                                                      |_   _||_| ___  _ _   |  |   |_| ___  _ _  _ _
                                                                                                                        | |   _ |   ||   |  |  |__ | ||   || | ||_'_|
                                                                                                                        | |  | || | || _ |  |_____||_||_|_||___||_,_|
                                                                                                                        |_|  |_||_|_||_|_|  Tina is Based on OpenWrt!
                                                                                                                       ----------------------------------------------
                                                                                                                       Tina Linux (Neptune, 61CC0487)
                                                                                                                       ----------------------------------------------
                                                                                                                      nodev	debugfs
                                                                                                                      root@TinaLinux:/#
                                                                                                                      root@TinaLinux:/# mount /dev/mmcblk0p8 /mnt/UDISK/
                                                                                                                      root@TinaLinux:/# amixer sset 'Headphone volume' 100%
                                                                                                                          Simple mixer control 'Headphone volume',0
                                                                                                                            Capabilities: volume volume-joined
                                                                                                                            Playback channels: Mono
                                                                                                                            Capture channels: Mono
                                                                                                                            Limits: 0 - 7
                                                                                                                            Mono: 7 [100%]
                                                                                                                      root@TinaLinux:/# aplay /mnt/UDISK/ok.wav 
                                                                                                                          Playing WAVE '/mnt/UDISK/ok.wav' : Signed 16 bit Little Endian, Rate 11025 Hz, Mono
                                                                                                                  

                                                                                                                   
                                                                                                                  如果不想手動編譯, 司徒這邊有做好的聲音測試檔案
                                                                                                                  https://github.com/steward-fu/archives/releases/download/f133/sound_test.img.7z
                                                                                                                  解開後, 使用 dd 命令燒錄到 MicroSD 卡後, 插入開機, 就會開始播放 Nokia 手機鈴聲~

                                                                                                                  L 3 Replies Last reply Reply Quote Share 3
                                                                                                                  • steward
                                                                                                                    司徒 LV 6 last edited by steward

                                                                                                                    屏可視角
                                                                                                                    1.jpg
                                                                                                                     
                                                                                                                    下邊
                                                                                                                    2.jpg
                                                                                                                     
                                                                                                                    側邊
                                                                                                                    3.jpg
                                                                                                                     
                                                                                                                    上邊
                                                                                                                    4.jpg
                                                                                                                     
                                                                                                                    側邊
                                                                                                                    5.jpg

                                                                                                                    1 Reply Last reply Reply Quote Share 0
                                                                                                                    • steward
                                                                                                                      司徒 LV 6 last edited by steward

                                                                                                                      第二版的機器(新增兩顆振動馬達)終於收到,感謝暈哥以及lovexulu的協助
                                                                                                                      1.jpg
                                                                                                                       
                                                                                                                      在Pyra掌機的身旁,更是感覺小巧~
                                                                                                                      2.jpg
                                                                                                                       
                                                                                                                      材質還不錯~
                                                                                                                      3.jpg
                                                                                                                       
                                                                                                                      USB Type-C、耳機孔
                                                                                                                      4.jpg
                                                                                                                       
                                                                                                                      電源開關
                                                                                                                      5.jpg
                                                                                                                       
                                                                                                                      R、MicroSD、L
                                                                                                                      6.jpg
                                                                                                                       
                                                                                                                      音量鍵
                                                                                                                      7.jpg
                                                                                                                       
                                                                                                                      背面
                                                                                                                      8.jpg
                                                                                                                       
                                                                                                                      A面
                                                                                                                      9.jpg
                                                                                                                       
                                                                                                                      FPC
                                                                                                                      10.jpg
                                                                                                                       
                                                                                                                      PCB
                                                                                                                      11.jpg
                                                                                                                       
                                                                                                                      電源按鍵記得往下扳才能取出主板
                                                                                                                      12.jpg
                                                                                                                       
                                                                                                                      正面
                                                                                                                      13.jpg
                                                                                                                       
                                                                                                                      新增振動馬達的槽位
                                                                                                                      15.jpg
                                                                                                                       
                                                                                                                      D1s (單核心RISC-V RV64GCV 533MHz, RAM 64MB)
                                                                                                                      F133 (單核心 RISC-V RV64GCV 533MHz, RAM 64MB)
                                                                                                                      T113-S3 (双核心 Cortex-A7 1.2GHz, RAM 128MB)
                                                                                                                      以上 3 顆晶片的腳位都是相容腳位,因此,玩家也可以替換成高效能的 T113-S3 進行移植
                                                                                                                      16.jpg
                                                                                                                      17.jpg

                                                                                                                      1 Reply Last reply Reply Quote Share 0
                                                                                                                      • steward
                                                                                                                        司徒 LV 6 last edited by

                                                                                                                        正面
                                                                                                                        1.jpg
                                                                                                                         
                                                                                                                        下邊
                                                                                                                        2.jpg
                                                                                                                         
                                                                                                                        側邊
                                                                                                                        3.jpg
                                                                                                                         
                                                                                                                        上邊
                                                                                                                        4.jpg
                                                                                                                         
                                                                                                                        側邊
                                                                                                                        5.jpg

                                                                                                                        Y 1 Reply Last reply Reply Quote Share 0
                                                                                                                        • xiaowenge
                                                                                                                          DOT小文哥 LV 8 last edited by xiaowenge

                                                                                                                          @steward 在 Gaviar Handheld (小志掌機) 中说:

                                                                                                                          D1s (單核心RISC-V RV64GCV 533MHz, RAM 64MB)

                                                                                                                          D1s CPU的主频可以跑1GHz

                                                                                                                          W steward 2 Replies Last reply Reply Quote Share 1
                                                                                                                          • W
                                                                                                                            whycanservice2 LV 8 @xiaowenge last edited by

                                                                                                                            @xiaowenge 大佬,测试修改 sys_config.fex文件中的[target] boot_clock = 1008,之后。启动日志显示依旧只有720Mhz!不知为何。

                                                                                                                            xiaowenge 1 Reply Last reply Reply Quote Share 0
                                                                                                                            • xiaowenge
                                                                                                                              DOT小文哥 LV 8 @whycanservice2 last edited by

                                                                                                                              @whycanservice2 在 Gaviar Handheld (小志掌機) 中说:

                                                                                                                              @xiaowenge 大佬,测试修改 sys_config.fex文件中的[target] boot_clock = 1008,之后。启动日志显示依旧只有720Mhz!不知为何。

                                                                                                                              你试下按照这个帖子的内容操作:
                                                                                                                              D1超频体验
                                                                                                                              https://bbs.aw-ol.com/topic/109/share/1

                                                                                                                              W 1 Reply Last reply Reply Quote Share 0
                                                                                                                              • W
                                                                                                                                whycanservice2 LV 8 @xiaowenge last edited by

                                                                                                                                @xiaowenge 2.1版本sdk貌似限制了频率,设备树配置已经不一样了。

                                                                                                                                1 Reply Last reply Reply Quote Share 0
                                                                                                                                • steward
                                                                                                                                  司徒 LV 6 @xiaowenge last edited by

                                                                                                                                  @xiaowenge
                                                                                                                                  感謝你提供資訊, 看來後續的超頻測試, 應該會很有看頭, 哈~

                                                                                                                                  xiaowenge 1 Reply Last reply Reply Quote Share 0
                                                                                                                                  • xiaowenge
                                                                                                                                    DOT小文哥 LV 8 @steward last edited by

                                                                                                                                    @steward 在 Gaviar Handheld (小志掌機) 中说:

                                                                                                                                    @xiaowenge
                                                                                                                                    感謝你提供資訊, 看來後續的超頻測試, 應該會很有看頭, 哈~

                                                                                                                                    标配应该是720MHz,跑1GHz不算超,有网友跑到1.6GHz的:
                                                                                                                                    D1-H 超频 1.68GHz 测试,提升 67% CoreMark 跑分,ncnn 增速 24%
                                                                                                                                    https://bbs.aw-ol.com/topic/1941/share/1

                                                                                                                                    1 Reply Last reply Reply Quote Share 1
                                                                                                                                    • ufbycd
                                                                                                                                      ufbycd LV 3 @whycan last edited by

                                                                                                                                      @whycan i80屏幕的刷新也是要耗费一定时长的,这个时长差不多就是帧间隔时长。如果CPU修改的图形的位置与时刻刚好跟屏幕刷新的一致,该图形就会撕裂。可以利用i80屏的TE引脚实现垂直同步来避免撕裂。

                                                                                                                                      whycan 1 Reply Last reply Reply Quote Share 1
                                                                                                                                      • whycan
                                                                                                                                        whycan晕哥 LV 9 @ufbycd last edited by

                                                                                                                                        @ufbycd
                                                                                                                                        收到热心反馈,我和显示屏厂家沟通一下,尽量加进去。

                                                                                                                                        1 Reply Last reply Reply Quote Share 1
                                                                                                                                        • Y
                                                                                                                                          yofa2008 LV 5 last edited by

                                                                                                                                          继上次弃坑之后,这次定要跟上大佬的脚步

                                                                                                                                          1 Reply Last reply Reply Quote Share 2
                                                                                                                                          • L
                                                                                                                                            lovehex99 LV 5 @steward last edited by lovehex99

                                                                                                                                            @steward 已收到硬件 抽點時間把Linux刷上去
                                                                                                                                            1.bootloader在哪?
                                                                                                                                            2.順便請問一下 如果想像miyoo那樣 需移植甚麼軟件

                                                                                                                                            1 Reply Last reply Reply Quote Share 1
                                                                                                                                            • steward
                                                                                                                                              司徒 LV 6 last edited by steward

                                                                                                                                              @lovehex99
                                                                                                                                              慢慢來~急什麼呢!哈哈~
                                                                                                                                               
                                                                                                                                              由於司徒臨時被插入一個很緊急的事件, 所以導致進度緩慢了一些, 而這個事件就是有人發現 iriver D88 只賣 25元, 真是太佛心了~所以司徒只好先抽身去搞 iriver D88 系統的東西, 實在是逼不得已~哈~不過, 目前應該是搞定了, 所以就分享一下結果給大家~
                                                                                                                                               
                                                                                                                                              司徒紀錄所有移植過程在這裡
                                                                                                                                              https://steward-fu.github.io/website/umpc.htm#d88
                                                                                                                                               
                                                                                                                                              所有源碼以及資源在這裡
                                                                                                                                              https://github.com/steward-fu/archives/releases/tag/d88
                                                                                                                                               
                                                                                                                                              4.png
                                                                                                                                               
                                                                                                                                              不錯的質感
                                                                                                                                              1.jpg
                                                                                                                                               
                                                                                                                                              下邊
                                                                                                                                              2.jpg
                                                                                                                                               
                                                                                                                                              耳機孔
                                                                                                                                              3.jpg
                                                                                                                                               
                                                                                                                                              上邊
                                                                                                                                              4.jpg
                                                                                                                                               
                                                                                                                                              MicroSD、MiniUSB
                                                                                                                                              5.jpg
                                                                                                                                               
                                                                                                                                              相當不錯的鍵盤
                                                                                                                                              6.jpg
                                                                                                                                               
                                                                                                                                              背面
                                                                                                                                              7.jpg
                                                                                                                                               
                                                                                                                                              背蓋
                                                                                                                                              8.jpg
                                                                                                                                               
                                                                                                                                              PCB
                                                                                                                                              9.jpg
                                                                                                                                               
                                                                                                                                              C面
                                                                                                                                              10.jpg
                                                                                                                                               
                                                                                                                                              LMS430HF15
                                                                                                                                              11.jpg
                                                                                                                                               
                                                                                                                                              屏FPC
                                                                                                                                              12.jpg
                                                                                                                                               
                                                                                                                                              鍵盤FPC
                                                                                                                                              13.jpg
                                                                                                                                               
                                                                                                                                              鍵盤
                                                                                                                                              14.jpg
                                                                                                                                               
                                                                                                                                              正面
                                                                                                                                              15.jpg
                                                                                                                                               
                                                                                                                                              JZ4755
                                                                                                                                              16.jpg
                                                                                                                                               
                                                                                                                                              STMPE2403、K9LBG08U0D
                                                                                                                                              17.jpg
                                                                                                                                               
                                                                                                                                              WM8731、AR1010
                                                                                                                                              18.jpg
                                                                                                                                               
                                                                                                                                              正面
                                                                                                                                              19.jpg
                                                                                                                                               
                                                                                                                                              A3V56S40ETP-G6
                                                                                                                                              20.jpg
                                                                                                                                               

                                                                                                                                              由於機器已經 10 年沒有開機, 因此, 經過 5A55, 萬光明 的努力, 已經可以成功還原官方系統
                                                                                                                                              1.jpeg
                                                                                                                                               
                                                                                                                                              司徒寫了一個雙系統啟動介面, 也可以透過 USB Gadget Serial (UART) 進去機器 Debug
                                                                                                                                              2.jpeg
                                                                                                                                               
                                                                                                                                              RetroFW 也移植完成, 聲音, 按鍵, 背光, 蓋上待機, 應該都可以正常運作了~由於官方鍵盤驅動有卡鍵及延遲等問題, 因此, 在 鉗工 的協助下, 我們逆向官方內核並且打了補丁, 修正官方驅動程式的問題~
                                                                                                                                              3.jpeg
                                                                                                                                               
                                                                                                                                              再來則是 詩諾比 的 Lava 移植
                                                                                                                                              1.jpg
                                                                                                                                              2.jpg
                                                                                                                                              3.jpg
                                                                                                                                              4.jpg
                                                                                                                                              5.jpg
                                                                                                                                              6.jpg
                                                                                                                                              7.jpg
                                                                                                                                              8.jpg
                                                                                                                                              9.jpg
                                                                                                                                              10.jpg
                                                                                                                                              11.jpg
                                                                                                                                              12.jpg
                                                                                                                                              13.jpg
                                                                                                                                              14.jpg
                                                                                                                                              15.jpg
                                                                                                                                              16.jpg
                                                                                                                                              17.jpg
                                                                                                                                              18.jpg
                                                                                                                                              0_0.jpg
                                                                                                                                              0_1.jpg
                                                                                                                                              0_2.jpg
                                                                                                                                              0_3.jpg
                                                                                                                                              0_4.jpg
                                                                                                                                              0_5.jpg
                                                                                                                                              0_6.jpg
                                                                                                                                              0_7.jpg
                                                                                                                                              0_10.jpg

                                                                                                                                              W Y 2 Replies Last reply Reply Quote Share 1
                                                                                                                                              • W
                                                                                                                                                whycanservice2 LV 8 @steward last edited by

                                                                                                                                                @steward 在 Gaviar Handheld (小志掌機) 中说:

                                                                                                                                                iriver D88

                                                                                                                                                搜了下 貌似国内这价格买不到啊。。。

                                                                                                                                                A 1 Reply Last reply Reply Quote Share 0
                                                                                                                                                • A
                                                                                                                                                  akting LV 4 @whycanservice2 last edited by

                                                                                                                                                  @whycanservice2 全新25的卖完了

                                                                                                                                                  1 Reply Last reply Reply Quote Share 0
                                                                                                                                                  • A
                                                                                                                                                    adaoz LV 3 last edited by

                                                                                                                                                    在哇酷发现大佬回来了,入了一套硬件跟随大佬一起玩😄

                                                                                                                                                    1 Reply Last reply Reply Quote Share 1
                                                                                                                                                    • steward
                                                                                                                                                      司徒 LV 6 last edited by steward

                                                                                                                                                      iriver D88 如果超過 25元, 就不建議入手~
                                                                                                                                                       
                                                                                                                                                      司徒接著說明一下 Boot Loader 移植的步驟,幸好司徒一開始沒有把話說死, 哈, 因為如果要重新移植一個新的 Boot Loader, 那可能要花上好幾個月, 哈, 所以司徒打算直接拿 Tina-Linux 來做說明就好, 真是太輕鬆了~哈
                                                                                                                                                       
                                                                                                                                                      BOOT0、OpenSBI 的 UART 腳位配置
                                                                                                                                                      1.jpg
                                                                                                                                                       
                                                                                                                                                      U-Boot 的 UART 腳位配置
                                                                                                                                                      2.jpg
                                                                                                                                                       
                                                                                                                                                      U-Boot 的 MicroSD 腳位配置
                                                                                                                                                      3.jpg
                                                                                                                                                       
                                                                                                                                                      由於是 Boot Loader 移植,司徒有必要解說一下 Boot Loader 的用途是什麼,從下圖可以知道,最簡單的 Boot Loader 就是初始化 RAM、關閉中斷、關閉 Cache 後,將 Linux Kernel 載入 RAM,然後執行 Linux Kernel,這就是 Boot Loader 的主要工作~
                                                                                                                                                      4.jpg
                                                                                                                                                       
                                                                                                                                                      但是 RISC-V 的 Boot Loader 其實稍微複雜一點點,如下圖所示,主要有三個部份組成 Boot Loader:LOADER(BOOT0)、OpenSBI、BOOTLAODER(U-Boot)
                                                                                                                                                      5.jpg
                                                                                                                                                       
                                                                                                                                                      相較於 ARM,RISC-V 多了一個 OpenSBI,那 OpenSBI 是什麼呢?其實 OpenSBI 主要用來做權限轉移,從低權限切到高權限執行硬體的相關操作,雖然這部份可以實作在 Kernel 中,不過 RISC-V 看來有想要抽象化硬體的概念,一旦將硬體抽象化,代表將來只要實作 OpenSBI,就可以達到兼容執行在不同廠家的晶片上,不過司徒也是剛接觸 RISC-V,既然大家都這樣使用,那就只好跟隨大家~
                                                                                                                                                      6.jpg
                                                                                                                                                       
                                                                                                                                                      司徒畫了一張 F133 的啟動流程,用來對照一下
                                                                                                                                                      7.jpg
                                                                                                                                                      步驟1. 上電後,F133 開始跑
                                                                                                                                                      步驟2. F133 將晶片內部的 BROM 載入到 SRAM,然後從 SRAM 開始跑
                                                                                                                                                      步驟3. BROM 接著開始尋找可以使用的媒介,小志掌機只有 MicroSD,因此,BROM 會從 MicroSD 的 8KB 位址載入程式到 SRAM 執行
                                                                                                                                                      步驟4. F133 第一個執行的程式是 BOOT0
                                                                                                                                                      步驟5. BOOT0 主要用來初始化 RAM 並且執行 OpenSBI
                                                                                                                                                      步驟6. OpenSBI 執行後,會載入 U-Boot 並且將控制權交給 U-Boot
                                                                                                                                                      步驟7. U-Boot 會從 MicroSD 載入 Linux Kernel、Device Tree 到 RAM,接著執行 Linux Kernel
                                                                                                                                                      步驟8. Linux Kernel 會依據 BOOTCMD 載入 rootfs 並且將控制權交給 init 程式,init 是 Linux 作業系統的第一個執行程式
                                                                                                                                                       
                                                                                                                                                      由於 BOOT0 是第一個執行的程式,司徒額外畫了一個執行流程圖
                                                                                                                                                      8.jpg
                                                                                                                                                       
                                                                                                                                                      雖然 Boot Loader 流程大致清楚,不過,司徒還是需要說一下,一開始提到的 UART 配置修改,究竟這些修改是設定到哪邊去呢?其實位於 lichee/brandy-2.0/spl/nboot/main/boot0_head.c

                                                                                                                                                      const boot0_file_head_t  BT0_head = {
                                                                                                                                                          {
                                                                                                                                                              /* jump_instruction*/
                                                                                                                                                              JUMP_INSTRUCTION,
                                                                                                                                                              BOOT0_MAGIC,
                                                                                                                                                              STAMP_VALUE,
                                                                                                                                                      #ifdef ALIGN_SIZE_8K
                                                                                                                                                              0x2000,
                                                                                                                                                      #else
                                                                                                                                                              0x4000,
                                                                                                                                                      #endif
                                                                                                                                                              sizeof(boot_file_head_t),
                                                                                                                                                              BOOT_PUB_HEAD_VERSION,
                                                                                                                                                              CONFIG_BOOT0_RET_ADDR,
                                                                                                                                                              CONFIG_BOOT0_RUN_ADDR,
                                                                                                                                                              0,
                                                                                                                                                              {
                                                                                                                                                              /*brom modify: nand-4bytes sdmmc-2bytes*/
                                                                                                                                                              0, 0, 0, 0, '4', '.', '0', 0
                                                                                                                                                              },
                                                                                                                                                          },
                                                                                                                                                      
                                                                                                                                                          {
                                                                                                                                                              /*__u32 prvt_head_size;*/
                                                                                                                                                              0,
                                                                                                                                                              /*char prvt_head_vsn[4];*/
                                                                                                                                                              1,
                                                                                                                                                              0,/* power_mode */
                                                                                                                                                              {0},/* reserver[2]  */
                                                                                                                                                              /*unsigned int     dram_para[32] ;*/
                                                                                                                                                              {0},
                                                                                                                                                              /*__s32 uart_port;*/
                                                                                                                                                              0,
                                                                                                                                                              /*normal_gpio_cfg   uart_ctrl[2];*/
                                                                                                                                                              {
                                                                                                                                                              {6, 2, 4, 1, 1, 0, {0} },/*PB8: 4--RX*/
                                                                                                                                                              {6, 4, 4, 1, 1, 0, {0} },/*PB9: 4--TX*/
                                                                                                                                                              },
                                                                                                                                                              /*__s32 enable_jtag;*/
                                                                                                                                                              0,
                                                                                                                                                              /*normal_gpio_cfg    jtag_gpio[5];*/
                                                                                                                                                              {{0}, {0}, {0}, {0}, {0} },
                                                                                                                                                      

                                                                                                                                                      Tina-Linux 使用 Patch 方式,將配置的數值更新到 boot0_header,雖然作法粗暴,不過卻是最簡單的配置替換作法,缺點就是不好獨立拆開使用
                                                                                                                                                       
                                                                                                                                                      如果想要手動編譯看看, 可以使用如下方式 (已經改好 UART 配置)

                                                                                                                                                      $ cd
                                                                                                                                                      $ git clone https://github.com/steward-fu/tina-linux_sdk
                                                                                                                                                      $ cd tina-linux_sdk
                                                                                                                                                      
                                                                                                                                                      $ wget https://github.com/steward-fu/archives/releases/download/f133/tina-linux_sdk_dl.7z.001
                                                                                                                                                      $ wget https://github.com/steward-fu/archives/releases/download/f133/tina-linux_sdk_dl.7z.002
                                                                                                                                                      $ wget https://github.com/steward-fu/archives/releases/download/f133/tina-linux_sdk_toolchain.tar.gz
                                                                                                                                                      $ tar xvf https://github.com/steward-fu/archives/releases/download/f133/tina-linux_sdk_toolchain.tar.gz
                                                                                                                                                      $ 7za x https://github.com/steward-fu/archives/releases/download/f133/tina-linux_sdk_dl.7z.001
                                                                                                                                                      
                                                                                                                                                      $ source ./build/envsetup.sh
                                                                                                                                                      $ lunch
                                                                                                                                                          You're building on Linux
                                                                                                                                                      
                                                                                                                                                          Lunch menu... pick a combo:
                                                                                                                                                               1. d1-h_nezha_min-tina
                                                                                                                                                               2. d1-h_nezha-tina
                                                                                                                                                               3. d1s_nezha-tina
                                                                                                                                                      
                                                                                                                                                          Which would you like? [Default d1s_nezha]:3
                                                                                                                                                      
                                                                                                                                                      $ make
                                                                                                                                                      $ pack
                                                                                                                                                          /home/steward/Data/tina-linux_sdk/out/d1s-nezha/tina_d1s-nezha_uart4.img
                                                                                                                                                      
                                                                                                                                                          pack finish
                                                                                                                                                      

                                                                                                                                                      BOOT0 位於:out/d1s-nezha/image/boot0_sdcard.fex (8KB 偏移位置)

                                                                                                                                                      $ sudo dd if=out/d1s-nezha/image/boot0_sdcard.fex of=/dev/sdX bs=1024 seek=8
                                                                                                                                                      

                                                                                                                                                      OpenSBI、U-Boot 位於:out/d1s-nezha/image/boot_package.fex

                                                                                                                                                      $ sudo dd if=out/d1s-nezha/image/boot_package.fex of=/dev/sdX bs=1024 seek=16400
                                                                                                                                                      

                                                                                                                                                      開機後的 Log (baudrate: 115200bps)

                                                                                                                                                      [152]HELLO! BOOT0 is starting!
                                                                                                                                                      [155]BOOT0 commit : 4654c3ec4
                                                                                                                                                      [158]set pll start
                                                                                                                                                      [160]fix vccio detect value:0xc0
                                                                                                                                                      [163]periph0 has been enabled
                                                                                                                                                      [166]set pll end
                                                                                                                                                      [168][pmu]: bus read error
                                                                                                                                                      [170]board init ok
                                                                                                                                                      [172]ZQ value = 0x2f
                                                                                                                                                      [174]get_pmu_exist() = -1
                                                                                                                                                      [177]ddr_efuse_type: 0xa
                                                                                                                                                      [179]trefi:7.8ms
                                                                                                                                                      [181][AUTO DEBUG] single rank and full DQ!
                                                                                                                                                      [185]ddr_efuse_type: 0xa
                                                                                                                                                      [187]trefi:7.8ms
                                                                                                                                                      [189][AUTO DEBUG] rank 0 row = 13 
                                                                                                                                                      [193][AUTO DEBUG] rank 0 bank = 4 
                                                                                                                                                      [196][AUTO DEBUG] rank 0 page size = 2 KB 
                                                                                                                                                      [200]DRAM BOOT DRIVE INFO: V0.33
                                                                                                                                                      [203]DRAM CLK = 528 MHz
                                                                                                                                                      [205]DRAM Type = 2 (2:DDR2,3:DDR3)
                                                                                                                                                      [208]DRAMC read ODT  off.
                                                                                                                                                      [210]DRAM ODT off.
                                                                                                                                                      [212]ddr_efuse_type: 0xa
                                                                                                                                                      [215]DRAM SIZE =64 M
                                                                                                                                                      [217]dram_tpr4:0x0
                                                                                                                                                      [219]PLL_DDR_CTRL_REG:0xf8002b00
                                                                                                                                                      [222]DRAM_CLK_REG:0xc0000000
                                                                                                                                                      [225][TIMING DEBUG] MR2= 0x0
                                                                                                                                                      [229]DRAM simple test OK.
                                                                                                                                                      [231]dram size =64
                                                                                                                                                      [233]card no is 0
                                                                                                                                                      [235]sdcard 0 line count 4
                                                                                                                                                      [237][mmc]: mmc driver ver 2021-04-2 16:45
                                                                                                                                                      [247][mmc]: Wrong media type 0x0
                                                                                                                                                      [250][mmc]: ***Try SD card 0***
                                                                                                                                                      [268][mmc]: HSSDR52/SDR25 4 bit
                                                                                                                                                      [271][mmc]: 50000000 Hz
                                                                                                                                                      [273][mmc]: 3781 MB
                                                                                                                                                      [275][mmc]: ***SD/MMC 0 init OK!!!***
                                                                                                                                                      [331]Loading boot-pkg Succeed(index=0).
                                                                                                                                                      [335]Entry_name        = opensbi
                                                                                                                                                      [338]Entry_name        = u-boot
                                                                                                                                                      [342]Entry_name        = dtb
                                                                                                                                                      [344]mmc not para
                                                                                                                                                      [346]Jump to second Boot.
                                                                                                                                                      
                                                                                                                                                      OpenSBI auto-t113-linux-V0.8-3-ge39e937
                                                                                                                                                         ____                    _____ ____ _____
                                                                                                                                                        / __ \                  / ____|  _ \_   _|
                                                                                                                                                       | |  | |_ __   ___ _ __ | (___ | |_) || |
                                                                                                                                                       | |  | | '_ \ / _ \ '_ \ \___ \|  _ < | |
                                                                                                                                                       | |__| | |_) |  __/ | | |____) | |_) || |_
                                                                                                                                                        \____/| .__/ \___|_| |_|_____/|____/_____|
                                                                                                                                                              | |
                                                                                                                                                              |_|
                                                                                                                                                      
                                                                                                                                                      Platform Name          : T-HEAD Xuantie Platform
                                                                                                                                                      Platform HART Features : RV64ACDFIMSUVX
                                                                                                                                                      Platform Max HARTs     : 1
                                                                                                                                                      Current Hart           : 0
                                                                                                                                                      Firmware Base          : 0x41fc0400
                                                                                                                                                      Firmware Size          : 75 KB
                                                                                                                                                      Runtime SBI Version    : 0.2
                                                                                                                                                      
                                                                                                                                                      MIDELEG : 0x0000000000000222
                                                                                                                                                      MEDELEG : 0x000000000000b1ff
                                                                                                                                                      PMP0    : 0x0000000041fc0000-0
                                                                                                                                                      
                                                                                                                                                      U-Boot 2018.07 (Jun 26 2023 - 13:32:21 +0000) Allwinner Technology
                                                                                                                                                      
                                                                                                                                                      [00.414]DRAM:  64 MiB
                                                                                                                                                      [00.416]Relocation Offset is: 01ee9000
                                                                                                                                                      [00.420]secure enable bit: 0
                                                                                                                                                      can't support chip type 24064
                                                                                                                                                      [00.426]CPU=720 MHz,PLL6=600 Mhz,AHB=200 Mhz, APB1=100Mhz  MBus=300Mhz
                                                                                                                                                      sunxi flash map init
                                                                                                                                                      SPI ALL:   ready
                                                                                                                                                      [00.437]flash init start
                                                                                                                                                      [00.439]workmode = 0,storage type = 1
                                                                                                                                                      [00.443][mmc]: mmc driver ver uboot2018:2021-12-20 13:35:00
                                                                                                                                                      [00.448][mmc]: get sdc_type fail and use default host:tm1.
                                                                                                                                                      [00.455][mmc]: can't find node "mmc0",will add new node
                                                                                                                                                      [00.460][mmc]: fdt err returned <no error>
                                                                                                                                                      [00.464][mmc]: Using default timing para
                                                                                                                                                      [00.467][mmc]: SUNXI SDMMC Controller Version:0x50310
                                                                                                                                                      [00.494][mmc]: card_caps:0x3000000a
                                                                                                                                                      [00.497][mmc]: host_caps:0x3000003f
                                                                                                                                                      [00.504]sunxi flash init ok
                                                                                                                                                      [00.507]line:703 init_clocks
                                                                                                                                                      [00.510]drv_disp_init
                                                                                                                                                      request pwm success, pwm7:pwm7:0x2000c00.
                                                                                                                                                      [00.532]drv_disp_init finish
                                                                                                                                                      GUID Partition Table Header signature is wrong: 0x0 != 0x5452415020494645
                                                                                                                                                      part_get_info_efi: *** ERROR: Invalid GPT ***
                                                                                                                                                      GUID Partition Table Header signature is wrong: 0x0 != 0x5452415020494645
                                                                                                                                                      part_get_info_efi: *** ERROR: Invalid Backup GPT ***
                                                                                                                                                      [00.564]Loading Environment from SUNXI_FLASH... GUID Partition Table Header signature is wrong: 0x0 != 0x5452415020494645
                                                                                                                                                      part_get_info_efi: *** ERROR: Invalid GPT ***
                                                                                                                                                      GUID Partition Table Header signature is wrong: 0x0 != 0x5452415020494645
                                                                                                                                                      part_get_info_efi: *** ERROR: Invalid Backup GPT ***
                                                                                                                                                      Can't find env partition
                                                                                                                                                      *** Warning - no device, using default environment
                                                                                                                                                      
                                                                                                                                                      Failed (-19)
                                                                                                                                                      [00.604]boot_gui_init:start
                                                                                                                                                      [00.607]set disp.dev2_output_type fail. using defval=0
                                                                                                                                                      [00.635]set disp.fb0_rot_used fail. using defval=0
                                                                                                                                                      [00.639]set disp.fb0_rot_degree fail. using defval=0
                                                                                                                                                      [00.810]boot_gui_init:finish
                                                                                                                                                      GUID Partition Table Header signature is wrong: 0x0 != 0x5452415020494645
                                                                                                                                                      part_get_info_efi: *** ERROR: Invalid GPT ***
                                                                                                                                                      GUID Partition Table Header signature is wrong: 0x0 != 0x5452415020494645
                                                                                                                                                      part_get_info_efi: *** ERROR: Invalid Backup GPT ***
                                                                                                                                                      partno erro : can't find partition bootloader
                                                                                                                                                      GUID Partition Table Header signature is wrong: 0x0 != 0x5452415020494645
                                                                                                                                                      part_get_info_efi: *** ERROR: Invalid GPT ***
                                                                                                                                                      GUID Partition Table Header signature is wrong: 0x0 != 0x5452415020494645
                                                                                                                                                      part_get[00.868]LCD open finish
                                                                                                                                                      _info_efi: *** ERROR: Invalid Backup GPT ***
                                                                                                                                                      partno erro : can't find partition boot-resource
                                                                                                                                                      [00.879]Get bootloader and boot-resource partition number fail!
                                                                                                                                                      [00.884]out of usb burn from boot: not need burn key
                                                                                                                                                      cann't get the boot_base from the env
                                                                                                                                                      [00.903]Item0 (Map) magic is bad
                                                                                                                                                      [00.906]the secure storage item0 copy0 magic is bad
                                                                                                                                                      [00.911]Item0 (Map) magic is bad
                                                                                                                                                      [00.914]the secure storage item0 copy1 magic is bad
                                                                                                                                                      [00.918]Item0 (Map) magic is bad
                                                                                                                                                      GUID Partition Table Header signature is wrong: 0x0 != 0x5452415020494645
                                                                                                                                                      part_get_info_efi: *** ERROR: Invalid GPT ***
                                                                                                                                                      GUID Partition Table Header signature is wrong: 0x0 != 0x5452415020494645
                                                                                                                                                      part_get_info_efi: *** ERROR: Invalid Backup GPT ***
                                                                                                                                                      partno erro : can't find partition private
                                                                                                                                                      GUID Partition Table Header signature is wrong: 0x0 != 0x5452415020494645
                                                                                                                                                      part_get_info_efi: *** ERROR: Invalid GPT ***
                                                                                                                                                      GUID Partition Table Header signature is wrong: 0x0 != 0x5452415020494645
                                                                                                                                                      part_get_info_efi: *** ERROR: Invalid Backup GPT ***
                                                                                                                                                      [00.980]update part info
                                                                                                                                                      GUID Partition Table Header signature is wrong: 0x0 != 0x5452415020494645
                                                                                                                                                      part_get_info_efi: *** ERROR: Invalid GPT ***
                                                                                                                                                      GUID Partition Table Header signature is wrong: 0x0 != 0x5452415020494645
                                                                                                                                                      part_get_info_efi: *** ERROR: Invalid Backup GPT ***
                                                                                                                                                      [01.009]update bootcmd
                                                                                                                                                      GUID Partition Table Header signature is wrong: 0x0 != 0x5452415020494645
                                                                                                                                                      part_get_info_efi: *** ERROR: Invalid GPT ***
                                                                                                                                                      GUID Partition Table Header signature is wrong: 0x0 != 0x5452415020494645
                                                                                                                                                      part_get_info_efi: *** ERROR: Invalid Backup GPT ***
                                                                                                                                                      GUID Partition Table Header signature is wrong: 0x0 != 0x5452415020494645
                                                                                                                                                      part_get_info_efi: *** ERROR: Invalid GPT ***
                                                                                                                                                      GUID Partition Table Header signature is wrong: 0x0 != 0x5452415020494645
                                                                                                                                                      part_get_info_efi: *** ERROR: Invalid Backup GPT ***
                                                                                                                                                      [01.069]change working_fdt 0x42aa8da0 to 0x42a88da0
                                                                                                                                                      disable nand error: FDT_ERR_BADPATH
                                                                                                                                                      [01.079]The storage not support sample function
                                                                                                                                                      No reserved memory region found in source FDT
                                                                                                                                                      [01.113]update dts
                                                                                                                                                      Hit any key to stop autoboot:  2
                                                                                                                                                      
                                                                                                                                                      1 Reply Last reply Reply Quote Share 0
                                                                                                                                                      • Y
                                                                                                                                                        yofa2008 LV 5 @steward last edited by

                                                                                                                                                        @steward 把帖子通览了一遍,第二版小志与第一版硬件有区别吗?方便自行复刻还得要与您的硬件保持一致,麻烦请告知

                                                                                                                                                        whycan 1 Reply Last reply Reply Quote Share 0
                                                                                                                                                        • whycan
                                                                                                                                                          whycan晕哥 LV 9 @yofa2008 last edited by

                                                                                                                                                          @yofa2008 在 Gaviar Handheld (小志掌機) 中说:

                                                                                                                                                          @steward 把帖子通览了一遍,第二版小志与第一版硬件有区别吗?方便自行复刻还得要与您的硬件保持一致,麻烦请告知

                                                                                                                                                          第二版主板只加了 两个震动电机的焊盘,其他一样。

                                                                                                                                                          Y 2 Replies Last reply Reply Quote Share 0
                                                                                                                                                          • Y
                                                                                                                                                            yofa2008 LV 5 @whycan last edited by

                                                                                                                                                            @whycan 感谢回复。另外github访问太困难了,速度让人发疯。能转存资料到国内吗?😂
                                                                                                                                                            creazy.png

                                                                                                                                                            1 Reply Last reply Reply Quote Share 0
                                                                                                                                                            • L
                                                                                                                                                              lovehex99 LV 5 last edited by

                                                                                                                                                              @yofa2008 在 Gaviar Handheld (小志掌機) 中说:

                                                                                                                                                              @steward
                                                                                                                                                              哈哈 因為剛拿到硬件 迫不及待想要玩XD
                                                                                                                                                              希望司徒大神多分享技術 不要有壓力

                                                                                                                                                              Y 1 Reply Last reply Reply Quote Share 1
                                                                                                                                                              • L
                                                                                                                                                                lovehex99 LV 5 @steward last edited by xiaowenge

                                                                                                                                                                @steward 在 Gaviar Handheld (小志掌機) 中说:

                                                                                                                                                                司徒接著說明一下如何編譯 Tina-Linux 做聲音測試, 不過在編譯 Tina-Linux 之前, 我們先來看一下小志掌機的聲音電路
                                                                                                                                                                1.jpg
                                                                                                                                                                上圖是一般最常使用的聲音電路, 直接從晶片的聲音輸出(類比訊號)拉到功率放大器, 由於是類比訊號, 因此, 在走線的過程中, 很容易受到干擾, 這方面的佈線, 比較需要經驗的累積, 當然, 如果要有比較好的聲音效果, 一般建議使用專門的 Audio Codec 晶片, 而使用的介面可以使用 I2S or PCM, 訊號傳遞的部份使用數位訊號, 可以有效抑制雜訊, 如下圖所示, 不過缺點就是需要移植聲音驅動, 這部份也是比較費時~
                                                                                                                                                                2.jpg
                                                                                                                                                                 
                                                                                                                                                                司徒接著說明如何編譯 Tina-Linux for F133, 首先, 感謝 lovexulu 的協助,提供 Tina-Linux 的移植結果給司徒參考,由於 Tina-Linux 下載相當費時也比較麻煩,因此,司徒將其搬遷到 GitHub,編譯步驟如下:

                                                                                                                                                                $ cd
                                                                                                                                                                $ git clone https://github.com/steward-fu/tina-linux_sdk
                                                                                                                                                                $ cd tina-linux_sdk
                                                                                                                                                                
                                                                                                                                                                $ wget https://github.com/steward-fu/archives/releases/download/f133/tina-linux_sdk_dl.7z.001
                                                                                                                                                                $ wget https://github.com/steward-fu/archives/releases/download/f133/tina-linux_sdk_dl.7z.002
                                                                                                                                                                $ wget https://github.com/steward-fu/archives/releases/download/f133/tina-linux_sdk_toolchain.tar.gz
                                                                                                                                                                $ tar xvf https://github.com/steward-fu/archives/releases/download/f133/tina-linux_sdk_toolchain.tar.gz
                                                                                                                                                                $ 7za x https://github.com/steward-fu/archives/releases/download/f133/tina-linux_sdk_dl.7z.001
                                                                                                                                                                
                                                                                                                                                                $ source ./build/envsetup.sh
                                                                                                                                                                $ lunch
                                                                                                                                                                    You're building on Linux
                                                                                                                                                                
                                                                                                                                                                    Lunch menu... pick a combo:
                                                                                                                                                                         1. d1-h_nezha_min-tina
                                                                                                                                                                         2. d1-h_nezha-tina
                                                                                                                                                                         3. d1s_nezha-tina
                                                                                                                                                                
                                                                                                                                                                    Which would you like? [Default d1s_nezha]:3
                                                                                                                                                                
                                                                                                                                                                $ make
                                                                                                                                                                $ pack
                                                                                                                                                                    /home/steward/Data/tina-linux_sdk/out/d1s-nezha/tina_d1s-nezha_uart4.img
                                                                                                                                                                
                                                                                                                                                                    pack finish
                                                                                                                                                                

                                                                                                                                                                 
                                                                                                                                                                燒錄步驟:

                                                                                                                                                                1. 下載 https://github.com/steward-fu/archives/releases/download/f133/PhoenixCardv4.2.7.7z 並且解壓縮
                                                                                                                                                                2. 執行 PhoenixCard.exe
                                                                                                                                                                3. 選擇好 Image、Start up 後,按下 Burn 開始燒錄
                                                                                                                                                                  3.jpg
                                                                                                                                                                   
                                                                                                                                                                  燒錄完成
                                                                                                                                                                  4.jpg
                                                                                                                                                                   
                                                                                                                                                                  預設分區如下圖,如果想要使用自己編譯的 buildroot 系統,只要替換到 rootfs 分區就可以,不過預設只有 25MB
                                                                                                                                                                  5.jpg
                                                                                                                                                                   
                                                                                                                                                                  對 /dev/sdb8 進行擴充,這樣就可以放檔案進入測試
                                                                                                                                                                  6.jpg
                                                                                                                                                                   
                                                                                                                                                                  開機後,可以直接使用 adb shell 進入 console, 接著就可以手動測試聲音部份~
                                                                                                                                                                $ adb devices
                                                                                                                                                                    * daemon not running; starting now at tcp:5037
                                                                                                                                                                    * daemon started successfully
                                                                                                                                                                    List of devices attached
                                                                                                                                                                    20080411	device
                                                                                                                                                                
                                                                                                                                                                $ adb shell
                                                                                                                                                                    BusyBox v1.27.2 () built-in shell (ash)
                                                                                                                                                                
                                                                                                                                                                    ------run profile file-----
                                                                                                                                                                     _____  _              __     _
                                                                                                                                                                    |_   _||_| ___  _ _   |  |   |_| ___  _ _  _ _
                                                                                                                                                                      | |   _ |   ||   |  |  |__ | ||   || | ||_'_|
                                                                                                                                                                      | |  | || | || _ |  |_____||_||_|_||___||_,_|
                                                                                                                                                                      |_|  |_||_|_||_|_|  Tina is Based on OpenWrt!
                                                                                                                                                                     ----------------------------------------------
                                                                                                                                                                     Tina Linux (Neptune, 61CC0487)
                                                                                                                                                                     ----------------------------------------------
                                                                                                                                                                    nodev	debugfs
                                                                                                                                                                    root@TinaLinux:/#
                                                                                                                                                                    root@TinaLinux:/# mount /dev/mmcblk0p8 /mnt/UDISK/
                                                                                                                                                                    root@TinaLinux:/# amixer sset 'Headphone volume' 100%
                                                                                                                                                                        Simple mixer control 'Headphone volume',0
                                                                                                                                                                          Capabilities: volume volume-joined
                                                                                                                                                                          Playback channels: Mono
                                                                                                                                                                          Capture channels: Mono
                                                                                                                                                                          Limits: 0 - 7
                                                                                                                                                                          Mono: 7 [100%]
                                                                                                                                                                    root@TinaLinux:/# aplay /mnt/UDISK/ok.wav 
                                                                                                                                                                        Playing WAVE '/mnt/UDISK/ok.wav' : Signed 16 bit Little Endian, Rate 11025 Hz, Mono
                                                                                                                                                                

                                                                                                                                                                 
                                                                                                                                                                如果不想手動編譯, 司徒這邊有做好的聲音測試檔案
                                                                                                                                                                https://github.com/steward-fu/archives/releases/download/f133/sound_test.img.7z
                                                                                                                                                                解開後, 使用 dd 命令燒錄到 MicroSD 卡後, 插入開機, 就會開始播放 Nokia 手機鈴聲~

                                                                                                                                                                奇怪 開不起來~

                                                                                                                                                                [92]HELLO! BOOT0 is starting!
                                                                                                                                                                [95]BOOT0 commit : 4654c3ec4
                                                                                                                                                                [98]set pll start
                                                                                                                                                                [99]fix vccio detect value:0xc0
                                                                                                                                                                [103]periph0 has been enabled
                                                                                                                                                                [106]set pll end
                                                                                                                                                                [107][pmu]: bus read error
                                                                                                                                                                [110]board init ok
                                                                                                                                                                [112]ZQ value = 0x2f
                                                                                                                                                                [113]get_pmu_exist() = -1
                                                                                                                                                                [116]ddr_efuse_type: 0xa
                                                                                                                                                                [118]trefi:7.8ms
                                                                                                                                                                [120][AUTO DEBUG] single rank and full DQ!
                                                                                                                                                                [124]ddr_efuse_type: 0xa
                                                                                                                                                                [127]trefi:7.8ms
                                                                                                                                                                [129][AUTO DEBUG] rank 0 row = 13
                                                                                                                                                                [132][AUTO DEBUG] rank 0 bank = 4
                                                                                                                                                                [135][AUTO DEBUG] rank 0 page size = 2 KB
                                                                                                                                                                [139]DRAM BOOT DRIVE INFO: V0.33
                                                                                                                                                                [142]DRAM CLK = 528 MHz
                                                                                                                                                                [144]DRAM Type = 2 (2:DDR2,3:DDR3)
                                                                                                                                                                [147]DRAMC read ODT  off.
                                                                                                                                                                [150]DRAM ODT off.
                                                                                                                                                                [152]ddr_efuse_type: 0xa
                                                                                                                                                                [155]DRAM SIZE =64 M
                                                                                                                                                                [156]dram_tpr4:0x0
                                                                                                                                                                [158]PLL_DDR_CTRL_REG:0xf8002b00
                                                                                                                                                                [161]DRAM_CLK_REG:0xc0000000
                                                                                                                                                                [164][TIMING DEBUG] MR2= 0x0
                                                                                                                                                                [168]DRAM simple test OK.
                                                                                                                                                                [171]dram size =64
                                                                                                                                                                [172]card no is 0
                                                                                                                                                                [174]sdcard 0 line count 4
                                                                                                                                                                [177][mmc]: mmc driver ver 2021-04-2 16:45
                                                                                                                                                                [186][mmc]: Wrong media type 0x0
                                                                                                                                                                [189][mmc]: ***Try SD card 0***
                                                                                                                                                                [198][mmc]: HSSDR52/SDR25 4 bit
                                                                                                                                                                [201][mmc]: 50000000 Hz
                                                                                                                                                                [203][mmc]: 3724 MB
                                                                                                                                                                [205][mmc]: ***SD/MMC 0 init OK!!!***
                                                                                                                                                                [255]Loading boot-pkg Succeed(index=0).
                                                                                                                                                                [259]Entry_name        = opensbi
                                                                                                                                                                [262]Entry_name        = u-boot
                                                                                                                                                                [266]Entry_name        = dtb
                                                                                                                                                                [268]mmc not para
                                                                                                                                                                [270]Jump to second Boot.
                                                                                                                                                                
                                                                                                                                                                OpenSBI auto-t113-linux-V0.8-3-ge39e937
                                                                                                                                                                   ____                    _____ ____ _____
                                                                                                                                                                  / __ \                  / ____|  _ \_   _|
                                                                                                                                                                 | |  | |_ __   ___ _ __ | (___ | |_) || |
                                                                                                                                                                 | |  | | '_ \ / _ \ '_ \ \___ \|  _ < | |
                                                                                                                                                                 | |__| | |_) |  __/ | | |____) | |_) || |_
                                                                                                                                                                  \____/| .__/ \___|_| |_|_____/|____/_____|
                                                                                                                                                                        | |
                                                                                                                                                                        |_|
                                                                                                                                                                
                                                                                                                                                                Platform Name          : T-HEAD Xuantie Platform
                                                                                                                                                                Platform HART Features : RV64ACDFIMSUVX
                                                                                                                                                                Platform Max HARTs     : 1
                                                                                                                                                                Current Hart           : 0
                                                                                                                                                                Firmware Base          : 0x41fc0400
                                                                                                                                                                Firmware Size          : 75 KB
                                                                                                                                                                Runtime SBI Version    : 0.2
                                                                                                                                                                
                                                                                                                                                                MIDELEG : 0x0000000000000222
                                                                                                                                                                MEDELEG : 0x000000000000b1ff
                                                                                                                                                                PMP0    : 0x0000000041fc0000-0
                                                                                                                                                                
                                                                                                                                                                U-Boot 2018.07 (Jun 26 2023 - 13:32:21 +0000) Allwinner Technology
                                                                                                                                                                
                                                                                                                                                                [00.338]DRAM:  64 MiB
                                                                                                                                                                [00.340]Relocation Offset is: 01ee9000
                                                                                                                                                                [00.344]secure enable bit: 0
                                                                                                                                                                can't support chip type 24064
                                                                                                                                                                [00.350]CPU=720 MHz,PLL6=600 Mhz,AHB=200 Mhz, APB1=100Mhz  MBus=300Mhz
                                                                                                                                                                sunxi flash map init
                                                                                                                                                                SPI ALL:   ready
                                                                                                                                                                [00.361]flash init start
                                                                                                                                                                [00.363]workmode = 0,storage type = 1
                                                                                                                                                                [00.367][mmc]: mmc driver ver uboot2018:2021-12-20 13:35:00
                                                                                                                                                                [00.372][mmc]: get sdc_type fail and use default host:tm1.
                                                                                                                                                                [00.379][mmc]: can't find node "mmc0",will add new node
                                                                                                                                                                [00.384][mmc]: fdt err returned <no error>
                                                                                                                                                                [00.388][mmc]: Using default timing para
                                                                                                                                                                [00.391][mmc]: SUNXI SDMMC Controller Version:0x50310
                                                                                                                                                                [00.409][mmc]: card_caps:0x3000000a
                                                                                                                                                                [00.412][mmc]: host_caps:0x3000003f
                                                                                                                                                                [00.416]sunxi flash init ok
                                                                                                                                                                [00.419]line:703 init_clocks
                                                                                                                                                                [00.422]drv_disp_init
                                                                                                                                                                request pwm success, pwm7:pwm7:0x2000c00.
                                                                                                                                                                [00.444]drv_disp_init finish
                                                                                                                                                                [00.468]Loading Environment from SUNXI_FLASH... OK
                                                                                                                                                                [00.490]boot_gui_init:start
                                                                                                                                                                [00.494]set disp.dev2_output_type fail. using defval=0
                                                                                                                                                                [00.521]set disp.fb0_rot_used fail. using defval=0
                                                                                                                                                                [00.526]set disp.fb0_rot_degree fail. using defval=0
                                                                                                                                                                [00.696]boot_gui_init:finish
                                                                                                                                                                partno erro : can't find partition bootloader
                                                                                                                                                                [00.709]bmp_name=bootlogo.bmp size 38454
                                                                                                                                                                [00.726]out of usb burn from boot: not need burn key
                                                                                                                                                                [00.731]Item0 (Map) magic is bad
                                                                                                                                                                [00.734]the secure storage item0 copy0 magic is bad
                                                                                                                                                                [00.739]Item0 (Map) magic is bad
                                                                                                                                                                [00.742]the secure storage item0 copy1 magic is bad
                                                                                                                                                                [00.747]Item0 (Map) magic is bad
                                                                                                                                                                partno erro : can'[00.755]LCD open finish
                                                                                                                                                                t find partition private
                                                                                                                                                                root_partition is rootfs
                                                                                                                                                                set root to /dev/mmcblk0p5
                                                                                                                                                                [00.766]update part info
                                                                                                                                                                [00.770]update bootcmd
                                                                                                                                                                [00.775]change working_fdt 0x42aa8da0 to 0x42a88da0
                                                                                                                                                                disable nand error: FDT_ERR_BADPATH
                                                                                                                                                                [00.785]The storage not support sample function
                                                                                                                                                                No reserved memory region found in source FDT
                                                                                                                                                                [00.819]update dts
                                                                                                                                                                Hit any key to stop autoboot:  0
                                                                                                                                                                input addr exceed dram scope
                                                                                                                                                                [02.170]no vendor_boot partition is found
                                                                                                                                                                Android's image name: d1s-nezha
                                                                                                                                                                Detect comp none
                                                                                                                                                                [02.191]
                                                                                                                                                                Starting kernel ...
                                                                                                                                                                
                                                                                                                                                                [02.193][mmc]: MMC Device 2 not found
                                                                                                                                                                [02.197][mmc]: mmc 2 not find, so not exit
                                                                                                                                                                
                                                                                                                                                                steward 1 Reply Last reply Reply Quote Share 0
                                                                                                                                                                • steward
                                                                                                                                                                  司徒 LV 6 @lovehex99 last edited by

                                                                                                                                                                  @lovehex99
                                                                                                                                                                  Tina-Linux 預設的 GPT 是配置 16GB, 你的 MicroSD卡是 4GB, 請使用 16GB 以上的 MicroSD 測試

                                                                                                                                                                  Device      Start      End  Sectors  Size Type
                                                                                                                                                                  /dev/sdb1   73728    74231      504  252K Microsoft basic data
                                                                                                                                                                  /dev/sdb2   74232    74735      504  252K Microsoft basic data
                                                                                                                                                                  /dev/sdb3   74736    75239      504  252K Microsoft basic data
                                                                                                                                                                  /dev/sdb4   75240    95719    20480   10M Microsoft basic data
                                                                                                                                                                  /dev/sdb5   95720   144359    48640 23.8M Microsoft basic data
                                                                                                                                                                  /dev/sdb6  144360   166759    22400   11M Microsoft basic data
                                                                                                                                                                  /dev/sdb7  166760   176999    10240    5M Microsoft basic data
                                                                                                                                                                  /dev/sdb8  178176 31115263 30937088 14.8G Microsoft basic data
                                                                                                                                                                  
                                                                                                                                                                  L 2 Replies Last reply Reply Quote Share 0
                                                                                                                                                                  • Y
                                                                                                                                                                    yofa2008 LV 5 @steward last edited by

                                                                                                                                                                    @steward 我的D88到手了,跟大佬一起玩君正的CPU。开机进度条卡在了80%左右,然后重启again and again.替代文字

                                                                                                                                                                    steward 1 Reply Last reply Reply Quote Share 0
                                                                                                                                                                    • L
                                                                                                                                                                      lovehex99 LV 5 @steward last edited by

                                                                                                                                                                      @steward 了解 感謝回覆

                                                                                                                                                                      1 Reply Last reply Reply Quote Share 1
                                                                                                                                                                      • steward
                                                                                                                                                                        司徒 LV 6 @yofa2008 last edited by

                                                                                                                                                                        @yofa2008

                                                                                                                                                                        官方系統
                                                                                                                                                                        https://steward-fu.github.io/website/umpc/d88/stock_setup.htm
                                                                                                                                                                         
                                                                                                                                                                        雙系統
                                                                                                                                                                        https://steward-fu.github.io/website/umpc/d88/stock_dual.htm
                                                                                                                                                                         
                                                                                                                                                                        RetroFW
                                                                                                                                                                        https://steward-fu.github.io/website/umpc/d88/retrofw_setup.htm
                                                                                                                                                                        1.jpeg

                                                                                                                                                                        W Y 3 Replies Last reply Reply Quote Share 1
                                                                                                                                                                        • W
                                                                                                                                                                          whycanservice2 LV 8 @steward last edited by

                                                                                                                                                                          @steward 大佬666.这就移植上去了。。。。

                                                                                                                                                                          1 Reply Last reply Reply Quote Share 0
                                                                                                                                                                          • Y
                                                                                                                                                                            yofa2008 LV 5 @steward last edited by

                                                                                                                                                                            @steward 上一条不知道为何图没显示出来。windows系统那边还没装好,暂时刷不了固件。先拉了串口出来,看看到底是什么原因卡了。
                                                                                                                                                                            Screenshot from 2023-08-08 11-27-07.png
                                                                                                                                                                            按大佬的提示引出了串口线,暂时没有开孔固定。
                                                                                                                                                                            Screenshot from 2023-08-08 11-29-52.png
                                                                                                                                                                            设置串口baudrate 57600后,从串口看到原生的系统挂了,只显示了一个'.'然后反复重启。
                                                                                                                                                                            Screenshot from 2023-08-08 11-22-50.png
                                                                                                                                                                            待过两天windows那边装好 ,从USB刷固件。😂

                                                                                                                                                                            1 Reply Last reply Reply Quote Share 0
                                                                                                                                                                            • Y
                                                                                                                                                                              yofa2008 LV 5 @lovehex99 last edited by

                                                                                                                                                                              @lovehex99 你也是在国内吗?github下载是怎么解决的?我这边访问不了啊😡

                                                                                                                                                                              L 1 Reply Last reply Reply Quote Share 0
                                                                                                                                                                              • steward
                                                                                                                                                                                司徒 LV 6 last edited by

                                                                                                                                                                                iriver D88 UART 跟 音頻共用, 所以預設並沒有訊息輸出, 君正這個驅動比較舊, 建議使用 Win7 x86 系統刷機的, 另外, GitHub 是目前主要存放檔案的地方, 如果無法存取的話, 你只能請人幫忙搬移了~

                                                                                                                                                                                1 Reply Last reply Reply Quote Share 0
                                                                                                                                                                                • L
                                                                                                                                                                                  lovehex99 LV 5 @yofa2008 last edited by

                                                                                                                                                                                  @yofa2008 在 Gaviar Handheld (小志掌機) 中说:

                                                                                                                                                                                  @lovehex99 你也是在国内吗?github下载是怎么解决的?我这边访问不了啊😡

                                                                                                                                                                                  我在台灣喔
                                                                                                                                                                                  你看司徒要不要改gitee

                                                                                                                                                                                  steward Y 2 Replies Last reply Reply Quote Share 0
                                                                                                                                                                                  • steward
                                                                                                                                                                                    司徒 LV 6 @lovehex99 last edited by

                                                                                                                                                                                    @lovehex99
                                                                                                                                                                                    哈 ~ 由於個人原因, 我的 Gitee 帳號已經刪除了~所以, 我還是會繼續使用 GitHub ~

                                                                                                                                                                                    1 Reply Last reply Reply Quote Share 0
                                                                                                                                                                                    • L
                                                                                                                                                                                      lovehex99 LV 5 @steward last edited by

                                                                                                                                                                                      @steward 在 Gaviar Handheld (小志掌機) 中说:

                                                                                                                                                                                      @lovehex99
                                                                                                                                                                                      Tina-Linux 預設的 GPT 是配置 16GB, 你的 MicroSD卡是 4GB, 請使用 16GB 以上的 MicroSD 測試

                                                                                                                                                                                      Device      Start      End  Sectors  Size Type
                                                                                                                                                                                      /dev/sdb1   73728    74231      504  252K Microsoft basic data
                                                                                                                                                                                      /dev/sdb2   74232    74735      504  252K Microsoft basic data
                                                                                                                                                                                      /dev/sdb3   74736    75239      504  252K Microsoft basic data
                                                                                                                                                                                      /dev/sdb4   75240    95719    20480   10M Microsoft basic data
                                                                                                                                                                                      /dev/sdb5   95720   144359    48640 23.8M Microsoft basic data
                                                                                                                                                                                      /dev/sdb6  144360   166759    22400   11M Microsoft basic data
                                                                                                                                                                                      /dev/sdb7  166760   176999    10240    5M Microsoft basic data
                                                                                                                                                                                      /dev/sdb8  178176 31115263 30937088 14.8G Microsoft basic data
                                                                                                                                                                                      

                                                                                                                                                                                      我用32G還是開不了 要修改哪
                                                                                                                                                                                      不然就要去找16G卡了

                                                                                                                                                                                      HELLO! BOOT0 is starting!
                                                                                                                                                                                      [167]BOOT0 commit : 4654c3ec4
                                                                                                                                                                                      [170]set pll start
                                                                                                                                                                                      [172]fix vccio detect value:0xc0
                                                                                                                                                                                      [175]periph0 has been enabled
                                                                                                                                                                                      [178]set pll end
                                                                                                                                                                                      [179][pmu]: bus read error
                                                                                                                                                                                      [182]board init ok
                                                                                                                                                                                      [184]ZQ value = 0x2f
                                                                                                                                                                                      [186]get_pmu_exist() = -1
                                                                                                                                                                                      [188]ddr_efuse_type: 0xa
                                                                                                                                                                                      [190]trefi:7.8ms
                                                                                                                                                                                      [193][AUTO DEBUG] single rank and full DQ!
                                                                                                                                                                                      [197]ddr_efuse_type: 0xa
                                                                                                                                                                                      [199]trefi:7.8ms
                                                                                                                                                                                      [201][AUTO DEBUG] rank 0 row = 13
                                                                                                                                                                                      [204][AUTO DEBUG] rank 0 bank = 4
                                                                                                                                                                                      [207][AUTO DEBUG] rank 0 page size = 2 KB
                                                                                                                                                                                      [211]DRAM BOOT DRIVE INFO: V0.33
                                                                                                                                                                                      [214]DRAM CLK = 528 MHz
                                                                                                                                                                                      [217]DRAM Type = 2 (2:DDR2,3:DDR3)
                                                                                                                                                                                      [220]DRAMC read ODT off.
                                                                                                                                                                                      [222]DRAM ODT off.
                                                                                                                                                                                      [224]ddr_efuse_type: 0xa
                                                                                                                                                                                      [227]DRAM SIZE =64 M
                                                                                                                                                                                      [229]dram_tpr4:0x0
                                                                                                                                                                                      [230]PLL_DDR_CTRL_REG:0xf8002b00
                                                                                                                                                                                      [233]DRAM_CLK_REG:0xc0000000
                                                                                                                                                                                      [236][TIMING DEBUG] MR2= 0x0
                                                                                                                                                                                      [241]DRAM simple test OK.
                                                                                                                                                                                      [243]dram size =64
                                                                                                                                                                                      [245]card no is 0
                                                                                                                                                                                      [246]sdcard 0 line count 4
                                                                                                                                                                                      [249][mmc]: mmc driver ver 2021-04-2 16:45
                                                                                                                                                                                      [258][mmc]: Wrong media type 0x0
                                                                                                                                                                                      [261][mmc]: Try SD card 0
                                                                                                                                                                                      [270][mmc]: HSSDR52/SDR25 4 bit
                                                                                                                                                                                      [272][mmc]: 50000000 Hz
                                                                                                                                                                                      [275][mmc]: 29608 MB
                                                                                                                                                                                      [276][mmc]: SD/MMC 0 init OK!!!
                                                                                                                                                                                      [326]Loading boot-pkg Succeed(index=0).
                                                                                                                                                                                      [330]Entry_name = opensbi
                                                                                                                                                                                      [333]Entry_name = u-boot
                                                                                                                                                                                      [336]Entry_name = dtb
                                                                                                                                                                                      [339]mmc not para
                                                                                                                                                                                      [341]Jump to second Boot.

                                                                                                                                                                                      OpenSBI auto-t113-linux-V0.8-3-ge39e937


                                                                                                                                                                                      / __ \ / | _ _ |
                                                                                                                                                                                      | | | |
                                                                                                                                                                                      __ ___ _ __ | (
                                                                                                                                                                                      | |
                                                                                                                                                                                      ) || |
                                                                                                                                                                                      | | | | '_ \ / _ \ '_ \ ___ | _ < | |
                                                                                                                                                                                      | || | |) | __/ | | |) | |) || |
                                                                                                                                                                                      _
                                                                                                                                                                                      /| ./ _|| ||/|____/|
                                                                                                                                                                                      | |
                                                                                                                                                                                      |_|

                                                                                                                                                                                      Platform Name : T-HEAD Xuantie Platform
                                                                                                                                                                                      Platform HART Features : RV64ACDFIMSUVX
                                                                                                                                                                                      Platform Max HARTs : 1
                                                                                                                                                                                      Current Hart : 0
                                                                                                                                                                                      Firmware Base : 0x41fc0400
                                                                                                                                                                                      Firmware Size : 75 KB
                                                                                                                                                                                      Runtime SBI Version : 0.2

                                                                                                                                                                                      MIDELEG : 0x0000000000000222
                                                                                                                                                                                      MEDELEG : 0x000000000000b1ff
                                                                                                                                                                                      PMP0 : 0x0000000041fc0000-0

                                                                                                                                                                                      U-Boot 2018.07 (Jun 26 2023 - 13:32:21 +0000) Allwinner Technology

                                                                                                                                                                                      [00.408]DRAM: 64 MiB
                                                                                                                                                                                      [00.411]Relocation Offset is: 01ee9000
                                                                                                                                                                                      [00.415]secure enable bit: 0
                                                                                                                                                                                      can't support chip type 24064
                                                                                                                                                                                      [00.421]CPU=720 MHz,PLL6=600 Mhz,AHB=200 Mhz, APB1=100Mhz MBus=300Mhz
                                                                                                                                                                                      sunxi flash map init
                                                                                                                                                                                      SPI ALL: ready
                                                                                                                                                                                      [00.432]flash init start
                                                                                                                                                                                      [00.434]workmode = 0,storage type = 1
                                                                                                                                                                                      [00.438][mmc]: mmc driver ver uboot2018:2021-12-20 13:35:00
                                                                                                                                                                                      [00.443][mmc]: get sdc_type fail and use default host:tm1.
                                                                                                                                                                                      [00.450][mmc]: can't find node "mmc0",will add new node
                                                                                                                                                                                      [00.455][mmc]: fdt err returned <no error>
                                                                                                                                                                                      [00.458][mmc]: Using default timing para
                                                                                                                                                                                      [00.462][mmc]: SUNXI SDMMC Controller Version:0x50310
                                                                                                                                                                                      [00.479][mmc]: card_caps:0x3000000a
                                                                                                                                                                                      [00.482][mmc]: host_caps:0x3000003f
                                                                                                                                                                                      [00.486]sunxi flash init ok
                                                                                                                                                                                      [00.489]line:703 init_clocks
                                                                                                                                                                                      [00.492]drv_disp_init
                                                                                                                                                                                      request pwm success, pwm7:pwm7:0x2000c00.
                                                                                                                                                                                      [00.514]drv_disp_init finish
                                                                                                                                                                                      [00.522]Loading Environment from SUNXI_FLASH... OK
                                                                                                                                                                                      [00.543]boot_gui_init:start
                                                                                                                                                                                      [00.546]set disp.dev2_output_type fail. using defval=0
                                                                                                                                                                                      [00.573]set disp.fb0_rot_used fail. using defval=0
                                                                                                                                                                                      [00.578]set disp.fb0_rot_degree fail. using defval=0
                                                                                                                                                                                      [00.748]boot_gui_init:finish
                                                                                                                                                                                      partno erro : can't find partition bootloader
                                                                                                                                                                                      [00.757]bmp_name=bootlogo.bmp size 38454
                                                                                                                                                                                      [00.769]out of usb burn from boot: not need burn key
                                                                                                                                                                                      [00.774]Item0 (Map) magic is bad
                                                                                                                                                                                      [00.777]the secure storage item0 copy0 magic is bad
                                                                                                                                                                                      [00.782]Item0 (Map) magic is bad
                                                                                                                                                                                      [00.785]the secure storage item0 copy1 magic is bad
                                                                                                                                                                                      [00.790]Item0 (Map) magic is bad
                                                                                                                                                                                      partno erro : can't find partition private
                                                                                                                                                                                      root_partition is rootfs
                                                                                                                                                                                      set root to /dev/mmcblk0p5
                                                                                                                                                                                      [00.803]update part info
                                                                                                                                                                                      [00.807]LCD open finish
                                                                                                                                                                                      [00.809]update bootcmd
                                                                                                                                                                                      [00.812]change working_fdt 0x42aa8da0 to 0x42a88da0
                                                                                                                                                                                      disable nand error: FDT_ERR_BADPATH
                                                                                                                                                                                      [00.822]The storage not support sample function
                                                                                                                                                                                      No reserved memory region found in source FDT
                                                                                                                                                                                      [00.856]update dts
                                                                                                                                                                                      Hit any key to stop autoboot: 0
                                                                                                                                                                                      input addr exceed dram scope
                                                                                                                                                                                      [02.198]no vendor_boot partition is found
                                                                                                                                                                                      Android's image name: d1s-nezha
                                                                                                                                                                                      Detect comp none
                                                                                                                                                                                      [02.219]
                                                                                                                                                                                      Starting kernel ...

                                                                                                                                                                                      [02.221][mmc]: MMC Device 2 not found
                                                                                                                                                                                      [02.225][mmc]: mmc 2 not find, so not exit

                                                                                                                                                                                      steward Y 2 Replies Last reply Reply Quote Share 0
                                                                                                                                                                                      • steward
                                                                                                                                                                                        司徒 LV 6 @lovehex99 last edited by

                                                                                                                                                                                        @lovehex99
                                                                                                                                                                                        開機後, 插上 USB Type-C, 然後使用 adb devices 看看是否走找到裝置, 如果有找到裝置, 你可以用 adb shell 進去裝置, 然後執行 /etc/main 腳本~

                                                                                                                                                                                        L 1 Reply Last reply Reply Quote Share 0
                                                                                                                                                                                        • L
                                                                                                                                                                                          lovehex99 LV 5 @steward last edited by

                                                                                                                                                                                          @steward 在 Gaviar Handheld (小志掌機) 中说:

                                                                                                                                                                                          @lovehex99
                                                                                                                                                                                          開機後, 插上 USB Type-C, 然後使用 adb devices 看看是否走找到裝置, 如果有找到裝置, 你可以用 adb shell 進去裝置, 然後執行 /etc/main 腳本~

                                                                                                                                                                                          沒找到 我之後再編譯暈哥給的版本好了
                                                                                                                                                                                          root@TinaLinux:/# ls -al /etc/
                                                                                                                                                                                          ls -al /etc/
                                                                                                                                                                                          drwxr-xr-x 15 729 .
                                                                                                                                                                                          drwxr-xr-x 21 336 ..
                                                                                                                                                                                          -rw-r--r-- 1 51 adb_profile
                                                                                                                                                                                          -rwxr-xr-x 1 1090 asound.conf
                                                                                                                                                                                          -rw-r--r-- 1 351 banner
                                                                                                                                                                                          -rw-r--r-- 1 408 banner.failsafe
                                                                                                                                                                                          drwxr-xr-x 2 32 capabilities
                                                                                                                                                                                          -rwxr-xr-x 1 740 cedarc.conf
                                                                                                                                                                                          -rwxr-xr-x 1 4387 cedarx.conf
                                                                                                                                                                                          drwxr-xr-x 2 27 config
                                                                                                                                                                                          drwxr-xr-x 2 3 crontabs
                                                                                                                                                                                          -rw-r--r-- 1 129 device_info
                                                                                                                                                                                          -rw-r--r-- 1 1539 dnsmasq.conf
                                                                                                                                                                                          -rw-r--r-- 1 165 fstab
                                                                                                                                                                                          -rw-r--r-- 1 1408 fw_env.config
                                                                                                                                                                                          -rw-r--r-- 1 123 group
                                                                                                                                                                                          drwxr-xr-x 8 93 hotplug.d
                                                                                                                                                                                          drwxr-xr-x 2 378 init.d
                                                                                                                                                                                          -rwxr-xr-x 1 1174 inittab
                                                                                                                                                                                          -rw-r--r-- 1 180 mdev.conf
                                                                                                                                                                                          drwxr-xr-x 2 75 modules-boot.d
                                                                                                                                                                                          drwxr-xr-x 2 201 modules.d
                                                                                                                                                                                          lrwxrwxrwx 1 12 mtab -> /proc/mounts
                                                                                                                                                                                          -rw-r--r-- 1 217 openwrt_release
                                                                                                                                                                                          -rw-r--r-- 1 6 openwrt_version
                                                                                                                                                                                          drwxr-xr-x 3 27 opkg
                                                                                                                                                                                          -rw-r--r-- 1 190 passwd
                                                                                                                                                                                          -rwxr-xr-x 1 1245 profile
                                                                                                                                                                                          drwxr-xr-x 2 26 rc.button
                                                                                                                                                                                          -rwxr-xr-x 1 2428 rc.common
                                                                                                                                                                                          drwxr-xr-x 2 212 rc.d
                                                                                                                                                                                          -rw-r--r-- 1 5993 recorder.cfg
                                                                                                                                                                                          -rw-r--r-- 1 128 shadow
                                                                                                                                                                                          -rw-r--r-- 1 9 shells
                                                                                                                                                                                          -rwxr-xr-x 1 817 smt_cycle_sleep_wakeup.sh
                                                                                                                                                                                          -rwxr-xr-x 1 447 smt_sleep.sh
                                                                                                                                                                                          -rwxr-xr-x 1 451 swupdate_public.pem
                                                                                                                                                                                          drwxr-xr-x 2 3 uci-defaults
                                                                                                                                                                                          drwxr-xr-x 3 68 udev
                                                                                                                                                                                          -rwxr-xr-x 1 3546 udhcpd.conf
                                                                                                                                                                                          drwxr-xr-x 2 148 wifi
                                                                                                                                                                                          -rwxr-xr-x 1 104 wpa_supplicant.conf

                                                                                                                                                                                          1 Reply Last reply Reply Quote Share 0
                                                                                                                                                                                          • steward
                                                                                                                                                                                            司徒 LV 6 last edited by

                                                                                                                                                                                            你這個系統並不是我那個測試系統

                                                                                                                                                                                            $ ls /
                                                                                                                                                                                            bin  data  dev  etc  home  lib  lib64xthead  mnt  ok.wav  overlay  proc  pseudo_init  rdinit  riscv64-unknown-linux-gnu  rom  root  sbin  squashfs  sys  tmp  usr  var  www
                                                                                                                                                                                            
                                                                                                                                                                                            $ ls /etc/
                                                                                                                                                                                            adb_profile      capabilities  crontabs      fw_env.config  inittab         modules.d        opkg       rc.common     shells                     uci-defaults  wpa_supplicant.conf
                                                                                                                                                                                            asound.conf      cedarc.conf   device_info   group          main            mtab             passwd     rc.d          smt_cycle_sleep_wakeup.sh  udev
                                                                                                                                                                                            banner           cedarx.conf   dnsmasq.conf  hotplug.d      mdev.conf       openwrt_release  profile    recorder.cfg  smt_sleep.sh               udhcpd.conf
                                                                                                                                                                                            banner.failsafe  config        fstab         init.d         modules-boot.d  openwrt_version  rc.button  shadow        swupdate_public.pem        wifi
                                                                                                                                                                                            
                                                                                                                                                                                            $ cat /etc/main 
                                                                                                                                                                                            #!/bin/sh
                                                                                                                                                                                            amixer sset 'Headphone volume' 100%
                                                                                                                                                                                            
                                                                                                                                                                                            while [ 1 ]
                                                                                                                                                                                            do
                                                                                                                                                                                              aplay /ok.wav
                                                                                                                                                                                            done
                                                                                                                                                                                            
                                                                                                                                                                                            1 Reply Last reply Reply Quote Share 0
                                                                                                                                                                                            • Y
                                                                                                                                                                                              yofa2008 LV 5 @lovehex99 last edited by

                                                                                                                                                                                              @steward 在 Gaviar Handheld (小志掌機) 中说:

                                                                                                                                                                                              iriver D88 UART 跟 音頻共用, 所以預設並沒有訊息輸出, 君正這個驅動比較舊, 建議使用 Win7 x86 系統刷機的, 另外, GitHub 是目前主要存放檔案的地方, 如果無法存取的話, 你只能請人幫忙搬移了~

                                                                                                                                                                                              @lovehex99 在 Gaviar Handheld (小志掌機) 中说:

                                                                                                                                                                                              @yofa2008 在 Gaviar Handheld (小志掌機) 中说:

                                                                                                                                                                                              @lovehex99 你也是在国内吗?github下载是怎么解决的?我这边访问不了啊😡

                                                                                                                                                                                              我在台灣喔
                                                                                                                                                                                              你看司徒要不要改gitee

                                                                                                                                                                                              @steward @lovehex99 okk.感谢告知,我再看看别的办法吧

                                                                                                                                                                                              1 Reply Last reply Reply Quote Share 0
                                                                                                                                                                                              • Y
                                                                                                                                                                                                yofa2008 LV 5 @steward last edited by

                                                                                                                                                                                                @steward 感谢提供的固件资料。手上D88已经正常开机,大致看了一下,那个年代感又回来了。。。再次拜谢;后续紧跟大佬搞游戏机,找找那些 【爷青回】的瞬间。哈哈哈,再次拜谢了
                                                                                                                                                                                                welcome screen.png
                                                                                                                                                                                                1_0_2_firmware message.png

                                                                                                                                                                                                Y 1 Reply Last reply Reply Quote Share 1
                                                                                                                                                                                                • Y
                                                                                                                                                                                                  yofa2008 LV 5 @whycan last edited by

                                                                                                                                                                                                  @whycan 根据上面的图片整理了一下MCU的IO去向,第二版更新的电机请问是使用了哪几个GPIO
                                                                                                                                                                                                  Screenshot from 2023-08-18 09-20-35.png

                                                                                                                                                                                                  W whycan 2 Replies Last reply Reply Quote Share 1
                                                                                                                                                                                                  • Y
                                                                                                                                                                                                    yofa2008 LV 5 @yofa2008 last edited by

                                                                                                                                                                                                    @steward 请问司徒大佬D88的双启动包里kbd和v1.05是键盘驱动不一样吗?

                                                                                                                                                                                                    steward 1 Reply Last reply Reply Quote Share 0
                                                                                                                                                                                                    • steward
                                                                                                                                                                                                      司徒 LV 6 @yofa2008 last edited by steward

                                                                                                                                                                                                      @yofa2008
                                                                                                                                                                                                      v1.05 基於官方驅動做的整合包
                                                                                                                                                                                                      kbd 拿掉官方鍵盤驅動, 替換新的鍵盤驅動 (解決卡鍵問題)

                                                                                                                                                                                                      新的鍵盤驅動源碼:
                                                                                                                                                                                                      https://github.com/steward-fu/kernel/blob/jz4755_d8_linux-2.6.24_debian/drivers/input/keyboard/d88kbd.c

                                                                                                                                                                                                      Y 1 Reply Last reply Reply Quote Share 0
                                                                                                                                                                                                      • W
                                                                                                                                                                                                        whycanservice2 LV 8 @yofa2008 last edited by

                                                                                                                                                                                                        @yofa2008 MO0 MO1 分别使用PB7 PB6 .

                                                                                                                                                                                                        Y 1 Reply Last reply Reply Quote Share 0
                                                                                                                                                                                                        • Y
                                                                                                                                                                                                          yofa2008 LV 5 @steward last edited by

                                                                                                                                                                                                          @steward 感谢告知!

                                                                                                                                                                                                          1 Reply Last reply Reply Quote Share 0
                                                                                                                                                                                                          • Y
                                                                                                                                                                                                            yofa2008 LV 5 @whycanservice2 last edited by

                                                                                                                                                                                                            @whycanservice2 收到,谢谢回复。

                                                                                                                                                                                                            1 Reply Last reply Reply Quote Share 0
                                                                                                                                                                                                            • 1
                                                                                                                                                                                                            • 2
                                                                                                                                                                                                            • 1 / 2
                                                                                                                                                                                                            • First post
                                                                                                                                                                                                              Last post

                                                                                                                                                                                                            Copyright © 2024 深圳全志在线有限公司 粤ICP备2021084185号 粤公网安备44030502007680号

                                                                                                                                                                                                            行为准则 | 用户协议 | 隐私权政策