Skip to content
Alessandro Abbruzzetti edited this page Apr 21, 2023 · 28 revisions

Welcome to the kernal64 wiki!

Assembler

See Assembler User's Guide at ASM

Software

The Kernal64 emulator can execute programs taken, mainly, from four types of devices:

  • D64,G64 1541 disk format
  • D71 1571 disk format
  • D81 1581 disk format
  • TAP/T64 tape format
  • PRG files
  • CRT, cartridges

Here a list of sites where you can find games, applications, utilities, etc:

Supported Cartridges / Expansions

  • WiC64
  • BeamReacer
  • REU
  • GEORAM
  • SwiftLink
  • DigiMAX
  • ActionReplay
  • KCS
  • FinalCartridge I
  • FinalCartridge III
  • Simon's Basic
  • Comal 80
  • Magic Desk
  • Dinamic
  • Game System
  • Warp Speed
  • Easy Flash
  • Ocean
  • Fun Play
  • Super Games
  • Epyx Fastloader
  • Super snapshot 5
  • GMOD2
  • GMOD3
  • Zaxxon
  • Mach 5
  • Page Fox
  • CP/M
  • Dual SID
  • Super Explode
  • RAM Cart
  • Isepic

Joystick & Keyboard

The joystick can be emulated via keyboard or via a real USB joystick. The joystick with keyboard emulation can be done via keypad (INS key is fire) or via custom keys chosen by the user. See Settings -> Joysticks menù.

The keyboard can be configured via layout configuration file. At the start the emulator tries to recognize the host keyboard layout and if it finds a valid configuration file it applies it. Some keyboard layout configuration files are pre-configured. Is it always possible to write a custom configuration file for your layout: check the guide below that explains how the configuration file must be filled. Use the 'keyboard layout helper' (inside Keyboard Settings) to discover the key codes of your layout.

#
# Kernal64 keyboard layout configuration file
#
# lines that start with # character or empty lines are ignored
# the configuration file has two sections identified by [map] and [keypad_map]: in the first, standard keys are configured,
# while in the second keys of the numeric keypad are configured, if any.
#
# every configuration line is composed by
#   [[(w|x|m)+]]<modifiers><host key name or key code> = <emulated key>,<emulated key>,...,<emulated key> [<comment>]
# where [[(w|x|m)+]] is an optional modifier to indicate that the row must be included in the configuration for the given OS(es) only: w=Windows,x=Linux,m=Mac, discarded otherwise
# in this way the same emulated keys can be configured for different OS. For example: [xm] will define a row for Linux and Mac only.
# where <modifiers> can be a combination of:
# + for shift (shifted host key)
# ^ for altg  (altg + host key)
# ! for numeric virtual key code (used for host key that has not a Java key name, just a code number)
# - turn off automatic shifting (used to disable the automatic shifting)
#
# <comment> it's a # character followed by a comment

# host key names (or symbols) are listed below:

# Host keys
#                        0                         1                         2                         3                         4                         5                         6                         7
#                        8                         9                         A                    ACCEPT                       ADD                     AGAIN            ALL_CANDIDATES              ALPHANUMERIC
#                      ALT                 ALT_GRAPH                 AMPERSAND                  ASTERISK                        AT                         B                BACK_QUOTE                BACK_SLASH
#               BACK_SPACE                     BEGIN                 BRACELEFT                BRACERIGHT                         C                    CANCEL                 CAPS_LOCK                CIRCUMFLEX
#                    CLEAR             CLOSE_BRACKET                CODE_INPUT                     COLON                     COMMA                   COMPOSE              CONTEXT_MENU                   CONTROL
#                  CONVERT                      COPY                       CUT                         D             DEAD_ABOVEDOT            DEAD_ABOVERING                DEAD_ACUTE                DEAD_BREVE
#               DEAD_CARON              DEAD_CEDILLA           DEAD_CIRCUMFLEX            DEAD_DIAERESIS          DEAD_DOUBLEACUTE                DEAD_GRAVE                 DEAD_IOTA               DEAD_MACRON
#              DEAD_OGONEK     DEAD_SEMIVOICED_SOUND                DEAD_TILDE         DEAD_VOICED_SOUND                   DECIMAL                    DELETE                    DIVIDE                    DOLLAR
#                     DOWN                         E                       END                     ENTER                    EQUALS                    ESCAPE                 EURO_SIGN          EXCLAMATION_MARK
#                        F                        F1                       F10                       F11                       F12                       F13                       F14                       F15
#                      F16                       F17                       F18                       F19                        F2                       F20                       F21                       F22
#                      F23                       F24                        F3                        F4                        F5                        F6                        F7                        F8
#                       F9                     FINAL                      FIND                FULL_WIDTH                         G                   GREATER                         H                HALF_WIDTH
#                     HELP                  HIRAGANA                      HOME                         I       INPUT_METHOD_ON_OFF                    INSERT INVERTED_EXCLAMATION_MARK                         J
#        JAPANESE_HIRAGANA         JAPANESE_KATAKANA            JAPANESE_ROMAN                         K                      KANA                 KANA_LOCK                     KANJI                  KATAKANA
#                  KP_DOWN                   KP_LEFT                  KP_RIGHT                     KP_UP                         L                      LEFT          LEFT_PARENTHESIS                      LESS
#                        M                      META                     MINUS                MODECHANGE                  MULTIPLY                         N                NONCONVERT               NUMBER_SIGN
#                  NUMPAD0                   NUMPAD1                   NUMPAD2                   NUMPAD3                   NUMPAD4                   NUMPAD5                   NUMPAD6                   NUMPAD7
#                  NUMPAD8                   NUMPAD9                  NUM_LOCK                         O              OPEN_BRACKET                         P                 PAGE_DOWN                   PAGE_UP
#                    PASTE                     PAUSE                    PERIOD                      PLUS        PREVIOUS_CANDIDATE               PRINTSCREEN                     PROPS                         Q
#                    QUOTE                  QUOTEDBL                         R                     RIGHT         RIGHT_PARENTHESIS          ROMAN_CHARACTERS                         S               SCROLL_LOCK
#                SEMICOLON                 SEPARATOR                     SHIFT                     SLASH                     SPACE                      STOP                  SUBTRACT                         T
#                      TAB                         U                 UNDEFINED                UNDERSCORE                      UNDO                        UP                         V                         W
#                  WINDOWS                         X                         Y                         Z

# emulated key names are listed below:

# C64 & VIC20 keys
#         A         AT          B          C        CBM   CLR_HOME      COLON      COMMA
#   CRSR_LR    CRSR_UD       CTRL          D          E      EQUAL        EXP          F
#        F1         F3         F5         F7          G          H          I   INST_DEL
#         J          K          L       LIRA    L_ARROW    L_SHIFT          M      MINUS
#         N        N_0        N_1        N_2        N_3        N_4        N_5        N_6
#       N_7        N_8        N_9          O          P     PERIOD       PLUS          Q
#         R    RESTORE     RETURN   RUN_STOP    R_SHIFT          S    SEMICOL      SLASH
#     SPACE       STAR          T          U          V          W          X          Y
#         Z

# C128 special keys
#            ALT       CAPS_LOCK             ESC            HELP      KEYPAD_DOT     KEYPAD_DOWN    KEYPAD_ENTER     KEYPAD_LEFT
#   KEYPAD_MINUS      KEYPAD_N_0      KEYPAD_N_1      KEYPAD_N_2      KEYPAD_N_3      KEYPAD_N_4      KEYPAD_N_5      KEYPAD_N_6
#     KEYPAD_N_7      KEYPAD_N_8      KEYPAD_N_9     KEYPAD_PLUS    KEYPAD_RIGHT       KEYPAD_UP       LINE_FEED       NO_SCROLL
#            TAB          _40_80

# CBM2 keys
#              0               1               2               3               4               5               6               7
#              8               9               A               B          BARROW               C CLOSED_SBRACKET           COMMA
#      COMMODORE         CONTROL               D        DB_QUOTE             DEL             DOT            DOWN               E
#          EQUAL             ESC               F              F1             F10              F2              F3              F4
#             F5              F6              F7              F8              F9               G           GRAPH               H
#           HOME               I               J               K            KP_0           KP_00            KP_1            KP_2
#           KP_3            KP_4            KP_5            KP_6            KP_7            KP_8            KP_9           KP_CE
#         KP_DIV          KP_DOT        KP_ENTER        KP_MINUS          KP_MUL         KP_PLUS        KP_QMARK               L
#           LEFT               M           MINUS               N               O   OPEN_SBRACKET               P              PI
#              Q               R          RETURN           RIGHT             RVS               S         SEMICOL           SHIFT
#          SLASH           SPACE            STOP               T             TAB               U              UP               V
#              W               X               Y               Z

# when a shifted emulated key must be configured, either L_SHIFT or R_SHIFT (or SHIFT for CBM2) can be used
# if the - modifiers is not used the given configuration is cloned also for the shifted version
# for example
# A = A
# 2 configurations are produced: one for A -> A and one for +A = A,L_SHIFT

