How to start OpenMSX for HD use

By giuseve

Paladin (739)

giuseve's picture

24-03-2012, 12:45

Hi to all,
due to the limits of Catapult, i was looking for a way to launch OpenMSX starting with the HDD image mars2000 gave to us and looking for a nice way to switch on the GFX9000 and activete the grab mouse without using always teh command console.
First I create a link to OpenMSX adding at the end this option

openmsx -script parti.txt

where parti.txt is a file i put iin the same directory of OpenMSX.
This file is something like this:

machine Panasonic_FS-A1GT
ext slotexpander
ext audio
ext audio2
ext gfx9000
ext ide
ext pac
ext scc+
set power off
hda insert symbos.dsk
plug joyportb mouse
set power on
bind "mouse button2 down" "toggle grabinput"
bind F12 "set videosource GFX9000"

In the first line you can decide which model to emulate.
The "ext" command swithc on the relative msx hardware 
In line 10 you can input your HDD image (mine is symbos.dsk)
Last 2 line set the central mouse button as the input button to swap the mause button from windows to msx and viceversa and the f12 button to switch on the gfx9000 video mode.

You can create a .txt for each configuration and launching it with the correct lineinput for openmsx.

Waiting for catapult make all these things easier.... Crying 

Login or register to post comments

By Manuel

Ascended (16864)

Manuel's picture

24-03-2012, 23:18

Great that you got going with this Smile

Some tips:
1. the bind commands you can also do in openMSX console. The you can save it by typing "save_settings" and then they will be always available.
2. instead of binding "set videosource GFX9000" you might find "cycle videosource" more useful. It means it will go through all videosources when pressing F12. In practice, it switches back and forth from MSX to GFX9000.
3. you can set the default machine with the default_machine setting, so the first line you can replace by "set default_machine Panasonic_FS-A1GT" and saving your settings. After this, openMSX will always start up with this machine.

Note that all machine, ext and hda commands can also be given on the openMSX commandline, so you can include that in your link.
Example:

openmsx -machine Panasonic_FS-A1GT -ext slotexpander -ext audio -ext audio2 -ext gfx9000 -ext ide -ext pac -ext scc+ -hda symbos.dsk

This can replace most of your script.

Good luck and have fun with openMSX!

By Vampier

Prophet (2352)

Vampier's picture

24-03-2012, 23:58

catapult is over it's lifespan... it's currently a zombie in need of some serious brains

By giuseve

Paladin (739)

giuseve's picture

21-04-2012, 10:13

Many Many thanks Manuel!
Your help was super for me
regards !!!!

By ericb59

Paladin (977)

ericb59's picture

11-09-2020, 06:53

Hi,
On Windows, When Starting openMSX from a link, or via a command line, open MSX is writing a lot of informations inside the DOS console. Is it possible to start openMSX in QUIET mode ?

By Manuel

Ascended (16864)

Manuel's picture

11-09-2020, 07:52

Can you paste the output it gives here?

By ericb59

Paladin (977)

ericb59's picture

11-09-2020, 08:31

Here the output

Error while executing C:/Users/ericboez/Desktop/WorkingFolder/openMSX/share/scripts/cashandler.tcl
There already exists a setting with this name: fast_cas_load_hack_enabled
    while executing
"user_setting create boolean fast_cas_load_hack_enabled  "Whether you want to enable a hack that enables you to quickly load CAS files
with the cassett..."
    (in namespace eval "::cashandler" script line 3)
    invoked from within
"namespace eval cashandler {

user_setting create boolean fast_cas_load_hack_enabled \
"Whether you want to enable a hack that enables you to quickly l..."
    (file "C:/Users/ericboez/Desktop/WorkingFolder/openMSX/share/scripts/cashandler.tcl" line 1)
    invoked from within
"source C:/Users/ericboez/Desktop/WorkingFolder/openMSX/share/scripts/cashandler.tcl"
    (in namespace eval "::" script line 1)
    invoked from within
"namespace eval :: [ source $script]"
Error while executing C:/Users/ericboez/Desktop/WorkingFolder/openMSX/share/scripts/load_icons.tcl
There already exists a widget with this name: osd_icons
    while executing
