Previous 199869 Revisions Next

r34170 Friday 2nd January, 2015 at 21:32:21 UTC by David Haywood
arcompact (nw)
[src/emu/cpu/arcompact]arcompact.c arcompact.h arcompact_execute.c arcompact_make.py
[src/mess/drivers]leapster.c

trunk/src/emu/cpu/arcompact/arcompact.c
r242681r242682
3030READ32_MEMBER( arcompact_device::arcompact_auxreg003_LPEND_r) { return m_LP_END&0xfffffffe; }
3131WRITE32_MEMBER(arcompact_device::arcompact_auxreg003_LPEND_w) { m_LP_END = data&0xfffffffe; }
3232
33READ32_MEMBER( arcompact_device::arcompact_auxreg00a_STATUS32_r) { return 0xffffdead; /*m_status32;*/ }
34
35READ32_MEMBER( arcompact_device::arcompact_auxreg025_INTVECTORBASE_r) { return m_INTVECTORBASE&0xfffffc00; }
36WRITE32_MEMBER(arcompact_device::arcompact_auxreg025_INTVECTORBASE_w) { m_INTVECTORBASE = data&0xfffffc00; }
37
38
39
40
3341static ADDRESS_MAP_START( arcompact_auxreg_map, AS_IO, 32, arcompact_device )
3442   AM_RANGE(0x000000008, 0x00000000b) AM_READWRITE(arcompact_auxreg002_LPSTART_r, arcompact_auxreg002_LPSTART_w)
3543   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)
3646ADDRESS_MAP_END
3747
3848//#define AUX_SPACE_ADDRESS_WIDTH 34  // IO space is 32 bits of dwords, so 34-bits
r242681r242682
169179   m_status32 = 0;
170180   m_LP_START = 0;
171181   m_LP_END = 0;
182   m_INTVECTORBASE = 0;
172183
173184}
174185
trunk/src/emu/cpu/arcompact/arcompact.h
r242681r242682
6565   DECLARE_WRITE32_MEMBER(arcompact_auxreg002_LPSTART_w);
6666   DECLARE_READ32_MEMBER( arcompact_auxreg003_LPEND_r);
6767   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);
6872
73   
6974protected:
7075   // device-level overrides
7176   virtual void device_start();
r242681r242682
189194   ARCOMPACT_RETTYPE arcompact_handle04_2f_00(OPS_32);
190195   ARCOMPACT_RETTYPE arcompact_handle04_2f_01(OPS_32);
191196//  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);
193198   ARCOMPACT_RETTYPE arcompact_handle04_2f_04(OPS_32);
194199   ARCOMPACT_RETTYPE arcompact_handle04_2f_05(OPS_32);
195200   ARCOMPACT_RETTYPE arcompact_handle04_2f_06(OPS_32);
r242681r242682
794799   ARCOMPACT_HANDLER04_TYPE_PM(04_2b);
795800
796801   ARCOMPACT_HANDLER04_TYPE_PM(04_2f_02);
802   ARCOMPACT_HANDLER04_TYPE_PM(04_2f_03);
797803   ARCOMPACT_HANDLER04_TYPE_PM(04_2f_07);
798804   ARCOMPACT_HANDLER04_TYPE_PM(04_2f_08);
799805
r242681r242682
841847
842848   UINT32 m_LP_START;
843849   UINT32 m_LP_END;
850   UINT32 m_INTVECTORBASE;
844851
845852};
846853
trunk/src/emu/cpu/arcompact/arcompact_execute.c
r242681r242682
23062306ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_2f_00(OPS_32)  { return arcompact_handle04_2f_helper(PARAMS, "ASL"); } // ASL
23072307ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_2f_01(OPS_32)  { return arcompact_handle04_2f_helper(PARAMS, "ASR"); } // ASR
23082308
2309ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_2f_03(OPS_32)  { return arcompact_handle04_2f_helper(PARAMS, "ROR"); } // ROR
23102309ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_2f_04(OPS_32)  { return arcompact_handle04_2f_helper(PARAMS, "RCC"); } // RCC
23112310ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_2f_05(OPS_32)  { return arcompact_handle04_2f_helper(PARAMS, "SEXB"); } // SEXB
23122311ARCOMPACT_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
r242681r242682
390390EmitGroup04(f, "05_01", "LSR", "UINT32 result = b >> (c&0x1f);", "m_regs[areg] = result;", "m_regs[breg] = result;", 0,0, -1, EmitGroup04_unsupported_Flags  )
391391
392392# 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
393EmitGroup04(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)
393EmitGroup04(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)
394EmitGroup04(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
394397EmitGroup04(f, "04_2f_07", "EXTB", "UINT32 result = c & 0x000000ff;",  "m_regs[breg] = result;","", 2,1, -1, EmitGroup04_unsupported_Flags  ) # ^
395398EmitGroup04(f, "04_2f_08", "EXTW", "UINT32 result = c & 0x0000ffff;",  "m_regs[breg] = result;","", 2,1, -1, EmitGroup04_unsupported_Flags  ) # ^
396399
trunk/src/mess/drivers/leapster.c
r242681r242682
232232      return rand() | (rand()<<16); // there is a loop checking that this is above a certain value
233233   }
234234
235   DECLARE_WRITE32_MEMBER(leapster_aux004b_w)
236   {
237      printf("leapster_aux004b_w %04x\n", data);
238   }
239
235240protected:
236241   required_device<cpu_device> m_maincpu;
237242   required_device<generic_slot_device> m_cart;
r242681r242682
288293//  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
289294ADDRESS_MAP_END
290295
296static 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
298ADDRESS_MAP_END
299
291300static MACHINE_CONFIG_START( leapster, leapster_state )
292301   /* basic machine hardware */
293302   // CPU is ArcTangent-A5 '5.1' (ARCompact core)
294303   MCFG_CPU_ADD("maincpu", ARCA5, 96000000/10)
295304   MCFG_CPU_PROGRAM_MAP(leapster_map)
305   MCFG_CPU_IO_MAP(leapster_aux)
296306
297
298307   /* video hardware */
299308   MCFG_SCREEN_ADD("screen", LCD)
300309   MCFG_SCREEN_REFRESH_RATE(60)


Previous 199869 Revisions Next


© 1997-2024 The MAME Team