


 Interface Reference
------------------------------------------------------------------------

This is not intended to be an exhaustive list, although it comes
pretty close. It originated as a means to track key combinations
that were already in use. The biggest area of deficiency is the
special input handling for subwindows that I don't use much.

Key combinations marked as "alternate" typically aren't listed
in the menus and are more likely to be replaced or removed
in the future if need be. "Pseudo combinations" mean that the
qualifier key is unnecessary and ignored, but the combination
is still listed since most people are used to typing, e.g.,
Control-C for copy operations.

Many of these require the pop-up-style-windows option to be enabled
(which is now the default). It can be found under the Misc tab in
the options dialog (accessible by pressing Alt-O).

Many shortcuts will only work while emulation is halted.
In most cases this is done to avoid sending unwanted
keystrokes to the virtual X68000. Combinations utilizing
the Alt key were heavily used because the X68000 lacks
that particular key.



 General Shortcuts

Alt-0		Access Floppy Drive 0 Menu
Alt-1		Access Floppy Drive 1 Menu
Alt-A		Save State File as...
Alt-B		Break / Execute (alternate)
Alt-C		Access CD-ROM Menu
Alt-D		Access Debug Menu
Alt-E		Eject Disk (Drive 0)
Alt-Shift-E	Eject Disk (Drive 1)
Ctrl-Alt-E	Eject Disk (Drive 0 & 1)
Alt-F		Access File Menu
Alt-H		Access Help Menu
Alt-I		(Re)insert Most Recent Disk (Drive 0)
Alt-Shift-I	(Re)insert Most Recent Disk (Drive 1)
Ctrl-Alt-I	(Re)insert Most Recent Disk (Drive 0 & 1)
Alt-J		(Reserved; used by disassembly window)
Alt-K		Open/Close Software Keyboard
Alt-L		Load State File
Alt-M		Access Magneto-Optical Drive Menu
Alt-N		View -> Processor -> All (alternate)
Alt-O		Options
Alt-P		Toggle High Priority Mode
Alt-Q		Quick Screen Shot (sequentially numbered)
Alt-R		Reset Emulation
Ctrl-Alt-R	Reset Emulation and Clear Memory
Alt-S		(reserved) (*)
Alt-T		Access Tools Menu
Alt-V		Access View Menu
Alt-W		Access Window Menu
Alt-X		Exit Program

* I did not add a Save accelerator since it would make it easy to
 accidentally ruin a state file, which could be very destructive.

 NOTE: The integral shortcuts listed above which access a frame-window
 menu are only available when the frame window is active.


F5		Execute (when halted) (alternate)
F9		Toggle Breakpoint (a disassembly window must be open)
F10		Open Menu of Active Window
F10		Step Over Next Instruction (when halted)
F11		(typically mapped to the X68000 F10 key when running)
F11		Execute Next Instruction (when halted)
F12		Toggle Mouse Mode (when running)
F12		Skip Ahead (when halted)
Shift-F10	Open pop-up menu of active window
Shift-F10	Run to Next Instruction (when halted)
Shift-F11	Step Out (when halted)
Shift-F12	Execute Next Instruction (when halted) (alternate)
Shift-F12	(unassigned) (when running)
Alt-F4		Close Active Window / Program
Alt-F11		View -> Processor -> All
Alt-F12		Break / Execute
Ctrl-F10	Run to Cursor (a disassembly window must be open)
Ctrl-F11	Run to End of Subroutine (when halted)
Ctrl-F12	(reserved)   (when halted)
Ctrl-F12	(unassigned) (when running)

Tab		Cycle through windows (when halted)
Shift-Tab	Cycle through windows (reverse order)
Application	Open pop-up menu of active window
Alt-Space	Open system menu of active window
Alt-Return	Toggle full-screen mode
` (grave)	Toggle speed limiting (same key as tilde) (running) (*)
` (grave)	Toggle speed limiting (same key as tilde) (halted)

* Behaves as a momentary / toggle depending on how long key is pressed.

Mouse Wheel	Stretch with Aspect Ratio (frame window must be active)
Middle Button	Toggle Mouse Mode (when running) (*)
Middle Button	(unassigned) (when halted)

* Can be disabled in the mouse tab of the options dialog.




 Disassembly Window (most of these require active, pop-up windows)

A		Copy current address to clipboard
C		Copy disassembly to clipboard
Ctrl-C		Copy disassembly to clipboard (pseudo combination)
G		Go to address
Alt-J		Set 68000 PC to top line of disassembly
O		Toggle one-shot breakpoint on current line
P		Shift disassembly view to current PC

