barotto / IBMulator

The IBM PS/1 emulator.
https://barotto.github.io/IBMulator
GNU General Public License v3.0
112 stars 4 forks source link

Initialization error on Windows: unable to find the assets directory #43

Closed barotto closed 2 years ago

barotto commented 5 years ago

ibmulator.exe is unable to find the assets directory if the IBMulator folder is placed inside a directory with non-ASCII characters.

Cause: the win32 _fullpath() function (used in the custom realpath() implementation) cannot work with paths that contain non-ASCII characters.

Workaround: place the IBMulator folder in C:\ or in a directory without non-ASCII characters.

message received via email

I downloaded v.0.9 of IBMulator but I'm getting an error //////////////////////////////////////////////////////////////////////////////////// A problem occured during initialisation. See the log file for more info. Use the -v NUM command line swith to enable verbose logging. The log file is here: \log.txt The ini file is here: //////////////////////////////////////////////////////////////////////////////////// but I see no log file anywhere in drive C I set the path to the romset in the ibmulator.ini file as >>>>> path=C:\Users\hrist\AppData\Local\ibmulator\FC0000.BIN this is where .ini and FC000.BIN files exist I use Windows 10 with an NVIDIA graphics gard Please, help!

barotto commented 5 years ago

Hi, for some reason the program can't determine the USERPROFILE environment variable, or HOMEDRIVE + HOMEPATH.

The log file should be here: C:\Users\hrist\AppData\Local\ibmulator\log.txt Can you please verify if it's there?

ghost commented 5 years ago

No, it is NOT. I've already told you that. I searched the entire hard drive and the log file does not exist although message says it was wriiten..somewhere.......

ghost commented 5 years ago

Does this has to do with using greek and english language in Windows 10?

I've noticed that many folders like Icons or Music even Users folder are displayed in greek.

Does this makes the program to be confused?

Nevertheless, when I first run ibmulator.exe it creates the ibmulator.ini file, as expected!!!!

But the log file can not be created!

by the way, if I make a fresh install of Ubuntu 14.04.6, will I be able to run 0.8 version?

I insist about Linux because as I've said, the problem with Windows looks like.....it's unbeatable! And I am not willing of re-installing Windows.....

barotto commented 5 years ago

Thank you for your feedback, Chris. Looking at the source code and given your description of the issue, it appears to be a problem with the handling of files and/or directories, maybe caused by a non-latin charset.

Can you look for the presence of the "capture" folder inside C:\Users\hrist\AppData\Local\ibmulator ? This will help me narrow the search field.

by the way, if I make a fresh install of Ubuntu 14.04.6, will I be able to run 0.8 version?

You really want to use this emulator, don't you? :)

The odds are definitely better with Ubuntu 14 than with any other distros. When I compiled that version I tried to create a portable binary but at least one library was missing from the package, libnettle4, if memory serves. Try to launch the bin/ibmulator program in a terminal and see what happens.... Don't try inside a virtual machine though, because you need a working OpenGL system.

barotto commented 5 years ago

It could still be a problem with the ini file. Can you attach it here?

ghost commented 5 years ago

It doesn't create a "capture" directory either!!!!! :(((

ghost commented 5 years ago

; This is the configuration file for IBMulator 0.9 beta1 ; Lines starting with a ; are comment lines and are ignored. They are used to document the effect of each option. ; Paths can be absolute or relative. ; Relative paths are searched in this order: ; 1. the media directory (in case of floppy/hdd images) ; 2. the user directory (the folder where this file is normally located) ; 3. the program's assets directory

[program] ; media_dir: The default directory used to search for floppy and hdd images. ; capture_dir: Directory where things like wave files, savestates and screenshots get captured. media_dir= capture_dir=

