Click to See Complete Forum and Search --> : RAM location initialization
unholytony
July 5th, 1999, 06:15 PM
I am currently writting a windows based simulator for software designed to run on specialized hardware. It all works great apart from the fact that the software has a couple of functions that reinitialize sections of RAM from the eeprom that it runs off. I beleive that Win32 .EXE files also do something similar as I have seen references about changing the time when variables are initailised, library variable being first by default. This is all controlled by listing sections that the variables will occupy in the linker script file which also defines pointers to the begining and end of these sections. I beleive that there is something similar in Win32 programming, however I got a bit lost in all the __declspec #pragma and .def file stuff. Has anyone out there ever done this sort of thing before. please help.
Tony Bloomer
Well....since what you are describing SOUNDS like writing an emulator...check out 'mame'...its an emulator that runs old arcade games...the neat thing is they give you the SOURCE CODE for it...and that may give you ideas on how to implement what you are trying to do.
Check out: www.classicgaming.com for a link to the mame home page....
Sam Hobbs
July 6th, 1999, 10:47 AM
There are many devices etc. that use the "upper memory" area for I/O. Display adapters use fixed memory locations, the BIOS and some network adapters do too. The old EMM386 DOS command was used to reserve those areas and exclude them from use by Windows. Windows now has other ways of excluding memory from use by Windows. It should be easy to find that mechanism but that is probably not sufficient for you; if I understand what you are asking then you need to be able to reference specific memory locations.
You will be lost forever "in all the __declspec #pragma and .def file stuff" because you are looking in the wrong place. Windows is designed to prevent application programs from doing things like that. Accessing specific memory locations is the type of stuff done using the DDK. You need to look in the DDK. That is your kind of stuff.
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.