Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: neozeed/sarienPM
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0_0.2
Choose a base ref
...
head repository: neozeed/sarienPM
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: main
Choose a head ref
  • 5 commits
  • 16 files changed
  • 2 contributors

Commits on Feb 22, 2024

  1. Update README.md

    update
    neozeed authored Feb 22, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    510150b View commit details

Commits on Feb 24, 2024

  1. fix fileglob

    neozeed committed Feb 24, 2024
    Copy the full SHA
    d5f5039 View commit details

Commits on Feb 25, 2024

  1. Added pc speaker/DosBeep

    neozeed committed Feb 25, 2024
    Copy the full SHA
    14bc373 View commit details
  2. Revert "Added pc speaker/DosBeep"

    This reverts commit 14bc373.
    neozeed committed Feb 25, 2024
    Copy the full SHA
    d5d2c7f View commit details
  3. Added DosBeep

    neozeed committed Feb 25, 2024
    Copy the full SHA
    e3d34b6 View commit details
Showing with 1,250 additions and 1,203 deletions.
  1. +93 −92 Makefile
  2. +35 −0 Makefile.gnu
  3. +32 −0 Makefile.os2
  4. +5 −3 README.md
  5. +1 −0 cycle.c
  6. +1 −6 dummy.c
  7. +1 −1 fileglob.c
  8. +8 −2 include/sarien.h
  9. +8 −0 nothing.c
  10. +89 −9 nullvid.c
  11. BIN object
  12. +8 −8 sarien.def
  13. +100 −0 sarien.ini
  14. +10 −10 sarien.lnk
  15. +853 −853 savegame.c
  16. +6 −219 sound.c
185 changes: 93 additions & 92 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,92 +1,93 @@
# Version 6.00.054 1989
# https://archive.org/details/os2ddk1.2
# PLATFORM = ddk12

# Version 6.00.054 1989
# https://archive.org/details/os2ddk2.0
# PLATFORM = ddk20

# Version 6.00.054 1989
# https://archive.org/details/os-2-cd-rom_202401
# PLATFORM = ddksrc

# Version 1.00.075 1989
# https://archive.org/details/msos2-200-sdk
# PLATFORM = c386

# Version 6.00.077 1991
# https://archive.org/details/windows-nt-3.1-build-196
# PLATFORM = nt-sep

# Version 6.00.080 1991
# https://archive.org/details/windows-nt-3.1-october-1991-build
# PLATFORM = nt-oct

# Version 6.00.081 1991
# https://archive.org/details/Windows_NT_and_Win32_Dev_Kit_1991
PLATFORM = nt-dec

# Version 8.00 1993
# PLATFORM = msvc32s

# Version 8.00.3200 1993
# Windows 95 73g SDk
# PLATFORM = 73g

# Version 13.10.4035 2002
# PLATFORM = v13
# PLATFORM = 13.10.6030

DEFS = -D__32BIT__ -DM_I386 -D _MSC_VER=6 -DKEYS_WORK
INC = /u /w -Iinclude $(DEFS)
# OPT = /G3 /O
OPT = /G3 /Ogilt /Gs
DEBUG = #/Zi
LDEBUG = #-debug:full

# OS/2 compat dos extender (pharlap286)
DOSX = run286

# ms-dos emulator
EMU = msdos486

# dos exteded cross
CC = $(EMU) $(DOSX) $(CL386ROOT)\$(PLATFORM)\cl386
# native CC
#CC = $(CL386ROOT)\$(PLATFORM)\cl386

OS2LINK = $(EMU) $(DOSX) $(CL386ROOT)\ddk12\LINK386.EXE



OBJ = agi.obj agi_v2.obj agi_v3.obj agi_v4.obj checks.obj cli.obj console.obj cycle.obj \
font.obj getopt.obj getopt1.obj global.obj graphics.obj hirespic.obj id.obj inv.obj \
keyboard.obj logic.obj lzw.obj main.obj menu.obj motion.obj objects.obj op_cmd.obj \
op_dbg.obj op_test.obj patches.obj path.obj picture.obj picview.obj rand.obj savegame.obj \
silent.obj sound.obj sprite.obj text.obj view.obj words.obj fileglob.obj

INVOLVED = fileglob.obj

HARD = dummy.obj pccga.obj pcvga.obj pharcga.obj pharvid.obj

NULL = dummy.obj nullvid.obj


# must include ONLY ONE strategey..
# for OS/2 it must have been assembled my MASM 6.11

include ..\-justcompile.mak
#include ..\-mangleassembly.mak
#include ..\-plainassembly.mak

