Posts for creaothceann


creaothceann
He/Him
Editor, Experienced Forum User
Joined: 4/7/2005
Posts: 1874
Location: Germany
There's always VirtualBox...
creaothceann
He/Him
Editor, Experienced Forum User
Joined: 4/7/2005
Posts: 1874
Location: Germany
creaothceann
He/Him
Editor, Experienced Forum User
Joined: 4/7/2005
Posts: 1874
Location: Germany
zeromus wrote:
We do not do this because we don't want something so important to be untrustworthy. When the client unfreezes, your savestate is complete. The hitching is a purposeful signal that it is safe to proceed.
Isn't that the purpose of a status message? The program can't always guarantee it's safe to proceed anyway because the hardware can't always be trusted: https://stackoverflow.com/questions/28270491/how-to-make-sure-data-is-flushed-to-hdd-not-buffered-on-file-io-writefile https://blogs.msdn.microsoft.com/oldnewthing/20100909-00/?p=12913
creaothceann
He/Him
Editor, Experienced Forum User
Joined: 4/7/2005
Posts: 1874
Location: Germany
ircluzar wrote:
From my understanding of it, most of the hitch is caused while the savestate file is written on disk. Is there a quick solution for this issue?
Copy the data to a buffer in RAM, then write the savestate from there using another thread?
creaothceann
He/Him
Editor, Experienced Forum User
Joined: 4/7/2005
Posts: 1874
Location: Germany
Did you just upload the file without re-encoding? Because that was just a 1280x480 video with the container flags saying that it should be stretched to an aspect ratio of 4:3. If Youtube used that to make it a 720p video then it's more advanced than I would've thought.
creaothceann
He/Him
Editor, Experienced Forum User
Joined: 4/7/2005
Posts: 1874
Location: Germany
Stovent wrote:
Why not uploading it to YT?
Because my account was disabled ages ago and I didn't feel like creating a new one. I'd upload it to Vimeo but that account was also disabled recently.
creaothceann
He/Him
Editor, Experienced Forum User
Joined: 4/7/2005
Posts: 1874
Location: Germany
I'm uploading an encode (with these menu items checked)... had to change the width to 1280 because the game switches between 256 and 320 pixels per line. The music at the static "The End" screen stops at almost exactly the 10 minute mark, so that's where I cut the video. EDIT: download link
creaothceann
He/Him
Editor, Experienced Forum User
Joined: 4/7/2005
Posts: 1874
Location: Germany
Regarding BizHawk's PCECD emulation, do the menu items "Always Perform Sprite Limit" and "Always Equalize Volumes (PCE-CD)" make it more accurate?
creaothceann
He/Him
Editor, Experienced Forum User
Joined: 4/7/2005
Posts: 1874
Location: Germany
Mmh, right. Did you test the speed with a function pointer (or a variable tested in a switch) that is set when timer_control is changed?
creaothceann
He/Him
Editor, Experienced Forum User
Joined: 4/7/2005
Posts: 1874
Location: Germany
It doesn't matter if they have the same bits set or not since we're testing for zero/nonzero. Another thing you could do: store a function pointer somewhere and call it in the function. Change the pointer value when timer_control is changed.
Language: c

public void timer_control_AND_3_is_1() {state = divider_reg & 0b0000001000;} public void timer_control_AND_3_is_2() {state = divider_reg & 0b0000100000;} public void timer_control_AND_3_is_3() {state = divider_reg & 0b0010000000;} public void timer_control_AND_3_is_0() {state = divider_reg & 0b1000000000;} public void timer_control_has_been_set() inline; // or just put these lines to where timer_control is set { // pointer array of 4 pointers StateOperation = StateOperations[timer_control & 3]; state_c = timer_control & 0x4; } public void tick_2() { divider_reg += 1; // call StateOperation here // this procedure allows several glitchy timer ticks, since it only measures falling edge of the state // so things like turning the timer off and resetting the divider will tick the timer // if ((state == 0 || state_c == 0) && (old_state > 0 && old_state_c > 0)) { if (((state & state_c) == 0) && ((old_state | old_state_c) != 0)) { timer_old = timer; timer += 1; // if overflow, set the interrupt flag and reload the timer (4 clocks later) if (timer < timer_old) { pending_reload = 4; reload_block = false; } } old_state = state; old_state_c = state_c; }
EDIT: Maybe it also works with a switch that uses a variable which is set when timer_control is changed.
creaothceann
He/Him
Editor, Experienced Forum User
Joined: 4/7/2005
Posts: 1874
Location: Germany
How about this?
Language: c

