Posts for BadPotato

1 2
6 7 8
22 23
Experienced Forum User
Joined: 1/26/2009
Posts: 558
Location: Canada - Québec
I think the run with the must "loading fest" happening is probably Azure Dreams. I guess we could compare the current encode and the "luascript" encode later, so in the end we should be able to know if there anything going different. In theory this shouldn't be the case. Allow me to recap with my low redaction skill, I'm sure this isn't necessary, but at the worse case, this is just gonna to boost my mind focus... hm yeah, that's right :) The "detection script"(TAS sound plugin) automate the process for getting specific frame know as checkpoint in the run, that might desync with Eternal SPU sound plugin(best sound quality). These checkpoint are taken as savestate with TAS sound plugin(best sync, but terrible sound quality). Also that very same script capture screenshot and convert it as a number, just like a md5sum program Then the "sync script"(Eternal SPU plugin) use the"savestate checkpoints"(from the TAS sound plugin) as a way to play thought the movie without getting any desync, while checking if everyframe is fine with the screenshot. As said previously, there shouldn't be any missing frame from the duplicated frame that might happen on loading screen. Now some of you might wonder about the process and say: Hey potato! Why would you not use a savestate from the TAS plugin for every frame and just play the whole thing? Well, the reason isn't because it might use of GB of storage, but is the following. Everytime we load a savestate from the TAS sound plugin, we still heard a quick sound output of the original savestate(with the TAS sound plugin) for that 1 frame. This means, that if there to many savestate... that sound will be audible, so we might want to optimize the checkpoint list, depending on how often a game might desync. To optimize this list, there are various trick, that I might not implement. But here's one: Sometime the sound isn't exactly the cause of the desync. I'm not sure what this is about, but I found out that if you simply reload a savestate from a couple of frame earlier before the desync frame with the Eternal SPU plugin, you can actualy avoid a desync! Since reloading a savestate from the Eternal plugin doesn't produce any "sound glitch", I might consider storing Eternal sound plugin savestate as well. Hehe, did anyone even got what I mean? So yeah, I guess it's possible to go crazy for trying to optimize the checkpoint workflow, but as I said I'll just keep this script simple stupid and just try to get this working. Can't garanty how ugly the script will be, thought. At some point, I could try some "simple" OO approach, but that's kinda a tricky matter, since there several way to create "object" in lua. Sadly I didn't saw anyone on this website, trying to put some effort on making any sort of common lib or framework project for Lua TASing, so I really wonder what's up with that and if should try to make some base as an alternative project to make some class here and there, instead of using module. But, I guess this isn't a big deal either. I'll post an another update soon. Also my last script had several error :/
Experienced Forum User
Joined: 1/26/2009
Posts: 558
Location: Canada - Québec
boct1584 wrote:
Mediafire is a perfectly good sharing site.
I believe some file expire after a while. So far, only DropBox didn't deceive me, even if there's a storage limit.
Experienced Forum User
Joined: 1/26/2009
Posts: 558
Location: Canada - Québec
I think this deserve a star or something... yes vote :)
Experienced Forum User
Joined: 1/26/2009
Posts: 558
Location: Canada - Québec
Just wondering, does anyone know if the PCSX-Reloaded project could still get some support for TAS tools? I'm pretty sure that our all our dev are sick of working with both pcsxrr and psxjin for several reason, but maybe there's still some motivate guys with knowledge out there?
Experienced Forum User
Joined: 1/26/2009
Posts: 558
Location: Canada - Québec
Alright, I figured that I should probably post an update, since there probably some people waiting for the script to be finished and the new PSX Mega Man X6(or Aktan already made it?) run seem to be waiting for his encode and it wouldn't be acceptable to keep relaying on time-consumming way to produce encode again. I really don't know how I'll manage my time, so I can't garanteed how long this gonna take. I'm just a dude that got way to many stuff to do... but I'll still try my best to help out. So here's an update: After serials severals experiments with the Lanes library, I managed to make a function that redraw the screen. Sadly it might not been used in the syncCheckpoints script since I found an another and easier way get rid of the frame duplication problem without having to relay on lua multi-threading. But since, I already made the code for that redraw function, I'll still leave it there in the project and it might still been used for the double instance setup. As I said, I think the double setup is the only way to get an "automatic workflow". Thankfully, the script doesn't have that much work left to do. I basically have all the piece of the puzzle... I just need to be put them together and test the whole thing. For the communication between the pcsxrr instance, I ended up going for the LuaXML API, that give some basic tool for both writing/parsing a status file. One status file should be used for each pcsxrr instance and at some point one instance would send a request for the other instance to produce a specific checkpoint, etc.. Using XML should work, but I've been interested by the lua ØMQ API, as well. It offer to send data by using socket instead of using file for I/O. I really don't know if that could have been working correctly, thought. Also, I just remembered something that could be terribly annoying. If my memory's right, sometime the Eternal SPU plugin will desync more or less often while using kkapture in same time. I'll need to investigate more about this, since I'm still unsure how I used to cause such issue the happen and if this is avoidable(maybe forcing the pcsxrr speed to normal?). As for the video plugin issue pointed by Aktan for the loading screen(I guess this is what he mean), I gonna admit that this confuse me quite a bit, since so far I relay a lot on the "TAS Soft Graphics plugin 0.2" to produce accurate screenshot with the "TAS Sound Plugin 0.2". The final "checkpoint list" of savestate might then been innacurate if the screenshot are somewhat corrupted, but think this problem is more relevant as an emulation and there's a limit on what we can fix in the encoder corner. That's said, that made me thinking that there also the "TAS OpenGL Graphics Plugin 0.1" that is supposed work better for few game. I guess it could be interesting to see if the plugin could be used partly or completely for some encode... Update: PcsxrrEncodeWofkflowV4.07 If anyone is interested, I guess I could make some Google project or GitHub repo for this.
Experienced Forum User
Joined: 1/26/2009
Posts: 558
Location: Canada - Québec
My opinion so far is we need a centralized platform where normal user can put memory adress, movie, lua script, cheat and other note. We can't just build this kind of database out of nowhere. We need a place where people from differents langages(like japanese) would feel pleased to share his data, etc... Of course, an another thing would be to have an ability to make backup. Honestly, it's always a disappoint for me when I see when some project host going offline.
Experienced Forum User
Joined: 1/26/2009
Posts: 558
Location: Canada - Québec
I'm somewhat stuck, when loading a savestate the screen isn't updated right away. I would badly need some redraw function :( If we ignore this problem, sometime the previous frame when loading the savestate might be duplicated... kinda weird. The only way to "update perfectly" without skip from any "state" of the emulator(example you want to loadstate frame 1000 from frame 1050), is to pause the emulator, load the savestate and give the control to the user. So I've also tried to find if there any other "hackish" way to update the screen without giving the control to the user, but here what I found while messing around: There's a bug with pcsx.unpause(), that make it exiting the script. But I found out that if you do a pcsx.pause() or a pcsx.unpause() inside a "lua corrutine", the main script will continue to run. Sadly, both function still work the sameway has pcsx.frameadvance(), so the screen isn't updated. Anyway, messing with the lua corrutine made me realize that they work in a very different way as the normal thread in other programming language... they almost work as normal function. A possible plan to get rid of this problem would be to try an another multitasking lib to create a separate thread that will give the control to the user in order to update the screen and then go back to the main lua script. But I think that might become a bit complicated. I guess what I said might sound like gibberish, but this isn't really easy to describe either. On another hand if we get a duplicated frame on every "savestate checkpoint", that could be an actual fair trade for getting a fully automated process. So I might as well ignore this problem since I believe it could be fairly easy to just replace the correct frame by the right screenshot in the final encoding process. Meanwhile, here's an update : PcsxrrEncodeWofkflowV4.01 I added a configuration/propreties files in lua, by using the lua module feature. I really don't know if this is the right way to it, but at least I don't have to repeat the same info at multiple place.
Experienced Forum User
Joined: 1/26/2009
Posts: 558
Location: Canada - Québec
Ok, actually for the split issue I believe this was the sound or the video that ended up been corrupted. But, I'll try to do more test about it later to confirm this... As for the command line for kkapture, I made a script with autohotkey so I can get some easy macro to work on. It think it work a bit like the windows wscript, but anyway. As promised here a new version of my old workflow with some refactoring and code clean up! Get it here : PcsxrrEncodeWofkflowV4 ! (the autohotkey script is there as well) The "detectCheckpoint.lua" and "synchCheckpoint.lua" have some default data from my old suikoden II speedrun, but feel free to experiment with your own movie and give me some feedback. Right now, this isn't really more automated than my previous script. I think there still a bug when loading a savestate and comparing screenshot. So I'll make sure to look at this sometime later. Also, more I'm thinking about it, more I think that doing the whole process with 2 pcsxrr instance is the best way to go. But I'm still unsure how I'm going to figure how I should manage communication, update, etc... between these two script.
Experienced Forum User
Joined: 1/26/2009
Posts: 558
Location: Canada - Québec
One more thing I forgot to mention, kkapture crash after it capture around 2gb. So for very long movie, the encoder still have to do some manual stuff between each part. So it's kind of annoying, also if I remember well there is no command line feature for kkapture or maybe didn't look on this correctly? The size of the encoding file could probably be monitored by script or we might setup a maximum frame for each part, so at the worst case if there NO way to get around of the 2gb limitation, I could prompt a console message from windows. This means, that kkapture will be suspended as long as the prompt message isn't closed. I already did that in the past and it work, but I'm sure there a better solution for this particuliar problem.
Experienced Forum User
Joined: 1/26/2009
Posts: 558
Location: Canada - Québec
MESHUGGAH wrote:
Also I don't know how big is the savestates for PCSX but you could literally dump all of them and then dump it with Eternal SPU and when a savestate is not the same with the other one then use the working "non-eternal spu" savestate and continue the job. I have a guess that this would take for many days for 1 TAS.
The plugin does affect the memory at some random place in the background since any game might handle de sound in his own way, but that doesn't mean that an actual desynch happened. So we can't just look at the memory and try to estimate a reasonable comparaison from it.
feos wrote:
So, basically, we just need some smart modification to the existing script to make it more readable and saving states at fixed freq to allow the easiest possible resync.
I should point out that if we tried to use more checkpoint than necessary, since the game will be loading a state from the "normal TAS plugin", when replaying the final video you might get at some point some "weird sound", since the emulator have to deal from a previous memory state from an another plugin. As I said, sometime weird stuff might happen. If you're unlucky enough, I *think* the emulator could freeze or crash, but this kind of case should be kinda rare, but this is still a huge deal... and maybe we could even try to write some kind of code that detect this kind of case, as described here. Now about the right frequency for taking the screenshot, every frame is the safest, so I guess it's up to the encoder to decide this setting. Some game might have a huge deal of "desynch peek" where you might have to load several savestates in a very short amount of frame between them. And yes, the space usage for the screenshot is very low since we can produce some hashed data from it. Now about the frequency for the savestate, I'll say the bigger is the better for avoiding crash, maybe around ~5000frame. Also since the time for getting to the "Rollback state" isn't that big, the waiting time should be decent. But I guess we should be able to confirm these info with several experimentation.
feos wrote:
So you get 3 passes only: 1. Dump savestates+screenshots (every 120 frames? dunno what would guarantee the proper check and not eat too much time. maybe the offsets for savestates and screenshots must be different). 2. Run the movie with eternal spu, get the desync frame, load the previous state, run again, check if it desyncs AT THE SAME FRAME, load the state farther back and verify again, etc. - till the end of movie. Dump FINAL frames when loading states fixed desync. 3. kkapture with loading the states at dumped frames.
Right now, you might have to alternate between the passes 1 and the passes 2, if you want to optimize the checkpoint list and make sure everyting run fine. At some point, I even thought that it would be possible to run two instances of pcsxrr and make them communicate with data with text file and keep the workflow running. One instance would be running on the normal TAS plugin and the other run with the Eternal SPU. That might sound crazy, but in the end some processing time should saved on a multiple core CPU.(I think pcsxrr will alway use 100% of an single core). To manage this, either we use try to write kind of lua "communication manager" or we add an another kind of layer over that could be java or anything that handle the whole workflow. Anyway, I just wanted to give an idea of all the possibility. I think we should first try something that really work, before rushing on any other crazy/weird stuff. Since then, I'll try to review my lua scripting skill... Today I can't even read what I was thinking back then :)
Experienced Forum User
Joined: 1/26/2009
Posts: 558
Location: Canada - Québec
Yep, I guess I'm the guys who tried to do this ^_^ The workflow described by feos is exactly what I tried to do, based on this theory(should be efficient 99% of the time): "When a movie desynch, the 'screen capture' should be different from the original movie". So first, I advice to use the "pcsxrr-13c" made by gocha, if you want to get the lua console windows. This build got removed for some reason when psxjin got released at the time... but I still kept it! (hehehe..^^) Here's just take it. Now, if I remember correctly(sorry for been so badly documented), ScreenshotTrack.lua will make a screenshot for every "n" frames(I setted n=10 to speed up the process). I got the screenshot with the gd library which actually use a String format to store the image(weird huh?), so since it's just a String I used the function "StringHash(text)" to convert the string as a smaller String. Then I store this info in hashFrame.txt. Later this script got merged with "CreateHQSaveState". So what's is bofCreateHQSaveStateV#.lua? I actually made a v4 and even an another version for suikoden2... but I resigned after a while, since this project grow bigger than I expected. My plan, with this script was to run the movie with the default pcsxrr TAS plugin, and create the savestate for every "checkpoint" frames. But how do you get the list of these checkpoints? So I created the "SynchHighQuality" script which should be used with the Eternal SPU plugin. When running this script, it should prompt "DESYNCH AT FRAME ... 'number' ", when the "StringHash" doesn't match. Now where it's beginning to get a bit annoying is that Eternal SPU might desynch according to a previous state of the emulator. So I added some other function to do some "savestate rollback", for debugging, etc. Overall, I couldn't figure out how to make this "workflow" fully automatic, so I still had to do multiple pass with these script and a lot of trial and error to get the "checkpoint" frame list. So yeah, if you understand my logic, once we get the "checkpoint list", its become very easy to use kkapture with the "SynchHighQuality" script and then do usual encoding stuff. Also, maybe we should contact Dammit, since his script isn't avalaible anymore and I actually didn't even know that I got thanked in his submission. I'll try to help, even if I got fewer time than I used to do. Someone is up to create a new "psx encoding workflow" project somewhere?
Experienced Forum User
Joined: 1/26/2009
Posts: 558
Location: Canada - Québec
Yes just for the last game where the CPU is supposed to be at the hardest level. Seeing play like a 50kyu is quite hilarous.
Experienced Forum User
Joined: 1/26/2009
Posts: 558
Location: Canada - Québec
I've been playing the free/open beta on linux... now it make me wonder, if I should have reported some glitches.
Experienced Forum User
Joined: 1/26/2009
Posts: 558
Location: Canada - Québec
feeuzz22 wrote:
une deuxieme chose, est-t-il possible d'afficher une image (créer par moi même) sur l'écran pour une(plusieurs) certaine(s) valeurs d'une ram dans un simple lua?
Oui c'est possible, en tout cas le lua HUD pour sonic3 permet de cliquer sur l'écran et ils utilises quelques images pour certains icônes. Ceci dit, je crois que le plus simple pour mettre une image c'est d'utilisé la lib "gd" de lua. Voici les instructions pour windows: -Tout d'abord tu as de besoins des dll "lua5.1.dll" et "lua51.dll", que tu dois mettre dans ton fichier contenant l'exécutable de gens. Tu peux les prendres à partir de ce zip -Ensuite, toujours dans ton fichier contenant gens, crée un fichier "lua"(à moins que ce ne soit déjà fait) -Télécharge la lib lua GD ici et dézipe le tout dans le fichier fichier lua Ensuite fait toi un script .lua pour voir si ça marche:
Language: Lua

