Skip to content

Commit f2b7472

Browse files
committed
Emulator (fceux v2.2.1) und Rom (Final Fantasy 1, USA Version) hinzugefügt
1 parent a944926 commit f2b7472

File tree

78 files changed

+14558
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

78 files changed

+14558
-0
lines changed

emulator/7z.dll

237 KB
Binary file not shown.

emulator/auxlib.lua

+45
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
-- this includes the iup system
2+
--local iuplua_open = package.loadlib("iuplua51.dll", "iuplua_open");
3+
--if(iuplua_open == nil) then require("libiuplua51"); end
4+
--iuplua_open();
5+
6+
-- this includes the "special controls" of iup (dont change the order though)
7+
--local iupcontrolslua_open = package.loadlib("iupluacontrols51.dll", "iupcontrolslua_open");
8+
--if(iupcontrolslua_open == nil) then require("libiupluacontrols51"); end
9+
--iupcontrolslua_open();
10+
require("iuplua");
11+
--TODO!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
12+
--LUACALL_BEFOREEXIT use that instead of emu.OnClose below
13+
14+
-- callback function to clean up our mess
15+
-- this is called when the script exits (forced or natural)
16+
-- you need to close all the open dialogs here or FCEUX crashes
17+
--function emu.OnClose.iuplua()
18+
-- gui.popup("OnClose!");
19+
--if(emu and emu.OnCloseIup ~= nil) then
20+
-- emu.OnCloseIup();
21+
--end
22+
--iup.Close();
23+
--end
24+
25+
26+
-- this system allows you to open a number of dialogs without
27+
-- having to bother about cleanup when the script exits
28+
handles = {}; -- this table should hold the handle to all dialogs created in lua
29+
dialogs = 0; -- should be incremented PRIOR to creating a new dialog
30+
31+
-- called by the onclose event (above)
32+
function OnCloseIup()
33+
if (handles) then -- just in case the user was "smart" enough to clear this
34+
local i = 1;
35+
while (handles[i] ~= nil) do -- cycle through all handles, false handles are skipped, nil denotes the end
36+
if (handles[i] and handles[i].destroy) then -- check for the existence of what we need
37+
handles[i]:destroy(); -- close this dialog (:close() just hides it)
38+
handles[i] = nil;
39+
end;
40+
i = i + 1;
41+
end;
42+
end;
43+
end;
44+
45+
emu.registerexit(OnCloseIup);

emulator/fceux.cfg

+292
Large diffs are not rendered by default.

emulator/fceux.chm

336 KB
Binary file not shown.

emulator/fceux.exe

