I have been working on a number of changes to make two machine lashup debugging work. It is not fully ready yet but I have merged my changes (cc branch) to trunk. There are changes related to two machine lashup but also in general use of usim. Here is a list of important changes, in order of their impact to normal use of usim. Also, you need to change your disk configuration in usim.ini (see below).
- A major rework is done in the disk support. Before, the disk was configuring itself based on the disk file (typically .img) by reading its label. This is changed so the disk-unit knows what it is (e.g. T-300) independent of the file, and a disk pack file (disk file) is provided as before. The default disk-unit is of type T-300, so many/all current disks should work by default. The configuration is changed from disk0_filename to disk0 and you will receive an error if you have diskN_filename options in your usim.ini. The new format is diskN=[TYPE,]FILE. TYPE is by default T-300 (and only other alternative at the moment is T-80).
- usim.ini became compulsory. It doesnt mean -c option is compulsory (usim.ini is default), but if -c is not used, usim.ini has to be present.
- When usim quits, even if -d or -D options are not given, a brief dump is displayed, state and screenshot is saved.
- usim can be built as debug or release. The normal build (make) is a release build. The debug build is made with make debug and results a binary with -debug suffix (e.g. usim-debug). The release build disables: -f (enable full tracing when lc=LC), -l (dump state when lc=LC), -t (read/write memory trace), -u (dump state when npc=NPC), trace levels debug and info and assert (NDEBUG). For cpu bound tasks, release build should run considerably faster (~30% when tested with sdl3 on mac). The backend and build type of usim can be seen in version line when usim starts.
- The usim window title indicates the current status of the emulator (running/stopped), sample of the pc/program counter, a few flags, and two machine lashup related debuggee port and the target port.
- An explicit hint is provided to SDL3 to choose opengl render driver (the default at least in macOS is different). This results in an x11 like (crisp) look of the text. Furthermore, F12-1 and F12-2 can be used to change the scale filter (scale mode) on the fly (while usim is running).
- SDL3 has two new options. A display number can be given to usim:geometry (or -g) and the window will be created on that display. Also, usim:always_on_top can be set to true to make usim window always on top.
- A new thread (usim:lashup-debuggee) (for two machine lashup) is created at startup. If not explicitly configured, it listens (UDP) on a random available port. It should not affect the normal operation of usim. If you want to disable it, you can set "debuggee_port" to -1 under "[lashup]" section in usim.ini .
- Unibus mapping (to Xbus) is implemented.
- Disk read compare command is implemented.
- Statistics counter is implemented, but not fully tested.
- 60 cycle clock is implemented.
- F12 is reserved in SDL3 to function as a special key to control usim. Current functionality is listed in README. This is mostly for two machine lashup or try different things while usim is running.
- There are three new command line options. You do not need to use these if you are not using two machine lashup.
-b disables auto boot, so when usim starts, it will reset but stay halted, it will not boot.
-p disables auto power off, so when usim halts, usim will not exit, but stay halted.
-k PORT, used at the debugger side, to connect to the debuggee's PORT for two machine lashup.