Sonic π ︰ 久違了◎

《題閱歲亭》宋.吳芾

歲月催人老,
少年安在哉。
羡君杯酒里,
日日見花開。

如果○說話!人們聽的懂嗎?如果人聽不懂!那○話是□言嗎??

……

該怎麼去講學會語言之事,到底語法、語義

語義學

語義學(英語:Semantics,法語:La sémantique),也作「語意學」,是一個涉及到語言學邏輯學計算機科學自然語言處理認知科學心理學等諸多領域的一個術語。雖然各個學科之間對語義學的研究有一定的共同性,但是具體的研究方法和內容大相逕庭。語義學的研究對象是自然語言的意義,這裡的自然語言可以是詞彙,句子,篇章等等不同級別的語言單位。但是各個領域裡對語言的意義的研究目的不同:

  • 語言學的語義學研究目的在於找出語義表達的規律性、內在解釋、不同語言在語義表達方面的個性以及共性;
  • 邏輯學的語義學是對一個邏輯系統的解釋,著眼點在於真值條件,不直接涉及自然語言;
  • 計算機科學相關的語義學研究在於機器對自然語言的理解;
  • 認知科學對語義學的研究在於人腦對語言單位的意義的存儲及理解的模式。

語義學的建立以法國學者米歇爾·布勒阿爾(Micchel Bréal)1897年出版的《語義學探究》(Essai de Sémantiqus)一書為標誌。

和語義學經常混淆的一個術語是符號學,二者沒有直接的聯繫。(關於符號學的具體內容,請參見相關條目。)

另外需要指出的是美國的general semantics,其主旨與語義學沒有直接聯繫,general semantics這方面的著作比如有早川一會的《語言行動》(Language in Action)、《語言與人生》(Language in Thought and Action)。

語言學的語義學

若從嚴格意義上的語言學研究來分類,在現代語言學的語義學中,可以分為結構主義的語義學研究和生成語言學的語義學研究。

結構主義語義學是從20世紀上半葉以美國為主的結構主義語言學發展而來的,研究的內容主要在於詞彙的意義和結構,比如說義素分析,語義場,詞義之間的結構關係等等。這樣的語義學研究也可以稱為詞彙語義學,詞和詞之間的各種關係是詞彙語義學研究的一個方面,例如同義詞反義詞同音詞等,找出詞語之間的細微差別。

生成語義學是20世紀六七十年代流行於生成語言學內部的一個語義學分支,是介於早期的結構主義語言學和後來的形式語義學之間的一個理論陣營。生成語義學借鑑了結構語義學對義素的分析方法,比照生成音系學音位區別特徵理論,主張語言的最深層的結構是義素,通過句法變化和詞彙化的各種手段而得到表層的句子形式。

形式語義學是從20世紀70年代開始發展出來的一個理論陣營。最初的研究開始於蒙太古數理邏輯方 法對英語的研究,後來經過語言學家和哲學家的共同努力,發展成為一個獨立的學科,並且摒棄了蒙太古對生成語言學的句法學的忽視,強調語義解釋和句法結構的 統一,從而最終成為生成語言學的語義學分支。現今的形式語義學的研究在歐美的語言學系都很繁榮,喬姆斯基作出了大量貢獻。哲學系對形式語義學的研究已經漸漸失去了原有的興趣,進而轉向了心靈哲學的研究。

 

熟先熟後的呢??

What’s a computer Language For Kids

的耶!!

─── 《L4K ︰ 語意學★☆

 

是否

美麗的誤會『比』殘忍的實情『好』呢?

很難『一言以敝之』回答也!

有人說樹莓派的『派』 Pi 字︰

樹莓派

詞源

Rapberry(樹莓)源於對微型電腦以水果為基礎命名的傳統。如蘋果機

Pi(派)代表「Python」。因為Python是第一個移植到樹莓派上執行的程式。

 

代表『 Python 』派生,那怎麼解釋那『 i 』呢?直指它『解譯器』也行也!?

作者『L4K』 Language For Kids 文本系列裡雖先寫,恐因與 sonic π 緣份似不足呦?!

縱心儀之︰

孔子學琴為何專注於一首??

孔子學琴於師襄子,襄子曰:『吾雖以擊磬為官,然能於琴,今子於琴已習,可以益矣。』孔子曰:『丘未得其數也。』有間,曰:『已習其數,可以益矣。』孔子曰:『丘未得其志也。』有間,曰:『已習其志,可以益矣。』孔子曰:『丘未得其為人也。』有間,孔子有所謬然思焉,有所睪然高望而遠眺。曰:『丘迨得其為人矣。近黮而黑,頎然長,曠如望羊,奄有四方,非文王其孰能為此?』師襄子避席葉拱而對曰:『君子,聖人也,其傳曰《文王操》。』 ── 《孔子家語‧辨樂解第三十五

