Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Pagan Ultima VIII Map Format

404 views
Skip to first unread message

Mika Tammi

unread,
Oct 19, 2000, 3:00:00 AM10/19/00
to
I need info about map format because i'm making Ultima 8 Map & Graphics
viewer.

Jason Ely

unread,
Oct 19, 2000, 3:00:00 AM10/19/00
to
The map is basically a record file..

The FLX format contains a header and data follows...

Each record contains a series of objects. I could write a document on this
since it gets complex when you have objects contained in other objects...

The object structure looks like this:

struct OneItem
{
short x,y;
unsigned char z;
short type;
unsigned char frame;
unsigned short flags;
short quality;
unsigned char npcNum;
unsigned char mapNum;
short next_object; // Id of next object in container or list.
};


-Jason Ely (former developer on Ultima 8)


"Mika Tammi" <tamm...@hotmail.com> wrote in message
news:8sn40j$mc8$1...@news.clinet.fi...

Jason Ely

unread,
Oct 19, 2000, 3:00:00 AM10/19/00
to
Here are a list of some of the flags in the .status field...

#define DISPOSABLE 0x0002
#define OWNED 0x0004
#define CONTAINED 0x0008
#define INVISIBLE 0x0010
#define FLIPPED 0x0020
#define IN_NPC_LIST 0x0040
#define EQUIPPED 0x0200
#define BOUNCING 0x0400
#define ETHEREAL 0x0800
#define HANGING 0x1000
#define LOW_FRICTION 0x4000

DISPOSABLE should never be set... It is meant for temporary objects that die
when they move out of the general area (Fast Area)
OWNED objects are owned by NPCS and are a "No Touch" for the avatar without
setting off an alarm
CONTAINED means the object is inside a container
INVISIBLE this speaks for itself
FLIPPED the image and footpad of the object are flipped
IN_NPC_LIST this object is an NPC
EQUIPPED this object is equipped on the avatar
BOUNCING should never be set in the editor. This is when objects bounce
around, for physics reasons.
ETHEREAL object is not in the game world
HANGING this tells object to ignore gravity
LOW_FRICTION objects do not lose momentum as quickly

Holtzmann

unread,
Oct 20, 2000, 3:00:00 AM10/20/00
to
"Jason Ely" wrote:

> Here are a list of some of the flags in the .status field...

(snipped lotsa stuff)

Are you sure EA doesn't mind that you're giving away this information?

--
Holtzmann


Sent via Deja.com http://www.deja.com/
Before you buy.

Jason Ely

unread,
Oct 20, 2000, 3:00:00 AM10/20/00
to
I'm not posting actual code U8 code, so no, they cannot. Could they get me
for giving away game secrets? Nope.

Sharing my knowledge about a DOS game that they don't make money on anymore
doesn't concern them.

-Jason Ely

"Holtzmann" <holt...@my-deja.com> wrote in message
news:8sp7uc$r3p$1...@nnrp1.deja.com...

Boa Dragon

unread,
Oct 20, 2000, 3:00:00 AM10/20/00
to
Mika Tammi has returned to fill the world with eternal darkness...

>I need info about map format because i'm making Ultima 8 Map & Graphics
>viewer.

I'm not sure if there _is_ any such info. Most people (around here at
least) dislike U8, so I doubt anyone has explored the data file
formats...

*Boa

Boa Dragon

unread,
Oct 20, 2000, 3:00:00 AM10/20/00
to
Holtzmann has returned to fill the world with eternal darkness...

>> Here are a list of some of the flags in the .status field...
>(snipped lotsa stuff)
>Are you sure EA doesn't mind that you're giving away this information?

Anyway, I think this is kind of cool, that the (or at least one of)
original developers help people out with this kind of stuff.

If the U7 programmers would show up, they would probably save the
Exult team a lot of time...

*Boa

Holtzmann

unread,
Oct 20, 2000, 3:00:00 AM10/20/00
to
"Jason Ely" wrote:

> I'm not posting actual code U8 code, so no, they cannot. Could they
> get me for giving away game secrets? Nope.
> Sharing my knowledge about a DOS game that they don't make money on
> anymore doesn't concern them.

Very interesting. Does that mean that if we can find any of the U7
programmers, they could legally give us information about the U7 file
formats?
Also, do you know anything about U8's memory manager? If you do, this
information will be very much appreciated, because it might allow the
creation of u8run...
(then again, maybe memory manager internals are considered to be game
secrets)

