1 2
12 13
Zinfidel
He/Him
Experienced Forum User, Player (190)
Joined: 11/21/2019
Posts: 247
Location: Washington
Whiteted wrote:
No problem, well done for making your way to the end of it ;) The body part HUD lua is on my github now. If you want to run it then you also need Wyster's /Data library linked in the readme (though looking at it now it's only for 1 thing). I tried it on 2.4.1 and the bug is still present so expect it to crash pretty quickly. I watched your Armored Core TAS - very impressive :) , for sure only in the vault because of all the mission skips. The enemy models look to be of a similar complexity to GE's guards, though maybe with no movement of the head / neck? Atleast if you want to include the limbs as well then it looks like it won't be easier than GE.
I ended up finding the motivation to open up Ghidra and spend a lot of time reversing AC for other reasons, and that ended up with me ultimately looking for the model rendering code: Link to video It took me probably a week of reversing unrelated code before I could even make sense of the stuff that dealt with 3d projection and rendering, and I spent probably 2 weeks in there before I was sure that I had found the code that walked model vertices. However, I did have the camera's transformation matrix in hand, and with your code for your GE wallhack, I had a great launching point for getting a very basic hack working that just placed a dot over enemies in the game. I have to thank you again for posting your code, without it, the difficulty curve probably would have turned me off from even trying, especially since I ultimately had to learn a LOT about PSX hardware and how it does 3d rendering to get it working correctly. A discovery I made very late into the process was that AC does not actually use hitboxes at all! It uses axis-aligned bounding-boxes. This was both relieving and disappointing at the same time. I spent a lot of time writing a function that would find model vertices and traverse the skeleton, only to find that every time I thought I had found the right data, I ended up rendering vertices for every single triangle on the entity model. I had passed right over the AABB collision function for the game probably dozens of times and never payed any attention to it because it seemed too simple and didn't reference any model data. One I realized it used AABBs, getting bounding boxes around the entities was a piece of cake. In the end, I'm glad to have done this and am pretty done with it, but am a little disappointed that my solution did not ultimately actually find model data and walk the structures because that was exercise I wanted to do. It feels like my work is sorta a "fake" wallhack compared to yours in that regard, but the only alternative to what I did would be to invent my own boudning boxes for the game's models based on model vertex data and a bounding algorithm or something, and that is WAAAY more work than I am willing to put into this! The code for my wall hack (and a number of other scripts for AC) is here: https://gist.github.com/Zinfidel/d47287cec638f0f915c3d99bccef3a7d P.S.: Thank for the compliment on my TAS! It's boring I know, but it has already inspired another TASer to do a "proper" TAS so that's something to look forward to.
Experienced Forum User
Joined: 7/17/2012
Posts: 525
Location: Switzerland
DShawk StylusInputDisplay.lua (shiped with BizHawk)
NLua.Exceptions.LuaException: unprotected error in call to Lua API (0)
   à NLua.Lua.PanicCallback(IntPtr luaState)
   à lua_error(lua_State* )
   à NLua.ObjectTranslator.throwError(IntPtr luaState, Object e)
   à NLua.Lua.SetPendingException(Exception e)
   à NLua.LuaMethodWrapper.call(IntPtr luaState)
   à NLua.MetaFunctions.runFunctionDelegate(IntPtr luaState)
   à lua_resume(lua_State* , Int32 )
   à BizHawk.Client.EmuHawk.Win32LuaLibraries.ResumeScript(LuaFile lf)
   à BizHawk.Client.EmuHawk.LuaConsole.<>c__DisplayClass59_1.<ResumeScripts>b__1()
   à BizHawk.Client.Common.LuaSandbox.Sandbox(Action callback, Action exceptionCallback)
My Citra 3DS rerecording movie files test repositery: https://cutt.ly/vdM0jzl Youtube playlist "Citra Tests": https://cutt.ly/AdM0wg9 http://www.youtube.com/user/phoenix1291
Editor, Experienced Forum User, Expert player (2207)
Joined: 5/15/2007
Posts: 3831
Location: Germany
In Bizhawk, I'm trying to run a lua that opens a file "test.log" that contains text.
Language: Lua

local file_name = "test.log" function readAll(file) local f = assert(io.open(file, "r")) local content = f:read("*all") f:close() return content end text=print(readAll(file_name))
It seems that when the log file is not currently used by an application, the lua runs fine and it prints the text normally. But if it is used then I get this:
NLua.Exceptions.LuaScriptException: [string "main"]:7: test.log: error #-1
Is there a way around this? EDIT: I resorted to using Love2d, but I didn't manage to find a solution for Bizhawk lua.
Editor, Experienced Forum User, Expert player (2207)
Joined: 5/15/2007
Posts: 3831
Location: Germany
Is there a way to recognize the BIOS screen is currently running in Gambatte-Core?
Active player, Emulator Coder, Experienced Forum User, Judge, Moderator (447)
Joined: 2/26/2020
Posts: 621
Location: California
MUGG wrote:
Is there a way to recognize the BIOS screen is currently running in Gambatte-Core?
There isn't really a good way to recognize that BIOS mode is currently active at the moment. The best way would likely just to check the hash of 0x0000-0x00FF of the ROM and System Bus domains to see if they match (if they don't, you're very likely in BIOS mode). This will break for multicart games, but it would cover most games.
1 2
12 13