Posts for Dacicus


Editor, Experienced Forum User, Published Author, Player (67)
Joined: 6/22/2005
Posts: 1041
feos wrote:
fp_11.2.202.644_archive.zip
Quick update to let you know that that version requires a later version of libgthread than installed by default in Red Hat Linux 6.2 (using the install CD from that bannister thread). EDIT: Official list of dependencies. Unfortunately, it's just for versions 9 and 10.
Current Projects: TAS: Wizards & Warriors III.
Editor, Experienced Forum User, Published Author, Player (67)
Joined: 6/22/2005
Posts: 1041
Some additional information may be helpful to know:
  • Which version of BizHawk are you using?
  • Which cores did you experience that behavior with?
Current Projects: TAS: Wizards & Warriors III.
Editor, Experienced Forum User, Published Author, Player (67)
Joined: 6/22/2005
Posts: 1041
That version does not support the ct486 system. EDIT: Based on reading through release notes, it looks like version 0.150 was the first one that had ct486:
* Moved the ct486 driver to its own file, to avoid all the legacy stuff in at.c
Current Projects: TAS: Wizards & Warriors III.
Editor, Experienced Forum User, Published Author, Player (67)
Joined: 6/22/2005
Posts: 1041
The largest potential problem I foresee is device drivers, such as sound cards and CD drives. IDK the status of this oakcdrom one, for example. It came from Oak Technology originally, which has been bought out by some other company. You can find it all over the Internet, but that doesn't mean it's legal to distribute.
Current Projects: TAS: Wizards & Warriors III.
Editor, Experienced Forum User, Published Author, Player (67)
Joined: 6/22/2005
Posts: 1041
I found the reason for and a solution to the CD problem. The FreeDOS 1.2 boot floppy uses udvd2.sys as the CD driver, but it doesn't work for the hardware that is being emulated. Another CD driver called oakcdrom.sys does work. I placed it into the fdsetup\bin directory of the boot floppy and edited autoexec.bat to use oakcdrom.sys instead of udvd2.sys (there's only one line that needs to be changed). FreeDOS then installed using the boot floppy and CD. EDIT: You'll have to add the same CD driver to the installation on the C: drive and to the autoexec.bat there in order to use it after installing FreeDOS.
Current Projects: TAS: Wizards & Warriors III.
Editor, Experienced Forum User, Published Author, Player (67)
Joined: 6/22/2005
Posts: 1041
I was able to get FreeDOS 1.2 installed in MAME with some hacking. You'll need the boot floppy and CDROM "standard" installer from the FreeDOS site to do this yourself.
  • Create a hard disk image using chdman. I used chdman createhd -o FDOS_hd.chd -c none -chs 1000,16,63 -ss 512 to get one that's around 492 MiB.
  • Run mame using something similar to mame64.exe -w -nomax ct486 -ramsize 64M -hard1 FDOS_hd.chd -flop1 FDOS.img, where FODS.img is the boot floppy. The FreeDOS installation should start, and you can use it to partition and then format the hard disk image. Restart in between, like it prompts you to do.
  • Ideally, you would now proceed with the installation using the boot floppy and the CD image. Unfortunately, it seems like MAME doesn't recognize the CD image when the boot floppy sets up CD support. I got around this by making another hard disk image using chdman createhd -o transfer.chd -c none -chs 1000,16,63 -ss 512, then partitioning and formatting that in MAME, then converting that to a raw image using chdman extractraw -o transfer.img -i transfer.chd, then using a FreeDOS installation in BOCHS to xcopy the files from the CD image to transfer.img, then converting back to a CHD via chdman createhd -o transferred.chd -i transfer.img -c none -chs 1000,16,63 -ss 512, and finally using transferred.chd as a D: drive in MAME. The FreeDOS setup seems to run OK even if the D: drive isn't actually a CD.
