Git Product home page Git Product logo

petterm's Introduction

PETTERM

A bit-banged full duplex serial terminal for the Commodore PET/CBM computers, including those running BASIC 1!

Written by Hayden Kroepfl (Chartreuse) 2017-2022

BASIC Save/Load and XMODEM extensions by Adam Whitney (K0FFY) 2022

Latest Updates

PETTERM can now handle 2400 baud, along with much improved ANSI terminal compatibility.

Requires at least 8kB of RAM -- For 4kB PET's please use 0.4.0 version or prior for now

Can Load and Save BASIC programs over the serial connection using XMODEM-CRC protocol. Using the high-mem version it can be loaded on top of an existing basic program provided there is enough free space after the program. These versions don't include a stub loader and you must manually SYS xxxx into the program.

Features

  • Can work with a 40 or 80 column PETs with either the graphics or business keyboard.
  • Can be loaded from tape or disk.
  • Works on all versions of BASIC including the oldest PET 2001s with BASIC 1.
  • Can work with as low as 8kB of RAM.
  • Requires only a simple two wire serial interface.
  • BASIC programs can be loaded or saved via serial using the XMODEM-CRC protocol.

Usage

  • Off/Rvs key acts as a Ctrl key.
  • Clr/Home opens up the PETTERM menu for changing baud rate and character set modes
  • PET cursor keys work as expected
  • Inst/Del is a backspace key
  • Additional shifted keys to improve *nix usability:
    • Shift-@ = ~
    • Shift-' = `
    • Shift-[ = {
    • Shift-] = }
    • Shift-^ (up arrow) = |
  • Run/Stop sends Ctrl-C
  • Other keys can be sent by their control code:
    • Tab = Ctrl-I
    • Esc = Ctrl-[ (For Alt/Meta, send Esc then the key)
  • Terminal emulates ANSI escape codes (supports all required by ansi TERMCAP/TERMINFO)
  • Load/Save BASIC Program using XMODEM-CRC

Hardware

Rx (to the PET) should be connected to pin C AND pin B of the user-port.

Tx (from the PET) should be connected to pin M of the user-port.

Don't forget the ground connection to either pin N or Pin 1

If coming from a version prior to 0.4.0, a connection between pin C and B of the user-port is required. Adapters meant for VIC-20 or C64 use should already have this present. This change is required for all baud rates in this version.

These connectors are designed to be compatible with standard serial adapters and modems for the VIC-20 and C64, however as the PET does not provide 5v on the userport, an inline adapter or external power is needed for these circuits, and the 5v pin on the userport connector disconnected.

Commodore PET - RS-232 simple conversion circuit:

    TTL(0V - +5V)                  RS-232 (-13V - +13V)

                5v DC Power (take from cassette or internal)
     ______       |     _________             ________
    |      |      |--- |   MAX   |           |        |
    |      |B\         |L  232  R|           |        |
    | PET  |  |--R1OUT-|O       S|--T1OUT---2| RS-232 |
    | User |C/         |G       2|--R1OUT---3| Serial |
    | Port |M----T1OUT-|I       3|           |  DB9   |
    |      |           |C       2|           |        |
    |______|1-----GND--|_________|--GND-----5|________|

Warning: Connections to the PET user port are RS-232 TTL level signals (0V to +5V). Standard RS-232 serial level signals are -13V to +13V (or more). Connecting standard RS-232 level signals to your PET's user port without an RS-232 to TTL interface will damage your computer and make you sad. (See this SparkFun explanation for more details.)

Files

Default:

  • petterm - 40 column PETs with graphics keyboard, BASIC save/load extension

All:

The original PETTERM without the BASIC save/load extension

  • petterm40G - 40 column PETs with graphics keyboard (eg 2001, some 4032)
  • petterm40B - 40 column PETs with business keyboard
  • petterm80G - 80 column PETs with graphics keyboard
  • petterm80B - 80 column PETs with business keyboard

Basic:

The higher memory versions with the BASIC save/load extension

  • petterm8K_40G.prg - 40 column PETs with graphics keyboard, BASIC save/load, higher memory version (SYS 3200)
  • petterm8K_80G.prg - 80 column PETs with graphics keyboard, BASIC save/load, higher memory version (SYS 3200)
  • petterm8K_40B.prg - 40 column PETs with business keyboard, BASIC save/load, higher memory version (SYS 3200)
  • petterm8K_80B.prg - 80 column PETs with business keyboard, BASIC save/load, higher memory version (SYS 3200)
  • petterm16K_40G.prg - 40 column PETs with graphics keyboard, BASIC save/load, higher memory version (SYS 8192)
  • petterm16K_80G.prg - 80 column PETs with graphics keyboard, BASIC save/load, higher memory version (SYS 8192)
  • petterm16K_40B.prg - 40 column PETs with business keyboard, BASIC save/load, higher memory version (SYS 8192)
  • petterm16K_80B.prg - 80 column PETs with business keyboard, BASIC save/load, higher memory version (SYS 8192)
  • petterm32K_40G.prg - 40 column PETs with graphics keyboard, BASIC save/load, higher memory version (SYS 24576)
  • petterm32K_80G.prg - 80 column PETs with graphics keyboard, BASIC save/load, higher memory version (SYS 24576)
  • petterm32K_40B.prg - 40 column PETs with business keyboard, BASIC save/load, higher memory version (SYS 24576)
  • petterm32K_80B.prg - 80 column PETs with business keyboard, BASIC save/load, higher memory version (SYS 24576)

PRG files are the native programs, can be added to a tape or disk image

TAP files are tape images

petterm's People

Contributors

awhitney-lightedge avatar awhitney42 avatar chartreusek avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

petterm's Issues

Ability to save terminal settings, and Xmodem transfers

I'm using PETTERM 0.5 and love it. The only things that could make it even better for me are if it could save the terminal settings (Baud rate, case settings, etc,.) and Xmodem downloads/uploads. I saw in another open issue that you replied about transfers possibly in the future. But if it could save the parameters in a file that would be wonderful too.

Thanks!

Inverted serial option

Hi, would it be possible to add a menu option or a build artifact to invert the TX serial? I have an esp8266 connected via a level shifter running https://github.com/bozimmerman/Zimodem instead of a MAX232. This would save users having to modify https://github.com/ChartreuseK/PETTERM/blob/master/serial.s#L128 serial.s line 28 to work in this common configuration.

Additionally a wiring diagram for this situation may also help others. Happy to provide one in a pull if required. Excellent terminal software though and thanks for sharing it! :)

