PDA

View Full Version : Helping with xclannad (can't think of anywhere else to go..)


Shish
2005-04-05, 23:39
I'd really like there to be a linux reallive interpreter ready when the kanon translation is done, so I can be playing things without needing windows (and as mentioned re:planetarian, I have win98 but it sucks generally). I'm seeing two options:

1) Write my own interpreter.
+ It'd be in english
- I have motivation problems; it'd never get finished unless people demanded it
- I'd have no idea what I'm doing; the most complicated reverse engineering I've done is hex-edited various things in .exe files to see what happened, and that was with file format documentation.

2) Help out with xclannad
+ most of the code is there
- It's all in japanese, as are the developers.
- I am not japanese, at all.

Poking round the source, there are some things I think could be improved quite easily*, but I have no idea how to get my contributions to the developers in a way that they'd understand -- I'm coming here for advice as you guys are the only people I know who are in the scene and speak english :)

Currently all I can think of is to mail an example patch to jagarl with some simple english / machine translated japanese explanation, and hope he understands and is willing to accept anonymous code contributions -- any better ideas?

Even better but less likely; are any english speakers already working with jagarl / on the xvn mailing list, so I could send my patches to them and have them translated and added by proxy?

* mostly minor / cosmetic things, eg using getopt to allow command line arguments -- currently the window / fullscreen toggle is hardcoded; a command line switch is only a minute / ~10 lines of code away, with other settings another ~3 lines each...

Haeleth
2005-04-06, 03:02
Even better but less likely; are any english speakers already working with jagarl / on the xvn mailing list, so I could send my patches to them and have them translated and added by proxy?
*raises hand*

Well, I wouldn't exactly say I'm "working with Jagarl", but he did accept a three-line patch from me that's the reason it compiles on Linux at all. ^^

As the more fluent Japanese speakers here will doubtless be only too happy to tell you, my written Japanese sucks, but it's a damn sight better than Babelfish, so I'd be happy to translate stuff for you.

I'm vaguely working on Kanon support myself at the moment, though I don't have that much time for it. If you're interested you can find the patches I haven't submitted yet (and various other stuff that may be of interest w.r.t RealLive) here (http://dev.haeleth.net/xclannad.html). In particular, applying the "Read Flags" patch will enable xclannad to launch Kanon, although it doesn't get past the Key logo yet.

Shish
2005-04-06, 11:18
> it's a damn sight better than Babelfish, so I'd be happy to translate stuff for you

Thanks ^_^ The only thing I can currently see trouble with is introducing myself to him, like so:

o) I'm some random english guy who'd like kanon to work
o) I'd like to send patches every now and then
o) Even though I don't speak any japanese, I find his C quite understandable, and I would hope he understands mine
o) as said, I don't know much about reverse engineering specifically, but I'm fine with C in general
o) Example patches:
http://shish.is-a-geek.net/projects/xclannad/switches.diff - command line flags rather than hardcoded paths
http://shish.is-a-geek.net/projects/xclannad/screenshot.diff - take a screenshot with F12 or printscrn, also adds F11 as a fullscreen toggle (alt-enter is alredy used by some WMs)

once we're introduced it *should* just be a case of me mailing patches and him applying them; not much need for human language...


Come to think of it, I should probably go and buy Clannad or Kanon SE <_<;; All I have currently is the old Kanon and Planetarian...

ED> Added another patch~

Haeleth
2005-04-07, 11:17
Okay, I'll write you a letter of introduction. I believe Jagarl speaks English to some extent, so you should be okay after that...

Clannad would be the best choice if you're looking for something to run in xclannad - it runs reasonably well, unlike Kanon (doesn't reach main menu) and Planetarian (demo doesn't run at all, at least not for me, and the full game will likely never run for DRM reasons).

One comment on your patches: my RealLive stuff is installed in <tt>/usr/local/share/games</tt>, which makes 32 characters rather tight. Any reason why you aren't using <tt>PATH_MAX</tt> from <tt><sys/param.h></tt>?

Shish
2005-04-07, 16:47
> Any reason why you aren't using PATH_MAX from <sys/param.h>?

Early morning stupidity, mostly. 4096 is overkill for the cdrom device though; 64 ought to be enough, even for people who like to refer to their disks through the /dev/ide/ tree... He seems to have used 1024 for filenames throughout, so I'll go with that for now and switch them all to PATH_MAX later.

Shish
2005-04-08, 13:03
Bump rather than edit because it's 50% new thread, 50% existing thread...

My windows 98 just cacked itself and no longer boots at all; hence now would be a good time to upgrade. The box is quite old (500mhz, 256mb ram, 10gb disk) -- what would be a decent version to upgrade to? I ask here specifically to do with japanese game compatability; it'd help if I could run things in windows too, to see how they're supposed to work~

zalas
2005-04-08, 13:21
I've generally only used Win2k, WinXP and Win2k3 when running Japanese games. Depending on what you want to run, you may need different system parameters. For example, if you're just running AVG, just about any computer will do :) But, if you want to run, say, Studio Ego's really inefficient 3D programming in their games, then you'd need a relatively recent computer with good graphics card.