jeff_f...@my-deja.com

unread,
Oct 20, 2000, 3:00:00 AM10/20/00
to
In article <39f05370...@nntpserver.swip.net>,
b...@ultima-dragons.org (Boa Dragon) wrote:

>
> If the U7 programmers would show up, they would probably save the
> Exult team a lot of time...

No kidding! Like explaining why the initial 'npc.dat' file specifies 5
mages in the same exact location in the room atop Dungeon Despise. I
have, in fact, exchanged emails with former Origin employees, but none
could (or would) provide any information about the game.

Of course, I'd prefer to get help with EA/Origin's permission, as Exult
is currently a complete clean-room project.

Joseph Morris

unread,
Oct 20, 2000, 3:00:00 AM10/20/00
to
Jason Ely wrote:
>
> The map is basically a record file..
>
> The FLX format contains a header and data follows...
>

[snip]

> -Jason Ely (former developer on Ultima 8)

Wow! Do you know anything about the dos extender used by U8?
The nature of the 'Kernel Hacking' by John Watson?

The interest is, of course, why it won't work under Windows..

>

--
JP Morris - aka DOUG the Eagle (Dragon) -=UDIC=- do...@it-he.org
Fun things to do with the Ultima games (http://www.it-he.org)
Developing a U6/U7 clone (http://fly.to/ire)
d+++ e+ N+ T++ Om U1234!56!7'!S'!8!9!KA u++ uC+++ uF+++ uG---- uLB----
uA--- nC+ nR---- nH+++ nP++ nI nPT nS nT wM- wC- y a(YEAR - 1976)

Jason Ely

unread,
Oct 20, 2000, 3:00:00 AM10/20/00
to
The DOS extender was a Phar-Lap 16bit extender. It was a real POS. It would
corrupt 32bit registers upon the execution of interrupts. Tony Zurovec wrote
this code called "Spanky" which forced Pharlap to be 32bit register friendly
by hooking all interrupts before hand and saving the upper 16 bits of each
register. It was a real piece of work! =)

The reason it doesn't work under windows is because Spanky works at Ring
Level 0 which Windows doesn't allow. We had to do this to preserve the 32
bit registers for the graphics routines and optimizations and such.

-Jason Ely

"Joseph Morris" <j...@it-he.org> wrote in message
news:39F0A6A2...@it-he.org...

Jason Ely

unread,
Oct 20, 2000, 3:00:00 AM10/20/00
to
Sure does... If you can find them. =)

There is no law preventing us from giving out file formats.... We published
all the formats for Crusader after we shipped No Regret.

"Holtzmann" <holt...@my-deja.com> wrote in message

news:8sq0di$g8k$1...@nnrp1.deja.com...

Fortran Dragon

unread,
Oct 20, 2000, 3:00:00 AM10/20/00
to
My glass typewriter shows Jason Ely typing...

> Sure does... If you can find them. =)
>
> There is no law preventing us from giving out file formats.... We published
> all the formats for Crusader after we shipped No Regret.

Wasn't Crusader based on the U8 engine? If it was, were the file
formats significantly altered?

--

Fortran Dragon -==(UDIC)==-
Hidalgo Trading Company: <http://home.kc.rr.com/hidalgo/>
rgcu.* FAQ: <http://home.kc.rr.com/hidalgo/faq/rgcudfaq.html>

Joseph Morris

unread,
Oct 21, 2000, 3:00:00 AM10/21/00
to
Jason Ely wrote:
>
> The DOS extender was a Phar-Lap 16bit extender. It was a real POS. It would
> corrupt 32bit registers upon the execution of interrupts. Tony Zurovec wrote
> this code called "Spanky" which forced Pharlap to be 32bit register friendly
> by hooking all interrupts before hand and saving the upper 16 bits of each
> register. It was a real piece of work! =)
>
> The reason it doesn't work under windows is because Spanky works at Ring
> Level 0 which Windows doesn't allow. We had to do this to preserve the 32
> bit registers for the graphics routines and optimizations and such.

I was nearly right, then. I thought they had mutated it into a full 32-bit
extender..

>
> -Jason Ely

Jason Ely

