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

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

果真是『大哉辯』的啊!『能用』比之於『能文』到底哪個重要的呢?希望不會有一天又要『再詮釋』一次的吧!!??這就宛如在《 Raspberryλ◇樹莓λ 》一文中的『 cgroup 』是什麼的呢?就像《 kernel lacks cgroups or memory controller not avaiable, not … 》裡所議論的一樣,即使最近的文件也就如《 Web browser beta 》所講的『差不多』罷了,也許是不容易『說清楚』的吧。由於 MAME 的著作授權有別於 GPLBSD 的原故,在此也只能說樹莓派上的安裝辦法,以饗讀者的了。

安裝 AdvanceMAME

wget http://sheasilverman.com/rpi/raspbian/debs/advancemame-raspberrypi_1-1_armhf.deb
sudo dpkg --force-overwrite -i advancemame-raspberrypi_1-1_armhf.deb

 

產生預設組構檔

advmame

 

設定影像時脈
nano ~/.advance/advmame.rc
在檔案底加入

device_video_clock 0-100/0-100/0-100

 

依據顯示器的解析度,設定 Framebuffer
以 3.5″ TFT 來講︰

FRAMEBUFFER=/dev/fb1 advv

請按造螢幕顯示輸入︰
Create new modeline: Press F5
Vertical clock [Hz]: 【 60 】
X resolution [pixel]: width of display 【 480 】
Y resolution [pixel]: height of display 【 320】
Save: Press F2
Quit: Press Esc

 

下載測試遊戲

cd ~/.advance/rom
wget http://www.mamedev.org/roms/circus/circus.zip

 

開始測試

FRAMEBUFFER=/dev/fb1 advmame circus

 

請參照《 Documentation of the AdvanceMAME advv utility  》與《 Documentation of the AdvanceMAME advmame program 》文件進行操作。此處僅列出預設的鍵盤用法︰

In the game play you can use the following keys:

ESC  Exit.
F1  Help.
TAB  Main Menu.
F2 Test/Service Switch.
F3  Reset the game.
F7  Load a game state.
SHIFT + F7  Save a gam state.
F8  Decrease the frame skip value.
F9  Increase the frame skip value.
F10  Speed throttle.
F11  Display the frame per second.
F12  Save a snapshot.
P  Pause.
PAD  *  Turbo mode until pressed.
PAD  /  Cocktail mode (flip the screen vertically).
PAD   Mark the current time as the startup time of the game.
CTRL + ENTER  Start the sound and video recording.
ENTER  Stop the sound and video recording.
,  Previous video mode.
.  Next video mode.
TILDE  Volume Menu.

for player 1 you can use the keys:

1  Play.
5  Insert coin.
ARROW  Move.

, , , Move.
CTRL  First button.
ALT  Second button.
SPACE  Third button.

for player 2 you can use the keys:

2  Play.
6  Insert coin.
R , F , D , G Move.
A  First button.
S  Second button.
Q  Third button.

for AdvanceMESS are available also the following keys:
ScrollLock Switch to partial keyboard emulation which lets you use keys like TAB, ALT and CTRL.