Skip to content

Modified P2000T BASIC-NL v1.1 cartridge to easily load CAS files over RS232

License

Notifications You must be signed in to change notification settings

ifilot/p2000t-rs232-cartridge

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

P2000T RS232 CARTRIDGE

GitHub tag (latest SemVer) Build License: GPL v3

Purpose

It is possible to transfer .CAS files to the P2000T over the RS232 interface using the pc2p2000t tool as developed by dionoid. This repository contains the source code to produce an all-in-one cartridge image that has the required source code already inserted at the end of the standard BASIC-NL cartridge allowing the user to only write two lines of BASIC code to start the program.

Warning: This adaptation of the BASIC cartridge is based on version 1.1. I chose this version because it provides sufficient free space for the necessary modifications. However, it is important to note that the latest version of the BASIC cartridge is labeled as 1.1A2. This newer version potentially includes some changes that certain programs rely on, making them incompatible with this particular cartridge.

Usage

P2000T

After booting the P2000T with the modified BASIC-NL image, run

10 CLEAR 50,&H9DFF
20 DEF USR1=&H4EEE

Note: Use &H9DFF in the above instructions if your P2000T has 16kb of memory. If your P2000T has 32kb or 48kb of memory, use &HDDFF or &HFDFF, respectively. Alternatively, you can also use the following one-liner to let the P2000T figure it out for you: 10 CLEAR 50,&H9DFF+256*32*(PEEK(&H605C)+PEEK(&H605C)=1)).

This very small basic program ensures that BASIC cannot touch the upper 512 bytes of memory and sets a pointer to custom defined source code. To run this small snippet of BASIC code, run

RUN

To put the P2000T in 'listening' mode, run

?USR1(0)

After copying the .cas file, your P2000T should beep and you can choose to either immediately run the program via RUN or save it to a cassette using CSAVE.

P2000T BASIC instructions

PC (Windows)

Insert the USB to RS232 device and open a Command Prompt Window. Check COM device is used for the serial connector and run

mode com5 baud=9600 parity=n data=8 stop=1

Next, copy the CAS file using e.g.

copy data.cas \\.\com5

Windows Command Prompt

Compilation

Note: Rather than building the ROM yourself, you can also download the latest release directly from Github.

The instructions below are tested on Ubuntu 22.04 and are most likely easily transferable to other Linux versions.

  1. Ensure the right packages are installed:
sudo apt install python3 python3-numpy z80asm make
  1. Clone the repository
git clone git@github.com:ifilot/p2000t-rs232-cartridge.git
  1. and start the compilation by running
make

References