Not for whatsnew: This is not complete or well-tested yet, I'm checking in
early mostly so Kale can play with it while I'm at work today. It should at
least function better than current for most images.
for the common case where these are done outside the context of a read
or write handler (it was annoying to pass in the fake address space
for these cases).
Added DEVCB_DEVICE_MEMBER() macros which allow you to specify a
READ8_MEMBER or WRITE8_MEMBER in a device callback (via dynamically
generated trampolines).
Replaced all remaining calls to okim6295_r/okim6295_w with calls to
the new methods, and removed the static functions.
address map case so that updated devices can shed their old-style read/write
handlers in favor of member functions.
Bulk converted all okim6295_r/okim6295_w references in the address maps to
call to the modern member functions.
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]
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.
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.
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?
----------
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 ...)
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.
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.