之前我們在《走進音樂世界!!》一文中 介紹過英國劍橋大學 Dr . Sam Aaron 博士,Sonic π 的作者,他的『音樂程式』理念是︰

那兒並沒有錯誤

There are no mistakes
Before we start, let me just give you one piece of advice I’ve learned over my years of live coding with music – there are no mistakes, only opportunities. This is something I’ve often heard in relation to jazz but it works equally well with live coding. No matter how experienced you are – from a complete beginner to a seasoned Algoraver, you’ll run some code that has a completely unexpected outcome. It might sound insanely cool – in which case run with it. However, it might sound totally jarring and out of place. It doesn’t matter that it happened – what matters is what you do next with it. Take the sound, manipulate it and morph it into something awesome. The crowd will go wild.

現今『 Sonic π 』2.0 版已經正式發布,據聞將用於英國 KS3 ── 十一歲到十三歲 ── 的『程式語言』教育之中。它的主要『學習目標』是︰

Computer Science concepts:

Sequencing
Debugging
Iteration
Conditionals
Data Structures
Algorithms
Functions
Concurrency

計算機科學概念

編序
除錯
疊代
條件轉移
資料結構
演算法
函式
並行性

Sonic Pi(在 raspberrypi)_069

學習』需是要『溫故知新』,須能夠『專心致志』,方才可『精博通達』。就讓我們藉著『音樂』去悠遊『程式』一番,再次發現自然裡『聲音的宇宙』。

─── 摘自《SONIC Π 知音?!

 

每每想提筆總遇程式出狀況之時☻

故久違至今了◎

 

 

 

 

 

 

 

 

童玩伴歲月︰反思

游

遊

戲

詩經《秦風‧蒹葭

蒹葭蒼蒼,白露為霜。所謂伊人,在水一方。
溯洄從之,道阻且長。溯游從之,宛在水中央。

蒹葭萋萋,白露未晞。所謂伊人,在水之湄。
溯洄從之,道阻且躋。溯游從之,宛在水中坻。

蒹葭采采,白露未已。所謂伊人,在水之涘。
溯洄從之,道阻且右。溯游從之,宛在水中沚。

杜甫《江畔獨步尋花

黃四娘家花滿蹊, 千朵萬朵壓枝低。

留連戲蝶時時舞, 自在嬌鶯恰恰啼。

巴斯卡認為有兩種心靈︰『幾何心靈』與『纖細心靈』。也許那『沉思者』既是『思考之蘆葦』又是『靜默的蒹葭』。或許這個世界『理性』與『感性』的『平衡發展』越來越重要。然而從現今的『教育實況』來看,要實現可能十分困難。假使自盧梭所寫的《愛彌兒》︰

愛彌兒是一本關於『人類天性』的『哲學故事』,致力於探究那些『個人與社會』關係之『政治和哲學』的問題;其內容特別注重『一個人』如何能夠在『不可避免趨於墮落』的社會中,還可以保持著『天性中的良善』。

距今已近三百年。縱使『愛的教育』喊的震天嘎響,事實上工商的社會,美式化小家庭的制度,怎麽談《誰來啟蒙?》的問題呢?如果說是『愛的結晶』,父母之『心肝寶貝』的『教養』,在今天這麼一個『經濟掛帥』的時代,真實又能解決了多少『悲慘』的呢?假使講『心肝寶貝』雖然並不應該『寵愛』,但卻能夠不『疼惜』的嗎?任一『兒童』不能也不該是『家庭』或『社會』的『資產』的吧!更不應也不許只用『法律』來保障,卻沒有歡樂的『童年』的吧!!改朝換代的『流血革命』是時代的『悲劇』,活於『爭強圖勝』的世界,果真就如魚得水的嗎?即使『天下都曰不可』,又『誰能改變天下』的呢??要是說『親子的互動』已然祇是一種社會所公認的『 SOP 』作法,那麼人果真可以『愛自己』的嗎?果真能夠『愛他人』的嗎??

先知啊!您說的是……真的嗎?!

哥林多前書‧第十三章

我若能說萬人的方言,並天使的話語,卻沒有愛,我就成了鳴的鑼 ,響的鈸一般。

……… 《玩遊戲有何不好??Α

 

今天之『地球村』似乎漸漸失去了祥和?不知是否是『經濟掛帥』的時代,慢慢產生『價值觀』失衡所引起的??

誰講

經濟不重要!問題是

經濟是價值之一,而不是唯一!雖然可能是最為重要的價值也!!

大多數『愛彌兒』的父母們,無暇陪伴小孩成長,共享歡樂時光☻或許我們該講『親子電腦』 Family Computer 之時代︰

紅白機

上:日版遊戲機及控制器
下:美版遊戲機及控制器

