Skip to content

Commit

Permalink
Added DosBeep
Browse files Browse the repository at this point in the history
  • Loading branch information
neozeed committed Feb 25, 2024
1 parent d5d2c7f commit e3d34b6
Show file tree
Hide file tree
Showing 13 changed files with 1,144 additions and 1,199 deletions.
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
1 change: 1 addition & 0 deletions cycle.c
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ static void interpret_cycle ()
void update_timer ()
{
clock_count++;
play_sound();
if (clock_count <= TICK_SECONDS)
return;

Expand Down
7 changes: 1 addition & 6 deletions dummy.c
Original file line number Diff line number Diff line change
Expand Up @@ -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(){}



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

//#define _TRACE

#if 0
/* You'll need an ANSI terminal to use these :\ */
#ifdef _TRACE
# include <stdio.h>
Expand All @@ -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
*
Expand Down
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

0 comments on commit e3d34b6

Please sign in to comment.