From: sparky4 Date: Fri, 30 Nov 2012 08:24:58 +0000 (-0600) Subject: new file: 16.bat X-Git-Url: http://4ch.mooo.com/gitweb/?p=16.git;a=commitdiff_plain;h=8546b30d561c27e4b1eab164e17baf4c84a5c42e new file: 16.bat new file: CORE16.EXE new file: CORE16.SYM new file: core16.lk1 new file: core16.map new file: doc/16.16 new file: doc/16story.txt new file: doc/ojoww.cpp new file: doc/project.txt new file: doc/wwww.txt new file: proj16.bfproject new file: proj16.mk new file: proj16.mk1 new file: proj16.tgt new file: proj16.wpj new file: remake.bat new file: src/eng_ai.cpp new file: src/eng_ai.h new file: src/eng_comm.cpp new file: src/eng_comm.h new file: src/eng_core.cpp new file: src/eng_core.h new file: src/eng_gfx.cpp new file: src/eng_gfx.h new file: src/eng_snd.cpp new file: src/eng_snd.h new file: src/engine.h new file: src/lib/dos_comm.c new file: src/lib/dos_comm.h new file: src/lib/dos_gfx.cpp new file: src/lib/dos_gfx.h new file: src/lib/dos_opl2.cpp new file: src/lib/lib_com.cpp new file: src/lib/lib_com.h new file: src/lib/opl2.h new file: src/main.cpp new file: src/timer.cpp new file: src/timer.h --- 8546b30d561c27e4b1eab164e17baf4c84a5c42e diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..bcd1a012 --- /dev/null +++ b/.gitignore @@ -0,0 +1,14 @@ +# Lines starting with '#' are considered comments. +# Ignore (generated) html files, +*.html +*.htm +*.obj +*.OBJ +*.*~ +*.sh +!proj16.bfproject + +# except foo.html which is maintained by hand. +#!foo.html +# Ignore objects and archives. +*.[oa] diff --git a/16.bat b/16.bat new file mode 100644 index 00000000..daa919b8 --- /dev/null +++ b/16.bat @@ -0,0 +1,2 @@ +del *.err +wmake -f proj16.mk -e -h > 16.err diff --git a/CORE16.EXE b/CORE16.EXE new file mode 100644 index 00000000..bc804f08 Binary files /dev/null and b/CORE16.EXE differ diff --git a/CORE16.SYM b/CORE16.SYM new file mode 100644 index 00000000..261f9195 Binary files /dev/null and b/CORE16.SYM differ diff --git a/core16.lk1 b/core16.lk1 new file mode 100644 index 00000000..609d331a --- /dev/null +++ b/core16.lk1 @@ -0,0 +1,2 @@ +FIL dos_comm.obj,eng_ai.obj,eng_comm.obj,eng_core.obj,eng_gfx.obj,eng_snd.obj,dos_gfx.obj,dos_opl2.obj,lib_com.obj,main.obj,timer.obj + diff --git a/core16.map b/core16.map new file mode 100644 index 00000000..0b642a94 --- /dev/null +++ b/core16.map @@ -0,0 +1,875 @@ +Open Watcom Linker Version 1.9 +Portions Copyright (c) 1985-2002 Sybase, Inc. All Rights Reserved. +Created on: 12/11/28 00:07:52 +Warning! W1027: file eng_core.obj(C:\Z\16\src\eng_core.cpp): redefinition of short unsigned far Notes[] ignored +Warning! W1027: file eng_snd.obj(C:\Z\16\src\eng_snd.cpp): redefinition of short unsigned far Notes[] ignored +Warning! W1027: file dos_opl2.obj(C:\Z\16\src\lib\dos_opl2.cpp): redefinition of short unsigned far Notes[] ignored +Executable Image: core16.exe +creating a DOS executable + + + +------------+ + | Groups | + +------------+ + +Group Address Size +===== ======= ==== + +DGROUP 10fc:0000 000017c0 + + + + +--------------+ + | Segments | + +--------------+ + +Segment Class Group Address Size +======= ===== ===== ======= ==== + +dos_comm_TEXT CODE AUTO 0000:0000 0000022b +eng_ai_TEXT CODE AUTO 0000:0230 00000013 +eng_comm_TEXT CODE AUTO 0000:0250 00000198 +eng_core_TEXT CODE AUTO 0000:03f0 00002ce5 +eng_gfx_TEXT CODE AUTO 0000:30e0 00000013 +eng_snd_TEXT CODE AUTO 0000:3100 00000013 +dos_gfx_TEXT CODE AUTO 0000:3120 0000088e +dos_opl2_TEXT CODE AUTO 0000:39b0 000004ae +lib_com_TEXT CODE AUTO 0000:3e60 00000063 +main_TEXT CODE AUTO 0000:3ed0 000000de +timer_TEXT CODE AUTO 0000:3fb0 000001b4 +_TEXT CODE AUTO 0000:4170 000082c0 +cppdata_TEXT CODE AUTO 0000:c430 00000000 +fsregist_TEXT CODE AUTO 0000:c430 000003a1 +opnew_TEXT CODE AUTO 0000:c7e0 0000007a +opnewp_TEXT CODE AUTO 0000:c860 00000005 +opdel_TEXT CODE AUTO 0000:c870 0000000e +stabthrw_TEXT CODE AUTO 0000:c880 00000da5 +manendl_TEXT CODE AUTO 0000:d630 00000020 +ioicout_TEXT CODE AUTO 0000:d650 000000a5 +ostincch_TEXT CODE AUTO 0000:d700 000000b9 +ostinomn_TEXT CODE AUTO 0000:d7c0 00000013 +iofefg_TEXT CODE AUTO 0000:d7e0 00000042 +undefed_TEXT CODE AUTO 0000:d830 00000013 +fsroot_TEXT CODE AUTO 0000:d850 0000000b +stabdtor_TEXT CODE AUTO 0000:d860 000003d5 +stabdisp_TEXT CODE AUTO 0000:dc40 00000343 +dtorarst_TEXT CODE AUTO 0000:df90 0000002f +opdelarr_TEXT CODE AUTO 0000:dfc0 00000005 +exc_pr_TEXT CODE AUTO 0000:dfd0 000001bd +vfun_err_TEXT CODE AUTO 0000:e190 00000027 +unexpect_TEXT CODE AUTO 0000:e1c0 000000c0 +callterm_TEXT CODE AUTO 0000:e280 0000004f +tsequiv_TEXT CODE AUTO 0000:e2d0 000001ac +stabinit_TEXT CODE AUTO 0000:e480 00000104 +fatalerr_TEXT CODE AUTO 0000:e590 00000025 +allocexc_TEXT CODE AUTO 0000:e5c0 000004d7 +stabtrav_TEXT CODE AUTO 0000:eaa0 000001f3 +ljmpinit_TEXT CODE AUTO 0000:eca0 00000016 +ostput_TEXT CODE AUTO 0000:ecc0 000000e7 +ostflush_TEXT CODE AUTO 0000:edb0 00000058 +sdfconfp_TEXT CODE AUTO 0000:ee10 0000001e +stablcl_TEXT CODE AUTO 0000:ee30 00000005 +ostconsf_TEXT CODE AUTO 0000:ee40 00000105 +ostdestr_TEXT CODE AUTO 0000:ef50 000000f4 +sdfdestr_TEXT CODE AUTO 0000:f050 000000f5 +moddtorr_TEXT CODE AUTO 0000:f150 00000000 +ostopfx_TEXT CODE AUTO 0000:f150 00000071 +iouwrtit_TEXT CODE AUTO 0000:f1d0 00000390 +iossetst_TEXT CODE AUTO 0000:f560 00000071 +iofnoefg_TEXT CODE AUTO 0000:f5e0 00000013 +stabadt_TEXT CODE AUTO 0000:f600 00000127 +prwdata_TEXT CODE AUTO 0000:f730 00000000 +termnate_TEXT CODE AUTO 0000:f730 00000051 +areaexc_TEXT CODE AUTO 0000:f790 00000000 +tssize_TEXT CODE AUTO 0000:f790 00000053 +bittest_TEXT CODE AUTO 0000:f7f0 00000047 +ljmpdtor_TEXT CODE AUTO 0000:f840 000000a5 +pure_err_TEXT CODE AUTO 0000:f8f0 00000027 +stfdsgtn_TEXT CODE AUTO 0000:f920 0000009d +stfdspun_TEXT CODE AUTO 0000:f9c0 000000e4 +stfpbfai_TEXT CODE AUTO 0000:fab0 00000004 +sdfoverf_TEXT CODE AUTO 0000:fac0 000001e9 +sdfundrf_TEXT CODE AUTO 0000:fcb0 0000018e +stfsbuf_TEXT CODE AUTO 0000:fe40 00000081 +stfseeko_TEXT CODE AUTO 0000:fed0 0000000c +stfseekp_TEXT CODE AUTO 0000:fee0 00000021 +sdfsync_TEXT CODE AUTO 0000:ff10 0000002e +stfdoall_TEXT CODE AUTO 0000:ff40 00000040 +stfconde_TEXT CODE AUTO 0000:ff80 0000006e +stabmod_TEXT CODE AUTO 0fff:0000 0000007a +iosinit_TEXT CODE AUTO 0fff:0080 00000061 +iosconde_TEXT CODE AUTO 0fff:00f0 00000011 +iosdestr_TEXT CODE AUTO 0fff:0110 000000b2 +stfdestr_TEXT CODE AUTO 0fff:01d0 0000002e +opnewarr_TEXT CODE AUTO 0fff:0200 00000005 +iosfail_TEXT CODE AUTO 0fff:0210 00000009 +stfsetb_TEXT CODE AUTO 0fff:0220 00000086 +ioufrxal_TEXT CODE AUTO 0fff:02b0 00000033 +stfsync_TEXT CODE AUTO 0fff:02f0 00000022 +eng_core_DATA1 FAR_CONST AUTO 1031:0000 000001d4 +eng_core_DATA2 FAR_CONST AUTO 104e:0004 00000113 +dos_gfx_DATA1 FAR_CONST AUTO 104e:0117 00000037 +dos_opl2_DATA1 FAR_CONST AUTO 104e:014e 00000016 +main_DATA1 FAR_CONST AUTO 1065:0000 00000026 +opnew_DATA1 FAR_CONST AUTO 1065:0030 00000000 +opdel_DATA1 FAR_CONST AUTO 1065:0030 00000000 +stabthrw_DATA1 FAR_CONST AUTO 1065:0030 000001ea +stabthrw_DATA2 FAR_CONST AUTO 1086:000a 000001c7 +manendl_DATA1 FAR_CONST AUTO 10a3:0002 00000000 +ioicout_DATA1 FAR_CONST AUTO 10a4:0000 00000076 +ostincch_DATA1 FAR_CONST AUTO 10ab:0006 00000000 +ostinomn_DATA1 FAR_CONST AUTO 10ab:0006 00000000 +iofefg_DATA1 FAR_CONST AUTO 10ab:0006 00000000 +undefed_DATA1 FAR_CONST AUTO 10ab:0006 0000002c +opdelarr_DATA1 FAR_CONST AUTO 10af:0000 00000000 +vfun_err_DATA1 FAR_CONST AUTO 10af:0000 00000032 +unexpect_DATA1 FAR_CONST AUTO 10b3:0000 0000000a +unexpect_DATA2 FAR_CONST AUTO 10b3:000a 00000023 +callterm_DATA1 FAR_CONST AUTO 10b3:002d 00000041 +allocexc_DATA1 FAR_CONST AUTO 10ba:0000 00000024 +allocexc_DATA2 FAR_CONST AUTO 10bc:0004 0000002b +ostput_DATA1 FAR_CONST AUTO 10bf:0000 00000000 +ostflush_DATA1 FAR_CONST AUTO 10bf:0000 00000000 +sdfconfp_DATA1 FAR_CONST AUTO 10bf:0000 00000044 +ostconsf_DATA1 FAR_CONST AUTO 10bf:0044 00000040 +ostdestr_DATA1 FAR_CONST AUTO 10c8:0000 0000002c +sdfdestr_DATA1 FAR_CONST AUTO 10c8:0030 0000002c +ostopfx_DATA1 FAR_CONST AUTO 10cd:000c 00000000 +iouwrtit_DATA1 FAR_CONST AUTO 10cd:000c 00000000 +iossetst_DATA1 FAR_CONST AUTO 10ce:0000 00000056 +iofnoefg_DATA1 FAR_CONST AUTO 10d3:0006 00000000 +iofnoefg_DATA1 FAR_CONST AUTO 10d3:0006 00000026 +stabadt_DATA1 FAR_CONST AUTO 10d6:0000 00000026 +termnate_DATA1 FAR_CONST AUTO 10d8:0006 00000022 +pure_err_DATA1 FAR_CONST AUTO 10d8:0028 0000001e +stfdsgtn_DATA1 FAR_CONST AUTO 10dc:0006 00000000 +stfdspun_DATA1 FAR_CONST AUTO 10dc:0006 00000000 +stfpbfai_DATA1 FAR_CONST AUTO 10dc:0006 00000000 +sdfoverf_DATA1 FAR_CONST AUTO 10dc:0006 00000000 +sdfundrf_DATA1 FAR_CONST AUTO 10dc:0006 00000000 +stfsbuf_DATA1 FAR_CONST AUTO 10dc:0006 00000000 +stfseeko_DATA1 FAR_CONST AUTO 10dc:0006 00000000 +stfseekp_DATA1 FAR_CONST AUTO 10dc:0006 00000000 +sdfsync_DATA1 FAR_CONST AUTO 10dc:0006 00000000 +stfdoall_DATA1 FAR_CONST AUTO 10dc:0006 00000000 +stfconde_DATA1 FAR_CONST AUTO 10dc:0006 0000003a +iosinit_DATA1 FAR_CONST AUTO 10dc:0040 00000000 +iosconde_DATA1 FAR_CONST AUTO 10dc:0040 00000012 +iosdestr_DATA1 FAR_CONST AUTO 10e2:0000 00000036 +stfdestr_DATA1 FAR_CONST AUTO 10e5:0006 00000000 +opnewarr_DATA1 FAR_CONST AUTO 10e6:0000 00000000 +iosfail_DATA1 FAR_CONST AUTO 10e6:0000 00000000 +stfsetb_DATA1 FAR_CONST AUTO 10e6:0000 00000000 +ioufrxal_DATA1 FAR_CONST AUTO 10e6:0000 00000000 +stfsync_DATA1 FAR_CONST AUTO 10e6:0000 00000000 +main_DATA2 FAR_DATA AUTO 10e6:0000 00000014 +stabthrw_DATA3 FAR_DATA AUTO 10e6:0014 0000007c +ioicout_DATA1 FAR_DATA AUTO 10e6:0090 00000063 +FAR_DATA FAR_DATA AUTO 10e6:00f3 00000000 +unexpect_DATA3 FAR_DATA AUTO 10e6:00f3 00000000 +allocexc_DATA3 FAR_DATA AUTO 10e6:00f3 00000000 +sdfconfp_DATA1 FAR_DATA AUTO 10e6:00f3 00000016 +ostconsf_DATA1 FAR_DATA AUTO 10e6:0109 00000010 +ostdestr_DATA1 FAR_DATA AUTO 10e6:0119 00000000 +sdfdestr_DATA1 FAR_DATA AUTO 10e6:0119 00000000 +iossetst_DATA1 FAR_DATA AUTO 10e6:0119 00000033 +stabadt_DATA2 FAR_DATA AUTO 10e6:014c 00000011 +stfconde_DATA1 FAR_DATA AUTO 10e6:015d 00000000 +iosconde_DATA1 FAR_DATA AUTO 10e6:015d 00000000 +iosdestr_DATA1 FAR_DATA AUTO 10e6:015d 00000000 +stfdestr_DATA1 FAR_DATA AUTO 10e6:015d 00000000 +_NULL BEGDATA DGROUP 10fc:0000 00000020 +_AFTERNULL BEGDATA DGROUP 10fe:0000 00000002 +CONST DATA DGROUP 10fe:0002 000000a8 +CONST2 DATA DGROUP 1108:000a 00000132 +_DATA DATA DGROUP 111c:0000 00000844 +XIB DATA DGROUP 11a0:0004 00000000 +XI DATA DGROUP 11a0:0004 0000004e +XIE DATA DGROUP 11a5:0002 00000000 +YIB DATA DGROUP 11a5:0002 00000000 +YI DATA DGROUP 11a5:0002 00000012 +YIE DATA DGROUP 11a6:0004 00000000 +STRINGS DATA DGROUP 11a6:0004 00000000 +DATA DATA DGROUP 11a6:0004 00000000 +_emu_init_start EMU DGROUP 11a6:0004 00000000 +_emu_init_end EMU DGROUP 11a6:0004 00000000 +_BSS BSS DGROUP 11a7:0000 0000050a +STACK STACK DGROUP 11f8:0000 00000800 + + + +----------------+ + | Memory Map | + +----------------+ + +* = unreferenced symbol ++ = symbol only referenced locally + +Address Symbol +======= ====== + +Module: dos_comm.obj(C:\Z\16\src\lib\dos_comm.c) +0000:0000+ newkb_ +0000:00d0 setkb_ +0000:01be keyp_ +0000:020c scankey_ +10fc:0200+ _oldkb +10fc:0ab0+ _keep +10fc:0b30+ _keer +10fc:0bb0+ _kee +Module: eng_ai.obj(C:\Z\16\src\eng_ai.cpp) +0000:0230 void far engine::do_artificial_intelligence() +Module: eng_comm.obj(C:\Z\16\src\eng_comm.cpp) +0000:0250 __anonymous_enum far engine::do_communication( char unsigned ) +10fc:0204 short unsigned far Notes[] +10fc:0222+ int far qing +10fc:0bb2+ int far xxxx +10fc:0bb4+ int far yyyy +Module: eng_core.obj(C:\Z\16\src\eng_core.cpp) +0000:03f0 far engine::Core::Core() +0000:149a+ void far engine::Core::update() +0000:1728+ void far engine::Core::sound() +0000:1746+ void far engine::Core::graphics() +0000:1764+ void far engine::Core::comm() +0000:178e+ void far engine::Core::ai() +0000:17ac+ __anonymous_enum far engine::Core::_msg() +0000:28e0+ far std::list far >::~list() +0000:2a40+ void far std::list far >::clear() +0000:2b70+ void far std::list far >::remove( void (far engine::Core ::* const far &)()) +0000:2d50+ far std::allocator far >::Node far >:::2d50+r Core:listr( std::allocator const far & ) +0000:2d80+ far std::allocator far >::DoubleLink far >:::2d80+::Corecatore( std::allocator const far & ) +0000:2db0+ far std::allocator far >::Node far >::~allocator() +0000:2de0+ far std::allocator far >::DoubleLink far >::~allocator() +0000:2e10+ std::list far >::iterator far std::list far >::erase( std::list far >::iterator ) +0000:2fc0+ far std::list far >::Node::Node( std::list far >::Node const far & ) +0000:17d0 void far engine::Core::run() +0000:1818+ bool far engine::Core::init() +0000:1b44+ void far engine::Core::release() +0000:1b80+ void far engine::Core::input() +0000:1ba0+ void far engine::Core::sync() +0000:26aa far engine::Core::~Core() +Module: eng_gfx.obj(C:\Z\16\src\eng_gfx.cpp) +0000:30e0 void far engine::do_graphics() +Module: eng_snd.obj(C:\Z\16\src\eng_snd.cpp) +0000:3100 void far engine::do_sound() +Module: dos_gfx.obj(C:\Z\16\src\lib\dos_gfx.cpp) +0000:3120 void far setvideo( char unsigned, int ) +0000:31be void far setvbuff( int ) +0000:3252+ void far updatevbuff() +0000:3294+ void far cls( char unsigned, char unsigned far * ) +0000:32ce+ void far clearscr() +0000:330c+ void far plotpixel( int, int, char unsigned, char unsigned far * ) +0000:335a+ void far plotpixelfast( int, int, char unsigned, char unsigned far * ) +0000:339a+ void far BlockMove() +0000:349a void far etesuto( int, int ) +0000:34f0 void far qtesuto( int, int, int ) +0000:3548+ int far colortest() +0000:359e+ int far colorz() +0000:35f4+ void far ssd( int ) +0000:3696 int far ding( int ) +10fc:0260+ char unsigned far * far vga +10fc:0264+ int far gq +10fc:0bb6+ char unsigned far * far vaddr +10fc:0bba+ int far old_mode +10fc:0bbc+ int far q +10fc:0bbe+ int far bakax +10fc:0bc0+ int far bakay +10fc:0bc2+ int far xx +10fc:0bc4+ int far yy +10fc:0bc6+ int far sx +10fc:0bc8+ int far sy +10fc:0bca+ char unsigned far coor +Module: dos_opl2.obj(C:\Z\16\src\lib\dos_opl2.cpp) +0000:39b0+ void far WriteFM( int, int ) +0000:3a12+ int far ReadFM() +0000:3a36 int far AdlibExists() +0000:3ad0 void far FMReset() +0000:3b24 void far FMKeyOff( int ) +0000:3b5c void far FMKeyOn( int, int, int ) +0000:3bc2+ void far FMVoiceVolume( int, int ) +0000:3bf4+ void far FMSetVoice( int, __5rfh0rFMInstrument far * ) +0000:3d5c void far fmtest() +0000:3e0e+ int far soundtest() +10fc:0bcc+ int far sq +Module: lib_com.obj(C:\Z\16\src\lib\lib_com.cpp) +0000:3e60 void far wait( long unsigned ) +Module: main.obj(C:\Z\16\src\main.cpp) +0000:3ed0 main_ +Module: timer.obj(C:\Z\16\src\timer.cpp) +0000:3fb0 far engine::Timer::Timer() +0000:3fdc long unsigned far engine::Timer::start_timer() +0000:4020 double far engine::Timer::elapsed_timer() +0000:4076+ double far engine::Timer::time_in_seconds() +0000:40c0+ double far engine::Timer::time_in_seconds( long unsigned ) +0000:4108+ long unsigned far engine::Timer::_time() +0000:4138 far engine::Timer::~Timer() +Module: c:\fdos\WATCOM/lib286/dos\clibl.lib(inp.c) +0000:4170 inp_ +Module: c:\fdos\WATCOM/lib286/dos\clibl.lib(outp.c) +0000:4178 outp_ +Module: c:\fdos\WATCOM/lib286/dos\clibl.lib(d_setvec.c) +0000:4182 _dos_setvect_ +Module: c:\fdos\WATCOM/lib286/dos\clibl.lib(d_getvec.c) +0000:418f _dos_getvect_ +Module: c:\fdos\WATCOM/lib286/dos\clibl.lib(cmodel) +0000:419a _big_code_ +0000:419a* CodeModelMismatch +Module: c:\fdos\WATCOM/lib286\plbxl.lib(cppdata.cpp) +10fc:0bce __wint_thread_data +10fc:0bf2 __compiled_under_generic +Module: c:\fdos\WATCOM/lib286/dos\clibl.lib(sound.c) +0000:419a sound_ +0000:4234 nosound_ +Module: c:\fdos\WATCOM/lib286/dos\clibl.lib(delay.c) +0000:4254 delay_ +Module: c:\fdos\WATCOM/lib286\plbxl.lib(fsregist.cpp) +0000:c430+ __wcpp_4_dispatch_dummy__ +0000:c46a __wcpp_4_fs_lookup__ +0000:c580 __wcpp_4_fs_handler_rtn__ +0000:c704 __wcpp_4_unwind_global__ +0000:c77c __wcpp_4_raise_exception__ +Module: c:\fdos\WATCOM/lib286\plbxl.lib(opnew.cpp) +0000:c7e0 void far * far operator new( int unsigned ) +Module: c:\fdos\WATCOM/lib286/dos\clibl.lib(setjmp) +0000:43b4 _setjmp_ +0000:4409 longjmp_ +Module: c:\fdos\WATCOM/lib286\plbxl.lib(opnewp.cpp) +0000:c860 void far * far operator new( int unsigned, void far * ) +Module: c:\fdos\WATCOM/lib286\plbxl.lib(opdel.cpp) +0000:c870 void far operator delete( void far * ) +Module: c:\fdos\WATCOM/lib286\plbxl.lib(stabthrw.cpp) +0000:d210+ far std::exception::exception() +0000:d270+ far std::exception::exception( std::exception const far & ) +0000:d2f0+ far std::exception::exception( char const far * ) +0000:d350+ far std::exception::~exception() +0000:d3f0+ char const far * far std::exception::what() const +0000:d460+ far std::bad_exception::bad_exception() +0000:d4e0+ far std::bad_exception::bad_exception( std::bad_exception const far & ) +0000:d540+ far std::bad_exception::~bad_exception() +0000:d062 __wcpp_4_rethrow__ +0000:d0c2* __wcpp_4_catch_done__ +0000:d154 __wcpp_4_throw__ +0000:d1b0* __wcpp_4_throw_zero__ +Module: c:\fdos\WATCOM/lib286\plbxl.lib(manendl.cpp) +0000:d630 std::ostream far & far std::endl( std::ostream far & ) +Module: c:\fdos\WATCOM/lib286\plbxl.lib(ioicout.cpp) +10fc:0c38 std::ostream near std::cout +0000:d6ae+ far cout_initfini::cout_initfini() +0000:d6bc+ far cout_initfini::~cout_initfini() +Module: c:\fdos\WATCOM/lib286\plbxl.lib(ostincch.cpp) +0000:d700 std::ostream far & far std::ostream::operator <<( char const far * ) +Module: c:\fdos\WATCOM/lib286\plbxl.lib(ostinomn.cpp) +0000:d7c0 std::ostream far & far std::ostream::operator <<( std::ostream far & (far *)()) +Module: c:\fdos\WATCOM/lib286/dos\clibl.lib(getch.c) +0000:4466 getch_ +Module: c:\fdos\WATCOM/lib286/dos\emu87.lib(initemu.asm) +0000:8000 FJSRQQ +0000:0632 FISRQQ +0000:1632* FIERQQ +0000:5c32 FIDRQQ +0000:a23d FIWRQQ +0000:c000 FJCRQQ +0000:4000* FJARQQ +0000:0e32 FICRQQ +0000:fe32* FIARQQ +0000:44b8 __init_87_emulator +0000:4549* __fini_87_emulator +Module: c:\fdos\WATCOM/lib286/dos\clibl.lib(fltused.c) +10fc:02de _fltused_ +Module: c:\fdos\WATCOM/lib286\plbxl.lib(iofefg.cpp) +10fc:0a56 __ppfltused_ +Module: c:\fdos\WATCOM/lib286/dos\clibl.lib(_8087) +10fc:02e0 __8087 +10fc:02e1 __real87 +10fc:02e2 __dos87emucall +10fc:02e4 __dos87real +Module: c:\fdos\WATCOM/lib286/dos\clibl.lib(intx086.c) +0000:45c0+ int86x_ +0000:4659 int86_ +Module: c:\fdos\WATCOM/lib286/dos\clibl.lib(ffree.c) +0000:4686* _ffree_ +0000:4686 free_ +Module: c:\fdos\WATCOM/lib286/dos\clibl.lib(calloc.c) +0000:46cc calloc_ +Module: c:\fdos\WATCOM/lib286/dos\clibl.lib(exit.c) +0000:470b+ __null_int23_exit_ +0000:470c exit_ +0000:473d* _exit_ +10fc:02e6+ ___int23_exit +10fc:02ea ___FPE_handler_exit +Module: c:\fdos\WATCOM/lib286/dos\clibl.lib(rand.c) +0000:4756 rand_ +0000:4798* srand_ +Module: c:\fdos\WATCOM/lib286/dos\clibl.lib(printf.c) +0000:47bb printf_ +Module: c:\fdos\WATCOM/lib286/dos\clibl.lib(clockdos.c) +0000:47ea+ __ibm_bios_get_ticks_ +0000:4861 clock_ +Module: c:\fdos\WATCOM/lib286/dos\clibl.lib(kbhit.c) +0000:4888 kbhit_ +Module: c:\fdos\WATCOM/lib286\plbxl.lib(undefed.cpp) +0000:d830 __wcpp_4_undefed_cdtor__ +Module: c:\fdos\WATCOM/lib286/dos\clibl.lib(cstart) +10fc:0000* __nullarea +10fc:02fa* __ovlflag +10fc:02fb* __intno +10fc:02fc* __ovlvec +0000:48a0 _cstart_ +0000:4973* _Not_Enough_Memory_ +0000:4aa7 __exit_ +0000:4ac6 __do_exit_with_msg__ +0000:4b24 __GETDS +Module: c:\fdos\WATCOM/lib286\plbxl.lib(fsroot.cpp) +10fc:0a68 ___wcpp_4_data_init_fs_root_ +Module: c:\fdos\WATCOM/lib286/dos\clibl.lib(nonibm.c) +0000:4b2e+ __is_nonIBM_ +10fc:0300 ___NonIBM +Module: c:\fdos\WATCOM/lib286/dos\clibl.lib(i4d) +0000:4b76 __I4D +0000:4bc5 __U4D +Module: c:\fdos\WATCOM/lib286/dos\clibl.lib(i4m) +0000:4c4a __I4M +0000:4c4a __U4M +Module: c:\fdos\WATCOM/lib286\plbxl.lib(stabdtor.cpp) +0000:dbe8 __wcpp_4_destruct_internal__ +0000:dc06* __wcpp_4_destruct_all__ +0000:dc08* __wcpp_4_destruct__ +Module: c:\fdos\WATCOM/lib286\plbxl.lib(stabdisp.cpp) +0000:df10 __wcpp_4_dispatchable__ +Module: c:\fdos\WATCOM/lib286/dos\clibl.lib(fmalloc.c) +0000:4c62* _fmalloc_ +0000:4c62 malloc_ +10fc:0302+ ___fheap +10fc:0304 ___fheapRover +10fc:0306 ___LargestSizeB4Rover +Module: c:\fdos\WATCOM/lib286/dos\clibl.lib(crwdata) +10fc:0308 __curbrk +10fc:0310 __STACKLOW +10fc:0312 __STACKTOP +10fc:0314 __cbyte +10fc:0316 __child +10fc:0318 __no87 +10fc:0326 ___FPE_handler +10fc:030a __psp +10fc:031a __get_ovl_stack +10fc:031e __restore_ovl_stack +10fc:0322 __close_ovl_file +10fc:032a __LpCmdLine +10fc:032e __LpPgmName +10fc:030c __osmajor +10fc:030d __osminor +10fc:030e __osmode +10fc:030f __HShift +Module: c:\fdos\WATCOM/lib286/dos\clibl.lib(ljmphdl.c) +10fc:0332 ___longjmp_handler +Module: c:\fdos\WATCOM/lib286\plbxl.lib(dtorarst.cpp) +0000:df90 __wcpp_4_dtor_array_store__ +Module: c:\fdos\WATCOM/lib286\plbxl.lib(opdelarr.cpp) +0000:dfc0 void far operator delete []( void far * ) +Module: c:\fdos\WATCOM/lib286\plbxl.lib(exc_pr.cpp) +0000:dfd0 far _EXC_PR::_EXC_PR( _RTCTL far *, RW_DTREG far *, EXCSTATE ) +0000:e054 far _EXC_PR::~_EXC_PR() +0000:e074 far _EXC_PR_FREE::_EXC_PR_FREE( _RTCTL far *, RW_DTREG far *, EXCSTATE, ACTIVE_EXC far * ) +0000:e0a2 far _EXC_PR_FREE::~_EXC_PR_FREE() +0000:e0e4 far _EXC_PR_DTOR::_EXC_PR_DTOR( _RTCTL far *, RW_DTREG far *, EXCSTATE, ACTIVE_EXC far * ) +0000:e106 far _EXC_PR_FNEXC::_EXC_PR_FNEXC( _RTCTL far *, RW_DTREG far *, RW_DTREG far *, ACTIVE_EXC far * ) +0000:e154 far _EXC_PR_FNEXC::~_EXC_PR_FNEXC() +0000:e158 far _EXC_PR_DTOR::~_EXC_PR_DTOR() +Module: c:\fdos\WATCOM/lib286\plbxl.lib(vfun_err.cpp) +0000:e190 __wcpp_4_undef_vfun__ +Module: c:\fdos\WATCOM/lib286\plbxl.lib(unexpect.cpp) +0000:e1c0 void far std::unexpected() +Module: c:\fdos\WATCOM/lib286\plbxl.lib(callterm.cpp) +0000:e280 __wcpp_4_corrupted_stack__ +0000:e298 __wcpp_4_call_terminate__ +Module: c:\fdos\WATCOM/lib286\plbxl.lib(tsequiv.cpp) +0000:e2d0 __wcpp_4_ts_refed__ +0000:e2f0+ __wcpp_4_ts_pnted__ +0000:e31a __wcpp_4_ts_equiv__ +Module: c:\fdos\WATCOM/lib286\plbxl.lib(stabinit.cpp) +0000:e480 __wcpp_4_exc_setup__ +Module: c:\fdos\WATCOM/lib286/dos\clibl.lib(stack086.c) +0000:4d71 stackavail_ +Module: c:\fdos\WATCOM/lib286\plbxl.lib(fatalerr.cpp) +0000:e590 __wcpp_4_fatal_runtime_error__ +Module: c:\fdos\WATCOM/lib286\plbxl.lib(allocexc.cpp) +0000:e5d2 __wcpp_4_alloc_exc__ +0000:e8b0 __wcpp_4_free_exc__ +0000:e924 __wcpp_4_find_active__ +0000:e98e __wcpp_4_dtor_free_exc__ +Module: c:\fdos\WATCOM/lib286\plbxl.lib(stabtrav.cpp) +0000:eaa0 __wcpp_4_stab_entry__ +0000:eaba* __wcpp_4_stab_trav_comp__ +0000:ebe0 __wcpp_4_stab_trav_init__ +0000:ec0e __wcpp_4_stab_trav_next__ +0000:ec84 __wcpp_4_stab_trav_move__ +Module: c:\fdos\WATCOM/lib286\plbxl.lib(ljmpinit.cpp) +10fc:0a7a ___wcpp_4_data_init_longjmp_ +Module: c:\fdos\WATCOM/lib286\plbxl.lib(ostput.cpp) +0000:ecc0 std::ostream far & far std::ostream::put( char ) +Module: c:\fdos\WATCOM/lib286\plbxl.lib(ostflush.cpp) +0000:edb0 std::ostream far & far std::ostream::flush() +Module: c:\fdos\WATCOM/lib286/dos\clibl.lib(iobaddr.c) +0000:4d7f __get_std_stream_ +0000:4d7f* __get_std_file_ +Module: c:\fdos\WATCOM/lib286\plbxl.lib(sdfconfp.cpp) +0000:ee10 far stdiobuf::stdiobuf( __iobuf far * ) +Module: c:\fdos\WATCOM/lib286\plbxl.lib(stablcl.cpp) +0000:ee30 __wcpp_4_lcl_register__ +Module: c:\fdos\WATCOM/lib286\plbxl.lib(ostconsf.cpp) +0000:ee40 far std::ostream::ostream( std::streambuf far * ) +Module: c:\fdos\WATCOM/lib286\plbxl.lib(ostdestr.cpp) +0000:ef50 far std::ostream::~ostream() +Module: c:\fdos\WATCOM/lib286\plbxl.lib(sdfdestr.cpp) +0000:f050 far stdiobuf::~stdiobuf() +Module: c:\fdos\WATCOM/lib286\plbxl.lib(moddtorr.cpp) +10fc:0a98 ___wcpp_4_data_module_dtor_ref_ +Module: c:\fdos\WATCOM/lib286\plbxl.lib(ostopfx.cpp) +0000:f150 int far std::ostream::do_opfx() +Module: c:\fdos\WATCOM/lib286\plbxl.lib(iouwrtit.cpp) +0000:f1d0 int far __WATCOM_ios::writeitem( std::ostream far &, char const far *, int, int ) +Module: c:\fdos\WATCOM/lib286\plbxl.lib(iossetst.cpp) +0000:f5a0+ far std::ios::failure::failure( std::ios::failure const far & ) +0000:f5b0+ far std::ios::failure::~failure() +0000:f5c0+ far __WATCOM_exception::__WATCOM_exception( __WATCOM_exception const far & ) +0000:f5d0+ far __WATCOM_exception::~__WATCOM_exception() +0000:f560 void far std::ios::setstate( int ) +Module: c:\fdos\WATCOM/lib286/dos\clibl.lib(init8087) +0000:4d9e __init_8087_emu +0000:4da4 __x87id +Module: c:\fdos\WATCOM/lib286/dos\emu87.lib(emu8087.asm) +0000:4ef4 __int34 +0000:4f31 __int3c +Module: c:\fdos\WATCOM/lib286/dos\emu87.lib(dosinit.asm) +0000:783a ___dos87emucall +Module: c:\fdos\WATCOM/lib286/dos\clibl.lib(setefg.c) +0000:7878 __setEFGfmt_ +Module: c:\fdos\WATCOM/lib286\plbxl.lib(iofnoefg.cpp) +10fc:03a0 void (far * far __EFG_cnvs2d)( char far *, double far * ) +10fc:03a4 int (far * far __EFG_cnvd2f)( double far *, float far * ) +10fc:03a8 void (far * far __EFG_LDcvt)( __g4aa8long_double far *, cvt_info far *, char far * ) +10fc:03ac char far * (far * far __EFG_fcvt)( double, int, int far *, int far * ) +10fc:03b0 void (far * far __EFG__FDLD)( double near *, __g4aa8long_double near * ) +Module: c:\fdos\WATCOM/lib286\math87l.lib(cnvs2d.c) +0000:7896 __cnvs2d_ +Module: c:\fdos\WATCOM/lib286\math87l.lib(cnvd2f.c) +0000:78d5 __cnvd2f_ +Module: c:\fdos\WATCOM/lib286\math87l.lib(ldcvt.c) +0000:7aad _LDScale10x_ +0000:8010 __LDcvt_ +Module: c:\fdos\WATCOM/lib286\math87l.lib(_i_fcvt_.asm) +0000:8546 _fcvt_ +Module: c:\fdos\WATCOM/lib286\math87l.lib(cnvd2ld.c) +0000:854b __cnvd2ld_ +Module: c:\fdos\WATCOM/lib286/dos\clibl.lib(chk8087.c) +0000:857c* _fpreset_ +0000:85a7 __init_8087_ +0000:85da+ __default_sigfpe_handler_ +0000:85ed __chk8087_ +Module: c:\fdos\WATCOM/lib286/dos\clibl.lib(intr.c) +0000:865d intr_ +Module: c:\fdos\WATCOM/lib286/dos\clibl.lib(segread.c) +0000:8671 segread_ +Module: c:\fdos\WATCOM/lib286/dos\clibl.lib(nmalloc.c) +0000:8691 _nmalloc_ +10fc:0440 ___nheapbeg +10fc:0442 ___MiniHeapRover +10fc:0444 ___LargestSizeB4MiniHeapRover +Module: c:\fdos\WATCOM/lib286/dos\clibl.lib(mem.c) +0000:8770 __MemAllocator +0000:883a __MemFree +Module: c:\fdos\WATCOM/lib286/dos\clibl.lib(nfree.c) +0000:8997 _nfree_ +10fc:0c6a+ ___MiniHeapFreeRover +Module: c:\fdos\WATCOM/lib286/dos\clibl.lib(initrtns.c) +0000:8acd __InitRtns +0000:8acd* __FInitRtns +0000:8b28 __FiniRtns +0000:8b28* __FFiniRtns +Module: c:\fdos\WATCOM/lib286/dos\clibl.lib(iob.c) +10fc:0446 ___iob +10fc:05ae* __fmode +10fc:0c6c ___OpenStreams +10fc:0c70 ___ClosedStreams +Module: c:\fdos\WATCOM/lib286/dos\clibl.lib(fprtf.c) +0000:8ba6 __fprtf_ +Module: c:\fdos\WATCOM/lib286/dos\clibl.lib(xmsg.c) +0000:8c71 __exit_with_msg_ +0000:8c76 __fatal_runtime_error_ +Module: c:\fdos\WATCOM/lib286/dos\clibl.lib(cmain086.c) +0000:8c94 __CMain +Module: c:\fdos\WATCOM/lib286/dos\clibl.lib(uselfn.c) +10fc:05b0 ___uselfn +Module: c:\fdos\WATCOM/lib286/dos\clibl.lib(dosseg) +0000:8cc0 __DOSseg__ +Module: c:\fdos\WATCOM/lib286\plbxl.lib(stabadt.cpp) +0000:f600+ void far * far dtor_the_array( _RTARCTOR far * ) +0000:f670+ far _RTARCTOR::~_RTARCTOR() +0000:f690 __wcpp_4_dtor_array__ +Module: c:\fdos\WATCOM/lib286/dos\clibl.lib(hpgrw086.c) +0000:8cc1 __CMain_nheapgrow_ +Module: c:\fdos\WATCOM/lib286/dos\clibl.lib(growseg.c) +0000:8cc6 __GrowSeg_ +Module: c:\fdos\WATCOM/lib286/dos\clibl.lib(allocseg.c) +0000:8db8 __AllocSeg_ +Module: c:\fdos\WATCOM/lib286/dos\clibl.lib(fmemneed.c) +0000:8e4f __fmemneed_ +Module: c:\fdos\WATCOM/lib286\plbxl.lib(prwdata.cpp) +10fc:0c74 __wint_pure_error_flag +10fc:0c76 __wint_undef_vfun_flag +10fc:0c78 __wint_module_init +Module: c:\fdos\WATCOM/lib286\plbxl.lib(termnate.cpp) +0000:f730 void far std::terminate() +Module: c:\fdos\WATCOM/lib286/dos\clibl.lib(enterdb.c) +0000:8e52 __EnterWVIDEO_ +10fc:05b2+ ___WD_Present +Module: c:\fdos\WATCOM/lib286\plbxl.lib(areaexc.cpp) +10fc:05b4 ___EXC_AREA +Module: c:\fdos\WATCOM/lib286\plbxl.lib(tssize.cpp) +0000:f7a2 __wcpp_4_ts_size__ +Module: c:\fdos\WATCOM/lib286\plbxl.lib(bittest.cpp) +0000:f7f0 __wcpp_4_bit_test__ +0000:f814 __wcpp_4_bit_off__ +Module: c:\fdos\WATCOM/lib286\plbxl.lib(ljmpdtor.cpp) +0000:f8de __wcpp_4_lj_handler__ +Module: c:\fdos\WATCOM/lib286\plbxl.lib(pure_err.cpp) +0000:f8f0 __wcpp_4_pure_error__ +Module: c:\fdos\WATCOM/lib286\plbxl.lib(stfdsgtn.cpp) +0000:f920 int far std::streambuf::do_sgetn( char far *, int ) +Module: c:\fdos\WATCOM/lib286\plbxl.lib(stfdspun.cpp) +0000:f9c0 int far std::streambuf::do_sputn( char const far *, int ) +Module: c:\fdos\WATCOM/lib286\plbxl.lib(stfpbfai.cpp) +0000:fab0 int far std::streambuf::pbackfail( int ) +Module: c:\fdos\WATCOM/lib286\plbxl.lib(sdfoverf.cpp) +0000:fac0 int far stdiobuf::overflow( int ) +Module: c:\fdos\WATCOM/lib286\plbxl.lib(sdfundrf.cpp) +0000:fcb0 int far stdiobuf::underflow() +Module: c:\fdos\WATCOM/lib286\plbxl.lib(stfsbuf.cpp) +0000:fe40 std::streambuf far * far std::streambuf::setbuf( char far *, int ) +Module: c:\fdos\WATCOM/lib286\plbxl.lib(stfseeko.cpp) +0000:fed0 long far std::streambuf::seekoff( long, int, int ) +Module: c:\fdos\WATCOM/lib286\plbxl.lib(stfseekp.cpp) +0000:fee0 long far std::streambuf::seekpos( long, int ) +Module: c:\fdos\WATCOM/lib286\plbxl.lib(sdfsync.cpp) +0000:ff10 int far stdiobuf::sync() +Module: c:\fdos\WATCOM/lib286\plbxl.lib(stfdoall.cpp) +0000:ff40 int far std::streambuf::doallocate() +Module: c:\fdos\WATCOM/lib286\plbxl.lib(stfconde.cpp) +0000:ff80 far std::streambuf::streambuf() +Module: c:\fdos\WATCOM/lib286\plbxl.lib(stabmod.cpp) +0fff:0000 __wcpp_4_module_dtor__ +0fff:0056 __wcpp_4_mod_register__ +Module: c:\fdos\WATCOM/lib286\plbxl.lib(iosinit.cpp) +0fff:0080 void far std::ios::init( std::streambuf far * ) +Module: c:\fdos\WATCOM/lib286\plbxl.lib(iosconde.cpp) +0fff:00f0 far std::ios::ios() +Module: c:\fdos\WATCOM/lib286\plbxl.lib(iosdestr.cpp) +0fff:0110 far std::ios::~ios() +Module: c:\fdos\WATCOM/lib286\plbxl.lib(stfdestr.cpp) +0fff:01d0 far std::streambuf::~streambuf() +Module: c:\fdos\WATCOM/lib286/dos\clibl.lib(flush.c) +0000:8e76 __flush_ +Module: c:\fdos\WATCOM/lib286\plbxl.lib(opnewarr.cpp) +0fff:0200 void far * far operator new []( int unsigned ) +Module: c:\fdos\WATCOM/lib286\plbxl.lib(iosfail.cpp) +0fff:0210 far std::ios::failure::failure( int ) +Module: c:\fdos\WATCOM/lib286/dos\clibl.lib(8087cw.c) +10fc:09d0 __8087cw +Module: c:\fdos\WATCOM/lib286/dos\clibl.lib(noefgfmt.c) +10fc:09d2 ___EFG_printf +10fc:09d6 ___EFG_scanf +Module: c:\fdos\WATCOM/lib286\math87l.lib(efgfmt.c) +0000:8fbc _EFG_Format_ +Module: c:\fdos\WATCOM/lib286\math87l.lib(strtod.c) +0000:96c8+ __Strtold_ +0000:987b strtod_ +Module: c:\fdos\WATCOM/lib286\math87l.lib(ldclass.c) +0000:9a1d __LDClass_ +0000:9a6b* _FLClass_ +Module: c:\fdos\WATCOM/lib286\math87l.lib(efcvt.c) +0000:9ac8* ecvt_ +0000:9b02 fcvt_ +Module: c:\fdos\WATCOM/lib286/dos\clibl.lib(save8087.c) +10fc:09da ___Save8087 +10fc:09de ___Rest8087 +Module: c:\fdos\WATCOM/lib286/dos\clibl.lib(grabfp87.c) +0000:9b45 __GrabFP87_ +Module: c:\fdos\WATCOM/lib286/dos\clibl.lib(dointr) +0000:9b78 _DoINTR_ +Module: c:\fdos\WATCOM/lib286/dos\clibl.lib(nmemneed.c) +0000:9ef1 __nmemneed_ +Module: c:\fdos\WATCOM/lib286/dos\clibl.lib(grownear.c) +0000:9f79 __LastFree_ +0000:9ff3 __ExpandDGROUP_ +Module: c:\fdos\WATCOM/lib286/dos\clibl.lib(sgdef086) +10fc:0a44 __Start_XI +10fc:0a92 __End_XI +10fc:0a92 __Start_YI +10fc:0aa4 __End_YI +Module: c:\fdos\WATCOM/lib286/dos\clibl.lib(initfile.c) +0000:a104 __InitFiles_ +Module: c:\fdos\WATCOM/lib286/dos\clibl.lib(ioexit.c) +0000:a252* fcloseall_ +0000:a259 __full_io_exit_ +Module: c:\fdos\WATCOM/lib286/dos\clibl.lib(fputc.c) +0000:a263 fputc_ +Module: c:\fdos\WATCOM/lib286/dos\clibl.lib(ioalloc.c) +0000:a333 __ioalloc_ +Module: c:\fdos\WATCOM/lib286/dos\clibl.lib(prtf.c) +0000:a3cd __prtf_ +Module: c:\fdos\WATCOM/lib286/dos\clibl.lib(___argc.c) +10fc:0c7c ____Argv +10fc:0c80 ____Argc +Module: c:\fdos\WATCOM/lib286/dos\clibl.lib(amblksiz.c) +10fc:09e2 __amblksiz +Module: c:\fdos\WATCOM/lib286/dos\clibl.lib(heapgrow.c) +0000:b19b* _heapgrow_ +0000:b19b* _fheapgrow_ +0000:b19c _nheapgrow_ +Module: c:\fdos\WATCOM/lib286/dos\clibl.lib(heapen.c) +0000:b216* _heapenable_ +10fc:09e4 ___heap_enabled +Module: c:\fdos\WATCOM/lib286/dos\clibl.lib(fwrite.c) +0000:b227 fwrite_ +Module: c:\fdos\WATCOM/lib286/dos\clibl.lib(memmove.c) +0000:b422 memmove_ +Module: c:\fdos\WATCOM/lib286/dos\clibl.lib(fgetc.c) +0000:b498+ __fill_buffer_ +0000:b58d fgetc_ +Module: c:\fdos\WATCOM/lib286\plbxl.lib(stfsetb.cpp) +0fff:0220 void far std::streambuf::setb( char far *, char far *, int ) +Module: c:\fdos\WATCOM/lib286/dos\clibl.lib(liballoc.c) +0000:b632 _plib_malloc_ +0000:b637 _plib_free_ +Module: c:\fdos\WATCOM/lib286\plbxl.lib(ioufrxal.cpp) +0fff:02b0 void far __WATCOM_ios::free_xalloc_storage( std::ios far * ) +Module: c:\fdos\WATCOM/lib286/dos\clibl.lib(__lseek.c) +0000:b63c __lseek_ +Module: c:\fdos\WATCOM/lib286/dos\clibl.lib(qwrit.c) +0000:b676 __qwrite_ +Module: c:\fdos\WATCOM/lib286/dos\clibl.lib(seterrno.c) +0000:b6d3 __set_errno_ +0000:b6e7* __set_EDOM_ +0000:b6f9 __set_ERANGE_ +0000:b70b* __set_EINVAL_ +0000:b720 __set_doserrno_ +Module: c:\fdos\WATCOM/lib286/dos\clibl.lib(fsync.c) +0000:b72c fsync_ +Module: c:\fdos\WATCOM/lib286/dos\clibl.lib(rtcntrl.c) +0000:b731* _SetLD64bit_ +0000:b73c* _SetLD80bit_ +0000:b747 _LDisDouble_ +Module: c:\fdos\WATCOM/lib286/dos\clibl.lib(istable.c) +10fc:00ca __IsTable +Module: c:\fdos\WATCOM/lib286/dos\clibl.lib(tolower.c) +0000:b75a tolower_ +Module: c:\fdos\WATCOM/lib286\math87l.lib(bufld086) +0000:b768 __ZBuf2LD +Module: c:\fdos\WATCOM/lib286\math87l.lib(inf_nan.c) +10fc:01cc* ___f_infinity +10fc:01d0* ___f_posqnan +10fc:01d4 ___d_infinity +10fc:01dc ___d_posqnan +10fc:01e4* ___ld_infinity +10fc:01ec* ___ld_posqnan +Module: c:\fdos\WATCOM/lib286/dos\clibl.lib(hugeval.c) +10fc:01f4 __HugeValue +Module: c:\fdos\WATCOM/lib286/dos\clibl.lib(cvtbuf.c) +0000:b830 __CVTBuffer_ +Module: c:\fdos\WATCOM/lib286\math87l.lib(cvt.c) +0000:b837 __cvt_ +Module: c:\fdos\WATCOM/lib286/dos\clibl.lib(fpe87) +0000:b8d6 __Init_FPE_handler_ +0000:b90f __Fini_FPE_handler_ +0000:b946* __FPEHandler +Module: c:\fdos\WATCOM/lib286/dos\clibl.lib(sbrk.c) +0000:bbd8* sbrk_ +0000:bbe8 __brk_ +Module: c:\fdos\WATCOM/lib286/dos\clibl.lib(fclose.c) +0000:bc52+ __doclose_ +0000:bd03 __shutdown_stream_ +0000:bd1d* fclose_ +10fc:0eae+ ___RmTmpFileFn +Module: c:\fdos\WATCOM/lib286/dos\clibl.lib(freefp.c) +0000:bd68 __freefp_ +0000:bde3 __purgefp_ +Module: c:\fdos\WATCOM/lib286/dos\clibl.lib(chktty.c) +0000:be24 __chktty_ +Module: c:\fdos\WATCOM/lib286/dos\clibl.lib(wctomb.c) +0000:be4f wctomb_ +Module: c:\fdos\WATCOM/lib286/dos\clibl.lib(itoa.c) +0000:be78+ utoa_ +0000:bed5 itoa_ +Module: c:\fdos\WATCOM/lib286/dos\clibl.lib(strupr.c) +0000:bef9 strupr_ +Module: c:\fdos\WATCOM/lib286/dos\clibl.lib(mbisdbcs.c) +10fc:0eb2 ___IsDBCS +Module: c:\fdos\WATCOM/lib286/dos\clibl.lib(mbislead.c) +0000:bf1b* _ismbblead_ +10fc:0eb4 ___MBCSIsTable +Module: c:\fdos\WATCOM/lib286/dos\clibl.lib(lltoa.c) +0000:bf37 ulltoa_ +0000:c01c* lltoa_ +Module: c:\fdos\WATCOM/lib286/dos\clibl.lib(ltoa.c) +0000:c07e ultoa_ +0000:c0ed* ltoa_ +Module: c:\fdos\WATCOM/lib286/dos\clibl.lib(errno.c) +0000:c11c __get_errno_ptr_ +0000:c123 __get_doserrno_ptr_ +10fc:0fb6+ _errno +10fc:0fb8+ __doserrno +Module: c:\fdos\WATCOM/lib286/dos\clibl.lib(flushall.c) +0000:c12a __flushall_ +0000:c187* flushall_ +Module: c:\fdos\WATCOM/lib286/dos\clibl.lib(gtche.c) +0000:c18c getche_ +Module: c:\fdos\WATCOM/lib286/dos\clibl.lib(qread.c) +0000:c1a6 __qread_ +Module: c:\fdos\WATCOM/lib286/dos\clibl.lib(dosret.c) +0000:c1c6* _dosretax_ +0000:c1cb* _dosret0_ +0000:c1d2 __set_errno_dos_ +0000:c230* __set_errno_dos_reterr_ +Module: c:\fdos\WATCOM/lib286/dos\clibl.lib(iomode.c) +0000:c23b __GetIOMode_ +0000:c260 __SetIOMode_nogrow_ +10fc:0a12+ ___NFiles +10fc:0a14+ ___init_mode +10fc:0a3c+ ___io_mode +Module: c:\fdos\WATCOM/lib286/dos\clibl.lib(filedos.c) +0000:c283* _dos_close_ +0000:c291 _dos_commit_ +Module: c:\fdos\WATCOM/lib286/dos\clibl.lib(fpeint.c) +10fc:0a40 ___FPE_int +Module: c:\fdos\WATCOM/lib286/dos\clibl.lib(_clse.c) +0000:c2b9 __close_ +Module: c:\fdos\WATCOM/lib286/dos\clibl.lib(isatt.c) +0000:c2ec isatty_ +Module: c:\fdos\WATCOM/lib286/dos\clibl.lib(alphabet.c) +10fc:00a4 ___Alphabet +Module: c:\fdos\WATCOM/lib286/dos\clibl.lib(mbinit.c) +0000:c346 __mbinit_ +10fc:0a42+ ___MBCodePage +Module: c:\fdos\WATCOM/lib286/dos\clibl.lib(doserror) +0000:c422 __doserror_ +Module: c:\fdos\WATCOM/lib286\plbxl.lib(stfsync.cpp) +0fff:02f0 int far std::streambuf::sync() + + + +--------------------+ + | Libraries Used | + +--------------------+ + +c:\fdos\WATCOM/lib286\math87l.lib +c:\fdos\WATCOM/lib286/dos\emu87.lib +c:\fdos\WATCOM/lib286/dos\clibl.lib +c:\fdos\WATCOM/lib286\plbxl.lib + + + +-----------------------+ + | Linker Statistics | + +-----------------------+ + +Stack size: 0800 (2048.) +Memory size: 00012780 (75648.) +Entry point address: 0000:48a0 +Link time: 00:01.53 diff --git a/doc/16.16 b/doc/16.16 new file mode 100644 index 00000000..0f451952 --- /dev/null +++ b/doc/16.16 @@ -0,0 +1,145 @@ + #license:GPL-3+ Welcome to PiratePad! + +This pad text is synchronized as you type, so that everyone viewing this page sees the same text. This allows you to collaborate seamlessly on documents wwwwwwwwwww! + +Oh wow this is like +So cool! + +Project 16: a project to make an epic as fuck modern 16bit dos game that can run on old and new hardware!!!! + + +Ideas: + ==== Story: +The game takes place in year 4049 + +*POST MODE WWWW* + +Player: What happend? +*incomming signal* +unkown: someone setup us the bomb! +Player: !! +Player: Eye get signal!!! +unknown: WHAT? +*player activates the main screen* + + ==== Player: you play as a cute synthetic robotic loli whit a massive white tshirt on who just "woke up". She has the personality of yours truly! wwww she has retro computer ports in hidden locations . she is actually home made in a lab. there is ALOT of OLD as FUCK computers there wwww (like a 486 PC) which explains the serial ports, parallell ports, game ports, etc. wwww She is EXTREAMLY intelligent. wwww but needs to know more wwww and is extreamly curious about things (just like sparky4 wwwwwww) + + ==== Gameplay: + She needs to get new weapons so that she can turn enemies into friends to fight the evil and get rid of EVILNESS AND GLITCHES!! The LAST LEVEL IS GLITCH Dimention AND THE MUSIC IS ALL STRANGE AND MESSED UP and the caps, num, scroll lights blink crazyly and randomly. the floppy drive will sing O_o + this will scare the shit out of people... BUT I LOVE IT. + + FLOPPIES WILL BE EVERYWHERE FSDFASFSDFSDA + COLLECT FLOPPIES FOR POWERUPS and weapons + the old school 5.25 inch floppy are save points? + all sorts of floppy disks will make appearances + including the demi disk and shit ww + DEMI DISK!? + Can we have ZIP disks too w yes + + holy shit LAZOR DISKS HUUUUUUEEEGG DISKS + + shitty bluray disks will be used as shuriken w + + The game's menu is actually a DOS TUI + And between levels you can access the cute synthetic robot lolis comandline and change settings in her AUTOEXEC FILE! + +PLAY +LIKE +CONTRA +EXCEPT CUTER AND FUNNIER < EYE AM OKAY WITH THIS + +THIS GAME IS GOING TO BE SO COOL. EYE ACTUALLY WANT TO MAKE IT. :D +THEN DO IT +I DONT KNOW PROGRAMMING ;___________________________; +BUT I WILL LEARN MORE OVER SUMMER AND WE WILL DO THIS + +==== Resources: +http://www3.telus.net/alexander_russell/course/chapter_1.htm +http://philipstorr.id.au/pcbook/book3/scancode.htm +http://www.brackeen.com/vga/intro.html +http://ftp.lanet.lv/ftp/mirror/x2ftp/msdos/ + + == official channel == +irc://irc.sparky4.net/16 +p.s. use port 6667 + +Goals: + -MUSIC! + -GRAPHIX + -Cute synthetic robotic loli + -Control code + -Output code + -A GAME! :D + -code over all wwww + +Project 16: a project to make an epic as fuck modern 16bit dos game that can run on old and new hardware!!!! + + +Ideas: + ==== Story: +*POST MODE WWWW* + +Player: What happend? +*incomming signal* +unkown: someone setup us the bomb! +Player: !! +Player: Eye get signal!!! +unknown: WHAT? +*player activates the main screen* + + ==== Player: you play as a cute synthetic robotic loli whit a massive white tshirt on who just "woke up". She has the personality of yours truly! wwww she has retro computer ports in hidden locations . she is actually home made in a lab. there is ALOT of OLD as FUCK computers there wwww (like a 486 PC) which explains the serial ports, parallell ports, game ports, etc. wwww She is EXTREAMLY intelligent. wwww but needs to know more wwww and is extreamly curious about things (just like sparky4 wwwwwww) + + ==== Gameplay: + She needs to get new weapons so that she can turn enemies into friends to fight the evil and get rid of EVILNESS AND GLITCHES!! The LAST LEVEL IS GLITCH Dimention AND THE MUSIC IS ALL STRANGE AND MESSED UP and the caps, num, scroll lights blink crazyly and randomly. the floppy drive will sing O_o + this will scare the shit out of people... BUT I LOVE IT. + + FLOPPIES WILL BE EVERYWHERE FSDFASFSDFSDA + COLLECT FLOPPIES FOR POWERUPS and weapons + the old school 5.25 inch floppy are save points? + all sorts of floppy disks will make appearances + including the demi disk and shit ww + DEMI DISK!? + Can we have ZIP disks too w yes + + holy shit LAZOR DISKS HUUUUUUEEEGG DISKS + + shitty bluray disks will be used as shuriken w + + The game's menu is actually a DOS TUI + And between levels you can access the cute synthetic robot lolis comandline and change settings in her AUTOEXEC FILE! + +PLAY +LIKE +CONTRA +EXCEPT CUTER AND FUNNIER < EYE AM OKAY WITH THIS + +THIS GAME IS GOING TO BE SO COOL. EYE ACTUALLY WANT TO MAKE IT. :D +THEN DO IT +I DONT KNOW PROGRAMMING ;___________________________; +BUT I WILL LEARN MORE OVER SUMMER AND WE WILL DO THIS + +==== Resources: +http://www3.telus.net/alexander_russell/course/chapter_1.htm +http://philipstorr.id.au/pcbook/book3/scancode.htm +http://www.brackeen.com/vga/intro.html +http://ftp.lanet.lv/ftp/mirror/x2ftp/msdos/ + + == official channel == +irc://irc.sparky4.net/16 +p.s. use port 6667 + +Goals: + -MUSIC! + -GRAPHIX + -Cute synthetic robotic loli + -Control code + -Output code + -A GAME! :D + -code over all wwww + -E3 2013 + + +== Goals of sparky4: +1. make a simple basic synthesizer wwww (this will be the base core of the game) +and master the OPL2 chip + diff --git a/doc/16story.txt b/doc/16story.txt new file mode 100644 index 00000000..d5fe9925 --- /dev/null +++ b/doc/16story.txt @@ -0,0 +1,12 @@ +you play as a cute synthetic robotic loli whit a massive white tshirt on who just "woke up" + +*POST MODE WWWW* + +Player: What happend? +*incomming signal* +unkown: someone setup us the bomb! +Player: !! +Player: Eye get signal!!! +unknown: WHAT? +*player activates the main screen* + diff --git a/doc/ojoww.cpp b/doc/ojoww.cpp new file mode 100644 index 00000000..c63d88ec --- /dev/null +++ b/doc/ojoww.cpp @@ -0,0 +1,132 @@ +?! +This is a quick C++ tutorial, first in C++ you can use C files, you make a C file and give it extension .c (if no header), next to use it in your C++ you include it as follows +#extern "C" { + #include "myfile.c" +} +I don't remember if it's # for extern anyway... + + +In C++ and well, C too, you use macros and stuff and do things to the compiler does not goof, one typical construction is "if (something) has been defined, then add this code, and after that code end if" for example it looks like this: +#ifdef WIN32 + #include +#endif + +And you get different commands too like #ifndef which means if it is not yet defined, and #else, and #define which defines something, and so on. So another useful construction you can use for C++ to avoid stuff like confusing the compiler into including code more than once is by saying, well if you haven't included it yet, then include it please, or rather, if you haven't defined my flag,... +...then define my flag, and then add my code, and then close that block. So next time it looks at the same file it goes, oh I already have that one, ok next! +You do it like this +#ifndef _FILENAME_H_ +#define _FILENAME_H_ +//code here +#endif +The _FILENAME_H_ is just supposed to be something unique, so usually when you write out a filename with caps and underscore you are guaranteed a unique flag that wont mess up your code. Remember #define defines something AT COMPILE TIME, not runtime. + + +In C++ you really, really, really have to separate your code more than in maybe C. But the same rules apply, you have to alert the compiler of a function before you implement the function. For example: +void myfunc(); +int main() +{ + myfunc(); + return 0; +} +void myfunc() +{ + printf("huehuehuehue"); +} +In C++ you do this also, this is for the compiler otherwise it doesn't know what the hell you are doing you moron. But it is also for yourself and other people. This is because you might want to change exactly how your functions do what you want them to do, but you don't necessarily want to change that you have a function that is supposed to do something important. That is why you declare... +...everything as "in the best situation I have this function, it takes these arguments and returns this to me" and separate that from how you actually do it. +The declarations all go in header files with an extension .h and are included in all the files that use the code, including the file that implements the functions. The file that implements the functions has extension .cpp and you never include this file anywhere. NEVER EVER! Because these are your implementations, not your descriptions. You only include the headers, in their respective .cpp... +...file, hopefully with the SAME NAME except for extension, and include only the header also in any file that uses that code too. +The header (.h) is the file you want to start with the #ifndef, #define, and end with #endif, stuff. Not the implementation file (.cpp), if it's only in the header it works find, if it's in the .cpp too then you will probably break it at compile time. +A class is like a struct, or object. Think of them like defining your own types, with complex properties/members, and functions/methods. An example of using classes, already made could be this: +#include "cheetamen.h" +int main() +{ + Cheetamen cheeta_one; //one cheetamen + Cheetamen cheeta_two; //two cheetamen + cheeta_one.happy(); + cheeta_one.nr = 57; + cheeta_two.sad(); + cheeta_two.nr = 12; + printf("Cheetaman %d is very %s", cheeta_one.nr, cheeta_one.get_state()); + printf("Cheetaman %d is very %s", cheeta_two.nr, cheeta_two.get_state()); + return 0; +} +And that would return +Cheetaman 57 is very happy +Cheetaman 12 is very sad +Something like that, depending on what get state does. +You define instances of a class with new, and get free up memory with delete. +Cheetaman *cheeta; +cheeta = new Cheetaman(1, "happy"); +cheeta = new Cheetaman(); +delete(cheeta); +You now have a memory leak you baka!! Ok remember to delete everything after using it, or save a pointer to it somewhere you can find it again later. +So a class is like a struct but instead it is called class, with access modifiers, public so anything can be accessed, protected it can be messed with, and private it can only be affected internally by the class itself. This is important. If you do this: +cheeta.nr = 7; +/*Then you set the nr member to 7, but if nr is private you can't, so you need a function part of Cheetamen to update it. The reason for this is because you can tell other people what to do, you can only ask them to do something.*/ +Add classes to a namespace. +namespace hereisaname { + // all functions and stuff in the name space +} +You can declare namespace in other files, it just adds them to the namespace, this way you can have a lot of similar functions and stuff in different namespaces. It qualifies their unique names to (namespace name)::(member name) so it works like a prefix, I guess? Anyway moving on. +class Cheetaman { +public: + //this is a class + Cheetaman(); //default constructor, this is always called, unless you use another constructor + Cheetaman(int x, int y); //overloaded constructor, this is called when you put two ints in, so this is called instead of default. + void happy(); + void sad(); + const char * get_state(); + int nr; + ~Cheetaman(); +private: + const char *state; +}; +That is your declaration of the class, it has two constructors, a default and one overloaded, and some functions, and variables. When you use a class you can use the dot operator to use the members . like this: +Cheetaman cheeta; +cheeta.happy(); //note the dot... +For your implementation (.cpp) you use the include the (.h) and use the namespace too, and then define them statically as members I guess you could say. So Classname::membername like this: +#include "cheetaman.h" +namespace Cheetas { + Cheetaman::Cheetaman() + { + //default, set all the standard values for member variables and init code here + } + Cheetaman::Cheetaman(int x, int y) + { + //do extra stuff with x y + } + + void Cheetaman::happy() + { + this->state = new //well I forget the specifics for const char types but you get the point... + this->state = "happy"; + } + + const char* Cheetaman::get_state() + { + return this->state; //you return that state member of the actual class, you see? So it can change (happy/sad) but you always return the correct one. + } + //and so on and so on. + Cheetaman::~Cheetaman() + { + //deconstructor, delete all memory allocated here + } +} +this-> is used in the class as . is use outside of the class. +And that is more or less the gist of it. Oh yeah and you can inline assembly too, and use boolean types (bool) and so on. +sparky4 +sparky4!!!!! +sparky4: put in a file and upload it! +sparky4: put in a file and upload it! +sparky4: put in a file and upload it! +sparky4 no I am lazy +http://boards.4chan.org/jp/res/9468991 +sparky4 +sparky4 >/jp/ confirmed for having the hottest white girls +sparky4 I knew I should had tried to become a /jp/ idol. +sparky4: http://piratepad.net/INvoPrHMSN paste here +sparky4: mlet me get some drugs~ +^ +| +recursive chatlog diff --git a/doc/project.txt b/doc/project.txt new file mode 100644 index 00000000..51bc1c84 --- /dev/null +++ b/doc/project.txt @@ -0,0 +1,4 @@ + Project: 16 + +to make an epic as fuck 2d 16bit DOS game +22 source files \ No newline at end of file diff --git a/doc/wwww.txt b/doc/wwww.txt new file mode 100644 index 00000000..7e63bb04 --- /dev/null +++ b/doc/wwww.txt @@ -0,0 +1,401 @@ + +URL irc://irc.rizon.net/project16 Mode +ntz Users 7, 2@, 0%, 0+ +Topic irc://irc.sparky4.net/16 | http://www.yotsubano.me/16.zip <= new version! +#project16 +[15:14] === 55 unknown connection(s) +[15:14] =-= User mode for sparky4 is now +ix +[15:14] Global [Logon News - May 21 2011] First time on Rizon? Be sure to read the FAQ! http://s.rizon.net/FAQ +[15:14] Global [Logon News - Feb 07 2012] We now have a Channel Takeover Policy for the channels with founder being gone for over a certain period of time. Please read http://forum.rizon.net/showthread.php?3850 for details +[15:14] Global [Logon News - Jul 14 2012] Rizon is looking for php coders to assist in the creation of a ticketing system to track abuse & handle staff releated inquries. If you have experience with ticketing systems please see #dev or email m[at]rizon.net. +[15:14] Global [Random News - Mar 28 2009] Rizon now offers a Quotes bot for any room that wishes to have one. For more information on this please see http://www.rizon.net/vbulletin/showthread.php?t=940 Thanks Rizon Staff. +[15:14] NickServ This nickname is registered and protected. If it is your +[15:14] NickServ nick, type /msg NickServ IDENTIFY password. Otherwise, +[15:14] NickServ please choose a different nick. +[15:14] hopm-siglost For network safety, your client is being scanned for open proxies by proxyscan.siglost.com (188.122.74.139). This scan will not harm your computer. +[15:14] =-= User mode for sparky4 is now +r +[15:14] NickServ Password accepted - you are now recognized. +[15:14] -->| YOU (sparky4) have joined #project16 +[15:14] =-= Topic for #project16 is “irc://irc.sparky4.net/16 | http://www.yotsubano.me/16.zip” +[15:14] =-= Topic for #project16 was set by sparky4!~sparky4@Rizon-C1D04E4A.resnet.latech.edu on Wed Jul 18 17:00:51 2012 +[15:14] =-= Mode #project16 +o sparky4 by ChanServ +[15:39] sparky4 yes everything in this game excluding the images will be just text files +[15:39] sparky4 wwwww +[15:39] sparky4 crazy +[17:44] |<-- Feint has left irc.rizon.net (Remote host closed the connection) +[21:40] sparky4 http://www.youtube.com/watch?v=6CPU2aKDWoo&fmt=18 = game's time setting wwww +[00:36] |<-- heheringfeast has left irc.rizon.net (Quit: Quitting) +[06:11] sparky4 ............ +[06:11] sparky4 TiV3: ticks thelinesofmagazine Sageru where in the fuck is everybody? +[06:38] -->| sparky4_ (~yakui4@Rizon-C1D3076C.resnet.latech.edu) has joined #project16 +[06:38] |<-- sparky4_ has left irc.rizon.net () +[08:29] Sageru ?] +[08:31] ticks sleeping of course +[08:31] ticks or about to +[08:31] ticks strange, my nick doesn't always want to highlight +[08:46] sparky4 wwww +[08:46] sparky4 wwww +[08:46] sparky4 wwww +[08:46] sparky4 wwww +[08:46] [ERROR] No match for “sup”. +[08:46] [ERROR] No match for “supp”. +[08:46] [ERROR] No match for “supp”. +[08:46] [ERROR] No match for “supp”. +[11:18] TiV3 hmm +[11:18] TiV3 w +[12:15] ticks wwwwww +[12:28] sparky4 wwww +[12:38] sparky4 i with ojosama will tell me the fucking hooks for the input +[12:44] |<-- thelinesofmagazine has left irc.rizon.net (Ping timeout: 240 seconds) +[14:22] -->| sparky4_ (~yakui4@Rizon-C1D3076C.resnet.latech.edu) has joined #project16 +[14:23] sparky4_ void Core::run() +[14:23] sparky4_ { +[14:23] sparky4_ int i = 0; +[14:24] sparky4_ while (ENGINE_EXIT != this->msg) +[14:24] sparky4_ { +[14:24] sparky4_ //next line for purely testing purposes +[14:24] sparky4_ i++;if(i==600){char a;std::cin >> a;this->keys[a] = true;i=0;} +[14:24] sparky4_ this->sync(); +[14:24] sparky4_ this->input(); +[14:24] sparky4_ this->update(); +[14:24] sparky4_ } +[14:24] sparky4_ } +[14:24] sparky4_ hmmm +[15:16] |<-- sparky4_ has left irc.rizon.net (Remote host closed the connection) +[15:41] -->| Feint (~chatzilla@Rizon-8DFC2CD4.range86-141.btcentralplus.com) has joined #project16 +[15:48] Sageru https://www.power.org/resources/downloads/PowerISA_V2.06B_V2_PUBLIC.pdf too bad given that i don't know how to design CPUs this is useless to me +[17:56] |<-- ticks has left irc.rizon.net (Killed (NickServ (GHOST command used by ticks-netbook))) +[17:56] -->| ticks (~emily@zima.blue) has joined #project16 +[17:57] |<-- Feint has left irc.rizon.net (Remote host closed the connection) +[18:41] |<-- ticks has left irc.rizon.net (Read error: Connection reset by peer) +[21:27] -->| ticks (~emily@zima.blue) has joined #project16 +[21:47] |<-- ticks has left irc.rizon.net (Ping timeout: 240 seconds) +[21:48] -->| ticks (~emily@zima.blue) has joined #project16 +[22:53] Sageru http://www.underground-gamer.com/details.php?id=53330 i can't believe there was a US DOS version of this +[22:53] Sageru i had no ide a +[22:54] Sageru http://www.underground-gamer.com/details.php?id=52672 >mfw this +[22:54] Sageru wwwwwww +[03:42] -->| sparky4_ (~yakui4@Rizon-C1D3076C.resnet.latech.edu) has joined #project16 +[04:02] |<-- sparky4_ has left irc.rizon.net (Ping timeout: 240 seconds) +[11:59] |<-- ticks has left irc.rizon.net (Quit: leaving) +[12:01] -->| ticks (~emily@zima.blue) has joined #project16 +[12:05] |<-- ticks has left irc.rizon.net () +[12:19] -->| ticks (~emily@zima.blue) has joined #project16 +[12:22] -->| Feint (~chatzilla@Rizon-8DFC2CD4.range86-141.btcentralplus.com) has joined #project16 +[18:42] |<-- Feint has left irc.rizon.net (Ping timeout: 240 seconds) +[19:11] |<-- ticks has left irc.rizon.net (Read error: Connection reset by peer) +[19:14] -->| ticks (~emily@zima.blue) has joined #project16 +[20:40] |<-- ticks has left irc.rizon.net (Quit: Restart.) +[20:52] -->| ticks (~emily@zima.blue) has joined #project16 +[23:16] sparky4 C/C++ = funny language +[04:52] |<-- ticks has left irc.rizon.net (Ping timeout: 240 seconds) +[06:49] -->| ticks (~emily@zima.blue) has joined #project16 +[07:33] sparky4 ........................... +[07:33] sparky4 ........ +[07:33] sparky4 ................. +[07:33] sparky4 .................. +[07:34] sparky4 ............................................................ +[12:50] -->| Feint (~chatzilla@Rizon-8DFC2CD4.range86-141.btcentralplus.com) has joined #project16 +[17:06] sparky4 Feint: Sageru ticks TiV3 good news everyone +[17:06] sparky4 wwww +[17:14] sparky4 minor bug found +[17:31] sparky4 WWWW +[17:31] sparky4 there is some bugs in project 16 +[17:32] sparky4 MANY buys w +[18:36] |<-- Feint has left irc.rizon.net (Remote host closed the connection) +[19:23] TiV3 www +[19:32] sparky4 !! +[19:32] sparky4 TiV3: wwww\ +[21:24] -->| sparky4_ (~yakui4@Rizon-C1D3076C.resnet.latech.edu) has joined #project16 +[21:39] sparky4_ *lock_key&=(~(16 | 32 | 64)); // toggle off the lock keys +[21:41] =-= sparky4 has changed the topic to “irc://irc.sparky4.net/16 | http://www.yotsubano.me/16.zip <= new version!” +[22:30] sparky4_ Sageru: TiV3 ticks WHERE THE FUCK IS EVERYONG?!?! +[22:30] Sageru in my butt +[22:32] sparky4_ Sageru: nigga download that zip file +[22:32] sparky4_ Sageru: http://www.yotsubano.me/16.zip +[22:32] sparky4_ Sageru: http://www.yotsubano.me/16.zip +[22:32] Sageru lol +[22:32] sparky4_ Sageru: http://www.yotsubano.me/16.zip +[22:32] sparky4_ Sageru: http://www.yotsubano.me/16.zip +[22:32] Sageru i need to DOSbox it +[22:32] sparky4_ Sageru: http://www.yotsubano.me/16.zip +[22:32] sparky4_ Sageru: http://www.yotsubano.me/16.zip +[22:32] sparky4_ Sageru: http://www.yotsubano.me/16.zip +[22:32] Sageru does it work in DOSbox? +[22:32] sparky4_ Sageru: http://www.yotsubano.me/16.zip +[22:32] sparky4_ Sageru: http://www.yotsubano.me/16.zip +[22:32] sparky4_ Sageru: NOBODY IS FUCKING REVEIWING IT +[22:32] sparky4_ Sageru: YES YES IT COMES WITH THE INSTALLER +[22:32] Sageru oh +[22:32] Sageru crazy. +[22:33] sparky4_ Sageru: I AM PISSED OFF +[22:33] sparky4_ nobody is reveiwing it +[22:33] sparky4_ and they be too dumb +[22:33] Sageru ┐(´~`;)┌ +[22:33] sparky4_ wwww +[22:33] sparky4_ Sageru: please try it out +[22:34] Sageru when i'm not IMing and on the phone and IRC at the same time +[22:34] sparky4_ Sageru: ;_; +[22:34] sparky4_ Sageru: it's late i i need to shpower before i get way too tired +[22:35] Sageru lol +[22:35] Sageru okay, well i will get back to you on it +[22:35] sparky4_ ? +[22:35] sparky4_ please do it now ~ w +[22:35] Sageru i'm busy +[22:36] sparky4_ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF +[23:33] TiV3 awawa +[01:04] Sageru shit pickle +[01:04] Sageru cool programming but what progress is there +[05:12] -->| Feint (~chatzilla@Rizon-8DFC2CD4.range86-141.btcentralplus.com) has joined #project16 +[05:44] -->| Ojouchama (~chatzilla@jp.desuwa) has joined #project16 +[09:33] sparky4_ https://boards.4chan.org/jp/res/9452272#p9454310 +[09:34] sparky4_ Sageru: keyboard +[09:34] sparky4_ codes +[09:40] Sageru hmm? +[10:00] Ojouchama sparky4 when will you finish your game? +[10:08] Sageru she has a little tune playing +[10:08] Sageru so far +[10:08] Sageru which is more than i could do w +[10:08] Sageru i can hear the OPL2's glorious sound +[10:10] Sageru SID/AY-3 are my favorite sound chips probably, as well as the FM chip in the PC88/PC98 +[10:12] Sageru pretty odd how the SID ended up in a total of two computers +[10:53] Ojouchama Sageru shut up. +[10:53] Sageru no u +[10:53] Ojouchama Sageru always talking about stuff that doesn't work. +[10:54] Sageru what does that even mean +[10:54] Ojouchama Do you even have working code for those sound chips? +[10:54] Sageru no i don't but i'm saying i like the sound +[10:54] Sageru i don't program anything +[10:54] Sageru i didn't claim to +[10:54] Sageru ┐(´~`;)┌ +[10:54] Ojouchama Did you compose anything that can actually be used? +[10:54] Sageru god damnit +[10:55] Ojouchama Stop distracting sparky4. +[10:55] Ojouchama This is #project16 not #oldSoundHardwares +[11:00] Sageru lol +[11:00] Sageru go relax, have a drink or something +[11:18] sparky4 Ojouchama: wwww +[11:18] sparky4 Ojouchama: good news wwww +[11:19] sparky4 Ojouchama: a this rate it's vapor ware +[11:20] sparky4 Ojouchama: i was in class +[11:21] Sageru sparky4, what is most important is not to give up +[11:21] Sageru i wish i could help but i have no knowledge +[11:21] sparky4 Sageru: ^^ +[11:21] sparky4 Sageru: i barely know anything wwww +[11:21] Sageru and gaining it would take longer than it would for you to just develop it +[11:21] Sageru w +[11:21] Sageru oh +[11:21] sparky4 Sageru: well back in 2007 +[11:22] sparky4 i started playin iwith computers (like actually take them apart and learn about them) +[11:22] sparky4 Sageru: i did not know SHIT about computers back in 2006 +[11:22] sparky4 now i am an UBER POWAH USER +[11:22] Sageru lol +[11:23] Sageru i'm just a huge nerd, my understanding of hardware is greater than that of software so programming is really well beyond my capacity +[11:23] sparky4 Sageru: then you should make the fucking drivers +[11:23] sparky4 wwww +[11:24] Sageru well +[11:24] Sageru programming goes into software +[11:24] Sageru i wish i understood the hardware *that* intimately +[11:24] sparky4 Sageru: and hardware bitch +[11:24] Sageru ;_; +[11:25] sparky4 is FAR too tired to work on project 16 +[11:26] sparky4 Ojouchama: the keyoard input works but i cannot figure out how to make it work with the game engine's core +[11:26] sparky4 if we can get the input system down then development can REALLY take off +[11:27] sparky4 Sageru: i am soo weak +[11:27] sparky4 from hacking the keyboard yesterday +[11:27] sparky4 Sageru: http://www.youtube.com/watch?v=hOkPM91JRpk wwww +[11:28] sparky4 it's taking forever to make this game because only 1 person is actually developing www +[11:28] sparky4 and that person is ..... wwww dumb +[11:41] Ojouchama sparky4 how do you know the keyboard input works? +[11:41] Ojouchama sparky4 What does it do? +[11:42] sparky4 Ojouchama: wwww i can see raw scan codes when i push a key +[11:42] Ojouchama sparky4 So you print them out? +[11:42] sparky4 .... +[11:42] sparky4 Ojouchama: download it please wwww +[11:44] sparky4 Ojouchama: like when you press Esc it prints it's raw scan byte +[11:44] sparky4 which is 1 +[11:45] sparky4 Ojouchama: i need this working swith the engine so i can inplement the moving pixel test +[11:45] sparky4 Ojouchama: the moving pixel that is controlled by keyboard +[11:47] Ojouchama sparky4 That means you have it in a variable. +[11:48] sparky4 ohh~ +[11:48] Ojouchama sparky4 Map them with an ASCII key array like we discussed then use that aray in the engine core. +[11:48] sparky4 ok +[11:49] sparky4 Ojouchama: bot how do i make it communicate with the game engine core? +[11:49] Ojouchama Then in the game, instead of querying the scan code you query the key array. +[11:49] Ojouchama The input updates the key array / scan codes. +[11:49] sparky4 Ojouchama: ~ like a cloud of keys? +[11:50] Ojouchama sparky4 Exactly. +[11:50] sparky4 Ojouchama: wwww +[11:50] Ojouchama sparky4 It isn't too complicated and pretty universal. +[11:50] sparky4 Ojouchama: doom engine has something like that wwww +[11:51] Ojouchama sparky4 They key array will be some member of the game core object. +[11:51] sparky4 ?!!?!?!? +[11:52] sparky4 wait +[11:52] Ojouchama sparky4 So it remembers everything and you separate the internal hardware code from the game code. +[11:52] sparky4_ private: +[11:52] sparky4_ engine_message msg; +[11:52] sparky4_ std::list *fp; +[11:52] sparky4_ Timer timer; +[11:52] sparky4_ bool keys[256]; +[11:52] sparky4_ int frames_per_second; +[11:52] sparky4_ //std::list fp; +[11:52] sparky4_ ?? +[11:53] Ojouchama Yeah keys[]/ +[11:53] sparky4_ wwww +[11:53] Ojouchama Then, and this is the clever part... +[11:53] Ojouchama You figures out what actions you want to take in your game. +[11:54] Ojouchama Say you want to do 10 things. +[11:54] sparky4_ #define NUM_SCAN_QUE 256 // this MUST be 256, using BYTE roll-over for +[11:54] sparky4_ // q code +[11:54] sparky4_ Ojouchama: i am extreamly tired right now ww +[11:54] sparky4_ byte kee_q[NUM_SCAN_QUE]; +[11:54] Ojouchama You have a game object with an array of 10 bools, and you remap the keys to those. +[11:55] sparky4_ wtf is an object and a fucking bool? +[11:55] sparky4_ is a bool a pool? +[11:55] Ojouchama sparky4 no. +[11:55] sparky4_ wwww +[11:55] Ojouchama sparky4 A bool is like a bit, except it is either true or false. +[11:56] sparky4_ Ojouchama: we cannot forget joy sticks and mice +[11:56] sparky4_ Ojouchama: the bit as in byte and nibble or this is another bit? +[11:56] Ojouchama http://www.cplusplus.com/forum/beginner/6557/ +[11:57] sparky4_ Ojouchama: bool is like a switch variable? +[11:57] sparky4_ Ojouchama: when key is press it's 1 +[11:57] Ojouchama sparky4 That is why you separate and map keys twice. +[11:57] sparky4_ when key is up it's 0?> +[11:58] sparky4_ Ojouchama: i know they return different values +[11:58] Ojouchama sparky4 you handle all input devices, and only map them to game registered "keys" when they are used. +[11:59] Ojouchama Key up is false, which is 0. +[11:59] sparky4_ Ojouchama: ill use the joy stick as a dildo www +[11:59] Ojouchama Use false. +[11:59] sparky4_ ok +[11:59] Ojouchama sparky4 ew. +[11:59] sparky4_ Ojouchama: i am joking +[11:59] sparky4_ Ojouchama: ww +[12:00] sparky4_ Ojouchama: there is 6 rows of keys +[12:00] Ojouchama sparky4 Eventually you want a Game object which the core maintains. +[12:01] sparky4_ wtf is an object? +[12:01] sparky4_ ww +[12:01] Ojouchama sparky4 like the Core object, or Engine, I forgot what I named it. +[12:01] sparky4_ namespace engine{ this? +[12:01] sparky4_ Core::Core() this? +[12:02] Ojouchama Except the Game object will only have things like player lives, and game rules, and stuff like that. +[12:02] Ojouchama sparky4 yes. +[12:02] sparky4_ Ojouchama: we may need a physics object? +[12:02] sparky4_ Ojouchama: wait they are all objects? +[12:02] sparky4_ momentum and gravity ww +[12:04] Ojouchama sparky4 so you can do this: +[12:04] Ojouchama namespace engine{ +[12:04] Ojouchama class Game { +[12:04] Ojouchama public: (public functions here) +[12:04] Ojouchama protected: +[12:04] Ojouchama private: (private variables here) +[12:04] Ojouchama } +[12:04] Ojouchama } +[12:04] Ojouchama Then implement the functions/methods for it in a cppp +[12:05] sparky4 Ojouchama: ohhh can you explain wtf is is a class? +[12:06] Ojouchama sparky4 A core object interfaces all other stuff, a game object has all game stuff, it can also have for example an options object. So core can't affect options directly. But it can update Game with keys, and Game can update options based on those keys. +[12:07] Ojouchama sparky4 A class is a homosexual function that is persistent until killed. +[12:07] sparky4_ wwww +[12:07] =-= sparky4_ is now known as sparky4|compy4 +[12:08] sparky4|compy4 Ojouchama: i am logging this talk wwww so i can read over it when i don't fell sleepy +[12:08] Ojouchama sparky4 It is like having global variables and functions that are bound to a scope of the "object" basically a struct. +[12:08] Ojouchama But more homosexual. +[12:09] Ojouchama The when eng_core.h and eng_core.cpp is more or less a good example of how you do a class. +[12:09] sparky4|compy4 Ojouchama: tho te global variables in that object is basically stuck in there? +[12:10] Ojouchama sparky4 Yes, it's persistent and a member of the object so it's called like this OBJECT_NAME.variable +[12:11] Ojouchama sparky4 with a . (dot) +[12:11] Ojouchama sparky4 But you should make an instance of a class like a variable so... CLASS_NAME variablename; +[12:12] Ojouchama You see that for Core in main.cpp +[12:12] sparky4|compy4 ? +[12:12] Ojouchama sparky4 Inside a class you can use this->variablename to get something. +[12:12] sparky4|compy4 Ojouchama: they should give this stuff better names ww +[12:13] Ojouchama sparky4 What do you mean? +[12:13] sparky4|compy4 Ojouchama: wtf is "this->" i see it everywhere +[12:13] Ojouchama this as in "this exactly copy of the class that is running now at this very moment" +[12:13] Ojouchama And then -> is like using a pointer to the member. +[12:14] Ojouchama sparky4 You can also access+ +[12:14] sparky4|compy4 Ojouchama: you can call a class that is not running? +[12:14] sparky4|compy4 wtf is this sourcery? ww +[12:14] Ojouchama sparky4 You can also access stuff statically so there is a difference. +[12:15] sparky4|compy4 's brain pops +[12:15] sparky4|compy4 wwww +[12:15] Ojouchama Fore example you can Core::functionname(); and it should run, if it CAN run. +[12:15] sparky4|compy4 ww +[12:16] Ojouchama But ... If you do that you might as well use C style functions in my opinion. +[12:16] Ojouchama sparky4 The benefit with C++ is that you can organize persistent and running code better and more efficiently. +[12:16] sparky4|compy4 Ojouchama: is there something bad about C? +[12:16] sparky4|compy4 Ojouchama: ohh~~ +[12:17] Ojouchama sparky4 It has limited use for large scale simulations, which is what a game really is. +[12:18] Ojouchama sparky4 In C you would use a lot of structs, but it gets more messy and complicated the more complex the program gets. +[12:18] sparky4|compy4 Ojouchama: ohh dear +[12:18] sparky4|compy4 Ojouchama: i have servere A.D.H.D. wwww if you can't notice +[12:19] Ojouchama sparky4 C++ might seem complicated but when you think about it you just build a lot of scaffolding, that's all. The rest is then just reduced to ver simple functions that use variables you've stored on the class, or passed as arguments. +[12:19] sparky4|compy4 Ojouchama: this styl;e is programming is OBJECT ORIENTED programming +[12:20] Ojouchama sparky4 Yes, it is. But it isn't bad or anything. +[12:20] sparky4|compy4 Ojouchama: i know but is is very advanced wwww +[12:20] Ojouchama sparky4 Objects are really like contained simulated entities which makes using them for simulation work quite powerful. +[12:22] Ojouchama sparky4 A lot of people will tell you that C++ is bad, or good, or whatever. But don't listen to them, they don't make anything, they're idiots. +[12:22] sparky4|compy4 wwww +[12:23] sparky4|compy4 Ojouchama: can you make a small tutorial file on the shit i don't know but need to know? +[12:23] sparky4|compy4 wwww +[12:23] Ojouchama sparky4 Nothing can solve all use cases in a good way so you use what works good enough. +[12:24] Ojouchama sparky4 If you find C++ hard you aren't good enough to make the optimizations to not use it, or to optimize it with C++, or whatever. +[12:25] sparky4|compy4 Ojouchama: it's not really +[12:25] Ojouchama sparky4 This way you prevent a lot of mistakes, if you do it properly. +[12:26] sparky4|compy4 Ojouchama: the code has significantly much less errors now +[12:26] Ojouchama sparky4 The errors were because you did it wrong. +[12:26] Ojouchama www +[12:26] sparky4|compy4 wwww +[12:26] sparky4|compy4 WWWW +[12:27] Ojouchama sparky4 I bought an XBOX360 on a whim. +[12:27] sparky4|compy4 they say at school i am an advanced programmer wwww +[12:27] Ojouchama sparky4 I told you not to listen to other people, they're idiots. +[12:27] sparky4|compy4 in reality i suck massive donkey dicks +[12:27] Ojouchama wwww +[12:27] sparky4|compy4 Ojouchama: that was like a while ago +[12:28] Ojouchama sparky4 I am terrible, girls can't code. +[12:28] sparky4|compy4 Ojouchama: 99.99% o the population is bakas +[12:28] sparky4|compy4 the 0.01% barely know how to code +[12:28] Ojouchama sparky4 Yes, I always say: It's not that I'm good... It's that you're just an idiot. +[12:29] sparky4|compy4 and a few people know dos programming w +[12:29] sparky4|compy4 Ojouchama: EYE AM A ⑨ +[12:30] sparky4|compy4 Ojouchama: eye want to get better w +[12:30] Ojouchama sparky4 The code runs on Win32 also. +[12:30] sparky4|compy4 Ojouchama: the game code?! +[12:30] Ojouchama sparky4 If I replace the Dos stuff with Win32 libs and compile for Win32 it will work too. +[12:31] sparky4|compy4 Ojouchama: ohh cool~ +[12:31] sparky4|compy4 what about win16? +[12:31] sparky4|compy4 and os/2? +[12:31] Ojouchama sparky4 If I replace the Dos stuff with Xwindow stuff and compile for linux it will work on linux. +[12:31] sparky4|compy4 Ojouchama: wwww thats why i am advoiding assembely +[12:32] sparky4|compy4 in case anyone wants to port it to other machines +[12:32] Ojouchama sparky4 If I replace the Dos stuff with glut stuff or QT or something and compile it for whichever system it will work for all systems which glut or QT uses. +[12:32] sparky4|compy4 Ojouchama: small tutorial file for me to play with? www +[12:33] Ojouchama sparky4 assembly is more tricky, yes. +[12:33] Ojouchama sparky4 Only do low level optimizations when it all works. +[12:33] sparky4|compy4 Ojouchama: and no snes port +[12:34] sparky4|compy4 ww +[12:35] Ojouchama sparky4 It is so hot I am in my panties on the floor drinking lots of juice boxes and surrounded my computer stuff. +[12:36] sparky4|compy4 Ojouchama: wwwwwwwwwwwww +[12:36] sparky4|compy4 Ojouchama: tempurature? +[12:36] Ojouchama sparky4 Yes temperature omigosh!! +[12:37] sparky4|compy4 it's 33 degrees celcious~ +[12:37] Ojouchama sparky4 But talking about code is exciting too. +[12:37] sparky4|compy4 yes +[12:37] sparky4|compy4 is dead tired +[12:37] sparky4|compy4 i am wearing boy's clothed because i feel icky when i cant shave my theighs w +[12:38] sparky4|compy4 i am too tired to +[12:38] Ojouchama sparky4 ew +[12:38] sparky4|compy4 Ojouchama: i am way too tired it takes alot of work +[12:38] sparky4|compy4 i feel very heavy +[12:39] Ojouchama sparky4 hairy legs weigh a lot. +[12:39] sparky4|compy4 Ojouchama: where you live? wwww +[12:39] sparky4|compy4 Ojouchama: i shave them alot www +[12:39] Ojouchama sparky4 I live here. +[12:41] sparky4|compy4 Ojouchama: I live in hell http://www.youtube.com/watch?v=uks26L3B7_o +[12:42] sparky4|compy4 Ojouchama: ** otaku hell +[12:44] sparky4|compy4 Ojouchama: wwww +[12:44] |<-- ticks has left irc.rizon.net (Quit: overheatinggggggggg) +[12:44] sparky4|compy4 wwwwwww +[12:44] sparky4|compy4 Ojouchama: last year it hit 45C +[12:45] sparky4|compy4 Ojouchama: ??? hello crazy? + diff --git a/l b/l new file mode 100644 index 00000000..681ce75c --- /dev/null +++ b/l @@ -0,0 +1,11 @@ +16.bat +16.sh +CORE16.EXE +core16.lk1 +core16.map +CORE16.SYM +proj16.bfproject +proj16.mk +proj16.mk1 +proj16.tgt +proj16.wpj diff --git a/proj16.bfproject b/proj16.bfproject new file mode 100644 index 00000000..f41d88b2 --- /dev/null +++ b/proj16.bfproject @@ -0,0 +1,114 @@ +fb_focus_follow: 1 +view_cline: 0 +e2c.convert_iso: 0 +searchlist: scankey +searchlist: keyWasPressed +searchlist: keyIsPressed +searchlist: scanCode +searchlist: KeyPressed +searchlist: kee +searchlist: keyoff +searchlist: write +searchlist: b0 +searchlist: 08 +wrap_text_default: 0 +outputb_scroll_mode: 0 +files: /dos/z/16/doc/project.txt +files: /dos/z/16/src/eng_core.cpp +files: /dos/z/16/src/eng_core.h +files: /dos/z/16/src/eng_comm.cpp +files: /dos/z/16/src/eng_comm.h +files: /dos/z/16/src/lib/dos_comm.c +files: /dos/z/16/src/lib/dos_comm.h +files: /dos/z/16/src/eng_gfx.cpp +files: /dos/z/16/src/eng_gfx.h +files: /dos/z/16/src/lib/dos_gfx.cpp +files: /dos/z/16/src/lib/dos_gfx.h +files: /dos/z/16/src/eng_snd.cpp +files: /dos/z/16/src/eng_snd.h +files: /dos/z/16/src/lib/dos_opl2.cpp +files: /dos/z/16/src/lib/opl2.h +files: /dos/z/16/src/lib/lib_com.cpp +files: /dos/z/16/src/lib/lib_com.h +files: /dos/z/16/src/eng_ai.cpp +files: /dos/z/16/src/eng_ai.h +files: /dos/z/16/src/timer.cpp +files: /dos/z/16/src/timer.h +files: /dos/z/16/src/engine.h +files: /dos/z/16/src/main.cpp +files: /dos/z/16/doc/ojoww.cpp +c2e.convert_iso: 0 +recent_files: file:///dos/z/16/remake.sh +recent_files: file:///dos/z/16/16.sh +recent_files: file:///dos/z/16/16.bat +recent_files: file:///dos/z/16/remake.bat +recent_files: file:///dos/z/16/doc/ojoww.cpp +recent_files: file:///dos/z/16/src/main.cpp +recent_files: file:///dos/z/16/src/engine.h +recent_files: file:///dos/z/16/src/timer.h +recent_files: file:///dos/z/16/src/timer.cpp +recent_files: file:///dos/z/16/src/eng_ai.h +recent_files: file:///dos/z/16/src/eng_ai.cpp +recent_files: file:///dos/z/16/src/lib/lib_com.h +recent_files: file:///dos/z/16/src/lib/lib_com.cpp +recent_files: file:///dos/z/16/src/lib/opl2.h +recent_files: file:///dos/z/16/src/lib/dos_opl2.cpp +recent_files: file:///dos/z/16/src/eng_snd.h +recent_files: file:///dos/z/16/src/eng_snd.cpp +recent_files: file:///dos/z/16/src/lib/dos_gfx.h +recent_files: file:///dos/z/16/src/lib/dos_gfx.cpp +recent_files: file:///dos/z/16/src/eng_gfx.h +recent_files: file:///dos/z/16/src/eng_gfx.cpp +recent_files: file:///dos/z/16/src/lib/dos_comm.h +recent_files: file:///dos/z/16/src/lib/dos_comm.c +recent_files: file:///dos/z/16/src/eng_comm.h +recent_files: file:///dos/z/16/src/eng_comm.cpp +recent_files: file:///dos/z/16/src/eng_core.h +recent_files: file:///dos/z/16/src/eng_core.cpp +recent_files: file:///dos/z/16/doc/project.txt +recent_files: file:///dos/z/16/ojowwww.cpp +snippets_show_as_menu: 1 +show_mbhl: 1 +convertcolumn_fillempty: +adv_open_recursive: 0 +e2c.convert_symbol: 0 +spell_lang: en +view_blocks: 1 +bookmarks_filename_mode: 1 +fb_viewmode: 0 +template: /usr/share/bluefish/templates/C_Header_GPL +bookmarks_show_mode: 0 +bmarksearchmode: 0 +replacelist: keer +replacelist: keep +replacelist: kee +replacelist: keyp +e2c.convert_xml: 1 +e2c.convert_num: 0 +view_line_numbers: 1 +c2e.convert_symbol: 0 +default_mime_type: text/plain +fb_show_hidden_f: 0 +convertcolumn_separator: +autocomplete: 1 +c2e.convert_xml: 1 +c2e.IE_apos_workaround: 0 +name: Project 16 +last_filefilter: +view_main_toolbar: 1 +htmlbar_view: 0 +autoindent: 1 +c2e.convert_special: 0 +editor_tab_width: 4 +view_left_panel: 0 +convertcolumn_horizontally: 0 +e2c.convert_special: 0 +leftpanel_active_tab: 1 +view_statusbar: 1 +charmap_block: 11 +outputb_show_all_output: 0 +spell_check_default: 1 +fb_show_backup_f: 0 +opendir: file:///dos/z/16 +savedir: file:///dos/z/16/src/lib +adv_open_matchname: 0 diff --git a/proj16.mk b/proj16.mk new file mode 100644 index 00000000..5344e111 --- /dev/null +++ b/proj16.mk @@ -0,0 +1,3 @@ +project : C:\Z\16\core16.exe .SYMBOLIC + +!include C:\Z\16\proj16.mk1 diff --git a/proj16.mk1 b/proj16.mk1 new file mode 100644 index 00000000..26d0ae35 --- /dev/null +++ b/proj16.mk1 @@ -0,0 +1,82 @@ +!define BLANK "" +C:\Z\16\dos_comm.obj : C:\Z\16\src\lib\dos_comm.c .AUTODEPEND + @C: + cd C:\Z\16 + *wcc src\lib\dos_comm.c -i="c:\fdos\WATCOM/h" -w4 -e25 -zkl -zq -otexan -ol& + -ol+ -oh -om -d2 -bt=dos -fo=.obj -ml + +C:\Z\16\eng_ai.obj : C:\Z\16\src\eng_ai.cpp .AUTODEPEND + @C: + cd C:\Z\16 + *wpp src\eng_ai.cpp -i="c:\fdos\WATCOM/h" -w4 -e25 -zkl -zq -otexan -ol -ol& ++ -oh -om -d2 -bt=dos -fo=.obj -ml -xs -xr + +C:\Z\16\eng_comm.obj : C:\Z\16\src\eng_comm.cpp .AUTODEPEND + @C: + cd C:\Z\16 + *wpp src\eng_comm.cpp -i="c:\fdos\WATCOM/h" -w4 -e25 -zkl -zq -otexan -ol -& +ol+ -oh -om -d2 -bt=dos -fo=.obj -ml -xs -xr + +C:\Z\16\eng_core.obj : C:\Z\16\src\eng_core.cpp .AUTODEPEND + @C: + cd C:\Z\16 + *wpp src\eng_core.cpp -i="c:\fdos\WATCOM/h" -w4 -e25 -zkl -zq -otexan -ol -& +ol+ -oh -om -d2 -bt=dos -fo=.obj -ml -xs -xr + +C:\Z\16\eng_gfx.obj : C:\Z\16\src\eng_gfx.cpp .AUTODEPEND + @C: + cd C:\Z\16 + *wpp src\eng_gfx.cpp -i="c:\fdos\WATCOM/h" -w4 -e25 -zkl -zq -otexan -ol -o& +l+ -oh -om -d2 -bt=dos -fo=.obj -ml -xs -xr + +C:\Z\16\eng_snd.obj : C:\Z\16\src\eng_snd.cpp .AUTODEPEND + @C: + cd C:\Z\16 + *wpp src\eng_snd.cpp -i="c:\fdos\WATCOM/h" -w4 -e25 -zkl -zq -otexan -ol -o& +l+ -oh -om -d2 -bt=dos -fo=.obj -ml -xs -xr + +C:\Z\16\dos_gfx.obj : C:\Z\16\src\lib\dos_gfx.cpp .AUTODEPEND + @C: + cd C:\Z\16 + *wpp src\lib\dos_gfx.cpp -i="c:\fdos\WATCOM/h" -w4 -e25 -zkl -zq -otexan -o& +l -ol+ -oh -om -d2 -bt=dos -fo=.obj -ml -xs -xr + +C:\Z\16\dos_opl2.obj : C:\Z\16\src\lib\dos_opl2.cpp .AUTODEPEND + @C: + cd C:\Z\16 + *wpp src\lib\dos_opl2.cpp -i="c:\fdos\WATCOM/h" -w4 -e25 -zkl -zq -otexan -& +ol -ol+ -oh -om -d2 -bt=dos -fo=.obj -ml -xs -xr + +C:\Z\16\lib_com.obj : C:\Z\16\src\lib\lib_com.cpp .AUTODEPEND + @C: + cd C:\Z\16 + *wpp src\lib\lib_com.cpp -i="c:\fdos\WATCOM/h" -w4 -e25 -zkl -zq -otexan -o& +l -ol+ -oh -om -d2 -bt=dos -fo=.obj -ml -xs -xr + +C:\Z\16\main.obj : C:\Z\16\src\main.cpp .AUTODEPEND + @C: + cd C:\Z\16 + *wpp src\main.cpp -i="c:\fdos\WATCOM/h" -w4 -e25 -zkl -zq -otexan -ol -ol+ & +-oh -om -d2 -bt=dos -fo=.obj -ml -xs -xr + +C:\Z\16\timer.obj : C:\Z\16\src\timer.cpp .AUTODEPEND + @C: + cd C:\Z\16 + *wpp src\timer.cpp -i="c:\fdos\WATCOM/h" -w4 -e25 -zkl -zq -otexan -ol -ol+& + -oh -om -d2 -bt=dos -fo=.obj -ml -xs -xr + +C:\Z\16\core16.exe : C:\Z\16\dos_comm.obj C:\Z\16\eng_ai.obj C:\Z\16\eng_com& +m.obj C:\Z\16\eng_core.obj C:\Z\16\eng_gfx.obj C:\Z\16\eng_snd.obj C:\Z\16\d& +os_gfx.obj C:\Z\16\dos_opl2.obj C:\Z\16\lib_com.obj C:\Z\16\main.obj C:\Z\16& +\timer.obj C:\Z\16\src\eng_ai.h C:\Z\16\src\eng_comm.h C:\Z\16\src\eng_core.& +h C:\Z\16\src\eng_gfx.h C:\Z\16\src\eng_snd.h C:\Z\16\src\engine.h C:\Z\16\s& +rc\lib\dos_comm.h C:\Z\16\src\lib\dos_gfx.h C:\Z\16\src\lib\lib_com.h C:\Z\1& +6\src\lib\opl2.h C:\Z\16\src\timer.h .AUTODEPEND + @C: + cd C:\Z\16 + @%write core16.lk1 FIL dos_comm.obj,eng_ai.obj,eng_comm.obj,eng_core.obj,en& +g_gfx.obj,eng_snd.obj,dos_gfx.obj,dos_opl2.obj,lib_com.obj,main.obj,timer.ob& +j + @%append core16.lk1 + *wlink name core16 d all sys dos op m op maxe=25 op q op symf @core16.lk1 + diff --git a/proj16.tgt b/proj16.tgt new file mode 100644 index 00000000..bdea7782 --- /dev/null +++ b/proj16.tgt @@ -0,0 +1,726 @@ +40 +targetIdent +0 +MProject +1 +MComponent +0 +2 +WString +3 +EXE +3 +WString +5 +de6e9 +1 +0 +1 +4 +MCommand +0 +5 +MCommand +0 +6 +MItem +10 +core16.exe +7 +WString +3 +EXE +8 +WVList +0 +9 +WVList +2 +10 +ActionStates +11 +WString +5 +&Make +12 +WVList +0 +13 +ActionStates +14 +WString +7 +Sam&ple +15 +WVList +0 +-1 +1 +1 +0 +16 +WPickList +25 +17 +MItem +3 +*.c +18 +WString +4 +COBJ +19 +WVList +8 +20 +MRState +21 +WString +3 +WCC +22 +WString +37 +?????No double-byte character support +1 +0 +23 +MRState +24 +WString +3 +WCC +25 +WString +22 +?????Current code page +1 +1 +26 +MRState +27 +WString +3 +WCC +28 +WString +21 +?????No optimizations +1 +0 +29 +MRState +30 +WString +3 +WCC +31 +WString +26 +?????Fastest possible code +1 +1 +32 +MCState +33 +WString +3 +WCC +34 +WString +23 +?????Loop optimizations +1 +1 +35 +MCState +36 +WString +3 +WCC +37 +WString +19 +?????Loop unrolling +1 +1 +38 +MCState +39 +WString +3 +WCC +40 +WString +33 +?????Allow repeated optimizations +1 +1 +41 +MCState +42 +WString +3 +WCC +43 +WString +23 +?????Math optimizations +1 +1 +44 +WVList +0 +-1 +1 +1 +0 +45 +MItem +18 +src\lib\dos_comm.c +46 +WString +4 +COBJ +47 +WVList +0 +48 +WVList +0 +17 +1 +1 +0 +49 +MItem +5 +*.cpp +50 +WString +6 +CPPOBJ +51 +WVList +8 +52 +MRState +53 +WString +3 +WPP +54 +WString +37 +?????No double-byte character support +1 +0 +55 +MRState +56 +WString +3 +WPP +57 +WString +22 +?????Current code page +1 +1 +58 +MRState +59 +WString +3 +WPP +60 +WString +21 +?????No optimizations +1 +0 +61 +MRState +62 +WString +3 +WPP +63 +WString +26 +?????Fastest possible code +1 +1 +64 +MCState +65 +WString +3 +WPP +66 +WString +23 +?????Loop optimizations +1 +1 +67 +MCState +68 +WString +3 +WPP +69 +WString +19 +?????Loop unrolling +1 +1 +70 +MCState +71 +WString +3 +WPP +72 +WString +33 +?????Allow repeated optimizations +1 +1 +73 +MCState +74 +WString +3 +WPP +75 +WString +23 +?????Math optimizations +1 +1 +76 +WVList +1 +77 +ActionStates +78 +WString +5 +&Make +79 +WVList +1 +80 +MCState +81 +WString +5 +WMAKE +82 +WString +26 +?????Echo progress of work +1 +1 +-1 +1 +1 +0 +83 +MItem +14 +src\eng_ai.cpp +84 +WString +6 +CPPOBJ +85 +WVList +0 +86 +WVList +0 +49 +1 +1 +0 +87 +MItem +16 +src\eng_comm.cpp +88 +WString +6 +CPPOBJ +89 +WVList +0 +90 +WVList +0 +49 +1 +1 +0 +91 +MItem +16 +src\eng_core.cpp +92 +WString +6 +CPPOBJ +93 +WVList +0 +94 +WVList +0 +49 +1 +1 +0 +95 +MItem +15 +src\eng_gfx.cpp +96 +WString +6 +CPPOBJ +97 +WVList +0 +98 +WVList +0 +49 +1 +1 +0 +99 +MItem +15 +src\eng_snd.cpp +100 +WString +6 +CPPOBJ +101 +WVList +0 +102 +WVList +0 +49 +1 +1 +0 +103 +MItem +19 +src\lib\dos_gfx.cpp +104 +WString +6 +CPPOBJ +105 +WVList +0 +106 +WVList +0 +49 +1 +1 +0 +107 +MItem +20 +src\lib\dos_opl2.cpp +108 +WString +6 +CPPOBJ +109 +WVList +0 +110 +WVList +0 +49 +1 +1 +0 +111 +MItem +19 +src\lib\lib_com.cpp +112 +WString +6 +CPPOBJ +113 +WVList +0 +114 +WVList +0 +49 +1 +1 +0 +115 +MItem +12 +src\main.cpp +116 +WString +6 +CPPOBJ +117 +WVList +0 +118 +WVList +0 +49 +1 +1 +0 +119 +MItem +13 +src\timer.cpp +120 +WString +6 +CPPOBJ +121 +WVList +0 +122 +WVList +0 +49 +1 +1 +0 +123 +MItem +3 +*.h +124 +WString +3 +NIL +125 +WVList +0 +126 +WVList +0 +-1 +1 +0 +0 +127 +MItem +12 +src\eng_ai.h +128 +WString +3 +NIL +129 +WVList +0 +130 +WVList +0 +123 +1 +1 +0 +131 +MItem +14 +src\eng_comm.h +132 +WString +3 +NIL +133 +WVList +0 +134 +WVList +0 +123 +1 +1 +0 +135 +MItem +14 +src\eng_core.h +136 +WString +3 +NIL +137 +WVList +0 +138 +WVList +0 +123 +1 +1 +0 +139 +MItem +13 +src\eng_gfx.h +140 +WString +3 +NIL +141 +WVList +0 +142 +WVList +0 +123 +1 +1 +0 +143 +MItem +13 +src\eng_snd.h +144 +WString +3 +NIL +145 +WVList +0 +146 +WVList +0 +123 +1 +1 +0 +147 +MItem +12 +src\engine.h +148 +WString +3 +NIL +149 +WVList +0 +150 +WVList +0 +123 +1 +1 +0 +151 +MItem +18 +src\lib\dos_comm.h +152 +WString +3 +NIL +153 +WVList +0 +154 +WVList +0 +123 +1 +1 +0 +155 +MItem +17 +src\lib\dos_gfx.h +156 +WString +3 +NIL +157 +WVList +0 +158 +WVList +0 +123 +1 +1 +0 +159 +MItem +17 +src\lib\lib_com.h +160 +WString +3 +NIL +161 +WVList +0 +162 +WVList +0 +123 +1 +1 +0 +163 +MItem +14 +src\lib\opl2.h +164 +WString +3 +NIL +165 +WVList +0 +166 +WVList +0 +123 +1 +1 +0 +167 +MItem +11 +src\timer.h +168 +WString +3 +NIL +169 +WVList +0 +170 +WVList +0 +123 +1 +1 +0 diff --git a/proj16.wpj b/proj16.wpj new file mode 100644 index 00000000..c78d9631 --- /dev/null +++ b/proj16.wpj @@ -0,0 +1,43 @@ +40 +projectIdent +0 +VpeMain +1 +WRect +-40 +0 +10320 +9946 +2 +MProject +3 +MCommand +0 +4 +MCommand +0 +1 +5 +WFileName +10 +proj16.tgt +6 +WVList +1 +7 +VComponent +8 +WRect +0 +0 +5700 +4293 +0 +0 +9 +WFileName +10 +proj16.tgt +0 +0 +7 diff --git a/remake.bat b/remake.bat new file mode 100644 index 00000000..2ddbf411 --- /dev/null +++ b/remake.bat @@ -0,0 +1 @@ +ide2make -p proj16.wpj -h 8 proj16.tgt diff --git a/src/eng_ai.cpp b/src/eng_ai.cpp new file mode 100644 index 00000000..525e62ef --- /dev/null +++ b/src/eng_ai.cpp @@ -0,0 +1,12 @@ +#include "src\eng_ai.h" +#include + +namespace engine { + + void do_artificial_intelligence() + { + //artificial intelligence here +//==== std::cout << "A.I. HERE" << std::endl; + } + +} \ No newline at end of file diff --git a/src/eng_ai.h b/src/eng_ai.h new file mode 100644 index 00000000..33da40e5 --- /dev/null +++ b/src/eng_ai.h @@ -0,0 +1,8 @@ +#ifndef _ENGINE_ARTIFICIAL_INTELLIGENCE_H_ +#define _ENGINE_ARTIFICIAL_INTELLIGENCE_H_ + +namespace engine { + void do_artificial_intelligence(); +} + +#endif/*_ENGINE_ARTIFICIAL_INTELLIGENCE_H_*/ \ No newline at end of file diff --git a/src/eng_comm.cpp b/src/eng_comm.cpp new file mode 100644 index 00000000..9d8a6d1e --- /dev/null +++ b/src/eng_comm.cpp @@ -0,0 +1,61 @@ +#include "src\eng_comm.h" +#include + int xxxx = 0; + int yyyy = 0; + int qing = 4; + +namespace engine { + + /*engine_message do_communication() + { + //communication here +//==== std::cout << "COMMUNICATION HERE" << std::endl; + int msg; + std::cout << "Enter 1 for continue." << std::endl; + std::cin >> msg; + return msg == 1 ? ENGINE_RUN : ENGINE_QUIT; + }*/ + /*engine_message do_communication(bool *input) + { + //communication here +//==== std::cout << "COMMUNICATION HERE" << std::endl; + return input['e'] == true ? ENGINE_QUIT : ENGINE_RUN; + }*/ + engine_message do_communication(byte input) + { + //communication here +//==== std::cout << "COMMUNICATION HERE" << std::endl; + if(input == 44){ + FMKeyOn(0, 0x106, 4); + }else if(input == 172) FMKeyOff(0); + if(input == KEY_X){ + sound(440); + delay(100); + nosound(); + //delay(50); + }else if(input == KEY_X+128) nosound(); + if(12 >= input && input >= 2) qing = input - 1; + if(input == 57) qing = 0; + + if(qing > 0){ + ding(qing); + }else{ + if(keyp(KEY_UP) || keyp(KEY_DOWN) || keyp(KEY_LEFT) || keyp(KEY_RIGHT)) etesuto(xxxx, yyyy); + if(keyp(KEY_UP)){ + if(--yyyy < 0) yyyy = 0; + }else if(keyp(KEY_DOWN)){ + if(++yyyy >= SH) yyyy = SH - 1; + } + if(keyp(KEY_LEFT)){ + if(--xxxx < 0) xxxx = 0; + } + if(keyp(KEY_RIGHT)){ + if(++xxxx >= SW) xxxx = SW - 1; + } + qtesuto(xxxx, yyyy, 14); + } + //if(input) printf("%03d\n", input); + return input == 1 ? ENGINE_QUIT : ENGINE_RUN; + } + +} diff --git a/src/eng_comm.h b/src/eng_comm.h new file mode 100644 index 00000000..ef47209e --- /dev/null +++ b/src/eng_comm.h @@ -0,0 +1,14 @@ +#ifndef _ENGINE_COMMUNICATION_H_ +#define _ENGINE_COMMUNICATION_H_ + +#include "src\engine.h" +#include "src\lib\dos_comm.h" +#include "src\lib\dos_gfx.h" +#include "src\lib\opl2.h" + +namespace engine { + //engine_message do_communication(); + engine_message do_communication(byte input); +} + +#endif/*_ENGINE_COMMUNICATION_H_*/ \ No newline at end of file diff --git a/src/eng_core.cpp b/src/eng_core.cpp new file mode 100644 index 00000000..67c50978 --- /dev/null +++ b/src/eng_core.cpp @@ -0,0 +1,199 @@ +#include "src\eng_core.h" +#include +#include "src\eng_snd.h" +#include "src\eng_gfx.h" +#include "src\eng_comm.h" +#include "src\eng_ai.h" + +#include + +#include "src\lib\dos_gfx.h" +#include "src\lib\opl2.h" +#include "src\lib\dos_comm.h" + +namespace engine{ + + Core::Core() + { + // Hardware Initiation + this->init(); + + //default constructor + this->fp = new std::list; + this->msg = ENGINE_RUN; + this->timer.start_timer(); + this->frames_per_second = 60; + + this->fp->push_back(&Core::sound); + this->fp->push_back(&Core::graphics); + this->fp->push_back(&Core::comm); + this->fp->push_back(&Core::ai); + + //this->fp.push_back(&core::sound); + //this->fp.push_back(&core::graphics); + //this->fp.push_back(&core::comm); + //this->fp.push_back(&engine::core::ai); + + // Global Variables + this->qing = 4; // test global variable + this->x = 0; // X + this->y = 0; // Y + } + + void Core::update() + { + for (std::list::iterator i = fp->begin(); i != fp->end(); i++) + //for (std::list::iterator i = this->fp.begin(); i != this->fp.end(); i++) + { + + (this->*(*i))(); + } + + } + + void Core::sound() + { + //wrap sound lib + do_sound(); + } + void Core::graphics() + { + //int num_frames = 60; + //double fps = 1.0 / num_frames; + //double now = this->timer.elapsed_timer(); + //std::cout << "fps: " << fps << " now: " << now << std::endl; + //if (this->timer.elapsed_timer() >= fps) + //{ + //wrap graphics lib + do_graphics(); + //this->timer.start_timer(); + //} + } + void Core::comm() + { + //int num_frames = 60; + //double fps = 1.0 / num_frames; + //double now = this->timer.elapsed_timer(); + //std::cout << "fps: " << fps << " now: " << now << std::endl; + //if (this->timer.elapsed_timer() >= fps) + //{ + //wrap comm lib + this->msg = do_communication(scankey()); + //this->timer.start_timer(); + //} + } + void Core::ai() + { + //wrap A.I. lib + do_artificial_intelligence(); + } + + engine_message Core::_msg() + { + return this->msg; + } + + void Core::run() + { +//---- int i = 0; + while (ENGINE_EXIT != this->msg) + { + //next line for purely testing purposes +//---- i++;if(i==600){char a;std::cin >> a;this->keeq[a] = true;i=0;} + this->sync(); + this->input(); + this->update(); +//tt std::cout << this->qing << std::endl; + } + } + + bool Core::init(){ + bool xz = 0; // error switch... + std::cout << "VIDEO INITIATION" << std::endl; + setvideo(0x13, 1); + setvbuff(1); + std::cout << "Checking for Adlib sound card...." << std::endl; + if(!AdlibExists()){ + std::cout << "not found." << std::endl; + xz = 1; + } + std::cout << "found." << std::endl; + std::cout << "OPL2 INITIATION" << std::endl; + fmtest(); + std::cout << "\nPress ESC to quit the game engine core test." << std::endl; + std::cout << "1 - 9 for graphical tests!" << std::endl; + std::cout << "space bar for control and sprite test!" << std::endl; + std::cout << "z key for noise!" << std::endl; + std::cout << "Press press any key to continue!" << std::endl; + getch(); + std::cout << "INPUT INITIATION" << std::endl; + setkb(1); + std::cout << "INITIATION" << std::endl; + return xz; + } + + void Core::release() + { + //release contexts and set engine to exit + setvideo(0x03, 0); + setvbuff(0); + setkb(0); + FMReset(); + this->msg = ENGINE_EXIT; + } + + void Core::input(){ + //retrieve input device information + //dummy 'w' and 'p' down, t up +//---- bool dummy_input_available = true; +//---- if(dummy_input_available) + //if (scankey() <= 128) +//---- { +//---- std::cout << "key down" << std::endl; +//---- this->keeq['w'] = true; +//---- this->keeq['p'] = true; +//---- this->keeq['t'] = false; + //notify engine that input occured + this->msg = ENGINE_INPUT; +//---- } +//---- else +//---- { +//---- std::cout << "key up" << std::endl; +//---- this->msg = ENGINE_RUN; +//---- } + } + + void Core::sync() + { + if (this->timer.elapsed_timer() >= (1.0 / this->frames_per_second)) + { + //int a;std::cin >> a; + this->fp->push_back(&Core::graphics); + this->timer.start_timer(); +//==== std::cout << "GRAPHICS GRAPHICS GRAPHICS GRAPHICS GRAPHICS" << std::endl; + } + else + { + this->fp->remove(&Core::graphics); + } + if (ENGINE_INPUT == this->msg) + { + this->fp->push_back(&Core::comm); + } + else + { + this->fp->remove(&Core::comm); + } + if (ENGINE_QUIT == this->msg) + { + this->fp->push_back(&Core::release); + } + } + + Core::~Core() + { + //deconstructor + delete(this->fp); + } + +} diff --git a/src/eng_core.h b/src/eng_core.h new file mode 100644 index 00000000..a704402d --- /dev/null +++ b/src/eng_core.h @@ -0,0 +1,42 @@ +#ifndef _ENGINE_CORE_H_ +#define _ENGINE_CORE_H_ + +#include +#include "src\engine.h" +#include "src\timer.h" + +namespace engine { + class Core + { + public: + Core(); + void update(); + void sound(); + void graphics(); + void comm(); + void ai(); + engine_message _msg(); + void run(); + bool init(); + void release(); + void input(); + void sync(); + ~Core(); + + protected: + private: + engine_message msg; + std::list *fp; + Timer timer; +// bool keeq[NUM_SCAN_QUE]; + int frames_per_second; + //std::list fp; +/* int xxxx = 0; + int yyyy = 0;*/ + int qing; + int x; + int y; + }; +} + +#endif/*_ENGINE_CORE_H_*/ \ No newline at end of file diff --git a/src/eng_gfx.cpp b/src/eng_gfx.cpp new file mode 100644 index 00000000..3ab208c5 --- /dev/null +++ b/src/eng_gfx.cpp @@ -0,0 +1,16 @@ +#include "src\eng_gfx.h" +#include + +namespace engine { + + void do_graphics() + { + //graphics here +//==== std::cout << "GRAPHICS HERE" << std::endl; + //ding(10); + /*clearscr(); + BlockMove();*/ + //colortest(); + } + +} diff --git a/src/eng_gfx.h b/src/eng_gfx.h new file mode 100644 index 00000000..2533c1a1 --- /dev/null +++ b/src/eng_gfx.h @@ -0,0 +1,10 @@ +#ifndef _ENGINE_GRAPHICS_H_ +#define _ENGINE_GRAPHICS_H_ + +#include "src\lib\dos_gfx.h" + +namespace engine { + void do_graphics(); +} + +#endif/*_ENGINE_GRAPHICS_H_*/ \ No newline at end of file diff --git a/src/eng_snd.cpp b/src/eng_snd.cpp new file mode 100644 index 00000000..7ca496b0 --- /dev/null +++ b/src/eng_snd.cpp @@ -0,0 +1,13 @@ +#include "src\eng_snd.h" +#include + +namespace engine { + + void do_sound() + { + //sound here +//==== std::cout << "SOUND HERE" << std::endl; + //soundtest(); + } + +} \ No newline at end of file diff --git a/src/eng_snd.h b/src/eng_snd.h new file mode 100644 index 00000000..4f1adebc --- /dev/null +++ b/src/eng_snd.h @@ -0,0 +1,10 @@ +#ifndef _ENGINE_SOUND_H_ +#define _ENGINE_SOUND_H_ + +#include "src\lib\opl2.h" + +namespace engine { + void do_sound(); +} + +#endif/*_ENGINE_SOUND_H_*/ \ No newline at end of file diff --git a/src/engine.h b/src/engine.h new file mode 100644 index 00000000..d188c218 --- /dev/null +++ b/src/engine.h @@ -0,0 +1,10 @@ +#ifndef _ENGINE_H_ +#define _ENGINE_H_ + +typedef enum { + ENGINE_EXIT, + ENGINE_QUIT, + ENGINE_RUN, + ENGINE_INPUT +} engine_message; +#endif diff --git a/src/lib/dos_comm.c b/src/lib/dos_comm.c new file mode 100644 index 00000000..37129426 --- /dev/null +++ b/src/lib/dos_comm.c @@ -0,0 +1,101 @@ +/* Thanks to Alex Russell for example code */ +/* Thanks to Gary Neal for example code */ +#include "src\lib\dos_comm.h" + +// Q code +byte kee; +byte keer[128]; /* key pressed */ +byte keep[128]; /* key released */ + +#ifdef __cplusplus /* Functions must be declared C style */ +extern "C" { +#endif +extern void interrupt (far *oldkb)(void) = NULL; /* BIOS keyboard handler */ +#ifdef __cplusplus +} +#endif +/*****************NEW KEYBOARD 09h ISR***********************/ +void interrupt newkb(void){ + register char qx; + + kee = inp(0x60); /* Read the keyboard scan code */ + + /* Clear keyboard controller on XT machines */ + qx = inp(0x61); + qx |= 0x82; + outp(0x61, qx); + qx &= 0x7F; + outp(0x61, qx); + + /* Interpret the scan code and set our flags */ + if(kee & 0x80) + keep[kee & 0x7F] = 0; + else + keep[kee] = keer[kee] = 1; + + outp(0x20, 0x20); +} + +/* ---------------------- init_keyboard() ---------------- April 17,1993 */ +/* restore the bios keyboard handler */ +/* ---------------------- deinit_keyboard() -------------- April 17,1993 */ +void setkb(int vq){ + if(!vq){ // deinitiation + /* Abort if our function pointer has no valid address */ + if(oldkb == NULL) return; + /* Set address in our function pointer in interrupt vector table */ + _dos_setvect(9, oldkb); + /* Reset our function pointer to contain no valid address */ + oldkb = NULL; + }else if(vq == 1){ // initiation + int i; /* Index variable */ + byte far *lock_key; + + /* Abort if our function pointer has a valid address. */ + if(oldkb != NULL) return; + + /* Clear the keyboard buttons state arrays */ + for(i = 0; i < 128; i++) + keep[i] = keer[i] = 0; + + /* save old BIOS key board handler */ + oldkb = _dos_getvect(9); + + // turn off num-lock via BIOS + lock_key = MK_FP(0x040, 0x017); //wtf is going on here? + *lock_key&=(~(16 | 32 | 64)); // toggle off the lock keys + oldkb(); // call BIOS keyhandler to change keyboard lights + + /* setup our own handler */ + _dos_setvect(9, newkb); + } +} + +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *\ + * keyp * + * * + * Returns the status of the key requested. * + * The status is 1 if the key is pressed or has been pressed since the * + * last call to this function for that particular key. * +\* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ +char keyp(byte c){ + register char retVal; + + /* Key value in range of keyboard keys available */ + c &= 0x7F; + + /* Get the status of the key requested */ + retVal = keep[c] | keer[c]; + + /* Reset the was pressed status for the requested key */ + keer[c] = 0; + + /* Return the requested key's state */ + return retVal; +} + +// tesuto +byte scankey(){ + //if(keyp(kee)) printf("%c %03d %03x\n", kee, kee, kee); + return kee; +} diff --git a/src/lib/dos_comm.h b/src/lib/dos_comm.h new file mode 100644 index 00000000..6f337518 --- /dev/null +++ b/src/lib/dos_comm.h @@ -0,0 +1,106 @@ +#ifndef _DOSLIB_COMM_H_ +#define _DOSLIB_COMM_H_ +#include "src\lib\lib_com.h" + +/* Control codes for all keys on the keyboard */ +#define KEY_A (0x1E) +#define KEY_B (0x30) +#define KEY_C (0x2E) +#define KEY_D (0x20) +#define KEY_E (0x12) +#define KEY_F (0x21) +#define KEY_G (0x22) +#define KEY_H (0x23) +#define KEY_I (0x17) +#define KEY_J (0x24) +#define KEY_K (0x25) +#define KEY_L (0x26) +#define KEY_M (0x32) +#define KEY_N (0x31) +#define KEY_O (0x18) +#define KEY_P (0x19) +#define KEY_Q (0x10) +#define KEY_R (0x13) +#define KEY_S (0x1F) +#define KEY_T (0x14) +#define KEY_U (0x16) +#define KEY_V (0x2F) +#define KEY_W (0x11) +#define KEY_X (0x2D) +#define KEY_Y (0x15) +#define KEY_Z (0x2C) +#define KEY_1 (0x02) +#define KEY_2 (0x03) +#define KEY_3 (0x04) +#define KEY_4 (0x05) +#define KEY_5 (0x06) +#define KEY_6 (0x07) +#define KEY_7 (0x08) +#define KEY_8 (0x09) +#define KEY_9 (0x0A) +#define KEY_0 (0x0B) +#define KEY_DASH (0x0C) /* -_ */ +#define KEY_EQUAL (0x0D) /* =+ */ +#define KEY_LBRACKET (0x1A) /* [{ */ +#define KEY_RBRACKET (0x1B) /* ]} */ +#define KEY_SEMICOLON (0x27) /* ;: */ +#define KEY_RQUOTE (0x28) /* '" */ +#define KEY_LQUOTE (0x29) /* `~ */ +#define KEY_PERIOD (0x33) /* .> */ +#define KEY_COMMA (0x34) /* ,< */ +#define KEY_SLASH (0x35) /* /? */ +#define KEY_BACKSLASH (0x2B) /* \| */ +#define KEY_F1 (0x3B) +#define KEY_F2 (0x3C) +#define KEY_F3 (0x3D) +#define KEY_F4 (0x3E) +#define KEY_F5 (0x3F) +#define KEY_F6 (0x40) +#define KEY_F7 (0x41) +#define KEY_F8 (0x42) +#define KEY_F9 (0x43) +#define KEY_F10 (0x44) +#define KEY_ESC (0x01) +#define KEY_BACKSPACE (0x0E) +#define KEY_TAB (0x0F) +#define KEY_ENTER (0x1C) +#define KEY_CONTROL (0x1D) +#define KEY_LSHIFT (0x2A) +#define KEY_RSHIFT (0x36) +#define KEY_PRTSC (0x37) +#define KEY_ALT (0x38) +#define KEY_SPACE (0x39) +#define KEY_CAPSLOCK (0x3A) +#define KEY_NUMLOCK (0x45) +#define KEY_SCROLLLOCK (0x46) +#define KEY_HOME (0x47) +#define KEY_UP (0x48) +#define KEY_PGUP (0x49) +#define KEY_MINUS (0x4A) +#define KEY_LEFT (0x4B) +#define KEY_CENTER (0x4C) +#define KEY_RIGHT (0x4D) +#define KEY_PLUS (0x4E) +#define KEY_END (0x4F) +#define KEY_DOWN (0x50) +#define KEY_PGDOWN (0x51) +#define KEY_INS (0x52) +#define KEY_DEL (0x53) + +#ifdef __cplusplus /* Functions must be declared C style */ +extern "C" { +#endif +void interrupt far newkb(void); +//extern void interrupt (far *oldkb)(void); +void setkb(int vq); +char keyp(byte c); +byte scankey(); + +/* Define macro */ +#define kepn(c) keep[c & 0x7F] + +#ifdef __cplusplus +} +#endif + +#endif/*_DOSLIB_COMM_H_*/ diff --git a/src/lib/dos_gfx.cpp b/src/lib/dos_gfx.cpp new file mode 100644 index 00000000..bb1e4cf2 --- /dev/null +++ b/src/lib/dos_gfx.cpp @@ -0,0 +1,299 @@ +///////////////////////////////////////////////////////////////////////////// +// // +// TUTPROG4.CPP - VGA Trainer Program 4 (in Turbo C++ 3.0) // +// // +// "The VGA Trainer Program" is written by Denthor of Asphyxia. However it // +// was limited to Pascal only in its first run. All I have done is taken // +// his original release, translated it to C++ and touched up a few things. // +// I take absolutely no credit for the concepts presented in this code and // +// am NOT the person to ask for help if you are having trouble. // +// // +// Program Notes : This program implements virtual screens, a great way // +// to update your screen. // +// // +// For this particular program, I have found the compiler // +// option -mc (Compact memory model) to work better than // +// -ml (Large memory model). However, you must use -mc or // +// greater. // +// Also, you might want to go under "Options...Debugger" // +// and increase your programs Heap size to >64k. I don't // +// know if <64k will lock your system, but I had problems. // +// // +// Author : Grant Smith (Denthor) - denthor@beastie.cs.und.ac.za // +// Translator : Christopher G. Mann - r3cgm@dax.cc.uakron.edu // +// // +// Last Modified : December 23, 1994 // +// // +///////////////////////////////////////////////////////////////////////////// +#include "src\lib\dos_gfx.h" + +// declare a pointer to the offset of the Virtual Screen +byte *vaddr = NULL; +// declare a pointer to the offset of the VGA memory +byte *vga = (byte *) MK_FP(VMEM, 0); +int old_mode; +//color てすと +int gq = LGQ; +//てすと +int q = 0; +int bakax = 0, bakay = 0; +int xx = 0, yy = 0, sx = 0, sy = 0; +byte coor; + +///////////////////////////////////////////////////////////////////////////// +// // +// setvideo() - This function Manages the video modes // +// // +///////////////////////////////////////////////////////////////////////////// +void setvideo(byte mode, int vq){ + union REGS in, out; + + if(!vq){ // deinit the video + // change to the video mode we were in before we switched to mode 13h + in.h.ah = 0x00; + in.h.al = old_mode; + int86(0x10, &in, &out); + }else if(vq == 1){ // init the video + // get old video mode + in.h.ah = 0xf; + int86(0x10, &in, &out); + old_mode = out.h.al; + + // enter mode + in.h.ah = 0x00; + in.h.al = mode; + // vesa + //in.x.ax = 0x4f02; + //in.x.bx = mode; + int86(0x10, &in, &out); + } +} + +///////////////////////////////////////////////////////////////////////////// +// // +// setvbuff() - This manages the memory needed for the virtual screen. // +// // +///////////////////////////////////////////////////////////////////////////// +// manages the buffer/virtual screen +void setvbuff(int vq){ + if(!vq){ + free(vaddr); + }else if(vq == 1){ + vaddr = (byte *) calloc(SW*SH, 1); + + if(vaddr == NULL){ + setvideo(0x03, 1); + cout << "Not enough video memory available, exiting program...."; + exit(1); + } + } +} + +///////////////////////////////////////////////////////////////////////////// +// // +// updatevbuff() - This flips the virtual screen to the VGA screen. // +// // +///////////////////////////////////////////////////////////////////////////// +// updates the buffer/virtual screen +void updatevbuff(){ +/* // wait for vertical re-trace + while(inportb(INPUT_STATUS_0) & 8); + while(!(inportb(INPUT_STATUS_0) & 8));*/ + + // copy everything to video memory + _fmemcpy(vga, vaddr, SW*SH); +} + +///////////////////////////////////////////////////////////////////////////// +// // +// cls() - This clears the screen to the specified color, on the VGA or on // +// the Virtual screen. // +// // +///////////////////////////////////////////////////////////////////////////// +void cls(byte color, byte *Where){ + _fmemset(Where, color, SW*SH); +} + +// clears the entire video output +void clearscr(){ + cls(0, vga); + cls(0, vaddr); +} + +///////////////////////////////////////////////////////////////////////////// +// // +// plotpixel() - This puts a pixel at X,Y using color Col, on VGA or the // +// Virtual Screen; // +// // +///////////////////////////////////////////////////////////////////////////// +void plotpixel(int x, int y, byte color, byte *Where){ + memset(Where+(x+(y*SW)),color,1); +} + +// king_crimson's code +void plotpixelfast(int x, int y, byte color, byte *Where) { + byte far *vidptr; + vidptr = (byte far *)(Where + y*SW + x); + *vidptr = color; +} + +///////////////////////////////////////////////////////////////////////////// +// // +// BlockMove() - This tests various ways of moving a block around the // +// screen. // +// // +///////////////////////////////////////////////////////////////////////////// +//てすと +void BlockMove(){ + int loop1, loop2, loop3; + + // This draws a block directly to the VGA with no flipping + for(loop1=1; loop1<271; loop1++){ + for(loop2=1; loop2<51; loop2++) + for(loop3=1; loop3<51; loop3++) + plotpixel(loop1+loop2,loop3,32, vga); + cls(0,vga); + } + + //` + for(loop1=1; loop1<281; loop1++){ + for(loop2=1; loop2<41; loop2++) + for(loop3=1; loop3<41; loop3++) + plotpixel(loop1+loop2,loop3,14, vaddr); + updatevbuff(); + cls(0,vaddr); + } + +/* // This draws to the virtual screen, waits for retrace, then flips to VGA + for(loop1=1; loop1<51; loop1++){ + for(loop2=1; loop2<51; loop2++) + for(loop3=1; loop3<51; loop3++) + plotpixel(loop1+loop2,loop3,32, vaddr); +// WaitRetrace(); + updatevbuff(); + cls(0,vaddr); + }*/ +} + +void etesuto(int x = 160, int y = 100){ + memset(vaddr+(x+(y*SW)),gq-1,1); + updatevbuff(); +} + +void qtesuto(int x = 160, int y = 100, int color = 0){ + memset(vaddr+(x+(y*SW)),color,1); + updatevbuff(); +} + +//color てすと +int colortest(){ + if(gq < NUM_COLORS){ + cls(gq, vaddr); + updatevbuff(); + gq++; + }else gq = 0; + return gq; +} + +//color てすと +int colorz(){ + if(gq < HGQ){ + cls(gq, vaddr); + updatevbuff(); + gq++; + }else gq = LGQ; + return gq; +} + +//slow spectrum down +void ssd(int svq){ + if(sy < SH+1){ + if(sx < SW+1){ + //plotpixel(xx, yy, coor, vga); + plotpixelfast(sx, sy, coor, vga); + //printf("%d %d %d %d\n", sx, sy, svq, coor); + sx++; + }else sx = 0; + if(sx == SW){ + sy++; + if(svq == 7) coor++; + if(sy == SH && svq == 8) coor = rand()%NUM_COLORS; + } + }else sy = 0; +} + +/*-----------ding-------------*/ +int ding(int q){ + int d3y; + + if(q <= 4 && gq == BONK-1) coor = rand()%NUM_COLORS; + + if(q == 5){ colortest(); return gq; } + if(q == 10){ colorz(); return gq; } + if(q == 11){ colorz(); delay(100); return gq; } + if(q == 8){ ssd(q); /*printf("%d\n", coor);*/ } + if(q == 6){ + coor = rand()%NUM_COLORS; + cls(coor, vaddr); + updatevbuff(); + } + + if(q == 7 || q== 9){ + if(gq < HGQ){ + if(q == 7) ssd(q); + if(q == 9){ ssd(q); coor++; } + gq++; + }else gq = LGQ; + } + if(q<5 && gq0){ + yy++; + d3y--; + } + } + if(bakax<0){ + xx--; + }else + if(bakax>0){ + xx++; + } + }else{ + if(!bakax){ + xx--; + }else{ + xx++; + } + if(!bakay){ + yy--; + }else{ + yy++; + } + } + // plot the pixel + plotpixelfast(xx, yy, coor, vga); + if(q==2) plotpixelfast(rand()%SW, rand()%SH, 0, vga); + if(q==2||q==4){ bakax = rand()&0x1; bakay = rand()&0x1; } + gq++; +// printf("%d %d %d %d\n", xx, yy, gq, coor); + }else gq = LGQ; + return gq; +} diff --git a/src/lib/dos_gfx.h b/src/lib/dos_gfx.h new file mode 100644 index 00000000..97ff4af5 --- /dev/null +++ b/src/lib/dos_gfx.h @@ -0,0 +1,35 @@ +#ifndef _DOSLIB_GFX_H_ +#define _DOSLIB_GFX_H_ +#include +#include +#include "src\lib\lib_com.h" + +#define SW 320 // width in pixels of vga mode +#define SH 200 // height in pixels of vga mode +#define NUM_COLORS 256 // number of colors in vga mode +/*#define SW 320 +#define SH 200 +#define NUM_COLORS 4*/ // cga +#define BONK 400 +#define LGQ 32 +#define HGQ 56 +#define VMEM 0xA000 // = vga +//#define VMEM 0xB800 // = cga +//#define VMOD 0x13 + +void setvideo(byte mode, int vq); +void setvbuff(int vq); +void updatevbuff(); +void cls(byte color, byte *Where); +void clearscr(); +void plotpixel(int x, int y, byte color, byte *Where); +void plotpixelfast(int x, int y, byte color, byte *Where); +void BlockMove(); +void etesuto(int x, int y); +void qtesuto(int x, int y, int color); +int colortest(); +int colorz(); +void ssd(int svq); +int ding(int q); + +#endif/*_DOSLIB_GFX_H_*/ diff --git a/src/lib/dos_opl2.cpp b/src/lib/dos_opl2.cpp new file mode 100644 index 00000000..1b495b4e --- /dev/null +++ b/src/lib/dos_opl2.cpp @@ -0,0 +1,286 @@ +/* C Source File: ADLIB ***************************************************** + +Author: Kevin A. Lee + +Last Amended: 27th March, 1993 + +Description: Low-level interface to the Adlib (or compatible) +FM sound card. All information gleaned from +Jeffrey S. Lee's "Programming the Adlib/Sound +Blaster FM Music Chips". See Lee's document for +further information. +Compiled succesfully under Turbo C, Borland C++, +and Microsoft Quick C (all latest versions). + +****************************************************************************/ +#include "src\lib\opl2.h" + +//sound てすと +int sq = 0; + +/* Function: WriteFM ******************************************************** +* +* Parameters: reg - which FM register to write to. +* value - value to write. +* +* Description: writes a value to the specified register and +* waits for the "official" recommended periods. +* +*/ +void WriteFM(int reg, int value){ + int i; + + outp(ADLIB_FM_ADDRESS, (byte)reg); /* set up the register */ + for (i = 0; i < 6; i++) inp(ADLIB_FM_ADDRESS); /* wait 12 cycles */ + outp(ADLIB_FM_DATA, (byte)value); /* write out the value */ + for(i = 0; i < 35; i++) inp(ADLIB_FM_ADDRESS); /* wait 84 cycles */ +} /* End of WriteFM */ + +/* Function: ReadFM ********************************************************* +* +* Returns: the value in the status register. +* +* Description: return a value in the status register. +* +*/ +int ReadFM(void){ + return(inp(ADLIB_FM_ADDRESS)); +} /* End of ReadFM */ + +/* Function: AdlibExists **************************************************** +* +* Returns: 1 (true) if an Adlib compatible sound card +* is present, else 0 (false). +* +* Description: determines whether an Adlib (or compatible) +* sound card is present. +* +*/ +int AdlibExists(void){ + int stat1, stat2; + + WriteFM(0x04, 0x60); /* reset both timers */ + WriteFM(0x04, 0x80); /* enable timer interrupts */ + stat1 = ReadFM(); /* read status register */ + WriteFM(0x02, 0xFF); + WriteFM(0x04, 0x21); /* start timer 1 */ +// wait(80); /* could do something useful*/ + stat2 = ReadFM(); /* read status register */ + WriteFM(0x04, 0x60); /* reset both timers */ + WriteFM(0x04, 0x80); /* enable timer interrupts */ + + if(((stat1 & 0xE0) == 0x00) && ((stat2 & 0xE0) == 0xC0)) return(1); + return(0); +} /* End of AdlibExists */ + +/* Function: FMResest ******************************************************* +* +* Description: quick and dirty sound card reset (zeros all +* registers). +* +*/ +void FMReset(void/*int percusiveMode*/){ + int i; + + /* zero all registers */ + for(i = MIN_REGISTER; i < MAX_REGISTER+1; i++) WriteFM(i, 0); + + /* allow FM chips to control the waveform of each operator */ + WriteFM(0x01, 0x20); + + /* set rhythm enabled (6 melodic voices, 5 percussive) */ + WriteFM(0xBD, 0x20); + + //FMSetPercusiveMode(percusiveMode); +} /* End of FMReset */ +/* +void FMSetPercusiveMode(int state){ + if(state){ + WriteFM(0xBD, 0x20); + currentBDContents = 0x20; + percussiveMode = 1; + voiceModulator[7] = 16; + voiceModulator[8] = 14; + // we have to set the freq of voice 7 & 8 for the white noise gen. + // these frequency choices could certainly be better + WriteFM(0xa7, 1844 & 0xff); + WriteFM(0xb7, 1844 >> 8); + WriteFM(0xa8, 3764 & 0xff); + WriteFM(0xb8, 3764 >> 8); + }else{ + WriteFM(0xBD, 0); + percussiveMode = 0; + currentBDContents = 0; + voiceModulator[7] = 13; + voiceModulator[8] = 14; + } +} +*/ +/* Function: FMKeyOff ******************************************************* +* +* Parameters: voice - which voice to turn off. +* +* Description: turns off the specified voice. +* +*/ +void FMKeyOff(int voice){ + int regNum; + + /* turn voice off */ + regNum = 0xB0 + voice % NUMVOICE; + WriteFM(regNum, 0x0E); +} /* End of FMKeyOff */ + +/* Function: FMKeyOn ******************************************************* +* +* Parameters: voice - which voice to turn on. +* freq - its frequency (note). +* octave - its octave. +* +* Description: turns on a voice of specfied frequency and +* octave. +* +*/ +void FMKeyOn(int voice, int freq, int octave){ + int regNum, tmp; + + regNum = 0xA0 + voice % NUMVOICE; + WriteFM(regNum, freq & 0xff); + regNum = 0xB0 + voice % NUMVOICE; + tmp = (freq >> 8) | (octave << 2) | 0x20; + WriteFM(regNum, tmp); +} /* End of FMKeyOn */ + +/* Function: FMVoiceVolume ************************************************** +* +* Parameters: voice - which voice to set volume of +* vol - new volume value (experiment). +* +* Description: sets the volume of a voice to the specified +* value in the range (0-63)? +* +*/ +void FMVoiceVolume(int voice, int vol){ + int regNum; + + regNum = 0x40 + voice % NUMVOICE; + WriteFM(regNum, vol); +} /* End of FMVoiceVolume */ + +/* Function: FMSetVoice ***************************************************** +* +* Parameters: voiceNum - which voice to set. +* ins - instrument to set voice. +* +* Description: sets the instrument of a voice. +* +*/ +void FMSetVoice(int voiceNum, FMInstrument *ins){ + int opCellNum, cellOffset; + + voiceNum %= NUMVOICE; + cellOffset = voiceNum % 3 + ((voiceNum / 3) << 3); + + /* set sound characteristic */ + opCellNum = 0x20 + (char)cellOffset; + WriteFM(opCellNum, ins->SoundCharacteristic[0]); + opCellNum += 3; + WriteFM(opCellNum, ins->SoundCharacteristic[1]); + + /* set level/output */ + opCellNum = 0x40 + (char)cellOffset; + WriteFM(opCellNum, ins->Level[0]); + opCellNum += 3; + WriteFM(opCellNum, ins->Level[1]); + + /* set Attack/Decay */ + opCellNum = 0x60 + (char)cellOffset; + WriteFM(opCellNum, ins->AttackDecay[0]); + opCellNum += 3; + WriteFM(opCellNum, ins->AttackDecay[1]); + + /* set Sustain/Release */ + opCellNum = 0x80 + (char)cellOffset; + WriteFM(opCellNum, ins->SustainRelease[0]); + opCellNum += 3; + WriteFM(opCellNum, ins->SustainRelease[1]); + + /* set Wave Select */ + opCellNum = 0xE0 + (char)cellOffset; + WriteFM(opCellNum, ins->WaveSelect[0]); + opCellNum += 3; + WriteFM(opCellNum, ins->WaveSelect[1]); + + /* set Feedback/Selectivity */ + opCellNum = (byte)0xC0 + (byte)voiceNum; + WriteFM(opCellNum, ins->Feedback); +} /* End of FMSetVoice */ + +/* Function: LoadSBI ******************************************************** +* +* Parameters: fileName - name of .SBI file. +* ins - variable to place data in. +* +* Description: loads a .SBI into the instrument structure. +* +*/ +//int LoadSBI(char fileName[], FMInstrument *ins){ +// int i; +// FILE *fp; +// size_t structSize = sizeof(FMInstrument); +// +// if ((fp = fopen(fileName, "rb")) == NULL) return (0); +// +// /* skip the header - or do we? */ +// for (i = 0; i < 36; i++) fgetc(fp); +// +// /* read the data */ +// fread(ins, structSize, 1, fp); +// +// fclose(fp); +// return (1); +//} /* End of LoadSBI */ + +/* test of the routines */ +void fmtest(){ + enum SCALE test[] = { D4, E4, F4, G4, A4, B4, C4 }; +// enum SCALE oct4[] = { 493.88, 466.16, 440, 415.3, 392, 369.99, 349.23, 329.63, 311.13, 293.66, 277.18, 261.63 }; + static FMInstrument testInst = +{ +0x00, 0x01, /* modulator frequency multiple... 0x20 */ +0x00, 0x00, /* modulator frequency level... 0x40 */ +0xF0, 0xF0, /* modulator attack/decay... 0x60 */ +0x73, 0x73, /* modulator sustain/release... 0x80 */ +0x03, 0x00, /* output waveform distortion 0xE0 */ +0x36, /* feedback algorithm and strength 0xC0 */ +}; + int i; + printf("Now testing tune....\n"); +// printf("just hit any key 7 times.\n"); + FMReset(); + FMSetVoice(0, &testInst); + //extra +// WriteFM(0xB0, 0x09); +// WriteFM(0xB3, 0x07); + //extra + for(i = 0; i < 7; i++){ + FMKeyOn(0, test[i], 4); + sound(test[i]); + wait(20); +// getche(); + FMKeyOff(0); + nosound(); + wait(1); + } +} + +//sound てすと +int soundtest(){ + enum SCALE test[] = { D4, E4, F4, G4, A4, B4, C4 }; + //FMKeyOn(0, test[sq], 4); + if(sq < 7){ + sq++; + }else sq = 0; + FMKeyOff(0); + return sq; +} \ No newline at end of file diff --git a/src/lib/lib_com.cpp b/src/lib/lib_com.cpp new file mode 100644 index 00000000..b9851613 --- /dev/null +++ b/src/lib/lib_com.cpp @@ -0,0 +1,20 @@ +#include "src\lib\lib_com.h" + +/* local function */ +void wait(clock_t wait); + +/* Function: Wait ********************************************************** +* +* Parameters: wait - time in microseconds +* +* Description: pauses for a specified number of microseconds. +* +*/ +void wait(clock_t wait){ + clock_t goal; + + if(!wait) return; + + goal = wait + clock(); + while((goal > clock()) && !kbhit()) ; +} /* End of wait */ \ No newline at end of file diff --git a/src/lib/lib_com.h b/src/lib/lib_com.h new file mode 100644 index 00000000..183670a0 --- /dev/null +++ b/src/lib/lib_com.h @@ -0,0 +1,13 @@ +#ifndef _LIBCOM_H_ +#define _LIBCOM_H_ +#include +#include +#include // just for wait +#include // just for wait +#include + +typedef unsigned char byte; + +void wait(clock_t wait); + +#endif/*_LIBCOM_H_*/ diff --git a/src/lib/opl2.h b/src/lib/opl2.h new file mode 100644 index 00000000..c001e5c9 --- /dev/null +++ b/src/lib/opl2.h @@ -0,0 +1,119 @@ +#ifndef _DOSLIB_SND_H_ +#define _DOSLIB_SND_H_ +/* C Header File: ADLIB ***************************************************** + +Author: Kevin A. Lee + +Last Amended: 27th April, 1993 + +Description: Low-level interface to the Adlib (or compatible) + FM sound card. All information gleaned from + Jeffrey S. Lee's "Programming the Adlib/Sound + Blaster FM Music Chips". See Lee's document for + further information. + +Compiled succesfully under Turbo C, Borland C++, +and Microsoft Quick C (all latest versions). + +****************************************************************************/ +#include "src\lib\lib_com.h" + +#define NUMVOICE 11 +#define FACTOR 1193180 +#define OCTAVE 4 + +#define MIN_REGISTER 0x01 +#define MAX_REGISTER 0xF5 +#define ADLIB_FM_ADDRESS 0x388 /* adlib address/status register */ +#define ADLIB_FM_DATA 0x389 /* adlib data register */ + +/* +static int percussiveMode = 0,currentBDContents = 0; +//static int opTable[18] = {0,1,2,3,4,5,8,9,10,11,12,13,16,17,18,19,20,21}; +static int voiceModulator[11] = {0,1,2,6,7,8,12,16,14,17,13}; +static int voiceCarrier[9] = {3,4,5,9,10,11,15,16,17}; +*/ + +/* +* FM Instrument definition for .SBI files - SoundBlaster instrument +* - these are the important parts - we will skip the header, but since +* I am not sure where it starts and ends so I have had to guess. +* However it SEEMS! to work. Each array has two values, one for +* each operator. +*/ +typedef struct{ + byte SoundCharacteristic[2]; /* modulator frequency multiple... */ + byte Level[2]; /* modulator frequency level... */ + byte AttackDecay[2]; /* modulator attack/decay... */ + byte SustainRelease[2]; /* modulator sustain/release... */ + byte WaveSelect[2]; /* output waveform distortion */ + byte Feedback; /* feedback algorithm and strength */ +} FMInstrument; + + +/* +* Enumerated F-Numbers (in octave 4) for the chromatic scale. +*/ +/*enum oct{ + B4 = 493.88, + B4b = 466.16, + A4 = 440, + A4b = 415.3, + G4 = 392, + G4b = 369.99, + F4 = 349.23, + E4 = 329.63, + E4b = 311.13, + D4 = 293.66, + D4b = 277.18, + C4 = 261.63, + A0 = 27.50 +};*/ +enum SCALE{ + B4 = 0x1EE, + B4b = 0x1D2, + A4 = 440, + A4b = 0x19F, + G4 = 0x188, + G4b = 0x172, + F4 = 0x15D, + E4 = 0x14A, + E4b = 0x137, + D4 = 0x126, + D4b = 0x115, + C4 = 0x106, + A0 = 0x7F2 +}; +unsigned short Notes[] = { + 19327 , /* C b */ + 18242 , /* C */ + 17218 , /* C # ( D b ) */ + 16252 , /* D */ + 15340 , /* D # ( E b ) */ + 14479 , /* E ( F b ) */ + 13666 , /* F ( E # ) */ + 12899 , /* F # ( G b ) */ + 12175 , /* G */ + 11492 , /* G # ( A b ) */ + 10847 , /* A */ + 10238 , /* A # ( B b ) */ + 9664 , /* B ( C b ) */ + 9121 , /* B # */ + 0 +}; + +/* function prototyping */ +void WriteFM(int reg, int value); +int ReadFM(void); +int AdlibExists(void); +void FMReset(/*int percusiveMode*/); /* Resets the card, quiets all voices, sets the percussive mode state */ +void FMKeyOff(int voice);typedef unsigned char byte; +void FMKeyOn(int voice, int freq, int octave); +void FMVoiceVolume(int voice, int vol); +void FMSetVoice(int voiceNum, FMInstrument *ins); +/* Remember: percussion instruments must be assigned only to the correct voice number. */ +//void FMSetPercusiveMode(int state); +//int LoadSBI(char filename[], FMInstrument *ins); +void fmtest(void); +int soundtest(); +#endif/*_DOSLIB_SND_H_*/ \ No newline at end of file diff --git a/src/main.cpp b/src/main.cpp new file mode 100644 index 00000000..aa0506f1 --- /dev/null +++ b/src/main.cpp @@ -0,0 +1,17 @@ +//Project 16 core version 0.0009.84 // wwww +#include +#include +#include + +#include "src\eng_core.h" + +int main(/*int argc, const char* argv[]*/) +{ + + engine::Core c; + c.run(); + + //int a; + //std::cin >> a; + return EXIT_SUCCESS; +} \ No newline at end of file diff --git a/src/timer.cpp b/src/timer.cpp new file mode 100644 index 00000000..f491d064 --- /dev/null +++ b/src/timer.cpp @@ -0,0 +1,41 @@ +#include "src\timer.h" +#include + +namespace engine { + Timer::Timer() + { + //default constructor + } + + clock_t Timer::start_timer() + { + //time(&(this->t)); + this->t = clock(); + return this->t; + } + + double Timer::elapsed_timer() + { + return static_cast(clock() - this->t) / CLOCKS_PER_SEC;//difftime(time(NULL), this->t); + } + + double Timer::time_in_seconds() + { + return static_cast(this->t) / CLOCKS_PER_SEC; + } + + double Timer::time_in_seconds(time_t in_t) + { + return static_cast(in_t) / CLOCKS_PER_SEC; + } + + clock_t Timer::_time() + { + return this->t; + } + + Timer::~Timer() + { + //deconstructor + } +} \ No newline at end of file diff --git a/src/timer.h b/src/timer.h new file mode 100644 index 00000000..c7ba5877 --- /dev/null +++ b/src/timer.h @@ -0,0 +1,22 @@ +#ifndef _TIMER_H_ +#define _TIMER_H_ +#include + +namespace engine { + class Timer + { + public: + Timer(); + clock_t start_timer(); + double elapsed_timer(); + double time_in_seconds(); + double time_in_seconds(time_t in_t); + clock_t _time(); + ~Timer(); + protected: + private: + clock_t t; + }; +} + +#endif \ No newline at end of file