Posts for Pokota

1 2
21 22 23
31 32
Pokota
He/Him
Experienced Forum User
Joined: 2/5/2014
Posts: 779
Oh lord the Alliance Skip. Talk about eye candy a game-breaking bug - though you have to be crazy, awesome, or crazy awesome to make it work anyway. I can look into the PS2 version but somehow I get the feeling that it's going to fix said bugs. E: The PS2 version looks more like a PSX game than a PS2 one, which makes sense given MM8's original release timing. The impression I get is that it was originally developed to be ported to the PSX but then was changed to a PS2 port once they saw when the release date for that would be. Without updating the assets significantly - the music and sounds are pretty much identical and I know the intro smk is the same. It also looks slow to navigate menus but that's more because I'm used to mouse speed than any d-pad imitations. If the pointer can even be used in walking mode; if it can't then there's no alliance skip. EE: I've found a copy on ebay for roughly $40. Should get here by the time SGDQ is over.
Adventures in Lua When did I get a vest?
Pokota
He/Him
Experienced Forum User
Joined: 2/5/2014
Posts: 779
Hmm... the impression I get is that there's a code interaction here that I can't see because it relies on code I... uhh, can't see. Try some rubber duck debugging when you get a chance.
Adventures in Lua When did I get a vest?
Pokota
He/Him
Experienced Forum User
Joined: 2/5/2014
Posts: 779
Hmm... you're testing isSingleMovieLoaded for the false block but you're testing movie.isLoaded for the true block. Why the difference? Still a dumb, you're making sure it's just one movie before you start trying to play it back.
Adventures in Lua When did I get a vest?
Pokota
He/Him
Experienced Forum User
Joined: 2/5/2014
Posts: 779
Does BizHawk support fonts installed to the system at all? I want to say there are some outlined fonts that come with Windows (haven't had a Mac ever and I don't have a Linux station at the moment). Solarplex: Why is this two while blocks instead of a nested if true do while? As written if it comes up false you're getting an infinite loop. Oh you're probably iterating through until it does become true. But couldn't that be done using an if-else statement nested inside a big while loop instead of two separate while loops? Nope I'm still a dumb. When do you call the playback for the movie file?
Adventures in Lua When did I get a vest?
Pokota
He/Him
Experienced Forum User
Joined: 2/5/2014
Posts: 779
Add it to http://tasvideos.org/Bizhawk/Features.html - reads ISO, Bin/Cue and ECM/Cue files without outside mounting. I don't like other formats (and didn't know ECM was a thing until very recently) so I don't know what all's supported.
Adventures in Lua When did I get a vest?
Pokota
He/Him
Experienced Forum User
Joined: 2/5/2014
Posts: 779
zeromus: Is the ECM acceptance core specific or is it across all cores?
Adventures in Lua When did I get a vest?
Pokota
He/Him
Experienced Forum User
Joined: 2/5/2014
Posts: 779
Ah crap, you're right. How I wrote it would break without iterating if it ever comes up false, which isn't the desired behavior. This is what I get for writing code without testing it.
Adventures in Lua When did I get a vest?
Pokota
He/Him
Experienced Forum User
Joined: 2/5/2014
Posts: 779
Is that documented as a feature? That needs to be documented as a feature if it's not.
Adventures in Lua When did I get a vest?
Pokota
He/Him
Experienced Forum User
Joined: 2/5/2014
Posts: 779
Samurai Goroh: That first one's not an invalid test - if any of the entries are a 2 (except for entry 7), then it can't succeed, and at least one entry that isn't entry 2 has to be a 7 for it to succeed. jlun2: That second one is actually one if easier than the first one since you're not jumping around in the array - it can be done with just one function.
--this code doesn't actually work, by the way, or at the very least doesn't work as intended.
function test_is_present(array array, int target) as Boolean
for each i in array,
    if (readbyte(array[i]) == target) then
        return true
    else
        return false
    end if