1.09 MB
Binary file not shown.
5.14 KB
Binary file not shown.
+121
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,121 @@
1+
-- Script by amaurea, andymac and feos for FCEUX 2.2.0 and earlier versions.
2+
-- Allows customizable recording of Frame, Lag, Timer and Input display to AVI dump.
3+
-- Drag and drop HUD items with mouse, use Numpad 1-6 to switch them on/off.
4+
5+
print("Drag and drop HUD items with mouse, use Numpad 1-6 to switch them on/off.")
6+
7+
screen = {w=256,h=231}
8+
move = {object=nil,offx=0,offy=0}
9+
10+
pads = {
11+
{num=1,on=true, color="red", x=9, y=220,w=34,h=10,toggle="numpad1"},
12+
{num=2,on=true, color="yellow",x=54, y=220,w=34,h=10,toggle="numpad2"},
13+
{num=3,on=false,color="green", x=99, y=220,w=34,h=10,toggle="numpad3"},
14+
{num=4,on=false,color="orange",x=144,y=220,w=34,h=10,toggle="numpad4"}
15+
}
16+
17+
buttons = {
18+
A = {x=30,y=5,w=3,h=3},
19+
B = {x=24,y=5,w=3,h=3},
20+
select = {x=18,y=7,w=3,h=1},
21+
start = {x=12,y=7,w=3,h=1},
22+
up = {x=4, y=1,w=2,h=2},
23+
down = {x=4, y=7,w=2,h=2},
24+
left = {x=1, y=4,w=2,h=2},
25+
right = {x=7, y=4,w=2,h=2}
26+
}
27+
28+
text = {on=true,x=1, y=9,w=30,h=16,toggle="numpad5"}
29+
timer = {on=true,x=197,y=9,w=58,h= 7,toggle="numpad6"}
30+
31+
function drawpad(pad)
32+
gui.drawbox( pad.x, pad.y, pad.x+pad.w, pad.y+pad.h, "#3070ffb0" )
33+
gui.drawbox( pad.x+4, pad.y+4, pad.x+6, pad.y+6, "black" )
34+
controller = joypad.read(pad.num)
35+
for name, b in pairs(buttons) do
36+
gui.drawbox( pad.x + b.x, pad.y + b.y, pad.x + b.x + b.w, pad.y + b.y + b.h,
37+
controller[name] and pad.color or "black" )
38+
end
39+
end
40+
41+
function mouseover(pad, margin)
42+
return keys.xmouse >= pad.x-margin and keys.xmouse <= pad.x+pad.w+margin and
43+
keys.ymouse >= pad.y-margin and keys.ymouse <= pad.y+pad.h+margin
44+
end
45+
46+
function inrange(upper, lower, testval)
47+
if testval >= upper then return upper
48+
elseif testval <= lower then return lower
49+
else return testval
50+
end
51+
end
52+
53+
function concat(tables)
54+
local res = {}
55+
for _, tab in ipairs(tables) do
56+
for _, val in ipairs(tab) do
57+
table.insert(res, val)
58+
end
59+
end
60+
return res
61+
end
62+
63+
prev_keys = input.get()
64+
objects = concat({pads, {text, timer}})
65+
66+
function everything()
67+
keys = input.get()
68+
69+
-- Are we moving anything around?
70+
if move.object then
71+
if keys["leftclick"] then
72+
-- Do not go outside screen
73+
local safex = inrange(screen.w - move.object.w, 0, keys.xmouse - move.offx)
74+
local safey = inrange(screen.h - move.object.h, 8, keys.ymouse - move.offy)
75+
move.object.x = safex
76+
move.object.y = safey
77+
else move.object = nil end
78+
79+
-- Try to pick something up
80+
elseif keys["leftclick"] then
81+
for _,object in ipairs(objects) do
82+
if mouseover(object,0) then
83+
move.object = object
84+
move.offx = keys.xmouse - object.x
85+
move.offy = keys.ymouse - object.y
86+
end
87+
end
88+
end
89+
90+
-- Toggle displays
91+
for _, object in ipairs(objects) do
92+
if keys[object.toggle] and not prev_keys[object.toggle] then
93+
object.on = not object.on
94+
end
95+
end
96+
97+
-- Actually draw the stuff
98+
if timer.on then
99+
mins = math.floor(movie.framecount()/3600)
100+
secs = movie.framecount()/60-mins*60
101+
gui.text( timer.x, timer.y, string.format("%s:%05.2f",os.date("!%H:%M",mins*60),secs), "white" )
102+
end
103+
104+
if text.on then
105+
local done = movie.mode() == "finished" or movie.mode() == nil
106+
gui.text( text.x, text.y, movie.framecount(), done and "red" or "white" )
107+
gui.text( text.x, text.y + 9, FCEU.lagcount(), FCEU.lagged() and "red" or "green" )
108+
end
109+
110+
for _, pad in ipairs(pads) do
111+
if pad.on then drawpad(pad) end
112+
end
113+
114+
prev_keys = keys
115+
end
116+
117+
gui.register(everything)
118+
119+
while (true) do
120+
FCEU.frameadvance()
121+
end

0 commit comments

Comments
 (0)