trunk/src/mame/machine/3do.c
| r20203 | r20204 | |
| 56 | 56 | #include "emu.h" |
| 57 | 57 | #include "includes/3do.h" |
| 58 | 58 | #include "cpu/arm7/arm7core.h" |
| 59 | #include "debugger.h" |
| 59 | 60 | |
| 60 | 61 | #define VERBOSE 1 |
| 61 | 62 | #define LOG(x) do { if (VERBOSE) printf x; } while (0) |
| r20203 | r20204 | |
| 657 | 658 | if(offset >= 0x3800/4 && offset <= 0x39ff/4) |
| 658 | 659 | { |
| 659 | 660 | UINT32 res = 0; |
| 660 | | offset &= (0xff/4); |
| 661 | offset &= (0x1ff/4); |
| 661 | 662 | res = (m_dspp.EO[(offset<<1)+0] << 16); |
| 662 | 663 | res |= (m_dspp.EO[(offset<<1)+1] & 0xffff); |
| 663 | 664 | return res; |
| r20203 | r20204 | |
| 666 | 667 | if(offset >= 0x3c00/4 && offset <= 0x3fff/4) |
| 667 | 668 | { |
| 668 | 669 | UINT16 res; |
| 669 | | offset &= (0x1ff/4); |
| 670 | offset &= (0x3ff/4); |
| 670 | 671 | res = m_dspp.EO[offset] & 0xffff; |
| 671 | 672 | return res; |
| 672 | 673 | } |
| r20203 | r20204 | |
| 795 | 796 | |
| 796 | 797 | if(offset >= 0x3000/4 && offset <= 0x31ff/4) |
| 797 | 798 | { |
| 798 | | offset &= (0xff/4); |
| 799 | offset &= (0x1ff/4); |
| 799 | 800 | m_dspp.EI[(offset<<1)+0] = data >> 16; |
| 800 | 801 | m_dspp.EI[(offset<<1)+1] = data & 0xffff; |
| 801 | 802 | return; |
| r20203 | r20204 | |
| 803 | 804 | |
| 804 | 805 | if(offset >= 0x3400/4 && offset <= 0x37ff/4) |
| 805 | 806 | { |
| 806 | | offset &= (0x1ff/4); |
| 807 | offset &= (0x3ff/4); |
| 807 | 808 | m_dspp.EI[offset] = data & 0xffff; |
| 808 | 809 | return; |
| 809 | 810 | } |
| r20203 | r20204 | |
| 991 | 992 | */ |
| 992 | 993 | case 0x17fc/4: |
| 993 | 994 | /* TODO: DSPP enabled just before enabling DSPP irq! */ |
| 995 | if(data & 1) |
| 996 | debugger_break(machine()); |
| 997 | |
| 994 | 998 | //printf("%08x\n",data); |
| 995 | 999 | break; |
| 996 | 1000 | |
| r20203 | r20204 | |
| 1098 | 1102 | m_clio.unclerev = 0x03800000; |
| 1099 | 1103 | m_clio.expctl = 0x80; /* ARM has the expansion bus */ |
| 1100 | 1104 | m_dspp.N = auto_alloc_array(machine(), UINT16, 0x800 ); |
| 1101 | | m_dspp.EI = auto_alloc_array(machine(), UINT16, 0x200 ); |
| 1102 | | m_dspp.EO = auto_alloc_array(machine(), UINT16, 0x200 ); |
| 1105 | m_dspp.EI = auto_alloc_array(machine(), UINT16, 0x400 ); |
| 1106 | m_dspp.EO = auto_alloc_array(machine(), UINT16, 0x400 ); |
| 1103 | 1107 | |
| 1104 | 1108 | state_save_register_global_pointer(machine(), m_dspp.N, 0x800); |
| 1105 | | state_save_register_global_pointer(machine(), m_dspp.EI, 0x200); |
| 1106 | | state_save_register_global_pointer(machine(), m_dspp.EO, 0x200); |
| 1109 | state_save_register_global_pointer(machine(), m_dspp.EI, 0x400); |
| 1110 | state_save_register_global_pointer(machine(), m_dspp.EO, 0x400); |
| 1107 | 1111 | } |