Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
PUAE
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
PocketInsanity
PUAE
Commits
89d2d049
Commit
89d2d049
authored
May 20, 2010
by
Mustafa 'GnoStiC' TUFAN
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2.2.0 beta3
parent
d57e527f
Changes
16
Show whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
2085 additions
and
2051 deletions
+2085
-2051
bsdsocket.txt
docs/bsdsocket.txt
+2
-2
cmd-line.txt
docs/cmd-line.txt
+7
-6
compiling.txt
docs/compiling.txt
+23
-8
configuration.txt
docs/configuration.txt
+67
-67
floppies.txt
docs/floppies.txt
+3
-3
joystick.txt
docs/joystick.txt
+4
-4
keyboard.txt
docs/keyboard.txt
+11
-11
make_hdf.txt
docs/make_hdf.txt
+1
-1
scsi.txt
docs/scsi.txt
+12
-12
cfgfile.c
src/cfgfile.c
+1
-1
filesys.c
src/filesys.c
+1913
-1895
autoconf.h
src/include/autoconf.h
+3
-3
commpipe.h
src/include/commpipe.h
+24
-24
uae_string.h
src/include/uae_string.h
+3
-3
misc.c
src/misc.c
+8
-8
config.log
src/tools/config.log
+3
-3
No files found.
docs/bsdsocket.txt
View file @
89d2d049
...
@@ -12,7 +12,7 @@ be sufficient to allow you to use most popular AmigaOS network
...
@@ -12,7 +12,7 @@ be sufficient to allow you to use most popular AmigaOS network
clients, such as web browsers and mail readers.
clients, such as web browsers and mail readers.
To enable the bsdsocket.library emulation (assuming you are using a
To enable the bsdsocket.library emulation (assuming you are using a
version of
E-
UAE with this feature compiled in), add the option
version of
P
UAE with this feature compiled in), add the option
bsdsocket_emu=true
bsdsocket_emu=true
...
@@ -28,6 +28,6 @@ emulated Amiga environment. For example, Amiga software will not be
...
@@ -28,6 +28,6 @@ emulated Amiga environment. For example, Amiga software will not be
able to bind to ports already in use by host software, and your host
able to bind to ports already in use by host software, and your host
operating system may impose access controls on certain ranges of ports.
operating system may impose access controls on certain ranges of ports.
Older versions of
E-
UAE required that a bsdsocket.library wrapper file
Older versions of
P
UAE required that a bsdsocket.library wrapper file
be installed somewhere in the LIBS: path in your Amiga environment.
be installed somewhere in the LIBS: path in your Amiga environment.
This is no longer the case, and this file should now be removed.
This is no longer the case, and this file should now be removed.
docs/cmd-line.txt
View file @
89d2d049
Command line options for
E-
UAE
Command line options for
P
UAE
==============================
==============================
E-
UAE supports the following command-line options. Note that, where
P
UAE supports the following command-line options. Note that, where
applicable, these will over-ride any similar options specified in the
applicable, these will over-ride any similar options specified in the
default configuration file.
default configuration file.
...
@@ -28,7 +28,7 @@ This document (like the rest of the documentation) is a work-in-progress.
...
@@ -28,7 +28,7 @@ This document (like the rest of the documentation) is a work-in-progress.
-s ntsc=true
-s ntsc=true
to start
E-
UAE in NTSC mode.
to start
P
UAE in NTSC mode.
See configuration.txt for supported options.
See configuration.txt for supported options.
...
@@ -60,6 +60,7 @@ This document (like the rest of the documentation) is a work-in-progress.
...
@@ -60,6 +60,7 @@ This document (like the rest of the documentation) is a work-in-progress.
2: 68020
2: 68020
3: 68020/68881
3: 68020/68881
4: 68040
4: 68040
6: 68060
-w<n>
-w<n>
...
@@ -90,7 +91,7 @@ This document (like the rest of the documentation) is a work-in-progress.
...
@@ -90,7 +91,7 @@ This document (like the rest of the documentation) is a work-in-progress.
-c4
-c4
will cause
E-
UAE to emulate 2 MB of Chip memory.
will cause
P
UAE to emulate 2 MB of Chip memory.
-b<n>
-b<n>
...
@@ -164,12 +165,12 @@ Options specific to the X11 graphics driver
...
@@ -164,12 +165,12 @@ Options specific to the X11 graphics driver
-L
-L
Use "low-bandwidth" mode, which may reduce the amount of data transferred
Use "low-bandwidth" mode, which may reduce the amount of data transferred
between
E-
UAE and the X server. That's particularly an advantage when these
between
P
UAE and the X server. That's particularly an advantage when these
are running on two different machines in a network.
are running on two different machines in a network.
-T
-T
Use the MIT-SHM extension. This may not be available on all machines, and
Use the MIT-SHM extension. This may not be available on all machines, and
it will not work if
E-
UAE and the X server are not running on the same
it will not work if
P
UAE and the X server are not running on the same
machine. In all other configurations, turning on this option will give you
machine. In all other configurations, turning on this option will give you
a huge speed improvement.
a huge speed improvement.
...
...
docs/compiling.txt
View file @
89d2d049
Compiling
E-
UAE
Compiling
P
UAE
===============
===============
E-
UAE should be able to compile on any platform with a POSIX-like shell
P
UAE should be able to compile on any platform with a POSIX-like shell
environment, a C compiler and make. Version 2.95 or newer of the GNU C
environment, a C compiler and make. Version 2.95 or newer of the GNU C
Compiler is recommended as is GNU make, but alternative compilers and
Compiler is recommended as is GNU make, but alternative compilers and
versions of make may work. Some features may be GCC-specific, however.
versions of make may work. Some features may be GCC-specific, however.
...
@@ -9,15 +9,26 @@ Currently, for example, the JIT - the compiler which dynamically
...
@@ -9,15 +9,26 @@ Currently, for example, the JIT - the compiler which dynamically
translate 68k opcodes to x86 opcodes - does require GCC (and GAS, the
translate 68k opcodes to x86 opcodes - does require GCC (and GAS, the
GNU assembler).
GNU assembler).
Currently zlib is also required to build
E-
UAE for all supported
Currently zlib is also required to build
P
UAE for all supported
platforms. This isn't much of hardship since zlib is available
platforms. This isn't much of hardship since zlib is available
everywhere, but shout loudly enough and I'll fix this.
everywhere, but shout loudly enough and I'll fix this.
Required Stuff
==============
(for debian based Linux)
apt-get install build-essential
apt-get install automake
apt-get install zlib1g
apt-get install libsdl1.2-dev
apt-get install libgtk2.0-dev
apt-get install xorg-core
Configuring
Configuring
===========
===========
The first step to compiling
E-
UAE is to generate a makefile suitable
The first step to compiling
P
UAE is to generate a makefile suitable
for your intended target system. This is done by running the configure
for your intended target system. This is done by running the configure
script.
script.
...
@@ -85,6 +96,10 @@ selecting what features are built into UAE. Here's a selection:
...
@@ -85,6 +96,10 @@ selecting what features are built into UAE. Here's a selection:
bsdsocket.library). This works only on Unix platforms at the moment
bsdsocket.library). This works only on Unix platforms at the moment
(including Linux, Solaris and OS X).
(including Linux, Solaris and OS X).
--enable-gccopt
Enable CPU specific optimization parameters. Script will check for your CPU's
features and set additional compile flags.
--with-caps
--with-caps
Build with support for IPF (CAPS) images. This requires the IPF
Build with support for IPF (CAPS) images. This requires the IPF
development files from http://www.caps-project.org/
development files from http://www.caps-project.org/
...
@@ -130,22 +145,22 @@ box.
...
@@ -130,22 +145,22 @@ box.
Building the SCSI emulation
Building the SCSI emulation
---------------------------
---------------------------
E-
UAE's SCSI emulation may use libscg, the SCSI transport layer from
P
UAE's SCSI emulation may use libscg, the SCSI transport layer from
the cdrtools project (see http://cdrecord.berlios.de). Note, however,
the cdrtools project (see http://cdrecord.berlios.de). Note, however,
due to a license change in the cdrtools project, only versions of
due to a license change in the cdrtools project, only versions of
cdrtools up to 2.01.01a08 inclusive may be used.
cdrtools up to 2.01.01a08 inclusive may be used.
If libscg is not available on your build system, download a recent
If libscg is not available on your build system, download a recent
version of cdrecord and compile it. Then run the ./src/install_libscg
version of cdrecord and compile it. Then run the ./src/install_libscg
script in the
E-
UAE source archive to move the relevant files from
script in the
P
UAE source archive to move the relevant files from
cdrecord to the
E-
UAE source directory.
cdrecord to the
P
UAE source directory.
If your system has the libscg headers and library installed in a
If your system has the libscg headers and library installed in a
non-standard location, you can pass the --with-libscg-prefix option or
non-standard location, you can pass the --with-libscg-prefix option or
the --with-libscg-includedir and --with-libscg-libdir options to the
the --with-libscg-includedir and --with-libscg-libdir options to the
configure script to specify where these are installed.
configure script to specify where these are installed.
On Linux systems, if libscg is not available,
E-
UAE tries to use a
On Linux systems, if libscg is not available,
P
UAE tries to use a
Linux-specific SCSI emulation that is based on some ioctl() commands.
Linux-specific SCSI emulation that is based on some ioctl() commands.
...
...
docs/configuration.txt
View file @
89d2d049
Configuring
E-
UAE
Configuring
P
UAE
=================
=================
E-
UAE may be configured via options supplied in a plain-text configuration
P
UAE may be configured via options supplied in a plain-text configuration
file. This configuration file contains options of the form <key>=<value> and
file. This configuration file contains options of the form <key>=<value> and
each new option must begin a new line. Blanks lines are ignored, and lines
each new option must begin a new line. Blanks lines are ignored, and lines
beginning with a '#' character are treated as comments and thus also
beginning with a '#' character are treated as comments and thus also
ignored.
ignored.
When
E-
UAE is started it tries to load a default configuration file. Where
When
P
UAE is started it tries to load a default configuration file. Where
it looks for this file is platform-dependent, but typically it will look for
it looks for this file is platform-dependent, but typically it will look for
a file called '.uaerc' in the current directory and (on multi-user
a file called '.uaerc' in the current directory and (on multi-user
platforms) in the user's home directory. On MacOS X, the default is called
platforms) in the user's home directory. On MacOS X, the default is called
'default.uaerc' instead since 'dot files' are not visible in Finder,
'default.uaerc' instead since 'dot files' are not visible in Finder,
the OS X file manager.
the OS X file manager.
You may tell
E-
UAE to load a configuration file in addition to the default by
You may tell
P
UAE to load a configuration file in addition to the default by
passing the '-f' switch to
E-
UAE on the command line. Any options found in
passing the '-f' switch to
P
UAE on the command line. Any options found in
this file will override the values of the same options in the default file.
this file will override the values of the same options in the default file.
The '-s' switch may also be used to specify a single <key>=<value> option on
The '-s' switch may also be used to specify a single <key>=<value> option on
the command line, which, again, will override options found in the default
the command line, which, again, will override options found in the default
file.
file.
The default values for
E-UAE's configuration options will cause E-
UAE to
The default values for
PUAE's configuration options will cause P
UAE to
emulate a 68000-based ECS system with 512 KB of Chip memory and 512 KB of
emulate a 68000-based ECS system with 512 KB of Chip memory and 512 KB of
Slow memory. The only option you absolutely need to specify is the path to
Slow memory. The only option you absolutely need to specify is the path to
the Kickstart image you want to use (unless you wish to use
E-
UAE's minimal
the Kickstart image you want to use (unless you wish to use
P
UAE's minimal
Kickstart emulation, in which case you must instead supply the path to a
Kickstart emulation, in which case you must instead supply the path to a
floppy disk image to boot from).
floppy disk image to boot from).
In the following descriptions of
E-
UAE's configuration options, the template
In the following descriptions of
P
UAE's configuration options, the template
<n> refers to an integer value, <boolean> to a value of 'true' or 'false',
<n> refers to an integer value, <boolean> to a value of 'true' or 'false',
and <path> refers to a file path using whatever conventions the host platform
and <path> refers to a file path using whatever conventions the host platform
uses to specify paths.
uses to specify paths.
...
@@ -40,7 +40,7 @@ General options
...
@@ -40,7 +40,7 @@ General options
===============
===============
The following options all have a prefix of the form <target>. The value of
The following options all have a prefix of the form <target>. The value of
<target> corresponds to the host platform on which you are running
E-
UAE.
<target> corresponds to the host platform on which you are running
P
UAE.
Target Platform
Target Platform
------ --------
------ --------
...
@@ -79,16 +79,16 @@ use_gui=<boolean> (default=true)
...
@@ -79,16 +79,16 @@ use_gui=<boolean> (default=true)
Open a configuration GUI at start-up before starting the emulation proper.
Open a configuration GUI at start-up before starting the emulation proper.
This option is ignored on platforms without a configuration GUI or if
This option is ignored on platforms without a configuration GUI or if
E-
UAE has been built without such a GUI.
P
UAE has been built without such a GUI.
use_debugger=<boolean> (default=false)
use_debugger=<boolean> (default=false)
Open the built-in debugger when the emulation starts. This option is
Open the built-in debugger when the emulation starts. This option is
ignored if
E-
UAE has been built without debugging support or if the
ignored if
P
UAE has been built without debugging support or if the
debugger cannot be opened due to platform-specific restrictions (at
debugger cannot be opened due to platform-specific restrictions (at
the moment the debugger requires a terminal/console window, so it
the moment the debugger requires a terminal/console window, so it
typically only works if you start
E-
UAE from a shell terminal).
typically only works if you start
P
UAE from a shell terminal).
Host CPU-specific options
Host CPU-specific options
...
@@ -97,10 +97,10 @@ Host CPU-specific options
...
@@ -97,10 +97,10 @@ Host CPU-specific options
x86.use_tsc=<boolean> (default=true)
x86.use_tsc=<boolean> (default=true)
On x86 machines, if this option is true then the processor's timestamp
On x86 machines, if this option is true then the processor's timestamp
counter will be used for timing in
E-
UAE. This used to be a problem for
counter will be used for timing in
P
UAE. This used to be a problem for
machines which did power-saving by scaling down the CPU's clock frequency,
machines which did power-saving by scaling down the CPU's clock frequency,
but with
E-
UAE 0.8.28 and above this should no longer be an issue on
but with
P
UAE 0.8.28 and above this should no longer be an issue on
Linux. If you are running
E-
UAE on some other x86 platform which
Linux. If you are running
P
UAE on some other x86 platform which
does frequency scaling, then set this option to false. Performance
does frequency scaling, then set this option to false. Performance
will suffer, but at least timing won't be affected by changes in CPU
will suffer, but at least timing won't be affected by changes in CPU
frequency.
frequency.
...
@@ -114,9 +114,9 @@ amd64.use_tsc=<boolean> (default=true)
...
@@ -114,9 +114,9 @@ amd64.use_tsc=<boolean> (default=true)
ppc.use_tbc=<boolean> (default=true)
ppc.use_tbc=<boolean> (default=true)
On PPC machines, if this option is true then use the processor's timebase
On PPC machines, if this option is true then use the processor's timebase
register for timing in
E-
UAE. Since the PPC's TBC isn't affected by
register for timing in
P
UAE. Since the PPC's TBC isn't affected by
frequency scaling, this option is of little use and is supported only for
frequency scaling, this option is of little use and is supported only for
completeness. It may be useful if
E-
UAE misdetects or miscalibrates your
completeness. It may be useful if
P
UAE misdetects or miscalibrates your
machine's timebase frequency (if it does, please let me know).
machine's timebase frequency (if it does, please let me know).
...
@@ -144,13 +144,13 @@ cpu_speed=<speed> (default=real)
...
@@ -144,13 +144,13 @@ cpu_speed=<speed> (default=real)
relative to the Amiga chipset. This may have the value 'real', 'max' or
relative to the Amiga chipset. This may have the value 'real', 'max' or
can be an integer between 1 and 20.
can be an integer between 1 and 20.
If set to 'real',
E-
UAE will try to emulate the performance of an original
If set to 'real',
P
UAE will try to emulate the performance of an original
7MHz 68000-based Amiga such as an A500. That is, the relative balance of
7MHz 68000-based Amiga such as an A500. That is, the relative balance of
time spent emulating the CPU and the Amiga chipset will be similar to the
time spent emulating the CPU and the Amiga chipset will be similar to the
performance of a real Amiga and
E-
UAE will try do the same amount of CPU
performance of a real Amiga and
P
UAE will try do the same amount of CPU
work per display frame as a real 68000-based Amiga. Additionally, if
work per display frame as a real 68000-based Amiga. Additionally, if
any time is left over after emulating the A500's CPU and chipset in
any time is left over after emulating the A500's CPU and chipset in
each display frame, then
E-
UAE will wait until until the next
each display frame, then
P
UAE will wait until until the next
display frame is due.
display frame is due.
Thus, the setting 'real' is recommended for games designed to run on
Thus, the setting 'real' is recommended for games designed to run on
...
@@ -158,7 +158,7 @@ cpu_speed=<speed> (default=real)
...
@@ -158,7 +158,7 @@ cpu_speed=<speed> (default=real)
many classic Amiga games.
many classic Amiga games.
If set to 'max', the CPU emulation will run at the maximum speed that the
If set to 'max', the CPU emulation will run at the maximum speed that the
host CPU can achieve.
E-
UAE will spend as much time as it can
host CPU can achieve.
P
UAE will spend as much time as it can
emulating the 68000 CPU and will not wait at all per frame.
emulating the 68000 CPU and will not wait at all per frame.
Integer values for <speed> adjust the relative amounts of time devoted to
Integer values for <speed> adjust the relative amounts of time devoted to
...
@@ -180,7 +180,7 @@ finegrain_cpu_speed=<n> (default=N/A)
...
@@ -180,7 +180,7 @@ finegrain_cpu_speed=<n> (default=N/A)
cpu_compatible=<boolean> (default=false)
cpu_compatible=<boolean> (default=false)
If enabled,
E-
UAE will use a slower but more compatible version of the CPU
If enabled,
P
UAE will use a slower but more compatible version of the CPU
emulation. This may be necessary to run some some demos and games
emulation. This may be necessary to run some some demos and games
correctly.
correctly.
...
@@ -189,7 +189,7 @@ cpu_compatible=<boolean> (default=false)
...
@@ -189,7 +189,7 @@ cpu_compatible=<boolean> (default=false)
cpu_cycle_exact=<boolean> (default=false)
cpu_cycle_exact=<boolean> (default=false)
If enabled,
E-
UAE will employ a CPU emulation which tries to fully
If enabled,
P
UAE will employ a CPU emulation which tries to fully
emulate the relative timing of CPU and chipset cycles. This is much more
emulate the relative timing of CPU and chipset cycles. This is much more
demanding even than the "compatible" CPU emulation, but more accurate -
demanding even than the "compatible" CPU emulation, but more accurate -
and so may be necessary to correctly run software which aggressively uses
and so may be necessary to correctly run software which aggressively uses
...
@@ -294,11 +294,11 @@ ROM options
...
@@ -294,11 +294,11 @@ ROM options
kickstart_rom_file=<path>
kickstart_rom_file=<path>
The file path of a Kickstart ROM image to load. <path> may either be an
The file path of a Kickstart ROM image to load. <path> may either be an
absolute path or a path relative to the current directory when
E-
UAE was
absolute path or a path relative to the current directory when
P
UAE was
run. The token '$(FILE_PATH)' at the start of a path will be expanded to
run. The token '$(FILE_PATH)' at the start of a path will be expanded to
the path specified by the <target>.rom_path= option.
the path specified by the <target>.rom_path= option.
If <path> is empty,
E-
UAE will use its built-in Kickstart emulation rather
If <path> is empty,
P
UAE will use its built-in Kickstart emulation rather
than a real Kickstart image. This requires a valid floppy disk to boot
than a real Kickstart image. This requires a valid floppy disk to boot
from mounted in the emulated DF0: drive. The Kickstart emulation is
from mounted in the emulated DF0: drive. The Kickstart emulation is
sufficient to play many classic Amiga games.
sufficient to play many classic Amiga games.
...
@@ -315,7 +315,7 @@ kickstart_key_file=<path>
...
@@ -315,7 +315,7 @@ kickstart_key_file=<path>
Kickstart ROM images provided by Cloanto in its Amiga Forever
Kickstart ROM images provided by Cloanto in its Amiga Forever
distribution are encrypted. This option specifies the key file required
distribution are encrypted. This option specifies the key file required
to decrypt such an image. <path> may either be an absolute path to the ROM
to decrypt such an image. <path> may either be an absolute path to the ROM
key file or a path relative to the current directory when
E-
UAE was run.
key file or a path relative to the current directory when
P
UAE was run.
The token '$(FILE_PATH)' at the start of a path will be expanded to the
The token '$(FILE_PATH)' at the start of a path will be expanded to the
path specified by the <target>.rom_path= option.
path specified by the <target>.rom_path= option.
...
@@ -332,11 +332,11 @@ kickstart_ext_rom_file=<path>
...
@@ -332,11 +332,11 @@ kickstart_ext_rom_file=<path>
This option specifies the file path of an extended ROM image to load.
This option specifies the file path of an extended ROM image to load.
<path> may either be an absolute path or a path relative to the current
<path> may either be an absolute path or a path relative to the current
directory when
E-
UAE was run. The token '$(FILE_PATH)' at the start of a
directory when
P
UAE was run. The token '$(FILE_PATH)' at the start of a
path will be expanded to the path specified by the <target>.rom_path=
path will be expanded to the path specified by the <target>.rom_path=
option.
option.
If
E-
UAE has been compiled without support for emulating the CDTV or CD32,
If
P
UAE has been compiled without support for emulating the CDTV or CD32,
then this option will be ignored.
then this option will be ignored.
...
@@ -350,7 +350,7 @@ kickshifter=<boolean> (default=false)
...
@@ -350,7 +350,7 @@ kickshifter=<boolean> (default=false)
If enabled, the Kickstart ROM image will be patched after it is loaded into
If enabled, the Kickstart ROM image will be patched after it is loaded into
memory to support the running of Shapeshifter, the software-based classic Mac
memory to support the running of Shapeshifter, the software-based classic Mac
emulation for AmigaOS, within
E-
UAE.
emulation for AmigaOS, within
P
UAE.
RAM options
RAM options
...
@@ -362,7 +362,7 @@ chipmem_size=<n> (default=1, that is, 512 KB)
...
@@ -362,7 +362,7 @@ chipmem_size=<n> (default=1, that is, 512 KB)
chipset). The valid range of values for <n> is between 1 and 16, that is,
chipset). The valid range of values for <n> is between 1 and 16, that is,
from 512 KB to 8 MB.
from 512 KB to 8 MB.
Note that
E-
UAE must emulate an ECS ("Fat") Agnus to be able to use 1 MB
Note that
P
UAE must emulate an ECS ("Fat") Agnus to be able to use 1 MB
of Chip memory or more. Also note that Fast memory cannot be used if you
of Chip memory or more. Also note that Fast memory cannot be used if you
select more than 2MB of Chip memory.
select more than 2MB of Chip memory.
...
@@ -384,7 +384,7 @@ bogomem_size=<n> (default=2, that is, 512 KB)
...
@@ -384,7 +384,7 @@ bogomem_size=<n> (default=2, that is, 512 KB)
Fast memory, this memory cannot be accessed by the CPU when the custom
Fast memory, this memory cannot be accessed by the CPU when the custom
chipset is busy - hence the term "Slow".
chipset is busy - hence the term "Slow".
Some old games and demos may require this type of memory. If
E-
UAE
Some old games and demos may require this type of memory. If
P
UAE
reports strange exceptions occuring when booting a floppy or weird
reports strange exceptions occuring when booting a floppy or weird
accesses to custom chip registers, then try adding some "Slow" memory.
accesses to custom chip registers, then try adding some "Slow" memory.
Really old games may fail when "Slow" memory is added.
Really old games may fail when "Slow" memory is added.
...
@@ -400,7 +400,7 @@ z3mem_size=<n> (default=0)
...
@@ -400,7 +400,7 @@ z3mem_size=<n> (default=0)
Emulate <n> MB of Zorro III Fast memory.
Emulate <n> MB of Zorro III Fast memory.
E-
UAE must emulate a 32-bit CPU (a 68020 or better, not an 68ec020) to
P
UAE must emulate a 32-bit CPU (a 68020 or better, not an 68ec020) to
support the emulation of Zorro III memory.
support the emulation of Zorro III memory.
...
@@ -410,7 +410,7 @@ gfxcard_size=<n> (default=0)
...
@@ -410,7 +410,7 @@ gfxcard_size=<n> (default=0)
greater than 0, enables the graphics card or so-called 'Picasso96'
greater than 0, enables the graphics card or so-called 'Picasso96'
emulation. A maximum of 32 MB of graphics card memory may be emulated.
emulation. A maximum of 32 MB of graphics card memory may be emulated.
E-
UAE must emulate a 32-bit CPU (a 68020 or better, not an 68ec020) to
P
UAE must emulate a 32-bit CPU (a 68020 or better, not an 68ec020) to
support the graphics card emulation.
support the graphics card emulation.
...
@@ -423,7 +423,7 @@ corresponding to the AmigaDOS devices DF0: to DF3:, respectively. Drive 0 is
...
@@ -423,7 +423,7 @@ corresponding to the AmigaDOS devices DF0: to DF3:, respectively. Drive 0 is
the first drive, and drive in which you would typically insert a floppy disk
the first drive, and drive in which you would typically insert a floppy disk
to boot from.
to boot from.
E-
UAE supports file-based images of Amiga floppy disks in a number of
P
UAE supports file-based images of Amiga floppy disks in a number of
different file formats (see floppies.txt).
different file formats (see floppies.txt).
...
@@ -431,7 +431,7 @@ floppy<drive>=<path>
...
@@ -431,7 +431,7 @@ floppy<drive>=<path>
Specifies the path of a floppy disk image to mount in drive DF<drive>:.
Specifies the path of a floppy disk image to mount in drive DF<drive>:.
<path> may either be an absolute path or a path relative to the current
<path> may either be an absolute path or a path relative to the current
directory when
E-
UAE was run. The token '$(FILE_PATH)/' at the start of a
directory when
P
UAE was run. The token '$(FILE_PATH)/' at the start of a
path will be expanded to the path specified by the <target>.floppy_path=
path will be expanded to the path specified by the <target>.floppy_path=
option.
option.
...
@@ -457,7 +457,7 @@ floppy<drive>type=<type> (default=0 for drives 0 and 1, -1 for drives 2 and 3)
...
@@ -457,7 +457,7 @@ floppy<drive>type=<type> (default=0 for drives 0 and 1, -1 for drives 2 and 3)
floppy_speed=<speed> (default=100)
floppy_speed=<speed> (default=100)
E-
UAE's floppy drive emulation will work at <speed> per cent of a real
P
UAE's floppy drive emulation will work at <speed> per cent of a real
Amiga floppy drive (relative to the speed of the rest of the emulation).
Amiga floppy drive (relative to the speed of the rest of the emulation).
Valid values are from '100' to '800', that is 1x to 8x the speed of a
Valid values are from '100' to '800', that is 1x to 8x the speed of a
standard Amiga floppy drive.
standard Amiga floppy drive.
...
@@ -470,7 +470,7 @@ floppy_speed=<speed> (default=100)
...
@@ -470,7 +470,7 @@ floppy_speed=<speed> (default=100)
Hard disk options
Hard disk options
=================
=================
E-
UAE may emulate hard drive partitions (AmigaOS volumes) or full,
P
UAE may emulate hard drive partitions (AmigaOS volumes) or full,
partitionable hard disks. Two basic types of emulation are supported: the
partitionable hard disks. Two basic types of emulation are supported: the
virtual filesystem and the hard file.
virtual filesystem and the hard file.
...
@@ -586,8 +586,8 @@ gfx_framerate=<n> (default=1)
...
@@ -586,8 +586,8 @@ gfx_framerate=<n> (default=1)
do), but decreases the quality of the display output.
do), but decreases the quality of the display output.
For example, when emulating a PAL display (50 Hz), for full-quality output
For example, when emulating a PAL display (50 Hz), for full-quality output
(gfx_framerate=1),
E-
UAE must update its display 50 times a
(gfx_framerate=1),
P
UAE must update its display 50 times a
second. Setting gfx_framerate=4 will cause
E-
UAE to draw only 1
second. Setting gfx_framerate=4 will cause
P
UAE to draw only 1
frame in 4 and thus its display will updated only 12.5 times a second.
frame in 4 and thus its display will updated only 12.5 times a second.
...
@@ -596,19 +596,19 @@ gfx_height_windowed=<n> (default=568)
...
@@ -596,19 +596,19 @@ gfx_height_windowed=<n> (default=568)
gfx_width_fullscreen=<n> (default=800)
gfx_width_fullscreen=<n> (default=800)
gfx_height_fullscreen=<n> (defaullt=600)
gfx_height_fullscreen=<n> (defaullt=600)
Specify the dimensions of the
E-
UAE display for graphical output from the
Specify the dimensions of the
P
UAE display for graphical output from the
Amiga chipset.
Amiga chipset.
Ideally, the gfx_*_windowed options should specify the dimensions when
Ideally, the gfx_*_windowed options should specify the dimensions when
E-
UAE is running in a window on your desktop and the gfx_*_fullscreen
P
UAE is running in a window on your desktop and the gfx_*_fullscreen
options will apply when running full-screen. However, this is not supported
options will apply when running full-screen. However, this is not supported
yet, and
E-
UAE will use the gfx_*_windowed dimensions in both windowed and
yet, and
P
UAE will use the gfx_*_windowed dimensions in both windowed and
full-screen modes.
full-screen modes.
To emulate a high-resolution, fully overscanned PAL screen - either
To emulate a high-resolution, fully overscanned PAL screen - either
non-interlaced with line-doubling, or interlaced - you need to use a
non-interlaced with line-doubling, or interlaced - you need to use a
display of at least 720 by 568 pixels. If you specify a smaller size,
display of at least 720 by 568 pixels. If you specify a smaller size,
E-
UAE's display will be clipped to fit (and you can use the gfx_center_*
P
UAE's display will be clipped to fit (and you can use the gfx_center_*
options - see below - to centre the clipped region of the display).
options - see below - to centre the clipped region of the display).
Similarly, to fully display an over-scanned lo-res PAL screen, you need a
Similarly, to fully display an over-scanned lo-res PAL screen, you need a
display of 360 by 284 pixels.
display of 360 by 284 pixels.
...
@@ -623,7 +623,7 @@ gfx_height=<n>
...
@@ -623,7 +623,7 @@ gfx_height=<n>
gfx_fullscreen_amiga=<bool> (default=false)
gfx_fullscreen_amiga=<bool> (default=false)
E-
UAE will open it's display for Amiga screens in full-screen mode by
P
UAE will open it's display for Amiga screens in full-screen mode by
default - not as a window on the desktop.
default - not as a window on the desktop.
This option is not supported on all platforms.
This option is not supported on all platforms.
...
@@ -632,9 +632,9 @@ gfx_fullscreen_amiga=<bool> (default=false)
...
@@ -632,9 +632,9 @@ gfx_fullscreen_amiga=<bool> (default=false)
gfx_lores=<boolean> (default=false)
gfx_lores=<boolean> (default=false)
Determines the fundamental horizontal resolution of output. If true, then
Determines the fundamental horizontal resolution of output. If true, then
E-
UAE will emulate a low-resolution output; high-res Amiga screens will
P
UAE will emulate a low-resolution output; high-res Amiga screens will
have their horizontal resolution halved (only every other horizontal pixel
have their horizontal resolution halved (only every other horizontal pixel
will be drawn). If false,
E-
UAE will emulate a high-resolution output;
will be drawn). If false,
P
UAE will emulate a high-resolution output;
low-resolution Amiga screens will have their horizontal resolution doubled.
low-resolution Amiga screens will have their horizontal resolution doubled.
Most classic games employ low-resolution screens; Workbench uses a
Most classic games employ low-resolution screens; Workbench uses a
...
@@ -656,7 +656,7 @@ gfx_linemode=<type> (default=double)
...
@@ -656,7 +656,7 @@ gfx_linemode=<type> (default=double)
gfx_correct_aspect=<boolean> (default=false)
gfx_correct_aspect=<boolean> (default=false)
If set to true and the emulated Amiga screen has a larger vertical size
If set to true and the emulated Amiga screen has a larger vertical size
than the display window,
E-
UAE will fit the screen to the display by
than the display window,
P
UAE will fit the screen to the display by
leaving out certain lines. This is useful, for example, if you wish
leaving out certain lines. This is useful, for example, if you wish
to fit a 640x512 Amiga screen into a 640x480 window.
to fit a 640x512 Amiga screen into a 640x480 window.
...
@@ -665,7 +665,7 @@ gfx_correct_aspect=<boolean> (default=false)
...
@@ -665,7 +665,7 @@ gfx_correct_aspect=<boolean> (default=false)
gfx_center_horizontal=<type> (default=none)
gfx_center_horizontal=<type> (default=none)
If the Amiga screen emulated is wider than the
E-
UAE display, then this
If the Amiga screen emulated is wider than the
P
UAE display, then this
option will try to cause the screen to be rendered centred on the display.
option will try to cause the screen to be rendered centred on the display.
Type Description
Type Description
...
@@ -678,18 +678,18 @@ gfx_center_horizontal=<type> (default=none)
...
@@ -678,18 +678,18 @@ gfx_center_horizontal=<type> (default=none)
gfx_center_vertical=<type> (default=none)
gfx_center_vertical=<type> (default=none)
Similar to gfx_center_horizontal, but centres the screen vertically within
Similar to gfx_center_horizontal, but centres the screen vertically within
the
E-
UAE display.
the
P
UAE display.
show_leds=<bool> (default=false)
show_leds=<bool> (default=false)
If true, show drive activity and power LEDs at the bottom right corner of
If true, show drive activity and power LEDs at the bottom right corner of
the
E-
UAE display.
the
P
UAE display.
hide_cursor=<bool> (default=true)
hide_cursor=<bool> (default=true)
If this option is set to true and
E-
UAE is displaying in windowed mode,
If this option is set to true and
P
UAE is displaying in windowed mode,
then the host window manager's cursor is hidden; otherwise it is shown.
then the host window manager's cursor is hidden; otherwise it is shown.
This option may not be implemented on all platforms yet.
This option may not be implemented on all platforms yet.
...
@@ -752,7 +752,7 @@ sound_latency=<t> (default=100)
...
@@ -752,7 +752,7 @@ sound_latency=<t> (default=100)
sound_max_buff=<n>
sound_max_buff=<n>
From
E-
UAE 0.8.29, this option is obsolete and has been replaced by the
From
P
UAE 0.8.29, this option is obsolete and has been replaced by the
option sound_latency.
option sound_latency.
...
@@ -760,7 +760,7 @@ sound_interpol=<type> (default=none)
...
@@ -760,7 +760,7 @@ sound_interpol=<type> (default=none)
Selects the sound interpolation mode used for audio output (only supported
Selects the sound interpolation mode used for audio output (only supported
when audio output is in 16-bit resolution). Interpolation is a technique
when audio output is in 16-bit resolution). Interpolation is a technique
which "smoothes out" the audio waveform generated by
E-
UAE and thus may
which "smoothes out" the audio waveform generated by
P
UAE and thus may
lead to higher quality audio output. Supported values for <type> are:
lead to higher quality audio output. Supported values for <type> are:
none - no interpolation.
none - no interpolation.
...
@@ -805,7 +805,7 @@ joyport1=<mode>
...
@@ -805,7 +805,7 @@ joyport1=<mode>
SCSI emulation options
SCSI emulation options
======================
======================
E-
UAE can provide direct access to a host optical drive like a CD-ROM drive
P
UAE can provide direct access to a host optical drive like a CD-ROM drive
to AmigaOS via an Exec device wrapper called uaescsi.device. The SCSI device
to AmigaOS via an Exec device wrapper called uaescsi.device. The SCSI device
emulation is not supported on all platforms. See the SCSI emulation section
emulation is not supported on all platforms. See the SCSI emulation section
of the documentation for more details.
of the documentation for more details.
...
@@ -824,9 +824,9 @@ scsi_device=<config>
...
@@ -824,9 +824,9 @@ scsi_device=<config>
Network emulation
Network emulation
=================
=================
E-
UAE can provide network access to AmigaOS applications via an emulated
P
UAE can provide network access to AmigaOS applications via an emulated
bsdsocket.library. This emulated bsdsocket.library is simply a wrapper
bsdsocket.library. This emulated bsdsocket.library is simply a wrapper
around the host's networking stack. The AmigaOS environment within
E-
UAE
around the host's networking stack. The AmigaOS environment within
P
UAE
will share the same IP address as the host. The bsdsocket.library emulation
will share the same IP address as the host. The bsdsocket.library emulation
is not supported on all platforms. See the bsdsocket emulation section of
is not supported on all platforms. See the bsdsocket emulation section of
the documentation for more details.
the documentation for more details.
...
@@ -839,7 +839,7 @@ bsdsocket_emu=<bool> (default=false)
...
@@ -839,7 +839,7 @@ bsdsocket_emu=<bool> (default=false)
X11-specific options
X11-specific options
====================
====================
The following options apply when
E-
UAE has been built with the X11 graphics
The following options apply when
P
UAE has been built with the X11 graphics
driver.
driver.
x11.map_raw_keys=<bool> (default=false)
x11.map_raw_keys=<bool> (default=false)
...
@@ -857,16 +857,16 @@ x11.map_raw_keys=<bool> (default=false)
...
@@ -857,16 +857,16 @@ x11.map_raw_keys=<bool> (default=false)
x11.low_bandwidth=<bool> (default=false)
x11.low_bandwidth=<bool> (default=false)
If this option is set to true, then
E-
UAE will try to minimize the amount
If this option is set to true, then
P
UAE will try to minimize the amount
of data sent to the X server by only redrawing areas of the amiga screen
of data sent to the X server by only redrawing areas of the amiga screen
that have changed. This may increase frame rate on slow machines or when
that have changed. This may increase frame rate on slow machines or when
running
E-
UAE on a separate host from the X server.
running
P
UAE on a separate host from the X server.
x11.use_mitshm=<bool> (default=true)
x11.use_mitshm=<bool> (default=true)
If this option is set to true, your X server supports the MITSHM extension
If this option is set to true, your X server supports the MITSHM extension
and
E-UAE is running on the same host as the server, then E-
UAE will use
and
PUAE is running on the same host as the server, then P
UAE will use
memory shared between itself and the server for display buffers. This will
memory shared between itself and the server for display buffers. This will
increase display refresh speed.
increase display refresh speed.
...
@@ -879,7 +879,7 @@ x11.hide_cursor=<bool>
...
@@ -879,7 +879,7 @@ x11.hide_cursor=<bool>
SDL-specific options
SDL-specific options
====================
====================
The following options apply when
E-
UAE has been built with the SDL graphics
The following options apply when
P
UAE has been built with the SDL graphics
driver.
driver.
sdl.map_raw_keys=<bool> (default=false)
sdl.map_raw_keys=<bool> (default=false)
...
@@ -899,22 +899,22 @@ sdl.use_gl=<bool> (default=false)
...
@@ -899,22 +899,22 @@ sdl.use_gl=<bool> (default=false)
AmigaOS-specific options
AmigaOS-specific options
========================
========================
The following options apply when
E-
UAE has been built for AmigaOS (or
The following options apply when
P
UAE has been built for AmigaOS (or
similar platform) with the AmigaOS graphics driver.
similar platform) with the AmigaOS graphics driver.
amiga.screen_type=<type> (default=public)
amiga.screen_type=<type> (default=public)
Specifies the type of screen that
E-
UAE will open it's display on. Valid
Specifies the type of screen that
P
UAE will open it's display on. Valid
values for <type> are:
values for <type> are:
Type Description
Type Description
---- -----------
---- -----------
public The display will be a window on the default or named public
public The display will be a window on the default or named public
screen.
screen.
custom
E-
UAE will open a custom screen for its display. The best
custom
P
UAE will open a custom screen for its display. The best
screenmode matching the configured dimensions will be used.
screenmode matching the configured dimensions will be used.
ask
E-
UAE will present you with a requester to select the screenmode
ask
P
UAE will present you with a requester to select the screenmode
to use for display. If this requester is cancelled,
E-
UAE will
to use for display. If this requester is cancelled,
P
UAE will
use a window on the default or named public screen.
use a window on the default or named public screen.
...
@@ -940,7 +940,7 @@ amiga.use_grey=<bool> (default=false)
...
@@ -940,7 +940,7 @@ amiga.use_grey=<bool> (default=false)
ALSA-specific options
ALSA-specific options
=====================
=====================
The following options apply when
E-
UAE has been built with the ALSA audio
The following options apply when
P
UAE has been built with the ALSA audio
driver.
driver.
alsa.device=<device> (default=default)
alsa.device=<device> (default=default)
...
...
docs/floppies.txt
View file @
89d2d049
Floppy drive emulation
Floppy drive emulation
======================
======================
E-
UAE emulates up to four floppy drives. Standard PC floppy drives cannot
P
UAE emulates up to four floppy drives. Standard PC floppy drives cannot
read Amiga floppies, so floppy disks are currently supported as image files
read Amiga floppies, so floppy disks are currently supported as image files
(support for Catweasel hardware, a floppy controller which can read Amiga
(support for Catweasel hardware, a floppy controller which can read Amiga
floppies - and other unusual disk formats - will be added in a future
floppies - and other unusual disk formats - will be added in a future
version).
version).
E-
UAE supports a number of floppy image formats, optionally compressed by
P
UAE supports a number of floppy image formats, optionally compressed by
gzip or packed inside a Zip archive.
gzip or packed inside a Zip archive.
ADF
ADF
...
@@ -20,7 +20,7 @@ formatted contents.
...
@@ -20,7 +20,7 @@ formatted contents.
DMS
DMS
---
---
DMS was a popular disk image cruncher.
E-
UAE can transparently read DMS
DMS was a popular disk image cruncher.
P
UAE can transparently read DMS
images.
images.
...
...
docs/joystick.txt
View file @
89d2d049
...
@@ -3,13 +3,13 @@ Joystick port emulation
...
@@ -3,13 +3,13 @@ Joystick port emulation
An Amiga has two joystick ports. Port 0 typically has a mouse attached to it
An Amiga has two joystick ports. Port 0 typically has a mouse attached to it
and port 1 may have a digital joystick, joypad or some other device
and port 1 may have a digital joystick, joypad or some other device
connected.
E-
UAE can emulate Amiga mice and joysticks using either input
connected.
P
UAE can emulate Amiga mice and joysticks using either input
from a physical mouse or joystick or by using specific key presses on the
from a physical mouse or joystick or by using specific key presses on the
keyboard to synthesize mouse and joystick movements or button clicks.
keyboard to synthesize mouse and joystick movements or button clicks.
The device connected to port 0 can be configured with the joyport0=<mode>
The device connected to port 0 can be configured with the joyport0=<mode>
configuration file option and the device at port 1 with joyport1=<mode>.
configuration file option and the device at port 1 with joyport1=<mode>.
Additionally, some versions of
E-
UAE may supply a GUI controls to configure
Additionally, some versions of
P
UAE may supply a GUI controls to configure
the joystick.
the joystick.
Here <mode> can be one of:
Here <mode> can be one of:
...
@@ -19,7 +19,7 @@ none - no device is connected to this port.
...
@@ -19,7 +19,7 @@ none - no device is connected to this port.
mouse - a mouse will be emulated on this port using the host's default
mouse - a mouse will be emulated on this port using the host's default
mouse (usually the device you use to move the mouse pointer on your
mouse (usually the device you use to move the mouse pointer on your
desktop). Up to three mouse buttons are supported and a scroll
desktop). Up to three mouse buttons are supported and a scroll
wheel is currently supported when using
E-
UAE's X11 or SDL
wheel is currently supported when using
P
UAE's X11 or SDL
graphics drivers.
graphics drivers.
joy0 - a digital joystick will be emulated on this port using input from
joy0 - a digital joystick will be emulated on this port using input from
...
@@ -78,7 +78,7 @@ joystick input - they will not produce normal key presses.
...
@@ -78,7 +78,7 @@ joystick input - they will not produce normal key presses.
Emulating a CD32 controller
Emulating a CD32 controller
===========================
===========================
When emulating a CD32 (to do this,
E-
UAE must be booted with CD32 ROMs) the
When emulating a CD32 (to do this,
P
UAE must be booted with CD32 ROMs) the
joystick configured to port 1 may emulate a CD32 controller. The buttons on
joystick configured to port 1 may emulate a CD32 controller. The buttons on
the joystick will be mapped to CD32 controller buttons as follows:
the joystick will be mapped to CD32 controller buttons as follows:
...
...
docs/keyboard.txt
View file @
89d2d049
Keyboard emulation
Keyboard emulation
==================
==================
E-
UAE emulates an Amiga keyboard layout by a straightforward mapping - where
P
UAE emulates an Amiga keyboard layout by a straightforward mapping - where
possible - of host keys to Amiga keys. In general, the alphanumeric keys,
possible - of host keys to Amiga keys. In general, the alphanumeric keys,
function keys, numbers, punctuation, cursor keys, numeric keypad, etc.
function keys, numbers, punctuation, cursor keys, numeric keypad, etc.
should work as expected (that is, the symbol on the key cap should be
should work as expected (that is, the symbol on the key cap should be
...
@@ -23,14 +23,14 @@ keyboard, Amiga keys on an Amiga keyboard, etc. Note that most Mac keyboards
...
@@ -23,14 +23,14 @@ keyboard, Amiga keys on an Amiga keyboard, etc. Note that most Mac keyboards
don't differentiate between left and right Option keys, and both will
don't differentiate between left and right Option keys, and both will
produce a Left Amiga.
produce a Left Amiga.
Currently,
E-
UAE's keyboard mapping is not user-configurable. This will be
Currently,
P
UAE's keyboard mapping is not user-configurable. This will be
addressed in a future release.
addressed in a future release.
International keyboards
International keyboards
=======================
=======================
If you are using
E-
UAE built with the X11 or SDL graphics drivers then you
If you are using
P
UAE built with the X11 or SDL graphics drivers then you
may set the kbd_lang= option to specify your keyboard layout (you also need
may set the kbd_lang= option to specify your keyboard layout (you also need
to pick an appropriate keyboard driver in AmigaOS).
to pick an appropriate keyboard driver in AmigaOS).
...
@@ -51,7 +51,7 @@ Support for some layouts is currently poor - for example, numeric and
...
@@ -51,7 +51,7 @@ Support for some layouts is currently poor - for example, numeric and
punctuation keys are interchanged on the French layout - and SDL poorly
punctuation keys are interchanged on the French layout - and SDL poorly
supports international keys.
supports international keys.
A partial solution is to use
E-
UAE's raw key mapping (see below).
A partial solution is to use
P
UAE's raw key mapping (see below).
Command key sequences
Command key sequences
...
@@ -126,10 +126,10 @@ your keymap settings to produce (if your keymap is correct) a value which
...
@@ -126,10 +126,10 @@ your keymap settings to produce (if your keymap is correct) a value which
actually does correspond to the symbol painted on the physical key on your
actually does correspond to the symbol painted on the physical key on your
keyboard.
keyboard.
If
E-
UAE tries to work with this translated key symbol, it then has to
If
P
UAE tries to work with this translated key symbol, it then has to
somehow convert that back into a raw keycode appropriate to if that key
somehow convert that back into a raw keycode appropriate to if that key
were pressed on an Amiga keyboard (and then AmigaOS will use its keymap
were pressed on an Amiga keyboard (and then AmigaOS will use its keymap
settings to translate it into a key symbol again). This requires that
E-
UAE
settings to translate it into a key symbol again). This requires that
P
UAE
know about international keyboard layouts, and requires the graphics system
know about international keyboard layouts, and requires the graphics system
to report unique events for all host keys (SDL does not completely support
to report unique events for all host keys (SDL does not completely support
some international layouts, for example).
some international layouts, for example).
...
@@ -148,14 +148,14 @@ logically or even physically identical keys.
...
@@ -148,14 +148,14 @@ logically or even physically identical keys.
The upshot of all this is that raw key-mapping is currently (optionally)
The upshot of all this is that raw key-mapping is currently (optionally)
supported when:
supported when:
a)
E-
UAE is built with the X11 graphics driver, your X server supports the
a)
P
UAE is built with the X11 graphics driver, your X server supports the
XKB extension and you are using a keyboard which produces xfree86
XKB extension and you are using a keyboard which produces xfree86
keycodes (e.g., PC and Mac keyboards with XFree86 on Linux do);
keycodes (e.g., PC and Mac keyboards with XFree86 on Linux do);
b)
E-
UAE is built with the SDL graphics driver and you are running it on
b)
P
UAE is built with the SDL graphics driver and you are running it on
Linux on XFree86 with a PC or Mac keyboard, on MacOS X, on BeOS or on
Linux on XFree86 with a PC or Mac keyboard, on MacOS X, on BeOS or on
AmigaOS (or an AmigaOS clone);
AmigaOS (or an AmigaOS clone);
c)
E-
UAE is built with the BeOS graphics driver; or
c)
P
UAE is built with the BeOS graphics driver; or
d)
E-
UAE is built with the AmigaOS graphics driver.
d)
P
UAE is built with the AmigaOS graphics driver.
As I said above, raw key-mapping better supports international keyboards, so
As I said above, raw key-mapping better supports international keyboards, so
is recommended for most users, although its not terribly well tested and
is recommended for most users, although its not terribly well tested and
...
@@ -175,7 +175,7 @@ x11.map_raw_keys=true
...
@@ -175,7 +175,7 @@ x11.map_raw_keys=true
Both the SDL and X11 graphics driver will try to enable raw key-mapping by
Both the SDL and X11 graphics driver will try to enable raw key-mapping by
default if they can support it on your host platform.
default if they can support it on your host platform.
Note that the AmigaOS version of
E-
UAE when built with native AmigaOS
Note that the AmigaOS version of
P
UAE when built with native AmigaOS
graphic support and the BeOS version when built with native BeOS graphics
graphic support and the BeOS version when built with native BeOS graphics
support both always do raw key mapping, so no comparable config options is
support both always do raw key mapping, so no comparable config options is
supported or required in these situations. Note also, however, that the
supported or required in these situations. Note also, however, that the
...
...
docs/make_hdf.txt
View file @
89d2d049
...
@@ -2,7 +2,7 @@ make_hdf
...
@@ -2,7 +2,7 @@ make_hdf
========
========
make_hdf is a command-line tool for creating unformatted hard disk
make_hdf is a command-line tool for creating unformatted hard disk
images (hard files) for
E-
UAE (and other versions of UAE). It will
images (hard files) for
P
UAE (and other versions of UAE). It will
also print a config option that can be added to a UAE config file to
also print a config option that can be added to a UAE config file to
mount the created disk image.
mount the created disk image.
...
...
docs/scsi.txt
View file @
89d2d049
SCSI emulation
SCSI emulation
==============
==============
E-
UAE's SCSI emulation allows any CD-ROM drives on the host machine to be
P
UAE's SCSI emulation allows any CD-ROM drives on the host machine to be
used as Amiga SCSI devices within the emulation. You can use this to fully
used as Amiga SCSI devices within the emulation. You can use this to fully
support CD-ROMs, audio discs, CD-writing, etc. in AmigaOS. SCSI emulation is
support CD-ROMs, audio discs, CD-writing, etc. in AmigaOS. SCSI emulation is
also required to emulate a CD-TV or CD32.
also required to emulate a CD-TV or CD32.
In general, to enable SCSI emulation simply add the 'scsi=true' option to
In general, to enable SCSI emulation simply add the 'scsi=true' option to
your config file. Any useable CD or DVD devices that
E-
UAE finds will be
your config file. Any useable CD or DVD devices that
P
UAE finds will be
available to AmigaOS via the device driver 'uaescsi.device' on consecutive
available to AmigaOS via the device driver 'uaescsi.device' on consecutive
unit numbers starting at unit 0. However, depending on your host platform,
unit numbers starting at unit 0. However, depending on your host platform,
there may a number of host configuration issues which can make using the
there may a number of host configuration issues which can make using the
SCSI emulation problematic.
SCSI emulation problematic.
I'll start with the easy stuff. If you're running
E-
UAE on AmigaOS (or a
I'll start with the easy stuff. If you're running
P
UAE on AmigaOS (or a
clone) or BeOS, then don't worry. The SCSI emulation works transparently.
clone) or BeOS, then don't worry. The SCSI emulation works transparently.
Just set the 'scsi=true' config option and away you go.
Just set the 'scsi=true' config option and away you go.
...
@@ -21,7 +21,7 @@ Just set the 'scsi=true' config option and away you go.
...
@@ -21,7 +21,7 @@ Just set the 'scsi=true' config option and away you go.
Linux
Linux
-----
-----
Starting with version 0.8.29,
E-
UAE's SCSI emulation can directly
Starting with version 0.8.29,
P
UAE's SCSI emulation can directly
communicate with the Linux kernel's CD-ROM driver to access a single
communicate with the Linux kernel's CD-ROM driver to access a single
CD/DVD drive (it currently doesn't support multiple drives, unlike the
CD/DVD drive (it currently doesn't support multiple drives, unlike the
libscg back-end).
libscg back-end).
...
@@ -31,13 +31,13 @@ option 'scsi_device=' (as well as, obviously, 'scsi=true'. For example:
...
@@ -31,13 +31,13 @@ option 'scsi_device=' (as well as, obviously, 'scsi=true'. For example:
scsi_device=/dev/hdc
scsi_device=/dev/hdc
You should ensure that the account you use to run
E-
UAE has permission
You should ensure that the account you use to run
P
UAE has permission
to access this device file.
to access this device file.
You may run into problems if your Linux distribution has the HAL
You may run into problems if your Linux distribution has the HAL
daemon installed. This software continually polls your removable media
daemon installed. This software continually polls your removable media
drives to detect insertion/removal of discs, and this activity may
drives to detect insertion/removal of discs, and this activity may
interfere with
E-
UAE's SCSI emulation. A solution to this problem
interfere with
P
UAE's SCSI emulation. A solution to this problem
needs to be investigated.
needs to be investigated.
This Linux-native SCSI back-end is less well-tested than the libscg
This Linux-native SCSI back-end is less well-tested than the libscg
...
@@ -64,9 +64,9 @@ we'll come to that in a minute.)
...
@@ -64,9 +64,9 @@ we'll come to that in a minute.)
If you're using sg or ide-scsi and sg, then your devices are accessed via
If you're using sg or ide-scsi and sg, then your devices are accessed via
device nodes of the form /dev/sg0, /dev/sg1, etc. You need read and write
device nodes of the form /dev/sg0, /dev/sg1, etc. You need read and write
permission on all of these for SCSI emulation in
E-
UAE to work (Note that
permission on all of these for SCSI emulation in
P
UAE to work (Note that
cdrecord is typically installed SUID root, so typically the default
cdrecord is typically installed SUID root, so typically the default
permissions on the /dev/sgx nodes will not be sufficient. Installing
E-
UAE as
permissions on the /dev/sgx nodes will not be sufficient. Installing
P
UAE as
SUID root is one possibility, but not a terribly good idea security-wise.
SUID root is one possibility, but not a terribly good idea security-wise.
One solution to this is to set the owner of the /dev/sgx nodes as the group
One solution to this is to set the owner of the /dev/sgx nodes as the group
'cdrom' and add you own user account to that group. For example, as root, do
'cdrom' and add you own user account to that group. For example, as root, do
...
@@ -80,9 +80,9 @@ If your system doesn't have the adduser command, you can always manually
...
@@ -80,9 +80,9 @@ If your system doesn't have the adduser command, you can always manually
edit the /etc/group file or use some whizz-bang, GUI-based user/group
edit the /etc/group file or use some whizz-bang, GUI-based user/group
configuration utility to do the job.
configuration utility to do the job.
If you log in as yourself again and start
E-
UAE (remember to add 'scsi=true'
If you log in as yourself again and start
P
UAE (remember to add 'scsi=true'
to your config file first), then the SCSI emulation should work. If so you'll
to your config file first), then the SCSI emulation should work. If so you'll
see something like this logged to the console when
E-
UAE starts up.
see something like this logged to the console when
P
UAE starts up.
scsibus0:
scsibus0:
0,0,0 0 'BTC ' 'BCE1610IM ' 'A.20' CD-ROM
0,0,0 0 'BTC ' 'BCE1610IM ' 'A.20' CD-ROM
...
@@ -96,7 +96,7 @@ scsibus0:
...
@@ -96,7 +96,7 @@ scsibus0:
SCSIDEV: 1 devices found
SCSIDEV: 1 devices found
support_scsi = 1 support_ioctl = 0
support_scsi = 1 support_ioctl = 0
If you're using a 2.6 kernel,
E-
UAE can access ATAPI devices on the host
If you're using a 2.6 kernel,
P
UAE can access ATAPI devices on the host
directly via the kernel ide-cd driver without the sg kernel module. To do
directly via the kernel ide-cd driver without the sg kernel module. To do
this on older 2.6 kernels, add the config option
this on older 2.6 kernels, add the config option
...
@@ -116,7 +116,7 @@ scsi_device=/dev/hdc
...
@@ -116,7 +116,7 @@ scsi_device=/dev/hdc
MacOS X
MacOS X
-------
-------
Now we get to the real problems. SCSI emulation with
E-
UAE on OS X is
Now we get to the real problems. SCSI emulation with
P
UAE on OS X is
currently a real pig, due to some features and limitations of OS X. The big
currently a real pig, due to some features and limitations of OS X. The big
problem is that you need a writable device - a CD or DVD burner - for SCSI
problem is that you need a writable device - a CD or DVD burner - for SCSI
emulation to work at all. This is because the OS X kernel will only let you
emulation to work at all. This is because the OS X kernel will only let you
...
...
src/cfgfile.c
View file @
89d2d049
src/filesys.c
View file @
89d2d049
...
@@ -126,22 +126,23 @@ static int automountunit = -1;
...
@@ -126,22 +126,23 @@ static int automountunit = -1;
#define DEVNAMES_PER_HDF 32
#define DEVNAMES_PER_HDF 32
typedef
struct
{
typedef
struct
{
int
open
;
bool
open
;
char
*
devname
;
/* device name, e.g. UAE0: */
TCHAR
*
devname
;
/* device name, e.g. UAE0: */
uaecptr
devname_amiga
;
uaecptr
devname_amiga
;
uaecptr
startup
;
uaecptr
startup
;
char
*
volname
;
/* volume name, e.g. CDROM, WORK, etc. */
TCHAR
*
volname
;
/* volume name, e.g. CDROM, WORK, etc. */
int
volflags
;
/* volume flags, readonly, stream uaefsdb support */
int
volflags
;
/* volume flags, readonly, stream uaefsdb support */
char
*
rootdir
;
/* root native directory/hdf. empty drive if invalid path */
TCHAR
*
rootdir
;
/* root native directory/hdf. empty drive if invalid path */
struct
zvolume
*
zarchive
;
struct
zvolume
*
zarchive
;
char
*
rootdirdiff
;
/* "diff" file/directory */
TCHAR
*
rootdirdiff
;
/* "diff" file/directory */
int
readonly
;
/* disallow write access? */
bool
readonly
;
/* disallow write access? */
bool
locked
;
/* action write protect */
int
bootpri
;
/* boot priority. -128 = no autoboot, -129 = no mount */
int
bootpri
;
/* boot priority. -128 = no autoboot, -129 = no mount */
int
devno
;
int
devno
;
int
controller
;
int
controller
;
int
wasisempty
;
/* if true, this unit was created empty */
bool
wasisempty
;
/* if true, this unit was created empty */
int
canremove
;
/* if true, this unit can be safely ejected and remounted */
bool
canremove
;
/* if true, this unit can be safely ejected and remounted */
int
configureddrive
;
/* if true, this is drive that was manually configured */
bool
configureddrive
;
/* if true, this is drive that was manually configured */
struct
hardfiledata
hf
;
struct
hardfiledata
hf
;
...
@@ -160,7 +161,7 @@ typedef struct {
...
@@ -160,7 +161,7 @@ typedef struct {
int
rdb_cylblocks
;
int
rdb_cylblocks
;
uae_u8
*
rdb_filesysstore
;
uae_u8
*
rdb_filesysstore
;
int
rdb_filesyssize
;
int
rdb_filesyssize
;
char
*
filesysdir
;
TCHAR
*
filesysdir
;
}
UnitInfo
;
}
UnitInfo
;
...
@@ -266,14 +267,14 @@ int get_filesys_unitconfig (struct uae_prefs *p, int index, struct mountedinfo *
...
@@ -266,14 +267,14 @@ int get_filesys_unitconfig (struct uae_prefs *p, int index, struct mountedinfo *
}
}
if
(
my_getvolumeinfo
(
uci
->
rootdir
)
<
0
)
if
(
my_getvolumeinfo
(
uci
->
rootdir
)
<
0
)
return
-
1
;
return
-
1
;
mi
->
ismedia
=
1
;
mi
->
ismedia
=
true
;
return
FILESYS_VIRTUAL
;
return
FILESYS_VIRTUAL
;
}
else
{
}
else
{
ui
->
hf
.
readonly
=
1
;
ui
->
hf
.
readonly
=
true
;
ui
->
hf
.
blocksize
=
uci
->
blocksize
;
ui
->
hf
.
blocksize
=
uci
->
blocksize
;
if
(
!
hdf_open
(
&
ui
->
hf
,
uci
->
rootdir
))
{
if
(
!
hdf_open
(
&
ui
->
hf
,
uci
->
rootdir
))
{
mi
->
ismedia
=
0
;
mi
->
ismedia
=
false
;
mi
->
ismounted
=
1
;
mi
->
ismounted
=
true
;
if
(
uci
->
reserved
==
0
&&
uci
->
sectors
==
0
&&
uci
->
surfaces
==
0
)
{
if
(
uci
->
reserved
==
0
&&
uci
->
sectors
==
0
&&
uci
->
surfaces
==
0
)
{
if
(
ui
->
hf
.
flags
&
1
)
if
(
ui
->
hf
.
flags
&
1
)
return
FILESYS_HARDDRIVE
;
return
FILESYS_HARDDRIVE
;
...
@@ -281,7 +282,7 @@ int get_filesys_unitconfig (struct uae_prefs *p, int index, struct mountedinfo *
...
@@ -281,7 +282,7 @@ int get_filesys_unitconfig (struct uae_prefs *p, int index, struct mountedinfo *
}
}
return
-
1
;
return
-
1
;
}
}
mi
->
ismedia
=
1
;
mi
->
ismedia
=
true
;
if
(
ui
->
hf
.
drive_empty
)
if
(
ui
->
hf
.
drive_empty
)
mi
->
ismedia
=
0
;
mi
->
ismedia
=
0
;
hdf_close
(
&
ui
->
hf
);
hdf_close
(
&
ui
->
hf
);
...
@@ -290,9 +291,9 @@ int get_filesys_unitconfig (struct uae_prefs *p, int index, struct mountedinfo *
...
@@ -290,9 +291,9 @@ int get_filesys_unitconfig (struct uae_prefs *p, int index, struct mountedinfo *
if
(
!
ui
->
controller
||
(
ui
->
controller
&&
p
->
cs_ide
))
{
if
(
!
ui
->
controller
||
(
ui
->
controller
&&
p
->
cs_ide
))
{
mi
->
ismounted
=
1
;
mi
->
ismounted
=
1
;
if
(
uci
->
ishdf
)
if
(
uci
->
ishdf
)
mi
->
ismedia
=
ui
->
hf
.
drive_empty
?
0
:
1
;
mi
->
ismedia
=
ui
->
hf
.
drive_empty
?
false
:
true
;
else
else
mi
->
ismedia
=
1
;
mi
->
ismedia
=
true
;
}
}
}
}
mi
->
size
=
ui
->
hf
.
virtsize
;
mi
->
size
=
ui
->
hf
.
virtsize
;
...
@@ -338,6 +339,7 @@ static void fixcharset (char *s)
...
@@ -338,6 +339,7 @@ static void fixcharset (char *s)
if
(
!
s
)
if
(
!
s
)
return
;
return
;
//ua_fs_copy (tmp, MAX_DPATH, s, '_');
//ua_fs_copy (tmp, MAX_DPATH, s, '_');
strcpy
(
tmp
,
s
);
au_fs_copy
(
s
,
strlen
(
tmp
)
+
1
,
tmp
);
au_fs_copy
(
s
,
strlen
(
tmp
)
+
1
,
tmp
);
}
}
...
@@ -360,9 +362,9 @@ char *validatedevicename (char *s)
...
@@ -360,9 +362,9 @@ char *validatedevicename (char *s)
char
*
filesys_createvolname
(
const
char
*
volname
,
const
char
*
rootdir
,
const
char
*
def
)
char
*
filesys_createvolname
(
const
char
*
volname
,
const
char
*
rootdir
,
const
char
*
def
)
{
{
char
*
nvol
=
NULL
;
TCHAR
*
nvol
=
NULL
;
int
i
,
archivehd
;
int
i
,
archivehd
;
char
*
p
=
NULL
;
TCHAR
*
p
=
NULL
;
archivehd
=
-
1
;
archivehd
=
-
1
;
if
(
my_existsfile
(
rootdir
))
if
(
my_existsfile
(
rootdir
))
...
@@ -393,7 +395,7 @@ char *filesys_createvolname (const char *volname, const char *rootdir, const cha
...
@@ -393,7 +395,7 @@ char *filesys_createvolname (const char *volname, const char *rootdir, const cha
nvol
=
my_strdup
(
p
+
i
);
nvol
=
my_strdup
(
p
+
i
);
}
}
if
(
!
nvol
&&
archivehd
>=
0
)
{
if
(
!
nvol
&&
archivehd
>=
0
)
{
char
*
s
=
NULL
;
TCHAR
*
s
=
NULL
;
if
(
volname
&&
_tcslen
(
volname
)
>
0
)
if
(
volname
&&
_tcslen
(
volname
)
>
0
)
nvol
=
my_strdup
(
volname
);
nvol
=
my_strdup
(
volname
);
else
else
...
@@ -441,14 +443,14 @@ static int set_filesys_volume (const char *rootdir, int *flags, int *readonly, i
...
@@ -441,14 +443,14 @@ static int set_filesys_volume (const char *rootdir, int *flags, int *readonly, i
}
}
static
int
set_filesys_unit_1
(
int
nr
,
static
int
set_filesys_unit_1
(
int
nr
,
char
*
devname
,
char
*
volname
,
const
char
*
rootdir
,
int
readonly
,
TCHAR
*
devname
,
TCHAR
*
volname
,
const
TCHAR
*
rootdir
,
bool
readonly
,
int
secspertrack
,
int
surfaces
,
int
reserved
,
int
secspertrack
,
int
surfaces
,
int
reserved
,
int
blocksize
,
int
bootpri
,
int
donotmount
,
int
autoboot
,
int
blocksize
,
int
bootpri
,
bool
donotmount
,
bool
autoboot
,
char
*
filesysdir
,
int
hdc
,
int
flags
)
TCHAR
*
filesysdir
,
int
hdc
,
int
flags
)
{
{
UnitInfo
*
ui
;
UnitInfo
*
ui
;
int
i
;
int
i
;
int
emptydrive
=
0
;
bool
emptydrive
=
false
;
if
(
hdc
)
if
(
hdc
)
return
-
1
;
return
-
1
;
...
@@ -493,6 +495,7 @@ static int set_filesys_unit_1 (int nr,
...
@@ -493,6 +495,7 @@ static int set_filesys_unit_1 (int nr,
ui
->
volname
=
0
;
ui
->
volname
=
0
;
ui
->
hf
.
readonly
=
readonly
;
ui
->
hf
.
readonly
=
readonly
;
if
(
!
hdf_open
(
&
ui
->
hf
,
rootdir
)
&&
!
readonly
)
{
if
(
!
hdf_open
(
&
ui
->
hf
,
rootdir
)
&&
!
readonly
)
{
write_log
(
"Attempting to open in read-only mode
\n
"
);
ui
->
hf
.
readonly
=
readonly
=
1
;
ui
->
hf
.
readonly
=
readonly
=
1
;
hdf_open
(
&
ui
->
hf
,
rootdir
);
hdf_open
(
&
ui
->
hf
,
rootdir
);
}
}
...
@@ -548,10 +551,10 @@ err:
...
@@ -548,10 +551,10 @@ err:
}
}
int
set_filesys_unit
(
int
nr
,
int
set_filesys_unit
(
int
nr
,
char
*
devname
,
char
*
volname
,
const
char
*
rootdir
,
int
readonly
,
TCHAR
*
devname
,
TCHAR
*
volname
,
const
TCHAR
*
rootdir
,
bool
readonly
,
int
secspertrack
,
int
surfaces
,
int
reserved
,
int
secspertrack
,
int
surfaces
,
int
reserved
,
int
blocksize
,
int
bootpri
,
int
donotmount
,
int
autoboot
,
int
blocksize
,
int
bootpri
,
bool
donotmount
,
bool
autoboot
,
char
*
filesysdir
,
int
hdc
,
int
flags
)
TCHAR
*
filesysdir
,
int
hdc
,
int
flags
)
{
{
int
ret
;
int
ret
;
...
@@ -561,10 +564,10 @@ int set_filesys_unit (int nr,
...
@@ -561,10 +564,10 @@ int set_filesys_unit (int nr,
return
ret
;
return
ret
;
}
}
int
add_filesys_unit
(
char
*
devname
,
char
*
volname
,
const
char
*
rootdir
,
int
readonly
,
int
add_filesys_unit
(
char
*
devname
,
char
*
volname
,
const
char
*
rootdir
,
bool
readonly
,
int
secspertrack
,
int
surfaces
,
int
reserved
,
int
secspertrack
,
int
surfaces
,
int
reserved
,
int
blocksize
,
int
bootpri
,
int
donotmount
,
int
autoboot
,
int
blocksize
,
int
bootpri
,
bool
donotmount
,
bool
autoboot
,
char
*
filesysdir
,
int
hdc
,
int
flags
)
TCHAR
*
filesysdir
,
int
hdc
,
int
flags
)
{
{
int
ret
;
int
ret
;
...
@@ -814,8 +817,8 @@ typedef struct key {
...
@@ -814,8 +817,8 @@ typedef struct key {
typedef
struct
notify
{
typedef
struct
notify
{
struct
notify
*
next
;
struct
notify
*
next
;
uaecptr
notifyrequest
;
uaecptr
notifyrequest
;
char
*
fullname
;
TCHAR
*
fullname
;
char
*
partname
;
TCHAR
*
partname
;
}
Notify
;
}
Notify
;
typedef
struct
exallkey
{
typedef
struct
exallkey
{
...
@@ -848,7 +851,7 @@ typedef struct _unit {
...
@@ -848,7 +851,7 @@ typedef struct _unit {
/* Native stuff */
/* Native stuff */
uae_s32
unit
;
/* unit number */
uae_s32
unit
;
/* unit number */
UnitInfo
ui
;
/* unit startup info */
UnitInfo
ui
;
/* unit startup info */
char
tmpbuf3
[
256
];
TCHAR
tmpbuf3
[
256
];
/* Dummy message processing */
/* Dummy message processing */
uaecptr
dummy_message
;
uaecptr
dummy_message
;
...
@@ -878,63 +881,63 @@ typedef struct _unit {
...
@@ -878,63 +881,63 @@ typedef struct _unit {
int
volflags
;
int
volflags
;
uae_u32
lockkey
;
uae_u32
lockkey
;
int
inhibited
;
bool
inhibited
;
int
canremovable
;
bool
canremovable
;
int
mountcount
;
int
mountcount
;
struct
zvolume
*
zarchive
;
struct
zvolume
*
zarchive
;
int
reinsertdelay
;
int
reinsertdelay
;
TCHAR
*
newvolume
;
TCHAR
*
newvolume
;
TCHAR
*
newrootdir
;
TCHAR
*
newrootdir
;
int
newreadonly
;
bool
newreadonly
;
int
newflags
;
int
newflags
;
}
Unit
;
}
Unit
;
static
uae_u32
a_uniq
,
key_uniq
;
static
uae_u32
a_uniq
,
key_uniq
;
typedef
uae
_u8
*
dpacket
;
typedef
uae
cptr
dpacket
;
#define PUT_PCK_RES1(p,v) do {
do_put_mem_long ((uae_u32 *)((p) + dp_Res1)
, (v)); } while (0)
#define PUT_PCK_RES1(p,v) do {
put_long ((p) + dp_Res1
, (v)); } while (0)
#define PUT_PCK_RES2(p,v) do {
do_put_mem_long ((uae_u32 *)((p) + dp_Res2)
, (v)); } while (0)
#define PUT_PCK_RES2(p,v) do {
put_long ((p) + dp_Res2
, (v)); } while (0)
#define GET_PCK_TYPE(p) ((uae_s32)(
do_get_mem_long ((uae_u32 *)((p) + dp_Type)
)))
#define GET_PCK_TYPE(p) ((uae_s32)(
get_long ((p) + dp_Type
)))
#define GET_PCK_RES1(p) ((uae_s32)(
do_get_mem_long ((uae_u32 *)((p) + dp_Res1)
)))
#define GET_PCK_RES1(p) ((uae_s32)(
get_long ((p) + dp_Res1
)))
#define GET_PCK_RES2(p) ((uae_s32)(
do_get_mem_long ((uae_u32 *)((p) + dp_Res2)
)))
#define GET_PCK_RES2(p) ((uae_s32)(
get_long ((p) + dp_Res2
)))
#define GET_PCK_ARG1(p) ((uae_s32)(
do_get_mem_long ((uae_u32 *)((p) + dp_Arg1)
)))
#define GET_PCK_ARG1(p) ((uae_s32)(
get_long ((p) + dp_Arg1
)))
#define GET_PCK_ARG2(p) ((uae_s32)(
do_get_mem_long ((uae_u32 *)((p) + dp_Arg2)
)))
#define GET_PCK_ARG2(p) ((uae_s32)(
get_long ((p) + dp_Arg2
)))
#define GET_PCK_ARG3(p) ((uae_s32)(
do_get_mem_long ((uae_u32 *)((p) + dp_Arg3)
)))
#define GET_PCK_ARG3(p) ((uae_s32)(
get_long ((p) + dp_Arg3
)))
#define GET_PCK_ARG4(p) ((uae_s32)(
do_get_mem_long ((uae_u32 *)((p) + dp_Arg4)
)))
#define GET_PCK_ARG4(p) ((uae_s32)(
get_long ((p) + dp_Arg4
)))
#define GET_PCK_ARG5(p) ((uae_s32)(
do_get_mem_long ((uae_u32 *)((p) + dp_Arg5)
)))
#define GET_PCK_ARG5(p) ((uae_s32)(
get_long ((p) + dp_Arg5
)))
#define PUT_PCK64_RES0(p,v) do {
do_put_mem_long ((uae_u32 *)((p) + dp64_Res0)
, (v)); } while (0)
#define PUT_PCK64_RES0(p,v) do {
put_long ((p) + dp64_Res0
, (v)); } while (0)
#define PUT_PCK64_RES1(p,v) do {
do_put_mem_long ((uae_u32 *)((p) + dp64_Res1), (((uae_u64)v) >> 32)); do_put_mem_long ((uae_u32 *)((p) + dp64_Res1 + 4)
, ((uae_u32)v)); } while (0)
#define PUT_PCK64_RES1(p,v) do {
put_long ((p) + dp64_Res1, (((uae_u64)v) >> 32)); put_long ((p) + dp64_Res1 + 4
, ((uae_u32)v)); } while (0)
#define PUT_PCK64_RES2(p,v) do {
do_put_mem_long ((uae_u32 *)((p) + dp64_Res2)
, (v)); } while (0)
#define PUT_PCK64_RES2(p,v) do {
put_long ((p) + dp64_Res2
, (v)); } while (0)
#define GET_PCK64_TYPE(p) ((uae_s32)(
do_get_mem_long ((uae_u32 *)((p) + dp64_Type)
)))
#define GET_PCK64_TYPE(p) ((uae_s32)(
get_long ((p) + dp64_Type
)))
#define GET_PCK64_RES0(p) ((uae_s32)(
do_get_mem_long ((uae_u32 *)((p) + dp64_Res0)
)))
#define GET_PCK64_RES0(p) ((uae_s32)(
get_long ((p) + dp64_Res0
)))
#define GET_PCK64_RES1(p) ( (((uae_s64)(
do_get_mem_long ((uae_u32 *)((p) + dp64_Res1)))) << 32) | (((uae_s64)(do_get_mem_long ((uae_u32 *)((p) + dp64_Res1 + 4)
))) << 0) )
#define GET_PCK64_RES1(p) ( (((uae_s64)(
get_long ((p) + dp64_Res1))) << 32) | (((uae_s64)(get_long ((p) + dp64_Res1 + 4
))) << 0) )
#define GET_PCK64_ARG1(p) ((uae_s32)(
do_get_mem_long ((uae_u32 *)((p) + dp64_Arg1)
)))
#define GET_PCK64_ARG1(p) ((uae_s32)(
get_long ((p) + dp64_Arg1
)))
#define GET_PCK64_ARG2(p) ( (((uae_s64)(
do_get_mem_long ((uae_u32 *)((p) + dp64_Arg2)))) << 32) | (((uae_s64)(do_get_mem_long ((uae_u32 *)((p) + dp64_Arg2 + 4)
))) << 0) )
#define GET_PCK64_ARG2(p) ( (((uae_s64)(
get_long ((p) + dp64_Arg2))) << 32) | (((uae_s64)(get_long ((p) + dp64_Arg2 + 4
))) << 0) )
#define GET_PCK64_ARG3(p) ((uae_s32)(
do_get_mem_long ((uae_u32 *)((p) + dp64_Arg3)
)))
#define GET_PCK64_ARG3(p) ((uae_s32)(
get_long ((p) + dp64_Arg3
)))
#define GET_PCK64_ARG4(p) ((uae_s32)(
do_get_mem_long ((uae_u32 *)((p) + dp64_Arg4)
)))
#define GET_PCK64_ARG4(p) ((uae_s32)(
get_long ((p) + dp64_Arg4
)))
#define GET_PCK64_ARG5(p) ( (((uae_s64)(
do_get_mem_long ((uae_u32 *)((p) + dp64_Arg5)))) << 32) | (((uae_s64)(do_get_mem_long ((uae_u32 *)((p) + dp64_Arg5 + 4)
))) << 0) )
#define GET_PCK64_ARG5(p) ( (((uae_s64)(
get_long ((p) + dp64_Arg5))) << 32) | (((uae_s64)(get_long ((p) + dp64_Arg5 + 4
))) << 0) )
static
int
flush_cache
(
Unit
*
unit
,
int
num
);
static
int
flush_cache
(
Unit
*
unit
,
int
num
);
static
char
*
char1
(
uaecptr
addr
)
static
char
*
char1
(
uaecptr
addr
)
{
{
static
uae_char
buf
[
1024
];
static
uae_char
buf
[
1024
];
static
char
bufx
[
1024
];
static
TCHAR
bufx
[
1024
];
unsigned
int
i
=
0
;
unsigned
int
i
=
0
;
do
{
do
{
buf
[
i
]
=
get_byte
(
addr
);
buf
[
i
]
=
get_byte
(
addr
);
addr
++
;
addr
++
;
}
while
(
buf
[
i
++
]
&&
i
<
sizeof
(
buf
));
}
while
(
buf
[
i
++
]
&&
i
<
sizeof
(
buf
));
return
au_fs_copy
(
bufx
,
sizeof
(
bufx
)
/
sizeof
(
TCHAR
),
buf
);
return
au_fs_copy
(
bufx
,
sizeof
(
bufx
)
/
sizeof
(
TCHAR
),
buf
);
}
}
static
TCHAR
*
bstr1
(
uaecptr
addr
)
static
TCHAR
*
bstr1
(
uaecptr
addr
)
{
{
static
char
bufx
[
257
];
static
TCHAR
bufx
[
257
];
static
uae_char
buf
[
257
];
static
uae_char
buf
[
257
];
int
i
;
int
i
;
int
n
=
get_byte
(
addr
);
int
n
=
get_byte
(
addr
);
...
@@ -962,7 +965,7 @@ static char *bstr (Unit *unit, uaecptr addr)
...
@@ -962,7 +965,7 @@ static char *bstr (Unit *unit, uaecptr addr)
static
char
*
bstr_cut
(
Unit
*
unit
,
uaecptr
addr
)
static
char
*
bstr_cut
(
Unit
*
unit
,
uaecptr
addr
)
{
{
char
*
p
=
unit
->
tmpbuf3
;
TCHAR
*
p
=
unit
->
tmpbuf3
;
int
i
,
colon_seen
=
0
,
off
;
int
i
,
colon_seen
=
0
,
off
;
int
n
=
get_byte
(
addr
);
int
n
=
get_byte
(
addr
);
uae_char
buf
[
257
];
uae_char
buf
[
257
];
...
@@ -983,7 +986,7 @@ static char *bstr_cut (Unit *unit, uaecptr addr)
...
@@ -983,7 +986,7 @@ static char *bstr_cut (Unit *unit, uaecptr addr)
static
Unit
*
units
=
0
;
static
Unit
*
units
=
0
;
static
Unit
*
static
Unit
*
find_unit
(
uaecptr
port
)
find_unit
(
uaecptr
port
)
{
{
Unit
*
u
;
Unit
*
u
;
for
(
u
=
units
;
u
;
u
=
u
->
next
)
for
(
u
=
units
;
u
;
u
=
u
->
next
)
...
@@ -1170,13 +1173,13 @@ static void filesys_delayed_change (Unit *u, int frames, const TCHAR *rootdir, c
...
@@ -1170,13 +1173,13 @@ static void filesys_delayed_change (Unit *u, int frames, const TCHAR *rootdir, c
write_log
(
"FILESYS: delayed insert %d: '%s' ('%s')
\n
"
,
u
->
unit
,
volume
?
volume
:
"<none>"
,
rootdir
);
write_log
(
"FILESYS: delayed insert %d: '%s' ('%s')
\n
"
,
u
->
unit
,
volume
?
volume
:
"<none>"
,
rootdir
);
}
}
int
filesys_media_change
(
const
char
*
rootdir
,
int
inserted
,
struct
uaedev_config_info
*
uci
)
int
filesys_media_change
(
const
TCHAR
*
rootdir
,
int
inserted
,
struct
uaedev_config_info
*
uci
)
{
{
Unit
*
u
;
Unit
*
u
;
UnitInfo
*
ui
;
UnitInfo
*
ui
;
int
nr
=
-
1
;
int
nr
=
-
1
;
char
volname
[
MAX_DPATH
],
*
volptr
;
TCHAR
volname
[
MAX_DPATH
],
*
volptr
;
char
devname
[
MAX_DPATH
];
TCHAR
devname
[
MAX_DPATH
];
if
(
!
mountertask
)
if
(
!
mountertask
)
return
0
;
return
0
;
...
@@ -1232,7 +1235,7 @@ int filesys_media_change (const char *rootdir, int inserted, struct uaedev_confi
...
@@ -1232,7 +1235,7 @@ int filesys_media_change (const char *rootdir, int inserted, struct uaedev_confi
/* new volume inserted and it was previously mounted? */
/* new volume inserted and it was previously mounted? */
if
(
nr
>=
0
)
{
if
(
nr
>=
0
)
{
if
(
!
filesys_isvolume
(
u
))
/* not going to mount twice */
if
(
!
filesys_isvolume
(
u
))
/* not going to mount twice */
return
filesys_insert
(
nr
,
volptr
,
rootdir
,
-
1
,
-
1
);
return
filesys_insert
(
nr
,
volptr
,
rootdir
,
false
,
-
1
);
return
0
;
return
0
;
}
}
if
(
inserted
<
0
)
/* -1 = only mount if already exists */
if
(
inserted
<
0
)
/* -1 = only mount if already exists */
...
@@ -1277,10 +1280,10 @@ int hardfile_remount (int nr)
...
@@ -1277,10 +1280,10 @@ int hardfile_remount (int nr)
return
1
;
return
1
;
}
}
int
filesys_insert
(
int
nr
,
TCHAR
*
volume
,
const
TCHAR
*
rootdir
,
int
readonly
,
int
flags
)
int
filesys_insert
(
int
nr
,
TCHAR
*
volume
,
const
TCHAR
*
rootdir
,
bool
readonly
,
int
flags
)
{
{
struct
uaedev_config_info
*
uci
;
struct
uaedev_config_info
*
uci
;
int
emptydrive
=
0
;
bool
emptydrive
=
false
;
UnitInfo
*
ui
;
UnitInfo
*
ui
;
Unit
*
u
;
Unit
*
u
;
...
@@ -1338,7 +1341,7 @@ int filesys_insert (int nr, TCHAR *volume, const TCHAR *rootdir, int readonly, i
...
@@ -1338,7 +1341,7 @@ int filesys_insert (int nr, TCHAR *volume, const TCHAR *rootdir, int readonly, i
ui
->
volflags
=
u
->
volflags
=
u
->
ui
.
volflags
=
flags
;
ui
->
volflags
=
u
->
volflags
=
u
->
ui
.
volflags
=
flags
;
_tcscpy
(
uci
->
volname
,
ui
->
volname
);
_tcscpy
(
uci
->
volname
,
ui
->
volname
);
_tcscpy
(
uci
->
rootdir
,
rootdir
);
_tcscpy
(
uci
->
rootdir
,
rootdir
);
if
(
readonly
>=
0
)
if
(
flags
>=
0
)
uci
->
readonly
=
ui
->
readonly
=
u
->
ui
.
readonly
=
readonly
;
uci
->
readonly
=
ui
->
readonly
=
u
->
ui
.
readonly
=
readonly
;
put_byte
(
u
->
volume
+
44
,
0
);
put_byte
(
u
->
volume
+
44
,
0
);
put_byte
(
u
->
volume
+
172
-
32
,
1
);
put_byte
(
u
->
volume
+
172
-
32
,
1
);
...
@@ -1484,7 +1487,7 @@ static void recycle_aino (Unit *unit, a_inode *new_aino)
...
@@ -1484,7 +1487,7 @@ static void recycle_aino (Unit *unit, a_inode *new_aino)
flush_cache
(
unit
,
50
);
flush_cache
(
unit
,
50
);
#if 0
#if 0
{
{
char
buffer[40];
TCHAR
buffer[40];
sprintf (buffer, "%d ainos reaped.\n", i);
sprintf (buffer, "%d ainos reaped.\n", i);
TRACE ((buffer));
TRACE ((buffer));
}
}
...
@@ -1512,9 +1515,9 @@ static void update_child_names (Unit *unit, a_inode *a, a_inode *parent)
...
@@ -1512,9 +1515,9 @@ static void update_child_names (Unit *unit, a_inode *a, a_inode *parent)
int
l0
=
_tcslen
(
parent
->
nname
)
+
2
;
int
l0
=
_tcslen
(
parent
->
nname
)
+
2
;
while
(
a
!=
0
)
{
while
(
a
!=
0
)
{
char
*
name_start
;
TCHAR
*
name_start
;
char
*
new_name
;
TCHAR
*
new_name
;
char
dirsep
[
2
]
=
{
FSDB_DIR_SEPARATOR
,
'\0'
};
TCHAR
dirsep
[
2
]
=
{
FSDB_DIR_SEPARATOR
,
'\0'
};
a
->
parent
=
parent
;
a
->
parent
=
parent
;
name_start
=
_tcsrchr
(
a
->
nname
,
FSDB_DIR_SEPARATOR
);
name_start
=
_tcsrchr
(
a
->
nname
,
FSDB_DIR_SEPARATOR
);
...
@@ -1522,7 +1525,7 @@ static void update_child_names (Unit *unit, a_inode *a, a_inode *parent)
...
@@ -1522,7 +1525,7 @@ static void update_child_names (Unit *unit, a_inode *a, a_inode *parent)
write_log
(
"malformed file name"
);
write_log
(
"malformed file name"
);
}
}
name_start
++
;
name_start
++
;
new_name
=
xmalloc
(
char
,
_tcslen
(
name_start
)
+
l0
);
new_name
=
xmalloc
(
TCHAR
,
_tcslen
(
name_start
)
+
l0
);
_tcscpy
(
new_name
,
parent
->
nname
);
_tcscpy
(
new_name
,
parent
->
nname
);
_tcscat
(
new_name
,
dirsep
);
_tcscat
(
new_name
,
dirsep
);
_tcscat
(
new_name
,
name_start
);
_tcscat
(
new_name
,
name_start
);
...
@@ -1634,19 +1637,19 @@ static a_inode *lookup_aino (Unit *unit, uae_u32 uniq)
...
@@ -1634,19 +1637,19 @@ static a_inode *lookup_aino (Unit *unit, uae_u32 uniq)
return
a
;
return
a
;
}
}
char
*
build_nname
(
const
char
*
d
,
const
char
*
n
)
TCHAR
*
build_nname
(
const
TCHAR
*
d
,
const
TCHAR
*
n
)
{
{
char
dsep
[
2
]
=
{
FSDB_DIR_SEPARATOR
,
0
};
TCHAR
dsep
[
2
]
=
{
FSDB_DIR_SEPARATOR
,
0
};
char
*
p
=
xmalloc
(
char
,
_tcslen
(
d
)
+
_tcslen
(
n
)
+
2
);
TCHAR
*
p
=
xmalloc
(
TCHAR
,
_tcslen
(
d
)
+
_tcslen
(
n
)
+
2
);
_tcscpy
(
p
,
d
);
_tcscpy
(
p
,
d
);
_tcscat
(
p
,
dsep
);
_tcscat
(
p
,
dsep
);
_tcscat
(
p
,
n
);
_tcscat
(
p
,
n
);
return
p
;
return
p
;
}
}
char
*
build_aname
(
const
char
*
d
,
const
char
*
n
)
TCHAR
*
build_aname
(
const
TCHAR
*
d
,
const
TCHAR
*
n
)
{
{
char
*
p
=
xmalloc
(
char
,
_tcslen
(
d
)
+
_tcslen
(
n
)
+
2
);
TCHAR
*
p
=
xmalloc
(
TCHAR
,
_tcslen
(
d
)
+
_tcslen
(
n
)
+
2
);
_tcscpy
(
p
,
d
);
_tcscpy
(
p
,
d
);
_tcscat
(
p
,
"/"
);
_tcscat
(
p
,
"/"
);
_tcscat
(
p
,
n
);
_tcscat
(
p
,
n
);
...
@@ -1654,13 +1657,17 @@ char *build_aname (const char *d, const char *n)
...
@@ -1654,13 +1657,17 @@ char *build_aname (const char *d, const char *n)
}
}
/* This gets called to translate an Amiga name that some program used to
/* This gets called to translate an Amiga name that some program used to
* a name that we can use on the native filesystem. */
* a name that we can use on the native filesystem. */
static
char
*
get_nname
(
Unit
*
unit
,
a_inode
*
base
,
char
*
rel
,
static
TCHAR
*
get_nname
(
Unit
*
unit
,
a_inode
*
base
,
TCHAR
*
rel
,
char
**
modified_rel
)
TCHAR
**
modified_rel
)
{
{
char
*
found
;
TCHAR
*
found
;
TCHAR
*
p
=
0
;
*
modified_rel
=
0
;
*
modified_rel
=
0
;
if
(
unit
->
volflags
&
MYVOLUMEINFO_ARCHIVE
)
{
return
0
;
}
aino_test
(
base
);
aino_test
(
base
);
...
@@ -1691,9 +1698,9 @@ static char *get_nname (Unit *unit, a_inode *base, char *rel,
...
@@ -1691,9 +1698,9 @@ static char *get_nname (Unit *unit, a_inode *base, char *rel,
return
build_nname
(
base
->
nname
,
found
);
return
build_nname
(
base
->
nname
,
found
);
}
}
static
char
*
create_nname
(
Unit
*
unit
,
a_inode
*
base
,
char
*
rel
)
static
TCHAR
*
create_nname
(
Unit
*
unit
,
a_inode
*
base
,
TCHAR
*
rel
)
{
{
char
*
p
;
TCHAR
*
p
;
aino_test
(
base
);
aino_test
(
base
);
/* We are trying to create a file called REL. */
/* We are trying to create a file called REL. */
...
@@ -1702,7 +1709,7 @@ static char *create_nname (Unit *unit, a_inode *base, char *rel)
...
@@ -1702,7 +1709,7 @@ static char *create_nname (Unit *unit, a_inode *base, char *rel)
* need a new unique nname. */
* need a new unique nname. */
if
(
fsdb_name_invalid
(
rel
)
||
fsdb_used_as_nname
(
base
,
rel
))
{
if
(
fsdb_name_invalid
(
rel
)
||
fsdb_used_as_nname
(
base
,
rel
))
{
#if 0
#if 0
oh_dear:
oh_dear:
#endif
#endif
if
(
currprefs
.
filesys_no_uaefsdb
&&
!
(
base
->
volflags
&
MYVOLUMEINFO_STREAMS
))
{
if
(
currprefs
.
filesys_no_uaefsdb
&&
!
(
base
->
volflags
&
MYVOLUMEINFO_STREAMS
))
{
write_log
(
"illegal filename '%s', no stream supporting filesystem and uaefsdb disabled
\n
"
,
rel
);
write_log
(
"illegal filename '%s', no stream supporting filesystem and uaefsdb disabled
\n
"
,
rel
);
...
@@ -1727,7 +1734,7 @@ static int fill_file_attrs (Unit *u, a_inode *base, a_inode *c)
...
@@ -1727,7 +1734,7 @@ static int fill_file_attrs (Unit *u, a_inode *base, a_inode *c)
{
{
if
(
0
/*u->volflags & MYVOLUMEINFO_ARCHIVE*/
)
{
if
(
0
/*u->volflags & MYVOLUMEINFO_ARCHIVE*/
)
{
int
isdir
,
flags
;
int
isdir
,
flags
;
char
*
comment
;
TCHAR
*
comment
;
zfile_fill_file_attrs_archive
(
c
->
nname
,
&
isdir
,
&
flags
,
&
comment
);
zfile_fill_file_attrs_archive
(
c
->
nname
,
&
isdir
,
&
flags
,
&
comment
);
c
->
dir
=
isdir
;
c
->
dir
=
isdir
;
c
->
amigaos_mode
=
0
;
c
->
amigaos_mode
=
0
;
...
@@ -1752,7 +1759,7 @@ static int fill_file_attrs (Unit *u, a_inode *base, a_inode *c)
...
@@ -1752,7 +1759,7 @@ static int fill_file_attrs (Unit *u, a_inode *base, a_inode *c)
* figure out that this is supposed to be the file "foobar.inf".
* figure out that this is supposed to be the file "foobar.inf".
* DOS sucks...
* DOS sucks...
*/
*/
static
char
*
get_aname
(
Unit
*
unit
,
a_inode
*
base
,
char
*
rel
)
static
TCHAR
*
get_aname
(
Unit
*
unit
,
a_inode
*
base
,
TCHAR
*
rel
)
{
{
return
my_strdup
(
rel
);
return
my_strdup
(
rel
);
}
}
...
@@ -1795,10 +1802,10 @@ static void init_child_aino (Unit *unit, a_inode *base, a_inode *aino)
...
@@ -1795,10 +1802,10 @@ static void init_child_aino (Unit *unit, a_inode *base, a_inode *aino)
aino_test
(
aino
);
aino_test
(
aino
);
}
}
static
a_inode
*
new_child_aino
(
Unit
*
unit
,
a_inode
*
base
,
char
*
rel
)
static
a_inode
*
new_child_aino
(
Unit
*
unit
,
a_inode
*
base
,
TCHAR
*
rel
)
{
{
char
*
modified_rel
;
TCHAR
*
modified_rel
;
char
*
nn
;
TCHAR
*
nn
;
a_inode
*
aino
=
NULL
;
a_inode
*
aino
=
NULL
;
int
isarch
=
unit
->
volflags
&
MYVOLUMEINFO_ARCHIVE
;
int
isarch
=
unit
->
volflags
&
MYVOLUMEINFO_ARCHIVE
;
...
@@ -1834,7 +1841,7 @@ static a_inode *new_child_aino (Unit *unit, a_inode *base, char *rel)
...
@@ -1834,7 +1841,7 @@ static a_inode *new_child_aino (Unit *unit, a_inode *base, char *rel)
return
aino
;
return
aino
;
}
}
static
a_inode
*
create_child_aino
(
Unit
*
unit
,
a_inode
*
base
,
char
*
rel
,
int
isdir
)
static
a_inode
*
create_child_aino
(
Unit
*
unit
,
a_inode
*
base
,
TCHAR
*
rel
,
int
isdir
)
{
{
a_inode
*
aino
=
xcalloc
(
a_inode
,
1
);
a_inode
*
aino
=
xcalloc
(
a_inode
,
1
);
if
(
aino
==
0
)
if
(
aino
==
0
)
...
@@ -1860,7 +1867,7 @@ static a_inode *create_child_aino (Unit *unit, a_inode *base, char *rel, int isd
...
@@ -1860,7 +1867,7 @@ static a_inode *create_child_aino (Unit *unit, a_inode *base, char *rel, int isd
return
aino
;
return
aino
;
}
}
static
a_inode
*
lookup_child_aino
(
Unit
*
unit
,
a_inode
*
base
,
char
*
rel
,
uae_u32
*
err
)
static
a_inode
*
lookup_child_aino
(
Unit
*
unit
,
a_inode
*
base
,
TCHAR
*
rel
,
int
*
err
)
{
{
a_inode
*
c
=
base
->
child
;
a_inode
*
c
=
base
->
child
;
int
l0
=
_tcslen
(
rel
);
int
l0
=
_tcslen
(
rel
);
...
@@ -1889,7 +1896,7 @@ static a_inode *lookup_child_aino (Unit *unit, a_inode *base, char *rel, uae_u32
...
@@ -1889,7 +1896,7 @@ static a_inode *lookup_child_aino (Unit *unit, a_inode *base, char *rel, uae_u32
}
}
/* Different version because for this one, REL is an nname. */
/* Different version because for this one, REL is an nname. */
static
a_inode
*
lookup_child_aino_for_exnext
(
Unit
*
unit
,
a_inode
*
base
,
char
*
rel
,
uae_u32
*
err
)
static
a_inode
*
lookup_child_aino_for_exnext
(
Unit
*
unit
,
a_inode
*
base
,
TCHAR
*
rel
,
uae_u32
*
err
)
{
{
a_inode
*
c
=
base
->
child
;
a_inode
*
c
=
base
->
child
;
int
l0
=
_tcslen
(
rel
);
int
l0
=
_tcslen
(
rel
);
...
@@ -1938,10 +1945,10 @@ static a_inode *lookup_child_aino_for_exnext (Unit *unit, a_inode *base, char *r
...
@@ -1938,10 +1945,10 @@ static a_inode *lookup_child_aino_for_exnext (Unit *unit, a_inode *base, char *r
return
c
;
return
c
;
}
}
static
a_inode
*
get_aino
(
Unit
*
unit
,
a_inode
*
base
,
const
char
*
rel
,
int
*
err
)
static
a_inode
*
get_aino
(
Unit
*
unit
,
a_inode
*
base
,
const
TCHAR
*
rel
,
int
*
err
)
{
{
char
*
tmp
;
TCHAR
*
tmp
;
char
*
p
;
TCHAR
*
p
;
a_inode
*
curr
;
a_inode
*
curr
;
int
i
;
int
i
;
...
@@ -1969,7 +1976,7 @@ static a_inode *get_aino (Unit *unit, a_inode *base, const char *rel, int *err)
...
@@ -1969,7 +1976,7 @@ static a_inode *get_aino (Unit *unit, a_inode *base, const char *rel, int *err)
}
else
{
}
else
{
a_inode
*
next
;
a_inode
*
next
;
char
*
component_end
;
TCHAR
*
component_end
;
component_end
=
_tcschr
(
p
,
'/'
);
component_end
=
_tcschr
(
p
,
'/'
);
if
(
component_end
!=
0
)
if
(
component_end
!=
0
)
*
component_end
=
'\0'
;
*
component_end
=
'\0'
;
...
@@ -1994,7 +2001,7 @@ static a_inode *get_aino (Unit *unit, a_inode *base, const char *rel, int *err)
...
@@ -1994,7 +2001,7 @@ static a_inode *get_aino (Unit *unit, a_inode *base, const char *rel, int *err)
}
}
static
uae_u32
notifyhash
(
char
*
s
)
static
uae_u32
notifyhash
(
TCHAR
*
s
)
{
{
uae_u32
hash
=
0
;
uae_u32
hash
=
0
;
while
(
*
s
)
while
(
*
s
)
...
@@ -2002,7 +2009,7 @@ static uae_u32 notifyhash (char *s)
...
@@ -2002,7 +2009,7 @@ static uae_u32 notifyhash (char *s)
return
hash
%
NOTIFY_HASH_SIZE
;
return
hash
%
NOTIFY_HASH_SIZE
;
}
}
static
Notify
*
new_notify
(
Unit
*
unit
,
char
*
name
)
static
Notify
*
new_notify
(
Unit
*
unit
,
TCHAR
*
name
)
{
{
Notify
*
n
=
xmalloc
(
Notify
,
1
);
Notify
*
n
=
xmalloc
(
Notify
,
1
);
uae_u32
hash
=
notifyhash
(
name
);
uae_u32
hash
=
notifyhash
(
name
);
...
@@ -2147,8 +2154,8 @@ static uae_u32 REGPARAM2 startup_handler (TrapContext *context)
...
@@ -2147,8 +2154,8 @@ static uae_u32 REGPARAM2 startup_handler (TrapContext *context)
uaecptr
arg2
=
get_long
(
pkt
+
dp_Arg2
);
uaecptr
arg2
=
get_long
(
pkt
+
dp_Arg2
);
uaecptr
devnode
;
uaecptr
devnode
;
int
i
;
int
i
;
char
*
devname
=
bstr1
(
get_long
(
pkt
+
dp_Arg1
)
<<
2
);
TCHAR
*
devname
=
bstr1
(
get_long
(
pkt
+
dp_Arg1
)
<<
2
);
char
*
s
;
TCHAR
*
s
;
Unit
*
unit
;
Unit
*
unit
;
UnitInfo
*
uinfo
;
UnitInfo
*
uinfo
;
int
late
=
0
;
int
late
=
0
;
...
@@ -2194,7 +2201,7 @@ static uae_u32 REGPARAM2 startup_handler (TrapContext *context)
...
@@ -2194,7 +2201,7 @@ static uae_u32 REGPARAM2 startup_handler (TrapContext *context)
unit
=
startup_create_unit
(
uinfo
,
i
);
unit
=
startup_create_unit
(
uinfo
,
i
);
unit
->
volflags
=
uinfo
->
volflags
;
unit
->
volflags
=
uinfo
->
volflags
;
/* write_comm_pipe_int (unit->ui.unit_pipe, -1, 1);*/
/* write_comm_pipe_int (unit->ui.unit_pipe, -1, 1);*/
write_log
(
"FS: %s (flags=%08X,E=%d,ED=%d,EF=%d,native='%s') starting..
\n
"
,
write_log
(
"FS: %s (flags=%08X,E=%d,ED=%d,EF=%d,native='%s') starting..
\n
"
,
unit
->
ui
.
volname
,
unit
->
volflags
,
uinfo
->
wasisempty
,
ed
,
ef
,
unit
->
ui
.
rootdir
);
unit
->
ui
.
volname
,
unit
->
volflags
,
uinfo
->
wasisempty
,
ed
,
ef
,
unit
->
ui
.
rootdir
);
...
@@ -2255,7 +2262,7 @@ static void
...
@@ -2255,7 +2262,7 @@ static void
}
}
put_long
(
info
,
0
);
/* errors */
put_long
(
info
,
0
);
/* errors */
put_long
(
info
+
4
,
unit
->
unit
);
/* unit number */
put_long
(
info
+
4
,
unit
->
unit
);
/* unit number */
put_long
(
info
+
8
,
unit
->
ui
.
readonly
?
80
:
82
);
/* state */
put_long
(
info
+
8
,
unit
->
ui
.
readonly
||
unit
->
ui
.
locked
?
80
:
82
);
/* state */
put_long
(
info
+
12
,
fsu
.
fsu_blocks
);
/* numblocks */
put_long
(
info
+
12
,
fsu
.
fsu_blocks
);
/* numblocks */
put_long
(
info
+
16
,
fsu
.
fsu_blocks
-
fsu
.
fsu_bavail
);
/* inuse */
put_long
(
info
+
16
,
fsu
.
fsu_blocks
-
fsu
.
fsu_bavail
);
/* inuse */
put_long
(
info
+
20
,
1024
);
/* bytesperblock */
put_long
(
info
+
20
,
1024
);
/* bytesperblock */
...
@@ -2266,17 +2273,17 @@ static void
...
@@ -2266,17 +2273,17 @@ static void
}
}
static
void
static
void
action_disk_info
(
Unit
*
unit
,
dpacket
packet
)
action_disk_info
(
Unit
*
unit
,
dpacket
packet
)
{
{
TRACE
((
"ACTION_DISK_INFO
\n
"
));
TRACE
((
"ACTION_DISK_INFO
\n
"
));
do_info
(
unit
,
packet
,
GET_PCK_ARG1
(
packet
)
<<
2
);
do_info
(
unit
,
packet
,
GET_PCK_ARG1
(
packet
)
<<
2
);
}
}
static
void
static
void
action_info
(
Unit
*
unit
,
dpacket
packet
)
action_info
(
Unit
*
unit
,
dpacket
packet
)
{
{
TRACE
((
"ACTION_INFO
\n
"
));
TRACE
((
"ACTION_INFO
\n
"
));
do_info
(
unit
,
packet
,
GET_PCK_ARG2
(
packet
)
<<
2
);
do_info
(
unit
,
packet
,
GET_PCK_ARG2
(
packet
)
<<
2
);
}
}
static
void
free_key
(
Unit
*
unit
,
Key
*
k
)
static
void
free_key
(
Unit
*
unit
,
Key
*
k
)
...
@@ -2321,7 +2328,7 @@ static Key *lookup_key (Unit *unit, uae_u32 uniq)
...
@@ -2321,7 +2328,7 @@ static Key *lookup_key (Unit *unit, uae_u32 uniq)
static
Key
*
new_key
(
Unit
*
unit
)
static
Key
*
new_key
(
Unit
*
unit
)
{
{
Key
*
k
=
xcalloc
(
Key
,
1
);
Key
*
k
=
xcalloc
(
Key
,
1
);
k
->
uniq
=
++
key_uniq
;
k
->
uniq
=
++
key_uniq
;
k
->
fd
=
NULL
;
k
->
fd
=
NULL
;
k
->
file_pos
=
0
;
k
->
file_pos
=
0
;
...
@@ -2332,7 +2339,7 @@ static Key *new_key (Unit *unit)
...
@@ -2332,7 +2339,7 @@ static Key *new_key (Unit *unit)
}
}
static
void
static
void
dumplock
(
Unit
*
unit
,
uaecptr
lock
)
dumplock
(
Unit
*
unit
,
uaecptr
lock
)
{
{
a_inode
*
a
;
a_inode
*
a
;
TRACE
((
"LOCK: 0x%lx"
,
lock
));
TRACE
((
"LOCK: 0x%lx"
,
lock
));
...
@@ -2353,7 +2360,7 @@ dumplock (Unit *unit, uaecptr lock)
...
@@ -2353,7 +2360,7 @@ dumplock (Unit *unit, uaecptr lock)
TRACE
((
" }
\n
"
));
TRACE
((
" }
\n
"
));
}
}
static
a_inode
*
find_aino
(
Unit
*
unit
,
uaecptr
lock
,
const
char
*
name
,
int
*
err
)
static
a_inode
*
find_aino
(
Unit
*
unit
,
uaecptr
lock
,
const
TCHAR
*
name
,
int
*
err
)
{
{
a_inode
*
a
;
a_inode
*
a
;
...
@@ -2454,12 +2461,12 @@ static void notify_check (Unit *unit, a_inode *a)
...
@@ -2454,12 +2461,12 @@ static void notify_check (Unit *unit, a_inode *a)
}
}
static
void
static
void
action_add_notify
(
Unit
*
unit
,
dpacket
packet
)
action_add_notify
(
Unit
*
unit
,
dpacket
packet
)
{
{
uaecptr
nr
=
GET_PCK_ARG1
(
packet
);
uaecptr
nr
=
GET_PCK_ARG1
(
packet
);
int
flags
;
int
flags
;
Notify
*
n
;
Notify
*
n
;
char
*
name
,
*
p
,
*
partname
;
TCHAR
*
name
,
*
p
,
*
partname
;
TRACE
((
"ACTION_ADD_NOTIFY
\n
"
));
TRACE
((
"ACTION_ADD_NOTIFY
\n
"
));
...
@@ -2507,7 +2514,7 @@ action_add_notify (Unit *unit, dpacket packet)
...
@@ -2507,7 +2514,7 @@ action_add_notify (Unit *unit, dpacket packet)
PUT_PCK_RES1
(
packet
,
DOS_TRUE
);
PUT_PCK_RES1
(
packet
,
DOS_TRUE
);
}
}
static
void
static
void
action_remove_notify
(
Unit
*
unit
,
dpacket
packet
)
action_remove_notify
(
Unit
*
unit
,
dpacket
packet
)
{
{
uaecptr
nr
=
GET_PCK_ARG1
(
packet
);
uaecptr
nr
=
GET_PCK_ARG1
(
packet
);
Notify
*
n
;
Notify
*
n
;
...
@@ -2558,7 +2565,7 @@ static void free_lock (Unit *unit, uaecptr lock)
...
@@ -2558,7 +2565,7 @@ static void free_lock (Unit *unit, uaecptr lock)
}
}
static
void
static
void
action_lock
(
Unit
*
unit
,
dpacket
packet
)
action_lock
(
Unit
*
unit
,
dpacket
packet
)
{
{
uaecptr
lock
=
GET_PCK_ARG1
(
packet
)
<<
2
;
uaecptr
lock
=
GET_PCK_ARG1
(
packet
)
<<
2
;
uaecptr
name
=
GET_PCK_ARG2
(
packet
)
<<
2
;
uaecptr
name
=
GET_PCK_ARG2
(
packet
)
<<
2
;
...
@@ -2643,7 +2650,7 @@ static uaecptr
...
@@ -2643,7 +2650,7 @@ static uaecptr
}
}
static
void
static
void
action_dup_lock
(
Unit
*
unit
,
dpacket
packet
)
action_dup_lock
(
Unit
*
unit
,
dpacket
packet
)
{
{
uaecptr
lock
=
GET_PCK_ARG1
(
packet
)
<<
2
;
uaecptr
lock
=
GET_PCK_ARG1
(
packet
)
<<
2
;
TRACE
((
"ACTION_DUP_LOCK(0x%lx)
\n
"
,
lock
));
TRACE
((
"ACTION_DUP_LOCK(0x%lx)
\n
"
,
lock
));
...
@@ -2669,11 +2676,11 @@ static void
...
@@ -2669,11 +2676,11 @@ static void
#if !defined TARGET_AMIGAOS || !defined WORDS_BIGENDIAN
#if !defined TARGET_AMIGAOS || !defined WORDS_BIGENDIAN
/* convert time_t to/from AmigaDOS time */
/* convert time_t to/from AmigaDOS time */
const
int
secs_per_day
=
24
*
60
*
60
;
static
const
int
secs_per_day
=
24
*
60
*
60
;
const
int
diff
=
(
8
*
365
+
2
)
*
(
24
*
60
*
60
);
static
const
int
diff
=
(
8
*
365
+
2
)
*
(
24
*
60
*
60
);
static
void
static
void
get_time
(
time_t
t
,
long
*
days
,
long
*
mins
,
long
*
ticks
)
get_time
(
time_t
t
,
long
*
days
,
long
*
mins
,
long
*
ticks
)
{
{
/* time_t is secs since 1-1-1970 */
/* time_t is secs since 1-1-1970 */
/* days since 1-1-1978 */
/* days since 1-1-1978 */
...
@@ -2715,7 +2722,7 @@ get_time (time_t t, long* days, long* mins, long* ticks)
...
@@ -2715,7 +2722,7 @@ get_time (time_t t, long* days, long* mins, long* ticks)
* of the Unix epoch
* of the Unix epoch
*/
*/
static
time_t
static
time_t
put_time
(
long
days
,
long
mins
,
long
ticks
)
put_time
(
long
days
,
long
mins
,
long
ticks
)
{
{
time_t
t
;
time_t
t
;
...
@@ -2827,7 +2834,7 @@ found:
...
@@ -2827,7 +2834,7 @@ found:
* before this happens because of something else. */
* before this happens because of something else. */
uniq
=
1
;
uniq
=
1
;
}
}
unit
->
next_exkey
=
uniq
+
1
;
unit
->
next_exkey
=
uniq
+
1
;
ek
->
aino
=
aino
;
ek
->
aino
=
aino
;
ek
->
curr_file
=
0
;
ek
->
curr_file
=
0
;
ek
->
uniq
=
uniq
;
ek
->
uniq
=
uniq
;
...
@@ -2856,13 +2863,13 @@ static void move_exkeys (Unit *unit, a_inode *from, a_inode *to)
...
@@ -2856,13 +2863,13 @@ static void move_exkeys (Unit *unit, a_inode *from, a_inode *to)
}
}
static
void
static
void
get_fileinfo
(
Unit
*
unit
,
dpacket
packet
,
uaecptr
info
,
a_inode
*
aino
)
get_fileinfo
(
Unit
*
unit
,
dpacket
packet
,
uaecptr
info
,
a_inode
*
aino
)
{
{
struct
_stat64
statbuf
;
struct
_stat64
statbuf
;
long
days
,
mins
,
ticks
;
long
days
,
mins
,
ticks
;
int
i
,
n
,
entrytype
;
int
i
,
n
,
entrytype
;
int
fsdb_can
=
fsdb_cando
(
unit
);
int
fsdb_can
=
fsdb_cando
(
unit
);
char
*
xs
;
TCHAR
*
xs
;
char
*
x
,
*
x2
;
char
*
x
,
*
x2
;
memset
(
&
statbuf
,
0
,
sizeof
statbuf
);
memset
(
&
statbuf
,
0
,
sizeof
statbuf
);
...
@@ -2915,11 +2922,11 @@ get_fileinfo (Unit *unit, dpacket packet, uaecptr info, a_inode *aino)
...
@@ -2915,11 +2922,11 @@ get_fileinfo (Unit *unit, dpacket packet, uaecptr info, a_inode *aino)
#else
#else
put_long
(
info
+
116
,
fsdb_can
?
aino
->
amigaos_mode
:
fsdb_mode_supported
(
aino
));
put_long
(
info
+
116
,
fsdb_can
?
aino
->
amigaos_mode
:
fsdb_mode_supported
(
aino
));
put_long
(
info
+
124
,
statbuf
.
st_size
>
MAXFILESIZE32
?
MAXFILESIZE32
:
statbuf
.
st_size
);
put_long
(
info
+
124
,
statbuf
.
st_size
>
MAXFILESIZE32
?
MAXFILESIZE32
:
statbuf
.
st_size
);
#
ifdef HAVE_ST_BLOCKS
#ifdef HAVE_ST_BLOCKS
put_long
(
info
+
128
,
statbuf
.
st_blocks
);
put_long
(
info
+
128
,
statbuf
.
st_blocks
);
#
else
#else
put_long
(
info
+
128
,
(
statbuf
.
st_size
+
511
)
/
512
);
put_long
(
info
+
128
,
(
statbuf
.
st_size
+
511
)
/
512
);
#
endif
#endif
get_time
(
statbuf
.
st_mtime
,
&
days
,
&
mins
,
&
ticks
);
get_time
(
statbuf
.
st_mtime
,
&
days
,
&
mins
,
&
ticks
);
put_long
(
info
+
132
,
days
);
put_long
(
info
+
132
,
days
);
put_long
(
info
+
136
,
mins
);
put_long
(
info
+
136
,
mins
);
...
@@ -2947,7 +2954,7 @@ get_fileinfo (Unit *unit, dpacket packet, uaecptr info, a_inode *aino)
...
@@ -2947,7 +2954,7 @@ get_fileinfo (Unit *unit, dpacket packet, uaecptr info, a_inode *aino)
PUT_PCK_RES1
(
packet
,
DOS_TRUE
);
PUT_PCK_RES1
(
packet
,
DOS_TRUE
);
}
}
int
get_native_path
(
uae_u32
lock
,
char
*
out
)
int
get_native_path
(
uae_u32
lock
,
TCHAR
*
out
)
{
{
int
i
=
0
;
int
i
=
0
;
for
(
i
=
0
;
i
<
MAX_FILESYSTEM_UNITS
;
i
++
)
{
for
(
i
=
0
;
i
<
MAX_FILESYSTEM_UNITS
;
i
++
)
{
...
@@ -3112,7 +3119,7 @@ static int action_examine_all_do (Unit *unit, uaecptr lock, ExAllKey *eak, uaecp
...
@@ -3112,7 +3119,7 @@ static int action_examine_all_do (Unit *unit, uaecptr lock, ExAllKey *eak, uaecp
struct
dirent
*
ok
;
struct
dirent
*
ok
;
uae_u32
err
;
uae_u32
err
;
struct
fs_dirhandle
*
d
;
struct
fs_dirhandle
*
d
;
char
fn
[
MAX_DPATH
];
TCHAR
fn
[
MAX_DPATH
];
if
(
lock
!=
0
)
if
(
lock
!=
0
)
base
=
lookup_aino
(
unit
,
get_long
(
lock
+
4
));
base
=
lookup_aino
(
unit
,
get_long
(
lock
+
4
));
...
@@ -3363,7 +3370,7 @@ static void populate_directory (Unit *unit, a_inode *base)
...
@@ -3363,7 +3370,7 @@ static void populate_directory (Unit *unit, a_inode *base)
TRACE
((
"Populating directory, child %p, locked_children %d
\n
"
,
TRACE
((
"Populating directory, child %p, locked_children %d
\n
"
,
base
->
child
,
base
->
locked_children
));
base
->
child
,
base
->
locked_children
));
for
(;;)
{
for
(;;)
{
char
fn
[
MAX_DPATH
];
TCHAR
fn
[
MAX_DPATH
];
struct
dirent
*
ok
;
struct
dirent
*
ok
;
uae_u32
err
;
uae_u32
err
;
...
@@ -3458,7 +3465,7 @@ static void action_examine_next (Unit *unit, dpacket packet)
...
@@ -3458,7 +3465,7 @@ static void action_examine_next (Unit *unit, dpacket packet)
do_examine
(
unit
,
packet
,
ek
,
info
);
do_examine
(
unit
,
packet
,
ek
,
info
);
return
;
return
;
no_more_entries:
no_more_entries:
PUT_PCK_RES1
(
packet
,
DOS_FALSE
);
PUT_PCK_RES1
(
packet
,
DOS_FALSE
);
PUT_PCK_RES2
(
packet
,
ERROR_NO_MORE_ENTRIES
);
PUT_PCK_RES2
(
packet
,
ERROR_NO_MORE_ENTRIES
);
}
}
...
@@ -3472,7 +3479,7 @@ static void do_find (Unit *unit, dpacket packet, int mode, int create, int fallb
...
@@ -3472,7 +3479,7 @@ static void do_find (Unit *unit, dpacket packet, int mode, int create, int fallb
Key
*
k
;
Key
*
k
;
struct
fs_filehandle
*
fd
;
struct
fs_filehandle
*
fd
;
int
err
;
int
err
;
char
openmode
;
char
*
openmode
;
int
aino_created
=
0
;
int
aino_created
=
0
;
int
isarch
=
unit
->
volflags
&
MYVOLUMEINFO_ARCHIVE
;
int
isarch
=
unit
->
volflags
&
MYVOLUMEINFO_ARCHIVE
;
...
@@ -3505,14 +3512,14 @@ static void do_find (Unit *unit, dpacket packet, int mode, int create, int fallb
...
@@ -3505,14 +3512,14 @@ static void do_find (Unit *unit, dpacket packet, int mode, int create, int fallb
return
;
return
;
}
}
if
(
create
!=
2
)
{
if
(
create
!=
2
)
{
if
((((
mode
&
aino
->
amigaos_mode
)
&
A_FIBF_WRITE
)
!=
0
||
unit
->
ui
.
readonly
)
if
((((
mode
&
aino
->
amigaos_mode
)
&
A_FIBF_WRITE
)
!=
0
||
unit
->
ui
.
readonly
||
unit
->
ui
.
locked
)
&&
fallback
)
&&
fallback
)
{
{
mode
&=
~
A_FIBF_WRITE
;
mode
&=
~
A_FIBF_WRITE
;
}
}
/* Kick 1.3 doesn't check read and write access bits - maybe it would be
/* Kick 1.3 doesn't check read and write access bits - maybe it would be
* simpler just not to do that either. */
* simpler just not to do that either. */
if
((
mode
&
A_FIBF_WRITE
)
!=
0
&&
unit
->
ui
.
readonly
)
{
if
((
mode
&
A_FIBF_WRITE
)
!=
0
&&
(
unit
->
ui
.
readonly
||
unit
->
ui
.
locked
)
)
{
PUT_PCK_RES1
(
packet
,
DOS_FALSE
);
PUT_PCK_RES1
(
packet
,
DOS_FALSE
);
PUT_PCK_RES2
(
packet
,
ERROR_DISK_WRITE_PROTECTED
);
PUT_PCK_RES2
(
packet
,
ERROR_DISK_WRITE_PROTECTED
);
return
;
return
;
...
@@ -3547,7 +3554,9 @@ static void do_find (Unit *unit, dpacket packet, int mode, int create, int fallb
...
@@ -3547,7 +3554,9 @@ static void do_find (Unit *unit, dpacket packet, int mode, int create, int fallb
prepare_for_open
(
aino
->
nname
);
prepare_for_open
(
aino
->
nname
);
openmode
=
((
mode
&
A_FIBF_READ
)
==
0
?
"wb"
:
(
mode
&
A_FIBF_WRITE
)
==
0
?
"rb"
:
"r+b"
);
openmode
=
((
mode
&
A_FIBF_READ
)
==
0
?
"wb"
:
(
mode
&
A_FIBF_WRITE
)
==
0
?
"rb"
:
"r+b"
);
if
(
create
)
openmode
=
"w+b"
;
if
(
create
)
openmode
=
"w+b"
;
fd
=
fs_open
(
unit
,
aino
->
nname
,
openmode
);
fd
=
fs_open
(
unit
,
aino
->
nname
,
openmode
);
...
@@ -3570,7 +3579,7 @@ static void do_find (Unit *unit, dpacket packet, int mode, int create, int fallb
...
@@ -3570,7 +3579,7 @@ static void do_find (Unit *unit, dpacket packet, int mode, int create, int fallb
if
(
create
&&
isarch
)
if
(
create
&&
isarch
)
fsdb_set_file_attrs
(
aino
);
fsdb_set_file_attrs
(
aino
);
put_long
(
fh
+
36
,
k
->
uniq
);
put_long
(
fh
+
36
,
k
->
uniq
);
if
(
create
==
2
)
{
if
(
create
==
2
)
{
aino
->
elock
=
1
;
aino
->
elock
=
1
;
// clear comment if file already existed
// clear comment if file already existed
...
@@ -3587,14 +3596,14 @@ static void do_find (Unit *unit, dpacket packet, int mode, int create, int fallb
...
@@ -3587,14 +3596,14 @@ static void do_find (Unit *unit, dpacket packet, int mode, int create, int fallb
}
}
static
void
static
void
action_fh_from_lock
(
Unit
*
unit
,
dpacket
packet
)
action_fh_from_lock
(
Unit
*
unit
,
dpacket
packet
)
{
{
uaecptr
fh
=
GET_PCK_ARG1
(
packet
)
<<
2
;
uaecptr
fh
=
GET_PCK_ARG1
(
packet
)
<<
2
;
uaecptr
lock
=
GET_PCK_ARG2
(
packet
)
<<
2
;
uaecptr
lock
=
GET_PCK_ARG2
(
packet
)
<<
2
;
a_inode
*
aino
;
a_inode
*
aino
;
Key
*
k
;
Key
*
k
;
struct
fs_filehandle
*
fd
;
struct
fs_filehandle
*
fd
;
char
openmode
;
char
*
openmode
;
int
mode
;
int
mode
;
int
isarch
=
unit
->
volflags
&
MYVOLUMEINFO_ARCHIVE
;
int
isarch
=
unit
->
volflags
&
MYVOLUMEINFO_ARCHIVE
;
...
@@ -3620,14 +3629,14 @@ action_fh_from_lock (Unit *unit, dpacket packet)
...
@@ -3620,14 +3629,14 @@ action_fh_from_lock (Unit *unit, dpacket packet)
:
"r+b"
));
:
"r+b"
));
/* the files on CD really can have the write-bit set. */
/* the files on CD really can have the write-bit set. */
if
(
unit
->
ui
.
readonly
)
if
(
unit
->
ui
.
readonly
||
unit
->
ui
.
locked
)
openmode
=
"rb"
;
openmode
=
"rb"
;
fd
=
fs_open
(
unit
,
aino
->
nname
,
openmode
);
fd
=
fs_open
(
unit
,
aino
->
nname
,
openmode
);
if
(
fd
==
NULL
)
{
if
(
fd
==
NULL
)
{
PUT_PCK_RES1
(
packet
,
DOS_FALSE
);
PUT_PCK_RES1
(
packet
,
DOS_FALSE
);
PUT_PCK_RES2
(
packet
,
dos_errno
());
PUT_PCK_RES2
(
packet
,
dos_errno
());
return
;
return
;
}
}
k
=
new_key
(
unit
);
k
=
new_key
(
unit
);
...
@@ -3645,31 +3654,31 @@ action_fh_from_lock (Unit *unit, dpacket packet)
...
@@ -3645,31 +3654,31 @@ action_fh_from_lock (Unit *unit, dpacket packet)
}
}
static
void
static
void
action_find_input
(
Unit
*
unit
,
dpacket
packet
)
action_find_input
(
Unit
*
unit
,
dpacket
packet
)
{
{
do_find
(
unit
,
packet
,
A_FIBF_READ
|
A_FIBF_WRITE
,
0
,
1
);
do_find
(
unit
,
packet
,
A_FIBF_READ
|
A_FIBF_WRITE
,
0
,
1
);
}
}
static
void
static
void
action_find_output
(
Unit
*
unit
,
dpacket
packet
)
action_find_output
(
Unit
*
unit
,
dpacket
packet
)
{
{
if
(
unit
->
ui
.
readonly
)
{
if
(
unit
->
ui
.
readonly
||
unit
->
ui
.
locked
)
{
PUT_PCK_RES1
(
packet
,
DOS_FALSE
);
PUT_PCK_RES1
(
packet
,
DOS_FALSE
);
PUT_PCK_RES2
(
packet
,
ERROR_DISK_WRITE_PROTECTED
);
PUT_PCK_RES2
(
packet
,
ERROR_DISK_WRITE_PROTECTED
);
return
;
return
;
}
}
do_find
(
unit
,
packet
,
A_FIBF_READ
|
A_FIBF_WRITE
,
2
,
0
);
do_find
(
unit
,
packet
,
A_FIBF_READ
|
A_FIBF_WRITE
,
2
,
0
);
}
}
static
void
static
void
action_find_write
(
Unit
*
unit
,
dpacket
packet
)
action_find_write
(
Unit
*
unit
,
dpacket
packet
)
{
{
if
(
unit
->
ui
.
readonly
)
{
if
(
unit
->
ui
.
readonly
||
unit
->
ui
.
locked
)
{
PUT_PCK_RES1
(
packet
,
DOS_FALSE
);
PUT_PCK_RES1
(
packet
,
DOS_FALSE
);
PUT_PCK_RES2
(
packet
,
ERROR_DISK_WRITE_PROTECTED
);
PUT_PCK_RES2
(
packet
,
ERROR_DISK_WRITE_PROTECTED
);
return
;
return
;
}
}
do_find
(
unit
,
packet
,
A_FIBF_READ
|
A_FIBF_WRITE
,
1
,
0
);
do_find
(
unit
,
packet
,
A_FIBF_READ
|
A_FIBF_WRITE
,
1
,
0
);
}
}
/* change file/dir's parent dir modification time */
/* change file/dir's parent dir modification time */
...
@@ -3686,7 +3695,7 @@ static void updatedirtime (a_inode *a1, int now)
...
@@ -3686,7 +3695,7 @@ static void updatedirtime (a_inode *a1, int now)
if
(
stat
(
a1
->
nname
,
&
statbuf
)
==
-
1
)
if
(
stat
(
a1
->
nname
,
&
statbuf
)
==
-
1
)
return
;
return
;
get_time
(
statbuf
.
st_mtime
,
&
days
,
&
mins
,
&
ticks
);
get_time
(
statbuf
.
st_mtime
,
&
days
,
&
mins
,
&
ticks
);
ut
.
actime
=
ut
.
modtime
=
put_time
(
days
,
mins
,
ticks
);
ut
.
actime
=
ut
.
modtime
=
put_time
(
days
,
mins
,
ticks
);
utime
(
a1
->
parent
->
nname
,
&
ut
);
utime
(
a1
->
parent
->
nname
,
&
ut
);
}
else
{
}
else
{
utime
(
a1
->
parent
->
nname
,
NULL
);
utime
(
a1
->
parent
->
nname
,
NULL
);
...
@@ -3695,7 +3704,7 @@ static void updatedirtime (a_inode *a1, int now)
...
@@ -3695,7 +3704,7 @@ static void updatedirtime (a_inode *a1, int now)
}
}
static
void
static
void
action_end
(
Unit
*
unit
,
dpacket
packet
)
action_end
(
Unit
*
unit
,
dpacket
packet
)
{
{
Key
*
k
;
Key
*
k
;
TRACE
((
"ACTION_END(0x%lx)
\n
"
,
GET_PCK_ARG1
(
packet
)));
TRACE
((
"ACTION_END(0x%lx)
\n
"
,
GET_PCK_ARG1
(
packet
)));
...
@@ -3755,11 +3764,12 @@ static void
...
@@ -3755,11 +3764,12 @@ static void
PUT_PCK_RES2
(
packet
,
0
);
PUT_PCK_RES2
(
packet
,
0
);
}
else
if
(
actual
<
0
)
{
}
else
if
(
actual
<
0
)
{
PUT_PCK_RES1
(
packet
,
0
);
PUT_PCK_RES1
(
packet
,
0
);
PUT_PCK_RES2
(
packet
,
dos_errno
());
PUT_PCK_RES2
(
packet
,
dos_errno
());
}
else
{
}
else
{
PUT_PCK_RES1
(
packet
,
actual
);
PUT_PCK_RES1
(
packet
,
actual
);
k
->
file_pos
+=
actual
;
k
->
file_pos
+=
actual
;
}
}
flush_dcache
(
addr
,
size
);
}
else
{
}
else
{
uae_u8
*
buf
;
uae_u8
*
buf
;
off_t
old
,
filesize
;
off_t
old
,
filesize
;
...
@@ -3783,7 +3793,7 @@ static void
...
@@ -3783,7 +3793,7 @@ static void
if
(
actual
<
0
)
{
if
(
actual
<
0
)
{
PUT_PCK_RES1
(
packet
,
0
);
PUT_PCK_RES1
(
packet
,
0
);
PUT_PCK_RES2
(
packet
,
dos_errno
());
PUT_PCK_RES2
(
packet
,
dos_errno
());
}
else
{
}
else
{
int
i
;
int
i
;
PUT_PCK_RES1
(
packet
,
actual
);
PUT_PCK_RES1
(
packet
,
actual
);
...
@@ -3797,7 +3807,7 @@ static void
...
@@ -3797,7 +3807,7 @@ static void
}
}
static
void
static
void
action_write
(
Unit
*
unit
,
dpacket
packet
)
action_write
(
Unit
*
unit
,
dpacket
packet
)
{
{
Key
*
k
=
lookup_key
(
unit
,
GET_PCK_ARG1
(
packet
));
Key
*
k
=
lookup_key
(
unit
,
GET_PCK_ARG1
(
packet
));
uaecptr
addr
=
GET_PCK_ARG2
(
packet
);
uaecptr
addr
=
GET_PCK_ARG2
(
packet
);
...
@@ -3815,7 +3825,7 @@ action_write (Unit *unit, dpacket packet)
...
@@ -3815,7 +3825,7 @@ action_write (Unit *unit, dpacket packet)
gui_flicker_led
(
LED_HD
,
unit
->
unit
,
2
);
gui_flicker_led
(
LED_HD
,
unit
->
unit
,
2
);
TRACE
((
"ACTION_WRITE(%s,0x%lx,%ld)
\n
"
,
k
->
aino
->
nname
,
addr
,
size
));
TRACE
((
"ACTION_WRITE(%s,0x%lx,%ld)
\n
"
,
k
->
aino
->
nname
,
addr
,
size
));
if
(
unit
->
ui
.
readonly
)
{
if
(
unit
->
ui
.
readonly
||
unit
->
ui
.
locked
)
{
PUT_PCK_RES1
(
packet
,
DOS_FALSE
);
PUT_PCK_RES1
(
packet
,
DOS_FALSE
);
PUT_PCK_RES2
(
packet
,
ERROR_DISK_WRITE_PROTECTED
);
PUT_PCK_RES2
(
packet
,
ERROR_DISK_WRITE_PROTECTED
);
return
;
return
;
...
@@ -3854,13 +3864,13 @@ action_write (Unit *unit, dpacket packet)
...
@@ -3854,13 +3864,13 @@ action_write (Unit *unit, dpacket packet)
}
}
static
void
static
void
action_seek
(
Unit
*
unit
,
dpacket
packet
)
action_seek
(
Unit
*
unit
,
dpacket
packet
)
{
{
Key
*
k
=
lookup_key
(
unit
,
GET_PCK_ARG1
(
packet
));
Key
*
k
=
lookup_key
(
unit
,
GET_PCK_ARG1
(
packet
));
long
pos
=
(
uae_s32
)
GET_PCK_ARG2
(
packet
);
long
pos
=
(
uae_s32
)
GET_PCK_ARG2
(
packet
);
long
mode
=
(
uae_s32
)
GET_PCK_ARG3
(
packet
);
long
mode
=
(
uae_s32
)
GET_PCK_ARG3
(
packet
);
off_t
res
;
uae_s64
res
;
long
old
;
uae_s64
old
;
int
whence
=
SEEK_CUR
;
int
whence
=
SEEK_CUR
;
if
(
k
==
0
)
{
if
(
k
==
0
)
{
...
@@ -3879,8 +3889,8 @@ action_seek (Unit *unit, dpacket packet)
...
@@ -3879,8 +3889,8 @@ action_seek (Unit *unit, dpacket packet)
old
=
fs_lseek
(
k
->
fd
,
0
,
SEEK_CUR
);
old
=
fs_lseek
(
k
->
fd
,
0
,
SEEK_CUR
);
{
{
uae_s
32
temppos
;
uae_s
64
temppos
;
long
filesize
=
fs_lseek64
(
k
->
fd
,
0
,
SEEK_END
);
uae_s64
filesize
=
fs_lseek64
(
k
->
fd
,
0
,
SEEK_END
);
fs_lseek
(
k
->
fd
,
old
,
SEEK_SET
);
fs_lseek
(
k
->
fd
,
old
,
SEEK_SET
);
if
(
whence
==
SEEK_CUR
)
if
(
whence
==
SEEK_CUR
)
...
@@ -3891,7 +3901,7 @@ action_seek (Unit *unit, dpacket packet)
...
@@ -3891,7 +3901,7 @@ action_seek (Unit *unit, dpacket packet)
temppos
=
filesize
+
pos
;
temppos
=
filesize
+
pos
;
if
(
filesize
<
temppos
)
{
if
(
filesize
<
temppos
)
{
res
=
-
1
;
res
=
-
1
;
PUT_PCK_RES1
(
packet
,
res
);
PUT_PCK_RES1
(
packet
,
res
);
PUT_PCK_RES2
(
packet
,
ERROR_SEEK_ERROR
);
PUT_PCK_RES2
(
packet
,
ERROR_SEEK_ERROR
);
return
;
return
;
}
}
...
@@ -3910,7 +3920,7 @@ action_seek (Unit *unit, dpacket packet)
...
@@ -3910,7 +3920,7 @@ action_seek (Unit *unit, dpacket packet)
}
}
static
void
static
void
action_set_protect
(
Unit
*
unit
,
dpacket
packet
)
action_set_protect
(
Unit
*
unit
,
dpacket
packet
)
{
{
uaecptr
lock
=
GET_PCK_ARG2
(
packet
)
<<
2
;
uaecptr
lock
=
GET_PCK_ARG2
(
packet
)
<<
2
;
uaecptr
name
=
GET_PCK_ARG3
(
packet
)
<<
2
;
uaecptr
name
=
GET_PCK_ARG3
(
packet
)
<<
2
;
...
@@ -3920,7 +3930,7 @@ action_set_protect (Unit *unit, dpacket packet)
...
@@ -3920,7 +3930,7 @@ action_set_protect (Unit *unit, dpacket packet)
TRACE
((
"ACTION_SET_PROTECT(0x%lx,
\"
%s
\"
,0x%lx)
\n
"
,
lock
,
bstr
(
unit
,
name
),
mask
));
TRACE
((
"ACTION_SET_PROTECT(0x%lx,
\"
%s
\"
,0x%lx)
\n
"
,
lock
,
bstr
(
unit
,
name
),
mask
));
if
(
unit
->
ui
.
readonly
)
{
if
(
unit
->
ui
.
readonly
||
unit
->
ui
.
locked
)
{
PUT_PCK_RES1
(
packet
,
DOS_FALSE
);
PUT_PCK_RES1
(
packet
,
DOS_FALSE
);
PUT_PCK_RES2
(
packet
,
ERROR_DISK_WRITE_PROTECTED
);
PUT_PCK_RES2
(
packet
,
ERROR_DISK_WRITE_PROTECTED
);
return
;
return
;
...
@@ -3952,11 +3962,11 @@ static void action_set_comment (Unit * unit, dpacket packet)
...
@@ -3952,11 +3962,11 @@ static void action_set_comment (Unit * unit, dpacket packet)
uaecptr
lock
=
GET_PCK_ARG2
(
packet
)
<<
2
;
uaecptr
lock
=
GET_PCK_ARG2
(
packet
)
<<
2
;
uaecptr
name
=
GET_PCK_ARG3
(
packet
)
<<
2
;
uaecptr
name
=
GET_PCK_ARG3
(
packet
)
<<
2
;
uaecptr
comment
=
GET_PCK_ARG4
(
packet
)
<<
2
;
uaecptr
comment
=
GET_PCK_ARG4
(
packet
)
<<
2
;
char
*
commented
=
NULL
;
TCHAR
*
commented
=
NULL
;
a_inode
*
a
;
a_inode
*
a
;
int
err
;
int
err
;
if
(
unit
->
ui
.
readonly
)
{
if
(
unit
->
ui
.
readonly
||
unit
->
ui
.
locked
)
{
PUT_PCK_RES1
(
packet
,
DOS_FALSE
);
PUT_PCK_RES1
(
packet
,
DOS_FALSE
);
PUT_PCK_RES2
(
packet
,
ERROR_DISK_WRITE_PROTECTED
);
PUT_PCK_RES2
(
packet
,
ERROR_DISK_WRITE_PROTECTED
);
return
;
return
;
...
@@ -3971,7 +3981,7 @@ static void action_set_comment (Unit * unit, dpacket packet)
...
@@ -3971,7 +3981,7 @@ static void action_set_comment (Unit * unit, dpacket packet)
}
}
if
(
_tcslen
(
commented
)
>
0
)
{
if
(
_tcslen
(
commented
)
>
0
)
{
TCHAR
*
p
=
commented
;
TCHAR
*
p
=
commented
;
commented
=
xmalloc
(
char
,
81
);
commented
=
xmalloc
(
TCHAR
,
81
);
_tcsncpy
(
commented
,
p
,
80
);
_tcsncpy
(
commented
,
p
,
80
);
commented
[
80
]
=
0
;
commented
[
80
]
=
0
;
}
else
{
}
else
{
...
@@ -3985,7 +3995,7 @@ static void action_set_comment (Unit * unit, dpacket packet)
...
@@ -3985,7 +3995,7 @@ static void action_set_comment (Unit * unit, dpacket packet)
PUT_PCK_RES1
(
packet
,
DOS_FALSE
);
PUT_PCK_RES1
(
packet
,
DOS_FALSE
);
PUT_PCK_RES2
(
packet
,
err
);
PUT_PCK_RES2
(
packet
,
err
);
maybe_free_and_out:
maybe_free_and_out:
if
(
commented
)
if
(
commented
)
xfree
(
commented
);
xfree
(
commented
);
return
;
return
;
...
@@ -4005,7 +4015,7 @@ static void action_set_comment (Unit * unit, dpacket packet)
...
@@ -4005,7 +4015,7 @@ static void action_set_comment (Unit * unit, dpacket packet)
}
}
static
void
static
void
action_same_lock
(
Unit
*
unit
,
dpacket
packet
)
action_same_lock
(
Unit
*
unit
,
dpacket
packet
)
{
{
uaecptr
lock1
=
GET_PCK_ARG1
(
packet
)
<<
2
;
uaecptr
lock1
=
GET_PCK_ARG1
(
packet
)
<<
2
;
uaecptr
lock2
=
GET_PCK_ARG2
(
packet
)
<<
2
;
uaecptr
lock2
=
GET_PCK_ARG2
(
packet
)
<<
2
;
...
@@ -4021,7 +4031,7 @@ action_same_lock (Unit *unit, dpacket packet)
...
@@ -4021,7 +4031,7 @@ action_same_lock (Unit *unit, dpacket packet)
}
}
static
void
static
void
action_change_mode
(
Unit
*
unit
,
dpacket
packet
)
action_change_mode
(
Unit
*
unit
,
dpacket
packet
)
{
{
#define CHANGE_LOCK 0
#define CHANGE_LOCK 0
#define CHANGE_FH 1
#define CHANGE_FH 1
...
@@ -4084,7 +4094,7 @@ action_change_mode (Unit *unit, dpacket packet)
...
@@ -4084,7 +4094,7 @@ action_change_mode (Unit *unit, dpacket packet)
}
}
static
void
static
void
action_parent_common
(
Unit
*
unit
,
dpacket
packet
,
unsigned
long
uniq
)
action_parent_common
(
Unit
*
unit
,
dpacket
packet
,
unsigned
long
uniq
)
{
{
a_inode
*
olda
=
lookup_aino
(
unit
,
uniq
);
a_inode
*
olda
=
lookup_aino
(
unit
,
uniq
);
if
(
olda
==
0
)
{
if
(
olda
==
0
)
{
...
@@ -4109,7 +4119,7 @@ action_parent_common (Unit *unit, dpacket packet, unsigned long uniq)
...
@@ -4109,7 +4119,7 @@ action_parent_common (Unit *unit, dpacket packet, unsigned long uniq)
}
}
static
void
static
void
action_parent_fh
(
Unit
*
unit
,
dpacket
packet
)
action_parent_fh
(
Unit
*
unit
,
dpacket
packet
)
{
{
Key
*
k
=
lookup_key
(
unit
,
GET_PCK_ARG1
(
packet
));
Key
*
k
=
lookup_key
(
unit
,
GET_PCK_ARG1
(
packet
));
if
(
!
k
)
{
if
(
!
k
)
{
...
@@ -4121,7 +4131,7 @@ action_parent_fh (Unit *unit, dpacket packet)
...
@@ -4121,7 +4131,7 @@ action_parent_fh (Unit *unit, dpacket packet)
}
}
static
void
static
void
action_parent
(
Unit
*
unit
,
dpacket
packet
)
action_parent
(
Unit
*
unit
,
dpacket
packet
)
{
{
uaecptr
lock
=
GET_PCK_ARG1
(
packet
)
<<
2
;
uaecptr
lock
=
GET_PCK_ARG1
(
packet
)
<<
2
;
...
@@ -4137,7 +4147,7 @@ action_parent (Unit *unit, dpacket packet)
...
@@ -4137,7 +4147,7 @@ action_parent (Unit *unit, dpacket packet)
}
}
static
void
static
void
action_create_dir
(
Unit
*
unit
,
dpacket
packet
)
action_create_dir
(
Unit
*
unit
,
dpacket
packet
)
{
{
uaecptr
lock
=
GET_PCK_ARG1
(
packet
)
<<
2
;
uaecptr
lock
=
GET_PCK_ARG1
(
packet
)
<<
2
;
uaecptr
name
=
GET_PCK_ARG2
(
packet
)
<<
2
;
uaecptr
name
=
GET_PCK_ARG2
(
packet
)
<<
2
;
...
@@ -4146,7 +4156,7 @@ action_create_dir (Unit *unit, dpacket packet)
...
@@ -4146,7 +4156,7 @@ action_create_dir (Unit *unit, dpacket packet)
TRACE
((
"ACTION_CREATE_DIR(0x%lx,
\"
%s
\"
)
\n
"
,
lock
,
bstr
(
unit
,
name
)));
TRACE
((
"ACTION_CREATE_DIR(0x%lx,
\"
%s
\"
)
\n
"
,
lock
,
bstr
(
unit
,
name
)));
if
(
unit
->
ui
.
readonly
)
{
if
(
unit
->
ui
.
readonly
||
unit
->
ui
.
locked
)
{
PUT_PCK_RES1
(
packet
,
DOS_FALSE
);
PUT_PCK_RES1
(
packet
,
DOS_FALSE
);
PUT_PCK_RES2
(
packet
,
ERROR_DISK_WRITE_PROTECTED
);
PUT_PCK_RES2
(
packet
,
ERROR_DISK_WRITE_PROTECTED
);
return
;
return
;
...
@@ -4174,7 +4184,7 @@ action_create_dir (Unit *unit, dpacket packet)
...
@@ -4174,7 +4184,7 @@ action_create_dir (Unit *unit, dpacket packet)
if
(
mkdir
(
aino
->
nname
,
0777
)
==
-
1
)
{
if
(
mkdir
(
aino
->
nname
,
0777
)
==
-
1
)
{
PUT_PCK_RES1
(
packet
,
DOS_FALSE
);
PUT_PCK_RES1
(
packet
,
DOS_FALSE
);
PUT_PCK_RES2
(
packet
,
dos_errno
());
PUT_PCK_RES2
(
packet
,
dos_errno
());
return
;
return
;
}
}
aino
->
shlock
=
1
;
aino
->
shlock
=
1
;
...
@@ -4187,7 +4197,7 @@ action_create_dir (Unit *unit, dpacket packet)
...
@@ -4187,7 +4197,7 @@ action_create_dir (Unit *unit, dpacket packet)
}
}
static
void
static
void
action_examine_fh
(
Unit
*
unit
,
dpacket
packet
)
action_examine_fh
(
Unit
*
unit
,
dpacket
packet
)
{
{
Key
*
k
;
Key
*
k
;
a_inode
*
aino
=
0
;
a_inode
*
aino
=
0
;
...
@@ -4214,7 +4224,7 @@ action_examine_fh (Unit *unit, dpacket packet)
...
@@ -4214,7 +4224,7 @@ action_examine_fh (Unit *unit, dpacket packet)
* This implementation tries to mimic the behaviour of the Kick 3.1 ramdisk
* This implementation tries to mimic the behaviour of the Kick 3.1 ramdisk
* (which seems to match the Autodoc description). */
* (which seems to match the Autodoc description). */
static
void
static
void
action_set_file_size
(
Unit
*
unit
,
dpacket
packet
)
action_set_file_size
(
Unit
*
unit
,
dpacket
packet
)
{
{
Key
*
k
,
*
k1
;
Key
*
k
,
*
k1
;
off_t
offset
=
GET_PCK_ARG2
(
packet
);
off_t
offset
=
GET_PCK_ARG2
(
packet
);
...
@@ -4283,14 +4293,14 @@ static int relock_do(Unit *unit, a_inode *a1)
...
@@ -4283,14 +4293,14 @@ static int relock_do(Unit *unit, a_inode *a1)
return
wehavekeys
;
return
wehavekeys
;
}
}
static
void
relock_re
(
Unit
*
unit
,
a_inode
*
a1
,
a_inode
*
a2
,
int
failed
)
static
void
relock_re
(
Unit
*
unit
,
a_inode
*
a1
,
a_inode
*
a2
,
int
failed
)
{
{
Key
*
k1
,
*
knext
;
Key
*
k1
,
*
knext
;
for
(
k1
=
unit
->
keys
;
k1
;
k1
=
knext
)
{
for
(
k1
=
unit
->
keys
;
k1
;
k1
=
knext
)
{
knext
=
k1
->
next
;
knext
=
k1
->
next
;
if
(
k1
->
aino
==
a1
&&
k1
->
fd
)
{
if
(
k1
->
aino
==
a1
&&
k1
->
fd
)
{
char
mode
=
(
k1
->
dosmode
&
A_FIBF_READ
)
==
0
?
"wb"
:
(
k1
->
dosmode
&
A_FIBF_WRITE
)
==
0
?
"rb"
:
"r+b"
;
char
*
mode
=
(
k1
->
dosmode
&
A_FIBF_READ
)
==
0
?
"wb"
:
(
k1
->
dosmode
&
A_FIBF_WRITE
)
==
0
?
"rb"
:
"r+b"
;
//mode |= O_BINARY;
//mode |= O_BINARY;
if
(
failed
)
{
if
(
failed
)
{
/* rename still failed, restore fd */
/* rename still failed, restore fd */
...
@@ -4317,7 +4327,7 @@ static void relock_re(Unit *unit, a_inode *a1, a_inode *a2, int failed)
...
@@ -4317,7 +4327,7 @@ static void relock_re(Unit *unit, a_inode *a1, a_inode *a2, int failed)
}
}
static
void
static
void
action_delete_object
(
Unit
*
unit
,
dpacket
packet
)
action_delete_object
(
Unit
*
unit
,
dpacket
packet
)
{
{
uaecptr
lock
=
GET_PCK_ARG1
(
packet
)
<<
2
;
uaecptr
lock
=
GET_PCK_ARG1
(
packet
)
<<
2
;
uaecptr
name
=
GET_PCK_ARG2
(
packet
)
<<
2
;
uaecptr
name
=
GET_PCK_ARG2
(
packet
)
<<
2
;
...
@@ -4326,7 +4336,7 @@ action_delete_object (Unit *unit, dpacket packet)
...
@@ -4326,7 +4336,7 @@ action_delete_object (Unit *unit, dpacket packet)
TRACE
((
"ACTION_DELETE_OBJECT(0x%lx,
\"
%s
\"
)
\n
"
,
lock
,
bstr
(
unit
,
name
)));
TRACE
((
"ACTION_DELETE_OBJECT(0x%lx,
\"
%s
\"
)
\n
"
,
lock
,
bstr
(
unit
,
name
)));
if
(
unit
->
ui
.
readonly
)
{
if
(
unit
->
ui
.
readonly
||
unit
->
ui
.
locked
)
{
PUT_PCK_RES1
(
packet
,
DOS_FALSE
);
PUT_PCK_RES1
(
packet
,
DOS_FALSE
);
PUT_PCK_RES2
(
packet
,
ERROR_DISK_WRITE_PROTECTED
);
PUT_PCK_RES2
(
packet
,
ERROR_DISK_WRITE_PROTECTED
);
return
;
return
;
...
@@ -4354,13 +4364,13 @@ action_delete_object (Unit *unit, dpacket packet)
...
@@ -4354,13 +4364,13 @@ action_delete_object (Unit *unit, dpacket packet)
fsdb_dir_writeback
(
a
);
fsdb_dir_writeback
(
a
);
if
(
my_rmdir
(
a
->
nname
)
==
-
1
)
{
if
(
my_rmdir
(
a
->
nname
)
==
-
1
)
{
PUT_PCK_RES1
(
packet
,
DOS_FALSE
);
PUT_PCK_RES1
(
packet
,
DOS_FALSE
);
PUT_PCK_RES2
(
packet
,
dos_errno
());
PUT_PCK_RES2
(
packet
,
dos_errno
());
return
;
return
;
}
}
}
else
{
}
else
{
if
(
my_unlink
(
a
->
nname
)
==
-
1
)
{
if
(
my_unlink
(
a
->
nname
)
==
-
1
)
{
PUT_PCK_RES1
(
packet
,
DOS_FALSE
);
PUT_PCK_RES1
(
packet
,
DOS_FALSE
);
PUT_PCK_RES2
(
packet
,
dos_errno
());
PUT_PCK_RES2
(
packet
,
dos_errno
());
return
;
return
;
}
}
}
}
...
@@ -4377,7 +4387,7 @@ action_delete_object (Unit *unit, dpacket packet)
...
@@ -4377,7 +4387,7 @@ action_delete_object (Unit *unit, dpacket packet)
}
}
static
void
static
void
action_set_date
(
Unit
*
unit
,
dpacket
packet
)
action_set_date
(
Unit
*
unit
,
dpacket
packet
)
{
{
uaecptr
lock
=
GET_PCK_ARG2
(
packet
)
<<
2
;
uaecptr
lock
=
GET_PCK_ARG2
(
packet
)
<<
2
;
uaecptr
name
=
GET_PCK_ARG3
(
packet
)
<<
2
;
uaecptr
name
=
GET_PCK_ARG3
(
packet
)
<<
2
;
...
@@ -4388,7 +4398,7 @@ action_set_date (Unit *unit, dpacket packet)
...
@@ -4388,7 +4398,7 @@ action_set_date (Unit *unit, dpacket packet)
TRACE
((
"ACTION_SET_DATE(0x%lx,
\"
%s
\"
)
\n
"
,
lock
,
bstr
(
unit
,
name
)));
TRACE
((
"ACTION_SET_DATE(0x%lx,
\"
%s
\"
)
\n
"
,
lock
,
bstr
(
unit
,
name
)));
if
(
unit
->
ui
.
readonly
)
{
if
(
unit
->
ui
.
readonly
||
unit
->
ui
.
locked
)
{
PUT_PCK_RES1
(
packet
,
DOS_FALSE
);
PUT_PCK_RES1
(
packet
,
DOS_FALSE
);
PUT_PCK_RES2
(
packet
,
ERROR_DISK_WRITE_PROTECTED
);
PUT_PCK_RES2
(
packet
,
ERROR_DISK_WRITE_PROTECTED
);
return
;
return
;
...
@@ -4414,7 +4424,7 @@ action_set_date (Unit *unit, dpacket packet)
...
@@ -4414,7 +4424,7 @@ action_set_date (Unit *unit, dpacket packet)
}
}
static
void
static
void
action_rename_object
(
Unit
*
unit
,
dpacket
packet
)
action_rename_object
(
Unit
*
unit
,
dpacket
packet
)
{
{
uaecptr
lock1
=
GET_PCK_ARG1
(
packet
)
<<
2
;
uaecptr
lock1
=
GET_PCK_ARG1
(
packet
)
<<
2
;
uaecptr
name1
=
GET_PCK_ARG2
(
packet
)
<<
2
;
uaecptr
name1
=
GET_PCK_ARG2
(
packet
)
<<
2
;
...
@@ -4428,7 +4438,7 @@ action_rename_object (Unit *unit, dpacket packet)
...
@@ -4428,7 +4438,7 @@ action_rename_object (Unit *unit, dpacket packet)
TRACE
((
"ACTION_RENAME_OBJECT(0x%lx,
\"
%s
\"
,"
,
lock1
,
bstr
(
unit
,
name1
)));
TRACE
((
"ACTION_RENAME_OBJECT(0x%lx,
\"
%s
\"
,"
,
lock1
,
bstr
(
unit
,
name1
)));
TRACE
((
"0x%lx,
\"
%s
\"
)
\n
"
,
lock2
,
bstr
(
unit
,
name2
)));
TRACE
((
"0x%lx,
\"
%s
\"
)
\n
"
,
lock2
,
bstr
(
unit
,
name2
)));
if
(
unit
->
ui
.
readonly
)
{
if
(
unit
->
ui
.
readonly
||
unit
->
ui
.
locked
)
{
PUT_PCK_RES1
(
packet
,
DOS_FALSE
);
PUT_PCK_RES1
(
packet
,
DOS_FALSE
);
PUT_PCK_RES2
(
packet
,
ERROR_DISK_WRITE_PROTECTED
);
PUT_PCK_RES2
(
packet
,
ERROR_DISK_WRITE_PROTECTED
);
return
;
return
;
...
@@ -4535,7 +4545,7 @@ static void
...
@@ -4535,7 +4545,7 @@ static void
TRACE
((
"ACTION_RENAME_DISK(
\"
%s
\"
)
\n
"
,
bstr
(
unit
,
name
)));
TRACE
((
"ACTION_RENAME_DISK(
\"
%s
\"
)
\n
"
,
bstr
(
unit
,
name
)));
if
(
unit
->
ui
.
readonly
)
{
if
(
unit
->
ui
.
readonly
||
unit
->
ui
.
locked
)
{
PUT_PCK_RES1
(
packet
,
DOS_FALSE
);
PUT_PCK_RES1
(
packet
,
DOS_FALSE
);
PUT_PCK_RES2
(
packet
,
ERROR_DISK_WRITE_PROTECTED
);
PUT_PCK_RES2
(
packet
,
ERROR_DISK_WRITE_PROTECTED
);
return
;
return
;
...
@@ -4578,7 +4588,7 @@ static void
...
@@ -4578,7 +4588,7 @@ static void
{
{
PUT_PCK_RES1
(
packet
,
DOS_TRUE
);
PUT_PCK_RES1
(
packet
,
DOS_TRUE
);
flush_cache
(
unit
,
0
);
flush_cache
(
unit
,
0
);
unit
->
inhibited
=
GET_PCK_ARG1
(
packet
);
unit
->
inhibited
=
GET_PCK_ARG1
(
packet
)
!=
0
;
TRACE
((
"ACTION_INHIBIT(%d:%d)
\n
"
,
unit
->
unit
,
unit
->
inhibited
));
TRACE
((
"ACTION_INHIBIT(%d:%d)
\n
"
,
unit
->
unit
,
unit
->
inhibited
));
}
}
...
@@ -4588,14 +4598,14 @@ static void
...
@@ -4588,14 +4598,14 @@ static void
TRACE
((
"ACTION_WRITE_PROTECT()
\n
"
));
TRACE
((
"ACTION_WRITE_PROTECT()
\n
"
));
PUT_PCK_RES1
(
packet
,
DOS_TRUE
);
PUT_PCK_RES1
(
packet
,
DOS_TRUE
);
if
(
GET_PCK_ARG1
(
packet
))
{
if
(
GET_PCK_ARG1
(
packet
))
{
if
(
!
(
unit
->
ui
.
readonly
&
2
)
)
{
if
(
!
unit
->
ui
.
locked
)
{
unit
->
ui
.
readonly
|=
2
;
unit
->
ui
.
locked
=
true
;
unit
->
lockkey
=
GET_PCK_ARG2
(
packet
);
unit
->
lockkey
=
GET_PCK_ARG2
(
packet
);
}
}
}
else
{
}
else
{
if
(
unit
->
ui
.
readonly
&
2
)
{
if
(
unit
->
ui
.
locked
)
{
if
(
unit
->
lockkey
==
GET_PCK_ARG2
(
packet
)
||
unit
->
lockkey
==
0
)
{
if
(
unit
->
lockkey
==
GET_PCK_ARG2
(
packet
)
||
unit
->
lockkey
==
0
)
{
unit
->
ui
.
readonly
&=
~
2
;
unit
->
ui
.
locked
=
false
;
}
else
{
}
else
{
PUT_PCK_RES1
(
packet
,
DOS_FALSE
);
PUT_PCK_RES1
(
packet
,
DOS_FALSE
);
PUT_PCK_RES2
(
packet
,
0
);
PUT_PCK_RES2
(
packet
,
0
);
...
@@ -4756,7 +4766,7 @@ static void action_get_file_size64 (Unit *unit, dpacket packet)
...
@@ -4756,7 +4766,7 @@ static void action_get_file_size64 (Unit *unit, dpacket packet)
}
}
/* We don't want multiple interrupts to be active at the same time. I don't
/* We don't want multiple interrupts to be active at the same time. I don't
* know whether AmigaOS takes care of that, but this does. */
* know whether AmigaOS takes care of that, but this does. */
static
uae_sem_t
singlethread_int_sem
;
static
uae_sem_t
singlethread_int_sem
;
static
uae_u32
REGPARAM2
exter_int_helper
(
TrapContext
*
context
)
static
uae_u32
REGPARAM2
exter_int_helper
(
TrapContext
*
context
)
...
@@ -4992,19 +5002,19 @@ static void *filesys_thread (void *unit_v)
...
@@ -4992,19 +5002,19 @@ static void *filesys_thread (void *unit_v)
uae_set_thread_priority
(
2
);
uae_set_thread_priority
(
2
);
for
(;;)
{
for
(;;)
{
uae_u8
*
pck
;
dpacket
pck
;
uae_u8
*
msg
;
uaecptr
msg
;
uae_u32
morelocks
;
uae_u32
morelocks
;
pck
=
(
uae_u8
*
)
read_comm_pipe_pvoid
_blocking
(
ui
->
unit_pipe
);
pck
=
read_comm_pipe_u32
_blocking
(
ui
->
unit_pipe
);
msg
=
(
uae_u8
*
)
read_comm_pipe_pvoid
_blocking
(
ui
->
unit_pipe
);
msg
=
read_comm_pipe_u32
_blocking
(
ui
->
unit_pipe
);
morelocks
=
(
uae_u32
)
read_comm_pipe_int_blocking
(
ui
->
unit_pipe
);
morelocks
=
(
uae_u32
)
read_comm_pipe_int_blocking
(
ui
->
unit_pipe
);
if
(
ui
->
reset_state
==
FS_GO_DOWN
)
{
if
(
ui
->
reset_state
==
FS_GO_DOWN
)
{
if
(
pck
!=
0
)
if
(
pck
!=
0
)
continue
;
continue
;
/* Death message received. */
/* Death message received. */
uae_sem_post
((
uae_sem_t
*
)
&
ui
->
reset_sync_sem
);
uae_sem_post
(
&
ui
->
reset_sync_sem
);
/* Die. */
/* Die. */
return
0
;
return
0
;
}
}
...
@@ -5016,13 +5026,13 @@ static void *filesys_thread (void *unit_v)
...
@@ -5016,13 +5026,13 @@ static void *filesys_thread (void *unit_v)
PUT_PCK_RES2
(
pck
,
ERROR_ACTION_NOT_KNOWN
);
PUT_PCK_RES2
(
pck
,
ERROR_ACTION_NOT_KNOWN
);
}
}
/* Mark the packet as processed for the list scan in the assembly code. */
/* Mark the packet as processed for the list scan in the assembly code. */
do_put_mem_long
((
uae_u32
*
)(
msg
+
4
),
-
1
);
put_long
(
msg
+
4
,
0xffffffff
);
/* Acquire the message lock, so that we know we can safely send the
/* Acquire the message lock, so that we know we can safely send the
* message. */
* message. */
ui
->
self
->
cmds_sent
++
;
ui
->
self
->
cmds_sent
++
;
/* The message is sent by our interrupt handler, so make sure an interrupt
/* The message is sent by our interrupt handler, so make sure an interrupt
* happens. */
* happens. */
do_uae_int_requested
();
do_uae_int_requested
();
/* Send back the locks. */
/* Send back the locks. */
if
(
get_long
(
ui
->
self
->
locklist
)
!=
0
)
if
(
get_long
(
ui
->
self
->
locklist
)
!=
0
)
write_comm_pipe_int
(
ui
->
back_pipe
,
(
int
)(
get_long
(
ui
->
self
->
locklist
)),
0
);
write_comm_pipe_int
(
ui
->
back_pipe
,
(
int
)(
get_long
(
ui
->
self
->
locklist
)),
0
);
...
@@ -5039,16 +5049,12 @@ static uae_u32 REGPARAM2 filesys_handler (TrapContext *context)
...
@@ -5039,16 +5049,12 @@ static uae_u32 REGPARAM2 filesys_handler (TrapContext *context)
Unit
*
unit
=
find_unit
(
m68k_areg
(
regs
,
5
));
Unit
*
unit
=
find_unit
(
m68k_areg
(
regs
,
5
));
uaecptr
packet_addr
=
m68k_dreg
(
regs
,
3
);
uaecptr
packet_addr
=
m68k_dreg
(
regs
,
3
);
uaecptr
message_addr
=
m68k_areg
(
regs
,
4
);
uaecptr
message_addr
=
m68k_areg
(
regs
,
4
);
uae_u8
*
pck
;
uae_u8
*
msg
;
if
(
!
valid_address
(
packet_addr
,
36
)
||
!
valid_address
(
message_addr
,
14
))
{
if
(
!
valid_address
(
packet_addr
,
36
)
||
!
valid_address
(
message_addr
,
14
))
{
write_log
(
"FILESYS: Bad address %x/%x passed for packet.
\n
"
,
packet_addr
,
message_addr
);
write_log
(
"FILESYS: Bad address %x/%x passed for packet.
\n
"
,
packet_addr
,
message_addr
);
goto
error2
;
goto
error2
;
}
}
pck
=
get_real_address
(
packet_addr
);
msg
=
get_real_address
(
message_addr
);
do_put_mem_long
((
uae_u32
*
)(
msg
+
4
),
-
1
);
put_long
(
message_addr
+
4
,
0xffffffff
);
if
(
!
unit
||
!
unit
->
volume
)
{
if
(
!
unit
||
!
unit
->
volume
)
{
write_log
(
"FILESYS: was not initialized.
\n
"
);
write_log
(
"FILESYS: was not initialized.
\n
"
);
goto
error
;
goto
error
;
...
@@ -5064,23 +5070,23 @@ static uae_u32 REGPARAM2 filesys_handler (TrapContext *context)
...
@@ -5064,23 +5070,23 @@ static uae_u32 REGPARAM2 filesys_handler (TrapContext *context)
put_long
(
get_long
(
morelocks
),
0
);
put_long
(
get_long
(
morelocks
),
0
);
/* The packet wasn't processed yet. */
/* The packet wasn't processed yet. */
do_put_mem_long
((
uae_u32
*
)(
msg
+
4
)
,
0
);
put_long
(
message_addr
+
4
,
0
);
write_comm_pipe_pvoid
(
unit
->
ui
.
unit_pipe
,
(
void
*
)
pck
,
0
);
write_comm_pipe_u32
(
unit
->
ui
.
unit_pipe
,
packet_addr
,
0
);
write_comm_pipe_pvoid
(
unit
->
ui
.
unit_pipe
,
(
void
*
)
msg
,
0
);
write_comm_pipe_u32
(
unit
->
ui
.
unit_pipe
,
message_addr
,
0
);
write_comm_pipe_int
(
unit
->
ui
.
unit_pipe
,
(
int
)
morelocks
,
1
);
write_comm_pipe_int
(
unit
->
ui
.
unit_pipe
,
(
int
)
morelocks
,
1
);
/* Don't reply yet. */
/* Don't reply yet. */
return
1
;
return
1
;
}
}
#endif
#endif
if
(
!
handle_packet
(
unit
,
pck
))
{
if
(
!
handle_packet
(
unit
,
packet_addr
))
{
error:
error:
PUT_PCK_RES1
(
pck
,
DOS_FALSE
);
PUT_PCK_RES1
(
packet_addr
,
DOS_FALSE
);
PUT_PCK_RES2
(
pck
,
ERROR_ACTION_NOT_KNOWN
);
PUT_PCK_RES2
(
packet_addr
,
ERROR_ACTION_NOT_KNOWN
);
}
}
TRACE
((
"reply: %8lx, %ld
\n
"
,
GET_PCK_RES1
(
pck
),
GET_PCK_RES2
(
pck
)));
TRACE
((
"reply: %8lx, %ld
\n
"
,
GET_PCK_RES1
(
pck
),
GET_PCK_RES2
(
pck
)));
error2:
error2:
return
0
;
return
0
;
}
}
...
@@ -5242,7 +5248,7 @@ static uae_u32 REGPARAM2 filesys_diagentry (TrapContext *context)
...
@@ -5242,7 +5248,7 @@ static uae_u32 REGPARAM2 filesys_diagentry (TrapContext *context)
resaddr
=
bsdlib_startup
(
resaddr
);
resaddr
=
bsdlib_startup
(
resaddr
);
#endif
#endif
#ifdef SCSIEMU
#ifdef SCSIEMU
resaddr
=
scsidev_startup
(
resaddr
);
resaddr
=
scsidev_startup
(
resaddr
);
#endif
#endif
#ifdef SANA2
#ifdef SANA2
resaddr
=
netdev_startup
(
resaddr
);
resaddr
=
netdev_startup
(
resaddr
);
...
@@ -5339,7 +5345,7 @@ static uae_u32 REGPARAM2 filesys_init_storeinfo (TrapContext *context)
...
@@ -5339,7 +5345,7 @@ static uae_u32 REGPARAM2 filesys_init_storeinfo (TrapContext *context)
}
}
/* Remember a pointer AmigaOS gave us so we can later use it to identify
/* Remember a pointer AmigaOS gave us so we can later use it to identify
* which unit a given startup message belongs to. */
* which unit a given startup message belongs to. */
static
uae_u32
REGPARAM2
filesys_dev_remember
(
TrapContext
*
context
)
static
uae_u32
REGPARAM2
filesys_dev_remember
(
TrapContext
*
context
)
{
{
int
no
=
m68k_dreg
(
regs
,
6
);
int
no
=
m68k_dreg
(
regs
,
6
);
...
@@ -5461,7 +5467,7 @@ static void dump_partinfo (const char *name, int num, uaecptr pp, int partblock)
...
@@ -5461,7 +5467,7 @@ static void dump_partinfo (const char *name, int num, uaecptr pp, int partblock)
static
int
rdb_mount
(
UnitInfo
*
uip
,
int
unit_no
,
unsigned
int
partnum
,
uaecptr
parmpacket
)
static
int
rdb_mount
(
UnitInfo
*
uip
,
int
unit_no
,
unsigned
int
partnum
,
uaecptr
parmpacket
)
{
{
unsigned
int
lastblock
=
63
,
blocksize
,
readblocksize
;
unsigned
int
lastblock
=
63
,
blocksize
,
readblocksize
;
int
driveinitblock
,
bad
block
;
int
badblock
,
driveinit
block
;
uae_u8
bufrdb
[
FILESYS_MAX_BLOCKSIZE
],
*
buf
=
0
;
uae_u8
bufrdb
[
FILESYS_MAX_BLOCKSIZE
],
*
buf
=
0
;
uae_u8
*
fsmem
=
0
;
uae_u8
*
fsmem
=
0
;
unsigned
int
rdblock
,
partblock
,
fileblock
,
i
;
unsigned
int
rdblock
,
partblock
,
fileblock
,
i
;
...
@@ -5806,26 +5812,37 @@ static uae_u32 REGPARAM2 filesys_dev_storeinfo (TrapContext *context)
...
@@ -5806,26 +5812,37 @@ static uae_u32 REGPARAM2 filesys_dev_storeinfo (TrapContext *context)
get_new_device
(
type
,
parmpacket
,
&
uip
[
unit_no
].
devname
,
&
uip
[
unit_no
].
devname_amiga
,
unit_no
);
get_new_device
(
type
,
parmpacket
,
&
uip
[
unit_no
].
devname
,
&
uip
[
unit_no
].
devname_amiga
,
unit_no
);
uip
[
unit_no
].
devno
=
unit_no
;
uip
[
unit_no
].
devno
=
unit_no
;
put_long
(
parmpacket
,
uip
[
unit_no
].
devname_amiga
);
put_long
(
parmpacket
,
uip
[
unit_no
].
devname_amiga
);
put_long
(
parmpacket
+
4
,
type
!=
FILESYS_VIRTUAL
?
ROM_hardfile_resname
:
fsdevname
);
put_long
(
parmpacket
+
8
,
uip
[
unit_no
].
devno
);
put_long
(
parmpacket
+
8
,
uip
[
unit_no
].
devno
);
put_long
(
parmpacket
+
12
,
0
);
/* Device flags */
put_long
(
parmpacket
+
12
,
0
);
/* Device flags */
put_long
(
parmpacket
+
16
,
16
);
/* Env. size */
put_long
(
parmpacket
+
16
,
16
);
/* Env. size */
put_long
(
parmpacket
+
20
,
uip
[
unit_no
].
hf
.
blocksize
>>
2
);
/* longwords per block */
put_long
(
parmpacket
+
24
,
0
);
/* unused */
put_long
(
parmpacket
+
24
,
0
);
/* unused */
put_long
(
parmpacket
+
28
,
uip
[
unit_no
].
hf
.
surfaces
);
/* heads */
put_long
(
parmpacket
+
32
,
1
);
/* sectors per block */
put_long
(
parmpacket
+
36
,
uip
[
unit_no
].
hf
.
secspertrack
);
/* sectors per track */
put_long
(
parmpacket
+
40
,
uip
[
unit_no
].
hf
.
reservedblocks
);
/* reserved blocks */
put_long
(
parmpacket
+
44
,
0
);
/* unused */
put_long
(
parmpacket
+
44
,
0
);
/* unused */
put_long
(
parmpacket
+
48
,
0
);
/* interleave */
put_long
(
parmpacket
+
48
,
0
);
/* interleave */
put_long
(
parmpacket
+
52
,
0
);
/* lowCyl */
put_long
(
parmpacket
+
56
,
uip
[
unit_no
].
hf
.
nrcyls
<=
0
?
0
:
uip
[
unit_no
].
hf
.
nrcyls
-
1
);
/* hiCyl */
put_long
(
parmpacket
+
60
,
50
);
/* Number of buffers */
put_long
(
parmpacket
+
60
,
50
);
/* Number of buffers */
put_long
(
parmpacket
+
64
,
0
);
/* Buffer mem type */
put_long
(
parmpacket
+
64
,
0
);
/* Buffer mem type */
put_long
(
parmpacket
+
68
,
0x7FFFFFFF
);
/* largest transfer */
put_long
(
parmpacket
+
68
,
0x7FFFFFFF
);
/* largest transfer */
put_long
(
parmpacket
+
72
,
~
1
);
/* addMask (?) */
put_long
(
parmpacket
+
72
,
~
1
);
/* addMask (?) */
put_long
(
parmpacket
+
76
,
uip
[
unit_no
].
bootpri
);
/* bootPri */
put_long
(
parmpacket
+
76
,
uip
[
unit_no
].
bootpri
);
/* bootPri */
put_long
(
parmpacket
+
80
,
0x444f5300
);
/* DOS\0 */
put_long
(
parmpacket
+
80
,
0x444f5300
);
/* DOS\0 */
if
(
type
==
FILESYS_VIRTUAL
)
{
put_long
(
parmpacket
+
4
,
fsdevname
);
put_long
(
parmpacket
+
20
,
1024
>>
2
);
/* longwords per block */
put_long
(
parmpacket
+
28
,
15
);
/* heads */
put_long
(
parmpacket
+
32
,
1
);
/* sectors per block */
put_long
(
parmpacket
+
36
,
127
);
/* sectors per track */
put_long
(
parmpacket
+
40
,
2
);
/* reserved blocks */
put_long
(
parmpacket
+
52
,
0
);
/* lowCyl */
put_long
(
parmpacket
+
56
,
1
);
/* hiCyl */
}
else
{
put_long
(
parmpacket
+
4
,
ROM_hardfile_resname
);
put_long
(
parmpacket
+
20
,
uip
[
unit_no
].
hf
.
blocksize
>>
2
);
/* longwords per block */
put_long
(
parmpacket
+
28
,
uip
[
unit_no
].
hf
.
surfaces
);
/* heads */
put_long
(
parmpacket
+
32
,
1
);
/* sectors per block */
put_long
(
parmpacket
+
36
,
uip
[
unit_no
].
hf
.
secspertrack
);
/* sectors per track */
put_long
(
parmpacket
+
40
,
uip
[
unit_no
].
hf
.
reservedblocks
);
/* reserved blocks */
put_long
(
parmpacket
+
52
,
0
);
/* lowCyl */
put_long
(
parmpacket
+
56
,
uip
[
unit_no
].
hf
.
nrcyls
<=
0
?
0
:
uip
[
unit_no
].
hf
.
nrcyls
-
1
);
/* hiCyl */
}
if
(
type
==
FILESYS_HARDFILE
)
if
(
type
==
FILESYS_HARDFILE
)
type
=
dofakefilesys
(
&
uip
[
unit_no
],
parmpacket
);
type
=
dofakefilesys
(
&
uip
[
unit_no
],
parmpacket
);
if
(
uip
[
unit_no
].
bootpri
<
-
127
)
if
(
uip
[
unit_no
].
bootpri
<
-
127
)
...
@@ -5885,7 +5902,7 @@ void filesys_install (void)
...
@@ -5885,7 +5902,7 @@ void filesys_install (void)
fsdevname
=
ds
(
"uae.device"
);
/* does not really exist */
fsdevname
=
ds
(
"uae.device"
);
/* does not really exist */
ROM_filesys_diagentry
=
here
();
ROM_filesys_diagentry
=
here
();
calltrap
(
deftrap2
(
filesys_diagentry
,
0
,
"filesys_diagentry"
));
calltrap
(
deftrap2
(
filesys_diagentry
,
0
,
"filesys_diagentry"
));
dw
(
0x4ED0
);
/* JMP (a0) - jump to code that inits Residents */
dw
(
0x4ED0
);
/* JMP (a0) - jump to code that inits Residents */
...
@@ -6546,7 +6563,8 @@ uae_u8 *restore_filesys (uae_u8 *src)
...
@@ -6546,7 +6563,8 @@ uae_u8 *restore_filesys (uae_u8 *src)
int
type
,
devno
;
int
type
,
devno
;
UnitInfo
*
ui
;
UnitInfo
*
ui
;
TCHAR
*
devname
=
0
,
*
volname
=
0
,
*
rootdir
=
0
,
*
filesysdir
=
0
;
TCHAR
*
devname
=
0
,
*
volname
=
0
,
*
rootdir
=
0
,
*
filesysdir
=
0
;
int
bootpri
,
readonly
;
int
bootpri
;
bool
readonly
;
if
(
restore_u32
()
!=
2
)
if
(
restore_u32
()
!=
2
)
return
src
;
return
src
;
...
@@ -6557,7 +6575,7 @@ uae_u8 *restore_filesys (uae_u8 *src)
...
@@ -6557,7 +6575,7 @@ uae_u8 *restore_filesys (uae_u8 *src)
volname
=
restore_string
();
volname
=
restore_string
();
filesysdir
=
restore_string
();
filesysdir
=
restore_string
();
bootpri
=
restore_u8
();
bootpri
=
restore_u8
();
readonly
=
restore_u8
();
readonly
=
restore_u8
()
!=
0
;
ui
=
&
mountinfo
.
ui
[
devno
];
ui
=
&
mountinfo
.
ui
[
devno
];
ui
->
startup
=
restore_u32
();
ui
->
startup
=
restore_u32
();
filesys_configdev
=
restore_u32
();
filesys_configdev
=
restore_u32
();
...
@@ -6568,7 +6586,7 @@ uae_u8 *restore_filesys (uae_u8 *src)
...
@@ -6568,7 +6586,7 @@ uae_u8 *restore_filesys (uae_u8 *src)
}
}
if
(
set_filesys_unit
(
devno
,
devname
,
volname
,
rootdir
,
readonly
,
if
(
set_filesys_unit
(
devno
,
devname
,
volname
,
rootdir
,
readonly
,
ui
->
hf
.
secspertrack
,
ui
->
hf
.
surfaces
,
ui
->
hf
.
reservedblocks
,
ui
->
hf
.
blocksize
,
ui
->
hf
.
secspertrack
,
ui
->
hf
.
surfaces
,
ui
->
hf
.
reservedblocks
,
ui
->
hf
.
blocksize
,
bootpri
,
0
,
1
,
filesysdir
[
0
]
?
filesysdir
:
NULL
,
0
,
0
)
<
0
)
{
bootpri
,
false
,
true
,
filesysdir
[
0
]
?
filesysdir
:
NULL
,
0
,
0
)
<
0
)
{
write_log
(
"filesys '%s' failed to restore
\n
"
,
rootdir
);
write_log
(
"filesys '%s' failed to restore
\n
"
,
rootdir
);
goto
end
;
goto
end
;
}
}
...
...
src/include/autoconf.h
View file @
89d2d049
...
@@ -47,8 +47,8 @@ extern uaecptr need_uae_boot_rom (void);
...
@@ -47,8 +47,8 @@ extern uaecptr need_uae_boot_rom (void);
struct
mountedinfo
struct
mountedinfo
{
{
uae_u64
size
;
uae_u64
size
;
int
ismounted
;
bool
ismounted
;
int
ismedia
;
bool
ismedia
;
int
nrcyls
;
int
nrcyls
;
};
};
...
@@ -59,7 +59,7 @@ struct mountedinfo
...
@@ -59,7 +59,7 @@ struct mountedinfo
extern
char
*
validatedevicename
(
char
*
s
);
extern
char
*
validatedevicename
(
char
*
s
);
extern
char
*
validatevolumename
(
char
*
s
);
extern
char
*
validatevolumename
(
char
*
s
);
int
filesys_insert
(
int
nr
,
char
*
volume
,
const
char
*
rootdir
,
int
readonly
,
int
flags
);
int
filesys_insert
(
int
nr
,
TCHAR
*
volume
,
const
TCHAR
*
rootdir
,
bool
readonly
,
int
flags
);
int
filesys_eject
(
int
nr
);
int
filesys_eject
(
int
nr
);
int
filesys_media_change
(
const
char
*
rootdir
,
int
inserted
,
struct
uaedev_config_info
*
uci
);
int
filesys_media_change
(
const
char
*
rootdir
,
int
inserted
,
struct
uaedev_config_info
*
uci
);
...
...
src/include/commpipe.h
View file @
89d2d049
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
typedef
union
{
typedef
union
{
int
i
;
int
i
;
uae_u32
u32
;
uae_u32
u32
;
const
void
*
pv
;
void
*
pv
;
}
uae_pt
;
}
uae_pt
;
/* These currently require the maximum size to be known at initialization
/* These currently require the maximum size to be known at initialization
...
@@ -128,7 +128,7 @@ STATIC_INLINE uae_u32 read_comm_pipe_u32_blocking (smp_comm_pipe *p)
...
@@ -128,7 +128,7 @@ STATIC_INLINE uae_u32 read_comm_pipe_u32_blocking (smp_comm_pipe *p)
return
foo
.
u32
;
return
foo
.
u32
;
}
}
STATIC_INLINE
const
void
*
read_comm_pipe_pvoid_blocking
(
smp_comm_pipe
*
p
)
STATIC_INLINE
void
*
read_comm_pipe_pvoid_blocking
(
smp_comm_pipe
*
p
)
{
{
uae_pt
foo
=
read_comm_pipe_pt_blocking
(
p
);
uae_pt
foo
=
read_comm_pipe_pt_blocking
(
p
);
return
foo
.
pv
;
return
foo
.
pv
;
...
@@ -148,7 +148,7 @@ STATIC_INLINE void write_comm_pipe_u32 (smp_comm_pipe *p, int data, int no_buffe
...
@@ -148,7 +148,7 @@ STATIC_INLINE void write_comm_pipe_u32 (smp_comm_pipe *p, int data, int no_buffe
write_comm_pipe_pt
(
p
,
foo
,
no_buffer
);
write_comm_pipe_pt
(
p
,
foo
,
no_buffer
);
}
}
STATIC_INLINE
void
write_comm_pipe_pvoid
(
smp_comm_pipe
*
p
,
const
void
*
data
,
int
no_buffer
)
STATIC_INLINE
void
write_comm_pipe_pvoid
(
smp_comm_pipe
*
p
,
void
*
data
,
int
no_buffer
)
{
{
uae_pt
foo
;
uae_pt
foo
;
foo
.
pv
=
data
;
foo
.
pv
=
data
;
...
...
src/include/uae_string.h
View file @
89d2d049
...
@@ -13,14 +13,14 @@
...
@@ -13,14 +13,14 @@
#define UAE_STRING_H
#define UAE_STRING_H
#ifdef HAVE_STRINGS_H
#ifdef HAVE_STRINGS_H
#
include <strings.h>
#include <strings.h>
#endif
#endif
#ifdef HAVE_STRING_H
#ifdef HAVE_STRING_H
#
include <string.h>
#include <string.h>
#endif
#endif
#ifdef HAVE_STRDUP
#ifdef HAVE_STRDUP
#
define my_strdup strdup
#define my_strdup strdup
#else
#else
extern
char
*
my_strdup
(
const
char
*
s
);
extern
char
*
my_strdup
(
const
char
*
s
);
#endif
#endif
...
...
src/misc.c
View file @
89d2d049
...
@@ -486,7 +486,7 @@ void setmouseactive (int active)
...
@@ -486,7 +486,7 @@ void setmouseactive (int active)
char
*
au_fs_copy
(
char
*
dst
,
int
maxlen
,
const
char
*
src
)
char
*
au_fs_copy
(
char
*
dst
,
int
maxlen
,
const
char
*
src
)
{
{
int
i
;
unsigned
int
i
;
for
(
i
=
0
;
src
[
i
]
&&
i
<
maxlen
-
1
;
i
++
)
for
(
i
=
0
;
src
[
i
]
&&
i
<
maxlen
-
1
;
i
++
)
dst
[
i
]
=
src
[
i
];
dst
[
i
]
=
src
[
i
];
...
...
src/tools/config.log
View file @
89d2d049
...
@@ -445,7 +445,7 @@ configure:4344: $? = 0
...
@@ -445,7 +445,7 @@ configure:4344: $? = 0
configure:4344: result: yes
configure:4344: result: yes
configure:4350: checking for _doprnt
configure:4350: checking for _doprnt
configure:4350: gcc -o conftest -g -O2 -Wall -W -Wno-unused conftest.c >&5
configure:4350: gcc -o conftest -g -O2 -Wall -W -Wno-unused conftest.c >&5
/tmp/cc
9SecbZ
.o: In function `main':
/tmp/cc
BiDfLi
.o: In function `main':
/home/gnostic/puaex/src/tools/conftest.c:67: undefined reference to `_doprnt'
/home/gnostic/puaex/src/tools/conftest.c:67: undefined reference to `_doprnt'
collect2: ld returned 1 exit status
collect2: ld returned 1 exit status
configure:4350: $? = 1
configure:4350: $? = 1
...
@@ -533,7 +533,7 @@ configure:4364: $? = 0
...
@@ -533,7 +533,7 @@ configure:4364: $? = 0
configure:4364: result: yes
configure:4364: result: yes
configure:4364: checking for strcmpi
configure:4364: checking for strcmpi
configure:4364: gcc -o conftest -g -O2 -Wall -W -Wno-unused conftest.c >&5
configure:4364: gcc -o conftest -g -O2 -Wall -W -Wno-unused conftest.c >&5
/tmp/cc
XI8Zie
.o: In function `main':
/tmp/cc
pI9QLu
.o: In function `main':
/home/gnostic/puaex/src/tools/conftest.c:69: undefined reference to `strcmpi'
/home/gnostic/puaex/src/tools/conftest.c:69: undefined reference to `strcmpi'
collect2: ld returned 1 exit status
collect2: ld returned 1 exit status
configure:4364: $? = 1
configure:4364: $? = 1
...
@@ -613,7 +613,7 @@ configure: failed program was:
...
@@ -613,7 +613,7 @@ configure: failed program was:
configure:4364: result: no
configure:4364: result: no
configure:4364: checking for stricmp
configure:4364: checking for stricmp
configure:4364: gcc -o conftest -g -O2 -Wall -W -Wno-unused conftest.c >&5
configure:4364: gcc -o conftest -g -O2 -Wall -W -Wno-unused conftest.c >&5
/tmp/cc
aQV0Wi
.o: In function `main':
/tmp/cc
94CjOB
.o: In function `main':
/home/gnostic/puaex/src/tools/conftest.c:69: undefined reference to `stricmp'
/home/gnostic/puaex/src/tools/conftest.c:69: undefined reference to `stricmp'
collect2: ld returned 1 exit status
collect2: ld returned 1 exit status
configure:4364: $? = 1
configure:4364: $? = 1
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment