PCem

changeset 72:9cba7b285132

Fixed ROM count - 430VX is listed again.
author TomW
date Sun Feb 09 08:54:48 2014 +0000
parents 923b243eba54
children 23e2e608e444
files src/ibm.h src/win.c
diffstat 2 files changed, 10 insertions(+), 8 deletions(-) [+]
line diff
     1.1 --- a/src/ibm.h	Sun Jan 12 11:37:09 2014 +0000
     1.2 +++ b/src/ibm.h	Sun Feb 09 08:54:48 2014 +0000
     1.3 @@ -312,7 +312,9 @@
     1.4          ROM_WIN486,
     1.5          ROM_PCI486,
     1.6          ROM_SIS496,
     1.7 -        ROM_430VX
     1.8 +        ROM_430VX,
     1.9 +        
    1.10 +        ROM_MAX
    1.11  };
    1.12  
    1.13  //#define ROM_IBMPCJR 5 /*Not working! ROMs are corrupt*/
     2.1 --- a/src/win.c	Sun Jan 12 11:37:09 2014 +0000
     2.2 +++ b/src/win.c	Sun Feb 09 08:54:48 2014 +0000
     2.3 @@ -85,7 +85,7 @@
     2.4  //        }
     2.5  }
     2.6  
     2.7 -int romspresent[26];
     2.8 +int romspresent[ROM_MAX];
     2.9  int quited=0;
    2.10  
    2.11  RECT oldclip;
    2.12 @@ -349,19 +349,19 @@
    2.13  //        set_display_switch_mode(SWITCH_BACKGROUND);
    2.14          
    2.15          d=romset;
    2.16 -        for (c=0;c<26;c++)
    2.17 +        for (c=0;c<ROM_MAX;c++)
    2.18          {
    2.19                  romset=c;
    2.20                  romspresent[c]=loadbios();
    2.21                  pclog("romset %i - %i\n", c, romspresent[c]);
    2.22          }
    2.23          
    2.24 -        for (c = 0; c < 26; c++)
    2.25 +        for (c = 0; c < ROM_MAX; c++)
    2.26          {
    2.27                  if (romspresent[c])
    2.28                     break;
    2.29          }
    2.30 -        if (c == 26)
    2.31 +        if (c == ROM_MAX)
    2.32          {
    2.33                  MessageBox(hwnd,"No ROMs present!\nYou must have at least one romset to use PCem.","PCem fatal error",MB_OK);
    2.34                  return 0;
    2.35 @@ -373,7 +373,7 @@
    2.36          if (!c)
    2.37          {
    2.38                  if (romset!=-1) MessageBox(hwnd,"Configured romset not available.\nDefaulting to available romset.","PCem error",MB_OK);
    2.39 -                for (c=0;c<26;c++)
    2.40 +                for (c=0;c<ROM_MAX;c++)
    2.41                  {
    2.42                          if (romspresent[c])
    2.43                          {
    2.44 @@ -594,7 +594,7 @@
    2.45  }
    2.46  
    2.47  extern int is486;
    2.48 -int romstolist[26], listtomodel[26], romstomodel[26], modeltolist[26];
    2.49 +int romstolist[ROM_MAX], listtomodel[ROM_MAX], romstomodel[ROM_MAX], modeltolist[ROM_MAX];
    2.50  static int settings_sound_to_list[20], settings_list_to_sound[20];
    2.51  
    2.52  BOOL CALLBACK configdlgproc(HWND hdlg, UINT message, WPARAM wParam, LPARAM lParam)
    2.53 @@ -611,7 +611,7 @@
    2.54                  case WM_INITDIALOG:
    2.55                          pause=1;
    2.56                  h=GetDlgItem(hdlg,IDC_COMBO1);
    2.57 -                for (c=0;c<26;c++) romstolist[c]=0;
    2.58 +                for (c=0;c<ROM_MAX;c++) romstolist[c]=0;
    2.59                  c = d = 0;
    2.60                  while (models[c].id != -1)
    2.61                  {