QB64.org Forum

Active Forums => QB64 Discussion => Topic started by: Daniel3D on September 20, 2021, 08:42:28 am

Title: Project looking for Programmer (I can't do it myself)
Post by: Daniel3D on September 20, 2021, 08:42:28 am
Hi everybody.
I'm Daniel, 41 years old and terrible at programming in any language. (not for lack of trying, Just too Dyslectic)
But I have ideas and I often find someone to build it.

I still play a 1991 DOS race game (stunts) and that has an active (modding) community, but the few programmers there are short on time.
Is there anyone interested with helping in writing part of the new SETUP program for the game.
The basis is already written in Qbasic.

I need a Installer function for DOS. First just for the game (a relative simple copy form source to destination)
Later to be expanded to install and remove mods.
The game supports 32 cars (it came with 11) but we are getting close to 100 now,
we need a tool that can move cars (4 files each, 5 if we include a graphic or metadata) from the game dir to a garage and back.

A lot of information can be found on the forum (forum.stunts.hu)
So if anyone wants to program but is looking for a project.

I apologize if I offended anyone by my shameless request.
I'm just getting frustrated and feeling powerless.

Regards
Daniel
Title: Re: Project looking for Programmer (I can't do it myself)
Post by: SpriggsySpriggs on September 20, 2021, 09:35:31 am
Somebody sure might be able to help you with this. I know I can't. I don't know QBASIC that well and I certainly don't know DOS. We've got plenty of people here on the forum who do. I'm sure Pete or bplus would be interested.
Title: Re: Project looking for Programmer (I can't do it myself)
Post by: bplus on September 20, 2021, 11:25:43 am
Quote
I'm sure Pete or bplus would be interested.

Quote
I need a Installer function for DOS. First just for the game (a relative simple copy form source to destination)
Later to be expanded to install and remove mods.

Have no idea about installers?  Nor do I know old Qbasic ways of doing advanced graphics.

How many lines of code is the QBasic program? Do you want this for DOS? (then I am not interested)

If I see video and some code maybe could we could build it from scratch for QB64.
Title: Re: Project looking for Programmer (I can't do it myself)
Post by: bplus on September 20, 2021, 11:31:48 am
Oh ha! Just looked at forum this is big big project of dedicated people, ha!
Title: Re: Project looking for Programmer (I can't do it myself)
Post by: SpriggsySpriggs on September 20, 2021, 11:42:29 am
Do you want this for DOS? (then I am not interested)

That got me laughing
Title: Re: Project looking for Programmer (I can't do it myself)
Post by: bplus on September 20, 2021, 11:50:36 am
I loved DOS and had great set of Basic tools for it back in early 90's, all gone with 486 computer as well as most my memory of it.
Title: Re: Project looking for Programmer (I can't do it myself)
Post by: Daniel3D on September 20, 2021, 12:27:39 pm
Oh ha! Just looked at forum this is big big project of dedicated people, ha!
O yes, there are some big projects there. We hope to someday port the whole thing to C and modern systems.
For now we are stuck in DOS.

Most big projects take ages. Lack of time the biggest culprit.

The thing I'm trying to get going is small in comparison.
Just hoping to find a enthusiasts who would like to work on it.
Title: Re: Project looking for Programmer (I can't do it myself)
Post by: George McGinn on September 20, 2021, 12:28:59 pm
Why not use a 3rd party installer???

If I remember my ancient history, I used one (PKUNIZP, I think) to install shareware I used to write for the 386/486 systems in QB45 and QBasic.

I'm pretty sure you can still find one still out there.
Title: Re: Project looking for Programmer (I can't do it myself)
Post by: SpriggsySpriggs on September 20, 2021, 12:29:10 pm
If the code is all in QBASIC then you should be able to open most of it in QB64 and compile to executables for modern systems
Title: Re: Project looking for Programmer (I can't do it myself)
Post by: bplus on September 20, 2021, 12:30:55 pm
Yeah, I am wondering what the QBasic code looks like.
Title: Re: Project looking for Programmer (I can't do it myself)
Post by: SMcNeill on September 20, 2021, 12:34:31 pm
If it’s just an installer, can’t you just create a simple batch script to do the job?
Title: Re: Project looking for Programmer (I can't do it myself)
Post by: bplus on September 20, 2021, 12:39:53 pm
If it's DOS and just Qbasic what's to install unless the QBasic doesn't have a compiler.
Title: Re: Project looking for Programmer (I can't do it myself)
Post by: SMcNeill on September 20, 2021, 12:54:33 pm
If it's DOS and just Qbasic what's to install unless the QBasic doesn't have a compiler.

Sounds like the source is probably set up to read various mod files from the root directory, so an installer would be required to only copy/remove the proper files to the drives game directory.

Example of archive:
Game.exe
redcar.mod
greencar.mod
bluecar.mod
whitecar.mod
fred.mod

Game.exe would look in the root directory and apply all *.mod files, so an install from the archive to disk would require only copy/pasting the selected files, while making certain any others are erased.

I used to write batch scripts for stuff like this all the time back in the ‘80s, but I haven’t used DOS in thirty years.  I don’t remember half the syntax anymore.  Best place to ask for this type thing is from the DosBox community — they stay immersed in the proper syntax all the time.
Title: Re: Project looking for Programmer (I can't do it myself)
Post by: Daniel3D on September 20, 2021, 02:06:51 pm
If the code is all in QBASIC then you should be able to open most of it in QB64 and compile to executables for modern systems
No
 The setup program is rewritten in qbasic. It needed to because we recompiled the game executables.
The game itself is mostly written in assembly.
Title: Re: Project looking for Programmer (I can't do it myself)
Post by: Daniel3D on September 20, 2021, 03:06:54 pm
If it’s just an installer, can’t you just create a simple batch script to do the job?
It needs to be a bit more flexible than that.

The game directory has variable contents and subdirectories. (custom content and mods)
Installation can be form or to a removable medium. (basically from any location to any location)

It needs to check if the source directory contains game files and if the destination exists.
Create a directory if needed.
Copy the whole, including subdirectories, to the new location.
[that mimics the functions of the original installer]

Optional features
(re)Install the base game without additional content and modifications.
Install the game in the new location with selected modifications.
(de)Install modifications to current installation
- these options require a good understanding of the game and mechanics. They are welcome, but can wait.
Title: Re: Project looking for Programmer (I can't do it myself)
Post by: Daniel3D on September 20, 2021, 03:17:29 pm
Best place to ask for this type thing is from the DosBox community — they stay immersed in the proper syntax all the time.
I haven't found that part of the community yet. Most of the forum is about DOSBox itself and troubleshooting games.
But I'll just shoot a message in there, maybe it sticks.

Thanks everyone for thinking with me.
Title: Re: Project looking for Programmer (I can't do it myself)
Post by: TempodiBasic on September 22, 2021, 04:01:01 pm
Is this the Stunts about you are talking?
https://www.youtube.com/watch?v=UwsU8ArCmQk (https://www.youtube.com/watch?v=UwsU8ArCmQk)

and does it run in MSDOS 5.0/6.2 or lower?

Here another source in the web: https://www.abandonwaredos.com/abandonware-game.php?abandonware=Stunts&gid=2054 (https://www.abandonwaredos.com/abandonware-game.php?abandonware=Stunts&gid=2054)

So you don't run it under DOSBOX but  in a Virtual Machine with MSDOS installed.
You're trying to do an installer with QBasic that is installed in old MsDOS.
You needn't a compiled .EXE except if it runs under MSDOS! The choice to use Qbasic is clear but not all the QB45 functions are in QBasic, starting from Call Interrupt so you need to workaround with Call Absolute.

A good undefined project
Is the interface of installer ... command line, with window and components  like those of VBDOS in ASCII,   or in graphic mode? Using mouse or not?  ...running in a LAN with what protocol?
A simple idea can become very complicated if you don't specify at starting the features.
There are so many retro DOSlovers, you can ask also on the Pete's forum that is specifically QB/QBasic.
https://www.tapatalk.com/groups/qbasic/ (https://www.tapatalk.com/groups/qbasic/) if Pete doesn't answer to your call.
Good Luck
Title: Re: Project looking for Programmer (I can't do it myself)
Post by: Pete on September 22, 2021, 05:06:35 pm
We had a member at the QBasic Forum a couple of years ago, TheRealMikeHawk, who mixed a lot of DOS programing and asm routines in his QBasic games. Fell had a look at them, but determined there was no way to convert them to QB64, either then or now. Michael Calkins was another member with many DOS and asm skills. He joined here, but hasn't been around for a year or two. As for me, I only used a small bit of asm knowledge for mouse routines, etc. and never used DOS to make a program.

I don't have the more extensive background in asm and DOS as the two folks I mentioned, and since I have no interest in games, I would not be comfortable with working on an installer that requires a knowledge of the game. I absolutely pass on offering help on this one.

Pete
Title: Re: Project looking for Programmer (I can't do it myself)
Post by: Daniel3D on September 24, 2021, 04:07:44 pm
I would not be comfortable with working on an installer that requires a knowledge of the game. I absolutely pass on offering help on this one.

Pete
Knowledge of the game is handy for the advanced functions. But I can provide that information if needed,
The basic installer is a glorified Xcopy. Just dump all in a new location.
But i am in my attempt to be clear and complete perhaps a bit chaotic. I apologize for that.
Title: Re: Project looking for Programmer (I can't do it myself)
Post by: Daniel3D on September 24, 2021, 04:19:16 pm
Is this the Stunts about you are talking?
https://www.youtube.com/watch?v=UwsU8ArCmQk (https://www.youtube.com/watch?v=UwsU8ArCmQk)

and does it run in MSDOS 5.0/6.2 or lower?
Well yes that is the one.  It is from 1990 and runs on a 286. So i guess DOS version 3.3 and up.
Quote
Here another source in the web: https://www.abandonwaredos.com/abandonware-game.php?abandonware=Stunts&gid=2054 (https://www.abandonwaredos.com/abandonware-game.php?abandonware=Stunts&gid=2054)

So you don't run it under DOSBOX but  in a Virtual Machine with MSDOS installed.
You're trying to do an installer with QBasic that is installed in old MsDOS.
You needn't a compiled .EXE except if it runs under MSDOS! The choice to use Qbasic is clear but not all the QB45 functions are in QBasic, starting from Call Interrupt so you need to workaround with Call Absolute.
I run it in DOSBox. but others run it bare-metal MSDOS or freedos.
Some in a VM. It depends on system and personal preference.

Quote
A good undefined project
Is the interface of installer ... command line, with window and components  like those of VBDOS in ASCII,   or in graphic mode? Using mouse or not?  ...running in a LAN with what protocol?
A simple idea can become very complicated if you don't specify at starting the features.
There are so many retro DOSlovers, you can ask also on the Pete's forum that is specifically QB/QBasic.
https://www.tapatalk.com/groups/qbasic/ (https://www.tapatalk.com/groups/qbasic/) if Pete doesn't answer to your call.
Good Luck
Not everything is defined because it also depends on the person working with it. There is artistic freedom.
But the main idea is a program that fits the early nineties. Mouse support is preferable.

Ill check the other forum as wel. Thanks for the information.
Title: Re: Project looking for Programmer (I can't do it myself)
Post by: Daniel3D on September 25, 2021, 05:28:18 am
Ill check the other forum as wel. Thanks for the information.
turns out that i already found that forum, there if was redirected here on the basis that this one is more active,
but thanks for thinking with me.
Title: Re: Project looking for Programmer (I can't do it myself)
Post by: TempodiBasic on September 25, 2021, 07:05:23 pm
Quote
I run it in DOSBox. but others run it bare-metal MSDOS or freedos.
Some in a VM. It depends on system and personal preference.
So I must imagine that the program runs standalone and the installer is like Forge for Minecraft. A composer/installer of different mods that add different objects to the main game, and to get this there is a tree of folder with files/resources.

IMHO you cannot think of one kind of installer. A DOS installer cannot run on machine with 32/64 bits.
So you need an installer written in Qbasic level of BASIC language so you can compile it with QB.exe or run it by Qbasic in a MSDOS system machine (both virtual both real).
The same code compiled with QB64 can run on 32/64 bits machine on which you can use DOSBOX.

This program/ installer must have a first part in which the user chooses from a list the MODs (each MOD has its files) to install  plus the basic version, and a second part in which the user specify the path of destination of installation.

Title: Re: Project looking for Programmer (I can't do it myself)
Post by: Daniel3D on September 27, 2021, 06:02:25 am
That is correct.
The game itself is DOS only. So the install program is mainly aimed at DOS users.
In windows you can drag and drop. But for dos a installer is easier.

In the attachment, a tree example of the game.
It contains the main game with the unfinished SETUP (source included below) - quickbasic
and a mod program sgar (simple garage, written a few days ago) with in its garage 3 mod cars. (program + source included below) - freebasic

Cars are named as prefix car name and extension names:

cars (in garage):
DAUD
DBMW
DMCB

Prefixes and Extensions:
CAR          .RES
STDA          .VSH
STDB         .VSH
ST              .3SH

But in the main dir the extentions are differend because those files are packed.
3sh or p3s - 3d shape resource files.
Vsh or PVS - graphic resource files images
Res or pre - resources. Text and settings
Title: Re: Project looking for Programmer (I can't do it myself)
Post by: Daniel3D on October 05, 2021, 03:52:17 am
I see there is a lot of interest in the code.
That is nice. And you're welcome to it.
But is there anyone willing to write a simple installer?

Just added to the setup script. And doesn't have to be perfect either.
Title: Re: Project looking for Programmer (I can't do it myself)
Post by: bplus on October 05, 2021, 01:41:44 pm
I see there is a lot of interest in the code.
That is nice. And you're welcome to it.
But is there anyone willing to write a simple installer?

Just added to the setup script. And doesn't have to be perfect either.

I think, and this might just be me, that your "installer" requires too much knowledge and experience playing with Stunts that a programming guy coming in cold would have to invest too much time, to learn, to construct a proper installation. I could be wrong, wouldn't be the first time.
Title: Re: Project looking for Programmer (I can't do it myself)
Post by: Daniel3D on October 06, 2021, 07:56:07 am
I disagree.
Although it would be great if there can be distinguished between the base game and mods.
Just a "copy all" from a to b is good enough.
A check if the main executables are there is nice.

That brings the setup on par with the original.

Maybe I didn't state that clearly in my original post in my attempt to make it more attractive..
Title: Re: Project looking for Programmer (I can't do it myself)
Post by: bplus on October 06, 2021, 09:11:27 am
A copy all from A to B can be accomplished by a Windows command or batch file. That can be done with a Shell command from QB64. Where does A and B come from? user input?

_FileExists is a function that can check for files present.
Title: Re: Project looking for Programmer (I can't do it myself)
Post by: Daniel3D on October 06, 2021, 12:33:48 pm
A copy all from A to B can be accomplished by a Windows command or batch file. That can be done with a Shell command from QB64. Where does A and B come from? user input?

_FileExists is a function that can check for files present.
User input. As long as the source contains the game.
If destination doesn't exist ask to create.
If it does exist ask for overwrite.
Title: Re: Project looking for Programmer (I can't do it myself)
Post by: bplus on October 06, 2021, 01:01:11 pm
User input. As long as the source contains the game.
If destination doesn't exist ask to create.
If it does exist ask for overwrite.


OK @Daniel3D can you say in English and in detail (specific Files, Folders, Extensions to which we will probably assign string variables or arrays or make Data lines) and step by step what you want the Installer to do? Call this pseudo coding.

So user inputs a (Source) Folder, it probably with have to be pathed. Do you know what I mean by pathed? All sub Folders from Drive to Folder in question: Drive:\\sub\sub\Source
Then check if that Folder contains, what game?

User inputs a Destination Folder (again pathed so we don't have to write code looking all over the hard drive for it, only to (NOT) find out it is in the SD card slot.

Get permission to overwrite... assuming success so far, then what? Just copy all files from Source to Destination?

Title: Re: Project looking for Programmer (I can't do it myself)
Post by: SMcNeill on October 06, 2021, 01:26:47 pm

OK @Daniel3D can you say in English and in detail (specific Files, Folders, Extensions to which we will probably assign string variables or arrays or make Data lines) and step by step what you want the Installer to do? Call this pseudo coding.

So user inputs a (Source) Folder, it probably with have to be pathed. Do you know what I mean by pathed? All sub Folders from Drive to Folder in question: Drive:\\sub\sub\Source
Then check if that Folder contains, what game?

User inputs a Destination Folder (again pathed so we don't have to write code looking all over the hard drive for it, only to (NOT) find out it is in the SD card slot.

Get permission to overwrite... assuming success so far, then what? Just copy all files from Source to Destination?

Isn't this just a basic batch file job, like I mentioned at the start of this thread?  What the heck am I missing?
Title: Re: Project looking for Programmer (I can't do it myself)
Post by: bplus on October 06, 2021, 01:33:35 pm
Yeah, except User Interface is probably much easier with QB64, specially if at some point we want to select items from an array.
Title: Re: Project looking for Programmer (I can't do it myself)
Post by: Pete on October 06, 2021, 01:42:00 pm
Is it as simple as this...

DEMO. I would recommend this.

1) DON'T use run, instead choose to make this exe by clicking RUN in the IDE and in the menu that opens, click "Make exe only."

2) Now make a folder called "myQB64installdemo" and cut and use Windows Explorer to move the qb64 exe file just made into that new folder.

3) Run the exe.

This is just for piece of mind, so any modifications will not mess with stuff in your QB64 folder.

The program will make a new sub-directory, called: mock-directory-to-demo-installer

Now I made it a sub-directory for demo purposes, only. If this is what the OP is looking for, obviously that part of the installer would need to be worked on so the user could install to the C drive, D drive, etc.

The code also makes a phony Hello World text file in the folder the exe is in. It then copies that file to the new install folder. The demo technique could be used to copy (install) any file. Of course this simple type of install process does not affect the Windows Registry. Anyway, here's my demo...

Code: QB64: [Select]
  1. OPEN "Hello-World.txt" FOR OUTPUT AS #1: PRINT #1, "Hello World!": CLOSE #1
  2.  
  3. SourceFile$ = "Hello-World.txt"
  4. TargetDir$ = "mock-directory-to-demo-installer"
  5. IF _FILEEXISTS(SourceFile$) THEN ELSE PRINT "Source file: "; SourceFile$; " not found. Ending...": _DELAY 5: END
  6. ' Source file exists, ask user to install.
  7. PRINT "Would you like to install " + SourceFile$ + "? Y/N: ";: LINE INPUT ans$: PRINT
  8. IF ans$ = "" OR UCASE$(ans$) = "N" THEN END
  9. ' User wants to install. Ask if target directory is okay for install.
  10. IF _DIREXISTS(TargetDir$) THEN
  11.     ' Prompt for overwrite.
  12.     IF _FILEEXISTS(TargetDir$ + "\" + SourceFile$) THEN
  13.         PRINT SourceFile$ + " already exists on this device. Overwrite? Y/N: ";: LINE INPUT ans$: PRINT
  14.         IF ans$ = "" OR UCASE$(ans$) = "N" THEN END
  15.         PRINT "Overwrite in progress...": PRINT
  16.         KILL TargetDir$ + "\" + SourceFile$ ' Removes previous install.
  17.     END IF
  18.     PRINT "Setup will create directory " + TargetDir$
  19.     PRINT "to install " + SourceFile$ + ". Press Enter to begin or Esc to abort.": PRINT
  20.     DO
  21.         _LIMIT 30
  22.         b$ = INKEY$
  23.         IF LEN(b$) THEN
  24.             SELECT CASE b$
  25.                 CASE CHR$(23): SYSTEM ' Ends routine and closes install window.
  26.                 CASE CHR$(13): EXIT DO ' Okay to install.
  27.                 CASE ELSE: BEEP ' Wrong entry signal.
  28.             END SELECT
  29.         END IF
  30.     LOOP
  31.     ' Create directory.
  32.     MKDIR TargetDir$
  33. ' Install.
  34. IF _DIREXISTS(TargetDir$) THEN
  35.     PRINT "Directory path: "; TargetDir$
  36.     PRINT "not found. Cannot install. Ending...": _DELAY 5: END ' Fail safe.
  37. PRINT "Installing app...": PRINT
  38. OPEN SourceFile$ FOR BINARY AS #1
  39. a$ = SPACE$(LOF(1))
  40. GET #1, , a$
  41. OPEN TargetDir$ + "\" + SourceFile$ FOR BINARY AS #1
  42. PUT #1, , a$
  43. ' Verify install.
  44. IF _FILEEXISTS(TargetDir$ + "\" + SourceFile$) THEN
  45.     PRINT "Installation successful.": PRINT
  46.     PRINT "Installation failed.": PRINT

Pete
Title: Re: Project looking for Programmer (I can't do it myself)
Post by: SMcNeill on October 06, 2021, 02:03:51 pm
If these are for windows only, couldn't you just make the whole thing a self-extracting EXE?

https://www.winosbite.com/iexpress-exe/

iexpress comes with windows in the C:\Windows\System32\ and can create self-extracting archives, and sounds like it'd be the best tool for the job to me.  Compress and make the EXE.  Distribute it.  User clicks the EXE and windows handles the rest of the install process.
Title: Re: Project looking for Programmer (I can't do it myself)
Post by: Pete on October 06, 2021, 02:09:56 pm
I used to use WinZIP Professional to set up my office software. I wrote a setup program and included the 20 or so office programs. Remember, that was back in the day QuickBASIC was limited to about 200KB per app, provided you took a mullti-modular build approach. Anyway, the WinZIP allowed me to pack all my files and unpack them on all my office computers. It would also initiate my setup.exe program, upon unpacking. What was neat is it kept all files in a temp folder, until the directories were made by the setup program. It would then transfer them to the correct folders, and kill the temp stuff.

Pete
Title: Re: Project looking for Programmer (I can't do it myself)
Post by: Daniel3D on October 06, 2021, 03:29:31 pm
If these are for windows only, couldn't you just make the whole thing a self-extracting EXE?
It is meant to be DOS only. To fit with the game.

And maybe a batch script can do it to, I don't know
I don't know if that can handle sub folders and check source and destination.

I'll type out a pseudo script later when I am behind a real computer.

Thanks for the response so far.
Title: Re: Project looking for Programmer (I can't do it myself)
Post by: SMcNeill on October 06, 2021, 03:56:11 pm
It is meant to be DOS only. To fit with the game.

@bplus Then you're going to need DOSBOX and QB45, if you want to compile a DOS-level executable from a BAS file.  QB64 requires Win XP or better to run.

I haven't did any DOS level stuff for twenty years.  I moved on with the times.  :P
Title: Re: Project looking for Programmer (I can't do it myself)
Post by: bplus on October 06, 2021, 04:27:36 pm
@SMcNeill  That's what I thought but Daniel was posting FB code at another forum. So I am thinking he has Windows to run exe's that do Setups but Runs the actual game in DOSBOX.

Yeah I haven't done DOS since late 90's. I gave my computer with all that stuff to a kid that didn't have anything when I updated to Windows 7? I think.
Title: Re: Project looking for Programmer (I can't do it myself)
Post by: Pete on October 06, 2021, 04:55:55 pm
@bplus and @SMcNeill Do you guys think what I posted will turn out to be relevant or is this project looking like something more complicated than the usual way we copy files in QB64?

Pete
Title: Re: Project looking for Programmer (I can't do it myself)
Post by: bplus on October 06, 2021, 05:24:53 pm
@Pete  going by this

Quote
User input. As long as the source contains the game.
If destination doesn't exist ask to create.
If it does exist ask for overwrite.

I was thinking "the source" is Folder containing "the game".

We could actually make a backup folder before overwriting the destination in case something goes horribly wrong.
Title: Re: Project looking for Programmer (I can't do it myself)
Post by: bplus on October 06, 2021, 05:27:51 pm
I'll wait for pseudo, get all questions answered before coding.
Title: Re: Project looking for Programmer (I can't do it myself)
Post by: Pete on October 06, 2021, 06:38:48 pm
Mostly, you need to be careful while you're coding it. I think that's why BASIC developers chose the name KILL for that keyword. I mean you could incorporate Indy's neat send to the Recycle Bin API code. That way, nothing every gets completely removed, or sure, MKDIR backup and number the backup files. That's the method I use for my database files... myfile-1.bak, myfile-2.bak, etc. Hey, what are the chances Rob will return and code us the _RESURRECT keyword? That would solve everything! :D

Pete
Title: Re: Project looking for Programmer (I can't do it myself)
Post by: SMcNeill on October 06, 2021, 07:15:06 pm
The problem with this type of request is the target audience.

This task is as simple zs:

At command prompt type: COPY *.* MyDrive://MyFolder/MySubfolder/*.*

That's it, and any jack-ass even 0.01 percent fluent with DOS should know enough to do that.  Unfortunately, the people who play this game are completely clueless about the environment they're working in because they need an installer.

Which leads to using QB45 and DOSBOX...

Where nobody has any libraries or toolsets anymore...

Which means you need to write a file listing program to give you a list of the files and folders on the drive, then an input routine so the user can choose which drive and folder to copy it to, then you need a disk space checker, then finally a copy routine with clean up and overwrite capacity...

Your little one line DOS command is now 1000 lines of antiquated, redundant, error-checking with a simple single SHELL command placed right before the END statement.


Good luck with that!

Here's my go at this:

INSTALL.BAT:
Code: [Select]
COPY *.* DRIVE://FOLDER/*.*
README.TXT:
Code: [Select]
Edit INSTALL.BAT to point to desired directory to save to.  Save and execute.
Title: Re: Project looking for Programmer (I can't do it myself)
Post by: Daniel3D on October 07, 2021, 03:18:25 am
Yes, the installer is aimed at people not used to DOS. I do expect them to be able to navigate in a DOS environment though.
But that's about it.

@bplus : the Freebasic code you referred to was compiled such that it runs under DOS. It was the easiest way to code what was needed and still support DOS.

As for the installer.  (I included screenshots of the original installer that doesn't work with this version of the game: it has a text mode interface. It would be cool if that could be copied for ascetic reasons, the base for that is in the SETUP.BAS that may be used. But command line is fine to)

Code: QB64: [Select]
  1. on run install
  2. - ask source of the game #(can be the same as the current dir or different, does not matter | does not need to be checked)
  3.   # Enter drive to install form:
  4.   # EXAMPLE: A:\  
  5.  
  6. - check if the source contains SKID*.exe files (there should be four of them, but check for any)
  7.  
  8. ask for destination,
  9.   # Enter GAME directory
  10.   # EXAMPLE c:\stunts\
  11.  
  12. Check if the destination exists.  Create or Ask to overwrite or change destination.
  13. Don't check for enough space.
  14.  
  15. then copy files [source directory + subdirectories + all files]
  16. (ESC to terminate, don't revert, just stop)
  17. show, install complete box Return to menu on enter.

Title: Re: Project looking for Programmer (I can't do it myself)
Post by: Daniel3D on October 07, 2021, 03:32:09 am
I'll wait for pseudo, get all questions answered before coding.
I hope I cover all important bits.
Like I said in the title. I can't write code, I can read it and understand most of it though. I'm not completely clueless.

Keep it simple. If the user f**s it up, he can download it again. It is a free game.
Title: Re: Project looking for Programmer (I can't do it myself)
Post by: Daniel3D on October 07, 2021, 04:00:00 am
@Pete  going by this

I was thinking "the source" is Folder containing "the game".

We could actually make a backup folder before overwriting the destination in case something goes horribly wrong.
Technically, one could use the installer to restore a broken game by installing/overwrite.
It should not matter if the installer is started from the broken game folder or from the installation copy.

A backup is not needed. Too much work, the game can always be downloaded again, just as any mods.
Title: Re: Project looking for Programmer (I can't do it myself)
Post by: Daniel3D on October 07, 2021, 04:07:15 am
Is it as simple as this...

DEMO. I would recommend this.

1) DON'T use run, instead choose to make this exe by clicking RUN in the IDE and in the menu that opens, click "Make exe only."

2) Now make a folder called "myQB64installdemo" and cut and use Windows Explorer to move the qb64 exe file just made into that new folder.

3) Run the exe.

This is just for piece of mind, so any modifications will not mess with stuff in your QB64 folder.

The program will make a new sub-directory, called: mock-directory-to-demo-installer

Now I made it a sub-directory for demo purposes, only. If this is what the OP is looking for, obviously that part of the installer would need to be worked on so the user could install to the C drive, D drive, etc.

The code also makes a phony Hello World text file in the folder the exe is in. It then copies that file to the new install folder. The demo technique could be used to copy (install) any file. Of course this simple type of install process does not affect the Windows Registry. Anyway, here's my demo...

Code: QB64: [Select]
  1. OPEN "Hello-World.txt" FOR OUTPUT AS #1: PRINT #1, "Hello World!": CLOSE #1
  2.  
  3. SourceFile$ = "Hello-World.txt"
  4. TargetDir$ = "mock-directory-to-demo-installer"
  5. IF _FILEEXISTS(SourceFile$) THEN ELSE PRINT "Source file: "; SourceFile$; " not found. Ending...": _DELAY 5: END
  6. ' Source file exists, ask user to install.
  7. PRINT "Would you like to install " + SourceFile$ + "? Y/N: ";: LINE INPUT ans$: PRINT
  8. IF ans$ = "" OR UCASE$(ans$) = "N" THEN END
  9. ' User wants to install. Ask if target directory is okay for install.
  10. IF _DIREXISTS(TargetDir$) THEN
  11.     ' Prompt for overwrite.
  12.     IF _FILEEXISTS(TargetDir$ + "\" + SourceFile$) THEN
  13.         PRINT SourceFile$ + " already exists on this device. Overwrite? Y/N: ";: LINE INPUT ans$: PRINT
  14.         IF ans$ = "" OR UCASE$(ans$) = "N" THEN END
  15.         PRINT "Overwrite in progress...": PRINT
  16.         KILL TargetDir$ + "\" + SourceFile$ ' Removes previous install.
  17.     END IF
  18.     PRINT "Setup will create directory " + TargetDir$
  19.     PRINT "to install " + SourceFile$ + ". Press Enter to begin or Esc to abort.": PRINT
  20.     DO
  21.         _LIMIT 30
  22.         b$ = INKEY$
  23.         IF LEN(b$) THEN
  24.             SELECT CASE b$
  25.                 CASE CHR$(23): SYSTEM ' Ends routine and closes install window.
  26.                 CASE CHR$(13): EXIT DO ' Okay to install.
  27.                 CASE ELSE: BEEP ' Wrong entry signal.
  28.             END SELECT
  29.         END IF
  30.     LOOP
  31.     ' Create directory.
  32.     MKDIR TargetDir$
  33. ' Install.
  34. IF _DIREXISTS(TargetDir$) THEN
  35.     PRINT "Directory path: "; TargetDir$
  36.     PRINT "not found. Cannot install. Ending...": _DELAY 5: END ' Fail safe.
  37. PRINT "Installing app...": PRINT
  38. OPEN SourceFile$ FOR BINARY AS #1
  39. a$ = SPACE$(LOF(1))
  40. GET #1, , a$
  41. OPEN TargetDir$ + "\" + SourceFile$ FOR BINARY AS #1
  42. PUT #1, , a$
  43. ' Verify install.
  44. IF _FILEEXISTS(TargetDir$ + "\" + SourceFile$) THEN
  45.     PRINT "Installation successful.": PRINT
  46.     PRINT "Installation failed.": PRINT

Pete
Looks good.
contains a lot of things i talked about.
Title: Re: Project looking for Programmer (I can't do it myself)
Post by: Richard on October 07, 2021, 07:19:14 am
@Daniel3D


Quote

Quote from: SMcNeill on Today at 04:03:51 AM
If these are for windows only, couldn't you just make the whole thing a self-extracting EXE?
It is meant to be DOS only. To fit with the game.

And maybe a batch script can do it to, I don't know
I don't know if that can handle sub folders and check source and destination.

I'll type out a pseudo script later when I am behind a real computer.



Quote
@bplus : the Freebasic code you referred to was compiled such that it runs under DOS. It was the easiest way to code what was needed and still support DOS.






I am late to this party...


I may not be of any help but to understand your (players) situation better ...


Are you (players) intending to play on an old 16 bit computer (say INTEL 80286 or earlier) or are you playing on a more modern computer with say an INTEL i3 (or better) x64 computer - but still retain the "look and feel" of the good old DOS days (say DOS 3 - 5)?

If it is more modern Windows computer - yes the DOSbox emulator sub-environment is one way (and can be configured for semi-automation into DOSbox from Windows).

When you say FreeBASIC in DOS - do you mean using only the "DOS version of FreeBASIC" or do you mean the much more popular FreeBASIC Windows version"?

From my re-kindled interest in "DOS version of FreeBASIC" I am what appears to be a minority of users (of "DOS version of FreeBASIC") who uses FreeBASIC-DOS in "bare-metal mode" i.e to say there is "no windows around" (so to speak) - I run FreeBASIC-DOS version via boot computer (cold start) from a usb-stick (which was RUFUS formatted) - This usb stick itself is now the C:\ drive (and nothing can access the computer hard-drive where windows et al is installed). The more common approach with FreeBASIC DOS version is to run it within DOSbox itself on a modern windows computer (the C:\ hard drive contains Windows and DOSbox (via switches) can access almost all drives, including C:\,  though it gets interesting with filenames bigger than 8.3 DOS format).

So is a "usb stick with your game and other things" formatted especially to be such that one boots of the usb stick (now being the C:\ drive), the display is the look and feel of DOS and no windows stuff accessible (and no knowledge of DOSbox to the environment) of any use to you? Or do you want to use the the C:\ hard drive with Windows and run DOSbox all the time (extra hoops to always jump through initially)?


Just wondering...
Title: Re: Project looking for Programmer (I can't do it myself)
Post by: Daniel3D on October 07, 2021, 07:34:17 am
About running the game.
All options apply.
We have a player running the game on a 286xt
But also windows and Linux users.
Some run DOS in a VM. Some DOSBox.
Even freeDOS is used.
I have an intel i5 64bit with DOSBox.
Quote
And various other emulators/VM's to run 19 different instances of the game, including the Amiga and the PC-98 version

The installer is aimed at bare-metal DOS users.

About freebasic, I believe he runs it on Linux.
It is coded without dependencies and so that it can run in DOS (it's a 16bit application and can't run in Windows).

Quote
From my re-kindled interest in "DOS version of FreeBASIC" I am what appears to be a minority of users (of "DOS version of FreeBASIC") who uses FreeBASIC-DOS in "bare-metal mode" i.e to say there is "no windows around" (so to speak)
Sounds cool.
My current computer has no legacy support so I can't run DOS bare metal. Something I will take into account when I buy another.

O. And welcome to the party.
Title: Re: Project looking for Programmer (I can't do it myself)
Post by: bplus on October 07, 2021, 12:45:06 pm
Quote
@bplus : the Freebasic code you referred to was compiled such that it runs under DOS. It was the easiest way to code what was needed and still support DOS.

Wow! kudos to FB (@Pete don't kill me.) Glad I didn't try running it, well I couldn't because didn't have FB and won't usually run a stranger's exe.
Title: Re: Project looking for Programmer (I can't do it myself)
Post by: bplus on October 07, 2021, 01:17:54 pm
@Daniel3D

Thanks for giving us more clues and the pseudo. My mind and heart at moment is invested in a Couple of Challenges with deadlines (there is a pun somewhere in there about deadlines in October with Halloween, @Pete might find it ;-))

Your screen shots of the Installer makes me nostalgic. I forgot all about giving away the VB (for) DOS with all the other stuff in a 486. That was my favorite of all time Basic before QB64 and it still has features that QB64 and Fellippe's Team may be working towards eg built in GUI controls.  I did have all those tools then that Steve spoke of, batch file enhancers that made file and directory lists that you could click to select plus I think I made a Store app for handling variables to make Batch files more like a full PL, plus something that took a txt file and turned it into a data input screen for a data base, my own split screen editor (top view for editing, bottom view for read only for copy/paste with file selection of course), that I could modify to do what ever I needed for coding like maintain a list of variable names. All gone now, sigh...
Title: Re: Project looking for Programmer (I can't do it myself)
Post by: Daniel3D on October 07, 2021, 01:22:24 pm
Wow! kudos to FB (@Pete don't kill me.) Glad I didn't try running it, well I couldn't because didn't have FB and won't usually run a stranger's exe.
I wouldn't be surprised if you could compile it in qb64.
Maybe not without errors but the program doesn't change files, only moves them so it's relatively safe. But that is not really important.
Title: Re: Project looking for Programmer (I can't do it myself)
Post by: bplus on October 07, 2021, 01:32:12 pm
I wouldn't be surprised if you could compile it in qb64.
Maybe not without errors but the program doesn't change files, only moves them so it's relatively safe. But that is not really important.

Yeah, FB and QB64 are close cousins but FB has stuff that baffle me, Macros and Oop stuff like built in methods for objects and new constructors (have I got that term right?), pointers...
 
Some of it can be translated to QB64 like pointers to _Mem maybe? some just have no equivalent in QB64 like the Oop stuff, WTH macro's sometimes they look like subs or functions, I always thought of macros as key Combo shortcut for editing.
Title: Re: Project looking for Programmer (I can't do it myself)
Post by: Daniel3D on October 07, 2021, 02:23:09 pm
@Daniel3D

Thanks for giving us more clues and the pseudo. My mind and heart at moment is invested in a Couple of Challenges with deadlines (there is a pun somewhere in there about deadlines in October with Halloween, @Pete might find it ;-))
I'm not in a hurry. I would like to have it finished before the end of the year because this is the 30th anniversary year.
And I would like to introduce the new complete version before the start of next racing season.
But nobody will die if it's later.
Title: Re: Project looking for Programmer (I can't do it myself)
Post by: Daniel3D on October 07, 2021, 04:22:34 pm
In the attachment, a tree example of the game.
It contains the main game with the unfinished SETUP (source included below) - quickbasic
and a mod program sgar (not important/relevant at the moment) - freebasic 

@Richard I was wondering. From your experience with Freebasic-DOS. How much work do you think it is to make the installer (with or without textmode interface) in freebasic?
I posted this also on freebasic.net but didn't get much of a response.
Title: Re: Project looking for Programmer (I can't do it myself)
Post by: Daniel3D on October 08, 2021, 04:36:04 am
Yeah, FB and QB64 are close cousins but FB has stuff that baffle me, Macros and Oop stuff like built in methods for objects and new constructors (have I got that term right?), pointers...
 
Some of it can be translated to QB64 like pointers to _Mem maybe? some just have no equivalent in QB64 like the Oop stuff, WTH macro's sometimes they look like subs or functions, I always thought of macros as key Combo shortcut for editing.
True. The programmer in our forum is (slowly) building a remake of the game engine in freebasic. He has built the graphics engine which is beyond me.
Collision and physics' still has to be done. But still. Quite amazing stuff.
Title: Re: Project looking for Programmer (I can't do it myself)
Post by: Richard on October 08, 2021, 08:17:04 am
@Daniel3D


I have not read/studied all replies for your current topic - but just to be giving me the overall picture (correct me any points I am wrong)...

Someone (group of people) are in the process of a remake of an old DOS program - which still has to retain the "look and feel" of the original program - and this remake of the program is to be made available to a range of different target hardware (e.g. a 286 computer, more modern x64 computers (some running DosBox , etc), etc). I gather that it is not only just you that wants to install the program just only on your Intel i5 computer but that everyone (with all the different hardware, options etc) would want to install the remake program. The installation is to be essentially automatic (so ideally not much knowledge of doing things in DOS say is to be assumed) - i.e. by following a minimum number of steps to answer all required folders/files are put in place. Then say by a menu (or something) all the "cars" (defined each by say 4 or more files/folders) are associated to that installed program (and at a future time the user can easily add more "cars"). Possibly even at a future time, as the remake program is further refined - that the installation allows that what is now already installed can be updated.

Now all sorts of scenarios are possible - is it that the installer has to intelligent enough to recognize whether a 286 computer is involved or say an INTEL i5, whether DOSbox or VM is the sub-environment of Windows, Linux or even Mac (for that matter)? It would be simpler, I feel, that a custom installer for the 286 computer, a custom installer for your i5, etc (maybe say a total of 6 custom installers) is made. Then your racing community would pick the most appropriate custom installer,  also pick the right say "zip" file which is the game itself and another zip file which is constantly being updated by the addition of more cars.

Further to above, whether still run the game in windows (but without the fancy GUI stuff) i.e. for example the current QB64 IDE
window is essentially a TEXT SCREEN (exception is the very top "banner"   ....QB64 x64) and could be replicated as such in a DOS program (I understand that you still require the game to run in DOS or DOS emulated).

Is it necessary that the game accesses the hard drive? Life can be a bit easier if the game and supporting material is only on a usb stick.

Although not a requirement of the installer to handle - what is the expectations for the graphics (e.g. graphics resolution that was only available 30 years ago? Or do you want to use 4K displays with superior graphics?) What speed is the game to run at - say comparable to 30 years ago which is roughly 1000x slower than present day computers. What devices are "allowed" for your DOS "look and feel" - eg mouse, (touch pad, DVD blue ray, web cams, etc did not exist 30 years ago). Do you wish the installer etc only to be placed on say a 3.5" floppy?

I may be interested in specific custom installers ( eg a bootable usb stick for say 286 computer and possibly semi-automatic installation into Windows 10 x64 DOSbox). Also possibly some support/advice if installation to be made by 3.5" floppy.


Just for your info (although not being involved in any way with your programmers) - attached is an example of what I achieved with "DOS-version of FreeBASIC" with simple graphics and of course since screen capture was not available (in FreeBASIC-DOS) I had to write my own FreeBASIC-DOS code to "capture the screen".




Title: Re: Project looking for Programmer (I can't do it myself)
Post by: Daniel3D on October 08, 2021, 09:30:11 am
I'm at work so I glanced over your post.
The remake is not yet a finished product (may take forever)
In this case it is about a recompiled version that is better than the original.
(See readme file)

The installer should be simple and straightforward to begin with.
I have a lot of ideas and wishes. But small steps.
Depends upon the coder.

I'll react further later.
----
Added later...
The game engine is written in assembly and can only be run in DOS.
Therefore the setup program we are recreating must be able to run in DOS.
Because the new version is closer to what the developers made it is considered a cleaner version of the game.
The setup program should be as close to the original setup program as visually possible. To retain the look and feel.
80 colom text mode graphics, no mouse. 8bit color. 30 year old stuff.
Copy to and from whatever media is supported by the DOS environment. (DOS can support removable media like USB-STICKS)

(The game was released with a load program to save disk space at the expense of computer resources)

But because I can't do it myself I am happy with whatever I can get that is functional.
I want to launch the version before the end of the year.
Title: Re: Project looking for Programmer (I can't do it myself)
Post by: Daniel3D on October 11, 2021, 03:51:40 am
@Daniel3D
I may be interested in specific custom installers ( eg a bootable usb stick for say 286 computer and possibly semi-automatic installation into Windows 10 x64 DOSbox). Also possibly some support/advice if installation to be made by 3.5" floppy.

I missed this line at first. But that is really cool.
The original game could fit on a 1.44 diskette, although it was produced on two 720 kb disks. But it could run from diskette, even though on two disks.
I have not tried it myself (I had the game on one disk or on HD), but I would like to try if the new version can run from bootable diskettes.
Title: Re: Project looking for Programmer (I can't do it myself)
Post by: Richard on October 11, 2021, 06:42:49 am
@Daniel3D

Would you be able to share files for me to try installing your racing game on my INTEL i7 computer (bare metal mode via booting from usb stick and booting from 3.5" floppy)(DOSbox various builds via windows desktop icon)?

I would like to try

- the very original game (unaltered)
- any FreeBASIC code (even if not complete)
- the disassembled ASM code (16bit) - to see if can assemble into DOSbox environment

I have never run FreeBASIC-DOS version in DOSbox (only bare metal mode) - but I may also try this (as part of my learning experience). Hardware aspects for running bare-metal boot seem to be very different than using DOSbox emulation.

You mention your programmers are writing in FreeBASIC-DOS version to create the 16-bit code - I still use MS PDS 7.1 (an improved version of MS QB45) to write 16-bit code to cover features lacking in QB64.

In the notes you referred me to - it seems that it is critical to have the sound effects (almost as important as the game itself).  Any sound files (from the game) available to share separately?
Title: Re: Project looking for Programmer (I can't do it myself)
Post by: Daniel3D on October 12, 2021, 07:53:23 am
Stunts resources.

My mega folder.
https://mega.nz/folder/JM8HQI5a#mH5ZBNwXC0eEBmockWo50A (https://mega.nz/folder/JM8HQI5a#mH5ZBNwXC0eEBmockWo50A)
It contains a zip with the game version we are updating
a folder with most of the custom cars
several other versions of the game.
I doesn't have cracked versions or explanation.
Therefore this old source is quite handy. http://stunts.kalpen.de/stunts.htm (http://stunts.kalpen.de/stunts.htm)


The sound and music are of a custom format.
I can't share that. I can share a sample of the music.
There are several YouTube video's with good audio samples.
Marco plays DOS games is one of the channels.

Below the source of the current new Setup program / QBasic
And a simple garage program called sgar /freebasic

Sgar is in development, although on hold at the moment.
It needs a text mode interface matching the setup.

As for the ASM source.
https://bitbucket.org/dreadnaut/restunts/ (https://bitbucket.org/dreadnaut/restunts/)

This contains the source and instructions for a way to assemble the game from it.
There is a 100 % assembly version and one that is partly translated to C.
Both give a bit perfect version of the original.
(One bit difference because that bit is set from 0 to 1 to permanently disable the copy protection)

If you can code in assembly I would like to connect you with the one that made the attached programs.
I think you could do wonder together 🙂
Title: Re: Project looking for Programmer (I can't do it myself)
Post by: Daniel3D on October 12, 2021, 03:55:12 pm
@Daniel3D

Would you be able to share files for me to try installing your racing game on my INTEL i7 computer (bare metal mode via booting from usb stick and booting from 3.5" floppy)(DOSbox various builds via windows desktop icon)?

I would like to try
Bare metal on a modern system is tricky because they often don't have legacy support. Usually sound support is most difficult. So I hope it works, and I know some tricks that might help. Let me know.
Title: Re: Project looking for Programmer (I can't do it myself)
Post by: TempodiBasic on October 24, 2021, 03:36:14 pm
Just to understand:
Quote
The sound and music are of a custom format.
I can't share that. I can share a sample of the music.

the game is abandoneware, so no copyright is hanging on it, is it?
Is there no kind of informations about the custom format?

About installer I believe in my solution: write a Qbasic version of Installer to get a 16bit version usind Qbasic/QUickBasic and a 32/64 bit version using QB64.

Freebasic... it supports 16bit compiling... but for what? Are how many machines with 16bit OSes in the world?
Thanks for talking
Title: Re: Project looking for Programmer (I can't do it myself)
Post by: Daniel3D on October 25, 2021, 03:56:32 am
Just to understand:
the game is abandoneware, so no copyright is hanging on it, is it?
no copyright. We have had contact with the EA, but they don't seem to remember having it.
Also the original developers are quite supportive.
Quote
Is there no kind of informations about the custom format?
there is a lot of information about it. Even some adaptation for the engine sounds.
It is basally a stripped down version of midi with a file for the music (*.KMS) and a file for the instruments (*.VCE)
KMS stands for Kris Music System and VCE is a abbreviation of Voice.

Below links to technical information.
https://moddingwiki.shikadi.net/wiki/Kris%27_Music_System_Format (https://moddingwiki.shikadi.net/wiki/Kris%27_Music_System_Format)
https://moddingwiki.shikadi.net/wiki/Kris%27_Music_System_Voice_Format (https://moddingwiki.shikadi.net/wiki/Kris%27_Music_System_Voice_Format)
Kris himself doesn't have the tools for this format any more, and they are considered to be lost.

Quote
About installer I believe in my solution: write a Qbasic version of Installer to get a 16bit version usind Qbasic/QUickBasic and a 32/64 bit version using QB64.
That sounds good. I'm only asking for the 16bit installer, but the modern ones are welcome.

Quote
Freebasic... it supports 16bit compiling... but for what? Are how many machines with 16bit OSes in the world?

There are still DOS (and other old OS) users (8bit and 16bit systems).
One member of our community ran the game successfully on an emulated Amstrad PC1512 (8086, 8MHz, CGA graphics)
Not quick, but that is as low as it can go. So all software we make to compliment the game should have this in mind.
Title: Re: Project looking for Programmer (I can't do it myself)
Post by: TempodiBasic on October 25, 2021, 12:21:15 pm
Wow
Quote
One member of our community ran the game successfully on an emulated Amstrad PC1512 (8086, 8MHz, CGA graphics)
to  reach this kind of user I think that the installer must be written in C64 Basic! In a way GWBASICA/QBASIC compatible... so the code gets the good/versatle position that I have stressed!
Title: Re: Project looking for Programmer (I can't do it myself)
Post by: Daniel3D on October 25, 2021, 04:09:17 pm
Wowto  reach this kind of user I think that the installer must be written in C64 Basic! In a way GWBASICA/QBASIC compatible... so the code gets the good/versatle position that I have stressed!
I think you are right.

Can you do it?
Title: Re: Project looking for Programmer (I can't do it myself)
Post by: TempodiBasic on October 25, 2021, 07:11:18 pm
@Daniel3D
Hi
I never have had used a C64 or another Commodore machine. Some decades ago I have had a C64 emulator, (CCS64) and so I have tried some games of that machine. I was never been able to do other that drop on CCS64 icon the game file to play.

However this seems to be interesting
https://www.c64-wiki.com/wiki/BASIC (https://www.c64-wiki.com/wiki/BASIC)

http://www.mypccollection.altervista.org/downloads/manuali/Dos/Dos_GWbasic%20manual%20(eng).pdf (http://www.mypccollection.altervista.org/downloads/manuali/Dos/Dos_GWbasic%20manual%20(eng).pdf)

I started coding with QBasic, but for the task request it seems the same that GW BASIC.
I'll try to have time to spend on this idea with code.
Title: Re: Project looking for Programmer (I can't do it myself)
Post by: Daniel3D on October 26, 2021, 06:26:37 pm
@Daniel3D
Hi
I never have had used a C64 or another Commodore machine. Some decades ago I have had a C64 emulator, (CCS64) and so I have tried some games of that machine. I was never been able to do other that drop on CCS64 icon the game file to play.

However this seems to be interesting
https://www.c64-wiki.com/wiki/BASIC (https://www.c64-wiki.com/wiki/BASIC)

http://www.mypccollection.altervista.org/downloads/manuali/Dos/Dos_GWbasic%20manual%20(eng).pdf (http://www.mypccollection.altervista.org/downloads/manuali/Dos/Dos_GWbasic%20manual%20(eng).pdf)

I started coding with QBasic, but for the task request it seems the same that GW BASIC.
I'll try to have time to spend on this idea with code.
O shoot.
noob...
I meant in sight of processing power, not operating system. We can only modify the DOS version...
So only the DOS usable programs are needed.

It didn't register in my head that the Amstrad was not DOS based. even though i did know that.
Title: Re: Project looking for Programmer (I can't do it myself)
Post by: TempodiBasic on October 31, 2021, 02:44:59 pm
Hi Daniel3D

about your goal to have an installer DOS compatible for STUNTS and its MODS stored in a subfolder GARAGE
The OS is DOS both on old machines, both on WMWare emulation and both DOSBOX enviroment.
So here is the QBasic installer for STUNTS developed at 90%.

From game downloaded from abandonware website posted at reply 16 of this thread
I see it has a flat one folder structure (the game and its files are in the same folder with no subfolder or extra folder) with about 210 files.
And now reading the following replies in the thread I see screenshots about the idea of your installer and the pseudocode

Quote
------------------------------------------
on run install
- ask source of the game #(can be the same as the current dir or different, does not matter | does not need to be checked)
  # Enter drive to install form:
  # EXAMPLE: A:\ 
 
- check if the source contains SKID*.exe files (there should be four of them, but check for any)
 
ask for destination,
  # Enter GAME directory
  # EXAMPLE c:\stunts\
 
Check if the destination exists.  Create or Ask to overwrite or change destination.
Don't check for enough space.
 
then copy files [source directory + subdirectories + all files]
(ESC to terminate, don't revert, just stop)
show, install complete box Return to menu on enter.
-----------------------------------------------

Well I can say I got in different way the results.

Moreover you have posted  TREESTUNT.TXT in which you show that all Mods are in a subfolder called GARAGE. Good it makes easier to localize Mods.

I have tried to run in DOSBOX the sgar.exe posted into .ZIP as compiled of installer freebasic version, but I got error that you can see in screenshot after.
  [ This attachment cannot be displayed inline in 'Print Page' view ]  

Looking at code I see that it manages the Mods and let choose to the user what Mod to install and what not.
If you think to have a similar option, it is better to have an unique way to distinguish and to store Mods.

Anyway here the code for installer and Setup

  [ This attachment cannot be displayed inline in 'Print Page' view ]  
  [ This attachment cannot be displayed inline in 'Print Page' view ]  
  [ This attachment cannot be displayed inline in 'Print Page' view ]  
  [ This attachment cannot be displayed inline in 'Print Page' view ]  
Code: QB64: [Select]
  1. DECLARE SUB UpdateRunFile ()
  2. DECLARE SUB SaveConfig ()
  3. DECLARE SUB LoadConfig ()
  4. DECLARE SUB UpdateOp (oplist$, num%, opval$, length%)
  5. DECLARE FUNCTION Menu% (m AS ANY, mm$, ini%)
  6. declare sub header
  7.  
  8.  
  9. Type MenuType
  10.     x As Integer
  11.     y As Integer
  12.     c1 As Integer
  13.     c2 As Integer
  14.     w As Integer
  15.  
  16. Dim Shared men(1 To 5) As MenuType, ment$(1 To 5), ErrMsg$(1 To 3), CurErr%
  17. Dim Shared videoid$(1 To 5), soundid$(1 To 6), curvideo%, cursound%
  18. Dim Shared runfile$, SourcePath$, DestPath$, DummyCurpath%, DefaultSourcePath$, DefaultDestinationpath$
  19.  
  20. runfile$ = "STUNTS.BAT"
  21. Defaultsourcepat$ = ".\"
  22. DefaultDestinationpath$ = "c:\cs11"
  23. SourcePath$ = ".\"
  24. DestPath$ = "c:\cs11"
  25. DummyCurpath% = 1
  26.  
  27. videoid$(1) = "MCGA"
  28. videoid$(2) = "EGA"
  29. videoid$(3) = "Tandy"
  30. videoid$(4) = "Hercules"
  31. videoid$(5) = "CGA"
  32. curvideo% = 1
  33.  
  34. soundid$(1) = "No sound"
  35. soundid$(2) = "PC Speaker"
  36. soundid$(3) = "Tandy"
  37. soundid$(4) = "Ad Lib"
  38. soundid$(5) = "Sound Blaster"
  39. soundid$(6) = "MT-32"
  40. cursound% = 1
  41.  
  42.  
  43. header
  44.  
  45. men(1).x = 4
  46. men(1).y = 7
  47. men(1).w = 40
  48. men(1).c1 = 7
  49. men(1).c2 = 4
  50. ment$(1) = "Video display`Sound option`Install game to ...`Exit"
  51.  
  52. men(2).x = 13
  53. men(2).y = 12
  54. men(2).w = 27
  55. men(2).c1 = 0
  56. men(2).c2 = 2
  57. ment$(2) = "MGCA/VGA graphics`EGA graphics`Tandy graphics`Hercules graphics`CGA graphics"
  58.  
  59. men(3).x = 11
  60. men(3).y = 12
  61. men(3).w = 34
  62. men(3).c1 = 0
  63. men(3).c2 = 2
  64. ment$(3) = "No music or sound effects`Internal PC speaker`Tandy sound`Ad Lib card`Sound Blaster card`Roland MT-32"
  65.  
  66.  
  67. men(4).x = 11
  68. men(4).y = 12
  69. men(4).w = 40
  70. men(4).c1 = 0
  71. men(4).c2 = 1
  72. ment$(4) = "Source path`Destination path`Install game`Install mods`Exit"
  73.  
  74.  
  75. men(5).x = 67
  76. men(5).y = 15
  77. men(5).w = 10
  78. men(5).c1 = 0
  79. men(5).c2 = 4
  80. ment$(5) = "Yes`No`Cancel"
  81.  
  82. ErrMsg$(1) = "Error: file of configuration not found"
  83. ErrMsg$(2) = "Error: file of original installation not found"
  84. ErrMsg$(3) = "Error: file of Mods installation not found"
  85. CurErr% = 0
  86.  
  87. GoSub Fileok
  88. LoadConfig
  89.  
  90. UpdateOp ment$(1), 1, videoid$(curvideo%), men(1).w - 2
  91. UpdateOp ment$(1), 2, soundid$(cursound%), men(1).w - 2
  92.  
  93. curmain% = 1
  94.     a% = Menu%(men(1), ment$(1), curmain%)
  95.     If a% <> -1 Then curmain% = a%
  96.     Select Case a%
  97.         Case -1 ' exiting by EScape key from menu
  98.             Color 7, 0
  99.             Cls
  100.             Print
  101.             Exit Do
  102.         Case 4
  103.             SaveConfig
  104.             UpdateRunFile
  105.             Color 7, 0
  106.             Cls
  107.             Print
  108.             Print "Configuration saved."
  109.             Exit Do
  110.         Case 1 'video display settings
  111.             PCopy 0, 1
  112.             a% = Menu%(men(2), ment$(2), curvideo%)
  113.             If a% <> -1 Then curvideo% = a%
  114.             UpdateOp ment$(1), 1, videoid$(curvideo%), men(1).w - 2
  115.             PCopy 1, 0
  116.         Case 2 ' sound options
  117.             PCopy 0, 1
  118.             a% = Menu%(men(3), ment$(3), cursound%)
  119.             If a% <> -1 Then cursound% = a%
  120.             UpdateOp ment$(1), 2, soundid$(cursound%), men(1).w - 2
  121.             PCopy 1, 0
  122.         Case 3 'install options....
  123.             ' here user can choose destination folder, source folder
  124.             ' installation of original game
  125.             ' adding mods
  126.             PCopy 0, 1
  127.             Do
  128.                 PCopy 0, 2
  129.                 b% = Menu%(men(4), ment$(4), DummyCurpath%)
  130.                 Select Case b%
  131.                     Case 1 ' source path
  132.                         ShowMessage 14, 0, 16, 19, 15, 56, 0, 3, "Caution you are changing default source path!"
  133.                         Locate 19, 20: Color 14, 0: Print "Actual path: "; SourcePath$
  134.                         Locate 20, 20: Input "Type here Source path: ", a$
  135.                         If a$ = "" Or a$ = SourcePath$ Then
  136.                             Locate 21, 20: Print " No new path": Sleep 1
  137.                         Else
  138.                             Locate 21, 20: Print "This is the new source path: "; UCase$(a$); " , do you confirm?"
  139.                             c% = Menu%(men(5), ment$(5), DummyCurpath%)
  140.                             If c% = 1 Then
  141.                                 SourcePath$ = a$
  142.                             ElseIf c% = 2 Then
  143.                                 ' nothing is changed
  144.                             End If
  145.                         End If
  146.  
  147.                     Case 2 ' destination path
  148.                         ShowMessage 14, 0, 16, 19, 10, 59, 0, 3, "Caution you are changing default destination path!"
  149.                         Locate 19, 20: Color 14, 0: Print "Actual path: "; DestPath$
  150.                         Locate 20, 20: Input "Type here Destination path: ", a$
  151.                         If a$ = "" Or a$ = DestPath$ Then
  152.                             Locate 21, 20: Print " No new path": Sleep 1
  153.                         Else
  154.                             Locate 21, 20: Print "This is the new destination path: "; UCase$(a$); " , do you confirm?"
  155.                             c% = Menu%(men(5), ment$(5), DummyCurpath%)
  156.                             If c% = 1 Then
  157.                                 DestPath$ = a$
  158.                             ElseIf c% = 2 Then
  159.                                 ' nothing is changed
  160.                             End If
  161.                         End If
  162.                     Case 3 ' game standard installation
  163.                         GoSub Fileok
  164.                         CurErr% = 2
  165.                         Open "filen" For Input As #1
  166.  
  167.                         CurErr% = 0
  168.                         On Error GoTo 0
  169.                     Case 4 ' mods installation
  170.  
  171.                         GoSub Fileok
  172.                         CurErr% = 3
  173.                         Open "filen" For Input As #1
  174.  
  175.  
  176.                         CurErr% = 0
  177.                         On Error GoTo 0
  178.  
  179.                     Case 5 ' return to option menu
  180.                         PCopy 2, 0
  181.                         Exit Do
  182.                 End Select
  183.                 PCopy 2, 0
  184.             Loop
  185.  
  186.     End Select
  187.  
  188. Print "Use " + UCase$(runfile$) + " to play Stunts"
  189.  
  190. Fileok:
  191. On Error GoTo nofile
  192. If CurErr% = 0 Then CurErr% = 1
  193.  
  194. nofile:
  195. If CurErr% = 2 Then k = 4 Else k = 0
  196. ShowMessage 14, 0, 16, 19, 20, 50 + k, 0, 3, ErrMsg$(CurErr%)
  197.  
  198.  
  199. Sub ShowMessage (Fcol, Bcol, Urow, Brow, FstCo, WidthMsg, sFcol, sBcol, Msg$)
  200.     'Subroutine to show a message on the ASCII screen and restore
  201.     ' the previous screen after message has been shown
  202.     ' Usage: SHOWMESSAGE Forwardcolor, Backgroundcolor, UpRow, BottomRow,FirstColumn, WidthMessagge,shadowForwardColor,shadowBackgroundColor, Message$
  203.     Dim z As Integer
  204.  
  205.     PCopy 0, 1
  206.     Color Fcol, Bcol
  207.     For z = Urow To Brow
  208.         Locate z, FstCo: Print Space$(WidthMsg);
  209.     Next z
  210.     Color sFcol, sBcol
  211.     For z = Urow + 1 To Brow
  212.         Locate z, FstCo + WidthMsg: Print "  ";
  213.     Next z
  214.  
  215.     Locate Brow + 1, FstCo + 2: Print Space$(WidthMsg);
  216.     Color Fcol, Bcol
  217.     Locate Urow + 1, FstCo + 5: Print Msg$
  218.     a$ = Input$(1)
  219.     PCopy 1, 0
  220.  
  221.  
  222. Sub LoadConfig
  223.     'Make sure the file exists
  224.     '  Open "setup.cfg" For Binary As 1: Close 1
  225.  
  226.     Open "setup.cfg" For Input As 1
  227.     Do Until EOF(1)
  228.         Line Input #1, a$
  229.         n% = InStr(a$, "=")
  230.         If n% Then
  231.             p$ = LCase$(LTrim$(RTrim$(Left$(a$, n% - 1))))
  232.             v$ = LTrim$(RTrim$(Mid$(a$, n% + 1)))
  233.  
  234.             Select Case p$
  235.                 Case "video"
  236.                     For i% = 1 To 5
  237.                         If LCase$(v$) = LCase$(videoid$(i%)) Then
  238.                             curvideo% = i%
  239.                             Exit For
  240.                         End If
  241.                     Next i%
  242.                 Case "sound"
  243.                     For i% = 1 To 6
  244.                         If LCase$(v$) = LCase$(soundid$(i%)) Then
  245.                             cursound% = i%
  246.                             Exit For
  247.                         End If
  248.                     Next i%
  249.                 Case "runfile"
  250.                     runfile$ = Left$(v$, 12)
  251.             End Select
  252.         End If
  253.     Loop
  254.     Close 1
  255.  
  256. Function Menu% (m As MenuType, mm$, ini%)
  257.     Dim mop$(1 To 20), mops As Integer
  258.  
  259.     mt$ = mm$
  260.     Do Until Len(mt$) = 0
  261.         mops = mops + 1
  262.         n% = InStr(mt$, "`")
  263.         If n% Then
  264.             mop$(mops) = Left$(mt$, n% - 1)
  265.             mt$ = Mid$(mt$, n% + 1)
  266.         Else
  267.             mop$(mops) = mt$
  268.             mt$ = ""
  269.         End If
  270.     Loop
  271.  
  272.     Color m.c1, m.c2
  273.     Locate m.y, m.x
  274.     Print "Ú" + String$(m.w, 196) + "¿";
  275.     For i% = m.y + 1 To m.y + mops
  276.         Locate i%, m.x
  277.         Print "³ " + mop$(i% - m.y) + Space$(m.w - Len(mop$(i% - m.y)) - 1) + "³";
  278.     Next i%
  279.     Locate m.y + mops + 1, m.x
  280.     Print "À" + String$(m.w, 196) + "Ù";
  281.     Color 8, 0
  282.     For i% = m.y + 1 To m.y + mops + 1
  283.         Locate i%, m.x + m.w + 2
  284.         Print "  ";
  285.     Next i%
  286.     Locate i%, m.x + 2
  287.     Print Space$(m.w + 2);
  288.  
  289.     cur% = ini%
  290.     ex% = 1
  291.     Update% = -1
  292.     Do
  293.         If Update% Then
  294.             Color m.c1, m.c2
  295.             Locate m.y + ex%, m.x + 1
  296.             Print " " + mop$(ex%) + Space$(m.w - Len(mop$(ex%)) - 1);
  297.             Color 0, 7
  298.             Locate m.y + cur%, m.x + 1
  299.             Print " " + mop$(cur%) + Space$(m.w - Len(mop$(cur%)) - 1);
  300.             ex% = cur%
  301.             Update% = 0
  302.         End If
  303.  
  304.         akey$ = InKey$
  305.         Select Case akey$
  306.             Case Chr$(0) + Chr$(72)
  307.                 If cur% > 1 Then
  308.                     cur% = cur% - 1
  309.                 Else
  310.                     cur% = mops
  311.                 End If
  312.                 Update% = -1
  313.             Case Chr$(0) + Chr$(80)
  314.                 If cur% < mops Then
  315.                     cur% = cur% + 1
  316.                 Else
  317.                     cur% = 1
  318.                 End If
  319.                 Update% = -1
  320.             Case Chr$(13)
  321.                 Exit Do
  322.             Case Chr$(27)
  323.                 cur% = -1
  324.                 Exit Do
  325.         End Select
  326.     Loop
  327.  
  328.     Menu% = cur%
  329.  
  330. Sub SaveConfig
  331.     Open "setup.cfg" For Output As 1
  332.     Print #1, "video=" + videoid$(curvideo%)
  333.     Print #1, "sound=" + soundid$(cursound%)
  334.     Print #1, "runfile=" + runfile$
  335.     Close 1
  336.  
  337. Sub UpdateOp (oplist$, num%, opval$, length%)
  338.     Dim op$(1 To 20)
  339.  
  340.     o$ = oplist$ ' oplist$ is a string of name of items of menu separated by ' except the last one
  341.     Do While Len(o$)
  342.         ops% = ops% + 1
  343.         n% = InStr(o$, "`")
  344.         If n% Then
  345.             op$(ops%) = Left$(o$, n% - 1)
  346.             o$ = Mid$(o$, n% + 1)
  347.         Else
  348.             op$(ops%) = o$
  349.             o$ = ""
  350.         End If
  351.     Loop
  352.  
  353.     For i% = Len(op$(num%)) To 1 Step -1
  354.         If Mid$(op$(num%), i%, 1) = "(" Then Exit For
  355.     Next i%
  356.  
  357.     If i% Then op$(num%) = RTrim$(Left$(op$(num%), i% - 1))
  358.  
  359.     op$(num%) = op$(num%) + Space$(length% - Len(op$(num%)) - Len(opval$) - 2)
  360.     op$(num%) = op$(num%) + "(" + opval$ + ")"
  361.  
  362.     o$ = ""
  363.     For i% = 1 To ops%
  364.         o$ = o$ + op$(i%)
  365.         If i% <> ops% Then o$ = o$ + "`"
  366.     Next i%
  367.  
  368.     oplist$ = o$
  369.  
  370. Sub UpdateRunFile
  371.     Open runfile$ For Output As 1
  372.     If videoid$(curvideo%) = "Tandy" Then
  373.         v$ = "TDY"
  374.     ElseIf videoid$(curvideo%) = "Hercules" Then
  375.         v$ = "HERC"
  376.     Else
  377.         v$ = videoid$(curvideo%)
  378.     End If
  379.  
  380.     Print #1, "@SKID" + v$ + ".EXE";
  381.  
  382.     Select Case cursound%
  383.         Case 1: Print #1, " /spc /ns"
  384.         Case 2: Print #1, " /spc"
  385.         Case 3: Print #1, " /std"
  386.         Case 4: Print #1, " /sad"
  387.         Case 5: Print #1, " /ssb"
  388.         Case 6: Print #1, " /smt"
  389.         Case Else: Print #1,
  390.     End Select
  391.     Close 1
  392.  
  393. Sub header
  394.     'Color 15, 7
  395.     Cls , 7
  396.     Color 0, 3
  397.     Locate 25, 1
  398.     Print Space$(4) + Chr$(24) + " " + Chr$(25) + " to move highlight, ENTER to select option, ESC to exit, F1 for help" + Space$(5);
  399.     Color 15, 1
  400.     Locate 2, 3: Print Space$(74);
  401.     Locate 3, 3: Print Space$(74);
  402.     Locate 4, 3: Print Space$(74);
  403.     Color 8, 0: Locate 5, 5: Print Space$(74)
  404.     Locate 3, 77: Print "  ";: Locate 4, 77: Print "  ";
  405.     Color 15, 1
  406.     Locate 2, 28: Print Chr$(34) + "Stunts" + Chr$(34) + " Setup Program";
  407.     Locate 3, 34: Print "Version 1.1";
  408.     Locate 4, 18: Print "Copyright (c) 2021 Stunts Online Community";
waiting your feedback I hope it would be useful.
Title: Re: Project looking for Programmer (I can't do it myself)
Post by: Daniel3D on November 08, 2021, 08:29:53 am
Hi,
sorry for the late reply. Life happens sometimes.
It looks very good. Good menu structure. very close to what i have in mind.

About the mods. In principle all mods are installed in the game directory. The only exception is cars. They van be in the game dir or in the garage. The game has a 32 car limit, so the option to park them in the garage is needed.

A small alteration to the menu (but a maybe a lot of work, so optional. The way it is, is good enough)
Now you have


Can you make it sequential?


if you run it them after each other or the same one again, the earlier selected source and destination should be opted for that session.
Title: Re: Project looking for Programmer (I can't do it myself)
Post by: TempodiBasic on November 08, 2021, 12:37:37 pm
Hi Daniel3D
fine to see your feedback.

1. about
Quote
Can you make it sequential?
instal game > enter source > enter destination
install mod > enter source > enter destination.
Q1: Moving voices of menu isn't so hard... but let's talk about source and destination paths:
I think that it must be a value of default for the path and the destination, moreover the user can change one or both the paths manually. If you like to memorize the last used paths it is possible to do. Or do you prefer to memorize only the last paths used?

Q2: you prefer a sequential method, user chooses what to install, user chooses from where, user chooses to where...
if no new path is entered user uses a previous path... so the question is
"Do you like to use the last previous path or the Default path?"

about
"Original STUNTS and MODs"

Q1:  is good for installation the version that I have got from abandonware site? (about 210 files) I have downloaded both the game both the manual for security answer.

Q2: on the website that you have linked before http://stunts.kalpen.de/stunts.htm (http://stunts.kalpen.de/stunts.htm) there is also the last version 1.1, is there some substantial difference? And if yes, what is the final version of game that will be installed?

Q3: Are MOD's files grouped following a standard structure or no?
It is clear to me that cars are max 32 in the main directory, the rest are in the garage (folder garage) and a separate module to install only MODs is useful to change the set of 32 cars loaded into game.

waiting your Answers...
Title: Re: Project looking for Programmer (I can't do it myself)
Post by: Daniel3D on November 09, 2021, 06:00:53 am
Hi Daniel3D
fine to see your feedback.

1. about Q1: Moving voices of menu isn't so hard... but let's talk about source and destination paths:
I think that it must be a value of default for the path and the destination, moreover the user can change one or both the paths manually. If you like to memorize the last used paths it is possible to do. Or do you prefer to memorize only the last paths used?
als default source i would take "A:\"
as default destination i would take "c:\"
For game installation it should add the game folder (STUNTS), i forgot to specify that.
It is a good idea to store that path as the current game folder. (in this scenario it would default to "C:\STUNTS\) in a file for later sessions
Quote
Q2: you prefer a sequential method, user chooses what to install, user chooses from where, user chooses to where...
if no new path is entered user uses a previous path... so the question is
"Do you like to use the last previous path or the Default path?"
The source should be default "a:\" but if this is changed within the session it should show the latest used first. But not stored after the session closes.
For install game again show the folder without \STUNTS\, if it is a know game directory, ask for overwrite.
For install mod show the folder with \STUNTS\
Quote

about
"Original STUNTS and MODs"

Q1:  is good for installation the version that I have got from abandonware site? (about 210 files) I have downloaded both the game both the manual for security answer.
Install game: installs the game as it is, including all mods that are there. Deinstallation of mods is something for later. Cars can be deinstalled, but placing them in the garage is sufficient. Deinstallation of cars will be implemented in the garage program.
Quote
Q2: on the website that you have linked before http://stunts.kalpen.de/stunts.htm (http://stunts.kalpen.de/stunts.htm) there is also the last version 1.1, is there some substantial difference? And if yes, what is the final version of game that will be installed?
Honest answer, there might never be a final version. The tree.txt that I made contains the version that will be for now (except sgar that is a mod, and the garage dir contains modded cars that are not part of the official release). Included a cleaned up version of the game tree.
Quote
Q3: Are MOD's files grouped following a standard structure or no?
It is clear to me that cars are max 32 in the main directory, the rest are in the garage (folder garage) and a separate module to install only MODs is useful to change the set of 32 cars loaded into game.
Mod programs and files should be installed in the game dir.. Cars should go in the garage if present. The game doesn't break if more than 32 cars are in the game folder. It will only list the first 32.
Quote

waiting your Answers...
Thanks for the quick reply.
Title: Re: Project looking for Programmer (I can't do it myself)
Post by: Daniel3D on November 09, 2021, 06:11:15 am
Afther thought.
cars are grouped in 4 files. It would be noob friendly if it could detect cars and show the car name, or just the res filename as car name, and treat the 4 files as one.

I don't know the way to extract the car name from the res file. It is code in sgar.bas.
I kind of fear that if I'm too demanding in my wishes you might not want to do it any more..

EDIT:
I forgot that basic is easier to read than assembly. So I looked it up,
Code: [Select]
Sub ExtractCarName (c As Car, path As String)
If Len(c.file(1)) = 0 Then
c.carname = "Unknown"
Exit Sub
End If

Dim f As Integer, s As String, n As Short, l As Long

f = FreeFile
Open path & SLASH & c.file(1) For Binary Access Read As f
s = Space(100)
Get #f, , s
n = InStr(s, "gnam")
Get #f, n + 16, l
l += 39
s = Space(255)
Get #f, l, s
n = InStr(s, Chr(0))
If n Then s = Left(s, n - 1) Else s = Left(s, 40)
Close f

c.carname = s
End Sub
It starts from line 180 if you would like to see the context.
Title: Re: Project looking for Programmer (I can't do it myself)
Post by: Daniel3D on November 12, 2021, 05:45:13 pm
I have tried to run in DOSBOX the sgar.exe posted into .ZIP as compiled of installer freebasic version, but I got error that you can see in screenshot after.
  [ This attachment cannot be displayed inline in 'Print Page' view ]  
Sorry i missed this part
Dosbox removed support for this in a version for some reason. Easy to fix.
https://dosgames.com/utilities.php#extenders (https://dosgames.com/utilities.php#extenders)

Quote
Ever try to run a game and get an error like:
Load error: no DPMI - Get csdpmi*b.zip
You need a DPMI server, and the most popular is CWSDPMI. Unzip the CWSDMPI.EXE file into the game's directory and try running it again, it should work.
Title: Re: Project looking for Programmer (I can't do it myself)
Post by: TempodiBasic on November 13, 2021, 07:22:29 pm
Hi Daniel5D
here another step of development of STUNTS under DOS.

Code: QB64: [Select]
  1. ' 2021 11 13, Modifications to Installation menu
  2. ' 3 choices: install game, install mods, exit from installation
  3. DECLARE SUB UpdateRunFile ()
  4. DECLARE SUB SaveConfig ()
  5. DECLARE SUB LoadConfig ()
  6. DECLARE SUB UpdateOp (oplist$, num%, opval$, length%)
  7. DECLARE FUNCTION Menu% (m AS ANY, mm$, ini%)
  8. declare sub header
  9. declare sub changepath (kind as integer)
  10.  
  11. Type MenuType
  12.     x As Integer
  13.     y As Integer
  14.     c1 As Integer
  15.     c2 As Integer
  16.     w As Integer
  17.  
  18. Const Spath = "A:\", Dpath = "C:\STUNTS", Source = 1, Destination = 2
  19. Const MainWin = 1, InstallWin = 2, MsgWin = 7
  20. Dim Shared men(1 To 5) As MenuType, ment$(1 To 5), ErrMsg$(1 To 3), CurErr%
  21. Dim Shared videoid$(1 To 5), soundid$(1 To 6), curvideo%, cursound%, Mpath$(1 To 5, 1 To 2)
  22. Dim Shared runfile$, SourcePath$, DestPath$, DummyCurpath%, DefaultSourcePath$, DefaultDestinationpath$
  23.  
  24. runfile$ = "STUNTS.BAT"
  25. Defaultsourcepat$ = Spath
  26. DefaultDestinationpath$ = Dpath
  27. SourcePath$ = ".\"
  28. DestPath$ = "c:\cs11"
  29. DummyCurpath% = 1
  30.  
  31. videoid$(1) = "MCGA"
  32. videoid$(2) = "EGA"
  33. videoid$(3) = "Tandy"
  34. videoid$(4) = "Hercules"
  35. videoid$(5) = "CGA"
  36. curvideo% = 1
  37.  
  38. soundid$(1) = "No sound"
  39. soundid$(2) = "PC Speaker"
  40. soundid$(3) = "Tandy"
  41. soundid$(4) = "Ad Lib"
  42. soundid$(5) = "Sound Blaster"
  43. soundid$(6) = "MT-32"
  44. cursound% = 1
  45.  
  46.  
  47. header
  48.  
  49. men(1).x = 4
  50. men(1).y = 7
  51. men(1).w = 40
  52. men(1).c1 = 7
  53. men(1).c2 = 4
  54. ment$(1) = "Video display`Sound option`Install game to ...`Exit"
  55.  
  56. men(2).x = 13
  57. men(2).y = 12
  58. men(2).w = 27
  59. men(2).c1 = 0
  60. men(2).c2 = 2
  61. ment$(2) = "MGCA/VGA graphics`EGA graphics`Tandy graphics`Hercules graphics`CGA graphics"
  62.  
  63. men(3).x = 11
  64. men(3).y = 12
  65. men(3).w = 34
  66. men(3).c1 = 0
  67. men(3).c2 = 2
  68. ment$(3) = "No music or sound effects`Internal PC speaker`Tandy sound`Ad Lib card`Sound Blaster card`Roland MT-32"
  69.  
  70.  
  71. men(4).x = 11
  72. men(4).y = 12
  73. men(4).w = 40
  74. men(4).c1 = 0
  75. men(4).c2 = 1
  76. ment$(4) = "Install game`Install mods`Exit"
  77.  
  78.  
  79. men(5).x = 67
  80. men(5).y = 15
  81. men(5).w = 10
  82. men(5).c1 = 0
  83. men(5).c2 = 4
  84. ment$(5) = "Yes`No`Cancel"
  85.  
  86. ErrMsg$(1) = "Error: file of configuration not found"
  87. ErrMsg$(2) = "Error: file of original installation not found"
  88. ErrMsg$(3) = "Error: file of Mods installation not found"
  89. CurErr% = 0
  90.  
  91. Mpath$(1, Source) = "Caution you are changing default source path!"
  92. Mpath$(2, Source) = "Type here source path: "
  93. Mpath$(3, Source) = "This is the new source path: "
  94.  
  95. Mpath$(1, Destination) = "Caution you are changing default destination path!"
  96. Mpath$(2, Destination) = "Type here destination path: "
  97. Mpath$(3, Destination) = "This is the new destination path: "
  98.  
  99.  
  100. GoSub Fileok
  101. LoadConfig
  102.  
  103. UpdateOp ment$(1), 1, videoid$(curvideo%), men(1).w - 2
  104. UpdateOp ment$(1), 2, soundid$(cursound%), men(1).w - 2
  105.  
  106. curmain% = 1
  107.     a% = Menu%(men(1), ment$(1), curmain%)
  108.     If a% <> -1 Then curmain% = a%
  109.     Select Case a%
  110.         Case -1 ' exiting by EScape key from menu
  111.             Color 7, 0
  112.             Cls
  113.             Print
  114.             Exit Do
  115.         Case 4 'saving configuration
  116.             SaveConfig
  117.             UpdateRunFile
  118.             Color 7, 0
  119.             Cls
  120.             Print
  121.             Print "Configuration saved."
  122.             Exit Do
  123.         Case 1 'video display settings
  124.             PCopy 0, MainWin
  125.             a% = Menu%(men(2), ment$(2), curvideo%)
  126.             If a% <> -1 Then curvideo% = a%
  127.             UpdateOp ment$(1), 1, videoid$(curvideo%), men(1).w - 2
  128.             PCopy MainWin, 0
  129.         Case 2 ' sound options
  130.             PCopy 0, MainWin
  131.             a% = Menu%(men(3), ment$(3), cursound%)
  132.             If a% <> -1 Then cursound% = a%
  133.             UpdateOp ment$(1), 2, soundid$(cursound%), men(1).w - 2
  134.             PCopy MainWin, 0
  135.         Case 3 'install options....
  136.             ' here user can choose  installation of original game
  137.             ' adding mods
  138.             ' after doing this he can choose destination folder, source folder
  139.             PCopy 0, MainWin
  140.             Do
  141.  
  142.                 b% = Menu%(men(4), ment$(4), DummyCurpath%)
  143.                 PCopy 0, InstallWin
  144.                 Select Case b%
  145.                     Case 1 ' game standard installation
  146.                         ChangePath Source
  147.                         PCopy InstallWin, 0
  148.                         ChangePath Destination
  149.                         GoSub Fileok
  150.                         CurErr% = 2
  151.                         '       Open "filen" For Input As #1
  152.  
  153.                         CurErr% = 0
  154.                         On Error GoTo 0
  155.                         PCopy InstallWin, 0
  156.  
  157.  
  158.                     Case 2 ' mods installation
  159.                         ChangePath Source
  160.                         PCopy InstallWin, 0
  161.                         ChangePath Destination
  162.  
  163.                         GoSub Fileok
  164.                         CurErr% = 3
  165.                         '  Open "filen" For Input As #1
  166.  
  167.  
  168.                         CurErr% = 0
  169.                         On Error GoTo 0
  170.                         PCopy InstallWin, 0
  171.  
  172.                     Case 3 ' return to option menu
  173.                         PCopy MainWin, 0
  174.                         Exit Do
  175.  
  176.                 End Select
  177.  
  178.             Loop
  179.  
  180.     End Select
  181.  
  182. Print "Use " + UCase$(runfile$) + " to play Stunts"
  183.  
  184. Fileok:
  185. On Error GoTo nofile
  186. If CurErr% = 0 Then CurErr% = 1
  187.  
  188. nofile:
  189. If CurErr% = 2 Then k = 4 Else k = 0
  190. ShowMessage 14, 0, 16, 19, 20, 50 + k, 0, 3, ErrMsg$(CurErr%)
  191.  
  192. Sub ChangePath (Mtype As Integer)
  193.     If Mtype = Source Then Apath$ = SourcePath$ Else Apath$ = DestPath$
  194.     ShowMessage 14, 0, 16, 19, 15, 56, 0, 3, Mpath$(1, Mtype)
  195.     Locate 19, 20: Color 14, 0: Print "Actual path: "; Apath$
  196.     Locate 20, 20:
  197.     If Mtype = Source Then
  198.         Input "Type here source path: ", a$
  199.     ElseIf Mtype = Destination Then
  200.         Input "Type here destination path: ", a$
  201.     End If
  202.  
  203.     If a$ = "" Or a$ = Apath$ Then
  204.         Locate 21, 20: Print " No new path": Sleep 1
  205.     Else
  206.         Locate 21, 20: Print Mpath$(3, Mtype); UCase$(a$); " , do you confirm?"
  207.         c% = Menu%(men(5), ment$(5), DummyCurpath%)
  208.         If c% = 1 Then
  209.             Apath$ = a$
  210.             If Mtype = Source Then SourcePath$ = Apath$ Else DestPath$ = Apath$
  211.         ElseIf c% = 2 Then
  212.             ' nothing is changed
  213.         End If
  214.     End If
  215.  
  216.  
  217.  
  218. Sub ShowMessage (Fcol, Bcol, Urow, Brow, FstCo, WidthMsg, sFcol, sBcol, Msg$)
  219.     'Subroutine to show a message on the ASCII screen and restore
  220.     ' the previous screen after message has been shown
  221.     ' Usage: SHOWMESSAGE Forwardcolor, Backgroundcolor, UpRow, BottomRow,FirstColumn, WidthMessagge,shadowForwardColor,shadowBackgroundColor, Message$
  222.     Dim z As Integer
  223.  
  224.     PCopy 0, MsgWin
  225.     Color Fcol, Bcol
  226.     For z = Urow To Brow
  227.         Locate z, FstCo: Print Space$(WidthMsg);
  228.     Next z
  229.     Color sFcol, sBcol
  230.     For z = Urow + 1 To Brow
  231.         Locate z, FstCo + WidthMsg: Print "  ";
  232.     Next z
  233.  
  234.     Locate Brow + 1, FstCo + 2: Print Space$(WidthMsg);
  235.     Color Fcol, Bcol
  236.     Locate Urow + 1, FstCo + 5: Print Msg$
  237.     Sleep 2
  238.     PCopy MsgWin, 0
  239.  
  240. Sub LoadConfig
  241.     'Make sure the file exists
  242.     '  Open "setup.cfg" For Binary As 1: Close 1
  243.  
  244.     Open "setup.cfg" For Input As 1
  245.     Do Until EOF(1)
  246.         Line Input #1, a$
  247.         n% = InStr(a$, "=")
  248.         If n% Then
  249.             p$ = LCase$(LTrim$(RTrim$(Left$(a$, n% - 1))))
  250.             v$ = LTrim$(RTrim$(Mid$(a$, n% + 1)))
  251.  
  252.             Select Case p$
  253.                 Case "video"
  254.                     For i% = 1 To 5
  255.                         If LCase$(v$) = LCase$(videoid$(i%)) Then
  256.                             curvideo% = i%
  257.                             Exit For
  258.                         End If
  259.                     Next i%
  260.                 Case "sound"
  261.                     For i% = 1 To 6
  262.                         If LCase$(v$) = LCase$(soundid$(i%)) Then
  263.                             cursound% = i%
  264.                             Exit For
  265.                         End If
  266.                     Next i%
  267.                 Case "runfile"
  268.                     runfile$ = Left$(v$, 12)
  269.             End Select
  270.         End If
  271.     Loop
  272.     Close 1
  273.  
  274. Function Menu% (m As MenuType, mm$, ini%)
  275.     Dim mop$(1 To 20), mops As Integer
  276.  
  277.     mt$ = mm$
  278.     Do Until Len(mt$) = 0
  279.         mops = mops + 1
  280.         n% = InStr(mt$, "`")
  281.         If n% Then
  282.             mop$(mops) = Left$(mt$, n% - 1)
  283.             mt$ = Mid$(mt$, n% + 1)
  284.         Else
  285.             mop$(mops) = mt$
  286.             mt$ = ""
  287.         End If
  288.     Loop
  289.  
  290.     Color m.c1, m.c2
  291.     Locate m.y, m.x
  292.     Print "Ú" + String$(m.w, 196) + "¿";
  293.     For i% = m.y + 1 To m.y + mops
  294.         Locate i%, m.x
  295.         Print "³ " + mop$(i% - m.y) + Space$(m.w - Len(mop$(i% - m.y)) - 1) + "³";
  296.     Next i%
  297.     Locate m.y + mops + 1, m.x
  298.     Print "À" + String$(m.w, 196) + "Ù";
  299.     Color 8, 0
  300.     For i% = m.y + 1 To m.y + mops + 1
  301.         Locate i%, m.x + m.w + 2
  302.         Print "  ";
  303.     Next i%
  304.     Locate i%, m.x + 2
  305.     Print Space$(m.w + 2);
  306.  
  307.     cur% = ini%
  308.     ex% = 1
  309.     Update% = -1
  310.     Do
  311.         If Update% Then
  312.             Color m.c1, m.c2
  313.             Locate m.y + ex%, m.x + 1
  314.             Print " " + mop$(ex%) + Space$(m.w - Len(mop$(ex%)) - 1);
  315.             Color 0, 7
  316.             Locate m.y + cur%, m.x + 1
  317.             Print " " + mop$(cur%) + Space$(m.w - Len(mop$(cur%)) - 1);
  318.             ex% = cur%
  319.             Update% = 0
  320.         End If
  321.  
  322.         akey$ = InKey$
  323.         Select Case akey$
  324.             Case Chr$(0) + Chr$(72)
  325.                 If cur% > 1 Then
  326.                     cur% = cur% - 1
  327.                 Else
  328.                     cur% = mops
  329.                 End If
  330.                 Update% = -1
  331.             Case Chr$(0) + Chr$(80)
  332.                 If cur% < mops Then
  333.                     cur% = cur% + 1
  334.                 Else
  335.                     cur% = 1
  336.                 End If
  337.                 Update% = -1
  338.             Case Chr$(13)
  339.                 Exit Do
  340.             Case Chr$(27)
  341.                 cur% = -1
  342.                 Exit Do
  343.         End Select
  344.     Loop
  345.  
  346.     Menu% = cur%
  347.  
  348. Sub SaveConfig
  349.     Open "setup.cfg" For Output As 1
  350.     Print #1, "video=" + videoid$(curvideo%)
  351.     Print #1, "sound=" + soundid$(cursound%)
  352.     Print #1, "runfile=" + runfile$
  353.     Close 1
  354.  
  355. Sub UpdateOp (oplist$, num%, opval$, length%)
  356.     Dim op$(1 To 20)
  357.  
  358.     o$ = oplist$ ' oplist$ is a string of name of items of menu separated by ' except the last one
  359.     Do While Len(o$)
  360.         ops% = ops% + 1
  361.         n% = InStr(o$, "`")
  362.         If n% Then
  363.             op$(ops%) = Left$(o$, n% - 1)
  364.             o$ = Mid$(o$, n% + 1)
  365.         Else
  366.             op$(ops%) = o$
  367.             o$ = ""
  368.         End If
  369.     Loop
  370.  
  371.     For i% = Len(op$(num%)) To 1 Step -1
  372.         If Mid$(op$(num%), i%, 1) = "(" Then Exit For
  373.     Next i%
  374.  
  375.     If i% Then op$(num%) = RTrim$(Left$(op$(num%), i% - 1))
  376.  
  377.     op$(num%) = op$(num%) + Space$(length% - Len(op$(num%)) - Len(opval$) - 2)
  378.     op$(num%) = op$(num%) + "(" + opval$ + ")"
  379.  
  380.     o$ = ""
  381.     For i% = 1 To ops%
  382.         o$ = o$ + op$(i%)
  383.         If i% <> ops% Then o$ = o$ + "`"
  384.     Next i%
  385.  
  386.     oplist$ = o$
  387.  
  388. Sub UpdateRunFile
  389.     Open runfile$ For Output As 1
  390.     If videoid$(curvideo%) = "Tandy" Then
  391.         v$ = "TDY"
  392.     ElseIf videoid$(curvideo%) = "Hercules" Then
  393.         v$ = "HERC"
  394.     Else
  395.         v$ = videoid$(curvideo%)
  396.     End If
  397.  
  398.     Print #1, "@SKID" + v$ + ".EXE";
  399.  
  400.     Select Case cursound%
  401.         Case 1: Print #1, " /spc /ns"
  402.         Case 2: Print #1, " /spc"
  403.         Case 3: Print #1, " /std"
  404.         Case 4: Print #1, " /sad"
  405.         Case 5: Print #1, " /ssb"
  406.         Case 6: Print #1, " /smt"
  407.         Case Else: Print #1,
  408.     End Select
  409.     Close 1
  410.  
  411. Sub header
  412.     'Color 15, 7
  413.     Cls , 7
  414.     Color 0, 3
  415.     Locate 25, 1
  416.     Print Space$(4) + Chr$(24) + " " + Chr$(25) + " to move highlight, ENTER to select option, ESC to exit, F1 for help" + Space$(5);
  417.     Color 15, 1
  418.     Locate 2, 3: Print Space$(74);
  419.     Locate 3, 3: Print Space$(74);
  420.     Locate 4, 3: Print Space$(74);
  421.     Color 8, 0: Locate 5, 5: Print Space$(74)
  422.     Locate 3, 77: Print "  ";: Locate 4, 77: Print "  ";
  423.     Color 15, 1
  424.     Locate 2, 28: Print Chr$(34) + "Stunts" + Chr$(34) + " Setup Program";
  425.     Locate 3, 34: Print "Version 1.1";
  426.     Locate 4, 18: Print "Copyright (c) 2021 Stunts Online Community";
  427.  
Just to go on:
you must post here a definitive list of original (NO MODS)  files of the game Stunts.
as you can see from screenshot below there are some differences between you list TREESTU1.TXT and my list
LIST.TXT made on a folder of stunts got from abandonware.

  [ This attachment cannot be displayed inline in 'Print Page' view ]  

To solve DOSBOX issue to run sgar, for now it doesn't matter.
Waiting your answer....
Title: Re: Project looking for Programmer (I can't do it myself)
Post by: Daniel3D on November 15, 2021, 04:32:27 am
The point of the whole new setup and installer is just what you see.
We compiled the executables again to be more original then the original release. (It was originally released with a space saving modification that hurts performance)
So there is a difference between your original and the new original.
TREESTU1 is the correct file list.

Additionally, your copy from abandon ware is not original either. Many trk files are player generated content.

The HDR and COD files are integrated into the executables now. Stunts.com and load.exe have been replaced.
Title: Re: Project looking for Programmer (I can't do it myself)
Post by: TempodiBasic on November 21, 2021, 08:16:00 pm
Hi Daniel3D
huh, interesting notice
Quote
TREESTU1 is the correct file list
I have had some time to spend with QB64, so I make another step towards the final  application ofinstaller

here code running pure Qbasic

Code: QB64: [Select]
  1. ' 2021 11 21 adding and testing procedure to copy original files from source path to destination path
  2. ' 2021 11 13, Modifications to Installation menu
  3. ' 3 choices: install game, install mods, exit from installation
  4. DECLARE SUB UpdateRunFile ()
  5. DECLARE SUB SaveConfig ()
  6. DECLARE SUB LoadConfig ()
  7. DECLARE SUB UpdateOp (oplist$, num%, opval$, length%)
  8. DECLARE FUNCTION Menu% (m AS ANY, mm$, ini%)
  9. declare sub header
  10. declare sub changepath (kind as integer)
  11.  
  12. Type MenuType
  13.     x As Integer
  14.     y As Integer
  15.     c1 As Integer
  16.     c2 As Integer
  17.     w As Integer
  18.  
  19. Const Spath = "A:\", Dpath = "C:\STUNTS", Source = 1, Destination = 2
  20. Const MainWin = 1, InstallWin = 2, MsgWin = 7
  21. Dim Shared men(1 To 5) As MenuType, ment$(1 To 5), ErrMsg$(1 To 4), CurErr%
  22. Dim Shared videoid$(1 To 5), soundid$(1 To 6), curvideo%, cursound%, Mpath$(1 To 5, 1 To 2)
  23. Dim Shared runfile$, SourcePath$, DestPath$, DummyCurpath%, DefaultSourcePath$, DefaultDestinationpath$
  24. Dim Shared InstFile(1 To 250) As String
  25.  
  26. runfile$ = "STUNTS.BAT"
  27. Defaultsourcepat$ = Spath
  28. DefaultDestinationpath$ = Dpath
  29. SourcePath$ = ".\"
  30. DestPath$ = ".\cs11"
  31. DummyCurpath% = 1
  32.  
  33. videoid$(1) = "MCGA"
  34. videoid$(2) = "EGA"
  35. videoid$(3) = "Tandy"
  36. videoid$(4) = "Hercules"
  37. videoid$(5) = "CGA"
  38. curvideo% = 1
  39.  
  40. soundid$(1) = "No sound"
  41. soundid$(2) = "PC Speaker"
  42. soundid$(3) = "Tandy"
  43. soundid$(4) = "Ad Lib"
  44. soundid$(5) = "Sound Blaster"
  45. soundid$(6) = "MT-32"
  46. cursound% = 1
  47.  
  48.  
  49. header
  50.  
  51. men(1).x = 4
  52. men(1).y = 7
  53. men(1).w = 40
  54. men(1).c1 = 7
  55. men(1).c2 = 4
  56. ment$(1) = "Video display`Sound option`Install game to ...`Exit"
  57.  
  58. men(2).x = 13
  59. men(2).y = 12
  60. men(2).w = 27
  61. men(2).c1 = 0
  62. men(2).c2 = 2
  63. ment$(2) = "MGCA/VGA graphics`EGA graphics`Tandy graphics`Hercules graphics`CGA graphics"
  64.  
  65. men(3).x = 11
  66. men(3).y = 12
  67. men(3).w = 34
  68. men(3).c1 = 0
  69. men(3).c2 = 2
  70. ment$(3) = "No music or sound effects`Internal PC speaker`Tandy sound`Ad Lib card`Sound Blaster card`Roland MT-32"
  71.  
  72.  
  73. men(4).x = 11
  74. men(4).y = 12
  75. men(4).w = 40
  76. men(4).c1 = 0
  77. men(4).c2 = 1
  78. ment$(4) = "Install game`Install mods`Exit"
  79.  
  80.  
  81. men(5).x = 67
  82. men(5).y = 15
  83. men(5).w = 10
  84. men(5).c1 = 0
  85. men(5).c2 = 4
  86. ment$(5) = "Yes`No`Cancel"
  87.  
  88. ErrMsg$(1) = "Error: file of configuration not found"
  89. ErrMsg$(2) = "Error: file of list of installation not found"
  90. ErrMsg$(3) = "Error: file of original installation not found"
  91. ErrMsg$(4) = "Error: file of Mods installation not found"
  92. CurErr% = 0
  93.  
  94. Mpath$(1, Source) = "Caution you are changing default source path!"
  95. Mpath$(2, Source) = "Type here source path: "
  96. Mpath$(3, Source) = "This is the new source path: "
  97.  
  98. Mpath$(1, Destination) = "Caution you are changing default destination path!"
  99. Mpath$(2, Destination) = "Type here destination path: "
  100. Mpath$(3, Destination) = "This is the new destination path: "
  101.  
  102.  
  103. GoSub Fileok
  104. LoadConfig
  105.  
  106. ' loading list file installation
  107. GoSub Fileok
  108. CurErr% = 2
  109.  
  110. Open "liststu.txt" For Input As #1
  111. z = 0
  112.     z = z + 1
  113.     Line Input #1, tmp$
  114.     If InStr(tmp$, ".") Then InstFile(z) = tmp$ Else z = z - 1
  115.     'Print InstFile(z), z
  116.     'If z Mod 20 = 0 Then Sleep
  117. CurErr% = 0
  118.  
  119. UpdateOp ment$(1), 1, videoid$(curvideo%), men(1).w - 2
  120. UpdateOp ment$(1), 2, soundid$(cursound%), men(1).w - 2
  121.  
  122. curmain% = 1
  123.     a% = Menu%(men(1), ment$(1), curmain%)
  124.     If a% <> -1 Then curmain% = a%
  125.     Select Case a%
  126.         Case -1 ' exiting by EScape key from menu
  127.             Color 7, 0
  128.             Cls
  129.             Print
  130.             Exit Do
  131.         Case 4 'saving configuration
  132.             SaveConfig
  133.             UpdateRunFile
  134.             Color 7, 0
  135.             Cls
  136.             Print
  137.             Print "Configuration saved."
  138.             Exit Do
  139.         Case 1 'video display settings
  140.             PCopy 0, MainWin
  141.             a% = Menu%(men(2), ment$(2), curvideo%)
  142.             If a% <> -1 Then curvideo% = a%
  143.             UpdateOp ment$(1), 1, videoid$(curvideo%), men(1).w - 2
  144.             PCopy MainWin, 0
  145.         Case 2 ' sound options
  146.             PCopy 0, MainWin
  147.             a% = Menu%(men(3), ment$(3), cursound%)
  148.             If a% <> -1 Then cursound% = a%
  149.             UpdateOp ment$(1), 2, soundid$(cursound%), men(1).w - 2
  150.             PCopy MainWin, 0
  151.         Case 3 'install options....
  152.             ' here user can choose  installation of original game
  153.             ' adding mods
  154.             ' after doing this he can choose destination folder, source folder
  155.             PCopy 0, MainWin
  156.             Do
  157.  
  158.                 b% = Menu%(men(4), ment$(4), DummyCurpath%)
  159.                 PCopy 0, InstallWin
  160.                 Select Case b%
  161.                     Case 1 ' game standard installation
  162.                         ChangePath Source
  163.                         PCopy InstallWin, 0
  164.                         ChangePath Destination
  165.                         GoSub Fileok
  166.                         CurErr% = 3
  167.                         If Right$(SourcePath$, 1) <> "\" Then Slash$ = "\" Else Slash$ = ""
  168.                         If Right$(DestPath$, 1) <> "\" Then Slash2$ = "\" Else Slash2$ = ""
  169.                         For w = 1 To z Step 1
  170.                             nameFile$ = SourcePath$ + Slash$ + LTrim$(InstFile(w))
  171.                             Locate 20, 1: Print nameFile$; "  ";
  172.                             namefile2$ = DestPath$ + Slash2$ + LTrim$(InstFile(w))
  173.                             Open nameFile$ For Input As #1
  174.                             tmp$ = Input$(LOF(1), # 1)
  175.                             Close #1
  176.                             MkDir DestPath$ + Slash2$
  177.                             Open namefile2$ For Binary As #1
  178.                             Put #1, , tmp$
  179.                             Close #1
  180.                             tmp$ = ""
  181.                         Next w
  182.                         CurErr% = 0
  183.                         On Error GoTo 0
  184.                         PCopy InstallWin, 0
  185.  
  186.  
  187.                     Case 2 ' mods installation
  188.                         ChangePath Source
  189.                         PCopy InstallWin, 0
  190.                         ChangePath Destination
  191.  
  192.                         GoSub Fileok
  193.                         CurErr% = 4
  194.  
  195.                         '  Open "filen" For Input As #1
  196.  
  197.  
  198.                         CurErr% = 0
  199.                         On Error GoTo 0
  200.                         PCopy InstallWin, 0
  201.  
  202.                     Case 3 ' return to option menu
  203.                         PCopy MainWin, 0
  204.                         Exit Do
  205.  
  206.                 End Select
  207.  
  208.             Loop
  209.  
  210.     End Select
  211.  
  212. Print "Use " + UCase$(runfile$) + " to play Stunts"
  213.  
  214. Fileok:
  215. On Error GoTo nofile
  216. If CurErr% = 0 Then CurErr% = 1
  217.  
  218. nofile:
  219. If CurErr% = 2 Or CurErr% = 3 Then k = 4 Else k = 0
  220. ShowMessage 14, 0, 16, 19, 20, 50 + k, 0, 3, ErrMsg$(CurErr%)
  221. If CurErr% = 3 Or CurErr% = 4 Then
  222.     If tmp$ = "" Then Filename$ = nameFile$ Else Filename$ = namefile2$
  223.     ShowMessage 14, 0, 16, 19, 20, 50, 0, 3, "File error: " + Filename$
  224.     Resume Next
  225.  
  226. Sub ChangePath (Mtype As Integer)
  227.     If Mtype = Source Then
  228.         Apath$ = SourcePath$
  229.         k = 0
  230.     Else
  231.         Apath$ = DestPath$
  232.         k = 4
  233.     End If
  234.     ShowMessage 14, 0, 16, 19, 15, 56 + k, 0, 3, Mpath$(1, Mtype)
  235.     Locate 19, 20: Color 14, 0: Print "Actual path: "; Apath$
  236.     Locate 20, 20:
  237.     If Mtype = Source Then
  238.         Input "Type here source path: ", a$
  239.     ElseIf Mtype = Destination Then
  240.         Input "Type here destination path: ", a$
  241.     End If
  242.  
  243.     If a$ = "" Or a$ = Apath$ Then
  244.         Locate 21, 20: Print " No new path": Sleep 1
  245.     Else
  246.         Locate 21, 20: Print Mpath$(3, Mtype); UCase$(a$); " , do you confirm?"
  247.         c% = Menu%(men(5), ment$(5), DummyCurpath%)
  248.         If c% = 1 Then
  249.             Apath$ = a$
  250.             If Mtype = Source Then SourcePath$ = Apath$ Else DestPath$ = Apath$
  251.         ElseIf c% = 2 Then
  252.             ' nothing is changed
  253.         End If
  254.     End If
  255.  
  256.  
  257.  
  258. Sub ShowMessage (Fcol, Bcol, Urow, Brow, FstCo, WidthMsg, sFcol, sBcol, Msg$)
  259.     'Subroutine to show a message on the ASCII screen and restore
  260.     ' the previous screen after message has been shown
  261.     ' Usage: SHOWMESSAGE Forwardcolor, Backgroundcolor, UpRow, BottomRow,FirstColumn, WidthMessagge,shadowForwardColor,shadowBackgroundColor, Message$
  262.     Dim z As Integer
  263.  
  264.     PCopy 0, MsgWin
  265.     Color Fcol, Bcol
  266.     For z = Urow To Brow
  267.         Locate z, FstCo: Print Space$(WidthMsg);
  268.     Next z
  269.     Color sFcol, sBcol
  270.     For z = Urow + 1 To Brow
  271.         Locate z, FstCo + WidthMsg: Print "  ";
  272.     Next z
  273.  
  274.     Locate Brow + 1, FstCo + 2: Print Space$(WidthMsg);
  275.     Color Fcol, Bcol
  276.     Locate Urow + 1, FstCo + 5: Print Msg$
  277.     Sleep 2
  278.     PCopy MsgWin, 0
  279.  
  280. Sub LoadConfig
  281.     'Make sure the file exists
  282.     '  Open "setup.cfg" For Binary As 1: Close 1
  283.  
  284.     Open "setup.cfg" For Input As 1
  285.     Do Until EOF(1)
  286.         Line Input #1, a$
  287.         n% = InStr(a$, "=")
  288.         If n% Then
  289.             p$ = LCase$(LTrim$(RTrim$(Left$(a$, n% - 1))))
  290.             v$ = LTrim$(RTrim$(Mid$(a$, n% + 1)))
  291.  
  292.             Select Case p$
  293.                 Case "video"
  294.                     For i% = 1 To 5
  295.                         If LCase$(v$) = LCase$(videoid$(i%)) Then
  296.                             curvideo% = i%
  297.                             Exit For
  298.                         End If
  299.                     Next i%
  300.                 Case "sound"
  301.                     For i% = 1 To 6
  302.                         If LCase$(v$) = LCase$(soundid$(i%)) Then
  303.                             cursound% = i%
  304.                             Exit For
  305.                         End If
  306.                     Next i%
  307.                 Case "runfile"
  308.                     runfile$ = Left$(v$, 12)
  309.             End Select
  310.         End If
  311.     Loop
  312.     Close 1
  313.  
  314. Function Menu% (m As MenuType, mm$, ini%)
  315.     Dim mop$(1 To 20), mops As Integer
  316.  
  317.     mt$ = mm$
  318.     Do Until Len(mt$) = 0
  319.         mops = mops + 1
  320.         n% = InStr(mt$, "`")
  321.         If n% Then
  322.             mop$(mops) = Left$(mt$, n% - 1)
  323.             mt$ = Mid$(mt$, n% + 1)
  324.         Else
  325.             mop$(mops) = mt$
  326.             mt$ = ""
  327.         End If
  328.     Loop
  329.  
  330.     Color m.c1, m.c2
  331.     Locate m.y, m.x
  332.     Print "Ú" + String$(m.w, 196) + "¿";
  333.     For i% = m.y + 1 To m.y + mops
  334.         Locate i%, m.x
  335.         Print "³ " + mop$(i% - m.y) + Space$(m.w - Len(mop$(i% - m.y)) - 1) + "³";
  336.     Next i%
  337.     Locate m.y + mops + 1, m.x
  338.     Print "À" + String$(m.w, 196) + "Ù";
  339.     Color 8, 0
  340.     For i% = m.y + 1 To m.y + mops + 1
  341.         Locate i%, m.x + m.w + 2
  342.         Print "  ";
  343.     Next i%
  344.     Locate i%, m.x + 2
  345.     Print Space$(m.w + 2);
  346.  
  347.     cur% = ini%
  348.     ex% = 1
  349.     Update% = -1
  350.     Do
  351.         If Update% Then
  352.             Color m.c1, m.c2
  353.             Locate m.y + ex%, m.x + 1
  354.             Print " " + mop$(ex%) + Space$(m.w - Len(mop$(ex%)) - 1);
  355.             Color 0, 7
  356.             Locate m.y + cur%, m.x + 1
  357.             Print " " + mop$(cur%) + Space$(m.w - Len(mop$(cur%)) - 1);
  358.             ex% = cur%
  359.             Update% = 0
  360.         End If
  361.  
  362.         akey$ = InKey$
  363.         Select Case akey$
  364.             Case Chr$(0) + Chr$(72)
  365.                 If cur% > 1 Then
  366.                     cur% = cur% - 1
  367.                 Else
  368.                     cur% = mops
  369.                 End If
  370.                 Update% = -1
  371.             Case Chr$(0) + Chr$(80)
  372.                 If cur% < mops Then
  373.                     cur% = cur% + 1
  374.                 Else
  375.                     cur% = 1
  376.                 End If
  377.                 Update% = -1
  378.             Case Chr$(13)
  379.                 Exit Do
  380.             Case Chr$(27)
  381.                 cur% = -1
  382.                 Exit Do
  383.         End Select
  384.     Loop
  385.  
  386.     Menu% = cur%
  387.  
  388. Sub SaveConfig
  389.     Open "setup.cfg" For Output As 1
  390.     Print #1, "video=" + videoid$(curvideo%)
  391.     Print #1, "sound=" + soundid$(cursound%)
  392.     Print #1, "runfile=" + runfile$
  393.     Close 1
  394.  
  395. Sub UpdateOp (oplist$, num%, opval$, length%)
  396.     Dim op$(1 To 20)
  397.  
  398.     o$ = oplist$ ' oplist$ is a string of name of items of menu separated by ' except the last one
  399.     Do While Len(o$)
  400.         ops% = ops% + 1
  401.         n% = InStr(o$, "`")
  402.         If n% Then
  403.             op$(ops%) = Left$(o$, n% - 1)
  404.             o$ = Mid$(o$, n% + 1)
  405.         Else
  406.             op$(ops%) = o$
  407.             o$ = ""
  408.         End If
  409.     Loop
  410.  
  411.     For i% = Len(op$(num%)) To 1 Step -1
  412.         If Mid$(op$(num%), i%, 1) = "(" Then Exit For
  413.     Next i%
  414.  
  415.     If i% Then op$(num%) = RTrim$(Left$(op$(num%), i% - 1))
  416.  
  417.     op$(num%) = op$(num%) + Space$(length% - Len(op$(num%)) - Len(opval$) - 2)
  418.     op$(num%) = op$(num%) + "(" + opval$ + ")"
  419.  
  420.     o$ = ""
  421.     For i% = 1 To ops%
  422.         o$ = o$ + op$(i%)
  423.         If i% <> ops% Then o$ = o$ + "`"
  424.     Next i%
  425.  
  426.     oplist$ = o$
  427.  
  428. Sub UpdateRunFile
  429.     Open runfile$ For Output As 1
  430.     If videoid$(curvideo%) = "Tandy" Then
  431.         v$ = "TDY"
  432.     ElseIf videoid$(curvideo%) = "Hercules" Then
  433.         v$ = "HERC"
  434.     Else
  435.         v$ = videoid$(curvideo%)
  436.     End If
  437.  
  438.     Print #1, "@SKID" + v$ + ".EXE";
  439.  
  440.     Select Case cursound%
  441.         Case 1: Print #1, " /spc /ns"
  442.         Case 2: Print #1, " /spc"
  443.         Case 3: Print #1, " /std"
  444.         Case 4: Print #1, " /sad"
  445.         Case 5: Print #1, " /ssb"
  446.         Case 6: Print #1, " /smt"
  447.         Case Else: Print #1,
  448.     End Select
  449.     Close 1
  450.  
  451. Sub header
  452.     'Color 15, 7
  453.     Cls , 7
  454.     Color 0, 3
  455.     Locate 25, 1
  456.     Print Space$(4) + Chr$(24) + " " + Chr$(25) + " to move highlight, ENTER to select option, ESC to exit, F1 for help" + Space$(5);
  457.     Color 15, 1
  458.     Locate 2, 3: Print Space$(74);
  459.     Locate 3, 3: Print Space$(74);
  460.     Locate 4, 3: Print Space$(74);
  461.     Color 8, 0: Locate 5, 5: Print Space$(74)
  462.     Locate 3, 77: Print "  ";: Locate 4, 77: Print "  ";
  463.     Color 15, 1
  464.     Locate 2, 28: Print Chr$(34) + "Stunts" + Chr$(34) + " Setup Program";
  465.     Locate 3, 34: Print "Version 1.1";
  466.     Locate 4, 18: Print "Copyright (c) 2021 Stunts Online Community";
  467.  

to get that it works you must add this file to the folder of .exe
ListSTU.TXT  that is your list in a polite way to use in program.

Waiting your feedback.
Temporary paths previously used and saved on coming
Title: Re: Project looking for Programmer (I can't do it myself)
Post by: Daniel3D on November 22, 2021, 09:18:01 am
I love the solution,
that way, I can change it if needed for other incarnations of the game.
Title: Re: Project looking for Programmer (I can't do it myself)
Post by: TempodiBasic on November 22, 2021, 08:06:17 pm
fine to read this
Quote
I love the solution,
that way, I can change it if needed for other incarnations of the game.

please can give me a working link to a modded version of STUNTS so I can go on and finish the project.
That you have posted before is too slow! When I try to download the archive it showed a too long time to download (just 6 hours).
In the while I'll make a version of memorizing the last paths used.

Waiting your answer.
Title: Re: Project looking for Programmer (I can't do it myself)
Post by: Daniel3D on November 23, 2021, 08:50:36 am
fine to read this
please can give me a working link to a modded version of STUNTS so I can go on and finish the project.
That you have posted before is too slow! When I try to download the archive it showed a too long time to download (just 6 hours).
In the while I'll make a version of memorizing the last paths used.

Waiting your answer.
Added below.


This should give enough data to test all parts of the install menu.

Thanks a lot for your work so far.
Title: Re: Project looking for Programmer (I can't do it myself)
Post by: Daniel3D on November 23, 2021, 01:54:43 pm
I discovered a mistake in a part of the original code.
Around line 451:

This should have a different setting for hercules graphics because it is based on CGA.
I changed the piece of code myself (I think it is right, but this is about as far as I can manage, hahaha)
Quote
Sub UpdateRunFile
    Open runfile$ For Output As 1
    If videoid$(curvideo%) = "Tandy" Then
        v$ = "TDY"
      a$ = " "
    ElseIf videoid$(curvideo%) = "Hercules" Then
        v$ = "CGA"
      a$ = " /h"
    Else
        v$ = videoid$(curvideo%)
      a$ = " "
    End If
 
    Print #1, "@SKID" + v$ + ".EXE" + a$;
Could you replace this part for me in your copy?
I don't have QB myself and wouldn't know how to use it if I did. (I can probably do it. Just never had something worth compiling)
Title: Re: Project looking for Programmer (I can't do it myself)
Post by: TempodiBasic on November 24, 2021, 08:24:46 pm
Hi Daniel3D

1.
Quote
This should have a different setting for hercules graphics because it is based on CGA.

here the integration of code, try if it works well. You should use a PC machine with Hercules graphic slot.
Code: QB64: [Select]
  1. ' 2021 11 25  Integrating the Hercules graphic settings following Daniel3D's instructions
  2. ' 2021 11 13, Modifications to Installation menu
  3. ' 3 choices: install game, install mods, exit from installation
  4. DECLARE SUB UpdateRunFile ()
  5. DECLARE SUB SaveConfig ()
  6. DECLARE SUB LoadConfig ()
  7. DECLARE SUB UpdateOp (oplist$, num%, opval$, length%)
  8. DECLARE FUNCTION Menu% (m AS ANY, mm$, ini%)
  9. declare sub header
  10. declare sub changepath (kind as integer)
  11.  
  12. Type MenuType
  13.     x As Integer
  14.     y As Integer
  15.     c1 As Integer
  16.     c2 As Integer
  17.     w As Integer
  18.  
  19. Const Spath = "A:\", Dpath = "C:\STUNTS", Source = 1, Destination = 2
  20. Const MainWin = 1, InstallWin = 2, MsgWin = 7
  21. Dim Shared men(1 To 5) As MenuType, ment$(1 To 5), ErrMsg$(1 To 4), CurErr%
  22. Dim Shared videoid$(1 To 5), soundid$(1 To 6), curvideo%, cursound%, Mpath$(1 To 5, 1 To 2)
  23. Dim Shared runfile$, SourcePath$, DestPath$, DummyCurpath%, DefaultSourcePath$, DefaultDestinationpath$
  24. Dim Shared InstFile(1 To 250) As String
  25.  
  26. runfile$ = "STUNTS.BAT"
  27. Defaultsourcepat$ = Spath
  28. DefaultDestinationpath$ = Dpath
  29. SourcePath$ = ".\"
  30. DestPath$ = ".\cs11"
  31. DummyCurpath% = 1
  32.  
  33. videoid$(1) = "MCGA"
  34. videoid$(2) = "EGA"
  35. videoid$(3) = "Tandy"
  36. videoid$(4) = "Hercules"
  37. videoid$(5) = "CGA"
  38. curvideo% = 1
  39.  
  40. soundid$(1) = "No sound"
  41. soundid$(2) = "PC Speaker"
  42. soundid$(3) = "Tandy"
  43. soundid$(4) = "Ad Lib"
  44. soundid$(5) = "Sound Blaster"
  45. soundid$(6) = "MT-32"
  46. cursound% = 1
  47.  
  48.  
  49. header
  50.  
  51. men(1).x = 4
  52. men(1).y = 7
  53. men(1).w = 40
  54. men(1).c1 = 7
  55. men(1).c2 = 4
  56. ment$(1) = "Video display`Sound option`Install game to ...`Exit"
  57.  
  58. men(2).x = 13
  59. men(2).y = 12
  60. men(2).w = 27
  61. men(2).c1 = 0
  62. men(2).c2 = 2
  63. ment$(2) = "MGCA/VGA graphics`EGA graphics`Tandy graphics`Hercules graphics`CGA graphics"
  64.  
  65. men(3).x = 11
  66. men(3).y = 12
  67. men(3).w = 34
  68. men(3).c1 = 0
  69. men(3).c2 = 2
  70. ment$(3) = "No music or sound effects`Internal PC speaker`Tandy sound`Ad Lib card`Sound Blaster card`Roland MT-32"
  71.  
  72.  
  73. men(4).x = 11
  74. men(4).y = 12
  75. men(4).w = 40
  76. men(4).c1 = 0
  77. men(4).c2 = 1
  78. ment$(4) = "Install game`Install mods`Exit"
  79.  
  80.  
  81. men(5).x = 67
  82. men(5).y = 15
  83. men(5).w = 10
  84. men(5).c1 = 0
  85. men(5).c2 = 4
  86. ment$(5) = "Yes`No`Cancel"
  87.  
  88. ErrMsg$(1) = "Error: file of configuration not found"
  89. ErrMsg$(2) = "Error: file of list of installation not found"
  90. ErrMsg$(3) = "Error: file of original installation not found"
  91. ErrMsg$(4) = "Error: file of Mods installation not found"
  92. CurErr% = 0
  93.  
  94. Mpath$(1, Source) = "Caution you are changing default source path!"
  95. Mpath$(2, Source) = "Type here source path: "
  96. Mpath$(3, Source) = "This is the new source path: "
  97.  
  98. Mpath$(1, Destination) = "Caution you are changing default destination path!"
  99. Mpath$(2, Destination) = "Type here destination path: "
  100. Mpath$(3, Destination) = "This is the new destination path: "
  101.  
  102.  
  103. GoSub Fileok
  104. LoadConfig
  105.  
  106. ' loading list file installation
  107. GoSub Fileok
  108. CurErr% = 2
  109.  
  110. Open "liststu.txt" For Input As #1
  111. z = 0
  112.     z = z + 1
  113.     Line Input #1, tmp$
  114.     If InStr(tmp$, ".") Then InstFile(z) = tmp$ Else z = z - 1
  115.     'Print InstFile(z), z
  116.     'If z Mod 20 = 0 Then Sleep
  117. CurErr% = 0
  118.  
  119. UpdateOp ment$(1), 1, videoid$(curvideo%), men(1).w - 2
  120. UpdateOp ment$(1), 2, soundid$(cursound%), men(1).w - 2
  121.  
  122. curmain% = 1
  123.     a% = Menu%(men(1), ment$(1), curmain%)
  124.     If a% <> -1 Then curmain% = a%
  125.     Select Case a%
  126.         Case -1 ' exiting by EScape key from menu
  127.             Color 7, 0
  128.             Cls
  129.             Print
  130.             Exit Do
  131.         Case 4 'saving configuration
  132.             SaveConfig
  133.             UpdateRunFile
  134.             Color 7, 0
  135.             Cls
  136.             Print
  137.             Print "Configuration saved."
  138.             Exit Do
  139.         Case 1 'video display settings
  140.             PCopy 0, MainWin
  141.             a% = Menu%(men(2), ment$(2), curvideo%)
  142.             If a% <> -1 Then curvideo% = a%
  143.             UpdateOp ment$(1), 1, videoid$(curvideo%), men(1).w - 2
  144.             PCopy MainWin, 0
  145.         Case 2 ' sound options
  146.             PCopy 0, MainWin
  147.             a% = Menu%(men(3), ment$(3), cursound%)
  148.             If a% <> -1 Then cursound% = a%
  149.             UpdateOp ment$(1), 2, soundid$(cursound%), men(1).w - 2
  150.             PCopy MainWin, 0
  151.         Case 3 'install options....
  152.             ' here user can choose  installation of original game
  153.             ' adding mods
  154.             ' after doing this he can choose destination folder, source folder
  155.             PCopy 0, MainWin
  156.             Do
  157.  
  158.                 b% = Menu%(men(4), ment$(4), DummyCurpath%)
  159.                 PCopy 0, InstallWin
  160.                 Select Case b%
  161.                     Case 1 ' game standard installation
  162.                         ChangePath Source
  163.                         PCopy InstallWin, 0
  164.                         ChangePath Destination
  165.                         GoSub Fileok
  166.                         CurErr% = 3
  167.                         If Right$(SourcePath$, 1) <> "\" Then Slash$ = "\" Else Slash$ = ""
  168.                         If Right$(DestPath$, 1) <> "\" Then Slash2$ = "\" Else Slash2$ = ""
  169.                         For w = 1 To z Step 1
  170.                             nameFile$ = SourcePath$ + Slash$ + LTrim$(InstFile(w))
  171.                             Locate 20, 1: Print nameFile$; "  ";
  172.                             namefile2$ = DestPath$ + Slash2$ + LTrim$(InstFile(w))
  173.                             Open nameFile$ For Input As #1
  174.                             tmp$ = Input$(LOF(1), # 1)
  175.                             Close #1
  176.                             MkDir DestPath$ + Slash2$
  177.                             Open namefile2$ For Binary As #1
  178.                             Put #1, , tmp$
  179.                             Close #1
  180.                             tmp$ = ""
  181.                         Next w
  182.                         CurErr% = 0
  183.                         On Error GoTo 0
  184.                         PCopy InstallWin, 0
  185.  
  186.  
  187.                     Case 2 ' mods installation
  188.                         ChangePath Source
  189.                         PCopy InstallWin, 0
  190.                         ChangePath Destination
  191.  
  192.                         GoSub Fileok
  193.                         CurErr% = 4
  194.  
  195.                         '  Open "filen" For Input As #1
  196.  
  197.  
  198.                         CurErr% = 0
  199.                         On Error GoTo 0
  200.                         PCopy InstallWin, 0
  201.  
  202.                     Case 3 ' return to option menu
  203.                         PCopy MainWin, 0
  204.                         Exit Do
  205.  
  206.                 End Select
  207.  
  208.             Loop
  209.  
  210.     End Select
  211.  
  212. Print "Use " + UCase$(runfile$) + " to play Stunts"
  213.  
  214. Fileok:
  215. On Error GoTo nofile
  216. If CurErr% = 0 Then CurErr% = 1
  217.  
  218. nofile:
  219. If CurErr% = 2 Or CurErr% = 3 Then k = 4 Else k = 0
  220. ShowMessage 14, 0, 16, 19, 20, 50 + k, 0, 3, ErrMsg$(CurErr%)
  221. If CurErr% = 3 Or CurErr% = 4 Then
  222.     If tmp$ = "" Then Filename$ = nameFile$ Else Filename$ = namefile2$
  223.     ShowMessage 14, 0, 16, 19, 20, 50, 0, 3, "File error: " + Filename$
  224.     Resume Next
  225.  
  226. Sub ChangePath (Mtype As Integer)
  227.     If Mtype = Source Then
  228.         Apath$ = SourcePath$
  229.         k = 0
  230.     Else
  231.         Apath$ = DestPath$
  232.         k = 4
  233.     End If
  234.     ShowMessage 14, 0, 16, 19, 15, 56 + k, 0, 3, Mpath$(1, Mtype)
  235.     Locate 19, 20: Color 14, 0: Print "Actual path: "; Apath$
  236.     Locate 20, 20:
  237.     If Mtype = Source Then
  238.         Input "Type here source path: ", a$
  239.     ElseIf Mtype = Destination Then
  240.         Input "Type here destination path: ", a$
  241.     End If
  242.  
  243.     If a$ = "" Or a$ = Apath$ Then
  244.         Locate 21, 20: Print " No new path": Sleep 1
  245.     Else
  246.         Locate 21, 20: Print Mpath$(3, Mtype); UCase$(a$); " , do you confirm?"
  247.         c% = Menu%(men(5), ment$(5), DummyCurpath%)
  248.         If c% = 1 Then
  249.             Apath$ = a$
  250.             If Mtype = Source Then SourcePath$ = Apath$ Else DestPath$ = Apath$
  251.         ElseIf c% = 2 Then
  252.             ' nothing is changed
  253.         End If
  254.     End If
  255.  
  256.  
  257.  
  258. Sub ShowMessage (Fcol, Bcol, Urow, Brow, FstCo, WidthMsg, sFcol, sBcol, Msg$)
  259.     'Subroutine to show a message on the ASCII screen and restore
  260.     ' the previous screen after message has been shown
  261.     ' Usage: SHOWMESSAGE Forwardcolor, Backgroundcolor, UpRow, BottomRow,FirstColumn, WidthMessagge,shadowForwardColor,shadowBackgroundColor, Message$
  262.     Dim z As Integer
  263.  
  264.     PCopy 0, MsgWin
  265.     Color Fcol, Bcol
  266.     For z = Urow To Brow
  267.         Locate z, FstCo: Print Space$(WidthMsg);
  268.     Next z
  269.     Color sFcol, sBcol
  270.     For z = Urow + 1 To Brow
  271.         Locate z, FstCo + WidthMsg: Print "  ";
  272.     Next z
  273.  
  274.     Locate Brow + 1, FstCo + 2: Print Space$(WidthMsg);
  275.     Color Fcol, Bcol
  276.     Locate Urow + 1, FstCo + 5: Print Msg$
  277.     Sleep 2
  278.     PCopy MsgWin, 0
  279.  
  280. Sub LoadConfig
  281.     'Make sure the file exists
  282.     '  Open "setup.cfg" For Binary As 1: Close 1
  283.  
  284.     Open "setup.cfg" For Input As 1
  285.     Do Until EOF(1)
  286.         Line Input #1, a$
  287.         n% = InStr(a$, "=")
  288.         If n% Then
  289.             p$ = LCase$(LTrim$(RTrim$(Left$(a$, n% - 1))))
  290.             v$ = LTrim$(RTrim$(Mid$(a$, n% + 1)))
  291.  
  292.             Select Case p$
  293.                 Case "video"
  294.                     For i% = 1 To 5
  295.                         If LCase$(v$) = LCase$(videoid$(i%)) Then
  296.                             curvideo% = i%
  297.                             Exit For
  298.                         End If
  299.                     Next i%
  300.                 Case "sound"
  301.                     For i% = 1 To 6
  302.                         If LCase$(v$) = LCase$(soundid$(i%)) Then
  303.                             cursound% = i%
  304.                             Exit For
  305.                         End If
  306.                     Next i%
  307.                 Case "runfile"
  308.                     runfile$ = Left$(v$, 12)
  309.             End Select
  310.         End If
  311.     Loop
  312.     Close 1
  313.  
  314. Function Menu% (m As MenuType, mm$, ini%)
  315.     Dim mop$(1 To 20), mops As Integer
  316.  
  317.     mt$ = mm$
  318.     Do Until Len(mt$) = 0
  319.         mops = mops + 1
  320.         n% = InStr(mt$, "`")
  321.         If n% Then
  322.             mop$(mops) = Left$(mt$, n% - 1)
  323.             mt$ = Mid$(mt$, n% + 1)
  324.         Else
  325.             mop$(mops) = mt$
  326.             mt$ = ""
  327.         End If
  328.     Loop
  329.  
  330.     Color m.c1, m.c2
  331.     Locate m.y, m.x
  332.     Print "Ú" + String$(m.w, 196) + "¿";
  333.     For i% = m.y + 1 To m.y + mops
  334.         Locate i%, m.x
  335.         Print "³ " + mop$(i% - m.y) + Space$(m.w - Len(mop$(i% - m.y)) - 1) + "³";
  336.     Next i%
  337.     Locate m.y + mops + 1, m.x
  338.     Print "À" + String$(m.w, 196) + "Ù";
  339.     Color 8, 0
  340.     For i% = m.y + 1 To m.y + mops + 1
  341.         Locate i%, m.x + m.w + 2
  342.         Print "  ";
  343.     Next i%
  344.     Locate i%, m.x + 2
  345.     Print Space$(m.w + 2);
  346.  
  347.     cur% = ini%
  348.     ex% = 1
  349.     Update% = -1
  350.     Do
  351.         If Update% Then
  352.             Color m.c1, m.c2
  353.             Locate m.y + ex%, m.x + 1
  354.             Print " " + mop$(ex%) + Space$(m.w - Len(mop$(ex%)) - 1);
  355.             Color 0, 7
  356.             Locate m.y + cur%, m.x + 1
  357.             Print " " + mop$(cur%) + Space$(m.w - Len(mop$(cur%)) - 1);
  358.             ex% = cur%
  359.             Update% = 0
  360.         End If
  361.  
  362.         akey$ = InKey$
  363.         Select Case akey$
  364.             Case Chr$(0) + Chr$(72)
  365.                 If cur% > 1 Then
  366.                     cur% = cur% - 1
  367.                 Else
  368.                     cur% = mops
  369.                 End If
  370.                 Update% = -1
  371.             Case Chr$(0) + Chr$(80)
  372.                 If cur% < mops Then
  373.                     cur% = cur% + 1
  374.                 Else
  375.                     cur% = 1
  376.                 End If
  377.                 Update% = -1
  378.             Case Chr$(13)
  379.                 Exit Do
  380.             Case Chr$(27)
  381.                 cur% = -1
  382.                 Exit Do
  383.         End Select
  384.     Loop
  385.  
  386.     Menu% = cur%
  387.  
  388. Sub SaveConfig
  389.     Open "setup.cfg" For Output As 1
  390.     Print #1, "video=" + videoid$(curvideo%)
  391.     Print #1, "sound=" + soundid$(cursound%)
  392.     Print #1, "runfile=" + runfile$
  393.     Close 1
  394.  
  395. Sub UpdateOp (oplist$, num%, opval$, length%)
  396.     Dim op$(1 To 20)
  397.  
  398.     o$ = oplist$ ' oplist$ is a string of name of items of menu separated by ' except the last one
  399.     Do While Len(o$)
  400.         ops% = ops% + 1
  401.         n% = InStr(o$, "`")
  402.         If n% Then
  403.             op$(ops%) = Left$(o$, n% - 1)
  404.             o$ = Mid$(o$, n% + 1)
  405.         Else
  406.             op$(ops%) = o$
  407.             o$ = ""
  408.         End If
  409.     Loop
  410.  
  411.     For i% = Len(op$(num%)) To 1 Step -1
  412.         If Mid$(op$(num%), i%, 1) = "(" Then Exit For
  413.     Next i%
  414.  
  415.     If i% Then op$(num%) = RTrim$(Left$(op$(num%), i% - 1))
  416.  
  417.     op$(num%) = op$(num%) + Space$(length% - Len(op$(num%)) - Len(opval$) - 2)
  418.     op$(num%) = op$(num%) + "(" + opval$ + ")"
  419.  
  420.     o$ = ""
  421.     For i% = 1 To ops%
  422.         o$ = o$ + op$(i%)
  423.         If i% <> ops% Then o$ = o$ + "`"
  424.     Next i%
  425.  
  426.     oplist$ = o$
  427.  
  428. Sub UpdateRunFile
  429.     Open runfile$ For Output As 1
  430.     If videoid$(curvideo%) = "Tandy" Then
  431.         v$ = "TDY"
  432.         a$ = " "
  433.     ElseIf videoid$(curvideo%) = "Hercules" Then
  434.         v$ = "CGA"
  435.         a$ = " /h"
  436.     Else
  437.         v$ = videoid$(curvideo%)
  438.         a$ = " "
  439.     End If
  440.  
  441.     Print #1, "@SKID" + v$ + ".EXE" + a$;
  442.  
  443.     Select Case cursound%
  444.         Case 1: Print #1, " /spc /ns"
  445.         Case 2: Print #1, " /spc"
  446.         Case 3: Print #1, " /std"
  447.         Case 4: Print #1, " /sad"
  448.         Case 5: Print #1, " /ssb"
  449.         Case 6: Print #1, " /smt"
  450.         Case Else: Print #1,
  451.     End Select
  452.     Close 1
  453.  
  454. Sub header
  455.     'Color 15, 7
  456.     Cls , 7
  457.     Color 0, 3
  458.     Locate 25, 1
  459.     Print Space$(4) + Chr$(24) + " " + Chr$(25) + " to move highlight, ENTER to select option, ESC to exit, F1 for help" + Space$(5);
  460.     Color 15, 1
  461.     Locate 2, 3: Print Space$(74);
  462.     Locate 3, 3: Print Space$(74);
  463.     Locate 4, 3: Print Space$(74);
  464.     Color 8, 0: Locate 5, 5: Print Space$(74)
  465.     Locate 3, 77: Print "  ";: Locate 4, 77: Print "  ";
  466.     Color 15, 1
  467.     Locate 2, 28: Print Chr$(34) + "Stunts" + Chr$(34) + " Setup Program";
  468.     Locate 3, 34: Print "Version 1.1";
  469.     Locate 4, 18: Print "Copyright (c) 2021 Stunts Online Community";
  470.  

2.
about QB and abandonware
here you can get it or Qbasic or QBX 7.1  or visual Basic 1.0 for DOS
https://www.abandonwaredos.com/abandonware-game.php?abandonware=QBasic&gid=2854 (https://www.abandonwaredos.com/abandonware-game.php?abandonware=QBasic&gid=2854)
https://www.xtcabandonware.com/game/741/quick-basic-450 (https://www.xtcabandonware.com/game/741/quick-basic-450)
https://www.qbasic.net/en/top-ten-downloads/ (https://www.qbasic.net/en/top-ten-downloads/)
Title: Re: Project looking for Programmer (I can't do it myself)
Post by: Daniel3D on November 25, 2021, 08:24:38 am
Well, i'm trying.

But VBDOS and QBX 7.1 and QB 7.1 give the same error when I want to make an exe. (see attached image)

I thought that maybe the word 'update' was an issue, so I changed all instances of Update% to Updat%.
That seemed to work, but then it gives different errors that I can't solve.

So, I can not test the code. Not skilled enough, i'm afraid.
Title: Re: Project looking for Programmer (I can't do it myself)
Post by: TempodiBasic on November 25, 2021, 12:42:32 pm
As soon as I'll try those IDE/Compilers taken from those links.
Title: Re: Project looking for Programmer (I can't do it myself)
Post by: TempodiBasic on November 25, 2021, 08:14:10 pm
Hi Daniel3D
your issue to compile STUNTINST.BAS using QBX or QB7.1 or VBDOS is one:
in these compilers there is ISAM, a system for database that there isn't in QBasic and in Quickbasic 4.5.
In conclusion UPDATE is a keyword of ISAM, so that name is forbidden for variables into QBX and following developments.

I think that you can use a Qbasic /RUN namefile   or better a QB45 to compile this Installation program.

you can get QB45 QBasic and QB 2.0 here
https://www.qbasic.net/en/top-ten-downloads/ (https://www.qbasic.net/en/top-ten-downloads/)
https://vetusware.com/download/QuickBASIC%202.01/?id=221 (https://vetusware.com/download/QuickBASIC%202.01/?id=221)
https://www.xtcabandonware.com/game/741/quick-basic-450 (https://www.xtcabandonware.com/game/741/quick-basic-450)

See later now a take a look to the polite version of STUNTS and to the MOD that you have posted before.
Title: Re: Project looking for Programmer (I can't do it myself)
Post by: Daniel3D on November 26, 2021, 01:33:39 am
That makes sense. I'll try that later.

Tried QB45,
still gives errors that need to be debugged, I think.

I'll wait for you to finish.
Title: Re: Project looking for Programmer (I can't do it myself)
Post by: TempodiBasic on November 26, 2021, 07:13:39 pm
Hi Daniel3D

yes some issues with easy solutions!

1. Add () to the end of declaretion of HEADER sub
Code: QB64: [Select]
  1. DECLARE SUB header ()

2.
in the SUB header
uncomment the first line
Code: QB64: [Select]
  1. 'COLOR 15,7
  2.  

becomes
Code: QB64: [Select]
  1. COLOR 15,7

3.
in the SUB header cancel or REMs the arguments of CLS
so
Code: QB64: [Select]
  1. CLS ,7
becomes
Code: QB64: [Select]
  1. CLS  ' ,7
or better
Code: QB64: [Select]

4.
remember to put in the same folder the file.BAS and SETUP.CFG and the file  LISTSTU.TXT

5.
using QBasic or QB45 be sure that the program will be run in the original folder. It is not enough to load program into QB45 , you must verify that you are in the folder original of file.BAS. You can solve this issue easily, first you load file.BAS and then you use the command menu File->DOS-Shell.  So you get the prompt of DOS, in this you should be in the QB45 folder and you must use CD destinationPath to move to the folder of file.BAS.

NOW you can press F5 and run the program.

Naturally when you choose to Install Game you'll get errors because the folder of running have no such file.
you must build this folderf with original game file and the three files above,
Title: Re: Project looking for Programmer (I can't do it myself)
Post by: TempodiBasic on November 26, 2021, 07:36:45 pm
@Daniel3D
please gimme help...
I have downloaded the original polite (or semipolite) version of STUNTS, the MOD simple garage and the custom car

now I have extract zippet files, and in the original polite version folder I have put the sgar  program but running it I got these results:

here sgar is in an own folder
  [ This attachment cannot be displayed inline in 'Print Page' view ]  

here sgar in stunts folder

  [ This attachment cannot be displayed inline in 'Print Page' view ]  

Title: Re: Project looking for Programmer (I can't do it myself)
Post by: Daniel3D on November 27, 2021, 06:13:39 am
I checked with the creator.
He made a function to set the game directory in the sgar.cfg.
You need to modify this manually.
Sorry, I didn't know this.
(Sgar is still in beta)
Title: Re: Project looking for Programmer (I can't do it myself)
Post by: TempodiBasic on November 28, 2021, 07:53:51 pm
Hi Daniel3D
you're right sgar application has an absolute path defined into sgar.cgf
changing  handly it I can see now it runs well.
  [ This attachment cannot be displayed inline in 'Print Page' view ]  

Now it is clear that Simple Garage 1.0 does more than only installing new cars as we can see from its help
  [ This attachment cannot be displayed inline in 'Print Page' view ]  

for now what do you think that the "Installation MOD"  must do?
Answer 1: if there are different cars from those are default (original) it copies all them into destinationPath
Answer 2: if there are different cars from those are default (original) it let you choose what of them to copy into destinationPath
Answer 3: (feel free to share your thinking about it)

Waiting your feedback
Title: Re: Project looking for Programmer (I can't do it myself)
Post by: Daniel3D on November 29, 2021, 12:25:18 am
Answer 3.
Default in game directory. If subdirectory are present opt to install to one of those. (Theoretically a different garage program can be made that uses a different directory name)
Also one might want a car in a separate directory named after the car.

So, options could look like:
Install in:


Is that ok? Or to much?
Just the game folder and garage is fine to.
Title: Re: Project looking for Programmer (I can't do it myself)
Post by: TempodiBasic on November 29, 2021, 08:20:18 pm
Hi Daniel3D
I think I have missed the point:
new modded cars are only in garage folder or also in STUNTS folder, thinking that Garage is a subfolder of STUNTS?
Separate cars in own directory/folder must be copied into garage folder or into STUNTS folder?

Please choose a direction to follow.
Title: Re: Project looking for Programmer (I can't do it myself)
Post by: Daniel3D on November 30, 2021, 01:51:18 am
Cars should be in one location. To use they need to be in the game folder. To store for later they go in the garage.

Other options are of no use at the moment but aimed at future additions that might be.
Just to be flexible and future proof.
Title: Re: Project looking for Programmer (I can't do it myself)
Post by: Daniel3D on November 30, 2021, 04:24:14 pm
new modded cars are only in garage folder or also in STUNTS folder, thinking that Garage is a subfolder of STUNTS?
Separate cars in own directory/folder must be copied into garage folder or into STUNTS folder?
You didn't miss the point. I was unclear again.

Separate cars in own directory/folder must be copied into garage folder or into STUNTS folder to be able to be used.
Their own folder is for storage/backup/save keeping or something like that.
Title: Re: Project looking for Programmer (I can't do it myself)
Post by: TempodiBasic on December 01, 2021, 05:27:46 pm
@Daniel3D
Ok I got it. But I have some pending thought that I communicate with this following scheme

 SOURCE -----------------------------> DESTINATION

1. (Ok clear)
Original STUNTS files----------------> all copied


2. (please clearer)
                                                       |----> all files copied
New files (cars, tracks and so on)-----| ? What to do?
in STUNTS  modded                          |---->only selected files copied

3.  (please clearer)
                                                    |----> all files copied
Garage Folder-------------------------| ? What to do?
                                                    |---->only selected files copied

4. (Ok clear)
                                                                                 |----> storing a copy in different path -->all files copied
Other folders with new files (cars, tracks and so on)-----|
                                                                                 |                                                                      |--> in garage for future use
                                                          (please clearer)|---->installing for use  only selected files copied |
                                                                                 |                                                                      |-->in STUNTS for actual use
                                                                                                                                                                                 max 32 cars

waiting your answers I can affirm that the simplest way (copy all new files standing in STUNTS folder and the whole GARAGE folder) is ready to be finished, while installing cars from other paths and installing only selected files must be supported by a listbox that must be coded.

Title: Re: Project looking for Programmer (I can't do it myself)
Post by: Daniel3D on December 02, 2021, 10:21:15 am
@Daniel3D
 SOURCE -----------------------------> DESTINATION

1. (Ok clear)
Original STUNTS files----------------> all copied


2. (please clearer)
                                                       |----> all files copied
New files (cars, tracks and so on)-----| ? What to do?
in STUNTS  modded                          |---->only selected files copied

3.  (please clearer)
                                                    |----> all files copied
Garage Folder-------------------------| ? What to do?
                                                    |---->only selected files copied

4. (Ok clear)
                                                                                 |----> storing a copy in different path -->all files copied
Other folders with new files (cars, tracks and so on)-----|
                                                                                 |                                                                      |--> in garage for future use
                                                          (please clearer)|---->installing for use  only selected files copied |
                                                                                 |                                                                      |-->in STUNTS for actual use
                                                                                                                                                                                 max 32 cars
SOURCE -----------------------------> DESTINATION

1. (Ok clear)
Original STUNTS files----------------> all copied


2. (please clearer)
                                                       |----> all files copied
New files (cars, tracks and so on)-----|                                                    |-- Both options are valid
in STUNTS  modded                          |---->only selected files copied

3.  (please clearer)
                                                    |----> all files copied
Garage Folder-------------------------|                                                     |-- Both options are valid
                                                    |---->only selected files copied

4. (Ok clear)
                                                                                 |----> storing a copy in different path -->all files copied
Other folders with new files (cars, tracks and so on)-----|
                                                                                 |                                                                      |--> in garage for future use
                                                                                 |---->installing for use  only selected files copied |
                                                                                 |                                                                      |-->in STUNTS for actual use
                                                                                                                                                                                 max 32 cars

// i could not read it well on my phone, but actually this is right on the money.

=================
Two important things about tracks and car files.. I think you know them already, and in that case I apologize for repeating myself.
Track files have the extension trk. They can be accompanied by a high score file (*.hig) and a metadata file (*.smd) 
[the metadata part is new for me to, never used it but it is used in the community]
In all cases the file name is identical. They should always move as one.

Car consist of 4 files always. The car abbreviation is always in the filename.
Prefixes and Extensions (correct):
CAR          .RES
STDA          .VSH
STDB         .VSH
ST              .3SH

The original cars have packed files. They have a P at the start of the extension, and the last character is removed. So VSH becomes PVS.
The game doesn't look at extension when finding a car but at the four characters. For the default car that is the Lamborgini Countach the letters are COUN.
CARCOUN.RES and so fort.

The four files should always move as one.
=================
I hope I was clear.
Thanks again.
Title: Re: Project looking for Programmer (I can't do it myself)
Post by: TempodiBasic on December 02, 2021, 08:09:27 pm
Hi Daniel3D
Quote
I hope I was clear.
Thanks again.

Repetita iuvant
so thanks for replying and saying again the ideas


Quote
Both options are valid
ok we take it all
just some time more and it will be finished.
Title: Re: Project looking for Programmer (I can't do it myself)
Post by: Daniel3D on December 03, 2021, 11:11:15 am
Really looking forward to it.
Title: Re: Project looking for Programmer (I can't do it myself)
Post by: TempodiBasic on December 08, 2021, 06:06:08 pm
Hi
I'm testing the application.
Under window98 it is ok, it needs only admin security permission.
But running in DOSBOX I'm getting a strange issue with the path of destination, nevertheless I'll try again on other machine under DOSBOX.
See later.
Title: Re: Project looking for Programmer (I can't do it myself)
Post by: Daniel3D on December 09, 2021, 01:39:47 am
If it works on MS-DOS and win98 I'm very happy
DOSBox would be great, but it ain't a problem if that doesn't work.
I'll blame it on DOSBox :)
Title: Re: Project looking for Programmer (I can't do it myself)
Post by: Daniel3D on December 09, 2021, 02:50:32 pm
Hi
I'm testing the application.
Under window98 it is ok, it needs only admin security permission.
But running in DOSBOX I'm getting a strange issue with the path of destination, nevertheless I'll try again on other machine under DOSBOX.
See later.
There shouldn't be any file permission problem within the DOS environment, unless DOSBox is configured to emulate the disk on a directory in the host OS that does have permission restrictions
Title: Re: Project looking for Programmer (I can't do it myself)
Post by: TempodiBasic on December 09, 2021, 03:19:40 pm
Daniel3D
I must be clearer

The program has been coded in QBasic/QB (no QB64 feature in it) so you can compile it with QB45.

I'm using QB64 IDE in Windows 8.1 and testing it I have found a permission denied issue that is not a problem because in DOS there is not that control on files.

Running the program in Qbasic loaded into DOSBOX 0.74-3 I have had a strange result. The program has created a destination folder in the real c:\ of computer and not in the c:\ mounted by DosBox!
I'm searching to understand how this is possible! I use just a MKDIR of Qbasic in the code.
Later today I think to be able to test the code in other machines.
Title: Re: Project looking for Programmer (I can't do it myself)
Post by: Daniel3D on December 09, 2021, 06:18:12 pm
that sounds like something that should not be possible. I hope you find the problem.
Title: Re: Project looking for Programmer (I can't do it myself)
Post by: Daniel3D on December 13, 2021, 06:33:40 am
I've been searching for this online for the last couple of days. As far as I can make out this should not be possible. So it's either a fluke or a bug (in DOSBox).
I don't believe that this is caused by your code.
Title: Re: Project looking for Programmer (I can't do it myself)
Post by: Richard on December 13, 2021, 08:48:03 am
@Daniel3D


You may already know this but ...

Have you tried DosBox-X which is released Nov 2021, instead of DosBox released Jun 2019?

DosBox-X, which I have not yet tried myself, is a fork from the DosBox project, can also support Linux and Mac OS - the later may allow the expansion of your Stunts community base with Mac users.

Hope this may be of help for you.












Title: Re: Project looking for Programmer (I can't do it myself)
Post by: TempodiBasic on December 13, 2021, 07:50:52 pm
Hi Daniel3D
about the strange bug it didn't come back running code into QB under DOSBOX.
So I must suppose that it is a bug of 03.00 AM o'clock! :-)
Nevertheless there are some difference in performances between running the code into QB64 and running the code in QB under Dosbox.
The first is that MKdir doesn't like a "\" at the end of the string of the name of folder to create.
Then I fall in Out of Stack!
Then in an issue to GET a string from Binary files.
Now all these are fixed. And I have tested the program about copying original folder using the list and it is ok.
Now I'm testing the full copy of a folder with mods to a destination path, and the possibility to make a selection of what to copy to destination.

@Richard:
I'll google for Dosbox X to see if there are some significative differences about the program in developing.
Title: Re: Project looking for Programmer (I can't do it myself)
Post by: Daniel3D on December 14, 2021, 06:34:30 am
Wow. This has become way more complicated than I expected when I posted the original help request.
I really appreciate the work you are doing so short before Christmas.
Title: Re: Project looking for Programmer (I can't do it myself)
Post by: TempodiBasic on December 26, 2021, 03:54:16 pm
@Daniel3D
Merry Christmas


there are further development.
This is my function to search files and show them into a ScrollList and let to the user to select them.

Now you see it as a single program, but I must only integrate it into the original program (I must see for duplicating of name of variables and of labels, moreover I must test that it doesn't run into memory overflow/ out of stack as in previous  experience).

Code: QB64: [Select]
  1. DIM F$(1 TO 1000), S(1 TO 1000) AS STRING * 2, n AS INTEGER, a AS INTEGER, i AS INTEGER, max AS INTEGER
  2. n = 0
  3. NameFile$ = "filedir.tmp"
  4. ON ERROR GOTO Nofile
  5. COLOR 7, 0
  6. SHELL "dir  /b> " + NameFile$
  7. OPEN NameFile$ FOR INPUT AS #1
  8.  n = n + 1
  9.    LINE INPUT #1, F$(n)
  10.    S(n) = "  "
  11. KILL NameFile$
  12.  max = n
  13.  
  14. GOSUB AllList
  15. GOSUB ChoiceList
  16.  
  17.  
  18. Nofile:
  19.  PRINT " Error "; FileName$ + " not found!"
  20.  END
  21.  
  22. AllList:
  23. ' debug GOSUB to show the whole list
  24. FOR a = 1 TO max STEP 1
  25. PRINT F$(a) + S(a)
  26. IF a MOD 15 = 0 THEN SLEEP 2
  27.  
  28. ChoiceList:
  29. a = 0
  30. k$ = ""
  31. IF i = 0 THEN i = 1: n = i
  32. ' 183 · 186º 189 ½ 196 Ä 211 Ó 214  Ö                                                                      
  33.  
  34.  ' here is the output of list
  35.  COLOR 7, 0
  36.  IF i < n OR i > (n + 15) THEN n = i
  37.  LOCATE 4, 23
  38.  PRINT "ÖÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ·"
  39.  FOR a = n TO n + 15 STEP 1
  40.    IF a > max THEN M$ = SPACE$(15) ELSE M$ = " " + F$(a) + S(a) + SPACE$(15 - LEN(F$(a)) - 3)
  41.    IF a = i THEN COLOR 15, 0
  42.    LOCATE , 23
  43.    PRINT "º" + M$ + "º"
  44.    IF a = i THEN COLOR 7, 0
  45.  NEXT a
  46.  LOCATE , 23
  47.  PRINT "ÓÄÄÄÄÄÄÄÄÄÄÄÄÄÄĽ"
  48.  LOCATE , 23
  49.  PRINT CHR$(24) + CHR$(25) + " move, S select, D done"
  50.  
  51.  
  52.  
  53.  ' here is the user input from keyboard
  54.  DO
  55.     k$ = UCASE$(INKEY$)
  56.  ' it switches the selector
  57.     IF k$ = "S" THEN IF S(i) = "  " THEN S(i) = "<-" ELSE S(i) = "  "
  58.     ' down
  59.     IF k$ = CHR$(0) + "P" THEN IF i < max THEN i = i + 1
  60.      'up
  61.     IF k$ = CHR$(0) + "H" THEN IF i > 1 THEN i = i - 1
  62.     IF k$ = "D" THEN RETURN ' all selection has been done
  63.  LOOP UNTIL k$ <> ""
  64.  
  65.  


please run it under DOSBox in the a folder that is DOS compatible,  you can run also it into QB64 BUT you'll get the long name of files if you don't run into a DOS folder, so the ScrollList will be a bit messing up!
Otherwise you must use the right switch of DIR command to get the short name of files into the list created.

Let me know what do you think about this.
Title: Re: Project looking for Programmer (I can't do it myself)
Post by: Daniel3D on December 29, 2021, 10:38:18 am
Hi.
It looks good. I don't understand it all. So I may ask weird questions.
I think that you use command line for the list.
Can that not also be done with interrupts? Or am I mixing things up?

Your first line f$(1 to1000) does that create 1000 of something to use in list's? I think that may be a bit heavy.
I don't have problems with it. Just an impression..
Title: Re: Project looking for Programmer (I can't do it myself)
Post by: Daniel3D on December 29, 2021, 01:45:56 pm
Maybe split lists in groups?
Game files - are known.
Tracks - list only tracks
Cars - list only cars.
Mods. - list files minus game, track and car files
Title: Re: Project looking for Programmer (I can't do it myself)
Post by: TempodiBasic on December 29, 2021, 05:12:52 pm
Hi Daniel3D
fine for getting your feedbacks...

1. About using interrupt in DOS mode:
I prefer to use SHELL command because it is speeder than  getting files of folder using 16 bit interrupts
(as you already know using interrupt we must use some DOS services in a specific order for getting the list of files = much code for reaching the same point)
moreover there is FILES keyword in QBasic (see here https://wiki.qb64.org/wiki/FILES (https://wiki.qb64.org/wiki/FILES)) that it uses to print on the screen the result of its calling.

2. arrays too huge

1000 is a generic target. The original files are about 120 plus mod files = (about) 400 ?! In other words 400 files are a good upper limit about the amount of files that can be in the main folder of the game ?

3. using 4 groups for the scrollListbox
      Game Files are in the list that you have posted before
      getting files list in the folder we can extract the 3 different lists: Tracks, Cars and Mods
please think about this and gimme a confirm to let me go on.

Title: Re: Project looking for Programmer (I can't do it myself)
Post by: Daniel3D on December 29, 2021, 06:48:33 pm
Ok.
1. Clear.. I get your reasoning. Don't know much about interrupts, just know that they exist. So keep going.

2. I think 500 should be enough. I could increase it later if there is need. But I don't expect so.

3. Just a thought. Let's see how it functions as it is now.
Edit:But if we run into problems it may be a solution.
Edit2: I don't know if it is a lot of work. But filtering out tracks and cars in separate lists saves a lot of space on screen.
Cars are 4files per car. Only one name needs to be shown.
Tracks are 1 to 3 files per track. Also only one name needed.
Title: Re: Project looking for Programmer (I can't do it myself)
Post by: TempodiBasic on January 02, 2022, 10:47:39 am
Happy New Year Daniel5

ok
1. you needn't to use interrupt (how much time you and I have saved because I have no pre-built library for DOS interrupt and I have to build it from stratch)

2. for now MAX = 500

3.
this is the options: actual state, one kind of file at time,  multiple files at time
see screenshot
  [ This attachment cannot be displayed inline in 'Print Page' view ]  

let me know your preferences

Waiting your feedback  again Happy New Year
Title: Re: Project looking for Programmer (I can't do it myself)
Post by: Daniel3D on January 02, 2022, 05:32:49 pm
An happy new year to you as well.

I prefer the option with one kind of file.
Multiple columns makes it to complex I think.

So you can install the game (no listings needed)
Or a list of either cars, tracks or all other files (probably containing mod programs like agar)
Title: Re: Project looking for Programmer (I can't do it myself)
Post by: Daniel3D on January 04, 2022, 08:27:57 am
For the car listing.
With the amount of cars and the limited naming possiblity
I would like for you to add the full car name in a separate box (above the list)
The target file is the corresponding car****.Res file.
I posted a script for that before, but that written in freebasic.
I have that script now in a QB version.
If you can add that I would very appreciate it.
Code: QB64: [Select]
  1. Function ExtractCarName$ (filename$)
  2.  f% = FreeFile
  3.  Open filename$ For Binary Access Read As f%
  4.  s$ = Space$(100)
  5.  Get #f%, , s$
  6.  n% = InStr(s$, "gnam")
  7.  Get #f%, n% + 16, l&
  8.  l& = l& + 39
  9.  s$ = Space$(255)
  10.  Get #f%, l&, s$
  11.  n% = InStr(s$, Chr$(0))
  12.  If n% Then s$ = Left$(s$, n% - 1) Else s$ = Left$(s$, 40)
  13.  Close f%
  14.  
  15.  ExtractCarName$ = s$
This code that has been used in several programs.
So I don't expect trouble with it.
If there is something with it I can't help you, so leave it then.
Don't worry about it. It's extra and can be fixed later if needed.

Thanks again.
Title: Re: Project looking for Programmer (I can't do it myself)
Post by: TempodiBasic on January 05, 2022, 09:44:13 am
Hi Daniel3D
fine this function extracting name of car from file of car.
I'll try it so in a second moment I can integrate it.

Soon final version of installer. I'm testing it in Qbasic in DosBox for windows.
See Later
Title: Re: Project looking for Programmer (I can't do it myself)
Post by: Daniel3D on January 05, 2022, 01:23:48 pm
O wow.
Amazing 😁
Title: Re: Project looking for Programmer (I can't do it myself)
Post by: Daniel3D on January 21, 2022, 03:27:52 pm
@TempodiBasic everything alright? Can I do something for you?
Title: Re: Project looking for Programmer (I can't do it myself)
Post by: Richard on February 20, 2022, 06:31:49 am
@TempodiBasic

Is your program in a somewhat usable form - as I would be interested in trying out in bare metal mode on a newer style CPU?
Title: Re: Project looking for Programmer (I can't do it myself)
Post by: Daniel3D on February 22, 2022, 04:34:35 am
Hi Richard.

TempodiBasic has not been online for a while now. Life happens. I am sure he will come around eventually.

Anyway. @Richard I would appreciate it if you could test the program when it is available. It should work just fine, but I don't have a bare metal setup to test that myself.
In september a new realease is planned (a year later than originally intended) so there is time for TempodiBasic. If it is ready before July I'm happy.

In the meantime, you could check http://forum.stunts.hu/index.php (http://forum.stunts.hu/index.php) there are some things happening in the STUNTS world.
Title: Re: Project looking for Programmer (I can't do it myself)
Post by: NOVARSEG on March 15, 2022, 08:06:01 am
I know ASM but it is really hard to do ASM in QB64. I'm not saying impossible - and I have tried by disassembling QB64 code but my lack of compiler knowledge makes that a challenge.  I just do not have the time or patience to tweak QB64 code nor would I want to other than for pure amusement.

Your best bet is to try to write the entire game in QB64 which is not easy but a lot easier than trying to emulate ASM code in QB64 or get into the really brainy world of API functions etc.
Title: Re: Project looking for Programmer (I can't do it myself)
Post by: wiggins on March 15, 2022, 09:22:59 pm
I know ASM but it is really hard to do ASM in QB64. I'm not saying impossible - and I have tried by disassembling QB64 code but my lack of compiler knowledge makes that a challenge.  I just do not have the time or patience to tweak QB64 code nor would I want to other than for pure amusement.

Your best bet is to try to write the entire game in QB64 which is not easy but a lot easier than trying to emulate ASM code in QB64 or get into the really brainy world of API functions etc.
You can download the QB64 source code which contains all the sub-routines.  You can even review the QB64 output file with the generated basic to C code.  What is there to disassemble in QB64?  Nothing is hidden from you.
Title: Re: Project looking for Programmer (I can't do it myself)
Post by: Daniel3D on March 16, 2022, 07:26:11 am
I know ASM but it is really hard to do ASM in QB64. I'm not saying impossible - and I have tried by disassembling QB64 code but my lack of compiler knowledge makes that a challenge.  I just do not have the time or patience to tweak QB64 code nor would I want to other than for pure amusement.

Your best bet is to try to write the entire game in QB64 which is not easy but a lot easier than trying to emulate ASM code in QB64 or get into the really brainy world of API functions etc.
You can download the QB64 source code which contains all the sub-routines.  You can even review the QB64 output file with the generated basic to C code.  What is there to disassemble in QB64?  Nothing is hidden from you.
Thank you both. But it is not about the game itself in this case, but just the SETUP/INSTALLER program to go with it. Because the executables have changed, the original installer program doesn't function anymore.
The only thing I need at the moment is an Installer function added to the setup. The (replacement)setup program is written in QB. It has to run in DOS, that is the main goal.
Title: Re: Project looking for Programmer (I can't do it myself)
Post by: wiggins on March 17, 2022, 09:43:03 pm
So you need a modification to the QB64 installer program?
Title: Re: Project looking for Programmer (I can't do it myself)
Post by: Daniel3D on March 22, 2022, 03:39:36 pm
No, we (at forum.stunts.hu) have rebuild the executable file for the game stunts. That makes the original setup program unable to function. Therefore we made a new setup. That new setup program still needs the installer function.
Title: Re: Project looking for Programmer (I can't do it myself)
Post by: Jakebullet70 on March 30, 2022, 10:35:31 pm
Do you still need help with this?
Title: Re: Project looking for Programmer (I can't do it myself)
Post by: NOVARSEG on April 04, 2022, 12:31:58 am
** The only thing I need at the moment is an Installer function added to the setup. The (replacement)setup program is written in QB. It has to run in DOS, that is the main goal.**

Ok if the installer only runs in DOS then the game runs in DOS too so Im not sure I follow.  You might want to try messing about with Microsoft XP and see if it works there. To run the same DOS game in QB64 you got to port over the basic source code (if you can get the source) and compile it in QB64.  Now I think you said that the game was written in 16 bit assembler but that wont run on anything later than XP
Title: Re: Project looking for Programmer (I can't do it myself)
Post by: Daniel3D on April 05, 2022, 05:33:36 am
Do you still need help with this?
Well, I'm not sure.  There is a lot of progress, but it has halted in the final stages, it seems.
Hi Daniel3D
fine this function extracting name of car from file of car.
I'll try it so in a second moment I can integrate it.

Soon final version of installer. I'm testing it in Qbasic in DosBox for windows.
See Later
But that was 4 months ago, and he hasn't been online in almost as long.

What I'm looking for (it got a bit more extended in this thread) is basically just a DOS based installer
(DOS is its target, and it only needs to function in DOS, a DOS clone or DOS emulator)
(I don't really care about the programming language, but the game-setup part is done and written in QB.)
The installer must be able to install the game clean (just gamefiles for provided list)
or make a full install (all files and subs in game dir)

Optionally are custom options. (can be simple with wild cards - include all tracks, include all cars, something like that)
But an option to just install the game from any location to any location would be awesome.

I know this is a QB64 forum, but the only one 'basic' forum that is active.
So if you're up for some old school QB Programming, you are very welcome.
Title: Re: Project looking for Programmer (I can't do it myself)
Post by: Daniel3D on April 05, 2022, 05:39:31 am
** The only thing I need at the moment is an Installer function added to the setup. The (replacement)setup program is written in QB. It has to run in DOS, that is the main goal.**

Ok if the installer only runs in DOS then the game runs in DOS too so Im not sure I follow.  You might want to try messing about with Microsoft XP and see if it works there. To run the same DOS game in QB64 you got to port over the basic source code (if you can get the source) and compile it in QB64.  Now I think you said that the game was written in 16 bit assembler but that wont run on anything later than XP
Only DOS matters.
The game was recompiled for DOS, so the new setup program was written for DOS.
the installer function is only needed for DOS.

It is mostly to make it whole again and for the few bare metal DOS gamers. Most just drag and drop in windows and use DOSBOX to play.