mirror of
https://github.com/holub/mame
synced 2025-04-24 01:11:11 +03:00
mcs96: Translate first 256 bytes of main memory space to register space
* dvmemory.cpp: Fix oversight in recent refactoring (uninitialized variable)
This commit is contained in:
parent
f05ea5b7b4
commit
7ccaa1c49e
@ -241,6 +241,15 @@ u16 mcs96_device::any_r16(u16 adr)
|
||||
return program->read_word(adr);
|
||||
}
|
||||
|
||||
bool mcs96_device::memory_translate(int spacenum, int intention, offs_t &address, address_space *&target_space)
|
||||
{
|
||||
if (spacenum == AS_PROGRAM && intention != TR_FETCH && address < 0x100)
|
||||
target_space = regs;
|
||||
else
|
||||
target_space = &space(spacenum);
|
||||
return true;
|
||||
}
|
||||
|
||||
uint8_t mcs96_device::do_addb(uint8_t v1, uint8_t v2)
|
||||
{
|
||||
uint16_t sum = v1+v2;
|
||||
|
@ -57,6 +57,7 @@ protected:
|
||||
|
||||
// device_memory_interface overrides
|
||||
virtual space_config_vector memory_space_config() const override;
|
||||
virtual bool memory_translate(int spacenum, int intention, offs_t &address, address_space *&target_space) override;
|
||||
|
||||
// device_state_interface overrides
|
||||
virtual void state_import(const device_state_entry &entry) override;
|
||||
|
@ -868,6 +868,8 @@ bool debug_view_memory::read(u8 size, offs_t offs, u64 &data)
|
||||
offs_t dummyaddr = offs;
|
||||
ismapped = source.m_memintf->translate(source.m_space->spacenum(), device_memory_interface::TR_READ, dummyaddr, tspace);
|
||||
}
|
||||
else
|
||||
tspace = source.m_space;
|
||||
data = ~u64(0);
|
||||
if (ismapped)
|
||||
data = m_expression.context().read_memory(*tspace, offs, size, !m_no_translation);
|
||||
|
Loading…
Reference in New Issue
Block a user