Previous 15994 Revisions Next

r6809 Monday 28th December, 2009 at 20:24:04 UTC by Wilbert Pol
[3DO] Added some registers.
[src/mess/machine]3do.c

src/mess/machine/3do.c
r6808r6809
33#include "includes/3do.h"
44
55typedef struct {
6   UINT32   revision;
7   UINT32   memory_configuration;
6   UINT32   revision;      /* 03300000 */
7   UINT32   msysbits;      /* 03300004 */
8   UINT32   mctl;         /* 03300008 */
9   UINT32   sltime;         /* 0330000c */
10   UINT32   abortbits;      /* 03300020 */
11   UINT32   privbits;      /* 03300024 */
12   UINT32   statbits;      /* 03300028 */
13   UINT32   diag;         /* 03300040 */
14
15   UINT32   ccobctl0;      /* 03300110 */
16   UINT32   ppmpc;         /* 03300120 */
17
18   UINT32   regctl0;      /* 03300130 */
19   UINT32   regctl1;      /* 03300134 */
20   UINT32   regctl2;      /* 03300138 */
21   UINT32   regctl3;      /* 0330013c */
22   UINT32   xyposh;         /* 03300140 */
23   UINT32   xyposl;         /* 03300144 */
24   UINT32   linedxyh;      /* 03300148 */
25   UINT32   linedxyl;      /* 0330014c */
26   UINT32   dxyh;         /* 03300150 */
27   UINT32   dxyl;         /* 03300154 */
28   UINT32   ddxyh;         /* 03300158 */
29   UINT32   ddxyl;         /* 0330015c */
30
31   UINT32   pip[16];      /* 03300180-033001bc (W); 03300180-033001fc (R)*/
832} MADAM;
933
1034
r6808r6809
125149READ32_HANDLER( _3do_madam_r ) {
126150   logerror( "%08X: MADAM read offset = %08X\n", cpu_get_pc(cputag_get_cpu(space->machine, "maincpu")), offset );
127151   switch( offset ) {
128   case 0:      /* 03300000 - Revision */
152   case 0x0000/4:      /* 03300000 - Revision */
129153      return madam.revision;
130   case 1:      /* 03300004 - Memory configuration */
131      return madam.memory_configuration;
154   case 0x0008/4:
155      return madam.mctl;
156   case 0x000c/4:
157      return madam.sltime;
158   case 0x0020/4:
159      return madam.abortbits;
160   case 0x0024/4:
161      return madam.privbits;
162   case 0x0028/4:
163      return madam.statbits;
164   case 0x0040/4:
165      return madam.diag;
166   case 0x0110/4:
167      return madam.ccobctl0;
168   case 0x0120/4:
169      return madam.ppmpc;
170   case 0x0130/4:
171      return madam.regctl0;
172   case 0x0134/4:
173      return madam.regctl1;
174   case 0x0138/4:
175      return madam.regctl2;
176   case 0x013c/4:
177      return madam.regctl3;
178   case 0x0140/4:
179      return madam.xyposh;
180   case 0x0144/4:
181      return madam.xyposl;
182   case 0x0148/4:
183      return madam.linedxyh;
184   case 0x014c/4:
185      return madam.linedxyl;
186   case 0x0150/4:
187      return madam.dxyh;
188   case 0x0154/4:
189      return madam.dxyl;
190   case 0x0158/4:
191      return madam.ddxyh;
192   case 0x015c/4:
193      return madam.ddxyl;
194   case 0x0180/4:
195   case 0x0188/4:
196   case 0x0190/4:
197   case 0x0198/4:
198   case 0x01a0/4:
199   case 0x01a8/4:
200   case 0x01b0/4:
201   case 0x01b8/4:
202   case 0x01c0/4:
203   case 0x01c8/4:
204   case 0x01d0/4:
205   case 0x01d8/4:
206   case 0x01e0/4:
207   case 0x01e8/4:
208   case 0x01f0/4:
209   case 0x01f8/4:
210      return madam.pip[(offset/2) & 0x0f] & 0xffff;
211   case 0x0184/4:
212   case 0x018c/4:
213   case 0x0194/4:
214   case 0x019c/4:
215   case 0x01a4/4:
216   case 0x01ac/4:
217   case 0x01b4/4:
218   case 0x01bc/4:
219   case 0x01c4/4:
220   case 0x01cc/4:
221   case 0x01d4/4:
222   case 0x01dc/4:
223   case 0x01e4/4:
224   case 0x01ec/4:
225   case 0x01f4/4:
226   case 0x01fc/4:
227      return madam.pip[(offset/2) & 0x0f] >> 16;
132228   }
133229   return 0;
134230}
r6808r6809
137233WRITE32_HANDLER( _3do_madam_w ) {
138234   logerror( "%08X: MADAM write offset = %08X, data = %08X, mask = %08X\n", cpu_get_pc(cputag_get_cpu(space->machine, "maincpu")), offset, data, mem_mask );
139235   switch( offset ) {
140   case 0x01:   /* 03300004 - Memory configuration 29 = 2MB DRAM, 1MB VRAM */
141      madam.memory_configuration = data;
236   case 0x0004/4:   /* 03300004 - Memory configuration 29 = 2MB DRAM, 1MB VRAM */
237      madam.msysbits = data;
142238      break;
143   case 0x03:   /* 0330000C - ?? during boot first value written is 00178906 */
239   case 0x0008/4:
240      madam.mctl = data;
144241      break;
145   case 0x08:   /* 03300020 - ?? during boot 00000000 is written here */
242   case 0x000c/4:
243      madam.sltime = data;
146244      break;
245   case 0x0020/4:
246      madam.abortbits = data;
247      break;
248   case 0x0024/4:
249      madam.privbits = data;
250      break;
251   case 0x0028/4:
252      madam.statbits = data;
253   case 0x0040/4:
254      madam.diag = 1;
255      break;
256
257   /* CEL */
258   case 0x0100/4:   /* 03300100 - SPRSTRT - Start the CEL engine (W) */
259   case 0x0104/4:   /* 03300104 - SPRSTOP - Stop the CEL engine (W) */
260   case 0x0108/4:   /* 03300108 - SPRCNTU - Continue the CEL engine (W) */
261   case 0x010c/4:   /* 0330010c - SPRPAUS - Pause the the CEL engine (W) */
262      break;
263   case 0x0110/4:   /* 03300110 - CCOBCTL0 - CCoB control (RW) */
264      madam.ccobctl0 = data;
265      break;
266   case 0x0129/4:   /* 03300120 - PPMPC (RW) */
267      madam.ppmpc = data;
268      break;
269
270   /* Regis */
271   case 0x0130/4:
272      madam.regctl0 = data;
273      break;
274   case 0x0134/4:
275      madam.regctl1 = data;
276      break;
277   case 0x0138/4:
278      madam.regctl2 = data;
279      break;
280   case 0x013c/4:
281      madam.regctl3 = data;
282      break;
283   case 0x0140/4:
284      madam.xyposh = data;
285      break;
286   case 0x0144/4:
287      madam.xyposl = data;
288      break;
289   case 0x0148/4:
290      madam.linedxyh = data;
291      break;
292   case 0x014c/4:
293      madam.linedxyl = data;
294      break;
295   case 0x0150/4:
296      madam.dxyh = data;
297      break;
298   case 0x0154/4:
299      madam.dxyl = data;
300      break;
301   case 0x0158/4:
302      madam.ddxyh = data;
303      break;
304   case 0x015c/4:
305      madam.ddxyl = data;
306      break;
307
308   /* Pip */
309   case 0x0180/4:
310   case 0x0184/4:
311   case 0x0188/4:
312   case 0x018c/4:
313   case 0x0190/4:
314   case 0x0194/4:
315   case 0x0198/4:
316   case 0x019c/4:
317   case 0x01a0/4:
318   case 0x01a4/4:
319   case 0x01a8/4:
320   case 0x01ac/4:
321   case 0x01b0/4:
322   case 0x01b4/4:
323   case 0x01b8/4:
324   case 0x01bc/4:
325      madam.pip[offset & 0x0f] = data;
147326   }
148327}
149328
r6808r6809
151330void _3do_madam_init( void )
152331{
153332   memset( &madam, 0, sizeof(MADAM) );
154   madam.revision = 0x00000001;
333   madam.revision = 0x01020000;
155334}
156335
157336

Previous 15994 Revisions Next


© 1998-2018 The MESS Team