Giter Site home page Giter Site logo

jamarju / easyflash Goto Github PK

View Code? Open in Web Editor NEW
8.0 8.0 2.0 9.88 MB

Easyflash 3 toolset for macOS (fork of: http://bitbucket.org/skoe/easyflash)

Makefile 5.28% Assembly 27.40% C 42.59% sed 0.80% C++ 5.84% TeX 3.70% Python 1.65% CMake 2.18% VHDL 9.82% HTML 0.02% Shell 0.24% NASL 0.01% SWIG 0.45%
commodore-64 easyflash3

easyflash's People

Contributors

alexkazik avatar skoe avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

bsdf jondalar

easyflash's Issues

make error

I wanted to compile EasyTransfer:

make: *** No rule to make target 3/_Tools_also_MacOS/_MacOS/easyflash-master/easyflash-master/EasyTransfer/archive/%.tar.gz', needed by Flash'. Stop.

Some fixes for Apple Silicon & Ventura

Hello! I just thought I'd leave some recent hints here, in case somebody else is looking to compile this repo.

According to the docs:
brew install acme cc65 libftdi0 cmake confuse imagemagick

In my experience, you also want to:
brew install gcc libusb libusb-compat libftdi0 imagemagick

Then there is an issue I wasn't able to solve: brew install wxwidgets --with-static doesn't work anymore, because option "--with-static" was removed. My solution was to remove --static from WXCONFIGLIBS and just link dynamically, because I didn't manage to build wxWidgets in a way on Apple Silicon that would allow for static linking ¯_(ツ)_/¯ For the bold, you can try to follow this: https://www.betamaster.us/blog/?p=1999 and contribute back here if you manage to make it work.

Then there are a couple of code changes, since applications now needs to add the Security framework if they use libusb-1.0.a.

diff --git a/EasyTransfer/Makefile b/EasyTransfer/Makefile
index 3702699..9c1848a 100644
--- a/EasyTransfer/Makefile
+++ b/EasyTransfer/Makefile
@@ -53,7 +53,7 @@ ifeq ($(win32), yes)
 else
 	LIBDIR        := /usr/local/lib
 	# Link to static wx
-	WXCONFIGLIBS  := $(shell wx-config --static --libs)
+	WXCONFIGLIBS  := $(shell wx-config --libs)
 	# Link to static dependencies, too
 	WXCONFIGLIBS  := $(WXCONFIGLIBS:-lpng=$(LIBDIR)/libpng.a)
 	WXCONFIGLIBS  := $(WXCONFIGLIBS:-ljpeg=$(LIBDIR)/libjpeg.a)
@@ -63,9 +63,9 @@ else
     cxx           := c++
     cc            := gcc
     outbase       := $(top_dir)/out
-    cxxflags      += $(shell wx-config --static --cxxflags)
-    cxxlibs       += $(LIBDIR)/libftdi.a $(LIBDIR)/libusb.a $(LIBDIR)/libusb-1.0.a $(WXCONFIGLIBS) -lpthread
-    clibs         += $(LIBDIR)/libftdi.a $(LIBDIR)/libusb.a $(LIBDIR)/libusb-1.0.a -framework IOKit -framework CoreFoundation
+    cxxflags      += $(shell wx-config --cxxflags)
+    cxxlibs       += $(LIBDIR)/libftdi.a $(LIBDIR)/libusb.a $(LIBDIR)/libusb-1.0.a $(WXCONFIGLIBS) -lpthread  -framework Security
+    clibs         += $(LIBDIR)/libftdi.a $(LIBDIR)/libusb.a $(LIBDIR)/libusb-1.0.a -framework IOKit -framework CoreFoundation -framework Security
     archive_fmt   := tar.bz2
     icon_resize   :=
 
@@ -274,7 +274,7 @@ $(objdir)/%.o: $(objdir)/%.c $(headers) | pre_deps
 
 $(objdir)/%.c: $(srcdir)/%.prg | $(objdir) pre_deps
 	mkdir -p $(dir $@)
-	python make/bin2c.py $< $@ $(notdir $(basename $@))
+	python3 make/bin2c.py $< $@ $(notdir $(basename $@))
 
 $(objdir)/%.res.o: $(srcdir)/%.rc | $(objdir) pre_deps
 	$(windres) -I $(objdir) $< $@
diff --git a/EasyTransfer/make/bin2c.py b/EasyTransfer/make/bin2c.py
index 3816ae8..95ade9d 100644
--- a/EasyTransfer/make/bin2c.py
+++ b/EasyTransfer/make/bin2c.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 import sys
 
 
@@ -7,14 +7,14 @@ if __name__ == '__main__':
         if sys.argv[1] == '-':
             instream = sys.stdin
         else:
-            instream = file(sys.argv[1],'rb')
+            instream = open(sys.argv[1],'rb')
         if sys.argv[2] == '-':
             outstream = sys.stdout
         else:
-            outstream = file(sys.argv[2], 'wt')
+            outstream = open(sys.argv[2], 'wt')
         varname = sys.argv[3]
     else:
-        print "Usage: bin2c infile outfile varname"
+        print("Usage: bin2c infile outfile varname")
         sys.exit(0)
 
     outstream.write("\n\nconst unsigned char %s[] = {\n    " % varname)
@@ -31,3 +31,4 @@ if __name__ == '__main__':
     outstream.write("\nint %s_size = %i;\n\n" % (varname, written))
 
     sys.exit(0)
+
diff --git a/EasyTransfer/src/ef3xfer_log.c b/EasyTransfer/src/ef3xfer_log.c
index 638de48..cdb6625 100644
--- a/EasyTransfer/src/ef3xfer_log.c
+++ b/EasyTransfer/src/ef3xfer_log.c
@@ -23,6 +23,7 @@
 
 #include <stdarg.h>
 #include <string.h>
+#include <stdio.h>
 
 #include <ftdi.h>
 
diff --git a/EasyTransfer/src/ef3xfer_usb_test.c b/EasyTransfer/src/ef3xfer_usb_test.c
index 2de5210..264cd4d 100644
--- a/EasyTransfer/src/ef3xfer_usb_test.c
+++ b/EasyTransfer/src/ef3xfer_usb_test.c
@@ -31,7 +31,7 @@
 
 static int test_sequence(void);
 static int check_usb_with_value(uint8_t val);
-
+int run_usb_test();
 
 /*****************************************************************************/
 /**

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.