public void tick_2() { divider_reg += 1; // pick a bit to test based on the current value of timer control // switch (timer_control & 3) { // case 1: state = divider_reg & 0b0000001000; break; // case 2: state = divider_reg & 0b0000100000; break; // case 3: state = divider_reg & 0b0010000000; break; // case 0: state = divider_reg & 0b1000000000; break; // } int i = timer_control & 3; i = (i - 1) & 3; i = 0b0000001000 << (i * 2); state = divider_reg & i; // AND it with the state of the timer on/off bit state_c = timer_control & 0x4; // this procedure allows several glitchy timer ticks, since it only measures falling edge of the state // so things like turning the timer off and resetting the divider will tick the timer // if ((state == 0 || state_c == 0) && (old_state > 0 && old_state_c > 0)) { if (((state & state_c) == 0) && ((old_state | old_state_c) != 0)) { timer_old = timer; timer += 1; // if overflow, set the interrupt flag and reload the timer (4 clocks later) if (timer < timer_old) { pending_reload = 4; reload_block = false; } } old_state = state; old_state_c = state_c; }
creaothceann
He/Him
Editor, Experienced Forum User
Joined: 4/7/2005
Posts: 1874
Location: Germany
Is that line using bit masking and shifting? You could also store each emulated bit as its own boolean.
creaothceann
He/Him
Editor, Experienced Forum User
Joined: 4/7/2005
Posts: 1874
Location: Germany
Easy: just make a game where everything is made out of clouds :D
creaothceann
He/Him
Editor, Experienced Forum User
Joined: 4/7/2005
Posts: 1874
Location: Germany
Post subject: Re: #5650: Ready Steady Yeti's GBA Sabrina the Teenage Witch: Potion Commotion in 24:00.73
creaothceann
He/Him
Editor, Experienced Forum User
Joined: 4/7/2005
Posts: 1874
Location: Germany
Ready Steady Yeti wrote:
Though I do provide a bad (but not absolutely horrible I guess) temporary encode, I VERY HIGHLY RECOMMEND you watch this on an emulator. There are a few things that are hard to see on the YouTube video. For instance, when Sabrina takes damage she does NOT turn invisible like it looks sometimes; she blinks every other frame. PLEASE just watch it on an emulator, but I uploaded it for those of you who absolutely insist not to, or those who want to watch it sooner and don't have an emulator on-hand.
AFAIK to activate Youtube's 60 fps mode you just have to upload a video with a height of 720 lines (or more), and at least ~59.94 fps of course. Don't upload the raw emulator output unless it has a resize option. (And even then you'll waste time if it's uncompressed data...)
creaothceann
He/Him
Editor, Experienced Forum User
Joined: 4/7/2005
Posts: 1874
Location: Germany
Sour wrote:
About macros, while they do tend to improve performance, this is usually because they are the equivalent of inlining the whole code (instead of making potentially costly function calls). They are a pain to debug though (and sometimes understand), so I tend to avoid them whenever possible. Normally in C++, you can use __forceInline (or similar, depends on compiler) to force the compiler to inline functions. You can also do something similar in C# (as of .NET 4.5) by adding this attribute to a function: [MethodImpl(MethodImplOptions.AggressiveInlining)]. This is not exactly the same, but it will allow the compiler to inline the function in most cases, no matter the size of the function. Without this attribute, only very small functions will be inlined. Whether inlining will make it faster or not, though, really depends on the scenario - only testing will tell.
Specifically, it can needlessly fill up the CPU's instruction cache.
creaothceann
He/Him
Editor, Experienced Forum User
Joined: 4/7/2005
Posts: 1874
Location: Germany
Alyosha wrote:
I'm not a programmer in real life
Perhaps you meant "not a professional programmer" ;)
creaothceann
He/Him
Editor, Experienced Forum User
Joined: 4/7/2005
Posts: 1874
Location: Germany
PikachuMan wrote:
Those YouTube video ads
...there are ads?
creaothceann
He/Him
Editor, Experienced Forum User
Joined: 4/7/2005
Posts: 1874
Location: Germany
*bump* byuu posted some RAM dumps: https://board.byuu.org/viewtopic.php?f=4&t=1758
creaothceann
He/Him
Editor, Experienced Forum User
Joined: 4/7/2005
Posts: 1874
Location: Germany
...but you were entertained by less speed though...
creaothceann
He/Him
Editor, Experienced Forum User
Joined: 4/7/2005
Posts: 1874
Location: Germany
Just had an idea about using convolution:
Language: Avisynth

