Git Product home page Git Product logo

ishkurcpm's Introduction

Ishkur CP/M

An open source, modular CP/M distribution for the NABU computer. It is designed to work with both cloud based and local storage options. It is still very much a work in progress.

One of the core design ideas behind Ishkur is device modularity. Unlike standard CP/M, devices in Ishkur CP/M are self-contained. The only file that needs to be modified in order to add, remove, or reconfigure device drivers is config.asm. This makes spinning up a custom distribution that matches a target machine's hardware capabilities very easy. The hope is that this will facilitate support for a wide range of custom hobbyist hardware and software projects.

Progress

As of updating this file. The NHACP-based system is nominally functional on real hardware. The FDC-based system works both in emulator and on hardware. Right now, the system is fairly bare-bones. However, the following features are included:

  • Emulated VDP terminal with ADM-3A escape code support
  • 80 column screen scrolling
  • F18A 80 column mode
  • Multi-directory submit files
  • PROFILE.SUB auto execution at startup
  • Full support for SSDD floppy disks on the FDC
  • Ability to access virtual disks over a NHACP connection
  • Direct file access over a NHACP connection
  • Modified IOBYTE device redirection
  • NABU printer support
  • NABU serial option card support

Near-term goals include printer support, serial card support, and console redirection over NHACP, and maybe NABU-IDE support.

Platform Distributions

NABU FDC

Fairly self-explanatory. This is your classic CP/M operational environment. This allows the NABU to run completely disconnected from adapter software. Assuming the boot ROM is correct, this ishkur_fdc_ssdd.img disk image will self boot and contain a minimal set of CP/M software.

In order to modify or create a new disk image, cpmtools can be used. The disk format being used for this device is the osborne1 diskdef. This also means that this distribution is capable of reading and writing from genuine Osborne 1 disk images. This is a fairly common disk format, so it can allow the NABU to act as a data transfer intermediate between a modern computer and older CP/M machines.

NHACP NDSK

This distribution boots up from a NHACP-based network disk image. This image is treated as a normal drive by CP/M, and therefore contains a full CP/M 2.2 file system. The capacity of this emulated drive is 8MB, so there is plenty of space for programs and data. The disk format being used for this device is the nshd8 diskdef.

It should be noted that the virtual disk image must be at least 8196 bytes long, or else it will result in read errors.

In order to boot NDSK from NHACP, the following files must be setup from the Output_NDSK directory:

  1. Output/FONT.GRB must be moved to the NHACP root directory
  2. NDSK_CPM22.SYS must be renamed to CPM22.SYS and moved to the NHACP root directory
  3. NDSK_DEFAULT.IMG must be renamed to NDSK_A.IMG and moved to the NHACP root directory
  4. NDSK_BOOT.nabu must be renamed to 000001.nabu and moved to your adapter homebrew directory

NHACP NDSK + FDC (Hybrid)

This build works exactly like the standard NHACP NDSK build, but has added support for the floppy drives. Logical drives C: and D: are mapped to floppy drive 0 and 1 respectively.

NHACP NFS

Similar to the NDSK distribution in that it functions over NHACP. However, it does not utilize a virtual disk image, and instead accesses remote file systems directly. This works by intercepting BDOS calls directly instead of servicing BIOS calls like a standard CP/M driver. However, NFS is still able to work alongside more traditional storage drivers by only intercepting calls that pertain to it.

Under NFS, each logical drive and user number combination corresponds to a different folder on the host system. The logical device will be converted to a letter A-P, and the user number will be converted to hexadecimal 0-F. For example, device 0 with user 0 will convert to the directory A0/. For most distribution, CP/M drives are mapped 1-1 with similarly named folders on the host system.

In order to boot NFS from NHACP, the following files must be setup from the Output/Nabu_NFS directory:

  1. Output/FONT.GRB must be moved to A0/ in the NHACP root directory
  2. Optionally, all files in the Directory folder should be moved into A0/ to give you some software to run on boot
  3. NDSK_CPM22.SYS must be renamed to CPM22.SYS and moved to A0/ in the NHACP root directory
  4. NFS_BOOT.nabu must be renamed to 000001.nabu and moved to your adapter homebrew directory

NFS NDSK + FDC (Hybrid)

Similar to NDSK hybrid. Logical drives C: and D: are mapped to floppy drive 0 and 1 respectively.

NABU-IDE

Unlike the other builds, there is no disk image available to install this version. Instead, the IDEGEN.COM utility must be used to generate a system on the attached IDE drive. When the program is run, the user will be prompted to choose a system image. It is recommended that the IDE + NFS system is built first so that software can be downloaded onto the IDE drive later. Formatting can be disabled to allow user data to persist during a system generate.

Currently, the IDE driver allocates 32MB of the disk. This is divided up into four 8MB partitions, and mapped to A: - D: respectivly. The IDE drive must be at least 32MB in size, and free of any errors.

The bootstrap and driver code expect the NABU-IDE to have a I/O base of 0xC0. Therefore, the card must be placed in the first slot / be the first card in the daisy chain.

Building

Windows

In order to build on Windows, ensure the following programs are installed:

  • Python3

After that, go into the Scripts directory and run build.bat. This will take care of all assembly and boot image creation.

