Previous 199869 Revisions Next

r34755 Friday 30th January, 2015 at 23:57:05 UTC by Angelo Salese
Make refresh rate more sane, still not 100% correct tho.
[src/mame/drivers]comebaby.c
[src/mess/drivers]c65.c
[src/osd/sdl]video.c video.h

trunk/src/mame/drivers/comebaby.c
r243266r243267
22  (c) 2000 ExPotato Co. Ltd (Excellent Potato)
33
44TODO:
5Nearly everything.
5Can't be emulated without proper motherboard BIOS
66
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.
7  There also appears to be a sequel which may be running on the same hardware, which might not have been released.
88  Come On Baby - Ballympic Heroes!  (c) 2001
99 
1010  Other games in this series include:
r243266r243267
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  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
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.
2921
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.
22  The donor PC looks like a standard Windows98 setup.
13223  The only exceptions we see are that there's a game logo.sys/logo.bmp in the
133  root directory to hide the Windows 98 startup screen, and a shortcut to
24  root directory to hide the Windows98 startup screen, and a shortcut to
13425  the game in the startup programs.
135  Also of interest, Windows 98 was installed from a setup folder on the HD.
26  Also of interest, Windows98 was installed from a setup folder on the HD.
13627  To me this hints that there may have been some expectation of the disk
13728  being plugged into random hardware.
13829
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.
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.
14132  The PC that the game was dumped from has Sound Blaster and Ensoniq drivers,
14233  but it works fine with some other sound configurations.
143  The donor PC has a "3dfxvoodoo3" driver installation directory, but it works
34  The donor PC has a 3dfxvoodoo3 driver installation directory, but it works
14435  fine with a Voodoo4 4500.
14536
14637  The game itself has some protection, it expects a file C:\\WINDOWS\win386p.swp of 84 bytes
14738  to have the hard disk volume serial number in ascii number (not hex) format at offset 4.
14839
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.
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
15142  For the controls, it writes a device select to 0x378, and reads the device value from 0x379.
15243  There is some other output, maybe lights?
15344   --------------------------------------------
r243266r243267
235126
236127
237128ROM_START(comebaby)
238   ROM_REGION32_LE(0x80000, "maincpu", 0)  /* motherboard bios */
239   ROM_LOAD("b1120iag.bin", 0x000000, 0x40000, CRC(9b6f95f1) SHA1(65d6a2fea9911593f093b2e2a43d1534b54d60b3) )
129   ROM_REGION32_LE(0x20000, "maincpu", 0)  /* motherboard bios */
130   ROM_LOAD("comeonbaby.pcbios", 0x000000, 0x10000, NO_DUMP )
240131
241132   DISK_REGION( "disks" )
242133   DISK_IMAGE( "comebaby", 0, SHA1(ea57919319c0b6a1d4abd7822cff028855bf082f) )
trunk/src/mess/drivers/c65.c
r243266r243267
465465   MCFG_SCREEN_UPDATE_DRIVER(c65_state, screen_update)
466466//  MCFG_SCREEN_SIZE(32*8, 32*8)
467467//  MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 0*8, 32*8-1)
468   MCFG_SCREEN_RAW_PARAMS(MAIN_CLOCK, 910, 0, 640, 525, 0, 200) // mods needed
468   MCFG_SCREEN_RAW_PARAMS(MAIN_CLOCK*4, 910, 0, 640, 262, 0, 200) // mods needed
469469   MCFG_SCREEN_PALETTE("palette")
470470
471471   MCFG_GFXDECODE_ADD("gfxdecode", "palette", c65)
trunk/src/osd/sdl/video.c
r243266r243267
156156   #if defined(SDLMAME_WIN32)  // Win32 version
157157   MONITORINFOEX info;
158158   info.cbSize = sizeof(info);
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;
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;
163163   char *temp = utf8_from_wstring(info.szDevice);
164   strcpy(m_monitor_device, temp);
164   strcpy(monitor->monitor_device, temp);
165165   osd_free(temp);
166166   #elif defined(SDLMAME_MACOSX)   // Mac OS X Core Imaging version
167167   CGDirectDisplayID primary;
r243266r243267
171171   primary = CGMainDisplayID();
172172   dbounds = CGDisplayBounds(primary);
173173
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");
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");
178177   #elif defined(SDLMAME_X11) || defined(SDLMAME_NO_X11)       // X11 version
179178   {
180179      #if defined(SDLMAME_X11)
r243266r243267
186185      if ( SDL_GetWMInfo(&info) && (info.subsystem == SDL_SYSWM_X11) )
187186      {
188187         screen = DefaultScreen(info.info.x11.display);
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);
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);
193191
194192         if ((XineramaIsActive(info.info.x11.display)) && video_config.restrictonemonitor)
195193         {
r243266r243267
198196
199197               xineinfo = XineramaQueryScreens(info.info.x11.display, &numscreens);
200198
201            m_center_width = xineinfo[0].width;
202            m_center_height = xineinfo[0].height;
199            monitor->center_width = xineinfo[0].width;
200            monitor->center_height = xineinfo[0].height;
203201
204202            XFree(xineinfo);
205203         }
206204         else
207205         {
208            m_center_width = m_dimensions.w;
209            m_center_height = m_dimensions.h;
206            monitor->center_width = monitor->monitor_width;
207            monitor->center_height = monitor->monitor_height;
210208         }
211209      }
212210      else
r243266r243267
215213         static int first_call=0;
216214         static int cw = 0, ch = 0;
217215
218         SDL_VideoDriverName(m_monitor_device, sizeof(m_monitor_device)-1);
216         SDL_VideoDriverName(monitor->monitor_device, sizeof(monitor->monitor_device)-1);
219217         if (first_call==0)
220218         {
221219            const char *dimstr = osd_getenv(SDLENV_DESKTOPDIM);
r243266r243267
235233               }
236234               if ((cw==0) || (ch==0))
237235               {
238                  osd_printf_warning("WARNING: SDL_GetVideoInfo() for driver <%s> is broken.\n", m_monitor_device);
236                  osd_printf_warning("WARNING: SDL_GetVideoInfo() for driver <%s> is broken.\n", monitor->monitor_device);
239237                  osd_printf_warning("         You should set SDLMAME_DESKTOPDIM to your desktop size.\n");
240238                  osd_printf_warning("            e.g. export SDLMAME_DESKTOPDIM=800x600\n");
241239                  osd_printf_warning("         Assuming 1024x768 now!\n");
r243266r243267
244242               }
245243            }
246244         }
247         m_dimensions.w = cw;
248         m_dimensions.h = ch;
249         m_center_width = cw;
250         m_center_height = ch;
245         monitor->monitor_width = cw;
246         monitor->monitor_height = ch;
247         monitor->center_width = cw;
248         monitor->center_height = ch;
251249      }
252250   }
253251   #elif defined(SDLMAME_OS2)      // OS2 version
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");
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");
258255   #else
259256   #error Unknown SDLMAME_xx OS type!
260257   #endif
r243266r243267
263260      static int info_shown=0;
264261      if (!info_shown)
265262      {
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);
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);
268265         info_shown = 1;
269266      }
270267   }
r243266r243267
326323//============================================================
327324
328325#if !defined(SDLMAME_WIN32) && !(SDLMAME_SDL2)
329void sdl_monitor_info::add_primary_monitor(void *data)
326static void add_primary_monitor(void *data)
330327{
331328   sdl_monitor_info ***tailptr = (sdl_monitor_info ***)data;
332329   sdl_monitor_info *monitor;
r243266r243267
335332   monitor = global_alloc_clear(sdl_monitor_info);
336333
337334   // copy in the data
338   monitor->m_handle = 1;
335   monitor->handle = 1;
339336
340   monitor->refresh();
337   sdlvideo_monitor_refresh(monitor);
341338
342339   // guess the aspect ratio assuming square pixels
343   monitor->m_aspect = (float)(monitor->m_dimensions.w) / (float)(monitor->m_dimensions.h);
340   monitor->aspect = (float)(monitor->monitor_width) / (float)(monitor->monitor_height);
344341
345342   // save the primary monitor handle
346343   primary_monitor = monitor;
347344
348345   // hook us into the list
349346   **tailptr = monitor;
350   *tailptr = &monitor->m_next;
347   *tailptr = &monitor->next;
351348}
352349#endif
353350
r243266r243267
370367   assert(result);
371368   (void)result; // to silence gcc 4.6
372369
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);
370   // allocate a new monitor info
371   monitor = global_alloc_clear(sdl_monitor_info);
375372
376   // allocate a new monitor info
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;
377384   char *temp = utf8_from_wstring(info.szDevice);
378   // copy in the data
379   monitor = global_alloc(sdl_monitor_info((UINT64) handle, temp, aspect));
385   strcpy(monitor->monitor_device, temp);
380386   osd_free(temp);
381387
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
382391   // save the primary monitor handle
383392   if (info.dwFlags & MONITORINFOF_PRIMARY)
384      sdl_monitor_info::primary_monitor = monitor;
393      primary_monitor = monitor;
385394
386395   // hook us into the list
387396   **tailptr = monitor;
388   *tailptr = &monitor->m_next;
397   *tailptr = &monitor->next;
389398
390399   // enumerate all the available monitors so to list their names in verbose mode
391400   return TRUE;
r243266r243267
440449
441450         // hook us into the list
442451         *tailptr = monitor;
443         tailptr = &monitor->m_next;
452         tailptr = &monitor->next;
444453      }
445454   }
446455   osd_printf_verbose("Leave init_monitors\n");
r243266r243267
457466   while (sdl_monitor_info::list != NULL)
458467   {
459468      sdl_monitor_info *temp = sdl_monitor_info::list;
460      sdl_monitor_info::list = temp->next();
469      sdl_monitor_info::list = temp->next;
461470      global_free(temp);
462471   }
463472}
r243266r243267
489498   // look for a match in the name first
490499   if (scrname != NULL)
491500   {
492      for (monitor = sdl_monitor_info::list; monitor != NULL; monitor = monitor->next())
501      for (monitor = sdl_monitor_info::list; monitor != NULL; monitor = monitor->next)
493502      {
494503         moncount++;
495504         if (strcmp(scrname, monitor->device()) == 0)
r243266r243267
499508
500509   // didn't find it; alternate monitors until we hit the jackpot
501510   index %= moncount;
502   for (monitor = sdl_monitor_info::list; monitor != NULL; monitor = monitor->next())
511   for (monitor = sdl_monitor_info::list; monitor != NULL; monitor = monitor->next)
503512      if (index-- == 0)
504513         goto finishit;
505514
r243266r243267
514523   return monitor;
515524}
516525#else
517sdl_monitor_info *sdl_monitor_info::pick_monitor(sdl_options &options, int index)
526static sdl_monitor_info *pick_monitor(sdl_options &options, int index)
518527{
519528   sdl_monitor_info *monitor;
520529   float aspect;
r243266r243267
527536
528537   if (aspect != 0)
529538   {
530      monitor->m_aspect = aspect;
539      monitor->aspect = aspect;
531540   }
532541   return monitor;
533542}
trunk/src/osd/sdl/video.h
r243266r243267
5858   int                 height;
5959};
6060
61// FIXME: This is sort of ugly ... and should be a real interface only
6261class sdl_monitor_info
6362{
6463public:
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
7866   const UINT64 handle() { return m_handle; }
7967   const SDL_Rect &position_size() { refresh(); return m_dimensions; }
8068
8169   const char *device() { return m_monitor_device; }
8270
8371   float aspect();
84
8572   int   center_width() { refresh(); return m_center_width; }
8673   int center_height() { refresh(); return m_center_height; }
8774
r243266r243267
9178   static void   init();
9279   static void exit();
9380   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
9781
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
10682private:
10783   void refresh();
10884
r243266r243267
11389   int                 m_center_width;           // width of first physical screen for centering
11490   int                 m_center_height;          // height of first physical screen for centering
11591
92   // STATIC
93   static sdl_monitor_info *primary_monitor;
94   static sdl_monitor_info *list;
11695
11796};
11897


Previous 199869 Revisions Next


© 1997-2024 The MAME Team