Plus (numpad)	Step over next instruction (alternate)
Asterisk (")	Run to cursor (alternate)
Enter		Execute next instruction (alternate)
Right/Alt-Right	Follow operand on top line of disassembly
Left/Alt-Left	Go back (uses an internal address stack)

F4		Close window
Alt-F4		Close window (pseudo combination)
Ctrl-F4		Close window (pseudo combination)

Up/Down		Scroll by lines
Page Up/Down	Scroll by pages
Space/Backspace	Scroll by pages
Home/End	Jump to top/bottom

Mouse Wheel	Scroll by lines
Ctrl-Wheel	Scroll by pages
Shift-Wheel	Scroll by pages (alternate)
Ctrl-Shift-Whl	Scroll by words (*)

 * I.e. two bytes in memory. Helpful in troublesome situations
 such as instructions getting masked by preceding garbage.

RMB		Open context menu
 Follow Operand	Jump to operand on line which was right-clicked
 Jump to Cursor	Set PC to mouse-selected line (press Alt-J to undo)

LMB		Set / Remove Breakpoint
Shift-LMB	Enable / Disable Breakpoint
Ctrl-LMB	Set a One-Shot Breakpoint
Ctrl-Shift-LMB	Run to Cursor (*)

 * This works by setting/moving a special one-shot breakpoint (#9)
 that is reserved exclusively for this sort of purpose.




 Memory Window (requires pop-up style; window must be active)

A		Copy current address to clipboard
B		Change display units (byte)
G		Go to address
L		Change display units (long)
W		Change display units (word)

(Alt)Left/Right	Navigate through memory window view history

F4		Close window
Alt-F4		Close window (pseudo combination)
Ctrl-F4		Close window (pseudo combination)

Up/Down		Scroll by lines
Page Up/Down	Scroll by pages
Space/Backspace	Scroll by pages
Home/End	Jump to top/bottom

Mouse Wheel	Scroll by lines
Ctrl-Wheel	Scroll by pages
Shift-Wheel	Scroll by pages (alternate)
Ctrl-Shift-Whl	Jump to top/bottom

Double LMB	Edit memory value (also useful for copying values)
 with Ctrl	Jump to address stored in memory location



 Useful Combos

Alt-F, 1	Load most recent state file
Alt-F, S	Save current state file
Alt-I, Alt-R	Reload floppy disk in Drive 0 and reset system

 Useful Combos - Disassembly Window

G, Enter	Add current line to address history
Right, A, Left	Copy destination address of current instruction


 Remember: If there isn't an accelerator for a shortcut you'd like,
 you can usually get the same effect with a few extra keystrokes
 by using the Alt key to access a menu and then pressing the key
 corresponding to the command you want (the key should be underlined.)





Drag and Drop:

You can drop floppy disk images onto the main window. You can also
drop directories, which will become dynamically built images.

For a single file/directory, the destination drive is determined by
which side of the window it is dropped on. Multiple files will be
loaded into drives sequentially, followed by a system reset.


Command-Line Arguments:

XM6 accepts up to two arguments, which will be examined heuristically
to determine their type. Floppy disks, state files, and MO disks can
all be loaded via this method. If another instance of XM6 Pro-68k is
running, arguments will be passed to that instance instead and the
current instance will exit.





 Options Reference
------------------------------------------------------------------------

Pop-Up Window Style:

XM6 allows the use of either child windows or pop-up windows. The former
cannot be active or receive input directly. They also are limited to
the client area of the frame window. Pop-up windows, on the other hand,
can be moved outside the frame window and receive the input focus.

That last feature is what enables most of the new input commands which
make pop-up windows so much more powerful. You can change the type
of subwindows with the "Options->Misc->Pop-Up Window Style" check box.


High-Priority Mode:

This elevates or normalizes the priority class of XM6 dynamically.

You can use this option to have XM6 play music in the background
while multitasking. If the audio still breaks up occasionally even in
this mode, you can try increasing the audio buffer size in the options
to 1000 ms (not recommended for general use due to high latency.)
Certain XM6 GUI operations can still break up the audio no matter what.

Caution: This can cause problems by shutting out lower priority tasks.
Make sure your computer can handle the processing load first.
VM/MPU full-speed modes will be deactivated and unavailable while in
high-priority mode for this very reason. This option is not saved.


Full Screen Stretch:

When Full Screen Stretch is enabled, entering Full Screen mode will no
longer attempt to force the screen resolution to 800 x 600 x 16 but will
instead stretch the image to fill the screen at its current resolution.

Furthermore, if the screen resolution is high enough, it will stop
stretching to the limits of the screen and start stretching to integer
multiples of the original image (including aspect stretching), producing
an aliasing-free picture. You may need to turn off the status bar to
reclaim the entire vertical area in order to reach qualifying resolution
thresholds. Typically, the minimum resolution for this is 1280 x 1024.

When the resolution is insufficient for integer scaling, the image will
either be stretched to fit the entire screen (when aspect stretching
is enabled) or will be stretched to form a square with dimensions
equal to the lesser of the screen's width/height. These two methods
result in good aspect ratios for most games.

Be aware that these special full-screen stretching modes all blit the
entire screen every time and are thus potentially much less efficient.
Normally XM6 optimizes the amount of drawing done.

Also, the little-used Bitmap window (View -> Win32 -> Bitmap) will
operate a little bit differently, with the lower BitBlt fields now
indicating the stretch parameters for the destination bitmap. You could
use this to verify that the output is an even multiple of the input.

Another caveat is that it will not do any stretching if the emulated
system is in a resolution commonly used for text display and the screen
resolution is very low, since the results look bad without any benefits.

This option appears in the configuration file but will not be stored
in state files. The corresponding menu item will not be accessible in
Full Screen mode unless the resolution is 800 x 600. The intent is to
prohibit the user from changing this option except when safe to do so.


Full Screen Rescale:

Enabling this feature will cause Full Screen Stretch mode to ignore
the scaling factors associated with the virtual screen resolution.

For example, a 256x256 image displayed in low resolution will normally
be doubled to 512x512 prior to the full screen stretching/scaling
calculations, but with Full Screen Rescale enabled, the 256x256 image
will be scaled directly to integer multiples. This may produce better
results for some screen resolutions.

Another use for this is to "correct" the aspect ratio of certain games,
most commonly those operating in the 512x256 family of resolutions.
The results won't be as accurate compared to a real X68000, but often
look better.

This option will be recorded in the configuration file but will not be
written to state files.


LED for FDD Motor:

I believe this causes the floppy LED display to reveal the drive motor
activity state rather than emulating what the real floppy LED would do.


Blue Power LED:

This changes the colors for the emulated power LED in the lower right
corner and in the version dialog (heh). That's all.

Could be useful for marking particular hardware configurations.





 Command Reference
------------------------------------------------------------------------

Trace:

Executes the next instruction. Similar to "step into" commands
in debugger parlance.


Step Over:

Either executes the next instruction or runs to a special breakpoint
after it, depending on what instruction it is. Used to skip over
subroutine calls and similar operations listed below.

    BSR CHK DOS FPACK IOCS JSR TRAP TRAPV


Skip Ahead:

Runs to a special breakpoint at the next point of interest, which
includes the instructions listed in the previous paragraph as well
as any line with a breakpoint, branch, or return statement. If the
next instruction to be executed is a subroutine call or similar
statement, this command will run to the next line just like the
Step Over command would. In the unlikely event nothing "of interest"
can be found nearby, it will run a set number of instructions.


Run to Next:

Attempts to run to a special breakpoint set on the next instruction.
This is intended to be used to skip over certain looping instructions.
It is recommended that you only use this command when you know for
certain that the current instruction is the only one that can terminate
the loop; otherwise you risk losing control.


Run to End:

Attempts to run to the end of the current subroutine. It executes
instructions until it finds a return operation (any kind) coincident
with the following criteria:

- The Supervisor Mode bit must be in the same state as when this
  command was invoked.

- The Stack Pointer must be no less than when this command was invoked.

This algorithm won't work in every situation but should be adequate.
If the subroutine never returns, you can abort the operation by halting
execution (Alt-F12).

If successful, execution will end at the RTS/RTE/RTR. To finish
"stepping out", simply perform a single Trace command (F11).


Step Out:

Same as Run to End except that it executes the return instruction
for you as well. If an exception occurs at the return instruction,
you won't end up in the correct place after all, so be mindful of
this possibility if you end up somewhere unexpected.


RAM Insert:

Loads a file directly into the X68000's main memory. You will be
asked for the destination address, which must be less than the amount
of memory installed in the X68000. Typically this will be $200000,
but it could be as high as $C00000 depending on the configuration.


RAM Dump:

Saves the entire contents of the X68000's main memory into a file.


Memory Dump:

Saves a range of data from anywhere in the address space to a file.
Unlike the RAM Dump command, this function can read from VRAM and other
addresses above $C00000 but is much slower because it has to interface
with various memory handlers.

You will be asked for two addresses. Together, these values bound the
range to be saved. The first is inclusive/closed, the second is
exclusive/open. Only the lower 24 bits will be used, but if the latter
value is zero, it will be treated as $1000000 (i.e. the top of the
address space.)


CPU State Log:

This will disassemble the current instruction and output the most
useful CPU registers to a file every time an instruction is executed.
It will stop automatically once it writes about 20 MB. You can also
manually halt it by selecting the menu item again.

You can easily control what gets logged by using the disassembler
window, breakpoints, execution commands, etc.; the logger will remain
active while you step through the code or run between breakpoints.


Save Disassembly:

Disassembles instructions with a few formatting niceties. You will
be asked first for a file name and then the end address (inclusive)
which will default to the end of the current "page" (purely an artifact
of the disassembly window architecture; the 68000 uses a flat addressing
scheme). The start address is taken from the current view of the
corresponding disassembly window.

You can also copy approximately 4kB worth of disassembled instructions
to the clipboard by pressing C / Ctrl-C in an active disassembly window.


Find:

Each open memory window can launch a non-modal dialog with the ability
to search the X68000 main memory. Pop-up-style windows are not required.

Both forward and backward search directions are allowed; simply press
the corresponding button. A small combobox controls the address where
the search will start from (which is +/- one byte from that address
depending on the direction; i.e. searching from address X will start
at X + 1 for forward searches or X - 1 for backwards searches.)
Searches will wrap around until all RAM has been scanned.

The starting address is preloaded with whatever is on top of the
parent memory window. Every time a match is found, the corresponding
address will be added to the list box, which will also be preloaded
with address zero for your convenience. The contents of the list box
will not persist after the search dialog is closed.

The dialog contains an edit control where you enter the search string.
It will treat the input as either hexadecimal bytes or a raw character
string (case-sensitive).

The following are tolerated in hexadecimal strings:

 white space, commas, dollar signs, and the sequences "0x" and "0X"

All hexadecimal digits are isolated and a leading zero is added if
the total number is odd. The digits are then converted to binary to be
used in the search routine.

Examples of valid hexadecimal sequences:

 0
 $b
 Af
 123456789ABCDEFabcdef$$$,0x
 0x00, 0x01, 0x02
 $d $f0 $3
 0x10x20x3

Note that the last two examples may not give you the expected results.
They correspond to the sequences $DF03 and $0123.

If any non-hexadecimal character other than those above are encountered
while parsing the input then the data will be treated as a string of
case-sensitive characters.

There are some sequences which are ambiguous. For examples, searching
for "BAD AD" will perform a hexadecimal search, which may not be what
you intended.

You can force the input to be treated as raw characters by prefixing
the search with a quote mark (single or double), which will be stripped
out for the actual search, along with an optional trailing quote mark.
Quote marks in other places will be used in the search. There are a few
other oddities regarding quote marks; in the unlikely event you want to
find one occurrence of a quote mark and nothing else, you can enter
one, two, or three of them in a row and the result will be the same.

Examples of valid character sequences:

 asdf
 'DEAD
 "aaaa
 "Boo"
 freerf"333~+
 "
 ''
 """

The dialog will also accept Shift-JIS characters but not Unicode.
Depending on your system settings, the Shift-JIS characters might not
appear properly, but as long as they are bona fide Shift-JIS encoded
characters then the search will succeed. Question marks usually mean
that you tried to input Unicode and Windows rejected it.

If XM6 detects that you have the Japanese language installed on your
system, a Japanese font will be selected for the edit control at runtime
so that you can see Japanese characters in the search dialog.

Again, Unicode does not work (it will be converted to question marks
before XM6 gets it) and I haven't found an easy way around this yet.
Chances are your IME won't produce Shift-JIS unless your locale is
set to Japanese.

If you need more powerful search functions you can use one of the
other commands to export memory to a file and use external tools on it.

It is recommended that you halt emulation prior to performing a search,
but it is not required.





 General Information
------------------------------------------------------------------------

WARNING: Although loading a state file will reload any associated disks,
you may run into problems if said disks were modified since the state
file was created. This is particularly problematic when loading local
directories as disk images, since they are so easily modified.

The issue is that certain disk parameters may be cached by Human68k
(or whatever is running) and the modified disk may not match. An easy
way to observe the effects of this is to run a DIR command after
loading a state file--the directory list will not account for any
changes made to the disk since the state was saved.

Consequently, you should reload modified disk images after loading
a state file so the OS knows it needs to re-fetch its cached data.


