VOGONS


First post, by doshea

User metadata
Rank Member
Rank
Member

I'd like to automate generation and installation of machines in MAME and PCem (and I assume it would work for 86Box if it works for PCem), but the need to interact with the BIOS on first boot is a problem, because I'm automating things inside the emulated machine rather than sending keystrokes to the emulator and trying to read its emulated screen (which would be horrible). I'm emulating older machines where the hard drive settings need to be provided, but I imagine that even with newer machine types which default to automatic detection of drives, they'd still complain about the CMOS checksum and require me to hit F1 to continue or something.

At least for machines where the CMOS layout is documented, I figure it should be possible to generate an .nvr file with the appropriate content before starting the machine for the first time, filling in the desired cylinders, heads and sectors for the virtual drive(s), etc. I took a look at one file in an "nvram" directory created by MAME for a 486 machine and it seemed to have the expected bytes in the expected location for an AMI BIOS so I think I could code something up that worked for at least some machine types, but is there anything out there that already exists like this? I know there is software you could run on DOS which could read CMOS settings, and so there was probably some that could write them too, but of course I want something I can run on a modern system on which I run the emulator rather than something I run inside the emulator. If not, I'll probably write a Python package, although I imagine what would be nice is some C or C++ code that could integrate into the emulators and be used to optionally do the generation for you.

Reply 1 of 1, by doshea

User metadata
Rank Member
Rank
Member

The CMOS layout documentation in CMOS.LST from Ralf Brown's Interrupt List doesn't seem to exactly match, but I got something working for the MAME ct486 machine and its AMI Hi-Flex BIOS which can set drive geometry, set the RAM size (I forgot that changing the emulated RAM size was the thing that most often made me have to hit F1 to continue), change the boot order between A: first and C: first, and set the floppy drive types.

For anyone who cares, this:

----------R3E--------------------------------
CMOS 3Eh - AMI - Extended CMOS Checksum, High Byte
Note: this checksum covers locations 34h - 3Dh, but is not used by some
later AMI BIOSes
...
----------R3F--------------------------------
CMOS 3Fh - AMI - Extended CMOS Checksum, Low Byte
Note: this checksum covers locations 34h - 3Dh, but is not used by some
later AMI BIOSes

actually covers not only bytes 34h..3Dh but also 40h..7Fh in this BIOS.