/[gxemul]/trunk/man/gxemul.1
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Annotation of /trunk/man/gxemul.1

Parent Directory Parent Directory | Revision Log Revision Log


Revision 34 - (hide annotations)
Mon Oct 8 16:21:17 2007 UTC (16 years, 6 months ago) by dpavlin
File size: 18953 byte(s)
++ trunk/HISTORY	(local)
$Id: HISTORY,v 1.1480 2007/02/19 01:34:42 debug Exp $
20061029	Changing usleep(1) calls in the debugger to usleep(10000)
20061107	Adding a new disk image option (-d o...) which sets the ISO9660
		filesystem base offset; also making some other hacks to allow
		NetBSD/dreamcast and homebrew demos/games to boot directly
		from a filesystem image.
		Moving Dreamcast-specific stuff in the documentation to its
		own page (dreamcast.html).
		Adding a border to the Dreamcast PVR framebuffer.
20061108	Adding a -T command line option (again?), for halting the
		emulator on unimplemented memory accesses.
20061109	Continuing on various SH4 and Dreamcast related things.
		The emulator should now halt on more unimplemented device
		accesses, instead of just printing a warning, forcing me to
		actually implement missing stuff :)
20061111	Continuing on SH4 and Dreamcast stuff.
		Adding a bogus Landisk (SH4) machine mode.
20061112	Implementing some parts of the Dreamcast GDROM device. With
		some ugly hacks, NetBSD can (barely) mount an ISO image.
20061113	NetBSD/dreamcast now starts booting from the Live CD image,
		but crashes randomly quite early on in the boot process.
20061122	Beginning on a skeleton interrupt.h and interrupt.c for the
		new interrupt subsystem.
20061124	Continuing on the new interrupt system; taking the first steps
		to attempt to connect CPUs (SuperH and MIPS) and devices
		(dev_cons and SH4 timer interrupts) to it. Many things will
		probably break from now on.
20061125	Converting dev_ns16550, dev_8253 to the new interrupt system.
		Attempting to begin to convert the ISA bus.
20061130	Incorporating a patch from Brian Foley for the configure
		script, which checks for X11 libs in /usr/X11R6/lib64 (which
		is used on some Linux systems).
20061227	Adding a note in the man page about booting from Dreamcast
		CDROM images (i.e. that no external kernel is needed).
20061229	Continuing on the interrupt system rewrite: beginning to
		convert more devices, adding abort() calls for legacy interrupt
		system calls so that everything now _has_ to be rewritten!
		Almost all machine modes are now completely broken.
20061230	More progress on removing old interrupt code, mostly related
		to the ISA bus + devices, the LCA bus (on AlphaBook1), and
		the Footbridge bus (for CATS). And some minor PCI stuff.
		Connecting the ARM cpu to the new interrupt system.
		The CATS, NetWinder, and QEMU_MIPS machine modes now work with
		the new interrupt system :)
20061231	Connecting PowerPC CPUs to the new interrupt system.
		Making PReP machines (IBM 6050) work again.
		Beginning to convert the GT PCI controller (for e.g. Malta
		and Cobalt emulation). Some things work, but not everything.
		Updating Copyright notices for 2007.
20070101	Converting dev_kn02 from legacy style to devinit; the 3max
		machine mode now works with the new interrupt system :-]
20070105	Beginning to convert the SGI O2 machine to the new interrupt
		system; finally converting O2 (IP32) devices to devinit, etc.
20070106	Continuing on the interrupt system redesign/rewrite; KN01
		(PMAX), KN230, and Dreamcast ASIC interrupts should work again,
		moving out stuff from machine.h and devices.h into the
		corresponding devices, beginning the rewrite of i80321
		interrupts, etc.
20070107	Beginning on the rewrite of Eagle interrupt stuff (PReP, etc).
20070117	Beginning the rewrite of Algor (V3) interrupts (finally
		changing dev_v3 into devinit style).
20070118	Removing the "bus" registry concept from machine.h, because
		it was practically meaningless.
		Continuing on the rewrite of Algor V3 ISA interrupts.
