Skip to content

Commit

Permalink
Merge pull request davidgiven#165 from davidgiven/neo6502
Browse files Browse the repository at this point in the history
Avoid needing to put CP/M in the root directory of the neo6502.
  • Loading branch information
davidgiven authored Sep 5, 2024
2 parents ea67f53 + 870bad4 commit 6ce629e
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 15 deletions.
12 changes: 7 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
17 changes: 7 additions & 10 deletions src/arch/neo6502/neo6502.S
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -1017,19 +1017,16 @@ 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?
lda current_drive
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
Expand Down

0 comments on commit 6ce629e

Please sign in to comment.