If anyone wants more details, please feel free to ask. I could also upload my final FDOS_hd.chd somewhere, if desired. That shouldn't run into any legal problems, should it? EDIT: You'll need to use the command-line option -board3:ide:ide:1 hdd -hard2 transferred.chd to let you use a second hard disk file in MAME. To add a CD drive, use -board3:ide:ide:1 cdrom -cdrom whatever.iso.
Current Projects: TAS: Wizards & Warriors III.
Editor, Experienced Forum User, Published Author, Player (67)
Joined: 6/22/2005
Posts: 1041
I got SkyRoads running by following those instructions but setting up two 3.5" floppy drives, with the boot image from the JPC-rr distribution on A: and another one on B: containing the SkyRoads files. Note that the 2-GiB hard disk causes some error message about LBA when booting FreeDOS.
Current Projects: TAS: Wizards & Warriors III.
Editor, Experienced Forum User, Published Author, Player (67)
Joined: 6/22/2005
Posts: 1041
It looks like enemy data is stored starting at around 0x2F0A in RAM, with offset +0 being the X-position, +4 being the Y-position, +0x0E being the spawn X-position, and +0x12 being the spawn Y-position. Each enemy seems to have 0x76 bytes allotted to it. The following script labels the enemy with its slot in the array/list/table/whatever you want to call it.
Language: lua