end for 
end function

if ((test_is_present(lift, 1) == true) and (test_is_present(lift, 6) == true)) then
    magic()
end if
and you just flip a true to a false in the if around magic if you need the tested value to not be there.
Adventures in Lua When did I get a vest?
Pokota
He/Him
Experienced Forum User
Joined: 2/5/2014
Posts: 779
You probably should section those tests off into their own functions and test iteratively since you're going through 1-6 in order. Pseudocode below E: Looking back you'll also need to embed another if statement into the loops so that you're skipping over lift[2] when you test for 7, so that'll look like
function test_for_not_2() as boolean
for i, 1, 6
    if (readbyte(lift[i]) ~=2)
        return true
    else
        return false
    end if 
end for
end function

function test_for_7() as boolean
for i, 1, 7
    if i ~= 2
        if (readbyte(lift[i]) == 7) 
            return true
        else
            return false
        end if
    end if
end for
end function

if ((test_for_not2() == true) and (test_for_7() == true) then
    do a thing
end if 
This should stop each test as soon as it finds a true, but from what I'm seeing you just need one of each anyway. E: does Lua do type declarations for functions? I forget.
Adventures in Lua When did I get a vest?
Pokota
He/Him
Experienced Forum User
Joined: 2/5/2014
Posts: 779
I'm working on converting Xkeeper's Link's Awakening lua script (and by extension the X-functions resource script) for use with BizHawk, but my ignorance is showing - the version of X-functions I'm forking off of has readword in it, what size does/should that correspond with? E: Never mind; what's in X-functions is just a 2-byte read from what I'm seeing, it's easy enough to replace that out. Okay new problem - I'm getting an exception when I try to run the script that points to line 29 of the Link's Awakening script, but I don't see how evaluating a boolean in an if statement corresponds to "invalid arguments to method call" - does it think nohotkeys is a method? (It's line 30 in what I'm working off of since I inserted memory.usememorydomain("System Bus") as line 2)
Adventures in Lua When did I get a vest?
Pokota
He/Him
Experienced Forum User
Joined: 2/5/2014
Posts: 779
Those won't work, they're too close to the community to be sufficiently objective for Wikipedia's purposes. Ready Steady Yeti, this is more of a question for the Wikipedia community than it is for our own. They'll be able to talk you through the process of finding and vetting acceptable references. Lord knows TVTropes has been around forever and their Wikipedia page got deleted more than once for lack of acceptable references.
Adventures in Lua When did I get a vest?
Pokota
He/Him
Experienced Forum User
Joined: 2/5/2014
Posts: 779
So MUGG has declined to direct payment of the bounty for the page, where do I go to donate money directly to the site?
Adventures in Lua When did I get a vest?
Pokota
He/Him
Experienced Forum User
Joined: 2/5/2014
Posts: 779
Who all has edit rights for that page, and which one of them wants to sift through and monitor this thread for bounties?
Adventures in Lua When did I get a vest?
Pokota
He/Him
Experienced Forum User
Joined: 2/5/2014
Posts: 779
I'm okay with that interpretation, but as Aqfaq filled the bounty it's her decision as to how the money gets applied. As for how the page is used, that's up to the editors. I just wanted the page to finally be a reality after five years of disorganized and lost-in-the-thread bounties that still need to be sifted through.
Adventures in Lua When did I get a vest?
Pokota
He/Him
Experienced Forum User
Joined: 2/5/2014
Posts: 779
Aqfaq wrote:
http://tasvideos.org/Bounties.html
Where do you want that money sent?
Adventures in Lua When did I get a vest?
Pokota
He/Him
Experienced Forum User
Joined: 2/5/2014
Posts: 779
$20 to the creation of a wiki page for outstanding bounties, to be paid as a donation to tasvideos.org (or to a reasonably acceptable substitute as defined by the fulfilling users) within 48 hours implementation.
Adventures in Lua When did I get a vest?
Pokota
He/Him
Experienced Forum User
Joined: 2/5/2014
Posts: 779
Memory addresses in BizHawk are relative to the start of the domain (unlike basically every other emulator out there). Say your address in Visual Boy Advance is 0x9234. Bizhawk sees that as being GB WRAM, which has a root offset of 0x8000 - to get the final address that BizHawk can manipulate, you have to remove 0x8000 from the VBA address. That would give you GB WRAM 0x1234. If the address you're trying to work with isn't in the default domain, you'll need to tell the code to change domains. My earlier RNG Strobe has an example of doing that. It looks like the address you're after is going to be HRAM 0x18, so you'll need to do this:
Language: lua

local HRAM = "HRAM" function gameInfo() memory.usememorydomain(HRAM) xcord = memory.readbyte(0x18) gui.drawText(5, 5, "X: " .. xcord) end while true do gameInfo() emu.frameadvance() end
Adventures in Lua When did I get a vest?
Pokota
He/Him
Experienced Forum User
Joined: 2/5/2014
Posts: 779
MUGG wrote:
episode 104 what did they smoke?
Sleep
Adventures in Lua When did I get a vest?
Pokota
He/Him
Experienced Forum User
Joined: 2/5/2014
Posts: 779
I'm fine either way on the lens thing since it doesn't slow anything down.
Adventures in Lua When did I get a vest?
Pokota
He/Him
Experienced Forum User
Joined: 2/5/2014
Posts: 779
Ji-chan wrote:
Pokota wrote:
Out of curiosity, why Pearl instead of Platinum? E: Masterjun, that's a bit of a stretch if it's deliberate. I don't really care one way or the other, though maybe call it "Speed/Entertainment Tradeoff" since it's for the pun?
The Void is unwalkable from Platinum onwards.
I are good at saying what I mean. (I recently reacquired Platinum and have it on the brain) Why Pearl instead of Diamond?
Adventures in Lua When did I get a vest?
Pokota
He/Him
Experienced Forum User
Joined: 2/5/2014
Posts: 779
Out of curiosity, why Pearl instead of Platinum? E: Masterjun, that's a bit of a stretch if it's deliberate. I don't really care one way or the other, though maybe call it "Speed/Entertainment Tradeoff" since it's for the pun?
Adventures in Lua When did I get a vest?
Pokota
He/Him
Experienced Forum User
Joined: 2/5/2014
Posts: 779
Phoning in to report that Octoshock is working alright for general use.
Adventures in Lua When did I get a vest?
Pokota
He/Him
Experienced Forum User
Joined: 2/5/2014
Posts: 779
I generally only use the while true do loop when I have reason to put images on the canvas; for anything other than that (text and simple vector draws) I stick with calling my main function via onframestart. As an example, my strobe function above could be rewritten as
Language: lua

-- "Megaman Battle Network 2" -- This just generates a strobe effect powered by the RNG in the upper left corner. local rngvalue = 0x9080 local EWRAM = "EWRAM" function strobe() memory.usememorydomain(EWRAM) local color = memory.read_s32_le(rngvalue) local invert = color * -1 gui.drawBox(0,0,3,3,color,invert) end event.onframestart(strobe)
and it still works the same. The onframestart/onframeend methods do not play well with drawIcon and drawImage though (this is true as of 1.9.4, haven't tried breaking this with the new version yet)
Adventures in Lua When did I get a vest?
Pokota
He/Him
Experienced Forum User
Joined: 2/5/2014
Posts: 779
Tanooki Teabag wrote:
So, if I'm reading this correctly, the game's random seed is generated at startup and doesn't change at all? Is this the case on the actual Apple II hardware as well, or is it an emulation issue?
Probably the case on the Apple II as well; this was before Random Number Generation became an art form. It would be nice to find out if this is the case; how does one induce a memory dump from the middle of the game on that old thing?
Adventures in Lua When did I get a vest?
1 2
21 22 23
31 32