mirror of
https://github.com/notwa/mm
synced 2024-11-05 05:49:02 -08:00
useless update
This commit is contained in:
parent
c450e7b535
commit
a957617933
1 changed files with 33 additions and 7 deletions
40
Lua/main.lua
40
Lua/main.lua
|
@ -1,26 +1,52 @@
|
||||||
print('')
|
print()
|
||||||
|
package.path = package.path..';./mm/Lua/?.lua'
|
||||||
|
require = require "depend"
|
||||||
require "boilerplate"
|
require "boilerplate"
|
||||||
|
|
||||||
local function once()
|
local function once()
|
||||||
require "addrs.init"
|
require "addrs.init"
|
||||||
print(m64p.rom.settings.MD5)
|
print(m64p.rom.settings.MD5, version)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
--[[
|
||||||
|
80000000 to 80800000 RDRAM
|
||||||
|
90000000 to 92000000 probably ROM
|
||||||
|
A0000000 to A0800000 RDRAM mirror?
|
||||||
|
A3F00000 to A4000000 RDRAM registers
|
||||||
|
A4000000 to A4900000?
|
||||||
|
B0000000 to B2000000 ROM mirror?
|
||||||
|
--]]
|
||||||
|
|
||||||
|
local oldbutts = 0
|
||||||
local function main()
|
local function main()
|
||||||
addrs.hearts(16*1.5)
|
local butts = addrs.buttons()
|
||||||
|
if butts & 0x0020 > oldbutts & 0x0020 then -- L button
|
||||||
|
local ok, err = pcall(dofile, 'mm/Lua/test.lua')
|
||||||
|
if not ok then print(err) end
|
||||||
|
end
|
||||||
|
oldbutts = butts
|
||||||
end
|
end
|
||||||
|
|
||||||
local vi_count = 0
|
local vi_count = 0
|
||||||
|
--local lastvf = 0
|
||||||
local function vi_callback()
|
local function vi_callback()
|
||||||
vi_count = vi_count + 1
|
vi_count = vi_count + 1
|
||||||
if vi_count == 1 then
|
if vi_count == 1 then
|
||||||
once()
|
once()
|
||||||
end
|
end
|
||||||
local ok, err = pcall(main)
|
if vi_count <= 1 then
|
||||||
if not ok then
|
|
||||||
print(err)
|
|
||||||
m64p:unregisterCallback('vi', vi_callback)
|
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
--local vf = addrs.visual_frame()
|
||||||
|
--if vf > lastvf then
|
||||||
|
if true then
|
||||||
|
local ok, err = pcall(main)
|
||||||
|
if not ok then
|
||||||
|
print(err)
|
||||||
|
m64p:unregisterCallback('vi', vi_callback)
|
||||||
|
return
|
||||||
|
end
|
||||||
|
end
|
||||||
|
--lastvf = vf
|
||||||
end
|
end
|
||||||
m64p:registerCallback('vi', vi_callback)
|
m64p:registerCallback('vi', vi_callback)
|
||||||
|
|
Loading…
Reference in a new issue