├── .gitignore ├── 3rdParty └── EasyLoader │ ├── .deps │ └── .mkdir │ ├── Makefile │ ├── build │ └── .mkdir │ ├── const.asm │ ├── docs │ ├── boot-once.txt │ ├── screen-saver.txt │ └── xbank.txt │ ├── easyloader_nrm.asm │ ├── easyloader_ocm.asm │ ├── entries │ ├── draw.asm │ ├── scan.asm │ ├── search.asm │ └── sort.asm │ ├── graphics │ ├── easyloader_font.png │ └── sprites.png │ ├── helper │ ├── commands.asm │ ├── commands.txt │ ├── commands16.asm │ ├── commands24.asm │ ├── commands8.asm │ ├── macros.asm │ └── tools.asm │ ├── loader │ ├── basic.asm │ ├── cart.asm │ ├── common.asm │ └── file.asm │ ├── main.asm │ ├── screen │ ├── colors.asm │ ├── init.asm │ └── screen.php │ ├── tools │ ├── easyloader_launcher.asm │ ├── easyloader_launcher_nrm.bin │ ├── easyloader_launcher_ocm.bin │ ├── example.EasyLoader.rc │ ├── example.Package.rc │ ├── mk_easyflash_module.php │ └── mkdep.php │ ├── ui │ ├── input.asm │ ├── last_config.asm │ └── menu.asm │ └── vars.asm ├── EF3BootImage ├── CHANGES.txt ├── Makefile ├── README.txt ├── directory-jb.s ├── directory.s ├── ef3kernal │ ├── Makefile │ └── src │ │ ├── ef3kernal.s │ │ ├── kernal.bin │ │ ├── kernal_b1.s │ │ ├── kernal_common.s │ │ ├── kernal_inc.s │ │ ├── kernal_zp.s │ │ ├── ld.kernal.cfg │ │ ├── usbrx.c │ │ └── usbrx_asm.s ├── efmenu │ ├── Makefile │ └── src │ │ ├── background.iph │ │ ├── charset.sed │ │ ├── crt0.s │ │ ├── efmenu.c │ │ ├── efmenu.h │ │ ├── efmenu_asm.s │ │ ├── gfx.s │ │ ├── image_detect.c │ │ ├── image_detect.h │ │ ├── joy.s │ │ ├── ld.cfg │ │ ├── ld2.cfg │ │ ├── memcfg.h │ │ ├── memcfg.inc │ │ ├── menu5.iph │ │ ├── menu6.iph │ │ ├── menu7.iph │ │ ├── sound.s │ │ ├── text_plot.c │ │ ├── text_plot.h │ │ └── text_plot_asm.s ├── images │ ├── ar.bin │ ├── beast.bin │ ├── exos.bin │ ├── rr38ppal.bin │ └── ttn2crom.bin ├── mkimages.c ├── prgstart │ ├── Makefile │ └── src │ │ ├── crt0.crt.s │ │ ├── ld.crt.cfg │ │ ├── ld2.crt.cfg │ │ ├── prg.s │ │ ├── prgstart.c │ │ └── prgstart.h └── trampoline.s ├── EasyProg ├── CHANGES ├── IMPORTANT.txt ├── Makefile ├── eload │ ├── Makefile │ └── src │ │ ├── drive_1541.s │ │ ├── drive_1571.s │ │ ├── drive_1581.s │ │ ├── drive_common.s │ │ ├── drive_detect.s │ │ ├── drive_sd2iec.s │ │ ├── drivetype.s │ │ ├── eload.h │ │ ├── eload.s │ │ ├── eload_close.s │ │ ├── eload_dos.s │ │ ├── eload_read.s │ │ ├── eload_read_byte.s │ │ ├── eload_test.c │ │ ├── kernal.s │ │ ├── send_code.s │ │ ├── xfer_drive_1mhz.s │ │ └── xfer_drive_2mhz.s ├── libprint │ ├── Makefile │ ├── README │ └── src │ │ ├── print.h │ │ ├── print_crlf.s │ │ ├── print_hex_digit.s │ │ ├── print_hex_padded.c │ │ ├── print_init.s │ │ ├── print_putc.s │ │ └── print_puts.c ├── src │ ├── autoinit.c │ ├── autoinit.h │ ├── cart.c │ ├── cart.h │ ├── crt0.s │ ├── dir.c │ ├── dir.h │ ├── eapiglue.h │ ├── eapiglueasm.s │ ├── easyprog.c │ ├── easyprog.h │ ├── exostreamdecr1.s │ ├── filedlg.c │ ├── filedlg.h │ ├── flash.c │ ├── flash.h │ ├── hex.c │ ├── hex.h │ ├── ld.cfg │ ├── ld2.cfg │ ├── progress.c │ ├── progress.h │ ├── progressasm.s │ ├── screen.c │ ├── screen.h │ ├── screenasm.s │ ├── selectbox.c │ ├── selectbox.h │ ├── slots.c │ ├── slots.h │ ├── sprites.h │ ├── sprites.s │ ├── spritesasm.s │ ├── startup.s │ ├── startupbin.h │ ├── startupbin.s │ ├── texts.c │ ├── texts.h │ ├── timer.h │ ├── timerasm.s │ ├── torturetest.c │ ├── torturetest.h │ ├── torturetestasm.s │ ├── usbtest.c │ ├── usbtest.h │ ├── util.c │ ├── util.h │ ├── utilasm.s │ ├── write.c │ └── write.h └── todo.txt ├── EasySDK ├── artwork │ ├── EasyFlash-Logo-Master.eps │ └── EasyFlash-Logo-Master.gif ├── docs │ ├── EasyFlash-AppSupport.pdf │ ├── EasyFlash-ProgRef.pdf │ ├── contrib │ │ └── crt-file-format.txt │ └── latex │ │ ├── Makefile │ │ └── src │ │ ├── EasyFlash-AppSupport.tex │ │ ├── EasyFlash-ProgRef.tex │ │ ├── address-scheme.pdf │ │ ├── address-scheme.svg │ │ ├── easyfs.pdf │ │ ├── easyfs.svg │ │ ├── key-commodore.pdf │ │ ├── key-commodore.svg │ │ ├── key-q.pdf │ │ ├── key-q.svg │ │ ├── key-runstop.pdf │ │ └── key-runstop.svg ├── eapi │ ├── Makefile │ ├── eapi-am29f040.s │ ├── eapi-m29w160t.s │ ├── eapi-mx29640b.s │ ├── eapi-sst39sf040.s │ ├── eapi_defs.s │ └── test.s ├── examples │ ├── banking-test │ │ ├── Makefile │ │ ├── README │ │ └── banking-test.s │ ├── cc65-16k-crt │ │ ├── Makefile │ │ └── src │ │ │ ├── c64-16k-crt.cfg │ │ │ ├── crt0.s │ │ │ └── hello.c │ ├── cc65-ef-crt │ │ ├── Makefile │ │ └── src │ │ │ ├── c64-ef-crt.cfg │ │ │ ├── crt0.s │ │ │ └── hello.c │ └── minimal-crt │ │ ├── Makefile │ │ ├── README │ │ └── minimal.s └── tools │ ├── Makefile │ └── bin2efcrt.c ├── EasySplit ├── CHANGES ├── COPYING ├── INSTALL ├── Makefile ├── README ├── make │ ├── common │ │ ├── install.mk │ │ ├── rules.mk │ │ └── transform.mk │ └── win32-cross-mingw │ │ ├── Makefile │ │ ├── cross-mingw.mk │ │ └── cross-wx.mk ├── res │ ├── easysplit.desktop │ └── easysplit.png └── src │ ├── EasySplitApp.cpp │ ├── EasySplitApp.h │ ├── EasySplitMainFrame.cpp │ ├── EasySplitMainFrame.h │ ├── WorkerThread.cpp │ ├── WorkerThread.h │ ├── callback.h │ ├── chunkpool.c │ ├── chunkpool.h │ ├── crc16.c │ ├── crc16.h │ ├── exo_helper.c │ ├── exo_helper.h │ ├── exo_util.c │ ├── exo_util.h │ ├── exodec.c │ ├── exodec.h │ ├── getflag.c │ ├── getflag.h │ ├── log.h │ ├── match.c │ ├── match.h │ ├── membuf.c │ ├── membuf.h │ ├── membuf_io.c │ ├── membuf_io.h │ ├── optimal.c │ ├── optimal.h │ ├── output.c │ ├── output.h │ ├── progress.c │ ├── progress.h │ ├── radix.c │ ├── radix.h │ ├── search.c │ └── search.h ├── EasyTransfer ├── CHANGES ├── COPYING ├── INSTALL ├── Makefile ├── README ├── archive │ ├── filefn.wx2.8.12.diff │ ├── libftdi-HEAD-a67c3be.tar.gz │ └── libusb-1.0.9.tar.bz2 ├── make │ ├── bin2c.py │ ├── common │ │ └── install.mk │ └── win32-cross-mingw │ │ ├── Toolchain-i686-w64-mingw32.cmake │ │ ├── cross-ftdi.mk │ │ └── cross-wx.mk ├── res │ ├── easytransfer.desktop │ └── easytransfer.png └── src │ ├── EasyTransfer.rc │ ├── EasyTransferApp.cpp │ ├── EasyTransferApp.h │ ├── EasyTransferMainFrame.cpp │ ├── EasyTransferMainFrame.h │ ├── TabStartPRG.cpp │ ├── TabStartPRG.h │ ├── TabUSBTest.cpp │ ├── TabUSBTest.h │ ├── TabWriteCRT.cpp │ ├── TabWriteCRT.h │ ├── TabWriteDisk.cpp │ ├── TabWriteDisk.h │ ├── WorkerThread.cpp │ ├── WorkerThread.h │ ├── d64writer │ ├── Makefile │ └── src │ │ ├── crt0.s │ │ ├── d64writer.c │ │ ├── d64writer.h │ │ ├── ld.cfg │ │ └── write_disk.c │ ├── ef3xfer.h │ ├── ef3xfer_d64.c │ ├── ef3xfer_file.c │ ├── ef3xfer_internal.h │ ├── ef3xfer_log.c │ ├── ef3xfer_main.c │ ├── ef3xfer_transport.c │ ├── ef3xfer_usb_test.c │ ├── str_to_key.c │ └── str_to_key.h ├── Hardware ├── eagle-logic-tht │ ├── EasyFlash 1.4.1 REV B.brd │ └── EasyFlash 1.4.1 REV B.sch ├── ef2-vhdl │ ├── Makefile │ ├── ef2.prj │ ├── ef2.wcfg │ ├── ef2.xst │ ├── impact.batch │ └── src │ │ ├── ef2.ucf │ │ ├── ef2.vhdl │ │ ├── ef2_types.vhdl │ │ ├── exp_bus_ctrl.vhdl │ │ ├── freezer.vhdl │ │ └── reset_generator.vhdl ├── ef3-ftdi │ ├── easyflash3-ftdi-template.xml │ └── initial-programming │ │ ├── index.html │ │ └── snapshots │ │ ├── snap_01.png │ │ ├── snap_02.png │ │ ├── snap_03.png │ │ ├── snap_04.png │ │ ├── snap_05.png │ │ ├── snap_06.png │ │ ├── snap_07.png │ │ ├── snap_08.png │ │ ├── snap_09.png │ │ ├── snap_10.png │ │ ├── snap_11.png │ │ ├── snap_12.png │ │ ├── snap_13.png │ │ └── snap_14.png ├── ef3-kicad │ ├── LICENSE │ ├── MX29LV640EBT.dcm │ ├── MX29LV640EBT.lib │ ├── TSOP1-48.emp │ ├── ef-logo.mod │ ├── ef3-bom.txt │ ├── ef3-mounting-diagram-1.3.pdf │ ├── ef3-v1.3-gerber.zip │ ├── ef3.brd │ ├── ef3.cmp │ ├── ef3.dcm │ ├── ef3.lib │ ├── ef3.mdc │ ├── ef3.mod │ ├── ef3.net │ ├── ef3.pdf │ ├── ef3.pro │ ├── ef3.sch │ ├── expansion_port.emp │ ├── expansion_port.lib │ ├── mkgerber.sh │ └── xc95144xl-tq100.lib ├── ef3-vhdl │ ├── Makefile │ ├── README.txt │ ├── architecture.txt │ ├── doc │ │ ├── Makefile │ │ └── src │ │ │ ├── diagrams.vpp │ │ │ ├── ef3-1-1.jpg │ │ │ ├── ef3-1-3.jpg │ │ │ ├── implemented-timing.svg │ │ │ ├── kernal-cartridge.tex │ │ │ ├── la-detect.png │ │ │ ├── la-read.png │ │ │ ├── memory-map-hiram.pdf │ │ │ ├── memory-map-hiram.svg │ │ │ ├── memory-map-plain.eps │ │ │ ├── memory-map-plain.pdf │ │ │ ├── memory-map-plain.svg │ │ │ ├── phi2-data-bus-250407.png │ │ │ ├── phi2-data-bus-250469.png │ │ │ └── working-principle.svg │ ├── ef3.prj │ ├── ef3.xst │ ├── impact.batch │ ├── src │ │ ├── cart_ar.vhdl │ │ ├── cart_easyflash.vhdl │ │ ├── cart_fc3.vhdl │ │ ├── cart_io2ram.vhdl │ │ ├── cart_kernal.vhdl │ │ ├── cart_ss5.vhdl │ │ ├── cart_usb.vhdl │ │ ├── ef3.ucf │ │ ├── ef3.vhdl │ │ ├── exp_bus_ctrl.vhdl │ │ ├── freezer.vhdl │ │ └── reset_generator.vhdl │ ├── test_list.txt │ └── testcrts │ │ └── np_test │ │ ├── Makefile │ │ └── np_test.s └── kicad-logic-tht │ ├── easyflash.brd │ ├── easyflash.cmp │ ├── easyflash.lib │ ├── easyflash.net │ ├── easyflash.pdf │ ├── easyflash.pro │ ├── easyflash.sch │ └── expansion-port.mod ├── README.txt └── libs ├── eload ├── Makefile ├── docs │ ├── gaps.ods │ └── pal-ntsc.ods ├── implementation.txt ├── src │ ├── config.s │ ├── drive_1541.s │ ├── drive_1541_format.s │ ├── drive_1541_inc.s │ ├── drive_1541_read.s │ ├── drive_1541_write.s │ ├── drive_1571.s │ ├── drive_1581.s │ ├── drive_detect.s │ ├── drive_sd2iec.s │ ├── drivetype.s │ ├── eload.h │ ├── eload.s │ ├── eload_checksum.s │ ├── eload_close.s │ ├── eload_config.s │ ├── eload_dos.s │ ├── eload_format.s │ ├── eload_macros.s │ ├── eload_read.s │ ├── eload_read_byte.s │ ├── eload_recv.s │ ├── eload_recv_block.s │ ├── eload_send.s │ ├── eload_send_nodma.s │ ├── eload_sendtab.s │ ├── eload_write_sector.s │ ├── eload_write_sector_nodma.s │ ├── kernal.s │ ├── send_code.s │ ├── xfer_drive_1mhz.s │ └── xfer_drive_2mhz.s └── test │ ├── crt0.s │ ├── eload_test.c │ ├── gcr.s │ └── ld.cfg └── libef3usb ├── Makefile └── src ├── ef3usb.h ├── ef3usb_check_cmd.s ├── ef3usb_discard_rx.s ├── ef3usb_fclose.s ├── ef3usb_fload.s ├── ef3usb_fread.s ├── ef3usb_macros.s ├── ef3usb_send_data.s ├── ef3usb_send_str.s └── usb.c /.gitignore: -------------------------------------------------------------------------------- 1 | obj/ 2 | out/ 3 | out_win32/ 4 | archive/ 5 | a.out 6 | *.tar.* 7 | *~ 8 | *.lib 9 | *.map 10 | *.prg 11 | *.bak 12 | *.bck 13 | *.obj 14 | *.bin 15 | *.crt 16 | *.orig 17 | *.jed 18 | *.xsvf 19 | *.log 20 | *.labels 21 | *.err 22 | *.svf 23 | 24 | # Eclipse 25 | .csettings 26 | .cproject 27 | .project 28 | 29 | EasyProg/easyprog 30 | 31 | 3rdParty/EasyLoader/build/ 32 | 3rdParty/EasyLoader/.deps/ 33 | 34 | Hardware/*gerber* 35 | Hardware/*/*gerber* 36 | *.pho 37 | *.cache.dcm 38 | synth/ 39 | log/ 40 | isim/ 41 | _xmsgs/ 42 | 43 | # test files and compiled releases 44 | EasyProg/test 45 | EasyProg/easyprog-* 46 | 47 | EasySDK/tools/bin2efcrt 48 | -------------------------------------------------------------------------------- /3rdParty/EasyLoader/.deps/.mkdir: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KimJorgensen/easyflash/9278c9f96fc3226047fb816a6090ff70d6c86cde/3rdParty/EasyLoader/.deps/.mkdir -------------------------------------------------------------------------------- /3rdParty/EasyLoader/build/.mkdir: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KimJorgensen/easyflash/9278c9f96fc3226047fb816a6090ff70d6c86cde/3rdParty/EasyLoader/build/.mkdir -------------------------------------------------------------------------------- /3rdParty/EasyLoader/const.asm: -------------------------------------------------------------------------------- 1 | .print ">const.asm" 2 | 3 | /* 4 | scan.asm 5 | */ 6 | 7 | .const O_DIR_NAME = 0 8 | // !! TYPE, BANK, OFFSET, SIZE must be in same order as in EFS 9 | .const O_DIR_TYPE = 24 10 | // !! BANK, OFFSET, SIZE, LOADADDR, UNAME must be togehter (in any order) 11 | .const O_DIR_BANK = 25 12 | .const O_DIR_PAD = 26 13 | .const O_DIR_OFFSET = 27 14 | .const O_DIR_SIZE = 29 15 | // !! TYPE, BANK, OFFSET, SIZE must be in same order as in EFS 16 | .const O_DIR_LOADADDR = 32 17 | .const O_DIR_UNAME = 34 18 | // !! BANK, OFFSET, SIZE, LOADADDR, UNAME must be togehter (in any order) 19 | .const V_DIR_SIZE = 50 20 | 21 | .const O_DIR_MODULE_MODE = O_DIR_OFFSET // OFFET will be reused 22 | 23 | .const O_EFS_NAME = 0 24 | .const O_EFS_TYPE = 16 25 | .const O_EFS_BANK = 17 26 | .const O_EFS_PAD = 18 27 | .const O_EFS_OFFSET = 19 28 | .const O_EFS_SIZE = 21 29 | .const V_EFS_SIZE = 24 30 | 31 | .const O_EFST_MASK = $1f 32 | .const O_EFST_FILE = $01 33 | .const O_EFST_SUB = $02 34 | .const O_EFST_8KCRT = $10 35 | .const O_EFST_16KCRT = $11 36 | .const O_EFST_16KULTCRT = $12 37 | .const O_EFST_8KULTCRT = $13 38 | .const O_EFST_END = $1f 39 | 40 | .enum { 41 | V_KEY_NO = 0, 42 | V_KEY_DEL = 1, 43 | V_KEY_INS = 2, 44 | V_KEY_RETURN = 3, 45 | V_KEY_CLEFT = 4, 46 | V_KEY_CRIGHT = 5, 47 | // regular f-keys 48 | // V_KEY_F1 = 6, 49 | V_KEY_F2 = 7, 50 | V_KEY_F3 = 8, 51 | V_KEY_F4 = 9, 52 | // V_KEY_F5 = 10, 53 | // V_KEY_F6 = 11, 54 | // V_KEY_F7 = 12, 55 | // V_KEY_F8 = 13, 56 | V_KEY_CUP = 14, 57 | V_KEY_CDOWN = 15, 58 | // V_KEY_HOME = 16, 59 | V_KEY_CLR = 17, 60 | V_KEY_CTRL = 18, 61 | V_KEY_SCTRL = 19, 62 | V_KEY_COMD = 20, 63 | V_KEY_SCOMD = 21, 64 | // V_KEY_RUN = 22, 65 | // V_KEY_STOP = 23, 66 | 67 | V_JOYPRESS_FIRE_UP = $01, 68 | V_JOYPRESS_FIRE_DOWN = $02, 69 | V_JOYPRESS_FIRE_LEFT = $03, 70 | V_JOYPRESS_FIRE_RIGHT = $04 71 | } 72 | 73 | // f-keys for movement 74 | .const V_KEY_F1 = V_KEY_RETURN 75 | .const V_KEY_F5 = V_KEY_CUP 76 | .const V_KEY_F6 = V_KEY_CLEFT 77 | .const V_KEY_F7 = V_KEY_CDOWN 78 | .const V_KEY_F8 = V_KEY_CRIGHT 79 | .const V_KEY_HOME = V_KEY_CLR 80 | .const V_KEY_RUN = V_KEY_CLR 81 | .const V_KEY_STOP = V_KEY_CLR 82 | -------------------------------------------------------------------------------- /3rdParty/EasyLoader/docs/boot-once.txt: -------------------------------------------------------------------------------- 1 | 2 | um einen boot-screen (nur ein mal pro einfachlten, nicht nach einem reset) 3 | anzuzeigen, muss ein cartridge (incl. xbank) mit dem namem "!el_boot-once" 4 | (ohne anfuehrungszeichen) auf dem easyflash abgelegt werden. 5 | 6 | das programm im crt muss am ende einen soft-reset ausfuehren: 7 | easyflashbank = 0 8 | easuflashmodus = 0 9 | jmp ($fffc) 10 | 11 | es kann jeglicher speicher, ausser dem easyflash ram $dffc-$dfff genutzt werden. 12 | -------------------------------------------------------------------------------- /3rdParty/EasyLoader/docs/screen-saver.txt: -------------------------------------------------------------------------------- 1 | 2 | um einen screen-saver im easyloader zu haben, muss man ein crt (incl. xbank) 3 | mit dem namen "!el_screen-saver" auf dem easyflash ablegen. 4 | 5 | wenn der bildschirmschoner aktiv wird, dann: 6 | easyloader-bank: screensaver 7 | easyloader-modus: 16k 8 | gestartet wird der screensaver mit: 9 | jsr $8000 (normalerweise) 10 | jsr $a000 (wenn crt=8k ultimax) 11 | 12 | am ende des screensavers muss ein 13 | rts 14 | ausgefuehrt werden. 15 | 16 | der bildschirm liegt bei $0400 17 | 18 | benutzt werden darf folgender speicher: 19 | $e0-$ff 20 | $c000-$ffff (aber nicht das easyflash ram) 21 | 22 | vic + co koennen umgebogen werden, aber am ende muss alles wieder sein wie 23 | vorher, was auch den easyflash-modus (16k) bertrifft. (die easyflash-bank kann 24 | belibig sein) 25 | -------------------------------------------------------------------------------- /3rdParty/EasyLoader/docs/xbank.txt: -------------------------------------------------------------------------------- 1 |  2 | The EasyFlash's xbank cartridge format is a multibanking cartridge format which 3 | can be placed at any bank in the flash, though all the banks must be continous. 4 | It's similar to the EasyFlash cartridge format. 5 | 6 | The magic cartrige id is 33 ($21). 7 | 8 | The Game and ExRom configuration in the crt header will be used to determine 9 | which mode should be apply at the startup. 10 | 11 | The main difference is that it can be placed on any bank, unlike EasyFlash or 12 | e.g. a Ocean Type 1 cartridges. 13 | 14 | The method is really simple: the starting bank will be stored in $df00/$df01, 15 | and the program has to care itself for the addition of the relative bank and 16 | the offset before writing it into the banking register. 17 | -------------------------------------------------------------------------------- /3rdParty/EasyLoader/easyloader_nrm.asm: -------------------------------------------------------------------------------- 1 | /* 2 | ** ABSOLUTE BASICS 3 | */ 4 | 5 | .const EASYLOADER_BANK = 0 6 | .const EASYLOADER_HI = false 7 | .const EASYLOADER_STARTADDRESS = $8000 8 | .const EASYFILESYSTEM_BANK = 0 9 | 10 | .import source "main.asm" 11 | -------------------------------------------------------------------------------- /3rdParty/EasyLoader/easyloader_ocm.asm: -------------------------------------------------------------------------------- 1 | /* 2 | ** ABSOLUTE BASICS 3 | */ 4 | 5 | .const EASYLOADER_BANK = 1 6 | .const EASYLOADER_HI = true 7 | .const EASYLOADER_STARTADDRESS = $a000 8 | .const EASYFILESYSTEM_BANK = 0 9 | 10 | .import source "main.asm" 11 | -------------------------------------------------------------------------------- /3rdParty/EasyLoader/entries/sort.asm: -------------------------------------------------------------------------------- 1 | .print ">sort.asm" 2 | 3 | F_SORT:{ 4 | 5 | .var ZP_RETRY = P_BINBCD_OUT+0 6 | .var ZP_TODO = P_BINBCD_OUT+1 7 | .var ZP_COUNT = P_BINBCD_OUT+2 8 | .var ZP_NEXT_ENTRY = P_BINBCD_IN 9 | 10 | // init 11 | lda P_NUM_DIR_ENTRIES 12 | beq return // no files! 13 | sta ZP_COUNT 14 | 15 | big_loop: 16 | // blink led 17 | lda P_LED_STATE 18 | eor #$80 19 | sta P_LED_STATE 20 | sta $de02 21 | 22 | // do not sort again 23 | :mov #1 ; ZP_RETRY 24 | 25 | :mov ZP_COUNT ; ZP_TODO 26 | 27 | :mov16 #P_DIR ; ZP_NEXT_ENTRY 28 | loop_entry: 29 | dec ZP_TODO 30 | beq again 31 | 32 | :mov16 ZP_NEXT_ENTRY ; ZP_ENTRY 33 | :add16_8 ZP_NEXT_ENTRY ; #V_DIR_SIZE 34 | 35 | ldy #O_DIR_UNAME-1 36 | loop_char: 37 | iny 38 | cpy #V_DIR_SIZE 39 | beq loop_entry // "cur" == "cur+1" => next line 40 | lda (ZP_NEXT_ENTRY), y 41 | cmp (ZP_ENTRY), y 42 | bcc swap_entries // "cur" > "cur+1" => swap them 43 | beq loop_char // "cur" == "cur+1" => next char 44 | bne loop_entry // "cur" < "cur+1" => next line 45 | 46 | swap_entries: 47 | ldy #V_DIR_SIZE-1 48 | !loop: 49 | lda (ZP_ENTRY),y 50 | pha 51 | lda (ZP_NEXT_ENTRY),y 52 | sta (ZP_ENTRY),y 53 | pla 54 | sta (ZP_NEXT_ENTRY),y 55 | dey 56 | bpl !loop- 57 | 58 | :mov #0 ; ZP_RETRY 59 | jmp loop_entry 60 | 61 | again: 62 | lda ZP_RETRY 63 | beq big_loop 64 | 65 | return: 66 | 67 | // turn led off 68 | lda P_LED_STATE 69 | and #$7f 70 | sta P_LED_STATE 71 | sta $de02 72 | 73 | rts 74 | } -------------------------------------------------------------------------------- /3rdParty/EasyLoader/graphics/easyloader_font.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KimJorgensen/easyflash/9278c9f96fc3226047fb816a6090ff70d6c86cde/3rdParty/EasyLoader/graphics/easyloader_font.png -------------------------------------------------------------------------------- /3rdParty/EasyLoader/graphics/sprites.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KimJorgensen/easyflash/9278c9f96fc3226047fb816a6090ff70d6c86cde/3rdParty/EasyLoader/graphics/sprites.png -------------------------------------------------------------------------------- /3rdParty/EasyLoader/helper/commands24.asm: -------------------------------------------------------------------------------- 1 | 2 | .pseudocommand lsr24 src ; dst { 3 | .if(_isunset(dst)){ 4 | lsr _24bit_upperArgument(src) 5 | ror _24bit_middleArgument(src) 6 | ror _24bit_lowerArgument(src) 7 | }else{ 8 | lda _24bit_upperArgument(src) 9 | lsr 10 | sta _24bit_upperArgument(dst) 11 | lda _24bit_middleArgument(src) 12 | lsr 13 | sta _24bit_middleArgument(dst) 14 | lda _24bit_lowerArgument(src) 15 | lsr 16 | sta _24bit_lowerArgument(dst) 17 | } 18 | } 19 | 20 | .pseudocommand adc24_8 src1 ; src2 ; dst { 21 | .if(_isunset(dst)){ 22 | lda _24bit_lowerArgument(src1) 23 | adc src2 24 | sta _24bit_lowerArgument(src1) 25 | bcc skip 26 | inc _24bit_middleArgument(src1) 27 | bne skip 28 | inc _24bit_upperArgument(src1) 29 | skip: 30 | }else{ 31 | lda _24bit_lowerArgument(src1) 32 | adc src2 33 | sta _24bit_lowerArgument(src1) 34 | lda _24bit_middleArgument(src1) 35 | adc #0 36 | sta _24bit_middleArgument(src1) 37 | lda _24bit_upperArgument(src1) 38 | adc #0 39 | sta _24bit_upperArgument(src1) 40 | } 41 | } 42 | 43 | .pseudocommand add24_8 src1 ; src2 ; dst { 44 | clc 45 | :adc24_8 src1 ; src2 ; dst 46 | } 47 | 48 | -------------------------------------------------------------------------------- /3rdParty/EasyLoader/loader/basic.asm: -------------------------------------------------------------------------------- 1 | .print ">basic.asm" 2 | 3 | F_BASIC:{ 4 | 5 | jsr F_LAST_CONFIG_WRITE 6 | 7 | // set screen $20 8 | lda #$20 9 | ldx #$00 10 | !loop: 11 | .for(var i=0; i<4; i++){ 12 | sta $0400+i*$100, x 13 | } 14 | dex 15 | bne !loop- 16 | 17 | ldx #[F_BASIC_SUB_end - F_BASIC_SUB_beginn]-1 18 | !loop: 19 | lda F_BASIC_SUB_beginn, x 20 | sta $02, x 21 | dex 22 | bpl !loop- 23 | 24 | jmp $02 25 | 26 | F_BASIC_SUB_beginn:{ 27 | lda #MODE_RAM 28 | sta IO_MODE 29 | jmp ($fffc) 30 | } 31 | F_BASIC_SUB_end: 32 | 33 | } 34 | -------------------------------------------------------------------------------- /3rdParty/EasyLoader/loader/cart.asm: -------------------------------------------------------------------------------- 1 | .print ">cart.asm" 2 | 3 | F_LAUNCH_CRT:{ 4 | 5 | jsr F_RESET_GRAPHICS 6 | 7 | ldy #O_DIR_BANK 8 | lda (ZP_ENTRY), y 9 | sta $1fe 10 | ldy #O_DIR_MODULE_MODE 11 | lda (ZP_ENTRY), y 12 | sta $1ff 13 | 14 | } 15 | 16 | F_LAUNCH_CRT_PART2:{ 17 | 18 | jsr F_LAST_CONFIG_WRITE 19 | 20 | // fill memory as before!!! 21 | lda #0 22 | tax 23 | !loop: 24 | sta $00, x 25 | .byte $9d, $fe, $00 // == sta $00fe, x (which is not sta $fe, x) 26 | // sta $0100, x 27 | inx 28 | bne !loop- 29 | /* 30 | ldx #63 31 | !loop: 32 | lda #0 33 | .for(var i=$200; i<$8000; i=i+128){ 34 | sta i,x 35 | } 36 | lda #$ff 37 | .for(var i=$240; i<$8000; i=i+128){ 38 | sta i,x 39 | } 40 | dex 41 | bmi !skip+ 42 | jmp !loop- 43 | !skip: 44 | 45 | */ 46 | 47 | 48 | // :mov #$00 ; $00 49 | 50 | // copy launch prog 51 | ldy #[LCOPY_END - LCOPY_START]-1 52 | !loop: 53 | lda LCOPY_START, y 54 | sta $1fe-[LCOPY_END - LCOPY_START], y 55 | dey 56 | bpl !loop- 57 | 58 | ldx #$fd 59 | txs 60 | 61 | jmp $1fe-[LCOPY_END - LCOPY_START] 62 | 63 | LCOPY_START: 64 | { 65 | // this code may be placed everywhere! 66 | // lda #$01 67 | // bne * 68 | // switch bank ($8000-$ffff is now undefined!!) 69 | pla 70 | sta $de00 71 | sta $df00 72 | lda #$00 73 | sta $df01 74 | pla 75 | sta IO_MODE 76 | 77 | // jump to reset routine 78 | jmp ($fffc) 79 | } 80 | LCOPY_END: 81 | 82 | } 83 | -------------------------------------------------------------------------------- /3rdParty/EasyLoader/loader/common.asm: -------------------------------------------------------------------------------- 1 | .print ">common.asm" 2 | 3 | F_LAUNCH: 4 | { 5 | 6 | .var ZP_LINE = P_BUFFER 7 | 8 | :mov P_DRAW_OFFSET ; ZP_LINE 9 | :add ZP_LINE ; P_DRAW_START 10 | 11 | :mul8_16 ZP_LINE ; #V_DIR_SIZE ; ZP_ENTRY ; X 12 | :add16 ZP_ENTRY ; #P_DIR 13 | 14 | :lday( ZP_ENTRY , O_DIR_TYPE ) 15 | beq return // 0 => not loadable 16 | // if it's a file: 17 | :if A ; EQ ; #O_EFST_FILE ; JMP ; F_LAUNCH_FILE 18 | // otherwise it must be a crt, because others are not supported 19 | jmp F_LAUNCH_CRT 20 | 21 | return: 22 | rts 23 | } 24 | 25 | F_RESET_GRAPHICS:{ 26 | // make screen black 27 | lda #$00 28 | ldx #$00 29 | !loop: 30 | sta $d800, x 31 | sta $d900, x 32 | sta $da00, x 33 | sta $db00, x 34 | dex 35 | bne !loop- 36 | 37 | // reset graphics 38 | :mov #$00 ; $d011 39 | :mov #$c0 ; $d016 40 | :mov #$01 ; $d018 41 | :mov #$ff ; $dd00 42 | 43 | rts 44 | } 45 | -------------------------------------------------------------------------------- /3rdParty/EasyLoader/screen/colors.asm: -------------------------------------------------------------------------------- 1 | .print ">colors.asm" 2 | 3 | 4 | F_INIT_COLORS: 5 | :mov16 #$d800 + 24*40 ; COL_DST_LO 6 | :mov #col_pattern>>8 ; COL_SRC_HI 7 | ldx #24 8 | !loop: 9 | lda col_pattern, x 10 | sta COL_SRC_LO 11 | ldy #39 12 | !loop2: 13 | lda (COL_SRC_LO),y 14 | sta (COL_DST_LO),y 15 | dey 16 | bpl !loop2- 17 | 18 | :sub16_8 COL_DST_LO ; #40 19 | 20 | dex 21 | bpl !loop- 22 | rts 23 | 24 | F_CLEAR_COLORS: // clear the colors th the wait-box 25 | 26 | :mov16 #$d800 + 14*40 ; COL_DST_LO 27 | :mov16 #col_line_help ; COL_SRC_LO 28 | ldx #5 29 | !loop: 30 | ldy #39 31 | !loop2: 32 | lda (COL_SRC_LO),y 33 | sta (COL_DST_LO),y 34 | dey 35 | bpl !loop2- 36 | 37 | :sub16_8 COL_DST_LO ; #40 38 | 39 | dex 40 | bpl !loop- 41 | rts 42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /3rdParty/EasyLoader/screen/init.asm: -------------------------------------------------------------------------------- 1 | .print ">init.asm" 2 | 3 | F_INIT_SCREEN:{ 4 | 5 | .var SRC = P_BINBCD_IN 6 | .var DST = P_BINBCD_OUT 7 | .var count = P_BINBCD_OUT+2 8 | 9 | :mov16 #screen_to_decode ; SRC 10 | :mov16 #start_screen_decode ; DST 11 | 12 | big_loop: 13 | ldy #0 14 | lda (SRC), y 15 | beq return // 0 == end 16 | bmi copy // $80-$ff = copy 1 char x times 17 | // pass trough 18 | tay // how many to copy 19 | tax // just remember 20 | :inc16 SRC 21 | dey 22 | !loop: 23 | lda (SRC), y 24 | sta (DST), y 25 | dey 26 | bpl !loop- 27 | txa 28 | // 29 | clc 30 | adc SRC+0 31 | sta SRC+0 32 | bcc !skip+ 33 | inc SRC+1 34 | !skip: 35 | // 36 | txa 37 | // 38 | clc 39 | adc DST+0 40 | sta DST+0 41 | bcc !skip+ 42 | inc DST+1 43 | !skip: 44 | // 45 | jmp big_loop 46 | 47 | copy: 48 | sta count // remember how often to copy 49 | iny 50 | lda (SRC), y 51 | ldx count // how often 52 | dey // y -> 0 53 | !loop: 54 | sta (DST), y 55 | iny 56 | inx 57 | bne !loop- 58 | :inc16 SRC 59 | :inc16 SRC 60 | sec 61 | lda #0 62 | sbc count 63 | // 64 | clc 65 | adc DST+0 66 | sta DST+0 67 | bcc !skip+ 68 | inc DST+1 69 | !skip: 70 | // 71 | jmp big_loop 72 | 73 | return: 74 | rts 75 | 76 | screen_to_decode: 77 | .import binary "build/screen.bin" 78 | 79 | } 80 | -------------------------------------------------------------------------------- /3rdParty/EasyLoader/tools/easyloader_launcher.asm: -------------------------------------------------------------------------------- 1 | /* 2 | to compile use KickAssembler 3.6+ 3 | 4 | set the use (normal or ocean) first 5 | 6 | example: 7 | java -jar /path/to/KickAss.jar -binfile -showmem easyloader_launcher.asm -o easyloader_launcher_nrm.bin 8 | java -jar /path/to/KickAss.jar -binfile -showmem easyloader_launcher.asm -o easyloader_launcher_ocm.bin 9 | 10 | */ 11 | 12 | .const is_ocean_module = false 13 | 14 | .if(is_ocean_module){ 15 | // dont load the bank, its X. if bank 1 then with INX before 16 | .pc = $ffde+0 "jumper" 17 | }else{ 18 | // regular mode 19 | .pc = $ffde+1 "jumper" 20 | } 21 | 22 | jump_start: 23 | // store bank 24 | stx $de00 25 | lda #$07 // 16k-mode 26 | sta $de02 27 | .if(is_ocean_module){ 28 | jmp ($a000) // jump into the cartridge 29 | }else{ 30 | jmp ($8000) // jump into the cartridge 31 | } 32 | 33 | .pc = * "copy it" 34 | 35 | start: 36 | sei 37 | // since no calculations are made and the stack is not used we do'nt initialize them 38 | ldx #$de 39 | stx $d016 // enable vic (bit 5 ($20) is clear) 40 | // first, initialize ram 41 | // second, copy a few bytes to $02+ 42 | loop: 43 | lda jump_start-1, x 44 | sta $02-1, x 45 | dex 46 | bne loop 47 | 48 | // X is now zero 49 | .if(is_ocean_module){ 50 | inx 51 | bne $10002 52 | }else{ 53 | beq $10002 54 | } 55 | 56 | .pc = $fffa "vectors" 57 | .word do_rti 58 | .word start // @fffc -> address of reset routine 59 | do_rti: 60 | rti 61 | .byte $78 62 | -------------------------------------------------------------------------------- /3rdParty/EasyLoader/tools/easyloader_launcher_nrm.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KimJorgensen/easyflash/9278c9f96fc3226047fb816a6090ff70d6c86cde/3rdParty/EasyLoader/tools/easyloader_launcher_nrm.bin -------------------------------------------------------------------------------- /3rdParty/EasyLoader/tools/easyloader_launcher_ocm.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KimJorgensen/easyflash/9278c9f96fc3226047fb816a6090ff70d6c86cde/3rdParty/EasyLoader/tools/easyloader_launcher_ocm.bin -------------------------------------------------------------------------------- /3rdParty/EasyLoader/tools/example.EasyLoader.rc: -------------------------------------------------------------------------------- 1 | # 2 | # copy this file to ~/.EasyLoader.rc 3 | # 4 | # cuncomment and change all lines which are not correct 5 | # 6 | 7 | #PHP5 = /path/to/php 8 | #JAVA = /path/to/java 9 | #KICKASS = /path/to/KickAss.jar 10 | #VICE = /path/to/x64 11 | #LOGUSER = the user which should be showed in the about dialog in EasyLoader, defaults to $USER 12 | 13 | # 14 | # uncomment one line and point it to a Package.rc (see tools/example.Package.rc) 15 | # 16 | 17 | #PACKAGE = /path/to/Tools.rc 18 | #PACKAGE = /path/to/Tools.rc 19 | #PACKAGE = /path/to/Tools.rc 20 | -------------------------------------------------------------------------------- /3rdParty/EasyLoader/tools/example.Package.rc: -------------------------------------------------------------------------------- 1 | # 2 | # this file is a list of all files which should be included in the cartridge 3 | # copy it near your programs and change ~/EasyLoader.rc to point to this file 4 | # 5 | 6 | # 7 | # configuration (optional, defaults as listed) 8 | # 9 | 10 | # remove the extenseion (last four chars) from every file 11 | # cfg:strip_extension=0 12 | 13 | # sort the dir in the EasyFS (otherwise it will be sorted by the EasyLoader) 14 | # cfg:sort_dir=1 15 | 16 | # show free banks 17 | # cfg:show_free=1 18 | 19 | # show memory map + options 20 | # cfg:show_memmap=0 21 | # cfg:memmap_colwidth=40 22 | 23 | # 24 | # file area 25 | # 26 | # all empty lines ans those starting whith a # are irgnored 27 | # an line starting whith a dot "." is hidden in the listing 28 | # all paths are relative to this file 29 | # basic usage: "mode:file.prg" (whithout quotes) 30 | # extended: "mode:file.prg=newname" 31 | # 32 | # mode can be: 33 | # "p" or "prg" for programs (including p00 files) 34 | # "8" or "8k" for regular 8k crt's 35 | # "16" or "16k" for regular 16k crt's 36 | # "m8" or "m8k" for ultimax 8k crt's 37 | # "m16" or "m16k" for ultimax 16k crt's 38 | # "xbank" for "X-Bank" crt's in automatic mode (picks first) 39 | # "xbank-" for "X-Bank" crt's in mode (16, 16k, 8, 8k, m16, m16k, m8, m8k) 40 | 41 | prg:game.prg 42 | 16k:example.crt 43 | 44 | # 45 | # ocean mode 46 | # 47 | # using the ocean mode one ocean type1 module can be incuded 48 | # use: "ocean:file.crt" or "ocean:file.crt=name" 49 | # whithin the regular mode this lineis just ignored 50 | # 51 | 52 | ocean:shadow.crt=Shadow o t Beast 53 | -------------------------------------------------------------------------------- /3rdParty/EasyLoader/tools/mkdep.php: -------------------------------------------------------------------------------- 1 | leads to additional menu entries 17 | - +V to display version numbers 18 | - D64 writer and PRG starter over USB added 19 | - Contains EasyProg 1.7.0 (Can flash CRT files over USB) 20 | - Warning if wrong jumper setting is detected 21 | 22 | Version 1.0.4 - 07.01.2012 23 | - Contains EasyProg 1.6.3 24 | - Menu entries are also greyed out if the slot contains a torture test pattern 25 | 26 | -------------------------------------------------------------------------------- /EF3BootImage/README.txt: -------------------------------------------------------------------------------- 1 | 2 | How to update the EasyFlash3 menu 3 | ================================= 4 | 5 | This chapter describes how to update the EasyFlash3 software. The EasyFlash3 6 | software consists of the EF3 menu and built it EasyProg. It is saved in EF3 7 | cartridge's System Area (EasyFlash Slot 0). The software can be updated 8 | without erasing any existing EasyFlash, KERNAL or freezer cartridge slots. 9 | 10 | There are two images you can use to update the menu: 11 | 12 | ef3-menu.crt 13 | ============ 14 | 15 | This image contains: 16 | 17 | - The menu 18 | - EasyProg 19 | 20 | This is the file you should use to update an existing cartridge which has 21 | already software on it. 22 | 23 | ef3-init.crt 24 | ============ 25 | 26 | This image contains: 27 | 28 | - The menu 29 | - EasyProg 30 | - Example KERNALs 31 | - A directory which contains the KERNALs but is empty otherwise 32 | 33 | This is the file you should use to initialize a new EasyFlash 3. If your 34 | System Area got erased or overwritten, you can use this image to repair it. 35 | 36 | How to write a Menu Image to Flash 37 | ================================== 38 | 39 | Use EasyProg to write ef3-menu.crt or ef3-init.crt. Select Slot 0, confirm the 40 | warning message and select the file. See Write a CRT to EF/EF3 with EasyProg. 41 | 42 | In case the EF3 menu is not accessible (e.g. the System Area has been erased), 43 | EasyProg can be loaded from a disk drive. 44 | -------------------------------------------------------------------------------- /EF3BootImage/directory-jb.s: -------------------------------------------------------------------------------- 1 | 2 | * = $0000 3 | 4 | ; 16 bytes signature 5 | !pet "EF-Directory V2:" 6 | 7 | ; 16 EasyFlash slots 8 | !pet "System Area" ; slot 0 9 | !align 15, 0, 0 10 | !pet "EF Slot 1" ; slot 1 11 | !align 15, 0, 0 12 | !pet "EF Slot 2" ; slot 2 13 | !align 15, 0, 0 14 | !pet "EF Slot 3" ; slot 3 15 | !align 15, 0, 0 16 | !pet "EF Slot 4" ; slot 4 17 | !align 15, 0, 0 18 | !pet "EF Slot 5" ; slot 5 19 | !align 15, 0, 0 20 | !pet "EF Slot 6" ; slot 6 21 | !align 15, 0, 0 22 | !pet "EF Slot 7" ; slot 7 23 | !align 15, 0, 0 24 | !pet "Slot 8" ; slot 8 25 | !align 15, 0, 0 26 | !pet "Slot 9" ; slot 9 27 | !align 15, 0, 0 28 | !pet "Slot 10" ; slot 10 29 | !align 15, 0, 0 30 | !pet "Slot 11" ; slot 11 31 | !align 15, 0, 0 32 | !pet "Slot 12" ; slot 12 33 | !align 15, 0, 0 34 | !pet "Slot 13" ; slot 13 35 | !align 15, 0, 0 36 | !pet "Slot 14" ; slot 14 37 | !align 15, 0, 0 38 | !pet "Slot 15" ; slot 15 39 | !align 15, 0, 0 40 | 41 | ; 8 KERNAL slots 42 | !pet "C64 KERNAL V1" ; KERNAL 1 43 | !align 15, 0, 0 44 | !pet "C64 KERNAL V2" ; KERNAL 2 45 | !align 15, 0, 0 46 | !pet "C64 KERNAL V3" ; KERNAL 3 47 | !align 15, 0, 0 48 | !pet "SX64 KERNAL" ; KERNAL 4 49 | !align 15, 0, 0 50 | !pet "KERNAL 5" ; KERNAL 5 51 | !align 15, 0, 0 52 | !pet "KERNAL 6" ; KERNAL 6 53 | !align 15, 0, 0 54 | !pet "KERNAL 7" ; KERNAL 7 55 | !align 15, 0, 0 56 | !pet "KERNAL 8" ; KERNAL 8 57 | !align 15, 0, 0 58 | 59 | ; 4 freezer slots 60 | !pet "Replay Slot 1" ; Action Replay slot 1 61 | !align 15, 0, 0 62 | !pet "Replay Slot 2" ; Action Replay slot 2 63 | !align 15, 0, 0 64 | !pet "SS5 Slot" ; Super Snapshot 5 65 | !align 15, 0, 0 66 | !pet "FC3 Slot" ; Final Cartridge III 67 | !align 15, 0, 0 68 | 69 | ; Boot mode - reserved, must be 0 70 | !byte $00 71 | 72 | ; $4711 = no checksum 73 | !word $4711 74 | -------------------------------------------------------------------------------- /EF3BootImage/directory.s: -------------------------------------------------------------------------------- 1 | 2 | * = $0000 3 | 4 | ; 16 bytes signature 5 | !pet "EF-Directory V2:" 6 | 7 | ; 16 EasyFlash slots 8 | !pet "System Area" ; slot 0 9 | !align 15, 0, 0 10 | !pet "EF Slot 1" ; slot 1 11 | !align 15, 0, 0 12 | !pet "EF Slot 2" ; slot 2 13 | !align 15, 0, 0 14 | !pet "EF Slot 3" ; slot 3 15 | !align 15, 0, 0 16 | !pet "EF Slot 4" ; slot 4 17 | !align 15, 0, 0 18 | !pet "EF Slot 5" ; slot 5 19 | !align 15, 0, 0 20 | !pet "EF Slot 6" ; slot 6 21 | !align 15, 0, 0 22 | !pet "EF Slot 7" ; slot 7 23 | !align 15, 0, 0 24 | !pet "Slot 8" ; slot 8 25 | !align 15, 0, 0 26 | !pet "Slot 9" ; slot 9 27 | !align 15, 0, 0 28 | !pet "Slot 10" ; slot 10 29 | !align 15, 0, 0 30 | !pet "Slot 11" ; slot 11 31 | !align 15, 0, 0 32 | !pet "Slot 12" ; slot 12 33 | !align 15, 0, 0 34 | !pet "Slot 13" ; slot 13 35 | !align 15, 0, 0 36 | !pet "Slot 14" ; slot 14 37 | !align 15, 0, 0 38 | !pet "Slot 15" ; slot 15 39 | !align 15, 0, 0 40 | 41 | ; 8 KERNAL slots 42 | !pet "EXOS V3" ; KERNAL 1 43 | !align 15, 0, 0 44 | !pet "Beast System" ; KERNAL 2 45 | !align 15, 0, 0 46 | !pet "Turbo Tape" ; KERNAL 3 47 | !align 15, 0, 0 48 | !pet "KERNAL 4" ; KERNAL 4 49 | !align 15, 0, 0 50 | !pet "KERNAL 5" ; KERNAL 5 51 | !align 15, 0, 0 52 | !pet "KERNAL 6" ; KERNAL 6 53 | !align 15, 0, 0 54 | !pet "KERNAL 7" ; KERNAL 7 55 | !align 15, 0, 0 56 | !pet "KERNAL 8" ; KERNAL 8 57 | !align 15, 0, 0 58 | 59 | ; 4 freezer slots 60 | !pet "Retro Replay 3.8" ; Action Replay slot 1 61 | !align 15, 0, 0 62 | !pet "Action Replay 6" ; Action Replay slot 2 63 | !align 15, 0, 0 64 | !pet "SS5 Slot" ; Super Snapshot 5 65 | !align 15, 0, 0 66 | !pet "FC3 Slot" ; Final Cartridge III 67 | !align 15, 0, 0 68 | 69 | ; Boot mode - reserved, must be 0 70 | !byte $00 71 | 72 | ; $4711 = no checksum 73 | !word $4711 74 | -------------------------------------------------------------------------------- /EF3BootImage/ef3kernal/Makefile: -------------------------------------------------------------------------------- 1 | 2 | 3 | .PHONY: all 4 | all: out/ef3kernal_b0.bin out/ef3kernal_b1.bin 5 | 6 | src := src/ef3kernal.s 7 | 8 | inc := src 9 | inc += ../../libs/libef3usb/src 10 | 11 | INCLUDE := $(addprefix -I,$(inc)) 12 | 13 | libef3usb := ../../libs/libef3usb/libef3usb.lib 14 | 15 | ############################################################################### 16 | # KERNAL bank 0 17 | # We do this with acme since it makes it very easy to overwrite portions of 18 | # the original KERNAL image 19 | out/ef3kernal_b0.bin: src/ef3kernal.s src/kernal.bin out 20 | acme -l $@.labels -o $@ src/ef3kernal.s 21 | 22 | ############################################################################### 23 | # KERNAL bank 1 24 | 25 | obj_b1 := obj/kernal_b1.o 26 | obj_b1 += obj/usbrx.o 27 | obj_b1 += obj/usbrx_asm.o 28 | 29 | out/ef3kernal_b1.bin: $(obj_b1) $(libef3usb) src/ld.kernal.cfg 30 | ld65 -o $@ -m $@.map -C src/ld.kernal.cfg $(obj_b1) \ 31 | --lib $(libef3usb) \ 32 | -L /usr/local/lib/cc65/lib --lib c64.lib 33 | cat $@.map | grep -e "^Name\|^CODE\|^DATA\|^BSS\|^RODATA" 34 | 35 | ############################################################################### 36 | # 37 | $(libef3usb): force 38 | $(MAKE) -C $(dir $@) 39 | 40 | .PHONY: force 41 | force: 42 | 43 | ############################################################################### 44 | # Poor men's dependencies: Let all files depend from all header files 45 | headers := $(foreach dir, $(inc), $(wildcard $(dir)/*.h)) 46 | 47 | ############################################################################### 48 | obj/%.o: obj/%.s obj 49 | ca65 -t c64 -o $@ $< 50 | 51 | ############################################################################### 52 | obj/%.s: src/%.c obj $(headers) 53 | cc65 -t c64 -T -O --static-locals -I $(INCLUDE) $(DEFINE) -o $@ $< 54 | 55 | ############################################################################### 56 | obj/%.o: src/%.s obj 57 | ca65 -t c64 $(INCLUDE) -o $@ $< 58 | 59 | obj: 60 | mkdir -p $@ 61 | 62 | out: 63 | mkdir -p $@ 64 | 65 | 66 | .PHONY: clean 67 | clean: 68 | rm -rf obj 69 | rm -rf out 70 | 71 | -------------------------------------------------------------------------------- /EF3BootImage/ef3kernal/src/kernal.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KimJorgensen/easyflash/9278c9f96fc3226047fb816a6090ff70d6c86cde/EF3BootImage/ef3kernal/src/kernal.bin -------------------------------------------------------------------------------- /EF3BootImage/ef3kernal/src/kernal_common.s: -------------------------------------------------------------------------------- 1 | 2 | ; ============================================================================= 3 | ; Common code on all KERNAL banks 4 | ; 5 | ; This code goes to $fec2 and is used on Bank 0 (acme) and all other banks 6 | ; (ca65). That's why the syntax has to use the common subset of both 7 | ; assemblers. 8 | ; 9 | ; ============================================================================= 10 | 11 | ; I/O address to set the KERNAL bank 12 | EASYFLASH3_IO_KERNAL_BANK = $de0e 13 | 14 | RAM_JSR_OP = $dff0 15 | RAM_JSR_LO = $dff1 16 | RAM_JSR_HI = $dff2 17 | 18 | 19 | ; ============================================================================= 20 | ; JSR to a subroutine on bank 0 and return to bank 1. The address to be JSRed 21 | ; to is at ram_jsr_lo/ram_jsr_hi. All registers are forwarded transparently. 22 | ; ============================================================================= 23 | bank1_jsr_to_bank0: 24 | pha 25 | lda #$4c ; opcode of JMP 26 | sta RAM_JSR_OP 27 | lda #0 28 | sta EASYFLASH3_IO_KERNAL_BANK 29 | pla 30 | jsr $dff0 31 | pha 32 | lda #1 33 | sta EASYFLASH3_IO_KERNAL_BANK 34 | pla 35 | rts 36 | 37 | ; ============================================================================= 38 | ; Same as bank1_jsr_to_bank0, but different banks 39 | ; ============================================================================= 40 | bank0_jsr_to_bank1_ax: 41 | sta RAM_JSR_LO 42 | stx RAM_JSR_HI 43 | bank0_jsr_to_bank1: 44 | pha 45 | lda #$4c ; opcode of JMP 46 | sta RAM_JSR_OP 47 | lda #1 48 | sta EASYFLASH3_IO_KERNAL_BANK 49 | pla 50 | jsr $dff0 51 | pha 52 | lda #0 53 | sta EASYFLASH3_IO_KERNAL_BANK 54 | pla 55 | rts 56 | -------------------------------------------------------------------------------- /EF3BootImage/ef3kernal/src/kernal_inc.s: -------------------------------------------------------------------------------- 1 | 2 | RAM_JSR_OP = $dff0 3 | RAM_JSR_LO = $dff1 4 | RAM_JSR_HI = $dff2 5 | -------------------------------------------------------------------------------- /EF3BootImage/ef3kernal/src/kernal_zp.s: -------------------------------------------------------------------------------- 1 | 2 | ; This module exports all zero page locations we use 3 | 4 | -------------------------------------------------------------------------------- /EF3BootImage/ef3kernal/src/ld.kernal.cfg: -------------------------------------------------------------------------------- 1 | 2 | 3 | MEMORY { 4 | ZP: start = $0002, size = $001A, type = rw, define = yes; 5 | CPUSTACK: start = $0100, size = $0100; 6 | 7 | XRAM: start = $0800, size = $7800, define = yes; 8 | 9 | # EasyFlash RAM is used for cc65 RAM segments, $DFF0..$DFFF are reserved 10 | # for our internal banking mechanism. 11 | RAM: start = $DF00, size = $00F0, define = yes; 12 | 13 | LOROM: start = $E000, size = $0100, fill = yes, fillval = $ff, file = %O, define = yes; 14 | ROM: start = $E100, size = $1DC2, fill = yes, fillval = $ff, file = %O, define = yes; 15 | 16 | # replaces RS232 Timing Table, RS232 In, RS232 Out 17 | COMMON: start = $FEC2, size = $0081, fill = yes, fillval = $ff, file = %O, define = yes; 18 | 19 | GAP: start = $FF43, size = $00B7, fill = yes, fillval = $ff, file = %O, define = yes; 20 | VECTORS: start = $FFFA, size = $0006, fill = yes, fillval = $ff, file = %O, define = yes; 21 | } 22 | 23 | SEGMENTS { 24 | ZEROPAGE: load = ZP, type = zp, define = yes; 25 | JMP_CODE: load = LOROM, type = ro, define = yes; 26 | INIT: load = ROM, type = ro, define = yes, optional = yes; 27 | CODE: load = ROM, type = ro, define = yes; 28 | RODATA: load = ROM, type = ro, define = yes, align = $100; 29 | DATA: load = ROM, run = RAM, type = rw, define = yes; 30 | ZPSAVE: load = RAM, type = bss; 31 | BSS: load = RAM, type = bss, define = yes; 32 | HEAP: load = RAM, type = bss, optional = yes; # must sit just below stack 33 | KERNAL_COMMON: load = COMMON, type = ro, define = yes; 34 | VECTORS: load = VECTORS, type = ro; 35 | } 36 | 37 | SYMBOLS { 38 | __STACKSIZE__: value = $0080, type = weak; # 128 bytes stack 39 | } 40 | -------------------------------------------------------------------------------- /EF3BootImage/ef3kernal/src/usbrx.c: -------------------------------------------------------------------------------- 1 | 2 | #include 3 | #include 4 | 5 | #include 6 | 7 | extern void usbrx_prg(void); 8 | extern void usbrx_key(void); 9 | 10 | 11 | void usbrx(void) 12 | { 13 | const char* p_str_cmd; 14 | 15 | p_str_cmd = ef3usb_check_cmd(); 16 | 17 | if(p_str_cmd) 18 | { 19 | if (strcmp(p_str_cmd, "prg") == 0) 20 | { 21 | ef3usb_send_str("load"); 22 | usbrx_prg(); 23 | } 24 | if (strcmp(p_str_cmd, "key") == 0) 25 | { 26 | ef3usb_send_str("load"); 27 | usbrx_key(); 28 | } 29 | else 30 | { 31 | ef3usb_send_str("etyp"); 32 | } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /EF3BootImage/ef3kernal/src/usbrx_asm.s: -------------------------------------------------------------------------------- 1 | 2 | .importzp ptr1 3 | 4 | .import _ef3usb_fload 5 | .import _ef3usb_fclose 6 | 7 | .include "ef3usb_macros.s" 8 | .include "kernal_inc.s" 9 | 10 | 11 | EASYFLASH_CONTROL = $de02 12 | EASYFLASH_KILL = $04 13 | EASYFLASH_16K = $07 14 | 15 | 16 | .code 17 | 18 | ; ============================================================================= 19 | ; 20 | ; void usbrx_prg(void); 21 | ; 22 | ; ============================================================================= 23 | .proc _usbrx_prg 24 | .export _usbrx_prg 25 | _usbrx_prg: 26 | jsr _ef3usb_fload 27 | 28 | sta $fb 29 | stx $fc ; start addr 30 | 31 | ; set end addr + 1 to $2d and $ae 32 | clc 33 | adc ptr1 34 | sta $2d 35 | sta $ae 36 | txa 37 | adc ptr1 + 1 38 | sta $2e 39 | sta $af 40 | 41 | jmp _ef3usb_fclose 42 | .endproc 43 | 44 | ; ============================================================================= 45 | ; 46 | ; void usbrx_key(void); 47 | ; 48 | ; ============================================================================= 49 | .proc _usbrx_key 50 | .export _usbrx_key 51 | _usbrx_key: 52 | wait_usb_rx_ok 53 | ldy USB_DATA ; get number of keys (at least 1) 54 | ldx $c6 ; Number of Characters in Keyboard Buffer queue 55 | @next: 56 | wait_usb_rx_ok 57 | lda USB_DATA 58 | 59 | cpx $0289 ; Maximum number of Bytes in Keyboard Buffer 60 | bcs @full 61 | sta $0277, x ; Keyboard Buffer Queue (FIFO) 62 | inx 63 | @full: 64 | dey 65 | bne @next 66 | stx $c6 ; Number of Characters in Keyboard Buffer queue 67 | rts 68 | .endproc 69 | -------------------------------------------------------------------------------- /EF3BootImage/efmenu/src/background.iph: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KimJorgensen/easyflash/9278c9f96fc3226047fb816a6090ff70d6c86cde/EF3BootImage/efmenu/src/background.iph -------------------------------------------------------------------------------- /EF3BootImage/efmenu/src/gfx.s: -------------------------------------------------------------------------------- 1 | ; 2 | ; EasyFlash 3 | ; 4 | ; (c) 2011 Thomas 'skoe' Giesel 5 | ; 6 | ; This software is provided 'as-is', without any express or implied 7 | ; warranty. In no event will the authors be held liable for any damages 8 | ; arising from the use of this software. 9 | ; 10 | ; Permission is granted to anyone to use this software for any purpose, 11 | ; including commercial applications, and to alter it and redistribute it 12 | ; freely, subject to the following restrictions: 13 | ; 14 | ; 1. The origin of this software must not be misrepresented; you must not 15 | ; claim that you wrote the original software. If you use this software 16 | ; in a product, an acknowledgment in the product documentation would be 17 | ; appreciated but is not required. 18 | ; 2. Altered source versions must be plainly marked as such, and must not be 19 | ; misrepresented as being the original software. 20 | ; 3. This notice may not be removed or altered from any source distribution. 21 | 22 | .rodata 23 | 24 | image_start: 25 | .incbin "src/background.iph", 2 26 | 27 | ; ============================================================================= 28 | 29 | .export _background 30 | _background: 31 | .byte 0 32 | 33 | .export _bitmap 34 | _bitmap: 35 | ; .word bitmap_start 36 | .word image_start 37 | 38 | .export _colmap 39 | _colmap: 40 | ; .word colmap_start 41 | .word image_start + 8000 42 | 43 | ; ============================================================================= 44 | -------------------------------------------------------------------------------- /EF3BootImage/efmenu/src/image_detect.h: -------------------------------------------------------------------------------- 1 | /* 2 | * image_detect.h 3 | * 4 | * Created on: 17.07.2011 5 | * Author: skoe 6 | */ 7 | 8 | #ifndef IMAGE_DETECT_H_ 9 | #define IMAGE_DETECT_H_ 10 | 11 | #include 12 | #include "efmenu.h" 13 | 14 | #define IMAGE_SIGNATURE_LEN 8 15 | 16 | typedef struct image_fingerprint_s 17 | { 18 | uint16_t offset; 19 | uint8_t signature[IMAGE_SIGNATURE_LEN]; 20 | const char* name; 21 | } image_fingerprint_t; 22 | 23 | 24 | void detect_images(efmenu_entry_t* kernal_menu); 25 | 26 | #endif /* IMAGE_DETECT_H_ */ 27 | -------------------------------------------------------------------------------- /EF3BootImage/efmenu/src/joy.s: -------------------------------------------------------------------------------- 1 | 2 | 3 | DEBOUNCE_DELAY = 3 4 | REPEAT_DELAY = 25 5 | REPEAT_TIME = 8 6 | 7 | CH_CURS_UP = 145 8 | CH_CURS_DOWN = 17 9 | CH_CURS_LEFT = 157 10 | CH_CURS_RIGHT = 29 11 | CH_ENTER = 13 12 | 13 | .code 14 | 15 | ;-------------- 16 | .export _joy_init_irq 17 | _joy_init_irq: 18 | sei 19 | lda $0314 20 | sta orig_irq 21 | lda $0315 22 | sta orig_irq + 1 23 | 24 | lda #irq 27 | sta $0315 28 | cli 29 | rts 30 | 31 | ;---------------- 32 | irq: 33 | lda #$7f 34 | sta $dc00 35 | lda $dc00 36 | and #$1f 37 | cmp #$1f 38 | beq @nothing_pressed 39 | 40 | tay 41 | ldx #4 42 | @next_dir: 43 | tya 44 | lsr 45 | tay 46 | bcs @not_this_dir 47 | 48 | dec repeat_counter 49 | bne @not_this_dir 50 | 51 | lda next_repeat_time 52 | sta repeat_counter 53 | lda #REPEAT_TIME 54 | sta next_repeat_time 55 | 56 | lda key_list, x 57 | bne @push_key 58 | 59 | @not_this_dir: 60 | dex 61 | bpl @next_dir 62 | jmp (orig_irq) 63 | 64 | @push_key: 65 | ldx $c6 66 | cpx $0289 ; Maximum number of Bytes in Keyboard Buffer 67 | bcs @q_full 68 | sta $0277,x ; Keyboard Buffer Queue (FIFO) 69 | inc $c6 70 | @q_full: 71 | jmp (orig_irq) 72 | 73 | @nothing_pressed: 74 | lda #DEBOUNCE_DELAY 75 | sta repeat_counter 76 | lda #REPEAT_DELAY 77 | sta next_repeat_time 78 | jmp (orig_irq) 79 | 80 | ;---------------- 81 | .rodata 82 | key_list: 83 | .byte CH_ENTER, CH_CURS_RIGHT, CH_CURS_LEFT, CH_CURS_DOWN, CH_CURS_UP 84 | 85 | ;---------------- 86 | .bss 87 | orig_irq: 88 | .res 2 89 | 90 | ;---------------- 91 | .data 92 | 93 | repeat_counter: 94 | .byte DEBOUNCE_DELAY 95 | next_repeat_time: 96 | .byte REPEAT_DELAY 97 | -------------------------------------------------------------------------------- /EF3BootImage/efmenu/src/ld.cfg: -------------------------------------------------------------------------------- 1 | 2 | # This configuration is for a EF cartridge at $8000..$BFFF 3 | 4 | MEMORY { 5 | ZP: start = $0002, size = $001A, define = yes; 6 | FASTCODE: start = $001D, size = $0040, define = yes; 7 | CPUSTACK: start = $0100, size = $0100; 8 | 9 | RAM: start = $0800, size = $5400, define = yes; 10 | HIRAM: start = $C000, size = $1000, define = yes; 11 | ROM: start = $8000, size = $3F80, fill = yes, fillval = $ff, file = %O, define = yes; 12 | ULTIMAX: start = $FF80, size = $007A, fill = yes, fillval = $ff, file = %O, define = yes; 13 | VECTORS: start = $FFFA, size = $0006, fill = yes, fillval = $ff, file = %O, define = yes; 14 | } 15 | 16 | SEGMENTS { 17 | ULTIMAX: load = ULTIMAX, type = ro; 18 | VECTORS: load = VECTORS, type = ro; 19 | STARTUP: load = ROM, type = ro; 20 | INIT: load = ROM, type = ro, define = yes, optional = yes; 21 | CODE: load = ROM, run = RAM, type = ro, define = yes; 22 | RODATA: load = ROM, run = RAM, type = ro, define = yes; 23 | DATA: load = ROM, run = RAM, type = rw, define = yes; 24 | BSS: load = HIRAM, type = bss, define = yes; 25 | HEAP: load = HIRAM, type = bss, optional = yes; # must sit just below stack 26 | ZEROPAGE: load = ZP, type = zp, define = yes; 27 | } 28 | 29 | FEATURES { 30 | CONDES: segment = INIT, 31 | type = constructor, 32 | label = __CONSTRUCTOR_TABLE__, 33 | count = __CONSTRUCTOR_COUNT__; 34 | CONDES: segment = RODATA, 35 | type = destructor, 36 | label = __DESTRUCTOR_TABLE__, 37 | count = __DESTRUCTOR_COUNT__; 38 | CONDES: type = interruptor, 39 | segment = RODATA, 40 | label = __INTERRUPTOR_TABLE__, 41 | count = __INTERRUPTOR_COUNT__; 42 | } 43 | 44 | SYMBOLS { 45 | __STACKSIZE__: value = $0800, weak = yes; # 2k stack 46 | } 47 | -------------------------------------------------------------------------------- /EF3BootImage/efmenu/src/ld2.cfg: -------------------------------------------------------------------------------- 1 | 2 | # This configuration is for a EF cartridge at $8000..$BFFF 3 | 4 | MEMORY { 5 | ZP: start = $0002, size = $001A, define = yes; 6 | FASTCODE: start = $001D, size = $0040, define = yes; 7 | CPUSTACK: start = $0100, size = $0100; 8 | 9 | RAM: start = $0800, size = $5400, define = yes; 10 | HIRAM: start = $C000, size = $1000, define = yes; 11 | ROM: start = $8000, size = $3F80, fill = yes, fillval = $ff, file = %O, define = yes; 12 | ULTIMAX: start = $FF80, size = $007A, fill = yes, fillval = $ff, file = %O, define = yes; 13 | VECTORS: start = $FFFA, size = $0006, fill = yes, fillval = $ff, file = %O, define = yes; 14 | } 15 | 16 | SEGMENTS { 17 | ULTIMAX: load = ULTIMAX, type = ro; 18 | VECTORS: load = VECTORS, type = ro; 19 | STARTUP: load = ROM, type = ro; 20 | INIT: load = ROM, type = ro, define = yes, optional = yes; 21 | CODE: load = ROM, run = RAM, type = ro, define = yes; 22 | RODATA: load = ROM, run = RAM, type = ro, define = yes; 23 | DATA: load = ROM, run = RAM, type = rw, define = yes; 24 | BSS: load = HIRAM, type = bss, define = yes; 25 | HEAP: load = HIRAM, type = bss, optional = yes; # must sit just below stack 26 | ZEROPAGE: load = ZP, type = zp, define = yes; 27 | } 28 | 29 | FEATURES { 30 | CONDES: segment = INIT, 31 | type = constructor, 32 | label = __CONSTRUCTOR_TABLE__, 33 | count = __CONSTRUCTOR_COUNT__; 34 | CONDES: segment = RODATA, 35 | type = destructor, 36 | label = __DESTRUCTOR_TABLE__, 37 | count = __DESTRUCTOR_COUNT__; 38 | CONDES: type = interruptor, 39 | segment = RODATA, 40 | label = __INTERRUPTOR_TABLE__, 41 | count = __INTERRUPTOR_COUNT__; 42 | } 43 | 44 | SYMBOLS { 45 | __STACKSIZE__: value = $0800, type = weak; # 2k stack 46 | } 47 | -------------------------------------------------------------------------------- /EF3BootImage/efmenu/src/memcfg.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef MEMCFG_H 3 | #define MEMCFG_H 4 | 5 | #define P_VIC_BASE ((uint8_t*)0x4000) 6 | #define P_GFX_COLOR ((uint8_t*)0x5C00) 7 | #define P_GFX_BITMAP ((uint8_t*)0x6000) 8 | //#define P_WND_SPRITES ((uint8_t*)0x6800) 9 | 10 | #define P_SPR_PTRS (GFX_COLOR + 0x3f8) 11 | 12 | #endif 13 | -------------------------------------------------------------------------------- /EF3BootImage/efmenu/src/memcfg.inc: -------------------------------------------------------------------------------- 1 | 2 | P_VIC_BASE = $4000 3 | P_GFX_BITMAP = $4000 4 | P_GFX_COLOR = $6000 5 | P_WND_SPRITES = $6800 6 | 7 | P_SPR_PTRS = P_GFX_COLOR + $3f8 8 | 9 | -------------------------------------------------------------------------------- /EF3BootImage/efmenu/src/menu5.iph: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KimJorgensen/easyflash/9278c9f96fc3226047fb816a6090ff70d6c86cde/EF3BootImage/efmenu/src/menu5.iph -------------------------------------------------------------------------------- /EF3BootImage/efmenu/src/menu6.iph: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KimJorgensen/easyflash/9278c9f96fc3226047fb816a6090ff70d6c86cde/EF3BootImage/efmenu/src/menu6.iph -------------------------------------------------------------------------------- /EF3BootImage/efmenu/src/menu7.iph: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KimJorgensen/easyflash/9278c9f96fc3226047fb816a6090ff70d6c86cde/EF3BootImage/efmenu/src/menu7.iph -------------------------------------------------------------------------------- /EF3BootImage/efmenu/src/text_plot.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef _TEXT_PLOT_H_ 3 | #define _TEXT_PLOT_H_ 4 | 5 | #include 6 | #include 7 | 8 | void __fastcall__ text_plot_puts( 9 | uint8_t x_pos, uint8_t x_offset, uint8_t y_pos, 10 | const char* str); 11 | 12 | void __fastcall__ text_set_line_color( 13 | uint8_t x_pos, uint8_t y_pos, uint8_t color); 14 | 15 | /* Used internally only: */ 16 | void __fastcall__ text_plot_str(const char* str); 17 | void __fastcall__ text_fill_line_color(uint16_t len_col); 18 | 19 | #endif 20 | -------------------------------------------------------------------------------- /EF3BootImage/images/ar.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KimJorgensen/easyflash/9278c9f96fc3226047fb816a6090ff70d6c86cde/EF3BootImage/images/ar.bin -------------------------------------------------------------------------------- /EF3BootImage/images/beast.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KimJorgensen/easyflash/9278c9f96fc3226047fb816a6090ff70d6c86cde/EF3BootImage/images/beast.bin -------------------------------------------------------------------------------- /EF3BootImage/images/exos.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KimJorgensen/easyflash/9278c9f96fc3226047fb816a6090ff70d6c86cde/EF3BootImage/images/exos.bin -------------------------------------------------------------------------------- /EF3BootImage/images/rr38ppal.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KimJorgensen/easyflash/9278c9f96fc3226047fb816a6090ff70d6c86cde/EF3BootImage/images/rr38ppal.bin -------------------------------------------------------------------------------- /EF3BootImage/images/ttn2crom.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KimJorgensen/easyflash/9278c9f96fc3226047fb816a6090ff70d6c86cde/EF3BootImage/images/ttn2crom.bin -------------------------------------------------------------------------------- /EF3BootImage/prgstart/src/ld.crt.cfg: -------------------------------------------------------------------------------- 1 | 2 | SYMBOLS { 3 | __STACKSIZE__: value = $0800, weak = yes; # 2k stack 4 | } 5 | 6 | MEMORY { 7 | ZP: start = $0002, size = $001A, define = yes; 8 | CPUSTACK: start = $0100, size = $0100; 9 | 10 | RAM: start = $0800, size = $7800, define = yes; 11 | ROM: start = $8000, size = $3F80, fill = yes, fillval = $ff, file = %O, define = yes; 12 | ULTIMAX: start = $FF80, size = $007A, fill = yes, fillval = $ff, file = %O, define = yes; 13 | VECTORS: start = $FFFA, size = $0006, fill = yes, fillval = $ff, file = %O, define = yes; 14 | } 15 | 16 | SEGMENTS { 17 | ULTIMAX: load = ULTIMAX, type = ro; 18 | VECTORS: load = VECTORS, type = ro; 19 | LOWCODE: load = ROM, type = ro, optional = yes; 20 | INIT: load = ROM, type = ro, define = yes, optional = yes; 21 | CODE: load = ROM, type = ro, define = yes, align = $100; 22 | RODATA: load = ROM, type = ro, define = yes, align = $100; 23 | DATA: load = ROM, run = RAM, type = rw, define = yes; 24 | BSS: load = RAM, type = bss, define = yes; 25 | HEAP: load = RAM, type = bss, optional = yes; # must sit just below stack 26 | ZEROPAGE: load = ZP, type = zp, define = yes; 27 | } 28 | 29 | FEATURES { 30 | CONDES: segment = INIT, 31 | type = constructor, 32 | label = __CONSTRUCTOR_TABLE__, 33 | count = __CONSTRUCTOR_COUNT__; 34 | CONDES: segment = RODATA, 35 | type = destructor, 36 | label = __DESTRUCTOR_TABLE__, 37 | count = __DESTRUCTOR_COUNT__; 38 | CONDES: type = interruptor, 39 | segment = RODATA, 40 | label = __INTERRUPTOR_TABLE__, 41 | count = __INTERRUPTOR_COUNT__; 42 | } 43 | 44 | -------------------------------------------------------------------------------- /EF3BootImage/prgstart/src/ld2.crt.cfg: -------------------------------------------------------------------------------- 1 | 2 | SYMBOLS { 3 | __STACKSIZE__: value = $0800, type = weak; # 2k stack 4 | } 5 | 6 | MEMORY { 7 | ZP: start = $0002, size = $001A, define = yes; 8 | CPUSTACK: start = $0100, size = $0100; 9 | 10 | RAM: start = $0800, size = $7800, define = yes; 11 | ROM: start = $8000, size = $3F80, fill = yes, fillval = $ff, file = %O, define = yes; 12 | ULTIMAX: start = $FF80, size = $007A, fill = yes, fillval = $ff, file = %O, define = yes; 13 | VECTORS: start = $FFFA, size = $0006, fill = yes, fillval = $ff, file = %O, define = yes; 14 | } 15 | 16 | SEGMENTS { 17 | ULTIMAX: load = ULTIMAX, type = ro; 18 | VECTORS: load = VECTORS, type = ro; 19 | LOWCODE: load = ROM, type = ro, optional = yes; 20 | INIT: load = ROM, type = ro, define = yes, optional = yes; 21 | CODE: load = ROM, type = ro, define = yes, align = $100; 22 | RODATA: load = ROM, type = ro, define = yes, align = $100; 23 | DATA: load = ROM, run = RAM, type = rw, define = yes; 24 | BSS: load = RAM, type = bss, define = yes; 25 | HEAP: load = RAM, type = bss, optional = yes; # must sit just below stack 26 | ZEROPAGE: load = ZP, type = zp, define = yes; 27 | } 28 | 29 | FEATURES { 30 | CONDES: segment = INIT, 31 | type = constructor, 32 | label = __CONSTRUCTOR_TABLE__, 33 | count = __CONSTRUCTOR_COUNT__; 34 | CONDES: segment = RODATA, 35 | type = destructor, 36 | label = __DESTRUCTOR_TABLE__, 37 | count = __DESTRUCTOR_COUNT__; 38 | CONDES: type = interruptor, 39 | segment = RODATA, 40 | label = __INTERRUPTOR_TABLE__, 41 | count = __INTERRUPTOR_COUNT__; 42 | } 43 | 44 | -------------------------------------------------------------------------------- /EF3BootImage/prgstart/src/prgstart.c: -------------------------------------------------------------------------------- 1 | 2 | #include 3 | #include 4 | #include 5 | 6 | #include 7 | 8 | #include "prgstart.h" 9 | 10 | 11 | int main(void) 12 | { 13 | const char* p_str_cmd; 14 | 15 | puts("PRG starter"); 16 | 17 | for (;;) 18 | { 19 | puts("\nWaiting for command from USB..."); 20 | do 21 | { 22 | p_str_cmd = ef3usb_check_cmd(); 23 | } 24 | while (p_str_cmd == NULL); 25 | printf("Command: %s\n", p_str_cmd); 26 | 27 | if (strcmp(p_str_cmd, "prg") == 0) 28 | { 29 | ef3usb_send_str("load"); 30 | puts("Loading"); 31 | usbtool_prg_load_and_run(); 32 | } 33 | else 34 | { 35 | /* todo: reset */ 36 | ef3usb_send_str("etyp"); 37 | } 38 | } 39 | 40 | return 0; 41 | } 42 | -------------------------------------------------------------------------------- /EF3BootImage/prgstart/src/prgstart.h: -------------------------------------------------------------------------------- 1 | /* 2 | * usbtool.h 3 | * 4 | * Created on: 27.01.2012 5 | * Author: skoe 6 | */ 7 | 8 | #ifndef USBTOOL_H_ 9 | #define USBTOOL_H_ 10 | 11 | void usbtool_prg_load_and_run(void); 12 | 13 | 14 | #endif /* USBTOOL_H_ */ 15 | -------------------------------------------------------------------------------- /EF3BootImage/trampoline.s: -------------------------------------------------------------------------------- 1 | 2 | ; This code does some basic system initializations and starts a cartridge 3 | ; from bank BOOT_FROM_BANK 4 | 5 | * = $ff00 6 | 7 | EASYFLASH_BANK = $DE00 8 | EASYFLASH_CONTROL = $DE02 9 | EASYFLASH_LED = $80 10 | EASYFLASH_16K = $07 11 | EASYFLASH_KILL = $04 12 | 13 | BOOT_FROM_BANK = $08 14 | 15 | start: 16 | ; === the reset vector points to here === 17 | sei 18 | ldx #$ff 19 | txs 20 | cld 21 | 22 | lda #$37 23 | sta $01 24 | lda #$2f 25 | sta $00 26 | 27 | ; enable VIC (e.g. RAM refresh) 28 | lda #8 29 | sta $d016 30 | 31 | ; write to RAM to make sure it starts up correctly (=> RAM datasheets) 32 | wait: 33 | sta $0100, x 34 | dex 35 | bne wait 36 | 37 | ; x is 0 now 38 | copy: 39 | lda ramcode, x 40 | sta $0400, x 41 | inx 42 | bne copy 43 | jmp $0400 44 | 45 | ramcode: 46 | !pseudopc 0x0400 { 47 | lda #BOOT_FROM_BANK 48 | sta EASYFLASH_BANK 49 | jmp ($fffc) 50 | } 51 | 52 | !fill $0100 - (* - start) - 4, $ff 53 | !word start 54 | !word 0xffff 55 | -------------------------------------------------------------------------------- /EasyProg/IMPORTANT.txt: -------------------------------------------------------------------------------- 1 | 2 | Beginning with version 1.5.0, EasyProg has a fast loader implemented 3 | for 1541, 1571 in 1541 mode, 1581 and sd2iec/uIEC. 4 | 5 | The fast loader for sd2iec/uIEC works only with sd2iec/uIEC 6 | firmware 0.10.2 or higher. 7 | 8 | If the fast loader does not work with your drive, you can disable 9 | it with "Options" => "Fast loader enabled: No". 10 | -------------------------------------------------------------------------------- /EasyProg/eload/Makefile: -------------------------------------------------------------------------------- 1 | 2 | 3 | inc := 4 | inc += src/drivetype.s 5 | inc += src/kernal.s 6 | inc += src/xfer_drive_1mhz.s 7 | inc += src/xfer_drive_2mhz.s 8 | 9 | obj := 10 | obj += obj/drive_1541.o 11 | #obj += obj/drive_1571.o 12 | obj += obj/drive_1581.o 13 | obj += obj/drive_sd2iec.o 14 | obj += obj/drive_common.o 15 | obj += obj/send_code.o 16 | obj += obj/drive_detect.o 17 | obj += obj/eload.o 18 | obj += obj/eload_read.o 19 | obj += obj/eload_read_byte.o 20 | obj += obj/eload_close.o 21 | obj += obj/eload_dos.o 22 | 23 | .PHONY: all 24 | all: eload.lib 25 | 26 | .PHONY: test 27 | test: eload_test.prg 28 | 29 | obj/%.o: src/%.s $(inc) | obj 30 | ca65 -I src -t c64 -o $@ $< 31 | 32 | obj: 33 | mkdir -p obj 34 | 35 | eload.lib: $(obj) 36 | rm -f $@ 37 | ar65 a $@ $(obj) 38 | 39 | eload_test.prg: src/eload_test.c eload.lib 40 | cl65 -g -O -I src -m $@.map -o $@ $^ 41 | 42 | .PHONY: clean 43 | clean: 44 | rm -f $(obj) 45 | rm -rf obj 46 | rm -f eload.lib 47 | rm -f eload_test.prg 48 | rm -f eload_test.prg.map 49 | 50 | .PHONY: distclean 51 | distclean: clean 52 | rm -f *~ 53 | 54 | -------------------------------------------------------------------------------- /EasyProg/eload/src/drive_sd2iec.s: -------------------------------------------------------------------------------- 1 | ; 2 | ; ELoad 3 | ; 4 | ; (c) 2011 Thomas Giesel 5 | ; 6 | ; This software is provided 'as-is', without any express or implied 7 | ; warranty. In no event will the authors be held liable for any damages 8 | ; arising from the use of this software. 9 | ; 10 | ; Permission is granted to anyone to use this software for any purpose, 11 | ; including commercial applications, and to alter it and redistribute it 12 | ; freely, subject to the following restrictions: 13 | ; 14 | ; 1. The origin of this software must not be misrepresented; you must not 15 | ; claim that you wrote the original software. If you use this software 16 | ; in a product, an acknowledgment in the product documentation would be 17 | ; appreciated but is not required. 18 | ; 2. Altered source versions must be plainly marked as such, and must not be 19 | ; misrepresented as being the original software. 20 | ; 3. This notice may not be removed or altered from any source distribution. 21 | ; 22 | ; Thomas Giesel skoe@directbox.com 23 | ; 24 | 25 | 26 | .export drive_code_sd2iec 27 | drive_code_sd2iec = * 28 | 29 | ; ============================================================================= 30 | ; 31 | ; Drive code assembled to fixed address $0300 follows 32 | ; 33 | ; ============================================================================= 34 | .org $0300 35 | 36 | ; This is ASCII (not PETSCI!) "eload1" 37 | .byte $65, $6c, $6f, $61, $64, $31 38 | 39 | .reloc 40 | 41 | .export drive_code_size_sd2iec 42 | drive_code_size_sd2iec = * - drive_code_sd2iec 43 | -------------------------------------------------------------------------------- /EasyProg/eload/src/drivetype.s: -------------------------------------------------------------------------------- 1 | 2 | drivetype_not_present = 0 3 | drivetype_unknown = 1 4 | drivetype_1541 = 2 ; 1541, 1541-II 5 | drivetype_1570 = 3 ; 1570 6 | drivetype_1571 = 4 ; 1571 7 | drivetype_1581 = 5 ; 1581 8 | drivetype_fd = 6 ; CMD FD 9 | drivetype_hd = 7 ; CMD HD 10 | drivetype_sd2iec = 8 ; sd2iec or uIEC 11 | drivetype_vice = 9 ; VICE virtual FS 12 | -------------------------------------------------------------------------------- /EasyProg/eload/src/eload.h: -------------------------------------------------------------------------------- 1 | /* 2 | * eload.h 3 | */ 4 | 5 | #ifndef ELOAD_H_ 6 | #define ELOAD_H_ 7 | 8 | #include 9 | 10 | int __fastcall__ eload_set_drive_check_fastload(uint8_t dev); 11 | void __fastcall__ eload_set_drive_disable_fastload(uint8_t dev); 12 | 13 | int eload_drive_is_fast(void); 14 | 15 | int __fastcall__ eload_open_read(const char* name); 16 | 17 | int eload_read_byte(void); 18 | 19 | unsigned int __fastcall__ eload_read(void* buffer, unsigned int size); 20 | 21 | void eload_close(void); 22 | 23 | #endif /* ELOAD_H_ */ 24 | -------------------------------------------------------------------------------- /EasyProg/eload/src/eload_close.s: -------------------------------------------------------------------------------- 1 | ; 2 | ; ELoad 3 | ; 4 | ; (c) 2011 Thomas Giesel 5 | ; 6 | ; This software is provided 'as-is', without any express or implied 7 | ; warranty. In no event will the authors be held liable for any damages 8 | ; arising from the use of this software. 9 | ; 10 | ; Permission is granted to anyone to use this software for any purpose, 11 | ; including commercial applications, and to alter it and redistribute it 12 | ; freely, subject to the following restrictions: 13 | ; 14 | ; 1. The origin of this software must not be misrepresented; you must not 15 | ; claim that you wrote the original software. If you use this software 16 | ; in a product, an acknowledgment in the product documentation would be 17 | ; appreciated but is not required. 18 | ; 2. Altered source versions must be plainly marked as such, and must not be 19 | ; misrepresented as being the original software. 20 | ; 3. This notice may not be removed or altered from any source distribution. 21 | ; 22 | ; Thomas Giesel skoe@directbox.com 23 | ; 24 | 25 | 26 | .include "kernal.s" 27 | 28 | .import eload_dos_close 29 | .import _eload_drive_is_fast 30 | 31 | 32 | ; ============================================================================= 33 | ; 34 | ; void eload_close(void); 35 | ; 36 | ; Close the current file and cancel the drive code, if any. 37 | ; 38 | ; ============================================================================= 39 | .export _eload_close 40 | _eload_close: 41 | jsr _eload_drive_is_fast 42 | beq @close_kernal 43 | 44 | ; First cancel the drive code 45 | lda $dd00 46 | ora #$08 ; ATN low 47 | sta $dd00 48 | ldx #10 49 | : 50 | dex 51 | bne :- 52 | and #$07 53 | sta $dd00 ; ATN high 54 | 55 | @close_kernal: 56 | ; Close file 57 | jsr UNTLK 58 | lda #0 ; channel 0 59 | sta SA 60 | jmp eload_dos_close 61 | -------------------------------------------------------------------------------- /EasyProg/eload/src/kernal.s: -------------------------------------------------------------------------------- 1 | 2 | ST = $90 3 | FNLEN = $b7 4 | SA = $b9 5 | FA = $ba 6 | FNADR = $bb 7 | NDX = $c6 8 | 9 | COLOR = $0286 10 | 11 | BORDERCOL = $D020 12 | SCREENCOL = $D021 13 | SID = $D400 14 | SIDVOLUME = $D418 15 | 16 | CINT = $FF81 17 | IOINIT = $FF84 18 | RAMTAS = $FF87 19 | RESTOR = $FF8A 20 | VECTOR = $FF8D 21 | SETMSG = $FF90 22 | SECOND = $FF93 23 | TKSA = $FF96 24 | MEMTOP = $FF99 25 | MEMBOT = $FF9C 26 | SCNKEY = $FF9F 27 | SETTMO = $FFA2 28 | ACPTR = $FFA5 29 | CIOUT = $FFA8 30 | UNTLK = $FFAB 31 | UNLSN = $FFAE 32 | LISTEN = $FFB1 33 | TALK = $FFB4 34 | READST = $FFB7 35 | SETLFS = $FFBA 36 | SETNAM = $FFBD 37 | OPEN = $FFC0 38 | CLOSE = $FFC3 39 | CHKIN = $FFC6 40 | CKOUT = $FFC9 41 | CLRCH = $FFCC 42 | BASIN = $FFCF 43 | BSOUT = $FFD2 44 | LOAD = $FFD5 45 | SAVE = $FFD8 46 | SETTIM = $FFDB 47 | RDTIM = $FFDE 48 | STOP = $FFE1 49 | GETIN = $FFE4 50 | CLALL = $FFE7 51 | UDTIM = $FFEA 52 | SCRORG = $FFED 53 | PLOT = $FFF0 54 | IOBASE = $FFF3 55 | -------------------------------------------------------------------------------- /EasyProg/libprint/Makefile: -------------------------------------------------------------------------------- 1 | 2 | 3 | dep := 4 | dep += src/print.h 5 | 6 | obj := 7 | obj += obj/print_crlf.o 8 | obj += obj/print_hex_digit.o 9 | obj += obj/print_hex_padded.o 10 | obj += obj/print_init.o 11 | obj += obj/print_putc.o 12 | obj += obj/print_puts.o 13 | 14 | .PHONY: all 15 | all: libprint.lib 16 | 17 | obj/%.o: src/%.s $(dep) | obj 18 | ca65 -I src -t c64 -o $@ $< 19 | 20 | obj/%.o: obj/%.s $(dep) | obj 21 | ca65 -I src -t c64 -o $@ $< 22 | 23 | obj/%.s: src/%.c $(dep) | obj 24 | cc65 -I src -t c64 -O -o $@ $< 25 | 26 | obj: 27 | mkdir -p obj 28 | 29 | libprint.lib: $(obj) 30 | rm -f $@ 31 | ar65 a $@ $(obj) 32 | 33 | .PHONY: clean 34 | clean: 35 | rm -f $(obj) 36 | rm -rf obj 37 | rm -f libprint.lib 38 | 39 | .PHONY: distclean 40 | distclean: clean 41 | rm -f *~ 42 | 43 | -------------------------------------------------------------------------------- /EasyProg/libprint/README: -------------------------------------------------------------------------------- 1 | 2 | 3 | To see the output done by these functions on vice stdout, use this 4 | command line: 5 | 6 | x64sc -prtxtdev1 /dev/tty -pruser 7 | 8 | Note that "-prtextdevice" must be given before "-pruser". 9 | -------------------------------------------------------------------------------- /EasyProg/libprint/src/print.h: -------------------------------------------------------------------------------- 1 | /* 2 | * print.h 3 | * 4 | * Created on: 17.03.2011 5 | * Author: skoe 6 | */ 7 | 8 | #ifndef PRINT_H_ 9 | #define PRINT_H_ 10 | 11 | #include 12 | 13 | void print_init(void); 14 | void __fastcall__ print_putc(uint8_t c); 15 | void __fastcall__ print_puts(const char* text); 16 | void print_crlf(void); 17 | void __fastcall__ print_hex_digit(uint8_t val); 18 | void __fastcall__ print_hex_padded(uint8_t size, uint16_t num); 19 | 20 | #endif /* PRINT_H_ */ 21 | -------------------------------------------------------------------------------- /EasyProg/libprint/src/print_crlf.s: -------------------------------------------------------------------------------- 1 | 2 | 3 | .import _print_putc 4 | 5 | .code 6 | 7 | ; ============================================================================= 8 | ; 9 | ; Print CR/LF. 10 | ; void print_crlf(void) 11 | ; 12 | ; parameters: 13 | ; - 14 | ; return: 15 | ; - 16 | ; 17 | ; ============================================================================= 18 | .export _print_crlf 19 | _print_crlf: 20 | lda #10 21 | jsr _print_putc 22 | lda #13 23 | jmp _print_putc 24 | 25 | -------------------------------------------------------------------------------- /EasyProg/libprint/src/print_hex_digit.s: -------------------------------------------------------------------------------- 1 | 2 | .include "c64.inc" 3 | 4 | .import _print_putc 5 | 6 | .code 7 | 8 | ; ============================================================================= 9 | ; 10 | ; Print a hexadecimal digit. 11 | ; void __fastcall__ print_hex_digit(uint8_t val) 12 | ; 13 | ; parameters: 14 | ; value in A (X ignored) 15 | ; return: 16 | ; - 17 | ; 18 | ; ============================================================================= 19 | .export _print_hex_digit 20 | _print_hex_digit: 21 | and #$0f 22 | cmp #10 23 | bcs ge10 24 | adc #$30 ; PETSCII '0' 25 | jmp _print_putc 26 | ge10: 27 | adc #$41 - 10 - 1 ; PETSCII 'a', - 1 because C is set 28 | jmp _print_putc 29 | -------------------------------------------------------------------------------- /EasyProg/libprint/src/print_hex_padded.c: -------------------------------------------------------------------------------- 1 | /* 2 | * print_puts.c 3 | * 4 | * Created on: 17.03.2011 5 | * Author: skoe 6 | */ 7 | 8 | #include "print.h" 9 | 10 | /******************************************************************************* 11 | * Print the given number in hex format. Fill up leading '0' on the left side 12 | * to get at least size digits. 13 | * If more then size digits are needed, use more. 14 | * 15 | ******************************************************************************/ 16 | void __fastcall__ print_hex_padded(uint8_t size, uint16_t num) 17 | { 18 | uint8_t i; 19 | uint16_t tmp; 20 | 21 | // always print at least one digit 22 | if (size < 1) 23 | size = 1; 24 | 25 | for (i = 4; i != 0; i--) 26 | { 27 | tmp = (num & 0xf000) >> 12; 28 | 29 | if (tmp || i <= size) 30 | { 31 | print_hex_digit(tmp); 32 | 33 | // a digit != 0 was found, print all digits from now 34 | size = i; 35 | } 36 | 37 | num <<= 4; 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /EasyProg/libprint/src/print_init.s: -------------------------------------------------------------------------------- 1 | 2 | .include "c64.inc" 3 | 4 | .import _print_putc 5 | 6 | .code 7 | 8 | ; ============================================================================= 9 | ; 10 | ; Init printer library. 11 | ; void print_init(void) 12 | ; 13 | ; parameters: 14 | ; - 15 | ; return: 16 | ; - 17 | ; 18 | ; ============================================================================= 19 | .export _print_init 20 | _print_init: 21 | lda #$ff 22 | sta CIA2_DDRB 23 | lda CIA2_PRA 24 | ora #4 25 | sta CIA2_PRA 26 | lda CIA2_DDRA 27 | ora #4 28 | sta CIA2_DDRA 29 | ; switch to business mode (refer to MPS-801 printer manual) 30 | lda #17 31 | jmp _print_putc 32 | 33 | -------------------------------------------------------------------------------- /EasyProg/libprint/src/print_putc.s: -------------------------------------------------------------------------------- 1 | 2 | .include "c64.inc" 3 | 4 | .code 5 | 6 | ; ============================================================================= 7 | ; 8 | ; Send a character to the printer. 9 | ; void __fastcall__ print_putc(uint8_t c) 10 | ; 11 | ; parameters: 12 | ; character in A (X ignored) 13 | ; return: 14 | ; - 15 | ; 16 | ; ============================================================================= 17 | .export _print_putc 18 | _print_putc: 19 | sta CIA2_PRB 20 | lda CIA2_PRA 21 | and #255 - 4 22 | sta CIA2_PRA 23 | ora #4 24 | sta CIA2_PRA 25 | rts 26 | 27 | -------------------------------------------------------------------------------- /EasyProg/libprint/src/print_puts.c: -------------------------------------------------------------------------------- 1 | /* 2 | * print_puts.c 3 | * 4 | * Created on: 17.03.2011 5 | * Author: skoe 6 | */ 7 | 8 | #include "print.h" 9 | 10 | /******************************************************************************* 11 | * Print the given string. 12 | * 13 | ******************************************************************************/ 14 | void __fastcall__ print_puts(const char* text) 15 | { 16 | char ch; 17 | 18 | while ((ch = *text++)) 19 | { 20 | print_putc(ch); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /EasyProg/src/autoinit.c: -------------------------------------------------------------------------------- 1 | /* 2 | * EasyProg - easyprog.c - The main module 3 | * 4 | * (c) 2009 - 2012 Thomas Giesel 5 | * 6 | * This software is provided 'as-is', without any express or implied 7 | * warranty. In no event will the authors be held liable for any damages 8 | * arising from the use of this software. 9 | * 10 | * Permission is granted to anyone to use this software for any purpose, 11 | * including commercial applications, and to alter it and redistribute it 12 | * freely, subject to the following restrictions: 13 | * 14 | * 1. The origin of this software must not be misrepresented; you must not 15 | * claim that you wrote the original software. If you use this software 16 | * in a product, an acknowledgment in the product documentation would be 17 | * appreciated but is not required. 18 | * 2. Altered source versions must be plainly marked as such, and must not be 19 | * misrepresented as being the original software. 20 | * 3. This notice may not be removed or altered from any source distribution. 21 | * 22 | * Thomas Giesel skoe@directbox.com 23 | */ 24 | 25 | #include 26 | 27 | #include "screen.h" 28 | #include "autoinit.h" 29 | #include "filedlg.h" 30 | #include "torturetest.h" 31 | #include "write.h" 32 | #include "util.h" 33 | #include "slots.h" 34 | 35 | void autoInit(void) 36 | { 37 | uint8_t nSlot; 38 | 39 | if (screenAskEraseDialog() != BUTTON_ENTER) 40 | return; 41 | 42 | tortureTestAuto(); 43 | eraseAll(); 44 | 45 | for (nSlot = 0; nSlot < g_nSlots; ++nSlot) 46 | { 47 | /* create file name, e.g. auto-0.crt */ 48 | strcpy(utilStr, "auto-"); 49 | utilAppendDecimal(nSlot); 50 | utilAppendStr(".crt"); 51 | strcpy(g_strFileName, utilStr); 52 | autoWriteCRTImage(nSlot); 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /EasyProg/src/autoinit.h: -------------------------------------------------------------------------------- 1 | /* 2 | * autoinit.h 3 | * 4 | * Created on: 31.03.2012 5 | * Author: skoe 6 | */ 7 | 8 | #ifndef AUTOINIT_H_ 9 | #define AUTOINIT_H_ 10 | 11 | void autoInit(void); 12 | 13 | 14 | #endif /* AUTOINIT_H_ */ 15 | -------------------------------------------------------------------------------- /EasyProg/src/dir.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef DIR_H 3 | #define DIR_H 4 | 5 | #include 6 | 7 | typedef struct DirEntry_s { 8 | char name[17]; /* File name in PETSCII, limited to 16 chars */ 9 | char type[4]; 10 | unsigned int size; /* Size in 254 byte blocks */ 11 | } DirEntry; 12 | 13 | unsigned char __fastcall__ dirOpen(uint8_t lfn, uint8_t device); 14 | unsigned char __fastcall__ dirReadEntry (DirEntry* pEntry); 15 | void __fastcall__ dirClose(uint8_t lfn); 16 | 17 | #endif 18 | -------------------------------------------------------------------------------- /EasyProg/src/eapiglue.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef EAPIGLUE_H 3 | #define EAPIGLUE_H 4 | 5 | #include 6 | 7 | #define EAPI_ERR_RAM 1 8 | #define EAPI_ERR_ROML 2 9 | #define EAPI_ERR_ROMH 3 10 | #define EAPI_ERR_ROML_PROTECTED 4 11 | #define EAPI_ERR_ROMH_PROTECTED 5 12 | 13 | #define EAPI_LOAD_TO ((uint8_t*)0xc000) 14 | #define EAPI_DRIVER_NAME ((const char*)0xc000 + 4) 15 | #define EAPI_SIZE 0x300 16 | 17 | uint8_t efShowROM(void* addr); 18 | uint8_t efHideROM(void* addr); 19 | uint8_t __fastcall__ efPeekCartROM(void* addr); 20 | void* __fastcall__ efCopyCartROM(void* dest, const void* src, size_t count); 21 | uint16_t __fastcall__ efVerifyFlash(uint8_t* pFlash); 22 | 23 | uint8_t __fastcall__ eapiInit(uint8_t* pManufacturerId, uint8_t* pDeviceId); 24 | uint8_t eapiReInit(void); 25 | uint8_t __fastcall__ eapiGetBank(void); 26 | void __fastcall__ eapiSetBank(uint8_t nBank); 27 | uint8_t __fastcall__ eapiSectorErase(uint8_t* pBase); 28 | //uint8_t __fastcall__ eapiWriteFlash(uint8_t* pAddr, uint8_t nVal); 29 | uint8_t __fastcall__ eapiGlueWriteBlock(uint8_t* pDst); 30 | uint8_t __fastcall__ eapiGetSlot(void); 31 | void __fastcall__ eapiSetSlot(uint8_t nSlot); 32 | 33 | extern uint8_t aEAPIDrivers[][EAPI_SIZE]; 34 | 35 | extern uint8_t _BLOCK_BUFFER_START__; 36 | #define BLOCK_BUFFER (&_BLOCK_BUFFER_START__) 37 | 38 | #endif 39 | -------------------------------------------------------------------------------- /EasyProg/src/filedlg.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef FILEDLG_H 3 | #define FILEDLG_H 4 | 5 | #include 6 | #include 7 | 8 | // Current drive 9 | extern uint8_t g_nDrive; 10 | 11 | // File name of current file 12 | extern char g_strFileName[FILENAME_MAX]; 13 | 14 | uint8_t __fastcall__ fileDlg(const char* pStrType); 15 | 16 | #endif // FILEDLG_H 17 | -------------------------------------------------------------------------------- /EasyProg/src/hex.h: -------------------------------------------------------------------------------- 1 | /* 2 | * hex.h 3 | * 4 | * Created on: 04.06.2009 5 | * Author: skoe 6 | */ 7 | 8 | #ifndef HEX_H_ 9 | #define HEX_H_ 10 | 11 | void hexViewer(void); 12 | 13 | #endif /* HEX_H_ */ 14 | -------------------------------------------------------------------------------- /EasyProg/src/ld.cfg: -------------------------------------------------------------------------------- 1 | 2 | SYMBOLS { 3 | __STACKSIZE__ = $0800; 4 | } 5 | 6 | MEMORY { 7 | ZP: start = $0002, size = $001A, type = rw, define = yes; 8 | LORAM: start = $07FF, size = $0801, file = %O, define = yes, fill = yes; 9 | RAM: start = $1000, size = $a000, file = %O, define = yes; 10 | EXOBUFFER: start = $b000, size = $1000, type = rw, define = yes; 11 | EAPI: start = $c000, size = $0400, type = rw, define = yes; 12 | ZP_BACKUP: start = $c400, size = $001A, type = rw, define = yes; # size like ZP 13 | HIRAM: start = $c420, size = $0ae0, type = rw, define = yes; 14 | BLOCK_BUFFER: start = $cf00, size = $0100, type = rw, define = yes; 15 | } 16 | 17 | SEGMENTS { 18 | STARTUP: load = LORAM, type = ro; 19 | LOWCODE: load = LORAM, type = ro, optional = yes; 20 | SPRITES: load = LORAM, type = ro, align = $40; 21 | INIT: load = RAM, type = ro, define = yes, optional = yes; 22 | CODE: load = RAM, type = ro, align = $10; 23 | RODATA: load = RAM, type = ro, align = $10; 24 | DATA: load = RAM, type = rw; 25 | BSS: load = RAM, type = bss, define = yes; # must be below HEAP 26 | HEAP: load = RAM, type = bss, optional = yes; # must sit just below stack at end of RAM 27 | ZEROPAGE: load = ZP, type = zp; 28 | ZPSAVE: load = HIRAM, type = bss; 29 | } 30 | 31 | FEATURES { 32 | CONDES: segment = INIT, 33 | type = constructor, 34 | label = __CONSTRUCTOR_TABLE__, 35 | count = __CONSTRUCTOR_COUNT__; 36 | CONDES: segment = RODATA, 37 | type = destructor, 38 | label = __DESTRUCTOR_TABLE__, 39 | count = __DESTRUCTOR_COUNT__; 40 | CONDES: segment = RODATA, 41 | type = interruptor, 42 | label = __INTERRUPTOR_TABLE__, 43 | count = __INTERRUPTOR_COUNT__; 44 | } 45 | 46 | MEMORY { 47 | } 48 | -------------------------------------------------------------------------------- /EasyProg/src/ld2.cfg: -------------------------------------------------------------------------------- 1 | 2 | SYMBOLS { 3 | __STACKSIZE__: type = weak, value = $0800; 4 | } 5 | 6 | MEMORY { 7 | ZP: start = $0002, size = $001A, type = rw, define = yes; 8 | LORAM: start = $07FF, size = $0801, file = %O, define = yes, fill = yes; 9 | RAM: start = $1000, size = $a000, file = %O, define = yes; 10 | EXOBUFFER: start = $b000, size = $1000, type = rw, define = yes; 11 | EAPI: start = $c000, size = $0400, type = rw, define = yes; 12 | ZP_BACKUP: start = $c400, size = $001A, type = rw, define = yes; # size like ZP 13 | HIRAM: start = $c420, size = $0be0, type = rw, define = yes; 14 | BLOCK_BUFFER: start = $ce00, size = $0100, type = rw, define = yes; 15 | } 16 | 17 | SEGMENTS { 18 | STARTUP: load = LORAM, type = ro; 19 | LOWCODE: load = LORAM, type = ro, optional = yes; 20 | SPRITES: load = LORAM, type = ro, align = $40; 21 | INIT: load = RAM, type = ro, define = yes, optional = yes; 22 | CODE: load = RAM, type = ro, align = $10; 23 | RODATA: load = RAM, type = ro, align = $10; 24 | DATA: load = RAM, type = rw; 25 | BSS: load = RAM, type = bss, define = yes; # must be below HEAP 26 | HEAP: load = RAM, type = bss, optional = yes; # must sit just below stack at end of RAM 27 | ZEROPAGE: load = ZP, type = zp; 28 | ZPSAVE: load = HIRAM, type = bss; 29 | } 30 | 31 | FEATURES { 32 | CONDES: segment = INIT, 33 | type = constructor, 34 | label = __CONSTRUCTOR_TABLE__, 35 | count = __CONSTRUCTOR_COUNT__; 36 | CONDES: segment = RODATA, 37 | type = destructor, 38 | label = __DESTRUCTOR_TABLE__, 39 | count = __DESTRUCTOR_COUNT__; 40 | CONDES: segment = RODATA, 41 | type = interruptor, 42 | label = __INTERRUPTOR_TABLE__, 43 | count = __INTERRUPTOR_COUNT__; 44 | } 45 | 46 | MEMORY { 47 | } 48 | 49 | -------------------------------------------------------------------------------- /EasyProg/src/selectbox.h: -------------------------------------------------------------------------------- 1 | /* 2 | * EasyProg version 1.8.0, April 2018, are 3 | * Copyright (c) 2018 Kim Jorgensen, are derived from EasyProg 1.7.1, 4 | * and are distributed according to the same disclaimer and license as 5 | * EasyProg 1.7.1 6 | * 7 | * EasyProg versions 1.2 September 2009, through 1.7.1, September 2013, are 8 | * Copyright (c) 2009-2013 Thomas Giesel 9 | * 10 | * This software is provided 'as-is', without any express or implied 11 | * warranty. In no event will the authors be held liable for any damages 12 | * arising from the use of this software. 13 | * 14 | * Permission is granted to anyone to use this software for any purpose, 15 | * including commercial applications, and to alter it and redistribute it 16 | * freely, subject to the following restrictions: 17 | * 18 | * 1. The origin of this software must not be misrepresented; you must not 19 | * claim that you wrote the original software. If you use this software 20 | * in a product, an acknowledgment in the product documentation would be 21 | * appreciated but is not required. 22 | * 2. Altered source versions must be plainly marked as such, and must not be 23 | * misrepresented as being the original software. 24 | * 3. This notice may not be removed or altered from any source distribution. 25 | * 26 | * Thomas Giesel skoe@directbox.com 27 | */ 28 | 29 | #ifndef SELECTBOX_H_ 30 | #define SELECTBOX_H_ 31 | 32 | #include 33 | 34 | typedef struct SelectBoxEntry_s { 35 | char label[17]; /* Label in PETSCII, 0-terminated */ 36 | char type[5]; /* Type in PETSCII, 0-terminated */ 37 | void* cookie; 38 | } SelectBoxEntry; 39 | 40 | uint8_t __fastcall__ selectBox(const SelectBoxEntry* pEntries, 41 | const char* pStrWhatToSelect); 42 | 43 | 44 | #endif /* SELECTBOX_H_ */ 45 | -------------------------------------------------------------------------------- /EasyProg/src/sprites.h: -------------------------------------------------------------------------------- 1 | 2 | 3 | #ifndef SPRITES_H_ 4 | #define SPRITES_H_ 5 | 6 | // size of memory used by the sprites for the startup screen 7 | #define STARTUP_SPRITES_SIZE (7 * 64) 8 | 9 | extern uint8_t* pSprites; 10 | void spritesShow(void); 11 | uint8_t __fastcall__ spritesOn(uint8_t on); 12 | 13 | #endif /* SPRITES_H_ */ 14 | -------------------------------------------------------------------------------- /EasyProg/src/startupbin.h: -------------------------------------------------------------------------------- 1 | 2 | 3 | #ifndef STARTUPBIN_H_ 4 | #define STARTUPBIN_H_ 5 | 6 | extern uint8_t* startUpStart; 7 | extern uint8_t* startUpEnd; 8 | 9 | #endif /* STARTUPBIN_H_ */ 10 | -------------------------------------------------------------------------------- /EasyProg/src/startupbin.s: -------------------------------------------------------------------------------- 1 | ; 2 | ; EasyFlash - startupbin.s - Include Start-up code for cartridges 3 | ; 4 | ; (c) 2009 Thomas 'skoe' Giesel 5 | ; 6 | ; This software is provided 'as-is', without any express or implied 7 | ; warranty. In no event will the authors be held liable for any damages 8 | ; arising from the use of this software. 9 | ; 10 | ; Permission is granted to anyone to use this software for any purpose, 11 | ; including commercial applications, and to alter it and redistribute it 12 | ; freely, subject to the following restrictions: 13 | ; 14 | ; 1. The origin of this software must not be misrepresented; you must not 15 | ; claim that you wrote the original software. If you use this software 16 | ; in a product, an acknowledgment in the product documentation would be 17 | ; appreciated but is not required. 18 | ; 2. Altered source versions must be plainly marked as such, and must not be 19 | ; misrepresented as being the original software. 20 | ; 3. This notice may not be removed or altered from any source distribution. 21 | 22 | .export _startUpStart 23 | _startUpStart: 24 | .word _Start 25 | 26 | .export _startUpEnd 27 | _startUpEnd: 28 | .word _End 29 | 30 | _Start: 31 | .incbin "obj/startup.bin" 32 | _End: 33 | -------------------------------------------------------------------------------- /EasyProg/src/texts.h: -------------------------------------------------------------------------------- 1 | /* 2 | * texts.h 3 | * 4 | * Created on: 25.05.2009 5 | * Author: skoe 6 | */ 7 | 8 | #ifndef TEXTS_H_ 9 | #define TEXTS_H_ 10 | 11 | extern const char* apStrLowHigh[]; 12 | extern const char* apStrAbout[]; 13 | 14 | extern const char* apStrUnsupportedCRTType[]; 15 | extern const char* apStrUnsupportedCRTData[]; 16 | extern const char* apStrFileTooShort[]; 17 | extern const char* apStrFileNoEasySplit[]; 18 | extern const char* apStrWrongFlash[]; 19 | extern const char* apStrBadRAM[]; 20 | extern const char* apStrROMLProtected[]; 21 | extern const char* apStrROMHProtected[]; 22 | extern const char* apStrAskErase[]; 23 | extern const char* apStrSlot0[]; 24 | extern const char* apStrSlot0NoDir[]; 25 | extern const char* apStrEraseFailed[]; 26 | extern const char* apStrFlashWriteFailed[]; 27 | extern const char* apStrFileOpenError[]; 28 | extern const char* apStrOutOfMemory[]; 29 | extern const char* apStrHeaderReadError[]; 30 | extern const char* apStrChipReadError[]; 31 | extern const char* apStrWriteComplete[]; 32 | extern const char* apStrEAPINotFound[]; 33 | extern const char* apStrEAPIInvalid[]; 34 | extern const char* pStrTestFailed; 35 | extern const char* apStrDirFull[]; 36 | extern const char* apStrTestEndless[]; 37 | extern const char* apStrDifferentFile[]; 38 | extern const char* apStrFlashFromUSB[]; 39 | 40 | #endif /* TEXTS_H_ */ 41 | -------------------------------------------------------------------------------- /EasyProg/src/timer.h: -------------------------------------------------------------------------------- 1 | /* 2 | * timer.h 3 | * 4 | * Created on: 21.01.2011 5 | * Author: skoe 6 | */ 7 | 8 | #ifndef TIMER_H_ 9 | #define TIMER_H_ 10 | 11 | #include 12 | 13 | void timerInitTOD(void); 14 | void timerStart(void); 15 | void timerStop(void); 16 | void timerCont(void); 17 | uint16_t timerGet(void); 18 | 19 | 20 | #endif /* TIMER_H_ */ 21 | -------------------------------------------------------------------------------- /EasyProg/src/torturetest.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef TORTURETEST_H_ 3 | #define TORTURETEST_H_ 4 | 5 | #include 6 | #include "flash.h" 7 | 8 | void __fastcall__ tortureTestFillBuffer(const EasyFlashAddr* pAddr); 9 | uint16_t __fastcall__ tortureTestBanking(void); 10 | uint8_t __fastcall__ tortureTestCheckRAM(void); 11 | 12 | void tortureTestAuto(void); 13 | void tortureTestComplete(void); 14 | void tortureTestRead(void); 15 | void tortureTestRAM(void); 16 | 17 | #endif /* TORTURETEST_H_ */ 18 | -------------------------------------------------------------------------------- /EasyProg/src/usbtest.c: -------------------------------------------------------------------------------- 1 | /* 2 | * (c) 2013 Thomas Giesel 3 | * 4 | * This software is provided 'as-is', without any express or implied 5 | * warranty. In no event will the authors be held liable for any damages 6 | * arising from the use of this software. 7 | * 8 | * Permission is granted to anyone to use this software for any purpose, 9 | * including commercial applications, and to alter it and redistribute it 10 | * freely, subject to the following restrictions: 11 | * 12 | * 1. The origin of this software must not be misrepresented; you must not 13 | * claim that you wrote the original software. If you use this software 14 | * in a product, an acknowledgment in the product documentation would be 15 | * appreciated but is not required. 16 | * 2. Altered source versions must be plainly marked as such, and must not be 17 | * misrepresented as being the original software. 18 | * 3. This notice may not be removed or altered from any source distribution. 19 | * 20 | * Thomas Giesel skoe@directbox.com 21 | */ 22 | 23 | #include "usbtest.h" 24 | 25 | #include 26 | #include 27 | #include 28 | 29 | #include "util.h" 30 | 31 | 32 | void usbTest(void) 33 | { 34 | uint8_t i; 35 | uint8_t ch; 36 | 37 | for (;;) 38 | { 39 | clrscr(); 40 | cputs("USB Test (Reset to exit)\r\n"); 41 | for (i = 16; i; --i) 42 | { 43 | ef3usb_receive_data(&ch, 1); 44 | utilStr[0] = 0; 45 | utilAppendHex2(ch); 46 | cputs(utilStr); 47 | ef3usb_send_data(&ch, 1); 48 | } 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /EasyProg/src/usbtest.h: -------------------------------------------------------------------------------- 1 | /* 2 | * (c) 2013 Thomas Giesel 3 | * 4 | * This software is provided 'as-is', without any express or implied 5 | * warranty. In no event will the authors be held liable for any damages 6 | * arising from the use of this software. 7 | * 8 | * Permission is granted to anyone to use this software for any purpose, 9 | * including commercial applications, and to alter it and redistribute it 10 | * freely, subject to the following restrictions: 11 | * 12 | * 1. The origin of this software must not be misrepresented; you must not 13 | * claim that you wrote the original software. If you use this software 14 | * in a product, an acknowledgment in the product documentation would be 15 | * appreciated but is not required. 16 | * 2. Altered source versions must be plainly marked as such, and must not be 17 | * misrepresented as being the original software. 18 | * 3. This notice may not be removed or altered from any source distribution. 19 | * 20 | * Thomas Giesel skoe@directbox.com 21 | */ 22 | #ifndef USBTEST_H_ 23 | #define USBTEST_H_ 24 | 25 | void usbTest(void); 26 | 27 | #endif /* USBTEST_H_ */ 28 | -------------------------------------------------------------------------------- /EasyProg/src/util.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef UTIL_H 3 | #define UTIL_H 4 | 5 | #include 6 | #include "flash.h" 7 | 8 | #define UTIL_GLOBAL_READ_LFN 2 9 | 10 | #define UTIL_STR_SIZE 80 11 | 12 | #define UTIL_USE_USB 254 13 | 14 | // return values for utilOpenFile 15 | #define OPEN_FILE_OK 0 16 | #define OPEN_FILE_ERR 1 17 | #define OPEN_FILE_WRONG 2 18 | #define OPEN_FILE_UNKNOWN 3 19 | // used internally: 20 | #define OPEN_FILE_TYPE_ESPLIT 8 21 | #define OPEN_FILE_TYPE_CRT 9 22 | #define OPEN_FILE_TYPE_PRG 10 23 | 24 | void __fastcall__ utilAppendHex1(uint8_t n); 25 | void __fastcall__ utilAppendHex2(uint8_t n); 26 | void __fastcall__ utilAppendChar(char c); 27 | void __fastcall__ utilAppendStr(const char* str); 28 | 29 | void __fastcall__ utilAppendFlashAddr(const EasyFlashAddr* pAddr); 30 | void __fastcall__ utilAppendDecimal(uint16_t n); 31 | 32 | void utilOpenFileFromUSB(void); 33 | 34 | uint8_t utilOpenFile(uint8_t nPart); 35 | void utilCloseFile(void); 36 | 37 | void utilReadSelectNormalFile(void); 38 | unsigned int __fastcall__ utilKernalRead(void* buffer, 39 | unsigned int size); 40 | 41 | 42 | /* private */ void utilInitDecruncher(void); 43 | /* private */ unsigned int __fastcall__ utilReadEasySplitFile(void* buffer, unsigned int size); 44 | 45 | 46 | extern unsigned int __fastcall__ (*utilRead)(void* buffer, 47 | unsigned int size); 48 | extern int32_t nUtilExoBytesRemaining; 49 | 50 | extern const uint8_t* pFallbackDriverStart; 51 | extern const uint8_t* pFallbackDriverEnd; 52 | 53 | extern char utilStr[UTIL_STR_SIZE]; 54 | 55 | typedef struct EasySplitHeader_s 56 | { 57 | char magic[8]; /* PETSCII EASYSPLT (hex 65 61 73 79 73 70 6c 74) */ 58 | uint8_t len[4]; /* uncompressed file size (little endian) */ 59 | uint8_t id[2]; /* 16 bit file ID, must be constant in all parts 60 | * which belong to one file. May be a random value, 61 | * a checksum or whatever. */ 62 | uint8_t part; /* Number of this file (0 = 01, 1 = 02...) */ 63 | uint8_t total; /* Total number of files */ 64 | } 65 | EasySplitHeader; 66 | 67 | #endif 68 | -------------------------------------------------------------------------------- /EasyProg/todo.txt: -------------------------------------------------------------------------------- 1 | - Slot-Auswahl und KERNAL-Slot-Auswahl abbrechbar machen 2 | - Time elapsed fuer binaries 3 | 4 | -------------------------------------------------------------------------------- /EasySDK/artwork/EasyFlash-Logo-Master.eps: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KimJorgensen/easyflash/9278c9f96fc3226047fb816a6090ff70d6c86cde/EasySDK/artwork/EasyFlash-Logo-Master.eps -------------------------------------------------------------------------------- /EasySDK/artwork/EasyFlash-Logo-Master.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KimJorgensen/easyflash/9278c9f96fc3226047fb816a6090ff70d6c86cde/EasySDK/artwork/EasyFlash-Logo-Master.gif -------------------------------------------------------------------------------- /EasySDK/docs/EasyFlash-AppSupport.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KimJorgensen/easyflash/9278c9f96fc3226047fb816a6090ff70d6c86cde/EasySDK/docs/EasyFlash-AppSupport.pdf -------------------------------------------------------------------------------- /EasySDK/docs/EasyFlash-ProgRef.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KimJorgensen/easyflash/9278c9f96fc3226047fb816a6090ff70d6c86cde/EasySDK/docs/EasyFlash-ProgRef.pdf -------------------------------------------------------------------------------- /EasySDK/docs/contrib/crt-file-format.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KimJorgensen/easyflash/9278c9f96fc3226047fb816a6090ff70d6c86cde/EasySDK/docs/contrib/crt-file-format.txt -------------------------------------------------------------------------------- /EasySDK/docs/latex/Makefile: -------------------------------------------------------------------------------- 1 | 2 | pdfs := ../EasyFlash-ProgRef.pdf 3 | pdfs += ../EasyFlash-AppSupport.pdf 4 | 5 | .PHONY: all 6 | all: $(pdfs) 7 | 8 | 9 | ../%.pdf: %.pdf 10 | cp $^ $@ 11 | 12 | %.pdf: src/%.tex 13 | pdflatex $^ 14 | pdflatex $^ 15 | 16 | .PHONY: clean 17 | clean: 18 | rm -f *.toc 19 | rm -f *.dvi 20 | rm -f *.aux 21 | rm -f *.log 22 | rm -f *.out 23 | 24 | -------------------------------------------------------------------------------- /EasySDK/docs/latex/src/address-scheme.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KimJorgensen/easyflash/9278c9f96fc3226047fb816a6090ff70d6c86cde/EasySDK/docs/latex/src/address-scheme.pdf -------------------------------------------------------------------------------- /EasySDK/docs/latex/src/easyfs.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KimJorgensen/easyflash/9278c9f96fc3226047fb816a6090ff70d6c86cde/EasySDK/docs/latex/src/easyfs.pdf -------------------------------------------------------------------------------- /EasySDK/docs/latex/src/key-commodore.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KimJorgensen/easyflash/9278c9f96fc3226047fb816a6090ff70d6c86cde/EasySDK/docs/latex/src/key-commodore.pdf -------------------------------------------------------------------------------- /EasySDK/docs/latex/src/key-q.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KimJorgensen/easyflash/9278c9f96fc3226047fb816a6090ff70d6c86cde/EasySDK/docs/latex/src/key-q.pdf -------------------------------------------------------------------------------- /EasySDK/docs/latex/src/key-runstop.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KimJorgensen/easyflash/9278c9f96fc3226047fb816a6090ff70d6c86cde/EasySDK/docs/latex/src/key-runstop.pdf -------------------------------------------------------------------------------- /EasySDK/eapi/Makefile: -------------------------------------------------------------------------------- 1 | 2 | EAPI := out/eapi-am29f040-14 out/eapi-m29w160t-03 out/eapi-mx29640b-12 out/eapi-sst39sf040-10 3 | 4 | .PHONY: all 5 | all: $(EAPI) 6 | 7 | ############################################################################### 8 | out/eapi-am29f040-14: eapi-am29f040.s | out 9 | acme -l $@.labels -o $@ $< 10 | 11 | out/eapi-m29w160t-03: eapi-m29w160t.s | out 12 | acme -l $@.labels -o $@ $< 13 | 14 | out/eapi-mx29640b-12: eapi-mx29640b.s | out 15 | acme -l $@.labels -o $@ $< 16 | 17 | out/eapi-sst39sf040-10: eapi-sst39sf040.s | out 18 | acme -l $@.labels -o $@ $< 19 | 20 | ############################################################################### 21 | out: 22 | mkdir -p $@ 23 | 24 | 25 | .PHONY: clean 26 | clean: 27 | rm -f $(EAPI) 28 | rm -rf out 29 | -------------------------------------------------------------------------------- /EasySDK/eapi/eapi_defs.s: -------------------------------------------------------------------------------- 1 | 2 | 3 | ; error codes 4 | EAPI_ERR_RAM = 1 5 | EAPI_ERR_ROML = 2 6 | EAPI_ERR_ROMH = 3 7 | EAPI_ERR_ROML_PROTECTED = 4 8 | EAPI_ERR_ROMH_PROTECTED = 5 9 | 10 | ; I/O address used to select the bank 11 | EASYFLASH_IO_BANK = $de00 12 | 13 | ; I/O address used to read and to select the slot 14 | EASYFLASH_IO_SLOT = $de01 15 | 16 | ; I/O address for enabling memory configuration, /GAME and /EXROM states 17 | EASYFLASH_IO_CONTROL = $de02 18 | 19 | ; Bit for Expansion Port /GAME line (1 = low) 20 | EASYFLASH_IO_BIT_GAME = $01 21 | 22 | ; Bit for Expansion Port /EXROM line (1 = low) 23 | EASYFLASH_IO_BIT_EXROM = $02 24 | 25 | ; Bit for memory control (1 = enabled) 26 | EASYFLASH_IO_BIT_MEMCTRL = $04 27 | 28 | EASYFLASH_IO_BIT_NO_VIC = $08 29 | 30 | ; Bit for status LED (1 = on) 31 | EASYFLASH_IO_BIT_LED = $80 32 | 33 | EASYFLASH_IO_FLASH_SETUP = EASYFLASH_IO_BIT_MEMCTRL | EASYFLASH_IO_BIT_GAME | EASYFLASH_IO_BIT_NO_VIC | EASYFLASH_IO_BIT_LED 34 | EASYFLASH_IO_16K_SETUP = EASYFLASH_IO_BIT_MEMCTRL | EASYFLASH_IO_BIT_GAME | EASYFLASH_IO_BIT_EXROM 35 | -------------------------------------------------------------------------------- /EasySDK/examples/banking-test/Makefile: -------------------------------------------------------------------------------- 1 | 2 | name = banking-test 3 | 4 | $(name).crt: $(name).bin 5 | ../../tools/bin2efcrt $(name).bin $(name).crt 6 | 7 | $(name).bin: $(name).s 8 | acme -o $(name).bin $(name).s 9 | 10 | .PHONY: clean 11 | clean: 12 | rm -f $(name).bin $(name).crt 13 | -------------------------------------------------------------------------------- /EasySDK/examples/banking-test/README: -------------------------------------------------------------------------------- 1 | 2 | This directory contains files to create a simple but real EasyFlash CRT image. 3 | 4 | It contains the standard start-up code which scans the keyboard for "Run/Stop", 5 | "C=" and "Q". If one of these keys is pressed, 6 | 7 | You'll need the acme assembler and the vice emulator installed. 8 | 9 | To create the CRT image, the tool bin2efcrt is used. This is invoked with a 10 | relative path inside EasySDK. Simply make this tool first and then come back 11 | to this example. 12 | 13 | If you have GNU make, just run it. Otherwise you may want to execute the 14 | commands from Makefile manually. 15 | 16 | To test the cartridge, run "x64 -cartcrt banking-test.crt" or attach it using 17 | "File => Attach a cartridge image => Smart attach CRT Image...". 18 | You can also write it to your EasyFlash. 19 | -------------------------------------------------------------------------------- /EasySDK/examples/cc65-16k-crt/Makefile: -------------------------------------------------------------------------------- 1 | 2 | # do not remove intermediate targets 3 | .SECONDARY: 4 | 5 | name := hello16k 6 | 7 | ifneq "$(release)" "yes" 8 | version := $(shell date +%y%m%d-%H%M) 9 | else 10 | version := 1.0.0 11 | endif 12 | 13 | ld_config := src/c64-16k-crt.cfg 14 | 15 | obj := 16 | obj += obj/crt0.o 17 | obj += obj/hello.o 18 | 19 | INCLUDE := include 20 | 21 | DEFINE := -DEFVERSION=\"${version}\" 22 | 23 | .PHONY: all 24 | all: $(name).crt 25 | 26 | ############################################################################### 27 | # Poor men's dependencies: Let all files depend from all header files 28 | # 29 | headers := $(wildcard $(INCLUDE)/*.h) 30 | 31 | obj/%.s: src/%.c obj $(headers) 32 | cc65 -t c64 -T -O --static-locals -I $(INCLUDE) $(DEFINE) -o $@ $< 33 | 34 | ############################################################################### 35 | obj/%.o: obj/%.s obj 36 | ca65 -t c64 -o $@ $< 37 | 38 | ############################################################################### 39 | # the binaries created with acme are included in ca65 source code 40 | # therefore we need a dependency here 41 | # 42 | obj/%.o: src/%.s obj $(bin_acme) 43 | ca65 -t c64 -o $@ $< 44 | 45 | 46 | ############################################################################### 47 | # create a crt image from a binary image 48 | # 49 | %.crt: %.bin 50 | cartconv -t normal -i $< -o $@ -n "$(name)" 51 | 52 | ############################################################################### 53 | obj: 54 | mkdir -p $@ 55 | 56 | $(name).bin: $(obj) $(ld_config) 57 | ld65 -o $@ -m $@.map -C $(ld_config) $(obj) \ 58 | -L /usr/local/lib/cc65/lib --lib c64.lib 59 | ifeq "$(release)" "yes" 60 | cp $@ $@-$(version).prg 61 | endif 62 | 63 | .PHONY: clean 64 | clean: 65 | rm -f $(name) $(name).map $(name).prg 66 | rm -rf obj 67 | -------------------------------------------------------------------------------- /EasySDK/examples/cc65-16k-crt/src/c64-16k-crt.cfg: -------------------------------------------------------------------------------- 1 | 2 | # This configuration is for a 16k cartridge at $8000..$BFFF 3 | 4 | MEMORY { 5 | ZP: start = $0002, size = $001A; 6 | CPUSTACK: start = $0100, size = $0100; 7 | 8 | RAM: start = $0800, size = $7800, define = yes; 9 | ROM: start = $8000, size = $4000, fill = yes, fillval = $ff, file = %O, define = yes; 10 | } 11 | 12 | SEGMENTS { 13 | STARTUP: load = ROM, type = ro; 14 | LOWCODE: load = ROM, type = ro, optional = yes; 15 | INIT: load = ROM, type = ro, define = yes, optional = yes; 16 | CODE: load = ROM, type = ro, define = yes; 17 | RODATA: load = ROM, type = ro, define = yes; 18 | DATA: load = ROM, run = RAM, type = rw, define = yes; 19 | BSS: load = RAM, type = bss, define = yes; 20 | HEAP: load = RAM, type = bss, optional = yes; # must sit just below stack 21 | ZEROPAGE: load = ZP, type = zp, define = yes; 22 | } 23 | 24 | FEATURES { 25 | CONDES: segment = INIT, 26 | type = constructor, 27 | label = __CONSTRUCTOR_TABLE__, 28 | count = __CONSTRUCTOR_COUNT__; 29 | CONDES: segment = RODATA, 30 | type = destructor, 31 | label = __DESTRUCTOR_TABLE__, 32 | count = __DESTRUCTOR_COUNT__; 33 | CONDES: type = interruptor, 34 | segment = RODATA, 35 | label = __INTERRUPTOR_TABLE__, 36 | count = __INTERRUPTOR_COUNT__; 37 | } 38 | 39 | SYMBOLS { 40 | __STACKSIZE__: value = $0800, weak = yes; # 2k stack 41 | } 42 | -------------------------------------------------------------------------------- /EasySDK/examples/cc65-16k-crt/src/crt0.s: -------------------------------------------------------------------------------- 1 | ; 2 | ; Startup code for cc65 (C64 16k CRT) 3 | ; No IRQ support at the moment 4 | ; 5 | 6 | .export _exit 7 | .export __STARTUP__ : absolute = 1 ; Mark as startup 8 | 9 | .import _main 10 | 11 | .import initlib, donelib, copydata 12 | .import zerobss 13 | .import BSOUT 14 | .import __RAM_START__, __RAM_SIZE__ ; Linker generated 15 | 16 | .include "zeropage.inc" 17 | .include "c64.inc" 18 | 19 | ; ------------------------------------------------------------------------ 20 | ; Place the startup code in a special segment. 21 | 22 | .segment "STARTUP" 23 | 24 | ; cold start vector 25 | .word cold_start 26 | 27 | ; warm start vector 28 | .word cold_start 29 | 30 | ; magic string 31 | .byte $c3, $c2, $cd, $38, $30 32 | 33 | ; ------------------------------------------------------------------------ 34 | ; Actual code 35 | 36 | .code 37 | 38 | cold_start: 39 | reset: 40 | ; same init stuff the kernel calls after reset 41 | ldx #0 42 | stx $d016 43 | jsr $ff84 ; Initialise I/O 44 | 45 | ; These may not be needed - depending on what you'll do 46 | jsr $ff87 ; Initialise System Constants 47 | jsr $ff8a ; Restore Kernal Vectors 48 | jsr $ff81 ; Initialize screen editor 49 | 50 | ; Switch to second charset 51 | lda #14 52 | jsr BSOUT 53 | 54 | jsr zerobss 55 | jsr copydata 56 | 57 | ; and here 58 | ; Set argument stack ptr 59 | lda #<(__RAM_START__ + __RAM_SIZE__) 60 | sta sp 61 | lda #>(__RAM_START__ + __RAM_SIZE__) 62 | sta sp + 1 63 | 64 | jsr initlib 65 | jsr _main 66 | 67 | _exit: 68 | jsr donelib 69 | exit: 70 | jmp ($fffc) ; reset, mhhh 71 | -------------------------------------------------------------------------------- /EasySDK/examples/cc65-16k-crt/src/hello.c: -------------------------------------------------------------------------------- 1 | 2 | #include 3 | 4 | int main(void) 5 | { 6 | puts("Hello, world"); 7 | 8 | for (;;) 9 | ++*(unsigned char*)0xd020; 10 | } 11 | -------------------------------------------------------------------------------- /EasySDK/examples/cc65-ef-crt/Makefile: -------------------------------------------------------------------------------- 1 | 2 | # do not remove intermediate targets 3 | .SECONDARY: 4 | 5 | name := hello-ef 6 | 7 | ifneq "$(release)" "yes" 8 | version := $(shell date +%y%m%d-%H%M) 9 | else 10 | version := 1.0.0 11 | endif 12 | 13 | ld_config := src/c64-ef-crt.cfg 14 | 15 | obj := 16 | obj += obj/crt0.o 17 | obj += obj/hello.o 18 | 19 | INCLUDE := include 20 | 21 | DEFINE := -DEFVERSION=\"${version}\" 22 | 23 | .PHONY: all 24 | all: $(name).crt 25 | 26 | ############################################################################### 27 | # Poor men's dependencies: Let all files depend from all header files 28 | # 29 | headers := $(wildcard $(INCLUDE)/*.h) 30 | 31 | obj/%.s: src/%.c obj $(headers) 32 | cc65 -t c64 -T -O --static-locals -I $(INCLUDE) $(DEFINE) -o $@ $< 33 | 34 | ############################################################################### 35 | obj/%.o: obj/%.s obj 36 | ca65 -t c64 -o $@ $< 37 | 38 | ############################################################################### 39 | # the binaries created with acme are included in ca65 source code 40 | # therefore we need a dependency here 41 | # 42 | obj/%.o: src/%.s obj $(bin_acme) 43 | ca65 -t c64 -o $@ $< 44 | 45 | 46 | ############################################################################### 47 | # create a crt image from a binary image 48 | # 49 | %.crt: %.bin 50 | ../../tools/bin2efcrt $< $@ 51 | 52 | ############################################################################### 53 | obj: 54 | mkdir -p $@ 55 | 56 | $(name).bin: $(obj) $(ld_config) 57 | ld65 -o $@ -m $@.map -C $(ld_config) $(obj) \ 58 | -L /usr/local/lib/cc65/lib --lib c64.lib 59 | ifeq "$(release)" "yes" 60 | cp $@ $@-$(version).prg 61 | endif 62 | 63 | .PHONY: clean 64 | clean: 65 | rm -f $(name) $(name).map $(name).prg 66 | rm -rf obj 67 | -------------------------------------------------------------------------------- /EasySDK/examples/cc65-ef-crt/src/c64-ef-crt.cfg: -------------------------------------------------------------------------------- 1 | 2 | # This configuration is for a EF cartridge at $8000..$BFFF 3 | 4 | MEMORY { 5 | ZP: start = $0002, size = $001A, define = yes; 6 | CPUSTACK: start = $0100, size = $0100; 7 | 8 | RAM: start = $0800, size = $7800, define = yes; 9 | ROM: start = $8000, size = $3F80, fill = yes, fillval = $ff, file = %O, define = yes; 10 | ULTIMAX: start = $FF80, size = $007A, fill = yes, fillval = $ff, file = %O, define = yes; 11 | VECTORS: start = $FFFA, size = $0006, fill = yes, fillval = $ff, file = %O, define = yes; 12 | } 13 | 14 | SEGMENTS { 15 | ULTIMAX: load = ULTIMAX, type = ro; 16 | VECTORS: load = VECTORS, type = ro; 17 | STARTUP: load = ROM, type = ro; 18 | LOWCODE: load = ROM, type = ro, optional = yes; 19 | INIT: load = ROM, type = ro, define = yes, optional = yes; 20 | CODE: load = ROM, type = ro, define = yes; 21 | RODATA: load = ROM, type = ro, define = yes; 22 | DATA: load = ROM, run = RAM, type = rw, define = yes; 23 | BSS: load = RAM, type = bss, define = yes; 24 | HEAP: load = RAM, type = bss, optional = yes; # must sit just below stack 25 | ZEROPAGE: load = ZP, type = zp, define = yes; 26 | } 27 | 28 | FEATURES { 29 | CONDES: segment = INIT, 30 | type = constructor, 31 | label = __CONSTRUCTOR_TABLE__, 32 | count = __CONSTRUCTOR_COUNT__; 33 | CONDES: segment = RODATA, 34 | type = destructor, 35 | label = __DESTRUCTOR_TABLE__, 36 | count = __DESTRUCTOR_COUNT__; 37 | CONDES: type = interruptor, 38 | segment = RODATA, 39 | label = __INTERRUPTOR_TABLE__, 40 | count = __INTERRUPTOR_COUNT__; 41 | } 42 | 43 | SYMBOLS { 44 | __STACKSIZE__: value = $0800, weak = yes; # 2k stack 45 | } 46 | -------------------------------------------------------------------------------- /EasySDK/examples/cc65-ef-crt/src/hello.c: -------------------------------------------------------------------------------- 1 | 2 | #include 3 | 4 | int main(void) 5 | { 6 | puts("Hello, world"); 7 | 8 | for (;;) 9 | ++*(unsigned char*)0xd020; 10 | } 11 | -------------------------------------------------------------------------------- /EasySDK/examples/minimal-crt/Makefile: -------------------------------------------------------------------------------- 1 | 2 | minimal.crt: minimal.s 3 | acme -o minimal.bin minimal.s 4 | cartconv -t normal -i minimal.bin -o minimal.crt 5 | 6 | .PHONY: clean 7 | clean: 8 | rm -f minimal.bin minimal.crt 9 | -------------------------------------------------------------------------------- /EasySDK/examples/minimal-crt/README: -------------------------------------------------------------------------------- 1 | 2 | This directory contains files to create a minimal 8k CRT image. 3 | 4 | You'll need the acme assembler and the vice emulator installed. 5 | 6 | If you have GNU make, just run it. Otherwise you may want to execute the 7 | commands from Makefile manually. 8 | 9 | Vice comes with a tool called cartconv which is able to convert binary files 10 | to crt images and vice versa. 11 | 12 | To test the cartridge, run "x64 -cartcrt minimal.crt" or attach it using 13 | "File => Attach a cartridge image => Smart attach CRT Image...". 14 | You can also write it to your EasyFlash. 15 | -------------------------------------------------------------------------------- /EasySDK/examples/minimal-crt/minimal.s: -------------------------------------------------------------------------------- 1 | 2 | * = $8000 3 | crtStart: 4 | 5 | ; ============================================================================= 6 | ; header 7 | 8 | ; cold start vector => our program 9 | !word coldStart 10 | 11 | ; warm start => $febc => exit interrupt 12 | ; fixme: something wrong with this, it crashes on 13 | !word $febc 14 | 15 | ; magic string 16 | !byte $c3, $c2, $cd, $38, $30 17 | 18 | ; ============================================================================= 19 | ; program 20 | 21 | coldStart: 22 | dec $d020 23 | jmp coldStart 24 | 25 | ; ============================================================================= 26 | ; fill it up to 8k 27 | !fill $2000 - (* - crtStart), $ff 28 | -------------------------------------------------------------------------------- /EasySDK/tools/Makefile: -------------------------------------------------------------------------------- 1 | 2 | .PHONY: all 3 | all: 4 | $(CC) -o bin2efcrt bin2efcrt.c 5 | 6 | .PHONY: clean 7 | clean: 8 | rm -f bin2efcrt 9 | 10 | 11 | -------------------------------------------------------------------------------- /EasySplit/CHANGES: -------------------------------------------------------------------------------- 1 | 2 | 1.0.0 - 23.11.2009 3 | * First public release 4 | * New file format 5 | 6 | 0.1.0 - 14.10.2009 7 | * First release, used internally only 8 | -------------------------------------------------------------------------------- /EasySplit/COPYING: -------------------------------------------------------------------------------- 1 | 2 | EasySplit - A tool to split and compress files (e.g. CRT images) 3 | 4 | (c) 2009 Thomas Giesel 5 | 6 | This software is provided 'as-is', without any express or implied 7 | warranty. In no event will the authors be held liable for any damages 8 | arising from the use of this software. 9 | 10 | Permission is granted to anyone to use this software for any purpose, 11 | including commercial applications, and to alter it and redistribute it 12 | freely, subject to the following restrictions: 13 | 14 | 1. The origin of this software must not be misrepresented; you must not 15 | claim that you wrote the original software. If you use this software 16 | in a product, an acknowledgment in the product documentation would be 17 | appreciated but is not required. 18 | 2. Altered source versions must be plainly marked as such, and must not be 19 | misrepresented as being the original software. 20 | 3. This notice may not be removed or altered from any source distribution. 21 | 22 | Thomas Giesel skoe@directbox.com 23 | -------------------------------------------------------------------------------- /EasySplit/INSTALL: -------------------------------------------------------------------------------- 1 | 2 | This document describes how to build EasySplit from source. 3 | 4 | Linux and similar systems 5 | ========================= 6 | 7 | 1. install libwxgtk2.8-dev or whatever name it has on your system. This will 8 | hopefully also install all other dependencies like libwxbase2.8-dev 9 | 10 | 2. compile it (as normal user) using these commands: 11 | 12 | cd make/gcc-default 13 | make 14 | 15 | 3. install it (optional, as root) using this command: 16 | 17 | sudo make install 18 | 19 | Step 3 should even create a menu entry for Gnome, KDE or Xfce. 20 | 21 | Windows 22 | ======= 23 | 24 | If you got a binary, just click on it one or two times. 25 | 26 | The official release for Windows is built on Linux using a cross compiler 27 | This is done like described in the Linux section above, except that the 28 | Makefile resides in make/win32-cross-mingw. It does also contain a target to 29 | cross-build wxWidgets. 30 | 31 | Mac OS X 32 | ======== 33 | 34 | Todo, should work similar as a Linux build. 35 | 36 | Other platforms 37 | =============== 38 | 39 | It may be possible to compile EasySplit on other platforms. The most important 40 | precondition is that wxWidgets runs on that box. You can check it on following 41 | page: http://wiki.wxwidgets.org/Supported_Platforms 42 | 43 | If you get it running somewhere else, I appreciate a report :) 44 | 45 | Thomas Giesel 46 | -------------------------------------------------------------------------------- /EasySplit/README: -------------------------------------------------------------------------------- 1 | 2 | EasySplit is a program to compress and split files. It is mainly intended to 3 | be used with CRT files (cartridge images), but it may also be useful for 4 | other purposes. Exomizer is used for compression. 5 | 6 | File Format 7 | =========== 8 | 9 | An EasySplit file contains data which is compressed in the same way as 10 | "exoraw -m 4096 -c" does it (exomizer 2 beta), i.e. max offset is 4k, 11 | no literal sequences are used. The compressed data is split into several 12 | files. Each of them has its own header. 13 | 14 | When the original file has a CBM-like start address, this is contained in 15 | the encrypted data transparently. 16 | This is the header for an EasySplit file: 17 | 18 | typedef struct EasySplitHeader_s 19 | { 20 | /* PETSCII EASYSPLT (hex 65 61 73 79 73 70 6c 74) */ 21 | char magic[8]; 22 | 23 | /* uncompressed file size (little endian) */ 24 | uint8_t len[4]; 25 | 26 | /* 27 | * CRC-CCITT (start value 0xFFFF) of original file, little endian. 28 | * When unpacking, you should at least check if all parts contain the 29 | * same value to make sure not to mix parts of different files. 30 | */ 31 | uint8_t crc16[2]; 32 | 33 | /* Number of this part (0 = "*.01", 1 = "*.02"...) */ 34 | uint8_t part; 35 | 36 | /* Total number of parts */ 37 | uint8_t total; 38 | } 39 | EasySplitHeader; 40 | -------------------------------------------------------------------------------- /EasySplit/res/easysplit.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Version=1.0 3 | Type=Application 4 | Name=EasySplit 5 | Comment=Compress and split files. 6 | TryExec=easysplit 7 | Exec=easysplit %F 8 | Icon=/usr/local/share/easysplit/res/easysplit.png 9 | Categories=Utility;Compression; 10 | -------------------------------------------------------------------------------- /EasySplit/res/easysplit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KimJorgensen/easyflash/9278c9f96fc3226047fb816a6090ff70d6c86cde/EasySplit/res/easysplit.png -------------------------------------------------------------------------------- /EasySplit/src/callback.h: -------------------------------------------------------------------------------- 1 | #ifndef ALREADY_INCLUDED_CALLBACK 2 | #define ALREADY_INCLUDED_CALLBACK 3 | 4 | /* 5 | * Copyright (c) 2005 Magnus Lind. 6 | * 7 | * This software is provided 'as-is', without any express or implied warranty. 8 | * In no event will the authors be held liable for any damages arising from 9 | * the use of this software. 10 | * 11 | * Permission is granted to anyone to use this software, alter it and re- 12 | * distribute it freely for any non-commercial, non-profit purpose subject to 13 | * the following restrictions: 14 | * 15 | * 1. The origin of this software must not be misrepresented; you must not 16 | * claim that you wrote the original software. If you use this software in a 17 | * product, an acknowledgment in the product documentation would be 18 | * appreciated but is not required. 19 | * 20 | * 2. Altered source versions must be plainly marked as such, and must not 21 | * be misrepresented as being the original software. 22 | * 23 | * 3. This notice may not be removed or altered from any distribution. 24 | * 25 | * 4. The names of this software and/or it's copyright holders may not be 26 | * used to endorse or promote products derived from this software without 27 | * specific prior written permission. 28 | * 29 | */ 30 | 31 | #include 32 | 33 | typedef int cb_cmp(const void *a, const void *b); 34 | typedef void cb_free(void *a); 35 | typedef void cb_fprint(FILE *f, const void *a); 36 | 37 | #endif 38 | -------------------------------------------------------------------------------- /EasySplit/src/chunkpool.h: -------------------------------------------------------------------------------- 1 | #ifndef ALREADY_INCLUDED_CHUNKPOOL 2 | #define ALREADY_INCLUDED_CHUNKPOOL 3 | 4 | /* 5 | * Copyright (c) 2003 -2005 Magnus Lind. 6 | * 7 | * This software is provided 'as-is', without any express or implied warranty. 8 | * In no event will the authors be held liable for any damages arising from 9 | * the use of this software. 10 | * 11 | * Permission is granted to anyone to use this software, alter it and re- 12 | * distribute it freely for any non-commercial, non-profit purpose subject to 13 | * the following restrictions: 14 | * 15 | * 1. The origin of this software must not be misrepresented; you must not 16 | * claim that you wrote the original software. If you use this software in a 17 | * product, an acknowledgment in the product documentation would be 18 | * appreciated but is not required. 19 | * 20 | * 2. Altered source versions must be plainly marked as such, and must not 21 | * be misrepresented as being the original software. 22 | * 23 | * 3. This notice may not be removed or altered from any distribution. 24 | * 25 | * 4. The names of this software and/or it's copyright holders may not be 26 | * used to endorse or promote products derived from this software without 27 | * specific prior written permission. 28 | * 29 | */ 30 | 31 | #include "callback.h" 32 | 33 | #define CHUNKPOOL_CHUNKS_MAX 64 34 | 35 | struct chunkpool { 36 | int chunk_size; 37 | int chunk; 38 | int chunk_pos; 39 | int chunk_max; 40 | void *chunks[64]; 41 | }; 42 | 43 | void 44 | chunkpool_init(struct chunkpool *ctx, int size); 45 | 46 | void 47 | chunkpool_free(struct chunkpool *ctx); 48 | 49 | void 50 | chunkpool_free2(struct chunkpool *ctx, cb_free *f); 51 | 52 | void * 53 | chunkpool_malloc(struct chunkpool *ctx); 54 | 55 | void * 56 | chunkpool_calloc(struct chunkpool *ctx); 57 | 58 | #endif 59 | -------------------------------------------------------------------------------- /EasySplit/src/crc16.c: -------------------------------------------------------------------------------- 1 | /* 2 | * (c) 2009 Thomas Giesel 3 | * 4 | * This software is provided 'as-is', without any express or implied 5 | * warranty. In no event will the authors be held liable for any damages 6 | * arising from the use of this software. 7 | * 8 | * Permission is granted to anyone to use this software for any purpose, 9 | * including commercial applications, and to alter it and redistribute it 10 | * freely, subject to the following restrictions: 11 | * 12 | * 1. The origin of this software must not be misrepresented; you must not 13 | * claim that you wrote the original software. If you use this software 14 | * in a product, an acknowledgment in the product documentation would be 15 | * appreciated but is not required. 16 | * 2. Altered source versions must be plainly marked as such, and must not be 17 | * misrepresented as being the original software. 18 | * 3. This notice may not be removed or altered from any source distribution. 19 | * 20 | * Thomas Giesel skoe@directbox.com 21 | */ 22 | #include 23 | 24 | 25 | /* 26 | * CRC-CCITT (possible start value: 0xFFFF) 27 | * x^16 + x^12 + x^5 + 1 28 | */ 29 | uint16_t crc16_update(uint16_t crc, uint8_t data) 30 | { 31 | crc = ((crc >> 8) & 0xff) | (crc << 8); 32 | crc ^= data; 33 | crc ^= (crc & 0xff) >> 4; 34 | crc ^= crc << 12; 35 | crc ^= (crc & 0xff) << 5; 36 | 37 | return crc; 38 | } 39 | -------------------------------------------------------------------------------- /EasySplit/src/crc16.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef CRC16_H 3 | #define CRC16_H 4 | 5 | #include 6 | 7 | uint16_t crc16_update(uint16_t crc, uint8_t data); 8 | 9 | #endif /* CRC16_H */ 10 | -------------------------------------------------------------------------------- /EasySplit/src/exo_util.h: -------------------------------------------------------------------------------- 1 | #ifndef EXO_UTIL_ALREADY_INCLUDED 2 | #define EXO_UTIL_ALREADY_INCLUDED 3 | 4 | /* 5 | * Copyright (c) 2008 Magnus Lind. 6 | * 7 | * This software is provided 'as-is', without any express or implied warranty. 8 | * In no event will the authors be held liable for any damages arising from 9 | * the use of this software. 10 | * 11 | * Permission is granted to anyone to use this software, alter it and re- 12 | * distribute it freely for any non-commercial, non-profit purpose subject to 13 | * the following restrictions: 14 | * 15 | * 1. The origin of this software must not be misrepresented; you must not 16 | * claim that you wrote the original software. If you use this software in a 17 | * product, an acknowledgment in the product documentation would be 18 | * appreciated but is not required. 19 | * 20 | * 2. Altered source versions must be plainly marked as such, and must not 21 | * be misrepresented as being the original software. 22 | * 23 | * 3. This notice may not be removed or altered from any distribution. 24 | * 25 | * 4. The names of this software and/or it's copyright holders may not be 26 | * used to endorse or promote products derived from this software without 27 | * specific prior written permission. 28 | * 29 | */ 30 | 31 | #include "log.h" 32 | #include "membuf.h" 33 | 34 | /* 35 | * target is the basic token for the sys/call basic command 36 | * it may be -1 for hardcoded detection of a few targets. 37 | */ 38 | int find_sys(const unsigned char *buf, int target); 39 | 40 | struct load_info 41 | { 42 | int basic_txt_start; /* in */ 43 | int basic_var_start; /* out */ 44 | int run; /* out */ 45 | int start; /* out */ 46 | int end; /* out */ 47 | }; 48 | 49 | void load_located(char *filename, unsigned char mem[65536], 50 | struct load_info *info); 51 | 52 | int str_to_int(const char *str, int *value); 53 | 54 | const char *fixup_appl(char *appl); 55 | 56 | #endif 57 | -------------------------------------------------------------------------------- /EasySplit/src/exodec.h: -------------------------------------------------------------------------------- 1 | #ifndef ALREADY_INCLUDED_EXODEC 2 | #define ALREADY_INCLUDED_EXODEC 3 | 4 | /* 5 | * Copyright (c) 2005 Magnus Lind. 6 | * 7 | * This software is provided 'as-is', without any express or implied warranty. 8 | * In no event will the authors be held liable for any damages arising from 9 | * the use of this software. 10 | * 11 | * Permission is granted to anyone to use this software, alter it and re- 12 | * distribute it freely for any non-commercial, non-profit purpose subject to 13 | * the following restrictions: 14 | * 15 | * 1. The origin of this software must not be misrepresented; you must not 16 | * claim that you wrote the original software. If you use this software in a 17 | * product, an acknowledgment in the product documentation would be 18 | * appreciated but is not required. 19 | * 20 | * 2. Altered source versions must be plainly marked as such, and must not 21 | * be misrepresented as being the original software. 22 | * 23 | * 3. This notice may not be removed or altered from any distribution. 24 | * 25 | * 4. The names of this software and/or it's copyright holders may not be 26 | * used to endorse or promote products derived from this software without 27 | * specific prior written permission. 28 | * 29 | */ 30 | 31 | #include "membuf.h" 32 | 33 | struct dec_table 34 | { 35 | unsigned char table_bit[3]; 36 | unsigned char table_off[3]; 37 | unsigned char table_bi[100]; 38 | unsigned char table_lo[100]; 39 | unsigned char table_hi[100]; 40 | }; 41 | 42 | struct dec_ctx 43 | { 44 | int inpos; 45 | int inend; 46 | unsigned char *inbuf; 47 | struct membuf *outbuf; 48 | unsigned int bitbuf; 49 | /* dep_table */ 50 | struct dec_table t[1]; 51 | int bits_read; 52 | }; 53 | 54 | /* returns the encoding */ 55 | char * 56 | dec_ctx_init(struct dec_ctx ctx[1], 57 | struct membuf *inbuf, struct membuf *outbuf); 58 | 59 | void 60 | dec_ctx_free(struct dec_ctx ctx[1]); 61 | 62 | void dec_ctx_decrunch(struct dec_ctx ctx[1]); 63 | 64 | #endif 65 | -------------------------------------------------------------------------------- /EasySplit/src/getflag.h: -------------------------------------------------------------------------------- 1 | #ifndef ALREADY_INCLUDED_GETFLAG 2 | #define ALREADY_INCLUDED_GETFLAG 3 | /* 4 | * Copyright (c) 2002, 2003 Magnus Lind. 5 | * 6 | * This software is provided 'as-is', without any express or implied warranty. 7 | * In no event will the authors be held liable for any damages arising from 8 | * the use of this software. 9 | * 10 | * Permission is granted to anyone to use this software, alter it and re- 11 | * distribute it freely for any non-commercial, non-profit purpose subject to 12 | * the following restrictions: 13 | * 14 | * 1. The origin of this software must not be misrepresented; you must not 15 | * claim that you wrote the original software. If you use this software in a 16 | * product, an acknowledgment in the product documentation would be 17 | * appreciated but is not required. 18 | * 19 | * 2. Altered source versions must be plainly marked as such, and must not 20 | * be misrepresented as being the original software. 21 | * 22 | * 3. This notice may not be removed or altered from any distribution. 23 | * 24 | * 4. The names of this software and/or it's copyright holders may not be 25 | * used to endorse or promote products derived from this software without 26 | * specific prior written permission. 27 | * 28 | */ 29 | 30 | extern int flagind; 31 | extern int flagflag; 32 | extern const char *flagarg; 33 | 34 | int getflag(int argc, char *argv[], const char *flags); 35 | 36 | #endif 37 | -------------------------------------------------------------------------------- /EasySplit/src/log.h: -------------------------------------------------------------------------------- 1 | #ifndef LOG_H 2 | #define LOG_H 3 | 4 | #include 5 | #include 6 | 7 | #include "WorkerThread.h" 8 | 9 | enum log_level { 10 | LOG_MIN = -99, 11 | LOG_FATAL = -40, 12 | LOG_ERROR = -30, 13 | LOG_WARNING = -20, 14 | LOG_BRIEF = -10, 15 | LOG_NORMAL = 0, 16 | LOG_VERBOSE = 10, 17 | LOG_TRACE = 20, 18 | LOG_DEBUG = 30, 19 | LOG_DUMP = 40, 20 | LOG_MAX = 99 21 | }; 22 | 23 | #define LOG(L,ARGS) do { if (L <= LOG_NORMAL) WorkerThread_Log ARGS; } while(0) 24 | #define IS_LOGGABLE(L) 0 25 | #define LOG_SET_LEVEL(L) do {} while(0) 26 | 27 | #endif /* LOG_H */ 28 | -------------------------------------------------------------------------------- /EasySplit/src/membuf_io.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file has been modified by Thomas Giesel: 3 | * - return value instead of calling exit() directly 4 | * 5 | */ 6 | 7 | #ifndef MEMBUF_IO_ALREADY_INCLUDED 8 | #define MEMBUF_IO_ALREADY_INCLUDED 9 | 10 | /* 11 | * Copyright (c) 2005 Magnus Lind. 12 | * 13 | * This software is provided 'as-is', without any express or implied warranty. 14 | * In no event will the authors be held liable for any damages arising from 15 | * the use of this software. 16 | * 17 | * Permission is granted to anyone to use this software, alter it and re- 18 | * distribute it freely for any non-commercial, non-profit purpose subject to 19 | * the following restrictions: 20 | * 21 | * 1. The origin of this software must not be misrepresented; you must not 22 | * claim that you wrote the original software. If you use this software in a 23 | * product, an acknowledgment in the product documentation would be 24 | * appreciated but is not required. 25 | * 26 | * 2. Altered source versions must be plainly marked as such, and must not 27 | * be misrepresented as being the original software. 28 | * 29 | * 3. This notice may not be removed or altered from any distribution. 30 | * 31 | * 4. The names of this software and/or it's copyright holders may not be 32 | * used to endorse or promote products derived from this software without 33 | * specific prior written permission. 34 | * 35 | */ 36 | 37 | #include "membuf.h" 38 | int read_file(const char *name, struct membuf *buf); 39 | int write_file(const char *name, struct membuf *buf); 40 | 41 | #endif 42 | -------------------------------------------------------------------------------- /EasySplit/src/optimal.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KimJorgensen/easyflash/9278c9f96fc3226047fb816a6090ff70d6c86cde/EasySplit/src/optimal.c -------------------------------------------------------------------------------- /EasySplit/src/progress.h: -------------------------------------------------------------------------------- 1 | #ifndef ALREADY_INCLUDED_PROGRESS 2 | #define ALREADY_INCLUDED_PROGRESS 3 | 4 | /* 5 | * Copyright (c) 2005 Magnus Lind. 6 | * 7 | * This software is provided 'as-is', without any express or implied warranty. 8 | * In no event will the authors be held liable for any damages arising from 9 | * the use of this software. 10 | * 11 | * Permission is granted to anyone to use this software, alter it and re- 12 | * distribute it freely for any non-commercial, non-profit purpose subject to 13 | * the following restrictions: 14 | * 15 | * 1. The origin of this software must not be misrepresented; you must not 16 | * claim that you wrote the original software. If you use this software in a 17 | * product, an acknowledgment in the product documentation would be 18 | * appreciated but is not required. 19 | * 20 | * 2. Altered source versions must be plainly marked as such, and must not 21 | * be misrepresented as being the original software. 22 | * 23 | * 3. This notice may not be removed or altered from any distribution. 24 | * 25 | * 4. The names of this software and/or it's copyright holders may not be 26 | * used to endorse or promote products derived from this software without 27 | * specific prior written permission. 28 | * 29 | */ 30 | 31 | struct progress 32 | { 33 | char *msg; 34 | float factor; 35 | int offset; 36 | int last; 37 | }; 38 | 39 | void progress_init(struct progress p[1], char *msg, int start, int end); 40 | 41 | void progress_bump(struct progress p[1], int pos); 42 | 43 | void progress_free(struct progress p[1]); 44 | 45 | #endif 46 | -------------------------------------------------------------------------------- /EasySplit/src/radix.h: -------------------------------------------------------------------------------- 1 | #ifndef ALREADY_INCLUDED_RADIX 2 | #define ALREADY_INCLUDED_RADIX 3 | /* 4 | * Copyright (c) 2002, 2003 Magnus Lind. 5 | * 6 | * This software is provided 'as-is', without any express or implied warranty. 7 | * In no event will the authors be held liable for any damages arising from 8 | * the use of this software. 9 | * 10 | * Permission is granted to anyone to use this software, alter it and re- 11 | * distribute it freely for any non-commercial, non-profit purpose subject to 12 | * the following restrictions: 13 | * 14 | * 1. The origin of this software must not be misrepresented; you must not 15 | * claim that you wrote the original software. If you use this software in a 16 | * product, an acknowledgment in the product documentation would be 17 | * appreciated but is not required. 18 | * 19 | * 2. Altered source versions must be plainly marked as such, and must not 20 | * be misrepresented as being the original software. 21 | * 22 | * 3. This notice may not be removed or altered from any distribution. 23 | * 24 | * 4. The names of this software and/or it's copyright holders may not be 25 | * used to endorse or promote products derived from this software without 26 | * specific prior written permission. 27 | * 28 | */ 29 | 30 | #include "chunkpool.h" 31 | 32 | typedef struct _radix_node *radix_nodep; 33 | 34 | struct _radix_root { 35 | int depth; 36 | radix_nodep root; 37 | struct chunkpool mem[1]; 38 | }; 39 | 40 | typedef struct _radix_root radix_root[1]; 41 | typedef struct _radix_root *radix_rootp; 42 | 43 | 44 | typedef void free_callback(void *data, void *priv); 45 | 46 | /* *f will be called even for null pointers */ 47 | void radix_tree_free(radix_root rr, /* IN */ 48 | free_callback * f, /* IN */ 49 | void *priv); /* IN */ 50 | 51 | void radix_tree_init(radix_root rr); /* IN */ 52 | 53 | void radix_node_set(radix_root rr, /* IN */ 54 | unsigned int index, /* IN */ 55 | void *data); /* IN */ 56 | 57 | void *radix_node_get(radix_root rr, /* IN */ 58 | unsigned int index); /* IN */ 59 | 60 | #endif 61 | -------------------------------------------------------------------------------- /EasyTransfer/CHANGES: -------------------------------------------------------------------------------- 1 | 2 | Version 1.3.0 - 29.09.2013 3 | - Send Raw added 4 | - USB test added 5 | 6 | Version 1.2.0 - 06.02.2013 7 | - Fixed verify error which occurred on some drives, because the head 8 | settle time was too short 9 | - The C64 code for disk write is now contained in the PC tools 10 | 11 | Version 1.1.0 - 26.01.2013 12 | - Initial version 13 | 14 | -------------------------------------------------------------------------------- /EasyTransfer/COPYING: -------------------------------------------------------------------------------- 1 | 2 | EasyTransfer - Send files to an EasyFlash 3 3 | 4 | (c) 2011 Thomas Giesel 5 | 6 | This software is provided 'as-is', without any express or implied 7 | warranty. In no event will the authors be held liable for any damages 8 | arising from the use of this software. 9 | 10 | Permission is granted to anyone to use this software for any purpose, 11 | including commercial applications, and to alter it and redistribute it 12 | freely, subject to the following restrictions: 13 | 14 | 1. The origin of this software must not be misrepresented; you must not 15 | claim that you wrote the original software. If you use this software 16 | in a product, an acknowledgment in the product documentation would be 17 | appreciated but is not required. 18 | 2. Altered source versions must be plainly marked as such, and must not be 19 | misrepresented as being the original software. 20 | 3. This notice may not be removed or altered from any source distribution. 21 | 22 | Thomas Giesel skoe@directbox.com 23 | -------------------------------------------------------------------------------- /EasyTransfer/INSTALL: -------------------------------------------------------------------------------- 1 | 2 | This document describes how to build EasyTransfer from source. 3 | 4 | Linux and similar systems 5 | ========================= 6 | 7 | 1. install libwxgtk2.8-dev or whatever name it has on your system. This will 8 | hopefully also install all other dependencies like libwxbase2.8-dev 9 | install libftdi-dev and libusb-dev 10 | 11 | 2. compile it (as normal user) using these commands: 12 | 13 | make 14 | 15 | If you need the command line tool only, you can use: 16 | 17 | make ef3xfer 18 | 19 | 3. Install it (optional, as root) using this command: 20 | 21 | sudo make install 22 | 23 | Step 3 should create a menu entry for Gnome, KDE or Xfce. Note that make 24 | install does not work for ef3xfer only. 25 | 26 | Permissions on Linux 27 | -------------------- 28 | 29 | To access the EasyFlash 3 without being root, on Debian derived systems it 30 | might help to create a new udev rule file: 31 | 32 | sudo nano /etc/udev/rules.d/80-easyflash.rules 33 | 34 | add following content: 35 | 36 | SUBSYSTEM=="usb", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="8738", MODE="0664", GROUP="plugdev" 37 | 38 | finally restart the service and re-plug your EasyFlash 3. 39 | 40 | sudo restart udev 41 | 42 | Do note forget to add your user account to the group plugdev. 43 | Other distributions might work similar. 44 | 45 | Windows 46 | ======= 47 | 48 | To cross compile the software on Linux for Windows, you need following 49 | packages (Debian/Ubuntu naming): 50 | gcc-mingw-w64-i686 g++-mingw-w64-i686 cmake dos2unix 51 | 52 | 53 | Mac OS X 54 | ======== 55 | 56 | Should work similar as a Linux build. 57 | 58 | Other platforms 59 | =============== 60 | 61 | It may be possible to compile EasyTransfer on other platforms. The most 62 | important precondition is that wxWidgets and libftdi run on that box. 63 | 64 | If you get it running somewhere else, I appreciate a report :) 65 | 66 | Thomas Giesel 67 | -------------------------------------------------------------------------------- /EasyTransfer/README: -------------------------------------------------------------------------------- 1 | 2 | - 3 | -------------------------------------------------------------------------------- /EasyTransfer/archive/filefn.wx2.8.12.diff: -------------------------------------------------------------------------------- 1 | Index: filefn.h 2 | =================================================================== 3 | --- filefn.h (Revision 69439) 4 | +++ filefn.h (Arbeitskopie) 5 | @@ -210,7 +210,8 @@ 6 | // to avoid using them as they're not present in earlier versions and 7 | // always using the native functions spelling is easier than testing for 8 | // the versions 9 | - #if defined(__BORLANDC__) || defined(__DMC__) || defined(__WATCOMC__) || defined(__MINGW64__) 10 | + #if defined(__BORLANDC__) || defined(__DMC__) || defined(__WATCOMC__) || \ 11 | + defined(__MINGW64_VERSION_MAJOR) 12 | #define wxPOSIX_IDENT(func) ::func 13 | #else // by default assume MSVC-compatible names 14 | #define wxPOSIX_IDENT(func) _ ## func 15 | @@ -245,7 +246,7 @@ 16 | #endif 17 | 18 | #ifdef wxHAS_HUGE_FILES 19 | - #ifndef __MINGW64__ 20 | + #ifndef __MINGW64_VERSION_MAJOR 21 | #define wxSeek wxPOSIX_IDENT(lseeki64) 22 | #define wxLseek wxPOSIX_IDENT(lseeki64) 23 | #define wxTell wxPOSIX_IDENT(telli64) 24 | -------------------------------------------------------------------------------- /EasyTransfer/archive/libftdi-HEAD-a67c3be.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KimJorgensen/easyflash/9278c9f96fc3226047fb816a6090ff70d6c86cde/EasyTransfer/archive/libftdi-HEAD-a67c3be.tar.gz -------------------------------------------------------------------------------- /EasyTransfer/archive/libusb-1.0.9.tar.bz2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KimJorgensen/easyflash/9278c9f96fc3226047fb816a6090ff70d6c86cde/EasyTransfer/archive/libusb-1.0.9.tar.bz2 -------------------------------------------------------------------------------- /EasyTransfer/make/bin2c.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | import sys 3 | 4 | 5 | if __name__ == '__main__': 6 | if len(sys.argv) == 4: 7 | if sys.argv[1] == '-': 8 | instream = sys.stdin 9 | else: 10 | instream = file(sys.argv[1],'rb') 11 | if sys.argv[2] == '-': 12 | outstream = sys.stdout 13 | else: 14 | outstream = file(sys.argv[2], 'wt') 15 | varname = sys.argv[3] 16 | else: 17 | print "Usage: bin2c infile outfile varname" 18 | sys.exit(0) 19 | 20 | outstream.write("\n\nconst unsigned char %s[] = {\n " % varname) 21 | written = 0 22 | while True: 23 | byte = instream.read(1) 24 | if len(byte) != 1: 25 | break 26 | outstream.write( "0x%.2x, " % ord(byte) ) 27 | written += 1 28 | if written % 16 == 0: 29 | outstream.write( "\n " ) 30 | outstream.write("\n};\n") 31 | outstream.write("\nint %s_size = %i;\n\n" % (varname, written)) 32 | 33 | sys.exit(0) 34 | -------------------------------------------------------------------------------- /EasyTransfer/make/win32-cross-mingw/Toolchain-i686-w64-mingw32.cmake: -------------------------------------------------------------------------------- 1 | # the name of the target operating system 2 | SET(CMAKE_SYSTEM_NAME Windows) 3 | 4 | # which compilers to use for C and C++ 5 | SET(CMAKE_C_COMPILER i686-w64-mingw32-gcc) 6 | SET(CMAKE_CXX_COMPILER i686-w64-mingw32-g++) 7 | SET(CMAKE_RC_COMPILER i686-w64-mingw32-windres) 8 | 9 | # here is the target environment located 10 | SET(CMAKE_FIND_ROOT_PATH /usr/i686-w64-mingw32) 11 | 12 | # adjust the default behaviour of the FIND_XXX() commands: 13 | # search headers and libraries in the target environment, search 14 | # programs in the host environment 15 | set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) 16 | set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) 17 | set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) 18 | -------------------------------------------------------------------------------- /EasyTransfer/res/easytransfer.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Version=1.0 3 | Type=Application 4 | Name=EasyTransfer 5 | Comment=Compress and split files. 6 | TryExec=easytransfer 7 | Exec=easytransfer %F 8 | Icon=/usr/local/share/easytransfer/res/easytransfer.png 9 | Categories=Utility; 10 | -------------------------------------------------------------------------------- /EasyTransfer/res/easytransfer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KimJorgensen/easyflash/9278c9f96fc3226047fb816a6090ff70d6c86cde/EasyTransfer/res/easytransfer.png -------------------------------------------------------------------------------- /EasyTransfer/src/EasyTransfer.rc: -------------------------------------------------------------------------------- 1 | iconID ICON "easytransfer.ico" 2 | -------------------------------------------------------------------------------- /EasyTransfer/src/EasyTransferApp.h: -------------------------------------------------------------------------------- 1 | /* 2 | * EasyTransfer 3 | * 4 | * (c) 2011 Thomas Giesel 5 | * 6 | * This software is provided 'as-is', without any express or implied 7 | * warranty. In no event will the authors be held liable for any damages 8 | * arising from the use of this software. 9 | * 10 | * Permission is granted to anyone to use this software for any purpose, 11 | * including commercial applications, and to alter it and redistribute it 12 | * freely, subject to the following restrictions: 13 | * 14 | * 1. The origin of this software must not be misrepresented; you must not 15 | * claim that you wrote the original software. If you use this software 16 | * in a product, an acknowledgment in the product documentation would be 17 | * appreciated but is not required. 18 | * 2. Altered source versions must be plainly marked as such, and must not be 19 | * misrepresented as being the original software. 20 | * 3. This notice may not be removed or altered from any source distribution. 21 | * 22 | * Thomas Giesel skoe@directbox.com 23 | */ 24 | 25 | #ifndef MCAPP_H 26 | #define MCAPP_H 27 | 28 | #include 29 | #include 30 | #include 31 | 32 | #include "EasyTransferMainFrame.h" 33 | 34 | class PalettePanel; 35 | class MCChildFrame; 36 | 37 | class EasyTransferApp : public wxApp 38 | { 39 | public: 40 | EasyTransferApp(); 41 | virtual ~EasyTransferApp(); 42 | virtual bool OnInit(); 43 | virtual void OnInitCmdLine(wxCmdLineParser& parser); 44 | virtual bool OnCmdLineParsed(wxCmdLineParser& parser); 45 | 46 | protected: 47 | EasyTransferMainFrame* m_pMainFrame; 48 | }; 49 | 50 | DECLARE_APP(EasyTransferApp) 51 | 52 | #endif // MCAPP_H 53 | -------------------------------------------------------------------------------- /EasyTransfer/src/TabStartPRG.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * TabStartPRG.cpp 3 | * 4 | * Created on: 13.02.2012 5 | * Author: skoe 6 | */ 7 | 8 | #include 9 | #include 10 | #include 11 | 12 | #include "EasyTransferMainFrame.h" 13 | #include "WorkerThread.h" 14 | #include "TabStartPRG.h" 15 | 16 | TabStartPRG::TabStartPRG(wxWindow* parent) : 17 | wxPanel(parent) 18 | { 19 | wxFlexGridSizer* pMainSizer; 20 | wxStaticText* pText; 21 | 22 | pMainSizer = new wxFlexGridSizer(5, 2, 8, 8); 23 | pMainSizer->AddGrowableCol(1); 24 | 25 | // Input file 26 | pText = new wxStaticText(this, wxID_ANY, _("Program File")); 27 | pMainSizer->Add(pText, 0, 28 | wxALIGN_CENTER_VERTICAL | wxALIGN_RIGHT | wxALL, 10); 29 | 30 | m_pInputFilePicker = new wxFilePickerCtrl(this, wxID_ANY, wxEmptyString, 31 | _("Select a file"), _("*"), wxDefaultPosition, wxDefaultSize, 32 | wxFLP_USE_TEXTCTRL | wxFLP_OPEN | wxFLP_FILE_MUST_EXIST); 33 | m_pInputFilePicker->SetMinSize(wxSize(300, m_pInputFilePicker->GetMinSize().GetHeight())); 34 | pMainSizer->Add(m_pInputFilePicker, 1, wxEXPAND | wxALL, 10); 35 | 36 | SetSizer(pMainSizer); 37 | pMainSizer->SetSizeHints(this); 38 | 39 | Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(TabStartPRG::OnButton)); 40 | } 41 | 42 | 43 | /*****************************************************************************/ 44 | void TabStartPRG::OnButton(wxCommandEvent& event) 45 | { 46 | EasyTransferMainFrame* pMainFrame; 47 | WorkerThread* pWorkerThread; 48 | 49 | pMainFrame = (EasyTransferMainFrame*) wxTheApp->GetTopWindow(); 50 | pWorkerThread = pMainFrame->GetWorkerThread(); 51 | 52 | pWorkerThread->SetFileName(m_pInputFilePicker->GetPath()); 53 | pWorkerThread->SetTransferType(_("PRG")); 54 | pMainFrame->DoIt(); 55 | } 56 | -------------------------------------------------------------------------------- /EasyTransfer/src/TabStartPRG.h: -------------------------------------------------------------------------------- 1 | /* 2 | * TabStartPRG.h 3 | * 4 | * Created on: 13.02.2012 5 | * Author: skoe 6 | */ 7 | 8 | #ifndef TABSTARTPRG_H_ 9 | #define TABSTARTPRG_H_ 10 | 11 | #include 12 | 13 | 14 | class wxFilePickerCtrl; 15 | 16 | 17 | class TabStartPRG: public wxPanel 18 | { 19 | public: 20 | TabStartPRG(wxWindow* parent); 21 | 22 | protected: 23 | void OnButton(wxCommandEvent& event); 24 | 25 | wxFilePickerCtrl* m_pInputFilePicker; 26 | 27 | }; 28 | 29 | #endif /* TABSTARTPRG_H_ */ 30 | -------------------------------------------------------------------------------- /EasyTransfer/src/TabUSBTest.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * TabSpecial.cpp 3 | * 4 | * Created on: 13.02.2012 5 | * Author: skoe 6 | */ 7 | 8 | #include 9 | #include 10 | 11 | #include "EasyTransferMainFrame.h" 12 | #include "WorkerThread.h" 13 | #include "TabUSBTest.h" 14 | 15 | TabUSBTest::TabUSBTest(wxWindow* parent) : 16 | wxPanel(parent) 17 | { 18 | wxBoxSizer* pMainSizer; 19 | wxStaticText* pText; 20 | const wxChar* texts[] = 21 | { 22 | _("First start EasyProg \"Expert => USB Test\"."), 23 | _("Then run this test with the button below."), 24 | NULL 25 | }; 26 | 27 | pMainSizer = new wxBoxSizer(wxVERTICAL); 28 | 29 | for (int i = 0; texts[i] != NULL; ++i) 30 | { 31 | pText = new wxStaticText(this, wxID_ANY, texts[i], wxDefaultPosition, wxDefaultSize, wxALIGN_CENTRE); 32 | pMainSizer->Add(pText, 1, wxEXPAND | wxLEFT | wxTOP, 24); 33 | } 34 | pMainSizer->AddSpacer(24); 35 | 36 | SetSizer(pMainSizer); 37 | pMainSizer->SetSizeHints(this); 38 | 39 | Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(TabUSBTest::OnButton)); 40 | } 41 | 42 | 43 | /*****************************************************************************/ 44 | void TabUSBTest::OnButton(wxCommandEvent& event) 45 | { 46 | EasyTransferMainFrame* pMainFrame; 47 | WorkerThread* pWorkerThread; 48 | 49 | pMainFrame = (EasyTransferMainFrame*) wxTheApp->GetTopWindow(); 50 | pWorkerThread = pMainFrame->GetWorkerThread(); 51 | 52 | pWorkerThread->SetTransferType(_("USBTEST")); 53 | pMainFrame->DoIt(); 54 | } 55 | -------------------------------------------------------------------------------- /EasyTransfer/src/TabUSBTest.h: -------------------------------------------------------------------------------- 1 | /* 2 | * TabSpecial.h 3 | * 4 | * Created on: 13.02.2012 5 | * Author: skoe 6 | */ 7 | 8 | #ifndef TABSPECIAL_H_ 9 | #define TABSPECIAL_H_ 10 | 11 | #include 12 | 13 | 14 | class wxFilePickerCtrl; 15 | 16 | 17 | class TabUSBTest: public wxPanel 18 | { 19 | public: 20 | TabUSBTest(wxWindow* parent); 21 | 22 | protected: 23 | void OnButton(wxCommandEvent& event); 24 | }; 25 | 26 | #endif /* TABSPECIAL_H_ */ 27 | -------------------------------------------------------------------------------- /EasyTransfer/src/TabWriteCRT.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * TabWriteCRT.cpp 3 | * 4 | * Created on: 13.02.2012 5 | * Author: skoe 6 | */ 7 | 8 | #include 9 | #include 10 | #include 11 | 12 | #include "EasyTransferMainFrame.h" 13 | #include "WorkerThread.h" 14 | #include "TabWriteCRT.h" 15 | 16 | 17 | TabWriteCRT::TabWriteCRT(wxWindow* parent) : 18 | wxPanel(parent) 19 | { 20 | wxFlexGridSizer* pMainSizer; 21 | wxStaticText* pText; 22 | 23 | pMainSizer = new wxFlexGridSizer(5, 2, 8, 8); 24 | pMainSizer->AddGrowableCol(1); 25 | 26 | // Input file 27 | pText = new wxStaticText(this, wxID_ANY, _("Cartridge Image")); 28 | pMainSizer->Add(pText, 0, 29 | wxALIGN_CENTER_VERTICAL | wxALIGN_RIGHT | wxALL, 10); 30 | 31 | m_pInputFilePicker = new wxFilePickerCtrl(this, wxID_ANY, wxEmptyString, 32 | _("Select a cartridge image"), _("*"), wxDefaultPosition, wxDefaultSize, 33 | wxFLP_USE_TEXTCTRL | wxFLP_OPEN | wxFLP_FILE_MUST_EXIST); 34 | m_pInputFilePicker->SetMinSize(wxSize(300, m_pInputFilePicker->GetMinSize().GetHeight())); 35 | pMainSizer->Add(m_pInputFilePicker, 1, wxEXPAND | wxALL, 10); 36 | 37 | SetSizer(pMainSizer); 38 | pMainSizer->SetSizeHints(this); 39 | 40 | Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(TabWriteCRT::OnButton)); 41 | } 42 | 43 | /*****************************************************************************/ 44 | void TabWriteCRT::OnButton(wxCommandEvent& event) 45 | { 46 | EasyTransferMainFrame* pMainFrame; 47 | WorkerThread* pWorkerThread; 48 | 49 | pMainFrame = (EasyTransferMainFrame*) wxTheApp->GetTopWindow(); 50 | pWorkerThread = pMainFrame->GetWorkerThread(); 51 | 52 | pWorkerThread->SetFileName(m_pInputFilePicker->GetPath()); 53 | pWorkerThread->SetTransferType(_("CRT")); 54 | pMainFrame->DoIt(); 55 | } 56 | -------------------------------------------------------------------------------- /EasyTransfer/src/TabWriteCRT.h: -------------------------------------------------------------------------------- 1 | /* 2 | * TabWriteCRT.h 3 | * 4 | * Created on: 13.02.2012 5 | * Author: skoe 6 | */ 7 | 8 | #ifndef TABWRITECRT_H_ 9 | #define TABWRITECRT_H_ 10 | 11 | #include 12 | 13 | 14 | class wxFilePickerCtrl; 15 | 16 | 17 | class TabWriteCRT: public wxPanel 18 | { 19 | public: 20 | TabWriteCRT(wxWindow* parent); 21 | 22 | protected: 23 | void OnButton(wxCommandEvent& event); 24 | 25 | wxFilePickerCtrl* m_pInputFilePicker; 26 | 27 | }; 28 | 29 | #endif /* TABWRITECRT_H_ */ 30 | -------------------------------------------------------------------------------- /EasyTransfer/src/TabWriteDisk.h: -------------------------------------------------------------------------------- 1 | /* 2 | * TabWriteDisk.h 3 | * 4 | * Created on: 13.02.2012 5 | * Author: skoe 6 | */ 7 | 8 | #ifndef TABWRITEDISK_H_ 9 | #define TABWRITEDISK_H_ 10 | 11 | #include 12 | 13 | 14 | class wxFilePickerCtrl; 15 | 16 | 17 | class TabWriteDisk: public wxPanel 18 | { 19 | public: 20 | TabWriteDisk(wxWindow* parent); 21 | 22 | protected: 23 | void OnButton(wxCommandEvent& event); 24 | 25 | wxFilePickerCtrl* m_pInputFilePicker; 26 | wxChoice* m_pDriveNumberChoice; 27 | 28 | }; 29 | 30 | #endif /* TABWRITEDISK_H_ */ 31 | -------------------------------------------------------------------------------- /EasyTransfer/src/d64writer/Makefile: -------------------------------------------------------------------------------- 1 | 2 | # do not remove intermediate targets 3 | .SECONDARY: 4 | 5 | name := d64writer 6 | 7 | ifneq "$(release)" "yes" 8 | version := $(shell date +%y%m%d-%H%M) 9 | else 10 | version := 1.0.0 11 | endif 12 | 13 | obj := 14 | obj += obj/d64writer.o 15 | obj += obj/write_disk.o 16 | 17 | inc := src 18 | inc += ../../../libs/libef3usb/src 19 | inc += ../../../libs/eload/src 20 | 21 | INCLUDE := $(addprefix -I,$(inc)) 22 | 23 | DEFINE := -DEFVERSION=\"${version}\" 24 | 25 | libef3usb := ../../../libs/libef3usb/libef3usb.lib 26 | libeload := ../../../libs/eload/eload.lib 27 | 28 | .PHONY: all 29 | all: $(name).prg 30 | 31 | ############################################################################### 32 | # Poor men's dependencies: Let all files depend from all header files 33 | # 34 | headers := $(wildcard $(INCLUDE)/*.h) 35 | 36 | obj/%.s: src/%.c $(headers) | obj 37 | cc65 -t c64 -T -O --static-locals $(INCLUDE) $(DEFINE) -o $@ $< 38 | 39 | ############################################################################### 40 | obj/%.o: obj/%.s | obj 41 | ca65 -t c64 $(INCLUDE) -o $@ $< 42 | 43 | ############################################################################### 44 | obj/%.o: src/%.s | obj 45 | ca65 -t c64 $(INCLUDE) -o $@ $< 46 | 47 | ############################################################################### 48 | # 49 | $(libef3usb): force 50 | $(MAKE) -C $(dir $@) 51 | 52 | $(libeload): force 53 | $(MAKE) -C $(dir $@) 54 | 55 | .PHONY: force 56 | force: 57 | 58 | ############################################################################### 59 | obj: 60 | mkdir -p $@ 61 | 62 | $(name).prg: obj/crt0.o $(obj) src/ld.cfg $(libef3usb) $(libeload) 63 | ld65 -o $@ -m $@.map -C src/ld.cfg obj/crt0.o $(obj) \ 64 | --lib $(libef3usb) $(libeload) \ 65 | -L /usr/local/lib/cc65/lib --lib c64.lib 66 | cat $@.map | grep -e "^Name\|^CODE\|^DATA\|^BSS\|^RODATA\|^LOWCODE" 67 | 68 | .PHONY: clean 69 | clean: 70 | rm -f $(name).prg 71 | rm -f $(obj) 72 | rm -rf obj 73 | -$(MAKE) -C $(dir $(libef3usb)) clean 74 | -$(MAKE) -C $(dir $(libeload)) clean 75 | 76 | -------------------------------------------------------------------------------- /EasyTransfer/src/d64writer/src/d64writer.c: -------------------------------------------------------------------------------- 1 | /* 2 | * (c) 2013 Thomas Giesel 3 | * 4 | * This software is provided 'as-is', without any express or implied 5 | * warranty. In no event will the authors be held liable for any damages 6 | * arising from the use of this software. 7 | * 8 | * Permission is granted to anyone to use this software for any purpose, 9 | * including commercial applications, and to alter it and redistribute it 10 | * freely, subject to the following restrictions: 11 | * 12 | * 1. The origin of this software must not be misrepresented; you must not 13 | * claim that you wrote the original software. If you use this software 14 | * in a product, an acknowledgment in the product documentation would be 15 | * appreciated but is not required. 16 | * 2. Altered source versions must be plainly marked as such, and must not be 17 | * misrepresented as being the original software. 18 | * 3. This notice may not be removed or altered from any source distribution. 19 | * 20 | * Thomas Giesel skoe@directbox.com 21 | */ 22 | 23 | #include 24 | #include 25 | #include 26 | 27 | #include 28 | 29 | #include "d64writer.h" 30 | 31 | int main(void) 32 | { 33 | const char* p_str_cmd; 34 | 35 | puts("D64 writer started"); 36 | 37 | for (;;) 38 | { 39 | puts("\nWaiting for command from USB..."); 40 | do 41 | { 42 | p_str_cmd = ef3usb_check_cmd(); 43 | } 44 | while (p_str_cmd == NULL); 45 | printf("Command: %s\n", p_str_cmd); 46 | 47 | if (strcmp(p_str_cmd, "d64") == 0) 48 | { 49 | write_disk_d64(); 50 | } 51 | else 52 | { 53 | ef3usb_send_str("etyp"); 54 | } 55 | } 56 | 57 | return 0; 58 | } 59 | -------------------------------------------------------------------------------- /EasyTransfer/src/d64writer/src/d64writer.h: -------------------------------------------------------------------------------- 1 | #ifndef D64WRITER_H_ 2 | #define D64WRITER_H_ 3 | 4 | void usbtool_prg_load_and_run(void); 5 | 6 | /* from write_disk.h */ 7 | void write_disk_d64(void); 8 | 9 | 10 | #endif /* D64WRITER_H_ */ 11 | -------------------------------------------------------------------------------- /EasyTransfer/src/d64writer/src/ld.cfg: -------------------------------------------------------------------------------- 1 | 2 | SYMBOLS { 3 | #__STACKSIZE__: type = weak, value = $0800; 4 | __STACKSIZE__ = $0800; 5 | } 6 | 7 | MEMORY { 8 | ZP: start = $0002, size = $001A, type = rw, define = yes; 9 | RAM: start = $07FF, size = $a801, file = %O, define = yes; 10 | ZP_BACKUP: start = $c400, size = $001A, type = rw, define = yes; # size like ZP 11 | HIRAM: start = $c000, size = $1000, type = rw, define = yes; 12 | } 13 | 14 | SEGMENTS { 15 | STARTUP: load = RAM, type = ro; 16 | LOWCODE: load = RAM, type = ro, optional = yes; 17 | INIT: load = RAM, type = ro, define = yes, optional = yes; 18 | CODE: load = RAM, type = ro, align = $20; 19 | RODATA: load = RAM, type = ro, align = $100; 20 | DATA: load = RAM, type = rw; 21 | ZPSAVE: load = RAM, type = bss; 22 | BSS: load = RAM, type = bss, define = yes; # must be below HEAP 23 | HEAP: load = RAM, type = bss, optional = yes; # must sit just below stack at end of RAM 24 | ZEROPAGE: load = ZP, type = zp; 25 | } 26 | 27 | FEATURES { 28 | CONDES: segment = INIT, 29 | type = constructor, 30 | label = __CONSTRUCTOR_TABLE__, 31 | count = __CONSTRUCTOR_COUNT__; 32 | CONDES: segment = RODATA, 33 | type = destructor, 34 | label = __DESTRUCTOR_TABLE__, 35 | count = __DESTRUCTOR_COUNT__; 36 | CONDES: segment = RODATA, 37 | type = interruptor, 38 | label = __INTERRUPTOR_TABLE__, 39 | count = __INTERRUPTOR_COUNT__; 40 | } 41 | 42 | MEMORY { 43 | } 44 | 45 | -------------------------------------------------------------------------------- /EasyTransfer/src/ef3xfer.h: -------------------------------------------------------------------------------- 1 | /* 2 | * ef3xfer.h 3 | * 4 | * Created on: 26.01.2012 5 | * Author: skoe 6 | */ 7 | 8 | #ifndef EF3XFER_H_ 9 | #define EF3XFER_H_ 10 | 11 | #ifdef __cplusplus 12 | extern "C" { 13 | #endif 14 | 15 | #define EF3XFER_RESP_SIZE (4 + 1) 16 | 17 | void ef3xfer_set_callbacks( 18 | void (*custom_log_str)(const char* str), 19 | void (*custom_log_progress)(int percent, int b_gui_only)); 20 | 21 | int ef3xfer_raw_send(const char* p_filename); 22 | 23 | int ef3xfer_transfer_crt(const char* p_filename); 24 | 25 | int ef3xfer_transfer_prg(const char* p_filename); 26 | int ef3xfer_transfer_prg_mem(const unsigned char* p_prg, int size); 27 | 28 | int ef3xfer_d64_write(const char* p_filename, int drv, int do_format); 29 | 30 | int ef3xfer_usb_test(void); 31 | 32 | #ifdef __cplusplus 33 | } 34 | #endif 35 | 36 | #endif /* EF3XFER_H_ */ 37 | -------------------------------------------------------------------------------- /EasyTransfer/src/ef3xfer_internal.h: -------------------------------------------------------------------------------- 1 | /* 2 | * ef3xfer_internal.h 3 | * 4 | * Created on: 02.02.2012 5 | * Author: skoe 6 | */ 7 | 8 | #ifndef EF3XFER_INTERNAL_H_ 9 | #define EF3XFER_INTERNAL_H_ 10 | 11 | void ef3xfer_log_ftdi_error(int reason, struct ftdi_context* p_ftdic); 12 | void ef3xfer_log_printf(const char* p_str_format, ...); 13 | void ef3xfer_log_progress(int percent, int b_gui_only); 14 | 15 | void ef3xfer_disconnect_ftdi(void); 16 | 17 | int ef3xfer_do_handshake(const char* p_str_type); 18 | 19 | int ef3xfer_read_from_ftdi(void* p_buffer, int size); 20 | 21 | int ef3xfer_write_to_ftdi(const void* p_buffer, int size); 22 | 23 | int ef3xfer_d64_write(const char* p_filename, int drv, int do_format); 24 | 25 | 26 | #endif /* EF3XFER_INTERNAL_H_ */ 27 | -------------------------------------------------------------------------------- /EasyTransfer/src/str_to_key.h: -------------------------------------------------------------------------------- 1 | /* 2 | * str_to_key.h 3 | * 4 | * Created on: 18.04.2012 5 | * Author: skoe 6 | */ 7 | 8 | #ifndef STR_TO_KEY_H_ 9 | #define STR_TO_KEY_H_ 10 | 11 | 12 | /* Translate string constants to key buffer bytes */ 13 | typedef struct str_to_key_s 14 | { 15 | const char* str; 16 | unsigned char key; 17 | } str_to_key_t; 18 | 19 | extern const str_to_key_t str_to_key[]; 20 | 21 | #endif /* STR_TO_KEY_H_ */ 22 | -------------------------------------------------------------------------------- /Hardware/eagle-logic-tht/EasyFlash 1.4.1 REV B.brd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KimJorgensen/easyflash/9278c9f96fc3226047fb816a6090ff70d6c86cde/Hardware/eagle-logic-tht/EasyFlash 1.4.1 REV B.brd -------------------------------------------------------------------------------- /Hardware/eagle-logic-tht/EasyFlash 1.4.1 REV B.sch: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KimJorgensen/easyflash/9278c9f96fc3226047fb816a6090ff70d6c86cde/Hardware/eagle-logic-tht/EasyFlash 1.4.1 REV B.sch -------------------------------------------------------------------------------- /Hardware/ef2-vhdl/ef2.prj: -------------------------------------------------------------------------------- 1 | vhdl work src/ef2.vhdl 2 | vhdl work src/ef2_types.vhdl 3 | vhdl work src/exp_bus_ctrl.vhdl 4 | vhdl work src/reset_generator.vhdl 5 | vhdl work src/freezer.vhdl 6 | -------------------------------------------------------------------------------- /Hardware/ef2-vhdl/ef2.xst: -------------------------------------------------------------------------------- 1 | set -tmpdir synth/xst/tmp 2 | set -xsthdpdir synth/xst 3 | run 4 | -ifn ef2.prj 5 | -ifmt vhdl 6 | -ofn synth/ef2.ngc 7 | -ofmt NGC 8 | -p xc9500xl 9 | -top ef2 10 | -opt_mode Speed 11 | -opt_level 1 12 | -------------------------------------------------------------------------------- /Hardware/ef2-vhdl/impact.batch: -------------------------------------------------------------------------------- 1 | setMode -bs 2 | addDevice -p 1 -file ef2.jed 3 | setCable -port xsvf -file ef2.xsvf 4 | program -e -v -p 1 5 | closeCable 6 | quit 7 | -------------------------------------------------------------------------------- /Hardware/ef2-vhdl/src/ef2_types.vhdl: -------------------------------------------------------------------------------- 1 | ---------------------------------------------------------------------------------- 2 | -- 3 | -- (c) 2009 Thomas 'skoe' Giesel 4 | -- 5 | -- This software is provided 'as-is', without any express or implied 6 | -- warranty. In no event will the authors be held liable for any damages 7 | -- arising from the use of this software. 8 | -- 9 | -- Permission is granted to anyone to use this software for any purpose, 10 | -- including commercial applications, and to alter it and redistribute it 11 | -- freely, subject to the following restrictions: 12 | -- 13 | -- 1. The origin of this software must not be misrepresented; you must not 14 | -- claim that you wrote the original software. If you use this software 15 | -- in a product, an acknowledgment in the product documentation would be 16 | -- appreciated but is not required. 17 | -- 2. Altered source versions must be plainly marked as such, and must not be 18 | -- misrepresented as being the original software. 19 | -- 3. This notice may not be removed or altered from any source distribution. 20 | -- 21 | ---------------------------------------------------------------------------------- 22 | 23 | package ef2_types is 24 | 25 | -- states for the hiram detection 26 | type hiram_det_state_type is 27 | ( 28 | HRDET_STATE_IDLE, 29 | HRDET_STATE_DMA, 30 | HRDET_STATE_DETECT, 31 | HRDET_STATE_READ 32 | ); 33 | 34 | type cartridge_mode_type is 35 | ( 36 | MODE_MENU, 37 | MODE_EASYFLASH, 38 | MODE_GEORAM, 39 | MODE_KERNAL, 40 | MODE_FC3, 41 | MODE_UNCHANGED 42 | ); 43 | 44 | end ef2_types; 45 | -------------------------------------------------------------------------------- /Hardware/ef3-ftdi/easyflash3-ftdi-template.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | FT245R 5 | 6 | 7 | 1 8 | 0403 9 | 8738 10 | USB 2.0 11 | 12 | 13 | 14 | true 15 | false 16 | true 17 | 18 | false 19 | 90 20 | 21 | 22 | skoe 23 | EasyFlash 3 24 | true 25 | 26 | 27 | A6 28 | 29 | 30 | false 31 | false 32 | false 33 | 34 | -------------------------------------------------------------------------------- /Hardware/ef3-ftdi/initial-programming/index.html: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Preparing the FT245 Chip 5 | 6 | 7 | 8 |

