Previous 199869 Revisions Next

r26055 Friday 8th November, 2013 at 13:07:08 UTC by Dirk Best
Move PROMs to alto2_cpu_device.
[/branches/alto2/src/emu/cpu/alto2]alto2.c alto2.h
[/branches/alto2/src/mess/drivers]alto2.c

branches/alto2/src/emu/cpu/alto2/alto2.c
r26054r26055
3535}
3636
3737//-------------------------------------------------
38//  device_rom_region - device-specific (P)ROMs
39//-------------------------------------------------
40
41ROM_START( alto2_cpu )
42   ROM_REGION( 01100, "ctrl2k", 0 )
43   ROMX_LOAD( "2kctl.u3",   00000, 00400, CRC(5f8d89e8) SHA1(487cd944ab074290aea73425e81ef4900d92e250), ROM_NIBBLE)   //!< 3601-1 256x4 BPROM; Emulator address modifier
44   ROMX_LOAD( "2kctl.u76",  00400, 00400, CRC(1edef867) SHA1(928b8a15ac515a99109f32672441832173883b81), ROM_NIBBLE)   //!< 3601-1 256x4 BPROM; 2KCTL replacement for u51 (1KCTL)
45   ROMX_LOAD( "2kctl.u38",  01000, 00040, CRC(fc51b1d1) SHA1(e36c2a12a5da377394264899b5ae504e2ffda46e), 0)            //!< 82S23 32x8 BPROM; task priority and initial address
46   ROMX_LOAD( "alu.a10",    01040, 00040, CRC(e0857892) SHA1(dcd389767139f0acc1f87cf074459115abc5b90b), ROM_NIBBLE)
47
48   ROM_REGION( 00400, "cram3k", 0 )
49   ROMX_LOAD( "3kcram.a37", 00000, 00400, CRC(9417360d) SHA1(bfcdbc56ee4ffafd0f2f672c0c869a55d6dd194b), ROM_NIBBLE)
50
51   ROM_REGION( 02400, "madr", 0 )
52   ROMX_LOAD( "madr.a32",   00000, 00400, CRC(a0e3b4a7) SHA1(24e50afdeb637a6a8588f8d3a3493c9188b8da2c), ROM_NIBBLE)   //! P3601 256x4 BPROM; mouse motion signals MX1, MX2, MY1, MY2
53   ROMX_LOAD( "madr.a64",   00400, 00400, CRC(a66b0eda) SHA1(4d9088f592caa3299e90966b17765be74e523144), ROM_NIBBLE)   //! P3601 256x4 BPROM; memory addressing
54   ROMX_LOAD( "madr.a65",   01000, 00400, CRC(ba37febd) SHA1(82e9db1cb65f451755295f0d179e6f8fe3349d4d), ROM_NIBBLE)   //! P3601 256x4 BPROM; memory addressing
55   ROMX_LOAD( "madr.a90",   01400, 00400, CRC(7a2d8799) SHA1(c3760dba147740729d33b9b88e59088a4cc7437a), ROM_NIBBLE)
56   ROMX_LOAD( "madr.a91",   02000, 00400, CRC(dd556aeb) SHA1(900f333a091e3ccde0843019c25f25fba62e6023), ROM_NIBBLE)
57
58   ROM_REGION( 01040, "displ", 0 )
59   ROMX_LOAD( "displ.a38",  00000, 00400, CRC(fd30beb7) SHA1(65e4a19ba4ff748d525122128c514abedd55d866), ROM_NIBBLE)   //!< P3601 256x4 BPROM; display FIFO control: STOPWAKE, MBEMPTY
60   ROMX_LOAD( "displ.a66",  00400, 00400, CRC(9f91aad9) SHA1(69b1d4c71f4e18103112e8601850c2654e9265cf), ROM_NIBBLE)   //!< P3601 256x4 BPROM; display VSYNC and VBLANK
61   ROMX_LOAD( "displ.a63",  01000, 00040, CRC(82a20d60) SHA1(39d90703568be5419ada950e112d99227873fdea), 0)            //!< 82S23 32x8 BPROM; display HBLANK, HSYNC, SCANEND, HLCGATE ...
62
63   ROM_REGION( 01400, "ether", 0 )
64   ROMX_LOAD( "enet.a41",   00000, 00400, CRC(d5de8d86) SHA1(c134a4c898c73863124361a9b0218f7a7f00082a), ROM_NIBBLE)
65   ROMX_LOAD( "enet.a42",   00400, 00400, CRC(9d5c81bd) SHA1(ac7e63332a3dad0bef7cd0349b24e156a96a4bf0), ROM_NIBBLE)
66   ROMX_LOAD( "enet.a49",   01000, 00400, CRC(4d2dcdb2) SHA1(583327a7d70cd02702c941c0e43c1e9408ff7fd0), ROM_NIBBLE)
67ROM_END
68
69const rom_entry *alto2_cpu_device::device_rom_region() const
70{
71   return ROM_NAME( alto2_cpu );
72}
73
74//-------------------------------------------------
3875//  device_start - device-specific startup
3976//-------------------------------------------------
4077
78#define   DEBUG_PROMS   1      // define to 1 to enable debugging of loaded PROMs
79
80#if   DEBUG_PROMS
81static void dump_prom(const char* name, UINT8* data, size_t size)
82{
83   printf("UINT8 %s[%05o] = {\n", name, (unsigned)size);
84   for (size_t addr = 0; addr < size; addr++) {
85      if (0 == addr % 16)
86         printf("\t");
87      printf("%04o", data[addr]);
88      if (addr + 1 < size)
89         printf(",");
90      if (15 == addr % 16)
91         printf("\n");
92   }
93   printf("};\n");
94   printf("\n");
95}
96#endif
97
4198// FIXME
4299void alto2_cpu_device::device_start()
43100{
r26054r26055
45102   m_const = &space(AS_DATA);
46103   m_ram = &space(AS_IO);
47104
105   // resolve the pointers to the various PROMs
106   UINT8 *ctrl2k = memregion("ctrl2k")->base();
107   m_ctl2k_u3 = ctrl2k;         // region=ctrl2k offset=00000 size=00400
108   m_ctl2k_u76 = ctrl2k + 00400;   // region=ctrl2k offset=00400 size=00400
109   m_ctl2k_u38 = ctrl2k + 01000;   // region=ctrl2k offset=01000 size=00040
110   m_alu_a10 = ctrl2k + 01040;      // region=ctrl2k offset=01040 size=00040
111
112#if   DEBUG_PROMS
113   dump_prom("m_ctl2k_u3", m_ctl2k_u3, 00400);
114   dump_prom("m_ctl2k_u76", m_ctl2k_u76, 00400);
115   dump_prom("m_ctl2k_u38", m_ctl2k_u38, 00040);
116   dump_prom("m_alu_a10", m_alu_a10, 00040);
117#endif
118
119   UINT8 *cram3k = memregion("cram3k")->base();
120   m_cram3k_a37 = cram3k;         // region=cram3k offset=00000 size=00400
121
122#if   DEBUG_PROMS
123   dump_prom("m_cram3k_a37", m_ctl2k_u3, 00400);
124#endif
125
126   UINT8 *madr = memregion("madr")->base();
127   m_madr_a32 = madr;            // region=madr offset=00000 size=00400
128   m_madr_a64 = madr + 00400;      // region=madr offset=00400 size=00400
129   m_madr_a65 = madr + 01000;      // region=madr offset=01000 size=00400
130   // m_madr_a90 = madr + 01400;   // region=madr offset=01400 size=00400 - unused
131   // m_madr_a91 = madr + 02000;   // region=madr offset=02000 size=00400 - unused
132
133#if   DEBUG_PROMS
134   dump_prom("m_madr_a32", m_madr_a32, 00400);
135   dump_prom("m_madr_a64", m_madr_a64, 00400);
136   dump_prom("m_madr_a65", m_madr_a65, 00400);
137#endif
138
139   UINT8* displ = memregion("displ")->base();
140   m_disp_a38 = displ;            // region=displ offset=00000 size=00400
141   m_disp_a66 = displ + 00400;      // region=displ offset=00400 size=00400
142   m_disp_a63 = displ + 01000;      // region=displ offset=01000 size=00040
143
144#if   DEBUG_PROMS
145   dump_prom("m_disp_a38", m_disp_a38, 00400);
146   dump_prom("m_disp_a66", m_disp_a66, 00400);
147   dump_prom("m_disp_a63", m_disp_a63, 00040);
148#endif
149
150   UINT8* ether = memregion("ether")->base();
151   m_ether_a41 = ether;         // region=ether offset=00000 size=00400
152   m_ether_a42 = ether + 00400;   // region=ether offset=00400 size=00400
153   m_ether_a49 = ether + 01000;   // region=ether offset=01000 size=00400
154
155#if   DEBUG_PROMS
156   dump_prom("m_ether_a41", m_ether_a41, 00400);
157   dump_prom("m_ether_a42", m_ether_a42, 00400);
158   dump_prom("m_ether_a49", m_ether_a49, 00400);
159#endif
160
48161   save_item(NAME(m_task_mpc));
49162   save_item(NAME(m_task_next2));
50163   save_item(NAME(m_ntime));
r26054r26055
19692082/** @brief reset the various registers */
19702083void alto2_cpu_device::hard_reset()
19712084{
1972   UINT8* ctl2k = machine().root_device().memregion("2k_ctrl")->base();
1973   m_ctl2k_u3 = ctl2k;            // FIXME: region=2k_ctrl offset=00000
1974   m_ctl2k_u76 = ctl2k + 00400;   // FIXME: region=2k_ctrl offset=00400
1975   m_cram3k_a37 = ctl2k + 01000;   // FIXME: region=2k_ctrl offset=01000
1976   m_ctl2k_u38 = ctl2k + 01400;   // FIXME: region=2k_ctrl offset=01400
1977   m_alu_a10 = ctl2k + 01440;      // FIXME: region=2k_ctrl offset=01440
1978
1979   UINT8* memory = machine().root_device().memregion("memory")->base();
1980   m_madr_a32 = memory;         // FIXME: region=memory offset=00000
1981   m_madr_a64 = memory + 00400;   // FIXME: region=memory offset=00400
1982   m_madr_a65 = memory + 01000;   // FIXME: region=memory offset=01000
1983
1984   UINT8* displ = machine().root_device().memregion("displ")->base();
1985   m_disp_a38 = displ;            // FIXME: region=displ offset=00000
1986   m_disp_a66 = displ + 00400;      // FIXME: region=displ offset=00400
1987   m_disp_a63 = displ + 01000;      // FIXME: region=displ offset=01000
1988
1989   UINT8* ether = machine().root_device().memregion("ether")->base();
1990   m_ether_a41 = ether;         // FIXME: region=ether offset=00000
1991   m_ether_a42 = ether + 00400;   // FIXME: region=ether offset=00400
1992   m_ether_a49 = ether + 01000;   // FIXME: region=ether offset=01000
1993
19942085   /* all tasks start in ROM0 */
19952086   m_reset_mode = 0xffff;
19962087
branches/alto2/src/emu/cpu/alto2/alto2.h
r26054r26055
2121#define   ALTO2_DEBUG         0
2222#endif
2323
24//extern void fatal(int level, const char* format, ...);
25
2624#define   USE_PRIO_F9318   0         //!< define to 1 to use the F9318 priority encoder code
2725#define   USE_ALU_74181   1         //!< define to 1 to use the SN74181 ALU code
2826#define   DEBUG_DISPLAY_TIMING   0   //!< define to 1 to debug the display timing
r26054r26055
225223      return NULL;
226224   }
227225
226   //! device (P)ROMs
227   virtual const rom_entry *device_rom_region() const;
228
228229   //! device_state_interface overrides
229230   void state_string_export(const device_state_entry &entry, astring &string);
230231
branches/alto2/src/mess/drivers/alto2.c
r26054r26055
305305
306306/* ROMs */
307307
308ROM_START(alto2)
308ROM_START( alto2 )
309309   // micro code PROMs, 8 x 4bit
310310   ROM_REGION( 4*ALTO2_UCODE_SIZE, "maincpu", ROMREGION_INVERT )
311311   ROMX_LOAD( "62x.3",      00000, 02000, CRC(1b20a63f) SHA1(41dc86438e91c12b0fe42ffcce6b2ac2eb9e714a), ROM_NIBBLE | ROM_GROUPDWORD | ROM_NOSKIP | ROM_BITSHIFT( 0))   //!< 00000-01777 NEXT(6)',NEXT(7)',NEXT(8)',NEXT(9)'
r26054r26055
335335   ROMX_LOAD( "madr.a5",    00000, 00400, CRC(42336101) SHA1(c77819cf40f063af3abf66ea43f17cc1a62e928b), ROM_NIBBLE | ROM_GROUPWORD | ROM_NOSKIP | ROM_BITSHIFT( 8))   //!< 0000-0377 C(04)',C(05)',C(06)',C(07)'
336336   ROMX_LOAD( "madr.a6",    00000, 00400, CRC(c2c196b2) SHA1(8b2a599ac839ec2a070dbfef2f1626e645c858ca), ROM_NIBBLE | ROM_GROUPWORD | ROM_NOSKIP | ROM_BITSHIFT(12))   //!< 0000-0377 C(00)',C(01)',C(02)',C(03)'
337337
338   ROM_REGION( 01500, "2k_ctrl", 0 )
339   ROMX_LOAD( "2kctl.u3",   00000, 00400, CRC(5f8d89e8) SHA1(487cd944ab074290aea73425e81ef4900d92e250), ROM_NIBBLE)   //!< 3601-1 256x4 BPROM; Emulator address modifier
340   ROMX_LOAD( "2kctl.u76",  00400, 00400, CRC(1edef867) SHA1(928b8a15ac515a99109f32672441832173883b81), ROM_NIBBLE)   //!< 3601-1 256x4 BPROM; 2KCTL replacement for u51 (1KCTL)
341   ROMX_LOAD( "3kcram.a37", 01000, 00400, CRC(9417360d) SHA1(bfcdbc56ee4ffafd0f2f672c0c869a55d6dd194b), ROM_NIBBLE)
342   ROMX_LOAD( "2kctl.u38",  01400, 00040, CRC(fc51b1d1) SHA1(e36c2a12a5da377394264899b5ae504e2ffda46e), 0)            //!< 82S23 32x8 BPROM; task priority and initial address
343   ROMX_LOAD( "alu.a10",    01440, 00040, CRC(e0857892) SHA1(dcd389767139f0acc1f87cf074459115abc5b90b), ROM_NIBBLE)
344
345   ROM_REGION( 01040, "displ", 0 )
346   ROMX_LOAD( "displ.a38",  00000, 00400, CRC(fd30beb7) SHA1(65e4a19ba4ff748d525122128c514abedd55d866), ROM_NIBBLE)   //!< P3601 256x4 BPROM; display FIFO control: STOPWAKE, MBEMPTY
347   ROMX_LOAD( "displ.a66",  00400, 00400, CRC(9f91aad9) SHA1(69b1d4c71f4e18103112e8601850c2654e9265cf), ROM_NIBBLE)   //!< P3601 256x4 BPROM; display VSYNC and VBLANK
348   ROMX_LOAD( "displ.a63",  01000, 00040, CRC(82a20d60) SHA1(39d90703568be5419ada950e112d99227873fdea), 0)            //!< 82S23 32x8 BPROM; display HBLANK, HSYNC, SCANEND, HLCGATE ...
349
350   ROM_REGION( 01400, "ether", 0 )
351   ROMX_LOAD( "enet.a41",   00000, 00400, CRC(d5de8d86) SHA1(c134a4c898c73863124361a9b0218f7a7f00082a), ROM_NIBBLE)
352   ROMX_LOAD( "enet.a42",   00400, 00400, CRC(9d5c81bd) SHA1(ac7e63332a3dad0bef7cd0349b24e156a96a4bf0), ROM_NIBBLE)
353   ROMX_LOAD( "enet.a49",   01000, 00400, CRC(4d2dcdb2) SHA1(583327a7d70cd02702c941c0e43c1e9408ff7fd0), ROM_NIBBLE)
354
355   ROM_REGION( 02400, "memory", 0 )
356   ROMX_LOAD( "madr.a32",   00000, 00400, CRC(a0e3b4a7) SHA1(24e50afdeb637a6a8588f8d3a3493c9188b8da2c), ROM_NIBBLE)   //! P3601 256x4 BPROM; mouse motion signals MX1, MX2, MY1, MY2
357   ROMX_LOAD( "madr.a64",   00400, 00400, CRC(a66b0eda) SHA1(4d9088f592caa3299e90966b17765be74e523144), ROM_NIBBLE)   //! P3601 256x4 BPROM; memory addressing
358   ROMX_LOAD( "madr.a65",   01000, 00400, CRC(ba37febd) SHA1(82e9db1cb65f451755295f0d179e6f8fe3349d4d), ROM_NIBBLE)   //! P3601 256x4 BPROM; memory addressing
359   ROMX_LOAD( "madr.a90",   01400, 00400, CRC(7a2d8799) SHA1(c3760dba147740729d33b9b88e59088a4cc7437a), ROM_NIBBLE)
360   ROMX_LOAD( "madr.a91",   02000, 00400, CRC(dd556aeb) SHA1(900f333a091e3ccde0843019c25f25fba62e6023), ROM_NIBBLE)
361
362338   ROM_REGION( ALTO2_RAM_SIZE, "ram", 0 )
363339
364340   // extended memory Mesa 4.1 (?) micro code PROMs, 8 x 4bit (unused)

Previous 199869 Revisions Next


© 1997-2024 The MAME Team