Posts for Niamek


1 2
7 8 9
21 22
Experienced Forum User
Joined: 10/23/2009
Posts: 545
Location: Where?
Maybe you need to find out in which portion of the map the item is(The map could be divided in sections)? One another way would be to find if there is an address that tells to the item to be on screen range or not?
Experienced Forum User
Joined: 10/23/2009
Posts: 545
Location: Where?
Suuper wrote:
@niamek: I am unable to reproduce your error. I don't see how doing something quickly would mess anything up, and I also don't know how quickly you mean for me to do it. If you could find a method of reproducing the error that doesn't require quick clicking, that would be great. (It also seems that this situation is so contrived that nobody would ever accidentally encounter it...) Also, please post the settings you have under "Metadata..." -> "Savestate History Settings" When I tried it with branch states turned off, everything worked the way it is supposed to. With it turned on, however, I got a different error when I tried to re-open it. Bizhawk told me that the system Id did not match; the movie had no system Id set. (When I changed the code to bypass that check, it found other problems with it.) I don't know if this is a problem caused by that setting being half-baked, or somewhere else. Could someone familiar with movie saving look into it? (I tested with Mario Kart Super Circuit, US.)
It's not related to branches now. I just got it without even using branches at all.
************* Exception Text ************** System.IO.EndOfStreamException: Unable to read beyond the end of the stream. at System.IO.BinaryReader.FillBuffer(Int32 numBytes) at System.IO.BinaryReader.ReadInt32() at BizHawk.Client.Common.TasStateManager.Load(BinaryReader br) at BizHawk.Client.Common.TasMovie.<Load>b__45(BinaryReader br, Int64 length) at BizHawk.Client.Common.BinaryStateLoader.<>c__DisplayClass4.<GetLump>b__3(Stream s, Int64 length) at BizHawk.Client.Common.BinaryStateLoader.GetLump(BinaryStateLump lump, Boolean abort, Action`2 callback) at BizHawk.Client.Common.BinaryStateLoader.GetLump(BinaryStateLump lump, Boolean abort, Action`2 callback) at BizHawk.Client.Common.TasMovie.Load(Boolean preload) at BizHawk.Client.Common.MovieSession.QueueNewMovie(IMovie movie, Boolean record, IEmulator emulator) at BizHawk.Client.EmuHawk.MainForm.StartNewMovie(IMovie movie, Boolean record) at BizHawk.Client.EmuHawk.TAStudio.StartNewMovieWrapper(Boolean record, IMovie movie) at BizHawk.Client.EmuHawk.TAStudio.HandleMovieLoadStuff(TasMovie movie) at BizHawk.Client.EmuHawk.TAStudio.LoadFile(FileInfo file, Boolean startsFromSavestate) at BizHawk.Client.EmuHawk.TAStudio.OpenTasMenuItem_Click(Object sender, EventArgs e) at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e) at System.Windows.Forms.ToolStripMenuItem.OnClick(EventArgs e) at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e) at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e) at System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e, ToolStripItemEventType met) at System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met) at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea) at System.Windows.Forms.ToolStripDropDown.OnMouseUp(MouseEventArgs mea) at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks) at System.Windows.Forms.Control.WndProc(Message& m) at System.Windows.Forms.ScrollableControl.WndProc(Message& m) at System.Windows.Forms.ToolStrip.WndProc(Message& m) at System.Windows.Forms.ToolStripDropDown.WndProc(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m) at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
I did clone and delete a lot. Something lead me to believe that's these two options the culprit for that exception text. I'll try to repro when I'm up for it.
Experienced Forum User
Joined: 10/23/2009
Posts: 545
Location: Where?
The problem is that it's not up to the others to do what you want to see or made. But to yourself. Let's not forget there is also the wishlists threads and the list of ideas on the site. :/ Basically, it's already there.
Post subject: Change count changing every other frames
Experienced Forum User
Joined: 10/23/2009
Posts: 545
Location: Where?
Hello! So I'm searching some addresses with RAM search(Bizhawk), and noticed that some address has a change count that keeps increasing every frame even if the address value doesn,t change according to RAM Search. So what should I do? Ignore it? or reduce one byte? What if I believe it should be really a 2 bytes information?
Experienced Forum User
Joined: 10/23/2009
Posts: 545
Location: Where?
Language: lua

