MobyGamer / total-dos-launcher

A system for easily loading and running thousands of DOS programs on vintage hardware
MIT License
109 stars 10 forks source link

Info screen should report what EMS and XMS are available, and what TDL is using #32

Closed MobyGamer closed 6 years ago

MobyGamer commented 7 years ago

A version of streamname in https://github.com/MobyGamer/TPLibs/blob/master/STREAM16/STREAMS.PAS that doesn't include filters can solve this. Can also leverage:

function xms_MemAvail : Longint;
  { Returns total of available XMS bytes. }
function xms_MaxAvail : Longint;
  { Returns size of largest available XMS block in bytes. }
function ems_MemAvail : Longint;
  { Returns total of available EMS in bytes. }
function ems_MaxAvail : Longint;
  { Returns size of largest available EMS block in bytes. }
MobyGamer commented 6 years ago

It turns out that Streamname doesn't tell you what underlying memory was used, only "TempStream" or something gets returned. Might have to do something else instead, like take inventory of XMS and EMS at startup, and then return how much those have changed in the info screen.