# examples
# to map a host F1 key to an emulated F1 key
# F1 = F1
# to map a host F2 key to an emulated F2 key
# F2 = F1,L_SHIFT
# to map a Altgr + à (for Italian layout this produce #) to an emulated #
# ^!16777440	= N_3,L_SHIFT
# here it is used a key code !16777440 because the character à does not have a Java name

Connecting to a BBS (or to Internet)

Yes, it's possible, still today, to connect to an old Bulletin Board System. For a list of BBS see http://cbbsoutpost.servebbs.com/

To connect to the external world, the RS-232 interface is used: Two ways are possible, the User Port and the Expansion Port. The first one was used, mainly, for the old Commodore modems. The RS-232 Kernal routines work on this implementation but are limited to 1200/2400 baud. The latter one was used by cartridges, like SwiftLink and can run up to 38400 baud.

To activate an RS-232 implementation go to the Settings Menu, and select RS-232. Here you can choose the available implementations. The Telnet implementation must be used to connect to telnet BBS or in general to a telnet server: in the pop-up insert the host:port references followed by modem parameters baud,bits,parity,stop bits. For example: borderlinebbs.dyndns.org:6502,1200,8,n,1.

The Tcp implementation can be used to connect to a tcp endpoint, like CommodoreServer.com. In the pop-up use the following parameters: www.commodoreserver.com:1541,1200,8,n,1

The Process implementation executes an external process and uses its input/output stream to read/write bytes that will be exchanged with the RS-232. A good example is the Slack client from http://1amstudios.com/2016/11/27/c64-slack-client. In this case the external process is the nodejs executable that runs the app.js application.

For SwiftLink, choose "SwiftLink $DF00" (if you want to put it on IO2) or "SwiftLink $DE00 + REU" to install a SwiftLink on $DE00 + 512K of REU on $DF00. Then it asked to type the configuration string: here you can type the bbs server and port, to connect immediately, or you can type 'modem' to postpone the connection. If you postpone the connection remember to connect inside your terminal program: in the terminal type ad host:port + RETURN. I suggest you to use NovaTerm v9.6 as a terminal program. Remember to select the SwiftLink RS-232 driver.

Here some examples:

commodoreserver commodoreserver particles antidote.triad.se

Flyer internet modem

Under Settings -> IO -> Flyer internet modem you can enable the Flyer card on device 7.

The implementation does not support the cloud functionalities.

The Flyer is also a disks repository: you can set the local directory where you want to store the disks (Settings -> IO -> Flyer internet modem -> Set disks repository.

Try out the Flyer software

Here an example, the IRC program:

Flyer IRC

Drive issues

Some games used sophisticated fast loaders: it can happen that the default settings are not able to permit those software to run properly. Try to change the drive speed in the drives panel (Settings -> Drives) checking "Max speed". I found some demo scene software to run with this setting only.

Another settings to change can be the drive auto-sleep: uncheck "Can go sleep" in the panel; I found this useful, for example, for the Nostalgia games (https://www.n0stalgia.org/)

CP/M support

Yes, there is a support for the old (and probably unuseful) CP/M cartridge. Under the Settings -> I/O menù select the CP/M item: now you're ready to use the wonderful world of Z80 processor. In order to get ready with CP/M you have to download the Commodore CP/M boot disk (http://www.zimmers.net/anonftp/pub/cbm/demodisks/c64/cpm/index.html) and run it. For further reading see also http://www.z80.eu/c64.html

Here you can see the emulator running the MBasic from Microsoft:

MBasic

To make CP/M disks, please visit https://github.com/mist64/ctools

Stereo Dual SID

Try to activate the second SID from Settings -> SID -> Dual SID on $DE00 or $DF00 (as if it were an external CRT). Now you have 2 SID running together in stereo mode. To appreciate this new sound, go to http://www.lyonlabs.org/commodore/stereo-sid/stereoplayer-10_3.d64 and run it. Try to play on of the stereo songs contained in the d64 and enjoy it (remember to set the external 2nd sid address to the same set in the emulator and to disable fast loading).

Remoting (experimental)

Share your Kernal64's screen and input devices with another player on the network! Go to Settings -> Remoting -> On and select the local listening port. From now on you will see a (?) blinking in the window's title bar, meaning that it is listening for an incoming connection.

Now the other player can run the remoteclient script with the host and port parameters (host and port of the Kernal64's listening server) on the command line.

On the server the blinking (?) become (R), meaning that a connection has been established. The server screen has been remoted on the client and the player on the client can use his own keyboard as if it were on the server.

To play a game in a two-player mode on the server select the input devices: On the server you can use both the keyboard or the USB joystick, while on the client you have to use just the keyboard (custom keys or keypad).

Here an example of the Pit Stop 2 game (I did not make an instant snapshot on both client and server...) :

Remote server Remote client