xboxscene.org forums

Author Topic: Save-game Manager Thoughts...  (Read 149 times)

Kthulu

  • Archived User
  • Hero Member
  • *
  • Posts: 787
Save-game Manager Thoughts...
« on: January 09, 2004, 08:53:00 AM »

from what i've seen using my hex editor to look at save-game files, i'm really surprised that none of the dashboards have implemented a save-game manager.  only facility necessary that may not already be implemented is the ability to read unicode characters or convert ascii chars to unicode chars.  once you can read unicode, all you have to do to distinguish each game's saves from another games, etc. is read the TitleMeta.xbx and SaveMeta.xbx (which are just unicode text files as i can tell)

are there any unicode capabilities already in the MXM code?  would it require much effort to add?
Logged

unleashx

  • Archived User
  • Hero Member
  • *
  • Posts: 621
Save-game Manager Thoughts...
« Reply #1 on: January 09, 2004, 09:04:00 AM »

TitleMeta.xbx and SaveMeta.xbx are just plain text files and it's not even unicode. TitleMeta usually contain the game title, including localized ones. SaveMeta is the actual name of the game saves.
Logged

Kthulu

  • Archived User
  • Hero Member
  • *
  • Posts: 787
Save-game Manager Thoughts...
« Reply #2 on: January 09, 2004, 09:35:00 AM »

yes, i knew all that, but i thought they were in unicode.  when i open them with notepad, i get a few jibberish characters and that's all.  when i open them in my other editor (UltraEdit) i get the real text. since notepad only likes ASCII and UltraEdit likes ASCII or Unicode and the Xbox is an international product and Unicode is a more international standard,  i thought it was unicode.

http://qcpages.qc.edu/~nixon/links/asciiUnicode.html

which type of plain-text encoding is it then?


bottomline, the information in those files is the only info you need in order to know which game a particular save belongs to.  (much better than trying to match the xbeID up with a game) after that, all you need is file operations like copy, delete, and move of the dirs they are in.

This post has been edited by Kthulu: Jan 9 2004, 06:07 PM
Logged

geniusalz

  • Archived User
  • Hero Member
  • *
  • Posts: 1635
Save-game Manager Thoughts...
« Reply #3 on: January 09, 2004, 12:38:00 PM »

I think xbeid is a much better (surer) way, because some people like to change their game titles (don't know for sure if that affects savegames tho, but there's a chance of screwups)

However, xbeid is always constant, and even xbox savegame manager uses that.
Logged

Kthulu

  • Archived User
  • Hero Member
  • *
  • Posts: 787
Save-game Manager Thoughts...
« Reply #4 on: January 09, 2004, 12:48:00 PM »

so the MS save game manager, when you go into it from the MS dash and it lists all your save-games and tells you what games they belong to...it matches the save-game up with the appropriate game-name by xbeID?  does it keep a database file somewhere that allows it to do this matching?  what are the Meta.xbx's for then?

i'm going to test this tomorrow by editing my Meta files on E:  when i go into the MS Dash and my edits are reflected, i'm inclined to think you're wrong.  i have no doubt (it's rather obvious, actually) that when a game actually goes to create a save, it uses it's xbeID to create a filepath that is unique.

no matter how the MS dash lists your saves, i don't doubt for an instant that each individual game looks for it's xbeID folder in UDATA and TDATA, but all that aside...IMO using the Meta.xbx's is just as good a way and easier when you're managing game-saves from a global perspective.  however, if you are in the context of Baldur's Gate, it would be better to just look for your own xbeID.  unfortunately, it seems like my opinions are always unique tongue.gif
Logged

geniusalz

  • Archived User
  • Hero Member
  • *
  • Posts: 1635
Save-game Manager Thoughts...
« Reply #5 on: January 09, 2004, 01:11:00 PM »

MS-dash looks in the Data folders, lists all savegames it can find by doing a directory listing.  It gets the icons from the TitleImage.xbx, and the game name from TitleMeta

