├── README.md ├── Source ├── Remapped IO.DLL.sln └── Remapped IO.DLL │ ├── Remapped IO.DLL.cpp │ ├── Remapped IO.DLL.vcproj │ └── io.def ├── TVicPortInstall41.exe ├── io.dll ├── io.ini └── setup_PCB50_98D12C3.zip /README.md: -------------------------------------------------------------------------------- 1 | # Willem EEPROM Programmer files 2 | 3 | ## Install 4 | 5 | * Set LPT (Parallel Port) to ECP mode in the BIOS. 6 | * In Device manager, allow the port to accept interrupts and enable legacy mode operation as well. 7 | * install TVicPortInstaller41 8 | * install EPROM50 via setup_PCB50_98D12C3 9 | * change io.ini to have the address of your Parallel port if necessary 10 | * copy over to EPROM50 directory (C:/program files (x86)/EPROM50/) 11 | * restart computer 12 | 13 | ## Configure 14 | Change ````io.ini```` to have the parallel port address found in device manager. 15 | 16 | * Default is 0x378 17 | 18 | ### Thanks to Doug Brown for his work on this project to make it possible to use the Willem EEPROM Programer on x64 Windows 7. 19 | 20 | [Doug Brown](http://www.downtowndougbrown.com/2010/10/sivava-willem-eprom-programmer-on-windows-7-64-bit/) -------------------------------------------------------------------------------- /Source/Remapped IO.DLL.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 10.00 3 | # Visual C++ Express 2008 4 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Remapped IO.DLL", "Remapped IO.DLL\Remapped IO.DLL.vcproj", "{B0DB0E97-2FE8-4F79-A16E-3718A02AF567}" 5 | EndProject 6 | Global 7 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 8 | Debug|Win32 = Debug|Win32 9 | Release|Win32 = Release|Win32 10 | EndGlobalSection 11 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 12 | {B0DB0E97-2FE8-4F79-A16E-3718A02AF567}.Debug|Win32.ActiveCfg = Debug|Win32 13 | {B0DB0E97-2FE8-4F79-A16E-3718A02AF567}.Debug|Win32.Build.0 = Debug|Win32 14 | {B0DB0E97-2FE8-4F79-A16E-3718A02AF567}.Release|Win32.ActiveCfg = Release|Win32 15 | {B0DB0E97-2FE8-4F79-A16E-3718A02AF567}.Release|Win32.Build.0 = Release|Win32 16 | EndGlobalSection 17 | GlobalSection(SolutionProperties) = preSolution 18 | HideSolutionNode = FALSE 19 | EndGlobalSection 20 | EndGlobal 21 | -------------------------------------------------------------------------------- /Source/Remapped IO.DLL/Remapped IO.DLL.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include "TVicPort.h" 5 | 6 | enum { 7 | NotInitialized, 8 | Initialized, 9 | InitializeError, 10 | }; 11 | 12 | // Base address of the relocated parallel port. 13 | short int RelocatedAddress = (short)0x378; 14 | short int isInitialized = NotInitialized; 15 | HMODULE moduleHandle; 16 | 17 | void InitRemap(void) { 18 | 19 | FILE* fp = NULL; 20 | TCHAR filename[MAX_PATH]; 21 | TCHAR* filename_ptr; 22 | 23 | if (GetModuleFileName(moduleHandle, filename, MAX_PATH) && (filename_ptr = _tcsrchr(filename, TCHAR('\\'))) != NULL) { 24 | ++filename_ptr; 25 | _tcsncpy_s(filename_ptr, MAX_PATH - ((filename_ptr - filename) / sizeof(TCHAR)), TEXT("io.ini"), 6); 26 | if (_tfopen_s(&fp, filename, TEXT("r")) == 0) { 27 | if (fscanf_s(fp, "%hi", &RelocatedAddress) != 1) { 28 | MessageBox(NULL, TEXT("Could not parse address in io.ini."), NULL, MB_OK); 29 | isInitialized = InitializeError; 30 | } 31 | fclose(fp); 32 | 33 | if (!OpenTVicPort()) 34 | { 35 | MessageBox(NULL, TEXT("OpenTVicPort() failed -- have you rebooted since installing TVicPort?"), NULL, MB_OK); 36 | isInitialized = InitializeError; 37 | } 38 | else 39 | { 40 | if (!IsDriverOpened()) 41 | { 42 | MessageBox(NULL, TEXT("IsDriverOpened() returned FALSE, but OpenTVicPort() succeeded. Is TVicPort properly installed?"), NULL, MB_OK); 43 | isInitialized = InitializeError; 44 | } 45 | else 46 | { 47 | // Soft access allows for higher performance 48 | // at the expense of not working if other drivers are already using it... 49 | SetHardAccess(FALSE); 50 | isInitialized = Initialized; 51 | } 52 | } 53 | } else { 54 | MessageBox(NULL, TEXT("Could not open io.ini."), NULL, MB_OK); 55 | isInitialized = InitializeError; 56 | } 57 | } else { 58 | MessageBox(NULL, TEXT("Could not get module filename."), NULL, MB_OK); 59 | isInitialized = InitializeError; 60 | } 61 | } 62 | 63 | // Initialisation callback. 64 | BOOL APIENTRY DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved) { 65 | switch (ul_reason_for_call) { 66 | case DLL_PROCESS_ATTACH: 67 | moduleHandle = hModule; 68 | isInitialized = NotInitialized; 69 | break; 70 | case DLL_THREAD_ATTACH: 71 | case DLL_THREAD_DETACH: 72 | break; 73 | case DLL_PROCESS_DETACH: 74 | if (IsDriverOpened()) 75 | CloseTVicPort(); 76 | break; 77 | } 78 | return TRUE; 79 | } 80 | 81 | // Modifies port accesses in the legacy LPT1 parallel port range (0x378..0x37F). 82 | short int FixPortAddress(short int portAddress) { 83 | if (isInitialized == NotInitialized) { 84 | InitRemap(); 85 | } 86 | 87 | if (portAddress >= 0x378 && portAddress <= 0x37F) { 88 | return portAddress - 0x378 + RelocatedAddress; 89 | } else { 90 | return portAddress; 91 | } 92 | } 93 | 94 | // Reimplimented versions of the functions in io.dll modified to use the address-fixing function above. 95 | extern "C" __declspec(dllexport) void PortOut(short int Port, char Data) { 96 | //Out32(FixPortAddress(Port), Data); 97 | WritePort(FixPortAddress(Port), Data); 98 | } 99 | extern "C" __declspec(dllexport) char PortIn(short int Port) { 100 | //return (char)Inp32(FixPortAddress(Port)); 101 | return (char)ReadPort(FixPortAddress(Port)); 102 | } 103 | extern "C" __declspec(dllexport) short int IsDriverInstalled() { 104 | return -1; 105 | } -------------------------------------------------------------------------------- /Source/Remapped IO.DLL/Remapped IO.DLL.vcproj: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 15 | 16 | 17 | 18 | 19 | 26 | 29 | 32 | 35 | 38 | 41 | 53 | 56 | 59 | 62 | 74 | 77 | 80 | 83 | 86 | 89 | 92 | 95 | 96 | 104 | 107 | 110 | 113 | 116 | 119 | 131 | 134 | 137 | 140 | 153 | 156 | 159 | 162 | 165 | 168 | 171 | 174 | 175 | 176 | 177 | 178 | 179 | 184 | 187 | 188 | 191 | 192 | 193 | 196 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | -------------------------------------------------------------------------------- /Source/Remapped IO.DLL/io.def: -------------------------------------------------------------------------------- 1 | LIBRARY IO 2 | EXPORTS 3 | PortOut 4 | PortIn 5 | IsDriverInstalled -------------------------------------------------------------------------------- /TVicPortInstall41.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IceMupppet/willem-eeprom-programmer/98bb1093e273d340fc9803a37c55e1aad395528f/TVicPortInstall41.exe -------------------------------------------------------------------------------- /io.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IceMupppet/willem-eeprom-programmer/98bb1093e273d340fc9803a37c55e1aad395528f/io.dll -------------------------------------------------------------------------------- /io.ini: -------------------------------------------------------------------------------- 1 | 0x378 -------------------------------------------------------------------------------- /setup_PCB50_98D12C3.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IceMupppet/willem-eeprom-programmer/98bb1093e273d340fc9803a37c55e1aad395528f/setup_PCB50_98D12C3.zip --------------------------------------------------------------------------------