Wrong characters after first execution

My CBM8032 has a german keyboard (having Umlauts like ä,ö,ü on the keys where the US keyboard has [ ] etc.).
When starting petterm80b (0.5.0) the menu looks fine: [1] ..., [2] .... etc. But once I have used petterm (hit RETURN) and return to the menu (CLR/HOME), the menu shows the Umlauts instead of the [ ] .
Do you have an explanation for that?

Can't type the '+' character on PET 8296 (and other keyboard mapping woes)

I'm trying to use petterm 5.0 on my PET 8296 and Stupid PET Tricks wifi modem and it's soo close!

I'm assuming I should be using petterm80B.prg - (I tried petterm80G.prg just in case, and the keyboard didn't work at all)

So the command to get into the Wifi settings is 'at+config' but I can't type the + character. I get a '|' instead.

Other mismatched mappings:

[ gives ]
\ gives @ 
@ gives [
] gives ;
; gives \

All the other keys seem to work as expected. Would there need to be a special version for the 8296 keyboard, or as there something else I could try?

Baud Rates > 300

Sorry for posting this as an issue, but I was unable to find other communication methods.

I read the source comments talking about the feasibility of baud rates > 300, but this was disabled. I'm wondering if some other technical limitation was found? 300 baud is awfully hard to go back to once you've tasted that sweet sweet 1200. It's really preventing me from enjoying my PETs wifi modem. :(

Can we channel to a printer or buffer?

Hi there, I was wondering if any future development was planned - if we could perhaps toggle to home and open a channel to the printer or perhaps some buffering?

Thinking about BBSs and snagging a command menu or messages to read later.

Garbled characters at 2400 baud on versions after 0.5.0

I'm using PETTERM on my PET 8296 with Stupid PET Tricks Wifi cartridge.

Version 0.5.0 works perfectly at both 1200 and 2400 baud.

The latest code (calls itself 0.7.0) shows some garbled characters on receive at 2400 baud. Transmit seems to work, since I'm able to send commands. 1200 baud works fine.

I wonder if one of the optimizations since version 0.5.0 broke the timing at 2400 somehow?

Underscore

This may be a question already addressed in the documentation but I can't find it.

Is it possible to send the "_" char?

Having a lot of fun using this software so thanks!

(using 0.5.0 because 2400 baud doesn't work with 0.70)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.