紅白機任天堂生產的8位元家用遊戲機。遊戲機於1983年7月15日在日本以「Family Computer」(ファミリーコンピュータ,簡稱「Famicom」或「FC」)為名推出,1985年起在歐美以「Nintendo Entertainment System」(簡稱「NES」)為名發行。紅白機是當時最暢銷的遊戲機,全球累計銷量超過了6100萬台。紅白機出現對電子遊戲產生了十分深遠的影響,讓美國電子遊戲界從1983年的崩潰中恢復過來,也奠定了任天堂在當今遊戲界的地位。遊戲機的後續機種為1990年推出的超級任天堂

 

已經遠離★

倘再加上遊戲『上癮』及『模仿』隱憂,因此開始懷疑反思

玩遊戲又有什麼好呢?!

柯靈烏於《歷史的理念》一書中講︰

基於自然的『人性』,人的『同理心』和『同感心』是否能夠用著『想像力』的翅膀重回『歷史的現場』,再次在心中『重演』那些『歷史事件』,『體驗』事件中人物的『思想』以及『情感』,因此『解讀』歷史事件中的『人性抉擇』之理性『必然性』。

《說文解字》講:游,旌旗之流也。戲,三軍之偏也。一曰兵也。

600px-Two_baby_game

 

德國詩人和劇作家席勒提出『遊戲』之理論。席勒說:『只有當人充分是人的時候,他才遊戲;只有當人遊戲的時候,他才完全是人。』。或許人類在生活中勢必受到『精神』與『物質』的雙重『束縛』,因而喪失了『理想』和『自由』。於是人們假借剩下的精力打造一個『自在』的國度,這就是『遊戲』。此種『創造性』活動,源自人類的『本能』。

這些年來,有學者指出『數位遊戲式學習』 Digital game based learning 的好處。經由『遊戲』進行『學習』,達到『寓教於樂』的目的。就像一九九六年,美國喬治亞大學 Hogle J. G. 在《 Considering Games as Cognitive Tools:  In Search of Effective “Edutainment” 》論文中談及遊戲對於學習的諸多優點:

一、提高學習的樂趣,引發內在的動機。

二、故事般情節,能夠強化記憶。

三、可以重複操作,產生回饋。經由多次練習,促進目標的達成。

四、符應人類認知結構之場景,提供高層次的思考機會。

然而『教育的問題』並非只在於『科技之應用』的有無,比方說,美國科羅拉多大學的 PhET Physics Education Technology 計劃,雖然發表了許多『互動式』學習軟體,據聞推動的尚不成功。為什麼呢?假使僅有『軟體』,卻缺乏適當的『教師』,即使是輔之以科技的『工具』,恐怕還不能夠『自行』的吧!或許也還需要『整體規劃』之『教材』的吧!!因此『給根釣竿』的作法,能比『給一條魚』又好多少呢?假使父母想將『教育』的重責大任,歸之於『老師』和『社會』,那麼『心肝寶貝』難道不擔心有『失學』的『風險』嗎??

如果我們希望『兒童』學會『獨立自主』,那就從小『引導』他作『選擇』,而不是替他作選擇。讓他知道如何去面對『競爭』與『挫折』之情況;使他明白怎麼來處理『勝敗』和『得失』的處境。這些事看似無關乎『 IQ 』,它可是打開『 EQ 』以及『 SQ 』學習大門的『關鍵』。

─── 《玩遊戲有何不好??Λ

 

 

 

 

 

 

 

 

童玩伴歲月︰更迭

科學追求真理,為的是打開大自然的黑箱;然而真理明白若昭,就是透明的白箱。我們總在求真的旅途上一知半解,努力灰箱為白箱。如果偵錯就是科學,除錯即求真理,那這一段話用在『偵錯』與『除錯』上來講依然合適。這也說明為什麼人們喜歡用不同的灰度,來表達對『箱內之物』的認識與了解了。

經過了一段辛苦,你終於把Raspbian 安裝好,可以開始使用了。是否自此就像童話故事上所說的『從此過著幸福快樂 ……』;等一下︰戲才剛開鑼、人物都還沒上場呢!!這時假如告訴你『剛安裝好的 Raspbian 上有問題』呢?就在此時偵探柯南立馬登場,好戲也即將展開︰

………柯南想 Linux 核心 kernel 程式,通常一直輸出紀錄著系統運作活動,用 dmesg 命令就能閱讀,嗯!結果太大了,最好用 dmesg | more,啊哈!!我找到了。原來是︰

