Posts for Dromiceius


Experienced Forum User
Joined: 10/3/2005
Posts: 1332
amaurea wrote:
Normally when you find addresses yourself or on the internet, they will already be expressed in hexadecimal. You will then enter them with a 0x in front, to tell lua that it is a hexadecimal number, and not a decimal number. But since you seem to have found the something as rare as addresses expressed in decimal, you just enter them without the 0x in front.
Not to belabor the point, but the addresses he has are four and five digits, while 0x7e0000 expressed in decimal is seven digits.
Experienced Forum User
Joined: 10/3/2005
Posts: 1332
Cold Water wrote:
My next set of questions is with the list of offsets I posted, do I have to translate them into Hexadecimal?
You do. I've actually been out of the loop for awhile, so I forgot that Snes9x memory addresses are 6 digits, and usually take the form 0x7eXXXX. And that's what you pass to memory.readbyte. The offsets you posted are... odd. I got the full list, and they all seem to be in decimal for some reason. I tested a few of them, but they don't seem to actually signify anything. They might be particular to whatever editing tool those docs appear to be packaged with— possibly pertaining to SRAM savestates. I'd figure out what the deal is, but I have to do a bit of a reacharound to be able to search the RAM, and can't deal with it for the time being. :/
Experienced Forum User
Joined: 10/3/2005
Posts: 1332
Pretty entertaining, and I didn't notice anything I could call a mistake. No reason not to like it, so it gets a Yes vote, definitely. Also, thanks for Youtubing it, Antd.
Experienced Forum User
Joined: 10/3/2005
Posts: 1332
Danfun64 wrote:
I had an idea. Why hasn't anybody created 2 player for SMB3 in fceux via lua?
I was going to write a whole bunch of tl;dr, but I think it's enough to say that while it probably is possible to have two players playing simultaneously, there probably aren't a whole lot of people who have the the skill and the lack of anything better to do. It would be preferable to write a game from scratch, rather than try to hack one so extensively, IMO.
Experienced Forum User
Joined: 10/3/2005
Posts: 1332
Flygon wrote:
A few days ago, I had one of my oddest dreams... I was publishing Golden Axe (This was before it was published)... never before have I had such a boring uneventful dream.
A lot of people dream of doing mundane things from their day job. There's a sense of gratification to the activity; you get it off your schedule, or get paid, or get recognized or something like that. I'd bet a lot of WoW addicts dream about playing WoW precisely because it has that addictive action/reward feedback loop.
Experienced Forum User
Joined: 10/3/2005
Posts: 1332
Ferret Warlord wrote:
Why do I get the feeling I took this in an unwanted direction? <_<
Heh. You didn't, really. It was definitely apropos of what I'd asked for, so thanks for humoring my request. :) I more or less forgot about this thread, until last night. I was playing a remake of Vampire: the Masquerade — Redemption. There were four of us, with different powers, hacking and slashing through a dungeon full of gristly horrors beyond the ken of mortal minds. Suddenly, the action halted. The monsters stopped attacking, and we couldn't move. Has the game frozen? No. Lag? Much worse: it's time for a commercial break! A cheesy tune begins to play, and a Vincent Price-like character comes out from the corner we had just turned, presenting a jug of detergent to the "camera", which was now out of our control. He rhetorically asks, "got tough stains?" You can imagine the rest of the pitch. Unable to wreak bloody vengeance upon him, we watched a demonstration of the cleanser on a bloodstain left by a dead monster. ...I hope I'm not giving Ubisoft any ideas.
Post subject: Re: [Snes9x] First TAS; Help understanding/Mastering the Tools.
Experienced Forum User
Joined: 10/3/2005
Posts: 1332
Cold Water wrote:
I would like some help with 1) figuring out how to effectively use RAM search,
Well that's easy: check the wiki and post back if you have any specific questions.
2) Using Lua to do various things (like putting boxes around npcs, objects, etc).
Wow, that list of RAM offsets looks like a goldmine. Congrats on finding it. Here's a very basic example of how to use a memory address that may or may not actually work, but should be instructive nonetheless:
local cardinality = {[0]="left", "right", "up", "down"}
while true do
    mydirection = memory.readbyte(19731)
    gui.text(8,8, "I am facing " .. cardinality[mydirection])
    emu.frameadvance()
