Locked



1 2
11 12 13
29 30
nesrocks
He/Him
Player (246)
Joined: 5/1/2004
Posts: 4096
Location: Rio, Brazil
Phil wrote:
Also, in many games, you need to press some buttons for 1-2 frames for the action to work then you need to wait x frames to redo that action. So, what I want, is something that is configurable. Ex. If bot press A, then wait 20 frames before it tries to repress it. It should eliminate many and many possibilties.
that sounds a little complicated without planning on how to set it up. let me think... ok how about this: a field for each button so you can write how many frames it has to remain pressed when it's pressed. And another one saying how many frames it must remain unpressed, after it's pressed. like this: "A" - 1 - 25 "B" - 2 - 0 "S" - 1 - 5 "up - 5 - 0 etc. maybe this set of rules is troublesome to implement though, i'm not sure.... if it's doable then at least it gives something to work with. also, options that i think there should be on the basic bot, (besides what it already has, which are nice): - goal as a memory address value, or maybe 2 addresses values reached. - set max amount of frames to try achieving the goal. No need to move for 2000 frames for the first thousand tries if you know it can be done in less than 50 frames, for example. edit: i like the probability thing though. if i put 0 or 1000 it will respectively never press the button or keep it pressed, right? i think it looks good.
Active player (411)
Joined: 3/16/2004
Posts: 2623
Location: America, Québec
FODA wrote:
- set max amount of frames to try achieving the goal. No need to move for 2000 frames for the first thousand tries if you know it can be done in less than 50 frames, for example.
And it is auto-updating when the goal has been reached once before the delay. Ex. If you set it to 50 but the bot managed to reach it at 43, then it changes it to 43.
nesrocks
He/Him
Player (246)
Joined: 5/1/2004
Posts: 4096
Location: Rio, Brazil
ok you have the probability based on the amount of frames to try? because you had 1000 for probability, and you said it does ramdom search for 1000 frames... so i don't think "probability" is the best word for it, maybe you could say "appearance rate" because it's the exact amount of frames that button will be used? but in this case i don't know how usefull it would be, maybe for numbers like 1 or 2 but you can't predict if it will be using the button 40, or 41 times. maybe this could be loosened up, like add a margin: frames to try: 60 "A" button appearance rate: 20-50 "B" button appearance rate: 60 "S" button appearance rate: 0 "up" button appearance rate: 0 etc.
adelikat
He/Him
Emulator Coder, Site Developer, Site Owner, Expert player (3573)
Joined: 11/3/2004
Posts: 4754
Location: Tennessee
I like the memory watcher improvements :) haven't tried the new autofire options because I don't use autofire could you elaborate more on what you did for the "use external input" option? (in such a way that a person who doesn't know the C/C++ programming language could understand). From what I read it seems that it is specifically designed for a specific type of bot that was programmed in C. I don't use C. So can this external input thing communicate to non-C programs? What I would like to see it something simpler, where FCEU gives up control to another program, including the hotkeys (or loadstate & savestate at least). And let the external program worry about saving/loading/evaluating.
It's hard to look this good. My TAS projects
Active player (411)
Joined: 3/16/2004
Posts: 2623
Location: America, Québec
There's something wrong with fast forward speed in this version. It's not as fast as it should. Any reasons? And at 1600% speed, it tends to use so much CPU usage that you can't do nothing like Famtasia.
Player (206)
Joined: 5/29/2004
Posts: 5712
I think it helps if you lower the sound quality/sampling rate.
put yourself in my rocketpack if that poochie is one outrageous dude
Player (87)
Joined: 2/10/2006
Posts: 113
Location: US
Hi, sorry I'm a little slow at replying, I've been busy in real life :) I'll look into the speed problems. I've been having a similar issue, I only get about 400% when I used to get 800%. I might have some code accidentally running when it shouldn't be? Or maybe gcc is just being dumb about some optimizations. I'm glad you brought this up because I wasn't sure FCEU was actually running slower. -- Sorry about confusion, the BasicBot right now is not useful for anything, it's just a test. I've got a working BasicBot now, I will release soon. It is quite flexible, although I still recommend using an external program for anything requiring too much code. I wrote a basic expression parser, so you can enter formulas, etc. The downside is, order of operations is right-to-left, so you will need lots of parentheses :) Right now it supports (integer math): +, -, *, /, (, ), % (remainder aka mod), hex numbers, & (and), | (or), ^ (xor), =, <, >, >=, <=, ?: (if-else), access to RAM, access to current joysticks, number of frames, number of attempts, and 256 counters you can use for whatever. This is sufficient for doing either random searches, or systematic searches. Example: Say you want to find the first frame so that pressing Up makes RAM(0) = 1. In the Up field, you could enter "frame=attempt" i.e. press Up if the frame # = the attempt #. In the "End when" field, you could enter "upbutton > 0", i.e. the up button was pressed. In the "Maximize" field, you could enter "ram(0)=1", since this is what we want to be true. In the tiebreak field you could enter "-frames". Anyway when I release it, I will try to document it fully, and have some examples. -- adelikat: See my post in the Memory Watch thread for actual code that opens the BotInput. The functions OpenFileMapping and MapViewOfFile should be the same name in whatever programming language, since they are part of the NT kernel. Hoe is using C#, for example. I know VB also has these functions. I don't know about Java. Unfortunately in windows you can't directly pass control to another program, so I have to manually make commands available to other programs.
Use the force
Player (206)
Joined: 5/29/2004
Posts: 5712
Oh yeah, could someone take out that "auto-convert from .FMV" thing FCEU always does when finding movies to play now? That's really annoying, and it's rarely useful. It should only try to convert fmv if I ask it to, and it probably shouldn't search for it at all. The searching for .fcm files that match checksums is still good, although it's ruined whenever someone edits a movie in a way that erases that checksum, but you can't do anything about that.
put yourself in my rocketpack if that poochie is one outrageous dude
Active player (411)
Joined: 3/16/2004
Posts: 2623
Location: America, Québec
I think those *-auto-converted.fcm files should be auto-deleted or putted in memory only.
Player (206)
Joined: 5/29/2004
Posts: 5712
Hmm, and now Zurreco says he has a problem with the Replay Movie browsing never staying in the same folder anymore. I don't know what's up with that.
put yourself in my rocketpack if that poochie is one outrageous dude
Player (87)
Joined: 2/10/2006
Posts: 113
Location: US
I have a working BasicBot now, and a few other minor updates. I've also got a reference for BasicBot on the website so hopefully some people will be able to figure it out :) http://lukeg.50webs.com/fceu.html
Use the force
nesrocks
He/Him
Player (246)
Joined: 5/1/2004
Posts: 4096
Location: Rio, Brazil
nice. - i don't understand what is the "maximize" field. you say it's very important, but i couldn't find anywhere explaining what it does. - how do i set a goal "ram(05A4)=82" AND max amount "frame=20"? i tried "ram(05A4)=82&frame=20" but it doesn't work
Editor, Active player (297)
Joined: 3/8/2004
Posts: 7469
Location: Arzareth
I've heard FCEU has been changed somehow. The FCEU version I'm running is based on Blip's patch Sep 19 2004, as this topic indicates. In addition, in November 2005 I downloaded Nitsuja's source code, which appeared to have some files reorganized and mappers changed or something, and I attempted to copy some of those changes to my copy. Let's say I'm completely in blank as for what has been happening with FCEU development since Blip's patches. I have questions: ― Who is maintaining FCEU now? ― What has changed since September 2004? I.e. changelog please. ―― Has the movie file format changed? ― Why should I upgrade? ― How do I upgrade? I.e. a source code patch please. AND FOR HEAVEN'S SAKE DON'T SOAK IT IN WINDOWSISMS. If the source code fails to compile on my system after I apply your patch, because ―― your emulator core refers to some global variables (without #ifdefs) that are only declared in the Windows UI code ―― or because you have changed the prototype of a global API function (such changing the number of parameters FCEUI_LoadMovie takes) and you have not updated non-Windows code that calls that function ―― or because it contains #include <windows.h> or some Windows-specific I/O or GUI call that has not been encapsulated in #ifdefs or a completely OS-specific module, I will be angry. ―― Yes, a patch please. No 3-megabyte zip files with hundreds of irrelevant/unchanged files. I have done some changes to my FCEU and I don't want to have to worry whether the zip will overwrite my changes or not. Using a diff/patch system, the patch can be applied into existing files without overwriting them completely. Try Winmerge. And DO verify that the patch only contains relevant changes i.e. no indentation changes, no backup files, etc.
Active player (411)
Joined: 3/16/2004
Posts: 2623
Location: America, Québec
Imo, all Windowsisms, Linuxisms and MacOSisms changes should be in one and unique source code.
Joined: 3/31/2005
Posts: 148
Location: Colorado
While we're at it, lets make it compile in linux. . .(fix the configure script)
Do not try to bend the spoon, that's impossible. Instead only try to realize the truth. What Truth? There is nospoon. Then you will see it is not the spoon that changes, it is only yourself
Player (87)
Joined: 2/10/2006
Posts: 113
Location: US
FODA: The "Maximize" field tells BasicBot how to score the input. After the input ends, it calculates the equation in "Maximize." It will try to find the input that maximizes "Maximize."
- how do i set a goal "ram(05A4)=82" AND max amount "frame=20"? i tried "ram(05A4)=82&frame=20" but it doesn't work
First, I should mention order of operations. I'm really sorry, but programming correct order-of-operations in C is too much work for me... Try using parentheses: (ram(05A4)=82) & (frame=20). Oh also, you must prefix hex numbers with "x". So (ram(x05A4)=82) & (frame=20) is how to write that correctly. That said, I think you want "frame=20" in the "End" field. This tells BasicBot to end the input when 20 frames of input have been generated. Then put "ram(x05A4)=82" in the "Maximize" field. This gives a score of 0 to inputs where the ram is not 82, and a score of 1000 to inputs where the ram is 82. Or, if what you actually wanted was a maximum of 20 frames, you could try this: in "End", you could put (ram(x05A4)=82) | (frame=20). That tells BasicBot to stop as soon as the ram is 82, or stop at frame=20. Then for Maximize, you could do "ram(x05A4)=82", and the tiebreak could be "-frame". This says, first try to make the ram 82, then try to minimize the number of frames. --- Bisqwit/Linux users: I wouldn't say I'm maintaining the code... nitsuja was the last one to make important changes I think. I haven't touched any of the emulation internals, I've just made some UI "attachments" to the program to make TASing easier. I think I did break a few things on non-windows platforms, since I added an argument to a function or two (that's assuming nitsuja's version even would cross-compile, I don't know :). Also I really don't know what I'm doing with these makefiles, they are way more complicated than any makefiles I've used before... But I have tried to keep all Windowsisms either within #ifdef WIN32 or #ifdef _USE_SHARED_MEMORY_, or in the Windows driver files. Regardless, all the changes I have made are windows-specific anyway, so there's no reason to use my source instead of the original 98.13/15 for another platform. I have looked at the 98.12 source a bit. As Bisqwit said, the boards/mappers were majorly reorganized and improved since then. Not only do you need the boards and mapper files, but the ppu.c file has some related changes to support the new mappers. Maybe x6502.c, too, but I think this file is identical. AFAIK, the movie file format is identical. I'm surprised you've gotten away with 98.12 source for so long, actually--TMNT, Castlevania, and DW4 are all known to desynch in 98.13/15. That's about all I can say... nitsuja would be more helpful since he made (all?) the changes between 98.12 and 98.15.
Use the force
Active player (411)
Joined: 3/16/2004
Posts: 2623
Location: America, Québec
Edit:
Bisqwit wrote:
Edit: I am ashamed to exist. Sorry for whomever I caused problems by claiming this run desyncs on me. I had some cheat code activated from some old debugging session, and I didn't realize it was there. This movie plays and completes now properly -- even in the FCEU version I've been using for ages without any of Nitsuja's patches. In other words, I did not need to upgrade for this movie. I just needed to disable the cheats.
Hmm, I didn't noticed this post. Well, then. That's good news. So you could finally add your Linux changes in nitsuja's source. Btw, there's new mappers from fceu-mm that are needed. It's still strange that it doesn't desync with your FCEU 0.98.12 while it desync on win32 version. And time for you to add your Linuxisms so people can enjoy them. :P
Joined: 3/31/2005
Posts: 148
Location: Colorado
I was mistaken, it does compile in linux. . .You just need to run dos2unix on it first.
Do not try to bend the spoon, that's impossible. Instead only try to realize the truth. What Truth? There is nospoon. Then you will see it is not the spoon that changes, it is only yourself
Editor, Active player (297)
Joined: 3/8/2004
Posts: 7469
Location: Arzareth
Phil wrote:
And time for you to add your Linuxisms so people can enjoy them. :P
You've got it. http://bisqwit.iki.fi/src/fceu-9815-nitsuja-patch-bisqwit-linux.txt Apply this patch to Nitsuja's 0.98.15 FCEU source code, and it will turn into Bisqwit's 0.98.15. After applying, run ./configure (do a chmod +x if needed) and make and it should compile just fine. Notes: - It includes BisqBot, and BisqBot requires libboost for a set of random number generators. So do install libboost before compiling. - Before applying the patch, run dos2unix for the source code and configuration scripts to ensure the patch applies cleanly and configure runs without problem. This version includes also AVI making (no two separate versions anymore), and I should update my documentation on that matter. Changes: - Compiles on Linux - Bisqwit's custom input defaults - Bisqwit's compose mode for making 2p movies easier to create - BisqBot (with settings last configured for Rockman 2 scrolling substitution) - Warp's font for smaller HUD texts (fits more text on screen) - DOS cruft removed from drivers/pc/ -- I'm not maintaining it anyway - Bisqwit's tile tracker -- the engine used to make GIF animations. (A #define from source code needs to be changed to activate). - Commandline option: -play <moviename> (loads in read-only mode) - Commandline option: -readwrite 1 (makes -play use read-write by default) - Commandline option: -state <statenumber> (loads a savestate after loading movie) - Commandline option: -bisqbot 1 (autoactivates BisqBot after starting) - Commandline option: -videolog <command> (enables AVI logging) - Recognized environment variable: MAXFRAMES - Bisqwit's emulation speed throttler. (Use n/m keys to adjust) - Bisqwit's dual game daemon support (Needs a separate program to work, and to be enabled from drivers/pc/sdl.c.) - Enables sound during frame advance (Bisqwit prefers this) - Disables debugger (not implemented for Linux anyway, makes emulation faster) - Input display in movie playback (writes it to stderr) (different from Nitsuja's, Windows users will probably prefer Nitsuja's) - Rockman 1&2 RAM analysis with frame display (displays X&Y position&speed and magnet beam positions) - Magnet beam solidifier (a visual enhancement filter for Rockman 1, has to be manually disabled for all other games) - Displays a "state 2 selected" message instead of "select state" when user selects a savestate slot - Minor changes to make it compile nicely on 64-bit Linux as well - Now actually says it's 0.98.15; Nitsuja's source code had still "0.98.13" somewhere How to compile/apply (instructions for Debian GNU/Linux):    sudo aptitude install p7zip tofrodos libboost-dev gcc g++    7za x fceu-0.98.15-src.7z    patch -p0 < fceu-9815-nitsuja-patch-bisqwit-linux.txt    cd fceu-0.98.15-src    find -type f -print0 | xargs -0 dos2unix    chmod +x configure    ./configure    make    cp -p src/fceu . How to watch a movie (example):    ./fceu -xscale 3 -yscale 3 -play castleva.fcm castleva.nes How to make AVI (example):    VIDEO_RESULT="`pwd`/test0.avi"    VIDEO="-ovc lavc -lavcopts vcodec=ffv1:format=422p:vstrict=-2"    AUDIO="-oac mp3lame -lameopts mode=3:preset=40:aq=0"    VIDEO="mencoder -o '$VIDEO_RESULT' -mc 0 NESVSETTINGS $VIDEO $AUDIO"    ./fceu -videolog "$VIDEO" -xscale 1 -yscale 1 -play rma.fcm rockman.nes    riffdump -nmovi -mfps=60.09982293844223 -mscale=1000000 "$VIDEO_RESULT" Keyboard input configuration: - shift-1 = create movie (uses the console to ask for a filename and properties) - shift-2 = play movie (uses the console to ask for a filename, loads in read-write mode) - shift-3 = stop movie - enter = pause/unpause - A,D,H,P = B,A,select,start for player 1 - Q,E,U,O = B,A,select,start for player 2 - I,J,K,L = arrows for player 2 - S,F = save,load (load = re-rerecord) - alt-numbers = select savestate slot 1-10 (either alt will work) - N,M = adjust speed - comma,apostrophe = frame advance - esc = terminate - K = toggle BisqBot - shift-5 = toggle compose mode - F2 = cheat editor (uses the console) - Backspace = toggle frame display [Edit: Fixed URL]
Active player (411)
Joined: 3/16/2004
Posts: 2623
Location: America, Québec
Talking about FCEU-mm, I've just noticed that the author had updated it yesterday. So, there's march 19th and yesterday updates. Anyone willing to update FCEU?
Player (87)
Joined: 2/10/2006
Posts: 113
Location: US
(majorly edited) I've gotten the memory mappers Phil mentions to compile. It seems to run some ROMs that wouldn't run before, like Paperboy 2! I will try to get a new version up soon.
Use the force
Player (71)
Joined: 8/24/2004
Posts: 2562
Location: Sweden
Could someone please plant support for *.7z files so one doesn't have to extract files all the time? =D
Active player (411)
Joined: 3/16/2004
Posts: 2623
Location: America, Québec
Luke wrote:
I've gotten the memory mappers Phil mentions to compile. It seems to run some ROMs that wouldn't run before, like Paperboy 2! I will try to get a new version up soon.
Can you just use nitsuja's source without your previous changes?
Bisqwit wrote:
Phil: I'm not sure whether you have actually understood, but adding mappers into FCEU does not help current games run better, but instead, it might enable it to emulate some obscure titles such as pirate 504-in-1 carts and such
Well, like I said, it's not totally true either.
Player (87)
Joined: 2/10/2006
Posts: 113
Location: US
Phil wrote:
Can you just use nitsuja's source without your previous changes?
Yeah I realize it could be a problem having revised mappers on Win32 but not other platforms. Actually patching the code is pretty easy, so it's not hard to update nitsuja's source. My problem is I lack some makefile programs (automake specifically) needed to update the compiling instructions-- so I couldn't make something that "just works," and someone else would have to update the makefiles. For those interested: To put in the new mappers, just copy the /boards and /mappers directory. Also copy the ines* and unif* files in the main source directory.
Use the force
Joined: 11/26/2005
Posts: 285
Can someone release a Bisqwit-and-Luke version of FCEU? I don't know how to apply patches.
1 2
11 12 13
29 30

Locked