Previous 199869 Revisions Next

r33750 Monday 8th December, 2014 at 22:21:16 UTC by David Haywood
ahh, 'long immediate' register, not offset, that makes a lot more sense (nw)
[src/emu/cpu/arcompact]arcompactdasm.c
[src/mess/drivers]leapster.c

trunk/src/emu/cpu/arcompact/arcompactdasm.c
r242261r242262
682682int arcompact_handle04_1d_dasm(DASM_OPS_32)  { print("MPYU (%08x)", op); return 4;} // *
683683int arcompact_handle04_1e_dasm(DASM_OPS_32)  { print("<illegal 0x04_1e> (%08x)", op); return 4;}
684684int arcompact_handle04_1f_dasm(DASM_OPS_32)  { print("<illegal 0x04_1f> (%08x)", op); return 4;}
685int arcompact_handle04_20_dasm(DASM_OPS_32)  { print("Jcc (%08x)", op); return 4;}
685
686#define GET_LIMM_32 \
687   limm = oprom[6] | (oprom[7] << 8); \
688   limm |= (oprom[4] << 16) | (oprom[5] << 24); \
689
690int arcompact_handle04_20_dasm(DASM_OPS_32)
691{
692   int C = (op & 0x00000fc0) >> 6;
693   op &= ~0x00000fc0;
694   
695   if (C == LIMM_REG)
696   {
697      UINT32 limm;
698      GET_LIMM_32;
699
700
701      print("Jcc %08x (%08x)", limm, op);
702   }
703   else
704   {
705      print("Jcc (%04x) (%08x)", C, op);
706   }
707
708   return 4;
709}
710
686711int arcompact_handle04_21_dasm(DASM_OPS_32)  { print("Jcc.D (%08x)", op); return 4;}
687712int arcompact_handle04_22_dasm(DASM_OPS_32)  { print("JLcc (%08x)", op); return 4;}
688713int arcompact_handle04_23_dasm(DASM_OPS_32)  { print("JLcc.D (%08x)", op); return 4;}
trunk/src/mess/drivers/leapster.c
r242261r242262
307307
308308DRIVER_INIT_MEMBER(leapster_state,leapster)
309309{
310   // the CPU is apparently Little Endian (or 'middle endian') but according to documentation definitely NOT 'Big Endian'
311   // a regular ROM order with sensible DASM function makes sense for the 16-bit code, but not for the 32-bit code?! (or initial PC isn't at 0 / there is missing code?)
312310
313   // do PC = 460c0 to see some code
314
315#if 0
316   UINT16 *ROM = (UINT16*)memregion("maincpu")->base();
317   for (int i = 0; i < 0x200000 / 2; i += 2)
318   {
319      UINT16 temp = ROM[i];
320      ROM[i] = ROM[i + 1];;
321      ROM[i + 1] = temp;
322   }
323#endif
324311}
325312
326313CONS(2003,  leapster,    0,         0,  leapster,    leapster, leapster_state, leapster,    "LeapFrog",   "Leapster (Germany)",    GAME_NOT_WORKING | GAME_NO_SOUND | GAME_IS_SKELETON )


Previous 199869 Revisions Next


© 1997-2024 The MAME Team