RunCPM_RPi_Pico
RunCPM_RPi_Pico copied to clipboard
Please add support for Adafruit Feather RP2040 Adalogger (instructions in description)
Adafruit Feather RP2040 Adalogger is a small board from Adafruit with RP2040 and microSD holder on it (https://www.adafruit.com/product/5980). I did have fun assembling a CP/M machine according to the README.md file, but the Adalogger is smaller and no jumper wires are involved. A genuine pocket CP/M computer for any pocket size, like eZ-Tiny, but with easy access to microSD files on any OS of your choice.
Instructions:
- Clone this repository.
- Pick the latest version, e.g.
v6_7. - Unzip the Pico archive, not Pico W, e.g.
GL20241103_Binary_Source_RunCPM_v6_7_Pico2_275Mhz.zip. - In the newly created directory, find the RunCPM sketch, e.g.
RunCPM_v6_7_Pico2_275Mhz_03112024.ino. - Open the sketch in the Arduino IDE.
- Make sure the board is recognized as "Adafruit Feather RP2040 Adalogger".
- Upload the sketch. If it keeps uploading or looking for RP2040 devices (in the Output log), press Boot+Reset on the board to help.
- Set the Serial Monitor baud rate at 115200. Press Reset on the board if necessary.
- Make sure you see the CP/M Emulator greeting.
- Note that the last line is "CPU-Clock", nothing about SD. It's time to fix it.
- First, the SD used in the Adalogger is through SPI1, not SPI. Second, a couple of pins (MISO and SS/CS) are different.
- Hence the fix: Replace this snippet:
SPI.setRX(16); // MISO
SPI.setCS(17); // Card Select
SPI.setSCK(18); // Clock
SPI.setTX(19); // MOSI
with this one (see https://learn.adafruit.com/adafruit-feather-rp2040-adalogger/pinouts#microsd-card-slot-3174751 about why):
SPI1.setRX(20); // MISO
SPI1.setCS(23); // Card Select
SPI1.setSCK(18); // Clock
SPI1.setTX(19); // MOSI
- About a dozen lines below, replace
#define SS 17with#define SS 23. - Replace this line
#define SD_CONFIG SdSpiConfig(SS, DEDICATED_SPI, SD_SCK_MHZ(SDMHZ), &SPI) // self-selecting the Mhz
with this one (or just replace &SPI with &SPI1)
#define SD_CONFIG SdSpiConfig(SS, DEDICATED_SPI, SD_SCK_MHZ(SDMHZ), &SPI1) // self-selecting the Mhz
- Add these lines
#undef LED
#define LED 13
after
// Raspberry Pi Pico(2) - normal (LED = GPIO25)
#include "hardware/pico/pico_sd_spi.h"
- Copy the contents of the
SDCARDdirectory to your microSD. - Insert the microSD into the Adalogger, press Reset, enjoy. Use TeraTerm or something to enjoy even more.
(Optional, strictly a matter of preference.) Here are the steps for a more realistic Z80 experience:
- In
globals.h, comment out#define CCP_DRand uncomment#define CCP_Z80. - Copy
CCP-Z80.64Kto the microSD.
Not sure how to make CCP-Z80.60K work at the moment. Just replacing #define TPASIZE 64 with #define TPASIZE 60 and copying CCP-Z80.60K to the microSD doesn't work.
Made an article about it at https://www.hackster.io/a7v/tiny-runcpm-cp-m-computer-based-on-adafruit-rp2040-adalogger-faa9da
- In
globals.h, comment out#define CCP_DRand uncomment#define CCP_Z80.- Copy
CCP-Z80.64Kto the microSD.Not sure how to make CCP-Z80.60K work at the moment. Just replacing
#define TPASIZE 64with#define TPASIZE 60and copyingCCP-Z80.60Kto the microSD doesn't work.
Dear Evgeny Adamenkov (adamenkov),
you have already added support for the Adafruit Feather RP2040 Adalogger ;)
I personally cant maintain a source for every Pico-Board - mostly because I havent they available to test the code and compiled binary. ( I dont know how this is doen on the RP2040-Core) So I did create a Source for the Pico1 & Pico1W.
But you can support the board that you own with a fork on your github-page and i can set a link an my readme.md for users of your board.
Now to the "problem" with the 60K TPA:
The source you did clone from my github was set to use ABDOS.SYS for using more BIOS-calls than BDOS-calls. This is enabled in Line 35 of the globals.h with the command #define ABDOS
If you want to use ABDOS.SYS with the CCP-Z80.60K then you should copy /A/0/ABDOS.60K over /A/0/ABDOS.SYS (see also README.TXT inside the .ZIP which you did download from Github about 64K and 60K ABDOS.* files)
Then the with 60K TPA-Size compiled version of RunCPM should start successfully.
If you dont want to use ABDOS the commentz out line 35 of the globals.h // #define ABDOS and set your TPA-Size as desired.
In every case (as you already did) copy the appropriate CCP-File to the root of your SDCard like CCP-Z80.60K
The only CCP which doenst need an CCP-File is the "Internal" CCP.
Many thanks for building and using RunCPM on the Pico :)
Kind regards Guido Lehwalder
Dear Guido Lehwalder (@guidol70),
Thanks a lot for your detailed explanations! :)
Let me do the fork.
Best regards, Evgeny
Dear Guido,
I updated the instructions based on your helpful comments. I don't want to fork your repository though, because you keep your versions zipped. Which is not a problem since people can just follow my list of instructions.
Thank you again - CP/M in a pocket is fun. :)
Best wishes, Evgeny