trunk/src/emu/cpu/arcompact/arcompact.c
| r242681 | r242682 | |
| 30 | 30 | READ32_MEMBER( arcompact_device::arcompact_auxreg003_LPEND_r) { return m_LP_END&0xfffffffe; } |
| 31 | 31 | WRITE32_MEMBER(arcompact_device::arcompact_auxreg003_LPEND_w) { m_LP_END = data&0xfffffffe; } |
| 32 | 32 | |
| 33 | READ32_MEMBER( arcompact_device::arcompact_auxreg00a_STATUS32_r) { return 0xffffdead; /*m_status32;*/ } |
| 34 | |
| 35 | READ32_MEMBER( arcompact_device::arcompact_auxreg025_INTVECTORBASE_r) { return m_INTVECTORBASE&0xfffffc00; } |
| 36 | WRITE32_MEMBER(arcompact_device::arcompact_auxreg025_INTVECTORBASE_w) { m_INTVECTORBASE = data&0xfffffc00; } |
| 37 | |
| 38 | |
| 39 | |
| 40 | |
| 33 | 41 | static ADDRESS_MAP_START( arcompact_auxreg_map, AS_IO, 32, arcompact_device ) |
| 34 | 42 | AM_RANGE(0x000000008, 0x00000000b) AM_READWRITE(arcompact_auxreg002_LPSTART_r, arcompact_auxreg002_LPSTART_w) |
| 35 | 43 | AM_RANGE(0x00000000c, 0x00000000f) AM_READWRITE(arcompact_auxreg003_LPEND_r, arcompact_auxreg003_LPEND_w) |
| 44 | AM_RANGE(0x000000028, 0x00000002b) AM_READ(arcompact_auxreg00a_STATUS32_r) // r/o |
| 45 | AM_RANGE(0x000000094, 0x000000097) AM_READWRITE(arcompact_auxreg025_INTVECTORBASE_r, arcompact_auxreg025_INTVECTORBASE_w) |
| 36 | 46 | ADDRESS_MAP_END |
| 37 | 47 | |
| 38 | 48 | //#define AUX_SPACE_ADDRESS_WIDTH 34 // IO space is 32 bits of dwords, so 34-bits |
| r242681 | r242682 | |
| 169 | 179 | m_status32 = 0; |
| 170 | 180 | m_LP_START = 0; |
| 171 | 181 | m_LP_END = 0; |
| 182 | m_INTVECTORBASE = 0; |
| 172 | 183 | |
| 173 | 184 | } |
| 174 | 185 | |
trunk/src/emu/cpu/arcompact/arcompact.h
| r242681 | r242682 | |
| 65 | 65 | DECLARE_WRITE32_MEMBER(arcompact_auxreg002_LPSTART_w); |
| 66 | 66 | DECLARE_READ32_MEMBER( arcompact_auxreg003_LPEND_r); |
| 67 | 67 | DECLARE_WRITE32_MEMBER(arcompact_auxreg003_LPEND_w); |
| 68 | |
| 69 | DECLARE_READ32_MEMBER( arcompact_auxreg00a_STATUS32_r); |
| 70 | DECLARE_READ32_MEMBER( arcompact_auxreg025_INTVECTORBASE_r); |
| 71 | DECLARE_WRITE32_MEMBER( arcompact_auxreg025_INTVECTORBASE_w); |
| 68 | 72 | |
| 73 | |
| 69 | 74 | protected: |
| 70 | 75 | // device-level overrides |
| 71 | 76 | virtual void device_start(); |
| r242681 | r242682 | |
| 189 | 194 | ARCOMPACT_RETTYPE arcompact_handle04_2f_00(OPS_32); |
| 190 | 195 | ARCOMPACT_RETTYPE arcompact_handle04_2f_01(OPS_32); |
| 191 | 196 | // ARCOMPACT_RETTYPE arcompact_handle04_2f_02(OPS_32); |
| 192 | | ARCOMPACT_RETTYPE arcompact_handle04_2f_03(OPS_32); |
| 197 | // ARCOMPACT_RETTYPE arcompact_handle04_2f_03(OPS_32); |
| 193 | 198 | ARCOMPACT_RETTYPE arcompact_handle04_2f_04(OPS_32); |
| 194 | 199 | ARCOMPACT_RETTYPE arcompact_handle04_2f_05(OPS_32); |
| 195 | 200 | ARCOMPACT_RETTYPE arcompact_handle04_2f_06(OPS_32); |
| r242681 | r242682 | |
| 794 | 799 | ARCOMPACT_HANDLER04_TYPE_PM(04_2b); |
| 795 | 800 | |
| 796 | 801 | ARCOMPACT_HANDLER04_TYPE_PM(04_2f_02); |
| 802 | ARCOMPACT_HANDLER04_TYPE_PM(04_2f_03); |
| 797 | 803 | ARCOMPACT_HANDLER04_TYPE_PM(04_2f_07); |
| 798 | 804 | ARCOMPACT_HANDLER04_TYPE_PM(04_2f_08); |
| 799 | 805 | |
| r242681 | r242682 | |
| 841 | 847 | |
| 842 | 848 | UINT32 m_LP_START; |
| 843 | 849 | UINT32 m_LP_END; |
| 850 | UINT32 m_INTVECTORBASE; |
| 844 | 851 | |
| 845 | 852 | }; |
| 846 | 853 | |
trunk/src/emu/cpu/arcompact/arcompact_execute.c
| r242681 | r242682 | |
| 2306 | 2306 | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_2f_00(OPS_32) { return arcompact_handle04_2f_helper(PARAMS, "ASL"); } // ASL |
| 2307 | 2307 | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_2f_01(OPS_32) { return arcompact_handle04_2f_helper(PARAMS, "ASR"); } // ASR |
| 2308 | 2308 | |
| 2309 | | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_2f_03(OPS_32) { return arcompact_handle04_2f_helper(PARAMS, "ROR"); } // ROR |
| 2310 | 2309 | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_2f_04(OPS_32) { return arcompact_handle04_2f_helper(PARAMS, "RCC"); } // RCC |
| 2311 | 2310 | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_2f_05(OPS_32) { return arcompact_handle04_2f_helper(PARAMS, "SEXB"); } // SEXB |
| 2312 | 2311 | ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_2f_06(OPS_32) { return arcompact_handle04_2f_helper(PARAMS, "SEXW"); } // SEXW |
trunk/src/emu/cpu/arcompact/arcompact_make.py
| r242681 | r242682 | |
| 390 | 390 | EmitGroup04(f, "05_01", "LSR", "UINT32 result = b >> (c&0x1f);", "m_regs[areg] = result;", "m_regs[breg] = result;", 0,0, -1, EmitGroup04_unsupported_Flags ) |
| 391 | 391 | |
| 392 | 392 | # the 04_2f subgroup uses the same encoding, but the areg is already used as sub-opcode select, so any modes relying on areg bits for other reasons (sign, condition) (modes 10, 11m0, 11m1) are illegal. the destination is also breg not areg |
| 393 | | EmitGroup04(f, "04_2f_02", "LSR1", "UINT32 result = c >> 1;", "m_regs[breg] = result;","", 2,1, -1, EmitGroup04_Handle_NZC_LSR1_Flags ) # no alt handler (invalid path) |
| 393 | EmitGroup04(f, "04_2f_02", "LSR1", "UINT32 result = c >> 1;", "m_regs[breg] = result;","", 2,1, -1, EmitGroup04_Handle_NZC_LSR1_Flags ) # no alt handler (invalid path) |
| 394 | EmitGroup04(f, "04_2f_03", "ROR", "int shift = 1; UINT32 mask = (1 << (shift)) - 1; mask <<= (32-shift); UINT32 result = ((c >> shift) & ~mask) | ((c << (32-shift)) & mask);", "m_regs[breg] = result;","", 2,1, -1, EmitGroup04_Handle_NZC_LSR1_Flags ) |
| 395 | |
| 396 | |
| 394 | 397 | EmitGroup04(f, "04_2f_07", "EXTB", "UINT32 result = c & 0x000000ff;", "m_regs[breg] = result;","", 2,1, -1, EmitGroup04_unsupported_Flags ) # ^ |
| 395 | 398 | EmitGroup04(f, "04_2f_08", "EXTW", "UINT32 result = c & 0x0000ffff;", "m_regs[breg] = result;","", 2,1, -1, EmitGroup04_unsupported_Flags ) # ^ |
| 396 | 399 | |
trunk/src/mess/drivers/leapster.c
| r242681 | r242682 | |
| 232 | 232 | return rand() | (rand()<<16); // there is a loop checking that this is above a certain value |
| 233 | 233 | } |
| 234 | 234 | |
| 235 | DECLARE_WRITE32_MEMBER(leapster_aux004b_w) |
| 236 | { |
| 237 | printf("leapster_aux004b_w %04x\n", data); |
| 238 | } |
| 239 | |
| 235 | 240 | protected: |
| 236 | 241 | required_device<cpu_device> m_maincpu; |
| 237 | 242 | required_device<generic_slot_device> m_cart; |
| r242681 | r242682 | |
| 288 | 293 | // AM_RANGE(0x80000000, 0x807fffff) AM_ROMBANK("cartrom") // game ROM pointers are all to the 80xxxxxx region, so I assume it maps here - installed if a cart is present |
| 289 | 294 | ADDRESS_MAP_END |
| 290 | 295 | |
| 296 | static ADDRESS_MAP_START( leapster_aux, AS_IO, 32, leapster_state ) |
| 297 | AM_RANGE(0x00000012c, 0x00000012f) AM_WRITE(leapster_aux004b_w) // this address isn't used by ARC internal stuff afaik, so probably leapster specific |
| 298 | ADDRESS_MAP_END |
| 299 | |
| 291 | 300 | static MACHINE_CONFIG_START( leapster, leapster_state ) |
| 292 | 301 | /* basic machine hardware */ |
| 293 | 302 | // CPU is ArcTangent-A5 '5.1' (ARCompact core) |
| 294 | 303 | MCFG_CPU_ADD("maincpu", ARCA5, 96000000/10) |
| 295 | 304 | MCFG_CPU_PROGRAM_MAP(leapster_map) |
| 305 | MCFG_CPU_IO_MAP(leapster_aux) |
| 296 | 306 | |
| 297 | | |
| 298 | 307 | /* video hardware */ |
| 299 | 308 | MCFG_SCREEN_ADD("screen", LCD) |
| 300 | 309 | MCFG_SCREEN_REFRESH_RATE(60) |