local camera_x, camera_y memory.usememorydomain("68K RAM") function draw_aero_position() local aero_x = memory.read_u16_be(0x0176) local aero_y = memory.read_u16_be(0x017A) gui.drawRectangle(aero_x - camera_x, aero_y - camera_y, 2, 2) end function draw_enemy_positions() for i = 0, 9 do -- 9 was chosen arbitrarily, highest number I saw in-game was 4 local enemy_x = memory.read_u16_be(0x2F0A + 0x76 * i) local enemy_y = memory.read_u16_be(0x2F0A + 4 + 0x76 * i) gui.drawRectangle(enemy_x - camera_x, enemy_y - camera_y, 2, 2) gui.drawText(enemy_x - camera_x, enemy_y - camera_y, bizstring.hex(i)) end end while true do camera_x = bit.band(0 - memory.read_u16_be(0xD114), 0xFFFF) -- Done because the 0xD114 values start at 0 and decrease going to the right camera_y = memory.read_u16_be(0xD074) gui.drawText(16, 16, bizstring.hex(camera_x)) gui.drawText(16, 32, bizstring.hex(camera_y)) draw_aero_position() draw_enemy_positions() emu.frameadvance() end
Using that information, I found that the spawn positions in the ROM file start at 0x1183C8 for the first stage, with +0 being the X-position and +2 being the Y-position. The data seems to be 0x2A bytes apart. This may be helpful for finding the spawn criteria, but IDK Genesis assembly to go further.
Current Projects: TAS: Wizards & Warriors III.
Editor, Experienced Forum User, Published Author, Player (67)
Joined: 6/22/2005
Posts: 1041
OK. Yes vote.
Current Projects: TAS: Wizards & Warriors III.
Editor, Experienced Forum User, Published Author, Player (67)
Joined: 6/22/2005
Posts: 1041
Nice and fast, but the ending seems out of place with the rest of the run. Is there a way to end it without getting blown up?
Current Projects: TAS: Wizards & Warriors III.
Editor, Experienced Forum User, Published Author, Player (67)
Joined: 6/22/2005
Posts: 1041
In BizHawk: File menu -> Movie -> Play Movie. One of the columns in the window should be a length estimate.
Current Projects: TAS: Wizards & Warriors III.
Post subject: Re: Definition of TASVideos
Editor, Experienced Forum User, Published Author, Player (67)
Joined: 6/22/2005
Posts: 1041
Nach wrote:
DrD2k9 wrote:
interactive fiction style runs
Most of these cannot be published for legal reasons.
What's different, legally, for interactive fiction versus other games?
Current Projects: TAS: Wizards & Warriors III.
Editor, Experienced Forum User, Published Author, Player (67)
Joined: 6/22/2005
Posts: 1041
Nice improvement, and the submission text was very helpful for understanding what was happening. Yes vote.
Current Projects: TAS: Wizards & Warriors III.
Editor, Experienced Forum User, Published Author, Player (67)
Joined: 6/22/2005
Posts: 1041
Here's my attempt at a description for Super Metroid:
Super Metroid was again delivered to TASVideos so the scientists could study its frame-saving qualities... The scientists' findings were astounding! They discovered that the powers of moonfall and ACE might be harnessed for 0% item collection! Frames saved: Many. Animals saved: 0.
Length is 281 characters. Yes, it was intentionally based on the intro text. No, I don't know much about the game. I'm assuming that the animals weren't saved.
Current Projects: TAS: Wizards & Warriors III.
Editor, Experienced Forum User, Published Author, Player (67)
Joined: 6/22/2005
Posts: 1041
Editor, Experienced Forum User, Published Author, Player (67)
Joined: 6/22/2005
Posts: 1041
Editor, Experienced Forum User, Published Author, Player (67)
Joined: 6/22/2005
Posts: 1041
Wizards & Warriors III - I found the Malkil instant death glitch because some web page stated (or led me to believe) that you need to use all of the costumes in that fight. That's not true, obviously, but I first triggered the glitch while messing around with the various costumes in the final fight. I can't find that page any longer, but I'm pretty sure it was a personal page in an FAQ format with a dark (black?) background and light (yellow?) text. From what I can remember, the other answers it gave were correct or mostly correct. Wizards & Warriors X - Described in the submission. I found that while just playing through the game. Dragon Island - This game was on one of my old mobile phones. I found a multi-jump glitch and describe it in my playthrough on YouTube. IIRC, I found this because I messed up while doing the regular double jump in some level after getting the elven boots. One of the comments on that video mentions another glitch that lets you get the elven boots multiple times, which would obsolete my glitch after Misty Island 2. Might be something to look into if we ever get a rerecording emulator for those type of phone games.
Current Projects: TAS: Wizards & Warriors III.
Editor, Experienced Forum User, Published Author, Player (67)
Joined: 6/22/2005
Posts: 1041
I agree with ViGadeomes that the bonus stages are boring if you just stand there doing nothing. The SNES version may not be the best one for running this game. I have the DOS version myself, and it has less down time in which you just wait for things to happen. Meh vote.
Current Projects: TAS: Wizards & Warriors III.
Editor, Experienced Forum User, Published Author, Player (67)
Joined: 6/22/2005
Posts: 1041
Welcome to the board, KinsleU. If there are known improvements, it is very unlikely that this will get published. See the movie rules and the guidelines for further information along those lines. You may want to post potential submissions in the game's thread to get input from others.
Current Projects: TAS: Wizards & Warriors III.
Editor, Experienced Forum User, Published Author, Player (67)
Joined: 6/22/2005
Posts: 1041
Alyosha wrote:
I guess the question for me is, what direction should we be pushing in to get something worthy of being accepted? Should we be focusing on newer systems? More creative ideas for tech. demonstrations? Maybe look more at funny stuff?
What about dwangoAC's earlier idea about a TAS that hasn't been submitted and published yet? That would be new for everyone except those working on it and the TASBot team.
Current Projects: TAS: Wizards & Warriors III.
Post subject: Capturing AVI from FCEU 0.98.16
Editor, Experienced Forum User, Published Author, Player (67)
Joined: 6/22/2005
Posts: 1041
The FCEU sync history has version 0.98.16 in a separate section by itself. That version has a well-documented AVI dumping problem: Video is blank, but audio is intact (sources: 1, 2, 3, 1337). I ran into this issue while replacing some old AVI encodes, such as [1026] NES Chip 'n Dale: Rescue Rangers "2 players" by dragonxyk in 09:29.22. It also happened with 0.98.16's multitrack version. The advice in the posts linked above about using version 0.98.15 worked for that run; I also used 0.98.28 successfully. The question comes up about whether there is some run made with 0.98.16 that does not sync in any earlier or later versions, as the sync history implies there may be. Another question is just what the problem is with 0.98.16's AVI dumping. I investigated that second question by comparing some source files between 0.98.16 and 0.98.28, hereafter referred to as .16 and .28, respectively. src\drivers\win\aviout.c in .28 has an #ifdef _USE_SHARED_MEMORY_ block at the beginning that does something with the palette. It's not there in .16. Replacing the aviout.c file in .16 with the one from .28 allows non-blank AVI dumps. There's another problem in .16, however. If you open the Config -> Video window and then close it, the palette gets corrupted. This happens even if you don't make any changes to the video configuration. I compared src\drivers\win\video.c between the two versions and found that the one in .28 uses a variable in the InitializeDDraw function with this comment:
//only init the palette the first time through
Sure enough, replacing .16's video.c with the one from .28 eliminates the palette glitch. However, this also requires a change to src\video.c: Adding an #ifdef _USE_SHARED_MEMORY_ block around the if(XBuf) statement in the FCEU_KillVirtualVideo function. Otherwise, I get a compilation error about mapXBuf being undefined. NOTE: I compared the versions of aviout.c and video.c between .16 and .28, and I don't believe that just replacing the files like I described will cause problems. I don't know C++, however, so someone may want to verify that. Here's an archive See below for two fixed versions of .16: fceu-avifix.exe fixes just the AVI dumping, and fceu-avipalfix.exe fixes both the AVI dumping and the palette. Do you want the sources to one or both? EDIT: Updated archive with the compiled files and source is here.
Current Projects: TAS: Wizards & Warriors III.
Editor, Experienced Forum User, Published Author, Player (67)
Joined: 6/22/2005
Posts: 1041
Nice and quick. Yes vote.
Current Projects: TAS: Wizards & Warriors III.
Editor, Experienced Forum User, Published Author, Player (67)
Joined: 6/22/2005
Posts: 1041
I've updated the batch file to take command-line arguments. Other changes included localization of variables, changing the paths to use backslashes (Windows convention), and changing the command for the YouTube upload (I didn't like the use of both start and call). There are actually two commands for the upload: The first one uses the contents of ytdesc.txt, and the second one sets the description to "todo." I've commented out the second one, but you can change that as desired. I could also add an option for the (rare?) VirtualBoy encodes, if desired. It expects the command-line arguments in the same order as the current choices. If an argument is invalid, it explicitly asks, same as the current behavior. Here's the entire thing:Download global.bat
Language: batch

