mirror of
https://github.com/holub/mame
synced 2025-05-28 16:43:04 +03:00
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.
This commit is contained in:
parent
8969b0b7ee
commit
5b6c078aeb
2
.gitattributes
vendored
2
.gitattributes
vendored
@ -759,6 +759,8 @@ src/emu/machine/microtch.c svneol=native#text/plain
|
||||
src/emu/machine/microtch.h svneol=native#text/plain
|
||||
src/emu/machine/msm6242.c svneol=native#text/plain
|
||||
src/emu/machine/msm6242.h svneol=native#text/plain
|
||||
src/emu/machine/nvram.c svneol=native#text/plain
|
||||
src/emu/machine/nvram.h svneol=native#text/plain
|
||||
src/emu/machine/pc16552d.c svneol=native#text/plain
|
||||
src/emu/machine/pc16552d.h svneol=native#text/plain
|
||||
src/emu/machine/pci.c svneol=native#text/plain
|
||||
|
@ -175,6 +175,7 @@ EMUMACHINEOBJS = \
|
||||
$(EMUMACHINE)/mc146818.o \
|
||||
$(EMUMACHINE)/microtch.o \
|
||||
$(EMUMACHINE)/msm6242.o \
|
||||
$(EMUMACHINE)/nvram.o \
|
||||
$(EMUMACHINE)/pc16552d.o \
|
||||
$(EMUMACHINE)/pci.o \
|
||||
$(EMUMACHINE)/pic8259.o \
|
||||
|
@ -1177,7 +1177,7 @@ void driver_device::device_start()
|
||||
throw device_missing_dependencies();
|
||||
|
||||
// find all the registered devices
|
||||
for (auto_device_base *autodev = m_auto_device_list; autodev != NULL; autodev = autodev->m_next)
|
||||
for (auto_finder_base *autodev = m_auto_finder_list; autodev != NULL; autodev = autodev->m_next)
|
||||
autodev->findit(*this);
|
||||
|
||||
// call the game-specific init
|
||||
@ -1212,35 +1212,35 @@ void driver_device::device_reset()
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// auto_device_base - constructor
|
||||
// auto_finder_base - constructor
|
||||
//-------------------------------------------------
|
||||
|
||||
void driver_device::register_auto_device(auto_device_base &autodev)
|
||||
void driver_device::register_auto_finder(auto_finder_base &autodev)
|
||||
{
|
||||
// add to this list
|
||||
autodev.m_next = m_auto_device_list;
|
||||
m_auto_device_list = &autodev;
|
||||
autodev.m_next = m_auto_finder_list;
|
||||
m_auto_finder_list = &autodev;
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// auto_device_base - constructor
|
||||
// auto_finder_base - constructor
|
||||
//-------------------------------------------------
|
||||
|
||||
driver_device::auto_device_base::auto_device_base(driver_device &base, const char *tag)
|
||||
driver_device::auto_finder_base::auto_finder_base(driver_device &base, const char *tag)
|
||||
: m_next(NULL),
|
||||
m_tag(tag)
|
||||
{
|
||||
// register ourselves with our device class
|
||||
base.register_auto_device(*this);
|
||||
base.register_auto_finder(*this);
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// ~auto_device_base - destructor
|
||||
// ~auto_finder_base - destructor
|
||||
//-------------------------------------------------
|
||||
|
||||
driver_device::auto_device_base::~auto_device_base()
|
||||
driver_device::auto_finder_base::~auto_finder_base()
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -278,8 +278,6 @@ private:
|
||||
// holds generic pointers that are commonly used
|
||||
struct generic_pointers
|
||||
{
|
||||
generic_ptr nvram; // generic NVRAM
|
||||
UINT32 nvram_size;
|
||||
generic_ptr videoram; // videoram
|
||||
UINT32 videoram_size;
|
||||
generic_ptr spriteram; // spriteram
|
||||
@ -632,70 +630,107 @@ protected:
|
||||
virtual void device_start();
|
||||
virtual void device_reset();
|
||||
|
||||
// helper class to request auto-device discovery in the constructor of a derived class
|
||||
class auto_device_base
|
||||
// helper class to request auto-object discovery in the constructor of a derived class
|
||||
class auto_finder_base
|
||||
{
|
||||
public:
|
||||
// construction/destruction
|
||||
auto_device_base(driver_device &base, const char *tag);
|
||||
virtual ~auto_device_base();
|
||||
auto_finder_base(driver_device &base, const char *tag);
|
||||
virtual ~auto_finder_base();
|
||||
|
||||
// getters
|
||||
virtual void findit(driver_device &base) = 0;
|
||||
|
||||
// internal state
|
||||
auto_device_base *m_next;
|
||||
auto_finder_base *m_next;
|
||||
const char *m_tag;
|
||||
};
|
||||
|
||||
// optional device finder
|
||||
template<class _DeviceClass>
|
||||
class optional_device : public auto_device_base
|
||||
// templated version bound to a specific type
|
||||
template<typename _TargetType, bool _Required>
|
||||
class auto_finder_type : public auto_finder_base
|
||||
{
|
||||
public:
|
||||
// construction/destruction
|
||||
optional_device(driver_device &base, const char *tag)
|
||||
: auto_device_base(base, tag),
|
||||
m_device(NULL) { }
|
||||
auto_finder_type(driver_device &base, const char *tag)
|
||||
: auto_finder_base(base, tag),
|
||||
m_target(NULL) { }
|
||||
|
||||
// operators to make use transparent
|
||||
operator _DeviceClass *() { return m_device; }
|
||||
operator _DeviceClass *() const { return m_device; }
|
||||
_DeviceClass *operator->() { return m_device; }
|
||||
operator _TargetType() { return m_target; }
|
||||
operator _TargetType() const { return m_target; }
|
||||
_TargetType operator->() { return m_target; }
|
||||
|
||||
// finder
|
||||
virtual void findit(driver_device &base)
|
||||
// setter for setting the object
|
||||
void set_target(_TargetType target)
|
||||
{
|
||||
m_device = base.m_machine.device<_DeviceClass>(m_tag);
|
||||
m_target = target;
|
||||
if (target == 0 && _Required)
|
||||
throw emu_fatalerror("Unable to find required object '%s'", this->m_tag);
|
||||
}
|
||||
|
||||
|
||||
// internal state
|
||||
_DeviceClass *m_device;
|
||||
_TargetType m_target;
|
||||
};
|
||||
|
||||
// optional device finder
|
||||
template<class _DeviceClass>
|
||||
class optional_device : public auto_finder_type<_DeviceClass *, false>
|
||||
{
|
||||
public:
|
||||
optional_device(driver_device &base, const char *tag) : auto_finder_type<_DeviceClass *, false>(base, tag) { }
|
||||
virtual void findit(driver_device &base) { set_target(base.m_machine.device<_DeviceClass>(this->m_tag)); }
|
||||
};
|
||||
|
||||
// required devices are similar but throw an error if they are not found
|
||||
template<class _DeviceClass>
|
||||
class required_device : public optional_device<_DeviceClass>
|
||||
class required_device : public auto_finder_type<_DeviceClass *, true>
|
||||
{
|
||||
public:
|
||||
// construction/destruction
|
||||
required_device(driver_device &base, const char *tag)
|
||||
: optional_device<_DeviceClass>(base, tag) { }
|
||||
|
||||
// finder
|
||||
virtual void findit(driver_device &base)
|
||||
{
|
||||
this->m_device = base.m_machine.device<_DeviceClass>(this->m_tag);
|
||||
if (this->m_device == NULL) throw emu_fatalerror("Unabled to find required device '%s'", this->m_tag);
|
||||
}
|
||||
required_device(driver_device &base, const char *tag) : auto_finder_type<_DeviceClass *, true>(base, tag) { }
|
||||
virtual void findit(driver_device &base) { set_target(base.m_machine.device<_DeviceClass>(this->m_tag)); }
|
||||
};
|
||||
|
||||
// optional shared pointer finder
|
||||
template<typename _PointerType>
|
||||
class optional_shared_ptr : public auto_finder_type<_PointerType *, false>
|
||||
{
|
||||
public:
|
||||
optional_shared_ptr(driver_device &base, const char *tag) : auto_finder_type<_PointerType *, false>(base, tag) { }
|
||||
virtual void findit(driver_device &base) { set_target(reinterpret_cast<_PointerType *>(memory_get_shared(base.m_machine, this->m_tag))); }
|
||||
};
|
||||
|
||||
// required shared pointer finder
|
||||
template<typename _PointerType>
|
||||
class required_shared_ptr : public auto_finder_type<_PointerType *, true>
|
||||
{
|
||||
public:
|
||||
required_shared_ptr(driver_device &base, const char *tag) : auto_finder_type<_PointerType *, true>(base, tag) { }
|
||||
virtual void findit(driver_device &base) { set_target(reinterpret_cast<_PointerType *>(memory_get_shared(base.m_machine, this->m_tag))); }
|
||||
};
|
||||
|
||||
// optional shared pointer size finder
|
||||
class optional_shared_size : public auto_finder_type<size_t, false>
|
||||
{
|
||||
public:
|
||||
optional_shared_size(driver_device &base, const char *tag) : auto_finder_type<size_t, false>(base, tag) { }
|
||||
virtual void findit(driver_device &base) { size_t size; memory_get_shared(base.m_machine, this->m_tag, size); set_target(size); }
|
||||
};
|
||||
|
||||
// required shared pointer size finder
|
||||
class required_shared_size : public auto_finder_type<size_t, true>
|
||||
{
|
||||
public:
|
||||
required_shared_size(driver_device &base, const char *tag) : auto_finder_type<size_t, true>(base, tag) { }
|
||||
virtual void findit(driver_device &base) { size_t size; memory_get_shared(base.m_machine, this->m_tag, size); set_target(size); }
|
||||
};
|
||||
|
||||
// internal helpers
|
||||
void register_auto_device(auto_device_base &autodev);
|
||||
void register_auto_finder(auto_finder_base &autodev);
|
||||
|
||||
// internal state
|
||||
const driver_device_config_base &m_config;
|
||||
auto_device_base *m_auto_device_list;
|
||||
auto_finder_base *m_auto_finder_list;
|
||||
};
|
||||
|
||||
|
||||
|
@ -104,10 +104,6 @@ void generic_machine_init(running_machine *machine)
|
||||
state_save_register_item_array(machine, "coin", NULL, 0, state->coinlockedout);
|
||||
state_save_register_item_array(machine, "coin", NULL, 0, state->lastcoin);
|
||||
|
||||
/* reset NVRAM size and pointers */
|
||||
machine->generic.nvram.v = NULL;
|
||||
machine->generic.nvram_size = 0;
|
||||
|
||||
/* reset memory card info */
|
||||
state->memcard_inserted = -1;
|
||||
|
||||
@ -401,68 +397,6 @@ void nvram_save(running_machine *machine)
|
||||
}
|
||||
|
||||
|
||||
/*-------------------------------------------------
|
||||
NVRAM_HANDLER( generic_0fill ) - generic NVRAM
|
||||
with a 0 fill
|
||||
-------------------------------------------------*/
|
||||
|
||||
NVRAM_HANDLER( generic_0fill )
|
||||
{
|
||||
const region_info *region = machine->region("nvram");
|
||||
if (read_or_write)
|
||||
mame_fwrite(file, machine->generic.nvram.v, machine->generic.nvram_size);
|
||||
else if (file != NULL)
|
||||
mame_fread(file, machine->generic.nvram.v, machine->generic.nvram_size);
|
||||
else if (region != NULL && region->bytes() == machine->generic.nvram_size)
|
||||
memcpy(machine->generic.nvram.v, region->base(), machine->generic.nvram_size);
|
||||
else
|
||||
memset(machine->generic.nvram.v, 0, machine->generic.nvram_size);
|
||||
}
|
||||
|
||||
|
||||
/*-------------------------------------------------
|
||||
NVRAM_HANDLER( generic_1fill ) - generic NVRAM
|
||||
with a 1 fill
|
||||
-------------------------------------------------*/
|
||||
|
||||
NVRAM_HANDLER( generic_1fill )
|
||||
{
|
||||
const region_info *region = machine->region("nvram");
|
||||
if (read_or_write)
|
||||
mame_fwrite(file, machine->generic.nvram.v, machine->generic.nvram_size);
|
||||
else if (file != NULL)
|
||||
mame_fread(file, machine->generic.nvram.v, machine->generic.nvram_size);
|
||||
else if (region != NULL && region->bytes() == machine->generic.nvram_size)
|
||||
memcpy(machine->generic.nvram.v, region->base(), machine->generic.nvram_size);
|
||||
else
|
||||
memset(machine->generic.nvram.v, 0xff, machine->generic.nvram_size);
|
||||
}
|
||||
|
||||
|
||||
/*-------------------------------------------------
|
||||
NVRAM_HANDLER( generic_randfill ) - generic NVRAM
|
||||
with a random fill
|
||||
-------------------------------------------------*/
|
||||
|
||||
NVRAM_HANDLER( generic_randfill )
|
||||
{
|
||||
const region_info *region = machine->region("nvram");
|
||||
if (read_or_write)
|
||||
mame_fwrite(file, machine->generic.nvram.v, machine->generic.nvram_size);
|
||||
else if (file != NULL)
|
||||
mame_fread(file, machine->generic.nvram.v, machine->generic.nvram_size);
|
||||
else if (region != NULL && region->bytes() == machine->generic.nvram_size)
|
||||
memcpy(machine->generic.nvram.v, region->base(), machine->generic.nvram_size);
|
||||
else
|
||||
{
|
||||
UINT8 *nvram = (UINT8 *)machine->generic.nvram.v;
|
||||
int i;
|
||||
for (i = 0; i < machine->generic.nvram_size; i++)
|
||||
nvram[i] = mame_rand(machine);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/***************************************************************************
|
||||
MEMORY CARD MANAGEMENT
|
||||
|
@ -82,15 +82,6 @@ void nvram_load(running_machine *machine);
|
||||
/* save NVRAM to a file */
|
||||
void nvram_save(running_machine *machine);
|
||||
|
||||
/* generic NVRAM handler that defaults to a 0 fill */
|
||||
NVRAM_HANDLER( generic_0fill );
|
||||
|
||||
/* generic NVRAM handler that defaults to a 1 fill */
|
||||
NVRAM_HANDLER( generic_1fill );
|
||||
|
||||
/* generic NVRAM handler that defaults to a random fill */
|
||||
NVRAM_HANDLER( generic_randfill );
|
||||
|
||||
|
||||
|
||||
/* ----- memory card management ----- */
|
||||
|
213
src/emu/machine/nvram.c
Normal file
213
src/emu/machine/nvram.c
Normal file
@ -0,0 +1,213 @@
|
||||
/***************************************************************************
|
||||
|
||||
nvram.c
|
||||
|
||||
Generic non-volatile RAM.
|
||||
|
||||
****************************************************************************
|
||||
|
||||
Copyright Aaron Giles
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are
|
||||
met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in
|
||||
the documentation and/or other materials provided with the
|
||||
distribution.
|
||||
* Neither the name 'MAME' nor the names of its contributors may be
|
||||
used to endorse or promote products derived from this software
|
||||
without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY AARON GILES ''AS IS'' AND ANY EXPRESS OR
|
||||
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL AARON GILES BE LIABLE FOR ANY DIRECT,
|
||||
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
|
||||
IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
#include "emu.h"
|
||||
#include "machine/nvram.h"
|
||||
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// DEVICE CONFIGURATION
|
||||
//**************************************************************************
|
||||
|
||||
//-------------------------------------------------
|
||||
// nvram_device_config - constructor
|
||||
//-------------------------------------------------
|
||||
|
||||
nvram_device_config::nvram_device_config(const machine_config &mconfig, const char *tag, const device_config *owner, UINT32 clock)
|
||||
: device_config(mconfig, static_alloc_device_config, "NVRAM", tag, owner, clock),
|
||||
device_config_nvram_interface(mconfig, *this),
|
||||
m_default_value(DEFAULT_ALL_1)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// static_alloc_device_config - allocate a new
|
||||
// configuration object
|
||||
//-------------------------------------------------
|
||||
|
||||
device_config *nvram_device_config::static_alloc_device_config(const machine_config &mconfig, const char *tag, const device_config *owner, UINT32 clock)
|
||||
{
|
||||
return global_alloc(nvram_device_config(mconfig, tag, owner, clock));
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// alloc_device - allocate a new device object
|
||||
//-------------------------------------------------
|
||||
|
||||
device_t *nvram_device_config::alloc_device(running_machine &machine) const
|
||||
{
|
||||
return auto_alloc(&machine, nvram_device(machine, *this));
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// static_set_interface - configuration helper
|
||||
// to set the interface
|
||||
//-------------------------------------------------
|
||||
|
||||
void nvram_device_config::static_set_default_value(device_config *device, default_value value)
|
||||
{
|
||||
nvram_device_config *nvram = downcast<nvram_device_config *>(device);
|
||||
nvram->m_default_value = value;
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// static_set_custom_handler - configuration
|
||||
// helper to set a custom callback
|
||||
//-------------------------------------------------
|
||||
|
||||
void nvram_device_config::static_set_custom_handler(device_config *device, nvram_init_proto_delegate handler)
|
||||
{
|
||||
nvram_device_config *nvram = downcast<nvram_device_config *>(device);
|
||||
nvram->m_custom_handler = handler;
|
||||
}
|
||||
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// LIVE DEVICE
|
||||
//**************************************************************************
|
||||
|
||||
//-------------------------------------------------
|
||||
// nvram_device - constructor
|
||||
//-------------------------------------------------
|
||||
|
||||
nvram_device::nvram_device(running_machine &_machine, const nvram_device_config &config)
|
||||
: device_t(_machine, config),
|
||||
device_nvram_interface(_machine, config, *this),
|
||||
m_config(config),
|
||||
m_base(NULL),
|
||||
m_length(0)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// device_start - device-specific startup
|
||||
//-------------------------------------------------
|
||||
|
||||
void nvram_device::device_start()
|
||||
{
|
||||
// bind our handler
|
||||
if (!m_config.m_custom_handler.isnull())
|
||||
m_custom_handler = nvram_init_delegate(m_config.m_custom_handler, *m_owner);
|
||||
|
||||
// find our shared pointer with the target RAM
|
||||
m_base = memory_get_shared(m_machine, tag(), m_length);
|
||||
if (m_base == NULL)
|
||||
throw emu_fatalerror("NVRAM device '%s' has no corresponding AM_SHARE region", tag());
|
||||
|
||||
// if we are region-backed for the default, find it now and make sure it's the right size
|
||||
if (m_region != NULL && m_region->bytes() != m_length)
|
||||
throw emu_fatalerror("NVRAM device '%s' has a default region, but it should be 0x%X bytes", tag(), m_length);
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// nvram_default - called to initialize NVRAM to
|
||||
// its default state
|
||||
//-------------------------------------------------
|
||||
|
||||
void nvram_device::nvram_default()
|
||||
{
|
||||
// region always wins
|
||||
if (m_region != NULL)
|
||||
{
|
||||
memcpy(m_base, *m_region, m_length);
|
||||
return;
|
||||
}
|
||||
|
||||
// default values for other cases
|
||||
switch (m_config.m_default_value)
|
||||
{
|
||||
// all-0's
|
||||
case nvram_device_config::DEFAULT_ALL_0:
|
||||
memset(m_base, 0, m_length);
|
||||
break;
|
||||
|
||||
// all 1's
|
||||
default:
|
||||
case nvram_device_config::DEFAULT_ALL_1:
|
||||
memset(m_base, 0xff, m_length);
|
||||
break;
|
||||
|
||||
// random values
|
||||
case nvram_device_config::DEFAULT_RANDOM:
|
||||
{
|
||||
UINT8 *nvram = reinterpret_cast<UINT8 *>(m_base);
|
||||
for (int index = 0; index < m_length; index++)
|
||||
nvram[index] = mame_rand(&m_machine);
|
||||
break;
|
||||
}
|
||||
|
||||
// custom handler
|
||||
case nvram_device_config::DEFAULT_CUSTOM:
|
||||
m_custom_handler(*this, m_base, m_length);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// nvram_read - called to read NVRAM from the
|
||||
// .nv file
|
||||
//-------------------------------------------------
|
||||
|
||||
void nvram_device::nvram_read(mame_file &file)
|
||||
{
|
||||
mame_fread(&file, m_base, m_length);
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// nvram_write - called to write NVRAM to the
|
||||
// .nv file
|
||||
//-------------------------------------------------
|
||||
|
||||
void nvram_device::nvram_write(mame_file &file)
|
||||
{
|
||||
mame_fwrite(&file, m_base, m_length);
|
||||
}
|
||||
|
||||
|
||||
const device_type NVRAM = nvram_device_config::static_alloc_device_config;
|
168
src/emu/machine/nvram.h
Normal file
168
src/emu/machine/nvram.h
Normal file
@ -0,0 +1,168 @@
|
||||
/***************************************************************************
|
||||
|
||||
nvram.h
|
||||
|
||||
Generic non-volatile RAM.
|
||||
|
||||
****************************************************************************
|
||||
|
||||
Copyright Aaron Giles
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are
|
||||
met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in
|
||||
the documentation and/or other materials provided with the
|
||||
distribution.
|
||||
* Neither the name 'MAME' nor the names of its contributors may be
|
||||
used to endorse or promote products derived from this software
|
||||
without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY AARON GILES ''AS IS'' AND ANY EXPRESS OR
|
||||
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL AARON GILES BE LIABLE FOR ANY DIRECT,
|
||||
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
|
||||
IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef __NVRAM_H__
|
||||
#define __NVRAM_H__
|
||||
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// INTERFACE CONFIGURATION MACROS
|
||||
//**************************************************************************
|
||||
|
||||
#define MDRV_NVRAM_ADD_0FILL(_tag) \
|
||||
MDRV_DEVICE_ADD(_tag, NVRAM, 0) \
|
||||
nvram_device_config::static_set_default_value(device, nvram_device_config::DEFAULT_ALL_0); \
|
||||
|
||||
#define MDRV_NVRAM_ADD_1FILL(_tag) \
|
||||
MDRV_DEVICE_ADD(_tag, NVRAM, 0) \
|
||||
nvram_device_config::static_set_default_value(device, nvram_device_config::DEFAULT_ALL_1); \
|
||||
|
||||
#define MDRV_NVRAM_ADD_RANDOM_FILL(_tag) \
|
||||
MDRV_DEVICE_ADD(_tag, NVRAM, 0) \
|
||||
nvram_device_config::static_set_default_value(device, nvram_device_config::DEFAULT_RANDOM); \
|
||||
|
||||
#define MDRV_NVRAM_ADD_CUSTOM(_tag, _class, _method) \
|
||||
MDRV_DEVICE_ADD(_tag, NVRAM, 0) \
|
||||
nvram_device_config::static_set_custom_handler(device, nvram_init_proto_delegate::_create_member<_class, &_class::_method>(#_class "::" #_method)); \
|
||||
|
||||
|
||||
#define MDRV_NVRAM_REPLACE_0FILL(_tag) \
|
||||
MDRV_DEVICE_REPLACE(_tag, NVRAM, 0) \
|
||||
nvram_device_config::static_set_default_value(device, nvram_device_config::DEFAULT_ALL_0); \
|
||||
|
||||
#define MDRV_NVRAM_REPLACE_1FILL(_tag) \
|
||||
MDRV_DEVICE_REPLACE(_tag, NVRAM, 0) \
|
||||
nvram_device_config::static_set_default_value(device, nvram_device_config::DEFAULT_ALL_1); \
|
||||
|
||||
#define MDRV_NVRAM_REPLACE_RANDOM_FILL(_tag) \
|
||||
MDRV_DEVICE_REPLACE(_tag, NVRAM, 0) \
|
||||
nvram_device_config::static_set_default_value(device, nvram_device_config::DEFAULT_RANDOM); \
|
||||
|
||||
#define MDRV_NVRAM_REPLACE_CUSTOM(_tag, _class, _method) \
|
||||
MDRV_DEVICE_REPLACE(_tag, NVRAM, 0) \
|
||||
nvram_device_config::static_set_custom_handler(device, nvram_init_proto_delegate::_create_member<_class, &_class::_method>(#_class "::" #_method)); \
|
||||
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// TYPE DEFINITIONS
|
||||
//**************************************************************************
|
||||
|
||||
class nvram_device;
|
||||
|
||||
|
||||
// custom initialization for default state
|
||||
typedef proto_delegate_3param<void, nvram_device &, void *, size_t> nvram_init_proto_delegate;
|
||||
typedef delegate_3param<void, nvram_device &, void *, size_t> nvram_init_delegate;
|
||||
|
||||
|
||||
// ======================> nvram_device_config
|
||||
|
||||
class nvram_device_config : public device_config,
|
||||
public device_config_nvram_interface
|
||||
{
|
||||
friend class nvram_device;
|
||||
|
||||
// construction/destruction
|
||||
nvram_device_config(const machine_config &mconfig, const char *tag, const device_config *owner, UINT32 clock);
|
||||
|
||||
public:
|
||||
// values
|
||||
enum default_value
|
||||
{
|
||||
DEFAULT_ALL_0,
|
||||
DEFAULT_ALL_1,
|
||||
DEFAULT_RANDOM,
|
||||
DEFAULT_CUSTOM
|
||||
};
|
||||
|
||||
// allocators
|
||||
static device_config *static_alloc_device_config(const machine_config &mconfig, const char *tag, const device_config *owner, UINT32 clock);
|
||||
virtual device_t *alloc_device(running_machine &machine) const;
|
||||
|
||||
// inline configuration helpers
|
||||
static void static_set_default_value(device_config *device, default_value value);
|
||||
static void static_set_custom_handler(device_config *device, nvram_init_proto_delegate callback);
|
||||
|
||||
protected:
|
||||
// internal state
|
||||
default_value m_default_value;
|
||||
nvram_init_proto_delegate m_custom_handler;
|
||||
};
|
||||
|
||||
|
||||
// ======================> nvram_device
|
||||
|
||||
class nvram_device : public device_t,
|
||||
public device_nvram_interface
|
||||
{
|
||||
friend class nvram_device_config;
|
||||
|
||||
// construction/destruction
|
||||
nvram_device(running_machine &_machine, const nvram_device_config &config);
|
||||
|
||||
public:
|
||||
// controls
|
||||
void set_base(void *base, size_t length) { m_base = base; m_length = length; }
|
||||
|
||||
protected:
|
||||
// device-level overrides
|
||||
virtual void device_start();
|
||||
|
||||
// device_nvram_interface overrides
|
||||
virtual void nvram_default();
|
||||
virtual void nvram_read(mame_file &file);
|
||||
virtual void nvram_write(mame_file &file);
|
||||
|
||||
// internal state
|
||||
const nvram_device_config & m_config;
|
||||
void * m_base;
|
||||
size_t m_length;
|
||||
nvram_init_delegate m_custom_handler;
|
||||
};
|
||||
|
||||
|
||||
// device type definition
|
||||
extern const device_type NVRAM;
|
||||
|
||||
|
||||
#endif
|
@ -3002,6 +3002,14 @@ bool address_space::needs_backing_store(const address_map_entry *entry)
|
||||
// if we are asked to provide a base pointer, then yes, we do need backing
|
||||
if (entry->m_baseptr != NULL || entry->m_baseptroffs_plus1 != 0 || entry->m_genbaseptroffs_plus1 != 0)
|
||||
return true;
|
||||
|
||||
// if we are sharing, and we don't have a pointer yet, create one
|
||||
if (entry->m_share != NULL)
|
||||
{
|
||||
memory_share *share = m_machine.memory_data->sharemap.find(entry->m_share);
|
||||
if (share != NULL && share->ptr() == NULL)
|
||||
return true;
|
||||
}
|
||||
|
||||
// if we're writing to any sort of bank or RAM, then yes, we do need backing
|
||||
if (entry->m_write.m_type == AMH_BANK || entry->m_write.m_type == AMH_RAM)
|
||||
|
@ -176,6 +176,7 @@
|
||||
#include "cpu/m6502/m6502.h"
|
||||
#include "video/mc6845.h"
|
||||
#include "sound/ay8910.h"
|
||||
#include "machine/nvram.h"
|
||||
#include "includes/funworld.h"
|
||||
|
||||
/**********************
|
||||
@ -189,7 +190,7 @@
|
||||
*************************/
|
||||
|
||||
static ADDRESS_MAP_START( 4roses_map, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
AM_RANGE(0x0000, 0x07ff) AM_RAM // AM_BASE_SIZE_GENERIC(nvram)
|
||||
AM_RANGE(0x0000, 0x07ff) AM_RAM // AM_SHARE("nvram")
|
||||
AM_RANGE(0x6000, 0x6fff) AM_RAM_WRITE(funworld_videoram_w) AM_BASE(&funworld_videoram)
|
||||
AM_RANGE(0x7000, 0x7fff) AM_RAM_WRITE(funworld_colorram_w) AM_BASE(&funworld_colorram)
|
||||
AM_RANGE(0x8000, 0xffff) AM_ROM
|
||||
@ -375,7 +376,7 @@ static MACHINE_CONFIG_START( 4roses, driver_device )
|
||||
MDRV_CPU_PROGRAM_MAP(4roses_map)
|
||||
MDRV_CPU_VBLANK_INT("screen", nmi_line_pulse)
|
||||
|
||||
// MDRV_NVRAM_HANDLER(generic_0fill)
|
||||
// MDRV_NVRAM_ADD_0FILL("nvram")
|
||||
|
||||
/* video hardware */
|
||||
|
||||
|
@ -446,6 +446,7 @@
|
||||
#include "cpu/m6502/m6502.h"
|
||||
#include "video/mc6845.h"
|
||||
#include "machine/6821pia.h"
|
||||
#include "machine/nvram.h"
|
||||
#include "sound/ay8910.h"
|
||||
#include "sound/okim6295.h"
|
||||
|
||||
@ -695,7 +696,7 @@ static WRITE8_HANDLER( snd_a02_w )
|
||||
*************************/
|
||||
|
||||
static ADDRESS_MAP_START( fclown_map, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
AM_RANGE(0x0000, 0x07ff) AM_RAM AM_BASE_SIZE_GENERIC(nvram)
|
||||
AM_RANGE(0x0000, 0x07ff) AM_RAM AM_SHARE("nvram")
|
||||
AM_RANGE(0x0800, 0x0800) AM_DEVWRITE("crtc", mc6845_address_w)
|
||||
AM_RANGE(0x0801, 0x0801) AM_DEVREADWRITE("crtc", mc6845_register_r, mc6845_register_w)
|
||||
AM_RANGE(0x0844, 0x0847) AM_DEVREADWRITE("pia0", pia6821_r, pia6821_w)
|
||||
@ -1037,7 +1038,7 @@ static MACHINE_CONFIG_START( fclown, driver_device )
|
||||
MDRV_CPU_ADD("audiocpu", M6502, MASTER_CLOCK/8) /* guess, seems ok */
|
||||
MDRV_CPU_PROGRAM_MAP(fcaudio_map)
|
||||
|
||||
MDRV_NVRAM_HANDLER(generic_0fill)
|
||||
MDRV_NVRAM_ADD_0FILL("nvram")
|
||||
|
||||
MDRV_PIA6821_ADD("pia0", fclown_pia0_intf)
|
||||
MDRV_PIA6821_ADD("pia1", fclown_pia1_intf)
|
||||
|
@ -10,6 +10,7 @@
|
||||
#include "video/konicdev.h"
|
||||
#include "sound/2151intf.h"
|
||||
#include "sound/upd7759.h"
|
||||
#include "machine/nvram.h"
|
||||
#include "includes/88games.h"
|
||||
|
||||
|
||||
@ -138,7 +139,7 @@ static ADDRESS_MAP_START( main_map, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
AM_RANGE(0x0000, 0x0fff) AM_RAM AM_BASE_MEMBER(_88games_state, banked_rom) /* banked ROM + palette RAM */
|
||||
AM_RANGE(0x1000, 0x1fff) AM_RAM_WRITE(paletteram_xBBBBBGGGGGRRRRR_be_w) AM_BASE(&paletteram_1000) /* banked ROM + palette RAM */
|
||||
AM_RANGE(0x2000, 0x2fff) AM_RAM
|
||||
AM_RANGE(0x3000, 0x37ff) AM_RAM AM_BASE_SIZE_GENERIC(nvram)
|
||||
AM_RANGE(0x3000, 0x37ff) AM_RAM AM_SHARE("nvram")
|
||||
AM_RANGE(0x3800, 0x3fff) AM_READWRITE(bankedram_r, bankedram_w) AM_BASE_MEMBER(_88games_state, ram)
|
||||
AM_RANGE(0x5f84, 0x5f84) AM_WRITE(k88games_5f84_w)
|
||||
AM_RANGE(0x5f88, 0x5f88) AM_WRITE(watchdog_reset_w)
|
||||
@ -388,7 +389,7 @@ static MACHINE_CONFIG_START( 88games, _88games_state )
|
||||
MDRV_MACHINE_START(88games)
|
||||
MDRV_MACHINE_RESET(88games)
|
||||
|
||||
MDRV_NVRAM_HANDLER(generic_0fill)
|
||||
MDRV_NVRAM_ADD_0FILL("nvram")
|
||||
|
||||
/* video hardware */
|
||||
MDRV_VIDEO_ATTRIBUTES(VIDEO_HAS_SHADOWS)
|
||||
|
@ -10,6 +10,7 @@ Inputs and Dip Switches by Stephh
|
||||
|
||||
#include "emu.h"
|
||||
#include "cpu/z80/z80.h"
|
||||
#include "machine/nvram.h"
|
||||
|
||||
#include "sidewndr.lh"
|
||||
|
||||
@ -258,7 +259,7 @@ static PALETTE_INIT( acefruit )
|
||||
|
||||
static ADDRESS_MAP_START( acefruit_map, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
AM_RANGE(0x0000, 0x1fff) AM_ROM
|
||||
AM_RANGE(0x2000, 0x20ff) AM_RAM AM_BASE_SIZE_GENERIC(nvram)
|
||||
AM_RANGE(0x2000, 0x20ff) AM_RAM AM_SHARE("nvram")
|
||||
AM_RANGE(0x4000, 0x43ff) AM_RAM AM_BASE(&videoram)
|
||||
AM_RANGE(0x4400, 0x47ff) AM_RAM_WRITE(acefruit_colorram_w) AM_BASE(&colorram)
|
||||
AM_RANGE(0x8000, 0x8000) AM_READ_PORT("IN0")
|
||||
@ -565,7 +566,7 @@ static MACHINE_CONFIG_START( acefruit, driver_device )
|
||||
MDRV_SCREEN_VISIBLE_AREA(0, 511, 0, 255)
|
||||
MDRV_PALETTE_LENGTH(16)
|
||||
|
||||
MDRV_NVRAM_HANDLER(generic_0fill)
|
||||
MDRV_NVRAM_ADD_0FILL("nvram")
|
||||
|
||||
MDRV_PALETTE_INIT(acefruit)
|
||||
MDRV_VIDEO_START(acefruit)
|
||||
|
@ -26,6 +26,7 @@
|
||||
#include "includes/amiga.h"
|
||||
#include "machine/laserdsc.h"
|
||||
#include "machine/6526cia.h"
|
||||
#include "machine/nvram.h"
|
||||
|
||||
|
||||
static running_device *laserdisc;
|
||||
@ -263,7 +264,7 @@ static ADDRESS_MAP_START( main_map_r1, ADDRESS_SPACE_PROGRAM, 16 )
|
||||
AM_RANGE(0xfc0000, 0xffffff) AM_ROM AM_REGION("user1", 0) /* System ROM */
|
||||
|
||||
AM_RANGE(0xf00000, 0xf1ffff) AM_ROM AM_REGION("user2", 0) /* Custom ROM */
|
||||
AM_RANGE(0xf54000, 0xf55fff) AM_RAM AM_BASE_SIZE_GENERIC(nvram)
|
||||
AM_RANGE(0xf54000, 0xf55fff) AM_RAM AM_SHARE("nvram")
|
||||
ADDRESS_MAP_END
|
||||
|
||||
|
||||
@ -276,7 +277,7 @@ static ADDRESS_MAP_START( main_map_r2, ADDRESS_SPACE_PROGRAM, 16 )
|
||||
AM_RANGE(0xfc0000, 0xffffff) AM_ROM AM_REGION("user1", 0) /* System ROM */
|
||||
|
||||
AM_RANGE(0xf00000, 0xf3ffff) AM_ROM AM_REGION("user2", 0) /* Custom ROM */
|
||||
AM_RANGE(0xf7c000, 0xf7dfff) AM_RAM AM_BASE_SIZE_GENERIC(nvram)
|
||||
AM_RANGE(0xf7c000, 0xf7dfff) AM_RAM AM_SHARE("nvram")
|
||||
ADDRESS_MAP_END
|
||||
|
||||
|
||||
@ -289,7 +290,7 @@ static ADDRESS_MAP_START( main_map_picmatic, ADDRESS_SPACE_PROGRAM, 16 )
|
||||
AM_RANGE(0xfc0000, 0xffffff) AM_ROM AM_REGION("user1", 0) /* System ROM */
|
||||
|
||||
AM_RANGE(0xf00000, 0xf1ffff) AM_ROM AM_REGION("user2", 0) /* Custom ROM */
|
||||
AM_RANGE(0xf40000, 0xf41fff) AM_RAM AM_BASE_SIZE_GENERIC(nvram)
|
||||
AM_RANGE(0xf40000, 0xf41fff) AM_RAM AM_SHARE("nvram")
|
||||
ADDRESS_MAP_END
|
||||
|
||||
|
||||
@ -411,7 +412,7 @@ static MACHINE_CONFIG_START( alg_r1, driver_device )
|
||||
|
||||
MDRV_MACHINE_START(alg)
|
||||
MDRV_MACHINE_RESET(alg)
|
||||
MDRV_NVRAM_HANDLER(generic_0fill)
|
||||
MDRV_NVRAM_ADD_0FILL("nvram")
|
||||
|
||||
MDRV_LASERDISC_ADD("laserdisc", SONY_LDP1450, "screen", "ldsound")
|
||||
MDRV_LASERDISC_OVERLAY(amiga, 512*2, 262, BITMAP_FORMAT_INDEXED16)
|
||||
|
@ -419,7 +419,7 @@ static PALETTE_INIT( amaticmg )
|
||||
|
||||
static ADDRESS_MAP_START( amaticmg_map, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
AM_RANGE(0x00000, 0x3ffff) AM_ROM
|
||||
// AM_RANGE(0x0000, 0x0000) AM_RAM // AM_BASE_SIZE_GENERIC(nvram)
|
||||
// AM_RANGE(0x0000, 0x0000) AM_RAM // AM_SHARE("nvram")
|
||||
// AM_RANGE(0x0000, 0x0000) AM_DEVWRITE("crtc", mc6845_address_w)
|
||||
// AM_RANGE(0x0000, 0x0000) AM_DEVREADWRITE("crtc", mc6845_register_r, mc6845_register_w)
|
||||
// AM_RANGE(0x0000, 0x0000) AM_RAM_WRITE(amaticmg_videoram_w) AM_BASE(&amaticmg_videoram)
|
||||
@ -617,7 +617,7 @@ static MACHINE_CONFIG_START( amaticmg, driver_device )
|
||||
MDRV_CPU_IO_MAP(amaticmg_portmap)
|
||||
MDRV_CPU_VBLANK_INT("screen", irq0_line_hold)
|
||||
|
||||
// MDRV_NVRAM_HANDLER(generic_0fill)
|
||||
// MDRV_NVRAM_ADD_0FILL("nvram")
|
||||
|
||||
/* 3x 8255 */
|
||||
// MDRV_PPI8255_ADD( "ppi8255_0", ppi8255_intf[0] )
|
||||
|
@ -367,6 +367,7 @@
|
||||
#include "emu.h"
|
||||
#include "cpu/z80/z80.h"
|
||||
#include "sound/ay8910.h"
|
||||
#include "machine/nvram.h"
|
||||
#include "ampoker2.lh"
|
||||
#include "sigmapkr.lh"
|
||||
#include "includes/ampoker2.h"
|
||||
@ -576,7 +577,7 @@ static WRITE8_HANDLER( ampoker2_watchdog_reset_w )
|
||||
|
||||
static ADDRESS_MAP_START( ampoker2_map, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
AM_RANGE(0x0000, 0xbfff) AM_ROM
|
||||
AM_RANGE(0xc000, 0xcfff) AM_RAM AM_BASE_SIZE_GENERIC(nvram)
|
||||
AM_RANGE(0xc000, 0xcfff) AM_RAM AM_SHARE("nvram")
|
||||
AM_RANGE(0xe000, 0xefff) AM_RAM_WRITE(ampoker2_videoram_w) AM_BASE_GENERIC(videoram)
|
||||
ADDRESS_MAP_END
|
||||
|
||||
@ -1056,7 +1057,7 @@ static MACHINE_CONFIG_START( ampoker2, driver_device )
|
||||
MDRV_CPU_PERIODIC_INT(nmi_line_pulse, 1536)
|
||||
MDRV_WATCHDOG_TIME_INIT(MSEC(200)) /* 200 ms, measured */
|
||||
|
||||
MDRV_NVRAM_HANDLER(generic_0fill)
|
||||
MDRV_NVRAM_ADD_0FILL("nvram")
|
||||
|
||||
/* video hardware */
|
||||
MDRV_SCREEN_ADD("screen", RASTER)
|
||||
|
@ -51,6 +51,7 @@
|
||||
#include "cpu/m68000/m68000.h"
|
||||
#include "includes/amiga.h"
|
||||
#include "machine/6526cia.h"
|
||||
#include "machine/nvram.h"
|
||||
|
||||
|
||||
|
||||
@ -191,7 +192,7 @@ static ADDRESS_MAP_START( amiga_map, ADDRESS_SPACE_PROGRAM, 16 )
|
||||
|
||||
AM_RANGE(0x800000, 0x97ffff) AM_ROMBANK("bank2") AM_REGION("user3", 0)
|
||||
AM_RANGE(0x980000, 0x9fbfff) AM_ROM AM_REGION("user2", 0)
|
||||
AM_RANGE(0x9fc000, 0x9ffffd) AM_RAM AM_BASE_SIZE_GENERIC(nvram)
|
||||
AM_RANGE(0x9fc000, 0x9ffffd) AM_RAM AM_SHARE("nvram")
|
||||
AM_RANGE(0x9ffffe, 0x9fffff) AM_WRITE(arcadia_multibios_change_game)
|
||||
AM_RANGE(0xf00000, 0xf7ffff) AM_ROM AM_REGION("user2", 0)
|
||||
ADDRESS_MAP_END
|
||||
@ -293,7 +294,7 @@ static MACHINE_CONFIG_START( arcadia, driver_device )
|
||||
MDRV_CPU_PROGRAM_MAP(amiga_map)
|
||||
|
||||
MDRV_MACHINE_RESET(amiga)
|
||||
MDRV_NVRAM_HANDLER(generic_0fill)
|
||||
MDRV_NVRAM_ADD_0FILL("nvram")
|
||||
|
||||
/* video hardware */
|
||||
MDRV_VIDEO_ATTRIBUTES(VIDEO_UPDATE_BEFORE_VBLANK)
|
||||
|
@ -104,6 +104,7 @@
|
||||
#include "state.h"
|
||||
#include "sound/samples.h"
|
||||
#include "machine/mc146818.h" // DALLAS1287 is functionally compatible.
|
||||
#include "machine/nvram.h"
|
||||
|
||||
|
||||
int rtc_address_strobe = 0;
|
||||
@ -677,7 +678,7 @@ static ADDRESS_MAP_START( aristmk4_map, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
AM_RANGE(0x1c00, 0x1cff) AM_WRITE(mk4_printer_w)
|
||||
AM_RANGE(0x1900, 0x19ff) AM_READ(mk4_printer_r)
|
||||
AM_RANGE(0x2000, 0x3fff) AM_ROM // graphics rom map
|
||||
AM_RANGE(0x4000, 0x4fff) AM_RAMBANK("bank1") AM_BASE_SIZE_GENERIC(nvram)
|
||||
AM_RANGE(0x4000, 0x4fff) AM_RAMBANK("bank1") AM_SHARE("nvram")
|
||||
|
||||
AM_RANGE(0x5000, 0x5000) AM_WRITE(u3_p0)
|
||||
AM_RANGE(0x5002, 0x5002) AM_READ(u3_p2)
|
||||
@ -1203,7 +1204,7 @@ static MACHINE_CONFIG_START( aristmk4, driver_device )
|
||||
MDRV_MACHINE_START(aristmk4)
|
||||
MDRV_NVRAM_HANDLER( mc146818 )
|
||||
MDRV_MACHINE_RESET(aristmk4 )
|
||||
MDRV_NVRAM_HANDLER(generic_0fill)
|
||||
MDRV_NVRAM_ADD_0FILL("nvram")
|
||||
|
||||
/* video hardware */
|
||||
MDRV_SCREEN_ADD("screen", RASTER)
|
||||
|
@ -27,6 +27,7 @@
|
||||
#include "video/tlc34076.h"
|
||||
#include "includes/artmagic.h"
|
||||
#include "sound/okim6295.h"
|
||||
#include "machine/nvram.h"
|
||||
|
||||
|
||||
#define MASTER_CLOCK_40MHz (XTAL_40MHz)
|
||||
@ -428,7 +429,7 @@ static WRITE16_HANDLER( protection_bit_w )
|
||||
static ADDRESS_MAP_START( main_map, ADDRESS_SPACE_PROGRAM, 16 )
|
||||
AM_RANGE(0x000000, 0x07ffff) AM_ROM
|
||||
AM_RANGE(0x220000, 0x23ffff) AM_RAM
|
||||
AM_RANGE(0x240000, 0x240fff) AM_RAM AM_BASE_SIZE_GENERIC(nvram)
|
||||
AM_RANGE(0x240000, 0x240fff) AM_RAM AM_SHARE("nvram")
|
||||
AM_RANGE(0x300000, 0x300001) AM_READ_PORT("300000")
|
||||
AM_RANGE(0x300002, 0x300003) AM_READ_PORT("300002")
|
||||
AM_RANGE(0x300004, 0x300005) AM_READ_PORT("300004")
|
||||
@ -445,7 +446,7 @@ ADDRESS_MAP_END
|
||||
static ADDRESS_MAP_START( stonebal_map, ADDRESS_SPACE_PROGRAM, 16 )
|
||||
AM_RANGE(0x000000, 0x07ffff) AM_ROM
|
||||
AM_RANGE(0x200000, 0x27ffff) AM_RAM
|
||||
AM_RANGE(0x280000, 0x280fff) AM_RAM AM_BASE_SIZE_GENERIC(nvram)
|
||||
AM_RANGE(0x280000, 0x280fff) AM_RAM AM_SHARE("nvram")
|
||||
AM_RANGE(0x300000, 0x300001) AM_READ_PORT("300000")
|
||||
AM_RANGE(0x300002, 0x300003) AM_READ_PORT("300002")
|
||||
AM_RANGE(0x300004, 0x300005) AM_READ_PORT("300004")
|
||||
@ -718,7 +719,7 @@ static MACHINE_CONFIG_START( artmagic, driver_device )
|
||||
MDRV_MACHINE_START(artmagic)
|
||||
MDRV_MACHINE_RESET(artmagic)
|
||||
MDRV_QUANTUM_TIME(HZ(6000))
|
||||
MDRV_NVRAM_HANDLER(generic_1fill)
|
||||
MDRV_NVRAM_ADD_1FILL("nvram")
|
||||
|
||||
/* video hardware */
|
||||
MDRV_TLC34076_ADD("tlc34076", TLC34076_6_BIT)
|
||||
|
@ -115,6 +115,7 @@
|
||||
#include "cpu/z80/z80daisy.h"
|
||||
#include "includes/astrocde.h"
|
||||
#include "machine/z80ctc.h"
|
||||
#include "machine/nvram.h"
|
||||
#include "sound/samples.h"
|
||||
#include "sound/astrocde.h"
|
||||
#include "sound/ay8910.h"
|
||||
@ -620,7 +621,7 @@ static ADDRESS_MAP_START( robby_map, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
AM_RANGE(0x4000, 0x7fff) AM_RAM AM_BASE_GENERIC(videoram)
|
||||
AM_RANGE(0x8000, 0xdfff) AM_ROM
|
||||
AM_RANGE(0xe000, 0xe1ff) AM_READWRITE(protected_ram_r, protected_ram_w) AM_BASE(&protected_ram)
|
||||
AM_RANGE(0xe000, 0xe7ff) AM_RAM AM_BASE_SIZE_GENERIC(nvram)
|
||||
AM_RANGE(0xe000, 0xe7ff) AM_RAM AM_SHARE("nvram")
|
||||
AM_RANGE(0xe800, 0xffff) AM_RAM
|
||||
ADDRESS_MAP_END
|
||||
|
||||
@ -632,7 +633,7 @@ static ADDRESS_MAP_START( profpac_map, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
AM_RANGE(0x4000, 0xbfff) AM_ROMBANK("bank1")
|
||||
AM_RANGE(0xc000, 0xdfff) AM_ROM
|
||||
AM_RANGE(0xe000, 0xe1ff) AM_READWRITE(protected_ram_r, protected_ram_w) AM_BASE(&protected_ram)
|
||||
AM_RANGE(0xe000, 0xe7ff) AM_RAM AM_BASE_SIZE_GENERIC(nvram)
|
||||
AM_RANGE(0xe000, 0xe7ff) AM_RAM AM_SHARE("nvram")
|
||||
AM_RANGE(0xe800, 0xffff) AM_RAM
|
||||
ADDRESS_MAP_END
|
||||
|
||||
@ -643,7 +644,7 @@ static ADDRESS_MAP_START( demndrgn_map, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
AM_RANGE(0x4000, 0x7fff) AM_READWRITE(profpac_videoram_r, profpac_videoram_w)
|
||||
AM_RANGE(0x4000, 0xbfff) AM_ROMBANK("bank1")
|
||||
AM_RANGE(0xc000, 0xdfff) AM_ROM
|
||||
AM_RANGE(0xe000, 0xe7ff) AM_RAM AM_BASE_SIZE_GENERIC(nvram)
|
||||
AM_RANGE(0xe000, 0xe7ff) AM_RAM AM_SHARE("nvram")
|
||||
AM_RANGE(0xe800, 0xffff) AM_RAM
|
||||
ADDRESS_MAP_END
|
||||
|
||||
@ -1295,7 +1296,7 @@ MACHINE_CONFIG_END
|
||||
static MACHINE_CONFIG_DERIVED( astrocade_16color_base, astrocade_base )
|
||||
|
||||
/* basic machine hardware */
|
||||
MDRV_NVRAM_HANDLER(generic_0fill)
|
||||
MDRV_NVRAM_ADD_0FILL("nvram")
|
||||
|
||||
/* video hardware */
|
||||
MDRV_PALETTE_LENGTH(4096)
|
||||
@ -1438,7 +1439,7 @@ static MACHINE_CONFIG_DERIVED( robby, astrocade_base )
|
||||
MDRV_CPU_PROGRAM_MAP(robby_map)
|
||||
MDRV_CPU_IO_MAP(port_map_stereo_pattern)
|
||||
|
||||
MDRV_NVRAM_HANDLER(generic_0fill)
|
||||
MDRV_NVRAM_ADD_0FILL("nvram")
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
|
||||
|
@ -33,6 +33,7 @@ To do:
|
||||
#include "cpu/m68000/m68000.h"
|
||||
#include "machine/eeprom.h"
|
||||
#include "machine/ticket.h"
|
||||
#include "machine/nvram.h"
|
||||
#include "sound/okim6295.h"
|
||||
|
||||
class astrocorp_state : public driver_device
|
||||
@ -290,7 +291,7 @@ static ADDRESS_MAP_START( showhand_map, ADDRESS_SPACE_PROGRAM, 16 )
|
||||
AM_RANGE( 0x05a000, 0x05a001 ) AM_WRITE(showhand_outputs_w)
|
||||
AM_RANGE( 0x05e000, 0x05e001 ) AM_READ_PORT("EEPROMIN")
|
||||
AM_RANGE( 0x060000, 0x0601ff ) AM_RAM_WRITE(astrocorp_palette_w) AM_BASE_MEMBER(astrocorp_state, paletteram)
|
||||
AM_RANGE( 0x070000, 0x073fff ) AM_RAM AM_BASE_SIZE_GENERIC(nvram) // battery
|
||||
AM_RANGE( 0x070000, 0x073fff ) AM_RAM AM_SHARE("nvram") // battery
|
||||
AM_RANGE( 0x080000, 0x080001 ) AM_DEVWRITE("oki", astrocorp_sound_bank_w)
|
||||
AM_RANGE( 0x0a0000, 0x0a0001 ) AM_WRITE(astrocorp_screen_enable_w)
|
||||
AM_RANGE( 0x0d0000, 0x0d0001 ) AM_READ(astrocorp_unk_r) AM_DEVWRITE8("oki", okim6295_w, 0xff00)
|
||||
@ -306,7 +307,7 @@ static ADDRESS_MAP_START( showhanc_map, ADDRESS_SPACE_PROGRAM, 16 )
|
||||
AM_RANGE( 0x088000, 0x088001 ) AM_WRITE(astrocorp_eeprom_w)
|
||||
AM_RANGE( 0x08a000, 0x08a001 ) AM_WRITE(showhand_outputs_w)
|
||||
AM_RANGE( 0x08e000, 0x08e001 ) AM_READ_PORT("EEPROMIN")
|
||||
AM_RANGE( 0x090000, 0x093fff ) AM_RAM AM_BASE_SIZE_GENERIC(nvram) // battery
|
||||
AM_RANGE( 0x090000, 0x093fff ) AM_RAM AM_SHARE("nvram") // battery
|
||||
AM_RANGE( 0x0a0000, 0x0a0001 ) AM_WRITE(astrocorp_screen_enable_w)
|
||||
AM_RANGE( 0x0e0000, 0x0e0001 ) AM_READ(astrocorp_unk_r) AM_DEVWRITE8("oki", okim6295_w, 0xff00)
|
||||
ADDRESS_MAP_END
|
||||
@ -321,14 +322,14 @@ static ADDRESS_MAP_START( skilldrp_map, ADDRESS_SPACE_PROGRAM, 16 )
|
||||
AM_RANGE( 0x20e000, 0x20e001 ) AM_READ_PORT("EEPROMIN")
|
||||
AM_RANGE( 0x380000, 0x3801ff ) AM_RAM_WRITE(astrocorp_palette_w) AM_BASE_MEMBER(astrocorp_state, paletteram)
|
||||
AM_RANGE( 0x400000, 0x400001 ) AM_WRITE(astrocorp_screen_enable_w)
|
||||
AM_RANGE( 0x500000, 0x507fff ) AM_RAM AM_BASE_SIZE_GENERIC(nvram) // battery
|
||||
AM_RANGE( 0x500000, 0x507fff ) AM_RAM AM_SHARE("nvram") // battery
|
||||
AM_RANGE( 0x580000, 0x580001 ) AM_DEVWRITE("oki", skilldrp_sound_bank_w)
|
||||
AM_RANGE( 0x600000, 0x600001 ) AM_DEVREADWRITE8("oki", okim6295_r, okim6295_w, 0x00ff)
|
||||
ADDRESS_MAP_END
|
||||
|
||||
static ADDRESS_MAP_START( speeddrp_map, ADDRESS_SPACE_PROGRAM, 16 )
|
||||
AM_RANGE( 0x000000, 0x01ffff ) AM_ROM
|
||||
AM_RANGE( 0x280000, 0x283fff ) AM_RAM AM_BASE_SIZE_GENERIC(nvram) // battery
|
||||
AM_RANGE( 0x280000, 0x283fff ) AM_RAM AM_SHARE("nvram") // battery
|
||||
AM_RANGE( 0x380000, 0x380fff ) AM_RAM AM_BASE_SIZE_MEMBER(astrocorp_state, spriteram, spriteram_size)
|
||||
AM_RANGE( 0x382000, 0x382001 ) AM_WRITE(astrocorp_draw_sprites_w)
|
||||
AM_RANGE( 0x384000, 0x384001 ) AM_READ_PORT("INPUTS")
|
||||
@ -465,7 +466,7 @@ static MACHINE_CONFIG_START( showhand, astrocorp_state )
|
||||
MDRV_CPU_PROGRAM_MAP(showhand_map)
|
||||
MDRV_CPU_VBLANK_INT("screen", irq4_line_hold)
|
||||
|
||||
MDRV_NVRAM_HANDLER(generic_0fill)
|
||||
MDRV_NVRAM_ADD_0FILL("nvram")
|
||||
MDRV_EEPROM_93C46_ADD("eeprom")
|
||||
MDRV_EEPROM_DATA(showhand_default_eeprom, sizeof(showhand_default_eeprom))
|
||||
|
||||
@ -513,7 +514,7 @@ static MACHINE_CONFIG_START( skilldrp, astrocorp_state )
|
||||
MDRV_CPU_PROGRAM_MAP(skilldrp_map)
|
||||
MDRV_CPU_VBLANK_INT_HACK(skilldrp_irq, 2)
|
||||
|
||||
MDRV_NVRAM_HANDLER(generic_0fill)
|
||||
MDRV_NVRAM_ADD_0FILL("nvram")
|
||||
MDRV_EEPROM_93C46_ADD("eeprom")
|
||||
|
||||
MDRV_TICKET_DISPENSER_ADD("ticket", 200, TICKET_MOTOR_ACTIVE_HIGH, TICKET_STATUS_ACTIVE_LOW )
|
||||
|
@ -53,6 +53,7 @@
|
||||
#include "includes/atetris.h"
|
||||
#include "sound/sn76496.h"
|
||||
#include "sound/pokey.h"
|
||||
#include "machine/nvram.h"
|
||||
|
||||
|
||||
#define MASTER_CLOCK XTAL_14_31818MHz
|
||||
@ -183,8 +184,9 @@ static WRITE8_HANDLER( coincount_w )
|
||||
|
||||
static WRITE8_HANDLER( nvram_w )
|
||||
{
|
||||
atetris_state *state = space->machine->driver_data<atetris_state>();
|
||||
if (nvram_write_enable)
|
||||
space->machine->generic.nvram.u8[offset] = data;
|
||||
state->m_nvram[offset] = data;
|
||||
nvram_write_enable = 0;
|
||||
}
|
||||
|
||||
@ -207,7 +209,7 @@ static ADDRESS_MAP_START( main_map, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
AM_RANGE(0x0000, 0x0fff) AM_RAM
|
||||
AM_RANGE(0x1000, 0x1fff) AM_RAM_WRITE(atetris_videoram_w) AM_BASE_GENERIC(videoram) AM_SIZE_GENERIC(videoram)
|
||||
AM_RANGE(0x2000, 0x20ff) AM_MIRROR(0x0300) AM_RAM_WRITE(paletteram_RRRGGGBB_w) AM_BASE_GENERIC(paletteram)
|
||||
AM_RANGE(0x2400, 0x25ff) AM_MIRROR(0x0200) AM_RAM_WRITE(nvram_w) AM_BASE_SIZE_GENERIC(nvram)
|
||||
AM_RANGE(0x2400, 0x25ff) AM_MIRROR(0x0200) AM_RAM_WRITE(nvram_w) AM_SHARE("nvram")
|
||||
AM_RANGE(0x2800, 0x280f) AM_MIRROR(0x03e0) AM_DEVREADWRITE("pokey1", pokey_r, pokey_w)
|
||||
AM_RANGE(0x2810, 0x281f) AM_MIRROR(0x03e0) AM_DEVREADWRITE("pokey2", pokey_r, pokey_w)
|
||||
AM_RANGE(0x3000, 0x3000) AM_MIRROR(0x03ff) AM_WRITE(watchdog_reset_w)
|
||||
@ -224,7 +226,7 @@ static ADDRESS_MAP_START( atetrisb2_map, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
AM_RANGE(0x0000, 0x0fff) AM_RAM
|
||||
AM_RANGE(0x1000, 0x1fff) AM_RAM_WRITE(atetris_videoram_w) AM_BASE_GENERIC(videoram) AM_SIZE_GENERIC(videoram)
|
||||
AM_RANGE(0x2000, 0x20ff) AM_RAM_WRITE(paletteram_RRRGGGBB_w) AM_BASE_GENERIC(paletteram)
|
||||
AM_RANGE(0x2400, 0x25ff) AM_RAM_WRITE(nvram_w) AM_BASE_SIZE_GENERIC(nvram)
|
||||
AM_RANGE(0x2400, 0x25ff) AM_RAM_WRITE(nvram_w) AM_SHARE("nvram")
|
||||
AM_RANGE(0x2802, 0x2802) AM_DEVWRITE("sn1", sn76496_w)
|
||||
AM_RANGE(0x2804, 0x2804) AM_DEVWRITE("sn2", sn76496_w)
|
||||
AM_RANGE(0x2806, 0x2806) AM_DEVWRITE("sn3", sn76496_w)
|
||||
@ -338,7 +340,7 @@ static const pokey_interface pokey_interface_2 =
|
||||
*
|
||||
*************************************/
|
||||
|
||||
static MACHINE_CONFIG_START( atetris, driver_device )
|
||||
static MACHINE_CONFIG_START( atetris, atetris_state )
|
||||
|
||||
/* basic machine hardware */
|
||||
MDRV_CPU_ADD("maincpu", M6502,MASTER_CLOCK/8)
|
||||
@ -346,7 +348,7 @@ static MACHINE_CONFIG_START( atetris, driver_device )
|
||||
|
||||
MDRV_MACHINE_START(atetris)
|
||||
MDRV_MACHINE_RESET(atetris)
|
||||
MDRV_NVRAM_HANDLER(generic_1fill)
|
||||
MDRV_NVRAM_ADD_1FILL("nvram")
|
||||
|
||||
/* video hardware */
|
||||
MDRV_GFXDECODE(atetris)
|
||||
@ -382,7 +384,7 @@ static MACHINE_CONFIG_START( atetrisb2, driver_device )
|
||||
|
||||
MDRV_MACHINE_START(atetris)
|
||||
MDRV_MACHINE_RESET(atetris)
|
||||
MDRV_NVRAM_HANDLER(generic_1fill)
|
||||
MDRV_NVRAM_ADD_1FILL("nvram")
|
||||
|
||||
/* video hardware */
|
||||
MDRV_GFXDECODE(atetris)
|
||||
|
@ -19,6 +19,7 @@
|
||||
#include "video/vector.h"
|
||||
#include "includes/aztarac.h"
|
||||
#include "sound/ay8910.h"
|
||||
#include "machine/nvram.h"
|
||||
|
||||
|
||||
|
||||
@ -49,7 +50,8 @@ static MACHINE_RESET( aztarac )
|
||||
|
||||
static READ16_HANDLER( nvram_r )
|
||||
{
|
||||
return space->machine->generic.nvram.u16[offset] | 0xfff0;
|
||||
aztarac_state *state = space->machine->driver_data<aztarac_state>();
|
||||
return state->m_nvram[offset] | 0xfff0;
|
||||
}
|
||||
|
||||
|
||||
@ -76,7 +78,7 @@ static READ16_HANDLER( joystick_r )
|
||||
|
||||
static ADDRESS_MAP_START( main_map, ADDRESS_SPACE_PROGRAM, 16 )
|
||||
AM_RANGE(0x000000, 0x00bfff) AM_ROM
|
||||
AM_RANGE(0x022000, 0x0220ff) AM_READ(nvram_r) AM_WRITEONLY AM_BASE_SIZE_GENERIC(nvram)
|
||||
AM_RANGE(0x022000, 0x0220ff) AM_READ(nvram_r) AM_WRITEONLY AM_SHARE("nvram")
|
||||
AM_RANGE(0x027000, 0x027001) AM_READ(joystick_r)
|
||||
AM_RANGE(0x027004, 0x027005) AM_READ_PORT("INPUTS")
|
||||
AM_RANGE(0x027008, 0x027009) AM_READWRITE(aztarac_sound_r, aztarac_sound_w)
|
||||
@ -143,7 +145,7 @@ INPUT_PORTS_END
|
||||
*
|
||||
*************************************/
|
||||
|
||||
static MACHINE_CONFIG_START( aztarac, driver_device )
|
||||
static MACHINE_CONFIG_START( aztarac, aztarac_state )
|
||||
|
||||
/* basic machine hardware */
|
||||
MDRV_CPU_ADD("maincpu", M68000, 8000000)
|
||||
@ -155,7 +157,7 @@ static MACHINE_CONFIG_START( aztarac, driver_device )
|
||||
MDRV_CPU_PERIODIC_INT(aztarac_snd_timed_irq, 100)
|
||||
|
||||
MDRV_MACHINE_RESET(aztarac)
|
||||
MDRV_NVRAM_HANDLER(generic_1fill)
|
||||
MDRV_NVRAM_ADD_1FILL("nvram")
|
||||
|
||||
/* video hardware */
|
||||
MDRV_SCREEN_ADD("screen", VECTOR)
|
||||
|
@ -230,6 +230,7 @@ DIP locations verified for:
|
||||
#include "cpu/m68000/m68000.h"
|
||||
#include "includes/balsente.h"
|
||||
#include "sound/cem3394.h"
|
||||
#include "machine/nvram.h"
|
||||
|
||||
#include "stocker.lh"
|
||||
|
||||
@ -258,7 +259,7 @@ static ADDRESS_MAP_START( cpu1_map, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
AM_RANGE(0x9903, 0x9903) AM_READ_PORT("IN1") AM_WRITENOP
|
||||
AM_RANGE(0x9a00, 0x9a03) AM_READ(balsente_random_num_r)
|
||||
AM_RANGE(0x9a04, 0x9a05) AM_READWRITE(balsente_m6850_r, balsente_m6850_w)
|
||||
AM_RANGE(0x9b00, 0x9cff) AM_RAM AM_BASE_SIZE_GENERIC(nvram) /* system+cart NOVRAM */
|
||||
AM_RANGE(0x9b00, 0x9cff) AM_RAM AM_SHARE("nvram") /* system+cart NOVRAM */
|
||||
AM_RANGE(0xa000, 0xbfff) AM_ROMBANK("bank1")
|
||||
AM_RANGE(0xc000, 0xffff) AM_ROMBANK("bank2")
|
||||
ADDRESS_MAP_END
|
||||
@ -1205,7 +1206,7 @@ static MACHINE_CONFIG_START( balsente, balsente_state )
|
||||
|
||||
MDRV_MACHINE_START(balsente)
|
||||
MDRV_MACHINE_RESET(balsente)
|
||||
MDRV_NVRAM_HANDLER(generic_0fill)
|
||||
MDRV_NVRAM_ADD_0FILL("nvram")
|
||||
|
||||
MDRV_TIMER_ADD("scan_timer", balsente_interrupt_timer)
|
||||
MDRV_TIMER_ADD("8253_0_timer", balsente_clock_counter_0_ff)
|
||||
|
@ -100,6 +100,7 @@
|
||||
|
||||
#include "emu.h"
|
||||
#include "includes/beathead.h"
|
||||
#include "machine/nvram.h"
|
||||
|
||||
|
||||
|
||||
@ -235,7 +236,7 @@ WRITE32_MEMBER( beathead_state::eeprom_data_w )
|
||||
if (m_eeprom_enabled)
|
||||
{
|
||||
mem_mask &= 0x000000ff;
|
||||
COMBINE_DATA(m_machine.generic.nvram.u32 + offset);
|
||||
COMBINE_DATA(m_nvram + offset);
|
||||
m_eeprom_enabled = 0;
|
||||
}
|
||||
}
|
||||
@ -313,7 +314,7 @@ WRITE32_MEMBER( beathead_state::coin_count_w )
|
||||
static ADDRESS_MAP_START( main_map, ADDRESS_SPACE_PROGRAM, 32, beathead_state)
|
||||
AM_RANGE(0x00000000, 0x0001ffff) AM_RAM AM_BASE(m_ram_base)
|
||||
AM_RANGE(0x01800000, 0x01bfffff) AM_ROM AM_REGION("user1", 0) AM_BASE(m_rom_base)
|
||||
AM_RANGE(0x40000000, 0x400007ff) AM_RAM_WRITE(eeprom_data_w) AM_BASE_SIZE_GENERIC(nvram)
|
||||
AM_RANGE(0x40000000, 0x400007ff) AM_RAM_WRITE(eeprom_data_w) AM_SHARE("nvram")
|
||||
AM_RANGE(0x41000000, 0x41000003) AM_READWRITE(sound_data_r, sound_data_w)
|
||||
AM_RANGE(0x41000100, 0x41000103) AM_READ(interrupt_control_r)
|
||||
AM_RANGE(0x41000100, 0x4100011f) AM_WRITE(interrupt_control_w)
|
||||
@ -399,7 +400,7 @@ static MACHINE_CONFIG_START( beathead, beathead_state )
|
||||
MDRV_CPU_ADD("maincpu", ASAP, ATARI_CLOCK_14MHz)
|
||||
MDRV_CPU_PROGRAM_MAP(main_map)
|
||||
|
||||
MDRV_NVRAM_HANDLER(generic_1fill)
|
||||
MDRV_NVRAM_ADD_1FILL("nvram")
|
||||
|
||||
MDRV_TIMER_ADD("scan_timer", scanline_callback)
|
||||
|
||||
|
@ -12,6 +12,7 @@
|
||||
#include "cpu/z80/z80.h"
|
||||
#include "includes/exidy.h"
|
||||
#include "machine/74181.h"
|
||||
#include "machine/nvram.h"
|
||||
#include "sound/s14001a.h"
|
||||
#include "video/resnet.h"
|
||||
|
||||
@ -559,7 +560,7 @@ static SOUND_RESET(berzerk)
|
||||
|
||||
static ADDRESS_MAP_START( berzerk_map, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
AM_RANGE(0x0000, 0x07ff) AM_ROM
|
||||
AM_RANGE(0x0800, 0x0bff) AM_MIRROR(0x0400) AM_RAM AM_BASE_SIZE_GENERIC(nvram)
|
||||
AM_RANGE(0x0800, 0x0bff) AM_MIRROR(0x0400) AM_RAM AM_SHARE("nvram")
|
||||
AM_RANGE(0x1000, 0x3fff) AM_ROM
|
||||
AM_RANGE(0x4000, 0x5fff) AM_RAM AM_BASE(&berzerk_videoram) AM_SIZE(&berzerk_videoram_size) AM_SHARE("share1")
|
||||
AM_RANGE(0x6000, 0x7fff) AM_RAM_WRITE(magicram_w) AM_SHARE("share1")
|
||||
@ -574,7 +575,7 @@ static ADDRESS_MAP_START( frenzy_map, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
AM_RANGE(0x6000, 0x7fff) AM_RAM_WRITE(magicram_w) AM_SHARE("share1")
|
||||
AM_RANGE(0x8000, 0x87ff) AM_MIRROR(0x3800) AM_RAM AM_BASE(&berzerk_colorram)
|
||||
AM_RANGE(0xc000, 0xcfff) AM_ROM
|
||||
AM_RANGE(0xf800, 0xfbff) AM_MIRROR(0x0400) AM_RAM AM_BASE_SIZE_GENERIC(nvram)
|
||||
AM_RANGE(0xf800, 0xfbff) AM_MIRROR(0x0400) AM_RAM AM_SHARE("nvram")
|
||||
ADDRESS_MAP_END
|
||||
|
||||
|
||||
@ -1053,7 +1054,7 @@ static MACHINE_CONFIG_START( berzerk, driver_device )
|
||||
MDRV_MACHINE_START(berzerk)
|
||||
MDRV_MACHINE_RESET(berzerk)
|
||||
|
||||
MDRV_NVRAM_HANDLER(generic_0fill)
|
||||
MDRV_NVRAM_ADD_0FILL("nvram")
|
||||
|
||||
/* video hardware */
|
||||
MDRV_VIDEO_START(berzerk)
|
||||
|
@ -79,6 +79,7 @@
|
||||
#include "cpu/m6809/m6809.h"
|
||||
#include "sound/upd7759.h"
|
||||
#include "sound/ay8910.h"
|
||||
#include "machine/nvram.h"
|
||||
|
||||
/*
|
||||
Defines
|
||||
@ -1432,7 +1433,7 @@ static WRITE8_DEVICE_HANDLER( upd_w )
|
||||
}
|
||||
|
||||
static ADDRESS_MAP_START( m6809_prog_map, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
AM_RANGE(0x0000, 0x1fff) AM_RAM AM_BASE_SIZE_GENERIC(nvram)
|
||||
AM_RANGE(0x0000, 0x1fff) AM_RAM AM_SHARE("nvram")
|
||||
AM_RANGE(0x2000, 0x2000) AM_RAM // W 'B', 6F
|
||||
AM_RANGE(0x2200, 0x2200) AM_RAM // W 'F'
|
||||
AM_RANGE(0x2600, 0x2600) AM_READWRITE(meter_r, meter_w)
|
||||
@ -1739,7 +1740,7 @@ static MACHINE_CONFIG_START( bfcobra, driver_device )
|
||||
MDRV_CPU_PROGRAM_MAP(m6809_prog_map)
|
||||
MDRV_CPU_PERIODIC_INT(timer_irq, 1000)
|
||||
|
||||
MDRV_NVRAM_HANDLER(generic_0fill)
|
||||
MDRV_NVRAM_ADD_0FILL("nvram")
|
||||
|
||||
MDRV_MACHINE_RESET(bfcobra)
|
||||
|
||||
|
@ -91,6 +91,7 @@ Optional (on expansion card) (Viper)
|
||||
#include "machine/meters.h"
|
||||
#include "sound/ay8910.h"
|
||||
#include "sound/upd7759.h"
|
||||
#include "machine/nvram.h"
|
||||
#include "bfm_sc1.lh"
|
||||
#define VFD_RESET 0x20
|
||||
#define VFD_CLOCK1 0x80
|
||||
@ -765,7 +766,7 @@ static MACHINE_RESET( bfm_sc1 )
|
||||
|
||||
static ADDRESS_MAP_START( memmap, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
|
||||
AM_RANGE(0x0000, 0x1FFF) AM_RAM AM_BASE_SIZE_GENERIC(nvram) //8k RAM
|
||||
AM_RANGE(0x0000, 0x1FFF) AM_RAM AM_SHARE("nvram") //8k RAM
|
||||
AM_RANGE(0x2000, 0x21FF) AM_WRITE(reel34_w) // reel 2+3 latch
|
||||
AM_RANGE(0x2200, 0x23FF) AM_WRITE(reel12_w) // reel 1+2 latch
|
||||
AM_RANGE(0x2400, 0x25FF) AM_WRITE(vfd_w) // vfd latch
|
||||
@ -808,7 +809,7 @@ ADDRESS_MAP_END
|
||||
|
||||
static ADDRESS_MAP_START( memmap_adder2, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
|
||||
AM_RANGE(0x0000, 0x1FFF) AM_RAM AM_BASE_SIZE_GENERIC(nvram) //8k RAM
|
||||
AM_RANGE(0x0000, 0x1FFF) AM_RAM AM_SHARE("nvram") //8k RAM
|
||||
AM_RANGE(0x2000, 0x21FF) AM_WRITE(reel34_w) // reel 2+3 latch
|
||||
AM_RANGE(0x2200, 0x23FF) AM_WRITE(reel12_w) // reel 1+2 latch
|
||||
AM_RANGE(0x2400, 0x25FF) AM_WRITE(vfd_w) // vfd latch
|
||||
@ -857,7 +858,7 @@ ADDRESS_MAP_END
|
||||
|
||||
static ADDRESS_MAP_START( sc1_nec_uk, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
|
||||
AM_RANGE(0x0000, 0x1FFF) AM_RAM AM_BASE_SIZE_GENERIC(nvram) //8k RAM
|
||||
AM_RANGE(0x0000, 0x1FFF) AM_RAM AM_SHARE("nvram") //8k RAM
|
||||
AM_RANGE(0x2000, 0x21FF) AM_WRITE(reel34_w) // reel 2+3 latch
|
||||
AM_RANGE(0x2200, 0x23FF) AM_WRITE(reel12_w) // reel 1+2 latch
|
||||
AM_RANGE(0x2400, 0x25FF) AM_WRITE(vfd_w) // vfd latch
|
||||
@ -1250,7 +1251,7 @@ static MACHINE_CONFIG_START( scorpion1, driver_device )
|
||||
MDRV_SOUND_ADD("aysnd",AY8912, MASTER_CLOCK/4)
|
||||
MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
|
||||
|
||||
MDRV_NVRAM_HANDLER(generic_0fill)
|
||||
MDRV_NVRAM_ADD_0FILL("nvram")
|
||||
MDRV_DEFAULT_LAYOUT(layout_awpvid14)
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
|
@ -65,6 +65,7 @@ ___________________________________________________________________________
|
||||
#include "machine/roc10937.h" // vfd
|
||||
#include "machine/steppers.h" // stepper motor
|
||||
#include "sound/ay8910.h"
|
||||
#include "machine/nvram.h"
|
||||
|
||||
#define VFD_RESET 0x20
|
||||
#define VFD_CLOCK1 0x80
|
||||
@ -401,7 +402,7 @@ static MACHINE_START( bfm_sys85 )
|
||||
|
||||
static ADDRESS_MAP_START( memmap, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
|
||||
AM_RANGE(0x0000, 0x1fff) AM_RAM AM_BASE_SIZE_GENERIC(nvram) //8k RAM
|
||||
AM_RANGE(0x0000, 0x1fff) AM_RAM AM_SHARE("nvram") //8k RAM
|
||||
AM_RANGE(0x2000, 0x21FF) AM_WRITE(reel34_w) // reel 3+4 latch
|
||||
AM_RANGE(0x2200, 0x23FF) AM_WRITE(reel12_w) // reel 1+2 latch
|
||||
AM_RANGE(0x2400, 0x25FF) AM_WRITE(vfd_w) // vfd latch
|
||||
@ -446,7 +447,7 @@ static MACHINE_CONFIG_START( bfmsys85, driver_device )
|
||||
MDRV_SOUND_ADD("aysnd",AY8912, MASTER_CLOCK/4) // add AY8912 soundchip
|
||||
MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
|
||||
|
||||
MDRV_NVRAM_HANDLER(generic_0fill) // load/save nv RAM
|
||||
MDRV_NVRAM_ADD_0FILL("nvram") // load/save nv RAM
|
||||
|
||||
MDRV_DEFAULT_LAYOUT(layout_awpvid16)
|
||||
MACHINE_CONFIG_END
|
||||
|
@ -60,6 +60,7 @@
|
||||
#include "cpu/z80/z80.h"
|
||||
#include "sound/ay8910.h"
|
||||
#include "video/v9938.h"
|
||||
#include "machine/nvram.h"
|
||||
#include "deprecat.h"
|
||||
|
||||
#define VDP_MEM 0x40000
|
||||
@ -128,7 +129,7 @@ static READ8_HANDLER( mux_r )
|
||||
|
||||
static ADDRESS_MAP_START( main_map, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
AM_RANGE(0x0000, 0xbfff) AM_ROM
|
||||
AM_RANGE(0xc000, 0xdfff) AM_RAM AM_BASE_SIZE_GENERIC(nvram)
|
||||
AM_RANGE(0xc000, 0xdfff) AM_RAM AM_SHARE("nvram")
|
||||
AM_RANGE(0xf000, 0xffff) AM_RAM
|
||||
ADDRESS_MAP_END
|
||||
|
||||
@ -247,7 +248,7 @@ static MACHINE_CONFIG_START( big10, driver_device )
|
||||
|
||||
MDRV_MACHINE_RESET(big10)
|
||||
|
||||
MDRV_NVRAM_HANDLER(generic_0fill)
|
||||
MDRV_NVRAM_ADD_0FILL("nvram")
|
||||
|
||||
/* video hardware */
|
||||
MDRV_SCREEN_ADD("screen", RASTER)
|
||||
|
@ -615,7 +615,7 @@ static MACHINE_CONFIG_START( bingor, driver_device )
|
||||
|
||||
|
||||
MDRV_GFXDECODE(bingor)
|
||||
//MDRV_NVRAM_HANDLER(generic_0fill)
|
||||
//MDRV_NVRAM_ADD_0FILL("nvram")
|
||||
|
||||
MDRV_SCREEN_ADD("screen", RASTER)
|
||||
MDRV_SCREEN_REFRESH_RATE(60)
|
||||
|
@ -37,6 +37,7 @@ To do:
|
||||
#include "cpu/i86/i86.h"
|
||||
#include "sound/okim6295.h"
|
||||
#include "sound/3812intf.h"
|
||||
#include "machine/nvram.h"
|
||||
|
||||
/***************************************************************************
|
||||
Tilemaps Access
|
||||
@ -368,7 +369,7 @@ static ADDRESS_MAP_START( bishjan_map, ADDRESS_SPACE_PROGRAM, 16 )
|
||||
AM_RANGE( 0x000000, 0x07ffff ) AM_ROM AM_REGION("maincpu", 0)
|
||||
AM_RANGE( 0x080000, 0x0fffff ) AM_ROM AM_REGION("maincpu", 0)
|
||||
|
||||
AM_RANGE( 0x200000, 0x207fff ) AM_RAM AM_BASE_SIZE_GENERIC(nvram) // battery
|
||||
AM_RANGE( 0x200000, 0x207fff ) AM_RAM AM_SHARE("nvram") // battery
|
||||
|
||||
|
||||
// read lo (2) (only half tilemap?)
|
||||
@ -492,7 +493,7 @@ static MACHINE_RESET( saklove )
|
||||
}
|
||||
|
||||
static ADDRESS_MAP_START( saklove_map, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
AM_RANGE(0x00000, 0x07fff) AM_RAM AM_BASE_SIZE_GENERIC(nvram) // battery
|
||||
AM_RANGE(0x00000, 0x07fff) AM_RAM AM_SHARE("nvram") // battery
|
||||
|
||||
// read lo (2) (only half tilemap?)
|
||||
AM_RANGE(0x12000, 0x12fff) AM_READWRITE( bishjan_videoram_2_lo_r, bishjan_videoram_2_lo_w )
|
||||
@ -830,7 +831,7 @@ static MACHINE_CONFIG_START( bishjan, driver_device )
|
||||
MDRV_CPU_PROGRAM_MAP( bishjan_map)
|
||||
MDRV_CPU_VBLANK_INT_HACK(bishjan_interrupt,2)
|
||||
|
||||
MDRV_NVRAM_HANDLER(generic_0fill)
|
||||
MDRV_NVRAM_ADD_0FILL("nvram")
|
||||
|
||||
/* video hardware */
|
||||
MDRV_SCREEN_ADD("screen", RASTER)
|
||||
@ -863,7 +864,7 @@ static MACHINE_CONFIG_START( saklove, driver_device )
|
||||
MDRV_CPU_VBLANK_INT( "screen", saklove_interrupt )
|
||||
|
||||
MDRV_MACHINE_RESET(saklove)
|
||||
MDRV_NVRAM_HANDLER(generic_0fill)
|
||||
MDRV_NVRAM_ADD_0FILL("nvram")
|
||||
|
||||
/* video hardware */
|
||||
MDRV_SCREEN_ADD("screen", RASTER)
|
||||
|
@ -455,7 +455,7 @@ static WRITE8_DEVICE_HANDLER( sound_w )
|
||||
static ADDRESS_MAP_START( megadpkr_map, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
// ADDRESS_MAP_GLOBAL_MASK(0x7fff) // seems that hardware is playing with A14 & A15 CPU lines...
|
||||
|
||||
AM_RANGE(0x0000, 0x07ff) AM_RAM //AM_BASE_SIZE_GENERIC(nvram) /* battery backed RAM */
|
||||
AM_RANGE(0x0000, 0x07ff) AM_RAM //AM_SHARE("nvram") /* battery backed RAM */
|
||||
// AM_RANGE(0x0800, 0x0800) AM_DEVWRITE("crtc", mc6845_address_w)
|
||||
// AM_RANGE(0x0801, 0x0801) AM_DEVREADWRITE("crtc", mc6845_register_r, mc6845_register_w)
|
||||
AM_RANGE(0x0844, 0x0847) AM_DEVREADWRITE("pia0", pia6821_r, pia6821_w)
|
||||
@ -776,7 +776,7 @@ static MACHINE_CONFIG_START( megadpkr, driver_device )
|
||||
// MDRV_CPU_ADD("mcu", M68705, CPU_CLOCK) /* unknown */
|
||||
// MDRV_CPU_PROGRAM_MAP(mcu_map)
|
||||
|
||||
// MDRV_NVRAM_HANDLER(generic_0fill)
|
||||
// MDRV_NVRAM_ADD_0FILL("nvram")
|
||||
|
||||
MDRV_PIA6821_ADD("pia0", megadpkr_pia0_intf)
|
||||
MDRV_PIA6821_ADD("pia1", megadpkr_pia1_intf)
|
||||
|
@ -12,6 +12,7 @@
|
||||
#include "video/tlc34076.h"
|
||||
#include "includes/btoads.h"
|
||||
#include "sound/bsmt2000.h"
|
||||
#include "machine/nvram.h"
|
||||
|
||||
|
||||
#define CPU_CLOCK XTAL_64MHz
|
||||
@ -193,7 +194,7 @@ static ADDRESS_MAP_START( main_map, ADDRESS_SPACE_PROGRAM, 16 )
|
||||
AM_RANGE(0x20000380, 0x200003ff) AM_READWRITE(main_sound_r, main_sound_w)
|
||||
AM_RANGE(0x20000400, 0x2000047f) AM_WRITE(btoads_misc_control_w)
|
||||
AM_RANGE(0x40000000, 0x4000000f) AM_WRITENOP /* watchdog? */
|
||||
AM_RANGE(0x60000000, 0x6003ffff) AM_RAM AM_BASE_SIZE_GENERIC(nvram)
|
||||
AM_RANGE(0x60000000, 0x6003ffff) AM_RAM AM_SHARE("nvram")
|
||||
AM_RANGE(0xa0000000, 0xa03fffff) AM_READWRITE(btoads_vram_fg_display_r, btoads_vram_fg_display_w) AM_BASE(&btoads_vram_fg0)
|
||||
AM_RANGE(0xa4000000, 0xa43fffff) AM_READWRITE(btoads_vram_fg_draw_r, btoads_vram_fg_draw_w) AM_BASE(&btoads_vram_fg1)
|
||||
AM_RANGE(0xa8000000, 0xa87fffff) AM_RAM AM_BASE(&btoads_vram_fg_data)
|
||||
@ -343,7 +344,7 @@ static MACHINE_CONFIG_START( btoads, driver_device )
|
||||
MDRV_CPU_PERIODIC_INT(irq0_line_assert, 183)
|
||||
|
||||
MDRV_MACHINE_START(btoads)
|
||||
MDRV_NVRAM_HANDLER(generic_1fill)
|
||||
MDRV_NVRAM_ADD_1FILL("nvram")
|
||||
|
||||
/* video hardware */
|
||||
MDRV_TLC34076_ADD("tlc34076", TLC34076_6_BIT)
|
||||
|
@ -648,6 +648,7 @@
|
||||
#include "video/mc6845.h"
|
||||
#include "machine/6821pia.h"
|
||||
#include "machine/6850acia.h"
|
||||
#include "machine/nvram.h"
|
||||
#include "sound/ay8910.h"
|
||||
#include "includes/calomega.h"
|
||||
|
||||
@ -838,7 +839,7 @@ static WRITE8_DEVICE_HANDLER( lamps_905_w )
|
||||
|
||||
static ADDRESS_MAP_START( sys903_map, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
ADDRESS_MAP_GLOBAL_MASK(0x3fff)
|
||||
AM_RANGE(0x0000, 0x07ff) AM_RAM AM_BASE_SIZE_GENERIC(nvram)
|
||||
AM_RANGE(0x0000, 0x07ff) AM_RAM AM_SHARE("nvram")
|
||||
AM_RANGE(0x0840, 0x0841) AM_DEVWRITE("ay8912", ay8910_address_data_w)
|
||||
AM_RANGE(0x0880, 0x0880) AM_DEVWRITE("crtc", mc6845_address_w)
|
||||
AM_RANGE(0x0881, 0x0881) AM_DEVREADWRITE("crtc", mc6845_register_r, mc6845_register_w)
|
||||
@ -853,7 +854,7 @@ ADDRESS_MAP_END
|
||||
|
||||
static ADDRESS_MAP_START( s903mod_map, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
ADDRESS_MAP_GLOBAL_MASK(0x3fff)
|
||||
AM_RANGE(0x0000, 0x07ff) AM_RAM AM_BASE_SIZE_GENERIC(nvram)
|
||||
AM_RANGE(0x0000, 0x07ff) AM_RAM AM_SHARE("nvram")
|
||||
AM_RANGE(0x0840, 0x0841) AM_DEVWRITE("ay8912", ay8910_address_data_w)
|
||||
AM_RANGE(0x0880, 0x0880) AM_DEVWRITE("crtc", mc6845_address_w)
|
||||
AM_RANGE(0x0881, 0x0881) AM_DEVREADWRITE("crtc", mc6845_register_r, mc6845_register_w)
|
||||
@ -866,7 +867,7 @@ ADDRESS_MAP_END
|
||||
|
||||
static ADDRESS_MAP_START( sys905_map, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
ADDRESS_MAP_GLOBAL_MASK(0x7fff)
|
||||
AM_RANGE(0x0000, 0x07ff) AM_RAM AM_BASE_SIZE_GENERIC(nvram)
|
||||
AM_RANGE(0x0000, 0x07ff) AM_RAM AM_SHARE("nvram")
|
||||
AM_RANGE(0x1040, 0x1041) AM_DEVWRITE("ay8912", ay8910_address_data_w)
|
||||
AM_RANGE(0x1080, 0x1080) AM_DEVWRITE("crtc", mc6845_address_w)
|
||||
AM_RANGE(0x1081, 0x1081) AM_DEVREADWRITE("crtc", mc6845_register_r, mc6845_register_w)
|
||||
@ -878,7 +879,7 @@ static ADDRESS_MAP_START( sys905_map, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
ADDRESS_MAP_END
|
||||
|
||||
static ADDRESS_MAP_START( sys906_map, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
AM_RANGE(0x0000, 0x07ff) AM_RAM AM_BASE_SIZE_GENERIC(nvram)
|
||||
AM_RANGE(0x0000, 0x07ff) AM_RAM AM_SHARE("nvram")
|
||||
AM_RANGE(0x280c, 0x280f) AM_DEVREADWRITE("pia0", pia6821_r, pia6821_w)
|
||||
AM_RANGE(0x2824, 0x2827) AM_DEVREADWRITE("pia1", pia6821_r, pia6821_w)
|
||||
AM_RANGE(0x2c04, 0x2c04) AM_DEVWRITE("crtc", mc6845_address_w)
|
||||
@ -2741,7 +2742,7 @@ static MACHINE_CONFIG_START( sys903, driver_device )
|
||||
MDRV_CPU_PROGRAM_MAP(sys903_map)
|
||||
MDRV_CPU_VBLANK_INT("screen", irq0_line_hold)
|
||||
|
||||
MDRV_NVRAM_HANDLER(generic_0fill)
|
||||
MDRV_NVRAM_ADD_0FILL("nvram")
|
||||
|
||||
MDRV_PIA6821_ADD("pia0", sys903_pia0_intf)
|
||||
MDRV_PIA6821_ADD("pia1", sys903_pia1_intf)
|
||||
|
@ -213,19 +213,12 @@ static void firqhandler( running_device *device, int irq )
|
||||
*
|
||||
*************************************/
|
||||
|
||||
static NVRAM_HANDLER( capbowl )
|
||||
void capbowl_state::init_nvram(nvram_device &nvram, void *base, size_t size)
|
||||
{
|
||||
if (read_or_write)
|
||||
mame_fwrite(file, machine->generic.nvram.v, machine->generic.nvram_size);
|
||||
else if (file)
|
||||
mame_fread(file, machine->generic.nvram.v, machine->generic.nvram_size);
|
||||
else
|
||||
{
|
||||
/* invalidate nvram to make the game initialize it.
|
||||
A 0xff fill will cause the game to malfunction, so we use a
|
||||
0x01 fill which seems OK */
|
||||
memset(machine->generic.nvram.v, 0x01, machine->generic.nvram_size);
|
||||
}
|
||||
/* invalidate nvram to make the game initialize it.
|
||||
A 0xff fill will cause the game to malfunction, so we use a
|
||||
0x01 fill which seems OK */
|
||||
memset(base, 0x01, size);
|
||||
}
|
||||
|
||||
|
||||
@ -240,7 +233,7 @@ static ADDRESS_MAP_START( capbowl_map, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
AM_RANGE(0x0000, 0x3fff) AM_ROMBANK("bank1")
|
||||
AM_RANGE(0x4000, 0x4000) AM_WRITEONLY AM_BASE_MEMBER(capbowl_state, rowaddress)
|
||||
AM_RANGE(0x4800, 0x4800) AM_WRITE(capbowl_rom_select_w)
|
||||
AM_RANGE(0x5000, 0x57ff) AM_RAM AM_BASE_SIZE_GENERIC(nvram)
|
||||
AM_RANGE(0x5000, 0x57ff) AM_RAM AM_SHARE("nvram")
|
||||
AM_RANGE(0x5800, 0x5fff) AM_READWRITE(capbowl_tms34061_r, capbowl_tms34061_w)
|
||||
AM_RANGE(0x6000, 0x6000) AM_WRITE(capbowl_sndcmd_w)
|
||||
AM_RANGE(0x6800, 0x6800) AM_WRITE(track_reset_w) /* + watchdog */
|
||||
@ -253,7 +246,7 @@ ADDRESS_MAP_END
|
||||
static ADDRESS_MAP_START( bowlrama_map, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
AM_RANGE(0x0000, 0x001f) AM_READWRITE(bowlrama_blitter_r, bowlrama_blitter_w)
|
||||
AM_RANGE(0x4000, 0x4000) AM_WRITEONLY AM_BASE_MEMBER(capbowl_state, rowaddress)
|
||||
AM_RANGE(0x5000, 0x57ff) AM_RAM AM_BASE_SIZE_GENERIC(nvram)
|
||||
AM_RANGE(0x5000, 0x57ff) AM_RAM AM_SHARE("nvram")
|
||||
AM_RANGE(0x5800, 0x5fff) AM_READWRITE(capbowl_tms34061_r, capbowl_tms34061_w)
|
||||
AM_RANGE(0x6000, 0x6000) AM_WRITE(capbowl_sndcmd_w)
|
||||
AM_RANGE(0x6800, 0x6800) AM_WRITE(track_reset_w) /* + watchdog */
|
||||
@ -381,7 +374,7 @@ static MACHINE_CONFIG_START( capbowl, capbowl_state )
|
||||
|
||||
MDRV_MACHINE_START(capbowl)
|
||||
MDRV_MACHINE_RESET(capbowl)
|
||||
MDRV_NVRAM_HANDLER(capbowl)
|
||||
MDRV_NVRAM_ADD_CUSTOM("nvram", capbowl_state, init_nvram)
|
||||
|
||||
MDRV_TICKET_DISPENSER_ADD("ticket", 100, TICKET_MOTOR_ACTIVE_HIGH, TICKET_STATUS_ACTIVE_LOW)
|
||||
|
||||
|
@ -44,6 +44,7 @@ TODO:
|
||||
#include "emu.h"
|
||||
#include "cpu/z80/z80.h"
|
||||
#include "sound/ay8910.h"
|
||||
#include "machine/nvram.h"
|
||||
|
||||
static UINT8 *sc0_vram,*sc0_attr;
|
||||
static tilemap_t *sc0_tilemap;
|
||||
@ -135,7 +136,7 @@ static WRITE8_HANDLER( vvillage_lamps_w )
|
||||
static ADDRESS_MAP_START( vvillage_mem, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
AM_RANGE(0x0000, 0x7fff) AM_ROM
|
||||
AM_RANGE(0xa000, 0xa000) AM_READ(vvillage_rng_r) //accessed by caswin only
|
||||
AM_RANGE(0xe000, 0xe7ff) AM_RAM AM_BASE_SIZE_GENERIC(nvram)
|
||||
AM_RANGE(0xe000, 0xe7ff) AM_RAM AM_SHARE("nvram")
|
||||
AM_RANGE(0xf000, 0xf3ff) AM_RAM_WRITE(sc0_vram_w) AM_BASE(&sc0_vram)
|
||||
AM_RANGE(0xf800, 0xfbff) AM_RAM_WRITE(sc0_attr_w) AM_BASE(&sc0_attr)
|
||||
ADDRESS_MAP_END
|
||||
@ -289,7 +290,7 @@ static MACHINE_CONFIG_START( vvillage, driver_device )
|
||||
MDRV_SCREEN_SIZE(256, 256)
|
||||
MDRV_SCREEN_VISIBLE_AREA(0, 256-1, 16, 256-16-1)
|
||||
|
||||
MDRV_NVRAM_HANDLER(generic_0fill)
|
||||
MDRV_NVRAM_ADD_0FILL("nvram")
|
||||
|
||||
MDRV_GFXDECODE(vvillage)
|
||||
MDRV_PALETTE_LENGTH(0x40)
|
||||
|
@ -73,6 +73,7 @@ Versions known to exist but not dumped:
|
||||
#include "emu.h"
|
||||
#include "cpu/m68000/m68000.h"
|
||||
#include "machine/eeprom.h"
|
||||
#include "machine/nvram.h"
|
||||
#include "machine/nmk112.h"
|
||||
#include "cpu/z80/z80.h"
|
||||
#include "includes/cave.h"
|
||||
@ -930,7 +931,7 @@ static CUSTOM_INPUT( tjumpman_hopper_r )
|
||||
|
||||
static ADDRESS_MAP_START( tjumpman_map, ADDRESS_SPACE_PROGRAM, 16 )
|
||||
AM_RANGE(0x000000, 0x07ffff) AM_ROM // ROM
|
||||
AM_RANGE(0x100000, 0x10ffff) AM_RAM AM_BASE_SIZE_GENERIC( nvram ) // RAM
|
||||
AM_RANGE(0x100000, 0x10ffff) AM_RAM AM_SHARE("nvram") // RAM
|
||||
AM_RANGE(0x200000, 0x207fff) AM_RAM AM_BASE_SIZE_MEMBER(cave_state, spriteram, spriteram_size) // Sprites
|
||||
AM_RANGE(0x208000, 0x20ffff) AM_RAM AM_BASE_MEMBER(cave_state, spriteram_2) // Sprite bank 2
|
||||
AM_RANGE(0x304000, 0x307fff) AM_WRITE(cave_vram_0_w) // Layer 0 - 16x16 tiles mapped here
|
||||
@ -2348,7 +2349,7 @@ MACHINE_CONFIG_END
|
||||
|
||||
static MACHINE_CONFIG_START( tjumpman, cave_state )
|
||||
|
||||
MDRV_NVRAM_HANDLER(generic_0fill)
|
||||
MDRV_NVRAM_ADD_0FILL("nvram")
|
||||
|
||||
/* basic machine hardware */
|
||||
MDRV_CPU_ADD("maincpu", M68000, XTAL_28MHz / 2)
|
||||
|
@ -133,15 +133,6 @@
|
||||
|
||||
|
||||
|
||||
/*************************************
|
||||
*
|
||||
* Globals
|
||||
*
|
||||
*************************************/
|
||||
|
||||
static UINT8 *nvram_stage;
|
||||
|
||||
|
||||
/************************************* *
|
||||
* VBLANK and IRQ generation
|
||||
*
|
||||
@ -234,13 +225,10 @@ static MACHINE_START( ccastles )
|
||||
state->irq_state = 0;
|
||||
schedule_next_irq(machine, 0);
|
||||
|
||||
/* allocate backing memory for the NVRAM */
|
||||
machine->generic.nvram.u8 = auto_alloc_array(machine, UINT8, machine->generic.nvram_size);
|
||||
|
||||
/* setup for save states */
|
||||
state_save_register_global(machine, state->irq_state);
|
||||
state_save_register_global_array(machine, state->nvram_store);
|
||||
state_save_register_global_pointer(machine, machine->generic.nvram.u8, machine->generic.nvram_size);
|
||||
state_save_register_global_array(machine, state->nvram);
|
||||
}
|
||||
|
||||
|
||||
@ -305,22 +293,24 @@ static READ8_HANDLER( leta_r )
|
||||
|
||||
static NVRAM_HANDLER( ccastles )
|
||||
{
|
||||
ccastles_state *state = machine->driver_data<ccastles_state>();
|
||||
if (read_or_write)
|
||||
{
|
||||
/* on power down, the EAROM is implicitly stored */
|
||||
memcpy(machine->generic.nvram.v, nvram_stage, machine->generic.nvram_size);
|
||||
mame_fwrite(file, machine->generic.nvram.v, machine->generic.nvram_size);
|
||||
memcpy(state->nvram, state->nvram_stage, sizeof(state->nvram));
|
||||
mame_fwrite(file, state->nvram, sizeof(state->nvram));
|
||||
}
|
||||
else if (file)
|
||||
mame_fread(file, machine->generic.nvram.v, machine->generic.nvram_size);
|
||||
mame_fread(file, state->nvram, sizeof(state->nvram));
|
||||
else
|
||||
memset(machine->generic.nvram.v, 0, machine->generic.nvram_size);
|
||||
memset(state->nvram, 0, sizeof(state->nvram));
|
||||
}
|
||||
|
||||
|
||||
static WRITE8_HANDLER( nvram_recall_w )
|
||||
{
|
||||
memcpy(nvram_stage, space->machine->generic.nvram.v, space->machine->generic.nvram_size);
|
||||
ccastles_state *state = space->machine->driver_data<ccastles_state>();
|
||||
memcpy(state->nvram_stage, state->nvram, sizeof(state->nvram));
|
||||
}
|
||||
|
||||
|
||||
@ -330,7 +320,7 @@ static WRITE8_HANDLER( nvram_store_w )
|
||||
|
||||
state->nvram_store[offset] = data & 1;
|
||||
if (!state->nvram_store[0] && state->nvram_store[1])
|
||||
memcpy(space->machine->generic.nvram.v, nvram_stage, space->machine->generic.nvram_size);
|
||||
memcpy(state->nvram, state->nvram_stage, sizeof(state->nvram));
|
||||
}
|
||||
|
||||
|
||||
@ -348,7 +338,7 @@ static ADDRESS_MAP_START( main_map, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
AM_RANGE(0x0000, 0x7fff) AM_RAM_WRITE(ccastles_videoram_w) AM_BASE_MEMBER(ccastles_state, videoram)
|
||||
AM_RANGE(0x8000, 0x8fff) AM_RAM
|
||||
AM_RANGE(0x8e00, 0x8fff) AM_BASE_MEMBER(ccastles_state, spriteram)
|
||||
AM_RANGE(0x9000, 0x90ff) AM_MIRROR(0x0300) AM_RAM AM_BASE(&nvram_stage) AM_SIZE_GENERIC(nvram)
|
||||
AM_RANGE(0x9000, 0x90ff) AM_MIRROR(0x0300) AM_RAM AM_SHARE("nvram")
|
||||
AM_RANGE(0x9400, 0x9403) AM_MIRROR(0x01fc) AM_READ(leta_r)
|
||||
AM_RANGE(0x9600, 0x97ff) AM_READ_PORT("IN0")
|
||||
AM_RANGE(0x9800, 0x980f) AM_MIRROR(0x01f0) AM_DEVREADWRITE("pokey1", pokey_r, pokey_w)
|
||||
|
@ -153,6 +153,7 @@ Notes:
|
||||
#include "emu.h"
|
||||
#include "cpu/z80/z80.h"
|
||||
#include "sound/x1_010.h"
|
||||
#include "machine/nvram.h"
|
||||
#include "includes/tnzs.h"
|
||||
|
||||
|
||||
@ -194,7 +195,7 @@ static WRITE8_HANDLER( champbwl_objctrl_w )
|
||||
static ADDRESS_MAP_START( champbwl_map, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
AM_RANGE(0x0000, 0x3fff) AM_ROM AM_REGION("maincpu", 0x10000)
|
||||
AM_RANGE(0x4000, 0x7fff) AM_ROMBANK("bank1")
|
||||
AM_RANGE(0x8000, 0x87ff) AM_RAM AM_BASE_SIZE_GENERIC(nvram)
|
||||
AM_RANGE(0x8000, 0x87ff) AM_RAM AM_SHARE("nvram")
|
||||
AM_RANGE(0xa000, 0xbfff) AM_RAM AM_BASE_MEMBER(tnzs_state, objram)
|
||||
AM_RANGE(0xc000, 0xdfff) AM_DEVREADWRITE("x1snd", seta_sound_r, seta_sound_w)
|
||||
AM_RANGE(0xe000, 0xe1ff) AM_RAM AM_BASE_MEMBER(tnzs_state, vdcram)
|
||||
@ -361,7 +362,7 @@ static MACHINE_CONFIG_START( champbwl, tnzs_state )
|
||||
MDRV_CPU_PROGRAM_MAP(champbwl_map)
|
||||
MDRV_CPU_VBLANK_INT("screen", irq0_line_hold)
|
||||
|
||||
MDRV_NVRAM_HANDLER(generic_0fill)
|
||||
MDRV_NVRAM_ADD_0FILL("nvram")
|
||||
|
||||
MDRV_MACHINE_START(champbwl)
|
||||
MDRV_MACHINE_RESET(champbwl)
|
||||
|
@ -13,6 +13,7 @@ TODO:
|
||||
#include "emu.h"
|
||||
#include "cpu/z180/z180.h"
|
||||
#include "sound/dac.h"
|
||||
#include "machine/nvram.h"
|
||||
|
||||
static int chsuper_tilexor;
|
||||
|
||||
@ -94,7 +95,7 @@ static ADDRESS_MAP_START( chsuper_prg_map, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
AM_RANGE(0x00000, 0x0efff) AM_ROM
|
||||
AM_RANGE(0x00000, 0x01fff) AM_WRITE( chsuper_vram_w )
|
||||
AM_RANGE(0x0f000, 0x0ffff) AM_RAM AM_REGION("maincpu", 0xf000)
|
||||
AM_RANGE(0xfb000, 0xfbfff) AM_RAM AM_BASE_SIZE_GENERIC(nvram)
|
||||
AM_RANGE(0xfb000, 0xfbfff) AM_RAM AM_SHARE("nvram")
|
||||
ADDRESS_MAP_END
|
||||
|
||||
// AM_RANGE(0xaff8, 0xaff8) AM_DEVWRITE("oki", okim6295_w)
|
||||
@ -205,7 +206,7 @@ static MACHINE_CONFIG_START( chsuper, driver_device )
|
||||
MDRV_SCREEN_SIZE(64*8, 64*8)
|
||||
MDRV_SCREEN_VISIBLE_AREA(0*8, 48*8-1, 0, 30*8-1)
|
||||
|
||||
MDRV_NVRAM_HANDLER( generic_0fill )
|
||||
MDRV_NVRAM_ADD_0FILL("nvram")
|
||||
|
||||
MDRV_GFXDECODE(chsuper)
|
||||
MDRV_PALETTE_LENGTH(0x100)
|
||||
|
@ -4,6 +4,7 @@
|
||||
#include "sound/cdp1869.h"
|
||||
#include "sound/ay8910.h"
|
||||
#include "machine/cdp1852.h"
|
||||
#include "machine/nvram.h"
|
||||
#include "includes/cidelsa.h"
|
||||
|
||||
/* CDP1802 Interface */
|
||||
@ -231,14 +232,14 @@ static COP400_INTERFACE( draco_cop_intf )
|
||||
|
||||
static ADDRESS_MAP_START( destryer_map, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
AM_RANGE(0x0000, 0x1fff) AM_ROM
|
||||
AM_RANGE(0x2000, 0x20ff) AM_RAM AM_BASE_SIZE_GENERIC(nvram)
|
||||
AM_RANGE(0x2000, 0x20ff) AM_RAM AM_SHARE("nvram")
|
||||
AM_RANGE(0xf400, 0xf7ff) AM_DEVREADWRITE(CDP1869_TAG, cdp1869_charram_r, cdp1869_charram_w)
|
||||
AM_RANGE(0xf800, 0xffff) AM_DEVREADWRITE(CDP1869_TAG, cdp1869_pageram_r, cdp1869_pageram_w)
|
||||
ADDRESS_MAP_END
|
||||
|
||||
static ADDRESS_MAP_START( destryera_map, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
AM_RANGE(0x0000, 0x1fff) AM_ROM
|
||||
AM_RANGE(0x3000, 0x30ff) AM_RAM AM_BASE_SIZE_GENERIC(nvram)
|
||||
AM_RANGE(0x3000, 0x30ff) AM_RAM AM_SHARE("nvram")
|
||||
AM_RANGE(0xf400, 0xf7ff) AM_DEVREADWRITE(CDP1869_TAG, cdp1869_charram_r, cdp1869_charram_w)
|
||||
AM_RANGE(0xf800, 0xffff) AM_DEVREADWRITE(CDP1869_TAG, cdp1869_pageram_r, cdp1869_pageram_w)
|
||||
ADDRESS_MAP_END
|
||||
@ -276,7 +277,7 @@ ADDRESS_MAP_END
|
||||
|
||||
static ADDRESS_MAP_START( draco_map, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
AM_RANGE(0x0000, 0x3fff) AM_ROM
|
||||
AM_RANGE(0x8000, 0x83ff) AM_RAM AM_BASE_SIZE_GENERIC(nvram)
|
||||
AM_RANGE(0x8000, 0x83ff) AM_RAM AM_SHARE("nvram")
|
||||
AM_RANGE(0xf400, 0xf7ff) AM_DEVREADWRITE(CDP1869_TAG, cdp1869_charram_r, cdp1869_charram_w)
|
||||
AM_RANGE(0xf800, 0xffff) AM_DEVREADWRITE(CDP1869_TAG, cdp1869_pageram_r, cdp1869_pageram_w)
|
||||
ADDRESS_MAP_END
|
||||
@ -516,7 +517,7 @@ static MACHINE_CONFIG_START( destryer, cidelsa_state )
|
||||
MDRV_CPU_PROGRAM_MAP(destryer_map)
|
||||
MDRV_CPU_IO_MAP(destryer_io_map)
|
||||
MDRV_CPU_CONFIG(cidelsa_cdp1802_config)
|
||||
MDRV_NVRAM_HANDLER(generic_0fill)
|
||||
MDRV_NVRAM_ADD_0FILL("nvram")
|
||||
|
||||
MDRV_MACHINE_START(cidelsa)
|
||||
MDRV_MACHINE_RESET(cidelsa)
|
||||
@ -532,7 +533,7 @@ static MACHINE_CONFIG_START( destryera, cidelsa_state )
|
||||
MDRV_CPU_PROGRAM_MAP(destryera_map)
|
||||
MDRV_CPU_IO_MAP(destryer_io_map)
|
||||
MDRV_CPU_CONFIG(cidelsa_cdp1802_config)
|
||||
MDRV_NVRAM_HANDLER(generic_0fill)
|
||||
MDRV_NVRAM_ADD_0FILL("nvram")
|
||||
|
||||
MDRV_MACHINE_START(cidelsa)
|
||||
MDRV_MACHINE_RESET(cidelsa)
|
||||
@ -570,7 +571,7 @@ static MACHINE_CONFIG_START( draco, cidelsa_state )
|
||||
MDRV_CPU_PROGRAM_MAP(draco_map)
|
||||
MDRV_CPU_IO_MAP(draco_io_map)
|
||||
MDRV_CPU_CONFIG(cidelsa_cdp1802_config)
|
||||
MDRV_NVRAM_HANDLER(generic_0fill)
|
||||
MDRV_NVRAM_ADD_0FILL("nvram")
|
||||
|
||||
MDRV_MACHINE_START(draco)
|
||||
MDRV_MACHINE_RESET(cidelsa)
|
||||
|
@ -79,6 +79,7 @@ Side 2 = 0x8F7DDD (or 0x880000 | ( 0x77 << 12 ) | 0x0DDD)
|
||||
#include "machine/laserdsc.h"
|
||||
#include "video/tms9928a.h"
|
||||
#include "sound/discrete.h"
|
||||
#include "machine/nvram.h"
|
||||
|
||||
#define CLIFF_ENABLE_SND_1 NODE_01
|
||||
#define CLIFF_ENABLE_SND_2 NODE_02
|
||||
@ -230,7 +231,7 @@ static MACHINE_RESET( cliffhgr )
|
||||
|
||||
static ADDRESS_MAP_START( mainmem, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
AM_RANGE(0x0000, 0xbfff) AM_ROM /* ROM */
|
||||
AM_RANGE(0xe000, 0xe7ff) AM_RAM AM_BASE_SIZE_GENERIC(nvram) /* NVRAM */
|
||||
AM_RANGE(0xe000, 0xe7ff) AM_RAM AM_SHARE("nvram") /* NVRAM */
|
||||
AM_RANGE(0xe800, 0xefff) AM_RAM /* RAM */
|
||||
ADDRESS_MAP_END
|
||||
|
||||
@ -694,7 +695,7 @@ static MACHINE_CONFIG_START( cliffhgr, driver_device )
|
||||
MDRV_MACHINE_START(cliffhgr)
|
||||
MDRV_MACHINE_RESET(cliffhgr)
|
||||
|
||||
MDRV_NVRAM_HANDLER(generic_0fill)
|
||||
MDRV_NVRAM_ADD_0FILL("nvram")
|
||||
|
||||
MDRV_LASERDISC_ADD("laserdisc", PIONEER_PR8210, "screen", "ldsound")
|
||||
MDRV_LASERDISC_OVERLAY(tms9928a, 15+32*8+15, 27+24*8+24, BITMAP_FORMAT_INDEXED16)
|
||||
|
@ -118,6 +118,7 @@
|
||||
#include "cpu/m6502/m6502.h"
|
||||
#include "deprecat.h"
|
||||
#include "sound/pokey.h"
|
||||
#include "machine/nvram.h"
|
||||
#include "includes/cloak.h"
|
||||
|
||||
static int cloak_nvram_enabled;
|
||||
@ -175,7 +176,7 @@ static ADDRESS_MAP_START( master_map, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
AM_RANGE(0x2200, 0x2200) AM_READ_PORT("P2")
|
||||
AM_RANGE(0x2400, 0x2400) AM_READ_PORT("SYSTEM")
|
||||
AM_RANGE(0x2600, 0x2600) AM_WRITE(cloak_custom_w)
|
||||
AM_RANGE(0x2800, 0x29ff) AM_RAM AM_BASE_SIZE_GENERIC(nvram)
|
||||
AM_RANGE(0x2800, 0x29ff) AM_RAM AM_SHARE("nvram")
|
||||
AM_RANGE(0x2f00, 0x2fff) AM_NOP
|
||||
AM_RANGE(0x3000, 0x30ff) AM_RAM AM_BASE_SIZE_GENERIC(spriteram)
|
||||
AM_RANGE(0x3200, 0x327f) AM_WRITE(cloak_paletteram_w)
|
||||
@ -343,7 +344,7 @@ static MACHINE_CONFIG_START( cloak, driver_device )
|
||||
|
||||
MDRV_QUANTUM_TIME(HZ(1000))
|
||||
|
||||
MDRV_NVRAM_HANDLER(generic_0fill)
|
||||
MDRV_NVRAM_ADD_0FILL("nvram")
|
||||
|
||||
/* video hardware */
|
||||
MDRV_SCREEN_ADD("screen", RASTER)
|
||||
|
@ -104,15 +104,6 @@
|
||||
|
||||
|
||||
|
||||
/*************************************
|
||||
*
|
||||
* Globals
|
||||
*
|
||||
*************************************/
|
||||
|
||||
static UINT8 *nvram_stage;
|
||||
|
||||
|
||||
/*************************************
|
||||
*
|
||||
* VBLANK and IRQ generation
|
||||
@ -200,12 +191,9 @@ static MACHINE_START( cloud9 )
|
||||
state->irq_state = 0;
|
||||
schedule_next_irq(machine, 0-64);
|
||||
|
||||
/* allocate backing memory for the NVRAM */
|
||||
machine->generic.nvram.u8 = auto_alloc_array(machine, UINT8, machine->generic.nvram_size);
|
||||
|
||||
/* setup for save states */
|
||||
state_save_register_global(machine, state->irq_state);
|
||||
state_save_register_global_pointer(machine, machine->generic.nvram.u8, machine->generic.nvram_size);
|
||||
state_save_register_global_array(machine, state->nvram);
|
||||
}
|
||||
|
||||
|
||||
@ -262,35 +250,39 @@ static READ8_HANDLER( leta_r )
|
||||
|
||||
static NVRAM_HANDLER( cloud9 )
|
||||
{
|
||||
cloud9_state *state = machine->driver_data<cloud9_state>();
|
||||
if (read_or_write)
|
||||
{
|
||||
/* on power down, the EAROM is implicitly stored */
|
||||
memcpy(machine->generic.nvram.v, nvram_stage, machine->generic.nvram_size);
|
||||
mame_fwrite(file, machine->generic.nvram.v, machine->generic.nvram_size);
|
||||
memcpy(state->nvram, state->nvram_stage, sizeof(state->nvram));
|
||||
mame_fwrite(file, state->nvram, sizeof(state->nvram));
|
||||
}
|
||||
else if (file)
|
||||
mame_fread(file, machine->generic.nvram.v, machine->generic.nvram_size);
|
||||
mame_fread(file, state->nvram, sizeof(state->nvram));
|
||||
else
|
||||
memset(machine->generic.nvram.v, 0, machine->generic.nvram_size);
|
||||
memset(state->nvram, 0, sizeof(state->nvram));
|
||||
}
|
||||
|
||||
|
||||
static WRITE8_HANDLER( nvram_recall_w )
|
||||
{
|
||||
memcpy(nvram_stage, space->machine->generic.nvram.v, space->machine->generic.nvram_size);
|
||||
cloud9_state *state = space->machine->driver_data<cloud9_state>();
|
||||
memcpy(state->nvram_stage, state->nvram, sizeof(state->nvram));
|
||||
}
|
||||
|
||||
|
||||
static WRITE8_HANDLER( nvram_store_w )
|
||||
{
|
||||
memcpy(space->machine->generic.nvram.v, nvram_stage, space->machine->generic.nvram_size);
|
||||
cloud9_state *state = space->machine->driver_data<cloud9_state>();
|
||||
memcpy(state->nvram, state->nvram_stage, sizeof(state->nvram));
|
||||
}
|
||||
|
||||
|
||||
static READ8_HANDLER( nvram_r )
|
||||
{
|
||||
/* only a single XD2212 for 4 bits of NVRAM */
|
||||
return nvram_stage[offset] | 0xf0;
|
||||
cloud9_state *state = space->machine->driver_data<cloud9_state>();
|
||||
return state->nvram_stage[offset] | 0xf0;
|
||||
}
|
||||
|
||||
|
||||
@ -319,7 +311,7 @@ static ADDRESS_MAP_START( cloud9_map, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
AM_RANGE(0x5900, 0x5903) AM_MIRROR(0x007c) AM_READ(leta_r)
|
||||
AM_RANGE(0x5a00, 0x5a0f) AM_MIRROR(0x00f0) AM_DEVREADWRITE("pokey1", pokey_r, pokey_w)
|
||||
AM_RANGE(0x5b00, 0x5b0f) AM_MIRROR(0x00f0) AM_DEVREADWRITE("pokey2", pokey_r, pokey_w)
|
||||
AM_RANGE(0x5c00, 0x5cff) AM_MIRROR(0x0300) AM_RAM_READ(nvram_r) AM_BASE(&nvram_stage) AM_SIZE_GENERIC(nvram)
|
||||
AM_RANGE(0x5c00, 0x5cff) AM_MIRROR(0x0300) AM_RAM_READ(nvram_r) AM_SHARE("nvram")
|
||||
AM_RANGE(0x6000, 0xffff) AM_ROM
|
||||
ADDRESS_MAP_END
|
||||
|
||||
|
@ -216,6 +216,7 @@
|
||||
#include "emu.h"
|
||||
#include "cpu/h83002/h8.h"
|
||||
#include "sound/ymz280b.h"
|
||||
#include "machine/nvram.h"
|
||||
|
||||
static UINT16 *vram;
|
||||
|
||||
@ -660,7 +661,7 @@ static MACHINE_CONFIG_START( coinmvga, driver_device )
|
||||
MDRV_CPU_IO_MAP(coinmvga_io_map)
|
||||
MDRV_CPU_VBLANK_INT("screen", vblank_irq) /* wrong, fix me */
|
||||
|
||||
// MDRV_NVRAM_HANDLER(generic_0fill)
|
||||
// MDRV_NVRAM_ADD_0FILL("nvram")
|
||||
|
||||
/* video hardware */
|
||||
MDRV_SCREEN_ADD("screen", RASTER)
|
||||
|
@ -293,6 +293,7 @@ Notes:
|
||||
#include "cpu/mips/r3000.h"
|
||||
#include "cpu/jaguar/jaguar.h"
|
||||
#include "machine/idectrl.h"
|
||||
#include "machine/nvram.h"
|
||||
#include "sound/dac.h"
|
||||
#include "includes/jaguar.h"
|
||||
|
||||
@ -302,6 +303,17 @@ Notes:
|
||||
#define M68K_CLOCK XTAL_50MHz
|
||||
|
||||
|
||||
class cojag_state : public driver_device
|
||||
{
|
||||
public:
|
||||
cojag_state(running_machine &machine, const driver_device_config_base &config)
|
||||
: driver_device(machine, config),
|
||||
m_nvram(*this, "nvram") { }
|
||||
|
||||
required_shared_ptr<UINT32> m_nvram;
|
||||
};
|
||||
|
||||
|
||||
|
||||
/*************************************
|
||||
*
|
||||
@ -507,10 +519,11 @@ static WRITE32_HANDLER( latch_w )
|
||||
|
||||
static READ32_HANDLER( eeprom_data_r )
|
||||
{
|
||||
cojag_state *state = space->machine->driver_data<cojag_state>();
|
||||
if (cojag_is_r3000)
|
||||
return space->machine->generic.nvram.u32[offset] | 0xffffff00;
|
||||
return state->m_nvram[offset] | 0xffffff00;
|
||||
else
|
||||
return space->machine->generic.nvram.u32[offset] | 0x00ffffff;
|
||||
return state->m_nvram[offset] | 0x00ffffff;
|
||||
}
|
||||
|
||||
|
||||
@ -524,10 +537,11 @@ static WRITE32_HANDLER( eeprom_data_w )
|
||||
{
|
||||
// if (eeprom_enable)
|
||||
{
|
||||
cojag_state *state = space->machine->driver_data<cojag_state>();
|
||||
if (cojag_is_r3000)
|
||||
space->machine->generic.nvram.u32[offset] = data & 0x000000ff;
|
||||
state->m_nvram[offset] = data & 0x000000ff;
|
||||
else
|
||||
space->machine->generic.nvram.u32[offset] = data & 0xff000000;
|
||||
state->m_nvram[offset] = data & 0xff000000;
|
||||
}
|
||||
// else
|
||||
// logerror("%08X:error writing to disabled EEPROM\n", cpu_get_previouspc(space->cpu));
|
||||
@ -804,7 +818,7 @@ static ADDRESS_MAP_START( r3000_map, ADDRESS_SPACE_PROGRAM, 32 )
|
||||
AM_RANGE(0x12000000, 0x120fffff) AM_RAM // tested in self-test only?
|
||||
AM_RANGE(0x14000004, 0x14000007) AM_WRITE(watchdog_reset32_w)
|
||||
AM_RANGE(0x16000000, 0x16000003) AM_WRITE(eeprom_enable_w)
|
||||
AM_RANGE(0x18000000, 0x18001fff) AM_READWRITE(eeprom_data_r, eeprom_data_w) AM_BASE_SIZE_GENERIC(nvram)
|
||||
AM_RANGE(0x18000000, 0x18001fff) AM_READWRITE(eeprom_data_r, eeprom_data_w) AM_SHARE("nvram")
|
||||
AM_RANGE(0x1fc00000, 0x1fdfffff) AM_ROM AM_REGION("user1", 0) AM_BASE(&rom_base)
|
||||
ADDRESS_MAP_END
|
||||
|
||||
@ -813,7 +827,7 @@ static ADDRESS_MAP_START( m68020_map, ADDRESS_SPACE_PROGRAM, 32 )
|
||||
AM_RANGE(0x000000, 0x7fffff) AM_RAM AM_BASE(&jaguar_shared_ram) AM_SHARE("share1")
|
||||
AM_RANGE(0x800000, 0x9fffff) AM_ROM AM_REGION("user1", 0) AM_BASE(&rom_base)
|
||||
AM_RANGE(0xa00000, 0xa1ffff) AM_RAM
|
||||
AM_RANGE(0xa20000, 0xa21fff) AM_READWRITE(eeprom_data_r, eeprom_data_w) AM_BASE_SIZE_GENERIC(nvram)
|
||||
AM_RANGE(0xa20000, 0xa21fff) AM_READWRITE(eeprom_data_r, eeprom_data_w) AM_SHARE("nvram")
|
||||
AM_RANGE(0xa30000, 0xa30003) AM_WRITE(watchdog_reset32_w)
|
||||
AM_RANGE(0xa40000, 0xa40003) AM_WRITE(eeprom_enable_w)
|
||||
AM_RANGE(0xb70000, 0xb70003) AM_READWRITE(misc_control_r, misc_control_w)
|
||||
@ -1102,7 +1116,7 @@ static const jaguar_cpu_config dsp_config =
|
||||
};
|
||||
|
||||
|
||||
static MACHINE_CONFIG_START( cojagr3k, driver_device )
|
||||
static MACHINE_CONFIG_START( cojagr3k, cojag_state )
|
||||
|
||||
/* basic machine hardware */
|
||||
MDRV_CPU_ADD("maincpu", R3041BE, R3000_CLOCK)
|
||||
@ -1118,7 +1132,7 @@ static MACHINE_CONFIG_START( cojagr3k, driver_device )
|
||||
MDRV_CPU_PROGRAM_MAP(dsp_map)
|
||||
|
||||
MDRV_MACHINE_RESET(cojag)
|
||||
MDRV_NVRAM_HANDLER(generic_1fill)
|
||||
MDRV_NVRAM_ADD_1FILL("nvram")
|
||||
|
||||
MDRV_IDE_CONTROLLER_ADD("ide", jaguar_external_int)
|
||||
|
||||
|
@ -29,6 +29,7 @@
|
||||
#include "cpu/tms32025/tms32025.h"
|
||||
#include "video/tlc34076.h"
|
||||
#include "sound/dac.h"
|
||||
#include "machine/nvram.h"
|
||||
#include "includes/coolpool.h"
|
||||
|
||||
|
||||
@ -187,7 +188,10 @@ static WRITE16_HANDLER( nvram_data_w )
|
||||
if (ACCESSING_BITS_0_7)
|
||||
{
|
||||
if (nvram_write_enable)
|
||||
space->machine->generic.nvram.u16[offset] = data & 0xff;
|
||||
{
|
||||
coolpool_state *state = space->machine->driver_data<coolpool_state>();
|
||||
state->m_nvram[offset] = data & 0xff;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -657,7 +661,7 @@ static ADDRESS_MAP_START( amerdart_map, ADDRESS_SPACE_PROGRAM, 16 )
|
||||
AM_RANGE(0x00000000, 0x000fffff) AM_RAM AM_BASE_MEMBER(coolpool_state,vram_base)
|
||||
AM_RANGE(0x04000000, 0x0400000f) AM_WRITE(amerdart_misc_w)
|
||||
AM_RANGE(0x05000000, 0x0500000f) AM_READWRITE(amerdart_iop_r, amerdart_iop_w)
|
||||
AM_RANGE(0x06000000, 0x06007fff) AM_RAM_WRITE(nvram_thrash_data_w) AM_BASE_SIZE_GENERIC(nvram)
|
||||
AM_RANGE(0x06000000, 0x06007fff) AM_RAM_WRITE(nvram_thrash_data_w) AM_SHARE("nvram")
|
||||
AM_RANGE(0xc0000000, 0xc00001ff) AM_READWRITE(tms34010_io_register_r, tms34010_io_register_w)
|
||||
AM_RANGE(0xffb00000, 0xffffffff) AM_ROM AM_REGION("user1", 0)
|
||||
ADDRESS_MAP_END
|
||||
@ -669,7 +673,7 @@ static ADDRESS_MAP_START( coolpool_map, ADDRESS_SPACE_PROGRAM, 16 )
|
||||
AM_RANGE(0x02000000, 0x020000ff) AM_READWRITE(coolpool_iop_r, coolpool_iop_w)
|
||||
AM_RANGE(0x03000000, 0x0300000f) AM_WRITE(coolpool_misc_w)
|
||||
AM_RANGE(0x03000000, 0x03ffffff) AM_ROM AM_REGION("gfx1", 0)
|
||||
AM_RANGE(0x06000000, 0x06007fff) AM_RAM_WRITE(nvram_thrash_data_w) AM_BASE_SIZE_GENERIC(nvram)
|
||||
AM_RANGE(0x06000000, 0x06007fff) AM_RAM_WRITE(nvram_thrash_data_w) AM_SHARE("nvram")
|
||||
AM_RANGE(0xc0000000, 0xc00001ff) AM_READWRITE(tms34010_io_register_r, tms34010_io_register_w)
|
||||
AM_RANGE(0xffe00000, 0xffffffff) AM_ROM AM_REGION("user1", 0)
|
||||
ADDRESS_MAP_END
|
||||
@ -680,7 +684,7 @@ static ADDRESS_MAP_START( nballsht_map, ADDRESS_SPACE_PROGRAM, 16 )
|
||||
AM_RANGE(0x02000000, 0x020000ff) AM_READWRITE(coolpool_iop_r, coolpool_iop_w)
|
||||
AM_RANGE(0x03000000, 0x0300000f) AM_WRITE(coolpool_misc_w)
|
||||
AM_RANGE(0x04000000, 0x040000ff) AM_DEVREADWRITE8("tlc34076", tlc34076_r, tlc34076_w, 0x00ff) // IMSG176P-40
|
||||
AM_RANGE(0x06000000, 0x0601ffff) AM_MIRROR(0x00020000) AM_RAM_WRITE(nvram_thrash_data_w) AM_BASE_SIZE_GENERIC(nvram)
|
||||
AM_RANGE(0x06000000, 0x0601ffff) AM_MIRROR(0x00020000) AM_RAM_WRITE(nvram_thrash_data_w) AM_SHARE("nvram")
|
||||
AM_RANGE(0xc0000000, 0xc00001ff) AM_READWRITE(tms34010_io_register_r, tms34010_io_register_w)
|
||||
AM_RANGE(0xff000000, 0xff7fffff) AM_ROM AM_REGION("gfx1", 0)
|
||||
AM_RANGE(0xffc00000, 0xffffffff) AM_ROM AM_REGION("user1", 0)
|
||||
@ -876,7 +880,7 @@ static MACHINE_CONFIG_START( amerdart, coolpool_state )
|
||||
MDRV_TIMER_ADD_SCANLINE("audioint", amerdart_audio_int_gen, "screen", 0, 1)
|
||||
|
||||
MDRV_MACHINE_RESET(amerdart)
|
||||
MDRV_NVRAM_HANDLER(generic_0fill)
|
||||
MDRV_NVRAM_ADD_0FILL("nvram")
|
||||
|
||||
MDRV_TIMER_ADD("nvram_timer", nvram_write_timeout)
|
||||
|
||||
@ -907,7 +911,7 @@ static MACHINE_CONFIG_START( coolpool, coolpool_state )
|
||||
MDRV_CPU_IO_MAP(coolpool_dsp_io_map)
|
||||
|
||||
MDRV_MACHINE_RESET(coolpool)
|
||||
MDRV_NVRAM_HANDLER(generic_0fill)
|
||||
MDRV_NVRAM_ADD_0FILL("nvram")
|
||||
|
||||
MDRV_TIMER_ADD("nvram_timer", nvram_write_timeout)
|
||||
|
||||
|
@ -121,6 +121,7 @@ Notes:
|
||||
#include "video/vrender0.h"
|
||||
#include "machine/ds1302.h"
|
||||
#include "sound/vrender0.h"
|
||||
#include "machine/nvram.h"
|
||||
|
||||
#define IDLE_LOOP_SPEEDUP
|
||||
|
||||
@ -468,7 +469,7 @@ static ADDRESS_MAP_START( crystal_mem, ADDRESS_SPACE_PROGRAM, 32 )
|
||||
|
||||
AM_RANGE(0x01200000, 0x0120000f) AM_READ(Input_r)
|
||||
AM_RANGE(0x01280000, 0x01280003) AM_WRITE(Banksw_w)
|
||||
AM_RANGE(0x01400000, 0x0140ffff) AM_RAM AM_BASE_SIZE_GENERIC(nvram)
|
||||
AM_RANGE(0x01400000, 0x0140ffff) AM_RAM AM_SHARE("nvram")
|
||||
|
||||
AM_RANGE(0x01801400, 0x01801403) AM_READWRITE(Timer0_r, Timer0_w)
|
||||
AM_RANGE(0x01801408, 0x0180140b) AM_READWRITE(Timer1_r, Timer1_w)
|
||||
@ -823,7 +824,7 @@ static MACHINE_CONFIG_START( crystal, crystal_state )
|
||||
MDRV_MACHINE_START(crystal)
|
||||
MDRV_MACHINE_RESET(crystal)
|
||||
|
||||
MDRV_NVRAM_HANDLER(generic_0fill)
|
||||
MDRV_NVRAM_ADD_0FILL("nvram")
|
||||
|
||||
MDRV_SCREEN_ADD("screen", RASTER)
|
||||
MDRV_SCREEN_REFRESH_RATE(60)
|
||||
|
@ -23,6 +23,7 @@
|
||||
#include "sound/dac.h"
|
||||
#include "streams.h"
|
||||
#include "machine/laserdsc.h"
|
||||
#include "machine/nvram.h"
|
||||
|
||||
|
||||
/*************************************
|
||||
@ -404,7 +405,7 @@ static ADDRESS_MAP_START( m68k_program_map, ADDRESS_SPACE_PROGRAM, 16 )
|
||||
AM_RANGE(0x03800e, 0x03800f) AM_READWRITE(laserdisc_r, laserdisc_w)
|
||||
AM_RANGE(0x03c800, 0x03c9ff) AM_RAM_WRITE(palette_w) AM_BASE_GENERIC(paletteram)
|
||||
AM_RANGE(0x03cc00, 0x03cc01) AM_WRITE(control_w)
|
||||
AM_RANGE(0x03e000, 0x03efff) AM_RAM AM_BASE_SIZE_GENERIC(nvram)
|
||||
AM_RANGE(0x03e000, 0x03efff) AM_RAM AM_SHARE("nvram")
|
||||
AM_RANGE(0x03f000, 0x03ffff) AM_RAM
|
||||
ADDRESS_MAP_END
|
||||
|
||||
@ -514,7 +515,7 @@ static MACHINE_CONFIG_START( cubeqst, driver_device )
|
||||
|
||||
MDRV_MACHINE_START(cubeqst)
|
||||
MDRV_MACHINE_RESET(cubeqst)
|
||||
MDRV_NVRAM_HANDLER(generic_0fill)
|
||||
MDRV_NVRAM_ADD_0FILL("nvram")
|
||||
|
||||
MDRV_LASERDISC_SCREEN_ADD_NTSC("screen", BITMAP_FORMAT_RGB32)
|
||||
MDRV_VIDEO_START(cubeqst)
|
||||
|
@ -12,6 +12,7 @@
|
||||
#include "cpu/se3208/se3208.h"
|
||||
#include "video/vrender0.h"
|
||||
#include "machine/ds1302.h"
|
||||
#include "machine/nvram.h"
|
||||
#include "sound/vrender0.h"
|
||||
|
||||
|
||||
@ -58,7 +59,7 @@ static MACHINE_CONFIG_START( ddz, driver_device )
|
||||
|
||||
//MDRV_MACHINE_RESET(ddz)
|
||||
|
||||
//MDRV_NVRAM_HANDLER(generic_0fill)
|
||||
//MDRV_NVRAM_ADD_0FILL("nvram")
|
||||
|
||||
MDRV_SCREEN_ADD("screen", RASTER)
|
||||
MDRV_SCREEN_REFRESH_RATE(60)
|
||||
|
@ -52,6 +52,7 @@ DD10 DD14 DD18 H5 DD21
|
||||
#include "emu.h"
|
||||
#include "cpu/z80/z80.h"
|
||||
#include "sound/ay8910.h"
|
||||
#include "machine/nvram.h"
|
||||
#include "video/resnet.h"
|
||||
|
||||
static UINT8* dderby_vidchars;
|
||||
@ -105,7 +106,7 @@ static WRITE8_HANDLER( output_w )
|
||||
|
||||
static ADDRESS_MAP_START( memmap, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
AM_RANGE(0x0000, 0x5fff) AM_ROM
|
||||
AM_RANGE(0x8000, 0x8fff) AM_RAM AM_BASE_SIZE_GENERIC(nvram)
|
||||
AM_RANGE(0x8000, 0x8fff) AM_RAM AM_SHARE("nvram")
|
||||
AM_RANGE(0xc000, 0xc007) AM_READ(input_r)
|
||||
AM_RANGE(0xc000, 0xc007) AM_WRITE(output_w)
|
||||
AM_RANGE(0xc802, 0xc802) AM_READ_PORT("DSW1")
|
||||
@ -497,7 +498,7 @@ static MACHINE_CONFIG_START( dderby, driver_device )
|
||||
MDRV_CPU_PROGRAM_MAP(dderby_sound_map)
|
||||
|
||||
MDRV_QUANTUM_TIME(HZ(6000))
|
||||
MDRV_NVRAM_HANDLER(generic_0fill)
|
||||
MDRV_NVRAM_ADD_0FILL("nvram")
|
||||
|
||||
/* video hardware */
|
||||
MDRV_SCREEN_ADD("screen", RASTER)
|
||||
|
@ -35,6 +35,7 @@ dy_6.bin (near Z80)
|
||||
#include "cpu/z80/z80.h"
|
||||
#include "cpu/i8085/i8085.h"
|
||||
#include "sound/ay8910.h"
|
||||
#include "machine/nvram.h"
|
||||
|
||||
|
||||
class dynadice_state : public driver_device
|
||||
@ -93,7 +94,7 @@ static WRITE8_DEVICE_HANDLER( sound_control_w )
|
||||
static ADDRESS_MAP_START( dynadice_map, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
AM_RANGE(0x0000, 0x1fff) AM_ROM
|
||||
AM_RANGE(0x2000, 0x23ff) AM_RAM_WRITE(dynadice_videoram_w) AM_BASE_MEMBER(dynadice_state, videoram)
|
||||
AM_RANGE(0x4000, 0x40ff) AM_RAM AM_BASE_SIZE_GENERIC(nvram)
|
||||
AM_RANGE(0x4000, 0x40ff) AM_RAM AM_SHARE("nvram")
|
||||
ADDRESS_MAP_END
|
||||
|
||||
static ADDRESS_MAP_START( dynadice_io_map, ADDRESS_SPACE_IO, 8 )
|
||||
@ -247,7 +248,7 @@ static MACHINE_CONFIG_START( dynadice, dynadice_state )
|
||||
MDRV_MACHINE_START(dynadice)
|
||||
MDRV_MACHINE_RESET(dynadice)
|
||||
|
||||
MDRV_NVRAM_HANDLER(generic_0fill)
|
||||
MDRV_NVRAM_ADD_0FILL("nvram")
|
||||
|
||||
/* video hardware */
|
||||
MDRV_SCREEN_ADD("screen", RASTER)
|
||||
|
@ -82,6 +82,7 @@ TODO:
|
||||
#include "sound/3812intf.h"
|
||||
#include "sound/msm5205.h"
|
||||
#include "sound/2413intf.h"
|
||||
#include "machine/nvram.h"
|
||||
#include "rendlay.h"
|
||||
|
||||
/***************************************************************************
|
||||
@ -471,34 +472,34 @@ static WRITE8_HANDLER( yarunara_layer_half2_w )
|
||||
|
||||
static ADDRESS_MAP_START( sprtmtch_mem_map, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
AM_RANGE( 0x0000, 0x6fff ) AM_ROM
|
||||
AM_RANGE( 0x7000, 0x7fff ) AM_RAM AM_BASE_SIZE_GENERIC(nvram)
|
||||
AM_RANGE( 0x7000, 0x7fff ) AM_RAM AM_SHARE("nvram")
|
||||
AM_RANGE( 0x8000, 0xffff ) AM_ROMBANK("bank1")
|
||||
ADDRESS_MAP_END
|
||||
|
||||
static ADDRESS_MAP_START( hnoridur_mem_map, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
AM_RANGE( 0x0000, 0x6fff ) AM_ROM
|
||||
AM_RANGE( 0x7000, 0x7fff ) AM_RAM AM_BASE_SIZE_GENERIC(nvram)
|
||||
AM_RANGE( 0x7000, 0x7fff ) AM_RAM AM_SHARE("nvram")
|
||||
AM_RANGE( 0x8000, 0xffff ) AM_READ_BANK("bank1") AM_WRITE(hnoridur_palette_w)
|
||||
ADDRESS_MAP_END
|
||||
|
||||
static ADDRESS_MAP_START( mcnpshnt_mem_map, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
AM_RANGE( 0x0000, 0x5fff ) AM_ROM
|
||||
AM_RANGE( 0x6000, 0x6fff ) AM_RAM
|
||||
AM_RANGE( 0x7000, 0x7fff ) AM_RAM AM_BASE_SIZE_GENERIC(nvram)
|
||||
AM_RANGE( 0x7000, 0x7fff ) AM_RAM AM_SHARE("nvram")
|
||||
AM_RANGE( 0x8000, 0xffff ) AM_READ_BANK("bank1") AM_WRITE(hnoridur_palette_w)
|
||||
ADDRESS_MAP_END
|
||||
|
||||
static ADDRESS_MAP_START( nanajign_mem_map, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
AM_RANGE( 0x0000, 0x5fff ) AM_ROM
|
||||
AM_RANGE( 0x6000, 0x6fff ) AM_RAM
|
||||
AM_RANGE( 0x7000, 0x7fff ) AM_RAM AM_BASE_SIZE_GENERIC(nvram)
|
||||
AM_RANGE( 0x7000, 0x7fff ) AM_RAM AM_SHARE("nvram")
|
||||
AM_RANGE( 0x8000, 0x80ff ) AM_WRITE(nanajign_palette_w)
|
||||
AM_RANGE( 0x8000, 0xffff ) AM_ROMBANK("bank1")
|
||||
ADDRESS_MAP_END
|
||||
|
||||
static ADDRESS_MAP_START( mjdialq2_mem_map, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
AM_RANGE( 0x0800, 0x0fff ) AM_RAM
|
||||
AM_RANGE( 0x1000, 0x1fff ) AM_RAM AM_BASE_SIZE_GENERIC(nvram)
|
||||
AM_RANGE( 0x1000, 0x1fff ) AM_RAM AM_SHARE("nvram")
|
||||
AM_RANGE( 0x0000, 0x7fff ) AM_ROM
|
||||
AM_RANGE( 0x8000, 0xffff ) AM_ROMBANK("bank1")
|
||||
ADDRESS_MAP_END
|
||||
@ -506,7 +507,7 @@ ADDRESS_MAP_END
|
||||
static ADDRESS_MAP_START( yarunara_mem_map, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
AM_RANGE( 0x0000, 0x5fff ) AM_ROM
|
||||
AM_RANGE( 0x6000, 0x6fff ) AM_RAM
|
||||
AM_RANGE( 0x7000, 0x7fff ) AM_RAM AM_BASE_SIZE_GENERIC(nvram)
|
||||
AM_RANGE( 0x7000, 0x7fff ) AM_RAM AM_SHARE("nvram")
|
||||
AM_RANGE( 0x8000, 0xffff ) AM_ROMBANK("bank1")
|
||||
AM_RANGE( 0x8000, 0x81ff ) AM_WRITE(yarunara_palette_w) // Palette or RTC
|
||||
ADDRESS_MAP_END
|
||||
@ -514,7 +515,7 @@ ADDRESS_MAP_END
|
||||
static ADDRESS_MAP_START( jantouki_mem_map, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
AM_RANGE( 0x0000, 0x5fff ) AM_ROM
|
||||
AM_RANGE( 0x6000, 0x6fff ) AM_RAM
|
||||
AM_RANGE( 0x7000, 0x7fff ) AM_RAM AM_BASE_SIZE_GENERIC(nvram)
|
||||
AM_RANGE( 0x7000, 0x7fff ) AM_RAM AM_SHARE("nvram")
|
||||
AM_RANGE( 0x8000, 0xffff ) AM_ROMBANK("bank1")
|
||||
ADDRESS_MAP_END
|
||||
|
||||
@ -641,7 +642,7 @@ static READ8_HANDLER( hjingi_keyboard_1_r )
|
||||
|
||||
static ADDRESS_MAP_START( hjingi_mem_map, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
AM_RANGE( 0x0000, 0x01ff ) AM_ROM
|
||||
AM_RANGE( 0x0200, 0x1fff ) AM_RAM AM_BASE_SIZE_GENERIC(nvram)
|
||||
AM_RANGE( 0x0200, 0x1fff ) AM_RAM AM_SHARE("nvram")
|
||||
AM_RANGE( 0x2000, 0x7fff ) AM_ROM
|
||||
AM_RANGE( 0x8000, 0xffff ) AM_READ_BANK("bank1") AM_WRITE(hnoridur_palette_w)
|
||||
ADDRESS_MAP_END
|
||||
@ -1529,7 +1530,7 @@ static WRITE8_HANDLER( tenkai_blit_romregion_w )
|
||||
static ADDRESS_MAP_START( tenkai_map, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
AM_RANGE( 0x0000, 0x5fff ) AM_ROM
|
||||
AM_RANGE( 0x6000, 0x6fff ) AM_RAM
|
||||
AM_RANGE( 0x7000, 0x7fff ) AM_RAM AM_BASE_SIZE_GENERIC(nvram)
|
||||
AM_RANGE( 0x7000, 0x7fff ) AM_RAM AM_SHARE("nvram")
|
||||
AM_RANGE( 0x8000, 0xffff ) AM_READWRITE(tenkai_8000_r, tenkai_8000_w)
|
||||
AM_RANGE( 0x10000, 0x10000 ) AM_DEVREAD("aysnd", ay8910_r) // AY8910
|
||||
AM_RANGE( 0x10008, 0x10008 ) AM_DEVWRITE("aysnd", ay8910_data_w) //
|
||||
@ -1701,7 +1702,7 @@ static WRITE8_HANDLER( gekisha_8000_w )
|
||||
|
||||
static ADDRESS_MAP_START( gekisha_map, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
AM_RANGE( 0x0000, 0x6fff ) AM_ROM
|
||||
AM_RANGE( 0x7000, 0x7fff ) AM_RAM AM_BASE_SIZE_GENERIC(nvram)
|
||||
AM_RANGE( 0x7000, 0x7fff ) AM_RAM AM_SHARE("nvram")
|
||||
AM_RANGE( 0x8000, 0xffff ) AM_READWRITE(gekisha_8000_r, gekisha_8000_w)
|
||||
ADDRESS_MAP_END
|
||||
|
||||
@ -4343,7 +4344,7 @@ static MACHINE_CONFIG_START( hanamai, dynax_state )
|
||||
MDRV_MACHINE_START(hanamai)
|
||||
MDRV_MACHINE_RESET(dynax)
|
||||
|
||||
MDRV_NVRAM_HANDLER(generic_0fill)
|
||||
MDRV_NVRAM_ADD_0FILL("nvram")
|
||||
|
||||
/* video hardware */
|
||||
MDRV_SCREEN_ADD("screen", RASTER)
|
||||
@ -4401,7 +4402,7 @@ static MACHINE_CONFIG_START( hnoridur, dynax_state )
|
||||
MDRV_MACHINE_START(hnoridur)
|
||||
MDRV_MACHINE_RESET(dynax)
|
||||
|
||||
MDRV_NVRAM_HANDLER(generic_0fill)
|
||||
MDRV_NVRAM_ADD_0FILL("nvram")
|
||||
|
||||
/* video hardware */
|
||||
MDRV_SCREEN_ADD("screen", RASTER)
|
||||
@ -4447,7 +4448,7 @@ static MACHINE_CONFIG_START( hjingi, dynax_state )
|
||||
MDRV_MACHINE_START(hnoridur)
|
||||
MDRV_MACHINE_RESET(dynax)
|
||||
|
||||
MDRV_NVRAM_HANDLER(generic_0fill)
|
||||
MDRV_NVRAM_ADD_0FILL("nvram")
|
||||
|
||||
/* video hardware */
|
||||
MDRV_SCREEN_ADD("screen", RASTER)
|
||||
@ -4506,7 +4507,7 @@ static MACHINE_CONFIG_START( sprtmtch, dynax_state )
|
||||
MDRV_MACHINE_START(hanamai)
|
||||
MDRV_MACHINE_RESET(dynax)
|
||||
|
||||
MDRV_NVRAM_HANDLER(generic_0fill)
|
||||
MDRV_NVRAM_ADD_0FILL("nvram")
|
||||
|
||||
/* video hardware */
|
||||
MDRV_SCREEN_ADD("screen", RASTER)
|
||||
@ -4549,7 +4550,7 @@ static MACHINE_CONFIG_START( mjfriday, dynax_state )
|
||||
MDRV_MACHINE_START(hanamai)
|
||||
MDRV_MACHINE_RESET(dynax)
|
||||
|
||||
MDRV_NVRAM_HANDLER(generic_0fill)
|
||||
MDRV_NVRAM_ADD_0FILL("nvram")
|
||||
|
||||
/* video hardware */
|
||||
MDRV_SCREEN_ADD("screen", RASTER)
|
||||
@ -4614,7 +4615,7 @@ static MACHINE_CONFIG_DERIVED( yarunara, hnoridur )
|
||||
MDRV_CPU_IO_MAP(yarunara_io_map)
|
||||
MDRV_CPU_PERIODIC_INT(yarunara_clock_interrupt, 60) // RTC
|
||||
|
||||
MDRV_NVRAM_HANDLER(generic_0fill)
|
||||
MDRV_NVRAM_REPLACE_0FILL("nvram")
|
||||
|
||||
MDRV_SCREEN_MODIFY("screen")
|
||||
MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16)
|
||||
@ -4702,7 +4703,7 @@ static MACHINE_CONFIG_START( jantouki, dynax_state )
|
||||
MDRV_MACHINE_START(jantouki)
|
||||
MDRV_MACHINE_RESET(dynax)
|
||||
|
||||
MDRV_NVRAM_HANDLER(generic_0fill)
|
||||
MDRV_NVRAM_ADD_0FILL("nvram")
|
||||
|
||||
/* video hardware */
|
||||
MDRV_PALETTE_LENGTH(512)
|
||||
@ -4869,7 +4870,7 @@ static MACHINE_CONFIG_START( htengoku, dynax_state )
|
||||
MDRV_MACHINE_START(htengoku)
|
||||
MDRV_MACHINE_RESET(dynax)
|
||||
|
||||
MDRV_NVRAM_HANDLER(generic_0fill)
|
||||
MDRV_NVRAM_ADD_0FILL("nvram")
|
||||
|
||||
/* video hardware */
|
||||
MDRV_SCREEN_ADD("screen", RASTER)
|
||||
@ -4946,7 +4947,7 @@ static MACHINE_CONFIG_START( tenkai, dynax_state )
|
||||
MDRV_MACHINE_START(tenkai)
|
||||
MDRV_MACHINE_RESET(dynax)
|
||||
|
||||
MDRV_NVRAM_HANDLER(generic_0fill)
|
||||
MDRV_NVRAM_ADD_0FILL("nvram")
|
||||
|
||||
/* video hardware */
|
||||
MDRV_SCREEN_ADD("screen", RASTER)
|
||||
@ -5016,7 +5017,7 @@ static MACHINE_CONFIG_START( gekisha, dynax_state )
|
||||
MDRV_MACHINE_START(gekisha)
|
||||
MDRV_MACHINE_RESET(gekisha)
|
||||
|
||||
MDRV_NVRAM_HANDLER(generic_0fill)
|
||||
MDRV_NVRAM_ADD_0FILL("nvram")
|
||||
|
||||
/* video hardware */
|
||||
MDRV_SCREEN_ADD("screen", RASTER)
|
||||
|
@ -372,6 +372,7 @@ D
|
||||
#include "sound/msm5232.h"
|
||||
#include "sound/dac.h"
|
||||
#include "sound/samples.h"
|
||||
#include "machine/nvram.h"
|
||||
#include "includes/equites.h"
|
||||
|
||||
#define HVOLTAGE_DEBUG 0
|
||||
@ -696,7 +697,7 @@ static WRITE16_HANDLER( mcu_halt_clear_w )
|
||||
|
||||
static ADDRESS_MAP_START( equites_map, ADDRESS_SPACE_PROGRAM, 16 )
|
||||
AM_RANGE(0x000000, 0x00ffff) AM_ROM // ROM area is written several times (dev system?)
|
||||
AM_RANGE(0x040000, 0x040fff) AM_RAM AM_BASE_SIZE_GENERIC(nvram) // nvram is for gekisou only
|
||||
AM_RANGE(0x040000, 0x040fff) AM_RAM AM_SHARE("nvram") // nvram is for gekisou only
|
||||
AM_RANGE(0x080000, 0x080fff) AM_READWRITE(equites_fg_videoram_r, equites_fg_videoram_w) // 8-bit
|
||||
AM_RANGE(0x0c0000, 0x0c01ff) AM_RAM_WRITE(equites_bg_videoram_w) AM_BASE_MEMBER(equites_state, bg_videoram)
|
||||
AM_RANGE(0x0c0200, 0x0c0fff) AM_RAM
|
||||
@ -1274,7 +1275,7 @@ MACHINE_CONFIG_END
|
||||
static MACHINE_CONFIG_DERIVED( gekisou, equites )
|
||||
|
||||
// gekisou has battery-backed RAM to store settings
|
||||
MDRV_NVRAM_HANDLER(generic_0fill)
|
||||
MDRV_NVRAM_ADD_0FILL("nvram")
|
||||
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
|
@ -25,6 +25,7 @@ Todo:
|
||||
#include "emu.h"
|
||||
#include "cpu/z80/z80.h"
|
||||
#include "machine/laserdsc.h"
|
||||
#include "machine/nvram.h"
|
||||
|
||||
/* From daphne */
|
||||
#define PCB_CLOCK (18432000)
|
||||
@ -142,7 +143,7 @@ static WRITE8_HANDLER(nmi_line_w)
|
||||
/* PROGRAM MAPS */
|
||||
static ADDRESS_MAP_START( z80_0_mem, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
AM_RANGE(0x0000,0x3fff) AM_ROM
|
||||
AM_RANGE(0xe000,0xe7ff) AM_RAM AM_BASE_SIZE_GENERIC(nvram)
|
||||
AM_RANGE(0xe000,0xe7ff) AM_RAM AM_SHARE("nvram")
|
||||
AM_RANGE(0xf000,0xf3ff) AM_RAM AM_BASE(&tile_ram)
|
||||
AM_RANGE(0xf400,0xf7ff) AM_RAM AM_BASE(&tile_control_ram)
|
||||
ADDRESS_MAP_END
|
||||
@ -285,7 +286,7 @@ static MACHINE_CONFIG_START( esh, driver_device )
|
||||
MDRV_CPU_IO_MAP(z80_0_io)
|
||||
MDRV_CPU_VBLANK_INT("screen", vblank_callback_esh)
|
||||
|
||||
MDRV_NVRAM_HANDLER(generic_0fill)
|
||||
MDRV_NVRAM_ADD_0FILL("nvram")
|
||||
|
||||
MDRV_MACHINE_START(esh)
|
||||
|
||||
|
@ -27,6 +27,7 @@ Notes:
|
||||
#include "emu.h"
|
||||
#include "cpu/z80/z80.h"
|
||||
#include "sound/ay8910.h"
|
||||
#include "machine/nvram.h"
|
||||
|
||||
/* it uses the same palette layout as in naughtyb */
|
||||
PALETTE_INIT( naughtyb );
|
||||
@ -118,7 +119,7 @@ static WRITE8_HANDLER( b800_w )
|
||||
|
||||
static ADDRESS_MAP_START( cpu_map, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
AM_RANGE(0x0000, 0x7fff) AM_ROM
|
||||
AM_RANGE(0x8000, 0x87ff) AM_RAM AM_BASE_SIZE_GENERIC(nvram)
|
||||
AM_RANGE(0x8000, 0x87ff) AM_RAM AM_SHARE("nvram")
|
||||
AM_RANGE(0x9000, 0x9000) AM_WRITE(ettrivia_control_w)
|
||||
AM_RANGE(0x9800, 0x9800) AM_WRITENOP
|
||||
AM_RANGE(0xa000, 0xa000) AM_WRITENOP
|
||||
@ -243,7 +244,7 @@ static MACHINE_CONFIG_START( ettrivia, driver_device )
|
||||
MDRV_CPU_IO_MAP(io_map)
|
||||
MDRV_CPU_VBLANK_INT("screen", ettrivia_interrupt)
|
||||
|
||||
MDRV_NVRAM_HANDLER(generic_0fill)
|
||||
MDRV_NVRAM_ADD_0FILL("nvram")
|
||||
|
||||
/* video hardware */
|
||||
MDRV_SCREEN_ADD("screen", RASTER)
|
||||
|
@ -65,6 +65,7 @@
|
||||
#include "cpu/m6502/m6502.h"
|
||||
#include "sound/dac.h"
|
||||
#include "sound/2151intf.h"
|
||||
#include "machine/nvram.h"
|
||||
#include "includes/exterm.h"
|
||||
|
||||
|
||||
@ -298,7 +299,7 @@ static ADDRESS_MAP_START( master_map, ADDRESS_SPACE_PROGRAM, 16 )
|
||||
AM_RANGE(0x01580000, 0x015bffff) AM_MIRROR(0xfc000000) AM_WRITE(sound_latch_w)
|
||||
AM_RANGE(0x015c0000, 0x015fffff) AM_MIRROR(0xfc000000) AM_WRITE(watchdog_reset16_w)
|
||||
AM_RANGE(0x01800000, 0x01807fff) AM_MIRROR(0xfc7f8000) AM_RAM_WRITE(paletteram16_xRRRRRGGGGGBBBBB_word_w) AM_BASE_GENERIC(paletteram)
|
||||
AM_RANGE(0x02800000, 0x02807fff) AM_MIRROR(0xfc7f8000) AM_RAM AM_BASE_SIZE_GENERIC(nvram)
|
||||
AM_RANGE(0x02800000, 0x02807fff) AM_MIRROR(0xfc7f8000) AM_RAM AM_SHARE("nvram")
|
||||
AM_RANGE(0x03000000, 0x03ffffff) AM_MIRROR(0xfc000000) AM_ROM AM_REGION("user1", 0)
|
||||
ADDRESS_MAP_END
|
||||
|
||||
@ -465,7 +466,7 @@ static MACHINE_CONFIG_START( exterm, driver_device )
|
||||
|
||||
MDRV_QUANTUM_TIME(HZ(6000))
|
||||
|
||||
MDRV_NVRAM_HANDLER(generic_0fill)
|
||||
MDRV_NVRAM_ADD_0FILL("nvram")
|
||||
|
||||
MDRV_TIMER_ADD("snd_nmi_timer", master_sound_nmi_callback)
|
||||
|
||||
|
@ -77,6 +77,7 @@
|
||||
#include "cpu/m68000/m68000.h"
|
||||
#include "machine/atarigen.h"
|
||||
#include "sound/pokey.h"
|
||||
#include "machine/nvram.h"
|
||||
#include "includes/foodf.h"
|
||||
|
||||
|
||||
@ -91,7 +92,8 @@
|
||||
|
||||
static READ16_HANDLER( nvram_r )
|
||||
{
|
||||
return space->machine->generic.nvram.u16[offset] | 0xfff0;
|
||||
foodf_state *state = space->machine->driver_data<foodf_state>();
|
||||
return state->m_nvram[offset] | 0xfff0;
|
||||
}
|
||||
|
||||
|
||||
@ -216,7 +218,7 @@ static ADDRESS_MAP_START( main_map, ADDRESS_SPACE_PROGRAM, 16 )
|
||||
AM_RANGE(0x018000, 0x018fff) AM_MIRROR(0x3e3000) AM_RAM
|
||||
AM_RANGE(0x01c000, 0x01c0ff) AM_MIRROR(0x3e3f00) AM_RAM AM_BASE_GENERIC(spriteram)
|
||||
AM_RANGE(0x800000, 0x8007ff) AM_MIRROR(0x03f800) AM_RAM_WRITE(atarigen_playfield_w) AM_BASE_MEMBER(foodf_state, playfield)
|
||||
AM_RANGE(0x900000, 0x9001ff) AM_MIRROR(0x03fe00) AM_RAM_READ(nvram_r) AM_BASE_SIZE_GENERIC(nvram)
|
||||
AM_RANGE(0x900000, 0x9001ff) AM_MIRROR(0x03fe00) AM_RAM_READ(nvram_r) AM_SHARE("nvram")
|
||||
AM_RANGE(0x940000, 0x940007) AM_MIRROR(0x023ff8) AM_READ(analog_r)
|
||||
AM_RANGE(0x944000, 0x944007) AM_MIRROR(0x023ff8) AM_WRITE(analog_w)
|
||||
AM_RANGE(0x948000, 0x948001) AM_MIRROR(0x023ffe) AM_READ_PORT("SYSTEM") AM_WRITE(digital_w)
|
||||
@ -362,7 +364,7 @@ static MACHINE_CONFIG_START( foodf, foodf_state )
|
||||
|
||||
MDRV_MACHINE_START(foodf)
|
||||
MDRV_MACHINE_RESET(foodf)
|
||||
MDRV_NVRAM_HANDLER(generic_1fill)
|
||||
MDRV_NVRAM_ADD_1FILL("nvram")
|
||||
MDRV_WATCHDOG_VBLANK_INIT(8)
|
||||
|
||||
MDRV_TIMER_ADD("scan_timer", scanline_update)
|
||||
|
@ -743,6 +743,7 @@
|
||||
#include "video/mc6845.h"
|
||||
#include "machine/6821pia.h"
|
||||
#include "sound/ay8910.h"
|
||||
#include "machine/nvram.h"
|
||||
#include "jollycrd.lh"
|
||||
#include "bigdeal.lh"
|
||||
#include "royalcrd.lh"
|
||||
@ -790,7 +791,7 @@ static WRITE8_DEVICE_HANDLER(pia1_ca2_w)
|
||||
*************************/
|
||||
|
||||
static ADDRESS_MAP_START( funworld_map, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
AM_RANGE(0x0000, 0x07ff) AM_RAM AM_BASE_SIZE_GENERIC(nvram)
|
||||
AM_RANGE(0x0000, 0x07ff) AM_RAM AM_SHARE("nvram")
|
||||
AM_RANGE(0x0800, 0x0803) AM_DEVREADWRITE("pia0", pia6821_r, pia6821_w)
|
||||
AM_RANGE(0x0a00, 0x0a03) AM_DEVREADWRITE("pia1", pia6821_r, pia6821_w)
|
||||
AM_RANGE(0x0c00, 0x0c00) AM_DEVREAD("ay8910", ay8910_r)
|
||||
@ -824,7 +825,7 @@ static WRITE8_HANDLER( question_bank_w )
|
||||
}
|
||||
|
||||
static ADDRESS_MAP_START( funquiz_map, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
AM_RANGE(0x0000, 0x07ff) AM_RAM AM_BASE_SIZE_GENERIC(nvram)
|
||||
AM_RANGE(0x0000, 0x07ff) AM_RAM AM_SHARE("nvram")
|
||||
AM_RANGE(0x0800, 0x0803) AM_DEVREADWRITE("pia0", pia6821_r, pia6821_w)
|
||||
AM_RANGE(0x0a00, 0x0a03) AM_DEVREADWRITE("pia1", pia6821_r, pia6821_w)
|
||||
AM_RANGE(0x0c00, 0x0c00) AM_DEVREAD("ay8910", ay8910_r)
|
||||
@ -842,7 +843,7 @@ static ADDRESS_MAP_START( funquiz_map, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
ADDRESS_MAP_END
|
||||
|
||||
static ADDRESS_MAP_START( magicrd2_map, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
AM_RANGE(0x0000, 0x07ff) AM_RAM AM_BASE_SIZE_GENERIC(nvram)
|
||||
AM_RANGE(0x0000, 0x07ff) AM_RAM AM_SHARE("nvram")
|
||||
AM_RANGE(0x0800, 0x0803) AM_DEVREADWRITE("pia0", pia6821_r, pia6821_w)
|
||||
AM_RANGE(0x0a00, 0x0a03) AM_DEVREADWRITE("pia1", pia6821_r, pia6821_w)
|
||||
AM_RANGE(0x0c00, 0x0c00) AM_DEVREAD("ay8910", ay8910_r)
|
||||
@ -858,7 +859,7 @@ static ADDRESS_MAP_START( magicrd2_map, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
ADDRESS_MAP_END
|
||||
|
||||
static ADDRESS_MAP_START( cuoreuno_map, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
AM_RANGE(0x0000, 0x07ff) AM_RAM AM_BASE_SIZE_GENERIC(nvram)
|
||||
AM_RANGE(0x0000, 0x07ff) AM_RAM AM_SHARE("nvram")
|
||||
AM_RANGE(0x0800, 0x0803) AM_DEVREADWRITE("pia0", pia6821_r, pia6821_w)
|
||||
AM_RANGE(0x0a00, 0x0a03) AM_DEVREADWRITE("pia1", pia6821_r, pia6821_w)
|
||||
AM_RANGE(0x0c00, 0x0c00) AM_DEVREAD("ay8910", ay8910_r)
|
||||
@ -873,7 +874,7 @@ static ADDRESS_MAP_START( cuoreuno_map, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
ADDRESS_MAP_END
|
||||
|
||||
static ADDRESS_MAP_START( saloon_map, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
AM_RANGE(0x0000, 0x07ff) AM_RAM AM_BASE_SIZE_GENERIC(nvram)
|
||||
AM_RANGE(0x0000, 0x07ff) AM_RAM AM_SHARE("nvram")
|
||||
AM_RANGE(0x0800, 0x0800) AM_READ_PORT("IN0")
|
||||
AM_RANGE(0x0a01, 0x0a01) AM_READ_PORT("IN1")
|
||||
AM_RANGE(0x081c, 0x081c) AM_DEVWRITE("crtc", mc6845_address_w)
|
||||
@ -2111,7 +2112,7 @@ static MACHINE_CONFIG_START( fw1stpal, driver_device )
|
||||
MDRV_CPU_PROGRAM_MAP(funworld_map)
|
||||
MDRV_CPU_VBLANK_INT("screen", nmi_line_pulse)
|
||||
|
||||
MDRV_NVRAM_HANDLER(generic_0fill)
|
||||
MDRV_NVRAM_ADD_0FILL("nvram")
|
||||
|
||||
MDRV_PIA6821_ADD("pia0", pia0_intf)
|
||||
MDRV_PIA6821_ADD("pia1", pia1_intf)
|
||||
|
@ -42,6 +42,7 @@ Notes:
|
||||
#include "emu.h"
|
||||
#include "cpu/m68000/m68000.h"
|
||||
#include "sound/okim6295.h"
|
||||
#include "machine/nvram.h"
|
||||
#include "galaxi.lh"
|
||||
|
||||
class galaxi_state : public driver_device
|
||||
@ -286,7 +287,7 @@ static ADDRESS_MAP_START( galaxi_map, ADDRESS_SPACE_PROGRAM, 16 )
|
||||
|
||||
AM_RANGE(0x700000, 0x700001) AM_DEVREADWRITE8("oki", okim6295_r, okim6295_w, 0x00ff)
|
||||
|
||||
AM_RANGE(0x600000, 0x607fff) AM_RAM AM_BASE_SIZE_GENERIC(nvram) // 2x DS1230Y (non volatile SRAM)
|
||||
AM_RANGE(0x600000, 0x607fff) AM_RAM AM_SHARE("nvram") // 2x DS1230Y (non volatile SRAM)
|
||||
ADDRESS_MAP_END
|
||||
|
||||
/***************************************************************************
|
||||
@ -399,7 +400,7 @@ static MACHINE_CONFIG_START( galaxi, galaxi_state )
|
||||
|
||||
MDRV_MACHINE_START(galaxi)
|
||||
MDRV_MACHINE_RESET(galaxi)
|
||||
MDRV_NVRAM_HANDLER(generic_0fill)
|
||||
MDRV_NVRAM_ADD_0FILL("nvram")
|
||||
|
||||
/* video hardware */
|
||||
MDRV_SCREEN_ADD("screen", RASTER)
|
||||
|
@ -230,6 +230,7 @@
|
||||
#include "cpu/z80/z80.h"
|
||||
#include "sound/sn76496.h"
|
||||
#include "machine/8255ppi.h"
|
||||
#include "machine/nvram.h"
|
||||
#include "poker41.lh"
|
||||
#include "pulltabs.lh"
|
||||
#include "includes/gatron.h"
|
||||
@ -339,7 +340,7 @@ static const ppi8255_interface ppi8255_intf =
|
||||
static ADDRESS_MAP_START( gat_map, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
AM_RANGE(0x0000, 0x5fff) AM_ROM
|
||||
AM_RANGE(0x6000, 0x63ff) AM_RAM_WRITE(gat_videoram_w) AM_BASE_GENERIC(videoram)
|
||||
AM_RANGE(0x8000, 0x87ff) AM_RAM AM_BASE_SIZE_GENERIC(nvram) /* battery backed RAM */
|
||||
AM_RANGE(0x8000, 0x87ff) AM_RAM AM_SHARE("nvram") /* battery backed RAM */
|
||||
AM_RANGE(0xa000, 0xa000) AM_DEVWRITE("snsnd", sn76496_w) /* PSG */
|
||||
AM_RANGE(0xe000, 0xe000) AM_WRITE(output_port_0_w) /* lamps */
|
||||
ADDRESS_MAP_END
|
||||
@ -439,7 +440,7 @@ static MACHINE_CONFIG_START( gat, driver_device )
|
||||
MDRV_CPU_IO_MAP(gat_portmap)
|
||||
MDRV_CPU_VBLANK_INT("screen", nmi_line_pulse)
|
||||
|
||||
MDRV_NVRAM_HANDLER(generic_0fill)
|
||||
MDRV_NVRAM_ADD_0FILL("nvram")
|
||||
|
||||
MDRV_PPI8255_ADD( "ppi8255", ppi8255_intf )
|
||||
|
||||
|
@ -69,6 +69,7 @@ U.S.A. Trivia New Sports General Facts
|
||||
#include "cpu/z80/z80.h"
|
||||
#include "machine/8255ppi.h"
|
||||
#include "machine/ticket.h"
|
||||
#include "machine/nvram.h"
|
||||
#include "sound/dac.h"
|
||||
|
||||
static UINT8 drawctrl[3];
|
||||
@ -367,7 +368,7 @@ static WRITE8_HANDLER( signature2_w )
|
||||
static ADDRESS_MAP_START( getrivia_map, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
AM_RANGE(0x0000, 0x1fff) AM_ROM
|
||||
AM_RANGE(0x2000, 0x3fff) AM_ROMBANK("bank1")
|
||||
AM_RANGE(0x4000, 0x47ff) AM_RAM AM_BASE_SIZE_GENERIC(nvram)
|
||||
AM_RANGE(0x4000, 0x47ff) AM_RAM AM_SHARE("nvram")
|
||||
AM_RANGE(0x4800, 0x4803) AM_DEVREADWRITE("ppi8255_0", ppi8255_r, ppi8255_w)
|
||||
AM_RANGE(0x5000, 0x5003) AM_DEVREADWRITE("ppi8255_1", ppi8255_r, ppi8255_w)
|
||||
AM_RANGE(0x600f, 0x600f) AM_WRITE(banksel_5_1_w)
|
||||
@ -389,7 +390,7 @@ ADDRESS_MAP_END
|
||||
static ADDRESS_MAP_START( gselect_map, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
AM_RANGE(0x0000, 0x1fff) AM_ROM
|
||||
AM_RANGE(0x2000, 0x3fff) AM_ROMBANK("bank1")
|
||||
AM_RANGE(0x4000, 0x40ff) AM_RAM AM_BASE_SIZE_GENERIC(nvram)
|
||||
AM_RANGE(0x4000, 0x40ff) AM_RAM AM_SHARE("nvram")
|
||||
AM_RANGE(0x4400, 0x4400) AM_WRITE(banksel_1_1_w)
|
||||
AM_RANGE(0x4401, 0x4401) AM_WRITE(banksel_1_2_w)
|
||||
AM_RANGE(0x4402, 0x4402) AM_WRITE(banksel_2_1_w)
|
||||
@ -404,7 +405,7 @@ ADDRESS_MAP_END
|
||||
static ADDRESS_MAP_START( amuse_map, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
AM_RANGE(0x0000, 0x1fff) AM_ROM
|
||||
AM_RANGE(0x2000, 0x3fff) AM_ROMBANK("bank1")
|
||||
AM_RANGE(0x4000, 0x47ff) AM_RAM AM_BASE_SIZE_GENERIC(nvram)
|
||||
AM_RANGE(0x4000, 0x47ff) AM_RAM AM_SHARE("nvram")
|
||||
AM_RANGE(0x4800, 0x4803) AM_DEVREADWRITE("ppi8255_0", ppi8255_r, ppi8255_w)
|
||||
AM_RANGE(0x5000, 0x5003) AM_DEVREADWRITE("ppi8255_1", ppi8255_r, ppi8255_w)
|
||||
AM_RANGE(0x606f, 0x606f) AM_WRITE(banksel_5_1_w)
|
||||
@ -420,7 +421,7 @@ ADDRESS_MAP_END
|
||||
static ADDRESS_MAP_START( gepoker_map, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
AM_RANGE(0x0000, 0x1fff) AM_ROM
|
||||
AM_RANGE(0x2000, 0x3fff) AM_ROMBANK("bank1")
|
||||
AM_RANGE(0x4000, 0x47ff) AM_RAM AM_BASE_SIZE_GENERIC(nvram)
|
||||
AM_RANGE(0x4000, 0x47ff) AM_RAM AM_SHARE("nvram")
|
||||
AM_RANGE(0x4800, 0x4803) AM_DEVREADWRITE("ppi8255_0", ppi8255_r, ppi8255_w)
|
||||
AM_RANGE(0x5000, 0x5003) AM_DEVREADWRITE("ppi8255_1", ppi8255_r, ppi8255_w)
|
||||
AM_RANGE(0x60ef, 0x60ef) AM_WRITE(banksel_3_1_w)
|
||||
@ -437,7 +438,7 @@ ADDRESS_MAP_END
|
||||
static ADDRESS_MAP_START( amuse1_map, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
AM_RANGE(0x0000, 0x1fff) AM_ROM
|
||||
AM_RANGE(0x2000, 0x3fff) AM_ROMBANK("bank1")
|
||||
AM_RANGE(0x4000, 0x43ff) AM_RAM AM_BASE_SIZE_GENERIC(nvram)
|
||||
AM_RANGE(0x4000, 0x43ff) AM_RAM AM_SHARE("nvram")
|
||||
AM_RANGE(0x4400, 0x4400) AM_WRITE(banksel_1_1_w)
|
||||
AM_RANGE(0x4401, 0x4401) AM_WRITE(banksel_2_1_w)
|
||||
AM_RANGE(0x4402, 0x4402) AM_WRITE(banksel_3_1_w)
|
||||
@ -453,7 +454,7 @@ ADDRESS_MAP_END
|
||||
|
||||
static ADDRESS_MAP_START( findout_map, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
AM_RANGE(0x0000, 0x3fff) AM_ROM
|
||||
AM_RANGE(0x4000, 0x47ff) AM_RAM AM_BASE_SIZE_GENERIC(nvram)
|
||||
AM_RANGE(0x4000, 0x47ff) AM_RAM AM_SHARE("nvram")
|
||||
AM_RANGE(0x4800, 0x4803) AM_DEVREADWRITE("ppi8255_0", ppi8255_r,ppi8255_w)
|
||||
AM_RANGE(0x5000, 0x5003) AM_DEVREADWRITE("ppi8255_1", ppi8255_r,ppi8255_w)
|
||||
/* banked ROMs are enabled by low 6 bits of the address */
|
||||
@ -474,7 +475,7 @@ ADDRESS_MAP_END
|
||||
|
||||
static ADDRESS_MAP_START( quizvid_map, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
AM_RANGE(0x0000, 0x3fff) AM_ROM
|
||||
AM_RANGE(0x4000, 0x47ff) AM_RAM AM_BASE_SIZE_GENERIC(nvram)
|
||||
AM_RANGE(0x4000, 0x47ff) AM_RAM AM_SHARE("nvram")
|
||||
AM_RANGE(0x4800, 0x4803) AM_DEVREADWRITE("ppi8255_0", ppi8255_r,ppi8255_w)
|
||||
AM_RANGE(0x5000, 0x5003) AM_DEVREADWRITE("ppi8255_1", ppi8255_r,ppi8255_w)
|
||||
/* banked ROMs are enabled by low 6 bits of the address */
|
||||
@ -492,7 +493,7 @@ ADDRESS_MAP_END
|
||||
|
||||
static ADDRESS_MAP_START( suprpokr_map, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
AM_RANGE(0x0000, 0x3fff) AM_ROM
|
||||
AM_RANGE(0x4000, 0x47ff) AM_RAM AM_BASE_SIZE_GENERIC(nvram)
|
||||
AM_RANGE(0x4000, 0x47ff) AM_RAM AM_SHARE("nvram")
|
||||
AM_RANGE(0x4800, 0x4803) AM_DEVREADWRITE("ppi8255_0", ppi8255_r, ppi8255_w)
|
||||
AM_RANGE(0x5000, 0x5003) AM_DEVREADWRITE("ppi8255_1", ppi8255_r, ppi8255_w)
|
||||
AM_RANGE(0x6200, 0x6200) AM_WRITE(signature2_w)
|
||||
@ -504,7 +505,7 @@ ADDRESS_MAP_END
|
||||
|
||||
static ADDRESS_MAP_START( geimulti_map, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
AM_RANGE(0x0000, 0x3fff) AM_ROM
|
||||
AM_RANGE(0x4000, 0x47ff) AM_RAM AM_BASE_SIZE_GENERIC(nvram)
|
||||
AM_RANGE(0x4000, 0x47ff) AM_RAM AM_SHARE("nvram")
|
||||
AM_RANGE(0x4800, 0x4803) AM_DEVREADWRITE("ppi8255_0", ppi8255_r, ppi8255_w)
|
||||
AM_RANGE(0x5000, 0x5003) AM_DEVREADWRITE("ppi8255_1", ppi8255_r, ppi8255_w)
|
||||
AM_RANGE(0x5800, 0x5fff) AM_ROM
|
||||
@ -517,7 +518,7 @@ ADDRESS_MAP_END
|
||||
|
||||
static ADDRESS_MAP_START( sprtauth_map, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
AM_RANGE(0x0000, 0x3fff) AM_ROM
|
||||
AM_RANGE(0x4000, 0x47ff) AM_RAM AM_BASE_SIZE_GENERIC(nvram)
|
||||
AM_RANGE(0x4000, 0x47ff) AM_RAM AM_SHARE("nvram")
|
||||
AM_RANGE(0x4800, 0x4803) AM_DEVREADWRITE("ppi8255_0", ppi8255_r, ppi8255_w)
|
||||
AM_RANGE(0x5000, 0x5003) AM_DEVREADWRITE("ppi8255_1", ppi8255_r, ppi8255_w)
|
||||
AM_RANGE(0x5600, 0x5600) AM_READ(signature_r)
|
||||
@ -1062,7 +1063,7 @@ static MACHINE_CONFIG_START( getrivia, driver_device )
|
||||
MDRV_PALETTE_LENGTH(8)
|
||||
MDRV_PALETTE_INIT(gei)
|
||||
|
||||
MDRV_NVRAM_HANDLER(generic_0fill)
|
||||
MDRV_NVRAM_ADD_0FILL("nvram")
|
||||
|
||||
MDRV_VIDEO_START(generic_bitmapped)
|
||||
MDRV_VIDEO_UPDATE(generic_bitmapped)
|
||||
|
@ -187,6 +187,7 @@ TODO:
|
||||
#include "cpu/z80/z80.h"
|
||||
#include "sound/2203intf.h"
|
||||
#include "sound/msm5205.h"
|
||||
#include "machine/nvram.h"
|
||||
#include "includes/gladiatr.h"
|
||||
|
||||
|
||||
@ -377,7 +378,7 @@ static ADDRESS_MAP_START( ppking_cpu1_map, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
AM_RANGE(0xd800, 0xdfff) AM_RAM_WRITE(gladiatr_videoram_w) AM_BASE(&gladiatr_videoram)
|
||||
AM_RANGE(0xe000, 0xe7ff) AM_RAM_WRITE(gladiatr_colorram_w) AM_BASE(&gladiatr_colorram)
|
||||
AM_RANGE(0xe800, 0xefff) AM_RAM_WRITE(gladiatr_textram_w) AM_BASE(&gladiatr_textram)
|
||||
AM_RANGE(0xf000, 0xf7ff) AM_RAM AM_BASE_SIZE_GENERIC(nvram) /* battery backed RAM */
|
||||
AM_RANGE(0xf000, 0xf7ff) AM_RAM AM_SHARE("nvram") /* battery backed RAM */
|
||||
ADDRESS_MAP_END
|
||||
|
||||
|
||||
@ -415,7 +416,7 @@ static ADDRESS_MAP_START( gladiatr_cpu1_map, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
AM_RANGE(0xd800, 0xdfff) AM_RAM_WRITE(gladiatr_videoram_w) AM_BASE(&gladiatr_videoram)
|
||||
AM_RANGE(0xe000, 0xe7ff) AM_RAM_WRITE(gladiatr_colorram_w) AM_BASE(&gladiatr_colorram)
|
||||
AM_RANGE(0xe800, 0xefff) AM_RAM_WRITE(gladiatr_textram_w) AM_BASE(&gladiatr_textram)
|
||||
AM_RANGE(0xf000, 0xf7ff) AM_RAM AM_BASE_SIZE_GENERIC(nvram) /* battery backed RAM */
|
||||
AM_RANGE(0xf000, 0xf7ff) AM_RAM AM_SHARE("nvram") /* battery backed RAM */
|
||||
ADDRESS_MAP_END
|
||||
|
||||
static ADDRESS_MAP_START( cpu2_map, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
@ -659,7 +660,7 @@ static const msm5205_interface msm5205_config =
|
||||
|
||||
|
||||
|
||||
static MACHINE_CONFIG_START( ppking, driver_device )
|
||||
static MACHINE_CONFIG_START( ppking, gladiatr_state )
|
||||
|
||||
/* basic machine hardware */
|
||||
MDRV_CPU_ADD("maincpu", Z80, XTAL_12MHz/2) /* verified on pcb */
|
||||
@ -678,7 +679,7 @@ static MACHINE_CONFIG_START( ppking, driver_device )
|
||||
MDRV_QUANTUM_TIME(HZ(6000))
|
||||
|
||||
MDRV_MACHINE_RESET(ppking)
|
||||
MDRV_NVRAM_HANDLER(generic_0fill)
|
||||
MDRV_NVRAM_ADD_0FILL("nvram")
|
||||
|
||||
/* video hardware */
|
||||
MDRV_SCREEN_ADD("screen", RASTER)
|
||||
@ -709,7 +710,7 @@ static MACHINE_CONFIG_START( ppking, driver_device )
|
||||
MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.60)
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
static MACHINE_CONFIG_START( gladiatr, driver_device )
|
||||
static MACHINE_CONFIG_START( gladiatr, gladiatr_state )
|
||||
|
||||
/* basic machine hardware */
|
||||
MDRV_CPU_ADD("maincpu", Z80, XTAL_12MHz/2) /* verified on pcb */
|
||||
@ -727,7 +728,7 @@ static MACHINE_CONFIG_START( gladiatr, driver_device )
|
||||
MDRV_QUANTUM_TIME(HZ(600))
|
||||
|
||||
MDRV_MACHINE_RESET(gladiator)
|
||||
MDRV_NVRAM_HANDLER(generic_0fill)
|
||||
MDRV_NVRAM_ADD_0FILL("nvram")
|
||||
|
||||
/* video hardware */
|
||||
MDRV_SCREEN_ADD("screen", RASTER)
|
||||
@ -995,10 +996,11 @@ static DRIVER_INIT( gladiatr )
|
||||
|
||||
static READ8_HANDLER(f6a3_r)
|
||||
{
|
||||
gladiatr_state *state = space->machine->driver_data<gladiatr_state>();
|
||||
if(cpu_get_previouspc(space->cpu)==0x8e)
|
||||
space->machine->generic.nvram.u8[0x6a3]=1;
|
||||
state->m_nvram[0x6a3]=1;
|
||||
|
||||
return space->machine->generic.nvram.u8[0x6a3];
|
||||
return state->m_nvram[0x6a3];
|
||||
}
|
||||
|
||||
static DRIVER_INIT(ppking)
|
||||
|
@ -622,6 +622,7 @@
|
||||
#include "video/mc6845.h"
|
||||
#include "machine/6821pia.h"
|
||||
#include "sound/discrete.h"
|
||||
#include "machine/nvram.h"
|
||||
|
||||
#include "pmpoker.lh"
|
||||
#include "goldnpkr.lh"
|
||||
@ -896,7 +897,7 @@ static WRITE8_DEVICE_HANDLER( sound_w )
|
||||
|
||||
static ADDRESS_MAP_START( goldnpkr_map, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
ADDRESS_MAP_GLOBAL_MASK(0x7fff)
|
||||
AM_RANGE(0x0000, 0x07ff) AM_RAM AM_BASE_SIZE_GENERIC(nvram) /* battery backed RAM */
|
||||
AM_RANGE(0x0000, 0x07ff) AM_RAM AM_SHARE("nvram") /* battery backed RAM */
|
||||
AM_RANGE(0x0800, 0x0800) AM_DEVWRITE("crtc", mc6845_address_w)
|
||||
AM_RANGE(0x0801, 0x0801) AM_DEVREADWRITE("crtc", mc6845_register_r, mc6845_register_w)
|
||||
AM_RANGE(0x0844, 0x0847) AM_DEVREADWRITE("pia0", pia6821_r, pia6821_w)
|
||||
@ -908,7 +909,7 @@ ADDRESS_MAP_END
|
||||
|
||||
static ADDRESS_MAP_START( pottnpkr_map, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
ADDRESS_MAP_GLOBAL_MASK(0x3fff)
|
||||
AM_RANGE(0x0000, 0x07ff) AM_RAM AM_BASE_SIZE_GENERIC(nvram) /* battery backed RAM */
|
||||
AM_RANGE(0x0000, 0x07ff) AM_RAM AM_SHARE("nvram") /* battery backed RAM */
|
||||
AM_RANGE(0x0800, 0x0800) AM_DEVWRITE("crtc", mc6845_address_w)
|
||||
AM_RANGE(0x0801, 0x0801) AM_DEVREADWRITE("crtc", mc6845_register_r, mc6845_register_w)
|
||||
AM_RANGE(0x0844, 0x0847) AM_DEVREADWRITE("pia0", pia6821_r, pia6821_w)
|
||||
@ -920,7 +921,7 @@ ADDRESS_MAP_END
|
||||
|
||||
static ADDRESS_MAP_START( witchcrd_map, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
ADDRESS_MAP_GLOBAL_MASK(0x7fff)
|
||||
AM_RANGE(0x0000, 0x07ff) AM_RAM AM_BASE_SIZE_GENERIC(nvram) /* battery backed RAM */
|
||||
AM_RANGE(0x0000, 0x07ff) AM_RAM AM_SHARE("nvram") /* battery backed RAM */
|
||||
AM_RANGE(0x0800, 0x0800) AM_DEVWRITE("crtc", mc6845_address_w)
|
||||
AM_RANGE(0x0801, 0x0801) AM_DEVREADWRITE("crtc", mc6845_register_r, mc6845_register_w)
|
||||
AM_RANGE(0x0844, 0x0847) AM_DEVREADWRITE("pia0", pia6821_r, pia6821_w)
|
||||
@ -946,7 +947,7 @@ ADDRESS_MAP_END
|
||||
|
||||
static ADDRESS_MAP_START( genie_map, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
ADDRESS_MAP_GLOBAL_MASK(0x3fff)
|
||||
AM_RANGE(0x0000, 0x07ff) AM_RAM AM_BASE_SIZE_GENERIC(nvram) /* battery backed RAM */
|
||||
AM_RANGE(0x0000, 0x07ff) AM_RAM AM_SHARE("nvram") /* battery backed RAM */
|
||||
AM_RANGE(0x0800, 0x0800) AM_DEVWRITE("crtc", mc6845_address_w)
|
||||
AM_RANGE(0x0801, 0x0801) AM_DEVREADWRITE("crtc", mc6845_register_r, mc6845_register_w)
|
||||
AM_RANGE(0x0844, 0x0847) AM_DEVREADWRITE("pia0", pia6821_r, pia6821_w)
|
||||
@ -2294,7 +2295,7 @@ static MACHINE_CONFIG_START( goldnpkr_base, driver_device )
|
||||
MDRV_CPU_PROGRAM_MAP(goldnpkr_map)
|
||||
MDRV_CPU_VBLANK_INT("screen", nmi_line_pulse)
|
||||
|
||||
MDRV_NVRAM_HANDLER(generic_0fill)
|
||||
MDRV_NVRAM_ADD_0FILL("nvram")
|
||||
|
||||
MDRV_PIA6821_ADD("pia0", goldnpkr_pia0_intf)
|
||||
MDRV_PIA6821_ADD("pia1", goldnpkr_pia1_intf)
|
||||
|
@ -201,6 +201,7 @@ VBlank duration: 1/VSYNC * (16/256) = 1017.6 us
|
||||
#include "sound/dac.h"
|
||||
#include "sound/samples.h"
|
||||
#include "sound/sp0250.h"
|
||||
#include "machine/nvram.h"
|
||||
#include "streams.h"
|
||||
#include "includes/gottlieb.h"
|
||||
|
||||
@ -735,7 +736,7 @@ ADDRESS_MAP_END
|
||||
|
||||
static ADDRESS_MAP_START( gottlieb_map, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
ADDRESS_MAP_GLOBAL_MASK(0xffff)
|
||||
AM_RANGE(0x0000, 0x0fff) AM_RAM AM_BASE_SIZE_GENERIC(nvram)
|
||||
AM_RANGE(0x0000, 0x0fff) AM_RAM AM_SHARE("nvram")
|
||||
AM_RANGE(0x1000, 0x1fff) AM_RAM AM_REGION("maincpu", 0x1000) /* or ROM */
|
||||
AM_RANGE(0x2000, 0x2fff) AM_RAM AM_REGION("maincpu", 0x2000) /* or ROM */
|
||||
AM_RANGE(0x3000, 0x30ff) AM_MIRROR(0x0700) AM_WRITEONLY AM_BASE_GENERIC(spriteram) /* FRSEL */
|
||||
@ -1924,7 +1925,7 @@ static MACHINE_CONFIG_START( gottlieb_core, driver_device )
|
||||
|
||||
MDRV_MACHINE_START(gottlieb)
|
||||
MDRV_MACHINE_RESET(gottlieb)
|
||||
MDRV_NVRAM_HANDLER(generic_1fill)
|
||||
MDRV_NVRAM_ADD_1FILL("nvram")
|
||||
MDRV_WATCHDOG_VBLANK_INIT(16)
|
||||
|
||||
/* video hardware */
|
||||
|
@ -82,6 +82,7 @@
|
||||
#include "includes/gridlee.h"
|
||||
#include "includes/balsente.h"
|
||||
#include "sound/samples.h"
|
||||
#include "machine/nvram.h"
|
||||
|
||||
|
||||
/* constants */
|
||||
@ -331,7 +332,7 @@ static ADDRESS_MAP_START( cpu1_map, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
AM_RANGE(0x9700, 0x9700) AM_READ_PORT("IN2") AM_WRITENOP
|
||||
AM_RANGE(0x9820, 0x9820) AM_READ(random_num_r)
|
||||
AM_RANGE(0x9828, 0x993f) AM_WRITE(gridlee_sound_w)
|
||||
AM_RANGE(0x9c00, 0x9cff) AM_RAM AM_BASE_SIZE_GENERIC(nvram)
|
||||
AM_RANGE(0x9c00, 0x9cff) AM_RAM AM_SHARE("nvram")
|
||||
AM_RANGE(0xa000, 0xffff) AM_ROM
|
||||
ADDRESS_MAP_END
|
||||
|
||||
@ -441,7 +442,7 @@ static MACHINE_CONFIG_START( gridlee, driver_device )
|
||||
|
||||
MDRV_MACHINE_START(gridlee)
|
||||
MDRV_MACHINE_RESET(gridlee)
|
||||
MDRV_NVRAM_HANDLER(generic_0fill)
|
||||
MDRV_NVRAM_ADD_0FILL("nvram")
|
||||
|
||||
/* video hardware */
|
||||
MDRV_SCREEN_ADD("screen", RASTER)
|
||||
|
@ -123,6 +123,7 @@ RAM4 is HMC HM6264LP-70
|
||||
#include "emu.h"
|
||||
#include "cpu/e132xs/e132xs.h"
|
||||
#include "sound/okim6295.h"
|
||||
#include "machine/nvram.h"
|
||||
|
||||
class gstream_state : public driver_device
|
||||
{
|
||||
@ -269,7 +270,7 @@ static ADDRESS_MAP_START( gstream_32bit_map, ADDRESS_SPACE_PROGRAM, 32 )
|
||||
AM_RANGE(0x4FA00000, 0x4FA00003) AM_WRITE(gstream_tilemap1_scrolly_w)
|
||||
AM_RANGE(0x4FC00000, 0x4FC00003) AM_WRITE(gstream_tilemap2_scrollx_w)
|
||||
AM_RANGE(0x4FE00000, 0x4FE00003) AM_WRITE(gstream_tilemap2_scrolly_w)
|
||||
AM_RANGE(0xFFC00000, 0xFFC01FFF) AM_RAM AM_BASE_SIZE_GENERIC(nvram) // Backup RAM
|
||||
AM_RANGE(0xFFC00000, 0xFFC01FFF) AM_RAM AM_SHARE("nvram") // Backup RAM
|
||||
AM_RANGE(0xFFF80000, 0xFFFFFFFF) AM_ROM AM_REGION("user1",0) // boot rom
|
||||
ADDRESS_MAP_END
|
||||
|
||||
@ -557,7 +558,7 @@ static MACHINE_CONFIG_START( gstream, gstream_state )
|
||||
MDRV_MACHINE_START(gstream)
|
||||
MDRV_MACHINE_RESET(gstream)
|
||||
|
||||
MDRV_NVRAM_HANDLER(generic_1fill)
|
||||
MDRV_NVRAM_ADD_1FILL("nvram")
|
||||
|
||||
/* video hardware */
|
||||
MDRV_SCREEN_ADD("screen", RASTER)
|
||||
|
@ -86,6 +86,7 @@ Game is V30 based, with rom banking (2Mb)
|
||||
#include "cpu/nec/nec.h"
|
||||
#include "cpu/i86/i86.h"
|
||||
#include "sound/okim6376.h"
|
||||
#include "machine/nvram.h"
|
||||
#include "fashion.lh"
|
||||
|
||||
static UINT16 *blit_ram;
|
||||
@ -255,7 +256,7 @@ static WRITE16_HANDLER( write1_w )
|
||||
|
||||
static ADDRESS_MAP_START( tv_vcf_map, ADDRESS_SPACE_PROGRAM, 16 )
|
||||
AM_RANGE(0x00000, 0x003ff) AM_RAM /*irq vector area*/
|
||||
AM_RANGE(0x00400, 0x03fff) AM_RAM AM_BASE_SIZE_GENERIC( nvram )
|
||||
AM_RANGE(0x00400, 0x03fff) AM_RAM AM_SHARE("nvram")
|
||||
AM_RANGE(0x40000, 0x4ffff) AM_RAM AM_BASE(&blit_ram) /*blitter ram*/
|
||||
AM_RANGE(0x80000, 0xbffff) AM_ROMBANK("bank1")
|
||||
AM_RANGE(0xc0000, 0xfffff) AM_ROM AM_REGION("boot_prg",0)
|
||||
@ -294,7 +295,7 @@ static WRITE16_DEVICE_HANDLER( tv_ncf_oki6395_w )
|
||||
}
|
||||
static ADDRESS_MAP_START( tv_ncf_map, ADDRESS_SPACE_PROGRAM, 16 )
|
||||
AM_RANGE(0x00000, 0x003ff) AM_RAM /*irq vector area*/
|
||||
AM_RANGE(0x00400, 0x03fff) AM_RAM AM_BASE_SIZE_GENERIC( nvram )
|
||||
AM_RANGE(0x00400, 0x03fff) AM_RAM AM_SHARE("nvram")
|
||||
AM_RANGE(0x20000, 0x2ffff) AM_RAM AM_BASE(&blit_ram) /*blitter ram*/
|
||||
AM_RANGE(0x40000, 0xbffff) AM_ROM AM_REGION("user1",0x40000)
|
||||
AM_RANGE(0xc0000, 0xfffff) AM_ROM AM_REGION("boot_prg",0)
|
||||
@ -337,7 +338,7 @@ static WRITE16_HANDLER( tv_tcf_bankselect_w )
|
||||
|
||||
static ADDRESS_MAP_START( tv_tcf_map, ADDRESS_SPACE_PROGRAM, 16 )
|
||||
AM_RANGE(0x00000, 0x003ff) AM_RAM /*irq vector area*/
|
||||
AM_RANGE(0x00400, 0x03fff) AM_RAM AM_BASE_SIZE_GENERIC( nvram )
|
||||
AM_RANGE(0x00400, 0x03fff) AM_RAM AM_SHARE("nvram")
|
||||
AM_RANGE(0x40000, 0x5d4bf) AM_RAM AM_BASE(&blit_ram) /*blitter ram*/
|
||||
AM_RANGE(0x7fe00, 0x7ffff) AM_RAM_WRITE( tv_tcf_paletteram_w ) AM_BASE_GENERIC(paletteram)
|
||||
AM_RANGE(0x80000, 0xbffff) AM_ROMBANK("bank1")
|
||||
@ -395,7 +396,7 @@ static WRITE16_HANDLER( write2_w )
|
||||
|
||||
static ADDRESS_MAP_START( newmcard_map, ADDRESS_SPACE_PROGRAM, 16 )
|
||||
AM_RANGE(0x00000, 0x003ff) AM_RAM /*irq vector area*/
|
||||
AM_RANGE(0x00400, 0x0ffff) AM_RAM AM_BASE_SIZE_GENERIC( nvram )
|
||||
AM_RANGE(0x00400, 0x0ffff) AM_RAM AM_SHARE("nvram")
|
||||
AM_RANGE(0x40000, 0x7ffff) AM_RAM AM_BASE(&blit_ram) /*blitter ram*/
|
||||
AM_RANGE(0x80000, 0xbffff) AM_ROMBANK("bank1")
|
||||
AM_RANGE(0xc0000, 0xfffff) AM_ROM AM_REGION("boot_prg",0)
|
||||
@ -463,7 +464,7 @@ static WRITE16_HANDLER( brasil_status_w )
|
||||
|
||||
static ADDRESS_MAP_START( brasil_map, ADDRESS_SPACE_PROGRAM, 16 )
|
||||
AM_RANGE(0x00000, 0x003ff) AM_RAM /*irq vector area*/
|
||||
AM_RANGE(0x00400, 0x0ffff) AM_RAM AM_BASE_SIZE_GENERIC( nvram )
|
||||
AM_RANGE(0x00400, 0x0ffff) AM_RAM AM_SHARE("nvram")
|
||||
AM_RANGE(0x40000, 0x7ffff) AM_RAM AM_BASE(&blit_ram) /*blitter ram*/
|
||||
AM_RANGE(0x80000, 0xbffff) AM_ROMBANK("bank1")
|
||||
AM_RANGE(0xc0000, 0xfffff) AM_ROM AM_REGION("boot_prg",0)
|
||||
@ -871,7 +872,7 @@ static MACHINE_CONFIG_START( tv_vcf, driver_device )
|
||||
MDRV_CPU_IO_MAP(tv_vcf_io)
|
||||
MDRV_CPU_VBLANK_INT("screen", vblank_irq)
|
||||
|
||||
MDRV_NVRAM_HANDLER(generic_0fill)
|
||||
MDRV_NVRAM_ADD_0FILL("nvram")
|
||||
|
||||
MDRV_SCREEN_ADD("screen", RASTER)
|
||||
MDRV_SCREEN_REFRESH_RATE(60)
|
||||
@ -938,7 +939,7 @@ static MACHINE_CONFIG_START( brasil, driver_device )
|
||||
MDRV_CPU_IO_MAP(brasil_io)
|
||||
MDRV_CPU_VBLANK_INT("screen", vblank_irq)
|
||||
|
||||
MDRV_NVRAM_HANDLER(generic_0fill)
|
||||
MDRV_NVRAM_ADD_0FILL("nvram")
|
||||
|
||||
MDRV_SCREEN_ADD("screen", RASTER)
|
||||
MDRV_SCREEN_REFRESH_RATE(60)
|
||||
|
@ -36,6 +36,7 @@ TODO:
|
||||
#include "cpu/z80/z80.h"
|
||||
#include "sound/2203intf.h"
|
||||
#include "sound/msm5205.h"
|
||||
#include "machine/nvram.h"
|
||||
#include "includes/hnayayoi.h"
|
||||
|
||||
|
||||
@ -91,7 +92,7 @@ static WRITE8_DEVICE_HANDLER( adpcm_reset_inv_w )
|
||||
|
||||
static ADDRESS_MAP_START( hnayayoi_map, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
AM_RANGE(0x0000, 0x77ff) AM_ROM
|
||||
AM_RANGE(0x7800, 0x7fff) AM_RAM AM_BASE_SIZE_GENERIC(nvram)
|
||||
AM_RANGE(0x7800, 0x7fff) AM_RAM AM_SHARE("nvram")
|
||||
AM_RANGE(0x8000, 0xffff) AM_ROM
|
||||
ADDRESS_MAP_END
|
||||
|
||||
@ -117,7 +118,7 @@ ADDRESS_MAP_END
|
||||
|
||||
static ADDRESS_MAP_START( hnfubuki_map, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
AM_RANGE(0x0000, 0x77ff) AM_ROM
|
||||
AM_RANGE(0x7800, 0x7fff) AM_RAM AM_BASE_SIZE_GENERIC(nvram)
|
||||
AM_RANGE(0x7800, 0x7fff) AM_RAM AM_SHARE("nvram")
|
||||
AM_RANGE(0x8000, 0xfeff) AM_ROM
|
||||
AM_RANGE(0xff00, 0xff01) AM_DEVWRITE("ymsnd", ym2203_w)
|
||||
AM_RANGE(0xff02, 0xff03) AM_DEVREAD("ymsnd", ym2203_r)
|
||||
@ -139,7 +140,7 @@ ADDRESS_MAP_END
|
||||
|
||||
static ADDRESS_MAP_START( untoucha_map, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
AM_RANGE(0x0000, 0x77ff) AM_ROM
|
||||
AM_RANGE(0x7800, 0x7fff) AM_RAM AM_BASE_SIZE_GENERIC(nvram)
|
||||
AM_RANGE(0x7800, 0x7fff) AM_RAM AM_SHARE("nvram")
|
||||
AM_RANGE(0x8000, 0xffff) AM_ROM
|
||||
ADDRESS_MAP_END
|
||||
|
||||
@ -565,7 +566,7 @@ static MACHINE_CONFIG_START( hnayayoi, hnayayoi_state )
|
||||
MDRV_MACHINE_START(hnayayoi)
|
||||
MDRV_MACHINE_RESET(hnayayoi)
|
||||
|
||||
MDRV_NVRAM_HANDLER(generic_0fill)
|
||||
MDRV_NVRAM_ADD_0FILL("nvram")
|
||||
|
||||
/* video hardware */
|
||||
MDRV_SCREEN_ADD("screen", RASTER)
|
||||
|
@ -445,6 +445,7 @@ or Fatal Fury for example).
|
||||
#include "cpu/nec/nec.h"
|
||||
#include "deprecat.h"
|
||||
#include "cpu/mips/mips3.h"
|
||||
#include "machine/nvram.h"
|
||||
#include "includes/hng64.h"
|
||||
|
||||
|
||||
@ -1049,7 +1050,7 @@ static ADDRESS_MAP_START( hng_map, ADDRESS_SPACE_PROGRAM, 32 )
|
||||
AM_RANGE(0x1f700000, 0x1f702fff) AM_READWRITE(hng64_sysregs_r, hng64_sysregs_w) AM_BASE_MEMBER(hng64_state, sysregs)
|
||||
|
||||
// SRAM. Coin data, Player Statistics, etc.
|
||||
AM_RANGE(0x1F800000, 0x1F803fff) AM_RAM AM_BASE_SIZE_GENERIC(nvram)
|
||||
AM_RANGE(0x1F800000, 0x1F803fff) AM_RAM AM_SHARE("nvram")
|
||||
|
||||
// Dualport RAM
|
||||
AM_RANGE(0x1F808000, 0x1F8087ff) AM_READWRITE(hng64_dualport_r, hng64_dualport_w) AM_BASE_MEMBER(hng64_state, dualport)
|
||||
@ -1729,7 +1730,7 @@ static MACHINE_CONFIG_START( hng64, hng64_state )
|
||||
MDRV_CPU_PROGRAM_MAP(hng_comm_map)
|
||||
MDRV_CPU_IO_MAP(hng_comm_io_map)
|
||||
|
||||
MDRV_NVRAM_HANDLER(generic_0fill)
|
||||
MDRV_NVRAM_ADD_0FILL("nvram")
|
||||
|
||||
MDRV_GFXDECODE(hng64)
|
||||
MDRV_MACHINE_START(hyperneo)
|
||||
|
@ -14,6 +14,7 @@
|
||||
#include "emu.h"
|
||||
#include "cpu/z80/z80.h"
|
||||
#include "sound/ay8910.h"
|
||||
#include "machine/nvram.h"
|
||||
#include "includes/holeland.h"
|
||||
|
||||
|
||||
@ -30,7 +31,7 @@ ADDRESS_MAP_END
|
||||
|
||||
static ADDRESS_MAP_START( crzrally_map, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
AM_RANGE(0x0000, 0xbfff) AM_ROM
|
||||
AM_RANGE(0xc000, 0xc7ff) AM_RAM AM_BASE_SIZE_GENERIC(nvram)
|
||||
AM_RANGE(0xc000, 0xc7ff) AM_RAM AM_SHARE("nvram")
|
||||
AM_RANGE(0xe000, 0xe3ff) AM_WRITE(holeland_colorram_w) AM_BASE_MEMBER(holeland_state, colorram)
|
||||
AM_RANGE(0xe400, 0xe7ff) AM_WRITE(holeland_videoram_w) AM_BASE_SIZE_MEMBER(holeland_state, videoram, videoram_size)
|
||||
AM_RANGE(0xe800, 0xebff) AM_RAM AM_BASE_SIZE_MEMBER(holeland_state, spriteram, spriteram_size)
|
||||
@ -350,7 +351,7 @@ static MACHINE_CONFIG_START( crzrally, holeland_state )
|
||||
MDRV_CPU_IO_MAP(io_map)
|
||||
MDRV_CPU_VBLANK_INT("screen", irq0_line_hold)
|
||||
|
||||
MDRV_NVRAM_HANDLER(generic_1fill)
|
||||
MDRV_NVRAM_ADD_1FILL("nvram")
|
||||
|
||||
/* video hardware */
|
||||
MDRV_SCREEN_ADD("screen", RASTER)
|
||||
|
@ -14,6 +14,7 @@ Based on drivers from Juno First emulator by Chris Hardy (chrish@kcbbs.gen.nz)
|
||||
#include "sound/sn76496.h"
|
||||
#include "sound/vlm5030.h"
|
||||
#include "machine/konami1.h"
|
||||
#include "machine/nvram.h"
|
||||
#include "includes/konamipt.h"
|
||||
#include "includes/trackfld.h"
|
||||
|
||||
@ -41,7 +42,7 @@ static ADDRESS_MAP_START( hyperspt_map, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
AM_RANGE(0x2000, 0x27ff) AM_RAM_WRITE(hyperspt_videoram_w) AM_BASE_MEMBER(trackfld_state, videoram)
|
||||
AM_RANGE(0x2800, 0x2fff) AM_RAM_WRITE(hyperspt_colorram_w) AM_BASE_MEMBER(trackfld_state, colorram)
|
||||
AM_RANGE(0x3000, 0x37ff) AM_RAM
|
||||
AM_RANGE(0x3800, 0x3fff) AM_RAM AM_BASE_SIZE_GENERIC(nvram)
|
||||
AM_RANGE(0x3800, 0x3fff) AM_RAM AM_SHARE("nvram")
|
||||
AM_RANGE(0x4000, 0xffff) AM_ROM
|
||||
ADDRESS_MAP_END
|
||||
|
||||
@ -62,7 +63,7 @@ static ADDRESS_MAP_START( roadf_map, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
AM_RANGE(0x2000, 0x27ff) AM_RAM_WRITE(hyperspt_videoram_w) AM_BASE_MEMBER(trackfld_state, videoram)
|
||||
AM_RANGE(0x2800, 0x2fff) AM_RAM_WRITE(hyperspt_colorram_w) AM_BASE_MEMBER(trackfld_state, colorram)
|
||||
AM_RANGE(0x3000, 0x37ff) AM_RAM
|
||||
AM_RANGE(0x3800, 0x3fff) AM_RAM AM_BASE_SIZE_GENERIC(nvram)
|
||||
AM_RANGE(0x3800, 0x3fff) AM_RAM AM_SHARE("nvram")
|
||||
AM_RANGE(0x4000, 0xffff) AM_ROM
|
||||
ADDRESS_MAP_END
|
||||
|
||||
@ -322,7 +323,7 @@ static MACHINE_CONFIG_START( hyperspt, trackfld_state )
|
||||
|
||||
MDRV_MACHINE_START(hyperspt)
|
||||
MDRV_MACHINE_RESET(hyperspt)
|
||||
MDRV_NVRAM_HANDLER(generic_0fill)
|
||||
MDRV_NVRAM_ADD_0FILL("nvram")
|
||||
|
||||
/* video hardware */
|
||||
MDRV_SCREEN_ADD("screen", RASTER)
|
||||
|
@ -20,6 +20,7 @@ NVRAM : Battery for main RAM
|
||||
#include "machine/8255ppi.h"
|
||||
#include "sound/2413intf.h"
|
||||
#include "sound/okim6295.h"
|
||||
#include "machine/nvram.h"
|
||||
|
||||
/***************************************************************************
|
||||
Video Hardware
|
||||
@ -409,7 +410,7 @@ static READ8_HANDLER( jingbell_magic_r )
|
||||
|
||||
static ADDRESS_MAP_START( jingbell_map, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
AM_RANGE( 0x00000, 0x0f3ff ) AM_ROM
|
||||
AM_RANGE( 0x0f400, 0x0ffff ) AM_RAM AM_BASE_SIZE_GENERIC( nvram )
|
||||
AM_RANGE( 0x0f400, 0x0ffff ) AM_RAM AM_SHARE("nvram")
|
||||
ADDRESS_MAP_END
|
||||
|
||||
static ADDRESS_MAP_START( jingbell_portmap, ADDRESS_SPACE_IO, 8 )
|
||||
@ -639,7 +640,7 @@ static MACHINE_CONFIG_START( jingbell, driver_device )
|
||||
|
||||
MDRV_MACHINE_RESET(jingbell)
|
||||
|
||||
MDRV_NVRAM_HANDLER(generic_0fill)
|
||||
MDRV_NVRAM_ADD_0FILL("nvram")
|
||||
|
||||
/* video hardware */
|
||||
MDRV_SCREEN_ADD("screen", RASTER)
|
||||
|
@ -67,6 +67,7 @@ Notes:
|
||||
#include "sound/2413intf.h"
|
||||
#include "sound/3812intf.h"
|
||||
#include "sound/ics2115.h"
|
||||
#include "machine/nvram.h"
|
||||
|
||||
#define LOG_BLITTER 0
|
||||
|
||||
@ -2007,7 +2008,7 @@ static ADDRESS_MAP_START( drgnwrld, ADDRESS_SPACE_PROGRAM, 16 )
|
||||
// AM_RANGE( 0x01dd78, 0x01dd79 ) AM_READ ( igs011_prot1_r )
|
||||
|
||||
AM_RANGE( 0x000000, 0x07ffff ) AM_ROM
|
||||
AM_RANGE( 0x100000, 0x103fff ) AM_RAM AM_BASE_SIZE_GENERIC( nvram )
|
||||
AM_RANGE( 0x100000, 0x103fff ) AM_RAM AM_SHARE("nvram")
|
||||
AM_RANGE( 0x200000, 0x200fff ) AM_RAM AM_BASE( &igs011_priority_ram )
|
||||
AM_RANGE( 0x400000, 0x401fff ) AM_RAM_WRITE( igs011_palette ) AM_BASE_GENERIC( paletteram )
|
||||
AM_RANGE( 0x500000, 0x500001 ) AM_READ_PORT( "COIN" )
|
||||
@ -2093,7 +2094,7 @@ static ADDRESS_MAP_START( lhb, ADDRESS_SPACE_PROGRAM, 16 )
|
||||
// no reset
|
||||
|
||||
AM_RANGE( 0x000000, 0x07ffff ) AM_ROM
|
||||
AM_RANGE( 0x100000, 0x103fff ) AM_RAM AM_BASE_SIZE_GENERIC( nvram )
|
||||
AM_RANGE( 0x100000, 0x103fff ) AM_RAM AM_SHARE("nvram")
|
||||
AM_RANGE( 0x200000, 0x200fff ) AM_RAM AM_BASE( &igs011_priority_ram )
|
||||
AM_RANGE( 0x300000, 0x3fffff ) AM_READWRITE( igs011_layers_r, igs011_layers_w )
|
||||
AM_RANGE( 0x400000, 0x401fff ) AM_RAM_WRITE( igs011_palette ) AM_BASE_GENERIC( paletteram )
|
||||
@ -2134,7 +2135,7 @@ static ADDRESS_MAP_START( xymg, ADDRESS_SPACE_PROGRAM, 16 )
|
||||
|
||||
AM_RANGE( 0x000000, 0x07ffff ) AM_ROM
|
||||
AM_RANGE( 0x100000, 0x103fff ) AM_RAM
|
||||
AM_RANGE( 0x1f0000, 0x1f3fff ) AM_RAM AM_BASE_SIZE_GENERIC( nvram ) // extra ram
|
||||
AM_RANGE( 0x1f0000, 0x1f3fff ) AM_RAM AM_SHARE("nvram") // extra ram
|
||||
AM_RANGE( 0x200000, 0x200fff ) AM_RAM AM_BASE( &igs011_priority_ram )
|
||||
AM_RANGE( 0x300000, 0x3fffff ) AM_READWRITE( igs011_layers_r, igs011_layers_w )
|
||||
AM_RANGE( 0x400000, 0x401fff ) AM_RAM_WRITE( igs011_palette ) AM_BASE_GENERIC( paletteram )
|
||||
@ -2170,7 +2171,7 @@ static ADDRESS_MAP_START( wlcc, ADDRESS_SPACE_PROGRAM, 16 )
|
||||
AM_RANGE( 0x519000, 0x5195ff ) AM_READ ( lhb_igs011_prot2_r ) // read
|
||||
|
||||
AM_RANGE( 0x000000, 0x07ffff ) AM_ROM
|
||||
AM_RANGE( 0x100000, 0x103fff ) AM_RAM AM_BASE_SIZE_GENERIC( nvram )
|
||||
AM_RANGE( 0x100000, 0x103fff ) AM_RAM AM_SHARE("nvram")
|
||||
AM_RANGE( 0x200000, 0x200fff ) AM_RAM AM_BASE( &igs011_priority_ram )
|
||||
AM_RANGE( 0x300000, 0x3fffff ) AM_READWRITE( igs011_layers_r, igs011_layers_w )
|
||||
AM_RANGE( 0x400000, 0x401fff ) AM_RAM_WRITE( igs011_palette ) AM_BASE_GENERIC( paletteram )
|
||||
@ -2209,7 +2210,7 @@ static ADDRESS_MAP_START( lhb2, ADDRESS_SPACE_PROGRAM, 16 )
|
||||
AM_RANGE( 0x020600, 0x0207ff ) AM_WRITE( igs011_prot2_reset_w ) // reset (55)
|
||||
|
||||
AM_RANGE( 0x000000, 0x07ffff ) AM_ROM
|
||||
AM_RANGE( 0x100000, 0x103fff ) AM_RAM AM_BASE_SIZE_GENERIC( nvram )
|
||||
AM_RANGE( 0x100000, 0x103fff ) AM_RAM AM_SHARE("nvram")
|
||||
AM_RANGE( 0x200000, 0x200001 ) AM_DEVREADWRITE8( "oki", okim6295_r, okim6295_w, 0x00ff )
|
||||
AM_RANGE( 0x204000, 0x204003 ) AM_DEVWRITE8( "ymsnd", ym2413_w, 0x00ff )
|
||||
AM_RANGE( 0x208000, 0x208003 ) AM_WRITE( lhb2_igs003_w )
|
||||
@ -2320,7 +2321,7 @@ static ADDRESS_MAP_START( vbowl, ADDRESS_SPACE_PROGRAM, 16 )
|
||||
// AM_RANGE( 0x902000, 0x902005 ) AM_WRITE( igs012_prot_fake_r )
|
||||
|
||||
AM_RANGE( 0x000000, 0x07ffff ) AM_ROM
|
||||
AM_RANGE( 0x100000, 0x103fff ) AM_RAM AM_BASE_SIZE_GENERIC( nvram )
|
||||
AM_RANGE( 0x100000, 0x103fff ) AM_RAM AM_SHARE("nvram")
|
||||
AM_RANGE( 0x200000, 0x200fff ) AM_RAM AM_BASE( &igs011_priority_ram )
|
||||
AM_RANGE( 0x300000, 0x3fffff ) AM_READWRITE( igs011_layers_r, igs011_layers_w )
|
||||
AM_RANGE( 0x400000, 0x401fff ) AM_RAM_WRITE( igs011_palette ) AM_BASE_GENERIC( paletteram )
|
||||
@ -3447,7 +3448,7 @@ GFXDECODE_END
|
||||
static MACHINE_CONFIG_START( igs011_base, driver_device )
|
||||
MDRV_CPU_ADD("maincpu",M68000, XTAL_22MHz/3)
|
||||
|
||||
MDRV_NVRAM_HANDLER(generic_0fill)
|
||||
MDRV_NVRAM_ADD_0FILL("nvram")
|
||||
|
||||
/* video hardware */
|
||||
MDRV_SCREEN_ADD("screen", RASTER)
|
||||
|
@ -17,6 +17,7 @@
|
||||
#include "emu.h"
|
||||
#include "cpu/arm7/arm7.h"
|
||||
#include "cpu/arm7/arm7core.h"
|
||||
#include "machine/nvram.h"
|
||||
|
||||
|
||||
/***************************************************************************
|
||||
@ -370,7 +371,7 @@ static MACHINE_CONFIG_START( igs_majhong, driver_device )
|
||||
MDRV_CPU_PROGRAM_MAP(igs_majhong_map)
|
||||
|
||||
MDRV_CPU_VBLANK_INT("screen", igs_majhong_interrupt)
|
||||
//MDRV_NVRAM_HANDLER(generic_0fill)
|
||||
//MDRV_NVRAM_ADD_0FILL("nvram")
|
||||
|
||||
MDRV_GFXDECODE(igs_m027)
|
||||
|
||||
|
@ -76,8 +76,19 @@ ROMs
|
||||
#include "cpu/m68000/m68000.h"
|
||||
#include "cpu/z80/z80.h"
|
||||
#include "sound/dac.h"
|
||||
#include "machine/nvram.h"
|
||||
#include "deprecat.h"
|
||||
|
||||
class ilpag_state : public driver_device
|
||||
{
|
||||
public:
|
||||
ilpag_state(running_machine &machine, const driver_device_config_base &config)
|
||||
: driver_device(machine, config),
|
||||
m_nvram(*this, "nvram") { }
|
||||
|
||||
required_shared_ptr<UINT16> m_nvram;
|
||||
};
|
||||
|
||||
static UINT16 *blit_romaddr,*blit_attr1_ram,*blit_dst_ram_loword,*blit_attr2_ram,*blit_dst_ram_hiword,*blit_vregs,*blit_transpen;
|
||||
static UINT8 *blit_buffer;
|
||||
|
||||
@ -251,7 +262,7 @@ static WRITE16_HANDLER( sound_write_w )
|
||||
static ADDRESS_MAP_START( ilpag_map, ADDRESS_SPACE_PROGRAM, 16 )
|
||||
AM_RANGE(0x000000, 0x0fffff) AM_ROM
|
||||
AM_RANGE(0x100000, 0x1fffff) AM_ROM AM_REGION("blit_data", 0)
|
||||
AM_RANGE(0x200000, 0x20ffff) AM_RAM AM_BASE_SIZE_GENERIC(nvram)
|
||||
AM_RANGE(0x200000, 0x20ffff) AM_RAM AM_SHARE("nvram")
|
||||
|
||||
// AM_RANGE(0x800000, 0x800001) AM_READ(test_r)
|
||||
// AM_RANGE(0x880000, 0x880001) AM_READ(test_r)
|
||||
@ -276,7 +287,7 @@ ADDRESS_MAP_END
|
||||
static ADDRESS_MAP_START( steaser_map, ADDRESS_SPACE_PROGRAM, 16 )
|
||||
AM_RANGE(0x000000, 0x03ffff) AM_ROM
|
||||
AM_RANGE(0x100000, 0x1fffff) AM_ROM AM_REGION("blit_data", 0)
|
||||
AM_RANGE(0x200000, 0x20ffff) AM_RAM AM_BASE_SIZE_GENERIC(nvram)
|
||||
AM_RANGE(0x200000, 0x20ffff) AM_RAM AM_SHARE("nvram")
|
||||
|
||||
AM_RANGE(0x800000, 0x800001) AM_READ(test_r)
|
||||
// AM_RANGE(0x840000, 0x840001) AM_WRITE(sound_write_w)
|
||||
@ -418,7 +429,7 @@ static INPUT_PORTS_START( steaser )
|
||||
PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_POKER_HOLD4 ) PORT_IMPULSE(1)
|
||||
INPUT_PORTS_END
|
||||
|
||||
static MACHINE_CONFIG_START( ilpag, driver_device )
|
||||
static MACHINE_CONFIG_START( ilpag, ilpag_state )
|
||||
MDRV_CPU_ADD("maincpu", M68000, 11059200 ) // ?
|
||||
MDRV_CPU_PROGRAM_MAP(ilpag_map)
|
||||
MDRV_CPU_VBLANK_INT("screen",irq4_line_hold) //3 & 6 used, mcu comms?
|
||||
@ -429,7 +440,7 @@ static MACHINE_CONFIG_START( ilpag, driver_device )
|
||||
MDRV_SCREEN_FORMAT(BITMAP_FORMAT_RGB32)
|
||||
MDRV_SCREEN_SIZE(512, 512)
|
||||
MDRV_SCREEN_VISIBLE_AREA(0, 512-1, 0, 256-1)
|
||||
MDRV_NVRAM_HANDLER(generic_0fill)
|
||||
MDRV_NVRAM_ADD_0FILL("nvram")
|
||||
|
||||
MDRV_PALETTE_LENGTH(0x100)
|
||||
|
||||
@ -462,21 +473,22 @@ MACHINE_CONFIG_END
|
||||
|
||||
static TIMER_DEVICE_CALLBACK( steaser_mcu_sim )
|
||||
{
|
||||
ilpag_state *state = timer.machine->driver_data<ilpag_state>();
|
||||
// static int i;
|
||||
/*first off, signal the "MCU is running" flag*/
|
||||
timer.machine->generic.nvram.u16[0x932/2] = 0xffff;
|
||||
state->m_nvram[0x932/2] = 0xffff;
|
||||
/*clear the inputs (they are impulsed)*/
|
||||
// for(i=0;i<8;i+=2)
|
||||
// timer->machine->generic.nvram.u16[((0x8a0)+i)/2] = 0;
|
||||
// state->m_nvram[((0x8a0)+i)/2] = 0;
|
||||
/*finally, read the inputs*/
|
||||
timer.machine->generic.nvram.u16[0x89e/2] = input_port_read(timer.machine, "MENU") & 0xffff;
|
||||
timer.machine->generic.nvram.u16[0x8a0/2] = input_port_read(timer.machine, "STAT") & 0xffff;
|
||||
timer.machine->generic.nvram.u16[0x8a2/2] = input_port_read(timer.machine, "BET_DEAL") & 0xffff;
|
||||
timer.machine->generic.nvram.u16[0x8a4/2] = input_port_read(timer.machine, "TAKE_DOUBLE") & 0xffff;
|
||||
timer.machine->generic.nvram.u16[0x8a6/2] = input_port_read(timer.machine, "SMALL_BIG") & 0xffff;
|
||||
timer.machine->generic.nvram.u16[0x8a8/2] = input_port_read(timer.machine, "CANCEL_HOLD1") & 0xffff;
|
||||
timer.machine->generic.nvram.u16[0x8aa/2] = input_port_read(timer.machine, "HOLD2_HOLD3") & 0xffff;
|
||||
timer.machine->generic.nvram.u16[0x8ac/2] = input_port_read(timer.machine, "HOLD4_HOLD5") & 0xffff;
|
||||
state->m_nvram[0x89e/2] = input_port_read(timer.machine, "MENU") & 0xffff;
|
||||
state->m_nvram[0x8a0/2] = input_port_read(timer.machine, "STAT") & 0xffff;
|
||||
state->m_nvram[0x8a2/2] = input_port_read(timer.machine, "BET_DEAL") & 0xffff;
|
||||
state->m_nvram[0x8a4/2] = input_port_read(timer.machine, "TAKE_DOUBLE") & 0xffff;
|
||||
state->m_nvram[0x8a6/2] = input_port_read(timer.machine, "SMALL_BIG") & 0xffff;
|
||||
state->m_nvram[0x8a8/2] = input_port_read(timer.machine, "CANCEL_HOLD1") & 0xffff;
|
||||
state->m_nvram[0x8aa/2] = input_port_read(timer.machine, "HOLD2_HOLD3") & 0xffff;
|
||||
state->m_nvram[0x8ac/2] = input_port_read(timer.machine, "HOLD4_HOLD5") & 0xffff;
|
||||
}
|
||||
|
||||
/* TODO: remove this hack.*/
|
||||
|
@ -80,6 +80,7 @@
|
||||
#include "emu.h"
|
||||
#include "cpu/m6809/m6809.h"
|
||||
#include "sound/pokey.h"
|
||||
#include "machine/nvram.h"
|
||||
#include "includes/irobot.h"
|
||||
|
||||
#define MAIN_CLOCK XTAL_12_096MHz
|
||||
@ -93,7 +94,8 @@
|
||||
|
||||
static WRITE8_HANDLER( irobot_nvram_w )
|
||||
{
|
||||
space->machine->generic.nvram.u8[offset] = data & 0x0f;
|
||||
irobot_state *state = space->machine->driver_data<irobot_state>();
|
||||
state->m_nvram[offset] = data & 0x0f;
|
||||
}
|
||||
|
||||
|
||||
@ -134,7 +136,7 @@ static ADDRESS_MAP_START( irobot_map, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
AM_RANGE(0x1140, 0x1140) AM_WRITE(irobot_statwr_w)
|
||||
AM_RANGE(0x1180, 0x1180) AM_WRITE(irobot_out0_w)
|
||||
AM_RANGE(0x11c0, 0x11c0) AM_WRITE(irobot_rom_banksel_w)
|
||||
AM_RANGE(0x1200, 0x12ff) AM_RAM_WRITE(irobot_nvram_w) AM_BASE_SIZE_GENERIC(nvram)
|
||||
AM_RANGE(0x1200, 0x12ff) AM_RAM_WRITE(irobot_nvram_w) AM_SHARE("nvram")
|
||||
AM_RANGE(0x1300, 0x13ff) AM_READ(irobot_control_r)
|
||||
AM_RANGE(0x1400, 0x143f) AM_READWRITE(quad_pokey_r, quad_pokey_w)
|
||||
AM_RANGE(0x1800, 0x18ff) AM_WRITE(irobot_paletteram_w)
|
||||
@ -287,14 +289,14 @@ static const pokey_interface pokey_config =
|
||||
*
|
||||
*************************************/
|
||||
|
||||
static MACHINE_CONFIG_START( irobot, driver_device )
|
||||
static MACHINE_CONFIG_START( irobot, irobot_state )
|
||||
|
||||
/* basic machine hardware */
|
||||
MDRV_CPU_ADD("maincpu", M6809, MAIN_CLOCK/8)
|
||||
MDRV_CPU_PROGRAM_MAP(irobot_map)
|
||||
|
||||
MDRV_MACHINE_RESET(irobot)
|
||||
MDRV_NVRAM_HANDLER(generic_0fill)
|
||||
MDRV_NVRAM_ADD_0FILL("nvram")
|
||||
|
||||
/* video hardware */
|
||||
MDRV_SCREEN_ADD("screen", RASTER)
|
||||
|
@ -30,6 +30,7 @@ $c088-$c095 player tiles
|
||||
#include "sound/hc55516.h"
|
||||
#include "sound/msm5205.h"
|
||||
#include "video/resnet.h"
|
||||
#include "machine/nvram.h"
|
||||
|
||||
#define MASTER_CLOCK XTAL_19_968MHz
|
||||
|
||||
@ -481,7 +482,7 @@ ADDRESS_MAP_END
|
||||
|
||||
static ADDRESS_MAP_START( roylcrdn_cpu0_map, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
AM_RANGE(0x0000, 0x2fff) AM_ROM
|
||||
AM_RANGE(0x7000, 0x77ff) AM_RAM AM_BASE_SIZE_GENERIC(nvram) /* MK48Z02B-15 ZEROPOWER RAM */
|
||||
AM_RANGE(0x7000, 0x77ff) AM_RAM AM_SHARE("nvram") /* MK48Z02B-15 ZEROPOWER RAM */
|
||||
ADDRESS_MAP_END
|
||||
|
||||
static ADDRESS_MAP_START( roylcrdn_cpu0_io, ADDRESS_SPACE_IO, 8 )
|
||||
@ -1074,7 +1075,7 @@ static MACHINE_CONFIG_DERIVED( roylcrdn, jangou )
|
||||
|
||||
MDRV_DEVICE_REMOVE("cpu1")
|
||||
|
||||
MDRV_NVRAM_HANDLER(generic_0fill)
|
||||
MDRV_NVRAM_ADD_0FILL("nvram")
|
||||
|
||||
MDRV_MACHINE_START(common)
|
||||
MDRV_MACHINE_RESET(common)
|
||||
|
@ -112,6 +112,7 @@
|
||||
|
||||
#include "emu.h"
|
||||
#include "cpu/m6502/m6502.h"
|
||||
#include "machine/nvram.h"
|
||||
#include "includes/jedi.h"
|
||||
|
||||
|
||||
@ -248,7 +249,7 @@ static WRITE8_HANDLER( nvram_data_w )
|
||||
jedi_state *state = space->machine->driver_data<jedi_state>();
|
||||
|
||||
if (state->nvram_enabled)
|
||||
space->machine->generic.nvram.u8[offset] = data;
|
||||
state->m_nvram[offset] = data;
|
||||
}
|
||||
|
||||
|
||||
@ -269,7 +270,7 @@ static WRITE8_HANDLER( nvram_enable_w )
|
||||
|
||||
static ADDRESS_MAP_START( main_map, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
AM_RANGE(0x0000, 0x07ff) AM_RAM
|
||||
AM_RANGE(0x0800, 0x08ff) AM_MIRROR(0x0300) AM_RAM_WRITE(nvram_data_w) AM_BASE_SIZE_GENERIC(nvram)
|
||||
AM_RANGE(0x0800, 0x08ff) AM_MIRROR(0x0300) AM_RAM_WRITE(nvram_data_w) AM_SHARE("nvram")
|
||||
AM_RANGE(0x0c00, 0x0c00) AM_MIRROR(0x03fe) AM_READ_PORT("0c00") AM_WRITENOP
|
||||
AM_RANGE(0x0c01, 0x0c01) AM_MIRROR(0x03fe) AM_READ_PORT("0c01") AM_WRITENOP
|
||||
AM_RANGE(0x1000, 0x13ff) AM_NOP
|
||||
@ -351,7 +352,7 @@ static MACHINE_CONFIG_START( jedi, jedi_state )
|
||||
|
||||
MDRV_MACHINE_START(jedi)
|
||||
MDRV_MACHINE_RESET(jedi)
|
||||
MDRV_NVRAM_HANDLER(generic_0fill)
|
||||
MDRV_NVRAM_ADD_0FILL("nvram")
|
||||
|
||||
/* video hardware */
|
||||
MDRV_FRAGMENT_ADD(jedi_video)
|
||||
|
@ -94,6 +94,7 @@
|
||||
#include "cpu/m6809/m6809.h"
|
||||
#include "video/mc6845.h"
|
||||
#include "machine/6821pia.h"
|
||||
#include "machine/nvram.h"
|
||||
|
||||
|
||||
/*************************
|
||||
@ -461,7 +462,7 @@ static MACHINE_CONFIG_START( jokrwild, driver_device )
|
||||
MDRV_CPU_PROGRAM_MAP(jokrwild_map)
|
||||
MDRV_CPU_VBLANK_INT("screen", nmi_line_pulse)
|
||||
|
||||
// MDRV_NVRAM_HANDLER(generic_0fill)
|
||||
// MDRV_NVRAM_ADD_0FILL("nvram")
|
||||
|
||||
MDRV_PIA6821_ADD("pia0", pia0_intf)
|
||||
MDRV_PIA6821_ADD("pia1", pia1_intf)
|
||||
|
@ -83,6 +83,7 @@
|
||||
#include "sound/upd7759.h"
|
||||
#include "includes/jpmimpct.h"
|
||||
#include "machine/meters.h"
|
||||
#include "machine/nvram.h"
|
||||
|
||||
/*************************************
|
||||
*
|
||||
@ -623,7 +624,7 @@ static WRITE16_HANDLER( jpmio_w )
|
||||
static ADDRESS_MAP_START( m68k_program_map, ADDRESS_SPACE_PROGRAM, 16 )
|
||||
AM_RANGE(0x00000000, 0x000fffff) AM_ROM
|
||||
AM_RANGE(0x00100000, 0x001fffff) AM_ROM
|
||||
AM_RANGE(0x00400000, 0x00403fff) AM_RAM AM_BASE_SIZE_GENERIC(nvram)
|
||||
AM_RANGE(0x00400000, 0x00403fff) AM_RAM AM_SHARE("nvram")
|
||||
AM_RANGE(0x00480000, 0x0048001f) AM_READWRITE(duart_1_r, duart_1_w)
|
||||
AM_RANGE(0x00480020, 0x00480033) AM_READ(inputs1_r)
|
||||
AM_RANGE(0x00480034, 0x00480035) AM_READ(unk_r)
|
||||
@ -856,7 +857,7 @@ static MACHINE_CONFIG_START( jpmimpct, driver_device )
|
||||
MDRV_QUANTUM_TIME(HZ(30000))
|
||||
MDRV_MACHINE_START(jpmimpct)
|
||||
MDRV_MACHINE_RESET(jpmimpct)
|
||||
MDRV_NVRAM_HANDLER(generic_0fill)
|
||||
MDRV_NVRAM_ADD_0FILL("nvram")
|
||||
|
||||
MDRV_TIMER_ADD( "duart_1_timer", duart_1_timer_event)
|
||||
|
||||
@ -1294,7 +1295,7 @@ static READ16_HANDLER( ump_r )
|
||||
static ADDRESS_MAP_START( awp68k_program_map, ADDRESS_SPACE_PROGRAM, 16 )
|
||||
AM_RANGE(0x00000000, 0x000fffff) AM_ROM
|
||||
AM_RANGE(0x00100000, 0x001fffff) AM_ROM
|
||||
AM_RANGE(0x00400000, 0x00403fff) AM_RAM AM_BASE_SIZE_GENERIC(nvram)
|
||||
AM_RANGE(0x00400000, 0x00403fff) AM_RAM AM_SHARE("nvram")
|
||||
AM_RANGE(0x00480000, 0x0048001f) AM_READWRITE(duart_1_r, duart_1_w)
|
||||
AM_RANGE(0x00480020, 0x00480033) AM_READ(inputs1_r)
|
||||
AM_RANGE(0x00480034, 0x00480035) AM_READ(ump_r)
|
||||
@ -1329,7 +1330,7 @@ static MACHINE_CONFIG_START( impctawp, driver_device )
|
||||
|
||||
MDRV_MACHINE_START(impctawp)
|
||||
MDRV_MACHINE_RESET(impctawp)
|
||||
MDRV_NVRAM_HANDLER(generic_0fill)
|
||||
MDRV_NVRAM_ADD_0FILL("nvram")
|
||||
|
||||
MDRV_PPI8255_ADD( "ppi8255_0", ppi8255_intf[0] )
|
||||
|
||||
|
@ -24,6 +24,7 @@
|
||||
#include "sound/2413intf.h"
|
||||
#include "sound/upd7759.h"
|
||||
#include "video/tms34061.h"
|
||||
#include "machine/nvram.h"
|
||||
|
||||
|
||||
/*************************************
|
||||
@ -282,7 +283,7 @@ static ADDRESS_MAP_START( 68000_map, ADDRESS_SPACE_PROGRAM, 16 )
|
||||
AM_RANGE(0x000000, 0x01ffff) AM_ROM
|
||||
AM_RANGE(0x01fffe, 0x01ffff) AM_WRITE(rombank_w)
|
||||
AM_RANGE(0x020000, 0x03ffff) AM_ROMBANK("bank1")
|
||||
AM_RANGE(0x040000, 0x043fff) AM_RAM AM_BASE_SIZE_GENERIC(nvram)
|
||||
AM_RANGE(0x040000, 0x043fff) AM_RAM AM_SHARE("nvram")
|
||||
AM_RANGE(0x046000, 0x046001) AM_WRITENOP
|
||||
AM_RANGE(0x046020, 0x046021) AM_DEVREADWRITE8("acia6850_0", acia6850_stat_r, acia6850_ctrl_w, 0xff)
|
||||
AM_RANGE(0x046022, 0x046023) AM_DEVREADWRITE8("acia6850_0", acia6850_data_r, acia6850_data_w, 0xff)
|
||||
@ -602,7 +603,7 @@ static MACHINE_CONFIG_START( jpmsys5v, driver_device )
|
||||
MDRV_ACIA6850_ADD("acia6850_1", acia1_if)
|
||||
MDRV_ACIA6850_ADD("acia6850_2", acia2_if)
|
||||
|
||||
MDRV_NVRAM_HANDLER(generic_0fill)
|
||||
MDRV_NVRAM_ADD_0FILL("nvram")
|
||||
|
||||
MDRV_MACHINE_START(jpmsys5v)
|
||||
MDRV_MACHINE_RESET(jpmsys5v)
|
||||
|
@ -70,6 +70,7 @@ sg1_b.e1 4096 0x92ef3c13 D2732D
|
||||
#include "sound/ay8910.h"
|
||||
#include "sound/okim6295.h"
|
||||
#include "sound/2203intf.h"
|
||||
#include "machine/nvram.h"
|
||||
|
||||
#define CLK_1 XTAL_20MHz
|
||||
#define CLK_2 XTAL_3_579545MHz
|
||||
@ -357,7 +358,7 @@ ADDRESS_MAP_END
|
||||
static ADDRESS_MAP_START( slave_map, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
AM_RANGE(0x0000, 0x2fff) AM_ROM
|
||||
AM_RANGE(0x3000, 0x3fff) AM_ROM //sound rom tested for the post check
|
||||
AM_RANGE(0x4000, 0x43ff) AM_RAM AM_BASE_SIZE_GENERIC(nvram) //backup ram
|
||||
AM_RANGE(0x4000, 0x43ff) AM_RAM AM_SHARE("nvram") //backup ram
|
||||
AM_RANGE(0x5000, 0x5003) AM_DEVREADWRITE("ppi8255_0", ppi8255_r, ppi8255_w) /* I/O Ports */
|
||||
AM_RANGE(0x6000, 0x6003) AM_DEVREADWRITE("ppi8255_1", ppi8255_r, ppi8255_w) /* I/O Ports */
|
||||
AM_RANGE(0x7000, 0x73ff) AM_RAM AM_SHARE("share1")
|
||||
@ -377,7 +378,7 @@ static WRITE8_HANDLER( kingdrbb_lamps_w )
|
||||
static ADDRESS_MAP_START( slave_1986_map, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
AM_RANGE(0x0000, 0x2fff) AM_ROM
|
||||
AM_RANGE(0x3000, 0x3fff) AM_ROM //sound rom tested for the post check
|
||||
AM_RANGE(0x4000, 0x47ff) AM_RAM AM_BASE_SIZE_GENERIC(nvram) //backup ram
|
||||
AM_RANGE(0x4000, 0x47ff) AM_RAM AM_SHARE("nvram") //backup ram
|
||||
AM_RANGE(0x5000, 0x5003) AM_DEVREADWRITE("ppi8255_0", ppi8255_r, ppi8255_w) /* I/O Ports */
|
||||
// AM_RANGE(0x6000, 0x6003) AM_DEVREADWRITE("ppi8255_1", ppi8255_r, ppi8255_w) /* I/O Ports */
|
||||
AM_RANGE(0x7000, 0x73ff) AM_RAM AM_SHARE("share1")
|
||||
@ -983,7 +984,7 @@ static MACHINE_CONFIG_START( kingdrby, driver_device )
|
||||
|
||||
MDRV_QUANTUM_PERFECT_CPU("master")
|
||||
|
||||
MDRV_NVRAM_HANDLER(generic_0fill)
|
||||
MDRV_NVRAM_ADD_0FILL("nvram")
|
||||
|
||||
MDRV_PPI8255_ADD( "ppi8255_0", ppi8255_intf[0] )
|
||||
MDRV_PPI8255_ADD( "ppi8255_1", ppi8255_intf[1] )
|
||||
|
@ -23,6 +23,7 @@ Todo:
|
||||
#include "cpu/z80/z80.h"
|
||||
#include "video/tms9928a.h"
|
||||
#include "sound/ay8910.h"
|
||||
#include "machine/nvram.h"
|
||||
|
||||
static READ8_HANDLER( io_read_missing_dips )
|
||||
{
|
||||
@ -89,7 +90,7 @@ INPUT_PORTS_END
|
||||
/* A 3.6V battery traces directly to U19, rendering it nvram */
|
||||
static ADDRESS_MAP_START( kingpin_program_map, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
AM_RANGE(0x0000, 0xdfff) AM_ROM
|
||||
AM_RANGE(0xf000, 0xf7ff) AM_RAM AM_BASE_SIZE_GENERIC(nvram)
|
||||
AM_RANGE(0xf000, 0xf7ff) AM_RAM AM_SHARE("nvram")
|
||||
ADDRESS_MAP_END
|
||||
|
||||
static ADDRESS_MAP_START( kingpin_io_map, ADDRESS_SPACE_IO, 8 )
|
||||
@ -158,7 +159,7 @@ static MACHINE_CONFIG_START( kingpin, driver_device )
|
||||
MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16)
|
||||
MDRV_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500) /* not accurate */)
|
||||
|
||||
MDRV_NVRAM_HANDLER(generic_0fill)
|
||||
MDRV_NVRAM_ADD_0FILL("nvram")
|
||||
|
||||
/* Sound chip is a AY-3-8912 */
|
||||
/*
|
||||
|
@ -65,6 +65,7 @@ Notes:
|
||||
#include "emu.h"
|
||||
#include "deprecat.h"
|
||||
#include "cpu/h83002/h8.h"
|
||||
#include "machine/nvram.h"
|
||||
|
||||
class lastfght_state : public driver_device
|
||||
{
|
||||
@ -413,7 +414,7 @@ static ADDRESS_MAP_START( lastfght_map, ADDRESS_SPACE_PROGRAM, 16 )
|
||||
AM_RANGE( 0x000000, 0x07ffff ) AM_ROM AM_REGION("maincpu", 0)
|
||||
AM_RANGE( 0x080000, 0x0fffff ) AM_ROM AM_REGION("maincpu", 0)
|
||||
|
||||
AM_RANGE( 0x200000, 0x20ffff ) AM_RAM AM_BASE_SIZE_GENERIC(nvram) // battery
|
||||
AM_RANGE( 0x200000, 0x20ffff ) AM_RAM AM_SHARE("nvram") // battery
|
||||
|
||||
AM_RANGE( 0x600000, 0x600001 ) AM_WRITE( lastfght_hi_w )
|
||||
AM_RANGE( 0x600002, 0x600003 ) AM_READWRITE( lastfght_sound_r, lastfght_sound_w )
|
||||
@ -575,7 +576,7 @@ static MACHINE_CONFIG_START( lastfght, lastfght_state )
|
||||
MDRV_CPU_PROGRAM_MAP( lastfght_map)
|
||||
MDRV_CPU_VBLANK_INT_HACK(unknown_interrupt,2)
|
||||
|
||||
MDRV_NVRAM_HANDLER(generic_0fill)
|
||||
MDRV_NVRAM_ADD_0FILL("nvram")
|
||||
|
||||
MDRV_MACHINE_START(lastfght)
|
||||
MDRV_MACHINE_RESET(lastfght)
|
||||
|
@ -672,6 +672,7 @@
|
||||
#include "sound/sn76496.h"
|
||||
#include "sound/msm5205.h"
|
||||
#include "machine/8255ppi.h"
|
||||
#include "machine/nvram.h"
|
||||
#include "lucky74.lh"
|
||||
#include "includes/lucky74.h"
|
||||
|
||||
@ -811,7 +812,7 @@ static INTERRUPT_GEN( nmi_interrupt )
|
||||
|
||||
static ADDRESS_MAP_START( lucky74_map, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
AM_RANGE(0x0000, 0xbfff) AM_ROM
|
||||
AM_RANGE(0xc000, 0xcfff) AM_RAM AM_BASE_SIZE_GENERIC(nvram) /* NVRAM */
|
||||
AM_RANGE(0xc000, 0xcfff) AM_RAM AM_SHARE("nvram") /* NVRAM */
|
||||
AM_RANGE(0xd000, 0xd7ff) AM_RAM_WRITE(lucky74_fg_videoram_w) AM_BASE(&lucky74_fg_videoram) /* VRAM1-1 */
|
||||
AM_RANGE(0xd800, 0xdfff) AM_RAM_WRITE(lucky74_fg_colorram_w) AM_BASE(&lucky74_fg_colorram) /* VRAM1-2 */
|
||||
AM_RANGE(0xe000, 0xe7ff) AM_RAM_WRITE(lucky74_bg_videoram_w) AM_BASE(&lucky74_bg_videoram) /* VRAM2-1 */
|
||||
@ -1237,7 +1238,7 @@ static MACHINE_CONFIG_START( lucky74, driver_device )
|
||||
MDRV_CPU_IO_MAP(lucky74_portmap)
|
||||
MDRV_CPU_VBLANK_INT("screen", nmi_interrupt) /* 60 Hz. measured */
|
||||
|
||||
MDRV_NVRAM_HANDLER(generic_0fill)
|
||||
MDRV_NVRAM_ADD_0FILL("nvram")
|
||||
|
||||
MDRV_SOUND_START(lucky74)
|
||||
|
||||
|
@ -76,6 +76,7 @@ TODO:
|
||||
#include "emu.h"
|
||||
#include "cpu/z80/z80.h"
|
||||
#include "sound/ay8910.h"
|
||||
#include "machine/nvram.h"
|
||||
#include "includes/lvcards.h"
|
||||
|
||||
static UINT8 payout;
|
||||
@ -149,7 +150,7 @@ static READ8_HANDLER( payout_r )
|
||||
|
||||
static ADDRESS_MAP_START( ponttehk_map, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
AM_RANGE(0x0000, 0x5fff) AM_ROM
|
||||
AM_RANGE(0x6000, 0x67ff) AM_RAM AM_BASE_SIZE_GENERIC(nvram)
|
||||
AM_RANGE(0x6000, 0x67ff) AM_RAM AM_SHARE("nvram")
|
||||
AM_RANGE(0x8000, 0x83ff) AM_RAM_WRITE(lvcards_videoram_w) AM_BASE(&lvcards_videoram)
|
||||
AM_RANGE(0x8400, 0x87ff) AM_RAM_WRITE(lvcards_colorram_w) AM_BASE(&lvcards_colorram)
|
||||
AM_RANGE(0xa000, 0xa000) AM_READ_PORT("IN0")
|
||||
@ -159,7 +160,7 @@ ADDRESS_MAP_END
|
||||
|
||||
static ADDRESS_MAP_START( lvcards_map, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
AM_RANGE(0x0000, 0x5fff) AM_ROM
|
||||
AM_RANGE(0x6000, 0x67ff) AM_RAM AM_BASE_SIZE_GENERIC(nvram)
|
||||
AM_RANGE(0x6000, 0x67ff) AM_RAM AM_SHARE("nvram")
|
||||
AM_RANGE(0x9000, 0x93ff) AM_RAM_WRITE(lvcards_videoram_w) AM_BASE(&lvcards_videoram)
|
||||
AM_RANGE(0x9400, 0x97ff) AM_RAM_WRITE(lvcards_colorram_w) AM_BASE(&lvcards_colorram)
|
||||
AM_RANGE(0xa000, 0xa000) AM_READ_PORT("IN0")
|
||||
@ -176,7 +177,7 @@ ADDRESS_MAP_END
|
||||
|
||||
static ADDRESS_MAP_START( lvpoker_map, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
AM_RANGE(0x0000, 0x5fff) AM_ROM
|
||||
AM_RANGE(0x6000, 0x67ff) AM_RAM AM_BASE_SIZE_GENERIC(nvram)
|
||||
AM_RANGE(0x6000, 0x67ff) AM_RAM AM_SHARE("nvram")
|
||||
AM_RANGE(0x9000, 0x93ff) AM_RAM_WRITE(lvcards_videoram_w) AM_BASE(&lvcards_videoram)
|
||||
AM_RANGE(0x9400, 0x97ff) AM_RAM_WRITE(lvcards_colorram_w) AM_BASE(&lvcards_colorram)
|
||||
AM_RANGE(0xa000, 0xa000) AM_READ_PORT("IN0")
|
||||
@ -496,7 +497,7 @@ MACHINE_CONFIG_END
|
||||
static MACHINE_CONFIG_DERIVED( lvpoker, lvcards )
|
||||
|
||||
// basic machine hardware
|
||||
MDRV_NVRAM_HANDLER(generic_1fill)
|
||||
MDRV_NVRAM_ADD_1FILL("nvram")
|
||||
MDRV_CPU_MODIFY("maincpu")
|
||||
MDRV_CPU_PROGRAM_MAP(lvpoker_map)
|
||||
MDRV_MACHINE_START(lvpoker)
|
||||
@ -506,7 +507,7 @@ MACHINE_CONFIG_END
|
||||
static MACHINE_CONFIG_DERIVED( ponttehk, lvcards )
|
||||
|
||||
// basic machine hardware
|
||||
MDRV_NVRAM_HANDLER(generic_1fill)
|
||||
MDRV_NVRAM_ADD_1FILL("nvram")
|
||||
MDRV_CPU_MODIFY("maincpu")
|
||||
MDRV_CPU_PROGRAM_MAP(ponttehk_map)
|
||||
MDRV_MACHINE_RESET(lvpoker)
|
||||
|
@ -78,6 +78,7 @@
|
||||
#include "emu.h"
|
||||
#include "cpu/m68000/m68000.h"
|
||||
#include "sound/okim6295.h"
|
||||
#include "machine/nvram.h"
|
||||
#include "sgsafari.lh"
|
||||
|
||||
static tilemap_t *layer0_tilemap, *layer1_tilemap, *layer2_tilemap;
|
||||
@ -263,7 +264,7 @@ static ADDRESS_MAP_START( magic10_map, ADDRESS_SPACE_PROGRAM, 16 )
|
||||
AM_RANGE(0x100000, 0x100fff) AM_RAM_WRITE(layer1_videoram_w) AM_BASE(&layer1_videoram)
|
||||
AM_RANGE(0x101000, 0x101fff) AM_RAM_WRITE(layer0_videoram_w) AM_BASE(&layer0_videoram)
|
||||
AM_RANGE(0x102000, 0x103fff) AM_RAM_WRITE(layer2_videoram_w) AM_BASE(&layer2_videoram)
|
||||
AM_RANGE(0x200000, 0x2007ff) AM_RAM AM_BASE_SIZE_GENERIC(nvram)
|
||||
AM_RANGE(0x200000, 0x2007ff) AM_RAM AM_SHARE("nvram")
|
||||
AM_RANGE(0x300000, 0x3001ff) AM_RAM_WRITE(paletteram_w) AM_BASE_GENERIC(paletteram)
|
||||
AM_RANGE(0x400000, 0x400001) AM_READ_PORT("INPUTS")
|
||||
AM_RANGE(0x400002, 0x400003) AM_READ_PORT("DSW")
|
||||
@ -279,7 +280,7 @@ static ADDRESS_MAP_START( magic10a_map, ADDRESS_SPACE_PROGRAM, 16 )
|
||||
AM_RANGE(0x100000, 0x100fff) AM_RAM_WRITE(layer1_videoram_w) AM_BASE(&layer1_videoram)
|
||||
AM_RANGE(0x101000, 0x101fff) AM_RAM_WRITE(layer0_videoram_w) AM_BASE(&layer0_videoram)
|
||||
AM_RANGE(0x102000, 0x103fff) AM_RAM_WRITE(layer2_videoram_w) AM_BASE(&layer2_videoram)
|
||||
AM_RANGE(0x200000, 0x2007ff) AM_RAM AM_BASE_SIZE_GENERIC(nvram)
|
||||
AM_RANGE(0x200000, 0x2007ff) AM_RAM AM_SHARE("nvram")
|
||||
AM_RANGE(0x300000, 0x3001ff) AM_RAM_WRITE(paletteram_w) AM_BASE_GENERIC(paletteram)
|
||||
AM_RANGE(0x500000, 0x500001) AM_READ_PORT("INPUTS")
|
||||
AM_RANGE(0x500002, 0x500003) AM_READ_PORT("DSW")
|
||||
@ -295,7 +296,7 @@ static ADDRESS_MAP_START( magic102_map, ADDRESS_SPACE_PROGRAM, 16 )
|
||||
AM_RANGE(0x100000, 0x100fff) AM_RAM_WRITE(layer1_videoram_w) AM_BASE(&layer1_videoram)
|
||||
AM_RANGE(0x101000, 0x101fff) AM_RAM_WRITE(layer0_videoram_w) AM_BASE(&layer0_videoram)
|
||||
AM_RANGE(0x102000, 0x103fff) AM_RAM_WRITE(layer2_videoram_w) AM_BASE(&layer2_videoram)
|
||||
AM_RANGE(0x200000, 0x2007ff) AM_RAM AM_BASE_SIZE_GENERIC(nvram)
|
||||
AM_RANGE(0x200000, 0x2007ff) AM_RAM AM_SHARE("nvram")
|
||||
AM_RANGE(0x400000, 0x4001ff) AM_RAM_WRITE(paletteram_w) AM_BASE_GENERIC(paletteram)
|
||||
AM_RANGE(0x500000, 0x500001) AM_READ(magic102_r)
|
||||
AM_RANGE(0x500004, 0x500005) AM_READNOP // gives credits
|
||||
@ -314,7 +315,7 @@ static ADDRESS_MAP_START( hotslot_map, ADDRESS_SPACE_PROGRAM, 16 )
|
||||
AM_RANGE(0x100000, 0x100fff) AM_RAM_WRITE(layer1_videoram_w) AM_BASE(&layer1_videoram)
|
||||
AM_RANGE(0x101000, 0x101fff) AM_RAM_WRITE(layer0_videoram_w) AM_BASE(&layer0_videoram)
|
||||
AM_RANGE(0x102000, 0x103fff) AM_RAM_WRITE(layer2_videoram_w) AM_BASE(&layer2_videoram)
|
||||
AM_RANGE(0x200000, 0x2007ff) AM_RAM AM_BASE_SIZE_GENERIC(nvram)
|
||||
AM_RANGE(0x200000, 0x2007ff) AM_RAM AM_SHARE("nvram")
|
||||
AM_RANGE(0x400000, 0x4001ff) AM_RAM_WRITE(paletteram_w) AM_BASE_GENERIC(paletteram)
|
||||
AM_RANGE(0x500004, 0x500005) AM_READWRITE(hotslot_copro_r, hotslot_copro_w) // copro comm
|
||||
AM_RANGE(0x500006, 0x500011) AM_RAM
|
||||
@ -333,7 +334,7 @@ static ADDRESS_MAP_START( sgsafari_map, ADDRESS_SPACE_PROGRAM, 16 )
|
||||
AM_RANGE(0x100000, 0x100fff) AM_RAM_WRITE(layer1_videoram_w) AM_BASE(&layer1_videoram)
|
||||
AM_RANGE(0x101000, 0x101fff) AM_RAM_WRITE(layer0_videoram_w) AM_BASE(&layer0_videoram)
|
||||
AM_RANGE(0x102000, 0x103fff) AM_RAM_WRITE(layer2_videoram_w) AM_BASE(&layer2_videoram)
|
||||
AM_RANGE(0x200000, 0x203fff) AM_RAM AM_BASE_SIZE_GENERIC(nvram)
|
||||
AM_RANGE(0x200000, 0x203fff) AM_RAM AM_SHARE("nvram")
|
||||
AM_RANGE(0x300000, 0x3001ff) AM_RAM_WRITE(paletteram_w) AM_BASE_GENERIC(paletteram)
|
||||
AM_RANGE(0x500002, 0x500003) AM_READ_PORT("DSW1")
|
||||
AM_RANGE(0x500008, 0x500009) AM_WRITE(magic10_out_w)
|
||||
@ -651,7 +652,7 @@ static MACHINE_CONFIG_START( magic10, driver_device )
|
||||
MDRV_CPU_PROGRAM_MAP(magic10_map)
|
||||
MDRV_CPU_VBLANK_INT("screen", irq1_line_hold)
|
||||
|
||||
MDRV_NVRAM_HANDLER(generic_0fill)
|
||||
MDRV_NVRAM_ADD_0FILL("nvram")
|
||||
|
||||
MDRV_SCREEN_ADD("screen", RASTER)
|
||||
MDRV_SCREEN_REFRESH_RATE(60)
|
||||
|
@ -399,6 +399,7 @@
|
||||
#include "cpu/m6502/m6502.h"
|
||||
#include "video/mc6845.h"
|
||||
#include "sound/dac.h"
|
||||
#include "machine/nvram.h"
|
||||
|
||||
|
||||
/*************************
|
||||
@ -555,7 +556,7 @@ static WRITE8_HANDLER( mux_port_w )
|
||||
*************************/
|
||||
|
||||
static ADDRESS_MAP_START( magicfly_map, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
AM_RANGE(0x0000, 0x07ff) AM_RAM AM_BASE_SIZE_GENERIC(nvram) /* MK48Z02B NVRAM */
|
||||
AM_RANGE(0x0000, 0x07ff) AM_RAM AM_SHARE("nvram") /* MK48Z02B NVRAM */
|
||||
AM_RANGE(0x0800, 0x0800) AM_DEVWRITE("crtc", mc6845_address_w)
|
||||
AM_RANGE(0x0801, 0x0801) AM_DEVREADWRITE("crtc", mc6845_register_r, mc6845_register_w)
|
||||
AM_RANGE(0x1000, 0x13ff) AM_RAM_WRITE(magicfly_videoram_w) AM_BASE(&videoram) /* HM6116LP #1 (2K x 8) RAM (only 1st half used) */
|
||||
@ -762,7 +763,7 @@ static MACHINE_CONFIG_START( magicfly, driver_device )
|
||||
MDRV_CPU_PROGRAM_MAP(magicfly_map)
|
||||
MDRV_CPU_VBLANK_INT("screen", nmi_line_pulse)
|
||||
|
||||
MDRV_NVRAM_HANDLER(generic_0fill)
|
||||
MDRV_NVRAM_ADD_0FILL("nvram")
|
||||
|
||||
/* video hardware */
|
||||
MDRV_SCREEN_ADD("screen", RASTER)
|
||||
|
@ -68,6 +68,7 @@
|
||||
#include "sound/s2636.h"
|
||||
#include "video/s2636.h"
|
||||
#include "video/saa5050.h"
|
||||
#include "machine/nvram.h"
|
||||
#include "includes/malzak.h"
|
||||
|
||||
|
||||
@ -130,7 +131,7 @@ static ADDRESS_MAP_START( malzak2_map, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
AM_RANGE(0x1400, 0x14ff) AM_MIRROR(0x6000) AM_DEVREADWRITE("s2636_0", s2636_work_ram_r, s2636_work_ram_w)
|
||||
AM_RANGE(0x1500, 0x15ff) AM_MIRROR(0x6000) AM_DEVREADWRITE("s2636_1", s2636_work_ram_r, s2636_work_ram_w)
|
||||
AM_RANGE(0x1600, 0x16ff) AM_MIRROR(0x6000) AM_RAM_WRITE(malzak_playfield_w)
|
||||
AM_RANGE(0x1700, 0x17ff) AM_MIRROR(0x6000) AM_RAM AM_BASE_SIZE_GENERIC(nvram)
|
||||
AM_RANGE(0x1700, 0x17ff) AM_MIRROR(0x6000) AM_RAM AM_SHARE("nvram")
|
||||
AM_RANGE(0x1800, 0x1fff) AM_MIRROR(0x6000) AM_DEVREADWRITE("saa5050", saa5050_videoram_r, saa5050_videoram_w)
|
||||
AM_RANGE(0x2000, 0x2fff) AM_ROM
|
||||
AM_RANGE(0x4000, 0x4fff) AM_ROM
|
||||
@ -445,7 +446,7 @@ static MACHINE_CONFIG_DERIVED( malzak2, malzak )
|
||||
MDRV_CPU_MODIFY( "maincpu" )
|
||||
MDRV_CPU_PROGRAM_MAP(malzak2_map)
|
||||
|
||||
MDRV_NVRAM_HANDLER( generic_0fill )
|
||||
MDRV_NVRAM_ADD_0FILL("nvram")
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
ROM_START( malzak )
|
||||
|
@ -437,6 +437,7 @@
|
||||
#include "cpu/z180/z180.h"
|
||||
#include "sound/saa1099.h"
|
||||
#include "sound/msm5205.h"
|
||||
#include "machine/nvram.h"
|
||||
|
||||
/* RAM areas */
|
||||
static UINT8* mastboy_tileram;
|
||||
@ -456,6 +457,17 @@ static int mastboy_m5205_next;
|
||||
static int mastboy_m5205_part;
|
||||
static int mastboy_m5205_sambit0, mastboy_m5205_sambit1;
|
||||
|
||||
class mastboy_state : public driver_device
|
||||
{
|
||||
public:
|
||||
mastboy_state(running_machine &machine, const driver_device_config_base &config)
|
||||
: driver_device(machine, config),
|
||||
m_nvram(*this, "nvram") { }
|
||||
|
||||
required_shared_ptr<UINT8> m_nvram;
|
||||
};
|
||||
|
||||
|
||||
/* VIDEO EMULATION */
|
||||
|
||||
static VIDEO_START(mastboy)
|
||||
@ -583,14 +595,16 @@ static WRITE8_HANDLER( mastboy_bank_w )
|
||||
|
||||
static READ8_HANDLER( mastboy_backupram_r )
|
||||
{
|
||||
return space->machine->generic.nvram.u8[offset];
|
||||
mastboy_state *state = space->machine->driver_data<mastboy_state>();
|
||||
return state->m_nvram[offset];
|
||||
}
|
||||
|
||||
static WRITE8_HANDLER( mastboy_backupram_w )
|
||||
{
|
||||
mastboy_state *state = space->machine->driver_data<mastboy_state>();
|
||||
// if (mastboy_backupram_enabled)
|
||||
// {
|
||||
space->machine->generic.nvram.u8[offset] = data;
|
||||
state->m_nvram[offset] = data;
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
@ -685,7 +699,7 @@ static ADDRESS_MAP_START( mastboy_map, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
|
||||
AM_RANGE(0xc000, 0xffff) AM_READWRITE(banked_ram_r,banked_ram_w) // mastboy bank area read / write
|
||||
|
||||
AM_RANGE(0xff000, 0xff7ff) AM_READWRITE(mastboy_backupram_r,mastboy_backupram_w) AM_BASE_SIZE_GENERIC(nvram)
|
||||
AM_RANGE(0xff000, 0xff7ff) AM_READWRITE(mastboy_backupram_r,mastboy_backupram_w) AM_SHARE("nvram")
|
||||
|
||||
AM_RANGE(0xff800, 0xff807) AM_READ_PORT("P1")
|
||||
AM_RANGE(0xff808, 0xff80f) AM_READ_PORT("P2")
|
||||
@ -855,13 +869,13 @@ static MACHINE_RESET( mastboy )
|
||||
|
||||
|
||||
|
||||
static MACHINE_CONFIG_START( mastboy, driver_device )
|
||||
static MACHINE_CONFIG_START( mastboy, mastboy_state )
|
||||
MDRV_CPU_ADD("maincpu", Z180, 12000000/2) /* HD647180X0CP6-1M1R */
|
||||
MDRV_CPU_PROGRAM_MAP(mastboy_map)
|
||||
MDRV_CPU_IO_MAP(mastboy_io_map)
|
||||
MDRV_CPU_VBLANK_INT("screen", mastboy_interrupt)
|
||||
|
||||
MDRV_NVRAM_HANDLER(generic_1fill)
|
||||
MDRV_NVRAM_ADD_1FILL("nvram")
|
||||
|
||||
MDRV_MACHINE_RESET( mastboy )
|
||||
|
||||
|
@ -21,6 +21,7 @@
|
||||
#include "sound/ay8910.h"
|
||||
#include "sound/2413intf.h"
|
||||
#include "sound/okim6376.h"
|
||||
#include "machine/nvram.h"
|
||||
|
||||
#define VERBOSE 1
|
||||
#define LOG(x) do { if (VERBOSE) logerror x; } while (0)
|
||||
@ -746,7 +747,7 @@ static WRITE8_HANDLER( m1_latch_w )
|
||||
|
||||
|
||||
static ADDRESS_MAP_START( m1_memmap, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
AM_RANGE(0x0000, 0x1fff) AM_RAM AM_BASE_SIZE_GENERIC(nvram)
|
||||
AM_RANGE(0x0000, 0x1fff) AM_RAM AM_SHARE("nvram")
|
||||
|
||||
AM_RANGE(0x2000, 0x2000) AM_WRITE(reel12_w)
|
||||
AM_RANGE(0x2010, 0x2010) AM_WRITE(reel34_w)
|
||||
@ -811,7 +812,7 @@ static MACHINE_CONFIG_START( m1, driver_device )
|
||||
MDRV_SOUND_ADD("msm6376", OKIM6376, M1_MASTER_CLOCK/4) //?
|
||||
MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
|
||||
|
||||
MDRV_NVRAM_HANDLER(generic_0fill)
|
||||
MDRV_NVRAM_ADD_0FILL("nvram")
|
||||
|
||||
MDRV_DEFAULT_LAYOUT(layout_awpvid16)
|
||||
MACHINE_CONFIG_END
|
||||
|
@ -132,6 +132,7 @@ Find lamps/reels after UPD changes.
|
||||
#include "machine/68681.h"
|
||||
#include "sound/2413intf.h"
|
||||
#include "sound/upd7759.h"
|
||||
#include "machine/nvram.h"
|
||||
|
||||
|
||||
/*************************************
|
||||
@ -641,7 +642,7 @@ static WRITE16_HANDLER( vsync_int_ctrl )
|
||||
|
||||
static ADDRESS_MAP_START( main_map, ADDRESS_SPACE_PROGRAM, 16 )
|
||||
AM_RANGE(0x000000, 0x07ffff) AM_ROM
|
||||
AM_RANGE(0x080000, 0x083fff) AM_RAM AM_BASE_SIZE_GENERIC(nvram)
|
||||
AM_RANGE(0x080000, 0x083fff) AM_RAM AM_SHARE("nvram")
|
||||
AM_RANGE(0x100000, 0x17ffff) AM_ROM AM_REGION("maincpu", 0x80000)
|
||||
AM_RANGE(0x820000, 0x820003) AM_READWRITE(maygay_8279_r, maygay_8279_w)
|
||||
AM_RANGE(0x800000, 0x800003) AM_DEVWRITE8( "ymsnd", ym2413_w, 0xff00 )
|
||||
@ -1004,7 +1005,7 @@ static MACHINE_CONFIG_START( maygayv1, driver_device )
|
||||
MDRV_MACHINE_START(maygayv1)
|
||||
MDRV_MACHINE_RESET(maygayv1)
|
||||
|
||||
MDRV_NVRAM_HANDLER(generic_0fill)
|
||||
MDRV_NVRAM_ADD_0FILL("nvram")
|
||||
|
||||
/* TODO: Use real video timings */
|
||||
MDRV_SCREEN_ADD("screen", RASTER)
|
||||
|
@ -9,6 +9,7 @@
|
||||
#include "emu.h"
|
||||
#include "cpu/z80/z80.h"
|
||||
#include "sound/2203intf.h"
|
||||
#include "machine/nvram.h"
|
||||
|
||||
#define MCLK 10000000
|
||||
|
||||
@ -137,7 +138,7 @@ static READ8_HANDLER( key_matrix_r )
|
||||
static ADDRESS_MAP_START( mayumi_map, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
AM_RANGE(0x0000, 0x7fff) AM_ROM
|
||||
AM_RANGE(0x8000, 0xbfff) AM_ROMBANK("bank1")
|
||||
AM_RANGE(0xc000, 0xdfff) AM_RAM AM_BASE_SIZE_GENERIC(nvram)
|
||||
AM_RANGE(0xc000, 0xdfff) AM_RAM AM_SHARE("nvram")
|
||||
AM_RANGE(0xe000, 0xf7ff) AM_RAM_WRITE(mayumi_videoram_w) AM_BASE_MEMBER(mayumi_state, videoram)
|
||||
ADDRESS_MAP_END
|
||||
|
||||
@ -402,7 +403,7 @@ static MACHINE_CONFIG_START( mayumi, mayumi_state )
|
||||
MDRV_SOUND_ROUTE(2, "mono", 0.15)
|
||||
MDRV_SOUND_ROUTE(3, "mono", 0.40)
|
||||
|
||||
MDRV_NVRAM_HANDLER(generic_0fill)
|
||||
MDRV_NVRAM_ADD_0FILL("nvram")
|
||||
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
|
@ -290,6 +290,7 @@
|
||||
#include "machine/z80sio.h"
|
||||
#include "audio/mcr.h"
|
||||
#include "sound/samples.h"
|
||||
#include "machine/nvram.h"
|
||||
#include "includes/mcr.h"
|
||||
|
||||
|
||||
@ -617,7 +618,7 @@ static WRITE8_HANDLER( demoderb_op4_w )
|
||||
static ADDRESS_MAP_START( cpu_90009_map, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
ADDRESS_MAP_UNMAP_HIGH
|
||||
AM_RANGE(0x0000, 0x6fff) AM_ROM
|
||||
AM_RANGE(0x7000, 0x77ff) AM_MIRROR(0x0800) AM_RAM AM_BASE_SIZE_GENERIC(nvram)
|
||||
AM_RANGE(0x7000, 0x77ff) AM_MIRROR(0x0800) AM_RAM AM_SHARE("nvram")
|
||||
AM_RANGE(0xf000, 0xf1ff) AM_MIRROR(0x0200) AM_RAM AM_BASE_SIZE_GENERIC(spriteram)
|
||||
AM_RANGE(0xf400, 0xf41f) AM_MIRROR(0x03e0) AM_WRITE(paletteram_xxxxRRRRBBBBGGGG_split1_w) AM_BASE_GENERIC(paletteram)
|
||||
AM_RANGE(0xf800, 0xf81f) AM_MIRROR(0x03e0) AM_WRITE(paletteram_xxxxRRRRBBBBGGGG_split2_w) AM_BASE_GENERIC(paletteram2)
|
||||
@ -646,7 +647,7 @@ ADDRESS_MAP_END
|
||||
static ADDRESS_MAP_START( cpu_90010_map, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
ADDRESS_MAP_UNMAP_HIGH
|
||||
AM_RANGE(0x0000, 0xbfff) AM_ROM
|
||||
AM_RANGE(0xc000, 0xc7ff) AM_MIRROR(0x1800) AM_RAM AM_BASE_SIZE_GENERIC(nvram)
|
||||
AM_RANGE(0xc000, 0xc7ff) AM_MIRROR(0x1800) AM_RAM AM_SHARE("nvram")
|
||||
AM_RANGE(0xe000, 0xe1ff) AM_MIRROR(0x1600) AM_RAM AM_BASE_SIZE_GENERIC(spriteram)
|
||||
AM_RANGE(0xe800, 0xefff) AM_MIRROR(0x1000) AM_RAM_WRITE(mcr_90010_videoram_w) AM_BASE_GENERIC(videoram) AM_SIZE_GENERIC(videoram)
|
||||
ADDRESS_MAP_END
|
||||
@ -673,7 +674,7 @@ ADDRESS_MAP_END
|
||||
static ADDRESS_MAP_START( cpu_91490_map, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
ADDRESS_MAP_UNMAP_HIGH
|
||||
AM_RANGE(0x0000, 0xdfff) AM_ROM
|
||||
AM_RANGE(0xe000, 0xe7ff) AM_RAM AM_BASE_SIZE_GENERIC(nvram)
|
||||
AM_RANGE(0xe000, 0xe7ff) AM_RAM AM_SHARE("nvram")
|
||||
AM_RANGE(0xe800, 0xe9ff) AM_MIRROR(0x0200) AM_RAM AM_BASE_SIZE_GENERIC(spriteram)
|
||||
AM_RANGE(0xf000, 0xf7ff) AM_RAM_WRITE(mcr_91490_videoram_w) AM_BASE_GENERIC(videoram) AM_SIZE_GENERIC(videoram)
|
||||
AM_RANGE(0xf800, 0xf87f) AM_MIRROR(0x0780) AM_WRITE(mcr_91490_paletteram_w) AM_BASE_GENERIC(paletteram)
|
||||
@ -1580,7 +1581,7 @@ static MACHINE_CONFIG_START( mcr_90009, driver_device )
|
||||
MDRV_WATCHDOG_VBLANK_INIT(16)
|
||||
MDRV_MACHINE_START(mcr)
|
||||
MDRV_MACHINE_RESET(mcr)
|
||||
MDRV_NVRAM_HANDLER(generic_1fill)
|
||||
MDRV_NVRAM_ADD_1FILL("nvram")
|
||||
|
||||
/* video hardware */
|
||||
MDRV_VIDEO_ATTRIBUTES(VIDEO_UPDATE_BEFORE_VBLANK)
|
||||
|
@ -106,6 +106,7 @@
|
||||
#include "deprecat.h"
|
||||
#include "machine/z80ctc.h"
|
||||
#include "audio/mcr.h"
|
||||
#include "machine/nvram.h"
|
||||
#include "includes/mcr.h"
|
||||
|
||||
#include "turbotag.lh"
|
||||
@ -477,7 +478,7 @@ static READ8_HANDLER( turbotag_kludge_r )
|
||||
static ADDRESS_MAP_START( mcrmono_map, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
ADDRESS_MAP_UNMAP_HIGH
|
||||
AM_RANGE(0x0000, 0xdfff) AM_ROM
|
||||
AM_RANGE(0xe000, 0xe7ff) AM_RAM AM_BASE_SIZE_GENERIC(nvram)
|
||||
AM_RANGE(0xe000, 0xe7ff) AM_RAM AM_SHARE("nvram")
|
||||
AM_RANGE(0xe800, 0xe9ff) AM_RAM AM_BASE_SIZE_GENERIC(spriteram)
|
||||
AM_RANGE(0xea00, 0xebff) AM_RAM
|
||||
AM_RANGE(0xec00, 0xec7f) AM_MIRROR(0x0380) AM_WRITE(mcr3_paletteram_w) AM_BASE_GENERIC(paletteram)
|
||||
@ -513,7 +514,7 @@ static ADDRESS_MAP_START( spyhunt_map, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
AM_RANGE(0x0000, 0xdfff) AM_ROM
|
||||
AM_RANGE(0xe000, 0xe7ff) AM_RAM_WRITE(spyhunt_videoram_w) AM_BASE_GENERIC(videoram) AM_SIZE_GENERIC(videoram)
|
||||
AM_RANGE(0xe800, 0xebff) AM_MIRROR(0x0400) AM_RAM_WRITE(spyhunt_alpharam_w) AM_BASE(&spyhunt_alpharam)
|
||||
AM_RANGE(0xf000, 0xf7ff) AM_RAM AM_BASE_SIZE_GENERIC(nvram)
|
||||
AM_RANGE(0xf000, 0xf7ff) AM_RAM AM_SHARE("nvram")
|
||||
AM_RANGE(0xf800, 0xf9ff) AM_RAM AM_BASE_SIZE_GENERIC(spriteram)
|
||||
AM_RANGE(0xfa00, 0xfa7f) AM_MIRROR(0x0180) AM_WRITE(mcr3_paletteram_w) AM_BASE_GENERIC(paletteram)
|
||||
ADDRESS_MAP_END
|
||||
@ -1085,7 +1086,7 @@ static MACHINE_CONFIG_START( mcr3_base, driver_device )
|
||||
MDRV_WATCHDOG_VBLANK_INIT(16)
|
||||
MDRV_MACHINE_START(mcr)
|
||||
MDRV_MACHINE_RESET(mcr)
|
||||
MDRV_NVRAM_HANDLER(generic_0fill)
|
||||
MDRV_NVRAM_ADD_0FILL("nvram")
|
||||
|
||||
/* video hardware */
|
||||
MDRV_VIDEO_ATTRIBUTES(VIDEO_UPDATE_BEFORE_VBLANK)
|
||||
|
@ -57,6 +57,7 @@
|
||||
#include "cpu/m68000/m68000.h"
|
||||
#include "audio/mcr.h"
|
||||
#include "audio/williams.h"
|
||||
#include "machine/nvram.h"
|
||||
#include "includes/mcr.h"
|
||||
|
||||
|
||||
@ -386,7 +387,7 @@ static ADDRESS_MAP_START( trisport_map, ADDRESS_SPACE_PROGRAM, 16 )
|
||||
AM_RANGE(0x000000, 0x03ffff) AM_ROM
|
||||
AM_RANGE(0x080000, 0x08ffff) AM_READ(trisport_port_1_r)
|
||||
AM_RANGE(0x0a0000, 0x0affff) AM_READ_PORT("DSW")
|
||||
AM_RANGE(0x100000, 0x103fff) AM_RAM AM_BASE_SIZE_GENERIC(nvram)
|
||||
AM_RANGE(0x100000, 0x103fff) AM_RAM AM_SHARE("nvram")
|
||||
AM_RANGE(0x120000, 0x12007f) AM_WRITE(mcr68_paletteram_w) AM_BASE_GENERIC(paletteram)
|
||||
AM_RANGE(0x140000, 0x1407ff) AM_RAM AM_BASE_SIZE_GENERIC(spriteram)
|
||||
AM_RANGE(0x160000, 0x160fff) AM_RAM_WRITE(mcr68_videoram_w) AM_BASE_GENERIC(videoram) AM_SIZE_GENERIC(videoram)
|
||||
@ -1057,7 +1058,7 @@ static MACHINE_CONFIG_DERIVED( trisport, mcr68 )
|
||||
MDRV_CPU_MODIFY("maincpu")
|
||||
MDRV_CPU_PROGRAM_MAP(trisport_map)
|
||||
|
||||
MDRV_NVRAM_HANDLER(generic_0fill)
|
||||
MDRV_NVRAM_ADD_0FILL("nvram")
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
|
||||
|
@ -43,6 +43,7 @@ Notes: it's important that "user1" is 0xa0000 bytes with empty space filled
|
||||
#include "machine/8255ppi.h"
|
||||
#include "sound/ay8910.h"
|
||||
#include "video/mc6845.h"
|
||||
#include "machine/nvram.h"
|
||||
|
||||
#define MASTER_CLOCK (XTAL_10MHz)
|
||||
#define CPU_CLOCK (MASTER_CLOCK / 4)
|
||||
@ -67,6 +68,19 @@ static int decryption_key;
|
||||
|
||||
static UINT8 *backup_ram;
|
||||
|
||||
class merit_state : public driver_device
|
||||
{
|
||||
public:
|
||||
merit_state(running_machine &machine, const driver_device_config_base &config)
|
||||
: driver_device(machine, config),
|
||||
m_nvram(*this, "nvram") { }
|
||||
|
||||
required_shared_ptr<UINT8> m_nvram;
|
||||
|
||||
void dodge_nvram_init(nvram_device &nvram, void *base, size_t size);
|
||||
};
|
||||
|
||||
|
||||
static MACHINE_START(merit)
|
||||
{
|
||||
question_address = 0;
|
||||
@ -348,7 +362,7 @@ static ADDRESS_MAP_START( casino5_map, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
AM_RANGE(0x0000, 0x1fff) AM_ROM
|
||||
AM_RANGE(0x2000, 0x3fff) AM_ROMBANK("bank1")
|
||||
AM_RANGE(0x4000, 0x5fff) AM_ROMBANK("bank2")
|
||||
AM_RANGE(0x6000, 0x6fff) AM_RAM AM_BASE_SIZE_GENERIC(nvram)
|
||||
AM_RANGE(0x6000, 0x6fff) AM_RAM AM_SHARE("nvram")
|
||||
AM_RANGE(0x7000, 0x7000) AM_WRITE(casino5_bank_w)
|
||||
AM_RANGE(0x7001, 0x7fff) AM_RAM
|
||||
AM_RANGE(0xa000, 0xa003) AM_DEVREADWRITE("ppi8255_0", ppi8255_r, ppi8255_w)
|
||||
@ -362,7 +376,7 @@ ADDRESS_MAP_END
|
||||
|
||||
static ADDRESS_MAP_START( bigappg_map, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
AM_RANGE(0x0000, 0x7fff) AM_ROM
|
||||
AM_RANGE(0xa000, 0xbfff) AM_RAM AM_BASE_SIZE_GENERIC(nvram)
|
||||
AM_RANGE(0xa000, 0xbfff) AM_RAM AM_SHARE("nvram")
|
||||
AM_RANGE(0xc004, 0xc007) AM_DEVREADWRITE("ppi8255_1", ppi8255_r, ppi8255_w)
|
||||
AM_RANGE(0xc008, 0xc00b) AM_DEVREADWRITE("ppi8255_0", ppi8255_r, ppi8255_w)
|
||||
AM_RANGE(0xe000, 0xe000) AM_DEVWRITE("crtc", mc6845_address_w)
|
||||
@ -374,7 +388,7 @@ ADDRESS_MAP_END
|
||||
|
||||
static ADDRESS_MAP_START( dodge_map, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
AM_RANGE(0x0000, 0x7fff) AM_ROM
|
||||
AM_RANGE(0xa000, 0xbfff) AM_RAM AM_BASE_SIZE_GENERIC(nvram)
|
||||
AM_RANGE(0xa000, 0xbfff) AM_RAM AM_SHARE("nvram")
|
||||
AM_RANGE(0xc004, 0xc007) AM_DEVREADWRITE("ppi8255_0", ppi8255_r, ppi8255_w)
|
||||
AM_RANGE(0xc008, 0xc00b) AM_DEVREADWRITE("ppi8255_1", ppi8255_r, ppi8255_w)
|
||||
AM_RANGE(0xe000, 0xe000) AM_DEVWRITE("crtc", mc6845_address_w)
|
||||
@ -1149,21 +1163,10 @@ static const ay8910_interface merit_ay8912_interface =
|
||||
DEVCB_HANDLER(led2_w), DEVCB_NULL
|
||||
};
|
||||
|
||||
static NVRAM_HANDLER(dodge)
|
||||
void merit_state::dodge_nvram_init(nvram_device &nvram, void *base, size_t size)
|
||||
{
|
||||
if (read_or_write)
|
||||
{
|
||||
mame_fwrite(file, machine->generic.nvram.v, machine->generic.nvram_size);
|
||||
}
|
||||
else if (file)
|
||||
{
|
||||
mame_fread(file, machine->generic.nvram.v, machine->generic.nvram_size);
|
||||
}
|
||||
else
|
||||
{
|
||||
memset(machine->generic.nvram.v, 0x00, machine->generic.nvram_size);
|
||||
machine->generic.nvram.u8[0x1040] = 0xc9; /* ret */
|
||||
}
|
||||
memset(base, 0x00, size);
|
||||
reinterpret_cast<UINT8 *>(base)[0x1040] = 0xc9; /* ret */
|
||||
}
|
||||
|
||||
static MACHINE_START(casino5)
|
||||
@ -1175,7 +1178,7 @@ static MACHINE_START(casino5)
|
||||
memory_set_bank(machine, "bank2", 0);
|
||||
}
|
||||
|
||||
static MACHINE_CONFIG_START( pitboss, driver_device )
|
||||
static MACHINE_CONFIG_START( pitboss, merit_state )
|
||||
MDRV_CPU_ADD("maincpu",Z80, CPU_CLOCK)
|
||||
MDRV_CPU_PROGRAM_MAP(pitboss_map)
|
||||
MDRV_CPU_IO_MAP(trvwhiz_io_map)
|
||||
@ -1207,7 +1210,7 @@ static MACHINE_CONFIG_DERIVED( casino5, pitboss )
|
||||
MDRV_CPU_MODIFY("maincpu")
|
||||
MDRV_CPU_PROGRAM_MAP(casino5_map)
|
||||
|
||||
MDRV_NVRAM_HANDLER(generic_0fill)
|
||||
MDRV_NVRAM_ADD_0FILL("nvram")
|
||||
|
||||
MDRV_MACHINE_START(casino5)
|
||||
MACHINE_CONFIG_END
|
||||
@ -1218,7 +1221,7 @@ static MACHINE_CONFIG_DERIVED( bigappg, pitboss )
|
||||
MDRV_CPU_PROGRAM_MAP(bigappg_map)
|
||||
MDRV_CPU_IO_MAP(tictac_io_map)
|
||||
|
||||
MDRV_NVRAM_HANDLER(generic_0fill)
|
||||
MDRV_NVRAM_ADD_0FILL("nvram")
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
static MACHINE_CONFIG_DERIVED( dodge, pitboss )
|
||||
@ -1226,7 +1229,7 @@ static MACHINE_CONFIG_DERIVED( dodge, pitboss )
|
||||
MDRV_CPU_MODIFY("maincpu")
|
||||
MDRV_CPU_PROGRAM_MAP(dodge_map)
|
||||
|
||||
MDRV_NVRAM_HANDLER(dodge)
|
||||
MDRV_NVRAM_REPLACE_CUSTOM("nvram", merit_state, dodge_nvram_init)
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
static MACHINE_CONFIG_DERIVED( tictac, pitboss )
|
||||
|
@ -108,6 +108,7 @@ Not all regional versions are available for each Megatouch series
|
||||
#include "machine/z80pio.h"
|
||||
#include "machine/pc16552d.h"
|
||||
#include "machine/microtch.h"
|
||||
#include "machine/nvram.h"
|
||||
|
||||
/*************************************
|
||||
*
|
||||
@ -547,7 +548,7 @@ static READ8_HANDLER(meritm_ds1644_r)
|
||||
|
||||
static ADDRESS_MAP_START( meritm_crt250_map, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
AM_RANGE(0x0000, 0xdfff) AM_ROMBANK("bank1")
|
||||
AM_RANGE(0xe000, 0xffff) AM_RAM AM_BASE_SIZE_GENERIC(nvram)
|
||||
AM_RANGE(0xe000, 0xffff) AM_RAM AM_SHARE("nvram")
|
||||
ADDRESS_MAP_END
|
||||
|
||||
static ADDRESS_MAP_START( meritm_crt250_questions_map, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
@ -555,7 +556,7 @@ static ADDRESS_MAP_START( meritm_crt250_questions_map, ADDRESS_SPACE_PROGRAM, 8
|
||||
AM_RANGE(0x0000, 0x0000) AM_WRITE(meritm_crt250_questions_lo_w)
|
||||
AM_RANGE(0x0001, 0x0001) AM_WRITE(meritm_crt250_questions_hi_w)
|
||||
AM_RANGE(0x0002, 0x0002) AM_WRITE(meritm_crt250_questions_bank_w)
|
||||
AM_RANGE(0xe000, 0xffff) AM_RAM AM_BASE_SIZE_GENERIC(nvram)
|
||||
AM_RANGE(0xe000, 0xffff) AM_RAM AM_SHARE("nvram")
|
||||
ADDRESS_MAP_END
|
||||
|
||||
static ADDRESS_MAP_START( meritm_crt250_io_map, ADDRESS_SPACE_IO, 8 )
|
||||
@ -1064,7 +1065,7 @@ static MACHINE_CONFIG_START( meritm_crt250, driver_device )
|
||||
MDRV_TIMER_ADD_SCANLINE("vblank_start", vblank_start_tick, "screen", 259, 262)
|
||||
MDRV_TIMER_ADD_SCANLINE("vblank_end", vblank_end_tick, "screen", 262, 262)
|
||||
|
||||
MDRV_NVRAM_HANDLER(generic_0fill)
|
||||
MDRV_NVRAM_ADD_0FILL("nvram")
|
||||
|
||||
MDRV_VIDEO_ATTRIBUTES(VIDEO_UPDATE_BEFORE_VBLANK)
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user