Git Product home page Git Product logo

vic-bbs's Introduction

VIC-20 Bulletin Board System

VIC-BBS-menu

This is a bulletin board system (BBS) that runs on a Commodore VIC-20 personal computer. In addition to the VIC, you'll need:

  • at least 16KB of memory expansion (35KB expansion is optimal)
  • a WiFi modem such as Strikelink (or some other method to connect ie: null modem to tcpser server)
  • storage device (ie: 1541 disk drive, SD2IEC drive or pi1541 drive)

Live Wire BBS

You can try it out by firing up your VIC-20 connected with a WiFi Modem and visiting my actual BBS running at: vic-bbs.com:6502

Quick Start

  • Download the latest appropriate D64 image from this repo (BBS.d64 is for a physical VIC-20, BBS-VICE.d64 is for a VICE-emulated VIC-20)
  • If using emulation, load the D64 image in VICE, configure VICE's RS232 parameters, and ensure tcpser is running with the correct parameters.
    • VICE EXAMPLE:
    • Settings > Peripheral Devices > RS232
    • Enable Userport RS232 Emulation [checked]
    • RS-232 Interface Type [Normal Control Lines]
    • Device: Serial 3, Baud: 1200
    • Serial 3: 127.0.0.1:25232, Baud: 1200, IP232 [checked]
    • tcpser command line: tcpser -v 25232 -s 1200 -l 4 -p 6502 -i "e0s1s0=1s2=255s30=30&k0"
  • If using a real VIC-20, transfer the BBS, BBS.ML and SYSOP programs to a 1541 diskette and ensure set your WiFi modem to answer calls.
    • WIFI MODEM EXAMPLE:
    • set baud rate to 1200
    • set "e0s1s0=1s2=255s30=30&k0" as the default init string
  • load + run the "SYSOP" program
  • Choose "C" for Create User Log - this will create a new user log with just 1 record:
    • USER ID: 1
    • USERNAME: SYSOP
    • PASSWORD: SYSOP
  • Load and run "BBS". There is no local mode, so you'll have to use another computer to dial into your BBS to test it out.

The BBS Program

The program itself is in three parts (PRG files):

  • BBS : This is a BASIC program that provides the vast majority of the functions of the BBS. This can be modified by the sysop as they see fit.
  • BBS.ML : This is the machine language code that provides the I/O functions for the BBS (ie: GETLINE, SHOWFILE, PRINT, etc). Finding a good spot to host this code is the tricky part with the VIC-20. Right now, I have this code sitting in a 3K RAM expansion spot at $0400 (this requires a specific memory expansion cartridge).
  • SYSOP : This is a utility program that can do things like create the initial user log, edit users, generate the user list, etc.

Required SEQ Files

In order to run the BBS, you are going to need some supporting sequential (text) files. These can contain any PETSCII codes you would like. The D64 distribution image contains all of these files that you can then modify with your preferred PETSCII editor (not included with BBS).

You need to create/edit the following SEQ files:

  • BANNER : Splash screen showed to user upon initial connect
  • MOTD : Message of the Day shown after user logon
  • HELP : Main Menu help screen
  • NEWUSER1 : Shown to new users prior to filling out application
  • NEWUSER2 : Shown to new users after filling out application
  • LOGOFF : Shown to users at logoff time
  • BANNED : Shown to users who have security level zero (banned)
  • TIMEUP : Shown to users when their time has expired
  • LOGFULL : Shown to a new user when the user log is full (255 users max)
  • INFO : Display information regarding the BBS
  • BULLETINS : Listing of available bulletins on the system (numbered 1 to 255)
  • SETMENU : Help Menu for the User Settings area
  • SYSHELP : Help page for using the system

Real VIC-20 vs VICE: Differences