:: feos, 2013-2017 (cheers to Guga, Velitha, nanogyth, Aktan and Dacicus) :: This global batch is a part of "TAS Encoding Package": :: http://tasvideos.org/EncodingGuide/PublicationManual.html :: Asks whether the console is TV based to autoset the SAR parameter (4:3 only so far). :: Allows to select the encode to make. @echo off setlocal enableextensions :: Restore AVS defaults :: ".\programs\replacetext" "encode.avs" "pass = 1" "pass = 0" ".\programs\replacetext" "encode.avs" "pass = 2" "pass = 0" ".\programs\replacetext" "encode.avs" "i444 = true" "i444 = false" ".\programs\replacetext" "encode.avs" "hd = true" "hd = false" ".\programs\replacetext" "encode.avs" "vb = true" "vb = false" :: Uncomment for a VirtualBoy encode :: set /a VIRTUALBOY=1 if "%VIRTUALBOY%"=="1" (".\programs\replacetext" "encode.avs" "vb = false" "vb = true") echo. echo ----------------------- echo Hybrid Encoding Batch echo ----------------------- echo. echo Command-line arguments: global.bat ^<tv^> ^<enc_opt^> echo ^<tv^> TV-based console? y/n echo ^<enc_opt^> Encode option? 1-5 echo. if [%1]==[y] goto TV sar if [%1]==[n] goto handheld sar : SAR OPTIONS echo Is this a TV based console? (y/n) set /p ANSWER= if "%ANSWER%"=="y" goto TV sar if "%ANSWER%"=="n" goto handheld sar echo I'm not kidding! goto SAR OPTIONS : TV sar ".\programs\replacetext" "encode.avs" "handheld = true" "handheld = false" ".\programs\replacetext" "encode.avs" "pass = 0" "pass = 1" ".\programs\avs2pipemod" -info encode.avs > ".\temp\info.txt" for /f "tokens=2" %%G in ('FIND "width" "%~dp0temp\info.txt"') do (set width=%%G) for /f "tokens=2" %%G in ('FIND "height" "%~dp0temp\info.txt"') do (set height=%%G) set /a "SAR_w=4 * %height%" set /a "SAR_h=3 * %width%" set VAR=%SAR_w%:%SAR_h% ".\programs\replacetext" "encode.avs" "pass = 1" "pass = 0" goto ENCODE OPTIONS : handheld sar set VAR=1:1 ".\programs\replacetext" "encode.avs" "handheld = false" "handheld = true" goto ENCODE OPTIONS : ENCODE OPTIONS if [%2]==[1] goto 10bit444 if [%2]==[2] goto 512kb if [%2]==[3] goto HD if [%2]==[4] goto HD if [%2]==[5] goto ExtraHQ echo. echo What encode do you want to do? echo. echo Press 1 for Modern HQ MKV. echo Press 2 for Compatibility MP4. echo Press 3 for HD Stream. echo Press 4 for All of the above. echo Press 5 for extra HQ encodes. : Set choice set /p EncodeChoice= if "%EncodeChoice%"=="1" goto 10bit444 if "%EncodeChoice%"=="2" goto 512kb if "%EncodeChoice%"=="3" goto HD if "%EncodeChoice%"=="4" goto HD if "%EncodeChoice%"=="5" goto ExtraHQ echo. echo You better choose something real! goto Set choice : HD :: Audio :: ".\programs\avs2pipemod" -wav encode.avs | ".\programs\venc" -q10 - ".\temp\audio_youtube.ogg" echo. echo ---------------------------- echo Encoding YouTube HD stream echo ---------------------------- echo. :: Video :: ".\programs\replacetext" "encode.avs" "hd = false" "hd = true" ".\programs\avs2pipemod" -y4mp encode.avs | ".\programs\x264_x64" --qp 5 -b 0 --keyint infinite --output ".\temp\video_youtube.mkv" --demuxer y4m - ".\programs\replacetext" "encode.avs" "hd = true" "hd = false" :: Muxing :: ".\programs\mkvmerge" -o ".\output\encode_youtube.mkv" --compression -1:none ".\temp\video_youtube.mkv" ".\temp\audio_youtube.ogg" if "%VIRTUALBOY%"=="1" (set VBPREF="_vb_") else (set VBPREF="_") if "%VIRTUALBOY%"=="1" (".\programs\ffmpeg" -i ".\output\encode_youtube.mkv" -c copy -metadata:s:v:0 stereo_mode=1 ".\output\encode%VBPREF%youtube.mkv") echo. echo ----------------------------- echo Uploading YouTube HD stream echo ----------------------------- echo. start "" cmd /c type "%~dp0programs\ytdesc.txt" ^| "%~dp0programs\tvcman.exe" "%~dp0output\encode%VBPREF%youtube.mkv" todo tasvideos rem start "" cmd /c echo todo ^| "%~dp0programs\tvcman.exe" "%~dp0output\encode%VBPREF%youtube.mkv" todo tasvideos if "%EncodeChoice%"=="3" goto Defaults if [%2]==[3] goto Defaults : 10bit444 :: Audio :: ".\programs\avs2pipemod" -wav encode.avs | ".\programs\sox" -t wav - -t wav - trim 0.0065 | ".\programs\opusenc" --bitrate 64 --padding 0 - ".\temp\audio.opus" echo. echo ---------------------- echo Generating timecodes echo ---------------------- echo. :: Timecodes :: ".\programs\replacetext" "encode.avs" "pass = 0" "pass = 1" ".\programs\avs2pipemod" -benchmark encode.avs ".\programs\replacetext" "encode.avs" "pass = 1" "pass = 2" echo. echo -------------------------------- echo Encoding 10bit444 downloadable echo -------------------------------- echo. :: Video :: ".\programs\replacetext" "encode.avs" "i444 = false" "i444 = true" ".\programs\avs2pipemod" -y4mp encode.avs | ".\programs\x264-10_x64" --threads auto --sar "%VAR%" --crf 20 --keyint 600 --ref 16 --no-fast-pskip --bframes 16 --b-adapt 2 --direct auto --me tesa --merange 64 --subme 11 --trellis 2 --partitions all --no-dct-decimate --input-range pc --range pc --tcfile-in ".\temp\times.txt" -o ".\temp\video.mkv" --colormatrix smpte170m --output-csp i444 --demuxer y4m - :: Muxing :: ".\programs\mkvmerge" -o ".\output\encode.mkv" --timecodes -1:".\temp\times.txt" ".\temp\video.mkv" ".\temp\audio.opus" if "%EncodeChoice%"=="1" goto Defaults if [%2]==[1] goto Defaults : 512kb :: Audio :: ".\programs\avs2pipemod" -wav encode.avs | ".\programs\qaac64" -v 0 --he -q 2 --delay -5187s --threading --no-smart-padding - -o ".\temp\audio.mp4" echo ------------------------------- echo Encoding Archive 512kb stream echo ------------------------------- echo. :: Video :: ".\programs\replacetext" "encode.avs" "pass = 2" "pass = 0" ".\programs\replacetext" "encode.avs" "i444 = true" "i444 = false" ".\programs\avs2pipemod" -y4mp encode.avs | ".\programs\x264_x64" --threads auto --crf 20 --keyint 600 --ref 16 --no-fast-pskip --bframes 16 --b-adapt 2 --direct auto --me tesa --merange 64 --subme 11 --trellis 2 --partitions all --no-dct-decimate --range tv --input-range tv --colormatrix smpte170m -o ".\temp\video_512kb.h264" --demuxer y4m - :: Muxing :: for /f "tokens=2" %%i in ('%~dp0programs\avs2pipemod -info %~dp0encode.avs ^|find "fps"') do (set fps=%%i) for /f %%k in ('%~dp0programs\div %fps%') do (set double=%%k) ".\programs\mp4box_x64" -hint -add ".\temp\video_512kb.h264":fps=%double% -add ".\temp\audio.mp4" -new ".\output\encode_512kb.mp4" goto Defaults : ExtraHQ :: Extra 10bit444 :: :: Audio :: ".\programs\avs2pipemod" -wav encode.avs | ".\programs\opusenc" --bitrate 64 - ".\temp\audio_extra.opus" echo. echo ---------------------- echo Generating timecodes echo ---------------------- echo. :: Timecodes :: ".\programs\replacetext" "encode.avs" "pass = 0" "pass = 1" ".\programs\avs2pipemod" -benchmark encode.avs ".\programs\replacetext" "encode.avs" "pass = 1" "pass = 2" echo. echo -------------------------------- echo Encoding ExtraHQ downloadable echo -------------------------------- echo. :: Video :: ".\programs\replacetext" "encode.avs" "i444 = false" "i444 = true" ".\programs\avs2pipemod" -y4mp encode.avs | ".\programs\x264-10_x64" --threads auto --sar "%VAR%" --crf 20 --keyint 600 --preset veryslow --input-range pc --range pc --tcfile-in ".\temp\times.txt" -o ".\temp\video_extra.mkv" --colormatrix smpte170m --output-csp i444 --demuxer y4m - :: Muxing :: ".\programs\mkvmerge" -o ".\output\encode_extra.mkv" --timecodes -1:".\temp\times.txt" ".\temp\video_extra.mkv" ".\temp\audio_extra.opus" :: Extra 512kb :: :: Audio :: ".\programs\avs2pipemod" -wav encode.avs | ".\programs\sox" -t wav - -t wav - trim 4672s | ".\programs\neroAacEnc" -q 0.25 -if - -of ".\temp\audio_extra.mp4" echo ------------------------------- echo Encoding ExtraHQ stream echo ------------------------------- echo. :: Video :: ".\programs\replacetext" "encode.avs" "pass = 2" "pass = 0" ".\programs\replacetext" "encode.avs" "i444 = true" "i444 = false" ".\programs\avs2pipemod" -y4mp encode.avs | ".\programs\x264_x64" --threads auto --crf 20 --keyint 600 --preset veryslow --range tv --input-range tv --colormatrix smpte170m -o ".\temp\video_512kb_extra.h264" --demuxer y4m - :: Muxing :: for /f "tokens=2" %%i in ('%~dp0programs\avs2pipemod -info %~dp0encode.avs ^|find "fps"') do (set fps=%%i) for /f %%k in ('%~dp0programs\div %fps%') do (set double=%%k) ".\programs\mp4box_x64" -hint -add ".\temp\video_512kb_extra.h264":fps=%double% -add ".\temp\audio_extra.mp4" -new ".\output\encode_512kb_extra.mp4" : Defaults ".\programs\replacetext" "encode.avs" "pass = 1" "pass = 0" ".\programs\replacetext" "encode.avs" "pass = 2" "pass = 0" ".\programs\replacetext" "encode.avs" "i444 = true" "i444 = false" ".\programs\replacetext" "encode.avs" "hd = true" "hd = false" ".\programs\replacetext" "encode.avs" "vb = true" "vb = false"
EDIT: Here's another update that expands upon the aspect ratio choices, both at the command-line and in the prompts within the batch file. I haven't done any actual encodes with these changes yet. Replace the corresponding code from above with these linesDownload global.bat
Language: batch

