[Oberon] Oberon System emulator for Windows

Paul Reed paulreed at paddedcell.com
Fri Feb 14 05:49:27 CET 2020

Hi Michael, Wojtek,

Thank you very much for your comments.

Using the same convention, I've built standard 64-bit windowed and 
with console exe versions of the emulator using MSYS2, and put them on
projectoberon.com as an extra zip to the original RISCW32 zip download.

I modified my makefile to make both versions, adding the -mconsole 
option for the console version.

I also added the volatile keyword to the screen colours in sdl-main.c so 
once built the exes can be edited with a hex editor.  I include the 
readme (with the current offsets) and the git diff below for 

I think the old 32-bit exe/dll pair is worth keeping around as I'm 
pretty sure
I've tested it long ago on Windows Insecure (aka XP).


64-bit exe files supplement for RISCW32
paulreed at paddedcell.com, 14.2.2020

riscw.exe is a 64-bit Windows MSYS2 compilation of oberon-risc-emu
risc.exe is a 64-bit Windows console MSYS2 compilation of 
SDL2.dll is a 64-bit version of the Simple DirectMedia Layer library.

If you wish to use these with RISCW32, you may wish to create a 32-bit
sub-folder and save the old 32-bit risc.exe and SDL2.dll in it.

Use risc.exe if you are not running under MSYS2 and you wish to see 
output, such as usage, LEDs, asserts etc.

Use riscw.exe if you are launching the emulator from an icon/shortcut 
you do not wish to create a console window.

The following file offsets contain RGB DWORDs for editing the screen 
    0x9FE0 (WHITE), default 0xfdf6e3
    0x9FE4 (BLACK), default 0x657b83

diff --git a/Makefile b/Makefile
index cf70b68..77c82dd 100644
--- a/Makefile
+++ b/Makefile
@@ -13,7 +13,12 @@ RISC_SOURCE = \
         src/raw-serial.c src/raw-serial.h \
         src/sdl-clipboard.c src/sdl-clipboard.h

+all: risc riscw
  risc: $(RISC_SOURCE)
+       $(CC) -o $@ $(filter %.c, $^) $(RISC_CFLAGS) -mconsole
+riscw: $(RISC_SOURCE)
         $(CC) -o $@ $(filter %.c, $^) $(RISC_CFLAGS)

  # Assumes SDL2 framework download, following README instructions for 
@@ -22,4 +27,4 @@ osx: $(RISC_SOURCE)
                 -I  /Library/Frameworks/SDL2.framework/Headers/

-       rm -f risc
+       rm -f risc riscw
diff --git a/src/sdl-main.c b/src/sdl-main.c
index b82b291..f6cf5df 100644
--- a/src/sdl-main.c
+++ b/src/sdl-main.c
@@ -18,7 +18,7 @@
  #define CPU_HZ 25000000
  #define FPS 60

-static uint32_t BLACK = 0x657b83, WHITE = 0xfdf6e3;
+static volatile uint32_t BLACK = 0x657b83, WHITE = 0xfdf6e3;
  //static uint32_t BLACK = 0x000000, WHITE = 0xFFFFFF;
  //static uint32_t BLACK = 0x0000FF, WHITE = 0xFFFF00;

More information about the Oberon mailing list