Skip to content
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 27 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
################################################################################
# This .gitignore file was automatically created by Microsoft(R) Visual Studio.
################################################################################
# see: https://github.com/github/gitignore/blob/main/VisualStudio.gitignore

*.user
*.user
*.vcxproj.FileListAbsolute.txt
*.vcxproj.filter
*.pdb
*.idb
*.tmp
*.obj
*.o
*.a
*.db
*.tlog
*.recipe
Expand Down Expand Up @@ -53,3 +50,27 @@ osdk/main/Osdk/_final_/Oricutron/videos/
osdk/OldVersions/
osdk/main/Osdk/_final_/sample/assembly/known_issues/
osdk/main/osdk_issues.md

euphoric_tools/4k8/4k8totap
euphoric_tools/4k8/4k8towav
euphoric_tools/txt2bas/txt2bas
osdk/main/DskTool/DskTool
osdk/main/FloppyBuilder/FloppyBuilder
osdk/main/MemMap/memmap
osdk/main/TapTool/TapTool
osdk/main/Ym2Mym/Ym2Mym
osdk/main/bas2tap/bas2tap
osdk/main/bin2txt/bin2txt
osdk/main/common/libcommon.a
osdk/main/compiler/compiler
osdk/main/filepack/filepack
osdk/main/header/header
osdk/main/link65/link65
osdk/main/macrosplitter/macrosplitter
osdk/main/old2mfm/old2mfm
osdk/main/opt65/opt65
osdk/main/pictconv/pictconv
osdk/main/tap2cd/tap2cd
osdk/main/tap2dsk/tap2dsk
osdk/main/xa/xa

41 changes: 39 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,44 @@
# ---------------------------------------------------------------
# Compiler selection (prefer Homebrew GCC if available)
# ---------------------------------------------------------------
CXX ?= g++-14 # or g++-15 / g++-16 if you prefer
CC ?= gcc-14

# ---------------------------------------------------------------
# Base flags
# ---------------------------------------------------------------
CFLAGS = -Wall -D_DEBUG -D__cdecl= -DPOSIX -Iincludes
CXXFLAGS = -Wall -D_DEBUG -D__cdecl= -DPOSIX -Iincludes
LDFLAGS =

# ---------------------------------------------------------------
# macOS-specific adjustments
# ---------------------------------------------------------------
UNAME_S := $(shell uname -s)

ifeq ($(UNAME_S),Darwin)

ifeq (, $(shell which g++-14))
$(error g++-14 not found. Run: brew install gcc@14 freeimage)
endif

# Force C++14 (required for multi-statement constexpr)
CXXFLAGS += -std=c++14

# Optional but useful for older codebases on modern macOS
CFLAGS += -Wno-implicit-function-declaration
CXXFLAGS += -Wno-implicit-function-declaration

# Uncomment if you still hit C23 keyword problems in C files
# CFLAGS += -std=gnu99
endif

# Make sure the sub-makes see the flags
export CC CXX CFLAGS CXXFLAGS LDFLAGS

SUBDIRS := shared_libraries euphoric_tools osdk

all install clean:
@for d in $(SUBDIRS); do \
$(MAKE) -C "$$d" $(MAKECMDGOALS) || exit $?; \
$(MAKE) -C "$$d" $(MAKECMDGOALS) || exit $$?; \
done

12 changes: 11 additions & 1 deletion osdk/main/FloppyBuilder/Floppy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
#include <iostream>
#include <string>
#include <string.h>
#include <ctime>
#include <iomanip>

#include <chrono>
#include <format> // C++20
Expand Down Expand Up @@ -889,10 +891,18 @@ void Floppy::MarkCurrentSectorUsed()

