Jump to content

Make A Program Run In 16-Bit Color Automatically?


le717
 Share

Recommended Posts

I do not know if this is the right place for this. If it's not, please move it.

I bought LEGO Loco this week, and I am waiting for it to arrive this weekend. I have seen on here that you have to put Windows into 16-bit color in order for it to run.

Well, I do not want to change by color depth every time I want to play Loco. So, I thought this:

"Why don't I make a batch file that changes the screen to 16-bit color when I click it, the bat file would run the game, and and when I close the game, the goes back to 32-bit?"

So, I went looking for code that would do just what I want.

I found two scripts. Neither of them work for me. This is one of them:

reschange.exe -width=1280 -height=800 -depth=16 -refresh=60 "C:\Program Files\LEGO Games\LEGO Racers\LEGO Racers.exe" -novideo -window
(I am using LR1 Windowed mode as the test program) That one does not work; I get an error saying that "reschange.exe" is not a valid command, batch file, or exe. The other one I found was this:
rundll32 deskcp16.dll,QUICKRES_RUNDLLENTRY 1280x800x16

c:

cd\Program Files\LEGO Games\LEGO Racers

LEGO Racers.exe" -novideo -window

rundll32 deskcp16.dll,QUICKRES_RUNDLLENTRY 1280x800x32

(I had to add the "32" to the "rundll" command. It did not have it originally.)

That one does not work either. Same error message as the first one.

I found out that "deskcp16.dll" was only in Windows 95. And I have Windows Vista/7 computers in my house.

So, this is the purpose behind this topic: Could someone please write some code to do what I said in my quote? It has to run on Windows Vista and 7, 32 and 64-bit. (32-bit Vista, 64-bit 7.)

I would like to test out the code before Loco arrives (either Thursday or Friday) on LR1 Windowed mode, if that is ok. Of course, you can test it too. ;)

Link to comment
Share on other sites

JrMasterModelBuilder

There are no scripting languages that I know of that have access to those API's. You will need a native application to do this (like you batch script above try to use, but the files don't exist). This website looks like it has a command line tool you can use in your batch file: http://www.entechtaiwan.com/util/multires.shtm

One other thing about batch files you should know. Before starting the program it's almost always to change directory to the program's folder first (so the external file references are correct). For example for starting LEGO Racers use:


::Uncomment (remove "::") the next line if you run the batch file from another drive letter. This will change to the C drive.

::C:

::Surround folder names with spaces in quotes.

cd C:\"Program Files"\"LEGO Games"\"LEGO Racers"

::Use start legoracers.exe if the batch file should not wait for the program to close.

legoracers.exe -novideo -window

Link to comment
Share on other sites

On 9/20/2011 at 9:01 PM, JrMasterModelBuilder said:

There are no scripting languages that I know of that have access to those API's. You will need a native application to do this (like you batch script above try to use, but the files don't exist). This website looks like it has a command line tool you can use in your batch file: http://www.entechtai...l/multires.shtm

One other thing about batch files you should know. Before starting the program it's almost always to change directory to the program's folder first (so the external file references are correct). For example for starting LEGO Racers use:

 

::Uncomment (remove "::") the next line if you run the batch file from another drive letter. This will change to the C drive.

::C:

::Surround folder names with spaces in quotes.

cd C:\"Program Files"\"LEGO Games"\"LEGO Racers"

::Use start legoracers.exe if the batch file should not wait for the program to close.

legoracers.exe -novideo -window

Ok. Thanks for that!

I have been testing that code, and it works, but it loads two instances of LEGO Racers: 1 with the parameters, and the other normally. I have moved it to the where I installed LR, and it does the same thing. Could you perhaps fix that?

Also, I was able to get MultiRes to work at the beginning, but I can't get it now. CMD is giving me "Not a valid Command" error, then proceeds to load up LR, without videos, but not in windowed mode. (Because of the mulitres.exe error)

I installed it in the default place "C:\Program Files\MultiRes" and I have the right name for the exe, so what I am I doing wrong?

EDIT: I guess I should have told you what code I am using. Here is a picture:

Spoiler

maylxx.jpgkey770dbb4533d1e4befcd4a93d759

I am following the example code from the website you gave me, so it should work.

Even though it says there is an error, one of the copies of the game that loads is in windowed mode. So, from what I cam guess, if I removed the "start legoracers.exe", it should work, right? Not so, as seen in this picture:

Spoiler

zpwgl.jpg

The loaded right up, without videos, but not in Windowed mode.

Link to comment
Share on other sites

Oh please. Lrn2qres. http://sourceforge.net/projects/qres/

Grab the /qres-src1097/qrescd/sample-cd/qres folder, put it somewhere, and make a batch file with the following.


@echo off

qres.exe c=16 \R

cd "C:\Program Files\LEGO Games\LEGO Racers"

"LEGO Racers.exe" -novideo -window

Also note that I've never seen 1280x800. You can do 1280x1024, 1280x854, or 1280x960. (qres.exe x=1280 y=1024 c=16 /R) Edit: Res doesn't matter unless the game demands it, which it shouldn't if it's running windowed... Edit: TECHNICALLY... you could do it all with one line of batch, if you put this script in the LEGO Racers folder and make a shortcut to this file. The help file says it should work like this.

@echo off [optional]

C:\Path to qres\qres.exe c=16 \R "LEGO Racers.exe" -novideo -window

Link to comment
Share on other sites

Also note that I've never seen 1280x800. You can do 1280x1024, 1280x854, or 1280x960. (qres.exe x=1280 y=1024 c=16 /R)

Yea. Try telling that to the laptop that I am using right now. :P It runs at 1280x800. In fact, all the laptop that I have in my house run at 1280x800!

Anyway, Thank you so much! It works! I used the second code you gave, put it where I installed LR, modified it, and it worked! LR loaded, there were no videos, it loaded in windowed mode, and when I closed it, the screen switched back to normal!

But I should have read your post more carefully. I downloaded and installed the program, restarted, and then found out that I was use to source code. *faceslap*

I uninstalled the program, but would it have worked with the installed program?

Again, thank you, TheDoctor! Now, when LEGO Loco get here (on Friday or Saturday; I typed the days wrong in the first post), I can use this to run that!

Thank you again, TheDoctor, and thanks to you JrMasterModelBuilder! If you two hadn't posted on here, this case would not be solved!

Link to comment
Share on other sites

JrMasterModelBuilder

@TheDoctor: Hey! Nice program you found!

As for some of the problems you were having in case you have future problems, you should use either

"start someprogram.exe -any -arguments"

if you don't want the batch file to wait for that program to close before continuing or

"someprogram.exe -any -arguments"

if it should wait for the program to finish before continuing, not both.

Also, just downloading a program doesn't mean the command prompt will be able to find it. You need the command prompt to be in the directory with the program, put the full path to it, or have it in your systems "PATH" (a little more complicated).

Link to comment
Share on other sites

Fun fact time. Your system's "PATH" variable is a registry entry with the paths to where system programs and tools are stored, i.e. C:\Windows\System32. What it does is, when you type something in cmd, like 'explorer', it checks the PATH paths for a program called 'explorer(.exe)'. If it can't find it, then it gives you that ""blah" isn'r a recognised internal, external whatever program" error. It also checks whatever the current directory is.

Link to comment
Share on other sites

 Share

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.