[gui] ; mode: Possible values: normal, compact, realistic. ; normal: the system unit places itself at the bottom of the display and is always visible ; compact: the system unit disappears when input is grabbed or CTRL-F1 is pressed ; realistic: the system is rendered in its entirety, monitor included ; keymap: Keymap table file. The file format is taken from Bochs, with some differences. ; Open a .map file to read comments on how to edit it. ; grab: If 'no' then the mouse will not be hidden when grabbed (useful when debugging IBMulator) ; grab_method: Method to use for mouse grabbing ; Possible values: MOUSE3, CTRL-F10 ; mouse: Mouse type. ; Possible values: none, ps2, serial ; mouse_accel: Enable mouse acceleration ; width: window width in pixel. ; height: window height in pixel (for normal GUI mode it doesn't include the system unit.) ; fullscreen: Start directly in fullscreen. (Press ALT-Enter to go back) ; dpi: Resolution of the host display in DPI (currently used only for mouse acceleration). ; bg_XXX: Background window color ; show_leds: Show or hide the drives motor activity led at the bottom-right (useful in compact GUI mode) mode=normal keymap=keymaps/pc-us.map grab=yes grab_method=MOUSE3 mouse=ps2 mouse_accel=no width=640 height=480 fullscreen=no dpi=96 bg_red=59 bg_green=82 bg_blu=98 show_leds=no

[display] ; The following parameters are used for normal and compact GUI modes only: ; normal_aspect: VGA aspect ratio ; Possible values: original, adaptive, scaled. ; original: 4:3 aspect ratio ; adaptive: screen will be scaled maintaining the aspect ratio of the current video mode ; scaled: screen will be scaled to fill your monitor ; normal_shader: GLSL fragment shader to use for VGA rendering ; normal_filter: VGA scaling filter ; Possible values: nearest, bilinear, bicubic ; The following parameters are used for realistic GUI mode only: ; realistic_shader: GLSL fragment shader to use for VGA rendering ; realistic_filter: VGA scaling filter ; Possible values: nearest, bilinear, bicubic ; realistic_scale: VGA dimensions as a scaling factor. Use this to adjust the image size. ; 1.0 is the original VGA image size and ~1.2 fills the screen. ;realistic_ambient: Intensity of the ambient light. It is a weight for the monitor reflection map. ; Use a number between 0.0 and 1.0. 0.0 gives a pitch-black monitor. ; The following parameters are used for any GUI mode: ; brightness: Monitor brightness. ; When in realistic GUI mode it's clamped to 1.3 ; contrast: Monitor contrast. ; When in realistic GUI mode it's clamped to 1.3 ; saturation: Monitor saturation. normal_aspect=original normal_shader=gui/shaders/fb-normal.fs normal_filter=bilinear realistic_shader=gui/shaders/fb-realistic.fs realistic_filter=bicubic realistic_scale=1.0 realistic_ambient=0.6 brightness=1.0 contrast=1.0 saturation=1.0

[system] ; romset: Path to a bin/zip file or directory containing the ROM set to use (for the correct format see the README) ; model: The PS/1 Model. This is also the machine configuration that's used to select proper values for any "auto" value in this file. ; Possible values: auto, or a machine model string ; auto: the model is determined by the romset ; For the list of supported models and their hardware configuration see IBMulator 0.9 beta1's project site. romset=C:\Users\hrist\AppData\Local\ibmulator\FC0000.BIN model=auto

[cpu] ; model: The CPU model. ; Possible values: auto, 286, 386SX, 386DX. ; frequency: Frequency in MHz. ; Possible values: auto, or an integer number. model=auto frequency=auto

[memory] ; expansion: RAM module installed in the expansion slot. ; Possible values: auto, none, 512K, 2M, 4M, 6M, 8M, 16M. ; Memory configurations for PS/1 models were: ; 2011: 512K on board + 512K, 2MB modules ; 2121: 2M on board + 512K, 2MB, 4MB modules ; 6M, 8M, and 16M modules never officialy existed. ; speed: RAM access time in nanoseconds. ; Possible values: auto, or an integer number expansion=auto speed=auto

[cmos] ; image: Path of the binary file to use for the CMOS initialisation values. ; Possible values: auto, or a path string ; auto: the file name is automatically set depending on the system model ; image_init: Yes if you want to initialise the RTC with the values in the CMOS image ; image_save: Yes if you want to save the CMOS in the image file when the machine is powered off image=auto image_init=no image_save=yes

[drives] ; floppy_a: The type of floppy drive A. ; Possible values: auto, none, 3.5, 5.25 ; floppy_b: The type of floppy drive B. ; Possible values: auto, none, 3.5, 5.25 ; fdd_latency: A multiplier for the floppy drives rotational latency. ; You can use this parameter to speed up the FDD read/write operations. ; Possible values: a real number between 0.0 (no latency) and 1.0 (normal latency.) ; hdd: The type of fixed disk drive C. ; Possible values: none, auto, ps1, ata ; none: no hard disk installed ; auto: automatically determined by the system model ; ps1: IBM's proprietary 8-bit XTA-like controller ; ata: IDE/ATA controller floppy_a=auto floppy_b=auto fdd_latency=1.0 hdd=auto

[floppy_a] ; These options are used to insert a floppy disk at program launch. ; path: Path of a floppy image file; if the file doesn't exist a new one will be created. ; inserted: Yes if the floppy is inserted at program lauch ; readonly: Yes if the floppy image should be write protected ; type: The type of the inserted floppy. ; Possible values: auto, 1.44M, 720K, 1.2M, 360K path= inserted=no readonly=no type=auto

[floppy_b] ; These options are used to insert a floppy disk at program launch. ; path: Path of a floppy image file; if the file doesn't exist a new one will be created. ; inserted: Yes if the floppy is inserted at program lauch ; readonly: Yes if the floppy image should be write protected ; type: The type of the inserted floppy. ; Possible values: auto, 1.44M, 720K, 1.2M, 360K path= inserted=no readonly=no type=auto

[hdd] ; Drive C configuration: ; type: The IBM standard fixed disk type. ; Possible values: ; auto: automatically determined by the system model or the image file ; 15: reserved, don't use ; 35: the IBM WDL-330P 30MB disk drive used on the PS/1 2011 ; 1-44: other standard types (see the project page for the list of types supported by the BIOS) ; 47: custom type (specify the geometry) ; custom: same as 47 ; path: Possible values: auto, or the path of the image file to mount. ; If the file doesn't exist a new one will be created. ; readonly: Yes if the disk image should be write protected (a temporary image will be used) ; save: When you restore a savestate the disk is restored as well, as a temporary read-write image. ; Set this option to 'yes' if you want to make the changes permanent at machine power off in the file specified at 'path' (unless it is write-protected) ; The following parameters are used only for disk type 47 (custom type): ; cylinders: Number of cylinders (max. 1024) ; heads: Number of heads (max. 16) ; sectors: Number of sectors per track (max. 63) ; Drive capacity is cylindersheadssectors*512, for a maximum of 528MB (504MiB) ; The following performance parameters will be used for any disk type: ; seek_max: Maximum seek time in milliseconds ; seek_trk: Track-to-track seek time in milliseconds ; rot_speed: Rotational speed in RPM (min. 3600, max. 7200) ; interleave: Interleave ratio (typically between 1 and 8) type=auto path=auto readonly=no save=yes cylinders=auto heads=auto sectors=auto seek_max=auto seek_trk=auto rot_speed=auto interleave=auto

[mixer] ; prebuffer: How many milliseconds of data to prebuffer before audio starts to be emitted. A larger value might help sound stuttering, but will introduce latency. ; Possible values: any positive integer number between 10 and 1000. ; rate: Sample rate. Use the value which is more compatible with your sound card. Any emulated device with a rate different than this will be resampled. ; Possible values: 48000, 44100, 49716. ; samples: Audio samples buffer size; a larger buffer might help sound stuttering. ; Possible values: 1024, 2048, 4096, 512, 256. ; volume: Audio volume of the emulated sound cards. ; Possible values: any positive real number, 1.0 is nominal. When in realistic GUI mode it's clamped to 1.3 prebuffer=50 rate=48000 samples=1024 volume=1.0

[pcspeaker] ; enabled: Enable PC-Speaker emulation. ; rate: Sample rate. Best results with 22050. ; Possible values: 22050, 48000, 44100, 32000, 11025. ; volume: Audio volume. enabled=yes rate=22050 volume=0.3

[ps1audio] ; enabled: Install the PS/1 Audio/Joystick Card. ; rate: Sample rate of the PSG (Programmable Sound Generator). The DAC rate is programmed at run-time. ; Possible values: 48000, 44100, 32000, 22050, 11025. ; volume: Audio volume. enabled=yes rate=48000 volume=1.0

[adlib] ; enabled: Install the AdLib Audio Card. ; rate: Sample rate. The real AdLib uses a frequency of 49716Hz. ; Possible values: 48000, 49716, 44100, 32000, 22050, 11025. ; volume: Audio volume. enabled=no rate=48000 volume=1.4

[soundfx] ; Volumes are expressed as positive real numbers. ; volume: General volume of the sound effects. Set to 0.0 to disable, 1.0 for normal. ; fdd_seek: Volume of FDD seeks. ; fdd_spin: Volume of FDD spin noise. ; hdd_seek: Volume of HDD seeks. ; hdd_spin: Volume of HDD spin noise. ; system: Volume of system unit's and monitor's noises (realistic GUI mode only.) volume=1.0 fdd_spin=0.4 fdd_seek=0.4 hdd_spin=0.4 hdd_seek=0.4 system=1.0

[com] enabled=yes mode=null dev=

[lpt] enabled=yes port=LPT1 file=

ghost commented 5 years ago

Yes I want to use it for one and only reason. Because it is the only DOS emulator that emulates the sound of disk / hard drive when loading!!!!!!! Only Amiga emulator could do that......

barotto commented 5 years ago

I can't see anything obviously wrong in that ini file. (FYI you can specify the rom name relative to the C:\Users\hrist\AppData\Local\ibmulator\ directory, so simply romset=FC0000.BIN)

Can you try to create the "C:\Users\hrist\AppData\Local\ibmulator\capture" directory and see what happens?

Yes I want to use it for one and only reason. Because it is the only DOS emulator that emulates the sound of disk / hard drive when loading!!!!!!! Only Amiga emulator could do that......

Yes, I think all the various noises and leds add a lot to the experience.

ghost commented 5 years ago

I did create a directory capture and nothing happened.

It's like ibmulator directory is not recognised at all.........

I give up :(

barotto commented 5 years ago

No please don't give up! :( Give me a couple of days, I'll prepare a special version of ibmulator.exe to get better diagnostic messages!

barotto commented 5 years ago

Please try this executable: ibmulator_for_chris.zip Put it inside the bin directory, and use it instead of ibmulator.exe It should tell you what goes wrong before the creation of the log file.

ghost commented 5 years ago

I've managed to get it work on Ubuntu 14.04 :) I would prefer the newer version for the Windows, though..... Okay, I will give it a shot tomorrow morning.

ghost commented 5 years ago

But now, I'm 100% sure that problem derives from the messed up greek/english language of the hard drive.

ghost commented 5 years ago

Error message

What do you think doc? :)

ghost commented 5 years ago

Okay, problem solved!

Since error message said that assets were unable to be found, that trigged me to move the whole "IBM" folder into C:\ where no greek names were used for folders and subfolders.

And.....out of a sudden......problem was eliminated!!!

IBMulator run like a charm!

Thank you VERY-VERY MUCH for the help!!!!! :)

Now.......let's play some "The Secret of Monkey Island"........

barotto commented 5 years ago

Thank you Chris, this will help the development of IBMulator. I'll try to fix the problem, or at the very least I'll have some suggestion to give to other users who might encounter the same issue.... Enjoy Monkey Island! ;)

ghost commented 5 years ago

Now, I have 3 questions: 1) What kind of shaders can I use? What kind of extension? i.e. .glsl is valid? .fx is valid? 2) In order to play Monkey Island, do I have to create an .img file with all the files of the game? 3) I use the 2121 BIOS but the 4-quad GUI doesn't show up like in 2011 BIOS. Instead, a "Non system-disk or disk error. Press Enter" appears after memory test. What do I have to do in order to use the Hard Drive for booting?

barotto commented 5 years ago

Now, I have 3 questions:

replied here: #44