echo ----------------------- echo Hybrid Encoding Batch echo ----------------------- echo. echo Command-line arguments: global.bat ^<arc^> ^<enc_opt^> echo ^<arc^> Aspect ratio? 1-3 or width:height echo ^<enc_opt^> Encode option? 1-5 echo. if [%1]==[] goto SAR OPTIONS if [%1]==[1] goto handheld sar if [%1]==[2] ( set ar_w=4 set ar_h=3 goto TV sar ) if [%1]==[3] ( set ar_w=16 set ar_h=9 goto TV sar ) set aspect_ratio=%1 goto parse_ar :SAR OPTIONS echo Aspect ratio options: echo. echo Press 1 for 1:1 echo Press 2 for 4:3 echo Press 3 for 16:9 echo Press 4 to enter your own echo. set /p ANSWER=Choice? if "%ANSWER%"=="1" goto handheld sar if "%ANSWER%"=="2" ( set ar_w=4 set ar_h=3 goto TV sar ) if "%ANSWER%"=="3" ( set ar_w=16 set ar_h=9 goto TV sar ) if "%ANSWER%"=="4" goto get_ar echo I'm not kidding! goto SAR OPTIONS : get_ar set ar_w= set ar_h= set /p aspect_ratio=Enter aspect ratio in the format width:height : parse_ar for /f "tokens=1 delims=:" %%g in ('echo %aspect_ratio%') do (set /a "ar_w=%%g") for /f "tokens=2 delims=:" %%g in ('echo %aspect_ratio%') do (set /a "ar_h=%%g") if [%ar_w%]==[] goto get_ar if [%ar_h%]==[] goto get_ar if %ar_w% leq 0 goto get_ar if %ar_h% leq 0 goto get_ar goto TV Sar : TV sar for /f "tokens=2 skip=2 delims== " %%G in ('find "waspect = " "%~dp0encode.avs"') do (set current_waspect=%%G) ".\programs\replacetext" "encode.avs" "waspect = %current_waspect%" "waspect = %ar_w%" for /f "tokens=2 skip=2 delims== " %%G in ('find "haspect = " "%~dp0encode.avs"') do (set current_haspect=%%G) ".\programs\replacetext" "encode.avs" "haspect = %current_haspect%" "haspect = %ar_h%") ".\programs\replacetext" "encode.avs" "handheld = true" "handheld = false" ".\programs\replacetext" "encode.avs" "pass = 0" "pass = 1" ".\programs\avs2pipemod" -info encode.avs > ".\temp\info.txt" for /f "tokens=2" %%G in ('FIND "width" "%~dp0temp\info.txt"') do (set width=%%G) for /f "tokens=2" %%G in ('FIND "height" "%~dp0temp\info.txt"') do (set height=%%G) set /a "SAR_w=%ar_w% * %height%" set /a "SAR_h=%ar_h% * %width%" set VAR=%SAR_w%:%SAR_h% ".\programs\replacetext" "encode.avs" "pass = 1" "pass = 0" goto ENCODE OPTIONS
Current Projects: TAS: Wizards & Warriors III.
Editor, Experienced Forum User, Published Author, Player (67)
Joined: 6/22/2005
Posts: 1041
It appears that the encoded file names for [90] NES Circus Charlie by Phil, Genisto in 03:24.85 and [755] NES Circus Charlie by Phil, Genisto in 03:22.68 are switched, with the former being called v2 despite being the earlier movie in the obsoletion chain and the latter not having a version number attached. I've made modern encodes to replace the AVI for [90] NES Circus Charlie by Phil, Genisto in 03:24.85, but what should I call them? Keep the current naming and call them circuscharlie-tasv2-phil,genisto or do something else?
Current Projects: TAS: Wizards & Warriors III.
Editor, Experienced Forum User, Published Author, Player (67)
Joined: 6/22/2005
Posts: 1041
Now for a real waste of time: I've been thinking about getting back into encoding and chose [17] NES Super C "1 player" by Genisto in 13:18.35 as a test (it's on at least one of these lists). I'm using TASEncodingPackage. The YouTube audio encoding step fails with this error:
avs2pipemod[info]: writing 849.817 seconds of 44100 Hz, 1 channel audio.
Error: Not found fmt or data chunk (RIFF WAVE header error).avs2pipemod[info]: total elapsed time is 0.016 sec.
avs2pipemod[error]: only wrote 1012 of 37476915 samples.
A test dump of the same game from BizHawk doesn't cause errors. The info.txt generated by avs2pipemod -info has
a:sample_rate    44100
a:format         integer
a:bit_depth      16
a:channels       2
a:samples        846795
a:duration[sec]  19.202
for the BizHawk dump and
a:sample_rate    44100
a:format         float
a:bit_depth      32
a:channels       1
a:samples        37476915
a:duration[sec]  849.817
for the Famtasia dump. The audio encoding did not fail for the 10bit444 and 512kb encodes of the Famtasia dump. Any thoughts? EDIT: OK, so the problem seems to be that "Vorbis doesn't like the 32bit float WAV" from the Famtasia dump. The solution is to insert
ConvertAudioTo16bit()
after the AviSource line in encode.avs. Thanks to Aktan and fsvgm777 on IRC for the info.
Current Projects: TAS: Wizards & Warriors III.