Scott Adams - Save to Disk?

Discussion, Reviews & High-scores

Moderator: Moderators

User avatar
eslapion
ultimate expander
Posts: 5458
Joined: Fri Jun 23, 2006 7:50 pm
Location: Canada
Occupation: 8bit addict

Re: Scott Adams - Save to Disk?

Post by eslapion »

Mike wrote:
eslapion wrote:I have a preference for "automated" solutions.
If anything, you're proposing a hardware solution. :lol:
Hummm... I don't think so.

I could just write a simple BASIC program you could run before starting the Scott Adams game which is normally in ROM and that would do the job.

I base this assumption on the list of vectors found at $0314 to $0333. In there are vector labelled "Link to load RAM" and "Link to save RAM". These appear to be used when you JSR $FFD8 or JSR $FFD5. You can redirect the vectors at $0330 and $0332 to a new complete routine.

The BASIC program changes the vectors and "pokes" the new routines in the $02A1 - $02FF area.

The next question I asked myself is how do you handle the file name then ?

The answer I found is that the cursor and editing system still works when you play a Scott Adams game and so at any point you can clear the screen and just press enter and it will just tell you it didn't understand what you asked for and request again "What shall I do now ?"

So... clear the screen, type a series of 12 characters in the top left corner of the screen that will be used as file name, just move the cursor down once or twice, press enter and disregard the error message. At the request "What shall I do now ?" type SAVE GAME(RETURN)

Voilà...

Restoring a saved game is a case of knowing the method...
When you start the Scott Adams game, it will immediately ask you if you want to restore a saved game. It so happens the top line is blank.

First move the cursor to the top left cell, Yes you can simply type the HOME button, type the file name that contains the game you want to restore then move the cursor back down to the line where is was originally, type Y(RETURN).
Be normal.
User avatar
Mike
Herr VC
Posts: 4831
Joined: Wed Dec 01, 2004 1:57 pm
Location: Munich, Germany
Occupation: electrical engineer

Re: Scott Adams - Save to Disk?

Post by Mike »

eslapion wrote:I could just write a simple BASIC program you could run before starting the Scott Adams game which is normally in ROM and that would do the job.
Talk is cheap. Francois, do it and write the patch!
I base this assumption of the list of vectors found at $0314 to $0333. In there are vector labelled "Link to load RAM" and "Link to save RAM". These appear to be used when you JSR $FFD8 or JSR $FFD5. You can redirect the vectors at $0330 and $0332 to a new complete routine.
Indeed. That does most probably even cover all five adventures with a single patch and could be combined with a nice selection menu.
The next question I asked myself is how do you handle the file name then?
What's wrong about using the generic names "SAVEGAME.DAT" and "SAVEGAME.BAK" as I suggested in an earlier post? Possibly expanded with a digit 1..5 to have a savegame for each of the 5 adventures (surely the savegame data isn't exchangeable) ...

...

Look, in the time we're discussing this here, I could already have completed the patch. I just *don't* *want* to write one. It's your turn to deliver.

Unlike you I don't have to prove I "could" write it.
User avatar
eslapion
ultimate expander
Posts: 5458
Joined: Fri Jun 23, 2006 7:50 pm
Location: Canada
Occupation: 8bit addict

Re: Scott Adams - Save to Disk?

Post by eslapion »

Mike wrote:What's wrong about using the generic names "SAVEGAME.DAT" and "SAVEGAME.BAK" as I suggested in an earlier post? Possibly expanded with a digit 1..5 to have a savegame for each of the 5 adventures (surely the savegame data isn't exchangeable) ...
I thought of that but there is a problem. The first time you save it will work ok but then you have to save with replace afterwards. Then you have to use "@savegame.dat".

Also, if you want to save games at different stages so you can go back if you made a mistake (is that even possible with Scott Adams games ?) then you'll also have a problem.

If you go the other way around and always "save with replace" then the very first time I think you'll get an error message because there is nothing to replace. I could be wrong about that.
Look, in the time we're discussing this here, I could already have completed the patch. I just *don't* *want* to write one. It's your turn to deliver.

Unlike you I don't have to prove I "could" write it.
Oh my! See if I care... I'm here for fun.

