src/mess/drivers/x1.c
| r5794 | r5795 | |
| 166 | 166 | static UINT16 pcg_index[3]; |
| 167 | 167 | static UINT8 pcg_reset; |
| 168 | 168 | static UINT16 crtc_start_addr; |
| 169 | static UINT8 tile_height; |
| 169 | 170 | static UINT8 sub_obf; |
| 170 | 171 | static UINT8 key_irq_flag; |
| 171 | 172 | static UINT8 ctc_irq_flag; |
| r5794 | r5795 | |
| 212 | 213 | |
| 213 | 214 | screen_mask = (w == 2) ? 0xfff : 0x7ff; |
| 214 | 215 | |
| 215 | | for (y=0;y<25;y++) |
| 216 | for (y=0;y<50;y++) |
| 216 | 217 | { |
| 217 | 218 | for (x=0;x<40*w;x++) |
| 218 | 219 | { |
| r5794 | r5795 | |
| 229 | 230 | if((y & 1) == 1 && height) continue; |
| 230 | 231 | |
| 231 | 232 | res_x = (x/(width+1))*8*(width+1); |
| 232 | | res_y = (y/(height+1))*8*(height+1); |
| 233 | res_y = (y/(height+1))*(tile_height+1)*(height+1); |
| 233 | 234 | |
| 234 | 235 | { |
| 235 | 236 | int pen[3],pen_mask,pcg_pen,xi,yi; |
| r5794 | r5795 | |
| 237 | 238 | pen_mask = color & 7; |
| 238 | 239 | |
| 239 | 240 | /* We use custom drawing code due of the bitplane disable and the color revert stuff. */ |
| 240 | | for(yi=0;yi<8*(height+1);yi+=(height+1)) |
| 241 | for(yi=0;yi<(tile_height+1)*(height+1);yi+=(height+1)) |
| 241 | 242 | { |
| 242 | 243 | for(xi=0;xi<8*(width+1);xi+=(width+1)) |
| 243 | 244 | { |
| r5794 | r5795 | |
| 403 | 404 | |
| 404 | 405 | w = (video_screen_get_width(screen) < 640) ? 1 : 2; |
| 405 | 406 | |
| 407 | bitmap_fill(bitmap, cliprect, MAKE_ARGB(0xff,0x00,0x00,0x00)); |
| 408 | |
| 406 | 409 | draw_gfxbitmap(screen->machine,bitmap,cliprect,w,scrn_reg.disp_bank,scrn_reg.ply); |
| 407 | 410 | draw_fgtilemap(screen->machine,bitmap,cliprect,w); |
| 408 | 411 | draw_gfxbitmap(screen->machine,bitmap,cliprect,w,scrn_reg.disp_bank,scrn_reg.ply^0xff); |
| r5794 | r5795 | |
| 690 | 693 | { |
| 691 | 694 | if(key_irq_flag != 0) |
| 692 | 695 | return Z80_DAISY_INT; |
| 693 | | |
| 696 | |
| 694 | 697 | return 0; |
| 695 | 698 | } |
| 696 | 699 | |
| r5794 | r5795 | |
| 1048 | 1051 | else |
| 1049 | 1052 | { |
| 1050 | 1053 | /* FIXME: this should be inside the MC6845 core! */ |
| 1054 | if(addr_latch == 0x09) |
| 1055 | tile_height = data; |
| 1051 | 1056 | if(addr_latch == 0x0c) |
| 1052 | 1057 | crtc_start_addr = ((data<<8) & 0x3f00) | (crtc_start_addr & 0xff); |
| 1053 | 1058 | else if(addr_latch == 0x0d) |
| r5794 | r5795 | |
| 1934 | 1939 | cmt_current_cmd = 0; |
| 1935 | 1940 | cmt_test = 0; |
| 1936 | 1941 | cassette_change_state(devtag_get_device(machine, "cass" ),CASSETTE_MOTOR_DISABLED,CASSETTE_MASK_MOTOR); |
| 1937 | | |
| 1942 | |
| 1938 | 1943 | key_irq_flag = ctc_irq_flag = 0; |
| 1939 | 1944 | } |
| 1940 | 1945 | |
| r5794 | r5795 | |
| 2033 | 2038 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.20) |
| 2034 | 2039 | |
| 2035 | 2040 | MDRV_CASSETTE_ADD("cass",x1_cassette_config) |
| 2036 | | |
| 2037 | | MDRV_FLOPPY_4_DRIVES_ADD(x1_floppy_config) |
| 2041 | |
| 2042 | MDRV_FLOPPY_4_DRIVES_ADD(x1_floppy_config) |
| 2038 | 2043 | MACHINE_DRIVER_END |
| 2039 | 2044 | |
| 2040 | 2045 | static MACHINE_DRIVER_START( x1turbo ) |