您尚未登录。

楼主 # 2022-03-08 08:08:44

司徒
Moderator
注册时间: 2020-02-13
已发帖子: 371
积分: 144
个人网站

研究Game Gear Micro掌機的開源可行性

什麼!司徒你又開了一個新帖~不是要研究草食系統嗎?難道,草食系統已經進入生命結束前必須完成的作品之中嗎?這...不好說~司徒把這個帖子看待成番外篇,番外的特性就是盡量不要引起外人注意就草草結束~此時,邪惡的鍵盤俠可能要說:司徒的話如果可以信,狗屎都可以吃了,坦白說,司徒的話確實可以信的,狗屎也確實是可以吃的~


番外篇的目標如下
1. 可以從MicroSD進入Linux系統
2. 可以支援雙系統
3. 可以控制屏幕顯示
4. 可以玩GBA模擬器
P.S. 達標後,此貼就會結帖


簡要規格

CPU          Allwinner F1C200S ARM9 408MHz
RAM          32MB
Flash        128MB
Screen       1.15" 240x180
Gamepad      DPad, 2 Buttons, Start
Port         MicroUSB
Battery      AAAx2
Dimension    80mm x 40mm x 20mm
Weight       60g 

正面
1.jpg


下邊
2.jpg


側邊
3.jpg


上邊
4.jpg


側邊
5.jpg


精美的包裝盒,真像以前購買GB卡帶的感覺...
1.jpg


背面
2.jpg


主機
3.jpg


相較於PocketGo的大小
4.jpg


正面
5.jpg


背面
6.jpg


PCB主板
7.jpg


Allwinner F1C200S
8.jpg


8006UL LD53EG(聲音放大)
9.jpg


PCB正面
10.jpg


XT26G01AWSEGA
11.jpg


X1308V0 20200727
12.jpg


屏24Pin
13.jpg


ALT-013BSLN-J2
14.jpg


喇叭
15.jpg


有落塵可能
16.jpg
17.jpg


B面
18.jpg


AAAx2
19.jpg


軟膠墊
20.jpg


DPad中心支撐在軟膠墊上
21.jpg

离线

#1 2022-03-08 11:05:20

M+
会员
注册时间: 2021-09-03
已发帖子: 7
积分: 5

Re: 研究Game Gear Micro掌機的開源可行性

沙发!前排支持

离线

#2 2022-03-08 13:58:28

jordonwu
会员
注册时间: 2021-07-05
已发帖子: 40
积分: 21

Re: 研究Game Gear Micro掌機的開源可行性

有串口吗?

离线

#3 2022-03-08 14:44:21

bigbigcong
会员
注册时间: 2021-09-03
已发帖子: 17
积分: 11.5

Re: 研究Game Gear Micro掌機的開源可行性

哈哈哈,司徒你多大了?文章开头好中二啊哈哈哈

离线

楼主 #4 2022-03-08 15:35:22

司徒
Moderator
注册时间: 2020-02-13
已发帖子: 371
积分: 144
个人网站

Re: 研究Game Gear Micro掌機的開源可行性

@jordonwu
串口有PCB焊點

@bigbigcong
今年剛滿20歲~

离线

#5 2022-03-08 15:41:46

tigger
Moderator
注册时间: 2021-06-18
已发帖子: 171
积分: 110

Re: 研究Game Gear Micro掌機的開源可行性

司徒应该不是20, 因为年龄越小对掌机越没得感觉, 喜欢掌机都是像我这样的老骨头了.

离线

楼主 #6 2022-03-08 21:22:50

司徒
Moderator
注册时间: 2020-02-13
已发帖子: 371
积分: 144
个人网站

Re: 研究Game Gear Micro掌機的開源可行性

@tigger
老骨头總是有相同的默契~哈~


UART位置
1.jpg


跳線
2.jpg


連接UART
3.jpg


Baudrate 115200bps

[0]HELLO! BOOT0 is starting!
[2]boot0 commit : e9d7c88390ded1551ff4a4bcfef31cbc9cf717cb
 
[0]HELLO! BOOT0 is starting!
[2]boot0 commit : e9d7c88390ded1551ff4a4bcfef31cbc9cf717cb
 
[0]HELLO! BOOT0 is starting!
[2]boot0 commit : e9d7c88390ded1551ff4a4bcfef31cbc9cf717cb
 