If you specifically indicate what I said can be done as strictly impossible to do then you'll get my attention.

Otherwise...
Image
Be normal.
User avatar
Mike
Herr VC
Posts: 4831
Joined: Wed Dec 01, 2004 1:57 pm
Location: Munich, Germany
Occupation: electrical engineer

Re: Scott Adams - Save to Disk?

Post by Mike »

eslapion wrote:I thought of that but there is a problem. The first time you save it will work ok but then you have to save with replace afterwards. Then you have to use "@savegame.dat".
Francois, just take a look at an earlier post of mine in this thread. I suppose you missed it:
Mike wrote:P.S.
eslapion wrote:if you want to save to a disk drive, you'll have to make sure you either save under an unused filename or use the overwrite option.
You know the "@" drive command for save-with-replace is bugged on CBM disk drives and can lead to loss of data? Not because of the issue when not enough room is there for the new file, but because the remove procedure for the old file sometimes frees the wrong blocks.

If you do it on your own disks, with your own drives, that's your own problem.

It will annoy a lot of people if it's put in a released program. Really no good idea to even suggest its use.

The Right Thing to do is: either first scratch the old savegame (with the "S" DOS command) and then save; or - for the more paranoid ;) - with a savegame and a backup of it: (step 1) first scratch a possible remnant of the backup, then (step 2) rename SAVEGAME.DAT to SAVEGAME.BAK, and finally (step 3) save a new SAVEGAME.DAT.
Also, if you want to save games at different stages so you can go back if you made a mistake (is that even possible with Scott Adams games ?) then you'll also have a problem.
It's a game! You could always start from scratch. Besides, two generations of savegames as I proposed should suffice (you'd have to manually rename the *.BAK file to *.DAT though).

Regards your cat image...
eslapion wrote:If you specifically indicate what I said can be done as strictly impossible to do then you'll get my attention.
... the only fact that keeps me to put you in the illustrious ranks of Legacy, IsaacKuo, MRaider/FD22, unebonnevie and Kakemoms is, that you actually produce works, in the hardware area and are confident enough to sell them.

But when it comes to programming, you're a total novice. I do not expect to see a working version of the patch from you anytime soon.

Prove me false. :P
User avatar
eslapion
ultimate expander
Posts: 5458
Joined: Fri Jun 23, 2006 7:50 pm
Location: Canada
Occupation: 8bit addict

Re: Scott Adams - Save to Disk?

Post by eslapion »

Mike wrote:... the only fact that keeps me to put you in the illustrious ranks of Legacy, IsaacKuo, MRaider/FD22, unebonnevie and Kakemoms is, that you actually produce works, in the hardware area and are confident enough to sell them.
Poor me... I am unworthy of your high standards...
But when it comes to programming, you're a total novice. I do not expect to see a working version of the patch from you anytime soon.

Prove me false. :P
1. I am a novice, never denied it and somebody else had to create the menu for the Behr-Bonz - I feel very comfortable with the fact I am a lousy programmer, my education is related to energy production, transport and distribution... very different stuff.

2. I do not play Scott Adams games. I just like to learn new stuff and this thread seemed interesting... initially.

3. You're quite right, you will not see a patch from me anytime soon. I just like to suggest avenues of solution which you did indicate are in the realm of the feasible and that suffices me plenty.

Now, if you will allow me, I have to get back to sleep.

Added edit:
You know the "@" drive command for save-with-replace is bugged on CBM disk drives and can lead to loss of data? Not because of the issue when not enough room is there for the new file, but because the remove procedure for the old file sometimes frees the wrong blocks.

If you do it on your own disks, with your own drives, that's your own problem.

It will annoy a lot of people if it's put in a released program. Really no good idea to even suggest its use.
It works ok on the 1571, 1581 (with the latest firmware and JiffyDOS) and uIEC.
Be normal.
User avatar
Mike
Herr VC
Posts: 4831
Joined: Wed Dec 01, 2004 1:57 pm
Location: Munich, Germany
Occupation: electrical engineer

Re: Scott Adams - Save to Disk?

Post by Mike »

