Page 1 of 1

C64 savegame conversion

Posted: Wed Oct 15, 2014 12:30 pm
by MrPimms
Hello,
I have recently found Oolite, installed, played, got very excited and instantly had a BIG hit of nostalgia remembering my C64 version I used to play as a kid. (I never got to Elite, only Deadly before I stopped playing for various reasons)
This gave me an idea :idea: , so I dug out my original Elite from the loft and found my old savegames, checked them for viability and saved them to my pc, and converted to prg format. So far so good!
So, time for my idea...
Is there any conversion software that will allow me to convert my old C64 savegames to an Oolite version so I can continue playing where I left off (on the C64) but in full glorious Oolite?
:D

Re: C64 savegame conversion

Posted: Wed Oct 15, 2014 12:41 pm
by Zireael
If you can read the legal status, kills and credits from the old save, you could start a new game in Oolite, save immediately and simply edit those values in the savefile.

Re: C64 savegame conversion

Posted: Wed Oct 15, 2014 1:13 pm
by Disembodied
Hi, MrPimms, welcome to the boards! Zireael is correct, but a word of advice: the save file can be edited with a text editor, but DON'T use Notepad, as it adds hidden gubbins which will muck things up. Wordpad is fine, though, I believe.

Re: C64 savegame conversion

Posted: Wed Oct 15, 2014 1:22 pm
by Cody
Aye, welcome aboard! Yes, you could edit your save-file - but where's the satisfaction in that, eh?

Re: C64 savegame conversion

Posted: Thu Oct 16, 2014 3:20 am
by Diziet Sma
G'day MrPimms, and welcome aboard!

Interesting question.. it's something there hasn't really been much call for, to be honest.. (as in, you're the first to ask this question, so far as I'm aware)

I suspect Zireael is right.. the only way forward is probably to extract the key data from the saves, and edit an Oolite game-save accordingly. So the real question becomes, in what format is the data save in the old game-saves, and is it encoded somehow? It may be necessary to use a Hex-Editor to access the data. I can probably help with that if you get stuck.
Disembodied wrote:
Wordpad is fine, though, I believe.
Correct.. and Notepad++ is even better. (all of which assumes you're using some version of Windows, of course.. if not, whatever is your favourite text-editor will be fine)

Re: C64 savegame conversion

Posted: Fri Oct 17, 2014 5:34 pm
by MrPimms
Thanks for the advice, I have notepad++ so shall use that thanks for the tip.
re the C64 prg, I believe it is in assembly after taking a peek, so I shall grab an emulator over the weekend and see what happens when I edit the file :?
May grab a disassembler/assembler too so I can edit the thing.
My main task will be to locate the kill number as having found Ian Bells site it lists the kill number required to achieve a set combat rating.
So, I'm off to grab a cuppa and start locating/downloading some useful software to edit the C64 savegame.
:)

Re: C64 savegame conversion

Posted: Sat Oct 18, 2014 2:39 am
by Diziet Sma
Sounds like you're pretty well equipped to handle the job.. good luck with it.. who knows, maybe you'll be the one to come up with a conversion tool.. :wink:

Re: C64 savegame conversion

Posted: Sat Oct 18, 2014 7:25 am
by maik
MrPimms wrote:
Thanks for the advice, I have notepad++ so shall use that thanks for the tip.
re the C64 prg, I believe it is in assembly after taking a peek, so I shall grab an emulator over the weekend and see what happens when I edit the file :?
May grab a disassembler/assembler too so I can edit the thing.
My main task will be to locate the kill number as having found Ian Bells site it lists the kill number required to achieve a set combat rating.
So, I'm off to grab a cuppa and start locating/downloading some useful software to edit the C64 savegame.
:)
As Dizzy said: a hex editor is probably what you need for the save game. Should be much more straight-forward than disassembling Elite and trying to understand what it saves how and where.

Re: C64 savegame conversion

Posted: Sun Oct 19, 2014 6:28 am
by Tricky
From 8-Bit Software

TAU-86-2 Acorn User Feb 86 Disc Format: 1D Number of Files: 31 Size: 52 k Downloads/views: 214
Hints & Tips: Colour Contrast Tester. Joes Jottings:*SPACK, *PACK, *UNPACK, *SSAVE and *SLOAD commands, Shrink1 and Shrink2 screen size demos. Elite Editor .E-Index. Basic Language Extension.

Load the SSD image into Disc 0 in BeebEm and then in the emulator type...

Code: Select all

LOAD "ELITEED"
RUN
Just press return twice to get the default Jameson savefile.

Gives useful info on what each loacation is for in the Elite savefile. The C64 version is the same from what I can remember.

Addendum: If you type LOAD "E.ELITEED" instead you will get the MODE 6 version which can be run on an Electron emulator.

Re: C64 savegame conversion