The way the BBS answers calls is very simple. The "modem" is programmed to answer after one ring (ats0=1) and all the BBS does is monitor the user port (address 37136) for a carrier tone. On a physical VIC-20, that shows up on bit #4 (ie: AND 8 in BASIC or AND #$08 in ML) whereas in VICE it shows up on bit #5 (ie: AND 16 in BASIC or AND #$10 in ML). Here are the spots in the code it is referenced:

  • BBS.ML : at address $0550 and $0552, there is AND #$08 and CMP #$08. That works for the physical VIC. In VICE that is changed to AND #$10 and CMP #$10.
  • BBS : line 115 is doing and8 for a real VIC and and16 for VICE Otherwise, the two images are the same.

Real Time Clock

The VIC has no way of knowing what the current date is, and it's time keeping ability is hampered by the fact that the internal timer pauses whenver the disk is accessed. This makes using an external real time clock (RTC) chip required to run the BBS effectively. In the BBS BASIC program, there are two subroutines at lines 3400 (get Date) and 3450 (get Time). You will likely need to modify those two subroutines to work with whatever RTC solution you have chosen. In VICE, a DS12C887 is emulated and the BBS-VICE.d64 image contains the code for working with that RTC. My physical VIC uses a custom board made by JaystoniansRetroShop on Etsy that includes a DS12885T RTC chip and 35KB of expansion RAM. So my code at 3400 and 3450 reflects how that chip works.

vic-bbs's People

Contributors

rick-t137 avatar

Stargazers

Olli Savia avatar Isaac Towns avatar

Watchers

 avatar

vic-bbs's Issues

Speed Up Handle Check

Kind of a two-parter:

  • change the trim/upper case function to also disallow commas (replace with dash if encountered)
  • change handle check function to use input# instead of get# (which will be safe to do, knowing there's no commas in user names)

Color in Messages?

We should be able to use colors in the message editor.

Steps to add:

  • have ML filter allow color codes plus RVS ON/OFF
  • in subroutine 400 (GETLINE), have it track NP (non printing) chars in I$ and extend MC to include NP count
  • in subroutine 1500 (DELETE), have it decrement NP count if deleting a non-printing char and have it not send DEL code

Sysop Functions

  • Build Sysop (Z) menu
    • Generate User List
    • Edit User
    • Edit File (PETSCII)
    • Edit Download (metadata)

Field Warning not Sent

When filling out New User Application, if you skip one of the fields, you are supposed to get a warning. It does not show, but the application restarts as expected. Likely just missing a sysa(1).

Colour Reset after Message

After you type a message, if you used colours, they affect any following prompts and information.

We should reset the colour back to white (or something standard) at every prompt:

  • 200 USER LOGON?
  • 300 NEW USER?
  • 900 DEBUG?
  • 1800 PRESS ANY KEY
  • 1850 ARE YOU SURE?
  • 2000 MAIN MENU
  • 4000 READ BULLETINS
  • 4100 READ MESSAGES
  • 4200 POST A MESSAGE
  • 4700 YOUR SETTINGS
  • 4900 CHANGE PASSWORD
  • 6000 SYSOP MENU

Time Limit Not Working Near Midnight

When I'm within 90 minutes of midnight, the system is telling me that my time is up.

Double check that the fix we put in last week is still in the code. I suspect it is not, as the debug fixes are missing too.

File Transfers

Build file listing, upload and download using X-modem protocol.

Message Functionality Enhancement

  • Currently you can only /s to save or /a to abort.
  • Let's add /e to edit, /l to list (with line numbers) and /p to preview (without line numbers)
  • /e will prompt for a line number
    • once provided the system will print out the current line
    • then prompt for a new line to replace it with
    • if new line is longer/shorter than old line, then shift bytes to accommodate
    • add word wrap if possible (unknown, as this straddles BASIC and ML)

Handle Check Incorrect Record Size

On line 1315, it is using the legacy reclen of 64...

1315 open15,8,15:open1,8,2,"users,l,"+chr$(64):y=1:vu=1

It should be:

1315 open15,8,15:open1,8,2,"users,l,"+chr$(76):y=1:vu=1

I double checked the rest of the code, and this is the only spot where this bug exists.

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.