end
A quick rundown of what's happening: The variable "cardinality" is a table, which works a lot like arrays in C. It's an array of strings, basically. Lua's counting starts from 1, so I explicitly tell it that the first index is 0. You'll see why in a second. The function "memory.readbyte" is how we get information from the game. I passed as an argument the number "19731" from the list of offsets you posted, and it returns the value at that RAM address. I'm assuming the address will have four possible values: 0 to 3 (inclusive), each representing a cardinal direction: up, down, left, or right, that will map to one of the strings in "cardinality." The call to gui.text is probably self-explanatory at this point, but I'll point out that the ".." is Lua's concatenation operator, which connects the literal string "I am facing " to the string of the cardinality table at the offset given by "mydirection." If my assumptions are correct, Snes9x will print the words "I am facing left" when the player-character is facing left, etc, with the message drawn on screen at 8 pixels from the left and 8 pixels from the top of the screen. My assumptions are probably wrong. :P Hopefully that small application gives you some idea of what is possible. You should refer to any docs provided with the emulator, or emulua for other functions, like "gui.drawbox", which you'd use in much the same way for drawing outlines around sprites.
Experienced Forum User
Joined: 10/3/2005
Posts: 1332
I say nay. It's the job of your media player to crop out whatever you don't want to see. I forget the actual dimensions you'd use for a DS movie, but mplayer does this very nicely: mplayer -vf crop=320:240:0:0 desmume-tas.mp4 Presumably, any decent media player could as well.
Experienced Forum User
Joined: 10/3/2005
Posts: 1332
I don't know how the hell you got Death Adder's axe to land on his junk, but I salute you for it. :P
Experienced Forum User
Joined: 10/3/2005
Posts: 1332
Kuwaga wrote:
The thing you have in mind (editing input displayed on a keyroll on the fly) isn't really feasible for TASes because there is no way to instantly jump to say 5:38 in the movie, except by loading a save state.
I don't know about that...
function jump-to-frame (N)
    emu.speedmode("maximum")
    while movie.frame() < N do
        emu.frameadvance()
    end
    emu.speedmode("normal")
