diff options
author | 2008-12-21 08:21:34 +0000 | |
---|---|---|
committer | 2008-12-21 08:21:34 +0000 | |
commit | c17377e8a90354d19f9b18adb6acdf04c75faa59 (patch) | |
tree | 23905fecb37fcaf50c5d17e91e19919bd797e692 /src/emu/cpu/dsp56k | |
parent | f5ca4e1d0ef4e304cbd8037a4be2991f673abffa (diff) |
Fixed update_handler for the dsp56k and polygonet. [Andrew Gardner]
(The driver more or less works again. And holy moly is this thing fast with my crazy interleave values!)
Diffstat (limited to 'src/emu/cpu/dsp56k')
-rw-r--r-- | src/emu/cpu/dsp56k/dsp56k.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/emu/cpu/dsp56k/dsp56k.c b/src/emu/cpu/dsp56k/dsp56k.c index e3e9557cc8c..83c4771cd49 100644 --- a/src/emu/cpu/dsp56k/dsp56k.c +++ b/src/emu/cpu/dsp56k/dsp56k.c @@ -39,12 +39,15 @@ ***************************************************************************/ static CPU_RESET( dsp56k ); + /*************************************************************************** ONBOARD MEMORY ALLOCATION ***************************************************************************/ +// TODO: Put these in the cpustate!!! static UINT16 *dsp56k_peripheral_ram; static UINT16 *dsp56k_program_ram; + /*************************************************************************** COMPONENT FUNCTIONALITY ***************************************************************************/ @@ -63,6 +66,22 @@ static UINT16 *dsp56k_program_ram; // 4-8 Memory handlers for on-chip peripheral memory. #include "dsp56mem.c" + +/*************************************************************************** + Direct Update Handler +***************************************************************************/ +static DIRECT_UPDATE_HANDLER( dsp56k_direct_handler ) +{ + if (address >= (0x0000<<1) && address <= (0x07ff<<1)) + { + direct->raw = direct->decrypted = (void*)(dsp56k_program_ram - (0x0000<<1)); + return ~0; + } + + return address; +} + + /*************************************************************************** MEMORY ACCESSORS ***************************************************************************/ @@ -172,6 +191,10 @@ static CPU_INIT( dsp56k ) cpustate->device = device; cpustate->program = memory_find_address_space(device, ADDRESS_SPACE_PROGRAM); cpustate->data = memory_find_address_space(device, ADDRESS_SPACE_DATA); + + /* Setup the direct memory handler for this CPU */ + /* NOTE: Be sure to grab this guy and call him if you ever install another direct_update_hander in a driver! */ + memory_set_direct_update_handler(cpustate->program, dsp56k_direct_handler); } static void agu_reset(dsp56k_core* cpustate) |