[ 21.678058] FAT-fs (mmcblk0p1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.

如果我們已經知道是這個問題了,那麽用 dmesg | grep fsck 就能更快找到系統是否輸出過這個訊息。現在已經確定是有問題了 ── ㄋㄚㄟㄤㄚㄋㄟ ──,怎麽會這樣 .XX!?最重要的是,如果你是柯南,你會怎麽辦呢?

………柯南想起,在哪裡找資料?一文上提到了樹莓派的論壇,何不到那裡查查,看看是否有人談論過這個問題?該用什麼關鍵字查尋呢?『fsck』 797 則,太廣泛了,『Volume was not properly unmounted』45 則,而且摘要也確實符合,嗯!答案是︰這個ㄆㄛ癹文 Post 啊!『』 ── 好一隻『將草踩平的大腳』,咦!原來還要編譯程式ㄟ。唉!難道只阿笠博士了嗎?又想,難道不能依樣畫葫蘆』造著做?……解決了!!

─── 《打開黑箱!!

 

『復古派』已經裝好了,也經過初步驗證,卻突然發現某些喜愛的遊戲不能跑?該怎麼辦呢??

心想既然兩年前可以!今天為什麼不行也!?就多裝幾種模擬器用

/RetroPie-Setup

Runcommand

 Domenick D’Onofrio edited this page Apr 29, 2018 · 33 revisions

runcommand

The runcommand is the script responsible to launch your emulators/games. This wiki shows the runcommand’s configurations and features.

 

逐一檢視吧!!

由於知道模擬器的種類和版本,與遊戲 ROM 之相容性習習相關,故而往往能以年代解決大半問題哩☺

偏偏遇到這隻唐老鴨『母港寬』呦☻

『Donald Duck –    Maui Mallard in Cold Shadow』

pi@retropie:~ cd /dev/shm/ pi@retropie:/dev/shm ls
retroarch.cfg  runcommand.info  runcommand.log
pi@retropie:/dev/shm more runcommand.log  Parameters:  Executing: /opt/retropie/emulators/retroarch/bin/retroarch -L /opt/retropie/libr etrocores/lr-snes9x2010/snes9x2010_libretro.so --config /opt/retropie/configs/sn es/retroarch.cfg "/home/pi/RetroPie/roms/snes/Super_Nintendo/Donald Duck -  Maui  Mallard in Cold Shadow.smc" --appendconfig /dev/shm/retroarch.cfg Failed to open /home/pi/RetroPie/roms/snes/Super_Nintendo/Donald Duck - Maui Mal lard in Cold Shadow.smc: No such file or directory Sound buffer size: 128000 (32000 samples) </pre>    <span style="color: #666699;">怎會 ㄘㄨㄟˇ ㄇㄡˊ ㄌㄟ ?!</span>  <span style="color: #666699;">一氣之下,乾脆換個檔名︰</span> <pre class="lang:default decode:true ">cp Donald\ Duck\ -\ \ Maui\ Mallard\ in\ Cold\ Shadow.smc Dona.smc</pre>    <span style="color: #666699;">竟然 OK 矣♨</span>  <img class="alignnone size-full wp-image-93718" src="http://www.freesandal.org/wp-content/uploads/Donald_Duck.png" alt="" width="1920" height="1080" />     <span style="color: #666699;">細究之下,難到是 RetroPie 敗於『兩個小空白』乎★</span>  <span style="color: #666699;">所以更新系統前,最好先備份,好好讀讀</span> <h1 class="public "><span style="color: #808080;"><span class="author"><a class="url fn" style="color: #808080;" href="https://github.com/RetroPie" rel="author" data-hovercard-type="organization" data-hovercard-url="/orgs/RetroPie/hovercard">RetroPie</a></span><span class="path-divider">/</span><strong><a style="color: #808080;" href="https://github.com/RetroPie/RetroPie-Setup" data-pjax="#js-repo-pjax-container">RetroPie-Setup</a></strong></span></h1> <div class="d-flex flex-column flex-md-row gh-header"> <h1 class="flex-auto min-width-0 mb-2 mb-md-0 mr-0 mr-md-2 gh-header-title instapaper_title"><span style="color: #666699;"><a style="color: #666699;" href="https://github.com/RetroPie/RetroPie-Setup/wiki/FAQ">FAQ</a></span></h1> <div class="mt-0 mt-lg-1 flex-shrink-0 gh-header-actions"><span style="color: #808080;"> <span style="color: #999999;">Hugo Hromic edited this page Dec 7, 2018 · <a class="muted-link" style="color: #999999;" href="https://github.com/RetroPie/RetroPie-Setup/wiki/FAQ/_history">73 revisions</a></span></span></div> <div class="mt-0 mt-lg-1 flex-shrink-0 gh-header-actions"></div> </div> <div id="wiki-content" class="d-flex flex-column flex-md-row"> <div id="wiki-body" class="mt-4 flex-auto min-width-0 gollum-markdown-content instapaper_body"> <div class="markdown-body"> <ul>  	<li><span style="color: #808080;"><a style="color: #808080;" href="https://github.com/RetroPie/RetroPie-Setup/wiki/FAQ#why-do-some-emulators-not-show-up">Why do some emulators not show up?</a></span></li>  	<li><span style="color: #808080;"><a style="color: #808080;" href="https://github.com/RetroPie/RetroPie-Setup/wiki/FAQ#why-cant-i-ssh-as-root-anymore">Why can't I SSH as root anymore?</a></span></li>  	<li><span style="color: #808080;"><a style="color: #808080;" href="https://github.com/RetroPie/RetroPie-Setup/wiki/FAQ#reset-ownershippermissions-of-homepiretropie-roms">Reset ownership/permissions of /home/pi/RetroPie roms</a></span></li>  	<li><span style="color: #808080;"><a style="color: #808080;" href="https://github.com/RetroPie/RetroPie-Setup/wiki/FAQ#where-did-the-desktop-go">Where did the desktop go?</a></span></li>  	<li><span style="color: #808080;"><a style="color: #808080;" href="https://github.com/RetroPie/RetroPie-Setup/wiki/FAQ#why-does-shut-down-and-reboot-take-ages">Why does shut down and reboot take ages?</a></span></li>  	<li><span style="color: #808080;"><a style="color: #808080;" href="https://github.com/RetroPie/RetroPie-Setup/wiki/FAQ#how-do-i-hide-the-boot-text">How do I hide the boot text?</a></span></li>  	<li><span style="color: #808080;"><a style="color: #808080;" href="https://github.com/RetroPie/RetroPie-Setup/wiki/FAQ/#how-do-i-boot-to-the-desktop-or-kodi">How do I boot to the desktop or Kodi</a></span></li>  	<li><span style="color: #808080;"><a style="color: #808080;" href="https://github.com/RetroPie/RetroPie-Setup/wiki/FAQ/#how-do-i-remove-the-black-borders">How do I remove the black borders</a></span></li>  	<li><span style="color: #808080;"><a style="color: #808080;" href="https://github.com/RetroPie/RetroPie-Setup/wiki/FAQ#how-do-i-change-which-buttons-to-press-to-exit-an-emulator-with-a-controller">How do I change which buttons to press to exit an emulator with a controller?</a></span></li>  	<li><span style="color: #808080;"><a style="color: #808080;" href="https://github.com/RetroPie/RetroPie-Setup/wiki/FAQ#does-super-mario-all-stars-work">Does Super Mario All Stars work?</a></span></li>  	<li><span style="color: #808080;"><a style="color: #808080;" href="https://github.com/RetroPie/RetroPie-Setup/wiki/FAQ#how-do-i-extend-the-available-space-when-upgrading-to-a-larger-sd-card">How do I extend the available space when upgrading to a larger SD card</a></span></li>  	<li><span style="color: #808080;"><a style="color: #808080;" href="https://github.com/RetroPie/RetroPie-Setup/wiki/FAQ#how-would-i-start-from-command-line-say-the-snes-emulator-by-itself">How would I start from command line, say, the SNES emulator by itself?</a></span></li>  	<li><span style="color: #808080;"><a style="color: #808080;" href="https://github.com/RetroPie/RetroPie-Setup/wiki/FAQ#is-there-another-way-to-set-up-the-gamepad-for-use-eg-within-the-snes-emulator">Is there another way to set up the gamepad for use, e.g., within the snes emulator?</a></span></li>  	<li><span style="color: #808080;"><a style="color: #808080;" href="https://github.com/RetroPie/RetroPie-Setup/wiki/FAQ#the-psx-emulator-reports-no-bios-found-what-do-i-do">The PSX emulator reports no BIOS found. What do I do?</a></span></li>  	<li><span style="color: #808080;"><a style="color: #808080;" href="https://github.com/RetroPie/RetroPie-Setup/wiki/FAQ#how-do-i-calculate-the-md5sum-or-crc32-of-a-bios-file">How do I calculate the md5sum or CRC32 of a BIOS file?</a></span></li>  	<li><span style="color: #808080;"><a style="color: #808080;" href="https://github.com/RetroPie/RetroPie-Setup/wiki/FAQ#which-memory-split-should-i-use">Which memory split should I use?</a></span></li>  	<li><span style="color: #808080;"><a style="color: #808080;" href="https://github.com/RetroPie/RetroPie-Setup/wiki/FAQ#why-arent-my-in-game-saves-working-properly">Why aren't my in-game saves working properly?</a></span></li>  	<li><span style="color: #808080;"><a style="color: #808080;" href="https://github.com/RetroPie/RetroPie-Setup/wiki/FAQ#why-cant-i-insert-coins-in-arcade-emulators">Why Can't I Insert Coins in Arcade Emulators?</a></span></li>  	<li><span style="color: #808080;"><a style="color: #808080;" href="https://github.com/RetroPie/RetroPie-Setup/wiki/FAQ#how-can-i-increase-the-console-font-size">The <code>retropie_setup</code> and <code>runcommand</code> menus have very small fonts on my screen, how can I increase the console font size?</a></span></li>  	<li><span style="color: #808080;"><a style="color: #808080;" href="https://github.com/RetroPie/RetroPie-Setup/wiki/FAQ#how-can-i-recover-my-retropie-after-enabling-the-desktop-opengl-driver-">How can I recover my RetroPie after I enabled the experimental OpenGL driver ?</a></span></li> </ul> </div> </div> </div>    <span style="color: #666699;">呀☆</span> <pre class="lang:default decode:true ">pi@retropie:~ cat /proc/version 
Linux version 4.14.79-v7+ (dc4@dc4-XPS13-9333) (gcc version 4.9.3 (crosstool-NG crosstool-ng-1.22.0-88-g8460611)) #1159 SMP Sun Nov 4 17:50:20 GMT 2018

 

 

 

 

 

 

 

童玩伴歲月︰剪影

雖然作者不知如何向『乾坤借法』,但思解決『問題』時總是能夠『取法於人』的吧!比方說,因為文本圖示的需要,心想『擷取』當下螢幕之『快照』,否則怎麼簡易說明 RetroArch 『快捷選單』 QUICK MENU 呢?但是『快捷選單』必得在『遊戲進行中』,按下『Select』 + 『X』鍵才會顯示︰

RetroArch-RGUI-快照

那麼將怎麼『擷取』呢?非得用『照相機』來照嗎??

一時只覺『心有靈犀』,心中突現『昔日筆記』︰

Take screenshots/video’s without X server?

by Takenover83 » Wed Nov 20, 2013 12:39 am

I have been trying various method’s but I have yet to get anything to work outside of x. I would like to get some screenshot’s of xbmc, omxplayer, retroarch, emulationstation, etc… These all seem to run without X. So how do I go about capturing the screen they run on? ffmpeg? x11grab is a no go, as these are not using X as far as I know. capturing the framebuffer via fbdev? I tried that, but I usually just end up with a black screenshot.

So can anyone point me in the right direction or better yet give me a example?

 
by DrDominodog51 » Wed Nov 20, 2013 1:29 am
I would get an external display recorder and take screenshots from the video.This requires another computer for taking the screenshot from the video though….
If you don’t make it, it’s your own damn vault. -Land of the Lost poster
 
by AndyD » Wed Nov 20, 2013 1:51 am
I have written a program called raspi2png that will take a snapshot of whatever is displayed on the Raspberry Pi screen. You will need to compile it yourself! It should run on any of the Linux derived operating systems.
by Takenover83 » Wed Nov 20, 2013 5:24 pm
I am trying to build a script to auto increment filename and capture. After googling I pieced this together. Likely not the best way to go about it. Anyone have a better way.
……

 

,於是乎豁然開朗!!仔細閱讀後,依樣畫葫蘆︰

# ※ 將之命名為 raspimovie

#!/bin/bash

count=1000
while [ count -ne 1500 ] ; do      count=`exprcount + 1`   
    raspi2png -h 480 -w 640 -p ~/screens/${count:1}.png
   
done

接著取得

AndrewFromMelbourne/raspi2png

raspi2png

Utility to take a snapshot of the raspberry pi screen and save it as a PNG file

raspi2png -h
raspi2png: option requires an argument — ‘h’
Usage: raspi2png [–pngname name] [–width <width>] [–height <height>] [–compression <level>] [–delay <delay>] [–display <number>] [–stdout] [–help]

–pngname,-p – name of png file to create (default is snapshot.png)
–height,-h – image height (default is screen height)
–width,-w – image width (default is screen width)
–compression,-c – PNG compression level (0 – 9)
–delay,-d – delay in seconds (default 0)
–display,-D – Raspberry Pi display number (default 0)
–stdout,-s – write file to stdout
–help,-H – print this usage information

 

又思何不做成『影片』耶??!!

─── 《W!O+ 的《小伶鼬工坊演義》︰【新春】 復古派 《六》 RETROPIE 借法

 

想當初因為文本圖示的需要,所以用 raspi2png 擷取螢幕的快照。

由於樹莓派影格緩衝區

RPi Framebuffer

Introduction

The aim of this page is to provide some documentation on BCM2835’s frame buffer, as this is not publicly documented by Broadcom, and is necessary to write a basic OS for the Raspberry Pi. Most of this was worked out by reading the Linux source code (mostly drivers/video/bcm2708_fb.c and arch/arm/mach-bcm2708/) and experimentation. Note: At times I have used a different naming convention to that used by Broadcom’s kernel source, partially because I used slightly different semantics where the kernel source is either unclear or seemed confusing. A working (more or less) example code for the frame buffer can be found here (note: this page includes corrections to the large comment in fb.c).

Basic procedure to get stuff on screen

The basic procedure to get a frame buffer is:

  1. Set up a structure with the frame buffer specification (resolution, etc)
  2. Tell the GPU about this structure by writing to the mailbox
  3. Wait by reading from the mailbox for the GPU to modify this structure
  4. Write to the frame buffer at the pointer we got in stage 3

Notes

  • Only step 4 is required for subsequent writes to the frame buffer.
  • Currently, I do not know how to enable the HDMI output, so this will always operate the composite, and not the HDMI (there have been suggestions that this might be achieved using a combination of config.txt, parameters specified by the GPU, and appropriate resolution settings).
  • This method works for both, HDMI and Composite output.
  • The two conditions for successfully acquiring a frame buffer are:
    • The 28 bits of data read from the mailbox is zero
    • The pointer in the structure is non-zero after the mailbox read
  • For some reason (that I haven’t discovered yet), the code sometimes fails (not meeting one of the two criteria above) unless it is retried. Hence steps 1-3 of the basic procedure are tried in a loop until success.
  • Once we have the frame buffer, we can just write to it. The pixels (in 24 bit mode) are RGB ordered by y then x coordinate. The address of a subpixel is given by: y * pitch + x * 3 + rgb_channel, where rgb_channel is 0 for red, 1 for green, and 2 for blue.

 

Linux framebuffer

Knoppix booting on the framebuffer

The Linux framebuffer (fbdev) is a graphic hardware-independent abstraction layer to show graphics on a computer monitor, typically on the console.[1] The word framebuffer means a part of video memory containing a current video frame, and the Linux framebuffer means “access method to the framebuffer under the Linux kernel”, without relying on system-specific libraries such as SVGALib or another user space software.

 

有差異,或許 raspi2png 還是最好用的呦☆

誰知道,當小朋友看到擷圖後,鬧著要『過關能剪影』哩!

不過當時缺乏適當使用者界面,只得作罷也☻

今日打算借這個樹莓派復古遊戲機外殼上的

‧ resetPin

‧ ledPin

※ 註︰

retroflag-picase/SafeShutdown.py

#!/usr/bin/env python3
from gpiozero import Button, LED
import os 
from signal import pause

powerPin = 3 
resetPin = 2 
ledPin = 14 
powerenPin = 4 
hold = 1
led = LED(ledPin)
led.on()
power = LED(powerenPin)
power.on()

#functions that handle button events
def when_pressed():
  led.blink(.2,.2)
  os.system("sudo killall emulationstation && sleep 5s && sudo shutdown -h now")
def when_released():
  led.on()
def reboot(): 
  os.system("sudo killall emulationstation && sleep 5s && sudo reboot")
  
btn = Button(powerPin, hold_time=hold)
rebootBtn = Button(resetPin)
rebootBtn.when_pressed = reboot 
btn.when_pressed = when_pressed
btn.when_released = when_released
pause()

 

作 User Interface ,寫個一按 LED 閃爍‧開始連續擷取;再按 LED 停止閃爍‧結束快照之派生三小程式勒☺

 

 

 

 

 

 

 

童玩伴歲月︰投幣

MAMELogoTM
Multiple Arcade Machine Emulator

220px-Mspacman_and_galaga_act_like_israel_and_palestine
街頭遊戲機

一九九七年,義大利程式設計師 Nicola Salmoria 開啟了街頭電玩的軟體模擬器發展,當年一月二十九日發表的 DOS 平台的 Multi-Pac v0.8 版, 就是現今著名 MAME 的前身。據知 MAME 的目標在於盡可能的忠實而且精確的模擬各種街機遊戲,它的宗旨為著保存遊戲的歷史,進而避免古老的遊戲恐將遺失或被忘卻。計畫全稱是個縮首字,由 Multiple Arcade Machine Emulator 而得名。

就像 WiKi  上所講的, Philosophy and accuracy 】︰

The stated aim of the project is to document hardware, and so MAME takes a somewhat purist 【純正化】view of emulation, prohibiting 【禁止】programming hacks that might make a game run improperly or run faster at the expense of emulation accuracy. Components such as CPUs are emulated at a low level (meaning individual instructions are emulated) whenever possible, and high-level emulation (HLE) is only used when a chip is completely undocumented and cannot be reverse-engineered 【逆向工程】 in detail. Signal level emulation is used to emulate audio circuitry that consists of analog components.

這大概不只是『 bit by bit 』的『拷貝』而已,或許真的是『克隆』的吧!然而至今『硬體文件』依然付之闕如,這事二零零八年計畫督導者是這麼說的︰

We want to document the hardware. Now a lot of people will say; “Where’s your document? You just write a bunch of source code.” And yes, that’s true. One thing I’ve learned is that keeping documentation synced with source code is nearly impossible. The best proof that your documentation is right is “does this code work“.

Aaron Giles, California Extreme 2008

果真是『大哉辯』的啊!『能用』比之於『能文』到底哪個重要的呢?希望不會有一天又要『再詮釋』一次的吧!!??

─── 《音樂播放器之 CD 轉成 MP3 之《補充》 MAME?!

 

回想起那是否該再次投幣,再玩一把小精靈的時光︰

小精靈

小精靈》(英語:Pac-Man,中國大陸譯作「吃豆人」,香港譯作「食鬼」,中國大陸又譯作「吃豆子」)是一款由南夢宮公司製作的街機遊戲。遊戲最初於1980年5月22日在日本發行。本遊戲由南夢宮公司的岩谷徹設計。遊戲於1980年10月由Midway Games公司在美國發行[1]。缺了一角的薄餅是岩谷徹創作此遊戲的靈感來源  [2]

Pac-Man在1980年代風靡全球,被認為是最經典的街機遊戲之一,遊戲的主角小精靈的形象甚至被作為一種大眾文化符號,或是電子遊戲產業的代表形象。它的開發商Namco也把這個形象作為其吉祥物和公司的標誌,一直沿用至今。亦因爲該遊戲風靡全球,假面騎士系列將在電影《假面騎士平成Generations_Dr.Pac-Man對EX-AID&Ghost_with_傳說騎士》首次與遊戲角色小精靈合作。

 

自己也覺得好笑哩☺

誰知有了金手指護身︰

聊齋志異』首篇

考城隍

宋公諱燾,邑庠生。一日,病臥,見吏人持牒,牽白顛馬來,云:「請赴試。」公言:「文宗未臨,何遽得考?」吏不言,但敦促之 。公力疾乘馬從去。 路甚生疏。至一城郭,如王者都。移時入府廨 ,宮室壯麗。上坐十餘官,都不知何人,惟關壯繆可識。檐下設几 、墩各二,先有一秀才坐其末,公便與連肩。几上各 有筆札。俄題紙飛下。視之,八字云:「一人二人,有心無心。」二公文成,呈殿上。公文中有云:「有心為善,雖善不賞;無心為惡,雖惡不罰 。」諸神傳讚不 已。召公上,諭曰:「河南缺一城隍,君稱其職。 」公方悟,頓首泣曰:「辱膺寵命,何敢多辭?但老母七旬,奉養無人,請得終其天年,惟聽錄用。」上一帝王像 者,即命稽母壽籍。有長鬚吏,捧冊翻閱一過,白:「有陽算九年。」共躊躇間,關帝曰:「不妨令張生攝篆九年,瓜代可也。」乃謂公:「應即赴任;今推仁孝之 心,給假九年,及期當復相召。」又勉勵秀才數語 。二公稽首並下。秀才握手,送諸郊野,自言長山張某。以詩贈別 ,都忘其詞,中有「有花有酒春常在,無燭無燈 夜自明」之句。公既騎,乃別而去,及抵里,豁若夢寤。時卒已三日。母聞棺中呻吟 ,扶出,半日始能語。問之長山,果有張生,於是日死矣。後九年 ,母果卒。營 葬既畢,浣濯入室沒。其岳家居城中西門內,忽見公鏤膺朱幩,輿馬甚眾,登其堂,一拜而行。相共驚疑,不知其為神 。奔詢鄉中,則已歿矣。公有自記小傳,惜亂 後無存,此其略耳。

何況『工具』本身無善無惡、非善非惡。且善且惡存於『用者』也耶!!??恰似《欺言騙語》起頭

灰子有言曰︰

遊戲者人間也。優勝劣敗,其常也。圖謀非常者,其要有二,昭明若日月。其日曰︰積微守勝,永不退轉。其法言︰機緣在天,流布難勻,苟有所得,必儲。凡有所失,再來補過,只進無退之道。此陽謀也,存心取勝。其月曰︰更於九地之下,改於九天之上,瞞天過海。其法言︰欺言騙語,得之物性,所更所改,皆有物宜。物不能知!人能知乎?此陰謀也,詐取詭奪。

由於作者不知《欺言騙語》是何典!灰子是何人?但思所謂『儲』 、『存』宛如圖靈機『狀態』存取?『更』、『改』彷彿作弊碼『修改遊戲』!心想這部書,可就是 Tux 的『作弊大全』乎??

既然無處可考?也只能遁之以史實的了!!

電子遊戲作弊

遊戲作弊是指在多人遊戲網路遊戲中利用修改遊戲或者其他不正當手段來達到超出對手成績或者其他目的的行為,單人遊戲中使用作弊碼來使遊戲變得更加簡單的行為也包含在內。大多數遊戲開發者注重於讓多人遊戲變得更加「平衡」。當第一個用於網際網路應用的遊戲發布的時候,遊戲作弊也就隨之產生。過去很容易區別一個玩家是否作弊,因為多數情況發生在區域網遊戲內。網絡改變了這種情況。

─── 摘自《W!O+ 的《小伶鼬工坊演義》︰【新春】 復古派 《七》 RETROPIE 金手指

 

反倒不好玩了的呢☻