Move files from assembla to the github repo
This commit is contained in:
parent
ce8042c926
commit
4e17d3daee
4061
avr/usbload/loader.c
4061
avr/usbload/loader.c
File diff suppressed because it is too large
Load Diff
@ -1,14 +1,14 @@
|
|||||||
/*
|
/*
|
||||||
File: qd16boot01.smc
|
File: qd16boot02.smc
|
||||||
Time: Tue, 09 Feb 2016 12:36:39
|
Time: Tue, 09 Feb 2016 22:32:27
|
||||||
*/
|
*/
|
||||||
#ifndef __FIFO_H__
|
#ifndef __FIFO_H__
|
||||||
#define __FIFO_H__
|
#define __FIFO_H__
|
||||||
|
|
||||||
#define ROM_HUFFMAN_SIZE 0
|
#define ROM_ZIP_SIZE 33654
|
||||||
#define ROM_RLE_SIZE 31091
|
#define ROM_BUFFER_CNT 2
|
||||||
#define ROM_BUFFER_CNT 1
|
|
||||||
|
|
||||||
#define ROM_BUFFER_SIZE01 31091
|
#define ROM_BUFFER_SIZE01 32767
|
||||||
|
#define ROM_BUFFER_SIZE02 887
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
BIN
files/docs/ArchitekturdesSNES-Final.doc
Normal file
BIN
files/docs/ArchitekturdesSNES-Final.doc
Normal file
Binary file not shown.
BIN
files/docs/SNES-KART.doc
Normal file
BIN
files/docs/SNES-KART.doc
Normal file
Binary file not shown.
BIN
files/images/img_6849.jpg
Normal file
BIN
files/images/img_6849.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.0 MiB |
BIN
files/images/img_6854.jpg
Normal file
BIN
files/images/img_6854.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.9 MiB |
BIN
files/images/snes_rom_layout.png
Normal file
BIN
files/images/snes_rom_layout.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 8.2 KiB |
BIN
files/images/sram_poc01.png
Normal file
BIN
files/images/sram_poc01.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 73 KiB |
BIN
files/images/sram_poc02.jpg
Normal file
BIN
files/images/sram_poc02.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 130 KiB |
BIN
files/pcb/quickdev_v2.brd
Normal file
BIN
files/pcb/quickdev_v2.brd
Normal file
Binary file not shown.
BIN
files/pcb/quickdev_v2.sch
Normal file
BIN
files/pcb/quickdev_v2.sch
Normal file
Binary file not shown.
BIN
files/pcb/snesram.brd
Normal file
BIN
files/pcb/snesram.brd
Normal file
Binary file not shown.
BIN
files/pcb/snesram.sch
Normal file
BIN
files/pcb/snesram.sch
Normal file
Binary file not shown.
136
files/ucon/quickdev16.inf
Normal file
136
files/ucon/quickdev16.inf
Normal file
@ -0,0 +1,136 @@
|
|||||||
|
[Version]
|
||||||
|
Signature = "$Chicago$"
|
||||||
|
provider = %manufacturer%
|
||||||
|
DriverVer = 07/07/2009,0.1.12.2
|
||||||
|
CatalogFile = quickdev16.cat
|
||||||
|
CatalogFile.NT = quickdev16.cat
|
||||||
|
CatalogFile.NTAMD64 = quickdev16_x64.cat
|
||||||
|
|
||||||
|
Class = LibUsbDevices
|
||||||
|
ClassGUID = {EB781AAF-9C70-4523-A5DF-642A87ECA567}
|
||||||
|
|
||||||
|
[ClassInstall]
|
||||||
|
AddReg=libusb_class_install_add_reg
|
||||||
|
|
||||||
|
[ClassInstall32]
|
||||||
|
AddReg=libusb_class_install_add_reg
|
||||||
|
|
||||||
|
[libusb_class_install_add_reg]
|
||||||
|
HKR,,,,"LibUSB-Win32 Devices"
|
||||||
|
HKR,,Icon,,"-20"
|
||||||
|
|
||||||
|
[Manufacturer]
|
||||||
|
%manufacturer%=Devices,NT,NTAMD64
|
||||||
|
|
||||||
|
;--------------------------------------------------------------------------
|
||||||
|
; Files
|
||||||
|
;--------------------------------------------------------------------------
|
||||||
|
|
||||||
|
[SourceDisksNames]
|
||||||
|
1 = "Libusb-Win32 Driver Installation Disk",,
|
||||||
|
|
||||||
|
[SourceDisksFiles]
|
||||||
|
libusb0.sys = 1,,
|
||||||
|
libusb0.dll = 1,,
|
||||||
|
libusb0_x64.sys = 1,,
|
||||||
|
libusb0_x64.dll = 1,,
|
||||||
|
|
||||||
|
[DestinationDirs]
|
||||||
|
libusb_files_sys = 10,system32\drivers
|
||||||
|
libusb_files_sys_x64 = 10,system32\drivers
|
||||||
|
libusb_files_dll = 10,system32
|
||||||
|
libusb_files_dll_wow64 = 10,syswow64
|
||||||
|
libusb_files_dll_x64 = 10,system32
|
||||||
|
|
||||||
|
[libusb_files_sys]
|
||||||
|
libusb0.sys
|
||||||
|
|
||||||
|
[libusb_files_sys_x64]
|
||||||
|
libusb0.sys,libusb0_x64.sys
|
||||||
|
|
||||||
|
[libusb_files_dll]
|
||||||
|
libusb0.dll
|
||||||
|
|
||||||
|
[libusb_files_dll_wow64]
|
||||||
|
libusb0.dll
|
||||||
|
|
||||||
|
[libusb_files_dll_x64]
|
||||||
|
libusb0.dll,libusb0_x64.dll
|
||||||
|
|
||||||
|
;--------------------------------------------------------------------------
|
||||||
|
; Device driver
|
||||||
|
;--------------------------------------------------------------------------
|
||||||
|
|
||||||
|
[LIBUSB_DEV]
|
||||||
|
CopyFiles = libusb_files_sys, libusb_files_dll
|
||||||
|
AddReg = libusb_add_reg
|
||||||
|
|
||||||
|
[LIBUSB_DEV.NT]
|
||||||
|
CopyFiles = libusb_files_sys, libusb_files_dll
|
||||||
|
|
||||||
|
[LIBUSB_DEV.NTAMD64]
|
||||||
|
CopyFiles = libusb_files_sys_x64, libusb_files_dll_wow64, libusb_files_dll_x64
|
||||||
|
|
||||||
|
[LIBUSB_DEV.HW]
|
||||||
|
DelReg = libusb_del_reg_hw
|
||||||
|
AddReg = libusb_add_reg_hw
|
||||||
|
|
||||||
|
[LIBUSB_DEV.NT.HW]
|
||||||
|
DelReg = libusb_del_reg_hw
|
||||||
|
AddReg = libusb_add_reg_hw
|
||||||
|
|
||||||
|
[LIBUSB_DEV.NTAMD64.HW]
|
||||||
|
DelReg = libusb_del_reg_hw
|
||||||
|
AddReg = libusb_add_reg_hw
|
||||||
|
|
||||||
|
[LIBUSB_DEV.NT.Services]
|
||||||
|
AddService = libusb0, 0x00000002, libusb_add_service
|
||||||
|
|
||||||
|
[LIBUSB_DEV.NTAMD64.Services]
|
||||||
|
AddService = libusb0, 0x00000002, libusb_add_service
|
||||||
|
|
||||||
|
[libusb_add_reg]
|
||||||
|
HKR,,DevLoader,,*ntkern
|
||||||
|
HKR,,NTMPDriver,,libusb0.sys
|
||||||
|
|
||||||
|
; Older versions of this .inf file installed filter drivers. They are not
|
||||||
|
; needed any more and must be removed
|
||||||
|
[libusb_del_reg_hw]
|
||||||
|
HKR,,LowerFilters
|
||||||
|
HKR,,UpperFilters
|
||||||
|
|
||||||
|
; Device properties
|
||||||
|
[libusb_add_reg_hw]
|
||||||
|
HKR,,SurpriseRemovalOK, 0x00010001, 1
|
||||||
|
|
||||||
|
;--------------------------------------------------------------------------
|
||||||
|
; Services
|
||||||
|
;--------------------------------------------------------------------------
|
||||||
|
|
||||||
|
[libusb_add_service]
|
||||||
|
DisplayName = "LibUsb-Win32 - Kernel Driver 07/07/2009, 0.1.12.2"
|
||||||
|
ServiceType = 1
|
||||||
|
StartType = 3
|
||||||
|
ErrorControl = 0
|
||||||
|
ServiceBinary = %12%\libusb0.sys
|
||||||
|
|
||||||
|
;--------------------------------------------------------------------------
|
||||||
|
; Devices
|
||||||
|
;--------------------------------------------------------------------------
|
||||||
|
|
||||||
|
[Devices]
|
||||||
|
"Quickdev16"=LIBUSB_DEV, USB\VID_16c0&PID_05dd
|
||||||
|
|
||||||
|
[Devices.NT]
|
||||||
|
"Quickdev16"=LIBUSB_DEV, USB\VID_16c0&PID_05dd
|
||||||
|
|
||||||
|
[Devices.NTAMD64]
|
||||||
|
"Quickdev16"=LIBUSB_DEV, USB\VID_16c0&PID_05dd
|
||||||
|
|
||||||
|
|
||||||
|
;--------------------------------------------------------------------------
|
||||||
|
; Strings
|
||||||
|
;--------------------------------------------------------------------------
|
||||||
|
|
||||||
|
[Strings]
|
||||||
|
manufacturer = "Optixx"
|
||||||
BIN
files/ucon/quickdev16.msi
Normal file
BIN
files/ucon/quickdev16.msi
Normal file
Binary file not shown.
3
files/ucon/quickdev16_x64.cat
Normal file
3
files/ucon/quickdev16_x64.cat
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
This file will contain the digital signature of the files to be installed
|
||||||
|
on the system.
|
||||||
|
This file will be provided by Microsoft upon certification of your drivers.
|
||||||
BIN
files/ucon/ucon64.exe_win32_x86.gz
Normal file
BIN
files/ucon/ucon64.exe_win32_x86.gz
Normal file
Binary file not shown.
BIN
files/ucon/ucon64_linux_x86.gz
Normal file
BIN
files/ucon/ucon64_linux_x86.gz
Normal file
Binary file not shown.
BIN
files/ucon/ucon64_osx_intel.gz
Normal file
BIN
files/ucon/ucon64_osx_intel.gz
Normal file
Binary file not shown.
@ -115,7 +115,7 @@ quickdev16_write_rom (const char *filename)
|
|||||||
uint32_t bank_size, address = 0;
|
uint32_t bank_size, address = 0;
|
||||||
uint16_t bank_shift;
|
uint16_t bank_shift;
|
||||||
|
|
||||||
#if (defined __unix__ || defined __BEOS__) && !defined __MSDOS__
|
#if (defined __unix__ || defined __BEOS__ || defined __APPLE__) && !defined __MSDOS__
|
||||||
init_conio ();
|
init_conio ();
|
||||||
if (register_func (deinit_conio) == -1)
|
if (register_func (deinit_conio) == -1)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -532,7 +532,13 @@ kbhit (void)
|
|||||||
fd.revents = 0;
|
fd.revents = 0;
|
||||||
|
|
||||||
return poll (&fd, 1, 0) > 0;
|
return poll (&fd, 1, 0) > 0;
|
||||||
#else
|
#elif (defined __APPLE__)
|
||||||
|
struct timeval tv = { 0L, 0L };
|
||||||
|
fd_set fds;
|
||||||
|
FD_ZERO(&fds);
|
||||||
|
FD_SET(0, &fds);
|
||||||
|
return select(1, &fds, NULL, NULL, &tv);
|
||||||
|
#else
|
||||||
tty_t tmptty = newtty;
|
tty_t tmptty = newtty;
|
||||||
int ch, key_pressed;
|
int ch, key_pressed;
|
||||||
|
|
||||||
|
|||||||
@ -114,3 +114,4 @@ cfile.write('''};
|
|||||||
cfile.close()
|
cfile.close()
|
||||||
shutil.copy("/tmp/loader.c", os.path.join(TARGET, "loader.c"))
|
shutil.copy("/tmp/loader.c", os.path.join(TARGET, "loader.c"))
|
||||||
shutil.copy("/tmp/loader.h", os.path.join(TARGET, "loader.h"))
|
shutil.copy("/tmp/loader.h", os.path.join(TARGET, "loader.h"))
|
||||||
|
print "Copy loader.h and loader.c to %s" % TARGET
|
||||||
|
|||||||
@ -1,26 +1,24 @@
|
|||||||
import binascii
|
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
import time
|
import time
|
||||||
import shutil
|
import shutil
|
||||||
|
|
||||||
LEN = 2**16
|
LEN = 2 ** 16
|
||||||
huffman = False
|
huffman = False
|
||||||
TARGET=os.getcwd()
|
TARGET = os.getcwd()
|
||||||
SOURCE=sys.argv[1]
|
SOURCE = sys.argv[1]
|
||||||
DEFLATE=os.path.basename(sys.argv[1]) + ".deflate"
|
DEFLATE = os.path.basename(sys.argv[1]) + ".deflate"
|
||||||
PATH="/Users/david/Devel/arch/avr/code/quickdev16/scripts"
|
PATH = os.path.dirname(os.path.realpath(__file__))
|
||||||
|
WINE = "wine"
|
||||||
WINE="/Applications/Darwine/Wine.bundle/Contents/bin/wine"
|
KZIP = os.path.join(PATH, "kzip.exe")
|
||||||
KZIP=os.path.join(PATH,"kzip.exe")
|
DEFLOPT = os.path.join(PATH, "DeflOpt.exe")
|
||||||
DEFLOPT=os.path.join(PATH,"DeflOpt.exe")
|
ZIP2RAW = os.path.join(PATH, "zip2raw.rb")
|
||||||
ZIP2RAW=os.path.join(PATH,"zip2raw.rb")
|
|
||||||
|
|
||||||
if os.path.isfile("rom.zip"):
|
if os.path.isfile("rom.zip"):
|
||||||
os.unlink("rom.zip")
|
os.unlink("rom.zip")
|
||||||
|
|
||||||
os.system("%s %s rom /s1 %s" % (WINE,KZIP,SOURCE))
|
os.system("%s %s rom /s1 %s" % (WINE, KZIP, SOURCE))
|
||||||
os.system("%s %s /a rom.zip" % (WINE,DEFLOPT))
|
os.system("%s %s /a rom.zip" % (WINE, DEFLOPT))
|
||||||
os.system("ruby %s rom.zip" % ZIP2RAW)
|
os.system("ruby %s rom.zip" % ZIP2RAW)
|
||||||
|
|
||||||
if os.path.isfile("rom.zip"):
|
if os.path.isfile("rom.zip"):
|
||||||
@ -29,18 +27,18 @@ if os.path.isfile("rom.zip"):
|
|||||||
data = open(DEFLATE).read()
|
data = open(DEFLATE).read()
|
||||||
os.unlink(DEFLATE)
|
os.unlink(DEFLATE)
|
||||||
zip_size = len(data)
|
zip_size = len(data)
|
||||||
cfile = open("/tmp/loader.c","w")
|
cfile = open("/tmp/loader.c", "w")
|
||||||
hfile = open("/tmp/loader.h","w")
|
hfile = open("/tmp/loader.h", "w")
|
||||||
|
|
||||||
parts = []
|
parts = []
|
||||||
cnt = len(data) / ((2**15) -1 )
|
cnt = len(data) / ((2 ** 15) - 1)
|
||||||
r = len(data) - (cnt * ((2**15) -1))
|
r = len(data) - (cnt * ((2 ** 15) - 1))
|
||||||
for i in range(0, cnt):
|
for i in range(0, cnt):
|
||||||
parts.append(((2**15) -1 ))
|
parts.append(((2 ** 15) - 1))
|
||||||
parts.append(r)
|
parts.append(r)
|
||||||
|
|
||||||
hfile.write('''/*
|
hfile.write('''/*
|
||||||
File: %s
|
File: %s
|
||||||
Time: %s
|
Time: %s
|
||||||
*/
|
*/
|
||||||
#ifndef __FIFO_H__
|
#ifndef __FIFO_H__
|
||||||
@ -49,66 +47,62 @@ Time: %s
|
|||||||
#define ROM_ZIP_SIZE %i
|
#define ROM_ZIP_SIZE %i
|
||||||
#define ROM_BUFFER_CNT %i
|
#define ROM_BUFFER_CNT %i
|
||||||
|
|
||||||
''' % (os.path.basename(SOURCE),time.strftime("%a, %d %b %Y %H:%M:%S",
|
''' % (
|
||||||
time.localtime()),zip_size,len(parts)))
|
os.path.basename(SOURCE),
|
||||||
|
time.strftime("%a, %d %b %Y %H:%M:%S", time.localtime()),
|
||||||
|
zip_size,
|
||||||
for idx,val in enumerate(parts):
|
len(parts)
|
||||||
hfile.write('#define ROM_BUFFER_SIZE%02i %i\n' % (idx+1,val))
|
))
|
||||||
|
|
||||||
|
|
||||||
|
for idx, val in enumerate(parts):
|
||||||
|
hfile.write('#define ROM_BUFFER_SIZE%02i %i\n' % (idx + 1, val))
|
||||||
hfile.write('\n#endif\n')
|
hfile.write('\n#endif\n')
|
||||||
hfile.close()
|
hfile.close()
|
||||||
cfile.write('''/*
|
cfile.write('''/*
|
||||||
File: %s
|
File: %s
|
||||||
Time: %s
|
Time: %s
|
||||||
*/
|
*/
|
||||||
#include <avr/pgmspace.h>
|
#include <avr/pgmspace.h>
|
||||||
#include <loader.h>
|
#include <loader.h>
|
||||||
''')
|
''')
|
||||||
|
|
||||||
|
|
||||||
addr = 0
|
addr = 0
|
||||||
for idx,val in enumerate(parts):
|
for idx, val in enumerate(parts):
|
||||||
cfile.write('''
|
cfile.write('''
|
||||||
const char _rom%02i[ROM_BUFFER_SIZE%02i] PROGMEM = {
|
const char _rom%02i[ROM_BUFFER_SIZE%02i] PROGMEM = {
|
||||||
''' % (idx+1,idx+1))
|
''' % (idx + 1, idx + 1))
|
||||||
l = addr
|
l = addr
|
||||||
h = addr + parts[idx]
|
h = addr + parts[idx]
|
||||||
addr+= parts[idx]
|
addr += parts[idx]
|
||||||
for idx,c in enumerate(data[l:h]):
|
for idx, c in enumerate(data[l:h]):
|
||||||
c = ord(c)
|
c = ord(c)
|
||||||
if idx<len(data)-1:
|
if idx < len(data) - 1:
|
||||||
cfile.write("0x%02x," % c)
|
cfile.write("0x%02x," % c)
|
||||||
else:
|
else:
|
||||||
cfile.write("0x%02x" % c)
|
cfile.write("0x%02x" % c)
|
||||||
if idx and idx%16==0:
|
if idx and idx % 16 == 0:
|
||||||
cfile.write("\n")
|
cfile.write("\n")
|
||||||
cfile.write('''
|
cfile.write('''
|
||||||
};
|
};
|
||||||
''')
|
''')
|
||||||
|
|
||||||
cfile.write('PGM_VOID_P _rom[ROM_BUFFER_CNT]= {')
|
cfile.write('PGM_VOID_P _rom[ROM_BUFFER_CNT]= {')
|
||||||
for idx,val in enumerate(parts):
|
for idx, val in enumerate(parts):
|
||||||
if idx<len(parts)-1:
|
if idx < len(parts) - 1:
|
||||||
cfile.write('''&_rom%02i,''' % (idx+1))
|
cfile.write('''&_rom%02i,''' % (idx + 1))
|
||||||
else:
|
else:
|
||||||
cfile.write('''&_rom%02i''' % (idx+1))
|
cfile.write('''&_rom%02i''' % (idx + 1))
|
||||||
cfile.write('''};
|
cfile.write('''};
|
||||||
''')
|
''')
|
||||||
|
|
||||||
cfile.write('const int _rom_size[ROM_BUFFER_CNT] = {')
|
cfile.write('const int _rom_size[ROM_BUFFER_CNT] = {')
|
||||||
for idx,val in enumerate(parts):
|
for idx, val in enumerate(parts):
|
||||||
if idx<len(parts)-1:
|
if idx < len(parts) - 1:
|
||||||
cfile.write('''%i,''' % (val))
|
cfile.write('''%i,''' % (val))
|
||||||
else:
|
else:
|
||||||
cfile.write('''%i''' % (val))
|
cfile.write('''%i''' % (val))
|
||||||
cfile.write('''};
|
cfile.write('''};
|
||||||
''')
|
''')
|
||||||
|
|
||||||
cfile.close()
|
cfile.close()
|
||||||
|
shutil.copy("/tmp/loader.c", os.path.join(TARGET, "loader.c"))
|
||||||
shutil.copy("/tmp/loader.c", os.path.join(TARGET,"loader.c"))
|
shutil.copy("/tmp/loader.h", os.path.join(TARGET, "loader.h"))
|
||||||
shutil.copy("/tmp/loader.h", os.path.join(TARGET,"loader.h"))
|
print "Copy loader.h and loader.c to %s" % TARGET
|
||||||
print "wrote loader.c"
|
|
||||||
print "wrote loader.h"
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user