f = "castlevaniasotn-tas-maria-arandomgametaser.mkv" DSS2(f, pixel_type="RGB32") v0 = Method_0.Subtitle("original" , text_color=$FFFFFF) v1 = Method_1.Subtitle("add left neighbor at 50% intensity", text_color=$FFFFFF) v2 = Method_2.Subtitle("convolution" , text_color=$FFFFFF) v3 = Method_3.Subtitle("bilinear resize" , text_color=$FFFFFF) Interleave(v0, v1, v2, v3) function Method_0(clip c) { c PointResize(Width * 3, Height * 3) } function Method_1(clip c) { c.Layer(c, level=128, x=1) PointResize(Width * 3, Height * 3) } function Method_2(clip c) { c GeneralConvolution(0, " 0 1 0 1 0 1 0 1 0") c.Layer(last, level=128) PointResize(Width * 3, Height * 3) } function Method_3(clip c) { c BilinearResize(Width * 3, Height * 3) }
(Note that all methods except #3 don't modify the size of the picture.) Result: http://imgur.com/a/IpX59 It removes the mesh, but keeps the text more readable by strengthening vertical structures. It also works vertically (so there's also a bit of vertical blurring). I don't like how it makes the text a bit darker even when it shouldn't be, but that's for another day. EDIT: Unfortunately it's not suited for dithering that consists of columns only, which can be seen in the very first post in the bottom left corner.
creaothceann
He/Him
Editor, Experienced Forum User
Joined: 4/7/2005
Posts: 1874
Location: Germany
I played up to the stage in Sonia's screenshots, and I think I did see that layer flickering once. I'm not 100% sure though because it's easy to miss while playing.
creaothceann
He/Him
Editor, Experienced Forum User
Joined: 4/7/2005
Posts: 1874
Location: Germany
Is there a reliable way to trigger this? I might test that later on the hardware.
creaothceann
He/Him
Editor, Experienced Forum User
Joined: 4/7/2005
Posts: 1874
Location: Germany
I'm going to upload a temporary encode. EDIT: http://www.mediafire.com/file/b9jamcomq50uql3/F-ZeroPort2_20994.mkv
creaothceann
He/Him
Editor, Experienced Forum User
Joined: 4/7/2005
Posts: 1874
Location: Germany
Technically, every function returns a value. It's just that in Avisynth, the value undefined is also possible. It's what every function's return value starts at. EDIT:
Language: Avisynth

tmp = Test s = defined(tmp) ? "yes" : "no" BlankClip.Subtitle(s) function Test { # 5 }
Comment/uncomment the 5 to see the different outcomes.