What's new

AutoChan

aika-san

New member
AutoChan v1.0

This is a tool I programmed which will allow you to set up different configurations for Chankast and keep them.

All the info you need is in the readme.

Enjoy!!!
 
Last edited:

Cid

New member
It work pretty well but is this for people too lazy to pause their game and change the option :p
 
OP
A

aika-san

New member
I guess it is Cid. I thought it would be useful though, and only did it 'cause I was bored and wanted to program something. It's annoying that Chankast does not keep its settings. Next weekend I will add a Hotkey Manager and possibly automate the Daemon Tools mounting/unmounting. If it proves to be popular, then I will add more cool time-saving features and keep it up to date with future versions of Chankast. If it's not popular then v1.0 will be the first and last version.
 

pipox

New member
good job and thnx 4 the share

aika-san said:
Next weekend I will add a Hotkey Manager and possibly automate the Daemon Tools mounting/unmounting.
Hmmm....That could be a really nice allround solution for some other emulators out there as well(imagining a 1964 type of browser with a emu selection option in which selected games will be automaticly mouted when selected and maybe even the propper emulator started to run it) That could really work out pretty well for most cd-mount types of emulators.
Stay bored! keep programming:)
good job and thnx 4 the share
 
OP
A

aika-san

New member
pipox: that's a great idea that I'm definately interested in. A profile manager/launcher for all major emulators would be great (Chankast, Dolphin, ePSXe, pcsx2, GiriGiri etc...). Probably take around 6 months for me to get something like that going properly. AutoChan was basically thrown together in 7-8 hours. If I wanted to make a fully-fledged emulator management system, it would obviously be a lot more larger/complex than AutoChan. Therefore, I would need to do it using highly structured/modular code. I've worked on fairly large/complex programs before (100,000+ lines) though, so that's not an issue. It just takes more time. Is anyone aware of a manager/launcher that supports multiple emulators? There would be no point making one if it's already been done before. The best all round front-end I have seen is ePSXecutor but that only supports ePSXe. Even with this I can see where improvements could be made

spunky: I will have a look at this sometime in a few days and let you know what I find out.
 

pipox

New member
aika-san said:
pipox: that's a great idea that I'm definately interested in. A profile manager/launcher for all major emulators would be great (Chankast, Dolphin, ePSXe, pcsx2, GiriGiri etc...). Probably take around 6 months for me to get something like that going properly.

