Posts for DeHackEd


1 2
5 6 7 32 33
Emulator Coder, Experienced Forum User, Published Author, Site Developer, Former player
Joined: 11/6/2004
Posts: 833
Anyone else desyncing? Right after pokey "joins" the team in the beginning. I can't see to beat it.
Emulator Coder, Experienced Forum User, Published Author, Site Developer, Former player
Joined: 11/6/2004
Posts: 833
The "Linux" that ships with Eee PCs is so dumbed down it's insulting. I formatted it even though there's a back door to give you a shell (which you can sudo into a root shell). My sister has an Acer brand still running the original OS. It's ext2 but it doesn't do filesystem checks on boot even if they're called for. Guess what I did Sunday night. Linux gives you the ultimate in flexibility and allows you to customize everything (and I do mean everything) to your heart's content. Doesn't mean you'll get it right though.
Emulator Coder, Experienced Forum User, Published Author, Site Developer, Former player
Joined: 11/6/2004
Posts: 833
Make sure you give them something high quality going in. If you're using H264, use fixed_quant or CRF set to around 23 for maximum quality. This will look quite good for most material even though there's actually a huge bitrate gain. If you want good videos on youtube, you need to spend the bits on it. Don't use 2pass mode. In related news, got links? To a sample broken video or what this Big Buck Bunny tutorial says?
Emulator Coder, Experienced Forum User, Published Author, Site Developer, Former player
Joined: 11/6/2004
Posts: 833
Oh hell yes. And for the record, the face boss has a name as well. (But it's stupid)
Emulator Coder, Experienced Forum User, Published Author, Site Developer, Former player
Joined: 11/6/2004
Posts: 833
Emulator Coder, Experienced Forum User, Published Author, Site Developer, Former player
Joined: 11/6/2004
Posts: 833
The vertical sync interrupt occurs 60 times per second (50 on PAL) and will only really cut through running code if the game lags. That's pretty much the definition of lag around here. For anything beyond that, talk to someone who writes emulators. On the PC end, this is why they invented valgrind.
Emulator Coder, Experienced Forum User, Published Author, Site Developer, Former player
Joined: 11/6/2004
Posts: 833
The NES would not have had threads. They could be faked with cooperative threading (more commonly known as coroutines) but no programmer in his right mind would put a yield() right in the middle of critical code. Then again we do have wall jumps. The NES does have interrupts, which is about as close as you can get. In fact, this is how Mega Man 2's horizontal scrolling bug works. There's something of a race condition when the vertical interrupt NMI goes off the the middle of code.
Emulator Coder, Experienced Forum User, Published Author, Site Developer, Former player
Joined: 11/6/2004
Posts: 833
Be sure to select a codec. Raw RGB video sucks. At least use ffmpeg's FFv1
Emulator Coder, Experienced Forum User, Published Author, Site Developer, Former player
Joined: 11/6/2004
Posts: 833
All the emulators we use have built-in AVI recording capabilities. You really should use those as they will not drop frames, will not lag, etc. Use of a re-encoding tool such as VirtualDub is still a good idea though if you care about the quality/filesize tradeoff.
Emulator Coder, Experienced Forum User, Published Author, Site Developer, Former player
Joined: 11/6/2004
Posts: 833
So I was playing around with one of my new Lua scripts when I stumbled upon something... That's a map of the SNES RAM. Each row is 512 bytes, 0x00 is black and 0xff is white... ... .... So about what i see in the game... Is this awesome? And can it be abused somehow? Edit: Then I actually started playing. I think my otherwise crazy bot idea might be feasible. Just a matter of decoding what I see. This image uses a stride size of 256 bytes instead of 512... I think maybe I should reduce it further for this image and merge the side-by-side images though...
Emulator Coder, Experienced Forum User, Published Author, Site Developer, Former player
Joined: 11/6/2004
Posts: 833
Around here, a 'tool' is anything beyond the experience of playing on a real console with original hardware and no cheat devices. The emulator by itself is not a tool. The emulator with slowdown and/or savestates is a tool. Memory watch is a tool. Lua is my tool. GDB is a tool. Game disassembly is a tool. And so on and so forth. The only rule is that the resulting movie must play back correctly using no tools other than the gamepad reading from the movie rather than your keyboard.
Emulator Coder, Experienced Forum User, Published Author, Site Developer, Former player
Joined: 11/6/2004
Posts: 833
Depends, but I think it's something like 70 years in the USA. To be sure, check out the release date of Steamboat Willy (disney black&white movie). It's still covered.
Emulator Coder, Experienced Forum User, Published Author, Site Developer, Former player
Joined: 11/6/2004
Posts: 833
The lua.h file and the rest need to be in your include path. If you installed lua through a package manager, look for a lua-dev or lua-devel package. If you compiled manually, make sure the headers made their way to /usr/local/include or /usr/include
Emulator Coder, Experienced Forum User, Published Author, Site Developer, Former player
Joined: 11/6/2004
Posts: 833
Flow of control: 0. startBlock4 is registered for 0x7e4000 and will never get unregistered. 1. startBlock4 gets called by the emulator. stopBlock4 gets registered for 0x7ea43f 2. stopBlock4 gets called by the emulator. It unregisters itself from 0x7ea43f 3. continuing, it starts by writing to 0x7e4000 which involes startBlock4, reregistering stopBlock4 again 4. continuing, stopBlock4 eventually writes to 0x7ea43f and calls itself again and unregisters itself again. Repeat steps 3 and 4 until Lua realizes there are 200 C->Lua->C transitions and instead runs error("C Stack overflow") (GDB and Lua's own built-in debugger rock when used together) Now, is this behaviour where memory.write* calling a registered function desired behaviour, or should Lua silently ignore attempts to write to memory by itself? Both have their merits.
Emulator Coder, Experienced Forum User, Published Author, Site Developer, Former player
Joined: 11/6/2004
Posts: 833
Can you send me the script you're using? Nothing in Lua should blow the C stack, unless you do something like infinite recursion via the various "register" functions.
Emulator Coder, Experienced Forum User, Published Author, Site Developer, Former player
Joined: 11/6/2004
Posts: 833
It takes real talent to keep me watching a long video, especially if it's a game I've never played. Good job. I'll probably claim this one for publishing.
Emulator Coder, Experienced Forum User, Published Author, Site Developer, Former player
Joined: 11/6/2004
Posts: 833
Cool. I'm adding memory.readbyterange. Snes9x allows for up to 5 players. Wow, anonymous fceu savestates are discarded immediately upon loading? Snes9x savestates persist forever. (Not true since once the savestate object falls out of use, the Lua memory garbage collector eats it, but it's close enough) You have a emu.framecount() function that links to movie.framecount() Transparency as int [1] is deprecated and to be deleted at some point in the near future. In the meantime, it will still work. I don't know WHY I ever did that since I always had support for "clear". If I'm reading the source code to snes9x right, SRAM is at 0x700000 and goes up to 0x702000 though it's mirrored a few times. It also varies by game and cart type, but this address seems stable enough. You might want to check out gui.drawpixel, gui.drawpixel and gui.drawpixel
Emulator Coder, Experienced Forum User, Published Author, Site Developer, Former player
Joined: 11/6/2004
Posts: 833
SNES Lua can access full ROM by specifying the full 24 bit address, so that's a moot point from my point of view. It's just a matter of finding the address. The actual SNES program has more trouble because it's a 16 bit system and the address prefix of the data needs to be loaded. Savestates (in snes9x) are kept in the temporary directory. If you want them to persist, load it and then immediately save to a player's slot. While I COULD give you the filename and then you could copy it, that does defeat the purpose of being anonymous. As for iup, if it's available as an extension to Lua, you can load it. I'm taking the position that the emulator itself should have the absolute minimal set of add-ons. What's what LuaForge is for. I did take a look at "iup" before, and it needs some kind of "Cd" dependency I don't have a clue what it wants and there's nothing in the readme or website documentation. Not to mention the source code tarball has some very broken permissions. Nice.
Emulator Coder, Experienced Forum User, Published Author, Site Developer, Former player
Joined: 11/6/2004
Posts: 833
Okay, I had free time and a cross-compiler handy, so I beat on Lua a bit. I added a movie.playback and .record function pair and need to know what else people want/need. Let's assume I'm working from a fresh 0.06 slate and havn't looked at the thread since that day... holy crap has it been that long?
Emulator Coder, Experienced Forum User, Published Author, Site Developer, Former player
Joined: 11/6/2004
Posts: 833
Well, there IS a wiki out there... Also, just for the hell of it, I whacked together a possible supervisor engine for use. I haven't tested it yet but it should allow two scripts to run isolated with time limits and are unable to interfere with each other or the emulator. Intended format of bot code:
-- Initialization goes here

while true do
-- processing goes here

    -- submit button press requests for this frame
    coroutine.yield{start=1, up=1, A=1}
end
Emulator Coder, Experienced Forum User, Published Author, Site Developer, Former player
Joined: 11/6/2004
Posts: 833
More specifically, the domain CAN'T be renewed because the site/server that does the work is good and dead. More info for those so inclined by following this link.
Emulator Coder, Experienced Forum User, Published Author, Site Developer, Former player
Joined: 11/6/2004
Posts: 833
http://65.93.101.29/microstorage.php My Dynamic DNS provider broke itself. I can't update the IP for the hostname. You can use this for the time being. Rewrite URLs as indicated.
Emulator Coder, Experienced Forum User, Published Author, Site Developer, Former player
Joined: 11/6/2004
Posts: 833
Just for technical notes, Lua does allow for some pretty powerful sandboxing. Two scripts can each expose a function to be run. The arbitrator script can give each function its own set of global variables. You can give access to the memory.read functions and any other limited access functions you want. Number of CPU cycles is already enforced by the emulator using lua's "hook" functions. Just override them (you lose run-away script protection though) and you can kill any function that tries to run more than a certain number of CPU cycles. And so on and so forth.
Emulator Coder, Experienced Forum User, Published Author, Site Developer, Former player
Joined: 11/6/2004
Posts: 833
Emulator Coder, Experienced Forum User, Published Author, Site Developer, Former player
Joined: 11/6/2004
Posts: 833
The only problem with the humour and little jokes is that this site does get machine translated, and such idioms tend not to survive the translation very well. That said, I deeply enjoy most of the descriptions I've written and would hate for them to be turned into "neutral" point-of-view comments.
1 2
5 6 7 32 33