end
I guess you'd need to call "movie.load" first, assuming such a thing exists. Which it should, really. How fast you get to the desired frame is a question of CPU power. It's also interesting to consider how useful such a function would be if you had some quantity of known memory state in hand when it runs. If, for example, you modify a frame near the start of the movie, expecting that it will (or won't) make changes to certain addresses in later frames, you could test your assumptions and possibly avoid desyncs. Couple that with some kind of interface for modifying the movie— even just a barrel for selecting a frame and some toggle keys— and I'd say the idea is plenty feasible. Edit: I guess it'd be more useful with the advent of a REPL...
Experienced Forum User
Joined: 10/3/2005
Posts: 1332
Walker Boh wrote:
And lastly: Running "msiexec.exe /package MSIPackageName.msi /qr " via the command prompt gave the same error message as in Start -> search field (should be the same really). It says "The installation package could not be opened. Verify that the package exists and that you can access it...."
Wait, is that literally the command you ran? That would explain why it didn't find the package... I'm pretty sure you're supposed to run something like this: msiexec.exe /package c:\windowsy junk\tortoisesvn-versionsprobablygohere.msi /qr As for the config stuff, I was just speculating. I don't have much experience with VMs, but they tend to have slews of configuration options, including compatibility settings and fault-tolerance... uh, if you're lucky, I guess. ;)
Experienced Forum User
Joined: 10/3/2005
Posts: 1332
Walker Boh wrote:
this didn't work either. Unless of course I did it wrong? I just simply tried to run it in the Start -> Search field since I couldn't come up with anything else to do it.
Sounds like you want the run dialog. Maybe they're the same thing? I only know XP. :/ Try pressing winkey+r and inputting the command there, making sure to give it the absolute path to the msi. Failing that, my intuition says that the virtualized harddrive is somehow confusing the installer. Have you tried increasing or decreasing its available space? Trying some different runtime/config options?
Experienced Forum User
Joined: 10/3/2005
Posts: 1332
hotsam wrote:
Yeah. Inequality has worked fine until these latest efforts so Lua scripting seems to be inevitable (or at least a huge help) in some cases. I'm a programmer so scripting shouldn't be a problem. I haven't gotten into Lua yet though for I'm new to this environment, so any example scripts would be great to begin with!
Awesome. I'm going to show you two scripts. The first is a library of functions for doing RAM searches, and the second is an example that uses the library... sort of. In retrospect, I'm not pleased with my abstraction. But hey, it got the job done. ;) The library defines a few functions: "makemem", "scanmem" and "display". makemem returns the complete RAM, which you store in a Lua table. The nice thing about this is that you can have as many of these tables as you want— the standard cheat search tools only let you have one search active, so far as I know. Again, looking back, I wish I'd added these functions to the existing table of "memory" functions. That would have made so much more sense. :( Anyway, scanmem implements the standard search operators. You can, of course, extend it to search by any kind of logic. Lastly, display describes how the found addresses should be shown to the user— hopefully in a way that doesn't draw out of bounds or anything crazy like that. The second script I linked defines the keys to do the searches, and a toggle key to display or hide the results. I haven't used it in months, but it seems to still work. Both scripts were written for FCEUX, but changing them to work with GENS shouldn't require anything more than changing the max memory range and hotkey mappings. Using the functions built into the emulator, you can also automate the process of searching— there are functions for frame-advancing, sending gamepad input to the emulator, as well as savestate handling. There should be a complete reference of emulator functions packaged with GENS. I think that covers everything... except the basics. There should be some more example scripts included with the emulator, which will hopefully make everything clear.
Experienced Forum User
Joined: 10/3/2005
Posts: 1332
BadPotato wrote:
==> If you need some advanced function like memory search or some lua script... this may become complex.
When I used J2K, I had a bunch of different maps, and cycled through them with the R3 button. In other words, it can handle mappings of any complexity. I'm not sure if "next state" is a function you can map to a hotkey in any emulator other than Gens, but certainly you could map the ten "select state" hotkeys on an alternate configuration, with save/load current state on the shoulder keys of your primary configuration. Really, the only obvious limitation is your own capacity to memorize 20-50 key bindings.
Experienced Forum User
Joined: 10/3/2005
Posts: 1332
The only game I've seen that had really wonky hitpoint storage was Darius Twin. The game used some kind of pointer scheme, presumably because of how enemies stream in and out in large waves without necessarily being deleted at any given moment. You couldn't track the HP of any one enemy for more than a few seconds, because they all kept shifting around in some arbitrary looking way that I never uncovered. Solar Jetman stored the lo and hibyte of a few 16-bit values in two non-consecutive addresses. They might be offset by 32 bytes, or some non-rounded, non-power-of-two number. If you're dealing with a number greater than 255, that's something to look out for on NES games. Rock and Roll Racing had the quirk of storing the amount of bonus money the player had picked up off the race track using the last 4 bits of one byte, and the first 4 bits of the byte following it. If you can roughly infer the amount of HP your search target has, you might be able to test for such a scheme. Practically speaking, you might try generalizing the search to simply use inequality, rather than risk being misled by any assumption. One other piece of advice, which tends to be too advanced (or at any rate, too daunting) to be of practical use to a layman is to automate (or at least accelerate) RAM searching using Lua scripting. If you're a programmer or CS student, it might be worth looking into. I can give you some starting-off code if you're interested. I or someone else here may even have tinkered with the games you're working on, so you could mention them by name. I guess I should also disclaim the accuracy of all the trivia I've described. It's old information that I used once and let lapse. I just didn't want to put "IIRC" in every goddamn sentence.
Experienced Forum User
Joined: 10/3/2005
Posts: 1332
Most people spell out "F A Q", it seems. I thought it was weird the first time I heard it. GIF has a hard G, like Jif.
Is a graphical user interface a "Gooey" or a G-U-I?
I just call it a "you-eye", since it's usually unambiguous which kind of interface I'm talking about. Also, we have this thread already: http://tasvideos.org/forum/viewtopic.php?t=5353
Post subject: Well, that doesn't sound too difficult.
Experienced Forum User
Joined: 10/3/2005
Posts: 1332
Tried running the example script "MemoryWatch.lua", packaged with the emulator. First it told me it couldn't find "auxlib", but it was looking in a relative path where it couldn't possibly find it. Had to move it to /usr/local/share/lua/5.1, but then it worked. Next: "module 'libiuplua51' not found". Sure enough, I need to install that. Grepped the docs for an appropriate version, but no info found. Googled for "lua iup". Grabbed source. All the files have their executable flag set. Always a good sign, that. Build is quite broken, missing, among other things, "cdiup.h". It looks like someone's going to have to submit patches to bring the Linux build up to speed, since finding a quick workaround seems like a stupid idea, if it's even possible. I didn't fare any better using the Linux binaries than I did with the source. I "installed" the SOs and other IUP files until FCEUX stopped complaining about missing files, but then it complained about undefined symbols. I tried one of IUP's example scripts to more or less the same result.
Experienced Forum User
Joined: 10/3/2005
Posts: 1332
Raijin: The snes9x/FCEU/etc tables should be (and probably have already been) deprecated in favor of the "emu" table. One reason for this is that a sufficiently generic script should work with any emulator without need of modification. Having to globally change "snes9x" to "FCEU" to make a script work on another platform isn't exactly onerous, but it is undesirable just the same.
Experienced Forum User
Joined: 10/3/2005
Posts: 1332
Huxley himself called his Brave New World a "negative utopia", which I suppose is identical to a "dystopia." In the end, the few who had seriously questioned their civilization didn't want to live there anymore, with the exception of that one guy. If that's a utopia, then I think a city of zombies would also have to be called a utopia. Zombies are too well-mannered to eat each other. They presumably don't get too bothered about anything, being more or less braindead. They're easily amused, too— they just stand around muttering "braaains." Still haven't gotten around to (re)reading 1984, unfortunately. On the horizon: The Brothers Karamazov. I guess I'm embarking on a bit of a Russian kick. The Seagull by Anton Chekhov was directly referenced in The Void, so I'm going to have to get more of that, too...
Experienced Forum User
Joined: 10/3/2005
Posts: 1332
I just finished watching, and I have to say, that was fantastic— both the run and the commentary. I really got a sense of how much work must have gone into the run, and I appreciate the effort you put into recording this. Yes vote.
Post subject: yet another absurd idea
Experienced Forum User
Joined: 10/3/2005
Posts: 1332
I was going to say "the more convoluted the voting system becomes, the more redundant it will become with the rating system." But that would fail to take into account that the only categories for rating are entertainment and tech... so maybe we should add humor, glitchiness, etc to the rating system, and then instead of the yearly voting (which is going to be biased in various ways) we could have a thread full of graphs using the stats collected over the year.
Experienced Forum User
Joined: 10/3/2005
Posts: 1332
It's using a knife and fork to eat a hamburger... but instead of eating it on a plate, it's holding the burger with its feet. Furthermore, why would an eight-foot-tall wookiee want to live with a bunch of two-foot-tall ewoks on Endor? It does not make sense!
Experienced Forum User
Joined: 10/3/2005
Posts: 1332
Actually, I'm pretty sure I was wrong. False and nil are not equal, but both will evaluate not-true in an if statement. I got confused because I remembered having trouble with false being treated as true in some capacity... possibly joypad.set rather than anything in Lua proper.
Experienced Forum User
Joined: 10/3/2005
Posts: 1332
I have one guess as to why the else clause never executes: FCEU.lagged() returns false instead of nil on a lag frame. Try "if FCEU.lagged ~= false then" ...maybe?
Experienced Forum User
Joined: 10/3/2005
Posts: 1332
I was watching an LP of Vampire: The Masquerade — Redemption, and started to wonder about the crusades. That is, the version that isn't teeming with vampires. First result on youtube: a documentary narrated by Keith David. That's the guy who voiced Goliath in Gargoyles, for anyone who remembers that show.