Update information and changlogs are in History.txt
- The created versions can be used in different address area of the C64-memory.
- You can change or remove commands.
- You can add own commands to your SMON version
SMON was published in 1984-1985 as a basic listing in the German computer magazin 64'er.
It is still a good and often used tool for C64 users until today in 2022.
Mainly there are 3 different version on several D64 disc images available, which have some common main function, and different aditional functions.
The versions so far are:
-
This is the initial version of SMON, it contains the basic main commands including the trace commands and the main disc commands.
This version was presented the first time as a basic listing in 5 parts in the German computer magazin 64'er from 1984/11 to 1985/04. The initial version was written by Norfried Mann und Dietrich Weineck -
This version has some extended memory commands, and a command to copy SMON to different memory location. To provide this extended functions, the disc functions were removed.
This extension was provided as a basic listing in the German computer magazin 64'er 1985/10. This version was written by Mark Richters -
This version is an extension to show the so called 'illegal opcodes' of the 6510 Microcontroller. To provide this extended functions, the disc functions were removed.
This extension was provided as a basic listing in the German computer magazin 64'er 1985/12.
It was written by Dietrich Weineck
Except these 3 version, there is one more extension available, which provides more disc memory commands for the FMON-version, it will replace the trace commands. This extension was also provided as a basic listing in the German computer magazin 64'er 1985/12.
This was also written by Dietrich Weineck
Here I will call it FCOM-version (extended FloppyCommands)
You can find more details about the SMON at the C64-Wiki
I was looking for a SMON version, which can run in the memory area from $8000 to $9000, and has the extended disc function included.
But it seems, that this version is not available. A version, which has the extended disc commands included, cannot freely moved into the address area of $8000, and a version which includes the SMON copy command, is missing the disc commands.
During my search in the web for a SMON source code, i have found at https://www.forum64.de a link to the GitHub repository from 'cbmuser', which is marked as Public Domain.
I had a first look on it, and seems it is a good start for my own project.
So I decided to use this as a base for my work, to create different version of SMON.
The source code is the so called EXT, or PLUS version of SMON, and is allmost perfect.
So far I found 2 problems in the source code.
The label was placed in the source code at the wrong position ($CE89), The label should be placed at ($CEA2), this is corrected now.
The last byte "0E" was missing in the source code, this byte belongs to the adjustment table for the Y-command
The byte at address xE04 was not adjusted by the Y-command. This was fixed by adding the byte $0E at the end of the source code.
(Btw, some of the existing PLUS-version on the disc images are missing this byte at the end too)
updated all link addresses, and all offsets to relocatable ones, now the SMON can be compiled for different memory address areas.
-
added source code from FMON-version (disc commands),
-
added source code from FCOM-version (extended floppy commands) and
-
added source code from ILOC-version (illegal opcodes).
added some comments (if i can find the time, i will maybe continue to work on this)
during try out off the different compiled version, I found a bug which is inside SMON from the beginning. The B-command for creating basic data-lines is only working in the version which is compiled for the address range $C000. Even in the copy (Y) command of the PRO version, this error is existing. To fix this error the address LC08D must be defined as relocatable address, and must be aded to the table of the (Y) command. This is done in the next step.
I have analyzed and partly rebuild the move (Y) command. The command now also includes the missing address of the B-command. The SMON-PLUS can now be coppied with the Y-command to different memory location as fully working version. The B-command to create basic data-lines is fixed and fully working now in the copied version.
Based on the instructions given in the German magazine 64'er 12/85 some errors are corrected in different places of the source code.
The source code which is provided here in this repository is now a multi function source code, which can build all different version for different memory adresses.
The version can be easy selected by uncommenting the relevant part in the sourc code. in the following example, the "FCOM" part is selected for the build
; -----------------------------------------------------------
; ---------------------- SMON VERSION -----------------------
; -----------------------------------------------------------
; - DEFINE ONLY ONE VERSION BY UNCOMMENTING IT -
; if nothing is selected here, SMON will be compiled without any extension
;FMON = 1 ; this is the FMON version, also named SMONFx000, this seems to be the 'normal' or initial one, including the base disc commands
;PLUS = 1 ; this is the PLUS version, also named SMONPx000, for the new function the FMON monitor is removed
;ILOC = 1 ; this is the ILOC version, also named SMONIx000, this provides the function to show the illegal opcodes, the FMON is removed
FCOM = 1 ; this is the FCOM version, can named as SMONDx000, this has the extended Floppy cpmmands, the "Trace" function is removed
Only one version can be used, otherwise SMON will not work correctly.
the start address can be defind with the common command like like "*=$C000"
The start address should be an even 4k address, like: $1000, $4000, aso.
it is possible to use an address like $6500,
but with this kind of address, the Y-command in the PLUS-version cannot work correct.
On different C64 can be installed different CIA chips. The trace command is using the timer function of the CIA. If the command is not working on your C64, this can be adjusted by selecting the right CIA timing version in the source.
; -----------------------------------------------------------
; ----------------------- CIA VERSION -----------------------
; -----------------------------------------------------------
; the new CIA is defined as standard
; commenting CIA_N will activate the old version
; changing the CIA timing is necessary if the trace-command is not working well
; it can also defined manually by changing the value at address $CD8E
CIA_N = 1 ; change here
; -----------------------------------------------------------
Used Software:
Visual Studio Code, Version: 1.63.2 (Universal)
Acme Cross-Assembler for VS Code (c64) v0.0.18
Used Hardware:
Apple iMac (24-inch, M1, 2021)
macOS Ventura, version 13.0 Beta (22A5331f)
The source code can be compiled by using the Acme Cross Compiler (C64)
Please use this source code on your own risk ;)