Posted: Tue Oct 21, 2014 1:47 pm
by MrPimms
Thanks for the swerve Tricky, I hadn't thought of looking at the beeb, had my C64 blinkers on :lol: that 'TAU-82-2' really helped me crack on.
I believe I have identified the important bits, (particularly the kill count score relating to ratings)
If anyone wants to know how I did it, here is a brief summary:
1. Save the tape audio to pc using WAV-PROG
2. Downloaded 'hoxs64' C64 emulator, DirMaster and 'Elite.d64' game file (with a 'cheat savegame editor' spit,spit! :wink: )
3. Ran game to save a default 'jameson' savegame file for comparison, generated 'cheat' savegames with one change per file to identify which bits relate to rating, legal,kill-score,galaxy-location etc

Finally managed to identify the bits (may be some errors - ok, don't shoot me :? )
AND...
4. Open my 15 savegames to identify which was the last one I used, and noted the relevant data ready to pop in a Oolite savegame -(my last step).

For your info, sorry this will be long winded as don't know how to insert a table into a post
In DirMaster the hex view was displayed in 8 block lines as below;
  • A: 01,02,03,04,05,06,07,08
    B: 01,02,03,04,05,06,07,08
    C: 01,02,03,04,05,06,07,08
    D: 01,02,03,04,05,06,07,08
    E: 01,02,03,04,05,06,07,08
    F: 01,02,03,04,05,06,07,08
    G: 01,02,03,04,05,06,07,08
    H: 01,02,03,04,05,06,07,08
    I: 01,02,03,04,05,06,07,08
    J: ,01,02,03,04,05,06,07
    79 bits total
And now follows the description of each bit referencing the grid above.
  • A1= ???;
    A2= ???;
    A3= Mission no.;
    A4= galaxy_X (ship X co-ord);
    A5= galaxy_Y (ship Y co-ord);
    A6= galaxy id>b1;
    A7= galaxy id>b2;
    A8= galaxy id>b3

    B1= galaxy id>b4;
    B2= galaxy id>b5;
    B3= galaxy id>b6;
    B4= ???;
    B5= credits:(byte3) MSB;
    B6= credits:(byte2);
    B7= credits:(byte1) LSB;
    B8= fuel

    C1= ???;
    C2= ???;
    C3= laser front;
    C4= laser rear;
    C5= laser left;
    C6= laser right;
    C7= ???;
    C8= ???;

    D1= cargo bay size;
    D2= food;
    D3= textiles;
    D4= radioactives;
    D5= slaves;
    D6= liquor;
    D7= luxuries;
    D8= narcotic;

    E1= computer;
    E2= machines;
    E3= alloys;
    E4= firearms;
    E5= furs;
    E6= minerals;
    E7= gold;
    E8= platinum;

    F1= gems;
    F2= alien items;
    F3= ecm=ff;
    F4= fuel scoop=ff;
    F5= ebomb=7f;
    F6= energy unit=01;
    F7= docking pc=ff;
    F8= galaxy_Hyper drive=ff;

    G1= escape pod=ff;
    G2= ???;
    G3= trumbles mission identifier? (got trumbles=0x22;)
    G4= trumble_nos: msb;
    G5= trumble_nos: lsb
    G6= missile quantity;
    G7= legal status;
    G8= ss+ food;

    H1= ss+ textiles;
    H2= ss+ radioactives;
    H3= ss+ slaves;
    H4= ss+ liquor;
    H5= ss+ luxuries;
    H6= ss+ narcotic;
    H7= ss+ computer;
    H8= ss+ machines;

    I1= ss+ alloys;
    I2= ss+ firearms;
    I3= ss+ furs;
    I4= ss+ minerals;
    I5= ss+ gold;
    I6= ss+ platinum;
    I7= ss+ gems;
    I8= ss+ alien_items;

    J1= killscore: ships fractional byte;
    J2= killscore: lsb;
    J3= killscore: msb;
    J4= ???;
    J5= ???;
    J6= ???;
    J7= ???;
Notes on values stored:
credits = $value/10
fuel = $value/10
lasers: pulse = 0x0f, mining = 0x32 , beam = 0x8f, military = 0x97
for extra missile noted that G5: gets set to 0x0b (note: G6:= no. of missiles)
goods (quantity of):- 'ss+'preceding = space station goods
legal status: G7: 0x00=clean, 0x20=offender, 0x40=fugitive
mission: 0x10 = mission1, 0x11 = mission 2
trumbles = G3:0x22, and importantly G4&5: = number of trumbles!
J4,5,6&7 I think are the C64 checksum bits - may be wrong here.

Told you it was long winded, sorry 'bout that. :oops:
I'm putting auto pilot on now while I put kettle on, now where did I put those jaffa cakes...

Re: C64 savegame conversion

Posted: Tue Oct 21, 2014 7:47 pm
by maik
good job! 8)

Re: C64 savegame conversion

Posted: Wed Oct 22, 2014 12:18 am
by Diziet Sma
Seconded.. Right on, Commander! 8)