Previous 199869 Revisions Next

r26083 Sunday 10th November, 2013 at 05:46:34 UTC by Jürgen Buchmüller
Trying to solve the address_space_config, address_space and required_memory_regions mysteries. Now the PROMs are loaded and decoded right and I still can't copy their data into the memory regions. Can someone help?
[/branches/alto2/src/emu/cpu/alto2]a2roms.c a2roms.h alto2.c alto2.h
[/branches/alto2/src/mess/drivers]alto2.c
[/branches/alto2/src/mess/includes]alto2.h

branches/alto2/src/emu/cpu/alto2/alto2.c
r26082r26083
1616
1717const device_type ALTO2 = &device_creator<alto2_cpu_device>;
1818
19/***************************************************************************
20   ADDRESS MAPS
21***************************************************************************/
1922
23
24// FIXME: Is this required? How to access the address space words?
25// This has to somehow be mapped to the a2mem half DWORD accesses
26// and (optionally) Hamming code and parity flag updating
27READ16_MEMBER( alto2_cpu_device::alto2_ram_r )
28{
29   return 0;
30}
31
32// FIXME: Is this required? How to access the address space words?
33// This has to somehow be mapped to the a2mem half DWORD accesses
34// and (optionally) Hamming code and parity flag updating
35WRITE16_MEMBER( alto2_cpu_device::alto2_ram_w )
36{
37
38}
39
40// FIXME: Dispatch to the a2mem mmio handlers
41READ16_MEMBER( alto2_cpu_device::alto2_mmio_r )
42{
43   return 0;
44}
45
46// FIXME: Dispatch to the a2mem mmio handlers
47WRITE16_MEMBER( alto2_cpu_device::alto2_mmio_w )
48{
49
50}
51
52static ADDRESS_MAP_START( alto2_ucode, AS_PROGRAM, 32, alto2_cpu_device )
53   AM_RANGE(0,                    ALTO2_UCODE_RAM_BASE-1) AM_ROM
54   AM_RANGE(ALTO2_UCODE_RAM_BASE, ALTO2_UCODE_SIZE-1)     AM_RAM
55ADDRESS_MAP_END
56
57static ADDRESS_MAP_START( alto2_constants, AS_DATA, 16, alto2_cpu_device )
58   AM_RANGE(0,                    ALTO2_CONST_SIZE-1)     AM_ROM
59ADDRESS_MAP_END
60
2061//**************************************************************************
2162//  LIVE DEVICE
2263//**************************************************************************
r26082r26083
3071#if   ALTO2_DEBUG
3172   m_log_types(LOG_ALL),
3273   m_log_level(9),
33   m_log_newline(false),
74   m_log_newline(true),
3475#endif
35   m_ucode_config("maincpu", ENDIANNESS_BIG, 32, 14, -2),
36   m_const_config("constants", ENDIANNESS_BIG, 16, 8, -1),
37   m_ram_config("memory", ENDIANNESS_BIG, 16, 17, -1),
76   m_ucode_config("ucode", ENDIANNESS_BIG, 32, 14, -2, ADDRESS_MAP_NAME(alto2_ucode)),
77   m_const_config("constants", ENDIANNESS_BIG, 16, 8, -1, ADDRESS_MAP_NAME(alto2_constants)),
3878   m_ucode(0),
3979   m_const(0),
40   m_ram(0),
80   m_ucode_map(*this, "ucode"),
81   m_const_map(*this, "constants"),
4182   m_icount(0),
4283   m_task_mpc(),
4384   m_task_next2(),
r26082r26083
110151   m_ether_a49(0),
111152   m_eth()
112153{
154   m_is_octal = true;
113155}
114156
115157//-------------------------------------------------
r26082r26083
117159//-------------------------------------------------
118160
119161ROM_START( alto2_cpu )
162   ROM_REGION( sizeof(UINT32)*ALTO2_UCODE_SIZE, "ucode", 0 )
163   ROM_REGION( sizeof(UINT16)*ALTO2_CONST_SIZE, "constants", 0 )
164
165   // Alto-II micro code PROMs, 8 x 4bit
166   ROM_REGION( 16 * 02000, "ucode_proms", 0 )
167   ROM_LOAD( "55x.3",     0*02000, 0x400, CRC(de870d75) SHA1(2b98cc769d8302cb39948711424d987d94e4159b) )   //!< 00000-01777 RSEL(0)',RSEL(1)',RSEL(2)',RSEL(3)'
168   ROM_LOAD( "64x.3",     1*02000, 0x400, CRC(51b444c0) SHA1(8756e51f7f3253a55d75886465beb7ee1be6e1c4) )   //!< 00000-01777 RSEL(4)',ALUF(0)',ALUF(1)',ALUF(2)'
169   ROM_LOAD( "65x.3",     2*02000, 0x400, CRC(741d1437) SHA1(01f7cf07c2173ac93799b2475180bfbbe7e0149b) )   //!< 00000-01777 ALUF(3)',BS(0)',BS(1)',BS(2)'
170   ROM_LOAD( "63x.3",     3*02000, 0x400, CRC(f22d5028) SHA1(c65a42baef702d4aff2d9ad8e363daec27de6801) )   //!< 00000-01777 F1(0),F1(1)',F1(2)',F1(3)'
171   ROM_LOAD( "53x.3",     4*02000, 0x400, CRC(3c89a740) SHA1(95d812d489b2bde03884b2f126f961caa6c8ec45) )   //!< 00000-01777 F2(0),F2(1)',F2(2)',F2(3)'
172   ROM_LOAD( "60x.3",     5*02000, 0x400, CRC(a35de0bf) SHA1(7fa4aead44dcf5393bbfd1706c0ada24aa6fd3ac) )   //!< 00000-01777 LOADT',LOADL,NEXT(0)',NEXT(1)'
173   ROM_LOAD( "61x.3",     6*02000, 0x400, CRC(f25bcb2d) SHA1(acb57f3104a8dc4ba750dd1bf22ccc81cce9f084) )   //!< 00000-01777 NEXT(2)',NEXT(3)',NEXT(4)',NEXT(5)'
174   ROM_LOAD( "62x.3",     7*02000, 0x400, CRC(1b20a63f) SHA1(41dc86438e91c12b0fe42ffcce6b2ac2eb9e714a) )   //!< 00000-01777 NEXT(6)',NEXT(7)',NEXT(8)',NEXT(9)'
175
176   // extended memory Mesa 5.1 micro code PROMs, 8 x 4bit
177   ROM_LOAD( "xm51.u54",  8*02000, 02000, CRC(11086ae9) SHA1(c394e3fadbfb91801ddc1a70cb25dc6f606c4f76) )   //!< 00000-01777 RSEL(0)',RSEL(1)',RSEL(2)',RSEL(3)'
178   ROM_LOAD( "xm51.u74",  9*02000, 02000, CRC(be8224f2) SHA1(ea9abcc3832b26a094319796901237e1e3f238b6) )   //!< 00000-01777 RSEL(4)',ALUF(0)',ALUF(1)',ALUF(2)'
179   ROM_LOAD( "xm51.u75", 10*02000, 02000, CRC(dfe3e3ac) SHA1(246fd29f92150a5d5d7627fbb4f2504c7b6cd5ec) )   //!< 00000-01777 ALUF(3)',BS(0)',BS(1)',BS(2)'
180   ROM_LOAD( "xm51.u73", 11*02000, 02000, CRC(6c20fa46) SHA1(a054330c65048011f12209aaed5c6da73d95f029) )   //!< 00000-01777 F1(0),F1(1)',F1(2)',F1(3)'
181   ROM_LOAD( "xm51.u52", 12*02000, 02000, CRC(0a31eec8) SHA1(4e2ad5daa5e6a6f2143ee4de00c7b625d096fb02) )   //!< 00000-01777 F2(0),F2(1)',F2(2)',F2(3)'
182   ROM_LOAD( "xm51.u70", 13*02000, 02000, CRC(5c64ee54) SHA1(0eb16d1b5e5967be7c1bf8c8ef6efdf0518a752c) )   //!< 00000-01777 LOADT',LOADL,NEXT(0)',NEXT(1)'
183   ROM_LOAD( "xm51.u71", 14*02000, 02000, CRC(7283bf71) SHA1(819fdcc407ed0acdd8f12b02db6efbcab7bec19a) )   //!< 00000-01777 NEXT(2)',NEXT(3)',NEXT(4)',NEXT(5)'
184   ROM_LOAD( "xm51.u72", 15*02000, 02000, CRC(a28e5251) SHA1(44dd8ad4ad56541b5394d30ce3521b4d1d561394) )   //!< 00000-01777 NEXT(6)',NEXT(7)',NEXT(8)',NEXT(9)'
185
186   // constant PROMs, 4 x 4bit
187   // UINT16 src = BITS(addr, 3,2,1,4,5,6,7,0);
188   ROM_REGION( 4 * 0400, "const_proms", 0 )
189   ROM_LOAD( "madr.a6",   0*00400, 00400, CRC(c2c196b2) SHA1(8b2a599ac839ec2a070dbfef2f1626e645c858ca) )   //!< 0000-0377 C(00)',C(01)',C(02)',C(03)'
190   ROM_LOAD( "madr.a5",   1*00400, 00400, CRC(42336101) SHA1(c77819cf40f063af3abf66ea43f17cc1a62e928b) )   //!< 0000-0377 C(04)',C(05)',C(06)',C(07)'
191   ROM_LOAD( "madr.a4",   2*00400, 00400, CRC(b957e490) SHA1(c72660ad3ada4ca0ed8697c6bb6275a4fe703184) )   //!< 0000-0377 C(08)',C(09)',C(10)',C(11)'
192   ROM_LOAD( "madr.a3",   3*00400, 00400, CRC(e0992757) SHA1(5c45ea824970663cb9ee672dc50861539c860249) )   //!< 0000-0377 C(12)',C(13)',C(14)',C(15)'
193
194   // extended memory Mesa 4.1 (?) micro code PROMs, 8 x 4bit (unused)
195   ROM_REGION32_BE( 8 * 02000, "xm_mesa_4.1", ROMREGION_INVERT )
196   ROM_LOAD( "xm654.41",  0*02000, 02000, CRC(beace302) SHA1(0002fea03a0261f57365095c4b87385d833f7063) )   //!< 00000-01777 RSEL(0)',RSEL(1)',RSEL(2)',RSEL(3)'
197   ROM_LOAD( "xm674.41",  1*02000, 02000, CRC(7db5c097) SHA1(364bc41951baa3ad274031bd49abec1cf5b7a980) )   //!< 00000-01777 RSEL(4)',ALUF(0)',ALUF(1)',ALUF(2)'
198   ROM_LOAD( "xm675.41",  2*02000, 02000, CRC(26eac1e7) SHA1(9220a1386afae8de96bdb2cf084afbadeeb61d42) )   //!< 00000-01777 ALUF(3)',BS(0)',BS(1)',BS(2)'
199   ROM_LOAD( "xm673.41",  3*02000, 02000, CRC(8173d7e3) SHA1(7fbacf6dccb60dfe9cef88a248c3a1660efddcf4) )   //!< 00000-01777 F1(0),F1(1)',F1(2)',F1(3)'
200   ROM_LOAD( "xm652.41",  4*02000, 02000, CRC(ddfa94bb) SHA1(38625e269400aaf38cd07b5dbf36c0087a0f1b92) )   //!< 00000-01777 F2(0),F2(1)',F2(2)',F2(3)'
201   ROM_LOAD( "xm670.41",  5*02000, 02000, CRC(1cd187f3) SHA1(0fd5eff7c6b5c2383aa20148a795b80286554675) )   //!< 00000-01777 LOADT',LOADL,NEXT(0)',NEXT(1)'
202   ROM_LOAD( "xm671.41",  6*02000, 02000, CRC(f21b1ad7) SHA1(1e18bdb35de7802892ac373c128f900786d40886) )   //!< 00000-01777 NEXT(2)',NEXT(3)',NEXT(4)',NEXT(5)'
203   ROM_LOAD( "xm672.41",  7*02000, 02000, CRC(110ee075) SHA1(bb72fceba5ce9e5e8c8a0024915006bdd011a3f3) )   //!< 00000-01777 NEXT(6)',NEXT(7)',NEXT(8)',NEXT(9)'
204
120205   ROM_REGION( 0400, "2kctl_u3", 0 )
121206   ROM_LOAD( "2kctl.u3",   00000, 00400, CRC(5f8d89e8) SHA1(487cd944ab074290aea73425e81ef4900d92e250) )   //!< 3601-1 256x4 BPROM; Emulator address modifier
122207
r26082r26083
171256   return ROM_NAME( alto2_cpu );
172257}
173258
259/**
260 * @brief list of microcode PROM loading options
261 */
262static const prom_load_t ucode_prom_list[] = {
263   {   // 0000-01777 RSEL(0)',RSEL(1)',RSEL(2)',RSEL(3)'
264      "55x.3",
265      0,
266      "de870d75",
267      "2b98cc769d8302cb39948711424d987d94e4159b",
268/* size */   ALTO2_UCODE_PAGE_SIZE,
269/* amap */   AMAP_DEFAULT,
270/* axor */   ALTO2_UCODE_PAGE_MASK,
271/* dxor */   017,                  // invert D0-D3
272/* width */   4,
273/* shift */   28,
274/* dmap */   DMAP_DEFAULT,
275/* dand */   ZERO,
276/* type */   sizeof(UINT32)
277   },
278   {   // 0000-01777 RSEL(4)',ALUF(0)',ALUF(1)',ALUF(2)'
279      "64x.3",
280      0,
281      "51b444c0",
282      "8756e51f7f3253a55d75886465beb7ee1be6e1c4",
283/* size */   ALTO2_UCODE_PAGE_SIZE,
284/* amap */   AMAP_DEFAULT,
285/* axor */   ALTO2_UCODE_PAGE_MASK,
286/* dxor */   017,                  // invert D0-D3
287/* width */   4,
288/* shift */   24,
289/* dmap */   DMAP_DEFAULT,
290/* dand */   KEEP,
291/* type */   sizeof(UINT32)
292   },
293   {   // 0000-01777 ALUF(3)',BS(0)',BS(1)',BS(2)'
294      "65x.3",
295      0,
296      "741d1437",
297      "01f7cf07c2173ac93799b2475180bfbbe7e0149b",
298/* size */   ALTO2_UCODE_PAGE_SIZE,
299/* amap */   AMAP_DEFAULT,
300/* axor */   ALTO2_UCODE_PAGE_MASK,
301/* dxor */   017,                  // invert D0-D3
302/* width */   4,
303/* shift */   20,
304/* dmap */   DMAP_DEFAULT,
305/* dand */   KEEP,
306/* type */   sizeof(UINT32)
307   },
308   {   // 0000-01777 F1(0),F1(1)',F1(2)',F1(3)'
309      "63x.3",
310      0,
311      "f22d5028",
312      "c65a42baef702d4aff2d9ad8e363daec27de6801",
313/* size */   ALTO2_UCODE_PAGE_SIZE,
314/* amap */   AMAP_DEFAULT,
315/* axor */   ALTO2_UCODE_PAGE_MASK,
316/* dxor */   007,                  // keep D0, invert D1-D3
317/* width */   4,
318/* shift */   16,
319/* dmap */   DMAP_DEFAULT,
320/* dand */   KEEP,
321/* type */   sizeof(UINT32)
322   },
323   {   // 0000-01777 F2(0),F2(1)',F2(2)',F2(3)'
324      "53x.3",
325      0,
326      "3c89a740",
327      "95d812d489b2bde03884b2f126f961caa6c8ec45",
328/* size */   ALTO2_UCODE_PAGE_SIZE,
329/* amap */   AMAP_DEFAULT,
330/* axor */   ALTO2_UCODE_PAGE_MASK,
331/* dxor */   007,                  // keep D0, invert D1-D3
332/* width */   4,
333/* shift */   12,
334/* dmap */   DMAP_DEFAULT,
335/* dand */   KEEP,
336/* type */   sizeof(UINT32)
337   },
338   {   // 0000-01777 LOADT',LOADL,NEXT(0)',NEXT(1)'
339      "60x.3",
340      0,
341      "a35de0bf",
342      "7fa4aead44dcf5393bbfd1706c0ada24aa6fd3ac",
343/* size */   ALTO2_UCODE_PAGE_SIZE,
344/* amap */   AMAP_DEFAULT,
345/* axor */   ALTO2_UCODE_PAGE_MASK,
346/* dxor */   013,                  // invert D0 and D2-D3
347/* width */   4,
348/* shift */   8,
349/* dmap */   DMAP_DEFAULT,
350/* dand */   KEEP,
351/* type */   sizeof(UINT32)
352   },
353   {   // 0000-01777 NEXT(2)',NEXT(3)',NEXT(4)',NEXT(5)'
354      "61x.3",
355      0,
356      "f25bcb2d",
357      "acb57f3104a8dc4ba750dd1bf22ccc81cce9f084",
358/* size */   ALTO2_UCODE_PAGE_SIZE,
359/* amap */   AMAP_DEFAULT,
360/* axor */   ALTO2_UCODE_PAGE_MASK,
361/* dxor */   017,                  // invert D0-D3
362/* width */   4,
363/* shift */   4,
364/* dmap */   DMAP_DEFAULT,
365/* dand */   KEEP,
366/* type */   sizeof(UINT32)
367   },
368   {   // 0000-01777 NEXT(6)',NEXT(7)',NEXT(8)',NEXT(9)'
369      "62x.3",
370      0,
371      "1b20a63f",
372      "41dc86438e91c12b0fe42ffcce6b2ac2eb9e714a",
373/* size */   ALTO2_UCODE_PAGE_SIZE,
374/* amap */   AMAP_DEFAULT,
375/* axor */   ALTO2_UCODE_PAGE_MASK,
376/* dxor */   017,                  // invert D0-D3
377/* width */   4,
378/* shift */   0,
379/* dmap */   DMAP_DEFAULT,
380/* dand */   KEEP,
381/* type */   sizeof(UINT32)
382   }
383
384#if   (ALTO2_UCODE_ROM_PAGES > 1)
385   ,
386   {   // 02000-03777 RSEL(0)',RSEL(1)',RSEL(2)',RSEL(3)'
387      "xm51.u54",
388      0,
389      "11086ae9",
390      "c394e3fadbfb91801ddc1a70cb25dc6f606c4f76",
391/* size */   ALTO2_UCODE_PAGE_SIZE,
392/* amap */   AMAP_DEFAULT,
393/* axor */   ALTO2_UCODE_PAGE_MASK,
394/* dxor */   017,                  // invert D0-D3
395/* width */   4,
396/* shift */   28,
397/* dmap */   DMAP_DEFAULT,
398/* dand */   ZERO,
399/* type */   sizeof(UINT32)
400   },
401   {   // 02000-03777 RSEL(4)',ALUF(0)',ALUF(1)',ALUF(2)'
402      "xm51.u74",
403      0,
404      "be8224f2",
405      "ea9abcc3832b26a094319796901237e1e3f238b6",
406/* size */   ALTO2_UCODE_PAGE_SIZE,
407/* amap */   AMAP_DEFAULT,
408/* axor */   ALTO2_UCODE_PAGE_MASK,
409/* dxor */   017,                  // invert D0-D3
410/* width */   4,
411/* shift */   24,
412/* dmap */   DMAP_DEFAULT,
413/* dand */   KEEP,
414/* type */   sizeof(UINT32)
415   },
416   {   // 02000-03777 ALUF(3)',BS(0)',BS(1)',BS(2)'
417      "xm51.u75",
418      0,
419      "dfe3e3ac",
420      "246fd29f92150a5d5d7627fbb4f2504c7b6cd5ec",
421/* size */   ALTO2_UCODE_PAGE_SIZE,
422/* amap */   AMAP_DEFAULT,
423/* axor */   ALTO2_UCODE_PAGE_MASK,
424/* dxor */   017,                  // invert D0-D3
425/* width */   4,
426/* shift */   20,
427/* dmap */   DMAP_DEFAULT,
428/* dand */   KEEP,
429/* type */   sizeof(UINT32)
430   },
431   {   // 02000-03777 F1(0),F1(1)',F1(2)',F1(3)'
432      "xm51.u73",
433      0,
434      "6c20fa46",
435      "a054330c65048011f12209aaed5c6da73d95f029",
436/* size */   ALTO2_UCODE_PAGE_SIZE,
437/* amap */   AMAP_DEFAULT,
438/* axor */   ALTO2_UCODE_PAGE_MASK,
439/* dxor */   007,                  // keep D0, invert D1-D3
440/* width */   4,
441/* shift */   16,
442/* dmap */   DMAP_DEFAULT,
443/* dand */   KEEP,
444/* type */   sizeof(UINT32)
445   },
446   {   // 02000-03777 F2(0),F2(1)',F2(2)',F2(3)'
447      "xm51.u52",
448      0,
449      "0a31eec8",
450      "4e2ad5daa5e6a6f2143ee4de00c7b625d096fb02",
451/* size */   ALTO2_UCODE_PAGE_SIZE,
452/* amap */   AMAP_DEFAULT,
453/* axor */   ALTO2_UCODE_PAGE_MASK,
454/* dxor */   007,                  // keep D0, invert D1-D3
455/* width */   4,
456/* shift */   12,
457/* dmap */   DMAP_DEFAULT,
458/* dand */   KEEP,
459/* type */   sizeof(UINT32)
460   },
461   {   // 02000-03777 LOADT',LOADL,NEXT(0)',NEXT(1)'
462      "xm51.u70",
463      0,
464      "5c64ee54",
465      "0eb16d1b5e5967be7c1bf8c8ef6efdf0518a752c",
466/* size */   ALTO2_UCODE_PAGE_SIZE,
467/* amap */   AMAP_DEFAULT,
468/* axor */   ALTO2_UCODE_PAGE_MASK,
469/* dxor */   013,                  // invert D0 and D2-D3
470/* width */   4,
471/* shift */   8,
472/* dmap */   DMAP_DEFAULT,
473/* dand */   KEEP,
474/* type */   sizeof(UINT32)
475   },
476   {   // 02000-03777 NEXT(2)',NEXT(3)',NEXT(4)',NEXT(5)'
477      "xm51.u71",
478      0,
479      "7283bf71",
480      "819fdcc407ed0acdd8f12b02db6efbcab7bec19a",
481/* size */   ALTO2_UCODE_PAGE_SIZE,
482/* amap */   AMAP_DEFAULT,
483/* axor */   ALTO2_UCODE_PAGE_MASK,
484/* dxor */   017,                  // invert D0-D3
485/* width */   4,
486/* shift */   4,
487/* dmap */   DMAP_DEFAULT,
488/* dand */   KEEP,
489/* type */   sizeof(UINT32)
490   },
491   {   // 02000-03777 NEXT(6)',NEXT(7)',NEXT(8)',NEXT(9)'
492      "xm51.u72",
493      0,
494      "a28e5251",
495      "44dd8ad4ad56541b5394d30ce3521b4d1d561394",
496/* size */   ALTO2_UCODE_PAGE_SIZE,
497/* amap */   AMAP_DEFAULT,
498/* axor */   ALTO2_UCODE_PAGE_MASK,
499/* dxor */   017,                  // invert D0-D3
500/* width */   4,
501/* shift */   0,
502/* dmap */   DMAP_DEFAULT,
503/* dand */   KEEP,
504/* type */   sizeof(UINT32)
505   }
506#endif   // (UCODE_ROM_PAGES > 1)
507};
508
509/**
510 * @brief list of constant PROM loading options
511 */
512static const prom_load_t const_prom_list[] = {
513   {   // constant prom D0-D3
514      "madr.a6",
515      "c3.3",
516      "c2c196b2",
517      "8b2a599ac839ec2a070dbfef2f1626e645c858ca",
518/* size */   ALTO2_CONST_SIZE,
519/* amap */   AMAP_CONST_PROM,         // descramble constant address
520/* axor */   0,
521/* dxor */   017,                  // invert D0-D3
522/* width */   4,
523/* shift */   0,
524/* dmap */   DMAP_REVERSE_0_3,         // reverse D0-D3 to D3-D0
525/* dand */   ZERO,
526/* type */   sizeof(UINT16)
527   },
528   {   // constant prom D4-D7
529      "madr.a5",
530      "c2.3",
531      "42336101",
532      "c77819cf40f063af3abf66ea43f17cc1a62e928b",
533/* size */   ALTO2_CONST_SIZE,
534/* amap */   AMAP_CONST_PROM,         // descramble constant address
535/* axor */   0,
536/* dxor */   017,                  // invert D0-D3
537/* width */   4,
538/* shift */   4,
539/* dmap */   DMAP_REVERSE_0_3,         // reverse D0-D3 to D3-D0
540/* dand */   KEEP,
541/* type */   sizeof(UINT16)
542   },
543   {   // constant prom D8-D11
544      "madr.a4",
545      "c1.3",
546      "b957e490",
547      "c72660ad3ada4ca0ed8697c6bb6275a4fe703184",
548/* size */   ALTO2_CONST_SIZE,
549/* amap */   AMAP_CONST_PROM,         // descramble constant address
550/* axor */   0,
551/* dxor */   017,                  // invert D0-D3
552/* width */   4,
553/* shift */   8,
554/* dmap */   DMAP_REVERSE_0_3,         // reverse D0-D3 to D3-D0
555/* dand */   KEEP,
556/* type */   sizeof(UINT16)
557   },
558   {   // constant PROM D12-D15
559      "madr.a3",
560      "c0.3",
561      "e0992757",
562      "5c45ea824970663cb9ee672dc50861539c860249",
563/* size */   ALTO2_CONST_SIZE,
564/* amap */   AMAP_CONST_PROM,         // descramble constant address
565/* axor */   0,
566/* dxor */   017,                  // invert D0-D3
567/* width */   4,
568/* shift */   12,
569/* dmap */   DMAP_REVERSE_0_3,         // reverse D0-D3 to D3-D0
570/* dand */   KEEP,
571/* type */   sizeof(UINT16)
572   }
573};
574
174575//-------------------------------------------------
175576//  device_start - device-specific startup
176577//-------------------------------------------------
r26082r26083
180581{
181582   m_ucode = &space(AS_PROGRAM);
182583   m_const = &space(AS_DATA);
183   m_ram = &space(AS_IO);
184584
585   m_ucode_proms = prom_load(ucode_prom_list, memregion("ucode_proms")->base(), ALTO2_UCODE_ROM_PAGES, 8);
586   m_const_proms = prom_load(const_prom_list, memregion("const_proms")->base(), 1, 4);
587
185588   //! P3601 256x4 BPROM; display FIFO control: STOPWAKE, MBEMPTY
186589   static const prom_load_t pl_displ_a38 =
187590   {
r26082r26083
199602      /* dand */   ZERO,
200603      /* type */   sizeof(UINT8)
201604   };
202   m_disp_a38 = prom_load(this, &pl_displ_a38, memregion("displ_a38")->base(), 1, 1);
605   m_disp_a38 = prom_load(&pl_displ_a38, memregion("displ_a38")->base(), 1, 1);
203606
204607   //! 82S23 32x8 BPROM; display HBLANK, HSYNC, SCANEND, HLCGATE ...
205608   static const prom_load_t pl_displ_a63 =
r26082r26083
218621      /* dand */   ZERO,
219622      /* type */   sizeof(UINT8)
220623   };
221   m_disp_a63 = prom_load(this, &pl_displ_a63, memregion("displ_a63")->base(), 1, 1);
624   m_disp_a63 = prom_load(&pl_displ_a63, memregion("displ_a63")->base(), 1, 1);
222625
223626   //! P3601 256x4 BPROM; display VSYNC and VBLANK
224627   static const prom_load_t pl_displ_a66 =
r26082r26083
237640      /* dand */   ZERO,
238641      /* type */   sizeof(UINT8)
239642   };
240   m_disp_a66 = prom_load(this, &pl_displ_a66, memregion("displ_a66")->base(), 1, 1);
643   m_disp_a66 = prom_load(&pl_displ_a66, memregion("displ_a66")->base(), 1, 1);
241644
242645   //! 3601-1 256x4 BPROM; Emulator address modifier
243646   static const prom_load_t pl_2kctl_u3 =
r26082r26083
256659      /* dand */   ZERO,
257660      /* type */   sizeof(UINT8)
258661   };
259   m_ctl2k_u3 = prom_load(this, &pl_2kctl_u3, memregion("2kctl_u3")->base(), 1, 1);
662   m_ctl2k_u3 = prom_load(&pl_2kctl_u3, memregion("2kctl_u3")->base(), 1, 1);
260663
261664   //! 82S23 32x8 BPROM; task priority and initial address
262665   static const prom_load_t pl_2kctl_u38 =
r26082r26083
275678      /* dand */   ZERO,
276679      /* type */   sizeof(UINT8)
277680   };
278   m_ctl2k_u38 = prom_load(this, &pl_2kctl_u38, memregion("2kctl_u38")->base(), 1, 1);
681   m_ctl2k_u38 = prom_load(&pl_2kctl_u38, memregion("2kctl_u38")->base(), 1, 1);
279682
280683   //! 3601-1 256x4 BPROM; 2KCTL replacement for u51 (1KCTL)
281684   static const prom_load_t pl_2kctl_u76 =
r26082r26083
294697      /* dand */   ZERO,
295698      /* type */   sizeof(UINT8)
296699   };
297   m_ctl2k_u76 = prom_load(this, &pl_2kctl_u76, memregion("2kctl_u76")->base(), 1, 1);
700   m_ctl2k_u76 = prom_load(&pl_2kctl_u76, memregion("2kctl_u76")->base(), 1, 1);
298701
299702   //! ALUF to ALU 741818 functions and carry in mapper
300703   static const prom_load_t pl_alu_a10 =
r26082r26083
313716      /* dand */   ZERO,
314717      /* type */   sizeof(UINT8)
315718   };
316   m_alu_a10 = prom_load(this, &pl_alu_a10, memregion("alu_a10")->base(), 1, 1);
719   m_alu_a10 = prom_load(&pl_alu_a10, memregion("alu_a10")->base(), 1, 1);
317720
318721   static const prom_load_t pl_3kcram_a37 =
319722   {
r26082r26083
331734      /* dand */   ZERO,
332735      /* type */   sizeof(UINT8)
333736   };
334   m_cram3k_a37 = prom_load(this, &pl_3kcram_a37, memregion("3kcram_a37")->base(), 1, 1);
737   m_cram3k_a37 = prom_load(&pl_3kcram_a37, memregion("3kcram_a37")->base(), 1, 1);
335738
336739   static const prom_load_t pl_madr_a32 =
337740   {
r26082r26083
350753      /* type */   sizeof(UINT8)
351754   };
352755
353   m_madr_a32 = prom_load(this, &pl_madr_a32, memregion("madr_a32")->base(), 1, 1);
756   m_madr_a32 = prom_load(&pl_madr_a32, memregion("madr_a32")->base(), 1, 1);
354757
355758   static const prom_load_t pl_madr_a64 =
356759   {
r26082r26083
368771      /* dand */   ZERO,
369772      /* type */   sizeof(UINT8)
370773   };
371   m_madr_a64 = prom_load(this, &pl_madr_a64, memregion("madr_a64")->base(), 1, 1);
774   m_madr_a64 = prom_load(&pl_madr_a64, memregion("madr_a64")->base(), 1, 1);
372775
373776   static const prom_load_t pl_madr_a65 =
374777   {
r26082r26083
386789      /* dand */   ZERO,
387790      /* type */   sizeof(UINT8)
388791   };
389   m_madr_a65 = prom_load(this, &pl_madr_a65, memregion("madr_a65")->base(), 1, 1);
792   m_madr_a65 = prom_load(&pl_madr_a65, memregion("madr_a65")->base(), 1, 1);
390793
391794#if   0   // FIXME: add to alto2_cpu_device
392795   static const prom_load_t pl_madr_a90 =
r26082r26083
405808      /* dand */   ZERO,
406809      /* type */   sizeof(UINT8)
407810   };
408   m_madr_a90 = prom_load(this, &pl_madr_a90, memregion("madr_a90")->base(), 1 ,1);
811   m_madr_a90 = prom_load(&pl_madr_a90, memregion("madr_a90")->base(), 1 ,1);
409812
410813   static const prom_load_t pl_madr_a91 =
411814   {
r26082r26083
423826      /* dand */   ZERO,
424827      /* type */   sizeof(UINT8)
425828   };
426   m_madr_a91 = prom_load(this, &pl_madr_a91, memregion("madr_a91")->base(), 1, 1);
829   m_madr_a91 = prom_load(&pl_madr_a91, memregion("madr_a91")->base(), 1, 1);
427830#endif
428831
429832   static const prom_load_t pl_enet_a41 =
r26082r26083
442845      /* dand */   ZERO,
443846      /* type */   sizeof(UINT8)
444847   };
445   m_ether_a41 = prom_load(this, &pl_enet_a41, memregion("ether_a41")->base(), 1, 1);
848   m_ether_a41 = prom_load(&pl_enet_a41, memregion("ether_a41")->base(), 1, 1);
446849
447850   static const prom_load_t pl_enet_a42 =
448851   {   /* P3601 256x4 BPROM; Ethernet phase encoder 2 "PE2" */
r26082r26083
460863      /* dand */   ZERO,
461864      /* type */   sizeof(UINT8)
462865   };
463   m_ether_a42 = prom_load(this, &pl_enet_a42, memregion("ether_a42")->base(), 1, 1);
866   m_ether_a42 = prom_load(&pl_enet_a42, memregion("ether_a42")->base(), 1, 1);
464867
465868   static const prom_load_t pl_enet_a49 =
466869   {   /* P3601 256x4 BPROM; Ethernet FIFO control "AFIFO" */
r26082r26083
478881      /* dand */   ZERO,
479882      /* type */   sizeof(UINT8)
480883   };
481   m_ether_a49 = prom_load(this, &pl_enet_a49, memregion("ether_a49")->base(), 1, 1);
884   m_ether_a49 = prom_load(&pl_enet_a49, memregion("ether_a49")->base(), 1, 1);
482885
483886   save_item(NAME(m_task_mpc));
484887   save_item(NAME(m_task_next2));
r26082r26083
6931096// FIXME
6941097void alto2_cpu_device::device_reset()
6951098{
1099   UINT8* raw;
6961100   soft_reset();
1101   raw = m_ucode->direct().raw();
1102   if (raw)
1103      memcpy(raw, m_ucode_proms, sizeof(UINT32)*ALTO2_UCODE_RAM_BASE);
1104   raw = m_const->direct().raw();
1105   if (raw)
1106      memcpy(raw, m_const_proms, sizeof(UINT16)*ALTO2_CONST_SIZE);
6971107}
6981108
6991109//-------------------------------------------------
r26082r26083
7141124// FIXME
7151125void alto2_cpu_device::state_string_export(const device_state_entry &entry, astring &string)
7161126{
1127   switch (entry.index())
1128   {
1129   case STATE_GENFLAGS:
1130      string.printf("%s%s%s%s",
1131                 m_aluc0 ? "C":"-",
1132                 m_laluc0 ? "c":"-",
1133                 m_shifter == 0 ? "0":"-",
1134                 m_shifter < 0 ? "<":"-");
1135      break;
1136   }
7171137}
7181138
7191139#if   ALTO2_DEBUG
branches/alto2/src/emu/cpu/alto2/alto2.h
r26082r26083
228228         return &m_ucode_config;
229229      case AS_DATA:
230230         return &m_const_config;
231      case AS_IO:
232         return &m_ram_config;
233231      default:
234232         return NULL;
235233      }
r26082r26083
245243   virtual UINT32 disasm_min_opcode_bytes() const { return 4; }
246244   virtual UINT32 disasm_max_opcode_bytes() const { return 4; }
247245   virtual offs_t disasm_disassemble(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, UINT32 options);
248
249246private:
250247#if   ALTO2_DEBUG
251248   enum {
r26082r26083
288285
289286   address_space_config m_ucode_config;
290287   address_space_config m_const_config;
291   address_space_config m_ram_config;
292288
293289   address_space *m_ucode;
294290   address_space *m_const;
295   address_space *m_ram;
291
292   required_memory_region m_ucode_map;
293   required_memory_region m_const_map;
294
295   UINT8* m_ucode_proms;
296   UINT8* m_const_proms;
297
296298   int m_icount;
297299
300   DECLARE_READ16_MEMBER ( alto2_ram_r );
301   DECLARE_WRITE16_MEMBER( alto2_ram_w );
302   DECLARE_READ16_MEMBER ( alto2_mmio_r );
303   DECLARE_WRITE16_MEMBER( alto2_mmio_w );
304
298305   static const UINT8 m_ether_id = 0121;
299306
300307   typedef void (alto2_cpu_device::*a2func)();
branches/alto2/src/emu/cpu/alto2/a2roms.c
r26082r26083
9090   }
9191}
9292
93UINT8* prom_load(const device_t* device, const prom_load_t* prom, UINT8* src, int pages, int segments)
93UINT8* prom_load(const prom_load_t* prom, const UINT8* src, int pages, int segments)
9494{
9595   void* array = 0;
9696   size_t type = prom->type;
r26082r26083
101101
102102   switch (type) {
103103   case sizeof(UINT8):
104      array = auto_alloc_array(device->machine(), UINT8, pages * size);
104      array = global_alloc_array(UINT8, pages * size);
105105      break;
106106   case sizeof(UINT16):
107      array = auto_alloc_array(device->machine(), UINT16, pages * size);
107      array = global_alloc_array(UINT16, pages * size);
108108      break;
109109   case sizeof(UINT32):
110      array = auto_alloc_array(device->machine(), UINT32, pages * size);
110      array = global_alloc_array(UINT32, pages * size);
111111      break;
112112   }
113113
r26082r26083
141141   case sizeof(UINT8):
142142      {
143143         UINT8* data = reinterpret_cast<UINT8*>(array);
144         for (int addr = 0; addr < size; addr++) {
144         for (int addr = 0; addr < pages*size; addr++) {
145145            if (0 == (addr % 16))
146146               printf("%04x:", addr);
147147            if (width <= 4)
r26082r26083
156156   case sizeof(UINT16):
157157      {
158158         UINT16* data = reinterpret_cast<UINT16*>(array);
159         for (int addr = 0; addr < size; addr++) {
159         for (int addr = 0; addr < pages*size; addr++) {
160160            if (0 == (addr % 8))
161161               printf("%04x:", addr);
162162            printf(" %04x", data[addr]);
r26082r26083
168168   case sizeof(UINT32):
169169      {
170170         UINT32* data = reinterpret_cast<UINT32*>(array);
171         for (int addr = 0; addr < size; addr++) {
171         for (int addr = 0; addr < pages*size; addr++) {
172172            if (0 == (addr % 4))
173173               printf("%04x:", addr);
174174            printf(" %08x", data[addr]);
branches/alto2/src/emu/cpu/alto2/a2roms.h
r26082r26083
3232#define   DMAP_DEFAULT      {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15}
3333#define   DMAP_REVERSE_0_3   {3,2,1,0,}
3434
35extern UINT8* prom_load(const device_t* device, const prom_load_t* prom, UINT8* src, int pages = 1, int segments = 1);
35extern UINT8* prom_load(const prom_load_t* prom, const UINT8* src, int pages = 1, int segments = 1);
3636#endif // _CPU_A2ROMS_H_
branches/alto2/src/mess/drivers/alto2.c
r26082r26083
4242
4343/* Memory Maps */
4444
45/* micro code from ALTO2_UCODE_ROM_PAGES times PROMs and ALTO2_UCODE_RAM_PAGES times RAMs of ALTO2_UCODE_PAGE_SIZE 32-bit words each */
46static ADDRESS_MAP_START( alto2_ucode_map, AS_PROGRAM, 32, alto2_state )
47   AM_RANGE(0,                    ALTO2_UCODE_RAM_BASE-1) AM_ROM
48   AM_RANGE(ALTO2_UCODE_RAM_BASE, ALTO2_UCODE_SIZE-1)     AM_RAM
49ADDRESS_MAP_END
50
51/* constant PROM with 256 16-bit words */
52static ADDRESS_MAP_START( alto2_const_map, AS_DATA, 16, alto2_state )
53   AM_RANGE(0,                    ALTO2_CONST_SIZE-1)     AM_ROM
54ADDRESS_MAP_END
55
5645/* main memory and memory mapped i/o in range ALTO2_IO_PAGE_BASE ... ALTO2_IO_PAGE_BASE + ALTO2_IO_PAGE_SIZE - 1 */
5746static ADDRESS_MAP_START( alto2_ram_map, AS_IO, 16, alto2_state )
5847   AM_RANGE(0,                    ALTO2_IO_PAGE_BASE - 1) AM_READWRITE(alto2_ram_r,  alto2_ram_w)
r26082r26083
271260static MACHINE_CONFIG_START( alto2, alto2_state )
272261   /* basic machine hardware */
273262   MCFG_CPU_ADD("maincpu", ALTO2, XTAL_20_16MHz)
274   MCFG_CPU_PROGRAM_MAP(alto2_ucode_map)
275   MCFG_CPU_DATA_MAP(alto2_const_map)
276263   MCFG_CPU_IO_MAP(alto2_ram_map)
277264
278265   /* video hardware */
r26082r26083
287274/* ROMs */
288275
289276ROM_START( alto2 )
290   // FIXME: how to allocate initally empty regions for AS_PROGRAM, AS_DATA and AS_IO?
291   ROM_REGION( 4*ALTO2_UCODE_SIZE, "maincpu", 0)
292   ROM_REGION( 2*ALTO2_CONST_SIZE, "constants", 0)
293   ROM_REGION( ALTO2_RAM_SIZE, "memory", 0 )
294
295   // Alto-II micro code PROMs, 8 x 4bit
296   ROM_REGION( 16 * 02000, "ucode", 0 )
297   ROM_LOAD( "55x.3",     0*02000, 0x400, CRC(de870d75) SHA1(2b98cc769d8302cb39948711424d987d94e4159b) )   //!< 00000-01777 RSEL(0)',RSEL(1)',RSEL(2)',RSEL(3)'
298   ROM_LOAD( "64x.3",     1*02000, 0x400, CRC(51b444c0) SHA1(8756e51f7f3253a55d75886465beb7ee1be6e1c4) )   //!< 00000-01777 RSEL(4)',ALUF(0)',ALUF(1)',ALUF(2)'
299   ROM_LOAD( "65x.3",     2*02000, 0x400, CRC(741d1437) SHA1(01f7cf07c2173ac93799b2475180bfbbe7e0149b) )   //!< 00000-01777 ALUF(3)',BS(0)',BS(1)',BS(2)'
300   ROM_LOAD( "63x.3",     3*02000, 0x400, CRC(f22d5028) SHA1(c65a42baef702d4aff2d9ad8e363daec27de6801) )   //!< 00000-01777 F1(0),F1(1)',F1(2)',F1(3)'
301   ROM_LOAD( "53x.3",     4*02000, 0x400, CRC(3c89a740) SHA1(95d812d489b2bde03884b2f126f961caa6c8ec45) )   //!< 00000-01777 F2(0),F2(1)',F2(2)',F2(3)'
302   ROM_LOAD( "60x.3",     5*02000, 0x400, CRC(a35de0bf) SHA1(7fa4aead44dcf5393bbfd1706c0ada24aa6fd3ac) )   //!< 00000-01777 LOADT',LOADL,NEXT(0)',NEXT(1)'
303   ROM_LOAD( "61x.3",     6*02000, 0x400, CRC(f25bcb2d) SHA1(acb57f3104a8dc4ba750dd1bf22ccc81cce9f084) )   //!< 00000-01777 NEXT(2)',NEXT(3)',NEXT(4)',NEXT(5)'
304   ROM_LOAD( "62x.3",     7*02000, 0x400, CRC(1b20a63f) SHA1(41dc86438e91c12b0fe42ffcce6b2ac2eb9e714a) )   //!< 00000-01777 NEXT(6)',NEXT(7)',NEXT(8)',NEXT(9)'
305
306   // extended memory Mesa 5.1 micro code PROMs, 8 x 4bit
307   ROM_LOAD( "xm51.u54",  8*02000, 02000, CRC(11086ae9) SHA1(c394e3fadbfb91801ddc1a70cb25dc6f606c4f76) )   //!< 00000-01777 RSEL(0)',RSEL(1)',RSEL(2)',RSEL(3)'
308   ROM_LOAD( "xm51.u74",  9*02000, 02000, CRC(be8224f2) SHA1(ea9abcc3832b26a094319796901237e1e3f238b6) )   //!< 00000-01777 RSEL(4)',ALUF(0)',ALUF(1)',ALUF(2)'
309   ROM_LOAD( "xm51.u75", 10*02000, 02000, CRC(dfe3e3ac) SHA1(246fd29f92150a5d5d7627fbb4f2504c7b6cd5ec) )   //!< 00000-01777 ALUF(3)',BS(0)',BS(1)',BS(2)'
310   ROM_LOAD( "xm51.u73", 11*02000, 02000, CRC(6c20fa46) SHA1(a054330c65048011f12209aaed5c6da73d95f029) )   //!< 00000-01777 F1(0),F1(1)',F1(2)',F1(3)'
311   ROM_LOAD( "xm51.u52", 12*02000, 02000, CRC(0a31eec8) SHA1(4e2ad5daa5e6a6f2143ee4de00c7b625d096fb02) )   //!< 00000-01777 F2(0),F2(1)',F2(2)',F2(3)'
312   ROM_LOAD( "xm51.u70", 13*02000, 02000, CRC(5c64ee54) SHA1(0eb16d1b5e5967be7c1bf8c8ef6efdf0518a752c) )   //!< 00000-01777 LOADT',LOADL,NEXT(0)',NEXT(1)'
313   ROM_LOAD( "xm51.u71", 14*02000, 02000, CRC(7283bf71) SHA1(819fdcc407ed0acdd8f12b02db6efbcab7bec19a) )   //!< 00000-01777 NEXT(2)',NEXT(3)',NEXT(4)',NEXT(5)'
314   ROM_LOAD( "xm51.u72", 15*02000, 02000, CRC(a28e5251) SHA1(44dd8ad4ad56541b5394d30ce3521b4d1d561394) )   //!< 00000-01777 NEXT(6)',NEXT(7)',NEXT(8)',NEXT(9)'
315
316   // constant PROMs, 4 x 4bit
317   // UINT16 src = BITS(addr, 3,2,1,4,5,6,7,0);
318   ROM_REGION( 4 * 0400, "const", 0 )
319   ROM_LOAD( "madr.a6",   0*00400, 00400, CRC(c2c196b2) SHA1(8b2a599ac839ec2a070dbfef2f1626e645c858ca) )   //!< 0000-0377 C(00)',C(01)',C(02)',C(03)'
320   ROM_LOAD( "madr.a5",   1*00400, 00400, CRC(42336101) SHA1(c77819cf40f063af3abf66ea43f17cc1a62e928b) )   //!< 0000-0377 C(04)',C(05)',C(06)',C(07)'
321   ROM_LOAD( "madr.a4",   2*00400, 00400, CRC(b957e490) SHA1(c72660ad3ada4ca0ed8697c6bb6275a4fe703184) )   //!< 0000-0377 C(08)',C(09)',C(10)',C(11)'
322   ROM_LOAD( "madr.a3",   3*00400, 00400, CRC(e0992757) SHA1(5c45ea824970663cb9ee672dc50861539c860249) )   //!< 0000-0377 C(12)',C(13)',C(14)',C(15)'
323
324   // extended memory Mesa 4.1 (?) micro code PROMs, 8 x 4bit (unused)
325   ROM_REGION32_BE( 8 * 02000, "xm_mesa_4.1", ROMREGION_INVERT )
326   ROM_LOAD( "xm654.41",  0*02000, 02000, CRC(beace302) SHA1(0002fea03a0261f57365095c4b87385d833f7063) )   //!< 00000-01777 RSEL(0)',RSEL(1)',RSEL(2)',RSEL(3)'
327   ROM_LOAD( "xm674.41",  1*02000, 02000, CRC(7db5c097) SHA1(364bc41951baa3ad274031bd49abec1cf5b7a980) )   //!< 00000-01777 RSEL(4)',ALUF(0)',ALUF(1)',ALUF(2)'
328   ROM_LOAD( "xm675.41",  2*02000, 02000, CRC(26eac1e7) SHA1(9220a1386afae8de96bdb2cf084afbadeeb61d42) )   //!< 00000-01777 ALUF(3)',BS(0)',BS(1)',BS(2)'
329   ROM_LOAD( "xm673.41",  3*02000, 02000, CRC(8173d7e3) SHA1(7fbacf6dccb60dfe9cef88a248c3a1660efddcf4) )   //!< 00000-01777 F1(0),F1(1)',F1(2)',F1(3)'
330   ROM_LOAD( "xm652.41",  4*02000, 02000, CRC(ddfa94bb) SHA1(38625e269400aaf38cd07b5dbf36c0087a0f1b92) )   //!< 00000-01777 F2(0),F2(1)',F2(2)',F2(3)'
331   ROM_LOAD( "xm670.41",  5*02000, 02000, CRC(1cd187f3) SHA1(0fd5eff7c6b5c2383aa20148a795b80286554675) )   //!< 00000-01777 LOADT',LOADL,NEXT(0)',NEXT(1)'
332   ROM_LOAD( "xm671.41",  6*02000, 02000, CRC(f21b1ad7) SHA1(1e18bdb35de7802892ac373c128f900786d40886) )   //!< 00000-01777 NEXT(2)',NEXT(3)',NEXT(4)',NEXT(5)'
333   ROM_LOAD( "xm672.41",  7*02000, 02000, CRC(110ee075) SHA1(bb72fceba5ce9e5e8c8a0024915006bdd011a3f3) )   //!< 00000-01777 NEXT(6)',NEXT(7)',NEXT(8)',NEXT(9)'
277   ROM_REGION( 2*ALTO2_RAM_SIZE, "memory", 0 )
334278ROM_END
335279
336/**
337 * @brief list of microcoode PROM loading options
338 */
339static const prom_load_t ucode_prom_list[] = {
340   {   // 0000-01777 RSEL(0)',RSEL(1)',RSEL(2)',RSEL(3)'
341      "55x.3",
342      0,
343      "de870d75",
344      "2b98cc769d8302cb39948711424d987d94e4159b",
345/* size */   ALTO2_UCODE_PAGE_SIZE,
346/* amap */   AMAP_DEFAULT,
347/* axor */   ALTO2_UCODE_PAGE_MASK,
348/* dxor */   017,                  // invert D0-D3
349/* width */   4,
350/* shift */   28,
351/* dmap */   DMAP_DEFAULT,
352/* dand */   ZERO,
353/* type */   sizeof(UINT32)
354   },
355   {   // 0000-01777 RSEL(4)',ALUF(0)',ALUF(1)',ALUF(2)'
356      "64x.3",
357      0,
358      "51b444c0",
359      "8756e51f7f3253a55d75886465beb7ee1be6e1c4",
360/* size */   ALTO2_UCODE_PAGE_SIZE,
361/* amap */   AMAP_DEFAULT,
362/* axor */   ALTO2_UCODE_PAGE_MASK,
363/* dxor */   017,                  // invert D0-D3
364/* width */   4,
365/* shift */   24,
366/* dmap */   DMAP_DEFAULT,
367/* dand */   KEEP,
368/* type */   sizeof(UINT32)
369   },
370   {   // 0000-01777 ALUF(3)',BS(0)',BS(1)',BS(2)'
371      "65x.3",
372      0,
373      "741d1437",
374      "01f7cf07c2173ac93799b2475180bfbbe7e0149b",
375/* size */   ALTO2_UCODE_PAGE_SIZE,
376/* amap */   AMAP_DEFAULT,
377/* axor */   ALTO2_UCODE_PAGE_MASK,
378/* dxor */   017,                  // invert D0-D3
379/* width */   4,
380/* shift */   20,
381/* dmap */   DMAP_DEFAULT,
382/* dand */   KEEP,
383/* type */   sizeof(UINT32)
384   },
385   {   // 0000-01777 F1(0),F1(1)',F1(2)',F1(3)'
386      "63x.3",
387      0,
388      "f22d5028",
389      "c65a42baef702d4aff2d9ad8e363daec27de6801",
390/* size */   ALTO2_UCODE_PAGE_SIZE,
391/* amap */   AMAP_DEFAULT,
392/* axor */   ALTO2_UCODE_PAGE_MASK,
393/* dxor */   007,                  // keep D0, invert D1-D3
394/* width */   4,
395/* shift */   16,
396/* dmap */   DMAP_DEFAULT,
397/* dand */   KEEP,
398/* type */   sizeof(UINT32)
399   },
400   {   // 0000-01777 F2(0),F2(1)',F2(2)',F2(3)'
401      "53x.3",
402      0,
403      "3c89a740",
404      "95d812d489b2bde03884b2f126f961caa6c8ec45",
405/* size */   ALTO2_UCODE_PAGE_SIZE,
406/* amap */   AMAP_DEFAULT,
407/* axor */   ALTO2_UCODE_PAGE_MASK,
408/* dxor */   007,                  // keep D0, invert D1-D3
409/* width */   4,
410/* shift */   12,
411/* dmap */   DMAP_DEFAULT,
412/* dand */   KEEP,
413/* type */   sizeof(UINT32)
414   },
415   {   // 0000-01777 LOADT',LOADL,NEXT(0)',NEXT(1)'
416      "60x.3",
417      0,
418      "a35de0bf",
419      "7fa4aead44dcf5393bbfd1706c0ada24aa6fd3ac",
420/* size */   ALTO2_UCODE_PAGE_SIZE,
421/* amap */   AMAP_DEFAULT,
422/* axor */   ALTO2_UCODE_PAGE_MASK,
423/* dxor */   013,                  // invert D0 and D2-D3
424/* width */   4,
425/* shift */   8,
426/* dmap */   DMAP_DEFAULT,
427/* dand */   KEEP,
428/* type */   sizeof(UINT32)
429   },
430   {   // 0000-01777 NEXT(2)',NEXT(3)',NEXT(4)',NEXT(5)'
431      "61x.3",
432      0,
433      "f25bcb2d",
434      "acb57f3104a8dc4ba750dd1bf22ccc81cce9f084",
435/* size */   ALTO2_UCODE_PAGE_SIZE,
436/* amap */   AMAP_DEFAULT,
437/* axor */   ALTO2_UCODE_PAGE_MASK,
438/* dxor */   017,                  // invert D0-D3
439/* width */   4,
440/* shift */   4,
441/* dmap */   DMAP_DEFAULT,
442/* dand */   KEEP,
443/* type */   sizeof(UINT32)
444   },
445   {   // 0000-01777 NEXT(6)',NEXT(7)',NEXT(8)',NEXT(9)'
446      "62x.3",
447      0,
448      "1b20a63f",
449      "41dc86438e91c12b0fe42ffcce6b2ac2eb9e714a",
450/* size */   ALTO2_UCODE_PAGE_SIZE,
451/* amap */   AMAP_DEFAULT,
452/* axor */   ALTO2_UCODE_PAGE_MASK,
453/* dxor */   017,                  // invert D0-D3
454/* width */   4,
455/* shift */   0,
456/* dmap */   DMAP_DEFAULT,
457/* dand */   KEEP,
458/* type */   sizeof(UINT32)
459   }
460
461#if   (ALTO2_UCODE_ROM_PAGES > 1)
462   ,
463   {   // 02000-03777 RSEL(0)',RSEL(1)',RSEL(2)',RSEL(3)'
464      "xm51.u54",
465      0,
466      "11086ae9",
467      "c394e3fadbfb91801ddc1a70cb25dc6f606c4f76",
468/* size */   ALTO2_UCODE_PAGE_SIZE,
469/* amap */   AMAP_DEFAULT,
470/* axor */   ALTO2_UCODE_PAGE_MASK,
471/* dxor */   017,                  // invert D0-D3
472/* width */   4,
473/* shift */   28,
474/* dmap */   DMAP_DEFAULT,
475/* dand */   ZERO,
476/* type */   sizeof(UINT32)
477   },
478   {   // 02000-03777 RSEL(4)',ALUF(0)',ALUF(1)',ALUF(2)'
479      "xm51.u74",
480      0,
481      "be8224f2",
482      "ea9abcc3832b26a094319796901237e1e3f238b6",
483/* size */   ALTO2_UCODE_PAGE_SIZE,
484/* amap */   AMAP_DEFAULT,
485/* axor */   ALTO2_UCODE_PAGE_MASK,
486/* dxor */   017,                  // invert D0-D3
487/* width */   4,
488/* shift */   24,
489/* dmap */   DMAP_DEFAULT,
490/* dand */   KEEP,
491/* type */   sizeof(UINT32)
492   },
493   {   // 02000-03777 ALUF(3)',BS(0)',BS(1)',BS(2)'
494      "xm51.u75",
495      0,
496      "dfe3e3ac",
497      "246fd29f92150a5d5d7627fbb4f2504c7b6cd5ec",
498/* size */   ALTO2_UCODE_PAGE_SIZE,
499/* amap */   AMAP_DEFAULT,
500/* axor */   ALTO2_UCODE_PAGE_MASK,
501/* dxor */   017,                  // invert D0-D3
502/* width */   4,
503/* shift */   20,
504/* dmap */   DMAP_DEFAULT,
505/* dand */   KEEP,
506/* type */   sizeof(UINT32)
507   },
508   {   // 02000-03777 F1(0),F1(1)',F1(2)',F1(3)'
509      "xm51.u73",
510      0,
511      "6c20fa46",
512      "a054330c65048011f12209aaed5c6da73d95f029",
513/* size */   ALTO2_UCODE_PAGE_SIZE,
514/* amap */   AMAP_DEFAULT,
515/* axor */   ALTO2_UCODE_PAGE_MASK,
516/* dxor */   007,                  // keep D0, invert D1-D3
517/* width */   4,
518/* shift */   16,
519/* dmap */   DMAP_DEFAULT,
520/* dand */   KEEP,
521/* type */   sizeof(UINT32)
522   },
523   {   // 02000-03777 F2(0),F2(1)',F2(2)',F2(3)'
524      "xm51.u52",
525      0,
526      "0a31eec8",
527      "4e2ad5daa5e6a6f2143ee4de00c7b625d096fb02",
528/* size */   ALTO2_UCODE_PAGE_SIZE,
529/* amap */   AMAP_DEFAULT,
530/* axor */   ALTO2_UCODE_PAGE_MASK,
531/* dxor */   007,                  // keep D0, invert D1-D3
532/* width */   4,
533/* shift */   12,
534/* dmap */   DMAP_DEFAULT,
535/* dand */   KEEP,
536/* type */   sizeof(UINT32)
537   },
538   {   // 02000-03777 LOADT',LOADL,NEXT(0)',NEXT(1)'
539      "xm51.u70",
540      0,
541      "5c64ee54",
542      "0eb16d1b5e5967be7c1bf8c8ef6efdf0518a752c",
543/* size */   ALTO2_UCODE_PAGE_SIZE,
544/* amap */   AMAP_DEFAULT,
545/* axor */   ALTO2_UCODE_PAGE_MASK,
546/* dxor */   013,                  // invert D0 and D2-D3
547/* width */   4,
548/* shift */   8,
549/* dmap */   DMAP_DEFAULT,
550/* dand */   KEEP,
551/* type */   sizeof(UINT32)
552   },
553   {   // 02000-03777 NEXT(2)',NEXT(3)',NEXT(4)',NEXT(5)'
554      "xm51.u71",
555      0,
556      "7283bf71",
557      "819fdcc407ed0acdd8f12b02db6efbcab7bec19a",
558/* size */   ALTO2_UCODE_PAGE_SIZE,
559/* amap */   AMAP_DEFAULT,
560/* axor */   ALTO2_UCODE_PAGE_MASK,
561/* dxor */   017,                  // invert D0-D3
562/* width */   4,
563/* shift */   4,
564/* dmap */   DMAP_DEFAULT,
565/* dand */   KEEP,
566/* type */   sizeof(UINT32)
567   },
568   {   // 02000-03777 NEXT(6)',NEXT(7)',NEXT(8)',NEXT(9)'
569      "xm51.u72",
570      0,
571      "a28e5251",
572      "44dd8ad4ad56541b5394d30ce3521b4d1d561394",
573/* size */   ALTO2_UCODE_PAGE_SIZE,
574/* amap */   AMAP_DEFAULT,
575/* axor */   ALTO2_UCODE_PAGE_MASK,
576/* dxor */   017,                  // invert D0-D3
577/* width */   4,
578/* shift */   0,
579/* dmap */   DMAP_DEFAULT,
580/* dand */   KEEP,
581/* type */   sizeof(UINT32)
582   }
583#endif   // (UCODE_ROM_PAGES > 1)
584};
585
586static const prom_load_t const_prom_list[] = {
587   {   // constant prom D0-D3
588      "madr.a6",
589      "c3.3",
590      "c2c196b2",
591      "8b2a599ac839ec2a070dbfef2f1626e645c858ca",
592/* size */   ALTO2_CONST_SIZE,
593/* amap */   AMAP_CONST_PROM,         // descramble constant address
594/* axor */   0,
595/* dxor */   017,                  // invert D0-D3
596/* width */   4,
597/* shift */   0,
598/* dmap */   DMAP_REVERSE_0_3,         // reverse D0-D3 to D3-D0
599/* dand */   ZERO,
600/* type */   sizeof(UINT16)
601   },
602   {   // constant prom D4-D7
603      "madr.a5",
604      "c2.3",
605      "42336101",
606      "c77819cf40f063af3abf66ea43f17cc1a62e928b",
607/* size */   ALTO2_CONST_SIZE,
608/* amap */   AMAP_CONST_PROM,         // descramble constant address
609/* axor */   0,
610/* dxor */   017,                  // invert D0-D3
611/* width */   4,
612/* shift */   4,
613/* dmap */   DMAP_REVERSE_0_3,         // reverse D0-D3 to D3-D0
614/* dand */   KEEP,
615/* type */   sizeof(UINT16)
616   },
617   {   // constant prom D8-D11
618      "madr.a4",
619      "c1.3",
620      "b957e490",
621      "c72660ad3ada4ca0ed8697c6bb6275a4fe703184",
622/* size */   ALTO2_CONST_SIZE,
623/* amap */   AMAP_CONST_PROM,         // descramble constant address
624/* axor */   0,
625/* dxor */   017,                  // invert D0-D3
626/* width */   4,
627/* shift */   8,
628/* dmap */   DMAP_REVERSE_0_3,         // reverse D0-D3 to D3-D0
629/* dand */   KEEP,
630/* type */   sizeof(UINT16)
631   },
632   {   // constant PROM D12-D15
633      "madr.a3",
634      "c0.3",
635      "e0992757",
636      "5c45ea824970663cb9ee672dc50861539c860249",
637/* size */   ALTO2_CONST_SIZE,
638/* amap */   AMAP_CONST_PROM,         // descramble constant address
639/* axor */   0,
640/* dxor */   017,                  // invert D0-D3
641/* width */   4,
642/* shift */   12,
643/* dmap */   DMAP_REVERSE_0_3,         // reverse D0-D3 to D3-D0
644/* dand */   KEEP,
645/* type */   sizeof(UINT16)
646   }
647};
648
649280/* Driver Init */
650281
651282DRIVER_INIT_MEMBER( alto2_state, alto2 )
652283{
653   UINT32* maincpu = reinterpret_cast<UINT32 *>(memregion("maincpu")->base());
654   for (UINT32 addr = 0; addr < ALTO2_UCODE_SIZE; addr++)
655      maincpu[addr] = ALTO2_UCODE_INVERTED;
656
657   UINT8* ucode_prom = prom_load(this, ucode_prom_list, memregion("ucode")->base(), 2, 8);
658   memcpy(memregion("maincpu")->base(), ucode_prom, sizeof(UINT32)*ALTO2_UCODE_RAM_BASE);
659
660   UINT8* const_prom = prom_load(this, const_prom_list, memregion("const")->base(), 1, 4);
661   memcpy(memregion("constants")->base(), const_prom, sizeof(UINT16)*ALTO2_CONST_SIZE);
662284}
663285
664286/* Game Drivers */
branches/alto2/src/mess/includes/alto2.h
r26082r26083
1717   alto2_state(const machine_config &mconfig, device_type type, const char *tag)
1818      : driver_device(mconfig, type, tag),
1919      m_maincpu(*this, "maincpu"),
20      m_region_ucode(*this, "maincpu"),
21      m_region_const(*this, "constants"),
22      m_region_ram(*this, "memory"),
20      m_region_memory(*this, "memory"),
2321      m_io_row0(*this, "ROW0"),
2422      m_io_row1(*this, "ROW1"),
2523      m_io_row2(*this, "ROW2"),
r26082r26083
5048
5149protected:
5250   required_device<cpu_device> m_maincpu;
53   required_memory_region m_region_ucode;
54   required_memory_region m_region_const;
55   required_memory_region m_region_ram;
51   required_memory_region m_region_memory;
5652   required_ioport m_io_row0;
5753   required_ioport m_io_row1;
5854   required_ioport m_io_row2;

Previous 199869 Revisions Next


© 1997-2024 The MAME Team