src/mess/drivers/nascom1.c
| r1522 | r1523 | |
| 49 | 49 | ************************************************************************/ |
| 50 | 50 | |
| 51 | 51 | #include "driver.h" |
| 52 | | #include "cpu/z80/z80.h" |
| 53 | 52 | #include "includes/nascom1.h" |
| 53 | #include "cpu/z80/z80.h" |
| 54 | 54 | #include "devices/cartslot.h" |
| 55 | | #include "mslegacy.h" |
| 56 | 55 | |
| 56 | |
| 57 | 57 | /* Memory w/r functions */ |
| 58 | 58 | static ADDRESS_MAP_START( nascom1_mem , ADDRESS_SPACE_PROGRAM, 8) |
| 59 | 59 | AM_RANGE(0x0000, 0x07ff) AM_ROM |
| r1522 | r1523 | |
| 108 | 108 | GFXDECODE_ENTRY( REGION_GFX1, 0x0000, nascom2_charlayout, 0, 1 ) |
| 109 | 109 | GFXDECODE_END |
| 110 | 110 | |
| 111 | | static const unsigned char nascom1_palette[] = |
| 112 | | { |
| 113 | | 0x00, 0x00, 0x00, /* Black */ |
| 114 | | 0xff, 0xff, 0xff /* White */ |
| 115 | | }; |
| 116 | 111 | |
| 117 | | static const unsigned short nascom1_colortable[] = |
| 118 | | { |
| 119 | | 0, 1 |
| 120 | | }; |
| 121 | | |
| 122 | | static PALETTE_INIT( nascom1 ) |
| 123 | | { |
| 124 | | palette_set_colors_rgb(machine, 0, nascom1_palette, sizeof(nascom1_palette) / 3); |
| 125 | | memcpy(colortable, nascom1_colortable, sizeof (nascom1_colortable)); |
| 126 | | } |
| 127 | | |
| 128 | 112 | /* Keyboard input */ |
| 129 | 113 | |
| 130 | 114 | static INPUT_PORTS_START (nascom1) |
| r1522 | r1523 | |
| 226 | 210 | MDRV_CPU_VBLANK_INT(nascom_interrupt, 1) |
| 227 | 211 | MDRV_SCREEN_REFRESH_RATE(50) |
| 228 | 212 | MDRV_SCREEN_VBLANK_TIME(DEFAULT_REAL_60HZ_VBLANK_DURATION) |
| 229 | | MDRV_INTERLEAVE(1) |
| 230 | 213 | |
| 231 | 214 | MDRV_MACHINE_RESET( nascom1 ) |
| 232 | 215 | |
| r1522 | r1523 | |
| 236 | 219 | MDRV_SCREEN_SIZE(48 * 8, 16 * 16) |
| 237 | 220 | MDRV_SCREEN_VISIBLE_AREA(0, 48 * 8 - 1, 0, 16 * 16 - 1) |
| 238 | 221 | MDRV_GFXDECODE( nascom1 ) |
| 239 | | MDRV_PALETTE_LENGTH( sizeof (nascom1_palette) / 3 ) |
| 240 | | MDRV_COLORTABLE_LENGTH( sizeof (nascom1_colortable) ) |
| 241 | | MDRV_PALETTE_INIT( nascom1 ) |
| 222 | MDRV_PALETTE_LENGTH(2) |
| 223 | MDRV_PALETTE_INIT(black_and_white) |
| 242 | 224 | |
| 243 | 225 | MDRV_VIDEO_START( generic ) |
| 244 | 226 | MDRV_VIDEO_UPDATE( nascom1 ) |