I think the program doesn't need to be to difficult to make(comming out of the fingers of someone that cant program :p ) anyway, i think what is needed to make this work is:
-code to mount/unmount images(or even better, to read iso's)
-browserwindow explorerstyle (if im not mistaking with most languages this is a copy/paste:)
-an option menu to select rom dirs that apear in the browser window
-"open with.." feature depending on the directory of the games


eventually of course the browser window can have pictures instead of text etc.etc. but the basics i guess would be very doable(except for the iso part i guess)
 

pipox

New member
HI again,
bacause i thought mounting the image, or simply running the image would give the most problems i've scanned the web for pre made solutions. i think i found a great one that probably allready is beeing used by some of you. Namely a plugin for deamon tools: VdeskBTEWinSetup.zip
it can be downloaded from here:
http://www.daemon-tools.cc/dtcc/portal/download.php?mode=ViewCategory&catid=7

the program alowes you to make scripts that open programs/close programs/send keystrokes to programs/mount/unmount iso's etc etc and the script can be compiled to a single executable. So i guess if there is a shortcut this would be it.
 
OP
A

aika-san

New member
Any one single job (i.e mounting the drive) is not that hard to do. It's the number of different jobs that need to be done that makes it time consuming. Her'es an example which highlights one single area of the launcher we are talking about. All emulators store their config files in different ways. Sometimes in the registry, sometimes in an .ini file, so your launcher not only needs to be able to read them in all those formats, but also write them in the correct format as well. Some emulators have a huge array of options which your launcher will need to be able to read/write/save/load. If your doing that it takes some time to work out how the emulator stores each setting and set the code up to read/write/save/load. If you want to do it for 5 emulators it takes 5 times longer. As an added headache bonus, different versions of an emulator have different settings, and possibly store them differently. So you might need to take that into account. And that's just the beginning of a profile manager.

Take a look at ePSXecutor. There's a team of people working on that and it only supports 1 emulator. Here were talking about a system that can profile how many emulators? The source code for AutoChan is about 600 lines long, and that's not including my scripting engine. That's just the GUI you see, plus save/load routines. Doing windows GUI elements is fairly easy, but making the option do what it is meant to do can be much more difficult. A single mouse click can trigger thousands of lines of code. Doing a browser window is easy, yes. But what good is a browser window if you can't do anything with the items you are browsing. It's these 'features' which can take a lot of time to do, especially if you want to do them in a professional bugfree manner. Don't be fooled into thinking it's a simple task to take control of someone else's program, because it can be quite technical and very difficult. The objective of any launcher is to make things simpler for the user, but on a technical level (what's happening behind the scenes) it can be a lot of work.

I envisage a system where you can use two mouse clicks to load any game automatically with the correct emulator with the specific settings and hotkey profile for that game also loaded. That's going to be a major undertaking, but also very unique, in that it could make emulated games almost seem native to windows. Imagine being able to double-click a DC ISO and it automatically sets everything up, loads chankast and runs the game. Double click a PSX ISO and it does a similar thing with ePSXe. What u think?
 

MasterPhW

Master of the Emulation Flame
Why always mounting? You ccan play ePSXe with images, too.
Would be great if there would be a tool, which allow you to config the path to your image, and if you double click it will load.
Probably with a preconfigurable plugin config, like ePSXe Cutor does.

But back to the DC tool, great idea, will load it and try it!
 

pipox

New member
btw your autochan is not compatible with cu025beta (=.25+utilities)
the following i think was posted in the wrong threat, so ill past it here:


Ok,
so what we want is:
-for it to read iso/zip or mount/unmount
-for it to change settings per game per console
-multi console ability
-autorun
-run from dirs by doubleklick
(yesterday just after my last post i received a double power box 2 with corrupted drivers and i've been trying to make it work anyway so i didn't have to much time spend in the making of the following), but this is what i have so far:
menu.JPG

The menu ounts/unmounts the game and starts chankast, but does not start the game(If the next chankast will get command line, or a shortkey to press start, then that can be done pretty easy as well) The text under the picture is to show that it also works by doubleclick in explorer per game, so i can doubleklick the surf rocket racer file and it will mount and start chankast. The menu closes when the game chankast is booted(neeed processor time badly:) but that can be set to stay open very easy. The menu looks like this:
:start
set selection=%@REPLACE[ ,,%@SELECTIONBOX[Dreamcast :%@CHAR[13 10 13 10]1. Surf Rocket Racer%@CHAR[13 10]2. 18 Wheeler American Pro Trucker%@CHAR[13 10]3. Aerowings II - Airstrike%@CHAR[13 10]4. Blade of Berserk%@CHAR[13 10]5. Exit]]

if(compare "%%selection%%"="1") gosub option1
if(compare "%%selection%%"="2") gosub option2
if(compare "%%selection%%"="3") gosub option3
if(compare "%%selection%%"="4") gosub option4
if(compare "%%selection%%"="5") gosub option5
if(compare "%%selection%%"="5") goto end
if(selectionboxok)goto start ELSE goto end
:eek:ption1
if (mount 0,D:\my shared folder\emulators\dreamcast\games\SUrf Rocket Racer (Works)\Surf Rocket Racers.cdi) gosub success ELSE goto showerror
exit 0
:success
Chankast_alpha_25.exe
return
:showerror
messagebox Error mounting image
exit 1
return
:eek:ption2
if (mount 0,D:\my shared folder\emulators\dreamcast\games\18 wheeler american pro trucker 1 or 2 players(Works)\18_wheeler_kouji.cdi) gosub success ELSE goto showerror
exit 0
:success
Chankast_alpha_25.exe
return
:showerror
messagebox Error mounting image
exit 1
return
:eek:ption3
if (mount 0,D:\my shared folder\emulators\dreamcast\games\Aerowings II 1 or 2 players(Works)\Aerowings 2 - Airstrike.nrg) gosub success ELSE goto showerror
exit 0
:success
Chankast_alpha_25.exe
return
:showerror
messagebox Error mounting image
exit 1
return
:eek:ption4
if (mount 0,D:\my shared folder\emulators\dreamcast\games\Berserk 1 player(Works)\Berserk.cdi) gosub success ELSE goto showerror
exit 0
:success
Chankast_alpha_25.exe
return
:showerror
messagebox Error mounting image
exit 1
return
:eek:ption5

return
:end


And if a menu is unwanted but a doubleklick from the explorer is the thing wanted then it would look something like this per file:
if (mount 0,D:\my shared folder\emulators\dreamcast\games\Aerowings II 1 or 2 players(Works)\Aerowings 2 - Airstrike.nrg) gosub success ELSE goto showerror
exit 0
:success
Chankast_alpha_25.exe
return
:showerror
messagebox Error mounting image
exit 1
return

The files made are edited in notepad or other text editors and can be converted to .exe files. the tool used is the tool i posted above.

As far as compatibility;
-epsxe +epsxecutor should work(but i had problems booting the games from epsxecutor so that dead ended for me..anyway, psx=covered
-chankast can load/unload and run chankast but config cannot be changed(although autochan if propperly adapted could change that)
-1964 0.99 has a command line bug, so atm that doesn't work, but i believe project64 can so i will check that later(but if working settings can be changed).

these are all i searched for, if the emulator has a command line option, the game will be able to be implemented in the menu. If you happen to know a lot of emulators and a lot of command line syntaxes per emulator, it would be nice to post some here,would speed things up a lot:)

One thing is missing however to reaaaaallly make it sweet, that is an automated menu maker that scans for games and such,...but 1 step at the time..
 
Last edited:
OP
A

aika-san

New member
AutoChan was not designed to be compatible with anything other than Chankast. I've no intention of making it compatible with any software other than Chankast. You take it as it stands. It was a quick throw together test to see whether it was possible to remotely control Chankast. If you don't like it, don't use it, or make something better.

Here's some pointers to think about while making your menu:

- You are assuming that the user of your system knows how to program. Most users don't know how to and those who do won't want to. These are the type of people who want a GUI so they can select what they want with mouseclicks not typing commands. The whole principal of a launcher is to make it faster and easier to change your settings, not more complex.

- What if you move the iso or rom for a particular game to a different folder. You will need to modify your script to suit. But a better way would be for your launcher to mount the iso properly wherever it is located without requiring the script to be modified by the user.

- What about automatically sorting your game menu alphabetically? What about organising your game menu's with game sub-menu's?

- What about game specific settings? I like to run different games with different settings. Where's the easy to use game-specific config GUI?

- Most settings for emulators are not accessible through the command line. How are you gonna read/set the ePSXe plugin settings?

- You must be able to completely run the game from the launcher rather than requiring the user to actually run it.

- limiting yourself to what can be done to an emulator via the command-line is going to severely reduce the number of features you are going to be able to support for the emulator. you need registry access and file access down to the byte level. you also need to be able to reliably simulate mouseclicks and keypresses (including modifiers and multiple keypresses.)

- What about other important checks like:
-does the required emulator exist?
-is it the correct version?
-are all the required support files installed?
-is the entire emulator package uncorrupted?
-are the bios files installed correctly?
-is the iso a valid game?
-is the correct drive selected in the emulator settings?

If you don't perform all necessary checks like these, then your system will fall over in a most unprofessional manner.

- What about game specific configurable hotkeys?

- What about save/load/import/export configurations?

etc...

You are assuming that everything is all set up correctly, and all that needs to be done is to mount the image and run the emulator. Sure, that's a start, but all emulators also need configuring to suit the game and the users system and their preferences.

All these things and more need to be done using a GUI. Trust me, it's a can of worms. The more you look, the more there is to do. If it was straightforward to do this type of program, then why hasn't it already been done before?

Keep going and good luck!

Unfortunately I can't devote much time to writing Chankast utils mainly because I'm already working on a large PC RPG project which is maybe 1/3 completed.
 
Last edited:

pipox

New member
aika-san said:
AutoChan was not designed to be compatible with anything other than Chankast. I've no intention of making it compatible with any software other than Chankast. You take it as it stands. It was a quick throw together test to see whether it was possible to remotely control Chankast. If you don't like it, don't use it, or make something better.
I didn't tell you to make it compatible, im just saying it isn't, giving you the free choise of making it compatible or leave it as it is.

aika-san said:
- You are assuming that the user of your system knows how to program. Most users don't know how to and those who do won't want to.
No need to, the things i posted are a beginnning and can be modified to become an automated installation.

aika-san said:
- What if you move the iso or rom for a particular game to a different folder. You will need to modify your script to suit. But a better way would be for your launcher to mount the iso properly wherever it is located without requiring the script to be modified by the user..
The script is in normal text, it is not difficult(for programmers) to write a function that reckognizes peaces of text and change it and safe it.especially when all games from same emu are in same dir.

aika-san said:
- What about automatically sorting your game menu alphabetically? What about organising your game menu's with game sub-menu's?
not really neccesary, but not difficult either i guess, anyway priorities, and i dont think this has a high one.

aika-san said:
- What about game specific settings? I like to run different games with different settings. Where's the easy to use game-specific config GUI?
not there, personally i dont change my configuration to much, actually i think i never change them..ok...maaaaaybe sometimes, but low prio

aika-san said:
- Most settings for emulators are not accessible through the command line. How are you gonna read/set the ePSXe plugin settings??
epsxecutor enables configuration and generation of shortcuts that can be used in the menu, and again, i dont reconfigure to much, so i don't really miss the option, although it would be nice to implement it

aika-san said:
- You must be able to completely run the game from the launcher rather than requiring the user to actually run it.
True, that would be the best, but im no programmer, i wouldn't know how when the program cannot be started with keystrokes:/, however some emulators will still be able to do that.

aika-san said:
- limiting yourself to what can be done to an emulator via the command-line is going to severely reduce the number of features you are going to be able to support for the emulator. you need registry access and file access down to the byte level. you also need to be able to reliably simulate mouseclicks and keypresses (including modifiers and multiple keypresses.).
here is an example of regestry writing:
filetowrite %tmp%\~btewin.reg
writeline REGEDIT4
writeline [HKEY_LOCAL_MACHINE\Software\BTEWin test]
writeline "BTEWin value"="This is only a test"
if (messageboxyesno Do you want to edit the registry?) regedit /s %tmp%\~btewin.reg ELSE goto end
waitforprogram
:end
del %tmp%\~btewin.reg

and here is an example of keystrokes:
notepad.exe
delay 10
appactivate "Sin*"
appactivate "Nona*"
Keystack It's easy to send keystrokes to applications

aika-san said:
- What about other important checks like:
-does the required emulator exist?
-is it the correct version?
-are all the required support files installed?
-is the entire emulator package uncorrupted?
-are the bios files installed correctly?
-is the iso a valid game?
-is the correct drive selected in the emulator settings?

If you don't perform all necessary checks like these, then your system will fall over in a most unprofessional manner.

- What about game specific configurable hotkeys?

- What about save/load/import/export configurations?

etc...
You want to see a final version without alpha/beta, but you're forgetting that i have absolute no programming skills, i have no experience at all.


The way i see this program grow is step by step, if it will grow at all, because that most probably greatly depends on people that might or might not become inspired by the idear and pick it up in a professional way.
 
OP
A

aika-san

New member
I did not say that I want to see a finished version. I said:

"Here's some pointers to think about while making your menu"

These points (and many more) are all issues that must be dealt with at some stage if any system like this is going to be a viable solution.

About running the game in Chankast. I used keystrokes. Just do the following:

- Activate the Chankast window
- Send the following sequence of keypresses: {RightAlt}, {DownArrow}, {Enter}

That's the equivalent of selecting run option on the Chankast menu.

I'm capable of programming everything I have mentioned, but it is a large project and as I mentioned I'm already working on an RPG. Like you say, maybe someone will see this and have a go at doing a professional emulator management system. I can't, otherwise it would detriment the RPG that I've spent 100's of hours doing and that's not a sacrifice I'm willing to make.
 
Last edited:

pipox

New member
aika-san said:
I'm capable of programming everything I have mentioned, but it is a large project and as I mentioned I'm already working on an RPG. Like you say, maybe someone will see this and have a go at doing a professional emulator management system. I can't, otherwise it would detriment the RPG that I've spent 100's of hours doing and that's not a sacrifice I'm willing to make.
I understand, it wasn't my intention to make you feel forced in helping me.

Anyway, our conversations resulted in the first thingy i made and is actually usefull, I'll post it in the main, so have a look:)
 

Top