sarien: $(OBJ) $(NULL)
$(OS2LINK) @sarien.lnk
mcopy -i %QEMUPATH%\dummy.vfd -D o sarien.exe ::
qemuos2


clean:
del $(OBJ)
del sarien.exe
del *.asm *.a1 *.a

# Version 6.00.054 1989
# https://archive.org/details/os2ddk1.2
# PLATFORM = ddk12

# Version 6.00.054 1989
# https://archive.org/details/os2ddk2.0
# PLATFORM = ddk20

# Version 6.00.054 1989
# https://archive.org/details/os-2-cd-rom_202401
# PLATFORM = ddksrc

# Version 1.00.075 1989
# https://archive.org/details/msos2-200-sdk
# PLATFORM = c386

# Version 6.00.077 1991
# https://archive.org/details/windows-nt-3.1-build-196
# PLATFORM = nt-sep

# Version 6.00.080 1991
# https://archive.org/details/windows-nt-3.1-october-1991-build
# PLATFORM = nt-oct

# Version 6.00.081 1991
# https://archive.org/details/Windows_NT_and_Win32_Dev_Kit_1991
PLATFORM = nt-dec

# Version 8.00 1993
# PLATFORM = msvc32s

# Version 8.00.3200 1993
# Windows 95 73g SDk
# PLATFORM = 73g

# Version 13.10.4035 2002
# PLATFORM = v13
# PLATFORM = 13.10.6030

DEFS = -D__32BIT__ -DM_I386 -D _MSC_VER=6 -DKEYS_WORK
INC = /u /w -Iinclude $(DEFS)
# OPT = /G3 /O
OPT = /G3 /Ogilt /Gs
DEBUG = #/Zi
LDEBUG = #-debug:full

# OS/2 compat dos extender (pharlap286)
DOSX = run286

# ms-dos emulator
EMU = msdos486

# dos exteded cross
CC = $(EMU) $(DOSX) $(CL386ROOT)\$(PLATFORM)\cl386
# native CC
#CC = $(CL386ROOT)\$(PLATFORM)\cl386

OS2LINK = $(EMU) $(DOSX) $(CL386ROOT)\ddk12\LINK386.EXE



OBJ = agi.obj agi_v2.obj agi_v3.obj agi_v4.obj checks.obj cli.obj console.obj cycle.obj \
font.obj getopt.obj getopt1.obj global.obj graphics.obj hirespic.obj id.obj inv.obj \
keyboard.obj logic.obj lzw.obj main.obj menu.obj motion.obj objects.obj op_cmd.obj \
op_dbg.obj op_test.obj patches.obj path.obj picture.obj picview.obj rand.obj savegame.obj \
silent.obj sound.obj sprite.obj text.obj view.obj words.obj fileglob.obj nothing.obj

INVOLVED = fileglob.obj

HARD = dummy.obj pccga.obj pcvga.obj pharcga.obj pharvid.obj

NULL = dummy.obj nullvid.obj


# must include ONLY ONE strategey..
# for OS/2 it must have been assembled my MASM 6.11

include ..\-justcompile.mak
#include ..\-mangleassembly.mak
#include ..\-plainassembly.mak

sarien: $(OBJ) $(NULL)
SET LIB=C:\cl386-research\lib2
$(OS2LINK) @sarien.lnk
mcopy -i %QEMUPATH%\dummy.vfd -D o sarien.exe ::
qemuos2


clean:
del $(OBJ) $(NULL)
del sarien.exe
del *.asm *.a1 *.a

35 changes: 35 additions & 0 deletions Makefile.gnu
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@

DEFS = -D__32BIT__ -DM_I386 -D _MSC_VER=6 -DKEYS_WORK -DNEED_NOTHING
INC = -Iinclude
#OPT = /G3 /O
#OPT = /G3 /Ogilt /Gs
DEBUG = #/Zi
LDEBUG = #-debug:full
CC=gcc
OS2LINK = LINK386.EXE

CFLAGS= $(INC) $(DEFS) $(OPT)

OBJ = agi.obj agi_v2.obj agi_v3.obj agi_v4.obj checks.obj cli.obj console.obj cycle.obj \
font.obj getopt.obj getopt1.obj global.obj graphics.obj hirespic.obj id.obj inv.obj \
keyboard.obj logic.obj lzw.obj main.obj menu.obj motion.obj objects.obj op_cmd.obj \
op_dbg.obj op_test.obj patches.obj path.obj picture.obj picview.obj rand.obj savegame.obj \
silent.obj sound.obj sprite.obj text.obj view.obj words.obj nothing.obj

sarien: $(OBJ)

