アットウィキロゴ
1. --ここから-- ~ --ここまで--の間の文字をコピー

2. ノートパッドに張り付けてデスクトップ等に保存する
  (ファイル名はローマ字で適当に 例:supameto)

3. 保存したファイルの拡張子を.txtから.luaに変更

4. 変更したファイルをドラッグする

5. 動いてるエミュの画面にそのファイルをドロップ

Snes9X rerecording 1.43 v17 svn123にて動作確認済み

--ここから--
local gameclock
local beamcharge
local hp
local invincible
local speed
local shine


gui.transparency(0)

while true do

-- Read the ingame clock
do
local frames = memory.readword(0x7e09da)
local seconds = memory.readbyte(0x7e09dc)
local minutes = memory.readbyte(0x7e09de)
local hours = memory.readbyte(0x7e09e0)

local subsecs = string.sub(string.format("%0.02f", frames/60),2,-1)
gameclock = string.format("%02d:%02d:%02d%s", hours,minutes,seconds,subsecs)
end
-- Render image
gui.text(0,0,gameclock)

-- Beam charge, out of 120
beamcharge = memory.readbyte(0x7e0dc2)
if beamcharge > 1 then
gui.text(0, 9, "Charge: " .. beamcharge .. "/120")
end

-- First enemy HP and invincible timer
hp = memory.readword(0x7e0f8c)
if hp > 0 then
gui.text(96,0,"HP: "..hp)
end
invincible = memory.readbyte(0x7e0f9c)
if invincible > 0 then
gui.text(192,0, invincible .. " ticks")
end

-- Second enemy HP only
hp = memory.readword(0x7e0fcc)
if hp > 0 then
gui.text(96,9,"HP: "..hp)
end

-- This doesn't seem quite right... Shinespark data
shine = memory.readword(0x7e0b3e)
if shine > 0 then
speed = memory.readbyte(0x7e0a68)
gui.text(128, 18, string.format("Speed: %d->%d", math.floor(shine/256),speed))
end

-- Continue emulation
snes9x.frameadvance()

-- io.write(collectgarbage("count")  io.write("\r")  io.flush()

end
--ここまで--
最終更新:2010年02月07日 22:36