Shish
2005-04-08, 13:28
The hardware should be enough for most things I'm wanting to do (avg & reallive), it's just Windows that I want upgraded~ I only point out hardware with worry that XP may be too bloated (or it may not, I don't know; hence I ask)

Haeleth
2005-04-08, 15:08
There's no real reason not to go to XP that I can think of. 256 Mb should be plenty of memory even for XP, if you're not using it for anything serious.

The only potential problem would be that 10GB drive - my RealLive game folder is about that size by itself! (But that's with the games fully installed, of course. Running them from DVD would cut that down a lot.)

zalas
2005-04-08, 15:29
For XP, I'd still recommend at least 512MB. You really can't run much on XP with 256MB, and you'll spend a lot of time just swapping to and from disk. That said, I'd recommend 512MB ram, ~80gig HD, a gfx5200(it's a cheap nvidia card, and I'm partial to nVidia, so <_<) and like pretty much any recent processor (go for AMD, they're cheap and give you more bang for the buck).

GreatSaintLouis
2005-04-08, 18:33
80GB is good, but if you're resourceful (read: broke) you can actually make do in XP with a 20GB drive. The 512 of RAM is definately a good idea though, as it gives XP that little extra kick. Also, I concur with Zalas - the GeForce FX5200 is a wonderful card for the <$100 you'll spend on it.

I'm doing the above (well, I have a second 20GB drive now) and still chugging along on a Pentium III 866Mhz processor, and I'm running AVG32 and RealLive-based games beautifully. They aren't really demanding game engines, that's for sure.

gp32
2005-04-08, 19:11
Would suggest Win2K; works well enough on 256MB RAM, and it's got the same set of I18N features that WinXP has.

Typing this right now on a Pentium II 533MHz laptop with 256MB RAM -- although the bootup time is very long, once you're in it's quite responsive.

darklegion
2005-04-08, 22:53
I'm running a stripped down windows xp under vmware with only 128 meg allocated and the performance is fine.You could run most run games with even only 64mb if you wanted but some games don't work...planaterian for instance is terribly bloated and tends to have serious trouble with out more ram,but that is the only bgame I have had trouble with.I'm running this under linux BTW,so I no longer need windows full stop.Direct3d support is in the latest beta also so 3D applications/games should be stable soon.
I'd still love to see a better xkanon/xclannad in any case,as japanese support tends to be less of a pain in linux for me,as I don't need to reboot just to change the language(even under a virtual machine,a reboot is still annoying)

Slipgate
2005-04-09, 16:04
For the record, if you're really performance sensitive, XP has bells and whistles that can be automatically disabled by setting it to run its interface with performance ahead of looks. It'll change the bubbly blue status bar you may have seen to the fairly conventional gray one, and do a way with a few niceties of XP to make it perform in a more lean fashion. Although such performance shavings *may* help, I finally went to Windows XP after years of usual Windows so I wanted the change of scenery, and a few of the bells and whistles I use (I watch lots of media on this computer) - also my processor was fast enough that I didn't see a difference either side to not go with the prettyness.

Anyway, but that said, especially if you're more familiar with previous incarnations of Windows and would be distracted by some of the new bells and whistles, you can be performance conscientous with XP and probably increase how much you can realistically do on any given setup.

Slipgate

GreatSaintLouis
2005-04-09, 17:33
Turning off the annoying Luna interface is so helpful - I run mine in the 'Classic Windows' mode, and it's true that you get a nice performance increase from that setting alone.

If you're really interested in trying to shave off extraneous graphical features in XP, I recommend downloading Microsoft's TweakUI utility. It basically allows for all sorts of tweaks to the user interface - from choosing which system icons (My Computer, Network Neighborhood, etc.) appear on the desktop to which drives use AutoPlay to what icon - My Computer or My Documents - will always appear in the top left of the desktop. There are a good amount of features that allow you to change the fading animation of the Start menu to a slide or even disable the animation entirely, for example, and while you might not know it, these little tweaks can really go a long way in wringing that extra bit of performance and responsiveness out of your machine. While changing from Luna to Classic will get some extra speed, there are a few options with this program that aren't found elsewhere in Windows.

Slipgate
2005-04-09, 17:54
Just be careful to "know where you parked" so to speak.

Also, I wasn't aware Windows tried to put one or the other (My Computer or My Documents) up there... I've had it both ways by simply arranging their icons as I see fit, and it holds unless the entire organization goes kaput.

Thanks for remembering the name of the setting, though, I forgot :P.

Slipgate

Aldareon
2005-04-11, 03:11
I still keep a couple of old relics - one is the laptop I'm on right now (450Mhz, 320Ram, 5GbHDD - not for long though, come another month's time and I'll be getting a top of the line model ^_^ *drool*). The other is a PIII 450, 256Mb Ram, 80Gb HDD (20Gb ain't around no more!). The latter has a GFX5200 and can actually play Halo (kinda) and Warcraft Frozen Throne on Max settings with no problems (ok, so it's slow at 4 players insane mode, but can handle normal and campaign modes fine). Only prob is the long startup time, and I keep an older version of NAV because the newer ones take too damn long!
So .. yeah. As long as you have a good video card, you shouldn't run into too much trouble with running the Key-type games.

Haeleth
2005-04-11, 03:18
As long as you have a good video card, you shouldn't run into too much trouble with running the Key-type games.
For "As long as" read "Regardless of whether".

Clannad and Kanon Standard Edition run just fine in Virtual PC, and that emulates an ancient S3 card that doesn't have 3D acceleration of any sort.

GreatSaintLouis
2005-04-11, 23:50
that emulates an ancient S3 card that doesn't have 3D acceleration of any sort.
Should we be feeling old if we can remember when S3 was a serious market competitor?

Or when "video card" was not synonymous with "3d acceleration", for that matter? :(

zalas
2005-04-12, 01:18
Start feeling old when you can still remember monochrome video graphics adaptors... and dumb terminals (along with the OOH spiffy tektronix graphics plot ability zomg!!!)

GreatSaintLouis
2005-04-12, 01:27
Does the vivid green monochrome of an Apple ][ (before there was a ][e) count? ;)

Okay, so maybe I'm not that old, but I definately feel like I'm getting up there... Technology moving at the speed of light doesn't help at all, either.

Haeleth
2005-04-12, 03:21
Start feeling old when you can still remember monochrome video graphics adaptors... and dumb terminals (along with the OOH spiffy tektronix graphics plot ability zomg!!!)
/me feels old.

Misu
2005-04-12, 06:49
Does the vivid green monochrome of an Apple ][ (before there was a ][e) count? ;)

Damn, I'm not even old I remember using those T-T. They were in my elementary school computer lab o-O. I remember having to boot of those 5 1/2s and having the teachers block the fun games by messing around with the server terminal (-_- stupid dummy consoles! *shakes fist*).

On another note for the Windows XP, you can actually get into more tweaking and system effeciency by doing Start>Run>Msconfig and stripping Windows of anything it boots in Startup and services that you dont need. I mean, if your not going to surf the internet on that machine, why run TCP/IP?

procyon
2005-04-12, 10:58
Start feeling old when you can still remember monochrome video graphics adaptors... and dumb terminals (along with the OOH spiffy tektronix graphics plot ability zomg!!!)
/me feels old.

Maybe not so old, there's still some of them kicking around. The last time I used a serial terminal (green screen and all) was something on the order of last week.

Shish
2005-04-12, 17:45
> [Remember] when "video card" was not synonymous with "3d acceleration", for that matter?

Why yes, I remember today <_<

~90% of my network has been salvaged from bins; I have 20 odd 2MB unaccelerated video cards, and only one decent one - but seeing as my main dektop's AGP slot is knackered, I can't use it :(


> Planetarian demo doesn't run at all

That depends how you define "run" and "at all"... It opens a window and sets the custom cursor, which is enough to see that my patches work, eg the screenshot (http://shish.is-a-geek.net/projects/xclannad/xclannad_0000.png) one...

Haeleth
2005-04-13, 17:45
Aha, it works when I run the KINETICDATA folder. I was trying to run the root folder. X_x

You can fix the screen mode issue simply by replacing SDL_SetVideoMode&#40;640, 480, 0, videoOptions&#41;;
// SDL_SetVideoMode&#40;800, 600, 0, SDL_HWSURFACE /*| SDL_FULLSCREEN */&#41;;in <tt>xlovesys.cc</tt> withint screenmode;
config.GetParam&#40;"#SCREENSIZE_MOD", 1, &screenmode&#41;;
if &#40;screenmode == 1&#41; &#123;
SDL_SetVideoMode&#40;800, 600, 0, videoOptions&#41;;
&#125; else &#123;
SDL_SetVideoMode&#40;640, 480, 0, videoOptions&#41;;
&#125;and adding a lineSetOrigParam&#40;"#SCREENSIZE_MOD", 1, 0&#41;; /* 0 = 640x480; 1 = 800x600 */to all the other <tt>SetOrigParam()</tt> calls in <tt>AyuSysConfig::AyuSysConfig</tt> in <tt>system/system_config.cc</tt>. (Feel free to add that to your switches patch if you like, it's not in any of mine yet.)

With that done, the Planetarian demo actually seems to runs quite nicely right up to the point where the voice is supposed to start speaking - at which point it segfaults. ;_;

Shish
2005-04-14, 19:36
> Aha, it works when I run the KINETICDATA folder. I was trying to run the
> root folder. X_x

I still can't get it to work past loading & setting the cursor :/ 0.05e + all your patches + some stuff I've been doing which shouldn't affect the system bits, patched english demo as found on the insani website.


On startup:scn 0 pt 0&#58; Cannot open scenario number 0
- Can't find scene file 'SEEN9030.TXT'(error message added myself; the file searcher had a nasty goto-based error system which I tried to clean up (http://shish.is-a-geek.net/projects/xclannad/clean_err.diff) by replacing "goto generic_error_handler at end of function" with "print <specific error message>; return", but I'm not 100% sure I didn't break something...)

And in gameexe.ini: "#SEEN_START=9030"

Visarc shows that seen.txt contains 42mb of seen0001.txt, which contains a lot of 42mb seen9???.txt files, but no seen9030...

Making gameexe.ini point to scene 1 rather than 9030 gives repeated "cmd error occured: scn 1 pt 0"


xc-vars-test seems to work fine, although it too gives "cmd error occured: scn 1 pt 0" between my clicking and it exiting, once

Haeleth
2005-04-15, 04:04
Odd; it works fine here (up to the segfault I mentioned), with all my patches and all the ones of yours you've linked to: voila (http://haeleth.net/temp/xclannad_0001.png). Visarc works fine here, so it sounds like your seen.txt is corrupt. (Could be related to how you've mounted it... is there some unwanted CRLF conversion going on or anything?)

Shish
2005-04-15, 09:55
That would seem to be it; looks like filezilla thinks .txt = ascii text <_<


A plaster for that segfault; it allows you to get to the image of the city street with the "more text" arrow displayed, but the text itself isn't shown and there're a lot of "cmd error occured: scn 1000 pt 8225"... Poking around the erroneous command shows that there's a "What do you think of the planetarium" loaded in as one of it's args, so I'm guessing it's an unimplemented text-display command.

--- ../../../clean/xclannad/window/render.cc 2005-04-06 06&#58;04&#58;05.000000000 +0100
+++ render.cc 2005-04-16 06&#58;49&#58;22.572362416 +0100
@@ -276,13 +276,9 @@
void blit_alpha&#40;Surface* src_o, const Rect& srcrect_o, Surface* dst_o, const Rect& dstrect_o, const unsigned char* alpha, const Rect& alphare
ct&#41; &#123;
SDL_Surface* dst = &#40;SDL_Surface*&#41;dst_o;
SDL_Surface* src = &#40;SDL_Surface*&#41;src_o;

Rect srcrect&#40;srcrect_o&#41;, dstrect&#40;dstrect_o&#41;;
+ if&#40;srcrect.lx < 0&#41; srcrect.lx = 0;
+ if&#40;srcrect.ty < 0&#41; srcrect.ty = 0;
+ if&#40;dstrect.lx < 0&#41; dstrect.lx = 0;
+ if&#40;dstrect.ty < 0&#41; dstrect.ty = 0;
clip_rect&#40;srcrect, dstrect, dst&#41;;

int awidth = alpharect.width&#40;&#41;;


ED>

<neo>I know code-fu :O</neo> <-- I just had an epiphany, whereby I realised I was reading bytecode with a hex editor...

It looks like one of the text display commands isn't reading enough arguments, because when it exits it leaves the instruction pointer pointing at some plain text. A screenshot (http://shish.is-a-geek.net/pub/ufufuf/quote-waffle.png) shows the orphans~