unread,
Oct 21, 2000, 3:00:00 AM10/21/00
to
Well it wasn't fully 32 bit. We still lost all 32bit registers in the
debugger. =(


"Joseph Morris" <j...@it-he.org> wrote in message

news:39F19309...@it-he.org...

Jason Ely

unread,
Oct 21, 2000, 3:00:00 AM10/21/00
to
They shared some of the same object code and display list code. After that,
most sections were rewritten from scratch.

-Jason Ely

"Fortran Dragon" <xy...@kc.rr.com> wrote in message
news:MPG.145a8babb...@news.alt.net...

Fortran Dragon

unread,
Oct 21, 2000, 3:00:00 AM10/21/00
to
My glass typewriter shows Jason Ely typing...
> They shared some of the same object code and display list code. After that,
> most sections were rewritten from scratch.

So it might be worth the effort to look the Crusader docs as an aid
to decoding the U8 files?

Jason Ely

unread,
Oct 21, 2000, 3:00:00 AM10/21/00
to
Is some respects yes. The map files are similar though we added fields in
the object structure. The way contained objects were stored are NOT the same
as in Ultima 8.


"Fortran Dragon" <xy...@kc.rr.com> wrote in message

news:MPG.145b86c05...@news.alt.net...

Fortran Dragon

unread,
Oct 21, 2000, 3:00:00 AM10/21/00
to
My glass typewriter shows Jason Ely typing...
> Is some respects yes. The map files are similar though we added fields in
> the object structure. The way contained objects were stored are NOT the same
> as in Ultima 8.

Thanks for the information!

Voyd

unread,
Oct 22, 2000, 3:00:00 AM10/22/00
to

"Jason Ely" <jason@_nospam_asylumsoft.com> wrote in message
news:8snhlr$jak$1...@news.jump.net...

>
> The FLX format contains a header and data follows...

I've often thought about a similar map-viewer project. Hmm... this would
definitely come in handy someday. Thanks!

> -Jason Ely (former developer on Ultima 8)

Jason, I'm not sure if you would have had access to this information as a
developer, but I would be very interested in learning what we could have
expected from the Lost Vale. Any info, plot or otherwise, would be very
welcome. :)

--
- Michael C. Maggio
Voyager Dragon, -=(UDIC)=-
Homepage http://www.voyd.net/
U3 EGA http://ultima3.voyd.net/
---------------------------------------------------------------
d++ e+ N++ T- Om+ UK1!2!3!4!5!6!A!7'!L!S'!8!9!W!M!O
u++ uC+++ uF- uG++ uLB uA+ nC+ nR nH+
nP nI nPT nS+ nT- wM- o+ oA+ oE y a22


Matthew Duncan

unread,
Oct 23, 2000, 3:00:00 AM10/23/00
to
In article <MPG.145b86c05...@news.alt.net>,

Fortran Dragon <xy...@kc.rr.com> wrote:
>My glass typewriter shows Jason Ely typing...
>> They shared some of the same object code and display list code. After that,
>> most sections were rewritten from scratch.
>
> So it might be worth the effort to look the Crusader docs as an aid
>to decoding the U8 files?

Is information on the Crusader file formats listed somewhere in the web?
I'd be interested too. :)

Ram Dragon

--
----------------------------------------------
Matthew Duncan MA -==(UDIC)==-
Department of Psychology University of Toronto
100 St. George ST Toronto Ontario

Jason Ely

unread,
Oct 23, 2000, 3:00:00 AM10/23/00
to
I can post some of that information...

"Matthew Duncan" <dun...@psych.utoronto.ca> wrote in message
news:8t1k0v$em3$1...@www.math.toronto.edu...

Boa Dragon

unread,
Oct 23, 2000, 3:00:00 AM10/23/00
to
jeff_f...@my-deja.com has returned to fill the world with eternal
darkness...

>Of course, I'd prefer to get help with EA/Origin's permission, as Exult


>is currently a complete clean-room project.

I guess it's not your fault if a developer wants to help?

*Boa

Jason Ely

unread,
Oct 23, 2000, 3:00:00 AM10/23/00
to
EA does not copyright data structures. Anybody can reverse engineer them. EA
will not lose money in any way shape or form if some of the public knows the
data formats of a game. Id release data structures and tools to their games,
did they lose money? Not really, if anything it can help put some life into
a project that is dead.

