branches/alto2/src/emu/cpu/alto2/alto2.c
| r26074 | r26075 | |
| 32 | 32 | m_log_level(9), |
| 33 | 33 | m_log_newline(false), |
| 34 | 34 | #endif |
| 35 | | m_ucode_config("program", ENDIANNESS_BIG, 32, 14, -2), |
| 35 | m_ucode_config("maincpu", ENDIANNESS_BIG, 32, 14, -2), |
| 36 | 36 | m_const_config("constants", ENDIANNESS_BIG, 16, 8, -1), |
| 37 | 37 | m_ram_config("memory", ENDIANNESS_BIG, 16, 17, -1), |
| 38 | 38 | m_ucode(0), |
branches/alto2/src/mess/drivers/alto2.c
| r26074 | r26075 | |
| 12 | 12 | #include "cpu/alto2/alto2.h" |
| 13 | 13 | #include "cpu/alto2/a2roms.h" |
| 14 | 14 | |
| 15 | | |
| 16 | | // FIXME: Is this required? How to access the address space dwords? |
| 17 | | READ32_MEMBER( alto2_state::alto2_ucode_r ) |
| 18 | | { |
| 19 | | return 0; |
| 20 | | } |
| 21 | | |
| 22 | | // FIXME: Is this required? How to access the address space dwords? |
| 23 | | WRITE32_MEMBER( alto2_state::alto2_ucode_w ) |
| 24 | | { |
| 25 | | |
| 26 | | } |
| 27 | | |
| 28 | 15 | // FIXME: Is this required? How to access the address space words? |
| 29 | 16 | // This has to somehow be mapped to the a2mem half DWORD accesses |
| 30 | 17 | // and (optionally) Hamming code and parity flag updating |
| r26074 | r26075 | |
| 57 | 44 | |
| 58 | 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 */ |
| 59 | 46 | static ADDRESS_MAP_START( alto2_ucode_map, AS_PROGRAM, 32, alto2_state ) |
| 60 | | AM_RANGE(0, ALTO2_UCODE_RAM_BASE-1) AM_ROM |
| 61 | | AM_RANGE(ALTO2_UCODE_RAM_BASE, ALTO2_UCODE_SIZE-1) AM_READWRITE(alto2_ucode_r, alto2_ucode_w) |
| 47 | AM_RANGE(0, ALTO2_UCODE_RAM_BASE-1) AM_ROM |
| 48 | AM_RANGE(ALTO2_UCODE_RAM_BASE, ALTO2_UCODE_SIZE-1) AM_RAM |
| 62 | 49 | ADDRESS_MAP_END |
| 63 | 50 | |
| 64 | 51 | /* constant PROM with 256 16-bit words */ |
| 65 | 52 | static ADDRESS_MAP_START( alto2_const_map, AS_DATA, 16, alto2_state ) |
| 66 | | AM_RANGE(0, ALTO2_CONST_SIZE-1) AM_ROM |
| 53 | AM_RANGE(0, ALTO2_CONST_SIZE-1) AM_ROM |
| 67 | 54 | ADDRESS_MAP_END |
| 68 | 55 | |
| 69 | 56 | /* main memory and memory mapped i/o in range ALTO2_IO_PAGE_BASE ... ALTO2_IO_PAGE_BASE + ALTO2_IO_PAGE_SIZE - 1 */ |
| 70 | 57 | static ADDRESS_MAP_START( alto2_ram_map, AS_IO, 16, alto2_state ) |
| 71 | | AM_RANGE(0, ALTO2_IO_PAGE_BASE - 1) AM_READWRITE(alto2_ram_r, alto2_ram_w) |
| 72 | | AM_RANGE(ALTO2_IO_PAGE_BASE, 0177777) AM_READWRITE(alto2_mmio_r, alto2_mmio_w) |
| 58 | AM_RANGE(0, ALTO2_IO_PAGE_BASE - 1) AM_READWRITE(alto2_ram_r, alto2_ram_w) |
| 59 | AM_RANGE(ALTO2_IO_PAGE_BASE, 0177777) AM_READWRITE(alto2_mmio_r, alto2_mmio_w) |
| 73 | 60 | ADDRESS_MAP_END |
| 74 | 61 | |
| 75 | 62 | |
| r26074 | r26075 | |
| 302 | 289 | ROM_START( alto2 ) |
| 303 | 290 | // FIXME: how to allocate initally empty regions for AS_PROGRAM, AS_DATA and AS_IO? |
| 304 | 291 | ROM_REGION( 4*ALTO2_UCODE_SIZE, "maincpu", 0) |
| 305 | | ROM_REGION( 2*ALTO2_CONST_SIZE, "data", 0) |
| 306 | | ROM_REGION( ALTO2_RAM_SIZE, "ram", 0 ) |
| 292 | ROM_REGION( 2*ALTO2_CONST_SIZE, "constants", 0) |
| 293 | ROM_REGION( ALTO2_RAM_SIZE, "memory", 0 ) |
| 307 | 294 | |
| 308 | 295 | // Alto-II micro code PROMs, 8 x 4bit |
| 309 | 296 | ROM_REGION( 16 * 02000, "ucode", 0 ) |
| r26074 | r26075 | |
| 671 | 658 | memcpy(memregion("maincpu")->base(), ucode_prom, sizeof(UINT32)*ALTO2_UCODE_RAM_BASE); |
| 672 | 659 | |
| 673 | 660 | UINT8* const_prom = prom_load(this, const_prom_list, memregion("const")->base(), 1, 4); |
| 674 | | memcpy(memregion("data")->base(), const_prom, sizeof(UINT16)*ALTO2_CONST_SIZE); |
| 661 | memcpy(memregion("constants")->base(), const_prom, sizeof(UINT16)*ALTO2_CONST_SIZE); |
| 675 | 662 | } |
| 676 | 663 | |
| 677 | 664 | /* Game Drivers */ |
branches/alto2/src/mess/includes/alto2.h
| r26074 | r26075 | |
| 18 | 18 | : driver_device(mconfig, type, tag), |
| 19 | 19 | m_maincpu(*this, "maincpu"), |
| 20 | 20 | m_region_ucode(*this, "maincpu"), |
| 21 | | m_region_const(*this, "data"), |
| 22 | | m_region_ram(*this, "ram"), |
| 21 | m_region_const(*this, "constants"), |
| 22 | m_region_ram(*this, "memory"), |
| 23 | 23 | m_io_row0(*this, "ROW0"), |
| 24 | 24 | m_io_row1(*this, "ROW1"), |
| 25 | 25 | m_io_row2(*this, "ROW2"), |
| r26074 | r26075 | |
| 39 | 39 | |
| 40 | 40 | bitmap_ind16 m_bitmap; |
| 41 | 41 | |
| 42 | | DECLARE_READ32_MEMBER(alto2_ucode_r); |
| 43 | | DECLARE_WRITE32_MEMBER(alto2_ucode_w); |
| 44 | 42 | DECLARE_READ16_MEMBER(alto2_ram_r); |
| 45 | 43 | DECLARE_WRITE16_MEMBER(alto2_ram_w); |
| 46 | 44 | DECLARE_READ16_MEMBER(alto2_mmio_r); |