Saturday, October 21, 2017 | Toby Opferman
 

Source Code



The software provided on this page is without warranty and provided "as is" for personal use. The user should use caution and run this software at their own risk. Resale or commerical use of these products is not permitted. The software on this page was written as practice and is provided here only as sample programs for those who may find them useful. While I will accept comments, bug reports and suggestions the software is considered legacy and is not under any on going development or support.

Virus - The Game - Fix
Year 2014
Language C
Operating System Windows
The source and binary to play the 1997 Virus game. The recommendation is to use the busy loop and do 15ms in order for the game to be playable. Need to copy this EXE to the directory of the game. This will launch the game and fix it in memory each time, it does not modify the original game on disk.


Sudoku Solver
Year 2013
Language C
Operating System Windows
Uses multi-threading to solve Sudoku puzzles. Has been able to solve what was stated as the hardest Sudoku puzzle. It also displays the time it took to solve the puzzle, depending on the difficulty it may or may not help for it to spawn multiple threads. This does not use brute force method; it uses data and a state machine to determine the columns. It only resorts to brute force as a last resort.


Raycast Engine
Year 2006
Language C
Operating System Windows
This is an unfinished ray casting game.


Amelia's Game Source
Year 2006
Language C
Operating System Windows
This is the source to the unfinished 2D scroller game. It includes the tile engine, audio, gif decoder and GDI library as well as level editor.


32 to 64 Bit Driver
Year 2005
Language C/Assembly
Operating System Windows
This driver demonstrates how to save the state in Windows 32 bit, then switch to 64 bit and run a 64 bit binary code sample. It will then switch back to 32 bit when finished. This is a joke on "Dos Extenders" in which previously 16 bit OSes running on 32 bit hardware had software which would then extend the platform for 32 bit applications. In this day though 32 bit OS running on 64 bit hardware there is no such thing as a 64 bit extender.


Simple OpenGL Example
Year 2004
Language C
Operating System Windows
This is a simple OpenGL graphics example. The code was written just as an experiment to get a little bit familiar with OpenGL.


Network API
Year 2004
Language C
Operating System windows
This API was implemented to enumerate network connections in relation to processes.


Sockets API
Year 2004
Language C
Operating System Windows
This is a generic sockets API that I had written for a project that I didn't finish. I do not know if this library actually works because I do not remember if I ever tested it. Here it is anyway for you to play around with.


Cube
Year 2004
Language Assembly
Operating System Windows
This is a demo of drawing a cube in assembly in DirectX 8. The idea for this project was to attempt to get it to as small a file size as possible. This demo still does its own line drawing and treats DX8 as Direct Draw.


D3D Cube
Year 2004
Language C
Operating System Windows
This is a demo that uses Direct3D to draw a cube and will display an image on the side of the cube using D3D's texturemapping APIs. The file just needs to be named image.bmp and be in the same directory as the executable. This demo was written based on another example tutorial that was on the web.


WIN32 Assembly Plasma
Year 2003
Language Assembly
Operating System Windows
Messing around with Direct Draw, slow plasma.


2D Tile Engine
Year 2003
Language C
Operating System Windows
Though this source code has been written for Windows it could easily be ported to other Operating Systems. This is a generic IRC API that allows you to specify a tile map and it will allow you to move in the specified map. The library is written so that it doesn't do the drawing, instead it will call your supplied callback and it will tell you which tile to draw and where to draw it. It will also calculate if clipping should occur on the tile.


GDI Library
Year 2003
Language C
Operating System Windows
This is a generic library that allows you to easily use and create double buffers for GDI applications. There are some small weird behaviors such as implementation use of critical sections in the paints that probably aren't necessary but this is old code.


Direct X Wrapper
Year 2003
Language C
Operating System Windows
This is a simple API wrapper around Direct Draw with essentially the same interface as the GDI Library above. The goal would be to have an application be written to use either or API sets with little or no change.


Test Demo
Year 2003
Language C
Operating System Windows
This is a demo that performs various effects such as plasma, waving an image like a flag, lens effect (my own algorithm and attempt), rotating and cutting the image into pieces and finally flying the image around the screen in 3D space. This is provided here as example source code. There is also a sound library using the standard wave* APIs that can play sound in the background. There are various versions of the sources in there along with commented out code that does different effects. The images and sound can be replaced but they are included in the ZIP. If the demo is slow then there may be some changes that need to revert the speed back to a faster demo.


Cubix
Year 2002
Language C
Operating System Windows
This is a direct draw demo that draws a cube on the screen. There is nothing special about this demo except it could be used as an example since it's very simple.


API Replace
Year 2001
Language C
Operating System Windows
Simple demonstration library of replacing a function. This is a simple method, and assumes that the API is at least 6 bytes (For the Jump). This implementation does not support calling back into the original API, this is a complete replace, not exactly a hook. Any function can be replaced, Windows APIs or functions in your own program. For true hooking, you would need to have a disassembler so you never cut an instruction boundary. This way you could call the original function using a jump after you execute the instructions you replaced.


