From 7d328a921408ab654e991fcbcce66fe54b53630c Mon Sep 17 00:00:00 2001 From: Gwenhael Le Moine Date: Wed, 20 Mar 2024 16:25:41 +0100 Subject: [PATCH] move code into src/; update scripts --- .gitignore | 10 +++++++++- Imakefile | 22 +++++++++++----------- gwh_build.sh | 4 +++- gwh_run48.sh | 15 +++++---------- gwh_run49.sh | 6 +++--- args.h => src/args.h | 0 config.h => src/config.h | 0 config_x.h => src/config_x.h | 0 cpu.c => src/cpu.c | 0 cpu.h => src/cpu.h | 0 debug.c => src/debug.c | 0 debug.h => src/debug.h | 0 dis.c => src/dis.c | 0 disk_io.c => src/disk_io.c | 0 disk_io.h => src/disk_io.h | 0 disk_io_obj.c => src/disk_io_obj.c | 0 display.c => src/display.c | 0 display.h => src/display.h | 0 emulator.c => src/emulator.c | 0 flash49.c => src/flash49.c | 0 flash49.h => src/flash49.h | 0 hdw.c => src/hdw.c | 0 hw_config.c => src/hw_config.c | 0 keyb.c => src/keyb.c | 0 keyb.h => src/keyb.h | 0 machdep.h => src/machdep.h | 0 modules.c => src/modules.c | 0 modules.h => src/modules.h | 0 monitor.c => src/monitor.c | 0 pack.c => src/pack.c | 0 romram.c => src/romram.c | 0 romram49.c => src/romram49.c | 0 saturn.c => src/saturn.c | 0 serial.c => src/serial.c | 0 serial.h => src/serial.h | 0 t48.c => src/t48.c | 0 x11.c => src/x11.c | 0 x11.h => src/x11.h | 0 x_func.c => src/x_func.c | 0 x_func.h => src/x_func.h | 0 40 files changed, 31 insertions(+), 26 deletions(-) rename args.h => src/args.h (100%) rename config.h => src/config.h (100%) rename config_x.h => src/config_x.h (100%) rename cpu.c => src/cpu.c (100%) rename cpu.h => src/cpu.h (100%) rename debug.c => src/debug.c (100%) rename debug.h => src/debug.h (100%) rename dis.c => src/dis.c (100%) rename disk_io.c => src/disk_io.c (100%) rename disk_io.h => src/disk_io.h (100%) rename disk_io_obj.c => src/disk_io_obj.c (100%) rename display.c => src/display.c (100%) rename display.h => src/display.h (100%) rename emulator.c => src/emulator.c (100%) rename flash49.c => src/flash49.c (100%) rename flash49.h => src/flash49.h (100%) rename hdw.c => src/hdw.c (100%) rename hw_config.c => src/hw_config.c (100%) rename keyb.c => src/keyb.c (100%) rename keyb.h => src/keyb.h (100%) rename machdep.h => src/machdep.h (100%) rename modules.c => src/modules.c (100%) rename modules.h => src/modules.h (100%) rename monitor.c => src/monitor.c (100%) rename pack.c => src/pack.c (100%) rename romram.c => src/romram.c (100%) rename romram49.c => src/romram49.c (100%) rename saturn.c => src/saturn.c (100%) rename serial.c => src/serial.c (100%) rename serial.h => src/serial.h (100%) rename t48.c => src/t48.c (100%) rename x11.c => src/x11.c (100%) rename x11.h => src/x11.h (100%) rename x_func.c => src/x_func.c (100%) rename x_func.h => src/x_func.h (100%) diff --git a/.gitignore b/.gitignore index edb0377..42d7213 100644 --- a/.gitignore +++ b/.gitignore @@ -13,4 +13,12 @@ /saturn.cat /stateDir.gwh_run48/ /stateDir.gwh_run49/ -/*.o +/src/*.o +/saturn.toc +/saturn.aux +/saturn.cp +/saturn.cps +/saturn.dvi +/saturn.info +/saturn.pdf +/saturn.ps diff --git a/Imakefile b/Imakefile index 2f8e576..2ff6874 100644 --- a/Imakefile +++ b/Imakefile @@ -3,9 +3,9 @@ # .identifier : $Id: Imakefile,v 4.1 2000/12/11 09:54:19 cibrario Rel $ # .context : SATURN, Saturn CPU / HP48 emulator # .title : $RCSfile: Imakefile,v $ -# .kind : Makefile +# .kind : Makefile # .author : Ivan Cibrario B. -# .site : CSTV-CNR +# .site : CSTV-CNR # .creation : * # .keywords : * # .description : @@ -93,13 +93,13 @@ PROGRAMS= saturn pack # Each row corresponds to a group of files; each group has its own # CHF module identifier and message catalog source file. # -SRCS1= debug.c \ - cpu.c dis.c emulator.c monitor.c \ - modules.c hw_config.c romram.c romram49.c hdw.c keyb.c \ - disk_io.c disk_io_obj.c \ - display.c x11.c \ - serial.c flash49.c x_func.c\ - saturn.c +SRCS1= src/debug.c \ + src/cpu.c src/dis.c src/emulator.c src/monitor.c \ + src/modules.c src/hw_config.c src/romram.c src/romram49.c src/hdw.c src/keyb.c \ + src/disk_io.c src/disk_io_obj.c \ + src/display.c src/x11.c \ + src/serial.c src/flash49.c src/x_func.c\ + src/saturn.c # # Message catalog source files for the modules defined above. @@ -116,13 +116,13 @@ MSFS= debug.msf \ # # Source/object files of secondary target # -SRCS2= pack.c +SRCS2= src/pack.c # # Automatic generation of object file list # OBJS1= $(SRCS1:.c=.o) -OBJS2= $(SRCS2:.c=.o) disk_io.o debug.o +OBJS2= $(SRCS2:.c=.o) src/disk_io.o src/debug.o # # Now, some extras... bring the Chf library in. diff --git a/gwh_build.sh b/gwh_build.sh index 0828341..d8d6600 100755 --- a/gwh_build.sh +++ b/gwh_build.sh @@ -1,7 +1,9 @@ #!/bin/bash -eu -make clean xmkmf +make clean +rm src/*.o + make depend make diff --git a/gwh_run48.sh b/gwh_run48.sh index 7dde4d9..4796ae4 100755 --- a/gwh_run48.sh +++ b/gwh_run48.sh @@ -11,17 +11,12 @@ if [ ! -e $STATEDIR/gxrom-r ]; then ) fi -RAM="-ram ram" +RAM='' if [ ! -e $STATEDIR/ram ]; then - RAM="-reset" + RAM=-reset fi -if [ ! -e $STATEDIR/port1 ]; then - dd if=/dev/zero of=$STATEDIR/port1 bs=1k count=128 -fi +[ ! -e $STATEDIR/port1 ] && dd if=/dev/zero of=$STATEDIR/port1 bs=1k count=128 +[ ! -e $STATEDIR/port2 ] && dd if=/dev/zero of=$STATEDIR/port2 bs=1k count=1024 -if [ ! -e $STATEDIR/port2 ]; then - dd if=/dev/zero of=$STATEDIR/port2 bs=1k count=1024 -fi - -./run_saturn -face hp48 -hw hp48 -stateDir $STATEDIR -rom gxrom-r "$RAM" -port1 port1 -port2 port2 +./run_saturn -face hp48 -hw hp48 -stateDir $STATEDIR -rom gxrom-r $RAM -port1 port1 -port2 port2 diff --git a/gwh_run49.sh b/gwh_run49.sh index 04ceed1..69214ea 100755 --- a/gwh_run49.sh +++ b/gwh_run49.sh @@ -12,9 +12,9 @@ if [ ! -e $STATEDIR/rom.49g ]; then ) fi -RAM="-ram ram" +RAM='' if [ ! -e $STATEDIR/ram ]; then - RAM="-reset" + RAM=-reset fi -./run_saturn -face hp49 -hw hp49 -stateDir $STATEDIR -rom rom.49g "$RAM" +./run_saturn -face hp49 -hw hp49 -stateDir $STATEDIR -rom rom.49g $RAM diff --git a/args.h b/src/args.h similarity index 100% rename from args.h rename to src/args.h diff --git a/config.h b/src/config.h similarity index 100% rename from config.h rename to src/config.h diff --git a/config_x.h b/src/config_x.h similarity index 100% rename from config_x.h rename to src/config_x.h diff --git a/cpu.c b/src/cpu.c similarity index 100% rename from cpu.c rename to src/cpu.c diff --git a/cpu.h b/src/cpu.h similarity index 100% rename from cpu.h rename to src/cpu.h diff --git a/debug.c b/src/debug.c similarity index 100% rename from debug.c rename to src/debug.c diff --git a/debug.h b/src/debug.h similarity index 100% rename from debug.h rename to src/debug.h diff --git a/dis.c b/src/dis.c similarity index 100% rename from dis.c rename to src/dis.c diff --git a/disk_io.c b/src/disk_io.c similarity index 100% rename from disk_io.c rename to src/disk_io.c diff --git a/disk_io.h b/src/disk_io.h similarity index 100% rename from disk_io.h rename to src/disk_io.h diff --git a/disk_io_obj.c b/src/disk_io_obj.c similarity index 100% rename from disk_io_obj.c rename to src/disk_io_obj.c diff --git a/display.c b/src/display.c similarity index 100% rename from display.c rename to src/display.c diff --git a/display.h b/src/display.h similarity index 100% rename from display.h rename to src/display.h diff --git a/emulator.c b/src/emulator.c similarity index 100% rename from emulator.c rename to src/emulator.c diff --git a/flash49.c b/src/flash49.c similarity index 100% rename from flash49.c rename to src/flash49.c diff --git a/flash49.h b/src/flash49.h similarity index 100% rename from flash49.h rename to src/flash49.h diff --git a/hdw.c b/src/hdw.c similarity index 100% rename from hdw.c rename to src/hdw.c diff --git a/hw_config.c b/src/hw_config.c similarity index 100% rename from hw_config.c rename to src/hw_config.c diff --git a/keyb.c b/src/keyb.c similarity index 100% rename from keyb.c rename to src/keyb.c diff --git a/keyb.h b/src/keyb.h similarity index 100% rename from keyb.h rename to src/keyb.h diff --git a/machdep.h b/src/machdep.h similarity index 100% rename from machdep.h rename to src/machdep.h diff --git a/modules.c b/src/modules.c similarity index 100% rename from modules.c rename to src/modules.c diff --git a/modules.h b/src/modules.h similarity index 100% rename from modules.h rename to src/modules.h diff --git a/monitor.c b/src/monitor.c similarity index 100% rename from monitor.c rename to src/monitor.c diff --git a/pack.c b/src/pack.c similarity index 100% rename from pack.c rename to src/pack.c diff --git a/romram.c b/src/romram.c similarity index 100% rename from romram.c rename to src/romram.c diff --git a/romram49.c b/src/romram49.c similarity index 100% rename from romram49.c rename to src/romram49.c diff --git a/saturn.c b/src/saturn.c similarity index 100% rename from saturn.c rename to src/saturn.c diff --git a/serial.c b/src/serial.c similarity index 100% rename from serial.c rename to src/serial.c diff --git a/serial.h b/src/serial.h similarity index 100% rename from serial.h rename to src/serial.h diff --git a/t48.c b/src/t48.c similarity index 100% rename from t48.c rename to src/t48.c diff --git a/x11.c b/src/x11.c similarity index 100% rename from x11.c rename to src/x11.c diff --git a/x11.h b/src/x11.h similarity index 100% rename from x11.h rename to src/x11.h diff --git a/x_func.c b/src/x_func.c similarity index 100% rename from x_func.c rename to src/x_func.c diff --git a/x_func.h b/src/x_func.h similarity index 100% rename from x_func.h rename to src/x_func.h