I've just completed the new 60fps patch.
The good news:
. fixes the playback rate at 60fps. I tested this against sleepzteam's zelda run and linnom's batman run, timing them at 26:55 and 10:17 respectively, which I think is correct.
. fixes the cpu lock-up (yay!)
. fixes the screen size miscalculation for 3x magnification
Now for the bad news:
. causes audbible "popping" in the audio
Unfortunately, the sound "popping" glitch might be difficult to fix even if I did have the source code, so I might not manage to fix this for a while.
Now for the patch. You should apply this to an unmodified FAMTASIA.EXE.
#include <stdio.h>
#include <stdlib.h>
int main(void)
{
struct {
unsigned long offset;
int length;
char* data;
} patch[]= {
/* 60 fps patch */
{ 0x00200, 1, "\x40" },
{ 0x27c59, 5, "\xe9\x63\x03\x00\x00" },
{ 0x1975a, 1, "\x00" },
{ 0x196ff, 8, "\x82\x06\x00\x00\xf7\xea\xeb\x15" },
{ 0x27fbc, 0xd0, "\
\xe9\xcb\x01\x00\x00\xa0\x84\xe5\x46\x00\x84\xc0\x74\x08\x31\xdb\
\x89\x1d\x78\x7a\x46\x00\x8a\x25\xd0\x89\x44\x00\x84\xe4\x0f\x85\
\xd5\x01\x00\x00\x84\xc0\x0f\x84\x7e\xfc\xff\xff\x52\xa1\xd4\xdc\
\x46\x00\x3b\x05\x38\x3b\x47\x00\x74\x14\x31\xd2\x89\x15\x34\x3b\
\x47\x00\xa3\x38\x3b\x47\x00\xff\xd6\xa3\x3c\x3b\x47\x00\x8b\x1d\
\xd4\xdc\x46\x00\xb8\x83\x06\x00\x00\xf7\x2d\xd8\xdc\x46\x00\xf7\
\xf3\x85\xd2\x74\x13\x03\x15\x34\x3b\x47\x00\x39\xda\x7c\x03\x40\
\x29\xda\x89\x15\x34\x3b\x47\x00\x03\x05\x3c\x3b\x47\x00\xa3\x3c\
\x3b\x47\x00\x50\xff\xd6\x89\xc2\x58\x29\xd0\x7f\x05\xb8\x01\x00\
\x00\x00\xa3\x98\xda\x46\x00\xa3\x14\x7c\x46\x00\x6a\x00\x6a\x00\
\x68\x20\x88\x42\x00\x6a\x00\x50\xff\x15\xbc\x12\x44\x00\xa3\x78\
\x7a\x46\x00\xa1\x98\xda\x46\x00\xf7\x2d\x50\x23\x47\x00\xbb\xe8\
\x03\x00\x00\xf7\xf3\xa3\xb8\x0e\x47\x00\x5a\xe9\xda\xfb\xff\xff" },
{ 0x30010, 1, "\xc3" },
/* 240 scanlines patch */
{ 0x1ff0d, 1, "\xf0" }, { 0x1f352, 1, "\xf0" }, { 0x1f2e6, 1, "\xf0" }, { 0x1f389, 1, "\xef" },
{ 0x1f2f1, 1, "\xf0" }, { 0x1f34e, 1, "\x3d" }, { 0x1f2e2, 1, "\x3d" }, { 0x1ff31, 1, "\xe0" },
{ 0x46920, 1, "\x10" }, { 0x1f5cd, 1, "\xf0" }, { 0x1f5d8, 1, "\x3d" }, { 0x1f617, 1, "\xf0" },
{ 0x1f60c, 1, "\xf0" }, { 0x1f608, 1, "\x3d" }, { 0x1f1ad, 1, "\x3d" }, { 0x1f1b2, 1, "\x3c" },
{ 0x1f6e0, 1, "\xf0" }, { 0x1f6dc, 1, "\x3d" }, { 0x1f71d, 1, "\xf0" }, { 0x1f460, 1, "\xf0" },
{ 0x1f478, 1, "\xf0" }, { 0x2705d, 1, "\xd0" },
{ 0, 0, 0 }
};
FILE *fp = fopen("FAMTASIA.EXE", "rb+");
if(!fp) { perror("FAMTASIA.EXE"); return -1; }
int i;
for(i=0; patch[i].offset; ++i)
{
fseek(fp, patch[i].offset, SEEK_SET);
fwrite(patch[i].data, 1, patch[i].length, fp);
}
return 0;
}
Edit: I fogrot to mention that this patch completely removes the auto-frame skip functionality from Famtasia. If you want 60fps, you'll have to manually set frame skip to 1 by hand-editing your famtasia.ini file. Look for the line "Occupation=3" and set it to 1. If people find this a nuisance I can easily hard-code the frame skip to be 1.