eslapion wrote:[save-with-replace] works ok on the 1571, 1581 (with the latest firmware and JiffyDOS) and uIEC.
Doesn't matter.

As long as there's a single drive still in use with a bugged @-command (and I strongly doubt the bug had been corrected in the 1571!) there could always be the occasional user being affected by the bug. You just don't have any control about that.

Only way would be to put a big sticker on the box with the caption "DON'T USE THIS SOFTWARE ON ANY OLD CBM DRIVES, BECAUSE THE PROGRAMMER DIDN'T KNOW HOW TO AVOID THE SAVE-WITH-REPLACE BUG!" - an interesting way to flag one's own incompetence. :lol:


Back to this one:
1. I am a novice, never denied it and somebody else had to create the menu for the Behr-Bonz - I feel very comfortable with the fact I am a lousy programmer, my education is related to energy production, transport and distribution... very different stuff.
I strongly doubt that as engineer you can get away in that field without any advanced programming skills.

You also should know the concept of lifelong learning.

I am fully aware that we are cultivating a spare-time activity here in Denial. Suppose you actually take the time to write this patch: that would probably give you the insight, that writing non-trivial programs is not as easy as it looks sometimes...
User avatar
eslapion
ultimate expander
Posts: 5458
Joined: Fri Jun 23, 2006 7:50 pm
Location: Canada
Occupation: 8bit addict

Re: Scott Adams - Save to Disk?

Post by eslapion »

Mike wrote:As long as there's a single drive still in use with a bugged @-command (and I strongly doubt the bug had been corrected in the 1571!) there could always be the occasional user being affected by the bug. You just don't have any control about that.
I believe you did specify in one of the above posts this is only for one or two people?

If so, I guess this is not likely to generate a massive recall over risk of injury or death... :roll:
Only way would be to put a big sticker on the box with the caption "DON'T USE THIS SOFTWARE ON ANY OLD CBM DRIVES, BECAUSE THE PROGRAMMER DIDN'T KNOW HOW TO AVOID THE SAVE-WITH-REPLACE BUG!" - an interesting way to flag one's own incompetence. :lol:
Image
and then...
Image
Anyways, I clearly said my solution was to use the top left 12 characters on screen as filename. Anyone would then be free to use or not use the character '@' to enable or not a save with replace...
I strongly doubt that as engineer you can get away in that field without any advanced programming skills.
Unfortunately, I have never found how to program a 1 kiloamp current sensor clamp or 40kV scope probes. The scope itself can't really be programmed but I am very familiar with the required settings.
You also should know the concept of lifelong learning.
I mostly know the difference between stuff I learn for fun and stuff I learn to earn a living.

For most of what I do for a living, I use an antiquated TI-92+ calculator to get the information I need to do my job. I can't really call that programming. I use programs made by other people for this machine.
I am fully aware that we are cultivating a spare-time activity here in Denial. Suppose you actually take the time to write this patch: that would probably give you the insight, that writing non-trivial programs is not as easy as it looks sometimes...
Please see my offer in the off-topic section.

I think I am informed enough on the subject to know certain things are worth paying for.

As for your comment about having the ability to do this patch at anytime you like, I assume you're an informed adult and you know what you should do or not do with your available time. I think it would be wise of you to consider it may be the same with other people. :wink:
Be normal.
User avatar
Mike
Herr VC
Posts: 4831
Joined: Wed Dec 01, 2004 1:57 pm
Location: Munich, Germany
Occupation: electrical engineer

Re: Scott Adams - Save to Disk?

Post by Mike »

eslapion wrote:I assume you're an informed adult and you know what you should do or not do with your available time.
I have a good sense whether spending my time with someone ultimately is to the benefits of both.

Your two other cat photographs just show, that you'd not keep up a useful interest. That's your problem, not mine.

Just to be clear: this is my last post in this thread.
User avatar
eslapion
ultimate expander
Posts: 5458
Joined: Fri Jun 23, 2006 7:50 pm
Location: Canada
Occupation: 8bit addict

Re: Scott Adams - Save to Disk?

Post by eslapion »

Mike wrote:Just to be clear: this is my last post in this thread.
You don't seem very much interested in making positive contributions so somehow I suspect this is not exactly a bad thing.