UNIX-likes

There is a makefile in development to build all of the different Ishkur configurations. Hopefully this will become the default build method once it is finished.

ishkurcpm's People

Contributors

tergav17 avatar brijohn avatar thorpej avatar

Stargazers

intangybles avatar  avatar Alexander Jacocks avatar Anonymous Monk  avatar Cronomantic avatar Les Bird avatar Jeremy Penner avatar Christopher Masto avatar  avatar Sylvain Glaize avatar  avatar Oliver Narragansett avatar Jay Crutti avatar Chad Doebelin avatar Radosław Kujawa avatar Gregory McGill avatar  avatar Bocke avatar  avatar Jeffery Stone avatar  avatar Christopher Farrar avatar  avatar

Watchers

Christopher Masto avatar  avatar Jeffery Stone avatar  avatar Nick Daniels avatar

ishkurcpm's Issues

Problem copying files to an 'NFS' directory

If do pip test.com=ddt.com it chugs away for a bit and returns to the prompt with no error messages. Under CP/M dir fails to show the target file. If I look at the server directory from the host machine I see test.$$$. This is a temporary file created by pip that's normally renamed to the correct extension after copy succeeds. For whatever reason, that's not happening. A quick binary compare suggests the copy was indeed successful, with the output file showing some garbage at the very end (maybe from rounding up to next 128-byte record size?).

I suppose the failure of dir to show the temporary file could also be considered a bug.

Again, if I can get setup to build Ishkur on Linux and deploy to the nabunetwork.ca adapter I'd be delighted to help in debugging.

Correctly modified prompt

Hey great to see this. Here's a correctly modified prompt from the newer cloud cpm bios.

`
//
// Entry point to get a command line from the console.
//
CMMND1: LD SP,CCPSTACK // set stack straight.
CALL CRLF // start a new line on the screen.
CALL GETDSK // get current drive.
ADD A,'A'
CALL PRINT // print current drive.
LD A,':'
CALL PRINT // spacer

LD  A, 0x09
ld  hl, USERNO
sub a, (hl)
jr NC, CMMND1ISSINGLEDIGIT

LD  A, '1'
CALL	PRINT		// print user number

LD  A,(USERNO)
sub a, 10
ADD	A,'0'
jr CMMND1PRINTDONE

CMMND1ISSINGLEDIGIT:
LD A,(USERNO)
ADD A,'0'

CMMND1PRINTDONE:
CALL PRINT // print user number
LD A,'>'
CALL PRINT // and add prompt.
CALL GETINP // get line from user.
`

Linux build process

Unless I'm missing the obvious, this is going to be very invasive. For whatever reason, zasm on Linux requires #included ASM source files to be in the same directory as the source that requires them. So, after cd'ing to the System subdirectory, this fails immediately:

zasm config/config_fdc.asm -u -w -b cpm22.bin

If I symlink CPM22.asm into the config subdirectory it finds the included file. I don't have the energy to dig through the zasm sources, but I'm guessing there's an implicit chdir() to config that does not happen on Windows. None of this would be a problem if zasm respected -I <dir>, but it does not seem to.

NZCOM incompatibility

The NZCOM setup utility does not appear to work in this environment. This suggests a low-level incompatibility with CP/M, since the 'MKZCM' program tries to be as vanilla as it can be. Under either an NFS or .IMG filesystem MKZCM just hangs. Trying to debug this on NABU hardware is going to be painful so I'll look into setting up an emulator.

CCP built-in 'era' not handling '*.*' wildcards

I can delete files by specifying their exact name and/or wildcarding only one of name and extension. If I enter era *.* it asks me "All?". I enter 'Y' and it immediately warm-boots back to the prompt with no action taken.

Spontaneous line feeds

At first I thought this was my imagination, but it's really happening. At intervals the CP/M screen shifts upward by 2 or 3 lines, leaving prompts and a solid, static cursor on those lines. The real prompt and cursor appears below and the system is still functional. When it happened a few minutes ago it coincided with communications activity on the RS422 link. The end result looks like (# = cursor block):

A0>#  < - solid
A0># <- solid
A0>
A0># <- flashing

How to install, exactly?

Sorry to be dense, but how exactly do I install this code? The standalone FDC based system is obvious, but the one that boots over the wire isn't quite clear. What is an NHACP directory? How do I set one up and define it to one of the internet adapters? Similarly, how to setup a 'homebrew' directory and define it to the adapter? I have an older version of IshkurCPM that came with NABU_Server_Linux_v2.0. It works just fine, but per the above, I cannot successfully define a different CP/M system in that server.

FONT.GRB is opened with NHACP_O_RDWR, should be NHACP_O_RDONLY

Debug trace from nabud:

DEBUG: nhacp_req_storage_open: [::ffff:127.0.0.1] nhacp_o_flags 0x0001 -> fileio_o_flags 0x00000041
INFO: stext_file_open: [::ffff:127.0.0.1] Opening 'FONT.GRB'
ERROR: stext_file_open: [::ffff:127.0.0.1] Unable to open file 'FONT.GRB': Permission denied

This obviously makes the boot fail if the Ishkur system binaries are installed into the host system as read-only.

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.