There is no point in going to Origin for information since they no longer
have the source code archived at all and nobody remaining at Origin that has
U7 source code. I was given a copy of it when I was on Ultima 8. My CD was
misplaced and I have not been able to find it. =(

There is only one other person on this planet that I know of who has U7
source code but I cannot give his name without his permission. He does not
work at Origin anymore. =(


"Boa Dragon" <b...@ultima-dragons.org> wrote in message
news:39f32411...@nntpserver.swip.net...

Dominus Dragon

unread,
Oct 24, 2000, 3:00:00 AM10/24/00
to
jason@_nospam_asylumsoft.com (Jason Ely) wrote in <8t31cn$lbn$1
@news.jump.net>:

>There is only one other person on this planet that I know of who has U7
>source code but I cannot give his name without his permission. He does not
>work at Origin anymore. =(

But could you contact him and ask?
I think I speak for everyone that your name and that of the other one would
go into "the book of counted heroic acts" in the rgcug (even if you names
should not be mentioned they will remain in our hearts - quite cheesy that
one:-)).
--
Dominus Dragon
http://Beam.To/Dominik/
Yapp's Basic Fact:
If a thing cannot be fitted
into something smaller than itself,
some dope will do it.

pointed...@my-deja.com

unread,
Oct 24, 2000, 3:00:00 AM10/24/00
to
Jason Ely wrote:

> EA does not copyright data structures. Anybody can reverse engineer
> them. EA will not lose money in any way shape or form if some of the
> public knows the data formats of a game. Id release data structures
> and tools to their games, did they lose money? Not really, if anything
> it can help put some life into a project that is dead.

Well, I guess file formats and data structures can't be copyrighted, but
source code can. (see below)

> There is no point in going to Origin for information since they no
> longer have the source code archived at all and nobody remaining at
> Origin that has U7 source code.

There may be no point in asking EA (not Origin) for the U7 source code,
but it might be a good idea to ask them to open-source U7. See below for
an explanation.

> I was given a copy of it when I was on Ultima 8. My CD was misplaced
> and I have not been able to find it. =(

Since Origin gave you the U7 source, did they also give you the source
for U8? If so, do you still have it?

> There is only one other person on this planet that I know of who has
> U7 source code but I cannot give his name without his permission. He
> does not work at Origin anymore. =(

I don't think we need to know his name. All we need is the source :)
Seriously though: If EA decided to open-source U7, that person could
make it available for download. And to be honest, I don't see why EA
shouldn't open-source U7. If they didn't bother to keep copies of the
source, they can't have much commercial interest in it.

You're probably wondering why I think the U7 source code is so
important. Well, if you were an Ultima Dragon, you'd understand...

--
Disappointed Dragon
-=(UDIC)=-

PS: Please ask the guy who still has the U7 source to make backup
copies, in case he ever "misplaces" his CD ;-)

Jason Ely

unread,
Oct 24, 2000, 3:00:00 AM10/24/00
to
I do still have U8 source but that is not something I can or will share. I
will give you guys information on data structures and such..

EA cannot make U7 open source since they DO NOT have the source code.

Even if U7 source was made public it is so ugly and cryptic that it would be
better to rewrite it. U7 was the FIRST attempt at C++ at Origin. It is
really a gross collection of half C and hacked C++ and random Assembler. It
used Real Big Mode (ala Voodoo Memory Manager) which in no way works with
Windows. They also used an overlay system that was extremely ugly. They
placed random bits of code in various overlay sections to help reduce overly
caching hits. So you have functions relating to one part of the game that
are scattered though multiple modules.


<pointed...@my-deja.com> wrote in message
news:8t4grk$fba$1...@nnrp1.deja.com...

Matthew Duncan

unread,
Oct 24, 2000, 3:00:00 AM10/24/00
to
That would be excellent! Thanks!

Ram Dragon

In article <8t1ntu$r2b$1...@news.jump.net>,

jeff_f...@my-deja.com

unread,
Oct 24, 2000, 3:00:00 AM10/24/00
to
In article <8t31cn$lbn$1...@news.jump.net>,

"Jason Ely" <jason@_nospam_asylumsoft.com> wrote:
> EA does not copyright data structures. Anybody can reverse engineer
them. EA
> will not lose money in any way shape or form if some of the public
knows the
> data formats of a game.

I could live without source code, but here are a few things that the
Exult project could REALLY benefit from:

1. Data structures in 'weapons.dat'.
2. Data structures in 'ammo.dat' file.
3. Description of opcodes used in Usecode intrinsics 1 and 2 (although
we've figured out about 3/4 of them already).
4. Data structures in 'npc.dat' (also about 3/4 known now).
5. Algorithm used to figure 'hit points' during combat.
6. Method for associating the 'dead body' shape/frame with a given
NPC/monster shape.
7. Full description of eggs (although I think we've got about 95% of
this).

Okay, I guess that's more than a few! BTW, I've been in contact with an
EA/Origin employee, trying to convince her to distribute Exult in some
way. Haven't gotten anywhere yet...

Matthew Duncan

unread,
Oct 24, 2000, 3:00:00 AM10/24/00
to
In article <8FD77C637gi...@195.34.133.35>,

Dominus Dragon <Gi...@bluewin.de> wrote:
>jason@_nospam_asylumsoft.com (Jason Ely) wrote in <8t31cn$lbn$1
>@news.jump.net>:
>
>>There is only one other person on this planet that I know of who has U7
>>source code but I cannot give his name without his permission. He does not
>>work at Origin anymore. =(
>
>But could you contact him and ask?
>I think I speak for everyone that your name and that of the other one would
>go into "the book of counted heroic acts" in the rgcug (even if you names
>should not be mentioned they will remain in our hearts - quite cheesy that
>one:-)).

I concure.

*giggle*

Another mystery person (Dragon?) helping out the U7 cause. This is fun!

jeff_f...@my-deja.com

unread,
Oct 24, 2000, 3:00:00 AM10/24/00
to
In article <8t4i2d$d9t$1...@news.jump.net>,
"Jason Ely" <jason@_nospam_asylumsoft.com> wrote:

> Even if U7 source was made public it is so ugly and cryptic that it
would be
> better to rewrite it.

We have rewritten it:-) We're about to do a first 'alpha' release where
you can play through the entire game. You can even get the source code
at exult.sourceforge.net. But, as I noted in an earlier article, there
are some pieces of information that aren't known yet.

Jason Ely

unread,
Oct 24, 2000, 3:00:00 AM10/24/00
to
I'll write some people that I know and see if I can get any information for
you..


<jeff_f...@my-deja.com> wrote in message
news:8t4j91$hi9$1...@nnrp1.deja.com...
> In article <8t31cn$lbn$1...@news.jump.net>,


> "Jason Ely" <jason@_nospam_asylumsoft.com> wrote:
> > EA does not copyright data structures. Anybody can reverse engineer
> them. EA
> > will not lose money in any way shape or form if some of the public
> knows the
> > data formats of a game.
>
> I could live without source code, but here are a few things that the
> Exult project could REALLY benefit from:
>
> 1. Data structures in 'weapons.dat'.
> 2. Data structures in 'ammo.dat' file.
> 3. Description of opcodes used in Usecode intrinsics 1 and 2 (although
> we've figured out about 3/4 of them already).
> 4. Data structures in 'npc.dat' (also about 3/4 known now).
> 5. Algorithm used to figure 'hit points' during combat.
> 6. Method for associating the 'dead body' shape/frame with a given
> NPC/monster shape.
> 7. Full description of eggs (although I think we've got about 95% of
> this).
>
> Okay, I guess that's more than a few! BTW, I've been in contact with an
> EA/Origin employee, trying to convince her to distribute Exult in some
> way. Haven't gotten anywhere yet...
>
>

Jason Ely

unread,
Oct 24, 2000, 3:00:00 AM10/24/00
to
Actually the U8 source code is fairly well written. It does have its ugly
parts, but it was well engineered.


<pointed...@my-deja.com> wrote in message
news:8t5bic$69i$1...@nnrp1.deja.com...


> Jason Ely wrote:
>
> > I do still have U8 source but that is not something I can or will
> > share.
>

> It's probably so ugly and cryptic that we wouldn't want it anyway. ;-)


>
> > EA cannot make U7 open source since they DO NOT have the source code.
>

> What I MEANT when I used the word "open-source" (and I don't know if
> this is correct usage of the term) was that EA might issue an official
> statement that goes something like this:
> "Even though the U7 source code is no longer in our possession, we know
> that there is at least one person who still owns a copy, and we grant
> that person permission to freely distribute said source code."
>
> > It [U7] used Real Big Mode (ala Voodoo Memory Manager) which in no
> > way works with Windows.
>
> http://members.iinet.net.au/~rsd/U7inWindows.html
>
> --
> Disappointed Dragon
> -=(UDIC)=-

pointed...@my-deja.com

unread,
Oct 24, 2000, 9:04:15 PM10/24/00
to

jeff_f...@my-deja.com

unread,
Oct 25, 2000, 3:00:00 AM10/25/00
to
In article <8t5k4i$s8q$1...@news.jump.net>,

"Jason Ely" <jason@_nospam_asylumsoft.com> wrote:
> Actually the U8 source code is fairly well written. It does have its
ugly
> parts, but it was well engineered.

Say... Is the interface to DOS fairly modular? That is, is the
event-handling and blitting mostly separate from the rest of the
engine? If so, it might be a reasonable project to update it using
SDL. That would make it portable to Windows, Linux, and even the Mac.

Jason Ely

unread,
Oct 25, 2000, 3:00:00 AM10/25/00
to
Yes, however the code assumes 16 bit points, 16 bit integers and so on. The
game was totally designed around a 16bit environment. So much would have to
be rewritten to get it working in Windows/Linux. I actually ported part of
the Crusader engine to Windows awhile back. With me knowing the code inside
and out it still took a month or so just to get something running.

Ultima 8 would be insane to get running in windows, believe me I have
thought about it many times. The entire savegame system would have to be
redesigned since each object SAVED the virtual function table (No, not in my
code, I would NEVER do such a dumb thing) since in 16 bit the VFT is a
relative offset that is the same everytime the data is loaded under the same
executable.


<jeff_f...@my-deja.com> wrote in message
news:8t70u4$grn$1...@nnrp1.deja.com...


> In article <8t5k4i$s8q$1...@news.jump.net>,
> "Jason Ely" <jason@_nospam_asylumsoft.com> wrote:
> > Actually the U8 source code is fairly well written. It does have its
> ugly
> > parts, but it was well engineered.
>
> Say... Is the interface to DOS fairly modular? That is, is the
> event-handling and blitting mostly separate from the rest of the
> engine? If so, it might be a reasonable project to update it using
> SDL. That would make it portable to Windows, Linux, and even the Mac.
>
>

jeff_f...@my-deja.com

unread,
Oct 26, 2000, 11:59:11 AM10/26/00
to
In article <8t877m$97a$1...@news.jump.net>,

"Jason Ely" <jason@_nospam_asylumsoft.com> wrote:
> Yes, however the code assumes 16 bit points, 16 bit integers and so
on. The
> game was totally designed around a 16bit environment.

Yes, that would make for all sorts of problems. I thought most DOS
development had gone to 32-bit DOS extenders by the time it was written.

So much would have to
> be rewritten to get it working in Windows/Linux. I actually ported
part of
> the Crusader engine to Windows awhile back. With me knowing the code
inside
> and out it still took a month or so just to get something running.

Actually, a month doesn't sound so bad... I've been working on Exult for
over two years, with several other developers contributing during the
last.

>
> The entire savegame system would have to be
> redesigned since each object SAVED the virtual function table (No, not
in my
> code, I would NEVER do such a dumb thing) since in 16 bit the VFT is a
> relative offset that is the same everytime the data is loaded under
the same
> executable.

Sounds like they were using serialization to do the save/restores, and
found a clever trick to make it easier.

Anyway, the subject is moot without EA/Origin's permission. My thought
was that if the person who started this thread writes a map-editor, and
if someone else (maybe me) writes a Usecode compiler (assuming U8 uses
something similar to U7's and that the specification is available), then
we'd have a nice system for writing games. But it wouldn't be worth the
effort if it only runs on DOS.

Etienne Bruere

unread,
Oct 26, 2000, 1:29:44 PM10/26/00
to
Jason Ely <jason@_nospam_asylumsoft.com> a écrit dans le message :
8t877m$97a$1...@news.jump.net...

> Ultima 8 would be insane to get running in windows, believe me I have
> thought about it many times. The entire savegame system would have to be

> redesigned since each object SAVED the virtual function table (No, not in
> my code, I would NEVER do such a dumb thing) since in 16 bit the VFT
> is a relative offset that is the same everytime the data is loaded under
the
>same executable.

If i understand, you're using object programming. Each model has it's
functions and a VFT. A table stores the addresses of the VFTs for each
model. Each object has a model, but instead of storing the model's index
you store a copy of the model's VFT.
( obviously to speed up the game with direct calls and load entire blocs of
data without having to know what is inside, just the size )
And if the source is recompiled in 32 bits, VFTs are 32 bit absolute
pointers and this method does not work.

--
Etienne Bruere

Jason Ely

unread,
Oct 26, 2000, 3:59:04 PM10/26/00
to
*ding* *ding* =)

Right, because in 16bit the VFT pointers are relative offsets. =)

Actually the only part of the game that used this type of method for saving
was the games multitasking kernel. It had an array of process pointers. The
kernel would run through the array and save each process in its entirety
along with calling a Save method that would save any pointer data attached
to that process. It was basically doing this:

BaseProcess *pProcess;
int index;
File file;

file.Open("process.dat", EN_OM_CREATE );

for( index = 0; index < MAX_PROCESSES; index++ )
{
pProcess = m_process_array[index];
if( pProcess && pProcess->IsValid() )
{
file.Write( pProcess, pProcess->GetProcessSize() );
pProcess->SaveOtherData( &file );
}
}

file.Close();

That is not exact code, but the same concept...
I never agreed to this concept. The primary issue with this method in Ultima
8 AND Crusader was that whenever a change was made to the .EXE file, it
invalidated all savegames since the VFT offsets have shifted.

-Jason Ely

"Etienne Bruere" <nospamT...@wanadoo.fr> wrote in message
news:8t9pf5$nub$1...@wanadoo.fr...

jeff_f...@my-deja.com

unread,
Oct 26, 2000, 8:01:26 PM10/26/00
to
In article <8ta34b$fdt$1...@news.jump.net>,
"Jason Ely" <jason@_nospam_asylumsoft.com> wrote:
> *ding* *ding* =)

> I never agreed to this concept. The primary issue with this method in
Ultima
> 8 AND Crusader was that whenever a change was made to the .EXE file,
it
> invalidated all savegames since the VFT offsets have shifted.

That must have made life somewhat difficult for the people testing the
game. Although if I recall (it being only 2 years ago), Ultima 8 was a
far more stable game than U7.

Anyway, it wouldn't be that terrible to rewrite the save/restore. On
save, you'd have to write a unique ID for the class of the object being
written; on input, you'd use that ID to reconstruct the object. It's
the sort of thing done in MFC's serialization code.

Etienne Bruere

unread,
Oct 27, 2000, 8:41:50 AM10/27/00
to
Jason Ely <jason@_nospam_asylumsoft.com> a écrit dans le message :
8ta34b$fdt$1...@news.jump.net...

> I never agreed to this concept. The primary issue with this method in
Ultima
> 8 AND Crusader was that whenever a change was made to the .EXE file, it
> invalidated all savegames since the VFT offsets have shifted.

Yes, and this means that you must have an editor generating a source data
format using indexes and a compiler that can extract VFTs from the .EXE
file to replace indexes with correct VFTs. And each time you make a change
in the .EXE, you have to recompile the data to test the game. ( a lot of
wasted
time )


--
Etienne Bruere

Joseph Morris

unread,
Oct 27, 2000, 1:53:30 PM10/27/00
to
jeff_f...@my-deja.com wrote:
>
> That must have made life somewhat difficult for the people testing the
> game. Although if I recall (it being only 2 years ago), Ultima 8 was a
> far more stable game than U7.
>
> Anyway, it wouldn't be that terrible to rewrite the save/restore. On

You would have to write a converter. As far as I can see, the game's
default state is stored in savegame.000 (or whatever). If you can
start the game without that file, then obviously I'm wrong.

> save, you'd have to write a unique ID for the class of the object being
> written; on input, you'd use that ID to reconstruct the object. It's
> the sort of thing done in MFC's serialization code.
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.

--
JP Morris - aka DOUG the Eagle (Dragon) -=UDIC=- do...@it-he.org
Fun things to do with the Ultima games (http://www.it-he.org)
Developing a U6/U7 clone (http://fly.to/ire)
d+++ e+ N+ T++ Om U1234!56!7'!S'!8!9!KA u++ uC+++ uF+++ uG---- uLB----
uA--- nC+ nR---- nH+++ nP++ nI nPT nS nT wM- wC- y a(YEAR - 1976)

Jason Ely

unread,
Oct 27, 2000, 1:45:14 PM10/27/00
to
That WOULD have been a good idea, however no Kernel data was stored in
initial save game. =(

The whole thing boils down to Saving the VFT is a bad idea in general. It
should never have been done, but to argue that with the author of that piece
of code was pointless. There was a much better and more correct way to save
the process data.


"Joseph Morris" <j...@it-he.org> wrote in message
news:39F9C11A...@it-he.org...

0 new messages