src/mess/drivers/super80.c
| r1884 | r1885 | |
| 198 | 198 | screen_state *state = &Machine->screen[0]; |
| 199 | 199 | rectangle visarea; |
| 200 | 200 | UINT16 width, height, bytes; |
| 201 | | UINT8 dyn = readinputport(9) & 0x10; // read dipswitch |
| 201 | UINT8 dyn = readinputportbytag("CONFIG") & 0x10; // read dipswitch |
| 202 | 202 | visarea.min_x = 0; |
| 203 | 203 | visarea.max_x = SUPER80V_SCREEN_WIDTH-1; |
| 204 | 204 | visarea.min_y = 0; |
| r1884 | r1885 | |
| 242 | 242 | static VIDEO_EOF( super80m ) |
| 243 | 243 | { |
| 244 | 244 | /* if we chose another palette or colour mode, enable it */ |
| 245 | | UINT8 chosen_palette = (readinputport(9) & 0x60)>>5; // read colour dipswitches |
| 245 | UINT8 chosen_palette = (readinputportbytag("CONFIG") & 0x60)>>5; // read colour dipswitches |
| 246 | 246 | |
| 247 | 247 | if (chosen_palette != current_palette) // any changes? |
| 248 | 248 | { |
| r1884 | r1885 | |
| 259 | 259 | UINT8 x, y, code=32, screen_on=0; |
| 260 | 260 | UINT8 mask = machine->gfx[0]->total_elements - 1; /* 0x3F for super80; 0xFF for super80d & super80e */ |
| 261 | 261 | |
| 262 | | if ((super80_mhz == 1) || (!(readinputport(9) & 4))) /* bit 2 of port F0 is high, OR user turned on config switch */ |
| 262 | if ((super80_mhz == 1) || (!(readinputportbytag("CONFIG") & 4))) /* bit 2 of port F0 is high, OR user turned on config switch */ |
| 263 | 263 | screen_on++; |
| 264 | 264 | |
| 265 | 265 | /* display the picture */ |
| r1884 | r1885 | |
| 280 | 280 | |
| 281 | 281 | static VIDEO_UPDATE( super80m ) |
| 282 | 282 | { |
| 283 | | UINT8 x, y, code=32, col=0, screen_on=0, options=readinputport(9); |
| 283 | UINT8 x, y, code=32, col=0, screen_on=0, options=readinputportbytag("CONFIG"); |
| 284 | 284 | |
| 285 | 285 | /* get selected character generator */ |
| 286 | 286 | UINT8 cgen = current_charset ^ ((options & 0x10)>>4); /* bit 0 of port F1 and cgen config switch */ |
| r1884 | r1885 | |
| 322 | 322 | UINT8 speed = mc6845[10]&0x20, flash = mc6845[10]&0x40; // cursor modes |
| 323 | 323 | UINT16 cursor = (mc6845[14]<<8) | mc6845[15]; // get cursor position |
| 324 | 324 | UINT16 screen_home = (mc6845[12]<<8) | mc6845[13]; // screen home offset (usually zero) |
| 325 | | UINT8 options=readinputport(9); |
| 325 | UINT8 options=readinputportbytag("CONFIG"); |
| 326 | 326 | framecnt++; |
| 327 | 327 | |
| 328 | 328 | /* Get the graphics of the character under the cursor, xor with the visible cursor scan lines, |
| r1884 | r1885 | |
| 407 | 407 | cassette_change_state(image_from_devtype_and_index(IO_CASSETTE, 0), CASSETTE_MOTOR_ENABLED, CASSETTE_MASK_MOTOR); |
| 408 | 408 | |
| 409 | 409 | /* does user want to hear the sound? */ |
| 410 | | if (readinputport(9) & 8) |
| 410 | if (readinputportbytag("CONFIG") & 8) |
| 411 | 411 | cassette_change_state(image_from_devtype_and_index(IO_CASSETTE, 0), CASSETTE_SPEAKER_ENABLED, CASSETTE_MASK_SPEAKER); |
| 412 | 412 | else |
| 413 | 413 | cassette_change_state(image_from_devtype_and_index(IO_CASSETTE, 0), CASSETTE_SPEAKER_MUTED, CASSETTE_MASK_SPEAKER); |
| r1884 | r1885 | |
| 465 | 465 | |
| 466 | 466 | static READ8_HANDLER( super80_f2_r ) |
| 467 | 467 | { |
| 468 | | UINT8 data = readinputport(0) & 0xf0; // dip switches on pcb |
| 468 | UINT8 data = readinputportbytag("DSW") & 0xf0; // dip switches on pcb |
| 469 | 469 | data |= cass_out; // bit 0 = output of U1, bit 1 = current wave_state |
| 470 | 470 | data |= 0x0c; // bits 2,3 - not used |
| 471 | 471 | return data; |
| r1884 | r1885 | |
| 587 | 587 | /**************************** DIPSWITCHES, KEYBOARD, HARDWARE CONFIGURATION ****************************************/ |
| 588 | 588 | |
| 589 | 589 | static INPUT_PORTS_START( super80 ) |
| 590 | | PORT_START |
| 590 | PORT_START_TAG("DSW") |
| 591 | 591 | PORT_BIT( 0xf, 0xf, IPT_UNUSED ) |
| 592 | 592 | PORT_DIPNAME( 0x10, 0x00, "Switch A") PORT_DIPLOCATION("SW1:1") |
| 593 | 593 | PORT_DIPSETTING( 0x10, DEF_STR(Off)) |
| r1884 | r1885 | |
| 785 | 785 | static TIMER_CALLBACK( super80_halfspeed ) |
| 786 | 786 | { |
| 787 | 787 | UINT8 go_fast = 0; |
| 788 | | if ((super80_mhz == 2) || (!(readinputport(9) & 2))) /* bit 2 of port F0 is low, OR user turned on config switch */ |
| 788 | if ((super80_mhz == 2) || (!(readinputportbytag("CONFIG") & 2))) /* bit 2 of port F0 is low, OR user turned on config switch */ |
| 789 | 789 | go_fast++; |
| 790 | 790 | |
| 791 | 791 | /* code to slow down computer to 1mhz by halting cpu on every second frame */ |
| r1884 | r1885 | |
| 987 | 987 | |
| 988 | 988 | static QUICKLOAD_LOAD( super80 ) |
| 989 | 989 | { |
| 990 | | UINT8 sw = readinputport(9) & 1; /* reading the dipswitch: 1 = autorun */ |
| 990 | UINT8 sw = readinputportbytag("CONFIG") & 1; /* reading the dipswitch: 1 = autorun */ |
| 991 | 991 | UINT16 exec_addr; |
| 992 | 992 | UINT64 return_info = z80bin_load_file( image, file_type ); /* load file */ |
| 993 | 993 | |