From: John Tsiombikas Date: Mon, 29 Aug 2016 02:14:53 +0000 (+0300) Subject: Merge branch 'master' of goat:git/dosdemo X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?p=dosdemo;a=commitdiff_plain;h=ca615218c7fd2c98ced8a0976508a0faab317f81;hp=757e7697c9a4434df6f3fdf3234de504bb4636bc Merge branch 'master' of goat:git/dosdemo --- diff --git a/.gitignore b/.gitignore index 8c14050..201c530 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,8 @@ *.LNK *.log *.LOG +Debug +Release +*.suo +*sdf +demo diff --git a/README.md b/README.md index 4804bd7..48d645a 100644 --- a/README.md +++ b/README.md @@ -25,9 +25,10 @@ which will in turn start dosbox, which will execute the DOS binary! If the gods are slumbering in valhalla, just typing `dosbox demo.exe` should do the trick. -SDL backend ------------ -Run make to build (assuming make on your system is GNU make). +Building and running with the SDL backend +----------------------------------------- +Run make to build (assuming make on your system is GNU make), or use the visual +studio 2013 project on Windows. The SDL backend will scale the framebuffer up, by the factor specified in the `FBSCALE` environment variable. So run the demo as: `FBSCALE=3 ./demo` for diff --git a/dosdemo.sln b/dosdemo.sln new file mode 100644 index 0000000..5066871 --- /dev/null +++ b/dosdemo.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 2013 +VisualStudioVersion = 12.0.40629.0 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "dosdemo", "dosdemo.vcxproj", "{15AB3B8C-B8BE-42ED-9DBC-EAE9C8FB9B9F}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Release|Win32 = Release|Win32 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {15AB3B8C-B8BE-42ED-9DBC-EAE9C8FB9B9F}.Debug|Win32.ActiveCfg = Debug|Win32 + {15AB3B8C-B8BE-42ED-9DBC-EAE9C8FB9B9F}.Debug|Win32.Build.0 = Debug|Win32 + {15AB3B8C-B8BE-42ED-9DBC-EAE9C8FB9B9F}.Release|Win32.ActiveCfg = Release|Win32 + {15AB3B8C-B8BE-42ED-9DBC-EAE9C8FB9B9F}.Release|Win32.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/dosdemo.vcxproj b/dosdemo.vcxproj new file mode 100644 index 0000000..404de16 --- /dev/null +++ b/dosdemo.vcxproj @@ -0,0 +1,97 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + {15AB3B8C-B8BE-42ED-9DBC-EAE9C8FB9B9F} + Win32Proj + dosdemo + + + + Application + true + v120 + MultiByte + + + Application + false + v120 + true + MultiByte + + + + + + + + + + + + + true + + + false + + + + + + Level3 + Disabled + WIN32;_DEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) + $(ProjectDir)\src;$(ProjectDir)\src\sdl;%(AdditionalIncludeDirectories) + 4996;4244 + + + Console + true + SDL.lib;SDLmain.lib;%(AdditionalDependencies) + + + + + Level3 + + + MaxSpeed + true + true + WIN32;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) + $(ProjectDir)\src;$(ProjectDir)\src\sdl;%(AdditionalIncludeDirectories) + 4996;4244 + + + Console + true + true + true + SDL.lib;SDLmain.lib;%(AdditionalDependencies) + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/dosdemo.vcxproj.filters b/dosdemo.vcxproj.filters new file mode 100644 index 0000000..2a33941 --- /dev/null +++ b/dosdemo.vcxproj.filters @@ -0,0 +1,34 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx;h;inl + + + {75ea1193-5afc-4dfe-ad41-ee85b47b7d35} + + + + + src + + + src + + + src + + + src\sdl + + + + + src + + + src + + + \ No newline at end of file diff --git a/src/demo.c b/src/demo.c index 98f8001..9954cb5 100644 --- a/src/demo.c +++ b/src/demo.c @@ -3,6 +3,7 @@ #include #include #include +#include #include "demo.h" #include "screen.h" @@ -31,6 +32,8 @@ int demo_init(int argc, char **argv) return -1; } + /* clear the framebuffer at least once */ + memset(fb_pixels, 0, fb_width * fb_height * fb_bpp / CHAR_BIT); return 0; }