Local function EnemyBox(Presence,Xcam,Lx,Rx,Ycam,Uy,Dy) if Presence == 0 then gui.drawBox( Xcam - Lx, Ycam - Uy, Xcam + Rx, Ycam + Dy, ) end end while true do gui.drawBox( mainmemory.readbyte(0x0B9A)-5, mainmemory.readbyte(0x0B9B)-25, mainmemory.readbyte(0x0B9A)+10, mainmemory.readbyte(0x0B9B) ) --[[ I dislike the coordinates to be moving, so I'll change it once a new release os out so I can use extrapadding. gui.pixelText( mainmemory.readbyte(0x0B9A)-10, mainmemory.readbyte(0x0B9B), "X:".. mainmemory.readbyte(0x0B9A) + mainmemory.readbyte(0x0483) + mainmemory.readbyte(0x484)*255 ) gui.pixelText( mainmemory.readbyte(0x0B9A)-10, mainmemory.readbyte(0x0B9B)+8, "Y:".. mainmemory.readbyte(0x0B9B) + mainmemory.readbyte(0x0481) + mainmemory.readbyte(0x482)*255 )]] EnemyBox( mainmemory.readbyte(0x07E2), mainmemory.readbyte(0x3874),5,5, mainmemory.readbyte(0x3873),5,5 ) emu.frameadvance() end
I'm trying to do this, and it throws me this error: http://imgur.com/Ntfy3cQ I preferred posting tis here in case of. I posted it there since it seems that both me an error are at fault. i think I made something bad with my script, but instead of just telling me that my script has an error, it threw me that window. So I'm not sure... EDIT: Added a "," that should've been there. It still throws the error. EDIT: It seems that it's the capital L of "local" that throws this. I've changed Local to local and it's now okay. EDIT: Scratch that, it's not because of the "l".
Experienced Forum User
Joined: 10/23/2009
Posts: 545
Location: Where?
Ohhh okay I thought it was a different function. Thanks! I'll wait for the next version and try out. I need to wait for the next version anyway. EDIT: According to this link at the savestate tab, there is no function that returns the current loaded slot. http://tasvideos.org/Bizhawk/LuaFunctions.html. I assume there is none yet? EDIT:
zeromus wrote:
bugs happen, bugs get fixed.
Concerning this, It seems to be when the four parameters aren't the same.
Experienced Forum User
Joined: 10/23/2009
Posts: 545
Location: Where?
zeromus wrote:
gui.DrawNew("native"); --how to set the rendering surface by defaut.
gui.pixelText(0,20,"hi2u",0xff00ff00)
This depends on window size too.... if you want to render in a way that doesn't depend on window size then why are you using setclientextrapadding? use setgameextrapadding instead.
I've tried setgameextrapadding one time, and it stretched the game if I recall correctly. Thank for the sample, I'll try out later.
Experienced Forum User
Joined: 10/23/2009
Posts: 545
Location: Where?
zeromus wrote:
with gui.text, it can appear in the extra space. with gui.renderstring or something like that, it can appear in the extra space only if you set the rendering surface to the client area (which it isn't by default). if you render to the 'native' surface then the padding doesn't exist yet when it's rendered; its added later in the 'client' part
I've tried with gui.text, it does works, but it bothers me that it's dependent on the window size. I'd like to use gui.pixelText.(I'd like to transfer what I've done currently with pixeltext and gui.drawlines to that new area if it's possible) I'm not sure how to set the rendering surface by defaut. I've looked at the functions of the client section and haven't seen something that seem to do that. And I'm not sure to understand the last sentence.
Experienced Forum User
Joined: 10/23/2009
Posts: 545
Location: Where?
Amazing work!
Experienced Forum User
Joined: 10/23/2009
Posts: 545
Location: Where?
So, I discovered the client.SetCclientExtraPadding function, which sounds like something that gives more place to put text(especially on the side of the screen). So I moved some of my text to the extra space, but it doesn't appear there. It's like it's "just" black space added. I think I miss a function or I miss something else. Basically, I'd like to display coordinates and other stuff on the sides of the game screen instead of on the game screen.
Experienced Forum User
Joined: 10/23/2009
Posts: 545
Location: Where?
Closing is not related. Will have to be debugged another time. As of the first bug. Currently testing and got it more reliably. I'll report it on GitHUB. EDIT: Reported. Should be reproducible reliably. It was the bugs I kept getting each time I TAS. To summarize, deleting or cloning a group of frames, then saving a branch, then selecting. These steps breaks everything. And since I clone or delete a lot like that, it was inevitable that I kept getting these annoying bugs.
Experienced Forum User
Joined: 10/23/2009
Posts: 545
Location: Where?
Dashjump wrote:
As for future projects, I'll probably be doing a few ring attack TASes (those are surprisingly fun to do, contrary to what I expected). For anyone who would like to check out my complete playlist of Sonic Advance 3 TASes, it's right here.
I love Ring attacks TAS(Especially the TAS from TheYogWog.) I hope that there will be other Ring attacks TAS! I watched some of yours and I loved them. And again, good work with Sonic Advance 3.
Post subject: 2 new bugs
Experienced Forum User
Joined: 10/23/2009
Posts: 545
Location: Where?
So, I got this bug, but really don't know how I got that. I just TASed.
Bizhawk wrote:
************** Exception Text ************** System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index at System.ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument argument, ExceptionResource resource) at System.Collections.Generic.SortedList`2.GetByIndex(Int32 index) at System.Collections.Generic.SortedList`2.ValueList.get_Item(Int32 index) at BizHawk.Client.Common.TasStateManager.stateHasDuplicate(Int32 frame, Int32 branchHash) at BizHawk.Client.Common.TasStateManager.RemoveState(Int32 frame, Int32 branch) at BizHawk.Client.Common.TasStateManager.Invalidate(Int32 frame) at BizHawk.Client.Common.TasMovie.InvalidateAfter(Int32 frame) at BizHawk.Client.Common.TasMovie.ToggleBoolState(Int32 frame, String buttonName) at BizHawk.Client.EmuHawk.TAStudio.TasView_MouseDown(Object sender, MouseEventArgs e) at System.Windows.Forms.Control.OnMouseDown(MouseEventArgs e) at BizHawk.Client.EmuHawk.InputRoll.OnMouseDown(MouseEventArgs e) at System.Windows.Forms.Control.WmMouseDown(Message& m, MouseButtons button, Int32 clicks) at System.Windows.Forms.Control.WndProc(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m) at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
Anyonegot that? Anyone got idea how I could repro? EDIT: After clicking "continue", and trying to TAS it rethrows the same error, so there is something wrong with that index or collection. :/ EDIT: Closing got me this:
See the end of this message for details on invoking just-in-time (JIT) debugging instead of this dialog box. ************** Exception Text ************** System.InvalidOperationException: Invoke or BeginInvoke cannot be called on a control until the window handle has been created. at System.Windows.Forms.Control.MarshaledInvoke(Control caller, Delegate method, Object[] args, Boolean synchronous) at System.Windows.Forms.Control.Invoke(Delegate method, Object[] args) at BizHawk.Client.EmuHawk.TAStudio.<InitializeSeekWorker>b__b(Object s, ProgressChangedEventArgs e) at System.ComponentModel.BackgroundWorker.OnProgressChanged(ProgressChangedEventArgs e) at System.ComponentModel.BackgroundWorker.ProgressReporter(Object arg)
Maybe they are related?
Post subject: Scooby-Doo 2
Experienced Forum User
Joined: 10/23/2009
Posts: 545
Location: Where?
About time I open this thread concerning my main project. I believe this game will produce a good TAS once completed. I'm not far in the game currently, but I've done some research/work. Firstly, I've found some addresses: http://tasvideos.org/userfiles/info/29683289569722926. I've had trouble finding some stuffs like some timer(I believe there is a timer for the ptera to come back after an attack for example, but had trouble finding something related to it). I've not found every enemies positions yet, but I've found some. As of important info. I noticed that jumping gives you an initial Y constant speed which nothing can be done for a certain amount of frames, then you can alter the Y speed variation so you can be in the air longer. And since being in the air is slower than running on floor, you need to be in the air less often. Running gives you a speed of 912. But after each time a jump is made, the max speed is dropped(Don't remember the exact value after one jump). You can regain the max speed by letting go 1 frame. But it could be not worth it. I haven't got around to test Stopping: Letting go one frame, then repressing the button avoids the braking motion and come to a complete stop. The games doesn't react to directional inputs pressed for one frame only. It needs to be at minimum two. Attacking in the air cancel the running. So you need to avoid it if possible/faster. As of movie, I don't have something worth showing. I'm at the second section(with the stairs and ladders). I've started TASing it, but bugs kept me from TASing it fully. Will work on it soon. I've noticed that jumping just before getting hit from certain damages sources gives a juge jumps boost. Might be useful. Might worth some investigation for some later levels. So nothing more than that for now.
Experienced Forum User
Joined: 10/23/2009
Posts: 545
Location: Where?
Yeah that's what I figured after trying a little bit today. I messed with it a little bit today, and I understand it better. Thanks for these explanation! What is the difference for "best" and "value" for the address section?
Experienced Forum User
Joined: 10/23/2009
Posts: 545
Location: Where?
Pokota wrote:
at least one button to maybe press
So I need to improve something. I'd like to try basic bot for that. But I'm not sure to understand it. Maybe it needs some documentation somewhere on the page on how to use it? I think I understand the window it opens, except for the controls section. Can someone explain me a little bit? Some details on the section on top of the controls would be great too, as I'm not sure about everything too.
Experienced Forum User
Joined: 10/23/2009
Posts: 545
Location: Where?
I'd rather use a hex format since it gives me more choice of colors.Thank you Mugg! Something is really wrong with my calculus.
Language: lua

speedvariation= 912 - mainmemory.read_s32_le(0x16C8) diff= 255/speedvariation
This shouldn't give a very small value such as 0,2. I expectedit to be much higher like 107. The mainmemory.read_s32_le(0x16C8) can be 384. From my calculator, I should have something like 107. Not 0,483. It's because I can lose some speed at some point. And I figured that I will calculate the frames needed so that the speed variation will lose a whole frame when compared to the max speed. I canc onfirm I have the good address. I checked on http://www.lua.org/pil/3.1.html and the operator for dividing something is the right one. So I'm at a lost. The substraction works, the division works. But the division with a real value like 5 works. So I tried with
Language: lua

diff = 255/ (912 - mainmemory.read_s32_le(0x16C8))
But it still gives a too low value. I'm really confused...
EDIT: Scrap that. Miscalculated.[/b]
Experienced Forum User
Joined: 10/23/2009
Posts: 545
Location: Where?
Ohh wow, I totally missed that. I expected that typo like that wouldn't give a nil value. Thank you! So now I tried with colors. Having don some scripting with VBA, I recalled that writting green or blue would work. So I did this:
Language: lua

if mainmemory.read_s32_le(0x16C8) == 912 then gui.pixelText(5,21,"speX:" .. mainmemory.read_s32_le(0x16C8),green) -- elseif -- mainmemory.read_s32_le(0x16C8) == 0 then -- gui.pixelText(5,21,"speX:" .. mainmemory.read_s32_le(0x16C8)) else gui.pixelText(5,21,"speX:" .. mainmemory.read_s32_le(0x16C8),blue) end
But it doesn't seem to put any blue or green. So I'm missing something. Do I have to put colors in hexadecimal format? (The commented lines are lines that I wrote, but not ready to test that line. Basically, i wanted a color for 0, a color for 912, and one another color for any other value.) So here is the function.
Language: lua

gui.drawText(int x, int y, string message, [Color? forecolor = null], [Color? backcolor = null], [int? fontsize = null], [string fontfamily = null], [string fontstyle = null])
As I was told, [] mean not mandatory. So if i put only one color(Like I did), it will be for the forecolor? Or both? Or neither? I don't plan to mess with fonts.
Post subject: A nil value?
Experienced Forum User
Joined: 10/23/2009
Posts: 545
Location: Where?
Hello, I apparently have a nul value at the line before the last line of the following code:
Language: lua

if mainmemory.read_s32_le(0x16C8) == 912 then gui.pixelText(10,10,"speX:" .. mainmemory.read_s32_le(0x16C8)) --Display a green speed, meaning that I'm at top speed else gui.pixelText(10,10,"speX:" .. maimmemory.read_s32_le(0x16C8)) end
But I'm baffled, it doesn't throw an error on the third line. I seem to have written exactly the same thing.(Colors are yet to be added). So I can't figure out what is wrong. The rest of the code is just gui.drawtexts, so it shouldn't interfere with that poriton of the code.
Experienced Forum User
Joined: 10/23/2009
Posts: 545
Location: Where?
jlun2 wrote:
Add gui.DrawNew("native") to draw on the black space outside the game. To draw back on the game space, use gui.DrawNew("emu") which is also default.
Hello jlun2, I'm not sure how to use that function. Could you provide me an example? I'm also not sure why a gui function would fix a video problem.
Experienced Forum User
Joined: 10/23/2009
Posts: 545
Location: Where?
arandomgameTASer wrote:
PikachuMan wrote:
We could do a 3D Zelda Quad Run that consists of Ocarina of Time, Majora's Mask, Wind Waker, and Twilight Princess. If we use the GameCube, Ocarina of Time will be the one alongside Master Quest, and Majora's Mask will be from the Collector's Edition. If we use the Wii, Ocarina of Time and Majora's Mask will be from the Virtual Console, and in place of Wind Waker is Skyward Sword. If we use the Wii U, Ocarina of Time and Majora's Mask will be from the Virtual Console, and Wind Waker HD, and Twilight Princess HD will be used.
Or we should actually make finished TASes for Wind Waker and Twilight Princess before we worry about something that would take decades.
Or we just not worry about it. Concerning the TAS, Too bad there was a cheat since the beginning. :( Would've be a great addition. Maybe it's not perfect, but it's not that bad. Liked it.
Experienced Forum User
Joined: 10/23/2009
Posts: 545
Location: Where?
Currently testing. Will edit the message when I'm done. (With the latest release) EDIT: I'll be damned. I didn't repro. Maybe it's fixed? I also occured an another bug during my test. I'll post on GITHUB.
Experienced Forum User
Joined: 10/23/2009
Posts: 545
Location: Where?
It could be simply that the core you're using is very slow, but very accurate. If I run a SNES game fr example, it's very slow and lagging, but it's not in game lag. If you're not sure if it's the game that lags, display the lag counter on the screen. And you'll see. :)
Experienced Forum User
Joined: 10/23/2009
Posts: 545
Location: Where?
That worked! Thanks! But now I have an another trouble. I've used
Language: lua

client.SetGameExtraPadding(0,0,100,0)
so I can put some value on the side of the game screen. But I noticed that with that I'm missing a portion of the screen on the left! So I've looked at the lua function list, and found client.SetClientExtraPadding. I've tried this one too, it looks better, but I can't display other gui.pixeltext on that new space as opposed to the one I had. I've tried this just for fun:
Language: lua

client.SetGameExtraPadding(100,0,100,0)
Now the game itself is stretched. So I was wondering, why does the video is modified when I use that function? According to the description of the function, it shouldn't be touched. Am I missing something? Sorry with all those lua questions.
Experienced Forum User
Joined: 10/23/2009
Posts: 545
Location: Where?
Language: lua

if mainmemory.readbyte(0x0022) == 0 then correctionx = 0 correctiony = -100 mainmemory.readbyte(0x0022) == 1 then correctionx = 70 correctiony = 70 [...] end
So in that portion of my code, apparently there is no unexpected symbol on the 2nd line, but there is one on the 5th line. So I'm really confused. To me there aren't nothing wrong. I tried removing one of the two =, but now it throws me that it expected a "then" near a "=", which is already right after... I need to make differents corrections according to one value. I listed two of them. All the others are made the same way. I'll do maths with correctionx and correctiony.
1 2
7 8 9
21 22