20070121	More work on Algor interrupts; they are now working again,
		well enough to run NetBSD/algor. :-)
20070122	Converting VR41xx (HPCmips) interrupts. NetBSD/hpcmips
		can be installed using the new interrupt system :-)
20070123	Making the testmips mode work with the new interrupt system.
20070127	Beginning to convert DEC5800 devices to devinit, and to the
		new interrupt system.
		Converting Playstation 2 devices to devinit, and converting
		the interrupt system. Also fixing a severe bug: the interrupt
		mask register on Playstation 2 is bitwise _toggled_ on writes.
20070128	Removing the dummy NetGear machine mode and the 8250 device
		(which was only used by the NetGear machine).
		Beginning to convert the MacPPC GC (Grand Central) interrupt
		controller to the new interrupt system.
		Converting Jazz interrupts (PICA61 etc.) to the new interrupt
		system. NetBSD/arc can be installed again :-)
		Fixing the JAZZ timer (hardcoding it at 100 Hz, works with
		NetBSD and it is better than a completely dummy timer as it
		was before).
		Converting dev_mp to the new interrupt system, although I
		haven't had time to actually test it yet.
		Completely removing src/machines/interrupts.c, cpu_interrupt
		and cpu_interrupt_ack in src/cpu.c, and
		src/include/machine_interrupts.h! Adding fatal error messages
		+ abort() in the few places that are left to fix.
		Converting dev_z8530 to the new interrupt system.
		FINALLY removing the md_int struct completely from the
		machine struct.
		SH4 fixes (adding a PADDR invalidation in the ITLB replacement
		code in memory_sh.c); the NetBSD/dreamcast LiveCD now runs
		all the way to the login prompt, and can be interacted with :-)
		Converting the CPC700 controller (PCI and interrupt controller
		for PM/PPC) to the new interrupt system.
20070129	Fixing MACE ISA interrupts (SGI IP32 emulation). Both NetBSD/
		sgimips' and OpenBSD/sgi's ramdisk kernels can now be
		interacted with again.
20070130	Moving out the MIPS multi_lw and _sw instruction combinations
		so that they are auto-generated at compile time instead.
20070131	Adding detection of amd64/x86_64 hosts in the configure script,
		for doing initial experiments (again :-) with native code
		generation.
		Adding a -k command line option to set the size of the dyntrans
		cache, and a -B command line option to disable native code
		generation, even if GXemul was compiled with support for
		native code generation for the specific host CPU architecture.
20070201	Experimenting with a skeleton for native code generation.
		Changing the default behaviour, so that native code generation
		is now disabled by default, and has to be enabled by using
		-b on the command line.
20070202	Continuing the native code generation experiments.
		Making PCI interrupts work for Footbridge again.
20070203	More native code generation experiments.
		Removing most of the native code generation experimental code,
		it does not make sense to include any quick hacks like this.
		Minor cleanup/removal of some more legacy MIPS interrupt code.
20070204	Making i80321 interrupts work again (for NetBSD/evbarm etc.),
		and fixing the timer at 100 Hz.
20070206	Experimenting with removing the wdc interrupt slowness hack.
20070207	Lowering the number of dyntrans TLB entries for MIPS from
		192 to 128, resulting in a minor speed improvement.
		Minor optimization to the code invalidation routine in
		cpu_dyntrans.c.
20070208	Increasing (experimentally) the nr of dyntrans instructions per
		loop from 60 to 120.
20070210	Commenting out (experimentally) the dyntrans_device_danger
		detection in memory_rw.c.
		Changing the testmips and baremips machines to use a revision 2
		MIPS64 CPU by default, instead of revision 1.
		Removing the dummy i960, IA64, x86, AVR32, and HP PA-RISC
		files, the PC bios emulation, and the Olivetti M700 (ARC) and
		db64360 emulation modes.
20070211	Adding an "mp" demo to the demos directory, which tests the
		SMP functionality of the testmips machine.
		Fixing PReP interrupts some more. NetBSD/prep now boots again.
