Previous 199869 Revisions Next

r26090 Sunday 10th November, 2013 at 13:32:28 UTC by Jürgen Buchmüller
Trial and error, where the emphasis is on the latter.
[/branches/alto2/src/emu/cpu/alto2]alto2.c
[/branches/alto2/src/mess/drivers]alto2.c
[/branches/alto2/src/mess/includes]alto2.h

branches/alto2/src/emu/cpu/alto2/alto2.c
r26089r26090
4949
5050}
5151
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
6152//**************************************************************************
6253//  LIVE DEVICE
6354//**************************************************************************
r26089r26090
7364   m_log_level(9),
7465   m_log_newline(true),
7566#endif
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)),
67   m_ucode_config("ucode", ENDIANNESS_BIG, 32, 14, -2),
68   m_const_config("const", ENDIANNESS_BIG, 16, 8, -1),
7869   m_ucode(0),
7970   m_const(0),
8071   m_ucode_map(*this, "ucode"),
81   m_const_map(*this, "constants"),
72   m_const_map(*this, "const"),
8273   m_icount(0),
8374   m_task_mpc(),
8475   m_task_next2(),
r26089r26090
161152//-------------------------------------------------
162153
163154ROM_START( alto2_cpu )
164   ROM_REGION( sizeof(UINT32)*ALTO2_UCODE_SIZE, "ucode", 0 )
165   ROM_REGION( sizeof(UINT16)*ALTO2_CONST_SIZE, "constants", 0 )
155   // decoded micro code region
156   ROM_REGION( 16 * 02000, "ucode", 0 )
166157
167   // Alto-II micro code PROMs, 8 x 4bit
158   // decoded constant PROMs region
159   ROM_REGION( 4 * 00400, "const", 0 )
160
161   // 2 x 64K x 39 bit memory
162   ROM_REGION( 2*ALTO2_RAM_SIZE, "memory", 0 )
163
168164   ROM_REGION( 16 * 02000, "ucode_proms", 0 )
169165   ROM_LOAD( "55x.3",     0*02000, 0x400, CRC(de870d75) SHA1(2b98cc769d8302cb39948711424d987d94e4159b) )   //!< 00000-01777 RSEL(0)',RSEL(1)',RSEL(2)',RSEL(3)'
170166   ROM_LOAD( "64x.3",     1*02000, 0x400, CRC(51b444c0) SHA1(8756e51f7f3253a55d75886465beb7ee1be6e1c4) )   //!< 00000-01777 RSEL(4)',ALUF(0)',ALUF(1)',ALUF(2)'
r26089r26090
866862   m_ucode_proms = prom_load(ucode_prom_list, memregion("ucode_proms")->base(), ALTO2_UCODE_ROM_PAGES, 8);
867863   m_const_proms = prom_load(const_prom_list, memregion("const_proms")->base(), 1, 4);
868864
869   for (offs_t offs = 0; offs < sizeof(UINT32)*ALTO2_UCODE_RAM_BASE; offs++)
870      memory_write(AS_0, offs, 1, m_ucode_proms[offs]);
871   for (offs_t offs = 0; offs < sizeof(UINT16)*ALTO2_CONST_SIZE; offs++)
872      memory_write(AS_1, offs, 1, m_const_proms[offs]);
865   for (offs_t offs = 0; offs < ALTO2_UCODE_RAM_BASE; offs++) {
866      UINT32 data = (m_ucode_proms[4*offs+0] << 0) | (m_ucode_proms[4*offs+1] << 8) |
867             (m_ucode_proms[4*offs+2] << 16) | (m_ucode_proms[4*offs+3] << 24);
868      if (0 == offs % 8)
869         printf("%04x:", offs);
870      printf(" %08x",  data);
871      if (7 == offs % 8)
872         printf("\n");
873      m_ucode->write_dword(offs, data);
874   }
875   for (offs_t offs = 0; offs < ALTO2_CONST_SIZE; offs++) {
876      UINT32 data = (m_const_proms[2*offs+0] << 0) | (m_const_proms[2*offs+1] << 8);
877      if (0 == offs % 8)
878         printf("%04x:", offs);
879      printf(" %04x",  data);
880      if (7 == offs % 8)
881         printf("\n");
882      m_const->write_word(offs, data);
883   }
873884
874885   m_disp_a38 = prom_load(&pl_displ_a38, memregion("displ_a38")->base());
875886   m_disp_a63 = prom_load(&pl_displ_a63, memregion("displ_a63")->base());
r26089r26090
882893   m_madr_a32 = prom_load(&pl_madr_a32, memregion("madr_a32")->base());
883894   m_madr_a64 = prom_load(&pl_madr_a64, memregion("madr_a64")->base());
884895   m_madr_a65 = prom_load(&pl_madr_a65, memregion("madr_a65")->base());
885   m_madr_a90 = prom_load(&pl_madr_a90, memregion("madr_a90")->base(), 1 ,1);
896   m_madr_a90 = prom_load(&pl_madr_a90, memregion("madr_a90")->base());
886897   m_madr_a91 = prom_load(&pl_madr_a91, memregion("madr_a91")->base());
887898   m_ether_a41 = prom_load(&pl_enet_a41, memregion("ether_a41")->base());
888899   m_ether_a42 = prom_load(&pl_enet_a42, memregion("ether_a42")->base());
branches/alto2/src/mess/includes/alto2.h
r26089r26090
99
1010#include "emu.h"
1111#include "cpu/alto2/alto2.h"
12//#include "machine/ram.h"
12#include "machine/ram.h"
1313
1414class alto2_state : public driver_device
1515{
r26089r26090
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_memory(*this, "memory"),
2120      m_io_row0(*this, "ROW0"),
2221      m_io_row1(*this, "ROW1"),
2322      m_io_row2(*this, "ROW2"),
r26089r26090
4241   DECLARE_READ16_MEMBER(alto2_mmio_r);
4342   DECLARE_WRITE16_MEMBER(alto2_mmio_w);
4443   DECLARE_DRIVER_INIT(alto2);
44
4545   virtual void palette_init();
4646   DECLARE_MACHINE_RESET(alto2);
4747   void screen_eof_alto2(screen_device &screen, bool state);
4848
4949protected:
5050   required_device<cpu_device> m_maincpu;
51   required_memory_region m_region_memory;
5251   required_ioport m_io_row0;
5352   required_ioport m_io_row1;
5453   required_ioport m_io_row2;
branches/alto2/src/mess/drivers/alto2.c
r26089r26090
4242
4343/* Memory Maps */
4444
45static ADDRESS_MAP_START( alto2_ucode_map, AS_PROGRAM, 32, alto2_state )
46   AM_RANGE(0,                    ALTO2_UCODE_RAM_BASE-1) AM_ROM
47   AM_RANGE(ALTO2_UCODE_RAM_BASE, ALTO2_UCODE_SIZE-1)     AM_RAM
48ADDRESS_MAP_END
49
50static ADDRESS_MAP_START( alto2_const_map, AS_DATA, 16, alto2_state )
51   AM_RANGE(0,                    ALTO2_CONST_SIZE-1)     AM_ROM
52ADDRESS_MAP_END
53
4554/* main memory and memory mapped i/o in range ALTO2_IO_PAGE_BASE ... ALTO2_IO_PAGE_BASE + ALTO2_IO_PAGE_SIZE - 1 */
4655static ADDRESS_MAP_START( alto2_ram_map, AS_IO, 16, alto2_state )
4756   AM_RANGE(0,                    ALTO2_IO_PAGE_BASE - 1) AM_READWRITE(alto2_ram_r,  alto2_ram_w)
r26089r26090
248257   PORT_CONFSETTING(    0x40, "PAL")
249258INPUT_PORTS_END
250259
260/* ROM */
261ROM_START( alto2 )
262   // decoded micro code region
263   ROM_REGION( ALTO2_RAM_SIZE, "maincpu", 0 )
264   // 2 x 64K x 39 bit memory
265   ROM_REGION( 2*ALTO2_RAM_SIZE, "memory", 0 )
266ROM_END
251267
252268/* Palette Initialization */
253269
r26089r26090
260276static MACHINE_CONFIG_START( alto2, alto2_state )
261277   /* basic machine hardware */
262278   MCFG_CPU_ADD("maincpu", ALTO2, XTAL_20_16MHz)
279   MCFG_CPU_PROGRAM_MAP(alto2_ucode_map)
280   MCFG_CPU_DATA_MAP(alto2_const_map)
263281   MCFG_CPU_IO_MAP(alto2_ram_map)
264282
265283   /* video hardware */
r26089r26090
269287   MCFG_SCREEN_VBLANK_DRIVER(alto2_state, screen_eof_alto2)
270288
271289   MCFG_PALETTE_LENGTH(2)
290
291   // internal ram
292   MCFG_RAM_ADD(RAM_TAG)
293   MCFG_RAM_DEFAULT_SIZE("128K")
272294MACHINE_CONFIG_END
273295
274/* ROMs */
275
276ROM_START( alto2 )
277   ROM_REGION( 2*ALTO2_RAM_SIZE, "memory", 0 )
278ROM_END
279
280296/* Driver Init */
281297
282298DRIVER_INIT_MEMBER( alto2_state, alto2 )

Previous 199869 Revisions Next


© 1997-2024 The MAME Team