# gnu make (cross compiled)
%.obj: %.c
$(CC) $(CFLAGS) -c $*.c
o2obj $*.o
rm $*.o
# nmake
#.c.obj:
# @emxomf -o $*.obj $*.o
# @del $*.o


clean:
del $(OBJ)
del sarien.exe
del *.asm *.a1 *.a
32 changes: 32 additions & 0 deletions Makefile.os2
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@

DEFS = -D__32BIT__ -DM_I386 -D _MSC_VER=6 -DKEYS_WORK
INC = /u /w -Iinclude
OPT = /G3 /Ox
#OPT = /G3 /Ogilt /Gs
DEBUG = #/Zi
LDEBUG = #-debug:full
CC=cl386
OS2LINK = LINK386.EXE

CFLAGS= $(INC) $(DEFS) $(OPT)

OBJ = agi.obj agi_v2.obj agi_v3.obj agi_v4.obj checks.obj cli.obj console.obj cycle.obj \
font.obj getopt.obj getopt1.obj global.obj graphics.obj hirespic.obj id.obj inv.obj \
keyboard.obj logic.obj lzw.obj main.obj menu.obj motion.obj objects.obj op_cmd.obj \
op_dbg.obj op_test.obj patches.obj path.obj picture.obj picview.obj rand.obj savegame.obj \
silent.obj sound.obj sprite.obj text.obj view.obj words.obj fileglob.obj
INVOLVED = fileglob.obj
HARD = dummy.obj pccga.obj pcvga.obj pharcga.obj pharvid.obj
NULL = dummy.obj nullvid.obj

sarien: $(OBJ) $(NULL)
$(OS2LINK) @sarien.lnk

.c.obj:
$(CC) $(CFLAGS) /c $*.c


clean:
@del $(OBJ)
@del sarien.exe
@del *.asm *.a1 *.a
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
It barely 'works' well well enough to do the opening loop for Space Quest.
I've verified it runs on real hardware, although for a 386 it's incredibly SLOW. It is however playable,
more so in emulation. It's buildable with the original cl386 from the Microsoft OS/2 SDK 2.00 beta 2 that
is floating around out there.

There is no keyboard input, the colours are CGA, and overall it's more of a proof of concept.
Overall it's more of a proof of concept.

![sariend](https://github.com/neozeed/sarienPM/assets/9031439/66d4ed6b-e76f-48ca-a9f0-d6a26f93b4c1)

![sarien_CGA-tiemr](https://github.com/neozeed/sarienPM/assets/9031439/376f5db8-7823-4d5f-bfa8-7e147f47e389)

the PM part was taken from DEV-SAMPLES-C-PM-FastGPI.
1 change: 1 addition & 0 deletions cycle.c
Original file line number Diff line number Diff line change
@@ -151,6 +151,7 @@ static void interpret_cycle ()
void update_timer ()
{
clock_count++;
play_sound();
if (clock_count <= TICK_SECONDS)
return;

7 changes: 1 addition & 6 deletions dummy.c
Original file line number Diff line number Diff line change
@@ -30,15 +30,10 @@ void __init_sound ()
static int dummy2_init_sound (SINT16 *buffer)
{
report ("sound_dummy: sound output disabled\n");
return -1;
return 0;
}

static void dummy2_close_sound ()
{
}

void nosound(){}
void sound(){}



2 changes: 1 addition & 1 deletion fileglob.c
Original file line number Diff line number Diff line change
@@ -41,7 +41,7 @@ int file_exists (char *fname)
rc=1;
if(ulFiles>0)
rc=0;
return(rc);
return(!rc);
// return !_dos_findfirst (fname, _A_NORMAL | _A_ARCH | _A_RDONLY, &fdata);
}

10 changes: 8 additions & 2 deletions include/sarien.h
Original file line number Diff line number Diff line change
@@ -65,6 +65,7 @@ extern "C"{

//#define _TRACE

#if 0
/* You'll need an ANSI terminal to use these :\ */
#ifdef _TRACE
# include <stdio.h>
@@ -90,16 +91,21 @@ extern "C"{
# undef _D
# endif
# if defined(__GNUC__) /* && !defined(MACOSX) */
# define _D(args...)
//# define _D(args...)
# else
void _D(char *, ...);
// void _D(char *, ...);
# endif
#endif /* _TRACE */
//yuck
# define _D_INFO
# define _D_CRIT
# define _D_WARN
#endif

#define _D_INFO
#define _D_CRIT
#define _D_WARN
#define _D nothing

/* Include port-specific definitions
*
8 changes: 8 additions & 0 deletions nothing.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
//GCC doesnt seem to do this correctly?!

#ifdef NEED_NOTHING
void nothing(){}
#endif



Loading