Big cleanup of the use of regular and const string pointers. Where possible, const is used to enfore R/O-ness of string arguments.

Important change to the NVR code to "fix" the PS/1 and PS/2 systems, plus a cleanup.
All device tables now end with a NULL, not an empty string.
Configuration code now deals better with this.
Machine and Video lookup now return -1 if not found/available, and pc_init() will throw the user into Setup if that is the case.
If for some reason the configured memory size exceeds machine limit, it is now adjusted.
This commit is contained in:
waltje
2018-04-11 17:40:51 -04:00
parent 23fcf833b4
commit 6b21c4c921
30 changed files with 323 additions and 347 deletions

View File

@@ -1569,12 +1569,12 @@ mem_reset(void)
* exceed the physical limit of the machine to avoid
* nasty crashes all over the place.
*/
m = mem_size;
c = machines[machine].max_ram;
if (AT)
c <<= 10; /* make KB */
if (mem_size > c) {
pclog("MEM: %luKB exceeds machine limit (%luKB), adjusted!\n",
mem_size, c);
if (m > c) {
pclog("MEM: %luKB exceeds machine limit (%luKB), adjusted!\n", m, c);
mem_size = c;
}