How to initialize the FTDI FT245 Chip on the EasyFlash 3

9 | 10 |

Instructions are there.

11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /Hardware/ef3-ftdi/initial-programming/snapshots/snap_01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KimJorgensen/easyflash/9278c9f96fc3226047fb816a6090ff70d6c86cde/Hardware/ef3-ftdi/initial-programming/snapshots/snap_01.png -------------------------------------------------------------------------------- /Hardware/ef3-ftdi/initial-programming/snapshots/snap_02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KimJorgensen/easyflash/9278c9f96fc3226047fb816a6090ff70d6c86cde/Hardware/ef3-ftdi/initial-programming/snapshots/snap_02.png -------------------------------------------------------------------------------- /Hardware/ef3-ftdi/initial-programming/snapshots/snap_03.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KimJorgensen/easyflash/9278c9f96fc3226047fb816a6090ff70d6c86cde/Hardware/ef3-ftdi/initial-programming/snapshots/snap_03.png -------------------------------------------------------------------------------- /Hardware/ef3-ftdi/initial-programming/snapshots/snap_04.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KimJorgensen/easyflash/9278c9f96fc3226047fb816a6090ff70d6c86cde/Hardware/ef3-ftdi/initial-programming/snapshots/snap_04.png -------------------------------------------------------------------------------- /Hardware/ef3-ftdi/initial-programming/snapshots/snap_05.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KimJorgensen/easyflash/9278c9f96fc3226047fb816a6090ff70d6c86cde/Hardware/ef3-ftdi/initial-programming/snapshots/snap_05.png -------------------------------------------------------------------------------- /Hardware/ef3-ftdi/initial-programming/snapshots/snap_06.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KimJorgensen/easyflash/9278c9f96fc3226047fb816a6090ff70d6c86cde/Hardware/ef3-ftdi/initial-programming/snapshots/snap_06.png -------------------------------------------------------------------------------- /Hardware/ef3-ftdi/initial-programming/snapshots/snap_07.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KimJorgensen/easyflash/9278c9f96fc3226047fb816a6090ff70d6c86cde/Hardware/ef3-ftdi/initial-programming/snapshots/snap_07.png -------------------------------------------------------------------------------- /Hardware/ef3-ftdi/initial-programming/snapshots/snap_08.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KimJorgensen/easyflash/9278c9f96fc3226047fb816a6090ff70d6c86cde/Hardware/ef3-ftdi/initial-programming/snapshots/snap_08.png -------------------------------------------------------------------------------- /Hardware/ef3-ftdi/initial-programming/snapshots/snap_09.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KimJorgensen/easyflash/9278c9f96fc3226047fb816a6090ff70d6c86cde/Hardware/ef3-ftdi/initial-programming/snapshots/snap_09.png -------------------------------------------------------------------------------- /Hardware/ef3-ftdi/initial-programming/snapshots/snap_10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KimJorgensen/easyflash/9278c9f96fc3226047fb816a6090ff70d6c86cde/Hardware/ef3-ftdi/initial-programming/snapshots/snap_10.png -------------------------------------------------------------------------------- /Hardware/ef3-ftdi/initial-programming/snapshots/snap_11.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KimJorgensen/easyflash/9278c9f96fc3226047fb816a6090ff70d6c86cde/Hardware/ef3-ftdi/initial-programming/snapshots/snap_11.png -------------------------------------------------------------------------------- /Hardware/ef3-ftdi/initial-programming/snapshots/snap_12.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KimJorgensen/easyflash/9278c9f96fc3226047fb816a6090ff70d6c86cde/Hardware/ef3-ftdi/initial-programming/snapshots/snap_12.png -------------------------------------------------------------------------------- /Hardware/ef3-ftdi/initial-programming/snapshots/snap_13.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KimJorgensen/easyflash/9278c9f96fc3226047fb816a6090ff70d6c86cde/Hardware/ef3-ftdi/initial-programming/snapshots/snap_13.png -------------------------------------------------------------------------------- /Hardware/ef3-ftdi/initial-programming/snapshots/snap_14.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KimJorgensen/easyflash/9278c9f96fc3226047fb816a6090ff70d6c86cde/Hardware/ef3-ftdi/initial-programming/snapshots/snap_14.png -------------------------------------------------------------------------------- /Hardware/ef3-kicad/LICENSE: -------------------------------------------------------------------------------- 1 | 2 | (C) 2011 Thomas 'skoe' Giesel 3 | 4 | The EasyFlash 3 hardware design is licensed under 5 | Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0) 6 | 7 | http://creativecommons.org/licenses/by-sa/3.0/ 8 | 9 | If you use this design, please add the text 10 | "skoe" 11 | or 12 | "based on work by skoe" 13 | to your PCB in a font not smaller than what is used in the original design. 14 | -------------------------------------------------------------------------------- /Hardware/ef3-kicad/MX29LV640EBT.dcm: -------------------------------------------------------------------------------- 1 | EESchema-DOCLIB Version 2.0 Date: Mi 23 Mär 2011 20:34:41 CET 2 | # 3 | #End Doc Library 4 | -------------------------------------------------------------------------------- /Hardware/ef3-kicad/ef3-mounting-diagram-1.3.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KimJorgensen/easyflash/9278c9f96fc3226047fb816a6090ff70d6c86cde/Hardware/ef3-kicad/ef3-mounting-diagram-1.3.pdf -------------------------------------------------------------------------------- /Hardware/ef3-kicad/ef3-v1.3-gerber.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KimJorgensen/easyflash/9278c9f96fc3226047fb816a6090ff70d6c86cde/Hardware/ef3-kicad/ef3-v1.3-gerber.zip -------------------------------------------------------------------------------- /Hardware/ef3-kicad/ef3.dcm: -------------------------------------------------------------------------------- 1 | EESchema-DOCLIB Version 2.0 Date: Sa 08 Okt 2011 22:31:42 CEST 2 | # 3 | $CMP MCP1700-TO 4 | D Linear Regulator (adjustable) 5 | K POWER REGUL 6 | $ENDCMP 7 | # 8 | #End Doc Library 9 | -------------------------------------------------------------------------------- /Hardware/ef3-kicad/ef3.mdc: -------------------------------------------------------------------------------- 1 | PCBNEW-LibDoc----V1 Di 04 Okt 2011 22:57:35 CEST 2 | # 3 | $MODULE VQFP48_05 4 | Li VQFP48_05 5 | Cd VQFP48 0.5 mm 6 | Kw CMS VQFP 7 | $EndMODULE 8 | # 9 | $MODULE TSOP1-48 10 | Li TSOP1-48 11 | Cd Module CMS TSOP-1 48 pins 12 | Kw CMS TSOP 13 | $EndMODULE 14 | # 15 | $MODULE LED-3MM-FIXED 16 | Li LED-3MM-FIXED 17 | Cd LED 3mm - Lead pitch 100mil (2,54mm) 18 | Kw LED led 3mm 3MM 100mil 2,54mm 19 | $EndMODULE 20 | # 21 | $MODULE PIN_ARRAY_4x1 22 | Li PIN_ARRAY_4x1 23 | Kw CONN 24 | $EndMODULE 25 | # 26 | $MODULE TO92-MCP1700 27 | Li TO92-MCP1700 28 | Cd TO92 (MCP1700-3302E/TO) 29 | Kw TR TO92 30 | $EndMODULE 31 | # 32 | $EndLIBDOC 33 | -------------------------------------------------------------------------------- /Hardware/ef3-kicad/ef3.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KimJorgensen/easyflash/9278c9f96fc3226047fb816a6090ff70d6c86cde/Hardware/ef3-kicad/ef3.pdf -------------------------------------------------------------------------------- /Hardware/ef3-kicad/ef3.pro: -------------------------------------------------------------------------------- 1 | update=Fr 07 Okt 2011 23:07:01 CEST 2 | version=1 3 | last_client=pcbnew 4 | [cvpcb] 5 | version=1 6 | NetITyp=0 7 | NetIExt=.net 8 | PkgIExt=.pkg 9 | NetDir= 10 | LibDir= 11 | NetType=0 12 | [cvpcb/libraries] 13 | EquName1=devcms 14 | [general] 15 | version=1 16 | [eeschema] 17 | version=1 18 | LibDir= 19 | NetFmt=1 20 | HPGLSpd=20 21 | HPGLDm=15 22 | HPGLNum=1 23 | offX_A4=0 24 | offY_A4=0 25 | offX_A3=0 26 | offY_A3=0 27 | offX_A2=0 28 | offY_A2=0 29 | offX_A1=0 30 | offY_A1=0 31 | offX_A0=0 32 | offY_A0=0 33 | offX_A=0 34 | offY_A=0 35 | offX_B=0 36 | offY_B=0 37 | offX_C=0 38 | offY_C=0 39 | offX_D=0 40 | offY_D=0 41 | offX_E=0 42 | offY_E=0 43 | RptD_X=0 44 | RptD_Y=100 45 | RptLab=1 46 | SimCmd= 47 | UseNetN=0 48 | LabSize=60 49 | PrintMonochrome=1 50 | ShowSheetReferenceAndTitleBlock=1 51 | [eeschema/libraries] 52 | LibName1=power 53 | LibName2=device 54 | LibName3=transistors 55 | LibName4=conn 56 | LibName5=linear 57 | LibName6=regul 58 | LibName7=74xx 59 | LibName8=cmos4000 60 | LibName9=adc-dac 61 | LibName10=memory 62 | LibName11=xilinx 63 | LibName12=special 64 | LibName13=microcontrollers 65 | LibName14=dsp 66 | LibName15=microchip 67 | LibName16=analog_switches 68 | LibName17=motorola 69 | LibName18=texas 70 | LibName19=intel 71 | LibName20=audio 72 | LibName21=interface 73 | LibName22=digital-audio 74 | LibName23=philips 75 | LibName24=display 76 | LibName25=cypress 77 | LibName26=siliconi 78 | LibName27=opto 79 | LibName28=atmel 80 | LibName29=contrib 81 | LibName30=valves 82 | LibName31=ef3 83 | [pcbnew] 84 | version=1 85 | PadDrlX=1260 86 | PadDimH=1260 87 | PadDimV=1260 88 | BoardThickness=630 89 | TxtPcbV=800 90 | TxtPcbH=600 91 | TxtModV=600 92 | TxtModH=600 93 | TxtModW=120 94 | VEgarde=100 95 | DrawLar=50 96 | EdgeLar=10 97 | TxtLar=120 98 | MSegLar=50 99 | LastNetListRead=ef3.net 100 | [pcbnew/libraries] 101 | LibDir= 102 | LibName1=sockets 103 | LibName2=connect 104 | LibName3=discret 105 | LibName4=pin_array 106 | LibName5=divers 107 | LibName6=libcms 108 | LibName7=display 109 | LibName8=valves 110 | LibName9=led 111 | LibName10=dip_sockets 112 | LibName11=ef3 113 | LibName12=ef-logo 114 | -------------------------------------------------------------------------------- /Hardware/ef3-kicad/expansion_port.lib: -------------------------------------------------------------------------------- 1 | EESchema-LIBRARY Version 2.3 Date: Di 22 Mär 2011 21:16:50 CET 2 | # 3 | # EXPANSION_PORT 4 | # 5 | DEF EXPANSION_PORT J 0 40 Y Y 1 F N 6 | F0 "J" 0 0 60 H V C CNN 7 | F1 "EXPANSION_PORT" 1200 0 60 V V C CNN 8 | $FPLIST 9 | expansion-port 10 | $ENDFPLIST 11 | DRAW 12 | S -1150 450 1150 -450 0 1 0 N 13 | X GND 1 1050 750 300 D 50 50 1 1 w 14 | X VDC 2 950 750 300 D 50 50 1 1 w 15 | X VDC 3 850 750 300 D 50 50 1 1 w 16 | X /IRQ 4 750 750 300 D 50 50 1 1 C 17 | X /WR 5 650 750 300 D 50 50 1 1 O 18 | X DOTCLK 6 550 750 300 D 50 50 1 1 O 19 | X IO1 7 450 750 300 D 50 50 1 1 O 20 | X /GAME 8 350 750 300 D 50 50 1 1 I 21 | X /EXROM 9 250 750 300 D 50 50 1 1 I 22 | X GND A 1050 -750 300 U 50 50 1 1 w 23 | X /ROMH B 950 -750 300 U 50 50 1 1 O 24 | X /RESET C 850 -750 300 U 50 50 1 1 C 25 | X /NMI D 750 -750 300 U 50 50 1 1 B 26 | X PHI2 E 650 -750 300 U 50 50 1 1 O 27 | X A15 F 550 -750 300 U 50 50 1 1 O 28 | X A14 H 450 -750 300 U 50 50 1 1 O 29 | X A13 J 350 -750 300 U 50 50 1 1 O 30 | X A12 K 250 -750 300 U 50 50 1 1 O 31 | X A11 L 150 -750 300 U 50 50 1 1 O 32 | X A10 M 50 -750 300 U 50 50 1 1 O 33 | X A9 N -50 -750 300 U 50 50 1 1 O 34 | X A8 P -150 -750 300 U 50 50 1 1 O 35 | X A7 R -250 -750 300 U 50 50 1 1 O 36 | X A6 S -350 -750 300 U 50 50 1 1 O 37 | X A5 T -450 -750 300 U 50 50 1 1 O 38 | X A4 U -550 -750 300 U 50 50 1 1 O 39 | X A3 V -650 -750 300 U 50 50 1 1 O 40 | X A2 W -750 -750 300 U 50 50 1 1 O 41 | X A1 X -850 -750 300 U 50 50 1 1 O 42 | X A0 Y -950 -750 300 U 50 50 1 1 O 43 | X GND Z -1050 -750 300 U 50 50 1 1 w 44 | X IO2 10 150 750 300 D 50 50 1 1 O 45 | X D1 20 -850 750 300 D 50 50 1 1 B 46 | X /ROML 11 50 750 300 D 50 50 1 1 O 47 | X D0 21 -950 750 300 D 50 50 1 1 B 48 | X BA 12 -50 750 300 D 50 50 1 1 O 49 | X GND 22 -1050 750 300 D 50 50 1 1 w 50 | X /DMA 13 -150 750 300 D 50 50 1 1 I 51 | X D7 14 -250 750 300 D 50 50 1 1 B 52 | X D6 15 -350 750 300 D 50 50 1 1 B 53 | X D5 16 -450 750 300 D 50 50 1 1 B 54 | X D4 17 -550 750 300 D 50 50 1 1 B 55 | X D3 18 -650 750 300 D 50 50 1 1 B 56 | X D2 19 -750 750 300 D 50 50 1 1 B 57 | ENDDRAW 58 | ENDDEF 59 | # 60 | #End Library 61 | -------------------------------------------------------------------------------- /Hardware/ef3-vhdl/doc/Makefile: -------------------------------------------------------------------------------- 1 | 2 | pdfs := kernal-cartridge.pdf 3 | 4 | # images to be converted 5 | images := $(wildcard src/*.svg) 6 | images += $(wildcard src/*.pdf) 7 | images += $(wildcard src/*.ps) 8 | images += $(wildcard src/*.png) 9 | images := $(images:.ps=.pdf) 10 | images := $(images:.svg=.pdf) 11 | images := $(patsubst src/%,obj/%,$(images)) 12 | 13 | latex_flags := -output-directory obj 14 | #latex_flags += -interaction=batchmode 15 | latex_flags += -halt-on-error 16 | 17 | ############################################################################### 18 | .PHONY: all 19 | all: $(pdfs) 20 | 21 | ############################################################################### 22 | %.pdf: src/%.tex $(images) always 23 | pdflatex $(latex_flags) $< 24 | pdflatex $(latex_flags) $< 25 | 26 | ############################################################################### 27 | .PHONY: always 28 | always: 29 | 30 | ############################################################################### 31 | obj/%.v15.pdf: src/%.svg obj/images 32 | inkscape $< --export-pdf=$@ 33 | 34 | ############################################################################### 35 | obj/%.pdf: src/%.ps obj/images 36 | gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dEPSCrop \ 37 | -dNOPAUSE -dQUIET -dBATCH -sOutputFile=$@ $< 38 | 39 | ############################################################################### 40 | obj/%.png: src/%.png obj/images 41 | cp $< $@ 42 | 43 | ############################################################################### 44 | # Convert version 1.5 PDF files to version 1.4 (cairosvg/inkscape cmd line 45 | # creates 1.5, latex wants 1.4) 46 | # 47 | %.pdf: %.v15.pdf 48 | gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 \ 49 | -dNOPAUSE -dQUIET -dBATCH -sOutputFile=$@ $< 50 | 51 | ############################################################################### 52 | # create directories 53 | # 54 | obj: 55 | mkdir -p $@ 56 | 57 | obj/images: 58 | mkdir -p $@ 59 | 60 | ############################################################################### 61 | .PHONY: clean 62 | clean: 63 | rm -f src/*.toc 64 | rm -f src/*.dvi 65 | rm -f src/*.aux 66 | rm -f src/*.log 67 | rm -f src/*.out 68 | rm -f *~ 69 | rm -rf obj 70 | -------------------------------------------------------------------------------- /Hardware/ef3-vhdl/doc/src/diagrams.vpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KimJorgensen/easyflash/9278c9f96fc3226047fb816a6090ff70d6c86cde/Hardware/ef3-vhdl/doc/src/diagrams.vpp -------------------------------------------------------------------------------- /Hardware/ef3-vhdl/doc/src/ef3-1-1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KimJorgensen/easyflash/9278c9f96fc3226047fb816a6090ff70d6c86cde/Hardware/ef3-vhdl/doc/src/ef3-1-1.jpg -------------------------------------------------------------------------------- /Hardware/ef3-vhdl/doc/src/ef3-1-3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KimJorgensen/easyflash/9278c9f96fc3226047fb816a6090ff70d6c86cde/Hardware/ef3-vhdl/doc/src/ef3-1-3.jpg -------------------------------------------------------------------------------- /Hardware/ef3-vhdl/doc/src/la-detect.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KimJorgensen/easyflash/9278c9f96fc3226047fb816a6090ff70d6c86cde/Hardware/ef3-vhdl/doc/src/la-detect.png -------------------------------------------------------------------------------- /Hardware/ef3-vhdl/doc/src/la-read.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KimJorgensen/easyflash/9278c9f96fc3226047fb816a6090ff70d6c86cde/Hardware/ef3-vhdl/doc/src/la-read.png -------------------------------------------------------------------------------- /Hardware/ef3-vhdl/doc/src/memory-map-hiram.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KimJorgensen/easyflash/9278c9f96fc3226047fb816a6090ff70d6c86cde/Hardware/ef3-vhdl/doc/src/memory-map-hiram.pdf -------------------------------------------------------------------------------- /Hardware/ef3-vhdl/doc/src/memory-map-plain.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KimJorgensen/easyflash/9278c9f96fc3226047fb816a6090ff70d6c86cde/Hardware/ef3-vhdl/doc/src/memory-map-plain.pdf -------------------------------------------------------------------------------- /Hardware/ef3-vhdl/doc/src/phi2-data-bus-250407.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KimJorgensen/easyflash/9278c9f96fc3226047fb816a6090ff70d6c86cde/Hardware/ef3-vhdl/doc/src/phi2-data-bus-250407.png -------------------------------------------------------------------------------- /Hardware/ef3-vhdl/doc/src/phi2-data-bus-250469.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KimJorgensen/easyflash/9278c9f96fc3226047fb816a6090ff70d6c86cde/Hardware/ef3-vhdl/doc/src/phi2-data-bus-250469.png -------------------------------------------------------------------------------- /Hardware/ef3-vhdl/ef3.prj: -------------------------------------------------------------------------------- 1 | vhdl work src/ef3.vhdl 2 | vhdl work src/exp_bus_ctrl.vhdl 3 | vhdl work src/reset_generator.vhdl 4 | vhdl work src/freezer.vhdl 5 | vhdl work src/cart_easyflash.vhdl 6 | vhdl work src/cart_io2ram.vhdl 7 | vhdl work src/cart_kernal.vhdl 8 | vhdl work src/cart_fc3.vhdl 9 | vhdl work src/cart_ar.vhdl 10 | vhdl work src/cart_ss5.vhdl 11 | vhdl work src/cart_usb.vhdl 12 | -------------------------------------------------------------------------------- /Hardware/ef3-vhdl/ef3.xst: -------------------------------------------------------------------------------- 1 | set -tmpdir synth/xst/tmp 2 | set -xsthdpdir synth/xst 3 | run 4 | -ifn ef3.prj 5 | -ifmt vhdl 6 | -ofn synth/ef3.ngc 7 | -ofmt NGC 8 | -p xc9500xl 9 | -top ef3 10 | -opt_mode area 11 | -opt_level 2 12 | -keep_hierarchy no 13 | -pld_mp no 14 | -------------------------------------------------------------------------------- /Hardware/ef3-vhdl/impact.batch: -------------------------------------------------------------------------------- 1 | setMode -bs 2 | addDevice -p 1 -file ef3.jed 3 | setCable -port svf -file ef3.svf 4 | program -e -v -p 1 5 | closeCable 6 | quit 7 | -------------------------------------------------------------------------------- /Hardware/ef3-vhdl/testcrts/np_test/Makefile: -------------------------------------------------------------------------------- 1 | 2 | np_test.crt: np_test.s 3 | acme -o np_test.bin np_test.s 4 | cartconv -t ap -i np_test.bin -o np_test.crt 5 | 6 | .PHONY: clean 7 | clean: 8 | rm -f np_test.bin np_test.crt 9 | -------------------------------------------------------------------------------- /Hardware/kicad-logic-tht/easyflash.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KimJorgensen/easyflash/9278c9f96fc3226047fb816a6090ff70d6c86cde/Hardware/kicad-logic-tht/easyflash.pdf -------------------------------------------------------------------------------- /README.txt: -------------------------------------------------------------------------------- 1 | EasyFlash 2 | ========= 3 | 4 | This is a fork of https://bitbucket.org/skoe/easyflash with the purpose of adding Final Cartridge III support to EasyFlash³. 5 | 6 | Download the software from here: https://github.com/KimJorgensen/easyflash/releases/ 7 | 8 | Note: Skoe was not involved in this work, please do not expect him to support this. 9 | -------------------------------------------------------------------------------- /libs/eload/Makefile: -------------------------------------------------------------------------------- 1 | 2 | 3 | inc := 4 | inc += src/drivetype.s 5 | inc += src/kernal.s 6 | inc += src/xfer_drive_1mhz.s 7 | inc += src/xfer_drive_2mhz.s 8 | 9 | obj := 10 | obj += obj/drive_1541.o 11 | obj += obj/drive_1541_write.o 12 | obj += obj/drive_1541_format.o 13 | #obj += obj/drive_1571.o 14 | #obj += obj/drive_1581.o 15 | obj += obj/drive_sd2iec.o 16 | obj += obj/send_code.o 17 | obj += obj/drive_detect.o 18 | #obj += obj/eload.o 19 | 20 | obj += obj/eload_send.o 21 | obj += obj/eload_send_nodma.o 22 | obj += obj/eload_sendtab.o 23 | obj += obj/eload_recv.o 24 | obj += obj/eload_format.o 25 | obj += obj/eload_checksum.o 26 | 27 | obj += obj/eload_read_byte.o 28 | obj += obj/eload_close.o 29 | obj += obj/eload_dos.o 30 | 31 | obj += obj/eload_read.o 32 | obj += obj/eload_write_sector.o 33 | obj += obj/eload_write_sector_nodma.o 34 | obj += obj/eload_recv_block.o 35 | 36 | test_obj := 37 | test_obj += obj/crt0.o 38 | test_obj += obj/eload_test.o 39 | test_obj += obj/gcr.o 40 | 41 | disk_type := g64 42 | 43 | .PHONY: all 44 | all: eload.lib 45 | 46 | .PHONY: test 47 | test: test.$(disk_type) 48 | 49 | obj/%.o: src/%.s obj $(inc) 50 | ca65 -I src -t c64 -o $@ $< 51 | 52 | obj/%.o: obj/%.s obj $(inc) 53 | ca65 -I src -t c64 -o $@ $< 54 | 55 | obj/%.s: test/%.c obj $(inc) 56 | cc65 -I src -O -t c64 -o $@ $< 57 | 58 | obj/%.o: test/%.s obj $(inc) 59 | ca65 -I src -t c64 -o $@ $< 60 | 61 | obj: 62 | mkdir -p obj 63 | 64 | eload.lib: $(obj) 65 | rm -f $@ 66 | ar65 a $@ $(obj) 67 | 68 | test.$(disk_type): eload_test.prg 69 | c1541 -format test,td $(disk_type) $@ 8 \ 70 | -write eload_test.prg etest 71 | 72 | eload_test.prg: $(test_obj) eload.lib 73 | ld65 -o $@ -m $@.map -C test/ld.cfg -L /usr/local/lib/cc65/lib \ 74 | $(test_obj) --lib eload.lib --lib c64.lib 75 | 76 | clean: 77 | rm -rf obj 78 | rm -f eload.lib 79 | rm -f eload_test.prg 80 | rm -f eload_test.prg.map 81 | 82 | distclean: clean 83 | rm -f *~ 84 | -------------------------------------------------------------------------------- /libs/eload/docs/gaps.ods: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KimJorgensen/easyflash/9278c9f96fc3226047fb816a6090ff70d6c86cde/libs/eload/docs/gaps.ods -------------------------------------------------------------------------------- /libs/eload/docs/pal-ntsc.ods: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KimJorgensen/easyflash/9278c9f96fc3226047fb816a6090ff70d6c86cde/libs/eload/docs/pal-ntsc.ods -------------------------------------------------------------------------------- /libs/eload/implementation.txt: -------------------------------------------------------------------------------- 1 | 2 | Memory map for 1541: 3 | 4 | -------------------------------------------------------------------------------- 5 | $0000 | ZP 6 | | 7 | -------------------------------------------------------------------------------- 8 | $0100 | Stack 9 | | 10 | -------------------------------------------------------------------------------- 11 | $0300 | drive_code_1541 (init and xfer) 12 | | 13 | -------------------------------------------------------------------------------- 14 | $0400 | drive_code_1541 (common code) 15 | | 16 | -------------------------------------------------------------------------------- 17 | $0500 | drive_code_1541_read or write 18 | | 19 | $0600 | 20 | | 21 | -------------------------------------------------------------------------------- 22 | $0700 | buffer 23 | | 24 | -------------------------------------------------------------------------------- 25 | 26 | Drive Code Overlays 27 | =================== 28 | 29 | drive_code_init_size_1541 byte at drive_code_1541 are uploaded using the 30 | KERNAL transfer functions to $0300. This is 256 bytes or less. When this 31 | code runs, it loads 512 bytes using the fast protocoll to $0300. Note that 32 | the init code is overwritten with the same code again in this phase. 33 | Next it loads 512 bytes overlay code to $0500 and calls it with JSR. 34 | Each time the overlay code returns with RTS, motor and LED are switched 35 | off and the transfer and start of the 2 blocks of overlay code is repeated. 36 | Note that the motor deactivation is delayed with a timer, this is implemented 37 | in DOS. 38 | 39 | The overlay code waits for eload job codes. Job code 0 leaves the overlay 40 | code (RTS). 41 | 42 | Job Codes 43 | ========= 44 | 45 | -------------------------------------------------------------------------------- /libs/eload/src/config.s: -------------------------------------------------------------------------------- 1 | 2 | ; Set this to 1 to enable a faster protocol from C64 to drive. 3 | ; This will add about 1 kByte of table to the size. 4 | eload_use_fast_tx = 1 5 | -------------------------------------------------------------------------------- /libs/eload/src/drive_1541_inc.s: -------------------------------------------------------------------------------- 1 | 2 | serport = $1800 3 | 4 | retries = 2 ; number of retries when reading a sector 5 | 6 | prev_file_track = $7e 7 | prev_file_sect = $026f 8 | 9 | job_code = $04 10 | job_track = $0e 11 | job_sector = $0f 12 | 13 | speed_zone = $06 14 | status = $08 ; two bytes for status return 15 | zpptr = $10 ; two bytes used as pointer 16 | 17 | stack = $8b 18 | 19 | iddrv0 = $12 ; disk drive id 20 | header_id = $16 ; disk id 21 | header_track = $18 22 | header_sector = $19 23 | header_parity = $1a 24 | 25 | current_track = $22 26 | 27 | gcr_tmp = $24 28 | 29 | buff_ptr = $30 30 | 31 | sect_per_trk = $43 32 | head_step_ctr = $4a 33 | 34 | zptmp = $c1 35 | job_code_backup = $c2 36 | job_track_backup = $c3 37 | job_sector_backup = $c4 38 | retry_sec_cnt = $c5 ; retry counter for searching sectors 39 | retry_udi_cnt = $c6 ; retry counter for update_disk_info 40 | retry_sh_cnt = $c7 ; retry counter for search_header 41 | 42 | eor_correction = $103 ; not on zeropage (need abs addressing) 43 | 44 | gcr_overflow_size = 69 45 | gcr_overflow_buff = $01bb 46 | 47 | buffer = $0700 48 | -------------------------------------------------------------------------------- /libs/eload/src/drive_sd2iec.s: -------------------------------------------------------------------------------- 1 | ; 2 | ; ELoad 3 | ; 4 | ; (c) 2011 Thomas Giesel 5 | ; 6 | ; This software is provided 'as-is', without any express or implied 7 | ; warranty. In no event will the authors be held liable for any damages 8 | ; arising from the use of this software. 9 | ; 10 | ; Permission is granted to anyone to use this software for any purpose, 11 | ; including commercial applications, and to alter it and redistribute it 12 | ; freely, subject to the following restrictions: 13 | ; 14 | ; 1. The origin of this software must not be misrepresented; you must not 15 | ; claim that you wrote the original software. If you use this software 16 | ; in a product, an acknowledgment in the product documentation would be 17 | ; appreciated but is not required. 18 | ; 2. Altered source versions must be plainly marked as such, and must not be 19 | ; misrepresented as being the original software. 20 | ; 3. This notice may not be removed or altered from any source distribution. 21 | ; 22 | ; Thomas Giesel skoe@directbox.com 23 | ; 24 | 25 | 26 | .export drive_code_sd2iec 27 | drive_code_sd2iec = * 28 | 29 | ; ============================================================================= 30 | ; 31 | ; Drive code assembled to fixed address $0300 follows 32 | ; 33 | ; ============================================================================= 34 | .org $0300 35 | 36 | ; This is ASCII (not PETSCI!) "eload1" 37 | .byte $65, $6c, $6f, $61, $64, $31 38 | 39 | .reloc 40 | 41 | .export drive_code_init_size_sd2iec 42 | drive_code_init_size_sd2iec = * - drive_code_sd2iec 43 | -------------------------------------------------------------------------------- /libs/eload/src/drivetype.s: -------------------------------------------------------------------------------- 1 | 2 | drivetype_not_present = 0 3 | drivetype_unknown = 1 4 | drivetype_1541 = 2 ; 1541, 1541-II 5 | drivetype_1570 = 3 ; 1570 6 | drivetype_1571 = 4 ; 1571 7 | drivetype_1581 = 5 ; 1581 8 | drivetype_fd = 6 ; CMD FD 9 | drivetype_hd = 7 ; CMD HD 10 | drivetype_sd2iec = 8 ; sd2iec or uIEC 11 | drivetype_vice = 9 ; VICE virtual FS 12 | -------------------------------------------------------------------------------- /libs/eload/src/eload_checksum.s: -------------------------------------------------------------------------------- 1 | 2 | .include "eload_macros.s" 3 | 4 | .importzp sp, sreg, regsave 5 | .importzp ptr1, ptr2, ptr3, ptr4 6 | .importzp tmp1, tmp2, tmp3, tmp4 7 | 8 | .import popa 9 | 10 | .import eload_send_job 11 | .import eload_upload_drive_overlay 12 | 13 | 14 | ; ============================================================================= 15 | ; 16 | ; void __fastcall__ eload_checksum(uint8_t n_track); 17 | ; 18 | ; This function saves the IRQ flag, uses SEI, and restores the IRQ flag. 19 | ; 20 | ; ============================================================================= 21 | .export _eload_checksum 22 | _eload_checksum: 23 | sta n_track 24 | 25 | php ; to backup the interrupt flag 26 | sei 27 | 28 | lda #ELOAD_OVERLAY_WRITE 29 | jsr eload_upload_drive_overlay 30 | 31 | lda #job 33 | jsr eload_send_job 34 | 35 | plp ; to restore the interrupt flag 36 | rts 37 | 38 | .data 39 | 40 | job: 41 | .byte 2 ; command: checksum 42 | n_track: 43 | .byte 1 ; track 44 | n_sector: 45 | .byte 0 ; sector, always 0 46 | flags: 47 | .byte 0 48 | -------------------------------------------------------------------------------- /libs/eload/src/eload_close.s: -------------------------------------------------------------------------------- 1 | ; 2 | ; ELoad 3 | ; 4 | ; (c) 2011 Thomas Giesel 5 | ; 6 | ; This software is provided 'as-is', without any express or implied 7 | ; warranty. In no event will the authors be held liable for any damages 8 | ; arising from the use of this software. 9 | ; 10 | ; Permission is granted to anyone to use this software for any purpose, 11 | ; including commercial applications, and to alter it and redistribute it 12 | ; freely, subject to the following restrictions: 13 | ; 14 | ; 1. The origin of this software must not be misrepresented; you must not 15 | ; claim that you wrote the original software. If you use this software 16 | ; in a product, an acknowledgment in the product documentation would be 17 | ; appreciated but is not required. 18 | ; 2. Altered source versions must be plainly marked as such, and must not be 19 | ; misrepresented as being the original software. 20 | ; 3. This notice may not be removed or altered from any source distribution. 21 | ; 22 | ; Thomas Giesel skoe@directbox.com 23 | ; 24 | 25 | 26 | .include "kernal.s" 27 | 28 | .import eload_dos_close 29 | .import _eload_drive_is_fast 30 | 31 | 32 | ; ============================================================================= 33 | ; 34 | ; void eload_close(void); 35 | ; 36 | ; Comment see eload.h 37 | ; 38 | ; ============================================================================= 39 | .export _eload_close 40 | _eload_close: 41 | jsr _eload_drive_is_fast 42 | beq @close_kernal 43 | 44 | ; First cancel the drive code 45 | lda $dd00 46 | ora #$08 ; ATN low 47 | sta $dd00 48 | ldx #10 49 | : 50 | dex 51 | bne :- 52 | and #$07 53 | sta $dd00 ; ATN high 54 | 55 | @close_kernal: 56 | ; Close file 57 | jsr UNTLK 58 | lda #0 ; channel 0 59 | sta SA 60 | jmp eload_dos_close 61 | -------------------------------------------------------------------------------- /libs/eload/src/eload_config.s: -------------------------------------------------------------------------------- 1 | 2 | .ifndef eload_config 3 | eload_config = 1 4 | 5 | 6 | 7 | .endif 8 | -------------------------------------------------------------------------------- /libs/eload/src/eload_format.s: -------------------------------------------------------------------------------- 1 | 2 | .include "eload_macros.s" 3 | 4 | .importzp sp, sreg, regsave 5 | .importzp ptr1, ptr2, ptr3, ptr4 6 | .importzp tmp1, tmp2, tmp3, tmp4 7 | 8 | .import popa 9 | 10 | .import eload_send_job 11 | .import eload_upload_drive_overlay 12 | 13 | gcr_overflow_size = 69 14 | 15 | 16 | ; ============================================================================= 17 | ; 18 | ; void __fastcall__ eload_format(uint8_t n_tracks, uint16_t id); 19 | ; 20 | ; This function saves the IRQ flag, uses SEI, and restores the IRQ flag. 21 | ; 22 | ; ============================================================================= 23 | .export _eload_format 24 | _eload_format: 25 | sta id1 26 | stx id2 27 | 28 | jsr popa 29 | sta n_tracks 30 | 31 | php ; to backup the interrupt flag 32 | sei 33 | 34 | lda #ELOAD_OVERLAY_FORMAT 35 | jsr eload_upload_drive_overlay 36 | 37 | lda #job 39 | jsr eload_send_job 40 | 41 | plp ; to restore the interrupt flag 42 | rts 43 | 44 | .data 45 | ; keep the order of these bytes 46 | job: 47 | .byte 1 ; command: format 48 | n_tracks: 49 | .byte 1 ; track 50 | id1: 51 | .byte 0 52 | id2: 53 | .byte 0 54 | -------------------------------------------------------------------------------- /libs/eload/src/eload_macros.s: -------------------------------------------------------------------------------- 1 | 2 | .ifndef ELOAD_OK 3 | 4 | ; These error codes are the same as the ones for 1541 job codes 5 | ELOAD_OK = 1 6 | ELOAD_HEADER_NOT_FOUND = 2 7 | ELOAD_ERR_NO_SYNC = 3 8 | ELOAD_SECTOR_NOT_FOUND = 4 9 | ELOAD_WRITE_PROTECTED = 8 10 | 11 | ELOAD_UNKNOWN_CMD = 255 12 | 13 | ; Used as table indexes, do not change 14 | ELOAD_OVERLAY_NONE = 0 15 | ELOAD_OVERLAY_READ = 1 16 | ELOAD_OVERLAY_WRITE = 2 17 | ELOAD_OVERLAY_FORMAT = 3 18 | 19 | 20 | ; Byte ready check for drive code 21 | .macro wait_byte_ready 22 | bvc * 23 | clv 24 | .endmacro 25 | 26 | .endif 27 | -------------------------------------------------------------------------------- /libs/eload/src/eload_recv.s: -------------------------------------------------------------------------------- 1 | 2 | 3 | .importzp tmp1 4 | 5 | .export eload_recv 6 | 7 | .include "config.s" 8 | 9 | ; ============================================================================= 10 | ; 11 | ; Receive a byte from the drive over the fast protocol. Used internally only. 12 | ; 13 | ; parameters: 14 | ; - 15 | ; 16 | ; return: 17 | ; Byte in A, Z-flag according to A 18 | ; 19 | ; changes: 20 | ; flags 21 | ; 22 | ; ============================================================================= 23 | .align 32 24 | eload_recv: 25 | ; $dd00: | D_in | C_in | D_out | C_out || A_out | RS232 | VIC | VIC | 26 | ; Note about the timing: After 50 cycles a PAL C64 is about 1 cycle 27 | ; slower than the drive, an NTSC C64 is about 1 cycle faster. As we 28 | ; have a safety gap of about 2 us, this doesn't matter. 29 | 30 | ; Handshake Step 1: Drive signals byte ready with DATA low 31 | @wait1: 32 | lda $dd00 33 | bmi @wait1 34 | 35 | @eload_recv_waitbadline: 36 | lda $d011 ; wait until a badline won't screw up 37 | clc ; the timing 38 | sbc $d012 39 | and #7 40 | beq @eload_recv_waitbadline 41 | 42 | ; Handshake Step 2: Host sets CLK low to acknowledge 43 | lda $dd00 44 | ora #$10 45 | sta $dd00 ; [1] 46 | 47 | ; Handshake Step 3: Host releases CLK - Time base 48 | bit $ff ; waste 3 cycles 49 | and #$03 50 | ; an 1 MHz drive sees this 6..12 us after [1], so we have dt = 9 51 | sta $dd00 ; t = 0 52 | sta tmp1 ; 3 53 | 54 | nop 55 | nop 56 | nop 57 | nop 58 | nop ; 13 59 | 60 | ; receive bits 61 | lda $dd00 ; 17 - b0 b1 62 | lsr 63 | lsr 64 | eor $dd00 ; 25 - b2 b3 65 | lsr 66 | lsr 67 | eor $dd00 ; 33 - b4 b5 68 | lsr 69 | lsr 70 | @eor: 71 | eor tmp1 72 | eor $dd00 ; 44 - b6 b7 73 | rts 74 | 75 | -------------------------------------------------------------------------------- /libs/eload/src/eload_recv_block.s: -------------------------------------------------------------------------------- 1 | 2 | .importzp ptr1 3 | .import popax 4 | 5 | .import eload_recv 6 | .export _eload_recv_block 7 | .export _eload_recv_status 8 | 9 | .include "config.s" 10 | 11 | ; ============================================================================= 12 | ; 13 | ; Receive a byte from the drive over the fast protocol. Used internally only. 14 | ; void __fastcall__ eload_recv_block(uint8_t* addr, uint8_t size); 15 | ; 16 | ; parameters: 17 | ; addr Destination address 18 | ; size Number of bytes, 0..255, 0 means 256 19 | ; 20 | ; return: 21 | ; - 22 | ; 23 | ; changes: 24 | ; A, X, Y 25 | ; 26 | ; ============================================================================= 27 | _eload_recv_block: 28 | php ; to backup the interrupt flag 29 | sei 30 | 31 | pha ; size 32 | 33 | jsr popax 34 | sta ptr1 35 | stx ptr1 + 1 36 | 37 | pla 38 | tax ; size in x 39 | recv_loop: 40 | ldy #0 ; offset in y 41 | : 42 | jsr eload_recv 43 | sta (ptr1), y 44 | iny 45 | dex 46 | bne :- 47 | 48 | plp ; to restore the interrupt flag 49 | rts 50 | 51 | ; ============================================================================= 52 | ; 53 | ; Receive 4 bytes from the drive over the fast protocol. 54 | ; void __fastcall__ eload_recv_status(uint8_t* addr); 55 | ; 56 | ; parameters: 57 | ; addr Destination address 58 | ; 59 | ; return: 60 | ; - 61 | ; 62 | ; changes: 63 | ; A, X, Y 64 | ; 65 | ; ============================================================================= 66 | _eload_recv_status: 67 | php ; to backup the interrupt flag 68 | sei 69 | 70 | sta ptr1 71 | stx ptr1 + 1 72 | ldx #3 73 | jmp recv_loop 74 | 75 | -------------------------------------------------------------------------------- /libs/eload/src/eload_sendtab.s: -------------------------------------------------------------------------------- 1 | 2 | .include "config.s" 3 | 4 | 5 | .rodata 6 | 7 | ; ============================================================================= 8 | ;.if eload_use_fast_tx = 0 9 | 10 | .align 16 11 | 12 | .export sendtab 13 | sendtab: 14 | .byte $00, $80, $20, $a0 15 | .byte $40, $c0, $60, $e0 16 | .byte $10, $90, $30, $b0 17 | .byte $50, $d0, $70, $f0 18 | sendtab_end: 19 | .assert >(sendtab_end - 1) = >sendtab, error, "sendtab mustn't cross page boundary" 20 | ; If you get this error, you linker config may need something like this: 21 | ; RODATA: load = RAM, type = ro, align = $10; 22 | 23 | ; ============================================================================= 24 | ;.else ; eload_use_fast_tx 25 | 26 | .align 256 27 | 28 | .export sendtab75, sendtab64, sendtab31, sendtab20 29 | sendtab75: 30 | ; bit 7 and bit 5 of the index at bit 4 (clock) and bit 5 (data) 31 | .repeat 256, n 32 | .byte ((n & $80) >> 3) | (n & $20) 33 | .endrep 34 | 35 | sendtab64: 36 | ; bit 6 and bit 4 of the index at bit 4 (clock) and bit 5 (data) 37 | .repeat 256, n 38 | .byte ((n & $40) >> 2) | ((n & $10) << 1) 39 | .endrep 40 | 41 | sendtab31: 42 | ; bit 3 and bit 1 of the index at bit 4 (clock) and bit 5 (data) 43 | .repeat 256, n 44 | .byte ((n & $08) << 1) | ((n & $02) << 4) 45 | .endrep 46 | 47 | sendtab20: 48 | ; bit 2 and bit 0 of the index at bit 4 (clock) and bit 5 (data) 49 | .repeat 256, n 50 | .byte ((n & $04) << 2) | ((n & $01) << 5) 51 | .endrep 52 | sendtab75_end: 53 | .assert >(sendtab75_end - 1) = (>sendtab75) + 3, error, "sendtab mustn't cross page boundary" 54 | ; If you get this error, you linker config may need something like this: 55 | ; RODATA: load = RAM, type = ro, align = $100; 56 | 57 | ;.endif 58 | -------------------------------------------------------------------------------- /libs/eload/src/eload_write_sector.s: -------------------------------------------------------------------------------- 1 | 2 | .include "eload_macros.s" 3 | 4 | .importzp sp, sreg, regsave 5 | .importzp ptr1, ptr2, ptr3, ptr4 6 | .importzp tmp1, tmp2, tmp3, tmp4 7 | 8 | .import popax 9 | 10 | .import eload_send 11 | .import eload_send_job 12 | .import eload_upload_drive_overlay 13 | 14 | gcr_overflow_size = 69 15 | 16 | 17 | ; ============================================================================= 18 | ; 19 | ; void __fastcall__ eload_write_sector(unsigned ts, uint8_t* block); 20 | ; 21 | ; This function saves the IRQ flag, uses SEI, and restores the IRQ flag. 22 | ; 23 | ; ============================================================================= 24 | .export _eload_write_sector 25 | _eload_write_sector: 26 | sta block_tmp 27 | stx block_tmp + 1 ; Save buffer 28 | 29 | jsr popax 30 | stx n_track 31 | sta n_sector 32 | 33 | php ; to backup the interrupt flag 34 | sei 35 | 36 | lda #ELOAD_OVERLAY_WRITE 37 | jsr eload_upload_drive_overlay 38 | 39 | lda #job 41 | jsr eload_send_job 42 | 43 | ; this will go to the GCR overflow buffer $1bb 44 | lda block_tmp 45 | ldx block_tmp + 1 46 | ldy #gcr_overflow_size 47 | jsr eload_send 48 | 49 | ; this will go to the main buffer 50 | ldx block_tmp + 1 51 | clc 52 | lda block_tmp 53 | adc #gcr_overflow_size 54 | bcc :+ 55 | inx 56 | : 57 | iny ; Y = 0xff => 0 = 256 bytes 58 | jsr eload_send 59 | 60 | plp ; to restore the interrupt flag 61 | rts 62 | 63 | .data 64 | ; keep the order of these bytes 65 | job: 66 | .byte 2 ; command: write sector 67 | n_track: 68 | .byte 1 ; track 69 | n_sector: 70 | .byte 0 ; sector 71 | 72 | .bss 73 | block_tmp: 74 | .res 2 75 | -------------------------------------------------------------------------------- /libs/eload/src/eload_write_sector_nodma.s: -------------------------------------------------------------------------------- 1 | 2 | .include "eload_macros.s" 3 | 4 | .importzp sp, sreg, regsave 5 | .importzp ptr1, ptr2, ptr3, ptr4 6 | .importzp tmp1, tmp2, tmp3, tmp4 7 | 8 | .import popax 9 | 10 | .import eload_send_nodma 11 | .import eload_send_job_nodma 12 | .import eload_upload_drive_overlay 13 | 14 | gcr_overflow_size = 69 15 | 16 | 17 | ; ============================================================================= 18 | ; 19 | ; void __fastcall__ eload_write_sector(unsigned ts, uint8_t* block); 20 | ; 21 | ; This function saves the IRQ flag, uses SEI, and restores the IRQ flag. 22 | ; 23 | ; ============================================================================= 24 | .export _eload_write_sector_nodma 25 | _eload_write_sector_nodma: 26 | sta block_tmp 27 | stx block_tmp + 1 ; Save buffer 28 | 29 | jsr popax 30 | stx n_track 31 | sta n_sector 32 | 33 | php ; to backup the interrupt flag 34 | sei 35 | 36 | lda #ELOAD_OVERLAY_WRITE 37 | jsr eload_upload_drive_overlay 38 | 39 | lda #1 ; command: write sector 40 | sta job 41 | lda #job 43 | jsr eload_send_job_nodma 44 | 45 | ; this will go to the GCR overflow buffer $1bb 46 | lda block_tmp 47 | ldx block_tmp + 1 48 | ldy #gcr_overflow_size 49 | jsr eload_send_nodma 50 | 51 | ; this will go to the main buffer 52 | ldx block_tmp + 1 53 | clc 54 | lda block_tmp 55 | adc #gcr_overflow_size 56 | bcc :+ 57 | inx 58 | : 59 | iny ; Y = 0xff => 0 = 256 bytes 60 | jsr eload_send_nodma 61 | 62 | plp ; to restore the interrupt flag 63 | rts 64 | 65 | .data 66 | ; keep the order of these bytes 67 | job: 68 | .byte 2 ; command: write sector 69 | n_track: 70 | .byte 1 ; track 71 | n_sector: 72 | .byte 0 ; sector 73 | 74 | .bss 75 | block_tmp: 76 | .res 2 77 | -------------------------------------------------------------------------------- /libs/eload/src/kernal.s: -------------------------------------------------------------------------------- 1 | 2 | ST = $90 3 | FNLEN = $b7 4 | SA = $b9 5 | FA = $ba 6 | FNADR = $bb 7 | NDX = $c6 8 | 9 | COLOR = $0286 10 | 11 | BORDERCOL = $D020 12 | SCREENCOL = $D021 13 | SID = $D400 14 | SIDVOLUME = $D418 15 | 16 | CINT = $FF81 17 | IOINIT = $FF84 18 | RAMTAS = $FF87 19 | RESTOR = $FF8A 20 | VECTOR = $FF8D 21 | SETMSG = $FF90 22 | SECOND = $FF93 23 | TKSA = $FF96 24 | MEMTOP = $FF99 25 | MEMBOT = $FF9C 26 | SCNKEY = $FF9F 27 | SETTMO = $FFA2 28 | ACPTR = $FFA5 29 | CIOUT = $FFA8 30 | UNTLK = $FFAB 31 | UNLSN = $FFAE 32 | LISTEN = $FFB1 33 | TALK = $FFB4 34 | READST = $FFB7 35 | SETLFS = $FFBA 36 | SETNAM = $FFBD 37 | OPEN = $FFC0 38 | CLOSE = $FFC3 39 | CHKIN = $FFC6 40 | CKOUT = $FFC9 41 | CLRCH = $FFCC 42 | BASIN = $FFCF 43 | BSOUT = $FFD2 44 | LOAD = $FFD5 45 | SAVE = $FFD8 46 | SETTIM = $FFDB 47 | RDTIM = $FFDE 48 | STOP = $FFE1 49 | GETIN = $FFE4 50 | CLALL = $FFE7 51 | UDTIM = $FFEA 52 | SCRORG = $FFED 53 | PLOT = $FFF0 54 | IOBASE = $FFF3 55 | -------------------------------------------------------------------------------- /libs/eload/test/ld.cfg: -------------------------------------------------------------------------------- 1 | 2 | SYMBOLS { 3 | __STACKSIZE__: type = weak, value = $0800; 4 | } 5 | 6 | MEMORY { 7 | ZP: start = $0002, size = $001A, type = rw, define = yes; 8 | RAM: start = $07FF, size = $a801, file = %O, define = yes; 9 | ZP_BACKUP: start = $c400, size = $001A, type = rw, define = yes; # size like ZP 10 | HIRAM: start = $c000, size = $1000, type = rw, define = yes; 11 | } 12 | 13 | SEGMENTS { 14 | STARTUP: load = RAM, type = ro; 15 | LOWCODE: load = RAM, type = ro, optional = yes; 16 | INIT: load = RAM, type = ro, define = yes, optional = yes; 17 | CODE: load = RAM, type = ro, align = $10; 18 | RODATA: load = RAM, type = ro, align = $100; 19 | DATA: load = RAM, type = rw; 20 | ZPSAVE: load = RAM, type = bss; 21 | BSS: load = RAM, type = bss, define = yes; # must be below HEAP 22 | HEAP: load = RAM, type = bss, optional = yes; # must sit just below stack at end of RAM 23 | ZEROPAGE: load = ZP, type = zp; 24 | } 25 | 26 | FEATURES { 27 | CONDES: segment = INIT, 28 | type = constructor, 29 | label = __CONSTRUCTOR_TABLE__, 30 | count = __CONSTRUCTOR_COUNT__; 31 | CONDES: segment = RODATA, 32 | type = destructor, 33 | label = __DESTRUCTOR_TABLE__, 34 | count = __DESTRUCTOR_COUNT__; 35 | CONDES: segment = RODATA, 36 | type = interruptor, 37 | label = __INTERRUPTOR_TABLE__, 38 | count = __INTERRUPTOR_COUNT__; 39 | } 40 | 41 | MEMORY { 42 | } 43 | 44 | -------------------------------------------------------------------------------- /libs/libef3usb/Makefile: -------------------------------------------------------------------------------- 1 | 2 | libname := libef3usb 3 | 4 | inc := src/ef3usb_macros.s 5 | 6 | obj := 7 | obj += obj/ef3usb_check_cmd.o 8 | obj += obj/ef3usb_discard_rx.o 9 | obj += obj/ef3usb_send_data.o 10 | obj += obj/ef3usb_send_str.o 11 | obj += obj/ef3usb_fread.o 12 | obj += obj/ef3usb_fload.o 13 | obj += obj/ef3usb_fclose.o 14 | 15 | .PHONY: all 16 | all: $(libname).lib 17 | 18 | obj/%.o: src/%.s $(inc) | obj 19 | ca65 -I src -t c64 -o $@ $< 20 | 21 | obj: 22 | mkdir -p obj 23 | 24 | $(libname).lib: $(obj) 25 | rm -f $@ 26 | ar65 a $@ $(obj) 27 | 28 | .PHONY: clean 29 | clean: 30 | rm -f $(obj) 31 | rm -rf obj 32 | rm -f $(libname).lib 33 | 34 | .PHONY: distclean 35 | distclean: clean 36 | rm -f *~ 37 | -------------------------------------------------------------------------------- /libs/libef3usb/src/ef3usb.h: -------------------------------------------------------------------------------- 1 | /* 2 | * usb.h 3 | * 4 | * Created on: 25.10.2011 5 | * Author: skoe 6 | */ 7 | 8 | #ifndef USB_H_ 9 | #define USB_H_ 10 | 11 | #include 12 | 13 | #define USB_ID *((uint8_t*) 0xde08) 14 | #define USB_STATUS *((uint8_t*) 0xde09) 15 | #define USB_DATA *((uint8_t*) 0xde0a) 16 | 17 | #define USB_RX_READY 0x80 18 | #define USB_TX_READY 0x40 19 | 20 | char* ef3usb_check_cmd(void); 21 | 22 | uint16_t __fastcall__ ef3usb_receive_data(void* buffer, uint16_t size); 23 | 24 | void __fastcall__ ef3usb_send_data(const void* data, uint16_t len); 25 | 26 | void __fastcall__ ef3usb_send_str(const char* p); 27 | 28 | void ef3usb_discard_rx(void); 29 | 30 | /* these functions can be used after ef3usb_send_str("load"): */ 31 | uint16_t __fastcall__ ef3usb_fread(void* buffer, uint16_t size); 32 | void* ef3usb_fload(void); 33 | void ef3usb_fclose(void); 34 | 35 | #endif /* USB_H_ */ 36 | -------------------------------------------------------------------------------- /libs/libef3usb/src/ef3usb_check_cmd.s: -------------------------------------------------------------------------------- 1 | 2 | 3 | .include "ef3usb_macros.s" 4 | 5 | .bss 6 | cmd_buffer: 7 | .res 12 8 | 9 | .code 10 | ; ============================================================================= 11 | ; 12 | ; char* __fastcall__ ef3usb_check_cmd(void); 13 | ; 14 | ; Check if a command arrived from USB. The format is: 15 | ; 16 | ; Len: 012345678901 17 | ; Command: "efstart:crt#" <= # = 0-termination 18 | ; 19 | ; Return 0 if there is no command complete. Return the 0-terminated file 20 | ; type (e.g. "crt") if it is complete. 21 | ; 22 | ; This is also used to synchronize the connection, i.e. all data is shifted 23 | ; through the buffer until a match with "efstart:???#" is found. The buffer is 24 | ; kept between calls. Yes, a simple state machine would be faster, but with 25 | ; this method I get the resulting buffer for free :) 26 | ; 27 | ; ============================================================================= 28 | .proc _ef3usb_check_cmd 29 | .export _ef3usb_check_cmd 30 | _ef3usb_check_cmd: 31 | bit USB_STATUS 32 | bpl @end ; nothing received? 33 | 34 | ; move the buffer to the left 35 | ldx #0 36 | @move_buf: 37 | lda cmd_buffer + 1, x 38 | sta cmd_buffer, x 39 | inx 40 | cpx #11 41 | bne @move_buf 42 | 43 | ; append new byte 44 | lda USB_DATA 45 | sta cmd_buffer + 11 46 | 47 | ; check if the buffer starts with "efstart:" and ends with "\n" 48 | ldx #7 49 | @check: 50 | lda cmd_buffer, x 51 | cmp @efstart_str, x 52 | bne @end 53 | dex 54 | bpl @check 55 | 56 | lda cmd_buffer + 11 57 | bne @end ; no 0-termination 58 | 59 | ; success, return the string behind "efstart:" 60 | lda #<(cmd_buffer + 8) 61 | ldx #>(cmd_buffer + 8) 62 | rts 63 | @end: 64 | lda #0 65 | tax 66 | rts 67 | 68 | @efstart_str: 69 | .byte $45,$46,$53,$54,$41,$52,$54,$3A ; "efstart:" 70 | .endproc 71 | -------------------------------------------------------------------------------- /libs/libef3usb/src/ef3usb_discard_rx.s: -------------------------------------------------------------------------------- 1 | 2 | 3 | .importzp ptr1, ptr2, ptr3, ptr4 4 | .importzp tmp1, tmp2, tmp3, tmp4 5 | .import popa, popax 6 | 7 | 8 | .include "ef3usb_macros.s" 9 | 10 | 11 | ; ============================================================================= 12 | ; 13 | ; Discard all data from the USB RX buffer. 14 | ; 15 | ; void __fastcall__ ef3usb_discard_rx(void) 16 | ; 17 | ; in: 18 | ; - 19 | ; out: 20 | ; - 21 | ; 22 | .export _ef3usb_discard_rx 23 | _ef3usb_discard_rx: 24 | ldx #0 25 | : 26 | lda USB_DATA 27 | dex 28 | bne :- 29 | rts 30 | -------------------------------------------------------------------------------- /libs/libef3usb/src/ef3usb_fclose.s: -------------------------------------------------------------------------------- 1 | 2 | 3 | .importzp ptr1, ptr2, ptr3, ptr4 4 | .importzp tmp1, tmp2, tmp3, tmp4 5 | .import popa, popax 6 | 7 | 8 | .include "ef3usb_macros.s" 9 | 10 | ; ============================================================================= 11 | ; 12 | ; void ef3usb_fclose(void); 13 | ; 14 | ; ============================================================================= 15 | .proc _ef3usb_fclose 16 | .export _ef3usb_fclose 17 | _ef3usb_fclose: 18 | lda #0 19 | wait_usb_tx_ok 20 | sta USB_DATA 21 | wait_usb_tx_ok 22 | sta USB_DATA 23 | rts 24 | .endproc 25 | -------------------------------------------------------------------------------- /libs/libef3usb/src/ef3usb_macros.s: -------------------------------------------------------------------------------- 1 | 2 | USB_ID = $de08 3 | USB_STATUS = $de09 4 | USB_DATA = $de0a 5 | 6 | 7 | ; ============================================================================= 8 | ; 9 | ; ============================================================================= 10 | .macro wait_usb_tx_ok 11 | : 12 | bit USB_STATUS 13 | bvc :- 14 | .endmacro 15 | 16 | 17 | ; ============================================================================= 18 | ; 19 | ; ============================================================================= 20 | .macro wait_usb_rx_ok 21 | : 22 | bit USB_STATUS 23 | bpl :- 24 | .endmacro 25 | -------------------------------------------------------------------------------- /libs/libef3usb/src/ef3usb_send_data.s: -------------------------------------------------------------------------------- 1 | 2 | 3 | .importzp ptr1, ptr2, ptr3, ptr4 4 | .importzp tmp1, tmp2, tmp3, tmp4 5 | .import popa, popax 6 | 7 | .include "ef3usb_macros.s" 8 | 9 | size_zp = ptr1 10 | xfer_size_zp = ptr2 11 | p_buff_zp = ptr3 12 | m_size_hi = tmp1 13 | 14 | 15 | ; ============================================================================= 16 | ; 17 | ; void __fastcall__ ef3usb_send_data(const void* data, uint16_t len); 18 | ; 19 | ; ============================================================================= 20 | .proc _ef3usb_send_data 21 | .export _ef3usb_send_data 22 | _ef3usb_send_data: 23 | sta size_zp 24 | stx size_zp + 1 ; Save size 25 | 26 | jsr popax 27 | sta p_buff_zp 28 | stx p_buff_zp + 1 ; Save buffer address 29 | 30 | lda size_zp 31 | eor #$ff 32 | tax 33 | lda size_zp + 1 34 | eor #$ff 35 | sta m_size_hi ; calc -size - 1 36 | ldy #0 37 | jmp @incCounter ; inc to get -size 38 | 39 | @byteLoop: 40 | lda (p_buff_zp), y 41 | 42 | ; xy contains number of bytes to be xfered (x = low byte) 43 | wait_usb_tx_ok 44 | sta USB_DATA 45 | 46 | iny 47 | bne @incCounter 48 | inc p_buff_zp + 1 49 | @incCounter: 50 | inx 51 | bne @byteLoop 52 | inc m_size_hi 53 | bne @byteLoop 54 | 55 | rts 56 | .endproc 57 | -------------------------------------------------------------------------------- /libs/libef3usb/src/ef3usb_send_str.s: -------------------------------------------------------------------------------- 1 | 2 | 3 | .importzp ptr1 4 | 5 | 6 | .include "ef3usb_macros.s" 7 | 8 | 9 | ; ============================================================================= 10 | ; 11 | ; void __fastcall__ ef3usb_send_str(const char* p); 12 | ; 13 | ; Send the string at p to USB. Stop at the 0 termination or after 255 chars. 14 | ; In any case a 0-termination is sent. 15 | ; 16 | ; ============================================================================= 17 | .proc _ef3usb_send_str 18 | .export _ef3usb_send_str 19 | _ef3usb_send_str: 20 | sta ptr1 21 | stx ptr1 + 1 ; Save p 22 | 23 | ldy #0 24 | @byteLoop: 25 | lda (ptr1), y 26 | beq @end 27 | wait_usb_tx_ok 28 | sta USB_DATA 29 | 30 | iny 31 | bne @byteLoop 32 | @end: 33 | wait_usb_tx_ok 34 | lda #0 35 | sta USB_DATA 36 | rts 37 | .endproc 38 | --------------------------------------------------------------------------------