Emulator Coder, Experienced Forum User, Published Author, Skilled player
(1142)
Joined: 5/1/2010
Posts: 1217
The video is indeed slowed down to 30fps (giving ~42.8% speed).
And oops on that audio. I meant to use tempo change (which does not change pitch) but actually used speed change (which also changes pitch).
What I did to the audio was first to reduce volume, then reduce speed and finally to add delay to compensate for the logo being there.
Oh, and I figured out the speed thing:
* F2 increments a certain counter
* F1 decrements the counter
* This counter can have values 0-64.
* This counter is located at 0x7EF bytes after X-position
* If one skips config.sys and autoexec.bat on the standard disk, that is 0x40F16.
* This counter determines amount of junk operations to perform on each frame.
* The maximum speed game can run at is 1 ingame frame per 1 VGA frame ("1:1 speed")
* The 1:1 speed is corresponds to running speed of about 1.75 screenfuls per second.
* JPC-RR clockspeeds don't go low enough for this game to slow down from that 1:1 speed with 0 junk ops per frame.
* Those junk operations are CPU-bound, so when the counter is large enough, clockspeed does affect game speed.
* 64 junk ops at cpudiv 100 (10MIPS) is about 25% speed.
* 64 junk ops at cpudiv 256 (the minimum, about 3.9MIPS) is about 10% speed.
* At about 40MIPS (would be cpudiv 25) this game becomes impossible to slow down at all, always running at that 1:1 speed.
Two demo encodes about effects of F2 (CPUDiv 256; encodes themselves haven't been slowed down):
8 junk ops, ~50% speed14 junk ops, ~33% speed
Emulator Coder, Experienced Forum User, Published Author, Skilled player
(1142)
Joined: 5/1/2010
Posts: 1217
I tried this game in DOSBox. It is like this by default with that too.
With great difficulty, I can make it slow down in DOSBox (haven't managed to do that in JPC-RR, but Dacicus reported that he could get it to slow down).
Clarification: "Great difficulty" meaning there is a key that slows down the speed, but it is so unresponsive, that it is very difficult to actually slow it down
Emulator Coder, Experienced Forum User, Published Author, Skilled player
(1142)
Joined: 5/1/2010
Posts: 1217
The probability that the event does not happen on each trial is 1 - x.
If the trials are independent, then the probability of even not happening in y trials is this to the power of y, i.e. (1-x)^y.
E.g. if x=0.01 (1% chance) and y=100 (100 attempts), this yields ~36.6%.
Watch out here. The above assumes trials are independent, which might very well not hold in practice.
Anyway, 128 independent tries at 1/64 chance has all trials fail (1-1/64)^128=~13,3% of the time (if the tries are dependent, the chance of failure can be less or greater).
Emulator Coder, Experienced Forum User, Published Author, Skilled player
(1142)
Joined: 5/1/2010
Posts: 1217
Judges, senior publisher and site managers can update submission files.
One way to do it: Upload fixed file to microstorage (or some file-hosting site) and post link, requesting submission file to be updated with that version.
Yeah, that's OK.
Emulator Coder, Experienced Forum User, Published Author, Skilled player
(1142)
Joined: 5/1/2010
Posts: 1217
* Sometimes posts show up later, but it is few minutes at most, so that earlier thread isn't going to appear.
* I searched the forums. There doesn't seem to be another thread for this game.
You disabled dual core and idle skipping, right? Sure these make the emulation faster, but both cause severe desync problems (and idle skipping additionally makes encoding virtually impossible).
Here are couple pages that might be helpful:
Wiki: GuidelinesWiki: GameResources/CommonTricks
And the take home message from the latter page:
* Attempt the unexpected.
* Untested code paths equal high probability of bugs.
* Bugs (a.k.a. glitches) can be very helpful in TASing.
And there's of course:
Wiki: MovieRules
Emulator Coder, Experienced Forum User, Published Author, Skilled player
(1142)
Joined: 5/1/2010
Posts: 1217
Pushing the frame might be hard to detect. That game uses hardware scrolling, but:
* Standing still might not attempt "scrolling".
* The existing counter is useless, because it can increment only by 1 per frame.
Unfortunately, keyboard input usually uses IRQ, not polling, so one can't easily see how often the game would accept it (this is the reason JPC-RR doesn't have lag counter).
Yeah, looks so.
Emulator Coder, Experienced Forum User, Published Author, Skilled player
(1142)
Joined: 5/1/2010
Posts: 1217
Problem: At N MHz, the emulated processor is way way faster than 386 at N MHz.
One would need to determine rough correspondence (which is game-dependent because of different instructions different games execute)
Emulator Coder, Experienced Forum User, Published Author, Skilled player
(1142)
Joined: 5/1/2010
Posts: 1217
There are no sounds in the emulator itself. That emulator only dumps sounds.
There are accelerators that send keydown/keyup events (datafiles/Extramenu contains the definitions IIRC)
Emulator Coder, Experienced Forum User, Published Author, Skilled player
(1142)
Joined: 5/1/2010
Posts: 1217
Also, check that the sound sampling rate is 48000Hz. Actual sampling rate of the SNES is ~32000Hz, but SNES9x contains bug that causes video to come out bad if 32000Hz rate is used.
Emulator Coder, Experienced Forum User, Published Author, Skilled player
(1142)
Joined: 5/1/2010
Posts: 1217
In the end of 1-1 there are two differences:
* The flagpole slightly flickers in the primary but not in the secondary.
* The fortress doesn't have color bleeding in the secondary but has in the primary.
(The secondary is the 10bit 444 encode).
I see that too. For me, the figures are about 3%, 4% and 12% (in order mplayer, mplayer2 primary, mplayer2 secondary).
I say it is not so much about platform but about the game. I have seen PC game that barely reacts to chroma subsampling (of course without pixeldoubling/doublescanning, because those would likely hide most of the artifacts anyway). And I have seen PC game that is really ruined by chroma subsampling.
After all, one-pixel-thick red lines on blue background (something really unfriendly to 4:2:0) can be done on the NES.
Emulator Coder, Experienced Forum User, Published Author, Skilled player
(1142)
Joined: 5/1/2010
Posts: 1217
No problem. And well, encoding isn't exactly trivial to do (especially when one needs to get maximum quality, add a logo and burn in some subtitles).
And well, the way I gave isn't the proper way to do things, just a simple way to get not-total-garbage quality.
And in case of submission (don't submit works in progress!), it is nice if the submitter can produce the official encodes, but if not (and in most cases not), that's what encoders are for. Encoder Guide talks about how to produce site-spec encodes.
Emulator Coder, Experienced Forum User, Published Author, Skilled player
(1142)
Joined: 5/1/2010
Posts: 1217
Dumping to h.264 lossless and then upscaling is very bad idea (unless you can somehow force h.264 into no chroma subsample mode). If you do that, you get pretty horrible artifacts.
Rucion wrote:
Ok, i need baby steps here. I'm glad I'm getting good advice, but I don't have any idea what half your statement meant.
Here are some quick'n'dirty steps (definitely not fit to be used for official encodes, but should do for WIPs and unofficial encodes):
Programs needed: mplayer, x264, sox and mkvmerge
Also, dump using FFV1 or Camstudio (preferably set compression to gzip with camstudio) if you do this (not Lagarith, this does not work with lagarith!).
I assume dump has three parts (adjusting these instructions for other number of parts isn't difficult).
(> represents command prompt):
> mplayer -ao pcm:fast:file=audio1.wav -vo null dump1.avi
> mplayer -ao pcm:fast:file=audio2.wav -vo null dump2.avi
> mplayer -ao pcm:fast:file=audio3.wav -vo null dump3.avi
Extract audio tracks from dumped videos. The reason you want separate audio track is that x264 doesn't handle audio very well.
If emulator dumps audio as .wav instead of as .avi soundtrack, this step should be obviously skipped.
Ignore the complaint of your system being too slow. It doesn't affect the dumped audio.
> x264 --crf 10 -o video1.mkv dump1.avi --vf resize:640,480,1:1
> x264 --crf 10 -o video2.mkv dump2.avi --vf resize:640,480,1:1
> x264 --crf 10 -o video3.mkv dump3.avi --vf resize:640,480,1:1
Do lossy video compression on dumped videos (resizing to 640x480). The resulting mkv files will be almost the quality of the originals but a lot smaller.
The reason to resize to 640x480 is twofold: Firstly to correct the aspect ratio and secondly to improve the quality on youtube a bit.
> sox audio1.wav audio2.wav audio3.wav audio.ogg
Concatenate audio1.wav, audio2.wav and audio3.wav into audio.ogg.
Note: This program does not give feedback on progress!
> mkvmerge video1.mkv + video2.mkv + video3.mkv -o video.mkv
Concatenate video segments.
> mkvmerge --aspect-ratio -1:4/3 -o final.mkv video.mkv audio.ogg
Merge the audio (audio.ogg) and video (video.mkv) tracks together into final video final.mkv (forcing aspect ratio to 4/3).
Emulator Coder, Experienced Forum User, Published Author, Skilled player
(1142)
Joined: 5/1/2010
Posts: 1217
Rucion wrote:
I did a recording with no editing to see how it works. It seems that after 4 mins it makes a new video file. The 4 minute file was almost 2 gigs in size.
.avi file format has 2GB limit. Bad things happen if it gets exceeded, so (good) emulators split the dump so each individual segment stays below 2GB.
Also, the method used with TASes is to first save as file containing keypresses (4 minutes of that on SNES would be something like 30-150kB, depending on number of controllers), play it back and dump (capture to .avi) it.
This also trivially discards the segments of gameplay that should not be there (because they got undone by savestate/loadstate mechanism).
Rucion wrote:
Could anyone please tell me how i could splice the videos together?
There are multiple ways:
* You could apply lossy compression (x264/oggenc or something like that) to each individual segment and then concatenate using mkvmerge.
* mencoder can concatenate video (and audio) segments
* Avisynth can also be used to concatenate video (and audio) segments.
Emulator Coder, Experienced Forum User, Published Author, Skilled player
(1142)
Joined: 5/1/2010
Posts: 1217
creaothceann wrote:
Last time this came up byuu said 315/88*6000000 / 1364 / 262, which is 60.098477556112263192919547153838.
I just redid the analysis, and I get the following (for NTSC, accuracy core):
ppu::scanline() with vcounter()=0 is called 357368 or 357364 PPU cycles (it alternates between these two) apart.
PPU clock frequency looks to be equal to CPU clock frequency, that is, 21477272Hz (NTSC). From this, one obtains frame rate of:
21477272Hz/(357364+357368)*2 = 10738636/178683 Hz.
Which is exactly equal to figure I gave before (IIRC, I locked the measurement to CPU that time, locking it to PPU gives much cleaner values).
Doing the same thing for PAL (again, accuracy core):
ppu::scanline() / vcounter()=0 interval: 425568 (doesn't alternate this time).
CPU/PPU clock for PAL: 21281370Hz.
=> 21281370Hz / 425568 = 322445/6448 Hz.
Again exactly matching the figure I gave earlier.
Edit: These figures are the same with compatibility core.
Edit #2: I think I figured out where the difference in these two figures comes from:
There are 1364 clocks per line, except if all of the following are true:
- NTSC region is active
- Interlace (448/478 high output) is off.
- Vcounter is 240.
- Field is odd.
In that special case there is only 1360 clocks on line.
This causes every other frame to take 4 cycles less, and this explains most of the difference (the remainder is explained by the fact that the clock frequency is 21477272Hz and not 315 / 88 * 6MHz).
Edit #3: PAL interval 425568 = 1364 * 312 (312 scanlines, 1364 clocks each).
Emulator Coder, Experienced Forum User, Published Author, Skilled player
(1142)
Joined: 5/1/2010
Posts: 1217
scrimpeh wrote:
2.It sends you back to the Menu? May be that FCEUX somehow snuck a reset into your movie, I've had that happen. You should be able to manually edit it out using Notepad++.
Yeah, spontaneous resets appearing in movie file is well-known FCEUX bug (especially if you use play from beginning).
And as for removing a reset using text editor, find a line starting with |1| (soft reset) or |2| (hard reset) and change that part to |0| (no reset).
Emulator Coder, Experienced Forum User, Published Author, Skilled player
(1142)
Joined: 5/1/2010
Posts: 1217
There is big mistakes of course, but already start to improve for a new one.
Then why did you submit? The submissions are expected to be as perfect as one can make them, not to contain mistakes (especially big ones).
For WIPs (and getting feedback on them), there is SNES games subforum.
And regarding using (E) ROM, normally (U) one is to be used (if that does not exist, then (J)). However, I can't find any indication that (U) nor (J) version of this game exists, so (E) might be proper ROM choice.
[Edit: As clarification, there might be valid reasons to chose (E) over (U) and (J), for example glitches only present in (E). And of course, (U) and (J) not existing means (E) has to be used.]
Oh, and don't double-submit.
Emulator Coder, Experienced Forum User, Published Author, Skilled player
(1142)
Joined: 5/1/2010
Posts: 1217
CoolKirby wrote:
I just refreshed a topic I was looking at two hours ago and noticed that my Player (73) had changed to a Player (61). My profile page claims that I have 60.6 player points and have participated in 2 teams (it should be just one).
Hmm... I see the site thinking you are linked in 3 player entries (482, which is just yourself, 518, which is unused entry forCoolKirby, nitrogenesis & jlun2 and 519, which is the same, but actually used entry)
As to wild swing in points, your only non-obsolete movie seems to have only 3 votes, so one vote might have swung the average a lot (73 points would correspond to average of about 6.9).
Edit: I removed accounts from player entry 518, which fixed the number of teams value to 1. But I can't delete the unused player entry.
Emulator Coder, Experienced Forum User, Published Author, Skilled player
(1142)
Joined: 5/1/2010
Posts: 1217
fanboss wrote:
but I have a little problem : everytime I put "start movie recording", the game is set back at 0 as if I never played it !
Before quitting mupen, do a savestate and then reload it after starting mupen again to get back where you was?
That's the usual way of keeping progress across emulator invocations, I don't know much about mupen, but that's the way I think it works.
Emulator Coder, Experienced Forum User, Published Author, Skilled player
(1142)
Joined: 5/1/2010
Posts: 1217
Wak017 wrote:
It is very simple: When I log-in and submit something, it logs me out. So it tells me to log in. I can log-in again, but when I want to submit, it logs me out again. What am I doing wrong??
Emulator Coder, Experienced Forum User, Published Author, Skilled player
(1142)
Joined: 5/1/2010
Posts: 1217
CoolKirby wrote:
Is it these features that keep making the site go down for about an hour about three times a week?
Or is it too much traffic to the site?
I don't know what exactly makes the site go down, but it seems to be associated with the database starting to read the disk like mad due to some reason (I haven't been able to figure that out (yet)).