From 870bad45da9cb3020be3ed242404da7abd81ca24 Mon Sep 17 00:00:00 2001 From: David Given Date: Thu, 5 Sep 2024 17:19:18 +0200 Subject: [PATCH] Avoid needing to put CP/M in the root directory of the neo6502. --- README.md | 12 +++++++----- src/arch/neo6502/neo6502.S | 17 +++++++---------- 2 files changed, 14 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index 781ce756..42c7ad0a 100644 --- a/README.md +++ b/README.md @@ -300,13 +300,15 @@ the same time. package.) - It is ridiculously fast. - - - To use, unzip the `cpm65.zip` file into the root directory of the USB stick - or other storage card. Then enter `load "cpm65.neo"` at the prompt. CP/M-65 - will run. + + - To use, unzip the `cpm65.zip` file into the any directory of the USB stick + or other storage card. Then enter `*cd your_directory_name` and then `load + "cpm65.neo"` at the prompt. CP/M-65 will run. - To run on the emulator, either load it as above, or boot it directly with - `neo cpm65.neo@8000 run@8010`. + `neo CPM65.NEO@8000 run@8010`. Remember that if you're running the emulator + on Linux, the filesystem is CASE SENSITIVE so you need to spell `CPM65.NEO` + using capital letters. (One CP/M-65 is running this is no longer a concern.) - This port uses an emulated BDOS, meaning that it stores its files as FAT files on the neo6502's USB stick. Most well-behaved CP/M-65 programs will diff --git a/src/arch/neo6502/neo6502.S b/src/arch/neo6502/neo6502.S index 8613eaf5..96c42acb 100644 --- a/src/arch/neo6502/neo6502.S +++ b/src/arch/neo6502/neo6502.S @@ -55,12 +55,12 @@ FIOATTR_ARCHIVE = 1<<2 FIOATTR_READONLY = 1<<3 FIOATTR_HIDDEN = 1<<4 -; Filenames are of the form: "/A10/ABCDEFGH.XYZ" +; Filenames are of the form: "A10/ABCDEFGH.XYZ"+0 (17 bytes) FT_ATTRIBS = 0 ; top bit indicate file is in use FT_FILENAMELEN = 1 FT_FILENAME = 2 -FT__SIZE = 20 +FT__SIZE = 19 NUM_FILES = 8 @@ -405,8 +405,8 @@ zproc bdos_FINDFIRST ; ; ?:????????.??? - jsr convert_filename ; Filename is '/A5/ABCDEFGH.IJK' - jsr truncate_filename_to_directory ; Filename should look like '/A5' + jsr convert_filename ; Filename is 'A5/ABCDEFGH.IJK' + jsr truncate_filename_to_directory ; Filename should look like 'A5' lda #<(temp_file_entry+FT_FILENAMELEN) sta CP_PARAM+0 @@ -551,7 +551,7 @@ zproc bdos_FINDNEXT zendproc zproc truncate_filename_to_directory - ldx #2 + ldx #1 lda temp_file_entry+FT_FILENAME, x cmp #'/' zif_ne @@ -1017,9 +1017,6 @@ zendproc zproc convert_filename stz temp_file_entry+FT_ATTRIBS - lda #'/' - sta temp_file_entry+FT_FILENAME+0 - lda (param) ; drive dec zif_mi ; no drive specified? @@ -1027,9 +1024,9 @@ zproc convert_filename zendif clc adc #'A' - sta temp_file_entry+FT_FILENAME+1 + sta temp_file_entry+FT_FILENAME+0 - ldx #2 + ldx #1 lda current_user zif_ne cmp #9