Compare commits

...

7 Commits

Author SHA1 Message Date
Takumi Sueda 2ec8f7827e Version 4.1.0 2024-02-04 10:08:17 +09:00
Suguru Saito f3b955417f
Merge pull request #12 from brain-hackers/feat-version
feat: show version
2024-01-27 16:59:23 +09:00
Suguru Saito 48be6a7427 feat: show version 2024-01-26 18:49:00 +09:00
Suguru Saito 9e2d126e58
Merge pull request #11 from brain-hackers/fix-pwa7400
Fix PW-A7400 support
2024-01-26 17:00:07 +09:00
Suguru Saito 29c43802a5 Fix PW-A7400 support 2024-01-22 17:55:48 +09:00
Takumi Sueda 0ef73cdeb4
Merge pull request #10 from brain-hackers/license
Move the license body to the LICENSE file
2022-11-02 16:03:26 +09:00
Takumi Sueda 4d5e55e135 Move the license body to the LICENSE file 2022-11-01 03:46:14 +09:00
8 changed files with 106 additions and 142 deletions

View File

@ -1,36 +1,3 @@
/*
* BrainLILO
* U-Boot loader for electric dictionary.
*
* Copyright (C) 2019 C. Shirasaka <holly_programmer@outlook.com>
* based on
** ResetKitHelper
** Soft/hard reset the electronic dictionary.
**
** Copyright (C) 2012 T. Kawada <tcppjp [ at ] gmail.com>
*
* This file is licensed in MIT license.
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation the
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
* sell copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*
*/
#define BRAINLILO_API extern "C" __declspec(dllexport)
#include "BrainLILO.h"
#include "BrainLILODrv.h"

View File

@ -1,5 +1,3 @@
// This file is in public domain.
#pragma once
#include <windows.h>

View File

