Active player, Editor, Experienced Forum User (289)
Joined: 3/8/2004
Posts: 7468
Location: Arzareth
Here is the source code (gzipped diff patch file) of the rerecording support. http://bisqwit.iki.fi/src/patch-dosbox-0.70-rerecording-alpha6.gz http://bisqwit.iki.fi/src/patch-dosbox-0.70-rerecording-alpha5.gz http://bisqwit.iki.fi/src/patch-dosbox-0.70-rerecording-alpha4.gz http://bisqwit.iki.fi/src/patch-dosbox-0.70-rerecording-alpha3.gz http://bisqwit.iki.fi/src/patch-dosbox-0.70-rerecording-alpha2.gz http://bisqwit.iki.fi/src/patch-dosbox-0.70-rerecording-alpha1.gz Here is a precompiled version for Windows (of version alpha5, not newest). https://files.tasvideos.org/bisqwit/dosbox-rerecording-exe-a5.zip It also requires this SDL dll file to run. http://bisqwit.iki.fi/kala/sdl-dll.zip This version of DosBox redefines the following keys: Shift+1 to Shift+0: Select savestate slot (to type numbers (instead of selecting savestates), you must use the numpad) shift+F1: saves savestate shift+F2: loads savestate shift+F3: frame advance shift+F4: pause/unpause shift+F5: ask & load movie shift+F6: ask & create movie shift+F7: toggle movie readonly access shift+F8: close movie noneF10 + key: Toggle "permanently on" for the selected key nonF9 + key: Change autofire function for the selected key There is no way to feed these keys directly to the game. By default, it loads a movie "movie.dof" upon start and starts in paused, readonly mode. It does not load a movie automatically now. Notes regarding savestates: - You can only load a savestate in the same displaymode it was created in. - Sometimes, frame advance immediately after loading a savestate causes an X11 error. It annoys me a lot. I haven't been able to fix it yet. But fortunately, it does not corrupt movies. Other notes: - Input sampling rate is defined in "InputInterval" variable in dosbox.cpp. Shorter number = input sampled more often (more precise input, larger movie files). - Only keyboard input it considered. Use of mouse, joystick, etc, will inevitably cause a desync. - This dosbox cannot create / change actual files. Everything happens virtually, so that movies are replayable. - Do not use speed throttling. You must use a fixed "number of cycles" and frameskip=0 (no frame skipping). - The savestates contain numerous pointers which have been saved raw. Function pointers that is. If you recompile dosbox, all old savestates stop working. EDIT 2007-03-21: Newer version of patch (alpha2). This version adds some safeguards against movie file breakage due to weird combination of load/save state and toggle readonly. Also, it added the F9 and F10 hotkeys. I just couldn't have those as sourcecode customization options, considering that every time I tweak and compile the source, all old savestates will stop working. EDIT: Newer version of patch (alpha3). This version adds nesvideos-style AVI capture support and a mode13 hack which reduces dosbox crashing when the game is in mode13. Unfortunately it only works in mode13, so it's disabled by default. Mouse support is also preliminarily under construction. EDIT 2007-03-25: Newer version of patch (alpha4). This version improves the support of protected mode games. This time I'm trying to make Descent rerecording working. Currently the savestates don't seem to restore the state entirely; the game occassionally crashes when the savestate is loaded. Also, the savestate slot selection keys were changed. Instead of 1, it's now shift+1. Default movie file was changed from sc2.dof to movie.dof. EDIT 2007-03-31: Fixed a bug that involved movie being initialized before the configuration was read, effectively meaning that ignored the CPU speed setting in the movie. EDIT 2007-09-30: New version (alpha6): Added support for programs that use DOS functions to read keyboard input. Those should now be TASable. Also changed the hotkeys a bit (added shift+, dropped F9 and F10). You may want to change them by editing gui/sdl_mapper.cpp. HOW TO GET STARTED (on Windows): Place SDL.dll somewhere that it's found when it's needed. Ask Windows-people how to do that. Start dosbox in the directory (folder) of your game. (Ask the Windows-people for how to do that. It is important, so that you don't need to type paths while the movie is recording.) It will automatically start creating a movie file, movie.dof. (If there's already one, either delete it before starting dosbox, or hit F7 to go to readwrite mode. Observe the log window to see whether it's in readwrite or readonly mode.) Hit F4 to unpause the emulator. When you actually start creating a movie, you will probably want to frameadvance using F3 instead of unpausing with F4. Type "mount c .", press enter, and type "c:", and press enter, and then you are in the directory of your game (if you started dosbox in that directory, which you really should have). Start the game, or its setup, or whatever, by typing the name of that program or its startup script. ???. Profit. Read this post for the hotkeys regarding readonly mode, savestates etc. Using autoexec commands in the movie is not recommended, because you can do it just as well during the movie recording, and it takes on average about 1.3*strlen(commands) frames to input them. You probably should create a configuration file for yourself, and edit it. Type "config -writeconf dosbox.conf" in dosbox, and then close dosbox and edit the dosbox.conf file. * You should adjust the "memsize" setting to the number of megabytes you presume the game might need memory. * You should adjust the "cycles" setting in the CPU section. If it is an older game, a lower value for cycles is good. If it's a newer game or a CPU-intensive one, a higher value is necessary. Hint: If the game requires a 100 MHz computer, use 100000. If the game requires a 20 Mhz computer, use 20000. And so on. Note: Dosbox default is 3000. Note: The higher value you use, the harder dosbox will lag, but the more fluently the game will run in the final product. Thus, larger number = faster and more beautiful movie (applies especially with 3D games). But don't overdo it; use only as large number as is required, not larger. ** If your game is extremely old, and it will become ridiculously fast when you use a high CPU rate, please do not do that. Use only a CPU rate that makes sense for the game of that era. * You should adjust the soundcard mixing settings. Disable those cards which are not needed by your game, and set the mixing rates accordingly. If your game produces 44 kHz digital sound, then you should set the mixing rate at 44 kHz. If it only produces 11 kHz sound, you should set it at 22 kHz or 11 kHz. * Set "keyboardlayout=" . Do not use "auto", it will cause portability problems. Your game installation should be as pure as possible. This means, no configuration files from previous runs of the game or its SETUP, no saved games, no userdesigned scenarios, etc. Everything should be as pristine as possible to ensure that others who wish to try your movie, have equal chances of getting it to work. (This is not required for your testing, but it will probably become a rule on this site for Dosbox submissions.) Note that TASes made with the current Dosbox version are not yet officially accepted on this site, so don't start creating that laboursome cool movie yet. (This rule may be bent on individual basis, but until the system is robust enough, it's better to not have movie files that may not be playable with future versions and that lack important features anyway.)
Experienced Forum User
Joined: 4/11/2006
Posts: 487
Location: North of Russia :[
good work ^^
Experienced Forum User
Joined: 3/27/2006
Posts: 34
So...if the game can save, but you don't, will it work? </lemmings2> (I mean as a general guess/rule, not expecting you to know in specific cases of course)
Active player, Editor, Experienced Forum User (289)
Joined: 3/8/2004
Posts: 7468
Location: Arzareth
Yes.
Emulator Coder, Experienced Forum User
Joined: 10/2/2005
Posts: 562
Location: Toronto, Ontario
Wow. That is impressive work (will have to check the source later). Slightly off topic, Bisqwit, I'm sure you've checked this project out already :)
Active player, Editor, Experienced Forum User (289)
Joined: 3/8/2004
Posts: 7468
Location: Arzareth
Maximus wrote:
Slightly off topic, Bisqwit, I'm sure you've checked this project out already :)
Most certainly. I used it as a reference at various points when I made that TAS. (Which, by the way, desynched, at 29:15, at the middle of fighting ten Dnyarri-commanded Umgah ships...) EDIT: Looks like my "frame" was about 3.5 display frames in length. That would make it 20 inputs per second. Which is incidentally exactly the number I entered in InputInterval. Funny, because a higher number would have yielded a lower rate and a lower number a higher rate. This would make the length of my testrun 39 minutes and 16 seconds in total, including the time to type DOS commands to startup the game. Oh, and no infinite money glitch was used.
Experienced Forum User, Player (70)
Joined: 8/24/2004
Posts: 2561
Location: Sweden
Wow! This is amazing!! How come you started to work on this all of a sudden Bisqwit? Good luck in further development.
Active player, Editor, Experienced Forum User (289)
Joined: 3/8/2004
Posts: 7468
Location: Arzareth
Highness wrote:
How come you started to work on this all of a sudden Bisqwit? Good luck in further development.
Been wanting it for several years already, as you can see from the first page of this thread. Last few weeks I have found some new approaches which eventually made it possible.
Joe
Experienced Forum User
Joined: 6/10/2006
Posts: 152
Location: Wisconsin
Way to go, bisquit!
Chamale
He/Him
Experienced Forum User, Player (150)
Joined: 10/20/2006
Posts: 1339
Location: Canada
So... could you TAS a game like Impossible Creatures? THAT would be very o_0. Imagine a TAS of the entire IC campaign... If that's possible, I should try it... Or, imagine a TAS of All the Right Type. You'd set the word per minute goal at 999, then go crazy.
Experienced Forum User
Joined: 4/11/2006
Posts: 487
Location: North of Russia :[
Can dosbox run win 3.11? ^__^
Active player, Editor, Experienced Forum User (289)
Joined: 3/8/2004
Posts: 7468
Location: Arzareth
zefiris wrote:
Can dosbox run win 3.11? ^__^
http://vogons.zetafleet.com/viewtopic.php?t=9405 Apparently it can. However, my TAS support is nowhere as complete as needed to TAS anything running under Windows 3.11. Starting from the fact that mouse state is neither saved in a savestate nor in the movie. (And approaching the fact that there's a myriad of different interrupt service calls and hardware features that I did not remap through the TAS system.)
Experienced Forum User, Player (70)
Joined: 8/24/2004
Posts: 2561
Location: Sweden
Time to get busy again then, huh? =D Damn I wish I could contribute. I'm no programmer. Sorry.
Emulator Coder, Experienced Forum User
Joined: 10/2/2005
Posts: 562
Location: Toronto, Ontario
This is all VERY exciting :) I can't wait to start TASing the good ol' sierra classics ... though populating a text parser using frame advance might become tedious (25 frames just for "hut of brown now sit down", but it would be SOOOO worth it :P)
Experienced Forum User, Player (70)
Joined: 8/24/2004
Posts: 2561
Location: Sweden
Monkey Island perhaps? Dune 2!! :D
Experienced Forum User
Joined: 1/3/2006
Posts: 334
well monkey island is not that glitchy. but the first maniac mansion version for pc is goddamn glitchy - I even bet the nes tas by using it :)
Experienced Forum User
Joined: 2/16/2005
Posts: 462
I would recommend Quake if it wasnt already hacked to pieces. Great work Bisqwit.
This signature is much better than its previous version.
Experienced Forum User
Joined: 10/3/2005
Posts: 1332
Ha... I'll have to get Death Rally and make a video of myself shooting spectators while driving full-speed in a deliverator. :D
Experienced Forum User, Player (65)
Joined: 3/8/2005
Posts: 973
Location: Newfoundland, Canada
I claim doom. if I ever figure out how to TAS it.
Experienced Forum User
Joined: 4/11/2006
Posts: 487
Location: North of Russia :[
I just remembered there was a really good game to TAS... FURY OF THE FURRIES! It's something like The Lost Vikings, but a lot funnier and faster) You control one fluffy ball that sometimes gets ability to change to one of four colors: Yellow furry can fire fireballs and defeat enemies (easily avoidable in tas) Green Furry is the best one, it has Ninja rope (like in worms, but once again faster) Red furry can eat blocks on the way Blue one can swim I hope it will work with rerecording *___*
Active player, Editor, Experienced Forum User (289)
Joined: 3/8/2004
Posts: 7468
Location: Arzareth
I will soon try to endeavor for compiling a Windows version of this. ___________________________ (Possible use of uncommon language in preceding post is intentional.)
Experienced Forum User
Joined: 4/11/2006
Posts: 487
Location: North of Russia :[
I am just not familiar with it... I tried to compile it, put SDL.dll to a $PATHed directory, but ./configure looks for sdl_config that is not available with compiled version... even though building guide says it should work :(
Active player, Editor, Experienced Forum User (289)
Joined: 3/8/2004
Posts: 7468
Location: Arzareth
The dll file is required at runtime. At compiletime, SDL header files (.h files) and sdl-config program (which tells configure where the .h files are, among other things) are also required.
Active player, Editor, Experienced Forum User (289)
Joined: 3/8/2004
Posts: 7468
Location: Arzareth
However, in the source I provided, there's the nesvideos_piece (for AVI recording) which does not compile nicely under Windows, due to use of poll() and requiring libgd. You need to download this file http://bisqwit.iki.fi/src/nesvideos-donothing.cpp and replace the nesvideos.cpp file in dosbox source with it.
Experienced Forum User, Moderator
Joined: 8/4/2005
Posts: 5745
Location: Moscow, Russia
zefiris wrote:
I just remembered there was a really good game to TAS... FURY OF THE FURRIES!
Though I definitely agree (FotF was one of the first games I ever played on PC), I think it'd be much easier to TAS this game on an Amiga emulator, since: 1) we need Amiga rerecording, anyway (LOTS of cool games + high quality music and gfx); 2) it's easier to add rerecording support to an existing Amiga emulator, rather than tune that of DosBox (not implying that it shouldn't be done, though); 3) Amiga has an advantage in picture and sound quality.
Warp wrote:
Edit: I think I understand now: It's my avatar, isn't it? It makes me look angry.