mrehkopf / sd2snes

SD card based multi-purpose cartridge for the SNES
http://sd2snes.de
GNU General Public License v2.0
590 stars 115 forks source link

please help pic 12f629 it is very expensive. build 12f675? #135

Closed darleiv closed 3 years ago

darleiv commented 4 years ago

how do I recompile super cic to use the pic 12f675 ??? don't you have this compilation? the 12f629 is too expensive

magu commented 4 years ago

Using the lock.asm as template and modifying the key file should get you there. supercic_12f675.patch.txt

diff --git a/cic/supercic/Makefile b/cic/supercic/Makefile
index 511c521..daffc59 100644
--- a/cic/supercic/Makefile
+++ b/cic/supercic/Makefile
@@ -1,4 +1,4 @@
-KEY_ARCH = p12f629
+KEY_ARCH = p12f675
 LOCK_ARCH = p16f630

 all: supercic-key.hex supercic-lock.hex
diff --git a/cic/supercic/supercic-key.asm b/cic/supercic/supercic-key.asm
index e3bdfea..a966221 100644
--- a/cic/supercic/supercic-key.asm
+++ b/cic/supercic/supercic-key.asm
@@ -1,5 +1,12 @@
-    #include <p12f629.inc>
-processor p12f629
+use_12f675  set 1 ; 0 = 12F629, 1 = 12F675
+
+if use_12f675
+  #include <p12f675.inc>
+  processor p12f675
+else
+  #include <p12f629.inc>
+  processor p12f629
+endif

 ; ---------------------------------------------------------------------
 ;   feature enhanced SNES CIC clone for PIC Microcontroller (key mode only)
magu commented 4 years ago

Haven't got the slightest clue if it works, but it compiles fine. YMMV.

darleiv commented 4 years ago

Haven't got the slightest clue if it works, but it compiles fine. YMMV.

I only know how to use vhdl and C # c ++ [] [] BUT I don't know anything does make file create the file in hex?

darleiv commented 4 years ago

Haven't got the slightest clue if it works, but it compiles fine. YMMV.

if you can send the file I test it here at px675

magu commented 4 years ago

supercic-key.hex.zip

darleiv commented 4 years ago

at first no work kkk

darleiv commented 4 years ago

but thanks for the help

darleiv commented 4 years ago

PIC12F629 and PIC12F675 are 8-Pin Flash-Based 8-Bit CMOS Microcontrollers. The PIC12F629 and PIC12F675 devices are identical, except the PIC12F675 has a 10-bit A/D converter. They come in 8-pin PDIP, SOIC, MLF-S and DFN packages.

mrehkopf commented 4 years ago

I think for 12F675 the analog pins are enabled as a default and must be set as digital GPIO pins in some place where register bank 1 is selected (somewhere below a bsf STATUS, RP0 instruction):

clrf ANSEL
darleiv commented 4 years ago

mrehkopf digital conversion to digital analog. because the 12f675 is not standard for using the firmware already compiled. unfortunately i already spoke with some programmers only that i would be able to do it does not have the tools installed. if you feel like trying to get people to have this option. I am willing to test the compilation. I have all pics of several microchip models here. I tried to compile in MPLAB IDE unfortunately the compilation is not accepted hehe - many people asked me for this on my super IC site 12f675

magu commented 4 years ago

Just get https://gputils.sourceforge.io and you should be able to compile it yourself.

darleiv commented 4 years ago

I think for 12F675 the analog pins are enabled as a default and must be set as digital GPIO pins in some place where register bank 1 is selected (somewhere below a bsf STATUS, RP0 instruction):

clrf ANSEL

too complicated to do? if you can recompile it makes it available to people

cetics commented 4 years ago

here my hex converted. https://atariage.com/forums/topic/306540-supercic-for-12f675-here/

mrehkopf commented 3 years ago

Commit 02873c0594171b95c75514379068b26cd784e0c1 adds support for more PIC models to the compilation. Pre-compiled hex files can be found here: https://sd2snes.de/files/supercic.zip

darleiv commented 2 years ago

mrehkopf pic 683 and 675 no work in GPM one chip 03