bool Floppy::SaveDescription(const char* fileName) const
{
auto now = std::chrono::system_clock::now();
std::time_t t = std::chrono::system_clock::to_time_t(now);
std::stringstream layoutInfo;

layoutInfo << "//\n";
layoutInfo << "// Floppy layout generated by FloppyBuilder " << TOOL_VERSION_MAJOR << "." << TOOL_VERSION_MINOR << " on " << std::format("{:%Y-%m-%d %H:%M:%S}", std::chrono::floor<std::chrono::seconds>(std::chrono::system_clock::now())) << "\n";

layoutInfo << "// Floppy layout generated by FloppyBuilder "
<< TOOL_VERSION_MAJOR << "."
<< TOOL_VERSION_MINOR
<< " on "
<< std::put_time(std::localtime(&t), "%Y-%m-%d %H:%M:%S")
<< "\n";

if (!m_AllFilesAreResolved)
{
Expand Down
29 changes: 23 additions & 6 deletions osdk/main/FloppyBuilder/Makefile
Original file line number Diff line number Diff line change
@@ -1,19 +1,36 @@
include ../../../rules.mk

CPPFLAGS += -Wall -Iincludes
# ------------------------------------------------------------------
# Force Homebrew GCC on macOS – never use system g++ (Apple Clang)
# Note: FloppyBuilder uses and requires c++-20 features
# ------------------------------------------------------------------
UNAME_S := $(shell uname -s)
ifeq ($(UNAME_S),Darwin)
CXX := g++-14
CC := gcc-14
endif

CPPFLAGS += -Wall -Iincludes
CPPFLAGS += -I ../common/includes
LDLIBS += -lstdc++ -L ../common -lcommon $(COMMON_EXTRA_LDFLAGS)

LDLIBS += -L ../common -lcommon $(COMMON_EXTRA_LDFLAGS)

CXXFLAGS += -Wno-unknown-pragmas

SOURCES=FloppyBuilder.cpp Floppy.cpp

OBJECTS=$(SOURCES:.cpp=.o)
EXECUTABLE=FloppyBuilder$(EXE)
OBJECTS = $(SOURCES:.cpp=.o)
EXECUTABLE = FloppyBuilder$(EXE)

all: $(SOURCES) $(EXECUTABLE)
.PHONY: all clean

all: $(EXECUTABLE)

$(EXECUTABLE): $(OBJECTS)
$(CXX) $(CXXFLAGS) $(CPPFLAGS) $^ $(LOADLIBES) $(LDLIBS) -o $@

sources/Link65.o: sources/Link65.cpp
$(CXX) $(CXXFLAGS) $(CPPFLAGS) -c -o $@ $<

clean:
rm -f $(EXECUTABLE) $(OBJECTS)

30 changes: 22 additions & 8 deletions osdk/main/MemMap/Makefile
Original file line number Diff line number Diff line change
@@ -1,21 +1,35 @@
include ../../../rules.mk

CPPFLAGS += -Wall -Iincludes
CPPFLAGS += -Wno-unknown-pragmas
# ------------------------------------------------------------------
# Force Homebrew GCC on macOS – never use system g++ (Apple Clang)
# ------------------------------------------------------------------
UNAME_S := $(shell uname -s)
ifeq ($(UNAME_S),Darwin)
CXX := g++-14
CC := gcc-14
endif

CPPFLAGS += -Wall -Iincludes
CPPFLAGS += -I ../common/includes
LDLIBS += -L ../common -lcommon $(COMMON_EXTRA_LDFLAGS)

LDLIBS += -L ../common -lcommon $(COMMON_EXTRA_LDFLAGS)

CXXFLAGS += -Wno-unknown-pragmas

SOURCES=sources/memmap.cpp

OBJECTS=$(SOURCES:.cpp=.o)
EXECUTABLE=memmap$(EXE)
OBJECTS = $(SOURCES:.cpp=.o)
EXECUTABLE = memmap$(EXE)

all: $(SOURCES) $(EXECUTABLE)
.PHONY: all clean

all: $(EXECUTABLE)

$(EXECUTABLE): $(OBJECTS)
$(LINK.o) $^ $(LOADLIBES) $(LDLIBS) -o $@
$(CXX) $(CXXFLAGS) $(CPPFLAGS) $^ $(LOADLIBES) $(LDLIBS) -o $@

sources/Link65.o: sources/Link65.cpp
$(CXX) $(CXXFLAGS) $(CPPFLAGS) -c -o $@ $<

clean:
rm -f $(EXECUTABLE) $(OBJECTS)

30 changes: 22 additions & 8 deletions osdk/main/TapTool/Makefile
Original file line number Diff line number Diff line change
@@ -1,21 +1,35 @@
include ../../../rules.mk

CPPFLAGS += -Wall -Iincludes
CPPFLAGS += -Wno-unknown-pragmas -Wno-deprecated-declarations
# ------------------------------------------------------------------
# Force Homebrew GCC on macOS – never use system g++ (Apple Clang)
# ------------------------------------------------------------------
UNAME_S := $(shell uname -s)
ifeq ($(UNAME_S),Darwin)
CXX := g++-14
CC := gcc-14
endif

CPPFLAGS += -Wall -Iincludes
CPPFLAGS += -I ../common/includes
LDLIBS += -L ../common -lcommon $(COMMON_EXTRA_LDFLAGS)

SOURCES=sources/TapTool.cpp
LDLIBS += -L ../common -lcommon $(COMMON_EXTRA_LDFLAGS)

CXXFLAGS += -Wno-unknown-pragmas

OBJECTS=$(SOURCES:.cpp=.o)
SOURCES=sources/TapTool.cpp

OBJECTS = $(SOURCES:.cpp=.o)
EXECUTABLE=TapTool$(EXE)

all: $(SOURCES) $(EXECUTABLE)
.PHONY: all clean

all: $(EXECUTABLE)

$(EXECUTABLE): $(OBJECTS)
$(LINK.o) $^ $(LOADLIBES) $(LDLIBS) -o $@
$(CXX) $(CXXFLAGS) $(CPPFLAGS) $^ $(LOADLIBES) $(LDLIBS) -o $@

sources/Link65.o: sources/Link65.cpp
$(CXX) $(CXXFLAGS) $(CPPFLAGS) -c -o $@ $<

clean:
rm -f $(EXECUTABLE) $(OBJECTS)

22 changes: 15 additions & 7 deletions osdk/main/TapTool/sources/TapTool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <cstdio>
#include <cstring>


#define FALSE 0
Expand Down Expand Up @@ -227,19 +229,25 @@ void emit_fast_prog(int start,int end)
emit_standard_byte(0xFF); /* marker for last page */
}


void ask_name(char *name)
{
char reply[80];
do {
if (name[0])
printf("Stored name is %s, enter new name (or RETURN to keep): ",name);
else
printf("Program has no stored name, enter a name: ");
gets_s(reply,sizeof(reply));
if (reply[0]) strcpy(name,reply);
} while (name[0]==0);
if (name[0]) { printf("Stored name is %s, enter new name (or RETURN to keep): ", name); }
else { printf("Program has no stored name, enter a name: "); }
#ifdef _MSC_VER
gets_s(reply, sizeof(reply));
#else
if (fgets(reply, sizeof(reply), stdin) == nullptr) { reply[0] = '\0'; }
else { reply[strcspn(reply, "\r\n")] = '\0'; }
// Remove trailing newline (and optional CR for CRLF input)
#endif
if (reply[0]) { strcpy(name, reply); }
} while (name[0] == 0);
}


