From 32c4902b81db150bd7ddf956d86ca5cf44cee8a0 Mon Sep 17 00:00:00 2001 From: Gwenhael Le Moine Date: Wed, 23 Oct 2024 14:53:34 +0200 Subject: [PATCH] clean unused includes --- dist/x49gpng.man.in | 6 ++++++ src/flash.c | 1 - src/gdbstub.c | 1 - src/hex2bin.c | 1 - src/le32hex2bin.c | 1 - src/s3c2410.c | 6 ------ src/s3c2410.h | 2 ++ src/s3c2410_intc.c | 2 -- src/s3c2410_io_port.c | 1 - src/s3c2410_sram.c | 1 - src/sram.c | 41 +++++++++++++++++------------------------ src/timer.c | 1 - src/ui.c | 1 - 13 files changed, 25 insertions(+), 40 deletions(-) diff --git a/dist/x49gpng.man.in b/dist/x49gpng.man.in index 40e0460..d5e1828 100644 --- a/dist/x49gpng.man.in +++ b/dist/x49gpng.man.in @@ -166,6 +166,7 @@ will ask for one through a file selection dialog window like on the first launch for safety reasons: the firmware may have changed, so the code at the location where .Nm was stopped previously could be entirely different from the code at that location afterwards; a reboot ensures an orderly reinitialization of the operating system. + .It Fl F , Fl Fl reflash-full Same as .Fl f , @@ -196,6 +197,7 @@ as the configuration file instead of the default one. See below for details on t .El .Sh FILES .Bl -tag -width indent + .It Sy ~/.config/ Ns Nm Ns Sy /config The default location for the configuration file. The file format is the INI-like .Dq key-file @@ -213,12 +215,16 @@ in the sections which allow changing the filename of the files where the state of the respective memory is held. These can be absolute paths, or paths relative to the location of the configuration file (in the simplest case, only a filename). Any files that do not exist will be created with appropriate size and placeholder content. For .Em s3c2410-sdi , the empty string is accepted as a special value for no inserted SD card. + .It Sy flash The default name of the file backing the flash memory; required size: 2 MiB. If this file does not exist or is too small, the calculator type's appropriate bootloader will be copied into the first 16 KiB. Do NOT simply put a firmware file here, it will not work. Just use the builtin firmware installation mechanism instead. + .It Sy sram The default name of the file backing the SRAM memory; required size: 512 KiB. + .It Sy s3c2410-sram The default name of the file backing the S3C2410's internal SRAM memory; required size: 4 KiB. + .El .Sh CAVEATS The emulation of the calculators' hardware is not fully accurate. Most notably, emulation speed is not authentic (it depends on the host's capabilites), and communication ports (serial, infrared, USB) are not available. For most purposes this is good enough, though. diff --git a/src/flash.c b/src/flash.c index ab8d850..0573a7d 100644 --- a/src/flash.c +++ b/src/flash.c @@ -17,7 +17,6 @@ #include "x49gp.h" #include "x49gp_ui.h" -#include "byteorder.h" #define FLASH_STATE_NORMAL 0 diff --git a/src/gdbstub.c b/src/gdbstub.c index cfa9d59..7849057 100644 --- a/src/gdbstub.c +++ b/src/gdbstub.c @@ -29,7 +29,6 @@ #include #include -#include "x49gp.h" #include "gdbstub.h" #define MAX_PACKET_LENGTH 4096 diff --git a/src/hex2bin.c b/src/hex2bin.c index d0b18a6..a04a68c 100644 --- a/src/hex2bin.c +++ b/src/hex2bin.c @@ -23,7 +23,6 @@ #include #include #include -#include #include int main( int argc, char** argv ) diff --git a/src/le32hex2bin.c b/src/le32hex2bin.c index fded384..82065ea 100644 --- a/src/le32hex2bin.c +++ b/src/le32hex2bin.c @@ -23,7 +23,6 @@ #include #include #include -#include #include int main( int argc, char** argv ) diff --git a/src/s3c2410.c b/src/s3c2410.c index 22ac59e..5e6e2fb 100644 --- a/src/s3c2410.c +++ b/src/s3c2410.c @@ -2,15 +2,9 @@ */ #include -#include -#include -#include #include -#include #include -#include -#include "x49gp.h" #include "s3c2410.h" /* diff --git a/src/s3c2410.h b/src/s3c2410.h index bccbe36..21992c0 100644 --- a/src/s3c2410.h +++ b/src/s3c2410.h @@ -4,6 +4,8 @@ #ifndef _X49GP_S3C2410_H #define _X49GP_S3C2410_H 1 +#include + #include "x49gp_types.h" typedef struct { diff --git a/src/s3c2410_intc.c b/src/s3c2410_intc.c index c29b3f9..0d00e36 100644 --- a/src/s3c2410_intc.c +++ b/src/s3c2410_intc.c @@ -10,8 +10,6 @@ #include "x49gp.h" #include "s3c2410.h" #include "s3c2410_intc.h" -#include "s3c2410_power.h" -#include "byteorder.h" extern int do_trace; diff --git a/src/s3c2410_io_port.c b/src/s3c2410_io_port.c index 1904b05..73a0575 100644 --- a/src/s3c2410_io_port.c +++ b/src/s3c2410_io_port.c @@ -10,7 +10,6 @@ #include "x49gp.h" #include "s3c2410.h" #include "s3c2410_intc.h" -#include "byteorder.h" typedef struct { uint32_t gpacon; diff --git a/src/s3c2410_sram.c b/src/s3c2410_sram.c index 5e4cec7..e656b8f 100644 --- a/src/s3c2410_sram.c +++ b/src/s3c2410_sram.c @@ -11,7 +11,6 @@ #include "x49gp.h" #include "s3c2410.h" -#include "byteorder.h" typedef struct { void* data; diff --git a/src/sram.c b/src/sram.c index 2f2c7f5..117730a 100644 --- a/src/sram.c +++ b/src/sram.c @@ -12,9 +12,6 @@ #include #include "x49gp.h" -#include "byteorder.h" - -#include "saturn.h" typedef struct { void* data; @@ -375,25 +372,21 @@ static uint32_t sram_get_word( void* opaque, target_phys_addr_t offset ) data = ldl_p( sram->data + offset ); # if 0 - if (offset == 0x00000a1c) { - printf("read SRAM at offset %08x: %08x (pc %08x)\n", offset, data, x49gp->arm->Reg[15]); - } + if (offset == 0x00000a1c) + printf("read SRAM at offset %08x: %08x (pc %08x)\n", offset, data, x49gp->arm->Reg[15]); # endif # ifdef DEBUG_X49GP_SYSRAM_READ - if ( ( offset & ~( 0x0001ffff ) ) == 0x00000000 ) { + if ( ( offset & ~( 0x0001ffff ) ) == 0x00000000 ) printf( "read SRAM 4 at offset %08x: %08x\n", offset, data ); - } # endif # ifdef DEBUG_X49GP_ERAM_READ - if ( ( offset & ~( 0x0001ffff ) ) == 0x00020000 ) { + if ( ( offset & ~( 0x0001ffff ) ) == 0x00020000 ) printf( "read SRAM 4 at offset %08x: %08x\n", offset, data ); - } # endif # ifdef DEBUG_X49GP_IRAM_READ - if ( ( offset & ~( 0x0003ffff ) ) == 0x00040000 ) { + if ( ( offset & ~( 0x0003ffff ) ) == 0x00040000 ) printf( "read SRAM 4 at offset %08x: %08x\n", offset, data ); - } # endif return data; @@ -462,18 +455,18 @@ static void sram_put_word( void* opaque, target_phys_addr_t offset, uint32_t dat debug_saturn( sram->x49gp, sram ); # if 0 - if (offset == 0x3340 + SATURN(D1)) { - printf("write D1 at offset %08x: %08x (pc %08x)\n", - offset, data, sram->x49gp->env->regs[15]); - } - if (offset == 0x3340 + SATURN(A)) { - printf("write A at offset %08x: %08x (pc %08x)\n", - offset, data, sram->x49gp->env->regs[15]); - } - if (offset == 0x3340 + SATURN(A) + 8) { - printf("write Al at offset %08x: %08x (pc %08x)\n", - offset, data, sram->x49gp->env->regs[15]); - } + if (offset == 0x3340 + SATURN(D1)) { + printf("write D1 at offset %08x: %08x (pc %08x)\n", + offset, data, sram->x49gp->env->regs[15]); + } + if (offset == 0x3340 + SATURN(A)) { + printf("write A at offset %08x: %08x (pc %08x)\n", + offset, data, sram->x49gp->env->regs[15]); + } + if (offset == 0x3340 + SATURN(A) + 8) { + printf("write Al at offset %08x: %08x (pc %08x)\n", + offset, data, sram->x49gp->env->regs[15]); + } # endif # ifdef DEBUG_X49GP_SYSRAM_WRITE diff --git a/src/timer.c b/src/timer.c index d95929a..08c9b53 100644 --- a/src/timer.c +++ b/src/timer.c @@ -11,7 +11,6 @@ #include #include #include -#include #include #include diff --git a/src/ui.c b/src/ui.c index 75c4755..4a70da9 100644 --- a/src/ui.c +++ b/src/ui.c @@ -8,7 +8,6 @@ #include #include #include -#include #include #include #include