]> git.0x19.co - doomgeneric-snom360/commitdiff
renamed to doomgeneric
authorozkl <ozkl@users.noreply.github.com>
Sun, 4 Aug 2019 19:58:47 +0000 (22:58 +0300)
committerozkl <ozkl@users.noreply.github.com>
Sun, 4 Aug 2019 19:58:47 +0000 (22:58 +0300)
214 files changed:
README.TXT
doomgeneric/Makefile [moved from fbdoom/Makefile with 100% similarity]
doomgeneric/am_map.c [moved from fbdoom/am_map.c with 100% similarity]
doomgeneric/am_map.h [moved from fbdoom/am_map.h with 100% similarity]
doomgeneric/config.h [moved from fbdoom/config.h with 100% similarity]
doomgeneric/d_englsh.h [moved from fbdoom/d_englsh.h with 100% similarity]
doomgeneric/d_event.c [moved from fbdoom/d_event.c with 100% similarity]
doomgeneric/d_event.h [moved from fbdoom/d_event.h with 100% similarity]
doomgeneric/d_items.c [moved from fbdoom/d_items.c with 100% similarity]
doomgeneric/d_items.h [moved from fbdoom/d_items.h with 100% similarity]
doomgeneric/d_iwad.c [moved from fbdoom/d_iwad.c with 100% similarity]
doomgeneric/d_iwad.h [moved from fbdoom/d_iwad.h with 100% similarity]
doomgeneric/d_loop.c [moved from fbdoom/d_loop.c with 100% similarity]
doomgeneric/d_loop.h [moved from fbdoom/d_loop.h with 100% similarity]
doomgeneric/d_main.c [moved from fbdoom/d_main.c with 100% similarity]
doomgeneric/d_main.h [moved from fbdoom/d_main.h with 100% similarity]
doomgeneric/d_mode.c [moved from fbdoom/d_mode.c with 100% similarity]
doomgeneric/d_mode.h [moved from fbdoom/d_mode.h with 100% similarity]
doomgeneric/d_net.c [moved from fbdoom/d_net.c with 100% similarity]
doomgeneric/d_player.h [moved from fbdoom/d_player.h with 100% similarity]
doomgeneric/d_textur.h [moved from fbdoom/d_textur.h with 100% similarity]
doomgeneric/d_think.h [moved from fbdoom/d_think.h with 100% similarity]
doomgeneric/d_ticcmd.h [moved from fbdoom/d_ticcmd.h with 100% similarity]
doomgeneric/deh_main.h [moved from fbdoom/deh_main.h with 100% similarity]
doomgeneric/deh_misc.h [moved from fbdoom/deh_misc.h with 100% similarity]
doomgeneric/deh_str.h [moved from fbdoom/deh_str.h with 100% similarity]
doomgeneric/doom.h [moved from fbdoom/doom.h with 100% similarity]
doomgeneric/doomdata.h [moved from fbdoom/doomdata.h with 100% similarity]
doomgeneric/doomdef.c [moved from fbdoom/doomdef.c with 100% similarity]
doomgeneric/doomdef.h [moved from fbdoom/doomdef.h with 100% similarity]
doomgeneric/doomfeatures.h [moved from fbdoom/doomfeatures.h with 100% similarity]
doomgeneric/doomkeys.h [moved from fbdoom/doomkeys.h with 100% similarity]
doomgeneric/doomstat.c [moved from fbdoom/doomstat.c with 100% similarity]
doomgeneric/doomstat.h [moved from fbdoom/doomstat.h with 100% similarity]
doomgeneric/doomtype.h [moved from fbdoom/doomtype.h with 100% similarity]
doomgeneric/dstrings.c [moved from fbdoom/dstrings.c with 100% similarity]
doomgeneric/dstrings.h [moved from fbdoom/dstrings.h with 100% similarity]
doomgeneric/dummy.c [moved from fbdoom/dummy.c with 100% similarity]
doomgeneric/f_finale.c [moved from fbdoom/f_finale.c with 100% similarity]
doomgeneric/f_finale.h [moved from fbdoom/f_finale.h with 100% similarity]
doomgeneric/f_wipe.c [moved from fbdoom/f_wipe.c with 100% similarity]
doomgeneric/f_wipe.h [moved from fbdoom/f_wipe.h with 100% similarity]
doomgeneric/g_game.c [moved from fbdoom/g_game.c with 100% similarity]
doomgeneric/g_game.h [moved from fbdoom/g_game.h with 100% similarity]
doomgeneric/gusconf.c [moved from fbdoom/gusconf.c with 100% similarity]
doomgeneric/gusconf.h [moved from fbdoom/gusconf.h with 100% similarity]
doomgeneric/hu_lib.c [moved from fbdoom/hu_lib.c with 100% similarity]
doomgeneric/hu_lib.h [moved from fbdoom/hu_lib.h with 100% similarity]
doomgeneric/hu_stuff.c [moved from fbdoom/hu_stuff.c with 100% similarity]
doomgeneric/hu_stuff.h [moved from fbdoom/hu_stuff.h with 100% similarity]
doomgeneric/i_cdmus.c [moved from fbdoom/i_cdmus.c with 100% similarity]
doomgeneric/i_cdmus.h [moved from fbdoom/i_cdmus.h with 100% similarity]
doomgeneric/i_endoom.c [moved from fbdoom/i_endoom.c with 100% similarity]
doomgeneric/i_endoom.h [moved from fbdoom/i_endoom.h with 100% similarity]
doomgeneric/i_input_sdl.c [moved from fbdoom/i_input_sdl.c with 100% similarity]
doomgeneric/i_input_tty.c [moved from fbdoom/i_input_tty.c with 100% similarity]
doomgeneric/i_joystick.c [moved from fbdoom/i_joystick.c with 100% similarity]
doomgeneric/i_joystick.h [moved from fbdoom/i_joystick.h with 100% similarity]
doomgeneric/i_main.c [moved from fbdoom/i_main.c with 100% similarity]
doomgeneric/i_oplmusic.c [moved from fbdoom/i_oplmusic.c with 100% similarity]
doomgeneric/i_pcsound.c [moved from fbdoom/i_pcsound.c with 100% similarity]
doomgeneric/i_scale.c [moved from fbdoom/i_scale.c with 100% similarity]
doomgeneric/i_scale.h [moved from fbdoom/i_scale.h with 100% similarity]
doomgeneric/i_sdlmusic.c [moved from fbdoom/i_sdlmusic.c with 100% similarity]
doomgeneric/i_sdlsound.c [moved from fbdoom/i_sdlsound.c with 100% similarity]
doomgeneric/i_sound.c [moved from fbdoom/i_sound.c with 100% similarity]
doomgeneric/i_sound.h [moved from fbdoom/i_sound.h with 100% similarity]
doomgeneric/i_sound_dummy.c [moved from fbdoom/i_sound_dummy.c with 100% similarity]
doomgeneric/i_swap.h [moved from fbdoom/i_swap.h with 100% similarity]
doomgeneric/i_system.c [moved from fbdoom/i_system.c with 100% similarity]
doomgeneric/i_system.h [moved from fbdoom/i_system.h with 100% similarity]
doomgeneric/i_timer.c [moved from fbdoom/i_timer.c with 100% similarity]
doomgeneric/i_timer.h [moved from fbdoom/i_timer.h with 100% similarity]
doomgeneric/i_video.c [moved from fbdoom/i_video.c with 100% similarity]
doomgeneric/i_video.h [moved from fbdoom/i_video.h with 100% similarity]
doomgeneric/i_video_fbdev.c [moved from fbdoom/i_video_fbdev.c with 100% similarity]
doomgeneric/icon.c [moved from fbdoom/icon.c with 100% similarity]
doomgeneric/info.c [moved from fbdoom/info.c with 100% similarity]
doomgeneric/info.h [moved from fbdoom/info.h with 100% similarity]
doomgeneric/m_argv.c [moved from fbdoom/m_argv.c with 100% similarity]
doomgeneric/m_argv.h [moved from fbdoom/m_argv.h with 100% similarity]
doomgeneric/m_bbox.c [moved from fbdoom/m_bbox.c with 100% similarity]
doomgeneric/m_bbox.h [moved from fbdoom/m_bbox.h with 100% similarity]
doomgeneric/m_cheat.c [moved from fbdoom/m_cheat.c with 100% similarity]
doomgeneric/m_cheat.h [moved from fbdoom/m_cheat.h with 100% similarity]
doomgeneric/m_config.c [moved from fbdoom/m_config.c with 100% similarity]
doomgeneric/m_config.h [moved from fbdoom/m_config.h with 100% similarity]
doomgeneric/m_controls.c [moved from fbdoom/m_controls.c with 100% similarity]
doomgeneric/m_controls.h [moved from fbdoom/m_controls.h with 100% similarity]
doomgeneric/m_fixed.c [moved from fbdoom/m_fixed.c with 100% similarity]
doomgeneric/m_fixed.h [moved from fbdoom/m_fixed.h with 100% similarity]
doomgeneric/m_menu.c [moved from fbdoom/m_menu.c with 100% similarity]
doomgeneric/m_menu.h [moved from fbdoom/m_menu.h with 100% similarity]
doomgeneric/m_misc.c [moved from fbdoom/m_misc.c with 100% similarity]
doomgeneric/m_misc.h [moved from fbdoom/m_misc.h with 100% similarity]
doomgeneric/m_random.c [moved from fbdoom/m_random.c with 100% similarity]
doomgeneric/m_random.h [moved from fbdoom/m_random.h with 100% similarity]
doomgeneric/memio.c [moved from fbdoom/memio.c with 100% similarity]
doomgeneric/memio.h [moved from fbdoom/memio.h with 100% similarity]
doomgeneric/net_client.h [moved from fbdoom/net_client.h with 100% similarity]
doomgeneric/net_dedicated.h [moved from fbdoom/net_dedicated.h with 100% similarity]
doomgeneric/net_defs.h [moved from fbdoom/net_defs.h with 100% similarity]
doomgeneric/net_gui.h [moved from fbdoom/net_gui.h with 100% similarity]
doomgeneric/net_io.h [moved from fbdoom/net_io.h with 100% similarity]
doomgeneric/net_loop.h [moved from fbdoom/net_loop.h with 100% similarity]
doomgeneric/net_packet.h [moved from fbdoom/net_packet.h with 100% similarity]
doomgeneric/net_query.h [moved from fbdoom/net_query.h with 100% similarity]
doomgeneric/net_sdl.h [moved from fbdoom/net_sdl.h with 100% similarity]
doomgeneric/net_server.h [moved from fbdoom/net_server.h with 100% similarity]
doomgeneric/p_ceilng.c [moved from fbdoom/p_ceilng.c with 100% similarity]
doomgeneric/p_doors.c [moved from fbdoom/p_doors.c with 100% similarity]
doomgeneric/p_enemy.c [moved from fbdoom/p_enemy.c with 100% similarity]
doomgeneric/p_floor.c [moved from fbdoom/p_floor.c with 100% similarity]
doomgeneric/p_inter.c [moved from fbdoom/p_inter.c with 100% similarity]
doomgeneric/p_inter.h [moved from fbdoom/p_inter.h with 100% similarity]
doomgeneric/p_lights.c [moved from fbdoom/p_lights.c with 100% similarity]
doomgeneric/p_local.h [moved from fbdoom/p_local.h with 100% similarity]
doomgeneric/p_map.c [moved from fbdoom/p_map.c with 100% similarity]
doomgeneric/p_maputl.c [moved from fbdoom/p_maputl.c with 100% similarity]
doomgeneric/p_mobj.c [moved from fbdoom/p_mobj.c with 100% similarity]
doomgeneric/p_mobj.h [moved from fbdoom/p_mobj.h with 100% similarity]
doomgeneric/p_plats.c [moved from fbdoom/p_plats.c with 100% similarity]
doomgeneric/p_pspr.c [moved from fbdoom/p_pspr.c with 100% similarity]
doomgeneric/p_pspr.h [moved from fbdoom/p_pspr.h with 100% similarity]
doomgeneric/p_saveg.c [moved from fbdoom/p_saveg.c with 100% similarity]
doomgeneric/p_saveg.h [moved from fbdoom/p_saveg.h with 100% similarity]
doomgeneric/p_setup.c [moved from fbdoom/p_setup.c with 100% similarity]
doomgeneric/p_setup.h [moved from fbdoom/p_setup.h with 100% similarity]
doomgeneric/p_sight.c [moved from fbdoom/p_sight.c with 100% similarity]
doomgeneric/p_spec.c [moved from fbdoom/p_spec.c with 100% similarity]
doomgeneric/p_spec.h [moved from fbdoom/p_spec.h with 100% similarity]
doomgeneric/p_switch.c [moved from fbdoom/p_switch.c with 100% similarity]
doomgeneric/p_telept.c [moved from fbdoom/p_telept.c with 100% similarity]
doomgeneric/p_tick.c [moved from fbdoom/p_tick.c with 100% similarity]
doomgeneric/p_tick.h [moved from fbdoom/p_tick.h with 100% similarity]
doomgeneric/p_user.c [moved from fbdoom/p_user.c with 100% similarity]
doomgeneric/r_bsp.c [moved from fbdoom/r_bsp.c with 100% similarity]
doomgeneric/r_bsp.h [moved from fbdoom/r_bsp.h with 100% similarity]
doomgeneric/r_data.c [moved from fbdoom/r_data.c with 100% similarity]
doomgeneric/r_data.h [moved from fbdoom/r_data.h with 100% similarity]
doomgeneric/r_defs.h [moved from fbdoom/r_defs.h with 100% similarity]
doomgeneric/r_draw.c [moved from fbdoom/r_draw.c with 100% similarity]
doomgeneric/r_draw.h [moved from fbdoom/r_draw.h with 100% similarity]
doomgeneric/r_local.h [moved from fbdoom/r_local.h with 100% similarity]
doomgeneric/r_main.c [moved from fbdoom/r_main.c with 100% similarity]
doomgeneric/r_main.h [moved from fbdoom/r_main.h with 100% similarity]
doomgeneric/r_plane.c [moved from fbdoom/r_plane.c with 100% similarity]
doomgeneric/r_plane.h [moved from fbdoom/r_plane.h with 100% similarity]
doomgeneric/r_segs.c [moved from fbdoom/r_segs.c with 100% similarity]
doomgeneric/r_segs.h [moved from fbdoom/r_segs.h with 100% similarity]
doomgeneric/r_sky.c [moved from fbdoom/r_sky.c with 100% similarity]
doomgeneric/r_sky.h [moved from fbdoom/r_sky.h with 100% similarity]
doomgeneric/r_state.h [moved from fbdoom/r_state.h with 100% similarity]
doomgeneric/r_things.c [moved from fbdoom/r_things.c with 100% similarity]
doomgeneric/r_things.h [moved from fbdoom/r_things.h with 100% similarity]
doomgeneric/s_sound.c [moved from fbdoom/s_sound.c with 100% similarity]
doomgeneric/s_sound.h [moved from fbdoom/s_sound.h with 100% similarity]
doomgeneric/sha1.c [moved from fbdoom/sha1.c with 100% similarity]
doomgeneric/sha1.h [moved from fbdoom/sha1.h with 100% similarity]
doomgeneric/sounds.c [moved from fbdoom/sounds.c with 100% similarity]
doomgeneric/sounds.h [moved from fbdoom/sounds.h with 100% similarity]
doomgeneric/st_lib.c [moved from fbdoom/st_lib.c with 100% similarity]
doomgeneric/st_lib.h [moved from fbdoom/st_lib.h with 100% similarity]
doomgeneric/st_stuff.c [moved from fbdoom/st_stuff.c with 100% similarity]
doomgeneric/st_stuff.h [moved from fbdoom/st_stuff.h with 100% similarity]
doomgeneric/statdump.c [moved from fbdoom/statdump.c with 100% similarity]
doomgeneric/statdump.h [moved from fbdoom/statdump.h with 100% similarity]
doomgeneric/stubs.c [moved from fbdoom/stubs.c with 100% similarity]
doomgeneric/tables.c [moved from fbdoom/tables.c with 100% similarity]
doomgeneric/tables.h [moved from fbdoom/tables.h with 100% similarity]
doomgeneric/v_patch.h [moved from fbdoom/v_patch.h with 100% similarity]
doomgeneric/v_video.c [moved from fbdoom/v_video.c with 100% similarity]
doomgeneric/v_video.h [moved from fbdoom/v_video.h with 100% similarity]
doomgeneric/w_checksum.c [moved from fbdoom/w_checksum.c with 100% similarity]
doomgeneric/w_checksum.h [moved from fbdoom/w_checksum.h with 100% similarity]
doomgeneric/w_file.c [moved from fbdoom/w_file.c with 100% similarity]
doomgeneric/w_file.h [moved from fbdoom/w_file.h with 100% similarity]
doomgeneric/w_file_stdc.c [moved from fbdoom/w_file_stdc.c with 100% similarity]
doomgeneric/w_file_stdc_unbuffered.c [moved from fbdoom/w_file_stdc_unbuffered.c with 100% similarity]
doomgeneric/w_main.c [moved from fbdoom/w_main.c with 100% similarity]
doomgeneric/w_main.h [moved from fbdoom/w_main.h with 100% similarity]
doomgeneric/w_merge.h [moved from fbdoom/w_merge.h with 100% similarity]
doomgeneric/w_wad.c [moved from fbdoom/w_wad.c with 100% similarity]
doomgeneric/w_wad.h [moved from fbdoom/w_wad.h with 100% similarity]
doomgeneric/wi_stuff.c [moved from fbdoom/wi_stuff.c with 100% similarity]
doomgeneric/wi_stuff.h [moved from fbdoom/wi_stuff.h with 100% similarity]
doomgeneric/z_zone.c [moved from fbdoom/z_zone.c with 100% similarity]
doomgeneric/z_zone.h [moved from fbdoom/z_zone.h with 100% similarity]
ipx/DOOMNET.C [deleted file]
ipx/DOOMNET.H [deleted file]
ipx/IPXNET.C [deleted file]
ipx/IPXNET.H [deleted file]
ipx/IPXSETUP.C [deleted file]
ipx/IPXSTR.H [deleted file]
ipx/IPX_FRCH.H [deleted file]
ipx/README [deleted file]
sersrc/DOOMNET.C [deleted file]
sersrc/DOOMNET.H [deleted file]
sersrc/PORT.C [deleted file]
sersrc/README.TXT [deleted file]
sersrc/SERSETUP.C [deleted file]
sersrc/SERSETUP.H [deleted file]
sersrc/SERSTR.H [deleted file]
sersrc/SER_FRCH.H [deleted file]
sndserv/Makefile [deleted file]
sndserv/README.sndserv [deleted file]
sndserv/linux.c [deleted file]
sndserv/sounds.c [deleted file]
sndserv/sounds.h [deleted file]
sndserv/soundsrv.c [deleted file]
sndserv/soundsrv.h [deleted file]
sndserv/soundst.h [deleted file]
sndserv/wadread.c [deleted file]
sndserv/wadread.h [deleted file]

index 173cccd62ab6ff4ed88b66920c38c348bfb938f3..5e0ecaaf72436bb128fb7193827543cddc44956d 100644 (file)
@@ -1,18 +1,11 @@
 ================
-= fbDOOM =
+= doomgeneric =
 ================
 
-Adaptation of the original DOOM
-to be easily portable to framebuffer devices with minimal depenencies.
-Runs on:
-* Plain desktop Linux framebuffer,
-* Siglent SSA 3021X Spectrum Analyzer,
-* Frosted OS
-
-To build (example):
-* cd fbdoom
-* make CROSS_COMPILE=arm-linux-gnueabihf-
-
+To port DOOM easly, I made some changes to source code.
+Now, all you need to do is implement the functions in doomgeneric.h to port DOOM to a new system.
+doomgeneric_win.c is a Windows GDI port. It is also a good example for how to port doomgeneric.
+Sound is not supported for now.
 
 Original readme
 ===============
