raylib is one possible starting place. Also might look at dos-like (https://mattiasgustavsson.itch.io/dos-like).