src/mess/machine/jupiter.c
| r3260 | r3261 | |
| 7 | 7 | |
| 8 | 8 | ***************************************************************************/ |
| 9 | 9 | |
| 10 | | #include <stdarg.h> |
| 11 | 10 | #include "driver.h" |
| 12 | 11 | #include "cpu/z80/z80.h" |
| 13 | 12 | #include "includes/jupiter.h" |
| 14 | | #include "sound/speaker.h" |
| 15 | 13 | #include "image.h" |
| 16 | 14 | |
| 17 | 15 | #define JUPITER_NONE 0 |
| r3260 | r3261 | |
| 36 | 34 | |
| 37 | 35 | static void jupiter_machine_stop(running_machine *machine); |
| 38 | 36 | |
| 39 | | static UINT8 read_cfg(running_machine *machine) |
| 40 | | { |
| 41 | | UINT8 result; |
| 42 | | switch(mame_get_phase(machine)) |
| 43 | | { |
| 44 | | case MAME_PHASE_RESET: |
| 45 | | case MAME_PHASE_RUNNING: |
| 46 | | result = input_port_read(machine, "CFG"); |
| 47 | | break; |
| 48 | 37 | |
| 49 | | default: |
| 50 | | result = 0x00; |
| 51 | | break; |
| 52 | | } |
| 53 | | return result; |
| 54 | | } |
| 55 | | |
| 56 | 38 | /* only gets called at the start of a cpu time slice */ |
| 57 | 39 | |
| 58 | 40 | OPBASE_HANDLER( jupiter_opbaseoverride ) |
| r3260 | r3261 | |
| 100 | 82 | return (-1); |
| 101 | 83 | } |
| 102 | 84 | |
| 103 | | static int jupiter_ramsize = 2; |
| 104 | | |
| 105 | 85 | MACHINE_START( jupiter ) |
| 106 | 86 | { |
| 107 | 87 | logerror("jupiter_init\r\n"); |
| 108 | 88 | logerror("data: %p\n", jupiter_data); |
| 109 | 89 | |
| 110 | | if (read_cfg(machine) != jupiter_ramsize) |
| 111 | | { |
| 112 | | jupiter_ramsize = read_cfg(machine); |
| 113 | | switch (jupiter_ramsize) |
| 114 | | { |
| 115 | | case 03: |
| 116 | | case 02: |
| 117 | | memory_install_write8_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0x8800, 0xffff, 0, 0, SMH_RAM); |
| 118 | | memory_install_read8_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0x8800, 0xffff, 0, 0, SMH_RAM); |
| 119 | | memory_install_write8_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0x4800, 0x87ff, 0, 0, SMH_RAM); |
| 120 | | memory_install_read8_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0x4800, 0x87ff, 0, 0, SMH_RAM); |
| 121 | | break; |
| 122 | | case 01: |
| 123 | | memory_install_write8_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0x8800, 0xffff, 0, 0, SMH_NOP); |
| 124 | | memory_install_read8_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0x8800, 0xffff, 0, 0, SMH_NOP); |
| 125 | | memory_install_write8_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0x4800, 0x87ff, 0, 0, SMH_RAM); |
| 126 | | memory_install_read8_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0x4800, 0x87ff, 0, 0, SMH_RAM); |
| 127 | | break; |
| 128 | | case 00: |
| 129 | | memory_install_write8_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0x8800, 0xffff, 0, 0, SMH_NOP); |
| 130 | | memory_install_read8_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0x8800, 0xffff, 0, 0, SMH_NOP); |
| 131 | | memory_install_write8_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0x4800, 0x87ff, 0, 0, SMH_NOP); |
| 132 | | memory_install_read8_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0x4800, 0x87ff, 0, 0, SMH_NOP); |
| 133 | | break; |
| 134 | | } |
| 135 | | |
| 136 | | } |
| 137 | 90 | if (jupiter_data) |
| 138 | 91 | { |
| 139 | 92 | logerror("data: %p. type: %d.\n", jupiter_data, jupiter_data_type); |
| r3260 | r3261 | |
| 289 | 242 | } |
| 290 | 243 | } |
| 291 | 244 | |
| 292 | | READ8_HANDLER ( jupiter_port_7ffe_r ) |
| 293 | | { |
| 294 | | speaker_level_w(0,0); |
| 295 | | return (input_port_read(machine, "KEY7")); |
| 296 | | } |
| 297 | | |
| 298 | | WRITE8_HANDLER ( jupiter_port_fe_w ) |
| 299 | | { |
| 300 | | speaker_level_w(0,1); |
| 301 | | } |
| 302 | | |
src/mess/drivers/jupiter.c
| r3260 | r3261 | |
| 3 | 3 | |
| 4 | 4 | CPU: Z80 |
| 5 | 5 | 0000-1fff ROM |
| 6 | | 2000-22ff unused |
| 7 | | 2300-23ff RAM (cassette buffer) |
| 8 | | 2400-26ff RAM (screen) |
| 9 | | 2700-27ff RAM (edit buffer) |
| 10 | | 2800-2bff unused |
| 11 | | 2c00-2fff RAM (char set) |
| 12 | | 3000-3bff unused |
| 13 | | 3c00-47ff RAM (standard) |
| 14 | | 4800-87ff RAM (16K expansion) |
| 15 | | 8800-ffff RAM (Expansion) |
| 6 | 2000-23ff Mirror of 2400-27FF |
| 7 | 2400-27ff RAM (1K RAM used for screen and edit/cassette buffer) |
| 8 | 2800-2bff Mirror of 2C00-2FFF |
| 9 | 2c00-2fff RAM (1K RAM for char set, write only) |
| 10 | 3000-3bff Mirror of 3C00-3FFF |
| 11 | 3c00-3fff RAM (1K RAM standard) |
| 12 | 4000-7fff RAM (16K Expansion) |
| 13 | 8000-ffff RAM (48K Expansion) |
| 16 | 14 | |
| 17 | 15 | Interrupts: |
| 18 | 16 | |
| r3260 | r3261 | |
| 25 | 23 | Tape and buzzer |
| 26 | 24 | |
| 27 | 25 | In 0xfe: |
| 28 | | Keyboard input and buzzer |
| 26 | Keyboard input, tape, and buzzer |
| 29 | 27 | ***************************************************************************/ |
| 30 | 28 | |
| 31 | 29 | #include "driver.h" |
| 32 | 30 | #include "cpu/z80/z80.h" |
| 33 | 31 | #include "includes/jupiter.h" |
| 34 | 32 | #include "devices/cartslot.h" |
| 33 | #include "devices/cassette.h" |
| 34 | #include "sound/speaker.h" |
| 35 | 35 | |
| 36 | /* This needs to be moved to drivers/xtal */ |
| 37 | #define XTAL_6_5MHz 6500000 |
| 36 | 38 | |
| 39 | static emu_timer *jupiter_set_irq_timer; |
| 40 | static emu_timer *jupiter_clear_irq_timer; |
| 41 | static UINT8 *jupiter_charram; |
| 42 | static UINT8 *jupiter_expram; |
| 43 | |
| 44 | |
| 45 | static READ8_HANDLER( jupiter_io_r ); |
| 46 | static WRITE8_HANDLER( jupiter_port_fe_w ); |
| 47 | static WRITE8_HANDLER( jupiter_expram_w ); |
| 48 | static WRITE8_HANDLER( jupiter_vh_charram_w ); |
| 49 | |
| 50 | |
| 37 | 51 | /* memory w/r functions */ |
| 38 | 52 | static ADDRESS_MAP_START( jupiter_mem , ADDRESS_SPACE_PROGRAM, 8) |
| 39 | 53 | AM_RANGE(0x0000, 0x1fff) AM_ROM |
| 40 | | AM_RANGE(0x2000, 0x22ff) AM_NOP |
| 41 | | AM_RANGE(0x2300, 0x23ff) AM_RAM |
| 42 | | AM_RANGE(0x2400, 0x26ff) AM_RAM AM_BASE(&videoram) AM_SIZE(&videoram_size) |
| 43 | | AM_RANGE(0x2700, 0x27ff) AM_RAM |
| 44 | | AM_RANGE(0x2800, 0x2bff) AM_NOP |
| 45 | | AM_RANGE(0x2c00, 0x2fff) AM_READWRITE(SMH_RAM, jupiter_vh_charram_w) AM_BASE(&jupiter_charram) AM_SIZE(&jupiter_charram_size) |
| 46 | | AM_RANGE(0x3000, 0x3bff) AM_NOP |
| 47 | | AM_RANGE(0x3c00, 0x47ff) AM_RAM |
| 48 | | AM_RANGE(0x4800, 0x87ff) AM_RAM |
| 49 | | AM_RANGE(0x8800, 0xffff) AM_RAM |
| 54 | AM_RANGE(0x2400, 0x27ff) AM_MIRROR(0x0400) AM_RAM AM_BASE(&videoram) |
| 55 | AM_RANGE(0x2c00, 0x2fff) AM_MIRROR(0x0400) AM_WRITE(jupiter_vh_charram_w) AM_BASE(&jupiter_charram) |
| 56 | AM_RANGE(0x3c00, 0x3fff) AM_MIRROR(0x0c00) AM_RAM |
| 57 | AM_RANGE(0x4800, 0xffff) AM_RAM AM_RAM_WRITE( jupiter_expram_w ) AM_BASE(&jupiter_expram) /* Expansion RAM */ |
| 50 | 58 | ADDRESS_MAP_END |
| 51 | 59 | |
| 52 | 60 | /* port i/o functions */ |
| 53 | 61 | static ADDRESS_MAP_START( jupiter_io , ADDRESS_SPACE_IO, 8) |
| 54 | | AM_RANGE( 0x00fe, 0xfffe) AM_WRITE( jupiter_port_fe_w ) |
| 55 | | AM_RANGE( 0xfefe, 0xfefe) AM_READ_PORT( "KEY0" ) |
| 56 | | AM_RANGE( 0xfdfe, 0xfdfe) AM_READ_PORT( "KEY1" ) |
| 57 | | AM_RANGE( 0xfbfe, 0xfbfe) AM_READ_PORT( "KEY2" ) |
| 58 | | AM_RANGE( 0xf7fe, 0xf7fe) AM_READ_PORT( "KEY3" ) |
| 59 | | AM_RANGE( 0xeffe, 0xeffe) AM_READ_PORT( "KEY4" ) |
| 60 | | AM_RANGE( 0xdffe, 0xdffe) AM_READ_PORT( "KEY5" ) |
| 61 | | AM_RANGE( 0xbffe, 0xbffe) AM_READ_PORT( "KEY6" ) |
| 62 | | AM_RANGE( 0x7ffe, 0x7ffe) AM_READ( jupiter_port_7ffe_r ) |
| 62 | AM_RANGE( 0x0000, 0xffff ) AM_READWRITE( jupiter_io_r, jupiter_port_fe_w ) |
| 63 | 63 | ADDRESS_MAP_END |
| 64 | 64 | |
| 65 | | /* graphics output */ |
| 66 | 65 | |
| 67 | | static const gfx_layout jupiter_charlayout = |
| 68 | | { |
| 69 | | 8, 8, /* 8x8 characters */ |
| 70 | | 128, /* 128 characters */ |
| 71 | | 1, /* 1 bits per pixel */ |
| 72 | | {0}, /* no bitplanes; 1 bit per pixel */ |
| 73 | | {0, 1, 2, 3, 4, 5, 6, 7}, |
| 74 | | {0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8}, |
| 75 | | 8*8 /* each character takes 8 consecutive bytes */ |
| 76 | | }; |
| 77 | | |
| 78 | | static PALETTE_INIT( jupiter ) |
| 79 | | { |
| 80 | | palette_set_color(machine,0,RGB_BLACK); /* black */ |
| 81 | | palette_set_color(machine,1,RGB_WHITE); /* white */ |
| 82 | | palette_set_color(machine,2,RGB_WHITE); /* white */ |
| 83 | | palette_set_color(machine,3,RGB_BLACK); /* black */ |
| 84 | | } |
| 85 | | |
| 86 | | static GFXDECODE_START( jupiter ) |
| 87 | | GFXDECODE_ENTRY( "main", 0x2c00, jupiter_charlayout, 0, 2 ) |
| 88 | | GFXDECODE_END |
| 89 | | |
| 90 | | |
| 91 | 66 | /* keyboard input */ |
| 92 | 67 | |
| 93 | 68 | static INPUT_PORTS_START (jupiter) |
| r3260 | r3261 | |
| 111 | 86 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_E) PORT_CHAR('e') PORT_CHAR('E') |
| 112 | 87 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_R) PORT_CHAR('r') PORT_CHAR('R') PORT_CHAR('<') |
| 113 | 88 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_T) PORT_CHAR('t') PORT_CHAR('T') PORT_CHAR('>') |
| 89 | |
| 114 | 90 | PORT_START("KEY3") /* 3: 0xF7FE */ |
| 115 | 91 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_1) PORT_CHAR('1') PORT_CHAR('!') |
| 116 | 92 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_2) PORT_CHAR('2') PORT_CHAR('@') |
| r3260 | r3261 | |
| 148 | 124 | |
| 149 | 125 | PORT_START("CFG") /* 8: machine config */ |
| 150 | 126 | PORT_DIPNAME( 0x03, 2, "RAM Size") |
| 151 | | PORT_DIPSETTING( 0, "3Kb") |
| 152 | | PORT_DIPSETTING( 1, "19Kb") |
| 153 | | PORT_DIPSETTING( 2, "49Kb") |
| 127 | PORT_DIPSETTING( 0, "No RAM Expansion") |
| 128 | PORT_DIPSETTING( 1, "16KB RAM Expansion") |
| 129 | PORT_DIPSETTING( 2, "48KB RAM Expansion") |
| 154 | 130 | INPUT_PORTS_END |
| 155 | 131 | |
| 156 | | /* Sound output */ |
| 157 | 132 | |
| 158 | | static INTERRUPT_GEN( jupiter_interrupt ) |
| 133 | static READ8_HANDLER( jupiter_io_r ) |
| 159 | 134 | { |
| 160 | | cpunum_set_input_line(machine, 0, 0, HOLD_LINE); |
| 135 | UINT8 data = 0xff; |
| 136 | |
| 137 | if ( ( offset & 0xff ) != 0xfe ) |
| 138 | return data; |
| 139 | |
| 140 | if ( ! ( offset & 0x0100 ) ) |
| 141 | { |
| 142 | data = ( data & 0xe0 ) | ( data & input_port_read( machine, "KEY0" ) ); |
| 143 | } |
| 144 | if ( ! ( offset & 0x0200 ) ) |
| 145 | { |
| 146 | data = ( data & 0xe0 ) | ( data & input_port_read( machine, "KEY1" ) ); |
| 147 | } |
| 148 | if ( ! ( offset & 0x0400 ) ) |
| 149 | { |
| 150 | data = ( data & 0xe0 ) | ( data & input_port_read( machine, "KEY2" ) ); |
| 151 | } |
| 152 | if ( ! ( offset & 0x0800 ) ) |
| 153 | { |
| 154 | data = ( data & 0xe0 ) | ( data & input_port_read( machine, "KEY3" ) ); |
| 155 | } |
| 156 | if ( ! ( offset & 0x1000 ) ) |
| 157 | { |
| 158 | data = ( data & 0xe0 ) | ( data & input_port_read( machine, "KEY4" ) ); |
| 159 | } |
| 160 | if ( ! ( offset & 0x2000 ) ) |
| 161 | { |
| 162 | data = ( data & 0xe0 ) | ( data & input_port_read( machine, "KEY5" ) ); |
| 163 | } |
| 164 | if ( ! ( offset & 0x4000 ) ) |
| 165 | { |
| 166 | data = ( data & 0xe0 ) | ( data & input_port_read( machine, "KEY6" ) ); |
| 167 | } |
| 168 | if ( ! ( offset & 0x8000 ) ) |
| 169 | { |
| 170 | // cassette_output( device_list_find_by_tag( machine->config->devicelist, CASSETTE, "cassette" ), -1 ); |
| 171 | speaker_level_w(0,0); |
| 172 | data = ( data & 0xe0 ) | ( data & input_port_read( machine, "KEY7" ) );; |
| 173 | } |
| 174 | if ( cassette_input(device_list_find_by_tag( machine->config->devicelist, CASSETTE, "cassette" )) < 0 ) |
| 175 | { |
| 176 | data &= ~0x20; |
| 177 | } |
| 178 | return data; |
| 161 | 179 | } |
| 162 | 180 | |
| 181 | |
| 182 | static WRITE8_HANDLER( jupiter_port_fe_w ) |
| 183 | { |
| 184 | // cassette_output( device_list_find_by_tag( machine->config->devicelist, CASSETTE, "cassette" ), 1 ); |
| 185 | speaker_level_w(0,1); |
| 186 | } |
| 187 | |
| 188 | |
| 189 | static WRITE8_HANDLER( jupiter_expram_w ) |
| 190 | { |
| 191 | if ( offset > 0x4000 ) |
| 192 | { |
| 193 | if ( input_port_read(machine, "CFG") >= 1 ) |
| 194 | jupiter_expram[offset] = data; |
| 195 | } |
| 196 | else |
| 197 | { |
| 198 | if ( input_port_read(machine, "CFG") == 2 ) |
| 199 | jupiter_expram[offset] = data; |
| 200 | } |
| 201 | } |
| 202 | |
| 203 | |
| 204 | /* graphics output */ |
| 205 | |
| 206 | static PALETTE_INIT( jupiter ) |
| 207 | { |
| 208 | palette_set_color(machine,0,RGB_BLACK); /* black */ |
| 209 | palette_set_color(machine,1,RGB_WHITE); /* white */ |
| 210 | palette_set_color(machine,2,RGB_WHITE); /* white */ |
| 211 | palette_set_color(machine,3,RGB_BLACK); /* black */ |
| 212 | } |
| 213 | |
| 214 | |
| 215 | static const gfx_layout jupiter_charlayout = |
| 216 | { |
| 217 | 8, 8, /* 8x8 characters */ |
| 218 | 128, /* 128 characters */ |
| 219 | 1, /* 1 bits per pixel */ |
| 220 | {0}, /* no bitplanes; 1 bit per pixel */ |
| 221 | {0, 1, 2, 3, 4, 5, 6, 7}, |
| 222 | {0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8}, |
| 223 | 8*8 /* each character takes 8 consecutive bytes */ |
| 224 | }; |
| 225 | |
| 226 | |
| 227 | static GFXDECODE_START( jupiter ) |
| 228 | GFXDECODE_ENTRY( "main", 0x2c00, jupiter_charlayout, 0, 1 ) |
| 229 | GFXDECODE_ENTRY( "main", 0x2c00, jupiter_charlayout, 2, 1 ) |
| 230 | GFXDECODE_END |
| 231 | |
| 232 | |
| 233 | static WRITE8_HANDLER( jupiter_vh_charram_w ) |
| 234 | { |
| 235 | if(data == jupiter_charram[offset]) |
| 236 | return; /* no change */ |
| 237 | |
| 238 | jupiter_charram[offset] = data; |
| 239 | |
| 240 | /* decode character graphics again */ |
| 241 | decodechar(machine->gfx[0], offset / 8, jupiter_charram); |
| 242 | decodechar(machine->gfx[1], offset / 8, jupiter_charram); |
| 243 | } |
| 244 | |
| 245 | |
| 246 | static TIMER_CALLBACK( jupiter_set_irq_callback ) |
| 247 | { |
| 248 | cpunum_set_input_line( machine, 0, 0, ASSERT_LINE ); |
| 249 | } |
| 250 | |
| 251 | |
| 252 | static TIMER_CALLBACK( jupiter_clear_irq_callback ) |
| 253 | { |
| 254 | cpunum_set_input_line( machine, 0, 0, CLEAR_LINE ); |
| 255 | } |
| 256 | |
| 257 | |
| 258 | static VIDEO_START( jupiter ) |
| 259 | { |
| 260 | jupiter_set_irq_timer = timer_alloc( jupiter_set_irq_callback, NULL ); |
| 261 | jupiter_clear_irq_timer = timer_alloc( jupiter_clear_irq_callback, NULL ); |
| 262 | |
| 263 | timer_adjust_periodic( jupiter_set_irq_timer, |
| 264 | video_screen_get_time_until_pos( machine->primary_screen, 31*8, 0 ), |
| 265 | 0, video_screen_get_frame_period( machine->primary_screen ) ); |
| 266 | |
| 267 | timer_adjust_periodic( jupiter_clear_irq_timer, |
| 268 | video_screen_get_time_until_pos( machine->primary_screen, 32*8, 0 ), |
| 269 | 0, video_screen_get_frame_period( machine->primary_screen ) ); |
| 270 | } |
| 271 | |
| 272 | |
| 273 | static VIDEO_UPDATE( jupiter ) |
| 274 | { |
| 275 | int offs; |
| 276 | |
| 277 | for(offs = 0; offs < 768; offs++) |
| 278 | { |
| 279 | int code = videoram[offs]; |
| 280 | int sx, sy; |
| 281 | |
| 282 | sy = (offs / 32) * 8; |
| 283 | sx = (offs % 32) * 8; |
| 284 | |
| 285 | drawgfx(bitmap, ( code & 0x80 ) ? screen->machine->gfx[1] : screen->machine->gfx[0], |
| 286 | code & 0x7f, 0, 0,0, sx,sy, NULL, TRANSPARENCY_NONE, 0); |
| 287 | } |
| 288 | |
| 289 | return 0; |
| 290 | } |
| 291 | |
| 163 | 292 | /* machine definition */ |
| 164 | 293 | static MACHINE_DRIVER_START( jupiter ) |
| 165 | 294 | /* basic machine hardware */ |
| 166 | | MDRV_CPU_ADD("main", Z80, 3250000) /* 3.25 Mhz */ |
| 295 | MDRV_CPU_ADD("main", Z80, XTAL_6_5MHz/2) /* 3.25 Mhz */ |
| 167 | 296 | MDRV_CPU_PROGRAM_MAP(jupiter_mem, 0) |
| 168 | 297 | MDRV_CPU_IO_MAP(jupiter_io, 0) |
| 169 | | MDRV_CPU_VBLANK_INT("main", jupiter_interrupt) |
| 170 | 298 | MDRV_INTERLEAVE(1) |
| 171 | 299 | |
| 172 | 300 | MDRV_MACHINE_START( jupiter ) |
| 173 | 301 | |
| 174 | 302 | /* video hardware */ |
| 175 | 303 | MDRV_SCREEN_ADD("main", RASTER) |
| 176 | | MDRV_SCREEN_REFRESH_RATE(50) |
| 177 | | MDRV_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */ |
| 178 | 304 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) |
| 179 | | MDRV_SCREEN_SIZE(32 * 8, 24 * 8) |
| 180 | | MDRV_SCREEN_VISIBLE_AREA(0, 32 * 8 - 1, 0, 24 * 8 - 1) |
| 305 | MDRV_SCREEN_RAW_PARAMS( XTAL_6_5MHz, 416, 0, 256, 264, 0, 192 ) |
| 306 | |
| 181 | 307 | MDRV_GFXDECODE( jupiter ) |
| 182 | 308 | MDRV_PALETTE_LENGTH(4) |
| 183 | 309 | MDRV_PALETTE_INIT(jupiter) |
| 184 | 310 | |
| 311 | MDRV_VIDEO_START( jupiter ) |
| 185 | 312 | MDRV_VIDEO_UPDATE( jupiter ) |
| 186 | 313 | |
| 187 | 314 | /* sound hardware */ |
| 188 | 315 | MDRV_SPEAKER_STANDARD_MONO("mono") |
| 189 | 316 | MDRV_SOUND_ADD("speaker", SPEAKER, 0) |
| 190 | 317 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00) |
| 318 | |
| 319 | MDRV_CASSETTE_ADD( "cassette", default_cassette_config ) |
| 191 | 320 | MACHINE_DRIVER_END |
| 192 | 321 | |
| 322 | |
| 193 | 323 | ROM_START (jupiter) |
| 194 | 324 | ROM_REGION (0x10000, "main",0) |
| 195 | 325 | ROM_LOAD ("jupiter.lo", 0x0000, 0x1000, CRC(dc8438a5) SHA1(8fa97eb71e5dd17c7d190c6587ee3840f839347c)) |
| 196 | 326 | ROM_LOAD ("jupiter.hi", 0x1000, 0x1000, CRC(4009f636) SHA1(98c5d4bcd74bcf014268cf4c00b2007ea5cc21f3)) |
| 197 | 327 | ROM_END |
| 198 | 328 | |
| 329 | |
| 199 | 330 | static void jupiter_cartslot_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info) |
| 200 | 331 | { |
| 201 | 332 | /* cartslot */ |
| r3260 | r3261 | |
| 214 | 345 | } |
| 215 | 346 | } |
| 216 | 347 | |
| 217 | | static void jupiter_cassette_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info) |
| 218 | | { |
| 219 | | /* cassette */ |
| 220 | | switch(state) |
| 221 | | { |
| 222 | | /* --- the following bits of info are returned as 64-bit signed integers --- */ |
| 223 | | case MESS_DEVINFO_INT_TYPE: info->i = IO_CASSETTE; break; |
| 224 | | case MESS_DEVINFO_INT_READABLE: info->i = 1; break; |
| 225 | | case MESS_DEVINFO_INT_WRITEABLE: info->i = 0; break; |
| 226 | | case MESS_DEVINFO_INT_CREATABLE: info->i = 0; break; |
| 227 | | case MESS_DEVINFO_INT_COUNT: info->i = 1; break; |
| 228 | | case MESS_DEVINFO_INT_RESET_ON_LOAD: info->i = 1; break; |
| 229 | 348 | |
| 230 | | /* --- the following bits of info are returned as pointers to data or functions --- */ |
| 231 | | case MESS_DEVINFO_PTR_LOAD: info->load = DEVICE_IMAGE_LOAD_NAME(jupiter_tap); break; |
| 232 | | case MESS_DEVINFO_PTR_UNLOAD: info->unload = DEVICE_IMAGE_UNLOAD_NAME(jupiter_tap); break; |
| 233 | | |
| 234 | | /* --- the following bits of info are returned as NULL-terminated strings --- */ |
| 235 | | case MESS_DEVINFO_STR_FILE_EXTENSIONS: strcpy(info->s = device_temp_str(), "tap"); break; |
| 236 | | } |
| 237 | | } |
| 238 | | |
| 239 | 349 | static SYSTEM_CONFIG_START(jupiter) |
| 240 | 350 | CONFIG_DEVICE(jupiter_cartslot_getinfo) |
| 241 | | CONFIG_DEVICE(jupiter_cassette_getinfo) |
| 242 | 351 | SYSTEM_CONFIG_END |
| 243 | 352 | |
| 244 | 353 | /* YEAR NAME PARENT COMPAT MACHINE INPUT INIT CONFIG COMPANY FULLNAME */ |