@ -1,41 +1,15 @@
/*
* BrainLILODrv
* U-Boot loader for electric dictionary.
*
* Copyright (C) 2019 C. Shirasaka <holly_programmer@outlook.com>
* based on
** ResetKitHelper
** Soft/hard reset the electronic dictionary.
**
** Copyright (C) 2012 T. Kawada <tcppjp [ at ] gmail.com>
*
* This file is licensed in MIT license.
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation the
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
* sell copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*
*/
#include <fstream>
#include <regex>
#include <stdint.h>
#include <stdlib.h>
#include <windows.h>
#if defined(VERSION_MAJOR) && defined(VERSION_MINOR) && defined(VERSION_PATCH)
#define CONFIG_VERSION TEXT(VERSION_MAJOR) L"." TEXT(VERSION_MINOR) L"." TEXT(VERSION_PATCH)
#else
#define CONFIG_VERSION L"unspecified"
#endif
#define FSNOTIFY_POWER_OFF 1
#define FSNOTIFY_POWER_ON 0
@ -226,6 +200,8 @@ static bool doLinux()
HANDLE hUBoot;
DWORD wReadSize;
outputDebugMessage(L"BrainLILO: Version " CONFIG_VERSION);
iVersion.open("\\NAND\\version.txt");
while (getline(iVersion, line))
{

View File

@ -1,5 +1,3 @@
// This file is in public domain.
#pragma once
#include <winioctl.h>

26
LICENSE Normal file
View File

@ -0,0 +1,26 @@
*** BrainLILO ***
MIT License
Copyright (C) 2019 C. Shirasaka <holly_programmer@outlook.com>
Copyright (C) 2012 T. Kawada <tcppjp [ at ] gmail.com>
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation the
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
sell copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
BrainLILO.h, BrainLILODrv.h, and bootloader.cpp are in the public domain.

View File

@ -1,5 +1,5 @@
VERSION_MAJOR=3
VERSION_MINOR=0
VERSION_MAJOR=4
VERSION_MINOR=1
VERSION_PATCH=0
PREFIX?=/opt/cegcc
@ -27,6 +27,7 @@ DLLFLAGS=-DEV_PLATFORM_WIN32 -DUNICODE -D_UNICODE -DEV_UNSAFE_SWPRINTF -mwin32 \
DRVFLAGS= -DEV_PLATFORM_WIN32 -DUNICODE -D_UNICODE -DEV_UNSAFE_SWPRINTF -mwin32 \
-O2 -mcpu=arm926ej-s -D_WIN32_WCE=0x600 -D_LARGEFILE_SOURCE=1 -D_LARGEFILE64_SOURCE=1 \
-DVERSION_MAJOR=\"$(VERSION_MAJOR)\" -DVERSION_MINOR=\"$(VERSION_MINOR)\" -DVERSION_PATCH=\"$(VERSION_PATCH)\" \
-D_FILE_OFFSET_BITS=64 -DNDEBUG -Wall -static \
-Wl,--image-base,0x100000,--allow-multiple-definition \
-lcoredll -shared

View File

@ -1,5 +1,3 @@
// This file is in public domain.
#include <windows.h>
int APIENTRY WinMain(HINSTANCE hInst, HINSTANCE hPrev, LPTSTR lpCmd, int nShow)

138
models.h
View File

@ -2,75 +2,75 @@
#include <string>
const std::map<std::wstring, std::wstring> models = {
{L"ED-CD2", L"gen1.bin"}, // AC880
{L"ED-CD2D", L"gen1.bin"}, // AC830
{L"ED-CD1", L"gen1.bin"}, // TC980
{L"ED-CD4", L"gen1.bin"}, // GC590
{L"ED-CD5", L"gen1.bin"}, // AC890
{L"ED-CD6", L"gen1.bin"}, // AC900
{L"ED-CD9", L"gen1.bin"}, // GC610
{L"ED-CD8", L"gen1.bin"}, // AC910
{L"ED-CD10", L"gen1.bin"}, // AC920
{L"ED-NJ1", L"gen1.bin"}, // G4000
{L"ED-NS1", L"gen1.bin"}, // G5000
{L"ED-NS1", L"gen1.bin"}, // HC1
{L"ED-NB1", L"gen1.bin"}, // A9000
{L"ED-NA1", L"gen1.bin"}, // A7000
{L"ED-NS1P", L"gen1.bin"}, // G5100
{L"ED-NJ2", L"gen2.bin"}, // G4200
{L"ED-NH2", L"gen2.bin"}, // G5200
{L"ED-NH2", L"gen2.bin"}, // HC2
{L"ED-NB2", L"gen2.bin"}, // A9200
{L"ED-NA2", L"gen2.bin"}, // A7200
{L"ED-NA3", L"gen2.bin"}, // A7300
{L"SD-GH1", L"gen2.bin"}, // GX500
{L"ED-NH3", L"gen2.bin"}, // G5300
{L"ED-NH3", L"gen2.bin"}, // HC3
{L"ED-NB3", L"gen2.bin"}, // A9300
{L"ED-NR3", L"gen2.bin"}, // A9100
{L"SD-GJ1", L"gen2.bin"}, // GX300
{L"ED-NQ3", L"gen2.bin"}, // A7400
{L"ED-SJ1", L"gen3_1.bin"}, // SJ1
{L"ED-SH1", L"gen3_1.bin"}, // SH1
{L"ED-HC4", L"gen3_1.bin"}, // HC4
{L"ED-SB1", L"gen3_1.bin"}, // SB1
{L"ED-SA1", L"gen3_1.bin"}, // SA1
{L"ED-SR1", L"gen3_1.bin"}, // SR1
{L"ED-SJ2", L"gen3_2.bin"}, // SJ2
{L"ED-SH2", L"gen3_2.bin"}, // SH2
{L"ED-HC5", L"gen3_2.bin"}, // HC5
{L"ED-SB2", L"gen3_2.bin"}, // SB2
{L"ED-SA2", L"gen3_2.bin"}, // SA2
{L"ED-SJ3", L"gen3_3.bin"}, // SJ3
{L"ED-SH3", L"gen3_3.bin"}, // SH3
{L"ED-HC6", L"gen3_3.bin"}, // HC6
{L"ED-SB3", L"gen3_3.bin"}, // SB3
{L"ED-SA3", L"gen3_3.bin"}, // SA3
{L"ED-SJ4", L"gen3_4.bin"}, // SJ4
{L"ED-SH4", L"gen3_4.bin"}, // SH4
{L"ED-H77", L"gen3_4.bin"}, // H7700
{L"ED-SB4", L"gen3_4.bin"}, // SB4
{L"ED-SA4", L"gen3_4.bin"}, // SA4
{L"ED-SR2", L"gen3_4.bin"}, // SR2
{L"ED-SJ5", L"gen3_5.bin"}, // SJ5
{L"ED-SH5", L"gen3_5.bin"}, // SH5
{L"ED-H78", L"gen3_5.bin"}, // H7800
{L"ED-SB5", L"gen3_5.bin"}, // SB5
{L"ED-SA5", L"gen3_5.bin"}, // SA5
{L"ED-AJ1", L"gen3_5.bin"}, // AJ1
{L"ED-AA1", L"gen3_5.bin"}, // AA1
{L"ED-SH6", L"gen3_6.bin"}, // SH6
{L"ED-SS6", L"gen3_6.bin"}, // SS6
{L"ED-H80", L"gen3_6.bin"}, // H8000
{L"ED-SB6", L"gen3_6.bin"}, // SB6
{L"ED-AJ2", L"gen3_6.bin"}, // AJ2
{L"ED-AA2", L"gen3_6.bin"}, // AA2
{L"ED-SH7", L"gen3_7.bin"}, // SH7
{L"ED-SS7", L"gen3_7.bin"}, // SS7
{L"ED-H91", L"gen3_7.bin"}, // H9100
{L"ED-H81", L"gen3_7.bin"}, // H8100
{L"ED-SB7", L"gen3_7.bin"}, // SB7
{L"ED-SR3", L"gen3_7.bin"}, // SR3
{L"ED-CD2", L"gen1.bin"}, // AC880
{L"ED-CD2D", L"gen1.bin"}, // AC830
{L"ED-CD1", L"gen1.bin"}, // TC980
{L"ED-CD4", L"gen1.bin"}, // GC590
{L"ED-CD5", L"gen1.bin"}, // AC890
{L"ED-CD6", L"gen1.bin"}, // AC900
{L"ED-CD9", L"gen1.bin"}, // GC610
{L"ED-CD8", L"gen1.bin"}, // AC910
{L"ED-CD10", L"gen1.bin"}, // AC920
{L"ED-NJ1", L"gen1.bin"}, // G4000
{L"ED-NS1", L"gen1.bin"}, // G5000
{L"ED-NS1", L"gen1.bin"}, // HC1
{L"ED-NB1", L"gen1.bin"}, // A9000
{L"ED-NA1", L"gen1.bin"}, // A7000
{L"ED-NS1P", L"gen1.bin"}, // G5100
{L"ED-NJ2", L"gen2.bin"}, // G4200
{L"ED-NH2", L"gen2.bin"}, // G5200
{L"ED-NH2", L"gen2.bin"}, // HC2
{L"ED-NB2", L"gen2.bin"}, // A9200
{L"ED-NA2", L"gen2.bin"}, // A7200
{L"ED-NA3", L"gen2.bin"}, // A7300
{L"SD-GH1", L"gen2.bin"}, // GX500
{L"ED-NH3", L"gen2.bin"}, // G5300
{L"ED-NH3", L"gen2.bin"}, // HC3
{L"ED-NB3", L"gen2.bin"}, // A9300
{L"ED-NR3", L"gen2.bin"}, // A9100
{L"SD-GJ1", L"gen2.bin"}, // GX300
{L"ED-NQ3", L"gen2_7400.bin"}, // A7400
{L"ED-SJ1", L"gen3_1.bin"}, // SJ1
{L"ED-SH1", L"gen3_1.bin"}, // SH1
{L"ED-HC4", L"gen3_1.bin"}, // HC4
{L"ED-SB1", L"gen3_1.bin"}, // SB1
{L"ED-SA1", L"gen3_1.bin"}, // SA1
{L"ED-SR1", L"gen3_1.bin"}, // SR1
{L"ED-SJ2", L"gen3_2.bin"}, // SJ2
{L"ED-SH2", L"gen3_2.bin"}, // SH2
{L"ED-HC5", L"gen3_2.bin"}, // HC5
{L"ED-SB2", L"gen3_2.bin"}, // SB2
{L"ED-SA2", L"gen3_2.bin"}, // SA2
{L"ED-SJ3", L"gen3_3.bin"}, // SJ3
{L"ED-SH3", L"gen3_3.bin"}, // SH3
{L"ED-HC6", L"gen3_3.bin"}, // HC6
{L"ED-SB3", L"gen3_3.bin"}, // SB3
{L"ED-SA3", L"gen3_3.bin"}, // SA3
{L"ED-SJ4", L"gen3_4.bin"}, // SJ4
{L"ED-SH4", L"gen3_4.bin"}, // SH4
{L"ED-H77", L"gen3_4.bin"}, // H7700
{L"ED-SB4", L"gen3_4.bin"}, // SB4
{L"ED-SA4", L"gen3_4.bin"}, // SA4
{L"ED-SR2", L"gen3_4.bin"}, // SR2
{L"ED-SJ5", L"gen3_5.bin"}, // SJ5
{L"ED-SH5", L"gen3_5.bin"}, // SH5
{L"ED-H78", L"gen3_5.bin"}, // H7800
{L"ED-SB5", L"gen3_5.bin"}, // SB5
{L"ED-SA5", L"gen3_5.bin"}, // SA5
{L"ED-AJ1", L"gen3_5.bin"}, // AJ1
{L"ED-AA1", L"gen3_5.bin"}, // AA1
{L"ED-SH6", L"gen3_6.bin"}, // SH6
{L"ED-SS6", L"gen3_6.bin"}, // SS6
{L"ED-H80", L"gen3_6.bin"}, // H8000
{L"ED-SB6", L"gen3_6.bin"}, // SB6
{L"ED-AJ2", L"gen3_6.bin"}, // AJ2
{L"ED-AA2", L"gen3_6.bin"}, // AA2
{L"ED-SH7", L"gen3_7.bin"}, // SH7
{L"ED-SS7", L"gen3_7.bin"}, // SS7
{L"ED-H91", L"gen3_7.bin"}, // H9100
{L"ED-H81", L"gen3_7.bin"}, // H8100
{L"ED-SB7", L"gen3_7.bin"}, // SB7
{L"ED-SR3", L"gen3_7.bin"}, // SR3
};
typedef enum