similarity index 100%
rename from fbdoom/Makefile
rename to doomgeneric/Makefile
similarity index 100%
rename from fbdoom/am_map.c
rename to doomgeneric/am_map.c
similarity index 100%
rename from fbdoom/am_map.h
rename to doomgeneric/am_map.h
similarity index 100%
rename from fbdoom/config.h
rename to doomgeneric/config.h
similarity index 100%
rename from fbdoom/d_englsh.h
rename to doomgeneric/d_englsh.h
similarity index 100%
rename from fbdoom/d_event.c
rename to doomgeneric/d_event.c
similarity index 100%
rename from fbdoom/d_event.h
rename to doomgeneric/d_event.h
similarity index 100%
rename from fbdoom/d_items.c
rename to doomgeneric/d_items.c
similarity index 100%
rename from fbdoom/d_items.h
rename to doomgeneric/d_items.h
similarity index 100%
rename from fbdoom/d_iwad.c
rename to doomgeneric/d_iwad.c
similarity index 100%
rename from fbdoom/d_iwad.h
rename to doomgeneric/d_iwad.h
similarity index 100%
rename from fbdoom/d_loop.c
rename to doomgeneric/d_loop.c
similarity index 100%
rename from fbdoom/d_loop.h
rename to doomgeneric/d_loop.h
similarity index 100%
rename from fbdoom/d_main.c
rename to doomgeneric/d_main.c
similarity index 100%
rename from fbdoom/d_main.h
rename to doomgeneric/d_main.h
similarity index 100%
rename from fbdoom/d_mode.c
rename to doomgeneric/d_mode.c
similarity index 100%
rename from fbdoom/d_mode.h
rename to doomgeneric/d_mode.h
similarity index 100%
rename from fbdoom/d_net.c
rename to doomgeneric/d_net.c
similarity index 100%
rename from fbdoom/d_player.h
rename to doomgeneric/d_player.h
similarity index 100%
rename from fbdoom/d_textur.h
rename to doomgeneric/d_textur.h
similarity index 100%
rename from fbdoom/d_think.h
rename to doomgeneric/d_think.h
similarity index 100%
rename from fbdoom/d_ticcmd.h
rename to doomgeneric/d_ticcmd.h
similarity index 100%
rename from fbdoom/deh_main.h
rename to doomgeneric/deh_main.h
similarity index 100%
rename from fbdoom/deh_misc.h
rename to doomgeneric/deh_misc.h
similarity index 100%
rename from fbdoom/deh_str.h
rename to doomgeneric/deh_str.h
similarity index 100%
rename from fbdoom/doom.h
rename to doomgeneric/doom.h
similarity index 100%
rename from fbdoom/doomdata.h
rename to doomgeneric/doomdata.h
similarity index 100%
rename from fbdoom/doomdef.c
rename to doomgeneric/doomdef.c
similarity index 100%
rename from fbdoom/doomdef.h
rename to doomgeneric/doomdef.h
similarity index 100%
rename from fbdoom/doomkeys.h
rename to doomgeneric/doomkeys.h
similarity index 100%
rename from fbdoom/doomstat.c
rename to doomgeneric/doomstat.c
similarity index 100%
rename from fbdoom/doomstat.h
rename to doomgeneric/doomstat.h
similarity index 100%
rename from fbdoom/doomtype.h
rename to doomgeneric/doomtype.h
similarity index 100%
rename from fbdoom/dstrings.c
rename to doomgeneric/dstrings.c
similarity index 100%
rename from fbdoom/dstrings.h
rename to doomgeneric/dstrings.h
similarity index 100%
rename from fbdoom/dummy.c
rename to doomgeneric/dummy.c
similarity index 100%
rename from fbdoom/f_finale.c
rename to doomgeneric/f_finale.c
similarity index 100%
rename from fbdoom/f_finale.h
rename to doomgeneric/f_finale.h
similarity index 100%
rename from fbdoom/f_wipe.c
rename to doomgeneric/f_wipe.c
similarity index 100%
rename from fbdoom/f_wipe.h
rename to doomgeneric/f_wipe.h
similarity index 100%
rename from fbdoom/g_game.c
rename to doomgeneric/g_game.c
similarity index 100%
rename from fbdoom/g_game.h
rename to doomgeneric/g_game.h
similarity index 100%
rename from fbdoom/gusconf.c
rename to doomgeneric/gusconf.c
similarity index 100%
rename from fbdoom/gusconf.h
rename to doomgeneric/gusconf.h
similarity index 100%
rename from fbdoom/hu_lib.c
rename to doomgeneric/hu_lib.c
similarity index 100%
rename from fbdoom/hu_lib.h
rename to doomgeneric/hu_lib.h
similarity index 100%
rename from fbdoom/hu_stuff.c
rename to doomgeneric/hu_stuff.c
similarity index 100%
rename from fbdoom/hu_stuff.h
rename to doomgeneric/hu_stuff.h
similarity index 100%
rename from fbdoom/i_cdmus.c
rename to doomgeneric/i_cdmus.c
similarity index 100%
rename from fbdoom/i_cdmus.h
rename to doomgeneric/i_cdmus.h
similarity index 100%
rename from fbdoom/i_endoom.c
rename to doomgeneric/i_endoom.c
similarity index 100%
rename from fbdoom/i_endoom.h
rename to doomgeneric/i_endoom.h
similarity index 100%
rename from fbdoom/i_joystick.c
rename to doomgeneric/i_joystick.c
similarity index 100%
rename from fbdoom/i_joystick.h
rename to doomgeneric/i_joystick.h
similarity index 100%
rename from fbdoom/i_main.c
rename to doomgeneric/i_main.c
similarity index 100%
rename from fbdoom/i_oplmusic.c
rename to doomgeneric/i_oplmusic.c
similarity index 100%
rename from fbdoom/i_pcsound.c
rename to doomgeneric/i_pcsound.c
similarity index 100%
rename from fbdoom/i_scale.c
rename to doomgeneric/i_scale.c
similarity index 100%
rename from fbdoom/i_scale.h
rename to doomgeneric/i_scale.h
similarity index 100%
rename from fbdoom/i_sdlmusic.c
rename to doomgeneric/i_sdlmusic.c
similarity index 100%
rename from fbdoom/i_sdlsound.c
rename to doomgeneric/i_sdlsound.c
similarity index 100%
rename from fbdoom/i_sound.c
rename to doomgeneric/i_sound.c
similarity index 100%
rename from fbdoom/i_sound.h
rename to doomgeneric/i_sound.h
similarity index 100%
rename from fbdoom/i_swap.h
rename to doomgeneric/i_swap.h
similarity index 100%
rename from fbdoom/i_system.c
rename to doomgeneric/i_system.c
similarity index 100%
rename from fbdoom/i_system.h
rename to doomgeneric/i_system.h
similarity index 100%
rename from fbdoom/i_timer.c
rename to doomgeneric/i_timer.c
similarity index 100%
rename from fbdoom/i_timer.h
rename to doomgeneric/i_timer.h
similarity index 100%
rename from fbdoom/i_video.c
rename to doomgeneric/i_video.c
similarity index 100%
rename from fbdoom/i_video.h
rename to doomgeneric/i_video.h
similarity index 100%
rename from fbdoom/icon.c
rename to doomgeneric/icon.c
similarity index 100%
rename from fbdoom/info.c
rename to doomgeneric/info.c
similarity index 100%
rename from fbdoom/info.h
rename to doomgeneric/info.h
similarity index 100%
rename from fbdoom/m_argv.c
rename to doomgeneric/m_argv.c
similarity index 100%
rename from fbdoom/m_argv.h
rename to doomgeneric/m_argv.h
similarity index 100%
rename from fbdoom/m_bbox.c
rename to doomgeneric/m_bbox.c
similarity index 100%
rename from fbdoom/m_bbox.h
rename to doomgeneric/m_bbox.h
similarity index 100%
rename from fbdoom/m_cheat.c
rename to doomgeneric/m_cheat.c
similarity index 100%
rename from fbdoom/m_cheat.h
rename to doomgeneric/m_cheat.h
similarity index 100%
rename from fbdoom/m_config.c
rename to doomgeneric/m_config.c
similarity index 100%
rename from fbdoom/m_config.h
rename to doomgeneric/m_config.h
similarity index 100%
rename from fbdoom/m_controls.c
rename to doomgeneric/m_controls.c
similarity index 100%
rename from fbdoom/m_controls.h
rename to doomgeneric/m_controls.h
similarity index 100%
rename from fbdoom/m_fixed.c
rename to doomgeneric/m_fixed.c
similarity index 100%
rename from fbdoom/m_fixed.h
rename to doomgeneric/m_fixed.h
similarity index 100%
rename from fbdoom/m_menu.c
rename to doomgeneric/m_menu.c
similarity index 100%
rename from fbdoom/m_menu.h
rename to doomgeneric/m_menu.h
similarity index 100%
rename from fbdoom/m_misc.c
rename to doomgeneric/m_misc.c
similarity index 100%
rename from fbdoom/m_misc.h
rename to doomgeneric/m_misc.h
similarity index 100%
rename from fbdoom/m_random.c
rename to doomgeneric/m_random.c
similarity index 100%
rename from fbdoom/m_random.h
rename to doomgeneric/m_random.h
similarity index 100%
rename from fbdoom/memio.c
rename to doomgeneric/memio.c
similarity index 100%
rename from fbdoom/memio.h
rename to doomgeneric/memio.h
similarity index 100%
rename from fbdoom/net_client.h
rename to doomgeneric/net_client.h
similarity index 100%
rename from fbdoom/net_defs.h
rename to doomgeneric/net_defs.h
similarity index 100%
rename from fbdoom/net_gui.h
rename to doomgeneric/net_gui.h
similarity index 100%
rename from fbdoom/net_io.h
rename to doomgeneric/net_io.h
similarity index 100%
rename from fbdoom/net_loop.h
rename to doomgeneric/net_loop.h
similarity index 100%
rename from fbdoom/net_packet.h
rename to doomgeneric/net_packet.h
similarity index 100%
rename from fbdoom/net_query.h
rename to doomgeneric/net_query.h
similarity index 100%
rename from fbdoom/net_sdl.h
rename to doomgeneric/net_sdl.h
similarity index 100%
rename from fbdoom/net_server.h
rename to doomgeneric/net_server.h
similarity index 100%
rename from fbdoom/p_ceilng.c
rename to doomgeneric/p_ceilng.c
similarity index 100%
rename from fbdoom/p_doors.c
rename to doomgeneric/p_doors.c
similarity index 100%
rename from fbdoom/p_enemy.c
rename to doomgeneric/p_enemy.c
similarity index 100%
rename from fbdoom/p_floor.c
rename to doomgeneric/p_floor.c
similarity index 100%
rename from fbdoom/p_inter.c
rename to doomgeneric/p_inter.c
similarity index 100%
rename from fbdoom/p_inter.h
rename to doomgeneric/p_inter.h
similarity index 100%
rename from fbdoom/p_lights.c
rename to doomgeneric/p_lights.c
similarity index 100%
rename from fbdoom/p_local.h
rename to doomgeneric/p_local.h
similarity index 100%
rename from fbdoom/p_map.c
rename to doomgeneric/p_map.c
similarity index 100%
rename from fbdoom/p_maputl.c
rename to doomgeneric/p_maputl.c
similarity index 100%
rename from fbdoom/p_mobj.c
rename to doomgeneric/p_mobj.c
similarity index 100%
rename from fbdoom/p_mobj.h
rename to doomgeneric/p_mobj.h
similarity index 100%
rename from fbdoom/p_plats.c
rename to doomgeneric/p_plats.c
similarity index 100%
rename from fbdoom/p_pspr.c
rename to doomgeneric/p_pspr.c
similarity index 100%
rename from fbdoom/p_pspr.h
rename to doomgeneric/p_pspr.h
similarity index 100%
rename from fbdoom/p_saveg.c
rename to doomgeneric/p_saveg.c
similarity index 100%
rename from fbdoom/p_saveg.h
rename to doomgeneric/p_saveg.h
similarity index 100%
rename from fbdoom/p_setup.c
rename to doomgeneric/p_setup.c
similarity index 100%
rename from fbdoom/p_setup.h
rename to doomgeneric/p_setup.h
similarity index 100%
rename from fbdoom/p_sight.c
rename to doomgeneric/p_sight.c
similarity index 100%
rename from fbdoom/p_spec.c
rename to doomgeneric/p_spec.c
similarity index 100%
rename from fbdoom/p_spec.h
rename to doomgeneric/p_spec.h
similarity index 100%
rename from fbdoom/p_switch.c
rename to doomgeneric/p_switch.c
similarity index 100%
rename from fbdoom/p_telept.c
rename to doomgeneric/p_telept.c
similarity index 100%
rename from fbdoom/p_tick.c
rename to doomgeneric/p_tick.c
similarity index 100%
rename from fbdoom/p_tick.h
rename to doomgeneric/p_tick.h
similarity index 100%
rename from fbdoom/p_user.c
rename to doomgeneric/p_user.c
similarity index 100%
rename from fbdoom/r_bsp.c
rename to doomgeneric/r_bsp.c
similarity index 100%
rename from fbdoom/r_bsp.h
rename to doomgeneric/r_bsp.h
similarity index 100%
rename from fbdoom/r_data.c
rename to doomgeneric/r_data.c
similarity index 100%
rename from fbdoom/r_data.h
rename to doomgeneric/r_data.h
similarity index 100%
rename from fbdoom/r_defs.h
rename to doomgeneric/r_defs.h
similarity index 100%
rename from fbdoom/r_draw.c
rename to doomgeneric/r_draw.c
similarity index 100%
rename from fbdoom/r_draw.h
rename to doomgeneric/r_draw.h
similarity index 100%
rename from fbdoom/r_local.h
rename to doomgeneric/r_local.h
similarity index 100%
rename from fbdoom/r_main.c
rename to doomgeneric/r_main.c
similarity index 100%
rename from fbdoom/r_main.h
rename to doomgeneric/r_main.h
similarity index 100%
rename from fbdoom/r_plane.c
rename to doomgeneric/r_plane.c
similarity index 100%
rename from fbdoom/r_plane.h
rename to doomgeneric/r_plane.h
similarity index 100%
rename from fbdoom/r_segs.c
rename to doomgeneric/r_segs.c
similarity index 100%
rename from fbdoom/r_segs.h
rename to doomgeneric/r_segs.h
similarity index 100%
rename from fbdoom/r_sky.c
rename to doomgeneric/r_sky.c
similarity index 100%
rename from fbdoom/r_sky.h
rename to doomgeneric/r_sky.h
similarity index 100%
rename from fbdoom/r_state.h
rename to doomgeneric/r_state.h
similarity index 100%
rename from fbdoom/r_things.c
rename to doomgeneric/r_things.c
similarity index 100%
rename from fbdoom/r_things.h
rename to doomgeneric/r_things.h
similarity index 100%
rename from fbdoom/s_sound.c
rename to doomgeneric/s_sound.c
similarity index 100%
rename from fbdoom/s_sound.h
rename to doomgeneric/s_sound.h
similarity index 100%
rename from fbdoom/sha1.c
rename to doomgeneric/sha1.c
similarity index 100%
rename from fbdoom/sha1.h
rename to doomgeneric/sha1.h
similarity index 100%
rename from fbdoom/sounds.c
rename to doomgeneric/sounds.c
similarity index 100%
rename from fbdoom/sounds.h
rename to doomgeneric/sounds.h
similarity index 100%
rename from fbdoom/st_lib.c
rename to doomgeneric/st_lib.c
similarity index 100%
rename from fbdoom/st_lib.h
rename to doomgeneric/st_lib.h
similarity index 100%
rename from fbdoom/st_stuff.c
rename to doomgeneric/st_stuff.c
similarity index 100%
rename from fbdoom/st_stuff.h
rename to doomgeneric/st_stuff.h
similarity index 100%
rename from fbdoom/statdump.c
rename to doomgeneric/statdump.c
similarity index 100%
rename from fbdoom/statdump.h
rename to doomgeneric/statdump.h
similarity index 100%
rename from fbdoom/stubs.c
rename to doomgeneric/stubs.c
similarity index 100%
rename from fbdoom/tables.c
rename to doomgeneric/tables.c
similarity index 100%
rename from fbdoom/tables.h
rename to doomgeneric/tables.h
similarity index 100%
rename from fbdoom/v_patch.h
rename to doomgeneric/v_patch.h
similarity index 100%
rename from fbdoom/v_video.c
rename to doomgeneric/v_video.c
similarity index 100%
rename from fbdoom/v_video.h
rename to doomgeneric/v_video.h
similarity index 100%
rename from fbdoom/w_checksum.c
rename to doomgeneric/w_checksum.c
similarity index 100%
rename from fbdoom/w_checksum.h
rename to doomgeneric/w_checksum.h
similarity index 100%
rename from fbdoom/w_file.c
rename to doomgeneric/w_file.c
similarity index 100%
rename from fbdoom/w_file.h
rename to doomgeneric/w_file.h
similarity index 100%
rename from fbdoom/w_main.c
rename to doomgeneric/w_main.c
similarity index 100%
rename from fbdoom/w_main.h
rename to doomgeneric/w_main.h
similarity index 100%
rename from fbdoom/w_merge.h
rename to doomgeneric/w_merge.h
similarity index 100%
rename from fbdoom/w_wad.c
rename to doomgeneric/w_wad.c
similarity index 100%
rename from fbdoom/w_wad.h
rename to doomgeneric/w_wad.h
similarity index 100%
rename from fbdoom/wi_stuff.c
rename to doomgeneric/wi_stuff.c
similarity index 100%
rename from fbdoom/wi_stuff.h
rename to doomgeneric/wi_stuff.h
similarity index 100%
rename from fbdoom/z_zone.c
rename to doomgeneric/z_zone.c
similarity index 100%
rename from fbdoom/z_zone.h
rename to doomgeneric/z_zone.h
diff --git a/ipx/DOOMNET.C b/ipx/DOOMNET.C
deleted file mode 100644 (file)
index 0f9c55b..0000000
+++ /dev/null
@@ -1,73 +0,0 @@
-//#define DOOM2
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <process.h>
-#include <conio.h>
-#include <dos.h>
-
-#include "doomnet.h"
-//#include "ipxstr.h"
-#include "ipx_frch.h"          // FRENCH VERSION
-
-doomcom_t doomcom;
-int            vectorishooked;
-void interrupt (*olddoomvect) (void);
-
-
-
-/*
-=============
-=
-= LaunchDOOM
-=
-These fields in doomcom should be filled in before calling:
-
-     short     numnodes;      // console is allways node 0
-     short     ticdup;             // 1 = no duplication, 2-5 = dup for 
-slow nets
-     short     extratics;          // 1 = send a backup tic in every 
-packet
-
-        short     consoleplayer; // 0-3 = player number
-        short     numplayers;         // 1-4
-        short     angleoffset;   // 1 = left, 0 = center, -1 = right
-        short     drone;              // 1 = drone
-=============
-*/
-
-void LaunchDOOM (void)
-{
-        char *newargs[99];
-        char adrstring[10];
-        long      flatadr;
-
-// prepare for DOOM
-        doomcom.id = DOOMCOM_ID;
-
-// hook the interrupt vector
-        olddoomvect = getvect (doomcom.intnum);
-     setvect (doomcom.intnum,(void interrupt (*)(void))MK_FP(_CS, 
-(int)NetISR));
-     vectorishooked = 1;
-
-// build the argument list for DOOM, adding a -net &doomcom
-     memcpy (newargs, _argv, (_argc+1)*2);
-        newargs[_argc] = "-net";
-        flatadr = (long)_DS*16 + (unsigned)&doomcom;
-        sprintf (adrstring,"%lu",flatadr);
-        newargs[_argc+1] = adrstring;
-        newargs[_argc+2] = NULL;
-
-        if (!access("doom2.exe",0))
-               spawnv  (P_WAIT, "doom2", newargs);
-        else
-               spawnv  (P_WAIT, "doom", newargs);
-
-        #ifdef DOOM2
-        printf (STR_RETURNED"\n");
-        #else
-        printf ("Returned from DOOM\n");
-        #endif
-}
diff --git a/ipx/DOOMNET.H b/ipx/DOOMNET.H
deleted file mode 100644 (file)
index f0319d9..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
-// doomnet.h
-
-#define PEL_WRITE_ADR   0x3c8
-#define PEL_DATA        0x3c9
-
-#define I_ColorBlack(r,g,b) {outp(PEL_WRITE_ADR,0);outp(PEL_DATA,r);outp(PEL_DATA,g);outp(PEL_DATA,b);};
-
-
-
-#define   MAXNETNODES         8              // max computers in a game
-#define   MAXPLAYERS          4              // 4 players max + drones
-
-
-#define   CMD_SEND  1
-#define   CMD_GET        2
-
-#define   DOOMCOM_ID          0x12345678l
-
-typedef struct
-{
-     long id;
-     short     intnum;             // DOOM executes an int to send commands
-
-// communication between DOOM and the driver
-     short     command;       // CMD_SEND or CMD_GET
-     short     remotenode;         // dest for send, set by get (-1 = no packet)
-     short     datalength;         // bytes in doomdata to be sent / bytes read
-
-// info common to all nodes
-     short     numnodes;      // console is allways node 0
-     short     ticdup;             // 1 = no duplication, 2-5 = dup for slow nets
-     short     extratics;          // 1 = send a backup tic in every packet
-     short     deathmatch;         // 1 = deathmatch
-     short     savegame;      // -1 = new game, 0-5 = load savegame
-     short     episode;       // 1-3
-     short     map;           // 1-9
-     short     skill;              // 1-5
-
-// info specific to this node
-     short     consoleplayer; // 0-3 = player number
-     short     numplayers;         // 1-4
-     short     angleoffset;   // 1 = left, 0 = center, -1 = right
-     short     drone;              // 1 = drone
-
-// packet data to be sent
-     char data[512];
-} doomcom_t;
-
-
-
-extern    doomcom_t doomcom;
-extern    void interrupt (*olddoomvect) (void);
-extern    int            vectorishooked;
-
-int CheckParm (char *check);
-void LaunchDOOM (void);
-void interrupt NetISR (void);
-
diff --git a/ipx/IPXNET.C b/ipx/IPXNET.C
deleted file mode 100644 (file)
index f2fa935..0000000
+++ /dev/null
@@ -1,294 +0,0 @@
-// ipxnet.c
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <dos.h>
-#include <string.h>
-#include <process.h>
-#include <values.h>
-
-#include "ipxnet.h"
-
-/*
-==========================================================================
-===
-
-                              IPX PACKET DRIVER
-
-==========================================================================
-===
-*/
-
-packet_t        packets[NUMPACKETS];
-
-nodeadr_t      nodeadr[MAXNETNODES+1];  // first is local, last is broadcast
-
-nodeadr_t      remoteadr;               // set by each GetPacket
-
-localadr_t          localadr;           // set at startup
-
-extern int socketid;
-
-void far (*IPX)(void);
-
-long           localtime;          // for time stamp in packets
-long           remotetime;
-
-//===========================================================================
-
-int OpenSocket(short socketNumber)
-{
-     _DX = socketNumber;
-     _BX = 0;
-     _AL = 0;
-     IPX();
-     if(_AL)
-         Error ("OpenSocket: 0x%x", _AL);
-     return _DX;
-}
-
-
-void CloseSocket(short socketNumber)
-{
-     _DX = socketNumber;
-     _BX = 1;
-     IPX();
-}
-
-void ListenForPacket(ECB *ecb)
-{
-     _SI = FP_OFF(ecb);
-     _ES = FP_SEG(ecb);
-     _BX = 4;
-     IPX();
-     if(_AL)
-          Error ("ListenForPacket: 0x%x", _AL);
-}
-
-
-void GetLocalAddress (void)
-{
-     _SI = FP_OFF(&localadr);
-     _ES = FP_SEG(&localadr);
-     _BX = 9;
-     IPX();
-}
-
-
-
-/*
-====================
-=
-= InitNetwork
-=
-====================
-*/
-
-void InitNetwork (void)
-{
-     int     i,j;
-
-//
-// get IPX function address
-//
-     _AX = 0x7a00;
-     geninterrupt(0x2f);
-     if(_AL != 0xff)
-         Error ("IPX not detected\n");
-     IPX = MK_FP(_ES, _DI);
-
-
-//
-// allocate a socket for sending and receiving
-//
-     socketid = OpenSocket ( (socketid>>8) + ((socketid&255)<<8) );
-
-     GetLocalAddress();
-
-//
-// set up several receiving ECBs
-//
-     memset (packets,0,NUMPACKETS*sizeof(packet_t));
-
-     for (i=1 ; i<NUMPACKETS ; i++)
-     {
-          packets[i].ecb.ECBSocket = socketid;
-          packets[i].ecb.FragmentCount = 1;
-          packets[i].ecb.fAddress[0] = FP_OFF(&packets[i].ipx);
-          packets[i].ecb.fAddress[1] = FP_SEG(&packets[i].ipx);
-          packets[i].ecb.fSize = sizeof(packet_t)-sizeof(ECB);
-
-          ListenForPacket (&packets[i].ecb);
-     }
-
-//
-// set up a sending ECB
-//
-     memset (&packets[0],0,sizeof(packets[0]));
-
-     packets[0].ecb.ECBSocket = socketid;
-     packets[0].ecb.FragmentCount = 2;
-     packets[0].ecb.fAddress[0] = FP_OFF(&packets[0].ipx);
-     packets[0].ecb.fAddress[1] = FP_SEG(&packets[0].ipx);
-     for (j=0 ; j<4 ; j++)
-          packets[0].ipx.dNetwork[j] = localadr.network[j];
-     packets[0].ipx.dSocket[0] = socketid&255;
-     packets[0].ipx.dSocket[1] = socketid>>8;
-     packets[0].ecb.f2Address[0] = FP_OFF(&doomcom.data);
-     packets[0].ecb.f2Address[1] = FP_SEG(&doomcom.data);
-
-// known local node at 0
-     for (i=0 ; i<6 ; i++)
-         nodeadr[0].node[i] = localadr.node[i];
-
-// broadcast node at MAXNETNODES
-     for (j=0 ; j<6 ; j++)
-          nodeadr[MAXNETNODES].node[j] = 0xff;
-}
-
-
-/*
-====================
-=
-= ShutdownNetwork
-=
-====================
-*/
-
-void ShutdownNetwork (void)
-{
-       if (IPX)
-                       CloseSocket (socketid);
-}
-
-
-/*
-==============
-=
-= SendPacket
-=
-= A destination of MAXNETNODES is a broadcast
-==============
-*/
-
-void SendPacket (int destination)
-{
-     int             j;
-
-// set the time
-     packets[0].time = localtime;
-
-// set the address
-          for (j=0 ; j<6 ; j++)
-               packets[0].ipx.dNode[j] = 
-packets[0].ecb.ImmediateAddress[j] =
-               nodeadr[destination].node[j];
-
-// set the length (ipx + time + datalength)
-     packets[0].ecb.fSize = sizeof(IPXPacket) + 4;
-     packets[0].ecb.f2Size = doomcom.datalength + 4;
-
-// send the packet
-     _SI = FP_OFF(&packets[0]);
-     _ES = FP_SEG(&packets[0]);
-     _BX = 3;
-     IPX();
-     if(_AL)
-          Error("SendPacket: 0x%x", _AL);
-
-     while(packets[0].ecb.InUseFlag != 0)
-     {
-          // IPX Relinquish Control - polled drivers MUST have this here!
-          _BX = 10;
-          IPX();
-     }
-}
-
-
-unsigned short ShortSwap (unsigned short i)
-{
-     return ((i&255)<<8) + ((i>>8)&255);
-}
-
-/*
-==============
-=
-= GetPacket
-=
-= Returns false if no packet is waiting
-=
-==============
-*/
-
-int GetPacket (void)
-{
-     int             packetnum;
-     int             i, j;
-     long           besttic;
-     packet_t       *packet;
-
-// if multiple packets are waiting, return them in order by time
-
-     besttic = MAXLONG;
-     packetnum = -1;
-     doomcom.remotenode = -1;
-
-     for ( i = 1 ; i < NUMPACKETS ; i++)
-     {
-          if (packets[i].ecb.InUseFlag)
-          {
-               continue;
-          }
-
-          if (packets[i].time < besttic)
-          {
-               besttic = packets[i].time;
-               packetnum = i;
-          }
-     }
-
-     if (besttic == MAXLONG)
-          return 0;                           // no packets
-
-     packet = &packets[packetnum];
-
-     if (besttic == -1 && localtime != -1)
-     {
-          ListenForPacket (&packet->ecb);
-         return 0;             // setup broadcast from other game
-     }
-
-     remotetime = besttic;
-
-//
-// got a good packet
-//
-     if (packet->ecb.CompletionCode)
-         Error ("GetPacket: ecb.ComletionCode = 0x%x",packet->ecb.CompletionCode);
-
-// set remoteadr to the sender of the packet
-     memcpy (&remoteadr, packet->ipx.sNode, sizeof(remoteadr));
-     for (i=0 ; i<doomcom.numnodes ; i++)
-          if (!memcmp(&remoteadr, &nodeadr[i], sizeof(remoteadr)))
-               break;
-     if (i < doomcom.numnodes)
-          doomcom.remotenode = i;
-     else
-     {
-         if (localtime != -1)
-          {    // this really shouldn't happen
-               ListenForPacket (&packet->ecb);
-               return 0;
-          }
-     }
-
-// copy out the data
-     doomcom.datalength = ShortSwap(packet->ipx.PacketLength) - 38;
-     memcpy (&doomcom.data, &packet->data, doomcom.datalength);
-
-// repost the ECB
-     ListenForPacket (&packet->ecb);
-
-     return 1;
-}
-
diff --git a/ipx/IPXNET.H b/ipx/IPXNET.H
deleted file mode 100644 (file)
index 2c5e14d..0000000
+++ /dev/null
@@ -1,117 +0,0 @@
-// ipxnet.h
-
-
-typedef struct
-{
-     char private[512];
-} doomdata_t;
-
-
-#include "DoomNet.h"
-
-//===========================================================================
-
-#define NUMPACKETS      10              // max outstanding packets before loss
-
-// setupdata_t is used as doomdata_t during setup
-typedef struct
-{
-     short     gameid;                       // so multiple games can setup at once
-     short     drone;
-     short     nodesfound;
-     short     nodeswanted;
-} setupdata_t;
-
-
-
-typedef unsigned char BYTE;
-typedef unsigned short WORD;
-typedef unsigned long LONG;
-
-typedef struct IPXPacketStructure
-{
-     WORD    PacketCheckSum;         /* high-low */
-     WORD    PacketLength;           /* high-low */
-     BYTE    PacketTransportControl;
-     BYTE    PacketType;
-
-     BYTE    dNetwork[4];            /* high-low */
-     BYTE    dNode[6];               /* high-low */
-     BYTE    dSocket[2];             /* high-low */
-
-     BYTE    sNetwork[4];            /* high-low */
-     BYTE    sNode[6];               /* high-low */
-     BYTE    sSocket[2];             /* high-low */
-} IPXPacket;
-
-
-typedef struct
-{
-     BYTE    network[4];             /* high-low */
-     BYTE    node[6];                /* high-low */
-} localadr_t;
-
-typedef struct
-{
-     BYTE    node[6];                /* high-low */
-} nodeadr_t;
-
-typedef struct ECBStructure
-{
-     WORD    Link[2];                /* offset-segment */
-     WORD    ESRAddress[2];          /* offset-segment */
-     BYTE    InUseFlag;
-     BYTE    CompletionCode;
-     WORD    ECBSocket;              /* high-low */
-     BYTE    IPXWorkspace[4];        /* N/A */
-     BYTE    DriverWorkspace[12];    /* N/A */
-     BYTE    ImmediateAddress[6];    /* high-low */
-     WORD    FragmentCount;          /* low-high */
-
-     WORD    fAddress[2];            /* offset-segment */
-     WORD    fSize;                  /* low-high */
-
-     WORD    f2Address[2];            /* offset-segment */
-     WORD    f2Size;                  /* low-high */
-} ECB;
-
-
-// time is used by the communication driver to sequence packets returned
-// to DOOM when more than one is waiting
-
-typedef struct
-{
-     ECB             ecb;
-     IPXPacket       ipx;
-
-     long           time;
-     doomdata_t          data;
-} packet_t;
-
-
-extern    doomcom_t doomcom;
-extern    int            gameid;
-
-extern    nodeadr_t nodeadr[MAXNETNODES+1];
-extern    int            localnodenum;
-
-extern    long           localtime;          // for time stamp in packets
-extern    long      remotetime;         // timestamp of last packet gotten
-
-extern    nodeadr_t remoteadr;
-
-extern   int   myargc;
-
-extern   char  **myargv;
-
-void Error (char *error, ...);
-
-
-void InitNetwork (void);
-void ShutdownNetwork (void);
-void SendPacket (int destination);
-int GetPacket (void);
-int CheckParm (char *check);
-
-void PrintAddress (nodeadr_t *adr, char *str);
-
diff --git a/ipx/IPXSETUP.C b/ipx/IPXSETUP.C
deleted file mode 100644 (file)
index c5f3099..0000000
+++ /dev/null
@@ -1,420 +0,0 @@
-// ipxsetup.c
-
-#define DOOM2
-
-#include <conio.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <dos.h>
-#include <string.h>
-#include <process.h>
-#include <stdarg.h>
-#include <bios.h>
-
-#include "ipxnet.h"
-//#include "ipxstr.h"
-#include "ipx_frch.h"  // FRENCH VERSION
-
-int gameid;
-int numnetnodes;
-int socketid = 0x869c;        // 0x869c is the official DOOM socket
-int    myargc;
-char **myargv;
-
-setupdata_t    nodesetup[MAXNETNODES];
-
-
-/*
-=================
-=
-= Error
-=
-= For abnormal program terminations
-=
-=================
-*/
-
-void Error (char *error, ...)
-{
-     va_list argptr;
-
-     if (vectorishooked)
-          setvect (doomcom.intnum,olddoomvect);
-
-     va_start (argptr,error);
-     vprintf (error,argptr);
-     va_end (argptr);
-        printf ("\n");
-     ShutdownNetwork ();
-     exit (1);
-}
-
-
-/*
-=================
-=
-= CheckParm
-=
-= Checks for the given parameter in the program's command line arguments
-=
-= Returns the argument number (1 to argc-1) or 0 if not present
-=
-=================
-*/
-
-int CheckParm(char *parm)
-     {
-     int i;
-
-        for(i = 1; i < myargc; i++)
-                 if(stricmp(parm, myargv[i]) == 0)
-               return i;
-
-     return 0;
-     }
-
-
-/*
-=============
-=
-= NetISR
-=
-=============
-*/
-
-void interrupt NetISR (void)
-{
-     if (doomcom.command == CMD_SEND)
-     {
-          localtime++;
-          SendPacket (doomcom.remotenode);
-     }
-        else if (doomcom.command == CMD_GET)
-     {
-          GetPacket ();
-     }
-}
-
-
-
-/*
-===================
-=
-= LookForNodes
-=
-= Finds all the nodes for the game and works out player numbers among 
-them
-=
-= Exits with nodesetup[0..numnodes] and nodeadr[0..numnodes] filled in
-===================
-*/
-
-void LookForNodes (void)
-{
-     int             i,j,k;
-     int             netids[MAXNETNODES];
-     int             netplayer[MAXNETNODES];
-        struct time         time;
-     int                 oldsec;
-     setupdata_t         *setup, *dest;
-     char           str[80];
-     int            total, console;
-
-//
-// wait until we get [numnetnodes] packets, then start playing
-// the playernumbers are assigned by netid
-//
-        printf(STR_ATTEMPT, numnetnodes);
-
-        printf (STR_LOOKING);
-
-     oldsec = -1;
-     setup = (setupdata_t *)&doomcom.data;
-     localtime = -1;          // in setup time, not game time
-
-//
-// build local setup info
-//
-     nodesetup[0].nodesfound = 1;
-        nodesetup[0].nodeswanted = numnetnodes;
-     doomcom.numnodes = 1;
-
-     do
-     {
-//
-// check for aborting
-//
-          while ( bioskey(1) )
-          {
-               if ( (bioskey (0) & 0xff) == 27)
-                                       Error ("\n\n"STR_NETABORT);
-                 }
-
-//
-// listen to the network
-//
-                 while (GetPacket ())
-                 {
-                          if (doomcom.remotenode == -1)
-                                       dest = &nodesetup[doomcom.numnodes];
-                          else
-                                       dest = &nodesetup[doomcom.remotenode];
-
-                          if (remotetime != -1)
-                          {    // an early game packet, not a setup packet
-                                       if (doomcom.remotenode == -1)
-                        Error (STR_UNKNOWN);
-                       // if it allready started, it must have found all nodes
-                   dest->nodesfound = dest->nodeswanted;
-                   continue;
-              }
-
-              // update setup ingo
-              memcpy (dest, setup, sizeof(*dest) );
-
-              if (doomcom.remotenode != -1)
-                   continue;           // allready know that node address
-
-              //
-              // this is a new node
-              //
-                  memcpy (&nodeadr[doomcom.numnodes], &remoteadr
-               , sizeof(nodeadr[doomcom.numnodes]) );
-
-               //
-               // if this node has a lower address, take all startup info
-               //
-               if ( memcmp (&remoteadr, &nodeadr[0], sizeof(&remoteadr) ) 
-< 0 )
-               {
-               }
-
-               doomcom.numnodes++;
-
-                          printf ("\n"STR_FOUND"\n");
-
-               if (doomcom.numnodes < numnetnodes)
-                                       printf (STR_LOOKING);
-          }
-//
-// we are done if all nodes have found all other nodes
-//
-          for (i=0 ; i<doomcom.numnodes ; i++)
-               if (nodesetup[i].nodesfound != nodesetup[i].nodeswanted)
-                    break;
-
-                 if (i == nodesetup[0].nodeswanted)
-                          break;         // got them all
-
-//
-// send out a broadcast packet every second
-//
-                 gettime (&time);
-                 if (time.ti_sec == oldsec)
-                          continue;
-                 oldsec = time.ti_sec;
-
-                 printf (".");
-                 doomcom.datalength = sizeof(*setup);
-
-                 nodesetup[0].nodesfound = doomcom.numnodes;
-
-                 memcpy (&doomcom.data, &nodesetup[0], sizeof(*setup));
-
-                 SendPacket (MAXNETNODES);     // send to all
-
-        } while (1);
-
-//
-// count players
-//
-        total = 0;
-        console = 0;
-
-     for (i=0 ; i<numnetnodes ; i++)
-     {
-          if (nodesetup[i].drone)
-               continue;
-          total++;
-          if (total > MAXPLAYERS)
-                          Error (STR_MORETHAN,MAXPLAYERS);
-          if (memcmp (&nodeadr[i], &nodeadr[0], sizeof(nodeadr[0])) < 0)
-               console++;
-     }
-
-
-     if (!total)
-                 Error (STR_NONESPEC);
-
-        doomcom.consoleplayer = console;
-        doomcom.numplayers = total;
-
-        printf (STR_CONSOLEIS"\n", console+1, total);
-}
-
-
-//========================================================
-//
-//     Find a Response File
-//
-//========================================================
-void FindResponseFile (void)
-{
-       int             i;
-       #define MAXARGVS        100
-
-       for (i = 1;i < myargc;i++)
-               if (myargv[i][0] == '@')
-               {
-                       FILE *          handle;
-                       int             size;
-                       int             k;
-                       int             index;
-                       int             indexinfile;
-                       char    *infile;
-                       char    *file;
-                       char    *moreargs[20];
-                       char    *firstargv;
-
-                       // READ THE RESPONSE FILE INTO MEMORY
-                       handle = fopen (&myargv[i][1],"rb");
-                       if (!handle)
-                               Error (STR_NORESP);
-                       printf(STR_FOUNDRESP" \"%s\"!\n",strupr(&myargv[i][1]));
-                       fseek (handle,0,SEEK_END);
-                       size = ftell(handle);
-                       fseek (handle,0,SEEK_SET);
-                       file = malloc (size);
-                       fread (file,size,1,handle);
-                       fclose (handle);
-
-                       // KEEP ALL CMDLINE ARGS FOLLOWING @RESPONSEFILE ARG
-                       for (index = 0,k = i+1; k < myargc; k++)
-                               moreargs[index++] = myargv[k];
-
-                       firstargv = myargv[0];
-                       myargv = malloc(sizeof(char *)*MAXARGVS);
-                       memset(myargv,0,sizeof(char *)*MAXARGVS);
-                       myargv[0] = firstargv;
-
-                       infile = file;
-                       indexinfile = k = 0;
-                       indexinfile++;  // SKIP PAST ARGV[0] (KEEP IT)
-                       do
-                       {
-                               myargv[indexinfile++] = infile+k;
-                               while(k < size &&
-                                       ((*(infile+k)>= ' '+1) && (*(infile+k)<='z')))
-                                       k++;
-                               *(infile+k) = 0;
-                               while(k < size &&
-                                       ((*(infile+k)<= ' ') || (*(infile+k)>'z')))
-                                       k++;
-                       } while(k < size);
-
-                       for (k = 0;k < index;k++)
-                               myargv[indexinfile++] = moreargs[k];
-                       myargc = indexinfile;
-
-                       // DISPLAY ARGS
-//                     printf("%d command-line args:\n",myargc);
-//                     for (k=1;k<myargc;k++)
-//                             printf("%s\n",myargv[k]);
-
-                       break;
-               }
-}
-
-
-/*
-=============
-=
-= main
-=
-=============
-*/
-
-void main (void)
-        {
-        int  i;
-        unsigned char far *vector;
-
-//
-// determine game parameters
-//
-        gameid = 0;
-        numnetnodes = 2;
-        doomcom.ticdup = 1;
-        doomcom.extratics = 1;
-        doomcom.episode = 1;
-        doomcom.map = 1;
-        doomcom.skill = 2;
-        doomcom.deathmatch = 0;
-
-        printf("\n"
-                        "-----------------------------\n"
-        #ifdef DOOM2
-                        STR_DOOMNETDRV"\n"
-        #else
-                        "DOOM NETWORK DEVICE DRIVER\n"
-        #endif
-                        "v1.22\n"
-                        "-----------------------------\n");
-
-        myargc = _argc;
-        myargv = _argv;
-        FindResponseFile();
-
-        if((i = CheckParm("-nodes")) != 0)
-                 numnetnodes = atoi(myargv[i+1]);
-
-        if((i = CheckParm("-vector")) != 0)
-                 {
-                 doomcom.intnum = sscanf ("0x%x",myargv[i+1]);
-                 vector = *(char far * far *)(doomcom.intnum*4);
-                 if(vector != NULL && *vector != 0xcf)
-                          {
-                  printf(STR_VECTSPEC"\n", doomcom.intnum);
-                          exit(-1);
-                          }
-                 }
-        else
-                 {
-                 for(doomcom.intnum = 0x60 ; doomcom.intnum <= 0x66 ;
-doomcom.intnum++)
-                          {
-                          vector = *(char far * far *)(doomcom.intnum*4);
-                          if(vector == NULL || *vector == 0xcf)
-                                       break;
-                          }
-                 if(doomcom.intnum == 0x67)
-                          {
-                  printf(STR_NONULL"\n");
-                  exit(-1);
-                  }
-         }
-        printf(STR_COMMVECT"\n",doomcom.intnum);
-
-        if((i = CheckParm("-port")) != 0)
-         {
-         socketid = atoi (myargv[i+1]);
-         printf (STR_USEALT"\n", socketid);
-                 }
-
-        InitNetwork ();
-
-        LookForNodes ();
-
-     localtime = 0;
-
-        LaunchDOOM ();
-
-        ShutdownNetwork ();
-
-        if (vectorishooked)
-                 setvect (doomcom.intnum,olddoomvect);
-
-        exit(0);
-        }
-
-
diff --git a/ipx/IPXSTR.H b/ipx/IPXSTR.H
deleted file mode 100644 (file)
index ac2995a..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-#define STR_NETABORT   "Network game synchronization aborted."
-#define STR_UNKNOWN            "Got an unknown game packet during setup"
-#define STR_FOUND              "Found a node!"
-#define STR_LOOKING            "Looking for a node"
-#define STR_MORETHAN   "More than %i players specified!"
-#define STR_NONESPEC   "No players specified for game!"
-#define STR_CONSOLEIS  "Console is player %i of %i"
-#define STR_NORESP             "No such response file!"
-#define STR_FOUNDRESP   "Found response file"
-#define STR_DOOMNETDRV "DOOM II NETWORK DEVICE DRIVER"
-#define STR_VECTSPEC   "The specified vector (0x%02x) was already hooked."
-#define STR_NONULL     \
-"Warning: no NULL or iret interrupt vectors were found in the 0x60 to 0x66\n"\
-"range.  You can specify a vector with the -vector 0x<num> parameter."
-#define STR_COMMVECT   "Communicating with interrupt vector 0x%x"
-#define STR_USEALT             "Using alternate port %i for network"
-#define STR_RETURNED   "Returned from DOOM II"
-#define STR_ATTEMPT            "Attempting to find all players for %i player net play. "\
-                                               "Press ESC to exit.\n"
diff --git a/ipx/IPX_FRCH.H b/ipx/IPX_FRCH.H
deleted file mode 100644 (file)
index 6178eea..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-#define STR_NETABORT   "Synchronisation du jeu sur r\82seau annul\82e."
-#define STR_UNKNOWN    "Paquet de jeu inconnu durant la configuration"
-#define STR_FOUND              "Noeud d\82tect\82!"
-#define STR_LOOKING            "Recherche d'un noeud"
-#define STR_MORETHAN   "Plus de %i joueurs sp\82cifi\82s!"
-#define STR_NONESPEC   "Pas de joueurs sp\82cifi\82s pour le jeu!"
-#define STR_CONSOLEIS  "Console: joueur %i sur %i"
-#define STR_NORESP             "Ce fichier de r\82ponse n'existe pas!"
-#define STR_FOUNDRESP   "Fichier de r\82ponse trouv\82"
-#define STR_DOOMNETDRV "GESTIONNAIRE DE RESEAU DOOM II"
-#define STR_VECTSPEC   "Le vecteur sp\82cifi\82 (0x%02x) \82tait d\82j\85 connect\82."
-#define STR_NONULL     \
-"Attention: pas de vecteurs d'interruption NULL ou iret trouv\82s entre 0x60 et 0x66.\n"\
-"Vous pouvez sp\82cifier un vecteur avec le param\8atre -vector 0x<num\82ro>."
-#define STR_COMMVECT   "Communication avec le vecteur d'interruption 0x%x"
-#define STR_USEALT             "Utilisation du port alternatif %i pour le r\82seau"
-#define STR_RETURNED   "Retour de DOOM II"
-#define STR_ATTEMPT \
-"Tentatative de recherche de tous les joueurs pour le jeu en riseau `%i jouers\n" \
-"Appuyez sur ECHAP pour quitter.\n"
-
diff --git a/ipx/README b/ipx/README
deleted file mode 100644 (file)
index d96a75b..0000000
+++ /dev/null
@@ -1 +0,0 @@
-This is the source for the DOOM ipx network driver.
diff --git a/sersrc/DOOMNET.C b/sersrc/DOOMNET.C
deleted file mode 100644 (file)
index c027ec7..0000000
+++ /dev/null
@@ -1,126 +0,0 @@
-#include <stdio.h>
-#include <io.h>
-#include <stdlib.h>
-#include <string.h>
-#include <process.h>
-#include <dos.h>
-#include "doomnet.h"
-
-//#include "serstr.h"
-#include "ser_frch.h"          // FRENCH VERSION
-
-#define DOOM2
-
-extern int     myargc;
-extern char **myargv;
-
-doomcom_t      doomcom;
-int                    vectorishooked;
-void interrupt (*olddoomvect) (void);
-
-
-
-/*
-=================
-=
-= CheckParm
-=
-= Checks for the given parameter in the program's command line arguments
-=
-= Returns the argument number (1 to argc-1) or 0 if not present
-=
-=================
-*/
-
-int CheckParm (char *check)
-{
-       int             i;
-
-       for (i = 1;i<myargc;i++)
-               if ( !stricmp(check,myargv[i]) )
-                       return i;
-
-       return 0;
-}
-
-
-/*
-=============
-=
-= LaunchDOOM
-=
-These fields in doomcom should be filled in before calling:
-
-       short   numnodes;               // console is allways node 0
-       short   ticdup;                 // 1 = no duplication, 2-5 = dup for slow nets
-       short   extratics;              // 1 = send a backup tic in every packet
-
-       short   consoleplayer;  // 0-3 = player number
-       short   numplayers;             // 1-4
-       short   angleoffset;    // 1 = left, 0 = center, -1 = right
-       short   drone;                  // 1 = drone
-=============
-*/
-
-void LaunchDOOM (void)
-{
-       char    *newargs[99];
-       char    adrstring[10];
-       long    flatadr;
-       int             p;
-       unsigned char   far     *vector;
-
-// prepare for DOOM
-       doomcom.id = DOOMCOM_ID;
-
-// hook an interrupt vector
-       p= CheckParm ("-vector");
-
-       if (p)
-       {
-               doomcom.intnum = sscanf ("0x%x",_argv[p+1]);
-       }
-       else
-       {
-               for (doomcom.intnum = 0x60 ; doomcom.intnum <= 0x66 ; doomcom.intnum++)
-               {
-                       vector = *(char far * far *)(doomcom.intnum*4);
-                       if ( !vector || *vector == 0xcf )
-                               break;
-               }
-               if (doomcom.intnum == 0x67)
-               {
-                       printf (STR_WARNING);
-                       doomcom.intnum = 0x66;
-               }
-       }
-       printf (STR_COMM"\n",doomcom.intnum);
-
-       olddoomvect = getvect (doomcom.intnum);
-       setvect (doomcom.intnum,NetISR);
-       vectorishooked = 1;
-
-// build the argument list for DOOM, adding a -net &doomcom
-       memcpy (newargs, myargv, (myargc+1)*2);
-       newargs[myargc] = "-net";
-       flatadr = (long)_DS*16 + (unsigned)&doomcom;
-       sprintf (adrstring,"%lu",flatadr);
-       newargs[myargc+1] = adrstring;
-       newargs[myargc+2] = NULL;
-
-//     spawnv  (P_WAIT, "m:\\newdoom\\doom", newargs);
-       if (!access("doom2.exe",0))
-               spawnv  (P_WAIT, "doom2", newargs);
-       else
-               spawnv  (P_WAIT, "doom", newargs);
-
-       #ifdef DOOM2
-       printf (STR_RETURNED"\n");
-       #else
-       printf ("Returned from DOOM\n");
-       #endif
-
-
-}
-
-
diff --git a/sersrc/DOOMNET.H b/sersrc/DOOMNET.H
deleted file mode 100644 (file)
index 06007e6..0000000
+++ /dev/null
@@ -1,60 +0,0 @@
-// doomnet.h
-
-
-#define PEL_WRITE_ADR   0x3c8
-#define PEL_DATA        0x3c9
-
-#define I_ColorBlack(r,g,b) {outp(PEL_WRITE_ADR,0);outp(PEL_DATA,r);outp(PEL_DATA,g);outp(PEL_DATA,b);};
-
-
-
-
-#define        MAXNETNODES             8                       // max computers in a game
-#define        MAXPLAYERS              4                       // 4 players max + drones
-
-
-#define        CMD_SEND        1
-#define        CMD_GET         2
-
-#define        DOOMCOM_ID              0x12345678l
-
-typedef struct
-{
-       long    id;
-       short   intnum;                 // DOOM executes an int to send commands
-
-// communication between DOOM and the driver
-       short   command;                // CMD_SEND or CMD_GET
-       short   remotenode;             // dest for send, set by get (-1 = no packet)
-       short   datalength;             // bytes in doomdata to be sent / bytes read
-
-// info common to all nodes
-       short   numnodes;               // console is allways node 0
-       short   ticdup;                 // 1 = no duplication, 2-5 = dup for slow nets
-       short   extratics;              // 1 = send a backup tic in every packet
-       short   deathmatch;             // 1 = deathmatch
-       short   savegame;               // -1 = new game, 0-5 = load savegame
-       short   episode;                // 1-3
-       short   map;                    // 1-9
-       short   skill;                  // 1-5
-
-// info specific to this node
-       short   consoleplayer;  // 0-3 = player number
-       short   numplayers;             // 1-4
-       short   angleoffset;    // 1 = left, 0 = center, -1 = right
-       short   drone;                  // 1 = drone
-
-// packet data to be sent
-       char    data[512];
-} doomcom_t;
-
-
-
-extern doomcom_t       doomcom;
-extern void interrupt (*olddoomvect) (void);
-extern int                     vectorishooked;
-
-int CheckParm (char *check);
-void LaunchDOOM (void);
-void interrupt NetISR (void);
-
diff --git a/sersrc/PORT.C b/sersrc/PORT.C
deleted file mode 100644 (file)
index d9eb036..0000000
+++ /dev/null
@@ -1,428 +0,0 @@
-// port.c
-
-#include "doomnet.h"
-#include "sersetup.h"
-//#include "serstr.h"
-#include "ser_frch.h"          // FRENCH VERSION
-
-
-void jump_start( void );
-
-void interrupt isr_8250 (void);
-void interrupt isr_16550 (void);
-
-union  REGS    regs;
-struct SREGS   sregs;
-
-que_t          inque, outque;
-
-
-int                    uart;                   // io address
-enum {UART_8250, UART_16550} uart_type;
-int                    irq;
-
-int                    modem_status = -1;
-int                    line_status = -1;
-
-void interrupt (*oldirqvect) (void);
-int                    irqintnum;
-
-int                    comport;
-
-int                    baudbits;
-
-
-/*
-==============
-=
-= GetUart
-=
-==============
-*/
-
-void GetUart (void)
-{
-       char   far *system_data;
-       static int ISA_uarts[] = {0x3f8,0x2f8,0x3e8,0x2e8};
-       static int ISA_IRQs[] = {4,3,4,3};
-       static int MCA_uarts[] = {0x03f8,0x02f8,0x3220,0x3228};
-       static int MCA_IRQs[] = {4,3,3,3};
-       int             p;
-
-       if (CheckParm ("-com2"))
-               comport = 2;
-       else if (CheckParm ("-com3"))
-               comport = 3;
-       else if (CheckParm ("-com4"))
-               comport = 4;
-       else
-               comport = 1;
-
-       regs.h.ah = 0xc0;
-       int86x( 0x15, &regs, &regs, &sregs );
-       if ( regs.x.cflag )
-       {
-               irq = ISA_IRQs[ comport-1 ];
-               uart = ISA_uarts[ comport-1 ];
-               return;
-       }
-       system_data = ( char far *) ( ( (long) sregs.es << 16 ) + regs.x.bx );
-       if ( system_data[ 5 ] & 0x02 )
-       {
-               irq = MCA_IRQs[ comport-1 ];
-               uart = MCA_uarts[ comport-1 ];
-       }
-       else
-       {
-               irq = ISA_IRQs[ comport-1 ];
-               uart = ISA_uarts[ comport-1 ];
-       }
-
-       p = CheckParm ("-port");
-       if (p)
-               sscanf (_argv[p+1],"0x%x",&uart);
-       p = CheckParm ("-irq");
-       if (p)
-               sscanf (_argv[p+1],"%i",&irq);
-
-
-       printf (STR_PORTLOOK" 0x%x, irq %i\n",uart,irq);
-}
-
-
-
-
-/*
-===============
-=
-= InitPort
-=
-===============
-*/
-
-void InitPort (void)
-{
-       int mcr;
-       int     temp;
-       int     u;
-
-//
-// find the irq and io address of the port
-//
-       GetUart ();
-
-//
-// disable all uart interrupts
-//
-       OUTPUT( uart + INTERRUPT_ENABLE_REGISTER, 0 );
-
-//
-// init com port settings
-//
-
-       printf (STR_PORTSET"\n",115200l/baudbits);
-
-// set baud rate
-       OUTPUT(uart + LINE_CONTROL_REGISTER, 0x83);
-       OUTPUT(uart, baudbits);
-       OUTPUT(uart + 1, 0);
-
-// set line control register (N81)
-       OUTPUT(uart + LINE_CONTROL_REGISTER, 0x03);
-
-// set modem control register (OUT2+RTS+DTR)
-       OUTPUT( uart + MODEM_CONTROL_REGISTER,8+2+1);
-
-//
-// check for a 16550
-//
-       if (CheckParm("-8250"))
-       // allow a forced 8250
-       {
-               uart_type = UART_8250;
-               printf (STR_UART8250"\n\n");
-       }
-       else
-       {       
-               OUTPUT ( uart + FIFO_CONTROL_REGISTER,
-                       FCR_FIFO_ENABLE + FCR_TRIGGER_04 );
-               temp = INPUT( uart + INTERRUPT_ID_REGISTER );
-               if ( ( temp & 0xf8 ) == 0xc0 )
-               {
-                       uart_type = UART_16550;
-               }
-               else
-               {
-                       uart_type = UART_8250;
-                       OUTPUT( uart + FIFO_CONTROL_REGISTER, 0 );
-               }
-       }
-
-//
-// clear out any pending uart events
-//
-       printf (STR_CLEARPEND);
-       for (u=0 ; u<16 ; u++)          // clear an entire 16550 silo
-               INPUT( uart + RECEIVE_BUFFER_REGISTER );
-
-       do
-       {
-               switch( u = INPUT( uart + INTERRUPT_ID_REGISTER ) & 7 )
-               {
-               case IIR_MODEM_STATUS_INTERRUPT :
-                       modem_status = INPUT( uart + MODEM_STATUS_REGISTER );
-                       break;
-
-               case IIR_LINE_STATUS_INTERRUPT :
-                       line_status = INPUT( uart + LINE_STATUS_REGISTER );
-                       break;
-
-               case IIR_TX_HOLDING_REGISTER_INTERRUPT :
-                       break;
-
-               case IIR_RX_DATA_READY_INTERRUPT :
-                       INPUT( uart + RECEIVE_BUFFER_REGISTER );
-                       break;
-               }
-       } while (! (u&1) );
-
-
-//
-// hook the irq vector
-//
-       irqintnum = irq + 8;
-
-       oldirqvect = getvect (irqintnum);
-       if (uart_type == UART_16550)
-       {
-               setvect (irqintnum,isr_16550);
-               printf (STR_UART16550"\n\n");
-       }
-       else
-       {
-               setvect (irqintnum,isr_8250);
-               printf (STR_UART8250"\n\n");
-
-       }
-
-
-       OUTPUT( 0x20 + 1, INPUT( 0x20 + 1 ) & ~(1<<irq) );
-
-       CLI();
-
-// enable RX and TX interrupts at the uart
-
-       OUTPUT( uart + INTERRUPT_ENABLE_REGISTER,IER_RX_DATA_READY + IER_TX_HOLDING_REGISTER_EMPTY);
-
-// enable interrupts through the interrupt controller
-
-       OUTPUT( 0x20, 0xc2 );
-
-       STI();
-}
-
-
-/*
-=============
-=
-= ShutdownPort
-=
-=============
-*/
-
-void ShutdownPort ( void )
-{
-       int             u;
-       
-       OUTPUT( uart + INTERRUPT_ENABLE_REGISTER, 0 );
-       OUTPUT( uart + MODEM_CONTROL_REGISTER, 0 );
-
-       for (u=0 ; u<16 ; u++)          // clear an entire 16550 silo
-               INPUT( uart + RECEIVE_BUFFER_REGISTER );
-
-       OUTPUT( 0x20 + 1, INPUT( 0x20 + 1 ) | (1<<irq) );
-
-       setvect (irqintnum,oldirqvect);
-
-//
-// init com port settings to defaults
-//
-       regs.x.ax = 0xf3;               //f3= 9600 n 8 1
-       regs.x.dx = comport - 1;
-       int86 (0x14, &regs, &regs);
-}
-
-
-int read_byte( void )
-{
-       int     c;
-
-       if (inque.tail >= inque.head)
-               return -1;
-       c = inque.data[inque.tail&(QUESIZE-1)];
-       inque.tail++;
-       return c;
-}
-
-
-void write_byte( int c )
-{
-       outque.data[outque.head&(QUESIZE-1)] = c;
-       outque.head++;
-}
-
-
-
-//==========================================================================
-
-
-/*
-==============
-=
-= isr_8250
-=
-==============
-*/
-
-void interrupt isr_8250(void)
-{
-       int c;
-
-       while (1)
-       {
-               switch( INPUT( uart + INTERRUPT_ID_REGISTER ) & 7 )
-               {
-// not enabled
-               case IIR_MODEM_STATUS_INTERRUPT :
-                       modem_status = INPUT( uart + MODEM_STATUS_REGISTER );
-                       break;
-
-// not enabled
-               case IIR_LINE_STATUS_INTERRUPT :
-                       line_status = INPUT( uart + LINE_STATUS_REGISTER );
-                       break;
-
-//
-// transmit
-//
-               case IIR_TX_HOLDING_REGISTER_INTERRUPT :
-//I_ColorBlack (63,0,0);
-                       if (outque.tail < outque.head)
-                       {
-                               c = outque.data[outque.tail&(QUESIZE-1)];
-                               outque.tail++;
-                               OUTPUT( uart + TRANSMIT_HOLDING_REGISTER, c );
-                       }
-                       break;
-
-//
-// receive
-//
-               case IIR_RX_DATA_READY_INTERRUPT :
-//I_ColorBlack (0,63,0);
-                       c = INPUT( uart + RECEIVE_BUFFER_REGISTER );
-                       inque.data[inque.head&(QUESIZE-1)] = c;
-                       inque.head++;
-                       break;
-
-//
-// done
-//
-               default :
-//I_ColorBlack (0,0,0);
-                       OUTPUT( 0x20, 0x20 );
-                       return;
-               }
-       }
-}
-
-
-/*
-==============
-=
-= isr_16550
-=
-==============
-*/
-
-void interrupt isr_16550(void)
-{
-       int c;
-       int     count;
-
-       while (1)
-       {
-               switch( INPUT( uart + INTERRUPT_ID_REGISTER ) & 7 )
-               {
-// not enabled
-               case IIR_MODEM_STATUS_INTERRUPT :
-                       modem_status = INPUT( uart + MODEM_STATUS_REGISTER );
-                       break;
-
-// not enabled
-               case IIR_LINE_STATUS_INTERRUPT :
-                       line_status = INPUT( uart + LINE_STATUS_REGISTER );
-                       break;
-
-//
-// transmit
-//
-               case IIR_TX_HOLDING_REGISTER_INTERRUPT :
-//I_ColorBlack (63,0,0);
-                       count = 16;
-                       while (outque.tail < outque.head && count--)
-                       {
-                               c = outque.data[outque.tail&(QUESIZE-1)];
-                               outque.tail++;
-                               OUTPUT( uart + TRANSMIT_HOLDING_REGISTER, c );
-                       }
-                       break;
-
-//
-// receive
-//
-               case IIR_RX_DATA_READY_INTERRUPT :
-//I_ColorBlack (0,63,0);
-                       do
-                       {
-                               c = INPUT( uart + RECEIVE_BUFFER_REGISTER );
-                               inque.data[inque.head&(QUESIZE-1)] = c;
-                               inque.head++;
-                       } while (INPUT( uart + LINE_STATUS_REGISTER ) & LSR_DATA_READY );
-
-                       break;
-
-//
-// done
-//
-               default :
-//I_ColorBlack (0,0,0);
-                       OUTPUT( 0x20, 0x20 );
-                       return;
-               }
-       }
-}
-
-
-/*
-===============
-=
-= jump_start
-=
-= Start up the transmition interrupts by sending the first char
-===============
-*/
-
-void jump_start( void )
-{
-       int c;
-
-       if (outque.tail < outque.head)
-       {
-               c = outque.data [outque.tail&(QUESIZE-1)];
-               outque.tail++;
-               OUTPUT( uart, c );
-       }
-}
-
-
diff --git a/sersrc/README.TXT b/sersrc/README.TXT
deleted file mode 100644 (file)
index 94ce053..0000000
+++ /dev/null
@@ -1 +0,0 @@
-This is the source for the DOOM serial / modem driver.
diff --git a/sersrc/SERSETUP.C b/sersrc/SERSETUP.C
deleted file mode 100644 (file)
index eeee006..0000000
+++ /dev/null
@@ -1,680 +0,0 @@
-// sersetup.c
-#define DOOM2
-#include "sersetup.h"
-//#include "serstr.h"
-#include "ser_frch.h"          // FRENCH VERSION
-#include "DoomNet.h"
-
-extern que_t           inque, outque;
-
-void jump_start( void );
-extern int     uart;
-
-int                    usemodem;
-char           startup[256], shutdown[256], baudrate[256];
-
-extern         int baudbits;
-
-void ModemCommand (char *str);
-
-int            myargc;
-char   **myargv;
-
-//======================================
-//
-// I_Error
-//
-//======================================
-void I_Error(char *string)
-{
-       printf("%s\n",string);
-       exit(1);
-}
-
-/*
-================
-=
-= write_buffer
-=
-================
-*/
-
-void write_buffer( char *buffer, unsigned int count )
-{
-       int     i;
-
-// if this would overrun the buffer, throw everything else out
-       if (outque.head-outque.tail+count > QUESIZE)
-               outque.tail = outque.head;
-
-       while (count--)
-               write_byte (*buffer++);
-
-       if ( INPUT( uart + LINE_STATUS_REGISTER ) & 0x40)
-               jump_start();
-}
-
-
-/*
-=================
-=
-= Error
-=
-= For abnormal program terminations
-=
-=================
-*/
-
-void Error (char *error, ...)
-{
-       va_list argptr;
-
-       if (usemodem)
-       {
-               printf ("\n");
-               printf ("\n"STR_DROPDTR"\n");
-
-               OUTPUT(uart+MODEM_CONTROL_REGISTER, INPUT(uart+MODEM_CONTROL_REGISTER)&~MCR_DTR);
-               delay (1250);
-               OUTPUT( uart + MODEM_CONTROL_REGISTER, INPUT( uart + MODEM_CONTROL_REGISTER ) | MCR_DTR );
-               ModemCommand("+++");
-               delay (1250);
-               ModemCommand(shutdown);
-               delay (1250);
-
-       }
-
-       ShutdownPort ();
-
-       if (vectorishooked)
-               setvect (doomcom.intnum,olddoomvect);
-
-       if (error)
-       {
-               va_start (argptr,error);
-               vprintf (error,argptr);
-               va_end (argptr);
-               printf ("\n");
-               exit (1);
-       }
-
-       printf (STR_CLEANEXIT"\n");
-       exit (0);
-}
-
-
-/*
-================
-=
-= ReadPacket
-=
-================
-*/
-
-#define MAXPACKET      512
-#define        FRAMECHAR       0x70
-
-char   packet[MAXPACKET];
-int            packetlen;
-int            inescape;
-int            newpacket;
-
-boolean ReadPacket (void)
-{
-       int     c;
-
-// if the buffer has overflowed, throw everything out
-
-       if (inque.head-inque.tail > QUESIZE - 4)        // check for buffer overflow
-       {
-               inque.tail = inque.head;
-               newpacket = true;
-               return false;
-       }
-
-       if (newpacket)
-       {
-               packetlen = 0;
-               newpacket = 0;
-       }
-
-       do
-       {
-               c = read_byte ();
-               if (c < 0)
-                       return false;           // haven't read a complete packet
-//printf ("%c",c);
-               if (inescape)
-               {
-                       inescape = false;
-                       if (c!=FRAMECHAR)
-                       {
-                               newpacket = 1;
-                               return true;    // got a good packet
-                       }
-               }
-               else if (c==FRAMECHAR)
-               {
-                       inescape = true;
-                       continue;                       // don't know yet if it is a terminator
-               }                                               // or a literal FRAMECHAR
-
-               if (packetlen >= MAXPACKET)
-                       continue;                       // oversize packet
-               packet[packetlen] = c;
-               packetlen++;
-       } while (1);
-
-}
-
-
-/*
-=============
-=
-= WritePacket
-=
-=============
-*/
-
-
-
-void WritePacket (char *buffer, int len)
-{
-       int             b;
-       char    static localbuffer[MAXPACKET*2+2];
-
-       b = 0;
-       if (len > MAXPACKET)
-               return;
-
-       while (len--)
-       {
-               if (*buffer == FRAMECHAR)
-                       localbuffer[b++] = FRAMECHAR;   // escape it for literal
-               localbuffer[b++] = *buffer++;
-       }
-
-       localbuffer[b++] = FRAMECHAR;
-       localbuffer[b++] = 0;
-
-       write_buffer (localbuffer, b);
-}
-
-
-/*
-=============
-=
-= NetISR
-=
-=============
-*/
-
-void interrupt NetISR (void)
-{
-       if (doomcom.command == CMD_SEND)
-       {
-//I_ColorBlack (0,0,63);
-               WritePacket ((char *)&doomcom.data, doomcom.datalength);
-       }
-       else if (doomcom.command == CMD_GET)
-       {
-//I_ColorBlack (63,63,0);
-
-               if (ReadPacket () && packetlen <= sizeof(doomcom.data) )
-               {
-                       doomcom.remotenode = 1;
-                       doomcom.datalength = packetlen;
-                       memcpy (&doomcom.data, &packet, packetlen);
-               }
-               else
-                       doomcom.remotenode = -1;
-
-       }
-//I_ColorBlack (0,0,0);
-}
-
-
-
-
-/*
-=================
-=
-= Connect
-=
-= Figures out who is player 0 and 1
-=================
-*/
-
-void Connect (void)
-{
-       struct time     time;
-       int                     oldsec;
-       int                     localstage, remotestage;
-       char            str[20];
-       char            idstr[7];
-       char            remoteidstr[7];
-       unsigned long           idnum;
-       int                     i;
-       
-//
-// wait for a good packet
-//
-       printf (STR_ATTEMPT"\n");
-
-//
-// build a (hopefully) unique id string by hashing up the current milliseconds
-// and the interrupt table
-//
-       if (CheckParm ("-player1"))
-               idnum = 0;
-       else if (CheckParm ("-player2"))
-               idnum = 999999;
-       else
-       {
-               gettime (&time);
-               idnum = time.ti_sec*100+time.ti_hund;
-               for (i=0 ; i<512 ; i++)
-                       idnum += ((unsigned far *)0)[i];
-               idnum %= 1000000;
-       }
-       
-       idstr[0] = '0' + idnum/ 100000l;
-       idnum -= (idstr[0]-'0')*100000l;
-       idstr[1] = '0' + idnum/ 10000l;
-       idnum -= (idstr[1]-'0')*10000l;
-       idstr[2] = '0' + idnum/ 1000l;
-       idnum -= (idstr[2]-'0')*1000l;
-       idstr[3] = '0' + idnum/ 100l;
-       idnum -= (idstr[3]-'0')*100l;
-       idstr[4] = '0' + idnum/ 10l;
-       idnum -= (idstr[4]-'0')*10l;
-       idstr[5] = '0' + idnum;
-       idstr[6] = 0;
-       
-//
-// sit in a loop until things are worked out
-//
-// the packet is:  ID000000_0
-// the first field is the idnum, the second is the acknowledge stage
-// ack stage starts out 0, is bumped to 1 after the other computer's id
-// is known, and is bumped to 2 after the other computer has raised to 1
-//
-       oldsec = -1;
-       localstage = remotestage = 0;
-
-       do
-       {
-               while ( bioskey(1) )
-               {
-                       if ( (bioskey (0) & 0xff) == 27)
-                               Error ("\n\n"STR_NETABORT);
-               }
-
-               if (ReadPacket ())
-               {
-                       packet[packetlen] = 0;
-                       printf ("read : %s\n",packet);
-                       if (packetlen != 10)
-                               continue;
-                       if (strncmp(packet,"ID",2) )
-                               continue;
-                       if (!strncmp (packet+2,idstr,6))
-                               Error ("\n\n"STR_DUPLICATE);
-                       strncpy (remoteidstr,packet+2,6);
-                               
-                       remotestage = packet[9] - '0';
-                       localstage = remotestage+1;
-                       oldsec = -1;
-               }
-
-               gettime (&time);
-               if (time.ti_sec != oldsec)
-               {
-                       oldsec = time.ti_sec;
-                       sprintf (str,"ID%s_%i",idstr,localstage);
-                       WritePacket (str,strlen(str));
-                       printf ("wrote: %s\n",str);
-               }
-
-       } while (localstage < 2);
-
-//
-// decide who is who
-//
-       if (strcmp(remoteidstr,idstr) > 0)
-               doomcom.consoleplayer = 0;
-       else
-               doomcom.consoleplayer = 1;
-       
-
-//
-// flush out any extras
-//
-       while (ReadPacket ())
-       ;
-}
-
-
-
-/*
-==============
-=
-= ModemCommand
-=
-==============
-*/
-
-void ModemCommand (char *str)
-{
-       int             i,l;
-       
-       printf (STR_MODEMCMD,str);
-       l = strlen(str);
-       for (i=0 ; i<l ; i++)
-       {
-               write_buffer (str+i,1);
-               printf ("%c",str[i]);
-               delay (100);
-       }
-
-       write_buffer ("\r",1);
-       printf ("\n");
-}
-
-
-/*
-==============
-=
-= ModemResponse
-=
-= Waits for OK, RING, CONNECT, etc
-==============
-*/
-
-char   response[80];
-
-void ModemResponse (char *resp)
-{
-       int             c;
-       int             respptr;
-
-       do
-       {
-               printf (STR_MODEMRESP);
-               respptr=0;
-               do
-               {
-                       while ( bioskey(1) )
-                       {
-                               if ( (bioskey (0) & 0xff) == 27)
-                                       Error ("\n"STR_RESPABORT);
-                       }
-                       c = read_byte ();
-                       if (c==-1)
-                               continue;
-                       if (c=='\n' || respptr == 79)
-                       {
-                               response[respptr] = 0;
-                               printf ("%s\n",response);
-                               break;
-                       }
-                       if (c>=' ')
-                       {
-                               response[respptr] = c;
-                               respptr++;
-                       }
-               } while (1);
-
-       } while (strncmp(response,resp,strlen(resp)));
-}
-
-
-/*
-=============
-=
-= ReadLine
-=
-=============
-*/
-
-void ReadLine (FILE *f, char *dest)
-{
-       int     c;
-
-       do
-       {
-               c = fgetc (f);
-               if (c == EOF || c == '\r' || c == '\n')
-                       break;
-               *dest++ = c;
-       } while (1);
-       *dest = 0;
-}
-
-
-/*
-=============
-=
-= ReadModemCfg
-=
-=============
-*/
-
-void ReadModemCfg (void)
-{
-       int             mcr;
-       FILE    *f;
-       unsigned        baud;
-
-       f = fopen ("modem.cfg","r");
-       if (!f)
-               Error (STR_CANTREAD);
-       ReadLine (f, startup);
-       ReadLine (f, shutdown);
-       ReadLine (f, baudrate);
-       fclose (f);
-
-       baud = atol(baudrate);
-       if (baud)
-               baudbits = 115200l/baud;
-
-       usemodem = true;
-}
-
-
-/*
-=============
-=
-= Dial
-=
-=============
-*/
-
-void Dial (void)
-{
-       char    cmd[80];
-       int             p;
-
-       ModemCommand(startup);
-       ModemResponse ("OK");
-
-       printf ("\n"STR_DIALING"\n\n");
-       p = CheckParm ("-dial");
-       sprintf (cmd,"ATDT%s",myargv[p+1]);
-
-       ModemCommand(cmd);
-       ModemResponse (STR_CONNECT);
-       doomcom.consoleplayer = 1;
-}
-
-
-/*
-=============
-=
-= Answer
-=
-=============
-*/
-
-void Answer (void)
-{
-       ModemCommand(startup);
-       ModemResponse ("OK");
-       printf ("\n"STR_WAITRING"\n\n");
-
-       ModemResponse (STR_RING);
-       ModemCommand ("ATA");
-       ModemResponse (STR_CONNECT);
-
-       doomcom.consoleplayer = 0;
-}
-
-//========================================================
-//
-//     Find a Response File
-//
-//========================================================
-void FindResponseFile (void)
-{
-       int             i;
-       #define MAXARGVS        100
-
-       for (i = 1;i < myargc;i++)
-               if (myargv[i][0] == '@')
-               {
-                       FILE *          handle;
-                       int             size;
-                       int             k;
-                       int             index;
-                       int             indexinfile;
-                       char    *infile;
-                       char    *file;
-                       char    *moreargs[20];
-                       char    *firstargv;
-
-                       // READ THE RESPONSE FILE INTO MEMORY
-                       handle = fopen (&myargv[i][1],"rb");
-                       if (!handle)
-                               I_Error (STR_NORESP);
-                       printf("Found response file \"%s\"!\n",strupr(&myargv[i][1]));
-                       fseek (handle,0,SEEK_END);
-                       size = ftell(handle);
-                       fseek (handle,0,SEEK_SET);
-                       file = malloc (size);
-                       fread (file,size,1,handle);
-                       fclose (handle);
-
-                       // KEEP ALL CMDLINE ARGS FOLLOWING @RESPONSEFILE ARG
-                       for (index = 0,k = i+1; k < myargc; k++)
-                               moreargs[index++] = myargv[k];
-
-                       firstargv = myargv[0];
-                       myargv = malloc(sizeof(char *)*MAXARGVS);
-                       memset(myargv,0,sizeof(char *)*MAXARGVS);
-                       myargv[0] = firstargv;
-
-                       infile = file;
-                       indexinfile = k = 0;
-                       indexinfile++;  // SKIP PAST ARGV[0] (KEEP IT)
-                       do
-                       {
-                               myargv[indexinfile++] = infile+k;
-                               while(k < size &&
-                                       ((*(infile+k)>= ' '+1) && (*(infile+k)<='z')))
-                                       k++;
-                               *(infile+k) = 0;
-                               while(k < size &&
-                                       ((*(infile+k)<= ' ') || (*(infile+k)>'z')))
-                                       k++;
-                       } while(k < size);
-
-                       for (k = 0;k < index;k++)
-                               myargv[indexinfile++] = moreargs[k];
-                       myargc = indexinfile;
-
-                       // DISPLAY ARGS
-//                     printf("%d command-line args:\n",myargc);
-//                     for (k=1;k<myargc;k++)
-//                             printf("%s\n",myargv[k]);
-
-                       break;
-               }
-}
-
-
-
-/*
-=================
-=
-= main
-=
-=================
-*/
-
-void main(void)
-{
-       int                             p;
-
-//
-// set network characteristics
-//
-       doomcom.ticdup = 1;
-       doomcom.extratics = 0;
-       doomcom.numnodes = 2;
-       doomcom.numplayers = 2;
-       doomcom.drone = 0;
-
-       printf("\n"
-                  "---------------------------------\n"
-                  #ifdef DOOM2
-                  STR_DOOMSERIAL"\n"
-                  #else
-                  "DOOM SERIAL DEVICE DRIVER v1.4\n"
-                  #endif
-                  "---------------------------------\n");
-       myargc = _argc;
-       myargv = _argv;
-       FindResponseFile();
-
-//
-// allow override of automatic player ordering to allow a slower computer
-// to be set as player 1 allways
-//
-
-//
-// establish communications
-//
-
-       baudbits = 0x08;                // default to 9600 if not specified on cmd line
-                                                       // or in modem.cfg
-
-       if (CheckParm ("-dial") || CheckParm ("-answer") )
-               ReadModemCfg ();                // may set baudbits
-
-//
-// allow command-line override of modem.cfg baud rate
-//
-       if (CheckParm ("-9600")) baudbits = 0x0c;
-       else if (CheckParm ("-14400")) baudbits = 0x08;
-       else if (CheckParm ("-19200")) baudbits = 0x06;
-       else if (CheckParm ("-38400")) baudbits = 0x03;
-       else if (CheckParm ("-57600")) baudbits = 0x02;
-       else if (CheckParm ("-115200")) baudbits = 0x01;
-
-       InitPort ();
-
-       if (CheckParm ("-dial"))
-               Dial ();
-       else if (CheckParm ("-answer"))
-               Answer ();
-
-       Connect ();
-
-//
-// launch DOOM
-//
-       LaunchDOOM ();
-
-       Error (NULL);
-}
-
diff --git a/sersrc/SERSETUP.H b/sersrc/SERSETUP.H
deleted file mode 100644 (file)
index 7bb8f5e..0000000
+++ /dev/null
@@ -1,102 +0,0 @@
-#include <conio.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <conio.h>
-#include <ctype.h>
-#include <dos.h>
-#include <process.h>
-#include <stdarg.h>
-#include <bios.h>
-#include <ctype.h>
-
-
-#define INPUT(port)            inportb(port)
-#define OUTPUT(port,data)      outportb(port,data)
-#define CLI()               disable()
-#define STI()               enable()
-
-
-typedef enum {false, true} boolean;
-typedef unsigned char byte;
-
-
-#define TRANSMIT_HOLDING_REGISTER            0x00
-#define RECEIVE_BUFFER_REGISTER              0x00
-#define INTERRUPT_ENABLE_REGISTER            0x01
-#define   IER_RX_DATA_READY                  0x01
-#define   IER_TX_HOLDING_REGISTER_EMPTY      0x02
-#define   IER_LINE_STATUS                    0x04
-#define   IER_MODEM_STATUS                   0x08
-#define INTERRUPT_ID_REGISTER                0x02
-#define   IIR_MODEM_STATUS_INTERRUPT         0x00
-#define   IIR_TX_HOLDING_REGISTER_INTERRUPT  0x02
-#define   IIR_RX_DATA_READY_INTERRUPT        0x04
-#define   IIR_LINE_STATUS_INTERRUPT          0x06
-#define FIFO_CONTROL_REGISTER                0x02
-#define   FCR_FIFO_ENABLE                    0x01
-#define   FCR_RCVR_FIFO_RESET                0x02
-#define   FCR_XMIT_FIFO_RESET                0x04
-#define   FCR_RCVR_TRIGGER_LSB               0x40
-#define   FCR_RCVR_TRIGGER_MSB               0x80
-#define   FCR_TRIGGER_01                     0x00
-#define   FCR_TRIGGER_04                     0x40
-#define   FCR_TRIGGER_08                     0x80
-#define   FCR_TRIGGER_14                     0xc0
-#define LINE_CONTROL_REGISTER                0x03
-#define   LCR_WORD_LENGTH_MASK               0x03
-#define   LCR_WORD_LENGTH_SELECT_0           0x01
-#define   LCR_WORD_LENGTH_SELECT_1           0x02
-#define   LCR_STOP_BITS                      0x04
-#define   LCR_PARITY_MASK                    0x38
-#define   LCR_PARITY_ENABLE                  0x08
-#define   LCR_EVEN_PARITY_SELECT             0x10
-#define   LCR_STICK_PARITY                   0x20
-#define   LCR_SET_BREAK                      0x40
-#define   LCR_DLAB                           0x80
-#define MODEM_CONTROL_REGISTER               0x04
-#define   MCR_DTR                            0x01
-#define   MCR_RTS                            0x02
-#define   MCR_OUT1                           0x04
-#define   MCR_OUT2                           0x08
-#define   MCR_LOOPBACK                       0x10
-#define LINE_STATUS_REGISTER                 0x05
-#define   LSR_DATA_READY                     0x01
-#define   LSR_OVERRUN_ERROR                  0x02
-#define   LSR_PARITY_ERROR                   0x04
-#define   LSR_FRAMING_ERROR                  0x08
-#define   LSR_BREAK_DETECT                   0x10
-#define   LSR_THRE                           0x20
-#define MODEM_STATUS_REGISTER                0x06
-#define   MSR_DELTA_CTS                      0x01
-#define   MSR_DELTA_DSR                      0x02
-#define   MSR_TERI                           0x04
-#define   MSR_DELTA_CD                       0x08
-#define   MSR_CTS                            0x10
-#define   MSR_DSR                            0x20
-#define   MSR_RI                             0x40
-#define   MSR_CD                             0x80
-#define DIVISOR_LATCH_LOW                    0x00
-#define DIVISOR_LATCH_HIGH                   0x01
-
-
-
-#define        QUESIZE 2048
-
-typedef struct
-{
-       long    head, tail;             // bytes are put on head and pulled from tail
-       unsigned char   data[QUESIZE];
-} que_t;
-
-void InitPort (void);
-void ShutdownPort (void);
-
-int read_byte( void );
-void write_byte( int c );
-
-
-void Error (char *error, ...);
-
-extern int             argc;
-extern char    **argv;
diff --git a/sersrc/SERSTR.H b/sersrc/SERSTR.H
deleted file mode 100644 (file)
index 39ce5dc..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-#define STR_DROPDTR            "Dropping DTR"
-#define STR_CLEANEXIT  "Clean exit from SERSETUP"
-#define STR_ATTEMPT            "Attempting to connect across serial link, press escape to abort."
-#define STR_NETABORT   "Network game synchronization aborted."
-#define STR_DUPLICATE  "Duplicate id string, try again or check modem init string."
-#define STR_MODEMCMD   "Modem command : "
-#define STR_MODEMRESP  "Modem response: "
-#define STR_RESPABORT  "Modem response aborted."
-#define STR_CANTREAD   "Couldn't read MODEM.CFG"
-#define STR_DIALING            "Dialing..."
-#define STR_CONNECT            "CONNECT"
-#define STR_WAITRING   "Waiting for ring..."
-#define STR_RING               "RING"
-#define STR_NORESP             "No such response file!"
-#define STR_DOOMSERIAL "DOOM II SERIAL DEVICE DRIVER v1.4"
-#define STR_WARNING \
-"Warning: no NULL or iret interrupt vectors were found in the 0x60 to 0x66\n"\
-"range.  You can specify a vector with the -vector 0x<num> parameter.\n"
-#define STR_COMM               "Communicating with interrupt vector 0x%x"
-#define STR_RETURNED   "Returned from DOOM II"
-#define STR_PORTSET            "Setting port to %lu baud"
diff --git a/sersrc/SER_FRCH.H b/sersrc/SER_FRCH.H
deleted file mode 100644 (file)
index f265058..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-#define STR_DROPDTR            "Abandon de DTR"
-#define STR_CLEANEXIT  "Sortie normale de SERSETUP"
-#define STR_ATTEMPT            "Tentative de connexion en s\82rie, appuyez sur ESC pour annuler."
-#define STR_NETABORT   "Synchronisation de jeu sur r\82seau annul\82e."
-#define STR_DUPLICATE  "Cha\8cne id en double. R\82essayez ou v\82rifiez la cha\8cne d'initialistion du modem."
-#define STR_MODEMCMD   "Commande du modem: "
-#define STR_MODEMRESP  "R\82ponse du modem: "
-#define STR_RESPABORT  "R\82ponse du modem annul\82e."
-#define STR_CANTREAD   "Lecture de MODEM.CFG impossible"
-#define STR_DIALING            "Composition du num\82ro..."
-#define STR_CONNECT            "CONNECTION"
-#define STR_WAITRING   "Attente d'appel..."
-#define STR_RING               "APPEL"
-#define STR_NORESP             "Ce fichier de r\82ponse n'existe pas!"
-#define STR_DOOMSERIAL "GESTIONNAIRE DE LIAISON SERIE DOOM II v1.4"
-#define STR_WARNING \
-"Attention: pas de vecteurs d'interruption NULL ou iret trouv\82s entre 0x60 et 0x66.\n"\
-"Vous pouvez sp\82cifier un vecteur avec le param\8atre -vector 0x<num\82ro>."
-#define STR_COMM               "Communication avec le vecteur d'interruption 0x%x"
-#define STR_RETURNED   "Retour de DOOM II"
-#define STR_PORTLOOK   "Recherche de l'UART sur le port"
-#define STR_UART8250   "UART = 8250"
-#define STR_UART16550  "UART = 16550"
-#define STR_CLEARPEND  "Riinitilisation des interruptions en attente.\n"
-#define STR_PORTSET            "Réglage du port Ã  %lu baud"
diff --git a/sndserv/Makefile b/sndserv/Makefile
deleted file mode 100644 (file)
index 239ad57..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-##########################################################
-#
-# $Id:$
-#
-# $Log:$
-#
-#
-
-CC=gcc
-CFLAGS=-O -DNORMALUNIX -DLINUX
-LDFLAGS=
-LIBS=-lm
-
-O=linux
-
-all:    $(O)/sndserver
-
-clean:
-       rm -f *.o *~ *.flc
-       rm -f linux/*
-
-# Target
-$(O)/sndserver: \
-       $(O)/soundsrv.o \
-       $(O)/sounds.o \
-       $(O)/wadread.o \
-       $(O)/linux.o
-       $(CC) $(CFLAGS) $(LDFLAGS) \
-       $(O)/soundsrv.o \
-       $(O)/sounds.o \
-       $(O)/wadread.o \
-       $(O)/linux.o -o $(O)/sndserver $(LIBS)
-       echo make complete.
-
-# Rule
-$(O)/%.o: %.c
-       $(CC) $(CFLAGS) -c $< -o $@
-
-
diff --git a/sndserv/README.sndserv b/sndserv/README.sndserv
deleted file mode 100644 (file)
index 8a607e2..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-
-This is the soundserver as used by the original
-Linuxdoom release. I separated the source from
-the actual Linuxduum source. For various reasons
-the separate sound process seems to give the
-best results - both synchronous and timer driven
-output demonstrate glitches. These might either
-be timing issues, or introduced by the changes
-I made to the linux sound code while merging it
-back into the main tree.
-
-Note that neither John Carmack nor Dave Taylor
-are responsible for the current sound handling.
-
\ No newline at end of file
diff --git a/sndserv/linux.c b/sndserv/linux.c
deleted file mode 100644 (file)
index 93b067d..0000000
+++ /dev/null
@@ -1,118 +0,0 @@
-// Emacs style mode select   -*- C++ -*- 
-//-----------------------------------------------------------------------------
-//
-// $Id: linux.c,v 1.3 1997/01/26 07:45:01 b1 Exp $
-//
-// Copyright (C) 1993-1996 by id Software, Inc.
-//
-// This source is available for distribution and/or modification
-// only under the terms of the DOOM Source Code License as
-// published by id Software. All rights reserved.
-//
-// The source is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License
-// for more details.
-//
-//
-// $Log: linux.c,v $
-// Revision 1.3  1997/01/26 07:45:01  b1
-// 2nd formatting run, fixed a few warnings as well.
-//
-// Revision 1.2  1997/01/21 19:00:01  b1
-// First formatting run:
-//  using Emacs cc-mode.el indentation for C++ now.
-//
-// Revision 1.1  1997/01/19 17:22:45  b1
-// Initial check in DOOM sources as of Jan. 10th, 1997
-//
-//
-// DESCRIPTION:
-//     UNIX, soundserver for Linux i386.
-//
-//-----------------------------------------------------------------------------
-
-static const char rcsid[] = "$Id: linux.c,v 1.3 1997/01/26 07:45:01 b1 Exp $";
-
-
-#include <stdlib.h>
-#include <stdio.h>
-#include <fcntl.h>
-#include <unistd.h>
-
-#include <linux/soundcard.h>
-
-#include "soundsrv.h"
-
-int    audio_fd;
-
-void
-myioctl
-( int  fd,
-  int  command,
-  int* arg )
-{   
-    int                rc;
-    extern int errno;
-    
-    rc = ioctl(fd, command, arg);  
-    if (rc < 0)
-    {
-       fprintf(stderr, "ioctl(dsp,%d,arg) failed\n", command);
-       fprintf(stderr, "errno=%d\n", errno);
-       exit(-1);
-    }
-}
-
-void I_InitMusic(void)
-{
-}
-
-void
-I_InitSound
-( int  samplerate,
-  int  samplesize )
-{
-
-    int i;
-                
-    audio_fd = open("/dev/dsp", O_WRONLY);
-    if (audio_fd<0)
-        fprintf(stderr, "Could not open /dev/dsp\n");
-         
-                     
-    i = 11 | (2<<16);                                           
-    myioctl(audio_fd, SNDCTL_DSP_SETFRAGMENT, &i);
-                    
-    myioctl(audio_fd, SNDCTL_DSP_RESET, 0);
-    i=11025;
-    myioctl(audio_fd, SNDCTL_DSP_SPEED, &i);
-    i=1;    
-    myioctl(audio_fd, SNDCTL_DSP_STEREO, &i);
-            
-    myioctl(audio_fd, SNDCTL_DSP_GETFMTS, &i);
-    if (i&=AFMT_S16_LE)    
-        myioctl(audio_fd, SNDCTL_DSP_SETFMT, &i);
-    else
-        fprintf(stderr, "Could not play signed 16 data\n");
-
-}
-
-void
-I_SubmitOutputBuffer
-( void*        samples,
-  int  samplecount )
-{
-    write(audio_fd, samples, samplecount*4);
-}
-
-void I_ShutdownSound(void)
-{
-
-    close(audio_fd);
-
-}
-
-void I_ShutdownMusic(void)
-{
-}
diff --git a/sndserv/sounds.c b/sndserv/sounds.c
deleted file mode 100644 (file)
index 2cdea16..0000000
+++ /dev/null
@@ -1,239 +0,0 @@
-// Emacs style mode select   -*- C++ -*- 
-//-----------------------------------------------------------------------------
-//
-// $Id: sounds.c,v 1.3 1997/01/29 22:40:44 b1 Exp $
-//
-// Copyright (C) 1993-1996 by id Software, Inc.
-//
-// This source is available for distribution and/or modification
-// only under the terms of the DOOM Source Code License as
-// published by id Software. All rights reserved.
-//
-// The source is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License
-// for more details.
-//
-//
-// $Log: sounds.c,v $
-// Revision 1.3  1997/01/29 22:40:44  b1
-// Reformatting, S (sound) module files.
-//
-// Revision 1.2  1997/01/21 19:00:07  b1
-// First formatting run:
-//  using Emacs cc-mode.el indentation for C++ now.
-//
-// Revision 1.1  1997/01/19 17:22:50  b1
-// Initial check in DOOM sources as of Jan. 10th, 1997
-//
-//
-// DESCRIPTION:
-//     Created by Dave Taylor's sound utility.
-//     Kept as a sample, DOOM sounds.
-//
-//-----------------------------------------------------------------------------
-
-
-static const char rcsid[] = "$Id: sounds.c,v 1.3 1997/01/29 22:40:44 b1 Exp $";
-
-
-
-// Not exactly a good idea.
-enum { false, true };
-
-#include "sounds.h"
-
-//
-// Information about all the music
-//
-
-musicinfo_t S_music[] =
-{
-    { 0 },
-    { "e1m1", 0 },
-    { "e1m2", 0 },
-    { "e1m3", 0 },
-    { "e1m4", 0 },
-    { "e1m5", 0 },
-    { "e1m6", 0 },
-    { "e1m7", 0 },
-    { "e1m8", 0 },
-    { "e1m9", 0 },
-    { "e2m1", 0 },
-    { "e2m2", 0 },
-    { "e2m3", 0 },
-    { "e2m4", 0 },
-    { "e2m5", 0 },
-    { "e2m6", 0 },
-    { "e2m7", 0 },
-    { "e2m8", 0 },
-    { "e2m9", 0 },
-    { "e3m1", 0 },
-    { "e3m2", 0 },
-    { "e3m3", 0 },
-    { "e3m4", 0 },
-    { "e3m5", 0 },
-    { "e3m6", 0 },
-    { "e3m7", 0 },
-    { "e3m8", 0 },
-    { "e3m9", 0 },
-    { "inter", 0 },
-    { "intro", 0 },
-    { "bunny", 0 },
-    { "victor", 0 },
-    { "introa", 0 },
-    { "runnin", 0 },
-    { "stalks", 0 },
-    { "countd", 0 },
-    { "betwee", 0 },
-    { "doom", 0 },
-    { "the_da", 0 },
-    { "shawn", 0 },
-    { "ddtblu", 0 },
-    { "in_cit", 0 },
-    { "dead", 0 },
-    { "stlks2", 0 },
-    { "theda2", 0 },
-    { "doom2", 0 },
-    { "ddtbl2", 0 },
-    { "runni2", 0 },
-    { "dead2", 0 },
-    { "stlks3", 0 },
-    { "romero", 0 },
-    { "shawn2", 0 },
-    { "messag", 0 },
-    { "count2", 0 },
-    { "ddtbl3", 0 },
-    { "ampie", 0 },
-    { "theda3", 0 },
-    { "adrian", 0 },
-    { "messg2", 0 },
-    { "romer2", 0 },
-    { "tense", 0 },
-    { "shawn3", 0 },
-    { "openin", 0 },
-    { "evil", 0 },
-    { "ultima", 0 },
-    { "read_m", 0 },
-    { "dm2ttl", 0 },
-    { "dm2int", 0 } 
-};
-
-
-//
-// Information about all the sfx
-//
-
-sfxinfo_t S_sfx[] =
-{
-    { 0 },
-    { "pistol", false, 64, 0, -1, -1, 0 },
-    { "shotgn", false, 64, 0, -1, -1, 0 },
-    { "sgcock", false, 64, 0, -1, -1, 0 },
-    { "dshtgn", false, 64, 0, -1, -1, 0 },
-    { "dbopn", false, 64, 0, -1, -1, 0 },
-    { "dbcls", false, 64, 0, -1, -1, 0 },
-    { "dbload", false, 64, 0, -1, -1, 0 },
-    { "plasma", false, 64, 0, -1, -1, 0 },
-    { "bfg", false, 64, 0, -1, -1, 0 },
-    { "sawup", false, 64, 0, -1, -1, 0 },
-    { "sawidl", false, 118, 0, -1, -1, 0 },
-    { "sawful", false, 64, 0, -1, -1, 0 },
-    { "sawhit", false, 64, 0, -1, -1, 0 },
-    { "rlaunc", false, 64, 0, -1, -1, 0 },
-    { "rxplod", false, 70, 0, -1, -1, 0 },
-    { "firsht", false, 70, 0, -1, -1, 0 },
-    { "firxpl", false, 70, 0, -1, -1, 0 },
-    { "pstart", false, 100, 0, -1, -1, 0 },
-    { "pstop", false, 100, 0, -1, -1, 0 },
-    { "doropn", false, 100, 0, -1, -1, 0 },
-    { "dorcls", false, 100, 0, -1, -1, 0 },
-    { "stnmov", false, 119, 0, -1, -1, 0 },
-    { "swtchn", false, 78, 0, -1, -1, 0 },
-    { "swtchx", false, 78, 0, -1, -1, 0 },
-    { "plpain", false, 96, 0, -1, -1, 0 },
-    { "dmpain", false, 96, 0, -1, -1, 0 },
-    { "popain", false, 96, 0, -1, -1, 0 },
-    { "vipain", false, 96, 0, -1, -1, 0 },
-    { "mnpain", false, 96, 0, -1, -1, 0 },
-    { "pepain", false, 96, 0, -1, -1, 0 },
-    { "slop", false, 78, 0, -1, -1, 0 },
-    { "itemup", true, 78, 0, -1, -1, 0 },
-    { "wpnup", true, 78, 0, -1, -1, 0 },
-    { "oof", false, 96, 0, -1, -1, 0 },
-    { "telept", false, 32, 0, -1, -1, 0 },
-    { "posit1", true, 98, 0, -1, -1, 0 },
-    { "posit2", true, 98, 0, -1, -1, 0 },
-    { "posit3", true, 98, 0, -1, -1, 0 },
-    { "bgsit1", true, 98, 0, -1, -1, 0 },
-    { "bgsit2", true, 98, 0, -1, -1, 0 },
-    { "sgtsit", true, 98, 0, -1, -1, 0 },
-    { "cacsit", true, 98, 0, -1, -1, 0 },
-    { "brssit", true, 94, 0, -1, -1, 0 },
-    { "cybsit", true, 92, 0, -1, -1, 0 },
-    { "spisit", true, 90, 0, -1, -1, 0 },
-    { "bspsit", true, 90, 0, -1, -1, 0 },
-    { "kntsit", true, 90, 0, -1, -1, 0 },
-    { "vilsit", true, 90, 0, -1, -1, 0 },
-    { "mansit", true, 90, 0, -1, -1, 0 },
-    { "pesit", true, 90, 0, -1, -1, 0 },
-    { "sklatk", false, 70, 0, -1, -1, 0 },
-    { "sgtatk", false, 70, 0, -1, -1, 0 },
-    { "skepch", false, 70, 0, -1, -1, 0 },
-    { "vilatk", false, 70, 0, -1, -1, 0 },
-    { "claw", false, 70, 0, -1, -1, 0 },
-    { "skeswg", false, 70, 0, -1, -1, 0 },
-    { "pldeth", false, 32, 0, -1, -1, 0 },
-    { "pdiehi", false, 32, 0, -1, -1, 0 },
-    { "podth1", false, 70, 0, -1, -1, 0 },
-    { "podth2", false, 70, 0, -1, -1, 0 },
-    { "podth3", false, 70, 0, -1, -1, 0 },
-    { "bgdth1", false, 70, 0, -1, -1, 0 },
-    { "bgdth2", false, 70, 0, -1, -1, 0 },
-    { "sgtdth", false, 70, 0, -1, -1, 0 },
-    { "cacdth", false, 70, 0, -1, -1, 0 },
-    { "skldth", false, 70, 0, -1, -1, 0 },
-    { "brsdth", false, 32, 0, -1, -1, 0 },
-    { "cybdth", false, 32, 0, -1, -1, 0 },
-    { "spidth", false, 32, 0, -1, -1, 0 },
-    { "bspdth", false, 32, 0, -1, -1, 0 },
-    { "vildth", false, 32, 0, -1, -1, 0 },
-    { "kntdth", false, 32, 0, -1, -1, 0 },
-    { "pedth", false, 32, 0, -1, -1, 0 },
-    { "skedth", false, 32, 0, -1, -1, 0 },
-    { "posact", true, 120, 0, -1, -1, 0 },
-    { "bgact", true, 120, 0, -1, -1, 0 },
-    { "dmact", true, 120, 0, -1, -1, 0 },
-    { "bspact", true, 100, 0, -1, -1, 0 },
-    { "bspwlk", true, 100, 0, -1, -1, 0 },
-    { "vilact", true, 100, 0, -1, -1, 0 },
-    { "noway", false, 78, 0, -1, -1, 0 },
-    { "barexp", false, 60, 0, -1, -1, 0 },
-    { "punch", false, 64, 0, -1, -1, 0 },
-    { "hoof", false, 70, 0, -1, -1, 0 },
-    { "metal", false, 70, 0, -1, -1, 0 },
-    { "chgun", false, 64, &S_sfx[sfx_pistol], 150, 0, 0 },
-    { "tink", false, 60, 0, -1, -1, 0 },
-    { "bdopn", false, 100, 0, -1, -1, 0 },
-    { "bdcls", false, 100, 0, -1, -1, 0 },
-    { "itmbk", false, 100, 0, -1, -1, 0 },
-    { "flame", false, 32, 0, -1, -1, 0 },
-    { "flamst", false, 32, 0, -1, -1, 0 },
-    { "getpow", false, 60, 0, -1, -1, 0 },
-    { "bospit", false, 70, 0, -1, -1, 0 },
-    { "boscub", false, 70, 0, -1, -1, 0 },
-    { "bossit", false, 70, 0, -1, -1, 0 },
-    { "bospn", false, 70, 0, -1, -1, 0 },
-    { "bosdth", false, 70, 0, -1, -1, 0 },
-    { "manatk", false, 70, 0, -1, -1, 0 },
-    { "mandth", false, 70, 0, -1, -1, 0 },
-    { "sssit", false, 70, 0, -1, -1, 0 },
-    { "ssdth", false, 70, 0, -1, -1, 0 },
-    { "keenpn", false, 70, 0, -1, -1, 0 },
-    { "keendt", false, 70, 0, -1, -1, 0 },
-    { "skeact", false, 70, 0, -1, -1, 0 },
-    { "skesit", false, 70, 0, -1, -1, 0 },
-    { "skeatk", false, 70, 0, -1, -1, 0 },
-    { "radio", false, 60, 0, -1, -1, 0 } 
-};
-
diff --git a/sndserv/sounds.h b/sndserv/sounds.h
deleted file mode 100644 (file)
index fd9279e..0000000
+++ /dev/null
@@ -1,241 +0,0 @@
-// Emacs style mode select   -*- C++ -*- 
-//-----------------------------------------------------------------------------
-//
-// $Id: sounds.h,v 1.3 1997/01/29 22:40:44 b1 Exp $
-//
-// Copyright (C) 1993-1996 by id Software, Inc.
-//
-// This source is available for distribution and/or modification
-// only under the terms of the DOOM Source Code License as
-// published by id Software. All rights reserved.
-//
-// The source is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License
-// for more details.
-//
-//
-// $Log: sounds.h,v $
-// Revision 1.3  1997/01/29 22:40:44  b1
-// Reformatting, S (sound) module files.
-//
-// Revision 1.2  1997/01/21 19:00:07  b1
-// First formatting run:
-//  using Emacs cc-mode.el indentation for C++ now.
-//
-// Revision 1.1  1997/01/19 17:22:50  b1
-// Initial check in DOOM sources as of Jan. 10th, 1997
-//
-//
-// DESCRIPTION:
-//     Created by Dave Taylor's sound utility.
-//     Kept as a sample, DOOM sounds.
-//
-//-----------------------------------------------------------------------------
-
-#ifndef __SOUNDSH__
-#define __SOUNDSH__
-
-#include "soundst.h"
-
-//
-// Identifiers for all music in game.
-//
-
-typedef enum
-{
-    mus_None,
-    mus_e1m1,
-    mus_e1m2,
-    mus_e1m3,
-    mus_e1m4,
-    mus_e1m5,
-    mus_e1m6,
-    mus_e1m7,
-    mus_e1m8,
-    mus_e1m9,
-    mus_e2m1,
-    mus_e2m2,
-    mus_e2m3,
-    mus_e2m4,
-    mus_e2m5,
-    mus_e2m6,
-    mus_e2m7,
-    mus_e2m8,
-    mus_e2m9,
-    mus_e3m1,
-    mus_e3m2,
-    mus_e3m3,
-    mus_e3m4,
-    mus_e3m5,
-    mus_e3m6,
-    mus_e3m7,
-    mus_e3m8,
-    mus_e3m9,
-    mus_inter,
-    mus_intro,
-    mus_bunny,
-    mus_victor,
-    mus_introa,
-    mus_runnin,
-    mus_stalks,
-    mus_countd,
-    mus_betwee,
-    mus_doom,
-    mus_the_da,
-    mus_shawn,
-    mus_ddtblu,
-    mus_in_cit,
-    mus_dead,
-    mus_stlks2,
-    mus_theda2,
-    mus_doom2,
-    mus_ddtbl2,
-    mus_runni2,
-    mus_dead2,
-    mus_stlks3,
-    mus_romero,
-    mus_shawn2,
-    mus_messag,
-    mus_count2,
-    mus_ddtbl3,
-    mus_ampie,
-    mus_theda3,
-    mus_adrian,
-    mus_messg2,
-    mus_romer2,
-    mus_tense,
-    mus_shawn3,
-    mus_openin,
-    mus_evil,
-    mus_ultima,
-    mus_read_m,
-    mus_dm2ttl,
-    mus_dm2int,
-    NUMMUSIC
-} musicenum_t;
-
-
-//
-// Identifiers for all sfx in game.
-//
-
-typedef enum
-{
-    sfx_None,
-    sfx_pistol,
-    sfx_shotgn,
-    sfx_sgcock,
-    sfx_dshtgn,
-    sfx_dbopn,
-    sfx_dbcls,
-    sfx_dbload,
-    sfx_plasma,
-    sfx_bfg,
-    sfx_sawup,
-    sfx_sawidl,
-    sfx_sawful,
-    sfx_sawhit,
-    sfx_rlaunc,
-    sfx_rxplod,
-    sfx_firsht,
-    sfx_firxpl,
-    sfx_pstart,
-    sfx_pstop,
-    sfx_doropn,
-    sfx_dorcls,
-    sfx_stnmov,
-    sfx_swtchn,
-    sfx_swtchx,
-    sfx_plpain,
-    sfx_dmpain,
-    sfx_popain,
-    sfx_vipain,
-    sfx_mnpain,
-    sfx_pepain,
-    sfx_slop,
-    sfx_itemup,
-    sfx_wpnup,
-    sfx_oof,
-    sfx_telept,
-    sfx_posit1,
-    sfx_posit2,
-    sfx_posit3,
-    sfx_bgsit1,
-    sfx_bgsit2,
-    sfx_sgtsit,
-    sfx_cacsit,
-    sfx_brssit,
-    sfx_cybsit,
-    sfx_spisit,
-    sfx_bspsit,
-    sfx_kntsit,
-    sfx_vilsit,
-    sfx_mansit,
-    sfx_pesit,
-    sfx_sklatk,
-    sfx_sgtatk,
-    sfx_skepch,
-    sfx_vilatk,
-    sfx_claw,
-    sfx_skeswg,
-    sfx_pldeth,
-    sfx_pdiehi,
-    sfx_podth1,
-    sfx_podth2,
-    sfx_podth3,
-    sfx_bgdth1,
-    sfx_bgdth2,
-    sfx_sgtdth,
-    sfx_cacdth,
-    sfx_skldth,
-    sfx_brsdth,
-    sfx_cybdth,
-    sfx_spidth,
-    sfx_bspdth,
-    sfx_vildth,
-    sfx_kntdth,
-    sfx_pedth,
-    sfx_skedth,
-    sfx_posact,
-    sfx_bgact,
-    sfx_dmact,
-    sfx_bspact,
-    sfx_bspwlk,
-    sfx_vilact,
-    sfx_noway,
-    sfx_barexp,
-    sfx_punch,
-    sfx_hoof,
-    sfx_metal,
-    sfx_chgun,
-    sfx_tink,
-    sfx_bdopn,
-    sfx_bdcls,
-    sfx_itmbk,
-    sfx_flame,
-    sfx_flamst,
-    sfx_getpow,
-    sfx_bospit,
-    sfx_boscub,
-    sfx_bossit,
-    sfx_bospn,
-    sfx_bosdth,
-    sfx_manatk,
-    sfx_mandth,
-    sfx_sssit,
-    sfx_ssdth,
-    sfx_keenpn,
-    sfx_keendt,
-    sfx_skeact,
-    sfx_skesit,
-    sfx_skeatk,
-    sfx_radio,
-    NUMSFX
-} sfxenum_t;
-
-extern musicinfo_t S_music[];
-extern sfxinfo_t   S_sfx[];
-
-#endif
-
diff --git a/sndserv/soundsrv.c b/sndserv/soundsrv.c
deleted file mode 100644 (file)
index a2fe0b0..0000000
+++ /dev/null
@@ -1,740 +0,0 @@
-// Emacs style mode select   -*- C++ -*- 
-//-----------------------------------------------------------------------------
-//
-// $Id: soundsrv.c,v 1.3 1997/01/29 22:40:44 b1 Exp $
-//
-// Copyright (C) 1993-1996 by id Software, Inc.
-//
-// This source is available for distribution and/or modification
-// only under the terms of the DOOM Source Code License as
-// published by id Software. All rights reserved.
-//
-// The source is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License
-// for more details.
-//
-//
-// $Log: soundsrv.c,v $
-// Revision 1.3  1997/01/29 22:40:44  b1
-// Reformatting, S (sound) module files.
-//
-// Revision 1.2  1997/01/21 19:00:07  b1
-// First formatting run:
-//  using Emacs cc-mode.el indentation for C++ now.
-//
-// Revision 1.1  1997/01/19 17:22:50  b1
-// Initial check in DOOM sources as of Jan. 10th, 1997
-//
-//
-// DESCRIPTION:
-//     UNIX soundserver, run as a separate process,
-//      started by DOOM program.
-//     Originally conceived fopr SGI Irix,
-//      mostly used with Linux voxware.
-//
-//-----------------------------------------------------------------------------
-
-
-static const char rcsid[] = "$Id: soundsrv.c,v 1.3 1997/01/29 22:40:44 b1 Exp $";
-
-
-
-#include <math.h>
-#include <sys/types.h>
-#include <stdio.h>
-#include <fcntl.h>
-#include <sys/ioctl.h>
-#include <unistd.h>
-#include <stdlib.h>
-#include <malloc.h>
-#include <sys/stat.h>
-#include <sys/time.h>
-
-#include "sounds.h"
-#include "soundsrv.h"
-#include "wadread.h"
-
-
-
-//
-// Department of Redundancy Department.
-//
-typedef struct wadinfo_struct
-{
-    // should be IWAD
-    char       identification[4];      
-    int                numlumps;
-    int                infotableofs;
-    
-} wadinfo_t;
-
-
-typedef struct filelump_struct
-{
-    int                filepos;
-    int                size;
-    char       name[8];
-    
-} filelump_t;
-
-
-// an internal time keeper
-static int     mytime = 0;
-
-// number of sound effects
-int            numsounds;
-
-// longest sound effect
-int            longsound;
-
-// lengths of all sound effects
-int            lengths[NUMSFX];
-
-// mixing buffer
-signed short   mixbuffer[MIXBUFFERSIZE];
-
-// file descriptor of sfx device
-int            sfxdevice;                      
-
-// file descriptor of music device
-int            musdevice;                      
-
-// the channel data pointers
-unsigned char* channels[8];
-
-// the channel step amount
-unsigned int   channelstep[8];
-
-// 0.16 bit remainder of last step
-unsigned int   channelstepremainder[8];
-
-// the channel data end pointers
-unsigned char* channelsend[8];
-
-// time that the channel started playing
-int            channelstart[8];
-
-// the channel handles
-int            channelhandles[8];
-
-// the channel left volume lookup
-int*           channelleftvol_lookup[8];
-
-// the channel right volume lookup
-int*           channelrightvol_lookup[8];
-
-// sfx id of the playing sound effect
-int            channelids[8];                  
-
-int            snd_verbose=1;
-
-int            steptable[256];
-
-int            vol_lookup[128*256];
-
-static void derror(char* msg)
-{
-    fprintf(stderr, "error: %s\n", msg);
-    exit(-1);
-}
-
-int mix(void)
-{
-
-    register int               dl;
-    register int               dr;
-    register unsigned int      sample;
-    
-    signed short*              leftout;
-    signed short*              rightout;
-    signed short*              leftend;
-    
-    int                                step;
-
-    leftout = mixbuffer;
-    rightout = mixbuffer+1;
-    step = 2;
-
-    leftend = mixbuffer + SAMPLECOUNT*step;
-
-    // mix into the mixing buffer
-    while (leftout != leftend)
-    {
-
-       dl = 0;
-       dr = 0;
-
-       if (channels[0])
-       {
-           sample = *channels[0];
-           dl += channelleftvol_lookup[0][sample];
-           dr += channelrightvol_lookup[0][sample];
-           channelstepremainder[0] += channelstep[0];
-           channels[0] += channelstepremainder[0] >> 16;
-           channelstepremainder[0] &= 65536-1;
-
-           if (channels[0] >= channelsend[0])
-               channels[0] = 0;
-       }
-
-       if (channels[1])
-       {
-           sample = *channels[1];
-           dl += channelleftvol_lookup[1][sample];
-           dr += channelrightvol_lookup[1][sample];
-           channelstepremainder[1] += channelstep[1];
-           channels[1] += channelstepremainder[1] >> 16;
-           channelstepremainder[1] &= 65536-1;
-
-           if (channels[1] >= channelsend[1])
-               channels[1] = 0;
-       }
-
-       if (channels[2])
-       {
-           sample = *channels[2];
-           dl += channelleftvol_lookup[2][sample];
-           dr += channelrightvol_lookup[2][sample];
-           channelstepremainder[2] += channelstep[2];
-           channels[2] += channelstepremainder[2] >> 16;
-           channelstepremainder[2] &= 65536-1;
-
-           if (channels[2] >= channelsend[2])
-               channels[2] = 0;
-       }
-       
-       if (channels[3])
-       {
-           sample = *channels[3];
-           dl += channelleftvol_lookup[3][sample];
-           dr += channelrightvol_lookup[3][sample];
-           channelstepremainder[3] += channelstep[3];
-           channels[3] += channelstepremainder[3] >> 16;
-           channelstepremainder[3] &= 65536-1;
-
-           if (channels[3] >= channelsend[3])
-               channels[3] = 0;
-       }
-       
-       if (channels[4])
-       {
-           sample = *channels[4];
-           dl += channelleftvol_lookup[4][sample];
-           dr += channelrightvol_lookup[4][sample];
-           channelstepremainder[4] += channelstep[4];
-           channels[4] += channelstepremainder[4] >> 16;
-           channelstepremainder[4] &= 65536-1;
-
-           if (channels[4] >= channelsend[4])
-               channels[4] = 0;
-       }
-       
-       if (channels[5])
-       {
-           sample = *channels[5];
-           dl += channelleftvol_lookup[5][sample];
-           dr += channelrightvol_lookup[5][sample];
-           channelstepremainder[5] += channelstep[5];
-           channels[5] += channelstepremainder[5] >> 16;
-           channelstepremainder[5] &= 65536-1;
-
-           if (channels[5] >= channelsend[5])
-               channels[5] = 0;
-       }
-       
-       if (channels[6])
-       {
-           sample = *channels[6];
-           dl += channelleftvol_lookup[6][sample];
-           dr += channelrightvol_lookup[6][sample];
-           channelstepremainder[6] += channelstep[6];
-           channels[6] += channelstepremainder[6] >> 16;
-           channelstepremainder[6] &= 65536-1;
-
-           if (channels[6] >= channelsend[6])
-               channels[6] = 0;
-       }
-       if (channels[7])
-       {
-           sample = *channels[7];
-           dl += channelleftvol_lookup[7][sample];
-           dr += channelrightvol_lookup[7][sample];
-           channelstepremainder[7] += channelstep[7];
-           channels[7] += channelstepremainder[7] >> 16;
-           channelstepremainder[7] &= 65536-1;
-
-           if (channels[7] >= channelsend[7])
-               channels[7] = 0;
-       }
-
-       // Has been char instead of short.
-       // if (dl > 127) *leftout = 127;
-       // else if (dl < -128) *leftout = -128;
-       // else *leftout = dl;
-
-       // if (dr > 127) *rightout = 127;
-       // else if (dr < -128) *rightout = -128;
-       // else *rightout = dr;
-       
-       if (dl > 0x7fff)
-           *leftout = 0x7fff;
-       else if (dl < -0x8000)
-           *leftout = -0x8000;
-       else
-           *leftout = dl;
-
-       if (dr > 0x7fff)
-           *rightout = 0x7fff;
-       else if (dr < -0x8000)
-           *rightout = -0x8000;
-       else
-           *rightout = dr;
-
-       leftout += step;
-       rightout += step;
-
-    }
-    return 1;
-}
-
-
-
-void
-grabdata
-( int          c,
-  char**       v )
-{
-    int                i;
-    char*      name;
-    char*      doom1wad;
-    char*      doomwad;
-    char*      doomuwad;
-    char*      doom2wad;
-    char*      doom2fwad;
-    // Now where are TNT and Plutonia. Yuck.
-    
-    // char *home;
-    char*      doomwaddir;
-
-    doomwaddir = getenv("DOOMWADDIR");
-
-    if (!doomwaddir)
-       doomwaddir = ".";
-
-    doom1wad = malloc(strlen(doomwaddir)+1+9+1);
-    sprintf(doom1wad, "%s/doom1.wad", doomwaddir);
-
-    doom2wad = malloc(strlen(doomwaddir)+1+9+1);
-    sprintf(doom2wad, "%s/doom2.wad", doomwaddir);
-
-    doom2fwad = malloc(strlen(doomwaddir)+1+10+1);
-    sprintf(doom2fwad, "%s/doom2f.wad", doomwaddir);
-    
-    doomuwad = malloc(strlen(doomwaddir)+1+8+1);
-    sprintf(doomuwad, "%s/doomu.wad", doomwaddir);
-    
-    doomwad = malloc(strlen(doomwaddir)+1+8+1);
-    sprintf(doomwad, "%s/doom.wad", doomwaddir);
-
-    // home = getenv("HOME");
-    // if (!home)
-    //   derror("Please set $HOME to your home directory");
-    // sprintf(basedefault, "%s/.doomrc", home);
-
-
-    for (i=1 ; i<c ; i++)
-    {
-       if (!strcmp(v[i], "-quiet"))
-       {
-           snd_verbose = 0;
-       }
-    }
-
-    numsounds = NUMSFX;
-    longsound = 0;
-
-    if (! access(doom2fwad, R_OK) )
-       name = doom2fwad;
-    else if (! access(doom2wad, R_OK) )
-       name = doom2wad;
-    else if (! access(doomuwad, R_OK) )
-       name = doomuwad;
-    else if (! access(doomwad, R_OK) )
-       name = doomwad;
-    else if (! access(doom1wad, R_OK) )
-       name = doom1wad;
-    // else if (! access(DEVDATA "doom2.wad", R_OK) )
-    //   name = DEVDATA "doom2.wad";
-    //   else if (! access(DEVDATA "doom.wad", R_OK) )
-    //   name = DEVDATA "doom.wad";
-    else
-    {
-       fprintf(stderr, "Could not find wadfile anywhere\n");
-       exit(-1);
-    }
-
-    
-    openwad(name);
-    if (snd_verbose)
-       fprintf(stderr, "loading from [%s]\n", name);
-
-    for (i=1 ; i<NUMSFX ; i++)
-    {
-       if (!S_sfx[i].link)
-       {
-           S_sfx[i].data = getsfx(S_sfx[i].name, &lengths[i]);
-           if (longsound < lengths[i]) longsound = lengths[i];
-       } else {
-           S_sfx[i].data = S_sfx[i].link->data;
-           lengths[i] = lengths[(S_sfx[i].link - S_sfx)/sizeof(sfxinfo_t)];
-       }
-       // test only
-       //  {
-       //  int fd;
-       //  char name[10];
-       //  sprintf(name, "sfx%d", i);
-       //  fd = open(name, O_WRONLY|O_CREAT, 0644);
-       //  write(fd, S_sfx[i].data, lengths[i]);
-       //  close(fd);
-       //  }
-    }
-
-}
-
-static struct timeval          last={0,0};
-//static struct timeval                now;
-
-static struct timezone         whocares;
-
-void updatesounds(void)
-{
-
-    mix();
-    I_SubmitOutputBuffer(mixbuffer, SAMPLECOUNT);
-
-}
-
-int
-addsfx
-( int          sfxid,
-  int          volume,
-  int          step,
-  int          seperation )
-{
-    static unsigned short      handlenums = 0;
-    int                i;
-    int                rc = -1;
-    
-    int                oldest = mytime;
-    int                oldestnum = 0;
-    int                slot;
-    int                rightvol;
-    int                leftvol;
-
-    // play these sound effects
-    //  only one at a time
-    if ( sfxid == sfx_sawup
-        || sfxid == sfx_sawidl
-        || sfxid == sfx_sawful
-        || sfxid == sfx_sawhit
-        || sfxid == sfx_stnmov
-        || sfxid == sfx_pistol )
-    {
-       for (i=0 ; i<8 ; i++)
-       {
-           if (channels[i] && channelids[i] == sfxid)
-           {
-               channels[i] = 0;
-               break;
-           }
-       }
-    }
-
-    for (i=0 ; i<8 && channels[i] ; i++)
-    {
-       if (channelstart[i] < oldest)
-       {
-           oldestnum = i;
-           oldest = channelstart[i];
-       }
-    }
-
-    if (i == 8)
-       slot = oldestnum;
-    else
-       slot = i;
-
-    channels[slot] = (unsigned char *) S_sfx[sfxid].data;
-    channelsend[slot] = channels[slot] + lengths[sfxid];
-
-    if (!handlenums)
-       handlenums = 100;
-    
-    channelhandles[slot] = rc = handlenums++;
-    channelstep[slot] = step;
-    channelstepremainder[slot] = 0;
-    channelstart[slot] = mytime;
-
-    // (range: 1 - 256)
-    seperation += 1;
-
-    // (x^2 seperation)
-    leftvol =
-       volume - (volume*seperation*seperation)/(256*256);
-
-    seperation = seperation - 257;
-
-    // (x^2 seperation)
-    rightvol =
-       volume - (volume*seperation*seperation)/(256*256);      
-
-    // sanity check
-    if (rightvol < 0 || rightvol > 127)
-       derror("rightvol out of bounds");
-    
-    if (leftvol < 0 || leftvol > 127)
-       derror("leftvol out of bounds");
-    
-    // get the proper lookup table piece
-    //  for this volume level
-    channelleftvol_lookup[slot] = &vol_lookup[leftvol*256];
-    channelrightvol_lookup[slot] = &vol_lookup[rightvol*256];
-
-    channelids[slot] = sfxid;
-
-    return rc;
-
-}
-
-
-void outputushort(int num)
-{
-
-    static unsigned char       buff[5] = { 0, 0, 0, 0, '\n' };
-    static char*               badbuff = "xxxx\n";
-
-    // outputs a 16-bit # in hex or "xxxx" if -1.
-    if (num < 0)
-    {
-       write(1, badbuff, 5);
-    }
-    else
-    {
-       buff[0] = num>>12;
-       buff[0] += buff[0] > 9 ? 'a'-10 : '0';
-       buff[1] = (num>>8) & 0xf;
-       buff[1] += buff[1] > 9 ? 'a'-10 : '0';
-       buff[2] = (num>>4) & 0xf;
-       buff[2] += buff[2] > 9 ? 'a'-10 : '0';
-       buff[3] = num & 0xf;
-       buff[3] += buff[3] > 9 ? 'a'-10 : '0';
-       write(1, buff, 5);
-    }
-}
-
-void initdata(void)
-{
-
-    int                i;
-    int                j;
-    
-    int*       steptablemid = steptable + 128;
-
-    for (i=0 ;
-        i<sizeof(channels)/sizeof(unsigned char *) ;
-        i++)
-    {
-       channels[i] = 0;
-    }
-    
-    gettimeofday(&last, &whocares);
-
-    for (i=-128 ; i<128 ; i++)
-       steptablemid[i] = pow(2.0, (i/64.0))*65536.0;
-
-    // generates volume lookup tables
-    //  which also turn the unsigned samples
-    //  into signed samples
-    // for (i=0 ; i<128 ; i++)
-    // for (j=0 ; j<256 ; j++)
-    // vol_lookup[i*256+j] = (i*(j-128))/127;
-    
-    for (i=0 ; i<128 ; i++)
-       for (j=0 ; j<256 ; j++)
-           vol_lookup[i*256+j] = (i*(j-128)*256)/127;
-
-}
-
-
-
-
-void quit(void)
-{
-    I_ShutdownMusic();
-    I_ShutdownSound();
-    exit(0);
-}
-
-
-
-fd_set         fdset;
-fd_set         scratchset;
-
-
-
-int
-main
-( int          c,
-  char**       v )
-{
-
-    int                done = 0;
-    int                rc;
-    int                nrc;
-    int                sndnum;
-    int                handle = 0;
-    
-    unsigned char      commandbuf[10];
-    struct timeval     zerowait = { 0, 0 };
-
-    
-    int        step;
-    int        vol;
-    int                sep;
-    
-    int                i;
-    int                waitingtofinish=0;
-
-    // get sound data
-    grabdata(c, v);
-
-    // init any data
-    initdata();                
-
-    I_InitSound(11025, 16);
-
-    I_InitMusic();
-
-    if (snd_verbose)
-       fprintf(stderr, "ready\n");
-    
-    // parse commands and play sounds until done
-    FD_ZERO(&fdset);
-    FD_SET(0, &fdset);
-
-    while (!done)
-    {
-       mytime++;
-
-       if (!waitingtofinish)
-       {
-           do {
-               scratchset = fdset;
-               rc = select(FD_SETSIZE, &scratchset, 0, 0, &zerowait);
-
-               if (rc > 0)
-               {
-                   //  fprintf(stderr, "select is true\n");
-                   // got a command
-                   nrc = read(0, commandbuf, 1);
-
-                   if (!nrc)
-                   {
-                       done = 1;
-                       rc = 0;
-                   }
-                   else
-                   {
-                       if (snd_verbose)
-                           fprintf(stderr, "cmd: %c", commandbuf[0]);
-
-                       switch (commandbuf[0])
-                       {
-                         case 'p':
-                           // play a new sound effect
-                           read(0, commandbuf, 9);
-
-                           if (snd_verbose)
-                           {
-                               commandbuf[9]=0;
-                               fprintf(stderr, "%s\n", commandbuf);
-                           }
-
-                           commandbuf[0] -=
-                               commandbuf[0]>='a' ? 'a'-10 : '0';
-                           commandbuf[1] -=
-                               commandbuf[1]>='a' ? 'a'-10 : '0';
-                           commandbuf[2] -=
-                               commandbuf[2]>='a' ? 'a'-10 : '0';
-                           commandbuf[3] -=
-                               commandbuf[3]>='a' ? 'a'-10 : '0';
-                           commandbuf[4] -=
-                               commandbuf[4]>='a' ? 'a'-10 : '0';
-                           commandbuf[5] -=
-                               commandbuf[5]>='a' ? 'a'-10 : '0';
-                           commandbuf[6] -=
-                               commandbuf[6]>='a' ? 'a'-10 : '0';
-                           commandbuf[7] -=
-                               commandbuf[7]>='a' ? 'a'-10 : '0';
-
-                           //  p<snd#><step><vol><sep>
-                           sndnum = (commandbuf[0]<<4) + commandbuf[1];
-                           step = (commandbuf[2]<<4) + commandbuf[3];
-                           step = steptable[step];
-                           vol = (commandbuf[4]<<4) + commandbuf[5];
-                           sep = (commandbuf[6]<<4) + commandbuf[7];
-
-                           handle = addsfx(sndnum, vol, step, sep);
-                           // returns the handle
-                           //  outputushort(handle);
-                           break;
-                           
-                         case 'q':
-                           read(0, commandbuf, 1);
-                           waitingtofinish = 1; rc = 0;
-                           break;
-                           
-                         case 's':
-                         {
-                             int fd;
-                             read(0, commandbuf, 3);
-                             commandbuf[2] = 0;
-                             fd = open((char*)commandbuf, O_CREAT|O_WRONLY, 0644);
-                             commandbuf[0] -= commandbuf[0]>='a' ? 'a'-10 : '0';
-                             commandbuf[1] -= commandbuf[1]>='a' ? 'a'-10 : '0';
-                             sndnum = (commandbuf[0]<<4) + commandbuf[1];
-                             write(fd, S_sfx[sndnum].data, lengths[sndnum]);
-                             close(fd);
-                         }
-                         break;
-                         
-                         default:
-                           fprintf(stderr, "Did not recognize command\n");
-                           break;
-                       }
-                   }
-               }
-               else if (rc < 0)
-               {
-                   quit();
-               }
-           } while (rc > 0);
-       }
-
-       updatesounds();
-
-       if (waitingtofinish)
-       {
-           for(i=0 ; i<8 && !channels[i] ; i++);
-           
-           if (i==8)
-               done=1;
-       }
-
-    }
-
-    quit();
-    return 0;
-}
diff --git a/sndserv/soundsrv.h b/sndserv/soundsrv.h
deleted file mode 100644 (file)
index 4dbe916..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
-// Emacs style mode select   -*- C++ -*- 
-//-----------------------------------------------------------------------------
-//
-// $Id: soundsrv.h,v 1.3 1997/01/29 22:40:44 b1 Exp $
-//
-// Copyright (C) 1993-1996 by id Software, Inc.
-//
-// This source is available for distribution and/or modification
-// only under the terms of the DOOM Source Code License as
-// published by id Software. All rights reserved.
-//
-// The source is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License
-// for more details.
-//
-//
-// $Log: soundsrv.h,v $
-// Revision 1.3  1997/01/29 22:40:44  b1
-// Reformatting, S (sound) module files.
-//
-// Revision 1.2  1997/01/21 19:00:07  b1
-// First formatting run:
-//  using Emacs cc-mode.el indentation for C++ now.
-//
-// Revision 1.1  1997/01/19 17:22:50  b1
-// Initial check in DOOM sources as of Jan. 10th, 1997
-//
-//
-// DESCRIPTION:
-//     UNIX soundserver, separate process. 
-//
-//-----------------------------------------------------------------------------
-
-#ifndef __SNDSERVER_H__
-#define __SNDSERVER_H__
-
-#define SAMPLECOUNT            512
-#define MIXBUFFERSIZE  (SAMPLECOUNT*2*2)
-#define SPEED                  11025
-
-
-void I_InitMusic(void);
-
-void
-I_InitSound
-( int          samplerate,
-  int          samplesound );
-
-void
-I_SubmitOutputBuffer
-( void*                samples,
-  int          samplecount );
-
-void I_ShutdownSound(void);
-void I_ShutdownMusic(void);
-
-#endif
diff --git a/sndserv/soundst.h b/sndserv/soundst.h
deleted file mode 100644 (file)
index ed5e258..0000000
+++ /dev/null
@@ -1,312 +0,0 @@
-// Emacs style mode select   -*- C++ -*- 
-//-----------------------------------------------------------------------------
-//
-// $Id: soundst.h,v 1.3 1997/01/29 22:40:45 b1 Exp $
-//
-// Copyright (C) 1993-1996 by id Software, Inc.
-//
-// This source is available for distribution and/or modification
-// only under the terms of the DOOM Source Code License as
-// published by id Software. All rights reserved.
-//
-// The source is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License
-// for more details.
-//
-//
-// $Log: soundst.h,v $
-// Revision 1.3  1997/01/29 22:40:45  b1
-// Reformatting, S (sound) module files.
-//
-// Revision 1.2  1997/01/21 19:00:07  b1
-// First formatting run:
-//  using Emacs cc-mode.el indentation for C++ now.
-//
-// Revision 1.1  1997/01/19 17:22:50  b1
-// Initial check in DOOM sources as of Jan. 10th, 1997
-//
-//
-// DESCRIPTION:
-//     Sound (utility) related. Hang on.
-//     See gensounds.h and gensounds.c for what soundst.h is made of.
-//
-//-----------------------------------------------------------------------------
-
-#ifndef __SOUNDSTH__
-#define __SOUNDSTH__
-
-#define S_MAX_VOLUME           127
-
-// when to clip out sounds
-// Doesn't fit the large outdoor areas.
-#define S_CLIPPING_DIST                (1200*0x10000)
-
-// when sounds should be max'd out
-#define S_CLOSE_DIST           (200*0x10000)
-
-
-#define S_ATTENUATOR           ((S_CLIPPING_DIST-S_CLOSE_DIST)>>FRACBITS)
-
-#define NORM_PITCH                     128
-#define NORM_PRIORITY          64
-#define NORM_VOLUME                    snd_MaxVolume
-
-#define S_PITCH_PERTURB                1
-#define NORM_SEP                       128
-#define S_STEREO_SWING         (96*0x10000)
-
-// % attenuation from front to back
-#define S_IFRACVOL                     30
-
-#define NA                             0
-#define S_NUMCHANNELS          2
-
-
-
-
-//
-// MusicInfo struct.
-//
-typedef struct
-{
-    // up to 6-character name
-    char*      name;
-
-    // lump number of music
-    int                lumpnum;
-    
-    // music data
-    void*      data;
-
-    // music handle once registered
-    int handle;
-    
-} musicinfo_t;
-
-
-
-//
-// SoundFX struct.
-//
-typedef struct sfxinfo_struct  sfxinfo_t;
-
-struct sfxinfo_struct
-{
-    // up to 6-character name
-    char*      name;
-
-    // Sfx singularity (only one at a time)
-    int                singularity;
-
-    // Sfx priority
-    int                priority;
-
-    // referenced sound if a link
-    sfxinfo_t* link;
-
-    // pitch if a link
-    int                pitch;
-
-    // volume if a link
-    int                volume;
-
-    // sound data
-    void*      data;
-
-    // this is checked every second to see if sound
-    // can be thrown out (if 0, then decrement, if -1,
-    // then throw out, if > 0, then it's in use)
-    int                usefulness;
-
-    // lump number of sfx
-    int                lumpnum;                
-};
-
-
-
-typedef struct
-{
-    // sound information (if null, channel avail.)
-    sfxinfo_t* sfxinfo;
-
-    // origin of sound
-    void*      origin;
-
-    // handle of the sound being played
-    int                handle;
-    
-} channel_t;
-
-
-
-enum
-{
-    Music,
-    Sfx,
-    SfxLink
-};
-
-enum
-{
-    PC=1,
-    Adlib=2,
-    SB=4,
-    Midi=8
-}; // cards available
-
-enum
-{
-    sfxThrowOut=-1,
-    sfxNotUsed=0
-};
-
-
-//
-// Initialize the sound code at start of level
-//
-void S_Start(void);
-
-//
-// Start sound for thing at <origin>
-//  using <sound_id> from sounds.h
-//
-extern void
-S_StartSound
-( void*                origin,
-  int          sound_id );
-
-
-
-// Will start a sound at a given volume.
-extern void
-S_StartSoundAtVolume
-( void*                origin,
-  int          sound_id,
-  int          volume );
-
-
-// Stop sound for thing at <origin>
-extern void S_StopSound(void* origin);
-
-// Start music using <music_id> from sounds.h
-extern void S_StartMusic(int music_id);
-
-// Start music using <music_id> from sounds.h,
-//  and set whether looping
-extern void
-S_ChangeMusic
-( int          music_id,
-  int          looping );
-
-
-// Stops the music
-extern void S_StopMusic(void);
-
-void S_PauseSound(void);
-void S_ResumeSound(void);
-
-
-//
-// Updates music & sounds
-//
-extern void S_UpdateSounds(void* listener);
-
-void S_SetMusicVolume(int volume);
-void S_SetSfxVolume(int volume);
-
-//
-// Initializes sound stuff, including volume
-//
-void
-S_Init
-( int  ,
-  int    );
-
-
-
-//
-// SOUND IO
-//
-#define FREQ_LOW               0x40
-#define FREQ_NORM              0x80
-#define FREQ_HIGH              0xff
-
-
-void I_SetMusicVolume(int volume);
-void I_SetSfxVolume(int volume);
-
-//
-//  MUSIC I/O
-//
-void I_PauseSong(int handle);
-void I_ResumeSong(int handle);
-
-//
-// Called by anything that wishes to start music.
-//  plays a song, and when the song is done,
-//  starts playing it again in an endless loop.
-// Horrible thing to do, considering.
-void
-I_PlaySong
-( int          handle,
-  int          looping );
-
-
-// stops a song over 3 seconds.
-void I_StopSong(int handle);
-
-// registers a song handle to song data
-int I_RegisterSong(void *data);
-
-// see above then think backwards
-void I_UnRegisterSong(int handle);
-
-// is the song playing?
-int I_QrySongPlaying(int handle);
-
-
-//
-//  SFX I/O
-//
-void I_SetChannels(int channels);
-
-int I_GetSfxLumpNum (sfxinfo_t*);
-
-
-// Starts a sound in a particular sound channel.
-int
-I_StartSound
-( int          id,
-  void*                data,
-  int          vol,
-  int          sep,
-  int          pitch,
-  int          priority );
-
-
-// Updates the volume, separation,
-//  and pitch of a sound channel.
-void
-I_UpdateSoundParams
-( int          handle,
-  int          vol,
-  int          sep,
-  int          pitch );
-
-
-// Stops a sound channel.
-void I_StopSound(int handle);
-
-// Called by S_*()'s to see if a channel is still playing.
-// Returns 0 if no longer playing, 1 if playing.
-int I_SoundIsPlaying(int handle);
-
-
-// the complete set of sound effects
-extern sfxinfo_t       S_sfx[];
-
-// the complete set of music
-extern musicinfo_t     S_music[];
-
-#endif
diff --git a/sndserv/wadread.c b/sndserv/wadread.c
deleted file mode 100644 (file)
index 4fd61a5..0000000
+++ /dev/null
@@ -1,256 +0,0 @@
-// Emacs style mode select   -*- C++ -*- 
-//-----------------------------------------------------------------------------
-//
-// $Id: wadread.c,v 1.3 1997/01/30 19:54:23 b1 Exp $
-//
-// Copyright (C) 1993-1996 by id Software, Inc.
-//
-// This source is available for distribution and/or modification
-// only under the terms of the DOOM Source Code License as
-// published by id Software. All rights reserved.
-//
-// The source is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License
-// for more details.
-//
-//
-// $Log: wadread.c,v $
-// Revision 1.3  1997/01/30 19:54:23  b1
-// Final reformatting run. All the remains (ST, W, WI, Z).
-//
-// Revision 1.2  1997/01/21 19:00:10  b1
-// First formatting run:
-//  using Emacs cc-mode.el indentation for C++ now.
-//
-// Revision 1.1  1997/01/19 17:22:51  b1
-// Initial check in DOOM sources as of Jan. 10th, 1997
-//
-//
-// DESCRIPTION:
-//     WAD and Lump I/O, the second.
-//     This time for soundserver only.
-//     Welcome to Department of Redundancy Department. Again :-).
-//
-//-----------------------------------------------------------------------------
-
-
-static const char rcsid[] = "$Id: wadread.c,v 1.3 1997/01/30 19:54:23 b1 Exp $";
-
-
-
-#include <malloc.h>
-#include <fcntl.h>
-#include <sys/stat.h>
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include <ctype.h>
-#include <unistd.h>
-
-#include "soundsrv.h"
-#include "wadread.h"
-
-
-int*           sfxlengths;
-
-typedef struct wadinfo_struct
-{
-    char       identification[4];                               
-    int                numlumps;
-    int                infotableofs;
-
-} wadinfo_t;
-
-typedef struct filelump_struct
-{
-    int                filepos;
-    int                size;
-    char       name[8];
-
-} filelump_t;
-
-typedef struct lumpinfo_struct
-{
-    int                handle;
-    int                filepos;
-    int                size;
-    char       name[8];
-
-} lumpinfo_t;
-
-
-
-lumpinfo_t*    lumpinfo;                                               
-int            numlumps;
-
-void**         lumpcache;
-
-
-#define strcmpi strcasecmp
-
-
-//
-// Something new.
-// This version of w_wad.c does handle endianess.
-//
-#ifndef __BIG_ENDIAN__
-
-#define LONG(x) (x)
-#define SHORT(x) (x)
-
-#else
-
-#define LONG(x) ((long)SwapLONG((unsigned long) (x)))
-#define SHORT(x) ((short)SwapSHORT((unsigned short) (x)))
-
-unsigned long SwapLONG(unsigned long x)
-{
-    return
-       (x>>24)
-       | ((x>>8) & 0xff00)
-       | ((x<<8) & 0xff0000)
-       | (x<<24);
-}
-
-unsigned short SwapSHORT(unsigned short x)
-{
-    return
-       (x>>8) | (x<<8);
-}
-
-#endif
-
-
-
-// Way too many of those...
-static void derror(char* msg)
-{
-    fprintf(stderr, "\nwadread error: %s\n", msg);
-    exit(-1);
-}
-
-
-void strupr (char *s)
-{
-    while (*s)
-       *s++ = toupper(*s);
-}
-
-int filelength (int handle)
-{
-    struct stat        fileinfo;
-  
-    if (fstat (handle,&fileinfo) == -1)
-       fprintf (stderr, "Error fstating\n");
-
-    return fileinfo.st_size;
-}
-
-
-
-void openwad(char* wadname)
-{
-
-    int                wadfile;
-    int                tableoffset;
-    int                tablelength;
-    int                tablefilelength;
-    int                i;
-    wadinfo_t  header;
-    filelump_t*        filetable;
-
-    // open and read the wadfile header
-    wadfile = open(wadname, O_RDONLY);
-
-    if (wadfile < 0)
-       derror("Could not open wadfile");
-
-    read(wadfile, &header, sizeof header);
-
-    if (strncmp(header.identification, "IWAD", 4))
-       derror("wadfile has weirdo header");
-
-    numlumps = LONG(header.numlumps);
-    tableoffset = LONG(header.infotableofs);
-    tablelength = numlumps * sizeof(lumpinfo_t);
-    tablefilelength = numlumps * sizeof(filelump_t);
-    lumpinfo = (lumpinfo_t *) malloc(tablelength);
-    filetable = (filelump_t *) ((char*)lumpinfo + tablelength - tablefilelength);
-
-    // get the lumpinfo table
-    lseek(wadfile, tableoffset, SEEK_SET);
-    read(wadfile, filetable, tablefilelength);
-
-    // process the table to make the endianness right and shift it down
-    for (i=0 ; i<numlumps ; i++)
-    {
-       strncpy(lumpinfo[i].name, filetable[i].name, 8);
-       lumpinfo[i].handle = wadfile;
-       lumpinfo[i].filepos = LONG(filetable[i].filepos);
-       lumpinfo[i].size = LONG(filetable[i].size);
-       // fprintf(stderr, "lump [%.8s] exists\n", lumpinfo[i].name);
-    }
-
-}
-
-void*
-loadlump
-( char*                lumpname,
-  int*         size )
-{
-
-    int                i;
-    void*      lump;
-
-    for (i=0 ; i<numlumps ; i++)
-    {
-       if (!strncasecmp(lumpinfo[i].name, lumpname, 8))
-           break;
-    }
-
-    if (i == numlumps)
-    {
-       // fprintf(stderr,
-       //   "Could not find lumpname [%s]\n", lumpname);
-       lump = 0;
-    }
-    else
-    {
-       lump = (void *) malloc(lumpinfo[i].size);
-       lseek(lumpinfo[i].handle, lumpinfo[i].filepos, SEEK_SET);
-       read(lumpinfo[i].handle, lump, lumpinfo[i].size);
-       *size = lumpinfo[i].size;
-    }
-
-    return lump;
-
-}
-
-void*
-getsfx
-( char*                sfxname,
-  int*         len )
-{
-
-    unsigned char*     sfx;
-    unsigned char*     paddedsfx;
-    int                        i;
-    int                        size;
-    int                        paddedsize;
-    char               name[20];
-
-    sprintf(name, "ds%s", sfxname);
-
-    sfx = (unsigned char *) loadlump(name, &size);
-
-    // pad the sound effect out to the mixing buffer size
-    paddedsize = ((size-8 + (SAMPLECOUNT-1)) / SAMPLECOUNT) * SAMPLECOUNT;
-    paddedsfx = (unsigned char *) realloc(sfx, paddedsize+8);
-    for (i=size ; i<paddedsize+8 ; i++)
-       paddedsfx[i] = 128;
-
-    *len = paddedsize;
-    return (void *) (paddedsfx + 8);
-
-}
diff --git a/sndserv/wadread.h b/sndserv/wadread.h
deleted file mode 100644 (file)
index 93de80e..0000000
+++ /dev/null
@@ -1,62 +0,0 @@
-// Emacs style mode select   -*- C++ -*- 
-//-----------------------------------------------------------------------------
-//
-// $Id: wadread.h,v 1.3 1997/01/30 19:54:23 b1 Exp $
-//
-// Copyright (C) 1993-1996 by id Software, Inc.
-//
-// This source is available for distribution and/or modification
-// only under the terms of the DOOM Source Code License as
-// published by id Software. All rights reserved.
-//
-// The source is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License
-// for more details.
-//
-//
-// $Log: wadread.h,v $
-// Revision 1.3  1997/01/30 19:54:23  b1
-// Final reformatting run. All the remains (ST, W, WI, Z).
-//
-// Revision 1.2  1997/01/21 19:00:10  b1
-// First formatting run:
-//  using Emacs cc-mode.el indentation for C++ now.
-//
-// Revision 1.1  1997/01/19 17:22:52  b1
-// Initial check in DOOM sources as of Jan. 10th, 1997
-//
-//
-// DESCRIPTION:
-//     WAD and Lump I/O, the second.
-//     This time for soundserver only.
-//     Welcome to Department of Redundancy Department.
-//      (Yeah, I said that elsewhere already).
-//     Note: makes up for a nice w_wad.h.
-//
-//-----------------------------------------------------------------------------
-
-#ifndef __WADREAD_H__
-#define __WADREAD_H__
-
-//
-//  Opens the wadfile specified.
-// Must be called before any calls to  loadlump() or getsfx().
-//
-
-void openwad(char* wadname);
-
-//
-//  Gets a sound effect from the wad file.  The pointer points to the
-//  start of the data.  Returns a 0 if the sfx was not
-//  found.  Sfx names should be no longer than 6 characters.  All data is
-//  rounded up in size to the nearest MIXBUFFERSIZE and is padded out with
-//  0x80's.  Returns the data length in len.
-//
-
-void*
-getsfx
-( char*                sfxname,
-  int*         len );
-
-#endif