簡要規格
CPU:M900 XCM2010GP40 (全志F1C100S)
RAM:32MB
屏幕:3.0吋 320x240解析度
卡槽:MicroSD
按鍵:十字鍵、4顆按鍵、Start、Select、L、R、電源鍵、音量鍵
USB:充電功能(並沒有連接到USB DP、DM)
電池:3.7V 1100mA或AAA x 3
尺寸:140mm x 68mm x 18mm
重量:110克
正面
下邊
側邊
上邊
側邊
相當感謝背包胖雄告知司徒這台掌機的存在,於是司徒上淘寶看了一下,發現一台才115 RMB,這也太便宜了吧!比起現今的開源掌機,動不動就350 RMB起跳,司徒覺得這麼貴的開源掌機已經變味了,強調的東西已經不是當初開源掌機訴求的模擬樂趣,反而是花錢收藏的詭異現象,除非是司徒相當喜愛的外觀(如:Wiz掌機),否則司徒有錢也不願意購買現今那種昂貴的掌機,不過可能太久沒有買掌機了,司徒竟然不小心,手滑買了4台FC3000掌機
這質感真的相當不錯,完全對得起這個價格
另一個配色也相當好看
Micro USB、AV輸出
沒有東西
L、R按鍵,這設計真是...
電源按鍵、音量按鍵
背面摸起來還蠻舒服的
這空間相當適合改機
電池和卡帶
BL-5C電池
這卡帶是用來回味童年的嗎?
背面
竟然有螺絲,不過,當看到時,已經被司徒爆力拆解了
A21?這難道是1MB記憶體擴充?
背面
司徒已經很久沒有看到這長的螺絲了...
A面
按鍵導電膠,這導電膠有點軟
十字鍵缺乏支撐點
正面
霧面屏
24Pin排線
PCB
背光電路
25Q064A
PCB
斜面喇吧
PCB
側邊
側邊
另一顆25Q064A
M900,其實仔細一看腳位,對照一下Miyoo電路圖,就知道是Allwinner F1C100S
1. 2腳、3腳短路
2. 30腳、31腳、32腳是DRAM-VCC
3. 51腳、52腳是振盪器
4. 59腳、60腳、61腳、62腳是啟動SPI Flash
Miyoo電路圖
LM4890、加密IC
MicroSD
這張MicroSDC看來只存放模擬器相關的東西
离线
原本的USB D-是接到PD0、D+是接到PD9
為了可以進行USB下載,司徒只好把線割了
跳線
接著短路SPI Flash第1腳跟第2腳,然後上電
進入燒錄模式
$ sudo dmesg -c
[50227.418454] usb 1-1: USB disconnect, device number 115
[50302.847603] usb 1-1: new full-speed USB device number 116 using xhci_hcd
[50302.996616] usb 1-1: New USB device found, idVendor=1f3a, idProduct=efe8, bcdDevice= 2.b3
[50302.996620] usb 1-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
$ lsusb
Bus 001 Device 116: ID 1f3a:efe8 Onda (unverified) V972 tablet in flashing mode
离线
司徒量測了一下按鍵,發現沒有適合可用,因此,決定焊接一顆獨立燒錄按鍵,因此,找到一塊風水寶地
完成,之後只要按下按鍵開機,即可進入燒錄模式
進入燒錄模式
執行如下命令
$ sunxi-fel -p spiflash-read 0 8388608 boot_spiflash.img
100% [================================================] 8389 kB, 193.6 kB/s
离线
正所謂工欲善其事,必先利其器,目前已經確定CPU是F1C100S,也就是可以確定百分百可以把開源的東西移植上來,畢竟有荔枝派Nano這麼優秀的開源專案在,不過,如果可以把點屏的事情搞定,那才可以稱得上一部比較完美的開源掌機,因此,司徒參考暈哥其他篇文章關於JTAG的介紹,也製作了JTAG連接,這樣至少就可以開始單步除錯原廠的韌體程式
由於JTAG腳位與MicroSD卡腳位共用,但是,司徒量測後,發現有幾根腳位並沒有拉到MicroSD,因此,司徒只好找尋一下焊點
跳線
接著,請先拔掉JTAG的USB電源,然後,讓F1C100S進入燒錄模式,接著連接JATG USB電源
連接成功
离线
@三木同子
真心感謝幫忙整理這個文件
2018-12-27 ~ 2019-04-22是當初Miyoo開發開源的時間,在短短不到半年的時間,擠出那個開源系統,確實太倉促,很多東西都沒有好好製作,因此,此次結合FC3000以及小橫米(PocketGo),司徒會把整個開發開源的週期拉長到一年的時間,這次看看有無機會把一些系統以及模擬器都再次優化,意思就是,當大家進入whycan論壇時,就會常常看到這個貼子,哈
我也把當初移植Linux到Miyoo的過程放到GitHub,供需要的人可以參考
Miyoo掌機 移植Linux系統和模擬器.pdf
离线
接著,我們必須找出屏的初始化代碼,這樣才可以順利進到下一個步驟,不過,要找出初始化代碼是一個困難點,因為就司徒所知,官方韌體有加密IC保護,因此,我們有可能會被加密IC繞圈圈,不過,總是要先試試才知道困難點
接著開始Debug官方韌體程式,由於BROM只有32KB,加上韌體程式在前面就會把主要ROM複製到0x80000000,因此,抓前面32KB就可以,注意此時SPI Flash要燒錄官方原本的韌體,這樣才可以讓它加載到0x80000000
$ dd if=boot_spiflash.img of=loader.bin bs=1K count=32
32+0 records in
32+0 records out
32768 bytes (33 kB, 32 KiB) copied, 0.000192325 s, 170 MB/s
接著拔除JTAG接線,讓F1C100S進入燒錄模式,接著連接JTAG並且使用如下命令載入程式
接著開啟J-Link GDB Server,記得選ARM9晶片
Listening on TCP/IP port 2331
接著使用IDA Pro載入loader.bin
Debugger > Switch debugger...
連接到localhost 2331
目前PC還是在BROM,設定斷點在0x00000000
按下F9,讓它跑到斷點位置
接著就可以開始單步
跳轉到0x81f80164
不知道是否為山寨板J-Link仿真器的問題,司徒發現,常常Debug到一半就跑飛了,哈,這叫我如何是好呢...
离线
@xboot
我要找出屏的初始化代碼或者初始數據,我逆了一些代碼後,發現有一些代碼跟xboot很像,但是又不是完全一樣,你應該早點來的告訴我的,哈,這個FC3000掌機的作者應該是在你的xboot QQ群,你可以幫我問下,是否可以給我屏的初始化代碼嗎?這樣我就可以跳過這個步驟,繼續往下走,哈,不然,要找出屏的初始化代碼,可能會花上一些時間,感謝啦
@哇酷小二
這個屏應該是CPU Interface,你看看可不可以幫忙找出TCON設定以及輸出那段在哪?感謝啦
SPI Flash Image
离线
@luali
敢問閣下是否為加藤鷹傳人,你這一掐指果真厲害,屏的背光控制是第三腳位沒錯,由PE6腳位控制,那這樣我用ST7789來點屏看看,感謝
測試代碼
.global _start
.equ GPIO_BASE, 0x01c20800
.equ PE_CFG0, (GPIO_BASE + (4 * 0x24) + 0x00)
.equ PE_DATA, (GPIO_BASE + (4 * 0x24) + 0x10)
.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 r0, =PE_CFG0
ldr r1, =0x1000000
str r1, [r0]
ldr r0, =PE_DATA
0:
ldr r2, =100000
1:
subs r2, #1
bne 1b
eor r1, #(1 << 6)
str r1, [r0]
b 0b
.end
可以成功控制屏的背光
离线
目前使用ST7789的初始化代碼測試,發現還是無法點亮這個屏,而量測後的屏腳位,我也感覺怪怪的,因為那個DB順序好像有點故意把高低5 Bits做交換,雖然我也測試了高低5 Bits交換,但是,還是一樣點不亮這個屏,不過,就目前量測的腳位來看,這個屏沒有TS腳位(Tear),所以這個屏應該是有閃屏問題才是,目前F1C100S系列掌機(PocketGo, Miyoo, Q90, V90, Trimui),就我可以看到的資料,就只有PocketGo是可以解掉閃屏問題,因為它有TS腳位
Pin-01 VDD
Pin-02 GND
Pin-03 LEDA PE6
Pin-04 RST PE11
Pin-05 CS PD21
Pin-06 RS PD19
Pin-07 WR PD18
Pin-08 VDD
Pin-09 DB11 PD13
Pin-10 DB12 PD14
Pin-11 DB13 PD15
Pin-12 DB14 PD16
Pin-13 DB15 PD17
Pin-14 DB5 PD6
Pin-15 DB6 PD7
Pin-16 DB7 PD8
Pin-17 DB8 PD10
Pin-18 DB9 PD11
Pin-19 DB10 PD12
Pin-20 DB0 PD1
Pin-21 DB1 PD2
Pin-22 DB2 PD3
Pin-23 DB3 PD4
Pin-24 DB4 PD5
測試代碼
.global _start
.equiv PIO_BASE, 0x01c20800
.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_RS, (1 << 19)
.equiv LCD_WR, (1 << 18)
.equiv LCD_RST, (1 << 11)
.equiv LCD_BL, (1 << 6)
/*
Pin-01 VDD
Pin-02 GND
Pin-03 LEDA PE6
Pin-04 RST PE11
Pin-05 CS PD21
Pin-06 RS PD19
Pin-07 WR PD18
Pin-08 VDD
Pin-09 DB11 PD13
Pin-10 DB12 PD14
Pin-11 DB13 PD15
Pin-12 DB14 PD16
Pin-13 DB15 PD17
Pin-14 DB5 PD6
Pin-15 DB6 PD7
Pin-16 DB7 PD8
Pin-17 DB8 PD10
Pin-18 DB9 PD11
Pin-19 DB10 PD12
Pin-20 DB0 PD1
Pin-21 DB1 PD2
Pin-22 DB2 PD3
Pin-23 DB3 PD4
Pin-24 DB4 PD5
*/
.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:
mov sp, #0x1000
ldr r1, =0x11111111
ldr r4, =PIO_BASE + PD
str r1, [r4, #PIO_CFG0]
str r1, [r4, #PIO_CFG1]
str r1, [r4, #PIO_CFG2]
ldr r4, =PIO_BASE + PE
str r1, [r4, #PIO_CFG0]
str r1, [r4, #PIO_CFG1]
ldr r1, =0xffffffff
ldr r4, =PIO_BASE + PD
str r1, [r4, #PIO_DATA]
ldr r4, =PIO_BASE + PE
str r1, [r4, #PIO_DATA]
bl lcd_rst
ldr r0, =0x11
bl lcd_cmd
ldr r0, =1000
bl delay
ldr r0, =0x36
bl lcd_cmd
ldr r0, =0xb0
bl lcd_dat
ldr r0, =0x3a
bl lcd_cmd
ldr r0, =0x05
bl lcd_dat
ldr r0, =0x2a
bl lcd_cmd
ldr r0, =0x00
bl lcd_dat
ldr r0, =0x00
bl lcd_dat
ldr r0, =0x01
bl lcd_dat
ldr r0, =0x3f
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, =0xb2
bl lcd_cmd
ldr r0, =116
bl lcd_dat
ldr r0, =16
bl lcd_dat
ldr r0, =0x01
bl lcd_dat
ldr r0, =0x33
bl lcd_dat
ldr r0, =0x33
bl lcd_dat
ldr r0, =0xb7
bl lcd_cmd
ldr r0, =0x35
bl lcd_dat
ldr r0, =0xb8
bl lcd_cmd
ldr r0, =0x2f
bl lcd_dat
ldr r0, =0x2b
bl lcd_dat
ldr r0, =0x2f
bl lcd_dat
ldr r0, =0xbb
bl lcd_cmd
ldr r0, =0x15
bl lcd_dat
ldr r0, =0xc0
bl lcd_cmd
ldr r0, =0x3c
bl lcd_dat
ldr r0, =0x35
bl lcd_cmd
ldr r0, =0x00
bl lcd_dat
ldr r0, =0xc2
bl lcd_cmd
ldr r0, =0x01
bl lcd_dat
ldr r0, =0xc3
bl lcd_cmd
ldr r0, =0x13
bl lcd_dat
ldr r0, =0xc4
bl lcd_cmd
ldr r0, =0x20
bl lcd_dat
ldr r0, =0xc6
bl lcd_cmd
ldr r0, =0x07
bl lcd_dat
ldr r0, =0xd0
bl lcd_cmd
ldr r0, =0xa4
bl lcd_dat
ldr r0, =0xa1
bl lcd_dat
ldr r0, =0xe8
bl lcd_cmd
ldr r0, =0x03
bl lcd_dat
ldr r0, =0xe9
bl lcd_cmd
ldr r0, =0x0d
bl lcd_dat
ldr r0, =0x12
bl lcd_dat
ldr r0, =0x00
bl lcd_dat
ldr r0, =0xe0
bl lcd_cmd
ldr r0, =0xd0
bl lcd_dat
ldr r0, =0x08
bl lcd_dat
ldr r0, =0x10
bl lcd_dat
ldr r0, =0x0d
bl lcd_dat
ldr r0, =0x0c
bl lcd_dat
ldr r0, =0x07
bl lcd_dat
ldr r0, =0x37
bl lcd_dat
ldr r0, =0x53
bl lcd_dat
ldr r0, =0x4c
bl lcd_dat
ldr r0, =0x39
bl lcd_dat
ldr r0, =0x15
bl lcd_dat
ldr r0, =0x15
bl lcd_dat
ldr r0, =0x2a
bl lcd_dat
ldr r0, =0x2d
bl lcd_dat
ldr r0, =0xe1
bl lcd_cmd
ldr r0, =0xd0
bl lcd_dat
ldr r0, =0x0d
bl lcd_dat
ldr r0, =0x12
bl lcd_dat
ldr r0, =0x08
bl lcd_dat
ldr r0, =0x08
bl lcd_dat
ldr r0, =0x15
bl lcd_dat
ldr r0, =0x34
bl lcd_dat
ldr r0, =0x34
bl lcd_dat
ldr r0, =0x4a
bl lcd_dat
ldr r0, =0x36
bl lcd_dat
ldr r0, =0x12
bl lcd_dat
ldr r0, =0x13
bl lcd_dat
ldr r0, =0x2b
bl lcd_dat
ldr r0, =0x2f
bl lcd_dat
ldr r0, =0x29
bl lcd_cmd
ldr r0, =0x2c
bl lcd_cmd
ldr r4, =640
ldr r5, =0xf800
0:
mov r0, r5
bl lcd_dat
subs r4, #1
bne 0b
ldr r4, =PIO_BASE + PE
ldr r5, =0xffffffff
0:
eor r5, #LCD_BL
str r5, [r4, #PIO_DATA]
ldr r0, =50000
bl delay
b 0b
delay:
push {lr}
0:
subs r0, #1
bne 0b
pop {pc}
lcd_rst:
push {r4, r5, lr}
ldr r4, =PIO_BASE + PE
ldr r5, =0xffffffff
str r5, [r4, #PIO_DATA]
ldr r0, =10000
bl delay
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
/*
mov r2, r0, lsl #11
and r2, #(0x1f << 11)
mov r3, r0, lsr #11
and r3, #0x1f
orr r2, r3
and r3, r0, #0x7e0
orr r2, r3
mov r0, r2
*/
and r2, r0, #0x00ff
and r3, r0, #0xff00
lsl r2, #1
lsl r3, #2
mov r5, #0
orr r5, r1
orr r5, r2
orr r5, r3
str r5, [r4, #PIO_DATA]
ldr r0, =100
bl delay
bic r5, #LCD_WR
str r5, [r4, #PIO_DATA]
ldr r0, =100
bl delay
orr r5, #LCD_WR | LCD_CS
str r5, [r4, #PIO_DATA]
ldr r0, =100
bl delay
pop {r4, r5, pc}
lcd_dat:
push {lr}
mov r1, #LCD_WR | LCD_RS
bl lcd_wr
pop {pc}
lcd_cmd:
push {lr}
mov r1, #LCD_WR
bl lcd_wr
pop {pc}
.end
离线
正所謂風水輪流轉,一定有其道理,人的一生,總是高低起伏,在低處得到的經驗總是特別珍貴,今天司徒就來訴說一下得到的經驗值(F1C100S超頻到1.2GHz)
基本上,可以使用如下幾種方式,把屏的初始化資料找出來:
1. 使用J-Link Debug官方韌體程式
2. 使用QEMU跑官方韌體程式,然後把存取暫存器的內容Dump出來 (不過需要破解加密IC)
3. 使用邏輯分析儀
雖然第一種方式是司徒覺得最好的方式,可惜那個山寨J-Link在Debug官方韌體程式時,常常跑飛,所以目前只能先放棄第一種方式,至於第二種方式,看似簡單,不過需要花一些時間,雖然司徒在最新版QEMU有找到支援Orangepi-PC開發板(Allwinner H3),不過要改成F1C100S還是需要一點點時間,所以司徒接下來想測試一下邏輯分析儀的部份,不過司徒手上剛好沒有專用的邏輯分析儀,因此,司徒想使用芒果派F1C200S來當作分析儀使用,於是開始製作過程
括除焊點
勇敢的芒果派站了出來
腳位
Pin-01 VDD
Pin-02 GND
Pin-03 LEDA PE6
Pin-04 RST PE11
Pin-05 CS PD21
Pin-06 RS PD19 => (F1C200S)PD12
Pin-07 WR PD18 => (F1C200S)PD0
Pin-08 VDD
Pin-09 DB11 PD13 => (F1C200S)PE11
Pin-10 DB12 PD14 => (F1C200S)PA0
Pin-11 DB13 PD15 => (F1C200S)PA1
Pin-12 DB14 PD16 => (F1C200S)PA2
Pin-13 DB15 PD17 => (F1C200S)PA3
Pin-14 DB5 PD6 => (F1C200S)PE5
Pin-15 DB6 PD7 => (F1C200S)PE6
Pin-16 DB7 PD8 => (F1C200S)PE7
Pin-17 DB8 PD10 => (F1C200S)PE8
Pin-18 DB9 PD11 => (F1C200S)PE9
Pin-19 DB10 PD12 => (F1C200S)PE10
Pin-20 DB0 PD1 => (F1C200S)PE0
Pin-21 DB1 PD2 => (F1C200S)PE1
Pin-22 DB2 PD3 => (F1C200S)PE2
Pin-23 DB3 PD4 => (F1C200S)PE3
Pin-24 DB4 PD5 => (F1C200S)PE4
跳線
測試程式
.global _start
.equiv CCU_BASE, 0x01c20000
.equiv GPIO_BASE, 0x01c20800
.equiv UART1_BASE, 0x01c25400
.equiv PLL_PERIPH_CTRL_REG, 0x0028
.equiv AHB_APB_HCLKC_CFG_REG, 0x0054
.equiv BUS_CLK_GATING_REG2, 0x0068
.equiv BUS_SOFT_RST_REG2, 0x02d0
.equiv PA, (0x24 * 0)
.equiv PB, (0x24 * 1)
.equiv PC, (0x24 * 2)
.equiv PD, (0x24 * 3)
.equiv PE, (0x24 * 4)
.equiv PORT_CFG0, 0x00
.equiv PORT_CFG1, 0x04
.equiv PORT_CFG2, 0x08
.equiv PORT_DATA, 0x10
.equiv PORT_PUL0, 0x1c
.equiv PORT_PUL1, 0x20
.equiv UART_RBR, 0x00
.equiv UART_DLL, 0x00
.equiv UART_DLH, 0x04
.equiv UART_IER, 0x04
.equiv UART_IIR, 0x08
.equiv UART_LCR, 0x0c
.equiv UART_MCR, 0x10
.equiv UART_USR, 0x7c
.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 r0, =CCU_BASE
ldr r1, =0x80041800
str r1, [r0, #PLL_PERIPH_CTRL_REG]
ldr r1, =0x00003180
str r1, [r0, #AHB_APB_HCLKC_CFG_REG]
ldr r4, =GPIO_BASE
mov r1, #0x00000000
str r1, [r4, #(PA + PORT_CFG0)]
str r1, [r4, #(PC + PORT_CFG0)]
str r1, [r4, #(PD + PORT_CFG0)]
str r1, [r4, #(PD + PORT_CFG1)]
str r1, [r4, #(PE + PORT_CFG0)]
str r1, [r4, #(PE + PORT_CFG1)]
ldr r1, =0x55555555
str r1, [r4, #(PD + PORT_PUL0)]
str r1, [r4, #(PD + PORT_PUL1)]
str r1, [r4, #(PE + PORT_PUL0)]
str r1, [r4, #(PE + PORT_PUL1)]
ldr r5, =0x4000
ldr r6, =64
mov r1, #0
mov r2, r5
mov r3, r6
0:
str r1, [r2]
add r2, #4
subs r3, #4
bne 0b
ldr r4, =GPIO_BASE
0:
ldr r1, [r4, #(PD + PORT_DATA)]
ands r1, #(1 << 0)
bne 0b
mov r1, #0
ldr r2, [r4, #(PD + PORT_DATA)]
and r2, #(1 << 12)
lsl r2, #20
orr r1, r2
ldr r2, [r4, #(PA + PORT_DATA)]
and r2, #0x07
lsl r2, #12
orr r1, r2
ldr r2, [r4, #(PE + PORT_DATA)]
ldr r3, =0x7ff
and r2, r3
orr r1, r2
str r1, [r5]
1:
ldr r1, [r4, #(PD + PORT_DATA)]
ands r1, #(1 << 0)
beq 1b
add r5, #4
subs r6, #4
bne 0b
bl uart_init
ldr r0, =0x11223344
bl uart_4byte
ldr r5, =0x4000
ldr r6, =64
0:
ldr r0, [r5]
bl uart_4byte
ldr r0, =0xaa
bl uart_byte
add r5, #4
subs r6, #4
bne 0b
b .
uart_init:
push {r4, lr}
ldr r4, =CCU_BASE
ldr r1, =(1 << 21)
str r1, [r4, #BUS_CLK_GATING_REG2]
str r1, [r4, #BUS_SOFT_RST_REG2]
ldr r4, =GPIO_BASE
ldr r1, =0x5500
str r1, [r4, #(PA + PORT_CFG0)]
ldr r4, =UART1_BASE
ldr r1, =0x00
str r1, [r4, #UART_IER]
ldr r1, =0xf7
str r1, [r4, #UART_IIR]
ldr r1, =0x00
str r1, [r4, #UART_MCR]
ldr r1, [r4, #UART_LCR]
orr r1, #(1 << 7)
str r1, [r4, #UART_LCR]
ldr r1, =54
str r1, [r4, #UART_DLL]
ldr r1, =0x00
str r1, [r4, #UART_DLH]
ldr r1, [r4, #UART_LCR]
bic r1, #(1 << 7)
str r1, [r4, #UART_LCR]
ldr r1, [r4, #UART_LCR]
bic r1, #0x1f
orr r1, #0x03
str r1, [r4, #UART_LCR]
pop {r4, pc}
uart_byte:
push {r4, lr}
ldr r4, =UART1_BASE
1:
ldr r1, [r4, #UART_USR]
tst r1, #(1 << 1)
beq 1b
strb r0, [r4, #UART_RBR]
pop {r4, pc}
uart_4byte:
push {r4, lr}
mov r4, r0
lsr r0, #24
bl uart_byte
mov r0, r4
lsr r0, #16
bl uart_byte
mov r0, r4
lsr r0, #8
bl uart_byte
mov r0, r4
bl uart_byte
pop {r4, pc}
.end
P.S. PA3先拔除
但是詭異的事情發生了,每次量測到的資料竟然都不一樣
於是,司徒寫了一個GPIO Toggle量測
F1C200S I/O速度只有2.8MHz...
屏的LCD_WR速度則是4.7MHz,難怪取出來的資料每次都不一樣,因為,最低取樣頻率至少要是原生的兩倍...
司徒心想,這種事情嚇不倒我,從小被嚇到大,CPU 602MHz跑不動,那就幫你超頻到900MHz,總該脫胎換骨了吧!於是,劇情繼續往下走...
VCC_CORE電壓足夠,才可以做超頻的動作,VCC_CORE是由EA3036供電,目前是1.2V
電壓計算方式如下,從公式可以得知,只要把R13改成75K,輸出電壓就可以變成 0.6 * (150K / 75K) + 0.6 = 1.8V
絲印位置
幸好司徒有夠多芒果派開發板...
焊接
確定電壓是1.8V
CPU速度計算公式
PLL = (24MHz*N*K)/(M*P)
N = 13
K = 4
M = 1
P = 1
PLL = (24MHz*13*4)/(1*1) = 1248MHz
測試程式
.global _start
.equiv CCU_BASE, 0x01c20000
.equiv GPIO_BASE, 0x01c20800
.equiv PLL_CPU_CTRL_REG, 0x0000
.equiv PLL_PERIPH_CTRL_REG, 0x0028
.equiv AHB_APB_HCLKC_CFG_REG, 0x0054
.equiv BUS_CLK_GATING_REG2, 0x0068
.equiv BUS_SOFT_RST_REG2, 0x02d0
.equiv PD, (0x24 * 3)
.equiv PORT_CFG0, 0x00
.equiv PORT_CFG1, 0x04
.equiv PORT_CFG2, 0x08
.equiv PORT_DATA, 0x10
.equiv PORT_PUL0, 0x1c
.equiv PORT_PUL1, 0x20
.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, =CCU_BASE
ldr r1, =(1 << 31) | (12 << 8) | (3 << 4)
str r1, [r4, #PLL_CPU_CTRL_REG]
0:
ldr r1, [r4, #PLL_CPU_CTRL_REG]
tst r1, #(1 << 28)
beq 0b
ldr r1, =(1 << 31) | (1 << 18) | (31 << 8)
str r1, [r4, #PLL_PERIPH_CTRL_REG]
0:
ldr r1, [r4, #PLL_PERIPH_CTRL_REG]
tst r1, #(1 << 28)
beq 0b
ldr r1, =(3 << 12)
str r1, [r4, #AHB_APB_HCLKC_CFG_REG]
ldr r4, =GPIO_BASE
mov r1, #1
str r1, [r4, #(PD + PORT_CFG0)]
0:
eor r1, #1
str r1, [r4, #(PD + PORT_DATA)]
b 0b
.end
接著測量一下I/O速度
I/O速度為2.8MHz,不過CPU速度已經可以跑到1.2GHz,如果電壓再繼續增加,司徒相信CPU還可以操到更高,因為官方說最高可以到2.6GHz
司徒心想,端午節吃完粽子,應該可以繼續開幹...
离线
今天是端午佳節,祝福大家端午快樂,小弟再次贈上一個實驗數據,F1C100S CORE 2.4V 可以超頻到2.0GHz ,過程如下分析
既然官方說最高可以超頻到2.6GHz,那最高到底可以超到多少呢?基於這個好奇心,司徒決定研究一下超頻,因此,司徒找來芒果四兄弟
首先挺身而出的是芒果大哥,大哥深知,超頻可以會讓自己變成一隻燒雞,剛好今天是端午佳節,明年的今天可能會是自己的清明節...
由於司徒並沒有太多精密電阻做分壓測試,因此,趕緊從隔壁找來老王協助
為了避免發生榨妻的嫌疑,司徒量測一下老王的電壓,果然,老王還是無法信任...
遺憾的是,司徒手上剛好沒有溫度測量器,因此,勇敢的五姊妹挺身而出,由二姐負責量測...
芒果派果然值得信任,固定輸出1.2V
接著,司徒開始從1.8V測試
啟動後,吃掉0.05V
確定LED可以閃爍,代表此時的CPU頻率是可以工作的
測試程式
.global _start
.equiv CCU_BASE, 0x01c20000
.equiv GPIO_BASE, 0x01c20800
.equiv PLL_CPU_CTRL_REG, 0x0000
.equiv PLL_PERIPH_CTRL_REG, 0x0028
.equiv AHB_APB_HCLKC_CFG_REG, 0x0054
.equiv BUS_CLK_GATING_REG2, 0x0068
.equiv BUS_SOFT_RST_REG2, 0x02d0
.equiv PA, (0x24 * 0)
.equiv PORT_CFG0, 0x00
.equiv PORT_DATA, 0x10
.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, =CCU_BASE
ldr r1, =(1 << 31) | (20 << 8) | (3 << 4)
str r1, [r4, #PLL_CPU_CTRL_REG]
0:
ldr r1, [r4, #PLL_CPU_CTRL_REG]
tst r1, #(1 << 28)
beq 0b
ldr r0, =GPIO_BASE
ldr r1, =0x1000
str r1, [r0, #(PA + PORT_CFG0)]
0:
eor r1, #8
str r1, [r0, #(PA + PORT_DATA)]
ldr r2, =1000000
1:
subs r2, #1
bne 1b
b 0b
.end
P.S. 在最早的測試,司徒忘記N最大只有到31,因此,在此次測試,司徒先把K設定成3,然後依序調整N,上面的程式:24MHz * N * K = 24MHz * 21 * 4 = 2016MHz
接著就開始慢慢調整電壓測試,找出該CPU頻率下,最低可以接受的電壓
二姐持續量測溫度...
最後,司徒測試發現,電壓2.4V時,CPU可以超頻到2016MHz,此時CPU還可以正常運作,不過已經呈現發燙的狀態(可憐的二姐),可以加上散熱片使用,而電壓再往上增加時,CPU已經無法運作
最後,芒果四兄弟依然健在
幸好二姐也平安無事
F1C200S在2.0GHz下,I/O速度可以多快呢?答案是7MHz
离线
司徒目前還是處於低潮,不過,物極必反,司徒相信應該快要可以飛龍在天了~
司徒目前準備使用STM32F103當作邏輯分析儀使用,因此,使用STM32F103開發板,Toggle I/O測試一下,發現速度只有別人的2/3,雖然目前這個速度應該是夠用,不過如果有人知道問題在哪,在麻煩告知一下司徒,過程如下說明
Ref: https://stackoverflow.com/questions/59708656/stm32f103c8-gpio-speed-limit
STM32F103測試程式(PLL 128MHz)
.thumb
.cpu cortex-m3
.syntax unified
.equiv GPIOA_CRL, 0x40010800
.equiv GPIOA_CRH, 0x40010804
.equiv GPIOA_IDR, 0x40010808
.equiv GPIOA_ODR, 0x4001080c
.equiv GPIOC_CRL, 0x40011000
.equiv GPIOC_CRH, 0x40011004
.equiv GPIOC_IDR, 0x40011008
.equiv GPIOC_ODR, 0x4001100c
.equiv RCC_CR, 0x40021000
.equiv RCC_CFGR, 0x40021004
.equiv RCC_APB2ENR, 0x40021018
.equiv FLASH_ACR, 0x40022000
.equiv STACKINIT, 0x20005000
.global _start
.section .text
.org 0x0
.word STACKINIT
.word _start
.org 0x100
.align 2
.thumb_func
_start:
bl rcc_init
bl flash_init
ldr r4, =RCC_APB2ENR
ldr r1, =(1 << 2)
str r1, [r4]
ldr r4, =GPIOA_CRH
ldr r1, =(3 << 0)
str r1, [r4]
ldr r4, =GPIOA_ODR
ldr r1, =0xffffffff
ldr r2, =0x00000000
0:
str r1, [r4]
str r2, [r4]
@eor r2, #(1 << 8)
@str r2, [r4]
b 0b
.align 2
.thumb_func
rcc_init:
push {r4, lr}
ldr r4, =RCC_CR
mov r1, #(1 << 16)
str r1, [r4]
0:
ldr r1, [r4]
tst r1, #(1 << 17)
bne 0b
ldr r4, =RCC_CFGR
@mov r1, #(7 << 18) @ 72MHz
mov r1, #(14 << 18) @ 128MHz
orr r1, #(1 << 16)
str r1, [r4]
ldr r4, =RCC_CR
ldr r1, [r4]
orr r1, #(1 << 24)
str r1, [r4]
0:
ldr r1, [r4]
tst r1, #(1 << 25)
bne 0b
ldr r4, =RCC_CFGR
ldr r1, [r4]
orr r1, #2
str r1, [r4]
0:
ldr r1, [r4]
tst r1, #(1 << 3)
bne 0b
pop {r4, pc}
.align
.thumb_func
flash_init:
push {r4, lr}
ldr r4, =FLASH_ACR
mov r1, #0x32
str r1, [r4]
pop {r4, pc}
.end
PA8輸出
PLL 72MHz時,I/O Toggle可以達到12MHz,不過,stackoverflow的人說可以達到18MHz
PLL 128MHz時,I/O Toggle可以達到21MHz,不過,stackoverflow的人說可以達到36MHz
值得注意的是eor指令比str指令更耗時間,多了一倍指令週期,如下是PLL 128MHz時,使用eor指令的I/O Toggle速度
离线
以下純屬個人看法
在有限的時間內,盡可能去學習Assembly,才能夠更貼近你想看的那個東西,更了解它,
因為Assembly是最接近機器的語言,不過卻是離你最遠的語言
或許有人認為司徒老掉牙,還在守舊,現今GNU GCC編譯器只要打開O3旗標,
用C語言都可以寫的比你的Assembly還要高效率
關鍵技術總是藏在底層,選擇看什麼東西或者寫什麼東西,那是個人自由,
埋藏在GNU GCC後面的東西,你可能不知道,或許也不想知道,總之,技術就是藏在別人手上
有些人寫出來的C語言總是特別高效,但是,有些人寫出來的C語言效率卻是相當糟糕,
這其中的奧妙不知道有幾個人仔細想過
學習Assembly,不見得要放棄C語言,學習東西不是在為了要放棄另一個東西做準備
總之,學習態度、處事態度,決定一切,也決定你的人生走向
共勉之~
离线
司徒還是一樣處於低潮,測試STM32F103後,發現還是不行,取到的資料,還是會有不一致的問題,雖然嘗試取兩次、三次做平均,但是,時間似乎不允許,因此,司徒短期很難飛龍在天了~
重新跳線
接著開始測試,將LCD_WR接到PB1,經由負緣觸發中斷時,接著將PC的資料寫到RAM,讀取完64Bytes後,透過UART傳回電腦
STM32F103測試程式(PB0:LCD_RS, PB1:LCD_WR, PC:LCD_DB)
.thumb
.cpu cortex-m3
.syntax unified
.equiv NVIC_ISER0, 0xe000e100
.equiv AFIO_EXTICR1, 0x40010008
.equiv EXTI_IMR, 0x40010400
.equiv EXTI_EMR, 0x40010404
.equiv EXTI_RTSR, 0x40010408
.equiv EXTI_FTSR, 0x4001040c
.equiv EXTI_SWIER, 0x40010410
.equiv EXTI_PR, 0x40010414
.equiv GPIOA_CRL, 0x40010800
.equiv GPIOA_CRH, 0x40010804
.equiv GPIOA_IDR, 0x40010808
.equiv GPIOA_ODR, 0x4001080c
.equiv GPIOB_CRL, 0x40010c00
.equiv GPIOB_CRH, 0x40010c04
.equiv GPIOB_IDR, 0x40010c08
.equiv GPIOB_ODR, 0x40010c0c
.equiv GPIOC_CRL, 0x40011000
.equiv GPIOC_CRH, 0x40011004
.equiv GPIOC_IDR, 0x40011008
.equiv GPIOC_ODR, 0x4001100c
.equiv RCC_CR, 0x40021000
.equiv RCC_CFGR, 0x40021004
.equiv RCC_APB2ENR, 0x40021018
.equiv FLASH_ACR, 0x40022000
.equiv UART1_SR, 0x40013800
.equiv UART1_DR, 0x40013804
.equiv UART1_BRR, 0x40013808
.equiv UART1_CR1, 0x4001380c
.equiv UART1_CR2, 0x40013810
.equiv UART1_CR3, 0x40013814
.equiv STACKINIT, 0x20005000
.global _start
.section .text
.org 0x0000
.word STACKINIT
.word _start
.org 0x005c
.word _exti1
.org 0x0200
.align 2
.thumb_func
_exti1:
push {r4, lr}
ldrh r1, [r7]
strh r1, [r5, #2]!
ldrh r2, [r8]
strh r2, [r5, #2]!
ldr r4, =EXTI_PR
mov r1, #(1 << 1)
str r1, [r4]
pop {r4, pc}
.align 2
.thumb_func
_start:
bl rcc_init
bl flash_init
bl uart_init
ldr r4, =RCC_APB2ENR
ldr r1, [r4]
orr r1, #(1 << 4) | (1 << 3) | (1 << 2)
str r1, [r4]
ldr r4, =GPIOB_CRL
ldr r1, =0x88888888
str r1, [r4]
ldr r4, =GPIOB_CRH
ldr r1, =0x88888888
str r1, [r4]
ldr r4, =GPIOC_CRL
ldr r1, =0x88888888
str r1, [r4]
ldr r4, =GPIOC_CRH
ldr r1, =0x88888888
str r1, [r4]
ldr r4, =EXTI_IMR
ldr r1, =(1 << 1)
str r1, [r4]
ldr r4, =EXTI_EMR
ldr r1, =(1 << 1)
str r1, [r4]
ldr r4, =EXTI_FTSR
ldr r1, =(1 << 1)
str r1, [r4]
ldr r4, =AFIO_EXTICR1
ldr r1, =(1 << 4)
str r1, [r4]
ldr r5, =buf
ldr r6, =buf
ldr r7, =GPIOB_IDR
ldr r8, =GPIOC_IDR
ldr r4, =NVIC_ISER0
ldr r1, =(1 << 7)
str r1, [r4]
add r6, #(64 * 2 * 2)
0:
cmp r5, r6
bcc 0b
ldr r4, =NVIC_ISER0
mov r1, #0
str r1, [r4]
ldr r4, =AFIO_EXTICR1
mov r1, #0
str r1, [r4]
ldr r5, =buf
ldr r6, =64
0:
ldrh r1, [r5, #2]!
lsl r1, #31
eor r0, r0
ldrh r0, [r5, #2]!
orr r0, r1
bl uart_4byte
subs r6, #1
bne 0b
ldr r0, =0x11223344
bl uart_4byte
b .
.align 2
.thumb_func
uart_init:
push {r4, lr}
ldr r4, =RCC_APB2ENR
ldr r1, [r4]
ldr r2, =(1 << 14) | (1 << 2) | (1 << 0)
orr r1, r2
str r1, [r4]
ldr r4, =GPIOA_CRH
ldr r1, [r4]
bic r1, #0xff0
orr r1, #0x4b0
str r1, [r4]
ldr r4, =UART1_BRR
@ldr r1, =(39 << 4) | (1 << 0) @ 115200bps 72MHz
ldr r1, =(69 << 4) | (7 << 0) @ 115200bps 128MHz
str r1, [r4]
ldr r4, =UART1_CR1
ldr r1, =(1 << 13) | (1 << 3)
str r1, [r4]
pop {r4, pc}
.align 2
.thumb_func
uart_byte:
push {r4, lr}
ldr r4, =UART1_SR
0:
ldr r1, [r4]
tst r1, #(1 << 7)
beq 0b
ldr r4, =UART1_DR
str r0, [r4]
pop {r4, pc}
.align 2
.thumb_func
uart_4byte:
push {r4, lr}
mov r4, r0
lsr r0, #24
bl uart_byte
mov r0, r4
lsr r0, #16
bl uart_byte
mov r0, r4
lsr r0, #8
bl uart_byte
mov r0, r4
bl uart_byte
pop {r4, pc}
.align 2
.thumb_func
rcc_init:
push {r4, lr}
ldr r4, =RCC_CR
ldr r1, =(1 << 26) | (1 << 16)
str r1, [r4]
0:
ldr r1, [r4]
tst r1, #(1 << 17)
bne 0b
ldr r4, =RCC_CFGR
@mov r1, #(7 << 18) @ 72MHz
mov r1, #(14 << 18) @ 128MHz
orr r1, #(1 << 16)
str r1, [r4]
ldr r4, =RCC_CR
ldr r1, [r4]
orr r1, #(1 << 24)
str r1, [r4]
0:
ldr r1, [r4]
tst r1, #(1 << 25)
bne 0b
ldr r4, =RCC_CFGR
ldr r1, [r4]
orr r1, #2
str r1, [r4]
0:
ldr r1, [r4]
tst r1, #(1 << 3)
bne 0b
pop {r4, pc}
.align 2
.thumb_func
flash_init:
push {r4, lr}
ldr r4, =FLASH_ACR
mov r1, #0x32
str r1, [r4]
pop {r4, pc}
.data
.align 2
buf: .skip (64 * 2 * 2)
.end
測試後發現,資料還是會有不一致的狀況,因此,STM32F103目前無法勝任這個任務...
离线
@三木同子
相當感謝你,GC9306,有意思,TRIMUI則是使用GC9308,我找時間試試,相當感謝你的資源
@shawn.d
感謝你,可惜,我目前在台灣,只是不知道何時才可以收到邏輯分析儀...
我下午找了許久,有找到一片FPGA開發板,MAX II有接上50MHZ振盪器,我正想用這片,我需要抓取後,儲存64 Bytes,透過UART回傳,你可以給我代碼嗎,不然我就要慢慢刻出來,哈
其實,我以前搞過Miyoo是沒錯,不過,之前沒有好好把一些東西弄好,不管是效能或者是代碼整潔,加上也沒有很了解F1C100S這顆晶片,因此,我這次野心比較大,我想要從頭把Bootloader、Kernel、系統、模擬器,盡我可能的重新整理一遍,重寫或者重新移植,至少這是我目前想做的,所以我才會從頭搞起,而不是直接針對Miyoo系統再繼續,當然我不是說放棄之前的東西,我只是想要從頭整理一遍,所以對象比較偏向是我個人的移植開源路程,哈
針對這個標題研究FC3000掌機的開源可行性,我心想我應該是已經做到了,因為確定CPU是F1C100S後,基本上,就鐵定可以開源了,只是說,能夠開源到哪種程度
加上我之前也說過,連Miyoo也會一起更新,所以這個貼子就會變得很混亂,因為裡面有FC3000的東西,也有Miyoo的東西,哈,所以,我打算把這個貼子,當作是F1C100S系列掌機的移植過程,意思就是,FC3000掌機、Miyoo掌機、Q8掌機、Trimui掌機,就都寫在這個貼子上面,一起更新好了,前期只要把屏以及按鍵搞定,後續就可以通吃了,哈,所以這樣就變得比較有意思,但是,我想,應該會更混亂,哈
离线
@三木同子
我測試了GC9300、GC9306初始化代碼,不過還是一樣點不亮這個屏,我也仔細多次檢查代碼,應該是沒問題才是,總之,先感謝你的資訊,我在努力找找
GC9306測試代碼,供日後需要使用
.global _start
.equiv PIO_BASE, 0x01c20800
.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_RS, (1 << 19)
.equiv LCD_WR, (1 << 18)
.equiv LCD_RST, (1 << 11)
.equiv LCD_BL, (1 << 6)
/*
Pin-01 VDD
Pin-02 GND
Pin-03 LEDA PE6
Pin-04 RST PE11
Pin-05 CS PD21
Pin-06 RS PD19
Pin-07 WR PD18
Pin-08 VDD
Pin-09 DB11 PD13
Pin-10 DB12 PD14
Pin-11 DB13 PD15
Pin-12 DB14 PD16
Pin-13 DB15 PD17
Pin-14 DB5 PD6
Pin-15 DB6 PD7
Pin-16 DB7 PD8
Pin-17 DB8 PD10
Pin-18 DB9 PD11
Pin-19 DB10 PD12
Pin-20 DB0 PD1
Pin-21 DB1 PD2
Pin-22 DB2 PD3
Pin-23 DB3 PD4
Pin-24 DB4 PD5
*/
.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]
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, =0xfe
bl lcd_cmd
ldr r0, =0xef
bl lcd_cmd
ldr r0, =0x36
bl lcd_cmd
ldr r0, =0x28
bl lcd_dat
ldr r0, =0x3a
bl lcd_cmd
ldr r0, =0x05
bl lcd_dat
ldr r0, =0xa4
bl lcd_cmd
ldr r0, =0x44
bl lcd_dat
ldr r0, =0x44
bl lcd_dat
ldr r0, =0xa5
bl lcd_cmd
ldr r0, =0x42
bl lcd_dat
ldr r0, =0x42
bl lcd_dat
ldr r0, =0xaa
bl lcd_cmd
ldr r0, =0x88
bl lcd_dat
ldr r0, =0x88
bl lcd_dat
ldr r0, =0xe8
bl lcd_cmd
ldr r0, =0x11
bl lcd_dat
ldr r0, =0x0b
bl lcd_dat
ldr r0, =0xe3
bl lcd_cmd
ldr r0, =0x01
bl lcd_dat
ldr r0, =0x10
bl lcd_dat
ldr r0, =0xff
bl lcd_cmd
ldr r0, =0x61
bl lcd_dat
ldr r0, =0xac
bl lcd_cmd
ldr r0, =0x00
bl lcd_dat
ldr r0, =0xad
bl lcd_cmd
ldr r0, =0x33
bl lcd_dat
ldr r0, =0xae
bl lcd_cmd
ldr r0, =0x2b
bl lcd_dat
ldr r0, =0xaf
bl lcd_cmd
ldr r0, =0x55
bl lcd_dat
ldr r0, =0xa6
bl lcd_cmd
ldr r0, =0x2a
bl lcd_dat
ldr r0, =0x2a
bl lcd_dat
ldr r0, =0xa7
bl lcd_cmd
ldr r0, =0x2b
bl lcd_dat
ldr r0, =0x2b
bl lcd_dat
ldr r0, =0xa8
bl lcd_cmd
ldr r0, =0x18
bl lcd_dat
ldr r0, =0x18
bl lcd_dat
ldr r0, =0xa9
bl lcd_cmd
ldr r0, =0x2a
bl lcd_dat
ldr r0, =0x2a
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, =0x2a
bl lcd_cmd
ldr r0, =0x00
bl lcd_dat
ldr r0, =0x00
bl lcd_dat
ldr r0, =0x01
bl lcd_dat
ldr r0, =0x3f
bl lcd_dat
ldr r0, =0x2c
bl lcd_cmd
ldr r0, =0xf0
bl lcd_cmd
ldr r0, =0x02
bl lcd_dat
ldr r0, =0x01
bl lcd_dat
ldr r0, =0x00
bl lcd_dat
ldr r0, =0x06
bl lcd_dat
ldr r0, =0x09
bl lcd_dat
ldr r0, =0x0c
bl lcd_dat
ldr r0, =0xf1
bl lcd_cmd
ldr r0, =0x01
bl lcd_dat
ldr r0, =0x03
bl lcd_dat
ldr r0, =0x00
bl lcd_dat
ldr r0, =0x3a
bl lcd_dat
ldr r0, =0x3e
bl lcd_dat
ldr r0, =0x09
bl lcd_dat
ldr r0, =0xf2
bl lcd_cmd
ldr r0, =0x0c
bl lcd_dat
ldr r0, =0x09
bl lcd_dat
ldr r0, =0x26
bl lcd_dat
ldr r0, =0x07
bl lcd_dat
ldr r0, =0x07
bl lcd_dat
ldr r0, =0x30
bl lcd_dat
ldr r0, =0xf3
bl lcd_cmd
ldr r0, =0x09
bl lcd_dat
ldr r0, =0x06
bl lcd_dat
ldr r0, =0x57
bl lcd_dat
ldr r0, =0x03
bl lcd_dat
ldr r0, =0x03
bl lcd_dat
ldr r0, =0x6b
bl lcd_dat
ldr r0, =0xf4
bl lcd_cmd
ldr r0, =0x0d
bl lcd_dat
ldr r0, =0x1d
bl lcd_dat
ldr r0, =0x1c
bl lcd_dat
ldr r0, =0x06
bl lcd_dat
ldr r0, =0x08
bl lcd_dat
ldr r0, =0x0f
bl lcd_dat
ldr r0, =0xf5
bl lcd_cmd
ldr r0, =0x0c
bl lcd_dat
ldr r0, =0x05
bl lcd_dat
ldr r0, =0x06
bl lcd_dat
ldr r0, =0x33
bl lcd_dat
ldr r0, =0x31
bl lcd_dat
ldr r0, =0x0f
bl lcd_dat
ldr r0, =0x11
bl lcd_cmd
ldr r0, =10000
bl delay
ldr r0, =0x29
bl lcd_cmd
ldr r0, =10000
bl delay
ldr r0, =0x2c
bl lcd_cmd
ldr r4, =320*30
ldr r5, =0xf800
0:
mov r0, r5
bl lcd_dat
subs r4, #1
bne 0b
ldr r4, =PIO_BASE + PE
ldr r5, =0xffffffff
0:
eor r5, #LCD_BL
str r5, [r4, #PIO_DATA]
ldr r0, =50000
bl delay
b 0b
delay:
push {lr}
0:
subs r0, #1
bne 0b
pop {pc}
lcd_rst:
push {r4, r5, lr}
ldr r4, =PIO_BASE + PE
ldr r5, =0xffffffff
str r5, [r4, #PIO_DATA]
ldr r0, =10000
bl delay
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
/*
mov r2, r0, lsl #11
and r2, #(0x1f << 11)
mov r3, r0, lsr #11
and r3, #0x1f
orr r2, r3
and r3, r0, #0x7e0
orr r2, r3
mov r0, r2
*/
and r2, r0, #0x00ff
and r3, r0, #0xff00
lsl r2, #1
lsl r3, #2
mov r5, #0
orr r5, r1
orr r5, r2
orr r5, r3
str r5, [r4, #PIO_DATA]
ldr r0, =100
bl delay
bic r5, #LCD_CS
str r5, [r4, #PIO_DATA]
ldr r0, =100
bl delay
bic r5, #LCD_WR
str r5, [r4, #PIO_DATA]
ldr r0, =100
bl delay
orr r5, #LCD_WR
str r5, [r4, #PIO_DATA]
ldr r0, =100
bl delay
orr r5, #LCD_CS
str r5, [r4, #PIO_DATA]
ldr r0, =100
bl delay
pop {r4, r5, pc}
lcd_dat:
push {lr}
mov r1, #LCD_CS | LCD_WR | LCD_RS
bl lcd_wr
pop {pc}
lcd_cmd:
push {lr}
mov r1, #LCD_CS | LCD_WR
bl lcd_wr
pop {pc}
.end
离线
@shawn.d
感謝,我的是EPM240,在邏輯分析儀來之前,我來寫看看,哈
@skywalk00
原來那個人是你,我正好要找你,因為你說小霸王Q2也是F1C100S ? 你可以測試一下Miyoo系統嗎,看看可不可以跑起來嗎 ?
@zzm24
感謝你的資訊,經過我測試,這個屏應該不是GC9306,另外超頻部份,下面說明
司徒也在懷疑是否LCD輸出那部份有問題,於是測試下R61520在Miyoo上,確實可以跑得
測試Q8掌機的HX8357C,也是可以點亮屏
將FC3000的屏拿到Q8掌機測試,結果還是點不亮,共測試GC9300、GC9306、ST7789、HX8357C、R61520初始化程式,還是不行...
同場加映,司徒決定測試一下F1C100S超頻的持久度,這問題,真是一個老男人心中的痛...,於是,司徒找來幾顆精密電阻,0.6 * (464K / 150K) + 0.6 = 2.456V
2.456V,雖然多了0.056V,不過應該差不多,這個電壓是司徒之前測試,F1C100S最大可以承受的電壓
接著,司徒再度詢問芒果四兄弟,此時,勇敢的二哥二話不說,馬上挺身而出
移除R12、R13
0.6 * (464K / 150K) + 0.6 = 2.456V,司徒也幫二哥焊接一顆光明燈,期許實驗平安順利
既然,芒果都由二哥出戰了,於是司徒詢問三姐的意願,三姐說它不適合拍照,司徒不相信,要求三姐給一張照片證明
恩,三姐還是不要出戰好了,不然,司徒可能會變成殘障人士...
於是,司徒請來金大哥,聽說金大哥練過金鐘罩...
開始測驗,CPU=2016MHz,二哥忍耐一下,馬上就可以脫離苦海了...
二哥的光明燈開始閃爍
6秒後...,芒果二哥終於離開人間,再怎麼連接USB,都無法進入燒錄模式,願二哥安祥...
於是,司徒找來另外的精密點組,442K電阻配上160K電阻,0.6 * (442K / 160K) + 0.6 = 2.2575V
此時,三哥默默走了出來,司徒替三哥治裝...,0.6 * (442K / 160K) + 0.6 = 2.2575V
三哥開始...
CPU=2016MHz,10秒後掛點,不過插入USB,還是可以進入燒錄模式,因此,電壓2.2575V是不會燒毀F1C100S的保險電壓,而司徒測試CPU=1920MHz,三哥竟然撐過60秒,三哥真男人
60秒後,二姐馬上量測溫度,果然會燙...
於是,小護士準備幫三哥打針,可惜司徒臨時找不到散熱片...
那就只好電風扇伺候...
二姐測量溫度,果然還是有點燙,不過,CPU=1920MHz,跑了三分鐘,依然沒有問題,因此,司徒覺得1920MHz,加上散熱片,應該是可以拿來使用的
僅存的芒果三兄弟
測試代碼
.global _start
.equiv CCU_BASE, 0x01c20000
.equiv GPIO_BASE, 0x01c20800
.equiv PLL_CPU_CTRL_REG, 0x0000
.equiv PLL_PERIPH_CTRL_REG, 0x0028
.equiv AHB_APB_HCLKC_CFG_REG, 0x0054
.equiv BUS_CLK_GATING_REG2, 0x0068
.equiv BUS_SOFT_RST_REG2, 0x02d0
.equiv PA, (0x24 * 0)
.equiv PORT_CFG0, 0x00
.equiv PORT_DATA, 0x10
.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, =CCU_BASE
ldr r1, =(1 << 31) | (19 << 8) | (3 << 4)
str r1, [r4, #PLL_CPU_CTRL_REG]
0:
ldr r1, [r4, #PLL_CPU_CTRL_REG]
tst r1, #(1 << 28)
beq 0b
ldr r0, =GPIO_BASE
ldr r1, =0x1000
str r1, [r0, #(PA + PORT_CFG0)]
0:
ldr r1, =0x08
str r1, [r0, #(PA + PORT_DATA)]
ldr r2, =500000
1:
subs r2, #1
bne 1b
ldr r1, =0x00
str r1, [r0, #(PA + PORT_DATA)]
ldr r2, =500000
2:
subs r2, #1
bne 2b
b 0b
.end
結論:
CPU=2016MHz,需要找出臨界電壓,容易燒毀,不建議使用
CPU=1920MHz,F1C100S加上散熱片,可以跑,目前只有測試GPIO Toggle,只在芒果派上測試,其他開發板不保證電壓如表格一樣
离线
@shawn.d
好,我找時間試試,感謝
荔枝姐詢問司徒,為何最近都在搞芒果哥?這問題...,司徒如何啟齒...
目前VCC_CORE=1.1V,超頻首要工作就是加大電壓,電壓公式:0.6 * (R47 / R48) + 0.6)
R47、R48位置
移除R47、R48
R47=442K、R48=160K,0.6 * (442K / 160K) + 0.6 = 2.2575V
CPU=2016MHz,三秒就掛了,於是,電風扇伺候,CPU=1920MHz,可以跑I/O Toggle了...
司徒一摸荔枝姐,這...溫度怎麼比芒果哥還要激情...
測試程式
.global _start
.equiv CCU_BASE, 0x01c20000
.equiv GPIO_BASE, 0x01c20800
.equiv PLL_CPU_CTRL_REG, 0x0000
.equiv PLL_PERIPH_CTRL_REG, 0x0028
.equiv AHB_APB_HCLKC_CFG_REG, 0x0054
.equiv BUS_CLK_GATING_REG2, 0x0068
.equiv BUS_SOFT_RST_REG2, 0x02d0
.equiv PE, (0x24 * 4)
.equiv PORT_CFG0, 0x00
.equiv PORT_DATA, 0x10
.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, =CCU_BASE
ldr r1, =(1 << 31) | (19 << 8) | (3 << 4)
str r1, [r4, #PLL_CPU_CTRL_REG]
0:
ldr r1, [r4, #PLL_CPU_CTRL_REG]
tst r1, #(1 << 28)
beq 0b
ldr r0, =GPIO_BASE
ldr r1, =0x10000
str r1, [r0, #(PE + PORT_CFG0)]
0:
eor r1, #0x10
str r1, [r0, #(PE + PORT_DATA)]
ldr r2, =500000
1:
subs r2, #1
bne 1b
b 0b
.end
結論:
荔枝派一樣可以超頻到1.9GHz,只是溫度感覺比芒果派稍微高一點,錯覺?
离线
司徒買一台山寨Saleae Logic 16,體積很迷你
不過,同時開啟16通道時,取樣率只有16MS/s...
在測試過16通道16MS/s取樣率後,司徒發現每次取的資料都有變動,資料不一致性有點大,這邏輯分析儀...,於是,司徒改成使用12通道25MS/s的取樣率
測試幾次後,發現資料不一致性還是有,不過已經好很多了,不過LCD是16Bits,在加上LCD_WR、LCD_RS,需要18通道才行,於是司徒分兩次擷取
低位元資料(取5次):LCD_RS、LCD_WR、LCD_DB0~LCD_DB9
高位元資料(取5次):LCD_RS、LCD_WR、LCD_DB6~LCD_DB15
擷取後,把高位元資料進行排列,假定這些多餘的資料為雜訊,手動濾掉
低位元資料進行排列,假定這些多餘的資料為雜訊,手動濾掉
再做合併時,發現低位元資料少一筆,這...,不過,仔細一看,資料都是一筆CMD、一筆DAT,然後LCD_DB6~LCD_DB9是疊加取樣,因此,交叉比對後,發現第一筆高位元資料是雜訊
合併後的初始化命令
CMD:0x800
DAT:0x100
CMD:0x1000
DAT:0x700
CMD:0x1800
DAT:0xc002
CMD:0x2000
DAT:0x0
CMD:0x4000
DAT:0x1200
CMD:0x4800
DAT:0x0
CMD:0x5000
DAT:0x0
CMD:0x6000
DAT:0x0
CMD:0x6800
DAT:0x0
CMD:0x7800
DAT:0x0
CMD:0x8000
DAT:0x0
CMD:0x8800
DAT:0x3800
CMD:0x9000
DAT:0x0
CMD:0x9800
DAT:0x0
CMD:0x3800
DAT:0x800
CMD:0x8000
DAT:0x8682
CMD:0x8800
DAT:0x3e60
CMD:0x9000
DAT:0xc080
CMD:0x9800
DAT:0x603
CMD:0x4820
DAT:0xf000
CMD:0x5820
DAT:0x7000
CMD:0x20
DAT:0x0
CMD:0x820
DAT:0x0
CMD:0x8020
DAT:0x0
CMD:0x8820
DAT:0x3d00
CMD:0x9020
DAT:0x2000
CMD:0xa820
DAT:0x2a00
CMD:0xb020
DAT:0x2000
CMD:0xb820
DAT:0x3b00
CMD:0xc020
DAT:0x1000
CMD:0xc820
DAT:0x3f00
CMD:0xe020
DAT:0x1500
CMD:0xe820
DAT:0x2000
CMD:0x8040
DAT:0x0
CMD:0x8840
DAT:0x78e0
CMD:0x9040
DAT:0x0
CMD:0x9840
DAT:0xf920
CMD:0x60
DAT:0x714
CMD:0x860
DAT:0x800
CMD:0x5060
DAT:0x0
CMD:0x80
DAT:0x0
CMD:0x880
DAT:0x0
CMD:0x1080
DAT:0x0
CMD:0x1880
DAT:0x0
CMD:0x2080
DAT:0x0
CMD:0x2880
DAT:0x0
CMD:0x8080
DAT:0x8000
CMD:0x9080
DAT:0x600
CMD:0x1800
DAT:0x4020
CMD:0x3800
DAT:0x9920
CMD:0x8040
DAT:0x0
CMD:0x8840
DAT:0x78e0
CMD:0x9040
DAT:0x0
CMD:0x9840
DAT:0xf920
CMD:0x20
DAT:0x78e0
CMD:0x820
DAT:0x0
CMD:0x1020
DAT:0x0
測試程式
.global _start
.equiv PIO_BASE, 0x01c20800
.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 << 11)
.equiv LCD_BL, (1 << 6)
.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]
ldr r1, =0x00111111
str r1, [r4, #PIO_CFG2]
ldr r4, =PIO_BASE + PE
ldr r1, [r4, #PIO_CFG0]
bic r1, #0xf000000
orr r1, #0x1000000
str r1, [r4, #PIO_CFG0]
ldr r1, [r4, #PIO_CFG1]
bic r1, #0xf000
orr r1, #0x1000
str r1, [r4, #PIO_CFG1]
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, =0x800
bl lcd_cmd
ldr r0, =0x100
bl lcd_dat
ldr r0, =0x1000
bl lcd_cmd
ldr r0, =0x700
bl lcd_dat
ldr r0, =0x1800
bl lcd_cmd
ldr r0, =0xc002
bl lcd_dat
ldr r0, =0x2000
bl lcd_cmd
ldr r0, =0x0
bl lcd_dat
ldr r0, =0x4000
bl lcd_cmd
ldr r0, =0x1200
bl lcd_dat
ldr r0, =0x4800
bl lcd_cmd
ldr r0, =0x0
bl lcd_dat
ldr r0, =0x5000
bl lcd_cmd
ldr r0, =0x0
bl lcd_dat
ldr r0, =0x6000
bl lcd_cmd
ldr r0, =0x0
bl lcd_dat
ldr r0, =0x6800
bl lcd_cmd
ldr r0, =0x0
bl lcd_dat
ldr r0, =0x7800
bl lcd_cmd
ldr r0, =0x0
bl lcd_dat
ldr r0, =0x8000
bl lcd_cmd
ldr r0, =0x0
bl lcd_dat
ldr r0, =0x8800
bl lcd_cmd
ldr r0, =0x3800
bl lcd_dat
ldr r0, =0x9000
bl lcd_cmd
ldr r0, =0x0
bl lcd_dat
ldr r0, =0x9800
bl lcd_cmd
ldr r0, =0x0
bl lcd_dat
ldr r0, =0x3800
bl lcd_cmd
ldr r0, =0x800
bl lcd_dat
ldr r0, =0x8000
bl lcd_cmd
ldr r0, =0x8682
bl lcd_dat
ldr r0, =0x8800
bl lcd_cmd
ldr r0, =0x3e60
bl lcd_dat
ldr r0, =0x9000
bl lcd_cmd
ldr r0, =0xc080
bl lcd_dat
ldr r0, =0x9800
bl lcd_cmd
ldr r0, =0x603
bl lcd_dat
ldr r0, =0x4820
bl lcd_cmd
ldr r0, =0xf000
bl lcd_dat
ldr r0, =0x5820
bl lcd_cmd
ldr r0, =0x7000
bl lcd_dat
ldr r0, =0x20
bl lcd_cmd
ldr r0, =0x0
bl lcd_dat
ldr r0, =0x820
bl lcd_cmd
ldr r0, =0x0
bl lcd_dat
ldr r0, =0x8020
bl lcd_cmd
ldr r0, =0x0
bl lcd_dat
ldr r0, =0x8820
bl lcd_cmd
ldr r0, =0x3d00
bl lcd_dat
ldr r0, =0x9020
bl lcd_cmd
ldr r0, =0x2000
bl lcd_dat
ldr r0, =0xa820
bl lcd_cmd
ldr r0, =0x2a00
bl lcd_dat
ldr r0, =0xb020
bl lcd_cmd
ldr r0, =0x2000
bl lcd_dat
ldr r0, =0xb820
bl lcd_cmd
ldr r0, =0x3b00
bl lcd_dat
ldr r0, =0xc020
bl lcd_cmd
ldr r0, =0x1000
bl lcd_dat
ldr r0, =0xc820
bl lcd_cmd
ldr r0, =0x3f00
bl lcd_dat
ldr r0, =0xe020
bl lcd_cmd
ldr r0, =0x1500
bl lcd_dat
ldr r0, =0xe820
bl lcd_cmd
ldr r0, =0x2000
bl lcd_dat
ldr r0, =0x8040
bl lcd_cmd
ldr r0, =0x0
bl lcd_dat
ldr r0, =0x8840
bl lcd_cmd
ldr r0, =0x78e0
bl lcd_dat
ldr r0, =0x9040
bl lcd_cmd
ldr r0, =0x0
bl lcd_dat
ldr r0, =0x9840
bl lcd_cmd
ldr r0, =0xf920
bl lcd_dat
ldr r0, =0x60
bl lcd_cmd
ldr r0, =0x714
bl lcd_dat
ldr r0, =0x860
bl lcd_cmd
ldr r0, =0x800
bl lcd_dat
ldr r0, =0x5060
bl lcd_cmd
ldr r0, =0x0
bl lcd_dat
ldr r0, =0x80
bl lcd_cmd
ldr r0, =0x0
bl lcd_dat
ldr r0, =0x880
bl lcd_cmd
ldr r0, =0x0
bl lcd_dat
ldr r0, =0x1080
bl lcd_cmd
ldr r0, =0x0
bl lcd_dat
ldr r0, =0x1880
bl lcd_cmd
ldr r0, =0x0
bl lcd_dat
ldr r0, =0x2080
bl lcd_cmd
ldr r0, =0x0
bl lcd_dat
ldr r0, =0x2880
bl lcd_cmd
ldr r0, =0x0
bl lcd_dat
ldr r0, =0x8080
bl lcd_cmd
ldr r0, =0x8000
bl lcd_dat
ldr r0, =0x9080
bl lcd_cmd
ldr r0, =0x600
bl lcd_dat
ldr r0, =0x1800
bl lcd_cmd
ldr r0, =0x4020
bl lcd_dat
ldr r0, =0x3800
bl lcd_cmd
ldr r0, =0x9920
bl lcd_dat
ldr r0, =0x8040
bl lcd_cmd
ldr r0, =0x0
bl lcd_dat
ldr r0, =0x8840
bl lcd_cmd
ldr r0, =0x78e0
bl lcd_dat
ldr r0, =0x9040
bl lcd_cmd
ldr r0, =0x0
bl lcd_dat
ldr r0, =0x9840
bl lcd_cmd
ldr r0, =0xf920
bl lcd_dat
ldr r0, =0x20
bl lcd_cmd
ldr r0, =0x78e0
bl lcd_dat
ldr r0, =0x820
bl lcd_cmd
ldr r0, =0x0
bl lcd_dat
ldr r0, =0x1020
bl lcd_cmd
ldr r4, =320*80
ldr r5, =0x1f
0:
mov r0, r5
bl lcd_dat
subs r4, #1
bne 0b
ldr r4, =320*80
ldr r5, =0x7e0
0:
mov r0, r5
bl lcd_dat
subs r4, #1
bne 0b
ldr r4, =320*80
ldr r5, =0xf800
0:
mov r0, r5
bl lcd_dat
subs r4, #1
bne 0b
b .
delay:
push {lr}
0:
subs r0, #1
bne 0b
pop {pc}
lcd_rst:
push {r4, r5, lr}
ldr r4, =PIO_BASE + PE
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 r2, r0, #0x00ff
and r3, r0, #0xff00
lsl r2, #1
lsl r3, #2
eor r5, r5
orr r5, r1
orr r5, r2
orr r5, r3
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
感動的一刻
离线
接著司徒花了一些時間,把腳位找了出來,這樣FC3000掌機就進入備戰狀態了~
UP PF0
DOWN PF5
LEFT PF4
RIGHT PE2
A PE3
B PE4
X PE5
Y PA3
I BTA54C(Pin3)
BAT54C(Pin1)PA2
R PA2, 1AM-C(Pin3)
L PA1, 1AM-C(Pin3)
START PE12, BAT54C(Pin2)
SELECT PE12, BAT54C(Pin1)
Encrypt IC(Pin6) I2C_SCK PE0
Encrypt IC(Pin7) I2C_SDA PE1
Encrypt IC(Pin2) Blue LED-
LTH7 CHRG Red LED-
MicroSD D0 PF1
MicroSD CLK PF2
MicroSD CMD PF3
Boot SPI Flash CS PC1
Boot SPI Flash MISO PC2
Boot SPI Flash MOSI PC3
Boot SPI Flash SCK PC0
SPI Flash CS PE7
SPI Flash MISO PE10
SPI Flash MOSI PE8
SPI Flash CLK PE9
LCD BK PE6
LCD RST PE11
LCD CS PD21
LCD RS PD19
LCD WR PD18
LCD DB11 PD13
LCD DB12 PD14
LCD DB13 PD15
LCD DB14 PD16
LCD DB15 PD17
LCD DB5 PD6
LCD DB6 PD7
LCD DB7 PD8
LCD DB8 PD10
LCD DB9 PD11
LCD DB10 PD12
LCD DB0 PD1
LCD DB1 PD2
LCD DB2 PD3
LCD DB3 PD4
LCD DB4 PD5
离线
如果有玩家想要讓FC3000掌機跑Linux系統,需要飛三根線,這是最少的改機步驟
接著需要改機,否則無法從MicroSD開機
需要跳三根線
這樣就可以從MicroSD開機
不要插入卡帶,MicroSD卡的位置很方便替換
fc3000_lcd_test.img
下載fc3000_lcd_test.img,直接DD到MicroSD即可,插入MicroSD卡後,開機上電,這樣就可以測試是否改機完成,屏會一直換顏色
使用原本官方MicroSD開機,則可以進入原本系統
插入卡帶
則開機進入NES遊戲畫面,做到這一步,FC3000掌機已經具備跑Linux系統的能力,因此,一般玩家想要讓FC3000掌機可以具備跑Linux的能力,只要跳三根線即可
离线
確實有飛龍在天的感覺,難怪司徒昨晚在夢境之中有雙飛的感覺,雙龍飛舞的意思,不要誤會
能夠走到這一步,小弟在此感謝所有幫助過的人
FC3000掌機的目標很明確,就是要跑Linux Kernel,因此,司徒需要一個Bootloader用來載入Kernel,
而這個Bootloader的動作也很明確,就是初始化DRAM,然後從MicroSD載入Kernel,跳轉Kernel,
司徒要訂一個很嚴格的目標:FC3000掌機上電後,執行完Kernel,UART顯示Login畫面,必須在一秒內,執行完畢
看似不太可能,不過總是要試試才知道~
目前在應用上,最熱門就是UBoot,不過,UBoot真的太肥、太大了,XBoot也需要瘦身,司徒在whycan有看到一些人,自己做精簡版Bootloader,不過,司徒最後決定自己幹一個超精簡Bootloader給FC3000掌機專用,所以,可能幾個月後,才會在更新了~哈
离线
司徒原本沈浸在雙飛的感覺之中,心情愉悅,於是爽爽的寫FC3000程式,結果,竟然吃土了!
今天就來分享一下遇到的問題
目前FC3000掌機已經可以從MicroSD開機執行,於是,司徒依照個人慣例,都會把一些基本I/O程式練習一遍
所以,第一個測試就是點屏,這個沒有問題,第二個測試程式則是UART,結果竟然卡關...
但是,一樣的程式燒到SPI Flash竟然可以執行,司徒編譯後的Binary程式大小只有512 Bytes
後來交叉測試,發現F1C100S只會從MicroSD載入大於512 Bytes的Binary程式,意思就是寫到MicroSD的程式必須大於等於1024 Bytes,這也是為何司徒的短小測試程式無法從MicroSD執行的原因,SPI Flash就沒有這個限制,跟大家分享一下~
离线
哈!真是相當對不起有改機的玩家,因為,經過司徒測試,FC3000掌機其實不需要改機就可以安裝Linux系統,因為F1C100S支援MicroSD 1bit/SPI模式開機
經過幾天奮戰,司徒的自幹Bootloader已經差不多了,然而,司徒這才發現FC3000 V2版本的機器,硬件跟V1版本一模一樣,只有SPI Flash不一樣,所以,司徒決定先來幹一件事情,那就是製作V1、V2系統升級程序,哈,有點擋人財路的感覺,司徒只是個人興趣愛好研究,請勿將此程序作為商業用途
步驟如下:
1. 下載fc3000_v1_v2_flash.img.7z
2. 解壓縮後,將fc3000_v1_v2_flash.img直接燒錄到MicroSD
$ sudo dd if=fc3000_v1_v2_flash.img of=/dev/sdX bs=1M && sync && sync
64+0 records in
64+0 records out
67108864 bytes (67 MB, 64 MiB) copied, 6.40316 s, 10.5 MB/s
P.S. sdX為當下的MicroSD位置
司徒目前只有測試SanDisk記憶卡
3. 移除卡帶
4. 插入剛剛燒錄完成的MicroSD
5. 插入電池,開機上電
按下SELECT:刷入v1版本官方系統(8大模擬器)
按下START:刷入v2版本官方系統(10大模擬器)
6. 更新時間大約3分鐘
7. 完成
v1版本系統(8大模擬器)
v2版本系統(10大模擬器)
既然Bootloader都自幹完畢了,那司徒接下來就準備要開始移植Linux Kernel,目前有三種可行方式:
1. 使用當初司徒移植給Miyoo的Linux Kernel (Linux Kernel 4.14.0)
2. 從荔枝派GitHub官網Clone移植 (Linux Kernel 5.2)
3. 從目前最新的Linux Kernel從頭移植 (Linux Kernel 5.12.9)
為了榨乾F1C100S效能,司徒最後決定從目前最新的Linux Kernel 5.12.9從頭移植,所以可能幾個月後,司徒才會在更新了!哈哈~
不過,移植Linux Kernel需要一些時間,因此,司徒也會把預定的四台掌機(FC3000、Q8、TRIMUI、PocketGo)做整理,因此,當移植累了,司徒就會整理這四台掌機,讓這四台掌機都處於備戰狀態(硬體都解析出來),所以接下來,可能是混亂的開始,哈~
离线
我重新上傳了一份:https://github.com/steward-fu/fc3000/releases/download/v1.0/fc3000_v1_v2_flash.img
你可以使用SHA1工具算一下檔案
fc3000_v1_v2_flash.img: a9d34ff94169f5a3f2afa768345540156c99d501
如果還是無法一樣進入燒錄選單的話,那~就遵照老天的旨意吧~
离线
司徒接下來除了把重點鎖定在移植Linux Kernel之外,也同時鎖定另一台機器,那就是TRIMUI掌機,這台掌機使用F1C200S當作CPU,不過,司徒比較喜愛的是他的大小尺寸,相當便攜,可惜的是,司徒曾經試著聯繫廠商提供源代碼,一直沒有得到回覆(預期結果),當然,司徒只想知道TRIMUI掌機是否會閃屏,因為就司徒手上的資料,這台掌機應該也是有閃屏問題(8Bits BUS,沒有TE),為了解決這個好奇心,司徒又開始折騰...
四台F1C100S系列掌機比較
價格便宜:Q8 > FC3000 > TRIMUI > PocketGo
容易攜帶:TRIMUI > PocketGo > Q8 > FC3000
實際可玩:PocketGo > TRIMUI > FC3000 > Q8
有閃屏問題:FC3000、Q8
沒有閃屏問題:PocketGo
全視角屏幕:PocketGo、TRIMUI
司徒的目標很明確,就是要確定TRIMUI掌機是否有閃屏問題,而PocketGo掌機已經由司徒確定可以解決閃屏問題,只是司徒目前手上沒有PocketGo掌機,因此,重新下單,所以Q8掌機、PocektGo掌機的研究順序排位在最後
TRIMUI屏視角
TRIMUI大小比較
TRIMUI拆機
磨掉型號的IC(F1C200S)、MX35LF1GE4AB-241
INANBO-T20CR6I-V20 2.0" IPS 320x240
离线
目前司徒的TRIMUI掌機是無法進入系統的,其實更正確的說,應該是司徒把它搞掛了~司徒嘗試使用官方建議方式,安裝燒錄軟體進行燒錄,可惜,司徒一直無法燒錄成功,於是,司徒心想,那就寫一個Bootloadert程式,用來把官方固件寫回NAND Flash就好,但是,司徒看了一下官方固件,發現格式怪怪的,於是開始挖掘這口乾枯的深井....
Ref:
https://github.com/Ithamar/awutils
https://stackoverflow.com/questions/48872746/what-is-an-imagewty-firmware-format
官方燒錄檔案 trimui_model_S_dark_V0.105_en.img
$ xxd trimui_model_S_dark_V0.105_en.img | head
00000000: 494d 4147 4557 5459 0003 0000 6000 0000 IMAGEWTY....`...
00000010: 0000 d004 3402 1000 00c8 5606 0000 0000 ....4.....V.....
00000020: 0004 0000 3412 0000 4387 0000 0001 0000 ....4...C.......
00000030: 0001 0000 0100 0000 0004 0000 1c00 0000 ................
00000040: 0004 0000 0000 0000 0000 0000 0000 0000 ................
00000050: 0000 0000 0000 0000 0000 0000 0000 0000 ................
00000060: 00c1 8449 10d9 a471 4011 e4b9 9069 4421 ...I...q@....iD!
00000070: 00e1 c4a9 9079 6451 4031 2419 1009 0401 .....ydQ@1$.....
00000080: 0001 0409 1019 2431 4051 6479 90a9 c4e1 ......$1@Qdy....
00000090: 0021 4469 90b9 e411 4071 a4d9 1049 84c1 .!Di....@q...I..
官方固件是IMAGEWTY格式,於是司徒找到awutils工具,可以用來拆解
$ cd
$ git clone https://github.com/Ithamar/awutils
$ cd awutils
$ gcc parsecfg.c twofish.c rc6.c awimage.c -o awimage -I.
解開 trimui_model_S_dark_V0.105_en.img
$ ./awimage ../trimui_model_S_dark_V0.105_en.img
./awimage: unpacking ../trimui_model_S_dark_V0.105_en.img to ../trimui_model_S_dark_V0.105_en.img.dump
Extracting: COMMON SYS_CONFIG100000 (45841, 45856)
Extracting: COMMON SYS_CONFIG_BIN00 (28672, 28672)
Extracting: COMMON SPLIT_0000000000 (512, 512)
Extracting: COMMON SYS_CONFIG000000 (3119, 3120)
Extracting: COMMON DTB_CONFIG000000 (50176, 50176)
Extracting: BOOT BOOT0_0000000000 (16384, 16384)
Extracting: 12345678 1234567890BOOT_0 (32768, 32768)
Extracting: 12345678 UBOOT_0000000000 (671744, 671744)
Extracting: 12345678 TOC1_00000000000 (8, 16)
Extracting: 12345678 TOC0_00000000000 (8, 16)
Extracting: FES FES_1-0000000000 (11648, 11648)
Extracting: 12345678 BOOTPKG-00000000 (753664, 753664)
Extracting: PXTOOLSB XXXXXXXXXXXXXXXX (147968, 147968)
Extracting: UPFLYTLS XXXXXXXXXXXXXXXX (165019, 165024)
Extracting: UPFLTL32 XXXXXXXXXXXXXXXX (150847, 150848)
Extracting: 12345678 1234567890CARDTL (73216, 73216)
Extracting: 12345678 1234567890SCRIPT (1758, 1760)
Extracting: 12345678 1234567890___MBR (65536, 65536)
Extracting: 12345678 1234567890DLINFO (16384, 16384)
Extracting: 12345678 1234567890ARISC (15, 16)
Extracting: RFSFAT16 BOOTLOGO_FEX0000 (153738, 153744)
Extracting: RFSFAT16 VBOOTLOGO_FEX000 (4, 16)
Extracting: RFSFAT16 ENV_FEX000000000 (131072, 131072)
Extracting: RFSFAT16 VENV_FEX00000000 (4, 16)
Extracting: RFSFAT16 BOOT_FEX00000000 (3124088, 3124096)
Extracting: RFSFAT16 VBOOT_FEX0000000 (4, 16)
Extracting: RFSFAT16 ROOTFS_FEX000000 (100663296, 100663296)
Extracting: RFSFAT16 VROOTFS_FEX00000 (4, 16)
結果竟然不小心發現了 uImage 和 DTB,哈~感謝老天的恩賜!
$ file * | grep -i Linux
RFSFAT16_BOOT_FEX00000000: u-boot legacy uImage, ARM OpenWrt Linux-3.10.65, Linux/ARM, OS Kernel Image (Not compressed), 3124024 bytes, Thu Jan 1 00:00:00 1970, Load Address: 0x80008000, Entry Point: 0x80008000, Header CRC: 0x1877E4E2, Data CRC: 0x8DD5320A
RFSFAT16_ROOTFS_FEX000000: Linux rev 1.0 ext2 filesystem data, UUID=57f8f4bc-abf4-655f-bf67-946fc0f9f25b (extents) (large files)
$ strings RFSFAT16_BOOT_FEX00000000 | grep Linux
ARM OpenWrt Linux-3.10.65
Uncompressing Linux...
Linux Documentah
Linux
OpenWRT 3.10.65 ? 真假,哈~
提取 zImage
$ dd if=RFSFAT16_BOOT_FEX00000000 of=zImage bs=1 skip=64
3124024+0 records in
3124024+0 records out
3124024 bytes (3.1 MB, 3.0 MiB) copied, 5.43237 s, 575 kB/s
$ file zImage
zImage: Linux kernel ARM boot executable zImage (little-endian)
這個zImage似乎有點怪怪的,因為並沒有找到gzip的Header
接著看一下DTB
$ file "COMMON _DTB_CONFIG000000"
COMMON _DTB_CONFIG000000: Device Tree Blob version 17, size=45683, boot CPU=0, string block size=7371, DT structure block size=38240
$ cp "COMMON _DTB_CONFIG000000" dtb
$ dtc -I dtb -O dts -f dtb -o trimui.dts
$ vim trimui.dts
lcd0@0 {
allwinner,pins = "PD3\0PD4\0PD5\0PD6\0PD7\0PD8\0PD18\0PD20\0PD21";
allwinner,function = "lcd0";
allwinner,pname = "lcdd5\0lcdd6\0lcdd7\0lcdd10\0lcdd11\0lcdd12\0lcdclk\0lcdhsync\0lcdvsync";
sdc0@0 {
allwinner,pins = "PF0\0PF1\0PF2\0PF3\0PF4\0PF5";
lcd0@01c0c000 {
lcd_x = < 0x140 >;
lcd_y = < 0xf0 >;
lcd_width = < 0x32 >;
lcd_height = < 0x25 >;
lcd_pwm_used = < 0x01 >;
lcd_pwm_ch = < 0x01 >;
lcd_hbp = < 0x26 >;
lcd_ht = < 0x465 >;
lcd_hspw = < 0x12 >;
lcd_vbp = < 0x06 >;
lcd_vt = < 0x11e >;
lcd_vspw = < 0x04 >;
lcd_cpu_if = < 0x00 >;
keyboard {
compatible = "allwinner,keyboard_2000mv";
chosen {
bootargs = "earlyprintk=sunxi-uart,0x01c25000 loglevel=8 initcall_debug=1 console=ttyS0 init=/init";
lcd_cpu_if = < 0x00 >,不是CPU屏?哈~有趣有趣,司徒越來越激情了~哈
离线
台灣!真高興能夠在此遇到~
能夠幫我一個忙嗎?把這個fc300_ips_dump.img.7z解壓縮後,寫到MicroSD,然後插入你的機器,開機後會黑屏,然後開始dump spi flash,大約五分鐘後,屏的背光會開始閃爍,此時,代表完成dump,關機後,把MicroSD裡面的v1com.img傳給我,感謝~
https://github.com/steward-fu/fc3000/releases/download/v1.0/fc300_ips_dump.img.7z
离线
如果有時間,可以在幫忙測試一下這一版嗎?
https://github.com/steward-fu/fc3000/releases/download/v1.0/ips_fc3000_dump_0627_1.img.7z
步驟:
1. 解壓縮後,寫到MicroSD
2. 插入MicroSD到IPS FC3000
3. 上電 (黑屏)
4. 開始Dump Stock ROM (還是黑屏狀態)
5. 五分鐘後,背光要開始閃爍
6. 關機,把v1rom.img給我
离线
感謝你的資訊,你給的資訊對我有幫助,但是有限~由於TRIMUI內核沒有公開,有一些細節地方會有地雷,我不想踩第二次,這也是為何我研究東西,通常都是從頭做起的原因,對於核心掌握度不高的東西,我一般不會玩太深,不是我要排擠他人,是因為我真的踩過太多雷了,當遇到閃屏、聲音延遲、按鍵鬼鍵或延遲、記憶體無法映射、屏掃描是否足夠60FPS...等等問題,在未知的細節去猜問題,那就真的...,不過,如果興趣在於移植,那倒也無所謂,可惜我目前不是,哈,感謝你的資訊~
离线
哈~正所謂有志者、事竟成,總有一天會迴光返照~
司徒一直苦惱,為何我的TRIMUI掌機就是無法使用PhoenixSuit軟件燒錄,終於,司徒突然領悟了~原來我當初焊接使用的是芒果派的NAND Flash,並不是原廠的NAND Flash(MX35LF1GE4AB-241),於是,司徒購買新的焊接回去後,終於可以使用PhoenixSuit軟件燒錄了~原來司徒命中帶屎,哈
接著,司徒就想再度看看許久未見的TRIMUI系統,結果UART Login需要密碼,這...,擺明叫司徒搞你,司徒真是不得已...
updater
#!/bin/sh
dir=`dirname $0`
cd $dir
mount -o remount,rw /
cp inittab /etc/
sync
reboot
inittab
null::sysinit:/bin/mount -o remount,rw /
null::sysinit:/bin/mkdir -p /dev/pts
null::sysinit:/bin/mount -a
::sysinit:/etc/init.d/rcS boot
/dev/console::respawn:-/bin/sh
::ctrlaltdel:/sbin/reboot
null::shutdown:/bin/umount -a -r
打包成TrimuiUpdateV9999_root_login.zip
$ zip TrimuiUpdateV9999_root_login.zip updater inittab
接著刷入TrimuiUpdateV9999_root_login.zip,開機就會以root帳號登入(baudrate: 115200bps)
BusyBox v1.27.2 () built-in shell (ash)
_____ _ __ _
|_ _||_| ___ _ _ | | |_| ___ _ _ _ _
| | _ | || | | |__ | || || | ||_'_|
| | | || | || _ | |_____||_||_|_||___||_,_|
|_| |_||_|_||_|_| Tina is Based on OpenWrt!
----------------------------------------------
Tina Linux (Neptune, 5C1C9C53)
----------------------------------------------
root@Linux:/#
原來是全志的Tina Linux,哈~難怪我要不到內核代碼
接著司徒想要測試一下閃屏問題,確定一下TRIMUI是否會閃屏,司徒從ext2 rootfs找到官方閃屏測試檔案lcdteartest
root@Linux:/usr/trimui/bin# ./lcdteartest 60
================= lcd_fb_init ===============
fb width:320 height:240 bpp:16
render fps 63
render fps 62
render fps 62
render fps 62
render fps 62
render fps 62
render fps 62
render fps 62
render fps 62
不過,官方測試是白色區塊位移,一般司徒不這樣測試,司徒要整面畫面RGB依序切換,才能看出所有像素點是否有被重疊,因此,司徒想到稍早有位熱心朋友告知GMenuNx的消息,於是,司徒找了一下GMenuNx的toolchain,想要自己寫一個測試閃屏程式,但是,這個toolchain並沒有被釋出?這...真是難為司徒了~
离线
好吧~接下來的話,說出來可能會很傷人,但是,司徒最初只是想知道目前TRIMUI掌機是否會有閃屏問題,沒有要得罪人的意思,請不要誤會我~為何司徒想要知道是否有閃屏的問題呢?因為閃屏是決定這台掌機是否可以拿來玩遊戲的衡量指標,所以,結論:目前TRIMUI(trimui_model_S_dark_V0.105_en.img)還是存在閃屏問題,過程如下說明
司徒找了許久,還是沒有找到GMenuNX的toolchain,當然TRIMUI的toolchain更不用說,一定沒有,司徒真好奇,那些外國人怎麼拿到的,不過,那也沒關係,反正,那也只是Link問題而已,小問題,於是,司徒寫了一個閃屏測試程式
#include <stdio.h>
#include <stdlib.h>
#include <SDL.h>
int main(int argc, char** argv)
{
uint32_t cnt=0;
SDL_Surface* screen=NULL;
uint32_t col[]={0xf800, 0x7e0, 0x1f};
SDL_Init(SDL_INIT_VIDEO);
screen = SDL_SetVideoMode(320, 240, 16, SDL_SWSURFACE | SDL_DOUBLEBUF);
while(cnt < 600){
cnt+= 1;
SDL_FillRect(screen, &screen->clip_rect, col[cnt % 3]);
SDL_Flip(screen);
SDL_Delay(1000 / 60);
}
SDL_Quit();
return 0;
}
updater
#!/bin/sh
dir=`dirname $0`
cd $dir
killall updateui
killall keymon
LD_LIBRARY_PATH=/usr/trimui/lib ./main
編譯
$ arm-linux-gnueabi-gcc main.c -o main -I/usr/include/SDL /xxx/usr/trimui/lib/libSDL-1.2.so.0
P.S. libSDL-1.2.so.0是從機器複製出來的
打包
$ zip TrimuiUpdateV9999_tearing.zip updater main
https://github.com/steward-fu/trimui/releases/download/v1.0/TrimuiUpdateV9999_tearing.zip
刷入TrimuiUpdateV9999_tearing.zip就可以測試閃屏問題,可以看出目前TRIMUI(trimui_model_S_dark_V0.105_en.img)還是存在閃屏問題,使用者可以拿司徒的測試包測試,看看你是否可以察覺出來
從上面的測試,可以發現在單一畫面顯示時,出現兩個畫面,一個是目前,另外一個則是上一個畫面,這種現象就是閃屏,為何會有這樣的現象呢?司徒從幾個角度說明一下:
上層應用程式(或模擬器)
模擬器一般顯示設定在60fps,因此,模擬器會保證畫完一個畫面後,往驅動程式傳送,所以傳送當下是保證是一個單一畫面,接著第二個畫面...依此類推
中層驅動程式
驅動程式收到模擬器的畫面資料後,會往硬件(屏)送出,但是,如果沒有Double Buffer,在往硬件傳送中,會被模擬器再次傳送的資料覆蓋,導致兩個畫面重疊
下層硬體顯示
CPU屏:由LCD Driver負責畫面更新,一般不會有Double RAM,因此,會靠TE腳位通知驅動程式,目前在掃屏,請不要傳送資料給我,等空閒在送資料
RGB屏:如果是直寫RAM,那掃屏由驅動程式負責,這一般不會有問題,有問題的是,透過RAM掃屏,那一樣會有覆蓋問題
從這個測試結果可以看到畫面是水平分割,而非斜角,水平分割一般是驅動程式處理的問題,而斜角一般則是硬件刷新同步問題,驅動程式在處理PAN_DISPLAY跟中斷時,一般考慮由中斷優先取得,但是,從結果看來,缺少判斷PAN_DISPLAY是否更新完畢,這是司徒猜測的問題,因為司徒手上也沒有驅動程式可以參考修改,不過,你現在給我內核代碼,我也不想要了~哈
有Double Buffer就有Triple Buffer或者更多,不過,一般是用於加速,因為SDL在做SDL_Flip時,是靠複製資料給驅動程式,這個複製(320*240*2)是很耗時的,因此,像PCSX-ReARMed就是用DMA Mapping方式,省掉複製的時間,WIZ的PCSX就是這樣加速的,司徒當初幫RG、小橫米移植PS1模擬器時,也是這樣加速PS1模擬效能
离线
ips_fc3000_dump_0627_1.img 燒入測試狀況和上次一樣,開機後背光沒亮,最後背光也沒有閃爍,完全黑屏,一樣等到十分鐘後才關機取出dump rom
dump rom 檔案如附件,請查收
不好意思,我漏看訊息,後來老外有幫忙提取,感謝你的測試
离线
@kofjin @除恶务尽
恭喜買到還不錯的機器,如果有發現IPS FC3000機器,麻煩告知司徒,司徒也希望可以移植Linux系統到IPS FC3000
@george5497
哈,真是很高興可以買到你的機器,丁果320 2P功能,我還記得,等回頭整理丁果A320,在一起製作了~
秉持熱誠研究開源掌機,能走多遠,但看天意了~
感謝每一位支持司徒的朋友,小弟在此至上謝意
接著,司徒來談談TRIMUI掌機,TRIMUI是唯一可以跟小橫米對打的低價優質機種,小橫米經過幾代演進,硬件已經達到可玩的程度,TRIMUI也很接近,只可惜很多資料並沒有公佈,至於反骨仔的機器,那種垃圾就不需要比較了~直接歸類到Q8掌機等級去,所以,司徒還是很看好TRIMUI掌機,哈,相信大家應該是看不出來,司徒正為不小心把閃屏問題說出來而圓謊,哈~
昨晚在夢境之中,司徒竟然看到TRIMUI在哭泣,一個人默默坐在河邊,這場景...,讓司徒真是相當不捨,為了補償,司徒最後決定移植仙劍奇俠傳給TRIMUI掌機,但是,司徒手上並沒有TRIMUI toolchain可以做移植編譯,這...,真是難為司徒了~
目前TRIMUI只有三款移植遊戲,司徒查了一下才發現是Hardcode在程式裡面
Binary Patch
這才發現顯示驅動不支援8Bits顯示,只好關掉仙劍的淡化效果...
安裝包
https://github.com/steward-fu/trimui/releases/download/v1.0/trimui_sdlpal_20210628.7z
下載安裝包並解壓縮到MicroSD,接著安裝TrimuiUpdateV20210628_sdlpal.zip,安裝後系統自動重新啟動
進入其他遊戲就可以看到仙劍奇俠傳
仙劍奇俠傳 四合一版
其實,司徒一開始就說沒有內核代碼,移植會有很多問題,像是很多不支援的配置,或者按鍵鍵位亂配置,當然更多問題是,你永遠不知道還有多少地雷,只可惜大家只想到我就是不要給別人抄襲~
离线
@shauninman
ha ha, it is amazing ! amazing !
firstly, thanks for your information, it helps me a lot
based on your link, now, I can build trimui toolchain from scratch and the application built from my toolchain works on trimui handheld
amazing !
since the GmenuNX source are put on DropBox, it might be broken soon
I will put them in my gtihub, if it is not permitted to do this, please tell me, thanks
honestly, it is very weird because nothing can be found from google by using keyword: trimui toolchain, even though trimui-toolchain, ha ha
anyway, it helps me a lot to port some emulators or games into trimui handheld later
thanks for your information
but I am very curious why do you know such more detailed configuration in buildroot ? ha ha, even it is glibc library ? ha
感謝許多朋友幫忙傳遞司徒找不到trimui toolchain的訊息, 哈, 小弟在此感謝啦!
离线
@fanelwin
不客氣
@xboot
我目前沒有LCD初始化代碼,我正在用邏輯分析儀抓取,我目前有的資訊如下
我使用電錶量測出來的腳位
LCD TE NC
LCD RESET 4.7K RC
LCD K N-CHANNEL MOSFET D (AO3416 AE9T)
LCD A 90416 PIN-6
LCD D0 PD3
LCD D1 PD4
LCD D2 PD5
LCD D3 PD6
LCD D4 PD7
LCD D5 PD8
LCD CS PD11
LCD SCL PD9
LCD DCLK PD18
LCD HS PD20
LCD VS PD21
LCD SDA PD10
离线
@xboot
哈,真想不到,這鬼東西竟然有這一款相當特別的屏~
昨晚司徒在夢境之中,又再度看到TRIMUI歡樂的模樣,司徒心中真是相當高興,只是司徒不好意思跟它說,那是你的最後一餐,記得吃飽上路...,於是,手術台上...
LCD腳位
焊接
山寨邏輯分析儀出場...
取得的命令
0x7F
0x77
0x1B
0xA0
0x1D
0xAA
0x42
0x82
0x43
0xFD
0x43
0xBC
0x44
0x85
0x45
0x90
0x45
0xC0
0x46
0x9D
0x47
0xE7
0x76
0x99
0x81
0xA6
0x4C
0x9F
0x4E
0xA5
0x4C
0x9F
0x4E
0xA5
0x4D
0xAA
0x74
0x88
0x80
0x7F
0xB1
0x61
0x90
0x62
0x81
0x64
0x85
0x1D
0xAA
0x42
0xB0
0x45
0xA0
0x7B
0xE3
0x58
0xB1
0x5A
0x81
0x81
0x8A
0x78
0xA5
0x88
0x85
0x85
0x93
0x9C
0x79
0xA5
0x88
0x85
0x85
0x93
0x9C
0x78
0xA8
0xC7
0xD7
0x9D
0x9F
0xBF
0x79
0xA8
0xC7
0xD7
0x9D
0x9F
0xBF
0x5D
0x85
0x1A
0x80
0x10
0x7F
0x77
0x08
0x14
0x16
第一個指令是0x7F,於是,司徒翻了一下手冊,這...,我怎麼沒有看到0x7F的說明,難道是國王的初始化命令?有智慧才可以看到?看來司徒...沒有智慧~
离线
@xboot
閣下果然是有智慧的人才~遵照你的方式,我讓分析儀再往後取一位,把8Bits改成9Bits,就對了,感謝啦~
重新解析後的命令,最後是0x29 0x2c命令,這個就很熟悉了~
0x00FE
0x00EF
0x0036
0x0140
0x003A
0x0155
0x0084
0x0104
0x0086
0x01FB
0x0087
0x0179
0x0089
0x010B
0x008A
0x0120
0x008B
0x0180
0x008D
0x013B
0x008E
0x01CF
0x00EC
0x0133
0x0102
0x014C
0x0098
0x013E
0x009C
0x014B
0x0099
0x013E
0x009D
0x014B
0x009B
0x0155
0x00E8
0x0111
0x0100
0x00FF
0x0162
0x00C3
0x0120
0x00C4
0x0103
0x00C9
0x010A
0x003A
0x0155
0x0084
0x0161
0x008A
0x0140
0x00F6
0x01C7
0x00B0
0x0163
0x00B5
0x0102
0x0102
0x0114
0x00F0
0x014A
0x0110
0x010A
0x010A
0x0126
0x0139
0x00F2
0x014A
0x0110
0x010A
0x010A
0x0126
0x0139
0x00F1
0x0150
0x018F
0x01AF
0x013B
0x013F
0x017F
0x00F3
0x0150
0x018F
0x01AF
0x013B
0x013F
0x017F
0x00BA
0x010A
0x0035
0x0100
0x0021
0x00FE
0x00EE
0x0011
0x0029
0x002C
离线
@shauninman
got it, thanks to share your experiences to me
looking at the results, you have find out all of information or settings you want from trimui handheld already.
it is highly recommended to create a new rootfs based your applications, not just improve original trimui system.
because I noticed that it has performances drop issue in original trimui system when you play your lovely game.
so, if you keep to improve it, I guess some unexpected issues might come out soon.
so, tweaking existing pseudo_init file in nandd and then boot from usb or microsd (from your new rootfs) is good choice.
but it depends on you, anyway, thanks all of your works and the others contributed to trimui-toolchain project, Thanks
离线
俗語說的好:麻雀雖小、五臟俱全,這或許就是XBOOT的最佳寫照,於是,司徒就先用XBOOT來測試一下,如果可以把屏點亮,那TRIMUI掌機距離備戰狀態不遠已!
xboot/src/arch/arm32/mach-f1c500s/driver/fb-f1c500s.c
/*
* driver/fb-f1c500s.c
*
* Copyright(c) 2007-2021 Jianjun Jiang <8192542@qq.com>
* Official site: http://xboot.org
* Mobile phone: +86-18665388956
* QQ: 8192542
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
*/
#include <xboot.h>
#include <dma/dma.h>
#include <clk/clk.h>
#include <reset/reset.h>
#include <gpio/gpio.h>
#include <led/led.h>
#include <interrupt/interrupt.h>
#include <framebuffer/framebuffer.h>
#include <f1c500s-gpio.h>
#include <f1c500s/reg-tcon.h>
#include <f1c500s/reg-debe.h>
#include <f1c500s/reg-defe.h>
#define F1C500S_GPIO_BASE (0x01c20800)
#define F1C500S_GPIOD_CFG0 ((3 * 0x24) + 0x00)
#define F1C500S_GPIOD_DATA ((3 * 0x24) + 0x10)
struct fb_f1c500s_pdata_t
{
virtual_addr_t virtdefe;
virtual_addr_t virtdebe;
virtual_addr_t virttcon;
virtual_addr_t virtgpio;
char * clkdefe;
char * clkdebe;
char * clktcon;
int rstdefe;
int rstdebe;
int rsttcon;
int width;
int height;
int pwidth;
int pheight;
int bits_per_pixel;
int bytes_per_pixel;
int pixlen;
int index;
void * vram[2];
struct region_list_t * nrl, * orl;
struct {
int pixel_clock_hz;
int h_front_porch;
int h_back_porch;
int h_sync_len;
int v_front_porch;
int v_back_porch;
int v_sync_len;
int h_sync_active;
int v_sync_active;
int den_active;
int clk_active;
} timing;
struct led_t * backlight;
int brightness;
};
static inline void spi_9bits_write(struct fb_f1c500s_pdata_t * pdat, u32_t val)
{
uint8_t cnt=0;
uint32_t tmp=read32(pdat->virtgpio + F1C500S_GPIOD_DATA);
tmp&= ~(1 << 11);
write32(pdat->virtgpio + F1C500S_GPIOD_DATA, tmp);
for(cnt=0; cnt<9; cnt++){
tmp&= ~(1 << 10);
if(val & 0x100){
tmp|= (1 << 10);
}
val<<= 1;
tmp&= ~(1 << 9);
write32(pdat->virtgpio + F1C500S_GPIOD_DATA, tmp);
tmp|= (1 << 9);
write32(pdat->virtgpio + F1C500S_GPIOD_DATA, tmp);
}
tmp|= (1 << 11);
write32(pdat->virtgpio + F1C500S_GPIOD_DATA, tmp);
}
static inline void gc9308_init(struct fb_f1c500s_pdata_t * pdat)
{
spi_9bits_write(pdat, 0x00fe);
spi_9bits_write(pdat, 0x00ef);
spi_9bits_write(pdat, 0x0036);
spi_9bits_write(pdat, 0x0140);
spi_9bits_write(pdat, 0x003a);
spi_9bits_write(pdat, 0x0155);
spi_9bits_write(pdat, 0x0084);
spi_9bits_write(pdat, 0x0104);
spi_9bits_write(pdat, 0x0086);
spi_9bits_write(pdat, 0x01fb);
spi_9bits_write(pdat, 0x0087);
spi_9bits_write(pdat, 0x0179);
spi_9bits_write(pdat, 0x0089);
spi_9bits_write(pdat, 0x010b);
spi_9bits_write(pdat, 0x008a);
spi_9bits_write(pdat, 0x0120);
spi_9bits_write(pdat, 0x008b);
spi_9bits_write(pdat, 0x0180);
spi_9bits_write(pdat, 0x008d);
spi_9bits_write(pdat, 0x013b);
spi_9bits_write(pdat, 0x008e);
spi_9bits_write(pdat, 0x01cf);
spi_9bits_write(pdat, 0x00ec);
spi_9bits_write(pdat, 0x0133);
spi_9bits_write(pdat, 0x0102);
spi_9bits_write(pdat, 0x014c);
spi_9bits_write(pdat, 0x0098);
spi_9bits_write(pdat, 0x013e);
spi_9bits_write(pdat, 0x009c);
spi_9bits_write(pdat, 0x014b);
spi_9bits_write(pdat, 0x0099);
spi_9bits_write(pdat, 0x013e);
spi_9bits_write(pdat, 0x009d);
spi_9bits_write(pdat, 0x014b);
spi_9bits_write(pdat, 0x009b);
spi_9bits_write(pdat, 0x0155);
spi_9bits_write(pdat, 0x00e8);
spi_9bits_write(pdat, 0x0111);
spi_9bits_write(pdat, 0x0100);
spi_9bits_write(pdat, 0x00ff);
spi_9bits_write(pdat, 0x0162);
spi_9bits_write(pdat, 0x00c3);
spi_9bits_write(pdat, 0x0120);
spi_9bits_write(pdat, 0x00c4);
spi_9bits_write(pdat, 0x0103);
spi_9bits_write(pdat, 0x00c9);
spi_9bits_write(pdat, 0x010a);
spi_9bits_write(pdat, 0x003a);
spi_9bits_write(pdat, 0x0155);
spi_9bits_write(pdat, 0x0084);
spi_9bits_write(pdat, 0x0161);
spi_9bits_write(pdat, 0x008a);
spi_9bits_write(pdat, 0x0140);
spi_9bits_write(pdat, 0x00f6);
spi_9bits_write(pdat, 0x01c7);
spi_9bits_write(pdat, 0x00b0);
spi_9bits_write(pdat, 0x0163);
spi_9bits_write(pdat, 0x00b5);
spi_9bits_write(pdat, 0x0102);
spi_9bits_write(pdat, 0x0102);
spi_9bits_write(pdat, 0x0114);
spi_9bits_write(pdat, 0x00f0);
spi_9bits_write(pdat, 0x014a);
spi_9bits_write(pdat, 0x0110);
spi_9bits_write(pdat, 0x010a);
spi_9bits_write(pdat, 0x010a);
spi_9bits_write(pdat, 0x0126);
spi_9bits_write(pdat, 0x0139);
spi_9bits_write(pdat, 0x00f2);
spi_9bits_write(pdat, 0x014a);
spi_9bits_write(pdat, 0x0110);
spi_9bits_write(pdat, 0x010a);
spi_9bits_write(pdat, 0x010a);
spi_9bits_write(pdat, 0x0126);
spi_9bits_write(pdat, 0x0139);
spi_9bits_write(pdat, 0x00f1);
spi_9bits_write(pdat, 0x0150);
spi_9bits_write(pdat, 0x018f);
spi_9bits_write(pdat, 0x01af);
spi_9bits_write(pdat, 0x013b);
spi_9bits_write(pdat, 0x013f);
spi_9bits_write(pdat, 0x017f);
spi_9bits_write(pdat, 0x00f3);
spi_9bits_write(pdat, 0x0150);
spi_9bits_write(pdat, 0x018f);
spi_9bits_write(pdat, 0x01af);
spi_9bits_write(pdat, 0x013b);
spi_9bits_write(pdat, 0x013f);
spi_9bits_write(pdat, 0x017f);
spi_9bits_write(pdat, 0x00ba);
spi_9bits_write(pdat, 0x010a);
spi_9bits_write(pdat, 0x0035);
spi_9bits_write(pdat, 0x0100);
spi_9bits_write(pdat, 0x0021);
spi_9bits_write(pdat, 0x00fe);
spi_9bits_write(pdat, 0x00ee);
spi_9bits_write(pdat, 0x0011);
spi_9bits_write(pdat, 0x0029);
spi_9bits_write(pdat, 0x002c);
}
static inline void r61520_write(struct fb_f1c500s_pdata_t * pdat, u32_t isdat, u32_t val)
{
u32_t tmp;
tmp = (val & 0x00ff) << 1;
tmp |= (val & 0xff00) << 2;
tmp |= isdat ? 0x80000 : 0;
tmp |= 0x100000;
write32(pdat->virtgpio + F1C500S_GPIOD_DATA, tmp);
tmp |= 0x40000;
write32(pdat->virtgpio + F1C500S_GPIOD_DATA, tmp);
}
static void r61520_write_cmd(struct fb_f1c500s_pdata_t * pdat, u32_t val)
{
r61520_write(pdat, 0, val);
}
static void r61520_write_dat(struct fb_f1c500s_pdata_t * pdat, u32_t val)
{
r61520_write(pdat, 1, val);
}
static inline void r61520_init(struct fb_f1c500s_pdata_t * pdat)
{
r61520_write_cmd(pdat, 0xb0);
r61520_write_dat(pdat, 0x00);
r61520_write_cmd(pdat, 0xb1);
r61520_write_dat(pdat, 0x00);
r61520_write_cmd(pdat, 0xb3);
r61520_write_dat(pdat, 0x02);
r61520_write_dat(pdat, 0x00);
r61520_write_dat(pdat, 0x00);
r61520_write_dat(pdat, 0x00);
r61520_write_cmd(pdat, 0xb4);
r61520_write_dat(pdat, 0x00);
r61520_write_cmd(pdat, 0xc0);
r61520_write_dat(pdat, 0x07);
r61520_write_dat(pdat, 0x4f);
r61520_write_dat(pdat, 0x00);
r61520_write_dat(pdat, 0x00);
r61520_write_dat(pdat, 0x00);
r61520_write_dat(pdat, 0x00);
r61520_write_dat(pdat, 0x01);
r61520_write_dat(pdat, 0x33);
r61520_write_cmd(pdat, 0xc1);
r61520_write_dat(pdat, 0x01);
r61520_write_dat(pdat, 0x00);
r61520_write_dat(pdat, 0x1a);
r61520_write_dat(pdat, 0x08);
r61520_write_dat(pdat, 0x08);
r61520_write_cmd(pdat, 0xc3);
r61520_write_dat(pdat, 0x01);
r61520_write_dat(pdat, 0x00);
r61520_write_dat(pdat, 0x1a);
r61520_write_dat(pdat, 0x08);
r61520_write_dat(pdat, 0x08);
r61520_write_cmd(pdat, 0xc4);
r61520_write_dat(pdat, 0x11);
r61520_write_dat(pdat, 0x01);
r61520_write_dat(pdat, 0x43);
r61520_write_dat(pdat, 0x01);
r61520_write_cmd(pdat, 0xc8);
r61520_write_dat(pdat, 0x00);
r61520_write_dat(pdat, 0x0a);
r61520_write_dat(pdat, 0x08);
r61520_write_dat(pdat, 0x8a);
r61520_write_dat(pdat, 0x08);
r61520_write_dat(pdat, 0x09);
r61520_write_dat(pdat, 0x05);
r61520_write_dat(pdat, 0x10);
r61520_write_dat(pdat, 0x00);
r61520_write_dat(pdat, 0x23);
r61520_write_dat(pdat, 0x10);
r61520_write_dat(pdat, 0x05);
r61520_write_dat(pdat, 0x05);
r61520_write_dat(pdat, 0x60);
r61520_write_dat(pdat, 0x0a);
r61520_write_dat(pdat, 0x08);
r61520_write_dat(pdat, 0x05);
r61520_write_dat(pdat, 0x00);
r61520_write_dat(pdat, 0x10);
r61520_write_dat(pdat, 0x00);
r61520_write_cmd(pdat, 0xc9);
r61520_write_dat(pdat, 0x00);
r61520_write_dat(pdat, 0x0a);
r61520_write_dat(pdat, 0x08);
r61520_write_dat(pdat, 0x8a);
r61520_write_dat(pdat, 0x08);
r61520_write_dat(pdat, 0x09);
r61520_write_dat(pdat, 0x05);
r61520_write_dat(pdat, 0x10);
r61520_write_dat(pdat, 0x00);
r61520_write_dat(pdat, 0x23);
r61520_write_dat(pdat, 0x10);
r61520_write_dat(pdat, 0x05);
r61520_write_dat(pdat, 0x09);
r61520_write_dat(pdat, 0x88);
r61520_write_dat(pdat, 0x0a);
r61520_write_dat(pdat, 0x08);
r61520_write_dat(pdat, 0x0a);
r61520_write_dat(pdat, 0x00);
r61520_write_dat(pdat, 0x23);
r61520_write_dat(pdat, 0x00);
r61520_write_cmd(pdat, 0xca);
r61520_write_dat(pdat, 0x00);
r61520_write_dat(pdat, 0x0a);
r61520_write_dat(pdat, 0x08);
r61520_write_dat(pdat, 0x8a);
r61520_write_dat(pdat, 0x08);
r61520_write_dat(pdat, 0x09);
r61520_write_dat(pdat, 0x05);
r61520_write_dat(pdat, 0x10);
r61520_write_dat(pdat, 0x00);
r61520_write_dat(pdat, 0x23);
r61520_write_dat(pdat, 0x10);
r61520_write_dat(pdat, 0x05);
r61520_write_dat(pdat, 0x09);
r61520_write_dat(pdat, 0x88);
r61520_write_dat(pdat, 0x0a);
r61520_write_dat(pdat, 0x08);
r61520_write_dat(pdat, 0x0a);
r61520_write_dat(pdat, 0x00);
r61520_write_dat(pdat, 0x23);
r61520_write_dat(pdat, 0x00);
r61520_write_cmd(pdat, 0xd0);
r61520_write_dat(pdat, 0x07);
r61520_write_dat(pdat, 0xc6);
r61520_write_dat(pdat, 0xdc);
r61520_write_cmd(pdat, 0xd1);
r61520_write_dat(pdat, 0x54);
r61520_write_dat(pdat, 0x0d);
r61520_write_dat(pdat, 0x02);
r61520_write_cmd(pdat, 0xd2);
r61520_write_dat(pdat, 0x63);
r61520_write_dat(pdat, 0x24);
r61520_write_cmd(pdat, 0xd4);
r61520_write_dat(pdat, 0x63);
r61520_write_dat(pdat, 0x24);
r61520_write_cmd(pdat, 0xd8);
r61520_write_dat(pdat, 0x07);
r61520_write_dat(pdat, 0x07);
r61520_write_cmd(pdat, 0xe0);
r61520_write_dat(pdat, 0x00);
r61520_write_dat(pdat, 0x00);
r61520_write_cmd(pdat, 0x13);
r61520_write_cmd(pdat, 0x20);
r61520_write_cmd(pdat, 0x35);
r61520_write_dat(pdat, 0x00);
r61520_write_cmd(pdat, 0x44);
r61520_write_dat(pdat, 0x00);
r61520_write_dat(pdat, 0x30);
r61520_write_cmd(pdat, 0x36);
r61520_write_dat(pdat, 0xe0);
r61520_write_cmd(pdat, 0x3a);
r61520_write_dat(pdat, 0x55);
r61520_write_cmd(pdat, 0x2a);
r61520_write_dat(pdat, 0x00);
r61520_write_dat(pdat, 0x00);
r61520_write_dat(pdat, 0x01);
r61520_write_dat(pdat, 0x3f);
r61520_write_cmd(pdat, 0x2b);
r61520_write_dat(pdat, 0x00);
r61520_write_dat(pdat, 0x00);
r61520_write_dat(pdat, 0x00);
r61520_write_dat(pdat, 0xef);
r61520_write_cmd(pdat, 0x11);
r61520_write_cmd(pdat, 0x29);
r61520_write_cmd(pdat, 0x2c);
}
static inline void f1c500s_debe_set_mode(struct fb_f1c500s_pdata_t * pdat)
{
struct f1c500s_debe_reg_t * debe = (struct f1c500s_debe_reg_t *)(pdat->virtdebe);
u32_t val;
val = read32((virtual_addr_t)&debe->mode);
val |= (1 << 0);
write32((virtual_addr_t)&debe->mode, val);
write32((virtual_addr_t)&debe->disp_size, (((pdat->height) - 1) << 16) | (((pdat->width) - 1) << 0));
write32((virtual_addr_t)&debe->layer0_size, (((pdat->height) - 1) << 16) | (((pdat->width) - 1) << 0));
write32((virtual_addr_t)&debe->layer0_stride, ((pdat->width) << 5));
write32((virtual_addr_t)&debe->layer0_addr_low32b, (u32_t)(pdat->vram[pdat->index]) << 3);
write32((virtual_addr_t)&debe->layer0_addr_high4b, (u32_t)(pdat->vram[pdat->index]) >> 29);
write32((virtual_addr_t)&debe->layer0_attr1_ctrl, 9 << 8);
val = read32((virtual_addr_t)&debe->mode);
val |= (1 << 8);
write32((virtual_addr_t)&debe->mode, val);
val = read32((virtual_addr_t)&debe->reg_ctrl);
val |= (1 << 0);
write32((virtual_addr_t)&debe->reg_ctrl, val);
val = read32((virtual_addr_t)&debe->mode);
val |= (1 << 1);
write32((virtual_addr_t)&debe->mode, val);
}
static inline void f1c500s_debe_set_address(struct fb_f1c500s_pdata_t * pdat, void * vram)
{
struct f1c500s_debe_reg_t * debe = (struct f1c500s_debe_reg_t *)(pdat->virtdebe);
write32((virtual_addr_t)&debe->layer0_addr_low32b, (u32_t)vram << 3);
write32((virtual_addr_t)&debe->layer0_addr_high4b, (u32_t)vram >> 29);
}
static inline void f1c500s_tcon_enable(struct fb_f1c500s_pdata_t * pdat)
{
struct f1c500s_tcon_reg_t * tcon = (struct f1c500s_tcon_reg_t *)pdat->virttcon;
u32_t val;
val = read32((virtual_addr_t)&tcon->ctrl);
val |= (1 << 31);
write32((virtual_addr_t)&tcon->ctrl, val);
val = read32((virtual_addr_t)&tcon->tcon0_cpu_intf);
val |= (1 << 28);
write32((virtual_addr_t)&tcon->tcon0_cpu_intf, val);
}
static inline void f1c500s_tcon_disable(struct fb_f1c500s_pdata_t * pdat)
{
struct f1c500s_tcon_reg_t * tcon = (struct f1c500s_tcon_reg_t *)pdat->virttcon;
u32_t val;
write32((virtual_addr_t)&tcon->ctrl, 0);
write32((virtual_addr_t)&tcon->int0, 0);
val = read32((virtual_addr_t)&tcon->tcon0_dclk);
val &= ~(0xf << 28);
write32((virtual_addr_t)&tcon->tcon0_dclk, val);
write32((virtual_addr_t)&tcon->tcon0_io_tristate, 0xffffffff);
write32((virtual_addr_t)&tcon->tcon1_io_tristate, 0xffffffff);
}
static inline void f1c500s_tcon_set_mode(struct fb_f1c500s_pdata_t * pdat)
{
struct f1c500s_tcon_reg_t * tcon = (struct f1c500s_tcon_reg_t *)pdat->virttcon;
int bp, total;
u32_t val;
val = read32((virtual_addr_t)&tcon->ctrl);
val &= ~(0x1 << 0);
write32((virtual_addr_t)&tcon->ctrl, val);
val = (pdat->timing.v_front_porch + pdat->timing.v_back_porch + pdat->timing.v_sync_len);
write32((virtual_addr_t)&tcon->tcon0_ctrl, (1 << 31) | ((val & 0x1f) << 4));
val = clk_get_rate(pdat->clktcon) / pdat->timing.pixel_clock_hz;
write32((virtual_addr_t)&tcon->tcon0_dclk, (0xf << 28) | (val << 0));
write32((virtual_addr_t)&tcon->tcon0_timing_active, ((pdat->width - 1) << 16) | ((pdat->height - 1) << 0));
bp = pdat->timing.h_sync_len + pdat->timing.h_back_porch;
total = pdat->width * 3 + pdat->timing.h_front_porch + bp;
write32((virtual_addr_t)&tcon->tcon0_timing_h, ((total - 1) << 16) | ((bp - 1) << 0));
bp = pdat->timing.v_sync_len + pdat->timing.v_back_porch;
total = pdat->height + pdat->timing.v_front_porch + bp;
write32((virtual_addr_t)&tcon->tcon0_timing_v, ((total * 2) << 16) | ((bp - 1) << 0));
write32((virtual_addr_t)&tcon->tcon0_timing_sync, ((pdat->timing.h_sync_len - 1) << 16) | ((pdat->timing.v_sync_len - 1) << 0));
write32((virtual_addr_t)&tcon->tcon0_hv_intf, (1 << 31));
write32((virtual_addr_t)&tcon->tcon0_cpu_intf, 0);
write32((virtual_addr_t)&tcon->tcon0_io_polarity, (1 << 28));
write32((virtual_addr_t)&tcon->tcon0_io_tristate, 0);
}
static inline void fb_f1c500s_cfg_gpios(int base, int n, int cfg, enum gpio_pull_t pull, enum gpio_drv_t drv)
{
for(; n > 0; n--, base++)
{
gpio_set_cfg(base, cfg);
gpio_set_pull(base, pull);
gpio_set_drv(base, drv);
}
}
static inline void fb_f1c500s_init(struct fb_f1c500s_pdata_t * pdat)
{
fb_f1c500s_cfg_gpios(F1C500S_GPIOD9, 3, 1, GPIO_PULL_NONE, GPIO_DRV_STRONG);
write32(pdat->virtgpio + F1C500S_GPIOD_DATA, 0xffffffff);
//r61520_init(pdat);
gc9308_init(pdat);
fb_f1c500s_cfg_gpios(F1C500S_GPIOD1, 7, 2, GPIO_PULL_NONE, GPIO_DRV_STRONG);
fb_f1c500s_cfg_gpios(F1C500S_GPIOD10, 12, 2, GPIO_PULL_NONE, GPIO_DRV_STRONG);
f1c500s_tcon_disable(pdat);
f1c500s_debe_set_mode(pdat);
f1c500s_tcon_set_mode(pdat);
f1c500s_tcon_enable(pdat);
}
static void fb_setbl(struct framebuffer_t * fb, int brightness)
{
struct fb_f1c500s_pdata_t * pdat = (struct fb_f1c500s_pdata_t *)fb->priv;
led_set_brightness(pdat->backlight, brightness);
}
static int fb_getbl(struct framebuffer_t * fb)
{
struct fb_f1c500s_pdata_t * pdat = (struct fb_f1c500s_pdata_t *)fb->priv;
return led_get_brightness(pdat->backlight);
}
static struct surface_t * fb_create(struct framebuffer_t * fb)
{
struct fb_f1c500s_pdata_t * pdat = (struct fb_f1c500s_pdata_t *)fb->priv;
return surface_alloc(pdat->width, pdat->height, NULL);
}
static void fb_destroy(struct framebuffer_t * fb, struct surface_t * s)
{
surface_free(s);
}
static void fb_present(struct framebuffer_t * fb, struct surface_t * s, struct region_list_t * rl)
{
struct fb_f1c500s_pdata_t * pdat = (struct fb_f1c500s_pdata_t *)fb->priv;
struct region_list_t * nrl = pdat->nrl;
region_list_clear(nrl);
region_list_merge(nrl, pdat->orl);
region_list_merge(nrl, rl);
region_list_clone(pdat->orl, rl);
pdat->index = (pdat->index + 1) & 0x1;
if(nrl->count > 0)
present_surface(pdat->vram[pdat->index], s, nrl);
else
memcpy(pdat->vram[pdat->index], s->pixels, s->pixlen);
dma_cache_sync(pdat->vram[pdat->index], pdat->pixlen, DMA_TO_DEVICE);
f1c500s_debe_set_address(pdat, pdat->vram[pdat->index]);
}
static struct device_t * fb_f1c500s_probe(struct driver_t * drv, struct dtnode_t * n)
{
struct fb_f1c500s_pdata_t * pdat;
struct framebuffer_t * fb;
struct device_t * dev;
char * clkdefe = dt_read_string(n, "clock-name-defe", NULL);
char * clkdebe = dt_read_string(n, "clock-name-debe", NULL);
char * clktcon = dt_read_string(n, "clock-name-tcon", NULL);
int i;
if(!search_clk(clkdefe) || !search_clk(clkdebe) || !search_clk(clktcon))
return NULL;
pdat = malloc(sizeof(struct fb_f1c500s_pdata_t));
if(!pdat)
return NULL;
fb = malloc(sizeof(struct framebuffer_t));
if(!fb)
{
free(pdat);
return NULL;
}
pdat->virtdefe = phys_to_virt(F1C500S_DEFE_BASE);
pdat->virtdebe = phys_to_virt(F1C500S_DEBE_BASE);
pdat->virttcon = phys_to_virt(F1C500S_TCON_BASE);
pdat->virtgpio = phys_to_virt(F1C500S_GPIO_BASE);
pdat->clkdefe = strdup(clkdefe);
pdat->clkdebe = strdup(clkdebe);
pdat->clktcon = strdup(clktcon);
pdat->rstdefe = dt_read_int(n, "reset-defe", -1);
pdat->rstdebe = dt_read_int(n, "reset-debe", -1);
pdat->rsttcon = dt_read_int(n, "reset-tcon", -1);
pdat->width = dt_read_int(n, "width", 320);
pdat->height = dt_read_int(n, "height", 240);
pdat->pwidth = dt_read_int(n, "physical-width", 216);
pdat->pheight = dt_read_int(n, "physical-height", 135);
pdat->bits_per_pixel = 18;
pdat->bytes_per_pixel = 4;
pdat->pixlen = pdat->width * pdat->height * pdat->bytes_per_pixel;
pdat->index = 0;
pdat->vram[0] = dma_alloc_noncoherent(pdat->pixlen);
pdat->vram[1] = dma_alloc_noncoherent(pdat->pixlen);
pdat->nrl = region_list_alloc(0);
pdat->orl = region_list_alloc(0);
pdat->timing.pixel_clock_hz = dt_read_long(n, "clock-frequency", 8000000);
pdat->timing.h_front_porch = dt_read_int(n, "hfront-porch", 40);
pdat->timing.h_back_porch = dt_read_int(n, "hback-porch", 87);
pdat->timing.h_sync_len = dt_read_int(n, "hsync-len", 1);
pdat->timing.v_front_porch = dt_read_int(n, "vfront-porch", 13);
pdat->timing.v_back_porch = dt_read_int(n, "vback-porch", 31);
pdat->timing.v_sync_len = dt_read_int(n, "vsync-len", 1);
pdat->timing.h_sync_active = dt_read_bool(n, "hsync-active", 0);
pdat->timing.v_sync_active = dt_read_bool(n, "vsync-active", 0);
pdat->timing.den_active = dt_read_bool(n, "den-active", 0);
pdat->timing.clk_active = dt_read_bool(n, "clk-active", 0);
pdat->backlight = search_led(dt_read_string(n, "backlight", NULL));
fb->name = alloc_device_name(dt_read_name(n), dt_read_id(n));
fb->width = pdat->width;
fb->height = pdat->height;
fb->pwidth = pdat->pwidth;
fb->pheight = pdat->pheight;
fb->setbl = fb_setbl;
fb->getbl = fb_getbl;
fb->create = fb_create;
fb->destroy = fb_destroy;
fb->present = fb_present;
fb->priv = pdat;
clk_enable(pdat->clkdefe);
clk_enable(pdat->clkdebe);
clk_enable(pdat->clktcon);
if(pdat->rstdefe >= 0)
reset_deassert(pdat->rstdefe);
if(pdat->rstdebe >= 0)
reset_deassert(pdat->rstdebe);
if(pdat->rsttcon >= 0)
reset_deassert(pdat->rsttcon);
for(i = 0x0800; i < 0x1000; i += 4)
write32(pdat->virtdebe + i, 0);
fb_f1c500s_init(pdat);
if(!(dev = register_framebuffer(fb, drv)))
{
clk_disable(pdat->clkdefe);
clk_disable(pdat->clkdebe);
clk_disable(pdat->clktcon);
free(pdat->clkdefe);
free(pdat->clkdebe);
free(pdat->clktcon);
dma_free_noncoherent(pdat->vram[0]);
dma_free_noncoherent(pdat->vram[1]);
region_list_free(pdat->nrl);
region_list_free(pdat->orl);
free_device_name(fb->name);
free(fb->priv);
free(fb);
return NULL;
}
return dev;
}
static void fb_f1c500s_remove(struct device_t * dev)
{
struct framebuffer_t * fb = (struct framebuffer_t *)dev->priv;
struct fb_f1c500s_pdata_t * pdat = (struct fb_f1c500s_pdata_t *)fb->priv;
if(fb)
{
unregister_framebuffer(fb);
clk_disable(pdat->clkdefe);
clk_disable(pdat->clkdebe);
clk_disable(pdat->clktcon);
free(pdat->clkdefe);
free(pdat->clkdebe);
free(pdat->clktcon);
dma_free_noncoherent(pdat->vram[0]);
dma_free_noncoherent(pdat->vram[1]);
region_list_free(pdat->nrl);
region_list_free(pdat->orl);
free_device_name(fb->name);
free(fb->priv);
free(fb);
}
}
static void fb_f1c500s_suspend(struct device_t * dev)
{
struct framebuffer_t * fb = (struct framebuffer_t *)dev->priv;
struct fb_f1c500s_pdata_t * pdat = (struct fb_f1c500s_pdata_t *)fb->priv;
pdat->brightness = led_get_brightness(pdat->backlight);
led_set_brightness(pdat->backlight, 0);
}
static void fb_f1c500s_resume(struct device_t * dev)
{
struct framebuffer_t * fb = (struct framebuffer_t *)dev->priv;
struct fb_f1c500s_pdata_t * pdat = (struct fb_f1c500s_pdata_t *)fb->priv;
led_set_brightness(pdat->backlight, pdat->brightness);
}
static struct driver_t fb_f1c500s = {
.name = "fb-f1c500s",
.probe = fb_f1c500s_probe,
.remove = fb_f1c500s_remove,
.suspend = fb_f1c500s_suspend,
.resume = fb_f1c500s_resume,
};
static __init void fb_f1c500s_driver_init(void)
{
register_driver(&fb_f1c500s);
}
static __exit void fb_f1c500s_driver_exit(void)
{
unregister_driver(&fb_f1c500s);
}
driver_initcall(fb_f1c500s_driver_init);
driver_exitcall(fb_f1c500s_driver_exit);
xboot/src/arch/arm32/mach-f1c500s/romdisk/boot/miyoo.json
"fb-f1c500s@0": {
"clock-name-defe": "link-defe",
"clock-name-debe": "link-debe",
"clock-name-tcon": "link-tcon",
"reset-defe": 46,
"reset-debe": 44,
"reset-tcon": 36,
"width": 320,
"height": 240,
"physical-width": 216,
"physical-height": 135,
"clock-frequency": 18000000,
"hfront-porch": 32,
"hback-porch": 20,
"hsync-len": 10,
"vfront-porch": 1,
"vback-porch": 1,
"vsync-len": 10,
"hsync-active": false,
"vsync-active": false,
"den-active": true,
"clk-active": true,
"backlight": "led-pwm-bl.0"
},
當初司徒在Miyoo上面移植的顏色
TRIMUI掌機的顏色,這...,難道是司徒的120Hz鷹眼有問題?
但是,測試紅色,看起來正常
綠色也是
藍色也是
於是,司徒再把仙劍的顏色拿出來比較一下,這是電腦上的畫面
這個是TRIMUI掌機顯示的顏色,這...,難道又是國王的顏色,有智慧才看得出來?不知大家的智慧如何?哈哈
离线
哈,司徒目前使用電錶把TRIMUI掌機比較重要的腳位量測出來了,這樣的話TRIMUI掌機就進入備戰狀態了~
腳位
UP PA0
DOWN PE2
LEFT PE4
RIGHT PE8
A PD19
B PD12
X PD2
Y PD17
L PD0
R PD1
SELECT PD14
MENU PE11
START PD13
LED RED PE5
LED BLUE +3.3v
SPI FLASH CS PC1
SPI FLASH DO PC2
SPI FLASH DI PC3
SPI FLASH CLK PC0
LCD TE NC
LCD RESET 4.7K RC
LCD BL PE6
LCD D0 PD3
LCD D1 PD4
LCD D2 PD5
LCD D3 PD6
LCD D4 PD7
LCD D5 PD8
LCD CS PD11
LCD SCL PD9
LCD DCLK PD18
LCD HS PD20
LCD VS PD21
LCD SDA PD10
MicroSD D0 PF1
MicroSD D1 PF0
MicroSD D2 PF5
MicroSD D3 PF4
MicroSD CLK PF2
MicroSD CMD PF3
MicroSD CD PE4
离线
@xboot
我把TCON Dump出來比對了一下,只有差在FRM的設定,補了上去,還是無法顯示正確的顏色,於是,我看了一下DEFE,沒有使用,接著查一下DEBE,TRIMUI只有使用一個Layer3並且設定成COLOR-RGB565,我也跟著設定,但是,結果還是一樣無法顯示正確的顏色,HWC PALETTE我也補上,但是,還是無法顯示正確的顏色,這...,可能需要有智慧的人去做,司徒沒有智慧,哈,等回頭整理顯示驅動時,我在研究看看,或許從GC9308改設定會比較快一點,哈~
TCON
0x0000: 0x80000000
0x0004: 0x80000000
0x0008: 0x00000000
0x000c: 0x00000000
0x0010: 0x80000000
0x0014: 0x00000001
0x0018: 0x00000003
0x001c: 0x00000005
0x0020: 0x00000007
0x0024: 0x0000000b
0x0028: 0x0000000d
0x002c: 0x01010000
0x0030: 0x15151111
0x0034: 0x57575555
0x0038: 0x7f7f7777
0x003c: 0x00000000
0x0040: 0x800001f0
0x0044: 0xf000000f
0x0048: 0x013f00ef
0x004c: 0x04640025
0x0050: 0x023c0005
0x0054: 0x00110003
0x0058: 0x80000000
0x005c: 0x00000000
0x0060: 0x00000000
0x0064: 0x00000000
0x0068: 0x00000000
0x006c: 0x00000000
0x0070: 0x00000000
0x0074: 0x00000000
0x0078: 0x00000000
0x007c: 0x00000000
0x0080: 0x00000000
0x0084: 0x00000000
0x0088: 0x00000000
0x008c: 0xe0000000
0x0090: 0x00000000
0x0094: 0x00000000
0x0098: 0x00000000
0x009c: 0x00000000
0x00a0: 0x00000000
0x00a4: 0x00000000
0x00a8: 0x00000000
0x00ac: 0x00000000
0x00b0: 0x00000000
0x00b4: 0x00000000
0x00b8: 0x00000000
0x00bc: 0x00000000
0x00c0: 0x00000000
0x00c4: 0x00000000
0x00c8: 0x00000000
0x00cc: 0x00000000
0x00d0: 0x00000000
0x00d4: 0x00000000
0x00d8: 0x00000000
0x00dc: 0x00000000
0x00e0: 0x00000000
0x00e4: 0x00000000
0x00e8: 0x00000000
0x00ec: 0x00000000
0x00f0: 0x00000000
0x00f4: 0xffffffff
0x00f8: 0x00000000
0x00fc: 0x10f10000
DEFE
0x0000: 0x00000000
0x0004: 0x00000000
0x0008: 0x00000000
0x000c: 0x00000000
0x0010: 0x00000000
0x0014: 0x00000000
0x0018: 0x00000000
0x001c: 0x16190478
0x0020: 0x00000000
0x0024: 0x00000000
0x0028: 0x00000000
0x002c: 0x00000000
0x0030: 0x00000000
0x0034: 0x00000000
0x0038: 0x00000000
0x003c: 0x20101013
0x0040: 0x00000000
0x0044: 0x00000000
0x0048: 0x00000000
0x004c: 0x00000000
0x0050: 0x00000000
0x0054: 0x00000000
0x0058: 0x00000000
0x005c: 0x00000000
0x0060: 0x00000000
0x0064: 0x00000000
0x0068: 0x00000000
0x006c: 0x00000000
0x0070: 0x00000000
0x0074: 0x00000000
0x0078: 0x00000000
0x007c: 0x00000000
0x0080: 0x00000000
0x0084: 0x00000000
0x0088: 0x00000000
0x008c: 0x00000000
0x0090: 0x00000000
0x0094: 0x00000000
0x0098: 0x00000000
0x009c: 0x00000000
0x00a0: 0x00000000
0x00a4: 0x00000000
0x00a8: 0x00000000
0x00ac: 0x00000000
0x00b0: 0x00000000
0x00b4: 0x00000000
0x00b8: 0x00000000
0x00bc: 0x00000000
0x00c0: 0x00000000
0x00c4: 0x00000000
0x00c8: 0x00000000
0x00cc: 0x00000000
0x00d0: 0x00000000
0x00d4: 0x00000000
0x00d8: 0x00000000
0x00dc: 0x00000000
0x00e0: 0x00000000
0x00e4: 0x00000000
0x00e8: 0x00000000
0x00ec: 0x00000000
0x00f0: 0x00000000
0x00f4: 0x00000000
0x00f8: 0x00000000
0x00fc: 0x00000000
DEBE
0x0800: 0x00000803
0x0804: 0x00000000
0x0808: 0x00ef013f
0x080c: 0x00000000
0x0810: 0xffffffff
0x0814: 0xffffffff
0x0818: 0xffffffff
0x081c: 0x00ef013f
0x0820: 0x00000000
0x0824: 0x00000000
0x0828: 0x00000000
0x082c: 0x00000000
0x0830: 0x00000000
0x0834: 0x00000000
0x0838: 0x00000000
0x083c: 0x00000000
0x0840: 0x00000000
0x0844: 0x00000000
0x0848: 0x00000000
0x084c: 0x00001400
0x0850: 0x00000000
0x0854: 0x00000000
0x0858: 0x00000000
0x085c: 0x1c400000
0x0860: 0x04000000
0x0864: 0x00000000
0x0868: 0x00000000
0x086c: 0x00000000
0x0870: 0x00000002
0x0874: 0x00000000
0x0878: 0x00000000
0x087c: 0x00000000
0x0880: 0x00000000
0x0884: 0x00000000
0x0888: 0x00000000
0x088c: 0x00000000
0x0890: 0x00000000
0x0894: 0x00000400
0x0898: 0x00000800
0x089c: 0x00008c00
0x08a0: 0x00000a00
0x08a4: 0x00000a00
0x08a8: 0x00000a00
0x08ac: 0x00000500
0x08b0: 0x00000000
0x08b4: 0x00000000
0x08b8: 0x00000000
0x08bc: 0x00000000
0x08c0: 0x00000002
0x08c4: 0x00000001
0x08c8: 0x00000000
0x08cc: 0x00000000
0x08d0: 0x00000000
0x08d4: 0x00000000
0x08d8: 0x00000000
0x08dc: 0x00000000
0x08e0: 0x00000000
0x08e4: 0x00000000
0x08e8: 0x00000000
0x08ec: 0x00000000
0x08f0: 0x00000000
0x08f4: 0x00000000
0x08f8: 0x00000000
0x08fc: 0x00000000
0x0900: 0x00000000
0x0904: 0x00000000
0x0908: 0x00000000
0x090c: 0x00000000
0x0910: 0x00000000
0x0914: 0x00000000
0x0918: 0x00000000
0x091c: 0x00000000
0x0920: 0x00000000
0x0924: 0x00000000
0x0928: 0x00000000
0x092c: 0x00000000
0x0930: 0x00000000
0x0934: 0x00000000
0x0938: 0x00000000
0x093c: 0x00000000
0x0940: 0x00000000
0x0944: 0x00000000
0x0948: 0x00000000
0x094c: 0x00000000
0x0950: 0x00000000
0x0954: 0x00000000
0x0958: 0x00000000
0x095c: 0x00000000
0x0960: 0x00000000
0x0964: 0x00000000
0x0968: 0x00000000
0x096c: 0x00000000
0x0970: 0x00000000
0x0974: 0x00000000
0x0978: 0x00000000
0x097c: 0x00000000
0x0980: 0x00000000
0x0984: 0x00000000
0x0988: 0x00000000
0x098c: 0x00000000
0x0990: 0x00000000
0x0994: 0x00000000
0x0998: 0x00000000
0x099c: 0x00000000
0x09a0: 0x00000000
0x09a4: 0x00000000
0x09a8: 0x00000000
0x09ac: 0x00000000
0x09b0: 0x00000000
0x09b4: 0x00000000
0x09b8: 0x00000000
0x09bc: 0x00000000
0x09c0: 0x00000001
0x09c4: 0x00000000
0x09c8: 0x00000000
0x09cc: 0x00000000
0x09d0: 0x000003c4
0x09d4: 0x00000000
0x09d8: 0x00000000
0x09dc: 0x0000000c
0x09e0: 0x00000000
0x09e4: 0x000003c4
0x09e8: 0x00000000
0x09ec: 0x0000000c
0x09f0: 0x00000000
0x09f4: 0x00000000
0x09f8: 0x000003c4
0x09fc: 0x0000000c
0x0a00: 0x00000000
0x0a04: 0x00000000
0x0a08: 0x00000000
0x0a0c: 0x00000000
0x0a10: 0x00000000
0x0a14: 0x00000000
0x0a18: 0x00000000
0x0a1c: 0x00000000
0x0a20: 0x00000000
0x0a24: 0x00000000
0x0a28: 0x00000000
0x0a2c: 0x00000000
0x0a30: 0x00000000
0x0a34: 0x00000000
0x0a38: 0x00000000
0x0a3c: 0x00000000
0x0a40: 0x00000000
0x0a44: 0x00000000
0x0a48: 0x00000000
0x0a4c: 0x00000000
0x0a50: 0x00000000
0x0a54: 0x00000000
0x0a58: 0x00000000
0x0a5c: 0x00000000
0x0a60: 0x00000000
0x0a64: 0x00000000
0x0a68: 0x00000000
0x0a6c: 0x00000000
0x0a70: 0x00000000
0x0a74: 0x00000000
0x0a78: 0x00000000
0x0a7c: 0x00000000
0x0a80: 0x00000000
0x0a84: 0x00000000
0x0a88: 0x00000000
0x0a8c: 0x00000000
0x0a90: 0x00000000
0x0a94: 0x00000000
0x0a98: 0x00000000
0x0a9c: 0x00000000
0x0aa0: 0x00000000
0x0aa4: 0x00000000
0x0aa8: 0x00000000
0x0aac: 0x00000000
0x0ab0: 0x00000000
0x0ab4: 0x00000000
0x0ab8: 0x00000000
0x0abc: 0x00000000
0x0ac0: 0x00000000
0x0ac4: 0x00000000
0x0ac8: 0x00000000
0x0acc: 0x00000000
0x0ad0: 0x00000000
0x0ad4: 0x00000000
0x0ad8: 0x00000000
0x0adc: 0x00000000
0x0ae0: 0x00000000
0x0ae4: 0x00000000
0x0ae8: 0x00000000
0x0aec: 0x00000000
0x0af0: 0x00000000
0x0af4: 0x00000000
0x0af8: 0x00000000
0x0afc: 0x00000000
0x0b00: 0x00000000
0x0b04: 0x00000000
0x0b08: 0x00000000
0x0b0c: 0x00000000
0x0b10: 0x00000000
0x0b14: 0x00000000
0x0b18: 0x00000000
0x0b1c: 0x00000000
0x0b20: 0x00000000
0x0b24: 0x00000000
0x0b28: 0x00000000
0x0b2c: 0x00000000
0x0b30: 0x00000000
0x0b34: 0x00000000
0x0b38: 0x00000000
0x0b3c: 0x00000000
0x0b40: 0x00000000
0x0b44: 0x00000000
0x0b48: 0x00000000
0x0b4c: 0x00000000
0x0b50: 0x00000000
0x0b54: 0x00000000
0x0b58: 0x00000000
0x0b5c: 0x00000000
0x0b60: 0x00000000
0x0b64: 0x00000000
0x0b68: 0x00000000
0x0b6c: 0x00000000
0x0b70: 0x00000000
0x0b74: 0x00000000
0x0b78: 0x00000000
0x0b7c: 0x00000000
0x0b80: 0x00000000
0x0b84: 0x00000000
0x0b88: 0x00000000
0x0b8c: 0x00000000
0x0b90: 0x00000000
0x0b94: 0x00000000
0x0b98: 0x00000000
0x0b9c: 0x00000000
0x0ba0: 0x00000000
0x0ba4: 0x00000000
0x0ba8: 0x00000000
0x0bac: 0x00000000
0x0bb0: 0x00000000
0x0bb4: 0x00000000
0x0bb8: 0x00000000
0x0bbc: 0x00000000
0x0bc0: 0x00000000
0x0bc4: 0x00000000
0x0bc8: 0x00000000
0x0bcc: 0x00000000
0x0bd0: 0x00000000
0x0bd4: 0x00000000
0x0bd8: 0x00000000
0x0bdc: 0x00000000
0x0be0: 0x00000000
0x0be4: 0x00000000
0x0be8: 0x00000000
0x0bec: 0x00000000
0x0bf0: 0x00000000
0x0bf4: 0x00000000
0x0bf8: 0x00000000
0x0bfc: 0x00000000
0x0c00: 0x00000000
0x0c04: 0x00000000
0x0c08: 0x00000000
0x0c0c: 0x00000000
0x0c10: 0x00000000
0x0c14: 0x00000000
0x0c18: 0x00000000
0x0c1c: 0x00000000
0x0c20: 0x00000000
0x0c24: 0x00000000
0x0c28: 0x00000000
0x0c2c: 0x00000000
0x0c30: 0x00000000
0x0c34: 0x00000000
0x0c38: 0x00000000
0x0c3c: 0x00000000
0x0c40: 0x00000000
0x0c44: 0x00000000
0x0c48: 0x00000000
0x0c4c: 0x00000000
0x0c50: 0x00000000
0x0c54: 0x00000000
0x0c58: 0x00000000
0x0c5c: 0x00000000
0x0c60: 0x00000000
0x0c64: 0x00000000
0x0c68: 0x00000000
0x0c6c: 0x00000000
0x0c70: 0x00000000
0x0c74: 0x00000000
0x0c78: 0x00000000
0x0c7c: 0x00000000
0x0c80: 0x00000000
0x0c84: 0x00000000
0x0c88: 0x00000000
0x0c8c: 0x00000000
0x0c90: 0x00000000
0x0c94: 0x00000000
0x0c98: 0x00000000
0x0c9c: 0x00000000
0x0ca0: 0x00000000
0x0ca4: 0x00000000
0x0ca8: 0x00000000
0x0cac: 0x00000000
0x0cb0: 0x00000000
0x0cb4: 0x00000000
0x0cb8: 0x00000000
0x0cbc: 0x00000000
0x0cc0: 0x00000000
0x0cc4: 0x00000000
0x0cc8: 0x00000000
0x0ccc: 0x00000000
0x0cd0: 0x00000000
0x0cd4: 0x00000000
0x0cd8: 0x00000000
0x0cdc: 0x00000000
0x0ce0: 0x00000000
0x0ce4: 0x00000000
0x0ce8: 0x00000000
0x0cec: 0x00000000
0x0cf0: 0x00000000
0x0cf4: 0x00000000
0x0cf8: 0x00000000
0x0cfc: 0x00000000
0x0d00: 0x00000000
0x0d04: 0x00000000
0x0d08: 0x00000000
0x0d0c: 0x00000000
0x0d10: 0x00000000
0x0d14: 0x00000000
0x0d18: 0x00000000
0x0d1c: 0x00000000
0x0d20: 0x00000000
0x0d24: 0x00000000
0x0d28: 0x00000000
0x0d2c: 0x00000000
0x0d30: 0x00000000
0x0d34: 0x00000000
0x0d38: 0x00000000
0x0d3c: 0x00000000
0x0d40: 0x00000000
0x0d44: 0x00000000
0x0d48: 0x00000000
0x0d4c: 0x00000000
0x0d50: 0x00000000
0x0d54: 0x00000000
0x0d58: 0x00000000
0x0d5c: 0x00000000
0x0d60: 0x00000000
0x0d64: 0x00000000
0x0d68: 0x00000000
0x0d6c: 0x00000000
0x0d70: 0x00000000
0x0d74: 0x00000000
0x0d78: 0x00000000
0x0d7c: 0x00000000
0x0d80: 0x00000000
0x0d84: 0x00000000
0x0d88: 0x00000000
0x0d8c: 0x00000000
0x0d90: 0x00000000
0x0d94: 0x00000000
0x0d98: 0x00000000
0x0d9c: 0x00000000
0x0da0: 0x00000000
0x0da4: 0x00000000
0x0da8: 0x00000000
0x0dac: 0x00000000
0x0db0: 0x00000000
0x0db4: 0x00000000
0x0db8: 0x00000000
0x0dbc: 0x00000000
0x0dc0: 0x00000000
0x0dc4: 0x00000000
0x0dc8: 0x00000000
0x0dcc: 0x00000000
0x0dd0: 0x00000000
0x0dd4: 0x00000000
0x0dd8: 0x00000000
0x0ddc: 0x00000000
0x0de0: 0x00000000
0x0de4: 0x00000000
0x0de8: 0x00000000
0x0dec: 0x00000000
0x0df0: 0x00000000
0x0df4: 0x00000000
0x0df8: 0x00000000
0x0dfc: 0x00000000
0x0e00: 0x00000000
0x0e04: 0x00000000
0x0e08: 0x00000000
0x0e0c: 0x00000000
0x0e10: 0x00000000
0x0e14: 0x00000000
0x0e18: 0x00000000
0x0e1c: 0x00000000
0x0e20: 0x00000000
0x0e24: 0x00000000
0x0e28: 0x00000000
0x0e2c: 0x00000000
0x0e30: 0x00000000
0x0e34: 0x00000000
0x0e38: 0x00000000
0x0e3c: 0x00000000
0x0e40: 0x00000000
0x0e44: 0x00000000
0x0e48: 0x00000000
0x0e4c: 0x00000000
0x0e50: 0x00000000
0x0e54: 0x00000000
0x0e58: 0x00000000
0x0e5c: 0x00000000
0x0e60: 0x00000000
0x0e64: 0x00000000
0x0e68: 0x00000000
0x0e6c: 0x00000000
0x0e70: 0x00000000
0x0e74: 0x00000000
0x0e78: 0x00000000
0x0e7c: 0x00000000
0x0e80: 0x00000000
0x0e84: 0x00000000
0x0e88: 0x00000000
0x0e8c: 0x00000000
0x0e90: 0x00000000
0x0e94: 0x00000000
0x0e98: 0x00000000
0x0e9c: 0x00000000
0x0ea0: 0x00000000
0x0ea4: 0x00000000
0x0ea8: 0x00000000
0x0eac: 0x00000000
0x0eb0: 0x00000000
0x0eb4: 0x00000000
0x0eb8: 0x00000000
0x0ebc: 0x00000000
0x0ec0: 0x00000000
0x0ec4: 0x00000000
0x0ec8: 0x00000000
0x0ecc: 0x00000000
0x0ed0: 0x00000000
0x0ed4: 0x00000000
0x0ed8: 0x00000000
0x0edc: 0x00000000
0x0ee0: 0x00000000
0x0ee4: 0x00000000
0x0ee8: 0x00000000
0x0eec: 0x00000000
0x0ef0: 0x00000000
0x0ef4: 0x00000000
0x0ef8: 0x00000000
0x0efc: 0x00000000
0x0f00: 0x00000000
0x0f04: 0x00000000
0x0f08: 0x00000000
0x0f0c: 0x00000000
0x0f10: 0x00000000
0x0f14: 0x00000000
0x0f18: 0x00000000
0x0f1c: 0x00000000
0x0f20: 0x00000000
0x0f24: 0x00000000
0x0f28: 0x00000000
0x0f2c: 0x00000000
0x0f30: 0x00000000
0x0f34: 0x00000000
0x0f38: 0x00000000
0x0f3c: 0x00000000
0x0f40: 0x00000000
0x0f44: 0x00000000
0x0f48: 0x00000000
0x0f4c: 0x00000000
0x0f50: 0x00000000
0x0f54: 0x00000000
0x0f58: 0x00000000
0x0f5c: 0x00000000
0x0f60: 0x00000000
0x0f64: 0x00000000
0x0f68: 0x00000000
0x0f6c: 0x00000000
0x0f70: 0x00000000
0x0f74: 0x00000000
0x0f78: 0x00000000
0x0f7c: 0x00000000
0x0f80: 0x00000000
0x0f84: 0x00000000
0x0f88: 0x00000000
0x0f8c: 0x00000000
0x0f90: 0x00000000
0x0f94: 0x00000000
0x0f98: 0x00000000
0x0f9c: 0x00000000
0x0fa0: 0x00000000
0x0fa4: 0x00000000
0x0fa8: 0x00000000
0x0fac: 0x00000000
0x0fb0: 0x00000000
0x0fb4: 0x00000000
0x0fb8: 0x00000000
0x0fbc: 0x00000000
0x0fc0: 0x00000000
0x0fc4: 0x00000000
0x0fc8: 0x00000000
0x0fcc: 0x00000000
0x0fd0: 0x00000000
0x0fd4: 0x00000000
0x0fd8: 0x00000000
0x0fdc: 0x00000000
0x0fe0: 0x00000000
0x0fe4: 0x00000000
0x0fe8: 0x00000000
0x0fec: 0x00000000
0x0ff0: 0x00000000
0x0ff4: 0x00000000
0x0ff8: 0x00000000
0x0ffc: 0x00000000
0x1000: 0x50e0de97
0x1004: 0xef3a0091
0x1008: 0xd8b0f68a
0x100c: 0x9df63d6c
0x1010: 0x488a6b5d
0x1014: 0x85bfe200
0x1018: 0x6eec3257
0x101c: 0x89d5c141
0x1020: 0xa5fdc96e
0x1024: 0xbcc19c7c
0x1028: 0xff8a61fc
0x102c: 0x7adb81d9
0x1030: 0xa452e561
0x1034: 0xede6d524
0x1038: 0xbc2433a3
0x103c: 0xa7571596
0x1040: 0x18a7afb7
0x1044: 0x26e6b65b
0x1048: 0x20a77112
0x104c: 0x2eb7a1c2
0x1050: 0xa0051e75
0x1054: 0xf6d5ed10
0x1058: 0x8824f3ea
0x105c: 0x30458add
0x1060: 0x6be2576b
0x1064: 0x5bdd4b10
0x1068: 0xa0b55bdf
0x106c: 0x5dc75f02
0x1070: 0xd236f76e
0x1074: 0x6b44fc0c
0x1078: 0x22ec6e7c
0x107c: 0x937b16b9
0x1080: 0x04346dd0
0x1084: 0xa7b9dbc0
0x1088: 0xf02f18bf
0x108c: 0x11cba753
0x1090: 0x0ffc6db6
0x1094: 0x4ccca56d
0x1098: 0x0ec4f73c
0x109c: 0xf27640ec
0x10a0: 0xc224767a
0x10a4: 0xcc688366
0x10a8: 0x2547449b
0x10ac: 0xbb3e3058
0x10b0: 0x4243dc83
0x10b4: 0xa5596310
0x10b8: 0x467c1e6d
0x10bc: 0xe7c6bb14
0x10c0: 0x3e0465dd
0x10c4: 0x565a04b1
0x10c8: 0xd016799f
0x10cc: 0xd499cd96
0x10d0: 0xc3ef58e7
0x10d4: 0x0f911c31
0x10d8: 0x481784d5
0x10dc: 0xbfc45a88
0x10e0: 0x31474aa3
0x10e4: 0x365b08c8
0x10e8: 0x53f094b4
0x10ec: 0x67ce18c0
0x10f0: 0x285001f7
0x10f4: 0x185f3d3a
0x10f8: 0x34d43f0a
0x10fc: 0x55b39521
0x1100: 0xd040d92b
0x1104: 0xf9e236ea
0x1108: 0x83aaaeac
0x110c: 0x2fe702dd
0x1110: 0x48c18fee
0x1114: 0x4ed3ada4
0x1118: 0xc0651a30
0x111c: 0xc9522870
0x1120: 0x912e212a
0x1124: 0x0c2045b0
0x1128: 0xa12211c1
0x112c: 0xeb279368
0x1130: 0xd974ccdc
0x1134: 0xf1bacaac
0x1138: 0x751982c3
0x113c: 0x854a0538
0x1140: 0xce94f686
0x1144: 0xeecdbb10
0x1148: 0x4cd87f50
0x114c: 0x1e8b0a52
0x1150: 0x08f67d9a
0x1154: 0xf5431b1d
0x1158: 0xac2d957e
0x115c: 0x99d01e85
0x1160: 0x4d237fc8
0x1164: 0xdc51c5e8
0x1168: 0x78993875
0x116c: 0xd736183c
0x1170: 0x7c2dd8be
0x1174: 0x9b111d99
0x1178: 0x5294e7ce
0x117c: 0xecdb1ea9
0x1180: 0x4324ff9d
0x1184: 0xf5ff0359
0x1188: 0x70a7b7d1
0x118c: 0xd1c3bc22
0x1190: 0xc3d411f3
0x1194: 0x37cc4c9c
0x1198: 0x4e94b489
0x119c: 0xc42d601e
0x11a0: 0x0a008bcc
0x11a4: 0xfeeda434
0x11a8: 0xac57c6af
0x11ac: 0x5b0f5f8b
0x11b0: 0x85717c48
0x11b4: 0x9ff58003
0x11b8: 0x6a51ee86
0x11bc: 0x38dee85e
0x11c0: 0x4b05ff83
0x11c4: 0xbf223520
0x11c8: 0x9abc1833
0x11cc: 0xab9f2834
0x11d0: 0x800c9ede
0x11d4: 0x7cafe4dc
0x11d8: 0x541fd9d7
0x11dc: 0x2caf9d29
0x11e0: 0x0173ffcc
0x11e4: 0x5cfc1ac6
0x11e8: 0x4f92eeee
0x11ec: 0x949d9538
0x11f0: 0x5c3e827e
0x11f4: 0xb9e4204c
0x11f8: 0x04454a6d
0x11fc: 0x15a84969
0x1200: 0x3396e4db
0x1204: 0x96bb0618
0x1208: 0x464ababf
0x120c: 0xbfb9c033
0x1210: 0x27fcdfde
0x1214: 0x532226b2
0x1218: 0x8541336c
0x121c: 0x42b74278
0x1220: 0x282866be
0x1224: 0x82960fe6
0x1228: 0x4a603d70
0x122c: 0x26db8c40
0x1230: 0xc210cd9f
0x1234: 0x1bda3246
0x1238: 0xcf01743e
0x123c: 0xa1d708ca
0x1240: 0x64356366
0x1244: 0x3499ae57
0x1248: 0x2ca3c237
0x124c: 0x8b39a051
0x1250: 0xe90cb5e7
0x1254: 0xae7405d0
0x1258: 0xa7c8ed0f
0x125c: 0xd996a001
0x1260: 0x87018103
0x1264: 0x8fd1b1b8
0x1268: 0xd3398d06
0x126c: 0xdb8d102a
0x1270: 0x4284d9d2
0x1274: 0x7afd9710
0x1278: 0xdc58f459
0x127c: 0x7b1f696f
0x1280: 0xb868ac73
0x1284: 0xcc8e237a
0x1288: 0x4990ca89
0x128c: 0x486e7908
0x1290: 0x73e83da9
0x1294: 0x3e390c68
0x1298: 0x2213a0a6
0x129c: 0xd8561188
0x12a0: 0x30c66ffc
0x12a4: 0x76f70475
0x12a8: 0x00912ccd
0x12ac: 0x715e1837
0x12b0: 0x083a1bb1
0x12b4: 0xdb73c785
0x12b8: 0x5310acec
0x12bc: 0xb634a49e
0x12c0: 0x99c06d4c
0x12c4: 0xf492842a
0x12c8: 0x6f128cab
0x12cc: 0xfaff393e
0x12d0: 0x6e9c3c3b
0x12d4: 0xffb3f05c
0x12d8: 0x870e2ed3
0x12dc: 0x55162cb3
0x12e0: 0x015777cf
0x12e4: 0x976009ca
0x12e8: 0x143eb066
0x12ec: 0x97f8cba2
0x12f0: 0xe6fc7f2e
0x12f4: 0x9d7bc5bd
0x12f8: 0xf8f1bfdf
0x12fc: 0x0dcd0160
0x1300: 0x0524689b
0x1304: 0x28bf19e4
0x1308: 0x1d736989
0x130c: 0x551e3b71
0x1310: 0x81f18d48
0x1314: 0xdf6b0a89
0x1318: 0x088cb783
0x131c: 0x7ed9cb3e
0x1320: 0xe51cfa1c
0x1324: 0xa362c0a1
0x1328: 0x11e1b56f
0x132c: 0x381e3d4b
0x1330: 0x2b7cff7e
0x1334: 0x7e2fa425
0x1338: 0x5622b979
0x133c: 0xc65ada84
0x1340: 0x3049c23d
0x1344: 0x535fd2c4
0x1348: 0xc3a49ab6
0x134c: 0x6dde3260
0x1350: 0x9ec4e7db
0x1354: 0xbf6b44d2
0x1358: 0x4614d0a0
0x135c: 0x5d3b4d08
0x1360: 0x1d1b3cd4
0x1364: 0xb2c19e70
0x1368: 0x083dd29f
0x136c: 0xfab97f49
0x1370: 0x6d2c7208
0x1374: 0x5f6765d9
0x1378: 0x58bbba94
0x137c: 0x56f512c7
0x1380: 0x8fbed947
0x1384: 0xf39b35e3
0x1388: 0xa605928d
0x138c: 0x03bf9830
0x1390: 0x6c97628e
0x1394: 0xa9b4004d
0x1398: 0x4aa8fff4
0x139c: 0xa9a089c6
0x13a0: 0xd71eff65
0x13a4: 0x7f1170c7
0x13a8: 0xe778e704
0x13ac: 0x66e414e3
0x13b0: 0x6c21be59
0x13b4: 0xa7ffa52a
0x13b8: 0x14212e7b
0x13bc: 0x063afb3f
0x13c0: 0xf758aa93
0x13c4: 0x71b7603c
0x13c8: 0x8d14e5c2
0x13cc: 0xaf776fdd
0x13d0: 0xcc5031d9
0x13d4: 0x46f13000
0x13d8: 0x1158d3bd
0x13dc: 0xd4f3e199
0x13e0: 0xc947f6eb
0x13e4: 0xc50b0e89
0x13e8: 0x2a909ac2
0x13ec: 0x370d044e
0x13f0: 0xda8ab710
0x13f4: 0x3554100e
0x13f8: 0x5e547a96
0x13fc: 0x320a1113
0x1400: 0xe0022c6d
0x1404: 0xc586bba9
0x1408: 0x9c48824d
0x140c: 0xe7bc144d
0x1410: 0xd189bb93
0x1414: 0x50263001
0x1418: 0xf648ceae
0x141c: 0x0873c9b5
0x1420: 0x4c513bef
0x1424: 0xffbcc6cd
0x1428: 0xae42a992
0x142c: 0x09be284f
0x1430: 0x08c6a8fd
0x1434: 0x997537f8
0x1438: 0x8accaad4
0x143c: 0x18a89f56
0x1440: 0x10b67d04
0x1444: 0xbdd61d4e
0x1448: 0x694c56fb
0x144c: 0x1e77c4e7
0x1450: 0xbf82c964
0x1454: 0xb5ef5f30
0x1458: 0x517a78a6
0x145c: 0x16f8aae5
0x1460: 0x3a7fd367
0x1464: 0xf4ddf0d6
0x1468: 0x62498b89
0x146c: 0xbfd7225d
0x1470: 0x7d8b5717
0x1474: 0x3fe4a544
0x1478: 0x87d9d1b7
0x147c: 0x961b6120
0x1480: 0xe0c38fd3
0x1484: 0xcfd12b8b
0x1488: 0x22033a1d
0x148c: 0x6ae2ae68
0x1490: 0xa9a05bc7
0x1494: 0x4ca982e9
0x1498: 0xf34f7da8
0x149c: 0xfec53001
0x14a0: 0x875a35dc
0x14a4: 0x76b36971
0x14a8: 0xb42310d6
0x14ac: 0xf10ed060
0x14b0: 0x4037e6e2
0x14b4: 0x46159884
0x14b8: 0x5774fa66
0x14bc: 0xdbca12c5
0x14c0: 0x14e0fab4
0x14c4: 0xdeac6e5e
0x14c8: 0x1442b54f
0x14cc: 0xf42860a0
0x14d0: 0x5108b3dc
0x14d4: 0x1fa97442
0x14d8: 0x88149ff6
0x14dc: 0xebd99c94
0x14e0: 0xc713f9b3
0x14e4: 0xbeb12dab
0x14e8: 0x12fc203e
0x14ec: 0xb5a20e3d
0x14f0: 0xd163ba72
0x14f4: 0x4e55f9b8
0x14f8: 0x31457ba2
0x14fc: 0x4b668119
0x1500: 0xc6b1b777
0x1504: 0xafe3eab8
0x1508: 0xce62a363
0x150c: 0xef0cb506
0x1510: 0xd6fe6fcf
0x1514: 0x6cfa9633
0x1518: 0x980cb59b
0x151c: 0xcbf0659d
0x1520: 0x3800f7ff
0x1524: 0x81e96d8a
0x1528: 0x04959c1a
0x152c: 0xebfe6621
0x1530: 0x093056fe
0x1534: 0x7e658078
0x1538: 0x14dc64f8
0x153c: 0xc9e1e13a
0x1540: 0x0c247693
0x1544: 0x69ffed50
0x1548: 0xc3369d9d
0x154c: 0xa8e50786
0x1550: 0x25cf495f
0x1554: 0x998b641c
0x1558: 0x21f05e32
0x155c: 0xf3fb0498
0x1560: 0x0dacbd2f
0x1564: 0x63382d43
0x1568: 0x1222ef4a
0x156c: 0x6bed32c4
0x1570: 0x66a36179
0x1574: 0xcec98f37
0x1578: 0x9f9aa06e
0x157c: 0x1b0e5c03
0x1580: 0x1d3d0bdd
0x1584: 0xa0233333
0x1588: 0x4a863f86
0x158c: 0xc9896245
0x1590: 0x1ca09b1f
0x1594: 0xc9892316
0x1598: 0x20d8d2cb
0x159c: 0xc8eb7907
0x15a0: 0x5ba0b3ee
0x15a4: 0xd15b84aa
0x15a8: 0x209bcb60
0x15ac: 0xfce9e022
0x15b0: 0x089dda0e
0x15b4: 0x3c4b4c61
0x15b8: 0xeb650d7e
0x15bc: 0xda355cc9
0x15c0: 0x38f82dec
0x15c4: 0x54eb956f
0x15c8: 0x019773b7
0x15cc: 0xe24bd865
0x15d0: 0x548bf16b
0x15d4: 0x9adf67e4
0x15d8: 0x01a4fcf0
0x15dc: 0x88bbfab0
0x15e0: 0x580fca6c
0x15e4: 0xf9e2d4d0
0x15e8: 0xdb42c877
0x15ec: 0x7da42f01
0x15f0: 0xade01f1d
0x15f4: 0x5b4f2188
0x15f8: 0x206899ec
0x15fc: 0x87d802fe
0x1600: 0x00000000
0x1604: 0x00000000
0x1608: 0x00000000
0x160c: 0x00000000
0x1610: 0x00000000
0x1614: 0x00000000
0x1618: 0x00000000
0x161c: 0x00000000
0x1620: 0x00000000
0x1624: 0x00000000
0x1628: 0x00000000
0x162c: 0x00000000
0x1630: 0x00000000
0x1634: 0x00000000
0x1638: 0x00000000
0x163c: 0x00000000
0x1640: 0x00000000
0x1644: 0x00000000
0x1648: 0x00000000
0x164c: 0x00000000
0x1650: 0x00000000
0x1654: 0x00000000
0x1658: 0x00000000
0x165c: 0x00000000
0x1660: 0x00000000
0x1664: 0x00000000
0x1668: 0x00000000
0x166c: 0x00000000
0x1670: 0x00000000
0x1674: 0x00000000
0x1678: 0x00000000
0x167c: 0x00000000
0x1680: 0x00000000
0x1684: 0x00000000
0x1688: 0x00000000
0x168c: 0x00000000
0x1690: 0x00000000
0x1694: 0x00000000
0x1698: 0x00000000
0x169c: 0x00000000
0x16a0: 0x00000000
0x16a4: 0x00000000
0x16a8: 0x00000000
0x16ac: 0x00000000
0x16b0: 0x00000000
0x16b4: 0x00000000
0x16b8: 0x00000000
0x16bc: 0x00000000
0x16c0: 0x00000000
0x16c4: 0x00000000
0x16c8: 0x00000000
0x16cc: 0x00000000
0x16d0: 0x00000000
0x16d4: 0x00000000
0x16d8: 0x00000000
0x16dc: 0x00000000
0x16e0: 0x00000000
0x16e4: 0x00000000
0x16e8: 0x00000000
0x16ec: 0x00000000
0x16f0: 0x00000000
0x16f4: 0x00000000
0x16f8: 0x00000000
0x16fc: 0x00000000
0x1700: 0x00000000
0x1704: 0x00000000
0x1708: 0x00000000
0x170c: 0x00000000
0x1710: 0x00000000
0x1714: 0x00000000
0x1718: 0x00000000
0x171c: 0x00000000
0x1720: 0x00000000
0x1724: 0x00000000
0x1728: 0x00000000
0x172c: 0x00000000
0x1730: 0x00000000
0x1734: 0x00000000
0x1738: 0x00000000
0x173c: 0x00000000
0x1740: 0x00000000
0x1744: 0x00000000
0x1748: 0x00000000
0x174c: 0x00000000
0x1750: 0x00000000
0x1754: 0x00000000
0x1758: 0x00000000
0x175c: 0x00000000
0x1760: 0x00000000
0x1764: 0x00000000
0x1768: 0x00000000
0x176c: 0x00000000
0x1770: 0x00000000
0x1774: 0x00000000
0x1778: 0x00000000
0x177c: 0x00000000
0x1780: 0x00000000
0x1784: 0x00000000
0x1788: 0x00000000
0x178c: 0x00000000
0x1790: 0x00000000
0x1794: 0x00000000
0x1798: 0x00000000
0x179c: 0x00000000
0x17a0: 0x00000000
0x17a4: 0x00000000
0x17a8: 0x00000000
0x17ac: 0x00000000
0x17b0: 0x00000000
0x17b4: 0x00000000
0x17b8: 0x00000000
0x17bc: 0x00000000
0x17c0: 0x00000000
0x17c4: 0x00000000
0x17c8: 0x00000000
0x17cc: 0x00000000
0x17d0: 0x00000000
0x17d4: 0x00000000
0x17d8: 0x00000000
0x17dc: 0x00000000
0x17e0: 0x00000000
0x17e4: 0x00000000
0x17e8: 0x00000000
0x17ec: 0x00000000
0x17f0: 0x00000000
0x17f4: 0x00000000
0x17f8: 0x00000000
0x17fc: 0x00000000
0x1800: 0x00000000
0x1804: 0x00000000
0x1808: 0x00000000
0x180c: 0x00000000
0x1810: 0x00000000
0x1814: 0x00000000
0x1818: 0x00000000
0x181c: 0x00000000
0x1820: 0x00000000
0x1824: 0x00000000
0x1828: 0x00000000
0x182c: 0x00000000
0x1830: 0x00000000
0x1834: 0x00000000
0x1838: 0x00000000
0x183c: 0x00000000
0x1840: 0x00000000
0x1844: 0x00000000
0x1848: 0x00000000
0x184c: 0x00000000
0x1850: 0x00000000
0x1854: 0x00000000
0x1858: 0x00000000
0x185c: 0x00000000
0x1860: 0x00000000
0x1864: 0x00000000
0x1868: 0x00000000
0x186c: 0x00000000
0x1870: 0x00000000
0x1874: 0x00000000
0x1878: 0x00000000
0x187c: 0x00000000
0x1880: 0x00000000
0x1884: 0x00000000
0x1888: 0x00000000
0x188c: 0x00000000
0x1890: 0x00000000
0x1894: 0x00000000
0x1898: 0x00000000
0x189c: 0x00000000
0x18a0: 0x00000000
0x18a4: 0x00000000
0x18a8: 0x00000000
0x18ac: 0x00000000
0x18b0: 0x00000000
0x18b4: 0x00000000
0x18b8: 0x00000000
0x18bc: 0x00000000
0x18c0: 0x00000000
0x18c4: 0x00000000
0x18c8: 0x00000000
0x18cc: 0x00000000
0x18d0: 0x00000000
0x18d4: 0x00000000
0x18d8: 0x00000000
0x18dc: 0x00000000
0x18e0: 0x00000000
0x18e4: 0x00000000
0x18e8: 0x00000000
0x18ec: 0x00000000
0x18f0: 0x00000000
0x18f4: 0x00000000
0x18f8: 0x00000000
0x18fc: 0x00000000
0x1900: 0x00000000
0x1904: 0x00000000
0x1908: 0x00000000
0x190c: 0x00000000
0x1910: 0x00000000
0x1914: 0x00000000
0x1918: 0x00000000
0x191c: 0x00000000
0x1920: 0x00000000
0x1924: 0x00000000
0x1928: 0x00000000
0x192c: 0x00000000
0x1930: 0x00000000
0x1934: 0x00000000
0x1938: 0x00000000
0x193c: 0x00000000
0x1940: 0x00000000
0x1944: 0x00000000
0x1948: 0x00000000
0x194c: 0x00000000
0x1950: 0x00000000
0x1954: 0x00000000
0x1958: 0x00000000
0x195c: 0x00000000
0x1960: 0x00000000
0x1964: 0x00000000
0x1968: 0x00000000
0x196c: 0x00000000
0x1970: 0x00000000
0x1974: 0x00000000
0x1978: 0x00000000
0x197c: 0x00000000
0x1980: 0x00000000
0x1984: 0x00000000
0x1988: 0x00000000
0x198c: 0x00000000
0x1990: 0x00000000
0x1994: 0x00000000
0x1998: 0x00000000
0x199c: 0x00000000
0x19a0: 0x00000000
0x19a4: 0x00000000
0x19a8: 0x00000000
0x19ac: 0x00000000
0x19b0: 0x00000000
0x19b4: 0x00000000
0x19b8: 0x00000000
0x19bc: 0x00000000
0x19c0: 0x00000000
0x19c4: 0x00000000
0x19c8: 0x00000000
0x19cc: 0x00000000
0x19d0: 0x00000000
0x19d4: 0x00000000
0x19d8: 0x00000000
0x19dc: 0x00000000
0x19e0: 0x00000000
0x19e4: 0x00000000
0x19e8: 0x00000000
0x19ec: 0x00000000
0x19f0: 0x00000000
0x19f4: 0x00000000
0x19f8: 0x00000000
0x19fc: 0x00000000
0x1a00: 0x00000000
0x1a04: 0x00000000
0x1a08: 0x00000000
0x1a0c: 0x00000000
0x1a10: 0x00000000
0x1a14: 0x00000000
0x1a18: 0x00000000
0x1a1c: 0x00000000
0x1a20: 0x00000000
0x1a24: 0x00000000
0x1a28: 0x00000000
0x1a2c: 0x00000000
0x1a30: 0x00000000
0x1a34: 0x00000000
0x1a38: 0x00000000
0x1a3c: 0x00000000
0x1a40: 0x00000000
0x1a44: 0x00000000
0x1a48: 0x00000000
0x1a4c: 0x00000000
0x1a50: 0x00000000
0x1a54: 0x00000000
0x1a58: 0x00000000
0x1a5c: 0x00000000
0x1a60: 0x00000000
0x1a64: 0x00000000
0x1a68: 0x00000000
0x1a6c: 0x00000000
0x1a70: 0x00000000
0x1a74: 0x00000000
0x1a78: 0x00000000
0x1a7c: 0x00000000
0x1a80: 0x00000000
0x1a84: 0x00000000
0x1a88: 0x00000000
0x1a8c: 0x00000000
0x1a90: 0x00000000
0x1a94: 0x00000000
0x1a98: 0x00000000
0x1a9c: 0x00000000
0x1aa0: 0x00000000
0x1aa4: 0x00000000
0x1aa8: 0x00000000
0x1aac: 0x00000000
0x1ab0: 0x00000000
0x1ab4: 0x00000000
0x1ab8: 0x00000000
0x1abc: 0x00000000
0x1ac0: 0x00000000
0x1ac4: 0x00000000
0x1ac8: 0x00000000
0x1acc: 0x00000000
0x1ad0: 0x00000000
0x1ad4: 0x00000000
0x1ad8: 0x00000000
0x1adc: 0x00000000
0x1ae0: 0x00000000
0x1ae4: 0x00000000
0x1ae8: 0x00000000
0x1aec: 0x00000000
0x1af0: 0x00000000
0x1af4: 0x00000000
0x1af8: 0x00000000
0x1afc: 0x00000000
0x1b00: 0x00000000
0x1b04: 0x00000000
0x1b08: 0x00000000
0x1b0c: 0x00000000
0x1b10: 0x00000000
0x1b14: 0x00000000
0x1b18: 0x00000000
0x1b1c: 0x00000000
0x1b20: 0x00000000
0x1b24: 0x00000000
0x1b28: 0x00000000
0x1b2c: 0x00000000
0x1b30: 0x00000000
0x1b34: 0x00000000
0x1b38: 0x00000000
0x1b3c: 0x00000000
0x1b40: 0x00000000
0x1b44: 0x00000000
0x1b48: 0x00000000
0x1b4c: 0x00000000
0x1b50: 0x00000000
0x1b54: 0x00000000
0x1b58: 0x00000000
0x1b5c: 0x00000000
0x1b60: 0x00000000
0x1b64: 0x00000000
0x1b68: 0x00000000
0x1b6c: 0x00000000
0x1b70: 0x00000000
0x1b74: 0x00000000
0x1b78: 0x00000000
0x1b7c: 0x00000000
0x1b80: 0x00000000
0x1b84: 0x00000000
0x1b88: 0x00000000
0x1b8c: 0x00000000
0x1b90: 0x00000000
0x1b94: 0x00000000
0x1b98: 0x00000000
0x1b9c: 0x00000000
0x1ba0: 0x00000000
0x1ba4: 0x00000000
0x1ba8: 0x00000000
0x1bac: 0x00000000
0x1bb0: 0x00000000
0x1bb4: 0x00000000
0x1bb8: 0x00000000
0x1bbc: 0x00000000
0x1bc0: 0x00000000
0x1bc4: 0x00000000
0x1bc8: 0x00000000
0x1bcc: 0x00000000
0x1bd0: 0x00000000
0x1bd4: 0x00000000
0x1bd8: 0x00000000
0x1bdc: 0x00000000
0x1be0: 0x00000000
0x1be4: 0x00000000
0x1be8: 0x00000000
0x1bec: 0x00000000
0x1bf0: 0x00000000
0x1bf4: 0x00000000
0x1bf8: 0x00000000
0x1bfc: 0x00000000
0x1c00: 0x00000000
0x1c04: 0x00000000
0x1c08: 0x00000000
0x1c0c: 0x00000000
0x1c10: 0x00000000
0x1c14: 0x00000000
0x1c18: 0x00000000
0x1c1c: 0x00000000
0x1c20: 0x00000000
0x1c24: 0x00000000
0x1c28: 0x00000000
0x1c2c: 0x00000000
0x1c30: 0x00000000
0x1c34: 0x00000000
0x1c38: 0x00000000
0x1c3c: 0x00000000
0x1c40: 0x00000000
0x1c44: 0x00000000
0x1c48: 0x00000000
0x1c4c: 0x00000000
0x1c50: 0x00000000
0x1c54: 0x00000000
0x1c58: 0x00000000
0x1c5c: 0x00000000
0x1c60: 0x00000000
0x1c64: 0x00000000
0x1c68: 0x00000000
0x1c6c: 0x00000000
0x1c70: 0x00000000
0x1c74: 0x00000000
0x1c78: 0x00000000
0x1c7c: 0x00000000
0x1c80: 0x00000000
0x1c84: 0x00000000
0x1c88: 0x00000000
0x1c8c: 0x00000000
0x1c90: 0x00000000
0x1c94: 0x00000000
0x1c98: 0x00000000
0x1c9c: 0x00000000
0x1ca0: 0x00000000
0x1ca4: 0x00000000
0x1ca8: 0x00000000
0x1cac: 0x00000000
0x1cb0: 0x00000000
0x1cb4: 0x00000000
0x1cb8: 0x00000000
0x1cbc: 0x00000000
0x1cc0: 0x00000000
0x1cc4: 0x00000000
0x1cc8: 0x00000000
0x1ccc: 0x00000000
0x1cd0: 0x00000000
0x1cd4: 0x00000000
0x1cd8: 0x00000000
0x1cdc: 0x00000000
0x1ce0: 0x00000000
0x1ce4: 0x00000000
0x1ce8: 0x00000000
0x1cec: 0x00000000
0x1cf0: 0x00000000
0x1cf4: 0x00000000
0x1cf8: 0x00000000
0x1cfc: 0x00000000
0x1d00: 0x00000000
0x1d04: 0x00000000
0x1d08: 0x00000000
0x1d0c: 0x00000000
0x1d10: 0x00000000
0x1d14: 0x00000000
0x1d18: 0x00000000
0x1d1c: 0x00000000
0x1d20: 0x00000000
0x1d24: 0x00000000
0x1d28: 0x00000000
0x1d2c: 0x00000000
0x1d30: 0x00000000
0x1d34: 0x00000000
0x1d38: 0x00000000
0x1d3c: 0x00000000
0x1d40: 0x00000000
0x1d44: 0x00000000
0x1d48: 0x00000000
0x1d4c: 0x00000000
0x1d50: 0x00000000
0x1d54: 0x00000000
0x1d58: 0x00000000
0x1d5c: 0x00000000
0x1d60: 0x00000000
0x1d64: 0x00000000
0x1d68: 0x00000000
0x1d6c: 0x00000000
0x1d70: 0x00000000
0x1d74: 0x00000000
0x1d78: 0x00000000
0x1d7c: 0x00000000
0x1d80: 0x00000000
0x1d84: 0x00000000
0x1d88: 0x00000000
0x1d8c: 0x00000000
0x1d90: 0x00000000
0x1d94: 0x00000000
0x1d98: 0x00000000
0x1d9c: 0x00000000
0x1da0: 0x00000000
0x1da4: 0x00000000
0x1da8: 0x00000000
0x1dac: 0x00000000
0x1db0: 0x00000000
0x1db4: 0x00000000
0x1db8: 0x00000000
0x1dbc: 0x00000000
0x1dc0: 0x00000000
0x1dc4: 0x00000000
0x1dc8: 0x00000000
0x1dcc: 0x00000000
0x1dd0: 0x00000000
0x1dd4: 0x00000000
0x1dd8: 0x00000000
0x1ddc: 0x00000000
0x1de0: 0x00000000
0x1de4: 0x00000000
0x1de8: 0x00000000
0x1dec: 0x00000000
0x1df0: 0x00000000
0x1df4: 0x00000000
0x1df8: 0x00000000
0x1dfc: 0x00000000
0x1e00: 0x00000000
0x1e04: 0x00000000
0x1e08: 0x00000000
0x1e0c: 0x00000000
0x1e10: 0x00000000
0x1e14: 0x00000000
0x1e18: 0x00000000
0x1e1c: 0x00000000
0x1e20: 0x00000000
0x1e24: 0x00000000
0x1e28: 0x00000000
0x1e2c: 0x00000000
0x1e30: 0x00000000
0x1e34: 0x00000000
0x1e38: 0x00000000
0x1e3c: 0x00000000
0x1e40: 0x00000000
0x1e44: 0x00000000
0x1e48: 0x00000000
0x1e4c: 0x00000000
0x1e50: 0x00000000
0x1e54: 0x00000000
0x1e58: 0x00000000
0x1e5c: 0x00000000
0x1e60: 0x00000000
0x1e64: 0x00000000
0x1e68: 0x00000000
0x1e6c: 0x00000000
0x1e70: 0x00000000
0x1e74: 0x00000000
0x1e78: 0x00000000
0x1e7c: 0x00000000
0x1e80: 0x00000000
0x1e84: 0x00000000
0x1e88: 0x00000000
0x1e8c: 0x00000000
0x1e90: 0x00000000
0x1e94: 0x00000000
0x1e98: 0x00000000
0x1e9c: 0x00000000
0x1ea0: 0x00000000
0x1ea4: 0x00000000
0x1ea8: 0x00000000
0x1eac: 0x00000000
0x1eb0: 0x00000000
0x1eb4: 0x00000000
0x1eb8: 0x00000000
0x1ebc: 0x00000000
0x1ec0: 0x00000000
0x1ec4: 0x00000000
0x1ec8: 0x00000000
0x1ecc: 0x00000000
0x1ed0: 0x00000000
0x1ed4: 0x00000000
0x1ed8: 0x00000000
0x1edc: 0x00000000
0x1ee0: 0x00000000
0x1ee4: 0x00000000
0x1ee8: 0x00000000
0x1eec: 0x00000000
0x1ef0: 0x00000000
0x1ef4: 0x00000000
0x1ef8: 0x00000000
0x1efc: 0x00000000
0x1f00: 0x00000000
0x1f04: 0x00000000
0x1f08: 0x00000000
0x1f0c: 0x00000000
0x1f10: 0x00000000
0x1f14: 0x00000000
0x1f18: 0x00000000
0x1f1c: 0x00000000
0x1f20: 0x00000000
0x1f24: 0x00000000
0x1f28: 0x00000000
0x1f2c: 0x00000000
0x1f30: 0x00000000
0x1f34: 0x00000000
0x1f38: 0x00000000
0x1f3c: 0x00000000
0x1f40: 0x00000000
0x1f44: 0x00000000
0x1f48: 0x00000000
0x1f4c: 0x00000000
0x1f50: 0x00000000
0x1f54: 0x00000000
0x1f58: 0x00000000
0x1f5c: 0x00000000
0x1f60: 0x00000000
0x1f64: 0x00000000
0x1f68: 0x00000000
0x1f6c: 0x00000000
0x1f70: 0x00000000
0x1f74: 0x00000000
0x1f78: 0x00000000
0x1f7c: 0x00000000
0x1f80: 0x00000000
0x1f84: 0x00000000
0x1f88: 0x00000000
0x1f8c: 0x00000000
0x1f90: 0x00000000
0x1f94: 0x00000000
0x1f98: 0x00000000
0x1f9c: 0x00000000
0x1fa0: 0x00000000
0x1fa4: 0x00000000
0x1fa8: 0x00000000
0x1fac: 0x00000000
0x1fb0: 0x00000000
0x1fb4: 0x00000000
0x1fb8: 0x00000000
0x1fbc: 0x00000000
0x1fc0: 0x00000000
0x1fc4: 0x00000000
0x1fc8: 0x00000000
0x1fcc: 0x00000000
0x1fd0: 0x00000000
0x1fd4: 0x00000000
0x1fd8: 0x00000000
0x1fdc: 0x00000000
0x1fe0: 0x00000000
0x1fe4: 0x00000000
0x1fe8: 0x00000000
0x1fec: 0x00000000
0x1ff0: 0x00000000
0x1ff4: 0x00000000
0x1ff8: 0x00000000
0x1ffc: 0x00000000
离线
司徒目前整合的差不多了,按鍵、顯示、聲音都可以運作,細節部份,司徒還要在測試一下,不過,由於缺少屏的相關控制以及同步,閃屏蠻嚴重的,在沒有TE腳位的協助,司徒將屏的輸出調整到60Hz,不過,從下圖可以看出,屏的掃描跟60Hz差距頗大,司徒需要在想一下如何調整到比較好的狀態
目前司徒整合Jutleys PocketGo v1.3.3整合包,畫面算是美觀,不過缺少中文化支援,這部份司徒還需要想一下
紀錄一下目前PCSX鐵拳3,在沒有超頻的狀態下,關閉Frameskip,大約跑在39 fps
司徒預計將系統狀態調整到比較可玩的狀態下才發布,需要一些時間
离线
為了感謝芒果兄弟的慘烈付出,司徒決定也幫FC3000超渡一下,於是,文章繼續往下走
目前兩顆電阻都是25K,因此,電壓:0.6 * (25K / 25K) + 0.6 = 1.2V
解焊
司徒換上,如下電阻,電壓:0.6 * (442K / 160K) + 0.6 = 2.2575V
量測後,竟然差了0.2V
CPU=672MHz (39 fps, CPU=98%),PS1 鐵拳3 (關閉FramesSkip)
CPU=1500MHz (50 fps, CPU=97%),PS1 鐵拳3 (關閉FramesSkip),相較於672MHz,提昇11 fps,不過3D遊戲,沒有參考價值
CPU=672MHz (40 fps, CPU=96%),PS1 機器人大戰F (關閉FramesSkip)
CPU=1500MHz (56 fps, CPU=94%),PS1 機器人大戰F (關閉FramesSkip),相較於672MHz,提昇16 fps,具有參考價值
結論:
2.05V下,目前司徒最高只能讓FC3000超頻到1536MHz,機器不會燙,對於PS1 2D遊戲明顯提昇,相信對於其它模擬器,也是會有相當提昇
离线
司徒竟然忘記PS1最基本的2D測試是惡魔城,哈,於是,司徒補測一下數據,不過,目前FC3000掌機的MicroSD只有1bit的存取速度,加上F1C100S的RAM只有32MB,因此,後續的小米柚(PocketGo)看來頗有看頭,假定跑1.5GHz,順暢PS1 2D遊戲,看來頗有機會,哈哈~
CPU=672MHz (FPS=60, CPU=97%),關閉FrameSkip
CPU=1.5GHz (FPS=60, CPU=72%),關閉FrameSkip,這個CPU使用率才是真的可以跑順遊戲
离线
@xboot
大佬你一出手,果然厲害,TRIMUI瞬間變成超級賽亞人~
把back_porch縮小就可以~感謝你的XBOOT
"fb-f1c200s@0": {
"clock-name-defe": "link-defe",
"clock-name-debe": "link-debe",
"clock-name-tcon": "link-tcon",
"reset-defe": 46,
"reset-debe": 44,
"reset-tcon": 36,
"width": 320,
"height": 240,
"physical-width": 41,
"physical-height": 31,
"clock-frequency": 19000000,
"hfront-porch": 749,
"hback-porch": 2,
"hsync-len": 18,
"vfront-porch": 36,
"vback-porch": 0,
"vsync-len": 4,
"hsync-active": false,
"vsync-active": false,
"den-active": true,
"clk-active": true,
"backlight": "led-pwm-bl.0"
},
离线
既然XBOOT大佬都說有加密IC在I2C-2上面,司徒只好找一下,給個交待,於是故事繼續往下走...
XBOOT大佬說有一顆加密IC而且是透過I2C介面傳輸,於是搜尋一下I2C字眼
$ grep -i i2c usr/trimui/ -r
Binary file usr/trimui/bin/MainUI matches
Binary file usr/trimui/apps/cdogs/music/game/space_dimensions_8bit.ogg matches
Binary file usr/trimui/lib/libarelink.so matches
P.S. 原來是Arelink安瑞易连,哈
接著開啟libarelink.so,果真有I2C副程式
發現寶庫
開啟MainUI去找尋arelink_req_enc_dec就可以看到關鍵字/tmp/.cmdenc
再度搜尋一下
$ grep cmdenc . -r
Binary file ./usr/trimui/bin/MainUI matches
Binary file ./root/gameloader matches
./etc/init.d/main: if [ -f /tmp/.cmdenc ] ; then
./main: if [ -f /tmp/.cmdenc ] ; then
P.S. /etc/init.d/main
/etc/init.d/main
if [ -f /tmp/.cmdenc ] ; then
/root/gameloader
elif [ -f /tmp/cmd_to_run.sh ] ; then
chmod a+x /tmp/cmd_to_run.sh
/tmp/cmd_to_run.sh
rm /tmp/cmd_to_run.sh
fi
P.S. 原來是透過gameloader做後續的動作,哈
開啟gameloader就可以看到/tmp/.cmdenc相關資訊,而且長度是256,哈
於是,司徒修改測試
if [ -f /tmp/.cmdenc ] ; then
dd if=/dev/urandom of=/tmp/.cmdenc bs=1 count=256
/root/gameloader
接著,司徒使用FC 1942遊戲測試
trimui_sunxi_gpio_init: ver Aug 1 2020
serial: 00000002ED
file /tmp/.cmdenc len=256
DEC1: Nz1=v.N>ZTOZ>F੨R.u
[ 17.423914] write len=256
[ 17.820278] exec! there result of call_usermodehelper is 0
[ 17.826401] exec! the process is "gameloader", pid is 183.
[ 17.832694] BASE64:0wiSJBoxSQ/reYr9IPNlu0XPhZ3kv6xh0WwuWz36EDlzvzxTFL+JUQCWXtSWVLJQ1rwI+4Ul3yGYusGOe9GNvWf+X46ZmNg7J8xXuYcc1BNn/l+OmZjYOyfMV7mHHNQTZ/5fjpmY2DsnzFe5hxzUE2f+X46ZmNg7J8xXuYc=
bye
P.S. 加密禁忌就是輸出挑戰的訊息,哈
拿掉測試那行,重新載入FC 1942遊戲,則顯示如下
trimui_sunxi_gpio_init: ver Aug 1 2020
serial: 00000002ED
file /tmp/.cmdenc len=256
DEC1: cd /usr/trimui/bin/;HOME=/mnt/SDCARD/Roms/FC/ /usr/trimui/bin/fceux "/mnt/SDCARD/Roms/FC//1942[MS漢化](JU)[STG](0.31Mb).nes"
[ 25.267101] write len=256
/tmp/.cmdenc
於是,司徒找了一下MainUI,再度發現了寶庫
接著把呼叫加解密Patch成NOP
接著測試一下
Load nes rom cd /usr/trimui/bin/;HOME=/mnt/SDCARD/Roms/FC/ /usr/trimui/bin/fceux "/mnt/SDCARD/Roms/FC//1942[MS漢化](JU)[STG](0.31Mb).nes"
sth wrong, encoded != decoded !!!!
接著看一下MainUI寫出的檔案
# ls -al
drwxrwxrwt 3 root root 120 Jan 1 00:00 .
drwxr-xr-x 19 root root 4096 Jan 1 00:00 ..
-rw-r--r-- 1 root root 256 Jan 1 00:00 decode
-rw-r--r-- 1 root root 256 Jan 1 00:00 encode
-rw-r--r-- 1 root root 424 Jan 1 00:00 game_output.txt
drwxr-xr-x 2 root root 60 Jan 1 00:00 log
# cat /tmp/encode
g_;'Wg_;'Wg_;'Wg_;'Wg_;'Wg_;'Wg_;'Wg_;'Wg_;'Wg_;'Wg_;'Wg_;'W
# cat /tmp/decode
/mnt/SDCARD/Roms/FC//1942[MS漢化](JU)[STG](0.31Mb).nes
接著修改一下
if [ -f /tmp/.cmdenc ] ; then
echo "#!/bin/sh" > /tmp/run.sh
echo "cd /usr/trimui/bin/;HOME=/mnt/SDCARD/Roms/FC/ /usr/trimui/bin/fceux \"" >> /tmp/run.sh
cat /tmp/decode >> /tmp/run.sh
echo "\"" >> /tmp/run.sh
chmod +x /tmp/run.sh
/tmp/run.sh
#/root/gameloader
elif [ -f /tmp/cmd_to_run.sh ] ; then
chmod a+x /tmp/cmd_to_run.sh
/tmp/cmd_to_run.sh
rm /tmp/cmd_to_run.sh
fi
接著,再度載入FC 1942遊戲,成功繞過加密IC
离线
@zpyws
找一台自己喜愛的外觀就可以,不好意思,我無法給你建議~
正所謂:有志者、事竟成,經過幾天糞戰後,第一版TFT FC3000刷機包終於出爐,由於FC3000官方系統的模擬器還不錯,司徒為了保留這項特色,特別設計了多重開機選單,結果搞死自己~不知為何,始終無法在MicroSD啟動狀態下,再去啟動SPI官方系統,也感謝暈哥提供很多協助以及資訊,不過,最終還是失敗,終於有一天司徒在夢境之中,夢到司徒小時候的哺乳畫面~這...,聽說夢境跟現實是相反的,難道這是叫司徒去吃屎的意思嗎?最後,司徒終於領悟了,必須用力使出吃奶的力氣,這才發現,在MicroSD啟動下,可以直接呼叫BROM去載入SPI Flash (ldr pc, =0xffff4110),藉此跳轉從SPI啟動
.try_boot_SPINOR:
ffff4110: eb0006e6 bl load_from_spinor ; load SPL from SPI NOR-flash
ffff4114: e1a04000 mov r4, r0 ; r4 = load_from_spinor();
ffff4118: e3540000 cmp r4, #0x0 ; see if load_from_spinor returned 0
ffff411c: 1a000000 bne .none_found ; if load_from_spinor returned 0 boot from FEL mode (via .none_found)
ffff4120: ea000003 b .boot ; else skip to .boot_spl
目前小橫米系統有兩個主要底包,一個是中文化系統,由江西恐龍製作,雖然這人不好相處,不過倒是蠻熱心,另一個則是Jutleys製作,該包主要以英文語言為主,相當感謝兩位的熱心付出,在此,給予最高敬意,也感謝社群的協助,因此,司徒基於這兩個底包,幫FC3000掌機製作了兩個刷機包
江西恐龍刷機包:https://github.com/steward-fu/fc3000/releases/download/v1.0/fc3000_tft_od_jckl_no_roms.img.7z
Jutleys刷機包:https://github.com/steward-fu/fc3000/releases/download/v1.0/fc3000_tft_od_jutleys_no_roms.img.7z
P.S. 第一分割區目前只有256MB,第二個分割區有1.7GB,使用者可以都自己調整,只要把檔案先複製出來,調整後,在複製回去就好,記得最前面的32MB檔頭不能刪除,第一個分割區放官方系統遊戲,第二個分割區放OpenDingux系統的東西以及遊戲
刷入MicroSD後,開機畫面如下,可以:A鍵.進入原廠系統、B鍵.進入OpenDingux系統、X鍵.刷入V1官方系統、Y鍵.刷入V2官方系統
此刷機包是司徒利用空閒時間製作,嚴禁使用於商業用途,無法同意者,請不要使用
江西恐龍刷機包
Jutleys刷機包
仙劍奇俠傳
怒鐵
DOOM
究竟怎樣的系統才可以稱呼OpenDingux呢?這問題司徒也不知道,不過,司徒這一次把系統製作成SQUASHFS,避免容易發生卡崩的問題,使用的Loader則是OpenDingux的Mininit,因此,司徒稱呼這個系統為OpenDingux系統,應該是可以的~由於,小橫米的按鍵雜亂,這問題目前也發生在FC3000身上,不過,作為折騰的機器,應該是可以接受的,接著,如果熱愛超頻的玩家,可以好好把玩看看,測試一下PS1鐵拳3,最高可以跑到多少FPS~
快速按鍵:
MENU + Y(亮度變暗)
MENU + X(亮度變亮)
离线
司徒的小橫米(PocketGo)終於到貨了,下單一個月後,終於到司徒手上,不知道的人還以為是從火星發過來的~可惜,屏越來越差了~還有漏光問題,司徒有點失望,不過,路還是要繼續往下走,於是,接著登場的則是Q8掌機,這掌機的硬件,基本上跟小橫米很相似,是一台適合研究學習的機器,但是,不是一台可以拿來玩遊戲的機器,所以司徒會盡量簡單帶過,司徒會把重心放在TRIMUI和小橫米身上,畢竟這兩台是比較可以拿來玩遊戲的掌機~
屏視角
拆機
這個屏的腳位跟FC3000一樣
GB1 ZH1901MP02C,其實就是F1C100S
為了可以透過USB燒錄,需要修復電路,USB預設並沒有連接,而且有一些下拉電阻
移除兩顆下拉電阻後,短路DM、DP的接線
短路SPI Flash第一腳位和第二腳位,接著連接USB
$ lsusb
Bus 001 Device 074: ID 1f3a:efe8 Onda (unverified) V972 tablet in flashing mode
UART1位置
离线
Q8掌機的腳位如下
UP PE10
DOWN PE9
LEFT PE8
RIGHT PE7
A PE2
B PA0
X PE3
Y PD0
SELECT PA1(1V)
START PA1(0V)
L PE12
R PD9
VOL PA1(2V)
LCD BK PE6
LCD RST PE11
LCD CS PD21
LCD RD PD20
LCD RS PD19
LCD WR PD18
LCD DB11 PD13
LCD DB12 PD14
LCD DB13 PD15
LCD DB14 PD16
LCD DB15 PD17
LCD DB5 PD6
LCD DB6 PD7
LCD DB7 PD8
LCD DB8 PD10
LCD DB9 PD11
LCD DB10 PD12
LCD DB0 PD1
LCD DB1 PD2
LCD DB2 PD3
LCD DB3 PD4
LCD DB4 PD5
SPI Flash CS PC1
SPI Flash MISO PC2
SPI Flash MOSI PC3
SPI Flash SCK PC0
MicroSD D0 PF1
MicroSD D1 PF0
MicroSD D2 PF5
MicroSD D3 PF4
MicroSD CLK PF2
MicroSD CMD PF3
离线
Q8點屏
測試代碼
.global _start
.equiv PIO_BASE, 0x01c20800
.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 << 11)
.equiv LCD_BL, (1 << 6)
.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]
ldr r1, =0x00111111
str r1, [r4, #PIO_CFG2]
ldr r4, =PIO_BASE + PE
ldr r1, [r4, #PIO_CFG0]
bic r1, #0xf000000
orr r1, #0x1000000
str r1, [r4, #PIO_CFG0]
ldr r1, [r4, #PIO_CFG1]
bic r1, #0xf000
orr r1, #0x1000
str r1, [r4, #PIO_CFG1]
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, =0xb9
bl lcd_cmd
ldr r0, =0xff
bl lcd_dat
ldr r0, =0x83
bl lcd_dat
ldr r0, =0x57
bl lcd_dat
ldr r0, =1000
bl delay
ldr r0, =0xb6
bl lcd_cmd
ldr r0, =0x2c
bl lcd_dat
ldr r0, =0x11
bl lcd_cmd
ldr r0, =1000
bl delay
ldr r0, =0x35
bl lcd_cmd
ldr r0, =0x3a
bl lcd_cmd
ldr r0, =0x05
bl lcd_dat
ldr r0, =0x36
bl lcd_cmd
ldr r0, =0x38
bl lcd_dat
ldr r0, =0xb0
bl lcd_cmd
ldr r0, =0x68
bl lcd_dat
ldr r0, =0x2b
bl lcd_cmd
ldr r0, =0x00
bl lcd_dat
ldr r0, =0x00
bl lcd_dat
ldr r0, =0x01
bl lcd_dat
ldr r0, =0x3f
bl lcd_dat
ldr r0, =0x2a
bl lcd_cmd
ldr r0, =0x00
bl lcd_dat
ldr r0, =0x00
bl lcd_dat
ldr r0, =0x01
bl lcd_dat
ldr r0, =0xdf
bl lcd_dat
ldr r0, =0x29
bl lcd_cmd
ldr r0, =0x2c
bl lcd_cmd
ldr r4, =320*80
ldr r5, =0xf800
0:
mov r0, r5
bl lcd_dat
subs r4, #1
bne 0b
ldr r4, =320*80
ldr r5, =0x7e0
0:
mov r0, r5
bl lcd_dat
subs r4, #1
bne 0b
ldr r4, =320*80
ldr r5, =0x1f
0:
mov r0, r5
bl lcd_dat
subs r4, #1
bne 0b
b .
delay:
push {lr}
0:
subs r0, #1
bne 0b
pop {pc}
lcd_rst:
push {r4, r5, lr}
ldr r4, =PIO_BASE + PE
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 r2, r0, #0x00ff
and r3, r0, #0xff00
lsl r2, #1
lsl r3, #2
eor r5, r5
orr r5, r1
orr r5, r2
orr r5, r3
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
离线
@akting
很抱歉目前沒有辦法
目前基於FC3000的資源,司徒幫Q8掌機製作了兩個客製化系統,不過,不建議拿來玩遊戲,比較適合研究使用...
江西恐龍刷機包:https://github.com/steward-fu/q8/releases/download/v1.0/q8_od_jckl_no_roms.img.7z
Jutleys刷機包:https://github.com/steward-fu/q8/releases/download/v1.0/q8_od_jutleys_no_roms.img.7z
燒錄到MicroSD即可
江西恐龍底包
Jutleys底包
仙劍奇俠傳
怒鐵
相信大家一定很好奇,司徒都說Q8只適合研究不適合玩遊戲,那為何司徒還要幫Q8做刷機包呢?此奶天生我才必有用,Q8就是在幫小橫米鋪路,因為比較恐怖的測試,司徒不敢在小橫米上測試,畢竟司徒可不想再下單一台,因為那又要等一個月了...,因此,勇敢的Q8再度佔了出來,司徒幫它量一下身高體重,果然是標準的1.14V
兩顆電阻都是156K
替換成160K和442K電阻
電壓2.23V
PS1 惡魔城,CPU=672MHz,關閉FrameSkip,54 FPS,CPU=95%
PS1 鐵拳3,CPU=672MHz,關閉FrameSkip,36 FPS,CPU=96%
PS1 惡魔城,CPU=1536MHz,關閉FrameSkip,60 FPS,CPU=75%
PS1 鐵拳3,CPU=1536MHz,關閉FrameSkip,40 FPS,CPU=94%
PS1 惡魔城,CPU=1632MHz,關閉FrameSkip,60 FPS,CPU=59%
PS1 鐵拳3,CPU=1632MHz,關閉FrameSkip,44 FPS,CPU=96%
CORE-VDD電壓是影響溫度的關鍵,司徒即使跑960MHz,還是感覺有點溫熱...
結論:經由FC3000和Q8測試得到的數據,顯示RAM不足是一個問題,即使Q8已經是MicroSD 4 bits速度,跑出來的效果跟FC3000差別不大,而CPU速度再往上超頻時,FPS漂移更嚴重,代表SWAP已經不敷使用,因此,如何優化算法,在這種低階CPU更顯重要
离线