As my vfat efforts took a tangent in different directions, I thought I better do a pull-request for the work done so far, as I'm worried if I wait till the complete vfat implementation is in, it'll be even larger, and an enormous pain to review.
So, work done so far:
VFAT
bringing across my prior vfat logic (for viewing the names of lfn entries)
enabled Paul's lfn shortname logic, which needs some more tlc before we can make full use of it
NOTE: I'll finalise vfat stuff in the next PR
Extra mega65_ftp commands to retrieve files from filehost
fh - lists the files on the filehost (prefacing each item with a numeric index)
fhget <idx> - retrieves the indexed file from the filehost (.prg files are automatically wrapped into a .d81)
Run mega65_ftp with -u username -p pwd args to also access private files on the filehost
Extra mega65_ftp perks for console-junkies
dput <file.prg> - wraps a local .prg file into a .d81 and then uploads it to the sd-card
dir command now sorts items alphabetically (with directories first, files after)
ldir - list the files in your local pc's current working directory.
lcd - change your local pc's current working-directory
lpwd - print out the path of your local pc's current working-directory
dir and ldir commands now support wildcards. E.g., dir *.ROM
Extra mega65_ftp commands for sd-card debugging
dirent_raw 0|1 (a debug flag to set to 0 or 1)
clustermap <startidx> [<count>] - show cluster-map entries for specified range.
secdump <filename> <startsec> <count> - dump the specified sector range to a file.
secrestore <filename> <startsec> - restore a dumped file back into the specified sector area.
secinfo - lists the locations of various useful sectors, for easy reference.
mbrinfo - lists the partitions specified in the MBR (sector 0)
vbrinfo - lists the VBR details of the main Mega65 partition
poke <sector> <offset> <val> - poke a value into a sector, at the desired offset.
More convenience env-vars for developers
The aim of these is to help speed up developer build iterations (all of these are on (1) by default):
DO_SMU=0|1 - turn off/on the git submodule update --init step within many build targets
DO_MKVER=0|1 - turn off/on the auto-generation of the version.c file via gitversion.sh script
DO_STATIC=0|1 - turn off/on the static-linking of libraries (mingw64-windows related only)
E.g., For faster builds, you might want to build with make DO_SMU=0 DO_MKVER=0 DO_STATIC=0 bin/mega65.ftp.exe (or add these env-vars into your ~/.bashrc)
OpenROMs improvements
Added extra slowdown for xemu+openroms
If openrom detected, don't use g080d to start the ftp-helper, use RUN instead
Other
Prevented the rename command from renaming a file to an existing file
As my vfat efforts took a tangent in different directions, I thought I better do a pull-request for the work done so far, as I'm worried if I wait till the complete vfat implementation is in, it'll be even larger, and an enormous pain to review.
So, work done so far:
VFAT
Extra mega65_ftp commands to retrieve files from filehost
fh
- lists the files on the filehost (prefacing each item with a numeric index)fhget <idx>
- retrieves the indexed file from the filehost (.prg files are automatically wrapped into a .d81)-u username -p pwd
args to also access private files on the filehostExtra mega65_ftp perks for console-junkies
dput <file.prg>
- wraps a local .prg file into a .d81 and then uploads it to the sd-carddir
command now sorts items alphabetically (with directories first, files after)ldir
- list the files in your local pc's current working directory.lcd
- change your local pc's current working-directorylpwd
- print out the path of your local pc's current working-directorydir
andldir
commands now support wildcards. E.g.,dir *.ROM
Extra mega65_ftp commands for sd-card debugging
dirent_raw 0|1
(a debug flag to set to 0 or 1)clustermap <startidx> [<count>]
- show cluster-map entries for specified range.secdump <filename> <startsec> <count>
- dump the specified sector range to a file.secrestore <filename> <startsec>
- restore a dumped file back into the specified sector area.secinfo
- lists the locations of various useful sectors, for easy reference.mbrinfo
- lists the partitions specified in the MBR (sector 0)vbrinfo
- lists the VBR details of the main Mega65 partitionpoke <sector> <offset> <val>
- poke a value into a sector, at the desired offset.More convenience env-vars for developers
The aim of these is to help speed up developer build iterations (all of these are on (1) by default):
DO_SMU=0|1
- turn off/on thegit submodule update --init
step within many build targetsDO_MKVER=0|1
- turn off/on the auto-generation of theversion.c
file viagitversion.sh
scriptDO_STATIC=0|1
- turn off/on the static-linking of libraries (mingw64-windows related only)E.g., For faster builds, you might want to build with
make DO_SMU=0 DO_MKVER=0 DO_STATIC=0 bin/mega65.ftp.exe
(or add these env-vars into your~/.bashrc
)OpenROMs improvements
g080d
to start the ftp-helper, useRUN
insteadOther
rename
command from renaming a file to an existing file