20070216	Adding a "nop workaround" for booting Mach/PMAX to the
		documentation; thanks to Artur Bujdoso for the values.
		Converting more of the MacPPC interrupt stuff to the new
		system.
		Beginning to convert BeBox interrupts to the new system.
		PPC603e should NOT have the PPC_NO_DEC flag! Removing it.
		Correcting BeBox clock speed (it was set to 100 in the NetBSD
		bootinfo block, but should be 33000000/4), allowing NetBSD
		to start without using the (incorrect) PPC_NO_DEC hack.
20070217	Implementing (slow) AltiVec vector loads and stores, allowing
		NetBSD/macppc to finally boot using the GENERIC kernel :-)
		Updating the documentation with install instructions for
		NetBSD/macppc.
20070218-19	Regression testing for the release.

==============  RELEASE 0.4.4  ==============


1 dpavlin 34 .\" $Id: gxemul.1,v 1.85 2007/02/05 16:49:21 debug Exp $
2 dpavlin 2 .\"
3 dpavlin 34 .\" Copyright (C) 2004-2007 Anders Gavare. All rights reserved.
4 dpavlin 2 .\"
5     .\" Redistribution and use in source and binary forms, with or without
6     .\" modification, are permitted provided that the following conditions are met:
7     .\"
8     .\" 1. Redistributions of source code must retain the above copyright
9     .\" notice, this list of conditions and the following disclaimer.
10     .\" 2. Redistributions in binary form must reproduce the above copyright
11     .\" notice, this list of conditions and the following disclaimer in the
12     .\" documentation and/or other materials provided with the distribution.
13     .\" 3. The name of the author may not be used to endorse or promote products
14     .\" derived from this software without specific prior written permission.
15     .\"
16     .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
17     .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18     .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19     .\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
20     .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21     .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22     .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23     .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24     .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25     .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26     .\" SUCH DAMAGE.
27     .\"
28     .\"
29     .\" This is a minimal man page for GXemul. Process this file with
30     .\" groff -man -Tascii gxemul.1 or nroff -man gxemul.1
31     .\"
32 dpavlin 34 .Dd FEBRUARY 2007
33 dpavlin 2 .Dt GXEMUL 1
34     .Os
35     .Sh NAME
36     .Nm gxemul
37     .Nd an experimental machine emulator
38     .Sh SYNOPSIS
39     .Nm
40     .Op machine, other, and general options
41     .Op file Ar ...
42     .Nm
43     .Op general options
44 dpavlin 14 .Ar @configfile
45 dpavlin 24 .\" TODO: Reenable this once userland emulation works:
46     .\" .Nm
47     .\" .Op userland, other, and general options
48     .\" .Ar file Op Ar args ...
49 dpavlin 2 .Sh DESCRIPTION
50     .Nm
51 dpavlin 14 is an experimental instruction-level machine emulator. Several
52     emulation modes are available. In some modes, processors and surrounding
53     hardware components are emulated well enough to let unmodified operating
54 dpavlin 20 systems (e.g. NetBSD) run inside the emulator as if they were running on a
55     real machine.
56 dpavlin 2 .Pp
57 dpavlin 32 Processors (ARM, MIPS, PowerPC, SuperH) are emulated using dynamic translation.
58 dpavlin 28 However, unlike some other dynamically translating emulators, GXemul does
59 dpavlin 34 not need to generate native code, only a "runnable intermediate
60 dpavlin 28 representation", and will thus run on any host architecture, without the
61     need to implement per-architecture backends.
62 dpavlin 12 .Pp
63 dpavlin 24 The emulator can be invoked in the following ways:
64 dpavlin 18 .Pp
65 dpavlin 14 1. When emulating a complete machine, configuration options can be entered
66     directly on the command line.
67     .Pp
68     2. Options can be read from a configuration file.
69 dpavlin 24 .\" .Pp
70     .\" 3. When emulating a userland environment (syscall-only emulation, not
71     .\" emulating complete machines), then the program name and its argument
72     .\" should be given on the command line. (This mode doesn't really work yet,
73     .\" and is disabled for stable release builds.)
74 dpavlin 14 .Pp
75 dpavlin 2 The easiest way to use the emulator is to supply settings directly on the
76     command line. The most important thing you need to supply is the
77 dpavlin 14 file argument. This is the name of a binary file (an ELF, a.out, COFF/ECOFF,
78 dpavlin 2 SREC, or a raw binary image) which you wish to run in the emulator. This file
79     might be an operating system kernel, or perhaps a ROM image file.
80     .Pp
81     If more than one filename is supplied, all files are loaded into memory,
82     and the entry point (if available) is taken from the last file.
83     .Pp
84     Apart from the name of a binary file, it is also necessary to select
85     which specific emulation mode to use. For example, a MIPS-based machine
86     from DEC (a DECstation) is very different from a MIPS-based machine
87     from SGI. Use
88     .Nm
89     .Fl H
90     to get a list of available emulation modes.
91     .Pp
92 dpavlin 34 There are three exceptions to the normal invocation usage mentioned above.
93     .Pp
94     1. For DECstation emulation, if you have a bootable DECstation harddisk or
95     CDROM image, then just supplying the diskimage via the
96 dpavlin 2 .Fl d
97 dpavlin 34 option is sufficient. The filename of the kernel can then be
98 dpavlin 2 skipped, as the emulator runs the bootblocks from the diskimage directly and
99 dpavlin 34 doesn't need the kernel as a separate file.
100     .Pp
101     2. If you supply an ISO9660 CDROM disk image, then using the
102 dpavlin 6 .Fl j
103 dpavlin 34 option to indicate a file on the CDROM filesystem to load is sufficient;
104     no additional kernel filename needs to be supplied on the command line.
105 dpavlin 2 .Pp
106 dpavlin 34 3. For Dreamcast emulation, when booting e.g. a NetBSD/dreamcast CDROM
107     image, it is enough to supply the disk image (with the correct ISO
108     partition start offset). Bootblocks will be read directly from the CDROM
109     image, and there is no need to supply the name of an external kernel on
110     the command line.
111     .Pp
112 dpavlin 28 Gzipped kernels are automatically unzipped, by calling the external gunzip
113     program, both when specifying a gzipped file directly on the command line
114     and when loading such a file using the
115     .Fl j
116     option.
117     .Pp
118 dpavlin 2 Machine selection options:
119     .Bl -tag -width Ds
120     .It Fl E Ar t
121     Try to emulate machine type
122     .Ar "t".
123 dpavlin 12 This option is not always needed, if the
124     .Fl e
125     option uniquely selects a machine.
126 dpavlin 2 (Use
127     .Fl H
128     to get a list of types.)
129     .It Fl e Ar st
130     Try to emulate machine subtype
131     .Ar "st".
132     Use this together with
133     .Fl E .
134     (This option is not always needed, if a machine type has no subtypes.)
135     .El
136     .Pp
137     Other options:
138     .Bl -tag -width Ds
139     .It Fl C Ar x
140     Try to emulate a specific CPU type,
141     .Ar "x".
142     This overrides the default CPU type for the machine being emulated.
143     (Use
144     .Fl H
145     to get a list of available CPU types.)
146 dpavlin 24 .It Fl d Ar [modifiers:]filename
147 dpavlin 2 Add
148 dpavlin 24 .Ar filename
149 dpavlin 2 as a disk image. By adding one or more modifier characters and then a
150     colon (":") as a prefix to
151 dpavlin 24 .Ar filename,
152 dpavlin 6 you can modify the way the disk image is treated. Available modifiers are:
153 dpavlin 2 .Bl -tag -width Ds
154     .It b
155     Specifies that this is a boot device.
156     .It c
157 dpavlin 4 CD-ROM.
158 dpavlin 2 .It d
159 dpavlin 4 DISK (this is the default).
160     .It f
161     FLOPPY.
162 dpavlin 6 .It gH;S;
163     Override the default geometry; use H heads and S sectors-per-track.
164     (The number of cylinders is calculated automatically.)
165 dpavlin 2 .It i
166 dpavlin 22 IDE. (This is the default for most machine types.)
167 dpavlin 34 .It oOFS;
168     Set the base offset for an ISO9660 filesystem on a disk image. The default
169     is 0. A suitable offset when booting from Dreamcast ISO9660 filesystem
170     images, which are offset by 11702 sectors, is 23965696.
171 dpavlin 2 .It r
172     Read-only (don't allow changes to be written to the file).
173 dpavlin 4 .It s
174 dpavlin 22 SCSI.
175 dpavlin 2 .It t
176 dpavlin 4 Tape.
177 dpavlin 2 .It 0-7
178 dpavlin 6 Force a specific ID number.
179 dpavlin 2 .El
180     .Pp
181 dpavlin 24 For SCSI devices, the ID number is the SCSI ID. For IDE harddisks, the ID
182     number has the following meaning:
183     .Bl -tag -width Ds
184     .It 0
185     Primary master.
186     .It 1
187     Primary slave.
188     .It 2
189     Secondary master.
190     .It 3
191     Secondary slave.
192     .El
193     .Pp
194 dpavlin 14 Unless otherwise specified, filenames ending with ".iso" or ".cdr" are
195     assumed to be CDROM images. Most others are assumed to be disks. Depending
196     on which machine is being emulated, the default for disks can be either
197     SCSI or IDE. Some disk images that are very small are assumed to be floppy
198     disks. (If you are not happy with the way a disk image is detected, then
199     you need to use explicit prefixes to force a specific type.)
200 dpavlin 6 .Pp
201     For floppies, the gH;S; prefix is ignored. Instead, the number of
202     heads and cylinders are assumed to be 2 and 80, respectively, and the
203     number of sectors per track is calculated automatically. (This works for
204     720KB, 1.2MB, 1.44MB, and 2.88MB floppies.)
205 dpavlin 24 .It Fl G Ar port
206     Pause at startup, and listen to TCP port
207     .Ar port
208     for incoming remote GDB connections. The emulator starts up in paused
209     mode, and it is up to the remote GDB instance to start the session.
210 dpavlin 32 .It Fl I Ar hz
211     Set the main CPUs frequency to
212     .Ar hz
213     Hz. This option does not work for all emulated machine modes. It affects
214     the way count/compare interrupts are faked to simulate emulated time =
215     real world time. If the guest operating system relies on RTC interrupts
216     instead of count/compare interrupts, then this option has no effect.
217     .Pp
218     Setting the frequency to zero disables automatic synchronization of
219     emulated time vs real world time, and the count/compare system runs at a
220     fixed rate.
221 dpavlin 2 .It Fl i
222 dpavlin 28 Enable instruction trace, i.e. display disassembly of each instruction as
223     it is being executed.
224 dpavlin 2 .It Fl J
225 dpavlin 28 Disable instruction combinations in the dynamic translator.
226 dpavlin 2 .It Fl j Ar n
227     Set the name of the kernel to
228     .Ar "n".
229 dpavlin 10 When booting from an ISO9660 filesystem, the emulator will try to boot
230     using this file. (In some emulation modes, eg. DECstation, this name is passed
231 dpavlin 6 along to the boot program. Useful names are "bsd" for OpenBSD/pmax,
232 dpavlin 24 "vmunix" for Ultrix, or "vmsprite" for Sprite.)
233 dpavlin 2 .It Fl M Ar m
234     Emulate
235     .Ar m
236     MBs of physical RAM. This overrides the default amount of RAM for the
237     selected machine type.
238     .It Fl N
239 dpavlin 24 Display the number of executed instructions per second on average, at
240     regular intervals.
241 dpavlin 2 .It Fl n Ar nr
242 dpavlin 24 Set the number of processors in the machine, for SMP experiments.
243     .Pp
244 dpavlin 28 Note 1: The emulator allocates quite a lot of virtual memory for
245     per-CPU translation tables. On 64-bit hosts, this is normally not a
246     problem. On 32-bit hosts, this can use up all available virtual userspace
247     memory. The solution is to either run the emulator on a 64-bit host,
248     or limit the number of emulated CPUs to a reasonably low number.
249 dpavlin 24 .Pp
250     Note 2: SMP simulation is not working very well yet; multiple processors
251     are simulated, but synchronization between the processors does not map
252     very well to how real-world SMP systems work.
253 dpavlin 2 .It Fl O
254     Force a "netboot" (tftp instead of disk), even when a disk image is
255     present (for DECstation, SGI, and ARC emulation).
256     .It Fl o Ar arg
257 dpavlin 16 Set the boot argument (mostly useful for DEC, ARC, or SGI emulation).
258 dpavlin 2 Default
259     .Ar arg
260 dpavlin 16 for DEC is "-a", for ARC/SGI it is "-aN", and for CATS it is "-A".
261 dpavlin 2 .It Fl p Ar pc
262 dpavlin 24 Add a breakpoint.
263     .Ar pc
264     can be a symbol, or a numeric value. (Remember to use the "0x" prefix for
265     hexadecimal values.)
266 dpavlin 2 .It Fl Q
267 dpavlin 28 Disable the built-in (software-only) PROM emulation. This option is useful
268     for experimenting with running raw ROM images from real machines. The default
269     behaviour of the emulator is to "fake" certain PROM calls used by guest
270     operating systems (e.g. NetBSD), so that no real PROM image is needed.
271 dpavlin 2 .It Fl R
272 dpavlin 28 Use a random bootstrap cpu, instead of CPU nr 0. (This option is only
273     meaningful together with the
274     .Fl n
275     option.)
276 dpavlin 2 .It Fl r
277     Dump register contents for every executed instruction.
278     .It Fl S
279 dpavlin 24 Initialize emulated RAM to random data, instead of zeroes. This option
280     is useful when trying to trigger bugs in a program that occur because the
281     program assumed that uninitialized memory contains zeros. (Use with
282     care.)
283 dpavlin 28 .It Fl s Ar flags:filename
284     Gather statistics based on the current emulated program counter value,
285     while the program executes. The statistics is actually just a raw dump of
286     all program counter values in sequence, suitable for post-analysis with
287     separate tools. Output is appended to
288     .Ar filename.
289     .Pp
290     The
291     .Ar flags
292     should include one or more of the following type specifiers:
293     .Bl -tag -width Ds
294     .It v
295     Virtual. This means that the program counter value is used.
296     .It p
297     Physical. This means that the physical address of where the program
298     is actually running is used.
299     .It i
300     Instruction call. This type of statistics gathering is practically only
301     useful during development of the emulator itself. The output is a list of
302     addresses of instruction call functions (ic->f), which after some
303     post-processing can be used as a basis for deciding when to implement
304     instruction combinations.
305     .El
306     .Pp
307     The
308     .Ar flags
309     may also include the following optional modifiers:
310     .Bl -tag -width Ds
311     .It d
312     Disabled at startup.
313     .It o
314     Overwrite the file, instead of appending to it.
315     .El
316     .Pp
317 dpavlin 34 Statistics gathering can be enabled/disabled at runtime by using the
318     "statistics_enabled = yes" and "statistics_enabled = no" debugger
319     commands.
320     .Pp
321 dpavlin 28 When gathering instruction statistics using the
322     .Fl s
323 dpavlin 34 option, instruction combinations and native code generation
324     are always disabled (i.e. implicit
325 dpavlin 28 .Fl J
326 dpavlin 34 and
327     .Fl B
328     flags are added to the command line).
329 dpavlin 28 .Pp
330     If a value is missing (e.g. the end-of-page slot does not really have a
331     known physical address), it is written out as just a dash ("-").
332 dpavlin 34 .It Fl T
333     Halt if the emulated program attempts to access non-existing memory.
334 dpavlin 2 .It Fl t
335     Show a trace tree of all function calls being made.
336     .It Fl U
337     Enable slow_serial_interrupts_hack_for_linux.
338     .It Fl X
339 dpavlin 22 Use X11. This option enables graphical framebuffers.
340 dpavlin 2 .It Fl x
341 dpavlin 22 Open up new xterms for emulated serial ports. The default behaviour is to
342     open up xterms when using configuration files, or if X11 is enabled. When
343     starting up a simple emulation session with settings directly on the
344     command line, and neither
345     .Fl X
346     nor
347     .Fl x
348     is used, then all output is confined to the terminal that
349     .Nm
350     started in.
351 dpavlin 2 .It Fl Y Ar n
352     Scale down framebuffer windows by
353     .Ar n
354     x
355     .Ar n
356 dpavlin 20 times. This option is useful when emulating a very large framebuffer, and
357     the actual display is of lower resolution. If
358     .Ar n
359     is negative, then there will be no scaledown, but emulation of certain
360     graphic controllers will be scaled up
361     by
362     .Ar -n
363     times instead. E.g. Using
364     .Ar -2
365     with VGA text mode emulation will result in 80x25 character cells rendered
366     in a 1280x800 window, instead of the normal resolution of 640x400.
367 dpavlin 2 .It Fl Z Ar n
368     Set the number of graphics cards, for emulating a dual-head or tripple-head
369     environment. (Only for DECstation emulation so far.)
370     .It Fl z Ar disp
371     Add
372     .Ar disp
373     as an X11 display to use for framebuffers.
374     .El
375     .Pp
376 dpavlin 24 .\" Userland options:
377     .\" .Bl -tag -width Ds
378     .\" .It Fl u Ar emul-mode
379     .\" Userland-only (syscall) emulation. (Use
380     .\" .Fl H
381     .\" to get a list of available emulation modes.) Some (but not all) of the
382     .\" options listed under Other options above can also be used with
383     .\" userland emulation.
384     .\" .El
385     .\" .Pp
386 dpavlin 2 General options:
387     .Bl -tag -width Ds
388 dpavlin 34 .It Fl b
389     Enable native code generation at runtime. This is not really implemented
390     yet. Don't use it unless you know what you are doing. It will most
391     likely not work.
392     .It Fl B
393     Disable native code generation at runtime. (This is the default in
394     GXemul 0.4.4; there are no implemented native code generation backends.)
395 dpavlin 22 .It Fl c Ar cmd
396     Add
397     .Ar cmd
398     as a command to run before starting the simulation. A similar effect can
399     be achieved by using the
400     .Fl V
401     option, and entering the commands manually.
402 dpavlin 2 .It Fl D
403 dpavlin 32 Causes the emulator to skip a call to srandom(). This leads to somewhat
404     more deterministic behaviour than running without this option.
405     However, if the emulated machine has clocks or timer interrupt sources,
406     or if user interaction is taking place (e.g. keyboard input at irregular
407     intervals), then this option is meaningless.
408 dpavlin 2 .It Fl H
409     Display a list of available CPU types, machine types, and userland
410     emulation modes. (Most of these don't work. Please read the documentation
411     included in the
412     .Nm
413 dpavlin 24 distribution for details on which modes that actually work. Userland
414     emulation is not included in stable release builds, since it doesn't work
415     yet.)
416 dpavlin 2 .It Fl h
417     Display a list of all available command line options.
418 dpavlin 34 .It Fl k Ar n
419     Set the size of the dyntrans cache (per emulated CPU) to
420     .Ar n
421     MB. The default size is 32 MB.
422 dpavlin 2 .It Fl K
423     Force the single-step debugger to be entered at the end of a simulation.
424     .It Fl q
425     Quiet mode; this suppresses startup messages.
426 dpavlin 24 .\".It Fl s
427     .\"For MIPS emulation: Show opcode usage statistics after the simulation.
428     .\"For non-MIPS emulation (i.e. using dyntrans): Save statistics to a file
429     .\"at regular intervals of which physical addresses that were executed.
430 dpavlin 2 .It Fl V
431     Start up in the single-step debugger, paused.
432     .It Fl v
433 dpavlin 22 Increase verbosity (show more debug messages). This option can be used
434     multiple times.
435 dpavlin 2 .El
436     .Pp
437     Configuration file startup:
438     .Bl -tag -width Ds
439     .It @ Ar configfile
440     Start an emulation based on the contents of
441     .Ar "configfile".
442     .El
443     .Pp
444     For more information, please read the documentation in the doc/
445     subdirectory of the
446     .Nm
447     distribution.
448     .Sh EXAMPLES
449     The following command will start NetBSD/pmax on an emulated DECstation
450 dpavlin 10 5000/200 (3MAX):
451 dpavlin 2 .Pp
452 dpavlin 12 .Dl "gxemul -e 3max -d nbsd_pmax.img"
453 dpavlin 2 .Pp
454 dpavlin 10 nbsd_pmax.img should be a raw disk image containing a bootable
455 dpavlin 2 NetBSD/pmax filesystem.
456     .Pp
457     The following command will start an emulation session based on settings in
458     the configuration file "mysession". The -v option tells gxemul to be
459     verbose.
460     .Pp
461     .Dl "gxemul -v @mysession"
462     .Pp
463     If you have compiled the small Hello World program mentioned in the
464     .Nm
465     documentation, the following command will start up an
466     emulated test machine in "paused" mode:
467     .Pp
468     .Dl "gxemul -E testmips -V hello_mips"
469     .Pp
470 dpavlin 24 Paused mode means that you enter the interactive single-step debugger
471     directly at startup, instead of launching the Hello World program.
472 dpavlin 2 .Pp
473 dpavlin 24 The paused mode is also what should be used when running "unknown" files
474     for the first time in the emulator. E.g. if you have a binary which you
475     think is some kind of MIPS ROM image, then you can try the following:
476     .Pp
477     .Dl "gxemul -vv -E baremips -V 0xbfc00000:image.raw"
478     .Pp
479     You can then use the single-stepping functionality of the built-in
480     debugger to run the code in the ROM image, to see how it behaves. Based on
481     that, you can deduce what machine type it was actually from (the
482     baremips machine is not a real machine), and perhaps try again with
483     another emulation mode.
484     .Pp
485     In general, however, real ROM images require much more emulation detail
486     than GXemul provides, so they can usually not run.
487     .Pp
488 dpavlin 2 Please read the documentation for more details.
489     .Sh BUGS
490 dpavlin 24 There are many bugs. Some of the known bugs are mentioned in the TODO
491 dpavlin 2 file in the
492     .Nm
493 dpavlin 24 source distribution, some are marked as TODO in the source code itself.
494 dpavlin 2 .Pp
495 dpavlin 32 Userland (syscall-only) emulation, i.e. running a userland binary directly
496     without simulating an entire machine, doesn't really work yet.
497 dpavlin 12 .Pp
498 dpavlin 24 The documentation sometimes only reflects the way things worked with
499     the old MIPS emulation mode (prior to 0.4.0), and it is incorrect when
500     applied to current releases.
501 dpavlin 16 .Pp
502 dpavlin 2 .Nm
503 dpavlin 22 is in general not cycle-accurate; it does not simulate individual
504     pipe-line stages or penalties caused by branch-prediction misses or
505     cache misses, so it cannot be used for accurate simulation of any actual
506     real-world processor.
507 dpavlin 6 .Pp
508     .Nm
509 dpavlin 32 is in general not timing-accurate. Some emulation modes
510     (DECstation, CATS, NetWinder, MobilePro (hpcmips), Malta (evbmips),
511 dpavlin 34 Cobalt, Algor, Dreamcast, PICA-61, and IQ80321) try to make the guest
512 dpavlin 32 operating system's clock run at the same speed as the host clock.
513     However, the number of instructions executed per clock tick can
514     obviously vary, depending on the current CPU load on the host.
515 dpavlin 2 .Sh AUTHOR
516 dpavlin 34 GXemul is Copyright (C) 2003-2007 Anders Gavare <anders@gavare.se>
517 dpavlin 2 .Pp
518 dpavlin 22 See http://gavare.se/gxemul/ for more information. For other Copyright
519     messages, see the corresponding parts of the source code and/or
520     documentation.

  ViewVC Help
Powered by ViewVC 1.1.26