Previous 15994 Revisions Next

r7798 Tuesday 13th April, 2010 at 18:32:46 UTC by Angelo Salese
[PIPPIN]: now enters into an intense ADB PORTB check
[src/mess/drivers]pippin.c

src/mess/drivers/pippin.c
r7797r7798
2626#include "devices/chd_cd.h"
2727#include "sound/cdda.h"
2828
29static READ64_HANDLER( unk1_r )
30{
31   static UINT16 test;
32
33   test ^= 0x0400; //PC=ff808760
34
35   return test << 16 | 0;
36}
37
38static READ64_HANDLER( unk2_r )
39{
40   if(ACCESSING_BITS_32_47)
41      return (UINT64)0xe1 << 32; //PC=fff04810
42
43   return 0;
44}
45
46static UINT8 portb_data;
47
48static READ64_HANDLER( adb_portb_r )
49{
50   if(ACCESSING_BITS_56_63)
51   {
52      if(portb_data == 0x10)
53         return (UINT64)0x08 << 56;
54
55      if(portb_data == 0x38)   //fff04c80
56         return (UINT64)0x20 << 56; //almost sure this is wrong
57
58      //printf("PORTB R %02x\n",portb_data);
59
60
61      return 0;
62   }
63
64   return 0;
65}
66
67static WRITE64_HANDLER( adb_portb_w )
68{
69   if(ACCESSING_BITS_56_63)
70   {
71      portb_data = (UINT64)data >> 56;
72   }
73}
74
2975static ADDRESS_MAP_START( pippin_mem, ADDRESS_SPACE_PROGRAM, 64 )
3076   ADDRESS_MAP_UNMAP_HIGH
3177   AM_RANGE(0x00000000, 0x005fffff) AM_RAM
32   AM_RANGE(0xf3016000, 0xf3016007) AM_NOP // ADB PORTB
78
79   /* writes at 0x0*c01000 the string "Mr. Kesh" and wants it to be read back, true color VRAMs perhaps? */
80   AM_RANGE(0x00c00000, 0x00c01007) AM_RAM
81   AM_RANGE(0x01c00000, 0x01c01007) AM_RAM
82   AM_RANGE(0x02c00000, 0x02c01007) AM_RAM
83   AM_RANGE(0x03c00000, 0x03c01007) AM_RAM
84
85   AM_RANGE(0xf00dfff8, 0xf00dffff) AM_READ(unk2_r)
86
87   AM_RANGE(0xf3008800, 0xf3008807) AM_READ(unk1_r)
88   AM_RANGE(0xf3016000, 0xf3016007) AM_READWRITE(adb_portb_r,adb_portb_w) // ADB PORTB
3389   AM_RANGE(0xf3016400, 0xf3016407) AM_NOP // ADB DDRB
3490   AM_RANGE(0xf3016600, 0xf3016607) AM_NOP // ?
3591   AM_RANGE(0xf3016800, 0xf3016807) AM_NOP // ?

Previous 15994 Revisions Next


© 1998-2018 The MESS Team