X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?p=dosdemo;a=blobdiff_plain;f=README.md;h=b3a41a1e2e394608b01c718de18a05340b331d35;hp=102090e24e0ec3dc198f7e7bcb14f90990a5b17f;hb=59c564d8a2077ce90e7c83fdb276b80c9bfa238c;hpb=c1029b14c3fde9c98d524f17201364c695b6b117 diff --git a/README.md b/README.md index 102090e..b3a41a1 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,17 @@ Unnamed Mindlapse DOS demo for Pentium 133 ------------------------------------------ The demo requires VESA Bios Extensions (VBE) 2.0. If your graphics card doesn't -support VBE 2.0 or greater, then make sure to run the `univbe` TSR first, or -the demo will fail to find a usable LFB video mode. +support VBE 2.0 or greater, then make sure to load the `univbe` TSR first. + +Source structure +---------------- + - src/ cross-platform demo framework and miscellaneous utility code + - src/scr/ demo screens (parts) and effects support code + - src/dos/ DOS platform code + - src/sdl/ SDL 1.x platform code (windows/UNIX version) + - libs/cgmath/ math library, header-file only + - libs/imago/ image loading library (includes libpng, zlib, libjpeg) + - libs/anim/ keyframe animation library Building on DOS with Watcom --------------------------- @@ -120,3 +129,21 @@ U-only pairable instructions: - adc, sbb - shr, sar, shl, sal with immediate - ror, rol, rcr, rcl with immediate=1 + +Notes about DJGPP & CWSDPMI +--------------------------- +Can't use the `hlt` instruction for waiting for interrupts, because we're +running in ring3 by default. I surrounded all the `hlt` instructions with a +`USE_HLT` conditional, which is undefined when building with DJGPP. + +It's possible to arrange for our code to run on ring0 by changing the DPMI +provider from `cwsdpmi.exe` to `cwsdpr0.exe` by running: +`stubedit demo.exe dpmi=cwsdpr0.exe`, but I haven't tested under win9x to see if +it still works if we do that. + +Our fucking segments don't start at 0 ... to access arbitrary parts of physical +memory we need to call `__djgpp_nearptr_enable()` and use the following macros I +defined in `cdpmi.h`: + + #define virt_to_phys(v) ((v) + __djgpp_base_address) + #define phys_to_virt(p) ((p) - __djgpp_base_address)