src/mess/drivers/pippin.c
| r7797 | r7798 | |
| 26 | 26 | #include "devices/chd_cd.h" |
| 27 | 27 | #include "sound/cdda.h" |
| 28 | 28 | |
| 29 | static READ64_HANDLER( unk1_r ) |
| 30 | { |
| 31 | static UINT16 test; |
| 32 | |
| 33 | test ^= 0x0400; //PC=ff808760 |
| 34 | |
| 35 | return test << 16 | 0; |
| 36 | } |
| 37 | |
| 38 | static READ64_HANDLER( unk2_r ) |
| 39 | { |
| 40 | if(ACCESSING_BITS_32_47) |
| 41 | return (UINT64)0xe1 << 32; //PC=fff04810 |
| 42 | |
| 43 | return 0; |
| 44 | } |
| 45 | |
| 46 | static UINT8 portb_data; |
| 47 | |
| 48 | static 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 | |
| 67 | static WRITE64_HANDLER( adb_portb_w ) |
| 68 | { |
| 69 | if(ACCESSING_BITS_56_63) |
| 70 | { |
| 71 | portb_data = (UINT64)data >> 56; |
| 72 | } |
| 73 | } |
| 74 | |
| 29 | 75 | static ADDRESS_MAP_START( pippin_mem, ADDRESS_SPACE_PROGRAM, 64 ) |
| 30 | 76 | ADDRESS_MAP_UNMAP_HIGH |
| 31 | 77 | 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 |
| 33 | 89 | AM_RANGE(0xf3016400, 0xf3016407) AM_NOP // ADB DDRB |
| 34 | 90 | AM_RANGE(0xf3016600, 0xf3016607) AM_NOP // ? |
| 35 | 91 | AM_RANGE(0xf3016800, 0xf3016807) AM_NOP // ? |