GithubHelp home page GithubHelp logo

jwt27 / libjwdpmi Goto Github PK

View Code? Open in Web Editor NEW
38.0 38.0 3.0 2.2 MB

C++20 development framework for 32-bit DOS applications

License: GNU General Public License v3.0

C++ 99.76% Makefile 0.18% Shell 0.05%
coroutine cpp14 cpp17 cpp20 dos dpmi framework library multi-threading

libjwdpmi's People

Contributors

jwt27 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

libjwdpmi's Issues

CR0.TS flag is unreliable

The fpu context switching routines previously relied on the TS flag in CR0 to trigger exception 07. What I found is that, in many cases, the TS flag is already cleared upon entering this exception. I'm now using the EM flag to achieve the same effect.

Using TS is the 'nice' way to do it, since that is its intended purpose, so I would prefer to use that if possible. I'm guessing the DPMI host or some real-mode code clears this flag at some point, however I briefly inspected the HDPMI sources and was unable to find any such code.

Integer pixel alpha-blending inaccuracy

Blending integer pixels (px32a) together produces different results compared to blending floating-point pixels (pxf). Visually the result somewhat resembles additive blending. That shouldn't happen.

Not receiving any IRQs from serial port

Kinda stumped on this issue. I've only ever tested this on a VM (virtualbox) where it works fine. Now that I'm trying this on hardware, the serial port doesn't seem to generate any interrupts.
If anyone reading this wants to help debug this issue, please check out branch debug-serial on jwdpmi_test. Run the compiled exe with a loopback adapter on COM1 (or connect a remote terminal). You should see an "IRQ" message whenever an interrupt fires.

Any help on this would be much appreciated.

Minimal example code to run the project (with Makefile).

Hi! Could you provide any example code with make file to compile and run it? I got stuck when trying to build my project with:

https://gist.github.com/SzateX/715355490fd0d633ab84cd7c11fbcf43#file-error-log-L13
https://gist.github.com/SzateX/715355490fd0d633ab84cd7c11fbcf43#file-error-log-L183
https://gist.github.com/SzateX/715355490fd0d633ab84cd7c11fbcf43#file-error-log-L932

My makefile is:

AR:=i386-pc-msdosdjgpp-ar
CXX:=i386-pc-msdosdjgpp-g++
CXXFLAGS:=-std=gnu++2a -masm=intel -fconcepts -fnon-call-exceptions

export AR CXX CXXFLAGS
libjwdpmi:
        $(MAKE) -C lib/libjwdpmi/

obj/%.o: src/%.cpp
            $(CXX) $(CXXFLAGS) -o $@ -Ilib/libjwdpmi/include -c $<

bin/program.exe: $(OBJ) libjwdpmi
            $(CXX) $(CXXFLAGS) -o $@ $(OBJ) -Llib/libjwdpmi/bin -ljwdpmi -Wl,@lib/libjwdpmi/tools/ldflags

And in program.cpp I have:

#include <vector>
#include <string>
#include <iostream>

int jwdpmi_main(const std::vector<std::string_view>& args)
{
            std::cout << "Hello, World!\n";
                for (auto&& arg : args)
                                std::cout << "Got a command line argument: " << arg << '\n';
                    return 0;
}

Thanks for your attention and help!

Keyboard input stops working after program exits

When using the keyboard class, keyboard input stops working properly after the program terminates.

Sometimes it stops working altogether (as if the interrupt is still hooked).
Sometimes it outputs the wrong characters (as if the wrong scancode set is being used).

You'd think this would be easy to fix, but it's practically impossible to debug when you can't use your keyboard.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.