Why don't you ask Bobbi what he thinks ?
...an interesting way to flag one's own incompetence.
Programming is undoubtedly not the only survival skill one should develop in life... :roll:

Added edit: Bobbi says he likes my cats...
Be normal.
Bobbi
Vic 20 Afficionado
Posts: 355
Joined: Thu Oct 13, 2016 11:35 am
Location: Toronto
Occupation: Programmer

Re: Scott Adams - Save to Disk?

Post by Bobbi »

Bobbi says *she* likes your cats :)
User avatar
eslapion
ultimate expander
Posts: 5458
Joined: Fri Jun 23, 2006 7:50 pm
Location: Canada
Occupation: 8bit addict

Re: Scott Adams - Save to Disk?

Post by eslapion »

Bobbi wrote:Bobbi says *she* likes your cats :)
Oops !! :oops:
Be normal.
User avatar
orion70
VICtalian
Posts: 4340
Joined: Thu Feb 02, 2006 4:45 am
Location: Piacenza, Italy
Occupation: Biologist

Re: Scott Adams - Save to Disk?

Post by orion70 »

And Orion says, please drop the cats (I have a bad allergy to their hair), and pretty please, someone patch it! Yep, I'm one of the few interested here :) .
User avatar
eslapion
ultimate expander
Posts: 5458
Joined: Fri Jun 23, 2006 7:50 pm
Location: Canada
Occupation: 8bit addict

Re: Scott Adams - Save to Disk?

Post by eslapion »

@orion70
Mike says I have flagged my own incompetence so I guess I can't possibly make that patch.

He says "I just *don't* *want* to write one" so he won't take care of it either...

Now that I think of it, I have tested all 5 Scott Adams games included on the Behr-Bonz but I never went as far as saving a game and loading it back.
Be normal.
User avatar
orion70
VICtalian
Posts: 4340
Joined: Thu Feb 02, 2006 4:45 am
Location: Piacenza, Italy
Occupation: Biologist

Re: Scott Adams - Save to Disk?

Post by orion70 »

Me, I used to try Adventureland and Pirates Cove a few times, and always found saving the game to a C2N very obsolete :). Also, it was for a period the only reason why I kept a Datassette connected to the VIC.
User avatar
eslapion
ultimate expander
Posts: 5458
Joined: Fri Jun 23, 2006 7:50 pm
Location: Canada
Occupation: 8bit addict

Re: Scott Adams - Save to Disk?

Post by eslapion »

@Bobbi

Since you're the person who originally asked for this, I would ask you what you prefer...

- A modded version of the games which contains the code to save to disk

- A software that intercepts the kernal calls to save/load and has its code in the tape buffer or other areas in the 1st 1k of VIC-20 RAM.

- A patch software that appears in another RAM expansion area

- Something else

There is also the question of how to give a proper filename to the saved file.

It's possible to use the top left most 8 to 16 characters on screen or some form of automated filename system which increments a character at every save.

Let's say you make 7 saves during a play session, you would find files A B C D E F G on disk. The next time you play, you just POKE767,71 (71 is 64 + 7) and then when you load a game, it will load game G and the next save will be H.

If you save games all the way up to Z, then you can delete all the files from A to Y, rename file Z to A and then POEK767,65 (that's 64+1) and start all over from the beginning of the alphabet.

If you want to save games for more than one Scott Adams adventure on the same disk or directory then we could add one letter before the game save identifier.

As such, games sessions would be saved as follows:
- Adventureland games would use filenames "Ax" where x is the game save from A to Z.
- Mission Impossible games would use filenames "Mx" where x is the game save from A to Z.
- Pirate's Cove games would use filenames "Px" where x is the game save from A to Z.
- The Count games would use filenames "Cx" where x is the game save from A to Z.
- Voodoo Castle games would use filenames "Vx" where x is the game save from A to Z.

Any other suggestion ?

Added edit:
On a 15x1 drive which saves games in chronological order, it can be a bit of a mess in the directory but in VICE or SD2IEC devices which sort alphabetically, saved games would be sorted by Scott Adams adventure and by the order in which they are saved.
Be normal.
Post Reply