Previous 199869 Revisions Next

r34756 Friday 30th January, 2015 at 23:57:49 UTC by Angelo Salese
Merge branch 'master' of https://github.com/mamedev/mame
[src/mame/drivers]comebaby.c
[src/osd/sdl]video.c video.h

trunk/src/mame/drivers/comebaby.c
r243267r243268
22  (c) 2000 ExPotato Co. Ltd (Excellent Potato)
33
44TODO:
5Can't be emulated without proper motherboard BIOS
5Nearly everything.
66
7  There also appears to be a sequel which may be running on the same hardware, which might not have been released.
7  There also appears to be a sequel which may be running on the same hardware, but which does not seem to have been released.
88  Come On Baby - Ballympic Heroes!  (c) 2001
99 
1010  Other games in this series include:
r243267r243268
1616  This is a Korean PC based board running Windows.  The game runs fully from
1717  the hard disk making these things rather fragile and prone to damage.
1818
19  Very little is known about the actual PC at this time, and the driver is
20  just a skeleton placeholder for the CHD dump of the hard disk.
19  PC Motherboard: PC Partner BXAS1-928
20  BIOS String: 07/03/2000-440BX-ITE8671-2A69KV3IC-00
21  aka. BIOS-I-2M
22  Award BIOS
23  B1120IAG.BIN   For Super IO = ITE 8671
24        Clock Gen IC : Winbond-39A
25        (Nov/2000 built)
26       
27  CPU - Slot 1 Celeron 633MHz (66x9.5)
28  Memory - 65536k SDRAM PC100
2129
22  The donor PC looks like a standard Windows98 setup.
30  Brief motherboard overview (from PC Partner BXAS1-928 motherboard manual)
31  --
32 
33  HARDWARE CONFIGURATION
34  This motherboard is based on Intel 82440BX chipset. The chipset is a
35  highly integrated solution for a cost-effective and compact motherboard.
36  The motherboard supports standard DIMM module, PC-100 DIMM module or
37  Registered DIMM Module.
38 
39  Features on-board include....
40  super-I/O, Ultra DMA33 (Ultra DMA66 optional for VIA chipset), PCI bus master IDE, AGP Ver 1.0, PCI Ver 2.1 compliance,
41  USB, VRM 8.4 compliance, ECC, ATX specification 2.01 compliance, hardware monitoring (optional), On-board PCI Sound
42  Sub-system(optional). Supports PC-100 DIMM Module.
43
44  Key Features:
45 
46  Processor
47  - Full support for the Intel Pentium II & Intel Pentium III, Intel Celeron and Deschutes processors using Slot 1 connector.
48  - Slot 1 connector for Intel Pentium II & Intel Pentium III microprocessors.
49  - Supports 66MHz and 100MHz bus speed including all Pentium II & Pentium III processors and future processor.
50
51  CPU Speed Setting
52  - Jumper setting or no jumper is needed to set for various speed of CPU (Factory optional).
53 
54  VRM (Voltage Regulator Modules) on Board
55  - Flexible motherboard design with on-board VRM 8.4, easy to upgrade with
56  Future Intel Pentium II & Pentium III processors.
57 
58  Cache
59  - Pentium II & Pentium III Processor built-in L2 cache.
60 
61  System Memory
62  - Up to 384MB (SDRAM) or 768MB (Registered SDRAM) - for 440BX.
63  - A total of three 168-pin DIMM sockets for 440BX.
64  - Supports SDRAM (only for 66MHz bus speed).
65  - Supports PC-100.
66 
67  Memory Organization
68  - Supports single-density DIMMs of 1MB, 2MB, 4MB, 8MB and 16MB depth (x64 or 72).
69  - Supports double-density DIMMs of 2MB, 4MB, 8MB, 16MB and 32MB depth
70  (x64 or 72).
71  - Supports error checking correction (ECC) using parity DRAM modules (for 440BX).
72  - Banks of different DRAM types depths can be mixed.
73 
74  Expansion Slots
75  - Supports SB-LINK Port for Creative Sound PCI Card.
76  - 1 AGP slot (ver. 1.0, 1x/2x mode supported).
77  - 5 PCI bus master slots (rev. 2.1 compliant, with 1 PCI slot sharing with 1 ISA slot)
78  - 2 ISA slots (1 ISA slot sharing with 1 PCI slot).
79 
80  On-Board I/O
81  - Two PCI fast IDE ports supporting up to 4 ATA2, Ultra DMA33 IDE HDDs, Ultra DMA66 (optional only for VIA Chipset)
82  IDE HDDs, CD-Roms, ZIP devices and LS-120 drives as boot drive.
83  - Supports bus master IDE, PIO mode 4 (up to 16M bytes/sec), Ultra DMA33 (up
84  to 33M bytes/sec) transfer.
85  - One ECP/EPP parallel port .
86  - Two 16550-compatible UART serial ports.
87  - One floppy port supporting two FDDs of 360KB, 720KB, 1.2MB, 1.44MB
88  or 2.88MB formated capacity.
89  - Two USB ports.
90  - PS/2 keyboard port.
91  - PS/2 mouse port.
92  - Infrared (IrDA) support (via a header).
93  - One Line / Speaker out, one Mic in, one Line in and MIDI / Gameport
94 
95  System BIOS
96  - 2MB flash BIOS supporting PnP, APM, ATAPI, ACPI and DMI;
97  - Jumper selection for 5V or 12V flash memory voltage.
98  - Auto detects and supports LBA hard disks with formatted capacities over
99  8.4GB.
100  - Easily upgradable by end-user.
101 
102  Plug-and-Play
103  - Supports Plug-and-Play Specification 1.1.
104  - Plug-and-play for DOS, Windows 3.X, Windows 95 as well as Windows 98.
105  - Fully steerable PCI interrupts.
106 
107  Power Management
108  - Supports SMM, APM and ACPI.
109  - Break switch for instant suspend/resume on system operation.
110  - Energy star "Green PC" compliant .
111  - Supports WAKE-ON-LAN (WOL).
112  - Supports Wake on Ring for External Modem.
113  - Supports ATX specification 2.01.
114 
115  Creative PCI Sound (optional)
116  - Full DOS game support (DDMA, PC/PCI, CLS).
117  - PCI 2.1 Bus Master, hardware sound acceleration.
118  - Direct sound and sound Blaster Compatible.
119  - Full Duplex, 3D Enhancement, Software wavetable.
120  - PNP and APM 1.2 support.
121  - Win95/98, NT drivers ready.
122 
123  Keyboard Password Turn ON
124  - Special feature for system security.
125 
126  System monitoring (optional)
127  - Hardware monitoring circuitry is supported, provides voltages, temperature, fan speeds etc. monitoring.
128 
129  --
130
131  The donor PC looks like a standard Windows 98 setup.
23132  The only exceptions we see are that there's a game logo.sys/logo.bmp in the
24  root directory to hide the Windows98 startup screen, and a shortcut to
133  root directory to hide the Windows 98 startup screen, and a shortcut to
25134  the game in the startup programs.
26  Also of interest, Windows98 was installed from a setup folder on the HD.
135  Also of interest, Windows 98 was installed from a setup folder on the HD.
27136  To me this hints that there may have been some expectation of the disk
28137  being plugged into random hardware.
29138
30  The game is pretty much standard PC game running on Windows98 PC.
31  It uses DirectSound and the Microsoft MCI interfaces and Glide for video.
139  The game is pretty much a standard PC game running on a Windows 98 PC.
140  It uses DirectSound and the Microsoft MCI interfaces and 3dfx Glide for video.
32141  The PC that the game was dumped from has Sound Blaster and Ensoniq drivers,
33142  but it works fine with some other sound configurations.
34  The donor PC has a 3dfxvoodoo3 driver installation directory, but it works
143  The donor PC has a "3dfxvoodoo3" driver installation directory, but it works
35144  fine with a Voodoo4 4500.
36145
37146  The game itself has some protection, it expects a file C:\\WINDOWS\win386p.swp of 84 bytes
38147  to have the hard disk volume serial number in ascii number (not hex) format at offset 4.
39148
40  The game appears to use parallel port (0x378,0x379)for I/O.
41  The direct port access means it won't run on XP
149  The game appears to use parallel port (0x378,0x379) for I/O.
150  The direct port access means it won't run on XP.
42151  For the controls, it writes a device select to 0x378, and reads the device value from 0x379.
43152  There is some other output, maybe lights?
44153   --------------------------------------------
r243267r243268
126235
127236
128237ROM_START(comebaby)
129   ROM_REGION32_LE(0x20000, "maincpu", 0)  /* motherboard bios */
130   ROM_LOAD("comeonbaby.pcbios", 0x000000, 0x10000, NO_DUMP )
238   ROM_REGION32_LE(0x80000, "maincpu", 0)  /* motherboard bios */
239   ROM_LOAD("b1120iag.bin", 0x000000, 0x40000, CRC(9b6f95f1) SHA1(65d6a2fea9911593f093b2e2a43d1534b54d60b3) )
131240
132241   DISK_REGION( "disks" )
133242   DISK_IMAGE( "comebaby", 0, SHA1(ea57919319c0b6a1d4abd7822cff028855bf082f) )
trunk/src/osd/sdl/video.c
r243267r243268
156156   #if defined(SDLMAME_WIN32)  // Win32 version
157157   MONITORINFOEX info;
158158   info.cbSize = sizeof(info);
159   GetMonitorInfo((HMONITOR)monitor->handle, (LPMONITORINFO)&info);
160   monitor->m_dimensions.x = monitor->m_dimensions.y = 0;
161   monitor->m_center_width = monitor->m_dimensions.w = info.rcMonitor.right - info.rcMonitor.left;
162   monitor->m_center_height = monitor->m_dimensions.h = info.rcMonitor.bottom - info.rcMonitor.top;
159   GetMonitorInfo((HMONITOR)m_handle, (LPMONITORINFO)&info);
160   m_dimensions.x = m_dimensions.y = 0;
161   m_center_width = m_dimensions.w = info.rcMonitor.right - info.rcMonitor.left;
162   m_center_height = m_dimensions.h = info.rcMonitor.bottom - info.rcMonitor.top;
163163   char *temp = utf8_from_wstring(info.szDevice);
164   strcpy(monitor->monitor_device, temp);
164   strcpy(m_monitor_device, temp);
165165   osd_free(temp);
166166   #elif defined(SDLMAME_MACOSX)   // Mac OS X Core Imaging version
167167   CGDirectDisplayID primary;
r243267r243268
171171   primary = CGMainDisplayID();
172172   dbounds = CGDisplayBounds(primary);
173173
174   monitor->center_width = monitor->monitor_width = dbounds.size.width - dbounds.origin.x;
175   monitor->center_height = monitor->monitor_height = dbounds.size.height - dbounds.origin.y;
176   strcpy(monitor->monitor_device, "Mac OS X display");
174   m_dimensions.x = m_dimensions.y = 0;
175   m_center_width = m_dimensions.w = dbounds.size.width - dbounds.origin.x;
176   m_center_height = m_dimensions.h = dbounds.size.height - dbounds.origin.y;
177   strcpy(m_monitor_device, "Mac OS X display");
177178   #elif defined(SDLMAME_X11) || defined(SDLMAME_NO_X11)       // X11 version
178179   {
179180      #if defined(SDLMAME_X11)
r243267r243268
185186      if ( SDL_GetWMInfo(&info) && (info.subsystem == SDL_SYSWM_X11) )
186187      {
187188         screen = DefaultScreen(info.info.x11.display);
188         SDL_VideoDriverName(monitor->monitor_device, sizeof(monitor->monitor_device)-1);
189         monitor->monitor_width = DisplayWidth(info.info.x11.display, screen);
190         monitor->monitor_height = DisplayHeight(info.info.x11.display, screen);
189         SDL_VideoDriverName(m_monitor_device, sizeof(m_monitor_device)-1);
190         m_dimensions.x = m_dimensions.y = 0;
191         m_dimensions.w = DisplayWidth(info.info.x11.display, screen);
192         m_dimensions.h = DisplayHeight(info.info.x11.display, screen);
191193
192194         if ((XineramaIsActive(info.info.x11.display)) && video_config.restrictonemonitor)
193195         {
r243267r243268
196198
197199               xineinfo = XineramaQueryScreens(info.info.x11.display, &numscreens);
198200
199            monitor->center_width = xineinfo[0].width;
200            monitor->center_height = xineinfo[0].height;
201            m_center_width = xineinfo[0].width;
202            m_center_height = xineinfo[0].height;
201203
202204            XFree(xineinfo);
203205         }
204206         else
205207         {
206            monitor->center_width = monitor->monitor_width;
207            monitor->center_height = monitor->monitor_height;
208            m_center_width = m_dimensions.w;
209            m_center_height = m_dimensions.h;
208210         }
209211      }
210212      else
r243267r243268
213215         static int first_call=0;
214216         static int cw = 0, ch = 0;
215217
216         SDL_VideoDriverName(monitor->monitor_device, sizeof(monitor->monitor_device)-1);
218         SDL_VideoDriverName(m_monitor_device, sizeof(m_monitor_device)-1);
217219         if (first_call==0)
218220         {
219221            const char *dimstr = osd_getenv(SDLENV_DESKTOPDIM);
r243267r243268
233235               }
234236               if ((cw==0) || (ch==0))
235237               {
236                  osd_printf_warning("WARNING: SDL_GetVideoInfo() for driver <%s> is broken.\n", monitor->monitor_device);
238                  osd_printf_warning("WARNING: SDL_GetVideoInfo() for driver <%s> is broken.\n", m_monitor_device);
237239                  osd_printf_warning("         You should set SDLMAME_DESKTOPDIM to your desktop size.\n");
238240                  osd_printf_warning("            e.g. export SDLMAME_DESKTOPDIM=800x600\n");
239241                  osd_printf_warning("         Assuming 1024x768 now!\n");
r243267r243268
242244               }
243245            }
244246         }
245         monitor->monitor_width = cw;
246         monitor->monitor_height = ch;
247         monitor->center_width = cw;
248         monitor->center_height = ch;
247         m_dimensions.w = cw;
248         m_dimensions.h = ch;
249         m_center_width = cw;
250         m_center_height = ch;
249251      }
250252   }
251253   #elif defined(SDLMAME_OS2)      // OS2 version
252   monitor->center_width = monitor->monitor_width = WinQuerySysValue( HWND_DESKTOP, SV_CXSCREEN );
253   monitor->center_height = monitor->monitor_height = WinQuerySysValue( HWND_DESKTOP, SV_CYSCREEN );
254   strcpy(monitor->monitor_device, "OS/2 display");
254   m_dimensions.x = m_dimensions.y = 0;
255   m_center_width = m_dimensions.w = WinQuerySysValue( HWND_DESKTOP, SV_CXSCREEN );
256   m_center_height = m_dimensions.h = WinQuerySysValue( HWND_DESKTOP, SV_CYSCREEN );
257   strcpy(m_monitor_device, "OS/2 display");
255258   #else
256259   #error Unknown SDLMAME_xx OS type!
257260   #endif
r243267r243268
260263      static int info_shown=0;
261264      if (!info_shown)
262265      {
263         osd_printf_verbose("SDL Device Driver     : %s\n", monitor->monitor_device);
264         osd_printf_verbose("SDL Monitor Dimensions: %d x %d\n", monitor->monitor_width, monitor->monitor_height);
266         osd_printf_verbose("SDL Device Driver     : %s\n", m_monitor_device);
267         osd_printf_verbose("SDL Monitor Dimensions: %d x %d\n", m_dimensions.w, m_dimensions.h);
265268         info_shown = 1;
266269      }
267270   }
r243267r243268
323326//============================================================
324327
325328#if !defined(SDLMAME_WIN32) && !(SDLMAME_SDL2)
326static void add_primary_monitor(void *data)
329void sdl_monitor_info::add_primary_monitor(void *data)
327330{
328331   sdl_monitor_info ***tailptr = (sdl_monitor_info ***)data;
329332   sdl_monitor_info *monitor;
r243267r243268
332335   monitor = global_alloc_clear(sdl_monitor_info);
333336
334337   // copy in the data
335   monitor->handle = 1;
338   monitor->m_handle = 1;
336339
337   sdlvideo_monitor_refresh(monitor);
340   monitor->refresh();
338341
339342   // guess the aspect ratio assuming square pixels
340   monitor->aspect = (float)(monitor->monitor_width) / (float)(monitor->monitor_height);
343   monitor->m_aspect = (float)(monitor->m_dimensions.w) / (float)(monitor->m_dimensions.h);
341344
342345   // save the primary monitor handle
343346   primary_monitor = monitor;
344347
345348   // hook us into the list
346349   **tailptr = monitor;
347   *tailptr = &monitor->next;
350   *tailptr = &monitor->m_next;
348351}
349352#endif
350353
r243267r243268
367370   assert(result);
368371   (void)result; // to silence gcc 4.6
369372
370   // allocate a new monitor info
371   monitor = global_alloc_clear(sdl_monitor_info);
373   // guess the aspect ratio assuming square pixels
374   float aspect = (float)(info.rcMonitor.right - info.rcMonitor.left) / (float)(info.rcMonitor.bottom - info.rcMonitor.top);
372375
373   // copy in the data
374
375#ifdef PTR64
376   monitor->handle = (UINT64)handle;
377#else
378   monitor->handle = (UINT32)handle;
379#endif
380   monitor->monitor_width = info.rcMonitor.right - info.rcMonitor.left;
381   monitor->monitor_height = info.rcMonitor.bottom - info.rcMonitor.top;
382   monitor->center_width = monitor->monitor_width;
383   monitor->center_height = monitor->monitor_height;
376   // allocate a new monitor info
384377   char *temp = utf8_from_wstring(info.szDevice);
385   strcpy(monitor->monitor_device, temp);
378   // copy in the data
379   monitor = global_alloc(sdl_monitor_info((UINT64) handle, temp, aspect));
386380   osd_free(temp);
387381
388   // guess the aspect ratio assuming square pixels
389   monitor->aspect = (float)(info.rcMonitor.right - info.rcMonitor.left) / (float)(info.rcMonitor.bottom - info.rcMonitor.top);
390
391382   // save the primary monitor handle
392383   if (info.dwFlags & MONITORINFOF_PRIMARY)
393      primary_monitor = monitor;
384      sdl_monitor_info::primary_monitor = monitor;
394385
395386   // hook us into the list
396387   **tailptr = monitor;
397   *tailptr = &monitor->next;
388   *tailptr = &monitor->m_next;
398389
399390   // enumerate all the available monitors so to list their names in verbose mode
400391   return TRUE;
r243267r243268
449440
450441         // hook us into the list
451442         *tailptr = monitor;
452         tailptr = &monitor->next;
443         tailptr = &monitor->m_next;
453444      }
454445   }
455446   osd_printf_verbose("Leave init_monitors\n");
r243267r243268
466457   while (sdl_monitor_info::list != NULL)
467458   {
468459      sdl_monitor_info *temp = sdl_monitor_info::list;
469      sdl_monitor_info::list = temp->next;
460      sdl_monitor_info::list = temp->next();
470461      global_free(temp);
471462   }
472463}
r243267r243268
498489   // look for a match in the name first
499490   if (scrname != NULL)
500491   {
501      for (monitor = sdl_monitor_info::list; monitor != NULL; monitor = monitor->next)
492      for (monitor = sdl_monitor_info::list; monitor != NULL; monitor = monitor->next())
502493      {
503494         moncount++;
504495         if (strcmp(scrname, monitor->device()) == 0)
r243267r243268
508499
509500   // didn't find it; alternate monitors until we hit the jackpot
510501   index %= moncount;
511   for (monitor = sdl_monitor_info::list; monitor != NULL; monitor = monitor->next)
502   for (monitor = sdl_monitor_info::list; monitor != NULL; monitor = monitor->next())
512503      if (index-- == 0)
513504         goto finishit;
514505
r243267r243268
523514   return monitor;
524515}
525516#else
526static sdl_monitor_info *pick_monitor(sdl_options &options, int index)
517sdl_monitor_info *sdl_monitor_info::pick_monitor(sdl_options &options, int index)
527518{
528519   sdl_monitor_info *monitor;
529520   float aspect;
r243267r243268
536527
537528   if (aspect != 0)
538529   {
539      monitor->aspect = aspect;
530      monitor->m_aspect = aspect;
540531   }
541532   return monitor;
542533}
trunk/src/osd/sdl/video.h
r243267r243268
5858   int                 height;
5959};
6060
61// FIXME: This is sort of ugly ... and should be a real interface only
6162class sdl_monitor_info
6263{
6364public:
64   sdl_monitor_info  * next;                   // pointer to next monitor in list
6565
66   sdl_monitor_info()
67   : m_next(NULL), m_handle(0), m_aspect(0.0f),
68     m_center_width(0), m_center_height(0)
69     {}
70   sdl_monitor_info(const UINT64 handle, const char *monitor_device, float aspect)
71   : m_next(NULL), m_handle(handle), m_aspect(aspect),
72     m_center_width(0), m_center_height(0)
73   {
74      strncpy(m_monitor_device, monitor_device, 64);
75      refresh();
76   }
77
6678   const UINT64 handle() { return m_handle; }
6779   const SDL_Rect &position_size() { refresh(); return m_dimensions; }
6880
6981   const char *device() { return m_monitor_device; }
7082
7183   float aspect();
84
7285   int   center_width() { refresh(); return m_center_width; }
7386   int center_height() { refresh(); return m_center_height; }
7487
r243267r243268
7891   static void   init();
7992   static void exit();
8093   static sdl_monitor_info *pick_monitor(sdl_options &options, int index);
94#if !defined(SDLMAME_WIN32) && !(SDLMAME_SDL2)
95   static void add_primary_monitor(void *data);
96#endif
8197
98   sdl_monitor_info     * next() { return m_next; }   // pointer to next monitor in list
99
100   // STATIC
101   static sdl_monitor_info *primary_monitor;
102   static sdl_monitor_info *list;
103
104   // FIXME: shouldn't be here - see windows enumeration callback
105   sdl_monitor_info     * m_next;                   // pointer to next monitor in list
82106private:
83107   void refresh();
84108
r243267r243268
89113   int                 m_center_width;           // width of first physical screen for centering
90114   int                 m_center_height;          // height of first physical screen for centering
91115
92   // STATIC
93   static sdl_monitor_info *primary_monitor;
94   static sdl_monitor_info *list;
95116
96117};
97118


Previous 199869 Revisions Next


© 1997-2024 The MAME Team