int main(int argc,char *argv[])
{
printf("\nTapTool: A multi-tape-tool based on Tap2CD by Fabrice Frances. Version %d.%3d\n\n",TOOL_VERSION_MAJOR,TOOL_VERSION_MINOR);
Expand Down
29 changes: 22 additions & 7 deletions osdk/main/Ym2Mym/Makefile
Original file line number Diff line number Diff line change
@@ -1,21 +1,36 @@
include ../../../rules.mk

CPPFLAGS += -Wall -Iincludes
# ------------------------------------------------------------------
# Force Homebrew GCC on macOS – never use system g++ (Apple Clang)
# ------------------------------------------------------------------
UNAME_S := $(shell uname -s)
ifeq ($(UNAME_S),Darwin)
CXX := g++-14
CC := gcc-14
endif

CPPFLAGS += -Wall -Iincludes
CPPFLAGS += -I ../common/includes
LDLIBS += -L ../common -lcommon $(COMMON_EXTRA_LDFLAGS)

LDLIBS += -L ../common -lcommon $(COMMON_EXTRA_LDFLAGS)

CXXFLAGS += -Wno-unknown-pragmas

SOURCES=sources/lzhlib.cpp \
sources/Ym2Mym.cpp

OBJECTS=$(SOURCES:.cpp=.o)
EXECUTABLE=Ym2Mym$(EXE)
OBJECTS = $(SOURCES:.cpp=.o)
EXECUTABLE = Ym2Mym$(EXE)

all: $(SOURCES) $(EXECUTABLE)
.PHONY: all clean

all: $(EXECUTABLE)

$(EXECUTABLE): $(OBJECTS)
$(LINK.o) $^ $(LOADLIBES) $(LDLIBS) -o $@
$(CXX) $(CXXFLAGS) $(CPPFLAGS) $^ $(LOADLIBES) $(LDLIBS) -o $@

sources/Link65.o: sources/Link65.cpp
$(CXX) $(CXXFLAGS) $(CPPFLAGS) -c -o $@ $<

clean:
rm -f $(EXECUTABLE) $(OBJECTS)

31 changes: 23 additions & 8 deletions osdk/main/bas2tap/Makefile
Original file line number Diff line number Diff line change
@@ -1,19 +1,34 @@
include ../../../rules.mk

CPPFLAGS= -Wall -Iincludes
# ------------------------------------------------------------------
# Force Homebrew GCC on macOS – never use system g++ (Apple Clang)
# ------------------------------------------------------------------
UNAME_S := $(shell uname -s)
ifeq ($(UNAME_S),Darwin)
CXX := g++-14
CC := gcc-14
endif

CPPFLAGS += -Wall -Iincludes
CPPFLAGS += -I ../common/includes
LDLIBS += -L ../common -lcommon $(COMMON_EXTRA_LDFLAGS)
SOURCES=sources/bas2tap.cpp

OBJECTS=$(SOURCES:.cpp=.o)
EXECUTABLE=bas2tap$(EXE)
LDLIBS += -L ../common -lcommon $(COMMON_EXTRA_LDFLAGS)

all: $(SOURCES) $(EXECUTABLE)
CXXFLAGS += -Wno-unknown-pragmas

SOURCES = sources/bas2tap.cpp
OBJECTS = $(SOURCES:.cpp=.o)
EXECUTABLE = bas2tap$(EXE)

.PHONY: all clean

all: $(EXECUTABLE)

$(EXECUTABLE): $(OBJECTS)
$(LINK.o) $^ $(LOADLIBES) $(LDLIBS) -o $@
$(CXX) $(CXXFLAGS) $(CPPFLAGS) $^ $(LOADLIBES) $(LDLIBS) -o $@

sources/Link65.o: sources/Link65.cpp
$(CXX) $(CXXFLAGS) $(CPPFLAGS) -c -o $@ $<

clean:
rm -f $(EXECUTABLE) $(OBJECTS)

Loading