From efe842012a876d746a013e58988003f530422686 Mon Sep 17 00:00:00 2001 From: Ralph Moeritz <426109+rmoritz@users.noreply.github.com> Date: Sat, 16 Dec 2023 16:59:24 +1030 Subject: [PATCH 1/3] Add Krusader ROM & make ROM user configurable --- .gitignore | 12 +++++-- AUTHORS | 2 +- ChangeLog | 4 +++ Makefile.am | 2 +- README | 34 ------------------- README.md | 35 +++++++++++++++++++ src/configuration.c | 8 +++++ src/keyboard.c | 5 +++ src/main.c | 5 ++- src/memory.c | 76 ++++++++++++++++++++++++++++++++---------- src/memory.h | 2 ++ src/pom1.in | 5 ++- src/roms/Makefile.am | 3 +- src/roms/krusader.rom | Bin 0 -> 8192 bytes 14 files changed, 134 insertions(+), 59 deletions(-) delete mode 100644 README create mode 100644 README.md create mode 100644 src/roms/krusader.rom diff --git a/.gitignore b/.gitignore index 70d19ef..28de099 100644 --- a/.gitignore +++ b/.gitignore @@ -1,13 +1,19 @@ +*~ +INSTALL +Makefile +Makefile.in aclocal.m4 +autom4te.cache +compile +config.guess config.h config.h.in config.log config.status +config.sub configure depcomp -INSTALL install-sh -Makefile -Makefile.in +ltmain.sh missing stamp-h1 diff --git a/AUTHORS b/AUTHORS index 9733d9d..f900d2f 100644 --- a/AUTHORS +++ b/AUTHORS @@ -1,3 +1,3 @@ John D. Corrado Verhille Arnaud - +Ralph Moeritz diff --git a/ChangeLog b/ChangeLog index 75f1bc6..72780ed 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2023-12-17 Ralph Moeritz + + * Added -krusaderRom option (Ctrl+K) to switch between Krusader and BASIC/Monitor ROMs. + Sat Mar 03 12:21:45 EST 2012 jdcorrado v1.0.0 diff --git a/Makefile.am b/Makefile.am index 894919b..fecc093 100644 --- a/Makefile.am +++ b/Makefile.am @@ -2,7 +2,7 @@ DOC_FILES = \ AUTHORS \ ChangeLog \ NEWS \ - README + README.md EXTRA_DIST = $(DOC_FILES) diff --git a/README b/README deleted file mode 100644 index 4d5e264..0000000 --- a/README +++ /dev/null @@ -1,34 +0,0 @@ -Pom1 is an Apple 1 emulator being ported to C from the original Java -version. It uses the Simple DirectMedia Layer library and works on most -platforms. - -== Options == - -Pom1 has many options to configure and utilize the emulator. They are -accessed by Ctrl+. Some options also have corresponding command -line parameters. - -Option Letter Parameter Description --------------------------------------------------------------------------------------------- -Load Memory L Load memory from a binary or ascii file. -Save Memory S Save memory to a binary or ascii file. -Quit Q Quit the emulator. -Reset R Soft reset the emulator. -Hard Reset H Hard reset the emulator. -Pixel Size P -pixelsize Set the pixel size (1 or 2). -Scanlines N -scanlines Turn scanlines on or off (pixel size 2 only). -Terminal Speed T -terminalspeed Set the terminal speed (Range: 1 - 120). -RAM 8K E -ram8k Use only 8KB of RAM or entire 64KB of RAM. -Write In ROM W -writeinrom Allow writing data in ROM or not. -IRQ/BRK Vector V Set address of interrupt vector. -Fullscreen F -fullscreen Switch to fullscreen or window. -Blink Cursor B -blinkcursor Set the cursor to blink or not. -Cursor Block C -blockcursor Set the cursor to block or @. -Show About A Show version and copyright information. - -== Other information == - - * You can find more information about the project at the Pom1 website: - - http://pom1.sourceforge.net/ - diff --git a/README.md b/README.md new file mode 100644 index 0000000..02a8f4b --- /dev/null +++ b/README.md @@ -0,0 +1,35 @@ +Pom1 is an Apple 1 emulator ported to C from the original Java +version. It uses the SDL1 library and works on most platforms. + +Options +=== + +Pom1 has many options to configure and utilize the emulator. They are +accessed by Ctrl+. Some options also have corresponding +command line parameters. + +| Option | Letter | Parameter | Description | +|---------------------|--------|--------------------|------------------------------------------------| +| Load Memory | L | | Load memory from a binary or ascii file. | +| Save Memory | S | | Save memory to a binary or ascii file. | +| Quit | Q | | Quit the emulator. | +| Reset | R | | Soft reset the emulator. | +| Hard Reset | H | | Hard reset the emulator. | +| Pixel Size | P | -pixelsize | Set the pixel size (1 or 2). | +| Scanlines | N | -scanlines | Turn scanlines on or off (pixel size 2 only). | +| Terminal Speed | T | -terminalspeed | Set the terminal speed (Range: 1 - 120). | +| RAM 8K | E | -ram8k | Use only 8KB of RAM or entire 64KB of RAM. | +| Write In ROM | W | -writeinrom | Allow writing data in ROM or not. | +| IRQ/BRK Vector | V | | Set address of interrupt vector. | +| Fullscreen | F | -fullscreen | Switch to fullscreen or window. | +| Blink Cursor | B | -blinkcursor | Set the cursor to blink or not. | +| Cursor Block | C | -blockcursor | Set the cursor to block or @. | +| Show About | A | | Show version and copyright information. | +| Toggle Krusader ROM | K | -krusaderRom | Toggle between Krusader and BASIC/Monitor ROMs | + +Before exiting, Pom1 writes its configuration options to `$HOME/.pom1/pom1.cfg` + +Other information +=== + +- You can find more information about the project at the Pom1 website: http://pom1.sourceforge.net/ diff --git a/src/configuration.c b/src/configuration.c index 374b9fc..39ec5d0 100644 --- a/src/configuration.c +++ b/src/configuration.c @@ -98,6 +98,8 @@ void loadConfiguration(void) setBlinkCursor(value[0] & 0x01); else if (!strcmp(buffer, "blockCursor")) setBlockCursor(value[0] & 0x01); + else if (!strcmp(buffer, "krusaderRom")) + setKrusaderRom((value[0] & 0x01)); } fclose(fp); @@ -181,6 +183,12 @@ void saveConfiguration(void) buffer[14] = '\0'; fputs(buffer, fp); + strcpy(buffer, "krusaderRom="); + buffer[12] = getKrusaderRom() | 0x30; + buffer[13] = '\n'; + buffer[14] = '\0'; + fputs(buffer, fp); + fclose(fp); } } diff --git a/src/keyboard.c b/src/keyboard.c index 33afff2..bab4052 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -192,6 +192,11 @@ int handleInput(void) showAbout(); return 1; } + else if (event.key.keysym.sym == SDLK_k) { + setKrusaderRom(!getKrusaderRom()); + printf("stdout: krusaderRom=%d\n", getKrusaderRom()); + return 1; + } } if (readKbdCr() == 0x27 && !_fp && event.type == SDL_KEYDOWN && !(event.key.keysym.unicode & 0xFF80) && event.key.keysym.unicode) diff --git a/src/main.c b/src/main.c index 88c5297..8507af1 100644 --- a/src/main.c +++ b/src/main.c @@ -62,9 +62,10 @@ int main(int argc, char *argv[]) setPixelSize(temp); } } - else if (!strcasecmp("-scanlines", argv[i])) + else if (!strcasecmp("-scanlines", argv[i])) { if (getPixelSize() > 1) setScanlines(1); + } else if (!strcasecmp("-terminalspeed", argv[i]) && i + 1 < argc) { temp = atoi(argv[i + 1]); @@ -82,6 +83,8 @@ int main(int argc, char *argv[]) setBlinkCursor(1); else if (!strcasecmp("-blockcursor", argv[i])) setBlockCursor(1); + else if (!strcasecmp("-krusaderrom", argv[i])) + setKrusaderRom(1); } } diff --git a/src/memory.c b/src/memory.c index dce1faa..3aee936 100644 --- a/src/memory.c +++ b/src/memory.c @@ -21,9 +21,12 @@ #include #include "configuration.h" #include "pia6820.h" +#include "memory.h" -static unsigned char mem[65536]; -static int ram8k = 0, writeInRom = 1; +static unsigned char mem[0x10000]; // 64K +static int ram8k = 0; +static int writeInRom = 1; +static int krusaderRom = 0; static int loadMonitor(void) { @@ -40,7 +43,7 @@ static int loadMonitor(void) if (fp) { - fread(&mem[0xFF00], 1, 256, fp); + fread(&mem[0xFF00], 1, 0x100, fp); fclose(fp); } else @@ -64,7 +67,7 @@ static int loadBasic(void) if (fp) { - fread(&mem[0xE000], 1, 4096, fp); + fread(&mem[0xE000], 1, 0x1000, fp); fclose(fp); } else @@ -73,22 +76,61 @@ static int loadBasic(void) return 1; } +static int loadKrusader() { + const char *romdir = getRomDirectory(); + char *filename; + FILE *fp; + + filename = (char *)malloc(strlen(romdir) + 14); + sprintf(filename, "%s/krusader.rom", romdir); + + fp = fopen(filename, "rb"); + + free(filename); + + if (fp) { + fread(&mem[0xE000], 1, 0x2000, fp); + fclose(fp); + } + else { + return 0; + } + + return 1; +} + +static void loadRoms() { + if (krusaderRom) { + if (!loadKrusader()) { + fprintf(stderr, "stderr: Could not load krusader\n"); + exit(1); + } + } + else { + if (!loadMonitor()) { + fprintf(stderr, "stderr: Could not load monitor\n"); + exit(1); + } + + if (!loadBasic()) { + fprintf(stderr, "stderr: Could not load basic\n"); + exit(1); + } + } +} + +int getKrusaderRom() { + return krusaderRom; +} + +void setKrusaderRom(int b) { + krusaderRom = b; +} void resetMemory(void) { - memset(mem, 0, 57344); - - if (!loadMonitor()) - { - fprintf(stderr, "stderr: Could not load monitor\n"); - exit(1); - } - - if (!loadBasic()) - { - fprintf(stderr, "stderr: Could not load basic\n"); - exit(1); - } + memset(mem, 0, 0xE000); + loadRoms(); } void setRam8k(int b) diff --git a/src/memory.h b/src/memory.h index 50aed7f..7931685 100644 --- a/src/memory.h +++ b/src/memory.h @@ -19,6 +19,8 @@ #ifndef __MEMORY_H__ #define __MEMORY_H__ +int getKrusaderRom(); +void setKrusaderRom(int b); void resetMemory(void); void setRam8k(int b); int getRam8k(void); diff --git a/src/pom1.in b/src/pom1.in index 4b1059f..2428c95 100644 --- a/src/pom1.in +++ b/src/pom1.in @@ -2,4 +2,7 @@ export POM1ROMDIR="@prefix@/share/@PACKAGE@/roms" -pom1-@PACKAGE_VERSION@ $@ +SCRIPT=$(readlink -f "$0") +SCRIPTDIR=$(dirname "$SCRIPT") + +$SCRIPTDIR/pom1-@PACKAGE_VERSION@ $@ diff --git a/src/roms/Makefile.am b/src/roms/Makefile.am index 121f2c0..e7d705a 100644 --- a/src/roms/Makefile.am +++ b/src/roms/Makefile.am @@ -1,7 +1,8 @@ ROMFILES = \ basic.rom \ charmap.rom \ - monitor.rom + monitor.rom \ + krusader.rom romdir = $(prefix)/share/@PACKAGE@/roms rom_DATA = $(ROMFILES) diff --git a/src/roms/krusader.rom b/src/roms/krusader.rom new file mode 100644 index 0000000000000000000000000000000000000000..78df339d509cd72bd8c5d78bab2413746871543e GIT binary patch literal 8192 zcmY*;3w%>Wy7ysZMU5gdNPz}Wauu|z(t`2`5NMzUitJvG>mup>yX)$`tG(X+ z3t}dlTjBoGyJY_@E9)V4vQ6cYVB=bUmMz-WoB+x2h5~L{@@m0$+LF?D?stM-cTby{ zGvCa7-^}-(IRaCuDdL-2BR)#oTf4!+oM!WLDIt3c)g${MSwg`tc?*NEG<2lRE`3Vd~YP~YN@oOItH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D68H$`%U4rSJy{5e{XpO1!G=25wZ&zo;lll=GKI)omL&NVDczLv-7=E8w@ zu6?$B7M#cFJ+K-wTXHRV(ypG7mKmBjC^aneNnUF{nH|x(TcdeY9-U3{wCU Date: Sun, 17 Dec 2023 11:02:29 +1030 Subject: [PATCH 2/3] Add instructions for building --- .gitignore | 1 + README.md | 22 ++++++++++++++++++++-- configure.ac | 1 + 3 files changed, 22 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 28de099..a15654a 100644 --- a/.gitignore +++ b/.gitignore @@ -15,5 +15,6 @@ configure depcomp install-sh ltmain.sh +m4 missing stamp-h1 diff --git a/README.md b/README.md index 02a8f4b..21becf8 100644 --- a/README.md +++ b/README.md @@ -27,9 +27,27 @@ command line parameters. | Show About | A | | Show version and copyright information. | | Toggle Krusader ROM | K | -krusaderRom | Toggle between Krusader and BASIC/Monitor ROMs | -Before exiting, Pom1 writes its configuration options to `$HOME/.pom1/pom1.cfg` +Before exiting, Pom1 writes its configuration options to +`$HOME/.pom1/pom1.cfg`; you can modify options directly in this file as well. + +Building +=== + +Generate the `configure` script: + + $ libtoolize --force + $ aclocal + $ autoheader + $ automake --force-missing --add-missing + $ autoconf + +After that's it's just the usual: + + $ ./configure + $ make + $ make install Other information === -- You can find more information about the project at the Pom1 website: http://pom1.sourceforge.net/ +You can find more information about the project at the Pom1 website: http://pom1.sourceforge.net/ diff --git a/configure.ac b/configure.ac index e747a52..5a7de76 100644 --- a/configure.ac +++ b/configure.ac @@ -1,5 +1,6 @@ AC_PREREQ([2.68]) AC_INIT([Pom1 Apple 1 Emulator], [1.0.0], [jdcorrado@gmail.com], [pom1]) +AC_CONFIG_MACRO_DIR([m4]) AC_CONFIG_SRCDIR([src/main.c]) AC_CONFIG_HEADERS([config.h]) From fc2f8ab57b1e00544c83f5adf640a3c0fda7e82d Mon Sep 17 00:00:00 2001 From: Ralph Moeritz <426109+rmoritz@users.noreply.github.com> Date: Sun, 17 Dec 2023 17:58:21 +1030 Subject: [PATCH 3/3] Reset all memory up to $FFFF --- src/memory.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/memory.c b/src/memory.c index 3aee936..a26c449 100644 --- a/src/memory.c +++ b/src/memory.c @@ -127,10 +127,9 @@ void setKrusaderRom(int b) { krusaderRom = b; } -void resetMemory(void) -{ - memset(mem, 0, 0xE000); - loadRoms(); +void resetMemory(void) { + memset(mem, 0, 0xFFFF); + loadRoms(); } void setRam8k(int b)