1 |
.\" $Id: gxemul.1,v 1.76 2006/11/04 06:40:20 debug Exp $ |
.\" $Id: gxemul.1,v 1.89 2007/04/10 15:37:00 debug Exp $ |
2 |
.\" |
.\" |
3 |
.\" Copyright (C) 2004-2006 Anders Gavare. All rights reserved. |
.\" Copyright (C) 2004-2007 Anders Gavare. All rights reserved. |
4 |
.\" |
.\" |
5 |
.\" Redistribution and use in source and binary forms, with or without |
.\" Redistribution and use in source and binary forms, with or without |
6 |
.\" modification, are permitted provided that the following conditions are met: |
.\" modification, are permitted provided that the following conditions are met: |
29 |
.\" This is a minimal man page for GXemul. Process this file with |
.\" This is a minimal man page for GXemul. Process this file with |
30 |
.\" groff -man -Tascii gxemul.1 or nroff -man gxemul.1 |
.\" groff -man -Tascii gxemul.1 or nroff -man gxemul.1 |
31 |
.\" |
.\" |
32 |
.Dd NOVEMBER 2006 |
.Dd APRIL 2007 |
33 |
.Dt GXEMUL 1 |
.Dt GXEMUL 1 |
34 |
.Os |
.Os |
35 |
.Sh NAME |
.Sh NAME |
56 |
.Pp |
.Pp |
57 |
Processors (ARM, MIPS, PowerPC, SuperH) are emulated using dynamic translation. |
Processors (ARM, MIPS, PowerPC, SuperH) are emulated using dynamic translation. |
58 |
However, unlike some other dynamically translating emulators, GXemul does |
However, unlike some other dynamically translating emulators, GXemul does |
59 |
not currently generate native code, only a "runnable intermediate |
not need to generate native code, only a "runnable intermediate |
60 |
representation", and will thus run on any host architecture, without the |
representation", and will thus run on any host architecture, without the |
61 |
need to implement per-architecture backends. |
need to implement per-architecture backends. |
62 |
.Pp |
.Pp |
89 |
.Fl H |
.Fl H |
90 |
to get a list of available emulation modes. |
to get a list of available emulation modes. |
91 |
.Pp |
.Pp |
92 |
There are two exceptions to the normal invocation usage mentioned above. |
There are three exceptions to the normal invocation usage mentioned above. |
93 |
The first is for DECstation emulation: if you have a bootable |
.Pp |
94 |
DECstation harddisk or CDROM image, then just supplying the diskimage via |
1. For DECstation emulation, if you have a bootable DECstation harddisk or |
95 |
the |
CDROM image, then just supplying the diskimage via the |
96 |
.Fl d |
.Fl d |
97 |
option is sufficient. (The filename of the kernel can then be |
option is sufficient. The filename of the kernel can then be |
98 |
skipped, as the emulator runs the bootblocks from the diskimage directly and |
skipped, as the emulator runs the bootblocks from the diskimage directly and |
99 |
doesn't need the kernel as a separate file.) |
doesn't need the kernel as a separate file. |
100 |
The second is if you supply an ISO9660 CDROM disk image. You may then use |
.Pp |
101 |
the |
2. If you supply an ISO9660 CDROM disk image, then using the |
102 |
.Fl j |
.Fl j |
103 |
option to indicate which file on the CDROM filesystem that should be |
option to indicate a file on the CDROM filesystem to load is sufficient; |
104 |
loaded into emulated memory. |
no additional kernel filename needs to be supplied on the command line. |
105 |
|
.Pp |
106 |
|
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 |
.Pp |
112 |
Gzipped kernels are automatically unzipped, by calling the external gunzip |
Gzipped kernels are automatically unzipped, by calling the external gunzip |
113 |
program, both when specifying a gzipped file directly on the command line |
program, both when specifying a gzipped file directly on the command line |
164 |
(The number of cylinders is calculated automatically.) |
(The number of cylinders is calculated automatically.) |
165 |
.It i |
.It i |
166 |
IDE. (This is the default for most machine types.) |
IDE. (This is the default for most machine types.) |
167 |
|
.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 |
.It r |
.It r |
172 |
Read-only (don't allow changes to be written to the file). |
Read-only (don't allow changes to be written to the file). |
173 |
.It s |
.It s |
174 |
SCSI. |
SCSI. |
175 |
.It t |
.It t |
176 |
Tape. |
Tape. |
177 |
|
.It V |
178 |
|
Add an overlay filename to an already defined disk image. |
179 |
|
(A ID number must also be specified when this flag is used. See the |
180 |
|
documentation for an example of how to use overlays.) |
181 |
.It 0-7 |
.It 0-7 |
182 |
Force a specific ID number. |
Force a specific ID number. |
183 |
.El |
.El |
206 |
heads and cylinders are assumed to be 2 and 80, respectively, and the |
heads and cylinders are assumed to be 2 and 80, respectively, and the |
207 |
number of sectors per track is calculated automatically. (This works for |
number of sectors per track is calculated automatically. (This works for |
208 |
720KB, 1.2MB, 1.44MB, and 2.88MB floppies.) |
720KB, 1.2MB, 1.44MB, and 2.88MB floppies.) |
|
.It Fl G Ar port |
|
|
Pause at startup, and listen to TCP port |
|
|
.Ar port |
|
|
for incoming remote GDB connections. The emulator starts up in paused |
|
|
mode, and it is up to the remote GDB instance to start the session. |
|
209 |
.It Fl I Ar hz |
.It Fl I Ar hz |
210 |
Set the main CPUs frequency to |
Set the main CPUs frequency to |
211 |
.Ar hz |
.Ar hz |
313 |
Overwrite the file, instead of appending to it. |
Overwrite the file, instead of appending to it. |
314 |
.El |
.El |
315 |
.Pp |
.Pp |
316 |
.\" Statistics gathering can be enabled/disabled at runtime by using the |
Statistics gathering can be enabled/disabled at runtime by using the |
317 |
.\" "TODO" debugger command. |
"statistics_enabled = yes" and "statistics_enabled = no" debugger |
318 |
.\" .Pp |
commands. |
319 |
|
.Pp |
320 |
When gathering instruction statistics using the |
When gathering instruction statistics using the |
321 |
.Fl s |
.Fl s |
322 |
option, instruction combinations are always disabled (i.e. |
option, instruction combinations and native code generation |
323 |
an implicit |
are always disabled (i.e. implicit |
324 |
.Fl J |
.Fl J |
325 |
is added to the command line). |
and |
326 |
|
.Fl B |
327 |
|
flags are added to the command line). |
328 |
.Pp |
.Pp |
329 |
If a value is missing (e.g. the end-of-page slot does not really have a |
If a value is missing (e.g. the end-of-page slot does not really have a |
330 |
known physical address), it is written out as just a dash ("-"). |
known physical address), it is written out as just a dash ("-"). |
331 |
|
.It Fl T |
332 |
|
Halt if the emulated program attempts to access non-existing memory. |
333 |
.It Fl t |
.It Fl t |
334 |
Show a trace tree of all function calls being made. |
Show a trace tree of all function calls being made. |
335 |
.It Fl U |
.It Fl U |
384 |
.\" .Pp |
.\" .Pp |
385 |
General options: |
General options: |
386 |
.Bl -tag -width Ds |
.Bl -tag -width Ds |
387 |
|
.It Fl b |
388 |
|
Enable native code generation at runtime. This is not really implemented |
389 |
|
yet. Don't use it unless you know what you are doing. It will most |
390 |
|
likely not work. |
391 |
|
.It Fl B |
392 |
|
Disable native code generation at runtime. (This is the default in |
393 |
|
GXemul 0.4.4; there are no implemented native code generation backends.) |
394 |
.It Fl c Ar cmd |
.It Fl c Ar cmd |
395 |
Add |
Add |
396 |
.Ar cmd |
.Ar cmd |
414 |
yet.) |
yet.) |
415 |
.It Fl h |
.It Fl h |
416 |
Display a list of all available command line options. |
Display a list of all available command line options. |
417 |
|
.It Fl k Ar n |
418 |
|
Set the size of the dyntrans cache (per emulated CPU) to |
419 |
|
.Ar n |
420 |
|
MB. The default size is 32 MB. |
421 |
.It Fl K |
.It Fl K |
422 |
Force the single-step debugger to be entered at the end of a simulation. |
Force the single-step debugger to be entered at the end of a simulation. |
423 |
.It Fl q |
.It Fl q |
494 |
Userland (syscall-only) emulation, i.e. running a userland binary directly |
Userland (syscall-only) emulation, i.e. running a userland binary directly |
495 |
without simulating an entire machine, doesn't really work yet. |
without simulating an entire machine, doesn't really work yet. |
496 |
.Pp |
.Pp |
|
The documentation sometimes only reflects the way things worked with |
|
|
the old MIPS emulation mode (prior to 0.4.0), and it is incorrect when |
|
|
applied to current releases. |
|
|
.Pp |
|
497 |
.Nm |
.Nm |
498 |
is in general not cycle-accurate; it does not simulate individual |
is in general not cycle-accurate; it does not simulate individual |
499 |
pipe-line stages or penalties caused by branch-prediction misses or |
pipe-line stages or penalties caused by branch-prediction misses or |
503 |
.Nm |
.Nm |
504 |
is in general not timing-accurate. Some emulation modes |
is in general not timing-accurate. Some emulation modes |
505 |
(DECstation, CATS, NetWinder, MobilePro (hpcmips), Malta (evbmips), |
(DECstation, CATS, NetWinder, MobilePro (hpcmips), Malta (evbmips), |
506 |
Cobalt, Algor, and Dreamcast) try to make the guest |
Cobalt, Algor, Dreamcast, PICA-61, and IQ80321) try to make the guest |
507 |
operating system's clock run at the same speed as the host clock. |
operating system's clock run at the same speed as the host clock. |
508 |
However, the number of instructions executed per clock tick can |
However, the number of instructions executed per clock tick can |
509 |
obviously vary, depending on the current CPU load on the host. |
obviously vary, depending on the current CPU load on the host. |
510 |
.Sh AUTHOR |
.Sh AUTHOR |
511 |
GXemul is Copyright (C) 2003-2006 Anders Gavare <anders@gavare.se> |
GXemul is Copyright (C) 2003-2007 Anders Gavare <anders@gavare.se> |
512 |
.Pp |
.Pp |
513 |
See http://gavare.se/gxemul/ for more information. For other Copyright |
See http://gavare.se/gxemul/ for more information. For other Copyright |
514 |
messages, see the corresponding parts of the source code and/or |
messages, see the corresponding parts of the source code and/or |