Commit Graph

9908 Commits

Author SHA1 Message Date
Aaron Giles
6fe9fe53f4 Integrated comments into debugcpu.c, and removed debugcmt.c. Modernized
the code and updated so it actually works with the modern debug classes.
2010-09-05 06:12:47 +00:00
Roberto Fresca
d5f94fa913 New driver for Jubilee's Double-Up Poker. Decoded graphics and colors
properly. Hooked the correct TMS9980 CPU, added a preliminary memory
map and some technical notes. [Roberto Fresca]


New games marked as GAME_NOT_WORKING
------------------------------------
Jubilee Double-Up Poker [Roberto Fresca]
2010-09-05 05:20:43 +00:00
Brian Troha
cb25e8746a multfish.c: Updated driver with new information and several new sets as well as several new bootlegs. [MetalliC] 2010-09-05 04:25:14 +00:00
Roberto Zandona
627e08c052 00945: bkraidu: Text glitch in the flip screen mode. [Roberto Zandona'] 2010-09-04 23:58:32 +00:00
Aaron Giles
820fc8f8ea Whoops, one more reference.... 2010-09-04 20:55:22 +00:00
Aaron Giles
15ec9dd390 Remove unused debug_comment_exit 2010-09-04 20:44:53 +00:00
Aaron Giles
b954eccd7e Last 2 regressions. 2010-09-04 20:38:52 +00:00
Aaron Giles
1359ea15b1 Have each device create its own device_debug instead of letting the
debugger do it. This allows the device to start itself up before the
debugger tries to figure out what to do with it. Fixes the problem
where register names were not populated into the symbol table
correctly after I shuffled the initialization order.
2010-09-04 19:47:54 +00:00
Aaron Giles
53b7d019e2 Remaining regressions. 2010-09-04 19:15:28 +00:00
Aaron Giles
c97d6bcfe0 Fix most reported regressions. A few more still to come. 2010-09-04 17:30:45 +00:00
Aaron Giles
5b6c078aeb Added templates required_shared_ptr<> and optional_shared_ptr<> which
work just like required_device<> and optional_device<> for retrieving a
pointer by tag from an address space that specifies AM_SHARE("tag").
Also added templates required_shared_size<> and optional_shared_size<>
for retrieving the size of the AM_SHARE region.

Created a new generic NVRAM device. It can be configured to default to
0-fill, 1-fill, random-fill, or custom fill. In all cases, a same-named
memory region overrides the default fill. The address range where the
NVRAM can be found is now identified by an AM_SHARE() region of the
same tag as the NVRAM device. Drivers can also explicitly configure a
separately-allocated NVRAM region via nvram_device::set_base().

Replaced all instances of MDRV_NVRAM_HANDLER(generic_*) with
MDRV_NVRAM_ADD_*("nvram"). Replaced all AM_BASE_GENERIC/AM_SIZE_GENERIC(nvram)
with AM_SHARE("nvram"). For all remaining drivers that referenced the
generic.nvram directly, changed them to hold a required_shared_ptr<UINTx>
to the NVRAM in their driver state, and use that instead. Removed
nvram and nvram_size from the generic_ptrs.
2010-09-04 17:01:46 +00:00
Scott Stone
8969b0b7ee Quick fix to relegate the eeprom warnings to debug build only. (no whatsnew.txt)
Comment:
There is still a major issue where this printf shows up when using many of the output commands -listxml, -romident and more.  It should only show up when emulating the game, right?
2010-09-04 16:51:25 +00:00
Angelo Salese
bcf5b7a661 Revert previous z80dma fix (made it specific to the MESS driver), not worth 2010-09-04 16:01:16 +00:00
Roberto Zandona
1ca12dce6f 03952: gaiden, wildfang, raiga: Screen is shifted 32 pixels down with flip-screen. [Roberto Zandona'] 2010-09-04 14:09:06 +00:00
Angelo Salese
0f68f0fc2b new clones
----------
Vigilante (World, set 2) [porchy]

(just a minor random driver clean-up, because I've forgot to write the aforementioned whatsnew string in my previous commit ...)
2010-09-04 12:30:07 +00:00
Angelo Salese
da8511a089 new WORKING games
-----------------
Shinobi / FZ-2006 (Korean System 16 bootleg) (ISG Selection Master Type 2006)


new clones
----------
2010-09-04 12:23:58 +00:00
stephh
b43c05c970 pipeline (pipeline.c) [stephh] :
- Fixed Dip Switches and Inputs (after verification of the Z80 code)
2010-09-04 08:18:15 +00:00
Aaron Giles
8ac0be666e Change shared memory regions to track their size. Added memory_get_shared()
functions to retrieve a pointer to a shared region and optionally the size.
2010-09-04 02:26:32 +00:00
R. Belmont
92812cc132 Fix compiling on older GCCs (including OS X PowerPC) [Aaron Giles] 2010-09-04 01:15:01 +00:00
Aaron Giles
046250f179 New model for populating devices in a driver_device class. Removed the
recently-introduced find_devices() method.

There are two new template classes optional_device<> and required_device<>.
Use these to declare the device pointers in the class. The only difference 
between the two is that required will fatalerror if the device is not found.

These new classes are "pass-through" so m_oki can be passed anywhere an
okim6295_device would work, and you can use m_oki->x to reference methods
or variables.

Each of these new classes needs to be specified in the initializer,
passing a reference to the driver_device object and the device tag. So,
for example:

class example_state : public driver_device
{
public:
    example_state(running_machine &machine, const driver_device_config_base &config)
		: driver_device(machine, config),
		  m_maincpu(*this, "maincpu"),
		  m_oki(*this, "oki") { }

    required_device<okim6295_device> m_oki;
    optional_device<cpu_device> m_maincpu;
};

Given that, the driver_device will auto-populate each device with a
pointer to the device prior to calling any of the initialization methods.
2010-09-03 20:57:19 +00:00
Angelo Salese
093c2682a2 Fixed z80dma ready state callback when it's configured as active low [Angelo Salese] 2010-09-03 18:38:40 +00:00
Angelo Salese
b27a103bc7 Small log fix, not worth 2010-09-03 14:31:19 +00:00
Aaron Giles
e4d8baf401 Changed driver_device to expose the game_driver's ROMs through the
device interface. This means all ROMs are now exposed via devices,
and thus the process of enumerating ROMs gets simpler.

Changed all instances of temporarily allocating machine_config objects 
to just put them on the stack for simplicity, letting the destructor 
handle the cleanup work automatically.

Changed machine_config constructor to take a game_driver, from which
the machine_config constructor is obtained. This also means the
resulting machine_config holds a reference to the game_driver.

Changed running_machine constructor to no longer take a game_driver,
since the game_driver is now obtainable via the machine_config.
2010-09-03 05:21:46 +00:00
Scott Stone
36b6a9d651 Corrected or clarified a number of duplicated inputs for drivers up through A [Tafoid] 2010-09-02 23:27:03 +00:00
Miodrag Milanovic
4202b43d60 Fixed compile. sorry for this (no whatsnew) 2010-09-02 09:47:54 +00:00
Miodrag Milanovic
e4dbd5dc83 Updated sound devices not cover with previous patches (used only by MESS) (no whatsnew) 2010-09-02 09:40:58 +00:00
Aaron Giles
420e1e0ad5 Added include files for all remaining drivers with multiple source files.
[Atari Ace]

---------- Forwarded message ----------
From: Atari Ace <atari_ace@frontier.com>
Date: Sun, Aug 29, 2010 at 10:35 PM
Subject: [patch] Add missing include files for multi-file drivers
To: submit@mamedev.org
Cc: atariace@hotmail.com


Hi mamdev,

Converting a driver to use driver_data requires that multi-file
drivers have a common include file to host the driver_data class. Thus
this patch, which gets ahead of the curve and adds missing include
files to all multi-file drivers (minus ones covered by my last
driver_data patch).  The first patch is include-related cleanup of the
existing drivers.  The second patch then adds ~100 files to
mame/includes.

~aa
2010-09-02 09:13:01 +00:00
Aaron Giles
a7313263b3 Converted sauro, scotrsht, segald, seicross, senjyo, shangha3,
shaolins, shisen, skyraid, solomon, spcforce, speekatk, splash, 
sprcros2, ssozumo, suna16, suna8 to driver_data. [Atari Ace]


---------- Forwarded message ----------
From: Atari Ace <atari_ace@frontier.com>
Date: Sat, Aug 28, 2010 at 9:39 PM
Subject: [patch] Convert various s drivers to driver_data
To: submit@mamedev.org
Cc: atariace@hotmail.com


Hi mamedev,

Another round of driver_data conversions...

sauro, scotrsht, segald, seicross, senjyo, shangha3, shaolins, shisen,
skyraid, solomon, spcforce, speekatk, splash, sprcros2, ssozumo,
suna16, suna8

~aa
2010-09-02 09:04:26 +00:00
Aaron Giles
a9befd7970 Remove artificial SOUND_ prefix from sound device names.
[Atari Ace]

---------- Forwarded message ----------
From: Atari Ace <atari_ace@frontier.com>
Date: Tue, Aug 31, 2010 at 5:50 AM
Subject: [patch] Despecialize legacy sound devices
To: submit@mamedev.org
Cc: atariace@hotmail.com


Hi mamedev,

While poking around in the MAME source code, I came across the odd
type snes_sound_sound_device, which led me to the fact that legacy
sound devices are named a bit differently than other legacy devices,
probably a kludge intended to be changed later but forgotten.  Anyhow,
this patch fixes it.  The first patch goes part way, changing all but
the tag (which fixes the weird type issue).  It also changes type
names in the scsp and msm5232 cores to avoid a name collision if/when
the second patch is applied.  The second patch then touches a lot of
files, mostly removing the SOUND_ prefix from type asserts, but it
also needed to change the tags for the LASERDISC, S2636 and SPEAKER
sound cores to avoid collisions with other devices with the same name.

~aa
2010-09-02 08:14:41 +00:00
Aaron Giles
066e54b69f Changed driver_data objects to be devices. Replaced the driver_data_t
class with a new driver_device class, which is the base class for all 
driver_data objects now. The new driver devices are added as the
first device in the device list, with a tag of "root"; all other
devices are now owned by the driver device.

Moved core callbacks (machine_start/_reset, sound_start/_reset, 
video_start/_reset/_eof/_update, and palette_init) into device 
configuration parameters on these new devices. The driver_device
base class overrides device_start(), ensures all other devices have
been started, and then calls, in order, the following overridable 
methods:

  find_devices() - new, used to locate devices prior to DRIVER_INIT
  DRIVER_INIT function from the game driver
  palette_init() - by default calls the MDRV_PALETTE_INIT function
  driver_start() - new
  machine_start() - by default calls the MDRV_MACHINE_START function
  sound_start() - by default calls the MDRV_SOUND_START function
  video_start() - by default calls the MDRV_VIDEO_START function

Similarly, the driver_device class overrides device_reset() and then
calls these methods in order:

  driver_reset() - new
  machine_reset() - by default calls the MDRV_MACHINE_RESET function
  sound_reset() - by default calls the MDRV_SOUND_RESET function
  video_reset() - by default calls the MDRV_VIDEO_RESET function

To accommodate these changes, initialization order is slightly
altered from before. The tilemap, video, sound, and debug systems 
are now initialized prior to the devices' start. And the user
callbacks for DRIVER_INIT, PALETTE_INIT, MACHINE_START, SOUND_START, 
and VIDEO_START are all called back-to-back. The net effect should 
be similar, however.

Added methods (optional_device and required_device) to the new 
driver_device class to find devices, intended to be used from the 
find_devices() callback. See harddriv.h and beathead.h for examples 
of usage.

Changed device_t::subtag to only prepend a prefix if the device is
not the 'root' device, in order to keep compatibility with existing
tag searching.

Changed device startup to actively reorder devices when they report
missing dependencies. This ensures that the reset functions get
called in the same order that the start functions did.

Bulk updated drivers as follows:

First removed the old static alloc function from the driver_data_t:
S: [ \t]*static driver_device \*alloc *\( *running_machine *\&machine *\) *\{ *return auto_alloc_clear *\( *\&machine *, *[a-zA-Z0-9_]+_state *\( *machine *\) *\); *\}[\r\n]*
R: 

Then switched from driver_data_t to driver_device:
S: driver_data_t
R: driver_device

Then changed the constructors to pass the correct parameters:
S: ([a-zA-Z0-9_]+)_state *\( *running_machine *\&machine *\)([\r\n\t ]+): *driver_device *\( *machine *\)
R: \1_state\(running_machine \&machine, const driver_device_config_base \&config\)\2: driver_device\(machine, config\)
2010-09-02 07:57:50 +00:00
Fabio Priuli
1d194df33a aristmk4.c:
* Cashcade workaround for topgear [Frasher]
* Improved a few memory handlers [Palindrome]


out of whatsnew: the original patch contained more changes so probably someone might want to contact Palindrome & c. about these.
1. the way ticket output was handled has been rejected (MAME should not print out files like they did)
2. they changed a rom in autmoon and another PROM: since I'm not sure if the roms are available and the commit message did not mention them at all, I cannot judge if the change is fine
3. the way they implemented Robot Test is debatable, but I know nothing about the hardware, so someone should review that part
4. if they want to remap Jackpot inputs, they should choose a key not already in use ('I' is taken as well) and possibly use the common IPT_GAMBLE we have
2010-09-01 10:29:19 +00:00
Fabio Priuli
2436926dfe bfm_dm01 improvements: replaced the video screen hack used for the dotmatrix display with a more accurate, artwork-based version.
The BFM_DM01 clocks data in one byte at a time, and the new dotmatrix render object represents the 8 dots powered by each byte. [AGEMAME]
2010-09-01 10:17:16 +00:00
Fabio Priuli
4c0b712c8e timer.c: timers get rescheduled only if enable state has changed [Christophe Jaillet] 2010-09-01 10:13:45 +00:00
Miodrag Milanovic
dbf7afe106 Made options visible to device validate function when doing "-validate", this is used by MESS (example software list and messram devices) (no whatsnew) 2010-09-01 09:34:55 +00:00
Aaron Giles
f6b83b62c5 Changed the MACHINE_DRIVER_* macros, as follows:
1. Renamed MACHINE_DRIVER_* to MACHINE_CONFIG_* to match the name
    of the object it actually describes. The MDRV_* prefix may
    eventually be bulk updated at some point, but not now.

 2. MACHINE_CONFIG_START() now takes a driver_data_t-derived
    class as a required second parameter. This means that
    MDRV_DRIVER_DATA() is no longer required, and every "root"
    machine config *must* specify a driver data class (or driver_data_t
    itself if the driver has not yet been updated to use driver data).

 3. New MACHINE_CONFIG_DERIVED() macro defines a machine_config
    that is derived from another machine_config. This takes the place
    of the very typical MACHINE_DRIVER_START()/MDRV_IMPORT_FROM()
    combination.

 4. New MACHINE_CONFIG_FRAGMENT() macro defines a partial 
    machine_config that can only be included in another "root"
    machine_config. This is also used for machine_configs that are
    specified as part of a device.

 5. Changed MDRV_IMPORT_FROM() to MDRV_FRAGMENT_ADD() to more
    accurately describe what is happening.

 6. Added asserts to the above three macros to ensure they are
    properly used.

Updated all machine drivers to use the new macros. Search & replace
lists below cover 99% of the changes, with just a few manual fixups.

S: MACHINE_DRIVER_START\( *([a-zA-Z0-9_]+) *\)[\r\n\t ]*MDRV_DRIVER_DATA\( *([a-zA-Z0-9_]+) *\)
R: MACHINE_CONFIG_START\( \1, \2 \)

S: MACHINE_DRIVER_START\( *([a-zA-Z0-9_]+) *\)[\r\n\t ]*/\* driver data \*/[\r\n\t ]*MDRV_DRIVER_DATA\( *([a-zA-Z0-9_]+) *\)
R: MACHINE_CONFIG_START\( \1, \2 \)

S: MACHINE_DRIVER_START\( *([a-zA-Z0-9_]+) *\)[\r\n\t ]*MDRV_IMPORT_FROM\( *([a-zA-Z0-9_]+) *\)
R: MACHINE_CONFIG_DERIVED\( \1, \2 \)

S: MACHINE_DRIVER_START\( *([a-zA-Z0-9_]+) *\)[\r\n\t ]*/\* basic machine hardware \*/[\r\n\t ]*MDRV_IMPORT_FROM\( *([a-zA-Z0-9_]+) *\)
R: MACHINE_CONFIG_DERIVED\( \1, \2 \)\r\n\r\n\t/\* basic machine hardware \*/

For all files outside of mame/drivers....
S: MACHINE_DRIVER_START
R: MACHINE_CONFIG_FRAGMENT in all non-drivers

For all files within mame/drivers....
S: MACHINE_DRIVER_START\( *([a-zA-Z0-9_]+) *\)
R: MACHINE_CONFIG_START\( \1, driver_data_t \)

S: MDRV_IMPORT_FROM
R: MDRV_FRAGMENT_ADD

S: MACHINE_DRIVER_END
R: MACHINE_CONFIG_END

S: MACHINE_DRIVER_NAME
R: MACHINE_CONFIG_NAME

S: MACHINE_DRIVER_EXTERN
R: MACHINE_CONFIG_EXTERN

Final step: run mame -valid and fix the incorrect macros at the lines
where the asserts show up.
2010-09-01 05:03:27 +00:00
Wilbert Pol
ce3c3205cc mc6845.c: Rewritten to allow mid frame changes to the counter registers. This enables drivers to use advanced
split screen and scrolling effects using a regular mc6845. [Wilbert Pol]

Interface change:
The screen tag is no longer mandatory. If a screen tag is provided then the mc6845 device will resize
the screen and visible area based on the parameters set in the 6845 config and registers. If the screen
tag is not provided then the driver is supposed to be in charge of setting the proper screen configuration.

Warning: This breaks the relationship between the timing of a screen device and the signals generated
by the 6845.
2010-08-31 19:47:23 +00:00
Scott Stone
874eb8ae2a Fixed MT#04036: astrowar: [debug] Severe graphic corruption 2010-08-31 13:39:34 +00:00
Fabio Priuli
bc99cda953 Fix for MT04035: All sets in chihiro.c: Assert before OK 2010-08-30 23:14:55 +00:00
Aaron Giles
0e672ba6eb Cleanups and version bump. 2010-08-30 15:20:58 +00:00
Roberto Zandona
5248234004 lethalen: hooked up some k053244 register; [Roberto Zandona']
it's related to:
00171: lethalen: mask rom check they all come up bad.

in konicdev.c there's in READ8_DEVICE_HANDLER( k053244_r ):

addr = (k053244->rombank << 19) | ((k053244->regs[11] & 0x7) << 18) | (k053244->regs[8] << 10) | (k053244->regs[9] << 2) | ((offset & 3) ^ 1 );

for the A10 test and A8 test (GFX2 region of lethalen) we need:
........ | ((offset & 3) ^ 3 );

is there any doc about k053244?
2010-08-29 22:55:27 +00:00
Miodrag Milanovic
9d60dac435 Fix current code linking (no whatsnew) 2010-08-28 19:56:49 +00:00
Roberto Zandona
479d33551d removed obsolete comment 2010-08-28 18:07:55 +00:00
Ryan Holtz
e6af68eaa1 Reverting until I can figure out what's up. 2010-08-28 17:50:23 +00:00
Ryan Holtz
c675ce7df5 Fix for class derivation issues brought about by pain meds. No whatsnew. 2010-08-28 17:14:12 +00:00
Ryan Holtz
821814658f Correcting device names. No whatsnew. 2010-08-28 16:48:51 +00:00
Brian Troha
2778348e29 minor rom name correction for D2K 2010-08-28 16:38:04 +00:00
Roberto Zandona
ddbfba03e9 the right fix for combatscb 2010-08-28 15:34:28 +00:00
Roberto Zandona
5071f538d5 04026: combatscb: Experiences various graphics glitches. [Roberto Zandonà] 2010-08-28 15:26:56 +00:00
Roberto Zandona
93fe5a32e2 combatscb: fixed offset and priorities [Roberto Zandonà] 2010-08-28 14:29:44 +00:00
Ryan Holtz
3c302e1537 Updated the K033906 PCI Bridge device to no longer be legacy. [Harmony]
Updated the K056230 LANC device to no longer be legacy. [Harmony]

Non-whatsnew note: Tested gradius4 and gticlub, seem to still work.
2010-08-28 07:51:12 +00:00