IRC v2.0 API
Year 2001
Language C
Operating System Windows
Though this source code has been written for Windows it could easily be ported to other Operating Systems. This is a generic IRC API with the basic set of commands supported. This API could be extended to implement more commands quite easily. The intent of this API was to create a simple abstraction so that a bot or IRC client could easily be written. There is an example shell for a Client or Bot also supplied. The IRC library itself actually uses another abstraction for network called "DTL Sockets". Underneath is uses the very basic sockets implementation however any network interface could be implemented including extending DTL to use more efficient APIs than the basic blocking sockets.


Simple Compiler
Year 2000
Language C
Operating System DOS
Simple Computer Language Compiler. I wrote this for a class. It's a simple language compiler. Recursive descent compiler. TEST.IN is a demo of what code for this language looks like. There is 1 thing missing, it's there is no way to assign a character literal, everything is string literals so if you make a character you won't be able to assign. This is just something I forgot and I don't feel like fixing it, this source is considered obsolete by me supporting anything in it. Also, there is a problem if you don't enter an input file and it prompts for one, the prompt is messed up that if you go to the end of the line and past, you can't backspace anymore. There's also some dead keyboard code that is not used. The download is big because it requires DOS4GW.EXE and the SCL exe included.


Multidesk
Year 1999
Language Assembly & C
Operating System Windows
This is all the source code available for MultiDesk, MultiDesk2k and Multidesk 2001. The original multidesk source code are in assembly. The first version was for TASM and then later ported to MASM. The final versions of multidesk are all in C.


3D Wireframe Cube
Year 1998
Language Assembly
Operating System DOS
A 3D Rotating Cube on X, Y and Z axis. No Bounds checking so don't make it blow up off the screen. Scale it with +/-. Escape quits. Same program as under DEMOS, CUBE.COM, except this is the un-optimized version and is 1,173 bytes and not 899 bytes. This is a bit slower but they both rotate at a degree of 1.


Simple 3D Wire Frame Library
Year 1998
Language Assembly
Operating System DOS
Includes 3D.INC in which you can inlcude in your assembly programs to create & use Wire Frame 3D objects. Includes TEST3D.ASM sample on how to use 3D.INC. It supports World Coordinates, but not Camera Coordinates. No Bounds checking function, but you could easily add one to clip 2D Lines. Includes Rotation Functions, Line Drawing Function, 3D to 2D Projection Function, Scale Up/Down Functions and Draw Object Function.


Chat Program
Year 1998
Language C
Operating System Windows
My first sockets program. This is a win32 console app. There are two files. One is the client and one is the server. This is basically a chat program. One person sets up the server and other people connect to it and they can chat. It's pretty crude, but it's my first sockets program.


Winpong
Year 1998
Language Assembly
Operating System Windows
This is source to my 4th Windows program, you can download the executable from the software page. This is just windows pong.


Towers Of Hanoi
Year 1998
Language Prolog
Operating System DOS
Towers Of Hanoi game for Prolog interpreter. Originally it was used on a DOS-based interpreter however you should be able to use this on any prolog platform. This was done for a class. In case anyone finds it useful, I've provided the sources here.


Assembly Guide
Year 1998
Language C
Operating System Windows
A GUI guide that is unfinished, it was originally to load various text files for viewing and showing information about x86 assembly. Some text files are available but most are not as this was never finished. The code is useful (although ugly) as how to load a text file and use MDI to display multiple documents to scroll.


Space Invaders
Year 1997
Language C/Assembly
Operating System DOS
Code to the DOS Space Invaders game under demos link. Compile and use the .PIC & .DAT files from that ZIP to run.


Random Number Generator
Year 1996
Language Assembly
Operating System DOS
A pseudo random number generator I wrote. I have commented the code extensively so it should be self explanatory!


Draw Poker
Year 1996
Language ADA
Operating System VAX/VMS
Believe it or not this is a Draw Poker game I wrote for a class in Ada using VT100 terminal codes on a VAX/VMS system. Perhaps someone may find this useful.


Relative Program
Year 1996
Language LISP
Operating System DOS
A program I wrote for a LISP class. The class used a DOS-based LISP interpreter however any interpreter should be fine as there is nothing DOS specific. Majority of anyone doing LISP is likely also doing it for school work so I've provided this as a reference.


_Secret Demo
Year 1996
Language Assembly
Operating System DOS
This is the source to the _Secret demo, it includes 3 demo effects (Fire, Triangles and Snow). There is a bat file included which appends the fire color palette to the end of the build assembly .COM file.


Weird
Year 1995
Language C++
Operating System DOS
A C++ Program that demonstrates how to violate classes. Just a joke program, not recommended for real programming. It can be ported to other compilers, you just have to figure out if they have back doors. Mainly, how do they set up their memory when the program is compiled. (Turbo C++ 3.0)


Weird
Year 1995
Language C++
Operating System Linux
A C++ Program that demonstrates how to violate classes. Just a joke program, not recommended for real programming. It can be ported to other compilers, you just have to figure out if they have back doors. Mainly, how do they set up their memory when the program is compiled. (g++ Red Hat)


 
About Toby Opferman

Professional software engineer with over 15 years...

Learn more »
Codeproject Articles

Programming related articles...

Articles »
Resume

Resume »
Contact

Email: codeproject(at)opferman(dot)com