"osd create rectangle osd_icons -scaled true -alpha 0 -z 1"
    (in namespace eval "::load_icons" script line 300)
    invoked from within
"namespace eval load_icons {

set_help_text load_icons \
{Load a different set of OSD icons.
 usage:  load_icons [ []]
    is the..."
    (file "C:/Users/ericboez/Desktop/WorkingFolder/openMSX/share/scripts/load_icons.tcl" line 1)
    invoked from within
"source C:/Users/ericboez/Desktop/WorkingFolder/openMSX/share/scripts/load_icons.tcl"
    (in namespace eval "::" script line 1)
    invoked from within
"namespace eval :: [ source $script]"
Error while executing C:/Users/ericboez/Desktop/WorkingFolder/openMSX/share/scripts/mode.tcl
There already exists a setting with this name: mode
    while executing
"user_setting create string mode $help_text normal"
    (in namespace eval "::mode" script line 133)
    invoked from within
"namespace eval mode {

## Mode switching infrastructure

variable modes_info
variable old_mode

proc register {name enter_proc leave_proc description}..."
    (file "C:/Users/ericboez/Desktop/WorkingFolder/openMSX/share/scripts/mode.tcl" line 4)
    invoked from within
"source C:/Users/ericboez/Desktop/WorkingFolder/openMSX/share/scripts/mode.tcl"
    (in namespace eval "::" script line 1)
    invoked from within
"namespace eval :: [ source $script]"
Error while executing C:/Users/ericboez/Desktop/WorkingFolder/openMSX/share/scripts/osd_menu.tcl
There already exists a widget with this name: main_menu_pop_up_button
    while executing
"osd create rectangle main_menu_pop_up_button -z 0 -x 0 -y 0 -w 35 -h 16 -rgba $default_bg_color -fadePeriod $button_fadeout_time"
    (in namespace eval "::osd_menu" script line 53)
    invoked from within
"namespace eval osd_menu {

# default colors defined here, for easy global tweaking
variable default_bg_color "0x7090aae8 0xa0c0dde8 0x90b0cce8 0xc0e0f..."
    (file "C:/Users/ericboez/Desktop/WorkingFolder/openMSX/share/scripts/osd_menu.tcl" line 1)
    invoked from within
"source C:/Users/ericboez/Desktop/WorkingFolder/openMSX/share/scripts/osd_menu.tcl"
    (in namespace eval "::" script line 1)
    invoked from within
"namespace eval :: [ source $script]"
Error while executing C:/Users/ericboez/Desktop/WorkingFolder/openMSX/share/scripts/reverse.tcl
There already exists a setting with this name: auto_enable_reverse
    while executing
"user_setting create string "auto_enable_reverse" \
{Controls whether the reverse feature is automatically enabled on startup.
Internally the reverse f..."
    (file "C:/Users/ericboez/Desktop/WorkingFolder/openMSX/share/scripts/reverse.tcl" line 30)
    invoked from within
"source C:/Users/ericboez/Desktop/WorkingFolder/openMSX/share/scripts/reverse.tcl"
    (in namespace eval "::" script line 1)
    invoked from within
"namespace eval :: [ source $script]"
Error while executing C:/Users/ericboez/Desktop/WorkingFolder/openMSX/share/scripts/screenshot.tcl
can't rename to "old_screenshot": command already exists
    while executing
"rename ::screenshot old_screenshot"
    (in namespace eval "::openmsx" script line 3)
    invoked from within
"namespace eval openmsx {

rename ::screenshot old_screenshot

proc screenshot {args} {
        set args2 []
        set sprites true
        foreach arg $args {
                if {..."
    (file "C:/Users/ericboez/Desktop/WorkingFolder/openMSX/share/scripts/screenshot.tcl" line 1)
    invoked from within
"source C:/Users/ericboez/Desktop/WorkingFolder/openMSX/share/scripts/screenshot.tcl"
    (in namespace eval "::" script line 1)
    invoked from within
"namespace eval :: [ source $script]"
Error while executing C:/Users/ericboez/Desktop/WorkingFolder/openMSX/share/scripts/session_management.tcl
There already exists a setting with this name: enable_session_management
    while executing
"user_setting create boolean enable_session_management "Whether to save your session at exit and restore it again at start up." false"
    (in namespace eval "::session_management" script line 37)
    invoked from within
"namespace eval session_management {

set_help_text save_session \
{save_session []

Saves the state of all your currently running machines as a ..."
    (file "C:/Users/ericboez/Desktop/WorkingFolder/openMSX/share/scripts/session_management.tcl" line 3)
    invoked from within
"source C:/Users/ericboez/Desktop/WorkingFolder/openMSX/share/scripts/session_management.tcl"
    (in namespace eval "::" script line 1)
    invoked from within
"namespace eval :: [ source $script]"
Error while executing C:/Users/ericboez/Desktop/WorkingFolder/openMSX/share/scripts/type.tcl
There already exists a setting with this name: default_type_proc
    while executing
"user_setting create string default_type_proc  {Determines which implementation is used for the generic type command:
type_via_keyboard or type_via_key..."
    (in namespace eval "::type" script line 3)
    invoked from within
"namespace eval type {

user_setting create string default_type_proc \
{Determines which implementation is used for the generic type command:
type_via_..."
    (file "C:/Users/ericboez/Desktop/WorkingFolder/openMSX/share/scripts/type.tcl" line 1)
    invoked from within
"source C:/Users/ericboez/Desktop/WorkingFolder/openMSX/share/scripts/type.tcl"
    (in namespace eval "::" script line 1)
    invoked from within
"namespace eval :: [ source $script]"

Here the Script I'm using with open MSX (openmsx.exe - script ...

# 
# Config based on
# MSX2 Philips NMS 8255. 2 Floppy Disk Drives. RAM 128K. VRAM 128K.


filepool add -path ./openMSX/share/systemroms -types system_rom
filepool add -path ./openMSX/ -types disk


# _______________________________________________________________________________________
# -- Machine Configuration Variables --
# _______________________________________________________________________________________

# -- Use Musical Memory Cartridge to have 1024K of RAM : 1=on 0=off
variable USE_MEMORY_1024K 1

# -- Use GFX9000 Video Cartridge : 1=on 0=off
variable USE_GFX9000 0

# -- Use FM PAC FM Cartridge : 1=on 0=off
variable USE_FMPAC 0


# _______________________________________________________________________________________
# -- Drives source folders --
# _______________________________________________________________________________________

# -- Use Floppy Disk drive A : 1=on 0=off
variable USE_FLOPPY_A 1

# -- Use Floppy Disk drive B : 1=on 0=off
variable USE_FLOPPY_B 0

# -- Drive A: Content folders --
variable CONTENT_DSK_FOLDER1 "dsk/dska/"

# -- Drive B: Content folders --
variable CONTENT_DSK_FOLDER2 "dsk/dskb/"

# -- HDA1: Content folders --
variable CONTENT_HD_FOLDER1 "dsk/hda-1/"

# -- HDA2: Content folders --
variable CONTENT_HD_FOLDER2 "dsk/hda-2/"

# _______________________________________________________________________________________
# -- Export folders --
# _______________________________________________________________________________________

# -- Export folder for HDA1: --
variable CONTENT_EXPORT_HDA1 "dsk/export/hda-1/"

# -- Export folder for HDA2: --
variable CONTENT_EXPORT_HDA2 "dsk/export/hda-2/"

# -- Export folder for DSKA: --
variable CONTENT_EXPORT_DSKA "dsk/export/dska/"

# -- Export folder for DSKB: --
variable CONTENT_EXPORT_DSKB "dsk/export/dskb/"


# _______________________________________________________________________________________
# -- General settings --
# _______________________________________________________________________________________

#-- Video & sound Settings --
set horizontal_stretch 302
set scale_algorithm simple
set scale_factor 4
set scanline 23
set blur 32
set glow 10
set maxframeskip 3
set master_volue 75
set mute off
set save_settings_on_exit off
set auto_enable_reverse off
disable_reversebar
escape_grab

load_icons poker
set consolebackground skins/ConsoleBackgroundFusionC.png
set consolecolumns 155
#set fullspeedwhenloading on

# _______________________________________________________________________________________ 
# Keys mapping Configuration
# meta = CMD key on MacOS / Win key on Windows
# _______________________________________________________________________________________

# Press META+CTRL+U Toggle Mute
bind META+CTRL+U "toggle mute"

# Press F11 to cycle from different video-sources if exists
bind F11 cycle videosource						

# Press F12 to Force or release all Mouse/Keyboard inputs grabbed by OpenMSX
bind F12 "toggle grabinput"		
 
# Press ALT+F11 to decrease OpenMSX window
bind ALT+F11 -repeat "incr scale_factor -1"					

# Press ALT+F12 to increase OpenMSX window
bind ALT+F12 -repeat "incr scale_factor 1"			

# Press SHIFT+F11 to decrease emulation Speed 10%
bind SHIFT+F11 -repeat "incr speed -10"							

# Press SHIFT+F12 to increase emulation Speed 10%
bind SHIFT+F12 -repeat "incr speed 10"		

# Press META+CTRL+F11, to Force new Hard-drive HDA import
bind META+CTRL+F11 "diskmanipulator format hda1;diskmanipulator import hda1 $CONTENT_HD_FOLDER1"

# Press META+CTRL+F12, to export HDA1 and HDA2 to destination folder
bind META+CTRL+F12 "diskmanipulator export hda1 $CONTENT_EXPORT_HDA1;diskmanipulator export hda2 $CONTENT_EXPORT_HDA2;diskmanipulator export diska $CONTENT_EXPORT_DSKA;diskmanipulator export diskb $CONTENT_EXPORT_DSKB"


# _______________________________________________________________________________________

# MSX Machine emulated
machine Philips_NMS_8255 


# Plug The Musical Memory Mapper with 1024K of RAM
if {$USE_MEMORY_1024K eq "1"} {							
	ext Musical_Memory_Mapper
}

# Plug GFX9000 Graphic Interface 
if {$USE_GFX9000 eq "1"} {
	ext gfx9000											
}

# Plug The FMPAC MUSIC Expansion cartridge
if {$USE_FMPAC eq "1"} {
	 ext fmpac
}																				

# Emulate the Cursors keys as Joystick in MSX's joystick Port A
plug joyporta keyjoystick1								

# Emulate your mouse as a MSX mouse in MSX's joystick port B
plug joyportb mouse 									

# Plug a Simple/Covox Module in the Printer Port. Default Audio output used
plug printerport simpl 									

# Enable The Fusion-C Debug Port. Use it with openMSX Debugger	
debug set_watchpoint read_io 0x2E						
		
# Starting the emulation at Full Speed
set throttle off										

# After 18 OpenMSX clocks (?), the normal speed of the computer is set back to normal
after time 18 "set throttle on"							

# Type the content of the file "lastfile.txt" to the console
after time 18 "type_from_file $CONTENT_HD_FOLDER1/lastfile.txt"				


# _______________________________________________________________________________________
# Drive & Har-drive
# _______________________________________________________________________________________

if {$USE_FLOPPY_A eq "1"} {
	diska $CONTENT_DSK_FOLDER1 										
}
if {$USE_FLOPPY_B eq "1"} {
	diskb $CONTENT_DSK_FOLDER2 									
}

ext ide
hda openMSX/hard-drive/hd-ide.dsk
diskmanipulator format hda1
diskmanipulator import hda1 $CONTENT_HD_FOLDER1
diskmanipulator import hda2 $CONTENT_HD_FOLDER2


	





[/]

[/]

[/]

[/]

[/]

[/]

[/]

[/]

[/]

By Manuel

Ascended (16864)

Manuel's picture

11-09-2020, 14:14

You have the cashandler script in your personal script folder. This script is nowadays (as of openMSX 0.14.0) part of the official openMSX scrips so I suggest you remove C:/Users/ericboez/Desktop/WorkingFolder/openMSX/share/scripts/cashandler.tcl
You might also want to remove other obsolete/duplicate scripts from there, there seem to be reported several others.
Perhaps you tried to make some portable installation, but then something is wrong with it and openMSX is finding the same scripts twice. That's not good.

Note that most settings in that start up script you posted can also be done in openMSX itself and then be saved, so you don't have to set them each time.

By ericb59

Paladin (977)

ericb59's picture

12-09-2020, 16:18

haaaa ok...
I know where is my fault.
I work under MacOS and while switching to Windows I merged my OpenMSX folder with the old folder that was on the Windows. Question
`
Thank you