From d5190cd788b4ca2581be757b7febae9105b87eba Mon Sep 17 00:00:00 2001 From: TuxSH Date: Tue, 5 Jul 2016 16:24:00 +0200 Subject: [PATCH] Minor stuff (2) --- exceptions/arm11/source/handlers.h | 22 ++++++++++++++++++---- exceptions/arm11/source/handlers.s | 19 ++++++++++++++++--- exceptions/arm11/source/mainHandler.c | 21 ++++++++++++++++++--- exceptions/arm11/source/start.s | 20 ++++++++++++++++++++ exceptions/arm11/source/types.h | 23 +++++++++++++++++++++++ exceptions/arm9/source/handlers.h | 21 ++++++++++++++++++--- exceptions/arm9/source/handlers.s | 19 ++++++++++++++++--- exceptions/arm9/source/i2c.c | 26 ++++++++++++++++++++++++++ exceptions/arm9/source/i2c.h | 26 ++++++++++++++++++++++++++ exceptions/arm9/source/mainHandler.c | 21 ++++++++++++++++++--- exceptions/arm9/source/start.s | 20 ++++++++++++++++++++ exceptions/arm9/source/types.h | 22 ++++++++++++++++++++++ exceptions/exception_dump_parser.py | 20 +++++++++++++++++++- source/exceptions.c | 23 ++++++++++++++++++++--- source/exceptions.h | 21 +++++++++++++++++++-- 15 files changed, 299 insertions(+), 25 deletions(-) diff --git a/exceptions/arm11/source/handlers.h b/exceptions/arm11/source/handlers.h index 92a249a..62d74cc 100644 --- a/exceptions/arm11/source/handlers.h +++ b/exceptions/arm11/source/handlers.h @@ -1,14 +1,28 @@ /* -* handlers.h -* by TuxSH +* This file is part of Luma3DS +* Copyright (C) 2016 Aurora Wright, TuxSH * -* This is part of Luma3DS, see LICENSE.txt for details +* This program is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program. If not, see . +* +* Additional Terms 7.b of GPLv3 applies to this file: Requiring preservation of specified +* reasonable legal notices or author attributions in that material or in the Appropriate Legal +* Notices displayed by works containing it. */ #pragma once #include "types.h" -#define NULL 0 void __attribute__((noreturn)) mcuReboot(void); void cleanInvalidateDCacheAndDMB(void); diff --git a/exceptions/arm11/source/handlers.s b/exceptions/arm11/source/handlers.s index 543ed45..5167fe0 100644 --- a/exceptions/arm11/source/handlers.s +++ b/exceptions/arm11/source/handlers.s @@ -1,9 +1,22 @@ +@ This file is part of Luma3DS +@ Copyright (C) 2016 Aurora Wright, TuxSH @ -@ handlers.s -@ by TuxSH +@ This program is free software: you can redistribute it and/or modify +@ it under the terms of the GNU General Public License as published by +@ the Free Software Foundation, either version 3 of the License, or +@ (at your option) any later version. @ -@ This is part of Luma3DS, see LICENSE.txt for details +@ This program is distributed in the hope that it will be useful, +@ but WITHOUT ANY WARRANTY; without even the implied warranty of +@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +@ GNU General Public License for more details. @ +@ You should have received a copy of the GNU General Public License +@ along with this program. If not, see . +@ +@ Additional Terms 7.b of GPLv3 applies to this file: Requiring preservation of specified +@ reasonable legal notices or author attributions in that material or in the Appropriate Legal +@ Notices displayed by works containing it. .macro GEN_HANDLER name .global \name diff --git a/exceptions/arm11/source/mainHandler.c b/exceptions/arm11/source/mainHandler.c index 8e163b6..6310163 100644 --- a/exceptions/arm11/source/mainHandler.c +++ b/exceptions/arm11/source/mainHandler.c @@ -1,8 +1,23 @@ /* -* mainHandler.c -* by TuxSH +* This file is part of Luma3DS +* Copyright (C) 2016 Aurora Wright, TuxSH * -* This is part of Luma3DS, see LICENSE.txt for details +* This program is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program. If not, see . +* +* Additional Terms 7.b of GPLv3 applies to this file: Requiring preservation of specified +* reasonable legal notices or author attributions in that material or in the Appropriate Legal +* Notices displayed by works containing it. */ #include "handlers.h" diff --git a/exceptions/arm11/source/start.s b/exceptions/arm11/source/start.s index aca435e..b4dfe81 100644 --- a/exceptions/arm11/source/start.s +++ b/exceptions/arm11/source/start.s @@ -1,3 +1,23 @@ +@ This file is part of Luma3DS +@ Copyright (C) 2016 Aurora Wright, TuxSH +@ +@ This program is free software: you can redistribute it and/or modify +@ it under the terms of the GNU General Public License as published by +@ the Free Software Foundation, either version 3 of the License, or +@ (at your option) any later version. +@ +@ This program is distributed in the hope that it will be useful, +@ but WITHOUT ANY WARRANTY; without even the implied warranty of +@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +@ GNU General Public License for more details. +@ +@ You should have received a copy of the GNU General Public License +@ along with this program. If not, see . +@ +@ Additional Terms 7.b of GPLv3 applies to this file: Requiring preservation of specified +@ reasonable legal notices or author attributions in that material or in the Appropriate Legal +@ Notices displayed by works containing it. + .section .text.start .align 4 .global _start diff --git a/exceptions/arm11/source/types.h b/exceptions/arm11/source/types.h index d27412b..a9aecb8 100644 --- a/exceptions/arm11/source/types.h +++ b/exceptions/arm11/source/types.h @@ -1,6 +1,29 @@ +/* +* This file is part of Luma3DS +* Copyright (C) 2016 Aurora Wright, TuxSH +* +* This program is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program. If not, see . +* +* Additional Terms 7.b of GPLv3 applies to this file: Requiring preservation of specified +* reasonable legal notices or author attributions in that material or in the Appropriate Legal +* Notices displayed by works containing it. +*/ + #pragma once #include +#define NULL 0 //Common data types typedef uint8_t u8; diff --git a/exceptions/arm9/source/handlers.h b/exceptions/arm9/source/handlers.h index f014c3c..075c495 100644 --- a/exceptions/arm9/source/handlers.h +++ b/exceptions/arm9/source/handlers.h @@ -1,8 +1,23 @@ /* -* handlers.h -* by TuxSH +* This file is part of Luma3DS +* Copyright (C) 2016 Aurora Wright, TuxSH * -* This is part of Luma3DS, see LICENSE.txt for details +* This program is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program. If not, see . +* +* Additional Terms 7.b of GPLv3 applies to this file: Requiring preservation of specified +* reasonable legal notices or author attributions in that material or in the Appropriate Legal +* Notices displayed by works containing it. */ #pragma once diff --git a/exceptions/arm9/source/handlers.s b/exceptions/arm9/source/handlers.s index 624afff..979756a 100644 --- a/exceptions/arm9/source/handlers.s +++ b/exceptions/arm9/source/handlers.s @@ -1,9 +1,22 @@ +@ This file is part of Luma3DS +@ Copyright (C) 2016 Aurora Wright, TuxSH @ -@ handlers.s -@ by TuxSH +@ This program is free software: you can redistribute it and/or modify +@ it under the terms of the GNU General Public License as published by +@ the Free Software Foundation, either version 3 of the License, or +@ (at your option) any later version. @ -@ This is part of Luma3DS, see LICENSE.txt for details +@ This program is distributed in the hope that it will be useful, +@ but WITHOUT ANY WARRANTY; without even the implied warranty of +@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +@ GNU General Public License for more details. @ +@ You should have received a copy of the GNU General Public License +@ along with this program. If not, see . +@ +@ Additional Terms 7.b of GPLv3 applies to this file: Requiring preservation of specified +@ reasonable legal notices or author attributions in that material or in the Appropriate Legal +@ Notices displayed by works containing it. .macro GEN_HANDLER name .global \name diff --git a/exceptions/arm9/source/i2c.c b/exceptions/arm9/source/i2c.c index 5f89d0a..e752380 100644 --- a/exceptions/arm9/source/i2c.c +++ b/exceptions/arm9/source/i2c.c @@ -1,3 +1,29 @@ +/* +* This file is part of Luma3DS +* Copyright (C) 2016 Aurora Wright, TuxSH +* +* This program is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program. If not, see . +* +* Additional Terms 7.b of GPLv3 applies to this file: Requiring preservation of specified +* reasonable legal notices or author attributions in that material or in the Appropriate Legal +* Notices displayed by works containing it. +*/ + +/* +* Thanks to the everyone who contributed in the development of this file +*/ + #include "i2c.h" //----------------------------------------------------------------------------- diff --git a/exceptions/arm9/source/i2c.h b/exceptions/arm9/source/i2c.h index 00658ea..e0a262f 100644 --- a/exceptions/arm9/source/i2c.h +++ b/exceptions/arm9/source/i2c.h @@ -1,3 +1,29 @@ +/* +* This file is part of Luma3DS +* Copyright (C) 2016 Aurora Wright, TuxSH +* +* This program is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program. If not, see . +* +* Additional Terms 7.b of GPLv3 applies to this file: Requiring preservation of specified +* reasonable legal notices or author attributions in that material or in the Appropriate Legal +* Notices displayed by works containing it. +*/ + +/* +* Thanks to the everyone who contributed in the development of this file +*/ + #pragma once #include "types.h" diff --git a/exceptions/arm9/source/mainHandler.c b/exceptions/arm9/source/mainHandler.c index 6dd6ad5..02ffece 100644 --- a/exceptions/arm9/source/mainHandler.c +++ b/exceptions/arm9/source/mainHandler.c @@ -1,8 +1,23 @@ /* -* mainHandler.c -* by TuxSH +* This file is part of Luma3DS +* Copyright (C) 2016 Aurora Wright, TuxSH * -* This is part of Luma3DS, see LICENSE.txt for details +* This program is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program. If not, see . +* +* Additional Terms 7.b of GPLv3 applies to this file: Requiring preservation of specified +* reasonable legal notices or author attributions in that material or in the Appropriate Legal +* Notices displayed by works containing it. */ #include "i2c.h" diff --git a/exceptions/arm9/source/start.s b/exceptions/arm9/source/start.s index 0d0921f..cefe3e4 100644 --- a/exceptions/arm9/source/start.s +++ b/exceptions/arm9/source/start.s @@ -1,3 +1,23 @@ +@ This file is part of Luma3DS +@ Copyright (C) 2016 Aurora Wright, TuxSH +@ +@ This program is free software: you can redistribute it and/or modify +@ it under the terms of the GNU General Public License as published by +@ the Free Software Foundation, either version 3 of the License, or +@ (at your option) any later version. +@ +@ This program is distributed in the hope that it will be useful, +@ but WITHOUT ANY WARRANTY; without even the implied warranty of +@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +@ GNU General Public License for more details. +@ +@ You should have received a copy of the GNU General Public License +@ along with this program. If not, see . +@ +@ Additional Terms 7.b of GPLv3 applies to this file: Requiring preservation of specified +@ reasonable legal notices or author attributions in that material or in the Appropriate Legal +@ Notices displayed by works containing it. + .section .text.start .align 4 .global _start diff --git a/exceptions/arm9/source/types.h b/exceptions/arm9/source/types.h index d27412b..6a1677e 100644 --- a/exceptions/arm9/source/types.h +++ b/exceptions/arm9/source/types.h @@ -1,3 +1,25 @@ +/* +* This file is part of Luma3DS +* Copyright (C) 2016 Aurora Wright, TuxSH +* +* This program is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program. If not, see . +* +* Additional Terms 7.b of GPLv3 applies to this file: Requiring preservation of specified +* reasonable legal notices or author attributions in that material or in the Appropriate Legal +* Notices displayed by works containing it. +*/ + #pragma once #include diff --git a/exceptions/exception_dump_parser.py b/exceptions/exception_dump_parser.py index e5a42bc..ddc1129 100644 --- a/exceptions/exception_dump_parser.py +++ b/exceptions/exception_dump_parser.py @@ -1,7 +1,25 @@ #!/usr/bin/env python # Requires Python >= 3.2 or >= 2.7 -# This is part of Luma3DS, see LICENSE.txt for details +# This file is part of Luma3DS +# Copyright (C) 2016 Aurora Wright, TuxSH +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +# Additional Terms 7.b of GPLv3 applies to this file: Requiring preservation of specified +# reasonable legal notices or author attributions in that material or in the Appropriate Legal +# Notices displayed by works containing it. __author__ = "TuxSH" __copyright__ = "Copyright (c) 2016 TuxSH" diff --git a/source/exceptions.c b/source/exceptions.c index df0d2f8..b1485c1 100644 --- a/source/exceptions.c +++ b/source/exceptions.c @@ -1,6 +1,23 @@ /* -* exceptions.c -* by TuxSH +* This file is part of Luma3DS +* Copyright (C) 2016 Aurora Wright, TuxSH +* +* This program is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program. If not, see . +* +* Additional Terms 7.b of GPLv3 applies to this file: Requiring preservation of specified +* reasonable legal notices or author attributions in that material or in the Appropriate Legal +* Notices displayed by works containing it. */ #include "exceptions.h" @@ -132,7 +149,7 @@ void detectAndProcessExceptionDumps(void) findDumpFile(path11, fileName); path11[17] = '/'; memcpy(&path11[18], fileName, sizeof(fileName)); - fileWrite((void *)dump, path11, dump[5]); + fileWrite((void *)dump, path11, size); } char arm11Str[] = "Processor: ARM11 (core X)"; diff --git a/source/exceptions.h b/source/exceptions.h index d48408a..5574cb1 100644 --- a/source/exceptions.h +++ b/source/exceptions.h @@ -1,6 +1,23 @@ /* -* exceptions.h -* by TuxSH +* This file is part of Luma3DS +* Copyright (C) 2016 Aurora Wright, TuxSH +* +* This program is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program. If not, see . +* +* Additional Terms 7.b of GPLv3 applies to this file: Requiring preservation of specified +* reasonable legal notices or author attributions in that material or in the Appropriate Legal +* Notices displayed by works containing it. */ #pragma once