Anyway, each game, when saving/loading, uses its ID to find the savegames (or maybe the xdk handles that for you)

For context items, the definite choice is to look for xbeID.  Maybe some system working with xbox-saves.com to dl save games too.

For global gamesave management (i.e. msdash style, list and delete etc), the choice is using the titles from the TitleMeta file

So yeah, you'll have to use both to get full functionality
Logged

Kthulu

  • Archived User
  • Hero Member
  • *
  • Posts: 787
Save-game Manager Thoughts...
« Reply #6 on: January 09, 2004, 02:02:00 PM »

thank god you posted that.  i thought we had to be misunderstanding each other.  that's exactly what i've been trying to say.

now that that's clear, hoping BJ can come up with a quick and easy way of reading unicode, plain-text files...
Logged

geniusalz

  • Archived User
  • Hero Member
  • *
  • Posts: 1635
Save-game Manager Thoughts...
« Reply #7 on: January 09, 2004, 02:07:00 PM »

(from the other thread)
As far as I remember, Unicode files work with notepad.  You see s p a c e d out characters, but that's about it.

You might want to test how MXM currently handles those files, using the file read/write functions
Logged

BenJeremy

  • Archived User
  • Hero Member
  • *
  • Posts: 5645
Save-game Manager Thoughts...
« Reply #8 on: January 09, 2004, 02:08:00 PM »

QUOTE (Kthulu @ Jan 9 2004, 05:55 PM)
thank god you posted that.  i thought we had to be misunderstanding each other.  that's exactly what i've been trying to say.

now that that's clear, hoping BJ can come up with a quick and easy way of reading unicode, plain-text files...

OK, I'll consider that....
Logged

Kthulu

  • Archived User
  • Hero Member
  • *
  • Posts: 787
Save-game Manager Thoughts...
« Reply #9 on: January 09, 2004, 02:13:00 PM »

hold up....

i was actually wrong  ohmy.gif   just did some ascii and unicode chart looking...

the Meta.xbx's ARE actually in ASCII...

but there are 2 (8bit) codes (16bits total) at the very beginning of the file that messes notepad and READFILELN up.  i can't find chart telling what these codes are...

those codes are FF FE (in hex)

and there is a line feed then a null code (0A 00) at the end of the file.

so every Meta.xbx goes like this...

FF FE ... 0A 00
Logged

geniusalz

  • Archived User
  • Hero Member
  • *
  • Posts: 1635
Save-game Manager Thoughts...
« Reply #10 on: January 09, 2004, 02:21:00 PM »

Dude, that IS unicode dry.gif

I think the first set of characters (english and basic symbols) in unicode is the same codes as ASCII

Every other character turns up blank if you're reading a unicode file as ASCII, because the program reads a 16bit character as two 8bit characters.  The first one shows up, and the other is a binary 0.

I tried MXM's readfile function, and it only gets the first character as the first line (as it probably terminates the string at the first 0 char)

EDIT:
user posted image
Yeah, the first two characters are there, but the rest is unicode.
Logged

Kthulu

  • Archived User
  • Hero Member
  • *
  • Posts: 787
Save-game Manager Thoughts...
« Reply #11 on: January 09, 2004, 02:27:00 PM »

hehe...i see that now

so if i was right when i was right, but wrong when i was wrong...what am i now?  blink.gif  tongue.gif
Logged

unleashx

  • Archived User
  • Hero Member
  • *
  • Posts: 621
Save-game Manager Thoughts...
« Reply #12 on: January 09, 2004, 08:22:00 PM »

Oops, my bad. I keep forgetting that Notepad in XP (and 2000?) handles and displays unicode the same way as plain text tongue.gif . In my testing though, I can write in ASCII or unicode and MS dash still reads them fine. I guess it just matters if you have an international characters, but for the most part, ASCII is okay.
Logged