src/mess/drivers/junior.c
| r0 | r5250 | |
| 1 | /*************************************************************************** |
| 2 | |
| 3 | Elektor Junior |
| 4 | |
| 5 | 17/07/2009 Skeleton driver. |
| 6 | |
| 7 | ****************************************************************************/ |
| 8 | |
| 9 | #include "driver.h" |
| 10 | #include "cpu/m6502/m6502.h" |
| 11 | #include "machine/6532riot.h" |
| 12 | |
| 13 | static ADDRESS_MAP_START(junior_mem, ADDRESS_SPACE_PROGRAM, 8) |
| 14 | ADDRESS_MAP_GLOBAL_MASK(0x1FFF) |
| 15 | ADDRESS_MAP_UNMAP_HIGH |
| 16 | AM_RANGE(0x0000, 0x03ff) AM_RAM // 1K RAM |
| 17 | AM_RANGE(0x1000, 0x17ff) AM_ROM // Printer ROM |
| 18 | AM_RANGE(0x1a00, 0x1a7f) AM_RAM // 6532 RAM |
| 19 | AM_RANGE(0x1a80, 0x1aff) AM_DEVREADWRITE("riot", riot6532_r, riot6532_w) |
| 20 | AM_RANGE(0x1c00, 0x1fff) AM_ROM // Monitor |
| 21 | ADDRESS_MAP_END |
| 22 | |
| 23 | /* Input ports */ |
| 24 | INPUT_PORTS_START( junior ) |
| 25 | INPUT_PORTS_END |
| 26 | |
| 27 | |
| 28 | static MACHINE_RESET(junior) |
| 29 | { |
| 30 | } |
| 31 | |
| 32 | static VIDEO_START( junior ) |
| 33 | { |
| 34 | } |
| 35 | |
| 36 | static VIDEO_UPDATE( junior ) |
| 37 | { |
| 38 | return 0; |
| 39 | } |
| 40 | |
| 41 | static UINT8 junior_riot_a_r(const device_config *device, UINT8 olddata) |
| 42 | { |
| 43 | return 0; |
| 44 | } |
| 45 | |
| 46 | static UINT8 junior_riot_b_r(const device_config *device, UINT8 olddata) |
| 47 | { |
| 48 | return 0; |
| 49 | } |
| 50 | |
| 51 | |
| 52 | void junior_riot_a_w(const device_config *device, UINT8 data, UINT8 olddata) |
| 53 | { |
| 54 | } |
| 55 | |
| 56 | void junior_riot_b_w(const device_config *device, UINT8 data, UINT8 olddata) |
| 57 | { |
| 58 | } |
| 59 | |
| 60 | |
| 61 | void junior_riot_irq(const device_config *device, int state) |
| 62 | { |
| 63 | cputag_set_input_line(device->machine, "maincpu", M6502_IRQ_LINE, state ? HOLD_LINE : CLEAR_LINE); |
| 64 | } |
| 65 | |
| 66 | static const riot6532_interface junior_riot_interface = |
| 67 | { |
| 68 | junior_riot_a_r, |
| 69 | junior_riot_b_r, |
| 70 | junior_riot_a_w, |
| 71 | junior_riot_b_w, |
| 72 | junior_riot_irq |
| 73 | }; |
| 74 | |
| 75 | |
| 76 | static MACHINE_DRIVER_START( junior ) |
| 77 | /* basic machine hardware */ |
| 78 | MDRV_CPU_ADD("maincpu",M6502, XTAL_1MHz) |
| 79 | MDRV_CPU_PROGRAM_MAP(junior_mem) |
| 80 | |
| 81 | MDRV_MACHINE_RESET(junior) |
| 82 | |
| 83 | /* video hardware */ |
| 84 | MDRV_SCREEN_ADD("screen", RASTER) |
| 85 | MDRV_SCREEN_REFRESH_RATE(50) |
| 86 | MDRV_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */ |
| 87 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) |
| 88 | MDRV_SCREEN_SIZE(640, 480) |
| 89 | MDRV_SCREEN_VISIBLE_AREA(0, 640-1, 0, 480-1) |
| 90 | MDRV_PALETTE_LENGTH(2) |
| 91 | MDRV_PALETTE_INIT(black_and_white) |
| 92 | |
| 93 | MDRV_VIDEO_START(junior) |
| 94 | MDRV_VIDEO_UPDATE(junior) |
| 95 | |
| 96 | MDRV_RIOT6532_ADD("riot", XTAL_1MHz, junior_riot_interface) |
| 97 | MACHINE_DRIVER_END |
| 98 | |
| 99 | static SYSTEM_CONFIG_START(junior) |
| 100 | SYSTEM_CONFIG_END |
| 101 | |
| 102 | /* ROM definition */ |
| 103 | ROM_START( junior ) |
| 104 | ROM_REGION( 0x10000, "maincpu", ROMREGION_ERASEFF ) |
| 105 | ROM_LOAD( "printer.bin", 0x1000, 0x0800, CRC(b15bf48d) SHA1(0c8da5c0ce9d59cf1cc535cb47a73f147615f289)) |
| 106 | ROM_DEFAULT_BIOS("orig") |
| 107 | ROM_SYSTEM_BIOS( 0, "orig", "Original (2708)" ) |
| 108 | ROMX_LOAD( "junior.ic2", 0x1c00, 0x0400, CRC(ee8aa69d) SHA1(a132a51603f1a841c354815e6d868b335ac84364), ROM_BIOS(1)) |
| 109 | ROM_SYSTEM_BIOS( 1, "2732", "Just monitor (2732) " ) |
| 110 | ROMX_LOAD( "junior27321a.ic2", 0x1c00, 0x0400, CRC(e22f24cc) SHA1(a6edb52a9eea5e99624c128065e748e5a3fb2e4c), ROM_BIOS(2)) |
| 111 | ROM_END |
| 112 | |
| 113 | /* Driver */ |
| 114 | |
| 115 | /* YEAR NAME PARENT COMPAT MACHINE INPUT INIT CONFIG COMPANY FULLNAME FLAGS */ |
| 116 | COMP( 1980, junior, 0, 0, junior, junior, 0, junior, "Elektor Electronics", "Junior", GAME_NOT_WORKING) |
| 117 | |