[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Initializing cgroup subsys cpuset
[    0.000000] Initializing cgroup subsys cpuacct
[    0.000000] Linux version 3.10.65 (oe-user@oe-host) (gcc version 8.3.0 (GCC) ) #1 Tue Jul 21 03:52:29 UTC 2020
[    0.000000] CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=00053177
[    0.000000] CPU: VIVT data cache, VIVT instruction cache
[    0.000000] Machine: Allwinner A1X (Device Tree), model: sun3iw1p1
[    0.000000] bootconsole [earlycon0] enabled
INIT: version 2.88 booting
/dev/nandh: LABEL="UDISK" UUID="2b800baa-27fe-453f-a194-cee18ef6824a" TYPE="ext4"
/dev/nandh already format by ext4
/dev/nande: LABEL="rootfs_data" UUID="3e6930be-09d1-481c-b098-4e68743a36f6" TYPE="ext4"
/dev/nande already format by ext4
Starting udev
hwclock: can't open '/dev/misc/rtc': No such file or directory
Tue Jul 21 04:02:17 UTC 2020
hwclock: can't open '/dev/misc/rtc': No such file or directory
rm: can't remove '/tmp': Read-only file system
rm: can't remove '/etc/resolv.conf': Read-only file system
ln: /etc/resolv.conf: File exists
INIT: Entering runlevel: 5
Configuring network interfaces... ip: SIOCGIFFLAGS: No such device
hwclock: can't open '/dev/misc/rtc': No such file or directory
Starting syslogd/klogd: done

Vivid-Yocto-Distro V0.1 c200s-gamegearmicro /dev/ttyS0

c200s-gamegearmicro login:

离线

楼主 #7 2022-03-09 07:24:43

司徒
Moderator
注册时间: 2020-02-13
已发帖子: 371
积分: 144
个人网站

Re: 研究Game Gear Micro掌機的開源可行性

進入Flash Mode(按住按鍵,然後插入USB)
1.jpg


偵測到的裝置

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

离线

楼主 #8 2022-03-13 20:08:59

司徒
Moderator
注册时间: 2020-02-13
已发帖子: 371
积分: 144
个人网站

Re: 研究Game Gear Micro掌機的開源可行性

司徒想了想,發現有一個位置可以用來擺放MicroSD
1.jpg


F1C200S左邊是屏的走線,右邊則是用來跳線連接MicroSD,這改機難度屬於中上...
2.jpg


為了方便跳線,司徒先將10uPF、1M電阻拆掉
3.jpg


原本想直接使用MicroSD元件,但是,發現接觸的排針會脫落,需要固定,因此,司徒找來一個肉雞
4.jpg


電宰後...
5.jpg


相當完美的位置
6.jpg


但是,下方是屏的走線,假如先改造MicroSD,這屏的問題可能就很難解
7.jpg


因此,司徒打算先把屏的初始化代碼找出來,於是開始刮線
8.jpg


腳位圖
9.jpg


標示位置
10.jpg


跳線
11.jpg


屏的走線真的蠻細的,需要一點苦工,司徒一想到後面的MicroSD跳線,有種想哭的感覺...
12.jpg


寨機邏輯分析儀上場
13.jpg


由上而下分別是:CS、RD、RS、WR、PD0、DB0~DB7、PD8,從這個圖,得到四個資訊:
1. 屏的驅動方式是MCU方式(i80)
2. 屏有TE腳位(Screen Tearing)
3. PD0是TE腳位
4. PD8是RESET腳位
14.jpg


TE腳位剛好是60Hz,代表這個屏的顯示可以達60FPS,相當不錯的屏
15.jpg


邏輯分析儀取得的資料

0.000000000,1,1,1,0,0,0,0,0,0,0,0,1
0.000002600,1,1,1,0,0,0,0,0,0,0,0,0
0.000003200,1,1,1,0,0,0,0,0,0,0,0,1
0.110548360,1,1,1,0,0,0,0,0,0,0,0,0
0.220564240,1,1,1,0,0,0,0,0,0,0,0,1
0.230566400,1,1,1,0,0,0,0,0,0,0,0,0
0.240566320,1,1,1,0,0,0,0,0,0,0,0,1
0.340535600,0,0,1,0,0,0,1,0,0,0,1,1
0.340535640,0,0,0,0,0,0,1,0,0,0,1,1
0.340535680,0,0,1,0,0,0,1,0,0,0,1,1
0.340535720,1,1,1,0,0,0,0,0,0,0,0,1
0.460496120,0,0,0,0,0,1,1,0,1,1,0,1
0.460496200,1,1,1,0,0,0,0,0,0,0,0,1
0.460598320,0,1,0,0,0,0,0,1,1,0,0,1
0.460598400,1,1,1,0,0,0,0,0,0,0,0,1
0.460699800,0,0,1,0,0,0,0,1,0,0,0,1
0.460699840,0,0,0,0,0,1,1,1,1,0,0,1
0.460699880,0,0,1,0,0,1,1,1,1,0,0,1
0.460699920,1,1,1,0,0,0,0,0,0,0,0,1
0.460801720,0,1,1,0,0,0,0,0,0,1,1,1
0.460801760,0,1,0,0,0,0,0,0,0,1,1,1
0.460801800,0,1,1,0,0,0,0,0,0,1,1,1
0.460801840,1,1,1,0,0,0,0,0,0,0,0,1
0.460902760,0,0,0,0,0,1,1,0,0,1,0,1
0.460902840,1,1,1,0,0,0,0,0,0,0,0,1
0.461004640,0,0,1,0,0,1,1,0,0,1,1,1
0.461004680,0,0,0,0,0,1,1,0,0,1,1,1
0.461004720,0,0,1,0,0,1,1,0,0,1,1,1
0.461004760,1,1,1,0,0,0,0,0,0,0,0,1
0.461105680,0,1,1,0,0,0,0,0,0,0,0,1
0.461105720,0,1,0,0,0,0,0,0,0,0,0,1
0.461105760,1,1,1,0,0,0,0,0,0,0,0,1
0.461206600,0,0,1,1,0,1,1,0,1,0,0,1
0.461206640,0,0,0,1,0,1,1,0,1,0,0,1
0.461206680,0,0,1,1,0,1,1,0,1,0,0,1
0.461206720,1,1,1,0,0,0,0,0,0,0,0,1
0.461308600,0,1,1,0,0,0,0,1,0,1,0,1
0.461308640,0,1,0,0,0,0,0,1,0,1,0,1
0.461308680,0,1,1,0,0,0,0,1,0,1,0,1
0.461308720,1,1,1,0,0,0,0,0,0,0,0,1
0.461409520,0,1,1,0,0,0,0,0,0,0,0,1
0.461409560,0,1,0,0,0,0,0,1,0,1,0,1
0.461409600,0,1,1,0,0,0,0,1,0,1,0,1
0.461409640,1,1,1,0,0,0,0,0,0,0,0,1
0.461510560,0,1,1,0,0,0,0,0,0,0,0,1
0.461510600,0,1,0,0,0,0,0,0,0,0,0,1
0.461510640,0,1,1,0,0,0,0,0,0,0,0,1
0.461510680,1,1,1,0,0,0,0,0,0,0,0,1
0.461612480,0,1,0,0,0,1,1,0,1,0,1,1
0.461612560,1,1,1,0,0,0,0,0,0,0,0,1
0.461713480,0,1,1,0,0,1,0,0,1,0,1,1
0.461713520,0,1,0,0,0,1,1,0,1,0,1,1
0.461713560,0,1,1,0,0,1,1,0,1,0,1,1
0.461713600,1,1,1,0,0,0,0,0,0,0,0,1
0.461815400,0,0,1,1,0,1,1,0,1,1,1,1
0.461815440,0,0,0,1,0,1,1,0,1,1,1,1
0.461815480,1,1,1,1,0,1,0,0,0,0,0,1
0.461815520,1,1,1,0,0,0,0,0,0,0,0,1
0.461916440,0,1,0,0,0,0,0,0,1,0,0,1
0.461916520,1,1,1,0,0,0,0,0,0,0,0,1
0.462017360,0,0,1,1,0,1,1,1,1,0,1,1
0.462017400,0,0,0,1,0,1,1,1,1,0,1,1
0.462017440,1,1,1,0,0,0,0,0,0,0,0,1
0.462119360,0,1,1,0,0,1,1,0,0,0,0,1
0.462119400,0,1,0,0,0,1,1,0,0,0,0,1
0.462119440,1,1,1,0,0,1,0,0,0,0,0,1
0.462119480,1,1,1,0,0,0,0,0,0,0,0,1
0.462220280,0,0,1,1,1,0,0,0,0,0,0,1
0.462220320,0,0,0,1,1,0,0,0,0,0,0,1
0.462220360,0,0,1,1,1,0,0,0,0,0,0,1
0.462220400,1,1,1,0,0,0,0,0,0,0,0,1
0.462321200,0,1,1,0,0,1,0,1,0,1,0,1
0.462321240,0,1,0,0,0,1,0,1,0,1,0,1
0.462321280,0,1,1,0,0,1,0,1,0,1,0,1
0.462321320,1,1,1,0,0,0,0,0,0,0,0,1
0.462422240,0,0,1,1,1,0,0,0,1,0,0,1
0.462422280,0,0,0,1,1,0,0,0,1,0,0,1
0.462422320,1,1,1,1,1,0,0,0,1,0,0,1
0.462422360,1,1,1,0,0,0,0,0,0,0,0,1
0.462523160,0,1,1,0,0,0,0,0,0,0,1,1
0.462523200,0,1,0,0,0,0,0,0,0,0,1,1
0.462523240,0,1,1,0,0,0,0,0,0,0,1,1
0.462523280,1,1,1,0,0,0,0,0,0,0,0,1
0.462624200,0,0,1,1,1,0,0,0,1,0,1,1
0.462624240,0,0,0,1,1,0,0,0,1,0,1,1
0.462624280,1,1,1,0,0,0,0,0,0,0,0,1
0.462725120,0,1,1,0,0,0,1,0,1,1,1,1
0.462725160,0,1,0,0,0,0,1,0,1,1,1,1
0.462725200,0,1,1,0,0,0,1,0,1,1,1,1
0.462725240,1,1,1,0,0,0,0,0,0,0,0,1
0.462826040,0,0,1,1,1,0,0,0,0,1,0,1
0.462826080,0,0,0,1,1,0,0,0,0,1,0,1
0.462826120,0,0,1,1,1,0,0,0,0,1,0,1
0.462826160,1,1,1,0,0,0,0,0,0,0,0,1
0.462927960,0,1,1,0,0,1,0,0,0,0,0,1
0.462928000,0,1,0,0,0,1,0,0,0,0,0,1
0.462928040,1,1,1,0,0,0,0,0,0,0,0,1
0.463029000,0,0,0,1,1,0,0,0,1,1,0,1
0.463029080,1,1,1,0,0,0,0,0,0,0,0,1
0.463130000,0,1,1,0,0,0,0,1,1,1,1,1
0.463130040,0,1,0,0,0,0,0,1,1,1,1,1
0.463130080,0,1,1,0,0,0,0,1,1,1,1,1
0.463130120,1,1,1,0,0,0,0,0,0,0,0,1
0.463231920,0,0,1,1,1,0,1,0,0,0,0,1
0.463231960,0,0,0,1,1,0,1,0,0,0,0,1
0.463232000,1,1,1,0,0,0,0,0,0,0,0,1
0.463332960,0,1,0,1,0,1,0,0,0,1,0,1
0.463333000,0,1,1,1,0,1,0,0,0,1,0,1
0.463333040,1,1,1,0,0,0,0,0,0,0,0,1
0.463434840,0,1,1,1,0,1,0,0,0,0,1,1
0.463434880,0,1,0,1,0,1,0,0,0,0,1,1
0.463434920,0,1,1,1,0,1,0,0,0,0,1,1
0.463434960,1,1,1,0,0,0,0,0,0,0,0,1
0.463535760,0,0,1,1,1,0,1,0,1,1,0,1
0.463535800,0,0,0,1,1,0,1,0,1,1,0,1
0.463535840,0,0,1,1,1,0,1,0,1,1,0,1
0.463535880,1,1,1,0,0,0,0,0,0,0,0,1
0.463636800,0,1,1,1,0,1,0,0,0,0,1,1
0.463636840,0,1,0,1,0,1,0,0,0,0,1,1
0.463636880,1,1,1,0,0,1,0,0,0,0,0,1
0.463636920,1,1,1,0,0,0,0,0,0,0,0,1
0.463738720,0,0,0,1,1,1,0,0,0,0,0,1
0.463738800,1,1,1,0,0,0,0,0,0,0,0,1
0.463839720,0,1,1,1,1,0,1,0,0,0,0,1
0.463839760,0,1,0,1,1,0,1,0,0,0,0,1
0.463839800,0,1,1,1,1,0,1,0,0,0,0,1
0.463839840,1,1,1,0,0,0,0,0,0,0,0,1
0.463940760,0,1,1,0,0,0,0,0,0,1,0,1
0.463940800,0,1,0,0,0,0,0,0,0,1,0,1
0.463940840,1,1,1,0,0,0,0,0,0,0,0,1
0.464042680,0,1,0,0,0,0,0,1,0,1,0,1
0.464042720,0,1,1,0,0,0,0,1,0,1,0,1
0.464042760,1,1,1,0,0,0,0,0,0,0,0,1
0.464143680,0,1,1,0,0,0,1,0,0,0,1,1
0.464143720,0,1,0,0,0,0,1,0,0,0,1,1
0.464143760,0,1,1,0,0,0,1,0,0,0,1,1
0.464143800,1,1,1,0,0,0,0,0,0,0,0,1
0.464245600,0,1,1,0,0,0,1,0,1,0,1,1
0.464245640,0,1,0,0,0,0,1,0,1,0,1,1
0.464245680,1,1,1,0,0,0,0,0,0,0,0,1
0.464346520,0,1,1,0,0,1,0,1,0,1,0,1
0.464346560,0,1,0,0,0,1,0,1,0,1,0,1
0.464346600,1,1,1,0,0,1,0,0,0,0,0,1
0.464346640,1,1,1,0,0,0,0,0,0,0,0,1
0.464447560,0,1,0,0,0,1,1,1,1,0,1,1
0.464447640,1,1,1,0,0,0,0,0,0,0,0,1
0.464549440,0,1,1,0,1,0,1,0,0,1,1,1
0.464549480,0,1,0,0,1,0,1,0,0,1,1,1
0.464549520,0,1,1,0,1,0,1,0,0,1,1,1
0.464549560,1,1,1,0,0,0,0,0,0,0,0,1
0.464650480,0,1,1,0,1,0,0,0,0,1,0,1
0.464650520,0,1,0,0,1,0,0,0,0,1,0,1
0.464650560,1,1,1,0,0,0,0,0,0,0,0,1
0.464751400,0,1,1,0,0,0,1,0,1,1,0,1
0.464751440,0,1,0,0,0,0,1,0,1,1,0,1
0.464751480,0,1,1,0,0,0,1,0,1,1,0,1
0.464751520,1,1,1,0,0,0,0,0,0,0,0,1
0.464852320,0,1,1,0,0,0,0,1,0,1,1,1
0.464852360,0,1,0,0,0,0,0,1,0,1,1,1
0.464852400,0,1,1,0,0,0,0,1,0,1,1,1
0.464852440,1,1,1,0,0,0,0,0,0,0,0,1
0.464953360,0,1,1,0,0,0,0,1,1,0,1,1
0.464953400,0,1,0,0,0,0,0,1,1,0,1,1
0.464953440,1,1,1,0,0,0,0,1,1,0,0,1
0.464953480,1,1,1,0,0,0,0,0,0,0,0,1
0.465054280,0,1,1,0,0,0,1,1,1,1,1,1
0.465054320,0,1,0,0,0,0,1,1,1,1,1,1
0.465054360,0,1,1,0,0,0,1,1,1,1,1,1
0.465054400,1,1,1,0,0,0,0,0,0,0,0,1
0.465155200,0,1,1,0,0,1,0,0,0,0,1,1
0.465155240,0,1,0,0,0,1,0,0,1,0,1,1
0.465155280,0,1,1,0,0,1,0,0,1,0,1,1
0.465155320,1,1,1,0,0,0,0,0,0,0,0,1
0.465256240,0,0,1,1,1,1,0,0,0,0,1,1
0.465256280,0,0,0,1,1,1,0,0,0,0,1,1
0.465256320,0,0,1,1,1,1,0,0,0,0,1,1
0.465256360,1,1,1,0,0,0,0,0,0,0,0,1
0.465358160,0,1,0,1,1,0,1,0,0,0,0,1
0.465358240,1,1,1,0,0,0,0,0,0,0,0,1
0.465459160,0,1,1,0,0,0,0,0,0,1,0,1
0.465459200,0,1,0,0,0,0,0,0,0,1,0,1
0.465459240,0,1,1,0,0,0,0,0,0,1,0,1
0.465459280,1,1,1,0,0,0,0,0,0,0,0,1
0.465560120,0,1,0,0,0,0,0,1,1,0,1,1
0.465560200,1,1,1,0,0,0,0,0,0,0,0,1
0.465662120,0,1,0,0,0,0,1,0,0,0,0,1
0.465662200,1,1,1,0,0,0,0,0,0,0,0,1
0.465763040,0,1,1,0,0,0,1,0,1,0,1,1
0.465763080,0,1,0,0,0,0,1,0,1,0,1,1
0.465763120,1,1,1,0,0,0,0,0,0,0,0,1
0.465865040,0,1,1,0,0,1,0,1,0,1,0,1
0.465865080,0,1,0,0,0,1,0,1,0,1,0,1
0.465865120,1,1,1,0,0,0,0,0,0,0,0,1
0.465965960,0,1,1,0,0,1,1,1,1,0,0,1
0.465966000,0,1,0,0,0,1,1,1,1,0,0,1
0.465966040,0,1,1,0,0,1,1,1,1,0,0,1
0.465966080,1,1,1,0,0,0,0,0,0,0,0,1
0.466067000,0,1,1,0,1,0,0,0,0,1,0,1
0.466067040,0,1,0,0,1,0,0,0,0,1,0,1
0.466067080,1,1,1,0,0,0,0,0,0,0,0,1
0.466168880,0,1,1,0,1,0,1,0,0,0,1,1
0.466168920,0,1,0,0,1,0,1,0,0,0,1,1
0.466168960,0,1,1,0,1,0,1,0,0,0,1,1
0.466169000,1,1,1,0,0,0,0,0,0,0,0,1
0.466269920,0,1,1,0,0,1,0,0,1,1,0,1
0.466269960,0,1,0,0,0,1,0,0,1,1,0,1
0.466270000,1,1,1,0,0,1,0,0,1,0,0,1
0.466270040,1,1,1,0,0,0,0,0,0,0,0,1
0.466370840,0,1,1,0,0,0,1,1,1,1,1,1
0.466370880,0,1,0,0,0,0,1,1,1,1,1,1
0.466370920,0,1,1,0,0,0,1,1,1,1,1,1
0.466370960,1,1,1,0,0,0,0,0,0,0,0,1
0.466472840,0,1,1,0,0,0,1,1,1,1,1,1
0.466472880,0,1,0,0,0,0,1,1,1,1,1,1
0.466472920,0,1,1,0,0,0,1,1,1,1,1,1
0.466472960,1,1,1,0,0,0,0,0,0,0,0,1
0.466573800,0,1,0,0,0,1,0,0,0,0,0,1
0.466573840,0,1,1,0,0,1,0,0,0,0,0,1
0.466573880,1,1,1,0,0,0,0,0,0,0,0,1
0.466675800,0,1,0,0,0,1,0,0,1,0,1,1
0.466675880,1,1,1,0,0,0,0,0,0,0,0,1
0.466776720,0,0,1,0,0,1,0,0,0,0,1,1
0.466776760,0,0,0,0,0,1,0,0,0,0,1,1
0.466776800,1,1,1,0,0,0,0,0,0,0,0,1
0.466877720,0,0,1,0,0,1,0,1,0,0,0,1
0.466877760,0,0,0,0,0,1,0,1,1,0,0,1
0.466877800,0,0,1,0,0,1,0,1,1,0,0,1
0.466877840,1,1,1,0,0,0,0,0,0,0,0,1
0.466979640,0,1,1,0,0,0,0,0,0,0,0,1
0.466979680,0,1,0,0,0,0,0,0,0,0,0,1
0.466979720,0,1,1,0,0,0,0,0,0,0,0,1
0.466979760,1,1,1,0,0,0,0,0,0,0,0,1
0.467080560,0,1,1,0,0,0,0,0,0,0,0,1
0.467080600,0,1,0,0,0,0,0,0,0,0,0,1
0.467080640,0,1,1,0,0,0,0,0,0,0,0,1
0.467080680,1,1,1,0,0,0,0,0,0,0,0,1
0.467181600,0,1,1,0,0,0,0,0,0,0,0,1
0.467181640,0,1,0,0,0,0,0,0,0,0,0,1
0.467181680,1,1,1,0,0,0,0,0,0,0,0,1
0.467283520,0,1,0,1,1,1,0,1,1,1,1,1
0.467283560,0,1,1,1,1,1,0,1,1,1,1,1
0.467283600,1,1,1,0,0,0,0,0,0,0,0,1
0.467384520,0,0,1,0,0,1,0,1,1,0,1,1
0.467384560,0,0,0,0,0,1,0,1,1,0,1,1
0.467384600,0,0,1,0,0,1,0,1,1,0,1,1
0.467384640,1,1,1,0,0,0,0,0,0,0,0,1
0.467486440,0,1,1,0,0,0,0,0,0,0,0,1
0.467486480,0,1,0,0,0,0,0,0,0,0,0,1
0.467486520,1,1,1,0,0,0,0,0,0,0,0,1
0.467587440,0,1,1,0,0,0,0,0,0,0,0,1
0.467587480,0,1,0,0,0,0,0,0,0,0,0,1
0.467587520,0,1,1,0,0,0,0,0,0,0,0,1
0.467587560,1,1,1,0,0,0,0,0,0,0,0,1
0.467688480,0,1,1,0,0,0,0,0,0,0,0,1
0.467688520,0,1,0,0,0,0,0,0,0,0,0,1
0.467688560,0,1,1,0,0,0,0,0,0,0,0,1
0.467688600,1,1,1,0,0,0,0,0,0,0,0,1
0.467790400,0,1,0,1,1,1,0,1,1,1,1,1
0.467790480,1,1,1,0,0,0,0,0,0,0,0,1
0.467891400,0,0,1,0,0,0,0,0,0,0,0,1
0.467891440,0,0,0,0,0,0,0,0,0,0,0,1
0.467891480,0,0,1,0,0,0,0,0,0,0,0,1
0.467891520,1,1,1,0,0,0,0,0,0,0,0,1
0.467992360,0,0,0,0,0,1,0,1,0,0,1,1
0.467992440,1,1,1,0,0,0,0,0,0,0,0,1
0.587952560,0,0,0,0,0,1,0,1,0,1,0,1
0.587952640,1,1,1,0,0,0,0,0,0,0,0,1
0.588053280,0,0,1,0,0,1,0,1,0,1,0,1
0.588053320,0,0,0,0,0,1,0,1,0,1,0,1
0.588053360,1,1,1,0,0,1,0,0,0,0,0,1

司徒寫了一隻Python用來解資料

#!/usr/bin/python
import os
import sys

f = open('digital.csv')
c = f.readlines()
f.close()

for x in c:
  l = x.replace('\r', '').replace('\n', '').split(',')
  t0 = l[0]
  cs = l[1]
  rs = l[2]
  wr = l[3]
  db = '0x%02x' % int(''.join('{:x}'.format(int(v)) for v in l[4:12]), 2)
  rst = l[12]

  if cs == '0' and wr == '0':
    if rs == '0':
      print 'CMD:{}'.format(db)
    else:
      print 'DAT:{}'.format(db)

解譯後的屏初始化資料

CMD:0x11
CMD:0x36
DAT:0x0c
CMD:0x3c
DAT:0x03
CMD:0x32
CMD:0x33
DAT:0x00
CMD:0xb4
DAT:0x0a
DAT:0x0a
DAT:0x00
DAT:0x35
DAT:0x35
CMD:0xb7
DAT:0x04
CMD:0xbd
DAT:0x30
CMD:0xc0
DAT:0x2a
CMD:0xc4
DAT:0x01
CMD:0xc5
DAT:0x17
CMD:0xc2
DAT:0x20
CMD:0xc6
DAT:0x0f
CMD:0xd0
DAT:0xa2
DAT:0xa1
CMD:0xd6
DAT:0xa1
CMD:0xe0
DAT:0xd0
DAT:0x02
DAT:0x0a
DAT:0x11
DAT:0x15
DAT:0x2a
DAT:0x3d
DAT:0x53
DAT:0x42
DAT:0x16
DAT:0x0b
DAT:0x0d
DAT:0x1f
DAT:0x25
CMD:0xe1
DAT:0xd0
DAT:0x02
DAT:0x0d
DAT:0x10
DAT:0x15
DAT:0x2a
DAT:0x3c
DAT:0x42
DAT:0x51
DAT:0x26
DAT:0x1f
DAT:0x1f
DAT:0x20
DAT:0x25
CMD:0x21
CMD:0x2c
DAT:0x00
DAT:0x00
DAT:0x00
DAT:0xef
CMD:0x2d
DAT:0x00
DAT:0x00
DAT:0x00
DAT:0xef
CMD:0x00
CMD:0x29
CMD:0x2a
CMD:0x2a

main.s

  .global _start
    
  .equiv PIO_BASE,  0x01c20800 
  .equiv PA,        (0x24 * 0)
  .equiv PB,        (0x24 * 1)
  .equiv PC,        (0x24 * 2)
  .equiv PD,        (0x24 * 3)
  .equiv PE,        (0x24 * 4)
  .equiv PIO_CFG0,  0x00
  .equiv PIO_CFG1,  0x04
  .equiv PIO_CFG2,  0x08
  .equiv PIO_DATA,  0x10
  
  .equiv LCD_CS,    (1 << 21)
  .equiv LCD_RD,    (1 << 20)
  .equiv LCD_RS,    (1 << 19)
  .equiv LCD_WR,    (1 << 18)
  .equiv LCD_RST,   (1 << 0)
  
  .arm
  .text
_start:
  .long 0xea000016
  .byte 'e', 'G', 'O', 'N', '.', 'B', 'T', '0'
  .long 0, __spl_size
  .byte 'S', 'P', 'L', 2
  .long 0, 0
  .long 0, 0, 0, 0, 0, 0, 0, 0
  .long 0, 0, 0, 0, 0, 0, 0, 0
     
_vector:
  b reset
  b .
  b .
  b .
  b .
  b .
  b .
  b .
     
reset:
  ldr r4, =PIO_BASE + PD
  ldr r1, =0x11111111
  str r1, [r4, #PIO_CFG0]
  str r1, [r4, #PIO_CFG1]
  str r1, [r4, #PIO_CFG2]
   
  ldr r4, =PIO_BASE + PE
  ldr r1, =0x11111111
  str r1, [r4, #PIO_CFG0]
  str r1, [r4, #PIO_CFG1]
  str r1, [r4, #PIO_CFG2]
  
  ldr r4, =PIO_BASE + PD
  ldr r1, =0xffffffff
  str r1, [r4, #PIO_DATA]
  
  ldr r4, =PIO_BASE + PE
  ldr r1, =0xffffffff
  str r1, [r4, #PIO_DATA]
  
  bl lcd_rst
 
  ldr r0, =0x11
  bl lcd_cmd
  ldr r0, =0x36
  bl lcd_cmd
  ldr r1, =0x0c
  bl lcd_dat
  ldr r0, =0x3c
  bl lcd_cmd
  ldr r1, =0x03
  bl lcd_dat
  ldr r0, =0x32
  bl lcd_cmd
  ldr r0, =0x33
  bl lcd_cmd
  ldr r1, =0x00
  bl lcd_dat
  ldr r0, =0xb4
  bl lcd_cmd
  ldr r1, =0x0a
  bl lcd_dat
  ldr r1, =0x0a
  bl lcd_dat
  ldr r1, =0x00
  bl lcd_dat
  ldr r1, =0x35
  bl lcd_dat
  ldr r1, =0x35
  bl lcd_dat
  ldr r0, =0xb7
  bl lcd_cmd
  ldr r1, =0x04
  bl lcd_dat
  ldr r0, =0xbd
  bl lcd_cmd
  ldr r1, =0x30
  bl lcd_dat
  ldr r0, =0xc0
  bl lcd_cmd
  ldr r1, =0x2a
  bl lcd_dat
  ldr r0, =0xc4
  bl lcd_cmd
  ldr r1, =0x01
  bl lcd_dat
  ldr r0, =0xc5
  bl lcd_cmd
  ldr r1, =0x17
  bl lcd_dat
  ldr r0, =0xc2
  bl lcd_cmd
  ldr r1, =0x20
  bl lcd_dat
  ldr r0, =0xc6
  bl lcd_cmd
  ldr r1, =0x0f
  bl lcd_dat
  ldr r0, =0xd0
  bl lcd_cmd
  ldr r1, =0xa2
  bl lcd_dat
  ldr r1, =0xa1
  bl lcd_dat
  ldr r0, =0xd6
  bl lcd_cmd
  ldr r1, =0xa1
  bl lcd_dat
  ldr r0, =0xe0
  bl lcd_cmd
  ldr r1, =0xd0
  bl lcd_dat
  ldr r1, =0x02
  bl lcd_dat
  ldr r1, =0x0a
  bl lcd_dat
  ldr r1, =0x11
  bl lcd_dat
  ldr r1, =0x15
  bl lcd_dat
  ldr r1, =0x2a
  bl lcd_dat
  ldr r1, =0x3d
  bl lcd_dat
  ldr r1, =0x53
  bl lcd_dat
  ldr r1, =0x42
  bl lcd_dat
  ldr r1, =0x16
  bl lcd_dat
  ldr r1, =0x0b
  bl lcd_dat
  ldr r1, =0x0d
  bl lcd_dat
  ldr r1, =0x1f
  bl lcd_dat
  ldr r1, =0x25
  bl lcd_dat
  ldr r0, =0xe1
  bl lcd_cmd
  ldr r1, =0xd0
  bl lcd_dat
  ldr r1, =0x02
  bl lcd_dat
  ldr r1, =0x0d
  bl lcd_dat
  ldr r1, =0x10
  bl lcd_dat
  ldr r1, =0x15
  bl lcd_dat
  ldr r1, =0x2a
  bl lcd_dat
  ldr r1, =0x3c
  bl lcd_dat
  ldr r1, =0x42
  bl lcd_dat
  ldr r1, =0x51
  bl lcd_dat
  ldr r1, =0x26
  bl lcd_dat
  ldr r1, =0x1f
  bl lcd_dat
  ldr r1, =0x1f
  bl lcd_dat
  ldr r1, =0x20
  bl lcd_dat
  ldr r1, =0x25
  bl lcd_dat
  ldr r0, =0x21
  bl lcd_cmd
  ldr r0, =0x2c
  bl lcd_cmd
  ldr r1, =0x00
  bl lcd_dat
  ldr r1, =0x00
  bl lcd_dat
  ldr r1, =0x00
  bl lcd_dat
  ldr r1, =0xef
  bl lcd_dat
  ldr r0, =0x2d
  bl lcd_cmd
  ldr r1, =0x00
  bl lcd_dat
  ldr r1, =0x00
  bl lcd_dat
  ldr r1, =0x00
  bl lcd_dat
  ldr r1, =0xef
  bl lcd_dat
  ldr r0, =0x00
  bl lcd_cmd
  ldr r0, =0x29
  bl lcd_cmd
  ldr r0, =0x2a
  bl lcd_cmd
  ldr r0, =0x2a
  bl lcd_cmd
 
  ldr r4, =240*180
  ldr r5, =0xffff
0:
  lsr r0, r5, #8
  bl lcd_dat
  mov r0, r5
  bl lcd_dat
  subs r4, #1
  bne 0b
 
loop:
  b loop
 
delay:
  push {lr}
0:
  subs r0, #1
  bne 0b
  pop {pc}
  
lcd_rst:
  push {r4, r5, lr}
  ldr r4, =PIO_BASE + PD
  ldr r5, =0xffffffff
  
  bic r5, #LCD_RST
  str r5, [r4, #PIO_DATA]
  ldr r0, =10000
  bl delay
  
  orr r5, #LCD_RST
  str r5, [r4, #PIO_DATA]
  ldr r0, =10000
  bl delay
  pop {r4, r5, pc}
  
lcd_wr:
  push {r4, r5, lr}
  ldr r4, =PIO_BASE + PD
 
  and r0, #0xff
  lsl r0, #1
  mov r5, r0
  orr r5, r1
  orr r5, #LCD_RST
  orr r5, #LCD_RD
  str r5, [r4, #PIO_DATA]
  
  orr r5, #LCD_WR
  str r5, [r4, #PIO_DATA]
  pop {r4, r5, pc}
  
lcd_dat:
  push {lr}
  mov r1, #LCD_RS
  bl lcd_wr
  pop {pc}
  
lcd_cmd:
  push {lr}
  mov r1, #0
  bl lcd_wr
  pop {pc}
  .end

main.ld

OUTPUT_FORMAT("elf32-littlearm", "elf32-bigarm", "elf32-littlearm")
OUTPUT_ARCH(arm)
ENTRY(_start)

MEMORY {
  ram : ORIGIN = 0x00000000, LENGTH = 32M
}

SECTIONS {
  .text :
  {
    PROVIDE(__spl_start = .);
    *(.text*)
    PROVIDE(__spl_end = .);
    *(.init.text)
    *(.exit.text)
    *(.glue*)
    *(.note.gnu.build-id)
  } > ram
  PROVIDE(__spl_size = __spl_end - __spl_start);

  .rodata ALIGN(8) :
  {
    PROVIDE(__rodata_start = .);
    *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
    PROVIDE(__rodata_end = .);
  } > ram

  .data ALIGN(8) :
  {
    PROVIDE(__data_start = .);  
    *(.data*)
    . = ALIGN(8);
      PROVIDE(__data_end = .);
    PROVIDE(__image_end = .);
  } > ram

  .bss ALIGN(8) (NOLOAD) :
  {
    PROVIDE(__bss_start = .);
    *(.bss*)
    *(.sbss*)
    *(COMMON)
    . = ALIGN(8);
    PROVIDE(__bss_end = .);
  } > ram

  .stab 0 : { *(.stab) }
  .stabstr 0 : { *(.stabstr) }
  .stab.excl 0 : { *(.stab.excl) }
  .stab.exclstr 0 : { *(.stab.exclstr) }
  .stab.index 0 : { *(.stab.index) }
  .stab.indexstr 0 : { *(.stab.indexstr) }
  .comment 0 : { *(.comment) }
  .debug_abbrev 0 : { *(.debug_abbrev) }
  .debug_info 0 : { *(.debug_info) }
  .debug_line 0 : { *(.debug_line) }
  .debug_pubnames 0 : { *(.debug_pubnames) }
  .debug_aranges 0 : { *(.debug_aranges) }
}

Makefile

all:
  arm-none-eabi-as -mcpu=arm9 -o main.o main.s
  arm-none-eabi-ld -T main.ld -o main.elf main.o
  arm-none-eabi-objcopy -O binary main.elf main.bin
  gcc mksunxi.c -o mksunxi
  ./mksunxi main.bin

ram:
  sunxi-fel -p write 0 main.bin && sunxi-fel exec 0

clean:
  rm -rf main.bin main.o main.elf

進入下載模式
17.jpg


編譯下載

$ make
  arm-none-eabi-as -mcpu=arm9 -o main.o main.s
  arm-none-eabi-ld -T main.ld -o main.elf main.o
  arm-none-eabi-objcopy -O binary main.elf main.bin
  gcc mksunxi.c -o mksunxi
  ./mksunxi main.bin
  The bootloader head has been fixed, spl size is 1024 bytes.

$ make ram
  sunxi-fel -p write 0 main.bin && sunxi-fel exec 0
  100% [================================================]     1 kB,  167.0 kB/s

這...,讓司徒又陷入難點,應該是要顯示全白才對,從這個畫面顯示結果,代表屏初始化有問題,經過幾番查找,司徒發現一般屏的最後一道命令應該是0x2C,而且設定位址的命令一般是0x2A、0x2B,因此,比對了一下,司徒應該是記錯DB1和DB2的位置,導致解析錯誤
16.jpg


修正DB1和DB2

#!/usr/bin/python
import os
import sys

f = open('digital.csv')
c = f.readlines()
f.close()

for x in c:
  l = x.replace('\r', '').replace('\n', '').split(',')
  t0 = l[0]
  cs = l[1]
  rs = l[2]
  wr = l[3]
  t = l[9]
  l[9] = l[10]
  l[10] = t
  db = '0x%02x' % int(''.join('{:x}'.format(int(v)) for v in l[4:12]), 2)
  rst = l[12]

  if cs == '0' and wr == '0':
    if rs == '0':
      print 'CMD:{}'.format(db)
    else:
      print 'DAT:{}'.format(db)

最後一道命令是0x2C了~

CMD:0x11
CMD:0x36
DAT:0x0a
CMD:0x3a
DAT:0x05
CMD:0x34
CMD:0x35
DAT:0x00
CMD:0xb2
DAT:0x0c
DAT:0x0c
DAT:0x00
DAT:0x33
DAT:0x33
CMD:0xb7
DAT:0x02
CMD:0xbb
DAT:0x30
CMD:0xc0
DAT:0x2c
CMD:0xc2
DAT:0x01
CMD:0xc3
DAT:0x17
CMD:0xc4
DAT:0x20
CMD:0xc6
DAT:0x0f
CMD:0xd0
DAT:0xa4
DAT:0xa1
CMD:0xd6
DAT:0xa1
CMD:0xe0
DAT:0xd0
DAT:0x04
DAT:0x0c
DAT:0x11
DAT:0x13
DAT:0x2c
DAT:0x3b
DAT:0x55
DAT:0x44
DAT:0x16
DAT:0x0d
DAT:0x0b
DAT:0x1f
DAT:0x23
CMD:0xe1
DAT:0xd0
DAT:0x04
DAT:0x0b
DAT:0x10
DAT:0x13
DAT:0x2c
DAT:0x3a
DAT:0x44
DAT:0x51
DAT:0x26
DAT:0x1f
DAT:0x1f
DAT:0x20
DAT:0x23
CMD:0x21
CMD:0x2a
DAT:0x00
DAT:0x00
DAT:0x00
DAT:0xef
CMD:0x2b
DAT:0x00
DAT:0x00
DAT:0x00
DAT:0xef
CMD:0x00
CMD:0x29
CMD:0x2c
CMD:0x2c

main.s

  .global _start
   
  .equiv PIO_BASE,  0x01c20800 
  .equiv PA,        (0x24 * 0)
  .equiv PB,        (0x24 * 1)
  .equiv PC,        (0x24 * 2)
  .equiv PD,        (0x24 * 3)
  .equiv PE,        (0x24 * 4)
  .equiv PIO_CFG0,  0x00
  .equiv PIO_CFG1,  0x04
  .equiv PIO_CFG2,  0x08
  .equiv PIO_DATA,  0x10
 
  .equiv LCD_CS,    (1 << 21)
  .equiv LCD_RD,    (1 << 20)
  .equiv LCD_RS,    (1 << 19)
  .equiv LCD_WR,    (1 << 18)
  .equiv LCD_RST,   (1 << 0)
 
  .arm
  .text
_start:
  .long 0xea000016
  .byte 'e', 'G', 'O', 'N', '.', 'B', 'T', '0'
  .long 0, __spl_size
  .byte 'S', 'P', 'L', 2
  .long 0, 0
  .long 0, 0, 0, 0, 0, 0, 0, 0
  .long 0, 0, 0, 0, 0, 0, 0, 0
    
_vector:
  b reset
  b .
  b .
  b .
  b .
  b .
  b .
  b .
    
reset:
  ldr r4, =PIO_BASE + PD
  ldr r1, =0x11111111
  str r1, [r4, #PIO_CFG0]
  str r1, [r4, #PIO_CFG1]
  str r1, [r4, #PIO_CFG2]
  
  ldr r4, =PIO_BASE + PE
  ldr r1, =0x11111111
  str r1, [r4, #PIO_CFG0]
  str r1, [r4, #PIO_CFG1]
  str r1, [r4, #PIO_CFG2]
 
  ldr r4, =PIO_BASE + PD
  ldr r1, =0xffffffff
  str r1, [r4, #PIO_DATA]
 
  ldr r4, =PIO_BASE + PE
  ldr r1, =0xffffffff
  str r1, [r4, #PIO_DATA]
 
  bl lcd_rst

  ldr r0, =0x11
  bl lcd_cmd
  ldr r0, =0x36
  bl lcd_cmd
  ldr r0, =0x0a
  bl lcd_dat
  ldr r0, =0x3a
  bl lcd_cmd
  ldr r0, =0x05
  bl lcd_dat
  ldr r0, =0x34
  bl lcd_cmd
  ldr r0, =0x35
  bl lcd_cmd
  ldr r0, =0x00
  bl lcd_dat
  ldr r0, =0xb2
  bl lcd_cmd
  ldr r0, =0x0c
  bl lcd_dat
  ldr r0, =0x0c
  bl lcd_dat
  ldr r0, =0x00
  bl lcd_dat
  ldr r0, =0x33
  bl lcd_dat
  ldr r0, =0x33
  bl lcd_dat
  ldr r0, =0xb7
  bl lcd_cmd
  ldr r0, =0x02
  bl lcd_dat
  ldr r0, =0xbb
  bl lcd_cmd
  ldr r0, =0x30
  bl lcd_dat
  ldr r0, =0xc0
  bl lcd_cmd
  ldr r0, =0x2c
  bl lcd_dat
  ldr r0, =0xc2
  bl lcd_cmd
  ldr r0, =0x01
  bl lcd_dat
  ldr r0, =0xc3
  bl lcd_cmd
  ldr r0, =0x17
  bl lcd_dat
  ldr r0, =0xc4
  bl lcd_cmd
  ldr r0, =0x20
  bl lcd_dat
  ldr r0, =0xc6
  bl lcd_cmd
  ldr r0, =0x0f
  bl lcd_dat
  ldr r0, =0xd0
  bl lcd_cmd
  ldr r0, =0xa4
  bl lcd_dat
  ldr r0, =0xa1
  bl lcd_dat
  ldr r0, =0xd6
  bl lcd_cmd
  ldr r0, =0xa1
  bl lcd_dat
  ldr r0, =0xe0
  bl lcd_cmd
  ldr r0, =0xd0
  bl lcd_dat
  ldr r0, =0x04
  bl lcd_dat
  ldr r0, =0x0c
  bl lcd_dat
  ldr r0, =0x11
  bl lcd_dat
  ldr r0, =0x13
  bl lcd_dat
  ldr r0, =0x2c
  bl lcd_dat
  ldr r0, =0x3b
  bl lcd_dat
  ldr r0, =0x55
  bl lcd_dat
  ldr r0, =0x44
  bl lcd_dat
  ldr r0, =0x16
  bl lcd_dat
  ldr r0, =0x0d
  bl lcd_dat
  ldr r0, =0x0b
  bl lcd_dat
  ldr r0, =0x1f
  bl lcd_dat
  ldr r0, =0x23
  bl lcd_dat
  ldr r0, =0xe1
  bl lcd_cmd
  ldr r0, =0xd0
  bl lcd_dat
  ldr r0, =0x04
  bl lcd_dat
  ldr r0, =0x0b
  bl lcd_dat
  ldr r0, =0x10
  bl lcd_dat
  ldr r0, =0x13
  bl lcd_dat
  ldr r0, =0x2c
  bl lcd_dat
  ldr r0, =0x3a
  bl lcd_dat
  ldr r0, =0x44
  bl lcd_dat
  ldr r0, =0x51
  bl lcd_dat
  ldr r0, =0x26
  bl lcd_dat
  ldr r0, =0x1f
  bl lcd_dat
  ldr r0, =0x1f
  bl lcd_dat
  ldr r0, =0x20
  bl lcd_dat
  ldr r0, =0x23
  bl lcd_dat
  ldr r0, =0x21
  bl lcd_cmd
  ldr r0, =0x2a
  bl lcd_cmd
  ldr r0, =0x00
  bl lcd_dat
  ldr r0, =0x00
  bl lcd_dat
  ldr r0, =0x00
  bl lcd_dat
  ldr r0, =0xef
  bl lcd_dat
  ldr r0, =0x2b
  bl lcd_cmd
  ldr r0, =0x00
  bl lcd_dat
  ldr r0, =0x00
  bl lcd_dat
  ldr r0, =0x00
  bl lcd_dat
  ldr r0, =0xef
  bl lcd_dat
  ldr r0, =0x00
  bl lcd_cmd
  ldr r0, =0x29
  bl lcd_cmd
  ldr r0, =0x2c
  bl lcd_cmd
  ldr r0, =0x2c
  bl lcd_cmd

  ldr r4, =240*180
  ldr r5, =0xffff
0:
  lsr r0, r5, #8
  bl lcd_dat
  mov r0, r5
  bl lcd_dat
  subs r4, #1
  bne 0b

loop:
  b loop

delay:
  push {lr}
0:
  subs r0, #1
  bne 0b
  pop {pc}
 
lcd_rst:
  push {r4, r5, lr}
  ldr r4, =PIO_BASE + PD
  ldr r5, =0xffffffff
 
  bic r5, #LCD_RST
  str r5, [r4, #PIO_DATA]
  ldr r0, =10000
  bl delay
 
  orr r5, #LCD_RST
  str r5, [r4, #PIO_DATA]
  ldr r0, =10000
  bl delay
  pop {r4, r5, pc}
 
lcd_wr:
  push {r4, r5, lr}
  ldr r4, =PIO_BASE + PD

  and r0, #0xff
  lsl r0, #1
  mov r5, r0
  orr r5, r1
  orr r5, #LCD_RST
  orr r5, #LCD_RD
  str r5, [r4, #PIO_DATA]
 
  orr r5, #LCD_WR
  str r5, [r4, #PIO_DATA]
  pop {r4, r5, pc}
 
lcd_dat:
  push {lr}
  mov r1, #LCD_RS
  bl lcd_wr
  pop {pc}
 
lcd_cmd:
  push {lr}
  mov r1, #0
  bl lcd_wr
  pop {pc}
  .end

終於顯示白屏了~但是,怎麼沒有全屏?司徒往回找了一下,發現這個屏的初始化命令(解析度)竟然是使用240x240...
18.jpg


司徒開始探測問題,發現屏的上方有一塊區域被隱蔽(前30行)
19.jpg


下方也有一塊區域被隱蔽(後15行)
20.jpg


經過一番測試後,結論是:屏的原生解析度是240x240,不過,可視區域只有240x195,最後,屏終於可以正常控制了~
21.jpg


main.s

  .global _start
    
  .equiv PIO_BASE,  0x01c20800 
  .equiv PA,        (0x24 * 0)
  .equiv PB,        (0x24 * 1)
  .equiv PC,        (0x24 * 2)
  .equiv PD,        (0x24 * 3)
  .equiv PE,        (0x24 * 4)
  .equiv PIO_CFG0,  0x00
  .equiv PIO_CFG1,  0x04
  .equiv PIO_CFG2,  0x08
  .equiv PIO_DATA,  0x10
  
  .equiv LCD_CS,    (1 << 21)
  .equiv LCD_RD,    (1 << 20)
  .equiv LCD_RS,    (1 << 19)
  .equiv LCD_WR,    (1 << 18)
  .equiv LCD_RST,   (1 << 0)
  
  .arm
  .text
_start:
  .long 0xea000016
  .byte 'e', 'G', 'O', 'N', '.', 'B', 'T', '0'
  .long 0, __spl_size
  .byte 'S', 'P', 'L', 2
  .long 0, 0
  .long 0, 0, 0, 0, 0, 0, 0, 0
  .long 0, 0, 0, 0, 0, 0, 0, 0
     
_vector:
  b reset
  b .
  b .
  b .
  b .
  b .
  b .
  b .
     
reset:
  ldr r4, =PIO_BASE + PD
  ldr r1, =0x11111111
  str r1, [r4, #PIO_CFG0]
  str r1, [r4, #PIO_CFG1]
  str r1, [r4, #PIO_CFG2]
   
  ldr r4, =PIO_BASE + PE
  ldr r1, =0x11111111
  str r1, [r4, #PIO_CFG0]
  str r1, [r4, #PIO_CFG1]
  str r1, [r4, #PIO_CFG2]
  
  ldr r4, =PIO_BASE + PD
  ldr r1, =0xffffffff
  str r1, [r4, #PIO_DATA]
  
  ldr r4, =PIO_BASE + PE
  ldr r1, =0xffffffff
  str r1, [r4, #PIO_DATA]
  
  bl lcd_rst
 
  ldr r0, =0x11
  bl lcd_cmd
  ldr r0, =0x36
  bl lcd_cmd
  ldr r0, =0x0a
  bl lcd_dat
  ldr r0, =0x3a
  bl lcd_cmd
  ldr r0, =0x05
  bl lcd_dat
  ldr r0, =0x34
  bl lcd_cmd
  ldr r0, =0x35
  bl lcd_cmd
  ldr r0, =0x00
  bl lcd_dat
  ldr r0, =0xb2
  bl lcd_cmd
  ldr r0, =0x0c
  bl lcd_dat
  ldr r0, =0x0c
  bl lcd_dat
  ldr r0, =0x00
  bl lcd_dat
  ldr r0, =0x33
  bl lcd_dat
  ldr r0, =0x33
  bl lcd_dat
  ldr r0, =0xb7
  bl lcd_cmd
  ldr r0, =0x02
  bl lcd_dat
  ldr r0, =0xbb
  bl lcd_cmd
  ldr r0, =0x30
  bl lcd_dat
  ldr r0, =0xc0
  bl lcd_cmd
  ldr r0, =0x2c
  bl lcd_dat
  ldr r0, =0xc2
  bl lcd_cmd
  ldr r0, =0x01
  bl lcd_dat
  ldr r0, =0xc3
  bl lcd_cmd
  ldr r0, =0x17
  bl lcd_dat
  ldr r0, =0xc4
  bl lcd_cmd
  ldr r0, =0x20
  bl lcd_dat
  ldr r0, =0xc6
  bl lcd_cmd
  ldr r0, =0x0f
  bl lcd_dat
  ldr r0, =0xd0
  bl lcd_cmd
  ldr r0, =0xa4
  bl lcd_dat
  ldr r0, =0xa1
  bl lcd_dat
  ldr r0, =0xd6
  bl lcd_cmd
  ldr r0, =0xa1
  bl lcd_dat
  ldr r0, =0xe0
  bl lcd_cmd
  ldr r0, =0xd0
  bl lcd_dat
  ldr r0, =0x04
  bl lcd_dat
  ldr r0, =0x0c
  bl lcd_dat
  ldr r0, =0x11
  bl lcd_dat
  ldr r0, =0x13
  bl lcd_dat
  ldr r0, =0x2c
  bl lcd_dat
  ldr r0, =0x3b
  bl lcd_dat
  ldr r0, =0x55
  bl lcd_dat
  ldr r0, =0x44
  bl lcd_dat
  ldr r0, =0x16
  bl lcd_dat
  ldr r0, =0x0d
  bl lcd_dat
  ldr r0, =0x0b
  bl lcd_dat
  ldr r0, =0x1f
  bl lcd_dat
  ldr r0, =0x23
  bl lcd_dat
  ldr r0, =0xe1
  bl lcd_cmd
  ldr r0, =0xd0
  bl lcd_dat
  ldr r0, =0x04
  bl lcd_dat
  ldr r0, =0x0b
  bl lcd_dat
  ldr r0, =0x10
  bl lcd_dat
  ldr r0, =0x13
  bl lcd_dat
  ldr r0, =0x2c
  bl lcd_dat
  ldr r0, =0x3a
  bl lcd_dat
  ldr r0, =0x44
  bl lcd_dat
  ldr r0, =0x51
  bl lcd_dat
  ldr r0, =0x26
  bl lcd_dat
  ldr r0, =0x1f
  bl lcd_dat
  ldr r0, =0x1f
  bl lcd_dat
  ldr r0, =0x20
  bl lcd_dat
  ldr r0, =0x23
  bl lcd_dat
  ldr r0, =0x21
  bl lcd_cmd
  ldr r0, =0x2a
  bl lcd_cmd
  ldr r0, =0x00
  bl lcd_dat
  ldr r0, =0x00
  bl lcd_dat
  ldr r0, =0x00
  bl lcd_dat
  ldr r0, =0xef
  bl lcd_dat
  ldr r0, =0x2b
  bl lcd_cmd
  ldr r0, =0x00
  bl lcd_dat
  ldr r0, =0x00
  bl lcd_dat
  ldr r0, =0x00
  bl lcd_dat
  ldr r0, =0xef
  bl lcd_dat
  ldr r0, =0x00
  bl lcd_cmd
  ldr r0, =0x29
  bl lcd_cmd
  ldr r0, =0x2c
  bl lcd_cmd
  ldr r0, =0x2c
  bl lcd_cmd
 
  ldr r4, =240*30
  ldr r5, =0xffff
0:
  lsr r0, r5, #8
  bl lcd_dat
  mov r0, r5
  bl lcd_dat
  subs r4, #1
  bne 0b
 
  ldr r4, =240*65
  ldr r5, =0xf800
0:
  lsr r0, r5, #8
  bl lcd_dat
  mov r0, r5
  bl lcd_dat
  subs r4, #1
  bne 0b
 
  ldr r4, =240*65
  ldr r5, =0x7e0
0:
  lsr r0, r5, #8
  bl lcd_dat
  mov r0, r5
  bl lcd_dat
  subs r4, #1
  bne 0b
 
  ldr r4, =240*65
  ldr r5, =0x1f
0:
  lsr r0, r5, #8
  bl lcd_dat
  mov r0, r5
  bl lcd_dat
  subs r4, #1
  bne 0b
 
loop:
  b loop
 
delay:
  push {lr}
0:
  subs r0, #1
  bne 0b
  pop {pc}
  
lcd_rst:
  push {r4, r5, lr}
  ldr r4, =PIO_BASE + PD
  ldr r5, =0xffffffff
  
  bic r5, #LCD_RST
  str r5, [r4, #PIO_DATA]
  ldr r0, =10000
  bl delay
  
  orr r5, #LCD_RST
  str r5, [r4, #PIO_DATA]
  ldr r0, =10000
  bl delay
  pop {r4, r5, pc}
  
lcd_wr:
  push {r4, r5, lr}
  ldr r4, =PIO_BASE + PD
 
  and r0, #0xff
  lsl r0, #1
  mov r5, r0
  orr r5, r1
  orr r5, #LCD_RST
  orr r5, #LCD_RD
  str r5, [r4, #PIO_DATA]
  
  orr r5, #LCD_WR
  str r5, [r4, #PIO_DATA]
  pop {r4, r5, pc}
  
lcd_dat:
  push {lr}
  mov r1, #LCD_RS
  bl lcd_wr
  pop {pc}
  
lcd_cmd:
  push {lr}
  mov r1, #0
  bl lcd_wr
  pop {pc}
  .end

离线

楼主 #9 2022-03-14 07:25:50

司徒
Moderator
注册时间: 2020-02-13
已发帖子: 371
积分: 144
个人网站

Re: 研究Game Gear Micro掌機的開源可行性

根據此GitHub:https://github.com/ethanpierce/gamegearmicrohack
此人似乎早知道這個屏是ST7789,而經由分析結果,屏也確實是ST7789~

离线

#10 2022-03-14 07:52:18

怀旧堂
会员
注册时间: 2021-06-11
已发帖子: 10
积分: 3

Re: 研究Game Gear Micro掌機的開源可行性

我觉得TF卡可以不用这么麻烦,直接拆了之前的FLASH,tf卡走SPI是否可行。。。

离线

楼主 #11 2022-03-14 09:54:27

司徒
Moderator
注册时间: 2020-02-13
已发帖子: 371
积分: 144
个人网站

Re: 研究Game Gear Micro掌機的開源可行性

想保留原本Flash才沒有動刀,不過,如果MicroSD改造失敗,這個選項可以~

离线

#12 2022-03-14 10:40:20

怀旧堂
会员
注册时间: 2021-06-11
已发帖子: 10
积分: 3

Re: 研究Game Gear Micro掌機的開源可行性

司徒 说:

想保留原本Flash才沒有動刀,不過,如果MicroSD改造失敗,這個選項可以~

也可以共存吧,用不同的CS脚,引导的时候处理下。单独飞线这么多脚,劝退了大部分想改机的小伙伴啊。。:lol:

离线

楼主 #13 2022-03-14 11:15:51

司徒
Moderator
注册时间: 2020-02-13
已发帖子: 371
积分: 144
个人网站

Re: 研究Game Gear Micro掌機的開源可行性

聽君一席話,更勝十年書~

离线

楼主 #14 2022-03-14 16:35:23

司徒
Moderator
注册时间: 2020-02-13
已发帖子: 371
积分: 144
个人网站

Re: 研究Game Gear Micro掌機的開源可行性

雖然"怀旧堂"企圖想把改造難度,從中上拉到下下等級,不過,司徒今天剛好打完疫苗,請假在家休息,想測試下,手是否會有抖動的問題,因此,司徒還是按照原本計畫進行改機~


由於目標是跑GBA模擬器,因此,至少還需要4個按鍵,司徒把PD13、PD14拿出來當作按鍵使用
1.jpg


膠帶固定
2.jpg


接著安裝MicroSD
3.jpg


MicroSD腳位對應圖
22.jpg


MicroSD使用4bits模式,PE2、PE3也拉出來當做按鍵使用
4.jpg


總共跳了10根線
5.jpg


MicroSD VDD、GND接到Flash IC
6.jpg


四顆按鍵
7.jpg


固定FPC,避免損壞
8.jpg


肉雞定位完成
9.jpg


預計擺放位置
10.jpg


完成開鑿
11.jpg


固定按鍵
12.jpg


背面
13.jpg


開始整線
14.jpg


整線完成
15.jpg


由於MicroSD位置太下方,背蓋需要動刀
16.jpg


上邊缺口部份,之後有時間可以使用3D列印機補齊
17.jpg


UART擺放在MicroSD上方
18.jpg


整體評分還算可以
19.jpg


上方醜了點
20.jpg


可以從MicroSD開機,終於,完美的開發機誕生~
21.jpg


可能有人會好奇,司徒的焊接工具是不是很高級,可以飛出那麼細的線,其實,司徒使用很便宜的焊槍,而且也用了快五年~
1_20220314-1630.jpg


銲錫的部份,使用比較好一點點的日本制銲錫~
2_20220314-1631.jpg

离线

楼主 #15 2022-03-14 20:59:56

司徒
Moderator
注册时间: 2020-02-13
已发帖子: 371
积分: 144
个人网站

Re: 研究Game Gear Micro掌機的開源可行性

洞口太大,司徒決定修補一下
23.jpg


OpenSCAD

difference(){
  cube([16, 6.5, 2]);
  translate([2, 4, 0]){
    cube([8, 2, 3]);
  }
  translate([2, 2, 0]){
    cube([12, 2, 3]);
  }
}
cube([18, 2.5, 2]);

預覽圖
24.jpg


3D列印
25.jpg


相當合適的大小
26.jpg


完美的修補
27.jpg


相當工整
28.jpg


插入MicroSD也沒有凸出
29.jpg

离线

#16 2022-03-15 09:51:51

hox
会员
注册时间: 2020-02-17
已发帖子: 37
积分: 30.5

Re: 研究Game Gear Micro掌機的開源可行性

司徒老兄看样子最近比较闲了,高产ing

离线

楼主 #17 2022-03-15 20:59:55

司徒
Moderator
注册时间: 2020-02-13
已发帖子: 371
积分: 144
个人网站

Re: 研究Game Gear Micro掌機的開源可行性

@hox
哈哈~


其實最難的地方是飛線,一旦飛線完成,接下來就是慢慢體驗美好的果實~
司徒目前開始製作多重開機選單,一個是原廠系統,另一個則是跑GBA模擬器
bg.png
1_20220315-2057.jpg

离线

楼主 #18 2022-03-16 08:42:08

司徒
Moderator
注册时间: 2020-02-13
已发帖子: 371
积分: 144
个人网站

Re: 研究Game Gear Micro掌機的開源可行性

量測後的對應腳位

Game Gear Micro | F1C200S
----------------+--------
UP              | PE5
DOWN            | PE7
LEFT            | PE6
RIGHT           | PE8
START(BLUE)     | PE11
1               | PE9
2               | PE10
L1(MOD)         | PE2
R1(MOD)         | PD13
SELECT(MOD)     | PE3
START(MOD)      | PD14
LCD RST         | PD0
LCD DB0         | PD1
LCD DB1         | PD2
LCD DB2         | PD3
LCD DB3         | PD4
LCD DB4         | PD5
LCD DB5         | PD6
LCD DB6         | PD7
LCD DB7         | PD8
LCD TE          | PD9
LCD BL          | PE12
FLASH MOSI      | PC3
FLASH MISO      | PC2
FLASH CS        | PC1
FLASH SCK       | PC0

离线

#19 2022-03-19 16:36:02

mrnull
会员
注册时间: 2022-02-24
已发帖子: 5
积分: 5

Re: 研究Game Gear Micro掌機的開源可行性

大佬有没有研究过炬力平台的掌机?比如山寨psp(atj227X系列的cpu)?

离线

#20 2022-03-20 18:12:21

huanxing
会员
注册时间: 2021-06-27
已发帖子: 19
积分: 18.5

Re: 研究Game Gear Micro掌機的開源可行性

@司徒
哈!真的开始弄GGM了,这个非常期待,可能成为最小的开源小机机,国外在不改动机的情况下,好像能拷入少量仅.gg游戏,且每次需线刷换游戏,还是麻烦。让GGM更大的发挥还是需增加卡槽的必要,司徒大哥给力!

离线

楼主 #21 2022-03-21 19:08:44

司徒
Moderator
注册时间: 2020-02-13
已发帖子: 371
积分: 144
个人网站

Re: 研究Game Gear Micro掌機的開源可行性

@mrnull
之前有研究過,可惜沒有過多資料被公開,只能放生~

@huanxing
故意搞一個很難的改機,沒有人可以跟上,所以我就可以慢慢搞~

离线

#22 2022-03-21 20:19:50

huanxing
会员
注册时间: 2021-06-27
已发帖子: 19
积分: 18.5

Re: 研究Game Gear Micro掌機的開源可行性

跟着大神的步伐!或者可加快点,我这小白程序看不懂,哈!!有空我看看这个肩键,能否加。:)

最近编辑记录 huanxing (2022-03-21 20:41:48)

离线

#23 2022-03-21 20:45:18

鳝丝与螺丝
会员
所在地: 苏州 初一的
注册时间: 2022-03-04
已发帖子: 39
积分: 42

Re: 研究Game Gear Micro掌機的開源可行性

司徒 说:

@mrnull
之前有研究過,可惜沒有過多資料被公開,只能放生~

@huanxing
故意搞一個很難的改機,沒有人可以跟上,所以我就可以慢慢搞~

司徒最近有空了?

离线

楼主 #24 2022-03-22 13:01:13

司徒
Moderator
注册时间: 2020-02-13
已发帖子: 371
积分: 144
个人网站

Re: 研究Game Gear Micro掌機的開源可行性

@huanxing
OK

@鳝丝与螺丝
最近有些事情要處理~沒有空~

离线

#25 2022-03-24 00:45:20

fullniz
会员
注册时间: 2021-09-17
已发帖子: 11
积分: 9.5

Re: 研究Game Gear Micro掌機的開源可行性

我菜发现这个帖子,这个掌机的改机难度对于我这种普通人来说就是噩梦级
这个分辨率是不是只能移植gb模拟器,snk模拟器不行?我看有两个按钮和按钮上方的start键,
玩mslug还可以,对应子弹+跳+炸弹,start即使不对应炸弹,2个按钮也能凑合玩,就是分辨率不太合适是吧

离线

#26 2022-03-24 09:50:13

huanxing
会员
注册时间: 2021-06-27
已发帖子: 19
积分: 18.5

Re: 研究Game Gear Micro掌機的開源可行性

@司徒
如按国外那方案刷过系统的情况后,对你这双系统启动会否兼容

离线

楼主 #27 2022-03-24 10:29:55

司徒
Moderator
注册时间: 2020-02-13
已发帖子: 371
积分: 144
个人网站

Re: 研究Game Gear Micro掌機的開源可行性

@fullniz
我目標只有GBA模擬器,不過,結束後,我會全部開源出來給大家使用,如果想搗鼓,可以先改機~

@huanxing
NAND Flash我不會去動它,預設使用MicroSD開機,開機後,可以選擇從NAND或MicroSD進入系統,所以國外那個方案可以使用的~

离线

#28 2022-03-26 01:06:24

mrnull
会员
注册时间: 2022-02-24
已发帖子: 5
积分: 5

Re: 研究Game Gear Micro掌機的開源可行性

司徒 说:

@mrnull
之前有研究過,可惜沒有過多資料被公開,只能放生~

@司徒
那大佬搞搞gpi case要不?

离线

楼主 #29 2022-03-26 11:46:21

司徒
Moderator
注册时间: 2020-02-13
已发帖子: 371
积分: 144
个人网站

Re: 研究Game Gear Micro掌機的開源可行性

@mrnull
沒興趣~

离线

楼主 #30 2022-04-21 21:13:37

司徒
Moderator
注册时间: 2020-02-13
已发帖子: 371
积分: 144
个人网站

Re: 研究Game Gear Micro掌機的開源可行性

@哇酷小二
圖片問題,原本不想再更新了~但是,竟然修好了~哈哈~太感謝了,小弟會繼續更新的~哈哈

离线

#31 2022-04-24 13:04:42

huanxing
会员
注册时间: 2021-06-27
已发帖子: 19
积分: 18.5

Re: 研究Game Gear Micro掌機的開源可行性

@司徒
这贴看你暂缓很久没更新了!

离线

楼主 #32 2022-05-03 13:11:42

司徒
Moderator
注册时间: 2020-02-13
已发帖子: 371
积分: 144
个人网站

Re: 研究Game Gear Micro掌機的開源可行性

@huanxing
在等我一會兒~

离线

#33 2022-05-17 23:08:55

xiaoyu356
会员
注册时间: 2022-05-17
已发帖子: 4
积分: 4

Re: 研究Game Gear Micro掌機的開源可行性

司徒 说:

串口有PCB焊點

今年剛滿20歲~

技术流啊  20岁 就这么厉害  我正好是你的一倍 哈哈

离线

页脚

工信部备案:粤ICP备20025096号 Powered by FluxBB

感谢为中文互联网持续输出优质内容的各位老铁们。 QQ: 516333132, 微信(wechat): whycan_cn (哇酷网/挖坑网/填坑网) service@whycan.cn