Patch: Fix for error in re-ordering of ROM set enum

Discussion of development and patch submission.
Post Reply
ecksemmess
Posts: 183
Joined: Wed 18 Mar, 2015 5:27 am

Patch: Fix for error in re-ordering of ROM set enum

Post by ecksemmess »

An oversight in the re-ordering of the ROM set enum in r346 has caused problems for the Phoenix 386 and the DTK 386, which have now lost their 386 classification. Actually, the problem was worse than that, as there were several misclassifications even before the re-ordering in r346 (IBM PS/1 Model 2011 classed improperly as 386+, for example). Attached is a patch that fixes all of that, and at the same time, I've taken the liberty of cleaning up some of the other silliness in the ROM set enum, which was on track to cause difficulties in the future whenever more PCI ROM sets are added. Obviously, everything in this patch is for ibm.h. I also note that there's a line in ibm.h as follows:

Code: Select all

#define AMIBIOS (romset==ROM_AMI386 || romset==ROM_AMI486 || romset == ROM_WIN486)
which is strange--obviously we've got quite a few other AMIBIOS machines at this point. Should they all be added? That would mean the line should be changed to:

Code: Select all

#define AMIBIOS (romset == ROM_AMIXT || romset == ROM_AMI286 || romset == ROM_AMI386 || romset == ROM_AMI486 || romset == ROM_WIN486 || romset == ROM_REVENGE || romset == ROM_ENDEAVOR)
Another thing--what is ROM_MISC286? It doesn't appear to actually be used anywhere...
Attachments
ibm.h.patch
Patch for ibm.h
(826 Bytes) Downloaded 341 times
Battler
Posts: 793
Joined: Sun 06 Jul, 2014 7:05 pm

Re: Patch: Fix for error in re-ordering of ROM set enum

Post by Battler »

Defining properties of a chipset like that is a bad idea anyway, as it doesn't scale well. PCem-X dealt with PCI, AT, and is386 values to turn them from a define to a variable that is set on model initialization in model.c. I would really recommend PCem do the same too.
User avatar
SarahWalker
Site Admin
Posts: 2054
Joined: Thu 24 Apr, 2014 4:18 pm

Re: Patch: Fix for error in re-ordering of ROM set enum

Post by SarahWalker »

Most of those #defines are a holdover from older versions - few (if any) of them will still do anything.
Battler
Posts: 793
Joined: Sun 06 Jul, 2014 7:05 pm

Re: Patch: Fix for error in re-ordering of ROM set enum

Post by Battler »

The PCI define is still used by all the SVGA-based emulated graphics cards, as they all at least disable the video BIOS by default if PCI is defined.
User avatar
SarahWalker
Site Admin
Posts: 2054
Joined: Thu 24 Apr, 2014 4:18 pm

Re: Patch: Fix for error in re-ordering of ROM set enum

Post by SarahWalker »

True. Anyway, rev 348 should fix all this, if only I could commit it!
Post Reply