Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to the forum
Board view  Mix view

Rayer's NVclock (Developers)

posted by Laaca Homepage, Czech republic, 05.08.2009, 12:15

For accessing the MMIO registers you use function _DJGPP_Map_physical_memory which isn't supported by Windows 9x.
But what about accessing the MMIO space from DS register like normal DJGPP memory? You can just increase the limit for DS and it should work.
In Freepascal I wrote the code bellow which could do the job. I tested it on LFB region and it works so it should work for other places too include the MMIO space.

Procedure MMIO_Mount_memory(phys_adr:pointer):pointer;
{Maps physical region of memory into normal address space}
var r:dword;
begin
Set_segment_limit(get_ds,$FFFFFFFF);
r:=Get_Linear_Addr(dword(phys_adr),16384*1024); {16MB adress space should be enough}
MMIO_Mount_memory:=pointer(r-get_segment_base_address(get_ds));
end;


And why you use for accesing the PCI bus the direct access and not INT 1A BIOS calls? Does it have any advantage over it? I am asking because most of code I have ever seen use direct method and not INT 1A.

---
DOS-u-akbar!

 

Complete thread:

Back to the forum
Board view  Mix view
22049 Postings in 2034 Threads, 396 registered users, 252 users online (0 registered, 252 guests)
DOS ain't dead | Admin contact
RSS Feed
powered by my little forum