Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Dsk -> Hfe Gotek USB Floppy image export #27

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
59 changes: 59 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,62 @@ printer.txt
*.binamsdos
*.binamsdos.log
cpctelera/tools/sdcc-3.5.0/share

*.cpc
*.tmp
\#*#
.#*
*.html
*.disabled
*.bak
**/sdcc-3.5.5/**/*.asm
**/img2cpc/Makefile.this
**/sdcc-3.5.5/share/
**/winape/
*.mp3
*.wav
*.status
*.log
*~
*.bak
*.bin
*.bin.log
*.binamsdos
*.binamsdos.log
build_config.inc
*.buildtree/
*.cdt
download
*.downloadlog.txt
*.dsk
*.ihx
*.installtree/
*.lib
*.lk
*.lst
*.map
*.noi
*.opt
*.ref
*.rel
*.rst
*.sym
*.tar.bz2
*.tgz
*.tmp
*.voc
*.o
bin/
obj/

printer.txt
*.dump*_*.dot
*~HEAD
*~junk
*~Junk

*.binamsdos
*.binamsdos.log
cpctelera/tools/sdcc-3.5.0/share

*.hfe
10 changes: 10 additions & 0 deletions cpctelera/cfg/global_functions.mk
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,16 @@ $(3): $(2)

endef

#################
# CONVERTHFE: Convert Dsk to Hfe file for Gotek USB driver
#
# $(1): DSK file where the binary will be included
#
define CONVERTHFE
@$(HFE) $(1) -HFE &> /dev/null
@$(call PRINT,$(1),"Convert DSK file $(1) to HFE")
endef

#################
# CREATECDT: Create a CDT file with the BINARY added to it and converted to AMSDOS BINARY
#
Expand Down
6 changes: 6 additions & 0 deletions cpctelera/cfg/global_main_makefile.mk
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,12 @@ $(DSKINC): $(DSK) $(DSKINCOBJFILES)
@$(call PRINT,$(PROJNAME),"All files added to $(DSK). Disc ready.")
@touch $(DSKINC)

# GENERATE AN HFE FILE WITH DSK FILE FOR GOTEK USB FLOPPY DISK
%.hfe: $(DSK)
@$(call PRINT,$(PROJNAME),"Creating Hfe File $(DSK) ")
@$(call CONVERTHFE,$(DSK))
@$(call PRINT,$(PROJNAME),"Successfully created $@")

# CREATE OBJDIR & SUBDIRS IF THEY DO NOT EXIST
$(OBJSUBDIRS):
@$(MKDIR) $@
Expand Down
2 changes: 2 additions & 0 deletions cpctelera/cfg/global_paths.mk
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ HEX2BIN_PATH := $(CPCT_PATH)tools/hex2bin-2.0/bin/
IDSK_PATH := $(CPCT_PATH)tools/iDSK-0.13/bin/
2CDT_PATH := $(CPCT_PATH)tools/2cdt/bin/
SCRIPTS_PATH := $(CPCT_PATH)tools/scripts/
HFE_PATH := $(CPCT_PATH)tools/hxcfe-1.6.11.16/

# PATHs FOR CPCTELERA SOURCES AND LIBRARY FILE
CPCT_SRC := $(CPCT_PATH)src
Expand All @@ -74,6 +75,7 @@ HEX2BIN := $(HEX2BIN_PATH)hex2bin
IDSK := $(IDSK_PATH)iDSK
2CDT := $(2CDT_PATH)2cdt
BIN2C := $(SCRIPTS_PATH)cpct_bin2c
HFE := $(HFE_PATH)hxcfloppyemulator_convert.exe

## SHELL TOOLS ALIASES
TOUCH := touch
Expand Down
Loading