src/mess/drivers/a7000.c
| r8772 | r8773 | |
| 1 | 1 | /*************************************************************************** |
| 2 | | |
| 2 | |
| 3 | 3 | Acorn Archimedes 7000/7000+ |
| 4 | 4 | |
| 5 | 5 | 30/07/2010 Skeleton driver. |
| r8772 | r8773 | |
| 9 | 9 | #include "emu.h" |
| 10 | 10 | #include "cpu/arm7/arm7.h" |
| 11 | 11 | |
| 12 | static VIDEO_START( a7000 ) |
| 13 | { |
| 14 | } |
| 12 | 15 | |
| 16 | static VIDEO_UPDATE( a7000 ) |
| 17 | { |
| 18 | return 0; |
| 19 | } |
| 20 | |
| 21 | /* TODO: some of these registers are actually ARM7500 specific */ |
| 22 | static const char *const iomd_regnames[] = |
| 23 | { |
| 24 | "I/O Control", // 0x000 IOCR |
| 25 | "Keyboard Data", // 0x004 KBDDAT |
| 26 | "Keyboard Control", // 0x008 KBDCR |
| 27 | "General Purpose I/O Lines", // 0x00c IOLINES |
| 28 | "IRQA Status", // 0x010 IRQSTA |
| 29 | "IRQA Request/clear", // 0x014 IRQRQA |
| 30 | "IRQA Mask", // 0x018 IRQMSKA |
| 31 | "Enter SUSPEND Mode", // 0x01c SUSMODE |
| 32 | "IRQB Status", // 0x020 IRQSTB |
| 33 | "IRQB Request/clear", // 0x024 IRQRQB |
| 34 | "IRQB Mask", // 0x028 IRQMSKB |
| 35 | "Enter STOP Mode", // 0x02c STOPMODE |
| 36 | "FIQ Status", // 0x030 FIQST |
| 37 | "FIQ Request/clear", // 0x034 FIQRQ |
| 38 | "FIQ Mask", // 0x038 FIQMSK |
| 39 | "Clock divider control", // 0x03c CLKCTL |
| 40 | "Timer 0 Low Bits", // 0x040 T0LOW |
| 41 | "Timer 0 High Bits", // 0x044 T0HIGH |
| 42 | "Timer 0 Go Command", // 0x048 T0GO |
| 43 | "Timer 0 Latch Command", // 0x04c T0LATCH |
| 44 | "Timer 1 Low Bits", // 0x050 T1LOW |
| 45 | "Timer 1 High Bits", // 0x054 T1HIGH |
| 46 | "Timer 1 Go Command", // 0x058 T1GO |
| 47 | "Timer 1 Latch Command", // 0x05c T1LATCH |
| 48 | "IRQC Status", // 0x060 IRQSTC |
| 49 | "IRQC Request/clear", // 0x064 IRQRQC |
| 50 | "IRQC Mask", // 0x068 IRQMSKC |
| 51 | "LCD and IIS Control Bits", // 0x06c VIDIMUX |
| 52 | "IRQD Status", // 0x070 IRQSTD |
| 53 | "IRQD Request/clear", // 0x074 IRQRQD |
| 54 | "IRQD Mask", // 0x078 IRQMSKD |
| 55 | "<RESERVED>", // 0x07c |
| 56 | "ROM Control Bank 0", // 0x080 ROMCR0 |
| 57 | "ROM Control Bank 1", // 0x084 ROMCR1 |
| 58 | "DRAM Control (IOMD)", // 0x088 DRAMCR |
| 59 | "VRAM and Refresh Control", // 0x08c VREFCR |
| 60 | "Flyback Line Size", // 0x090 FSIZE |
| 61 | "Chip ID no. Low Byte", // 0x094 ID0 |
| 62 | "Chip ID no. High Byte", // 0x098 ID1 |
| 63 | "Chip Version Number", // 0x09c VERSION |
| 64 | "Mouse X Position", // 0x0a0 MOUSEX |
| 65 | "Mouse Y Position", // 0x0a4 MOUSEY |
| 66 | "Mouse Data", // 0x0a8 MSEDAT |
| 67 | "Mouse Control", // 0x0ac MSECR |
| 68 | "<RESERVED>", // 0x0b0 |
| 69 | "<RESERVED>", // 0x0b4 |
| 70 | "<RESERVED>", // 0x0b8 |
| 71 | "<RESERVED>", // 0x0bc |
| 72 | "DACK Timing Control", // 0x0c0 DMATCR |
| 73 | "I/O Timing Control", // 0x0c4 IOTCR |
| 74 | "Expansion Card Timing", // 0x0c8 ECTCR |
| 75 | "DMA External Control", // 0x0cc DMAEXT (IOMD) / ASTCR (ARM7500) |
| 76 | "DRAM Width Control", // 0x0d0 DRAMWID |
| 77 | "Force CAS/RAS Lines Low", // 0x0d4 SELFREF |
| 78 | "<RESERVED>", // 0x0d8 |
| 79 | "<RESERVED>", // 0x0dc |
| 80 | "A to D IRQ Control", // 0x0e0 ATODICR |
| 81 | "A to D IRQ Status", // 0x0e4 ATODCC |
| 82 | "A to D IRQ Converter Control", // 0x0e8 ATODICR |
| 83 | "A to D IRQ Counter 1", // 0x0ec ATODCNT1 |
| 84 | "A to D IRQ Counter 2", // 0x0f0 ATODCNT2 |
| 85 | "A to D IRQ Counter 3", // 0x0f4 ATODCNT3 |
| 86 | "A to D IRQ Counter 4", // 0x0f8 ATODCNT4 |
| 87 | "<RESERVED>", // 0x0fc |
| 88 | "I/O DMA 0 CurA", // 0x100 IO0CURA |
| 89 | "I/O DMA 0 EndA", // 0x104 IO0ENDA |
| 90 | "I/O DMA 0 CurB", // 0x108 IO0CURB |
| 91 | "I/O DMA 0 EndB", // 0x10c IO0ENDB |
| 92 | "I/O DMA 0 Control", // 0x110 IO0CR |
| 93 | "I/O DMA 0 Status", // 0x114 IO0ST |
| 94 | "<RESERVED>", // 0x118 |
| 95 | "<RESERVED>", // 0x11c |
| 96 | "I/O DMA 1 CurA", // 0x120 IO1CURA |
| 97 | "I/O DMA 1 EndA", // 0x124 IO1ENDA |
| 98 | "I/O DMA 1 CurB", // 0x128 IO1CURB |
| 99 | "I/O DMA 1 EndB", // 0x12c IO1ENDB |
| 100 | "I/O DMA 1 Control", // 0x130 IO1CR |
| 101 | "I/O DMA 1 Status", // 0x134 IO1ST |
| 102 | "<RESERVED>", // 0x138 |
| 103 | "<RESERVED>", // 0x13c |
| 104 | "I/O DMA 2 CurA", // 0x140 IO2CURA |
| 105 | "I/O DMA 2 EndA", // 0x144 IO2ENDA |
| 106 | "I/O DMA 2 CurB", // 0x148 IO2CURB |
| 107 | "I/O DMA 2 EndB", // 0x14c IO2ENDB |
| 108 | "I/O DMA 2 Control", // 0x150 IO2CR |
| 109 | "I/O DMA 2 Status", // 0x154 IO2ST |
| 110 | "<RESERVED>", // 0x158 |
| 111 | "<RESERVED>", // 0x15c |
| 112 | "I/O DMA 3 CurA", // 0x160 IO3CURA |
| 113 | "I/O DMA 3 EndA", // 0x164 IO3ENDA |
| 114 | "I/O DMA 3 CurB", // 0x168 IO3CURB |
| 115 | "I/O DMA 3 EndB", // 0x16c IO3ENDB |
| 116 | "I/O DMA 3 Control", // 0x170 IO3CR |
| 117 | "I/O DMA 3 Status", // 0x174 IO3ST |
| 118 | "<RESERVED>", // 0x178 |
| 119 | "<RESERVED>", // 0x17c |
| 120 | "Sound DMA 0 CurA", // 0x180 SD0CURA |
| 121 | "Sound DMA 0 EndA", // 0x184 SD0ENDA |
| 122 | "Sound DMA 0 CurB", // 0x188 SD0CURB |
| 123 | "Sound DMA 0 EndB", // 0x18c SD0ENDB |
| 124 | "Sound DMA 0 Control", // 0x190 SD0CR |
| 125 | "Sound DMA 0 Status", // 0x194 SD0ST |
| 126 | "<RESERVED>", // 0x198 |
| 127 | "<RESERVED>", // 0x19c |
| 128 | "Sound DMA 1 CurA", // 0x1a0 SD1CURA |
| 129 | "Sound DMA 1 EndA", // 0x1a4 SD1ENDA |
| 130 | "Sound DMA 1 CurB", // 0x1a8 SD1CURB |
| 131 | "Sound DMA 1 EndB", // 0x1ac SD1ENDB |
| 132 | "Sound DMA 1 Control", // 0x1b0 SD1CR |
| 133 | "Sound DMA 1 Status", // 0x1b4 SD1ST |
| 134 | "<RESERVED>", // 0x1b8 |
| 135 | "<RESERVED>", // 0x1bc |
| 136 | "Cursor DMA Current", // 0x1c0 CURSCUR |
| 137 | "Cursor DMA Init", // 0x1c4 CURSINIT |
| 138 | "Duplex LCD Current B", // 0x1c8 VIDCURB |
| 139 | "<RESERVED>", // 0x1cc |
| 140 | "Video DMA Current", // 0x1d0 VIDCUR |
| 141 | "Video DMA End", // 0x1d4 VIDEND |
| 142 | "Video DMA Start", // 0x1d8 VIDSTART |
| 143 | "Video DMA Init", // 0x1dc VIDINIT |
| 144 | "Video DMA Control", // 0x1e0 VIDCR |
| 145 | "<RESERVED>", // 0x1e4 |
| 146 | "Duplex LCD Init B", // 0x1e8 VIDINITB |
| 147 | "<RESERVED>", // 0x1ec |
| 148 | "DMA IRQ Status", // 0x1f0 DMAST |
| 149 | "DMA IRQ Request", // 0x1f4 DMARQ |
| 150 | "DMA IRQ Mask", // 0x1f8 DMAMSK |
| 151 | "<RESERVED>" // 0x1fc |
| 152 | }; |
| 153 | |
| 154 | #define IOMD_IOCR 0x000/4 |
| 155 | #define IOMD_KBDDAT 0x004/4 |
| 156 | |
| 157 | #define IOMD_ID0 0x094/4 |
| 158 | #define IOMD_ID1 0x098/4 |
| 159 | |
| 160 | static const char *const vidc20_regnames[] = |
| 161 | { |
| 162 | "Video Palette", // 0 |
| 163 | "Video Palette Address", // 1 |
| 164 | "RESERVED", // 2 |
| 165 | "LCD offset", // 3 |
| 166 | "Border Colour", // 4 |
| 167 | "Cursor Palette Logical Colour 1", // 5 |
| 168 | "Cursor Palette Logical Colour 2", // 6 |
| 169 | "Cursor Palette Logical Colour 3", // 7 |
| 170 | "Horizontal", // 8 |
| 171 | "Vertical", // 9 |
| 172 | "Stereo Image", // A |
| 173 | "Sound", // B |
| 174 | "External", // C |
| 175 | "Frequency Synthesis", // D |
| 176 | "Control", // E |
| 177 | "Data Control" // F |
| 178 | }; |
| 179 | |
| 180 | static READ32_HANDLER( a7000_iomd_r ) |
| 181 | { |
| 182 | switch(offset) |
| 183 | { |
| 184 | case IOMD_ID0: return 0x000000e7; // IOMD ID low |
| 185 | case IOMD_ID1: return 0x000000d4; // IOMD ID high |
| 186 | default: logerror("IOMD: %s Register (%04x) read\n",iomd_regnames[offset & (0x1ff >> 2)],offset*4); break; |
| 187 | } |
| 188 | |
| 189 | return 0; |
| 190 | } |
| 191 | |
| 192 | static WRITE32_HANDLER( a7000_iomd_w ) |
| 193 | { |
| 194 | logerror("IOMD: %s Register (%04x) write = %08x\n",iomd_regnames[offset & (0x1ff >> 2)],offset*4,data); |
| 195 | } |
| 196 | |
| 197 | |
| 198 | static WRITE32_HANDLER( a7000_vidc20_w ) |
| 199 | { |
| 200 | int reg = data >> 28; |
| 201 | int val = data & 0xffffff; |
| 202 | |
| 203 | switch(reg) |
| 204 | { |
| 205 | default: logerror("VIDC20: %s Register write = %08x\n",vidc20_regnames[reg],val); |
| 206 | } |
| 207 | } |
| 208 | |
| 13 | 209 | static ADDRESS_MAP_START( a7000_mem, ADDRESS_SPACE_PROGRAM, 32) |
| 14 | | AM_RANGE(0x00000000, 0x003FFFFF) AM_ROM AM_REGION("user1", 0x0) |
| 210 | AM_RANGE(0x00000000, 0x007fffff) AM_MIRROR(0x00800000) AM_ROM AM_REGION("user1", 0x0) |
| 211 | AM_RANGE(0x01000000, 0x01ffffff) AM_NOP //expansion ROM |
| 212 | AM_RANGE(0x02000000, 0x02ffffff) AM_RAM //VRAM |
| 213 | // I/O 03000000 - 033fffff |
| 214 | AM_RANGE(0x03000000, 0x030001ff) AM_MIRROR(0x00200000) AM_READWRITE(a7000_iomd_r,a7000_iomd_w) //IOMD Registers |
| 215 | // AM_RANGE(0x03010000, 0x03011fff) //Super IO |
| 216 | // AM_RANGE(0x03012000, 0x03029fff) //FDC |
| 217 | // AM_RANGE(0x0302b000, 0x0302bfff) //Network podule |
| 218 | // AM_RANGE(0x03040000, 0x0304ffff) //podule space 0,1,2,3 |
| 219 | // AM_RANGE(0x03070000, 0x0307ffff) //podule space 4,5,6,7 |
| 220 | // AM_RANGE(0x03310000, 0x03310003) //Mouse Buttons |
| 221 | AM_RANGE(0x03400000, 0x037fffff) AM_WRITE(a7000_vidc20_w) |
| 222 | // AM_RANGE(0x08000000, 0x08ffffff) AM_MIRROR(0x07000000) //EASI space |
| 223 | AM_RANGE(0x10000000, 0x10ffffff) AM_MIRROR(0x03000000) AM_RAM //SIMM 0 bank 0 |
| 224 | AM_RANGE(0x14000000, 0x14ffffff) AM_MIRROR(0x03000000) AM_RAM //SIMM 0 bank 1 |
| 225 | // AM_RANGE(0x18000000, 0x18ffffff) AM_MIRROR(0x03000000) AM_RAM //SIMM 1 bank 0 |
| 226 | // AM_RANGE(0x1c000000, 0x1cffffff) AM_MIRROR(0x03000000) AM_RAM //SIMM 1 bank 1 |
| 15 | 227 | ADDRESS_MAP_END |
| 16 | 228 | |
| 17 | 229 | |
| r8772 | r8773 | |
| 20 | 232 | INPUT_PORTS_END |
| 21 | 233 | |
| 22 | 234 | |
| 23 | | static MACHINE_RESET(a7000) |
| 24 | | { |
| 25 | | } |
| 26 | | |
| 27 | | static VIDEO_START( a7000 ) |
| 235 | static MACHINE_RESET(a7000) |
| 28 | 236 | { |
| 29 | 237 | } |
| 30 | 238 | |
| 31 | | static VIDEO_UPDATE( a7000 ) |
| 32 | | { |
| 33 | | return 0; |
| 34 | | } |
| 35 | 239 | |
| 36 | 240 | static MACHINE_DRIVER_START( a7000 ) |
| 37 | 241 | |
| r8772 | r8773 | |
| 41 | 245 | |
| 42 | 246 | MDRV_MACHINE_RESET( a7000 ) |
| 43 | 247 | |
| 44 | | |
| 248 | |
| 45 | 249 | /* video hardware */ |
| 46 | 250 | MDRV_SCREEN_ADD("screen", RASTER) |
| 47 | 251 | MDRV_SCREEN_REFRESH_RATE(50) |
| r8772 | r8773 | |
| 64 | 268 | MACHINE_DRIVER_END |
| 65 | 269 | |
| 66 | 270 | ROM_START(a7000) |
| 67 | | ROM_REGION32_LE( 0x400000, "user1", 0 ) |
| 68 | | ROM_LOAD( "rom1.bin", 0x000000, 0x100000, CRC(ff0e3d12) SHA1(fa489bebede3d13dc43cddec5b5c9b6829a28914)) |
| 69 | | ROM_LOAD( "rom2.bin", 0x100000, 0x100000, CRC(4ae4fd8b) SHA1(1b30d5905d5364dfa48bad69257b0ef8190e9bf6)) |
| 70 | | ROM_LOAD( "rom3.bin", 0x200000, 0x100000, CRC(3108fb2b) SHA1(865b01583f3fb5f4ed5e9201676db327cdeb40b3)) |
| 71 | | ROM_LOAD( "rom4.bin", 0x300000, 0x100000, CRC(55a51980) SHA1(a7191727edd5babf679ebbdea6585833a1fb34e6)) |
| 271 | ROM_REGION( 0x800000, "user1", ROMREGION_ERASEFF ) |
| 272 | ROM_LOAD( "rom1.bin", 0x000000, 0x100000, CRC(ff0e3d12) SHA1(fa489bebede3d13dc43cddec5b5c9b6829a28914) ) |
| 273 | ROM_LOAD( "rom2.bin", 0x100000, 0x100000, CRC(4ae4fd8b) SHA1(1b30d5905d5364dfa48bad69257b0ef8190e9bf6) ) |
| 274 | ROM_LOAD( "rom3.bin", 0x200000, 0x100000, CRC(3108fb2b) SHA1(865b01583f3fb5f4ed5e9201676db327cdeb40b3) ) |
| 275 | ROM_LOAD( "rom4.bin", 0x300000, 0x100000, CRC(55a51980) SHA1(a7191727edd5babf679ebbdea6585833a1fb34e6) ) |
| 72 | 276 | ROM_END |
| 73 | 277 | |
| 74 | 278 | ROM_START(a7000p) |
| 75 | | ROM_REGION32_LE( 0x400000, "user1", 0 ) |
| 279 | ROM_REGION( 0x800000, "user1", ROMREGION_ERASEFF ) |
| 76 | 280 | ROM_LOAD( "riscos-3.71.rom", 0x000000, 0x400000, CRC(211cf888) SHA1(c5fe0645e48894fb4b245abeefdc9a65d659af59)) |
| 77 | 281 | ROM_END |
| 78 | 282 | |