require "gd" emu = gens while true do fileNameIMG = "lua/logo.png" logo = gd.createFromPng(fileNameIMG):gdStr() gui.gdoverlay(40, 0, logo) emu.frameadvance() end
(ici, j'ai fait un mit un logo.png dans le fichier lua) S'il a une erreur tu peux regarder dans la console lua. Sinon, voilà un screenshot de ce que ça me donne. Pour plus d'info sur les fonction de la GD, google est ton amis ;) Pour ta première question, de mon côté les valeurs de sonic1 semblent avoir le même comportement que dans sonic2, donc je ne suis pas sûr de comprendre où est l'erreur.
Experienced Forum User
Joined: 1/26/2009
Posts: 558
Location: Canada - Québec
En faisant quelques tests, on voit que la prédiction pour "velocity y" est de "-1608" quand on reste immobile. Je crois que c'est dû à cette petite loop qui regarde 2 frames dans le futur en supposant qu'on appuis sur B(donc la gravité va donner un chiffre négatif), puis reload le frame courrant :
savestate.save(state)
	for n=1,2 do
		joypad.set(1, {B = true})--ligne a modifier ou enlever
		gens.emulateframeinvisible()
	end

	jumpxvel = memory.readwordsigned(0xffb010)
	jumpyvel = memory.readwordsigned(0xffb012)
	savestate.load(state)
Experienced Forum User
Joined: 1/26/2009
Posts: 558
Location: Canada - Québec
I alway liked teamplay based games. For instance, there Wolfenstein: Enemy Territory(used to play at a couple of hundred of hours), that I alway loved by id Software and based on the quake3 engine. You get 5 classes to play (Medic, Soldier, Engineer, Field Ops, Cover Ops) on a maps with some objectives. The game is now 100% free, available on all platform and even open-source. I guess one raeson why there less player now is because like any other game it take some time to get skilled but there also the fact that probably must people know how to use script so they can easily crush the new player. While on TF2, must players doesn't even know what is a script and how easily they can set up the script to get a bit better.
Experienced Forum User
Joined: 1/26/2009
Posts: 558
Location: Canada - Québec
Corrupting data while saving is such a cheap technique. Since this is probably gonna be accepted, I just hope to see one day a more legit/improved run on the DS port, or something like that.
Experienced Forum User
Joined: 1/26/2009
Posts: 558
Location: Canada - Québec
I alway thought, that if a run would be aiming for pure speed, you would rather being using "count command", by typing the following: "600." in order to just wait 600 turns. You can also use ctl+direction move(hjkl), in order to move multiple space until you reach something new or a wall.
Experienced Forum User
Joined: 1/26/2009
Posts: 558
Location: Canada - Québec
FractalFusion wrote:
Works for me in pcsx-rr v0.1.3a. Which version are you using? Edit: Note that some addresses act as mirrors of others, and that changing them may have no effect on gameplay.
I'll just like to point out that there used to be a pcsx-rr v0.1.3c version(I think gotcha provided this build on google code), it used to have a lua console, just like psxjin... why the build isn't avalaible now?
Experienced Forum User
Joined: 1/26/2009
Posts: 558
Location: Canada - Québec
At this point, you might consider to add an additionnal frame to skip the ending, so no H-rated content is displayed. What happen, if some random dude work in his office wgile watching your video, then get caught... the guy might be fired right away. I'll suggest to aim for an another game with inferior graphics, thought.
Experienced Forum User
Joined: 1/26/2009
Posts: 558
Location: Canada - Québec
Wow, around half of the game got skipped... usually I dislike such huge skip, but that funny part by the end made up for it!
Post subject: Re: BWAHAHAHA
Experienced Forum User
Joined: 1/26/2009
Posts: 558
Location: Canada - Québec
antd wrote:
Is it ok if a verification movie is over 15 hours long? (eg, verification movie is required when starting from savestate) ... ^These are 'initial' stats, what you start with in 'new game'
I guess there no problem with the verification movie lenght, if your new movie starting from savestate do a "console reset" right at the beginning. I think this is the standard for run with newgame+.
Experienced Forum User
Joined: 1/26/2009
Posts: 558
Location: Canada - Québec
I think it was to exercise divination skill in the same time. Hm, also how are the progress?
Experienced Forum User
Joined: 1/26/2009
Posts: 558
Location: Canada - Québec
To go further in your movie, you can go in the setting and set a hotkey for toggle-read-only, then you should be able to resume recording from a previous savestate by toggling to "read+write" mode. Try to make backup once in while, since it's somewhat a common mistake to overwrite a movie, getting desynch... or wathever raeson. I know very little about the game, but damn... I'm sure you could get some interest if you try to post some wip on youtube. Go for it!
Experienced Forum User
Joined: 1/26/2009
Posts: 558
Location: Canada - Québec
We also have rule about exception, so in end it's still up to the judge to accept or decline that particuliar point.
1 2
6 7 8
22 23