Previous 15994 Revisions Next

r5795 Friday 18th September, 2009 at 19:34:35 UTC by Angelo Salese
[X1]: Fixed tilemap display when tile height register is = 4
[src/mess/drivers]x1.c

src/mess/drivers/x1.c
r5794r5795
166166static UINT16 pcg_index[3];
167167static UINT8 pcg_reset;
168168static UINT16 crtc_start_addr;
169static UINT8 tile_height;
169170static UINT8 sub_obf;
170171static UINT8 key_irq_flag;
171172static UINT8 ctc_irq_flag;
r5794r5795
212213
213214   screen_mask = (w == 2) ? 0xfff : 0x7ff;
214215
215   for (y=0;y<25;y++)
216   for (y=0;y<50;y++)
216217   {
217218      for (x=0;x<40*w;x++)
218219      {
r5794r5795
229230         if((y & 1) == 1 && height) continue;
230231
231232         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);
233234
234235         {
235236            int pen[3],pen_mask,pcg_pen,xi,yi;
r5794r5795
237238            pen_mask = color & 7;
238239
239240            /* 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))
241242            {
242243               for(xi=0;xi<8*(width+1);xi+=(width+1))
243244               {
r5794r5795
403404
404405   w = (video_screen_get_width(screen) < 640) ? 1 : 2;
405406
407   bitmap_fill(bitmap, cliprect, MAKE_ARGB(0xff,0x00,0x00,0x00));
408
406409   draw_gfxbitmap(screen->machine,bitmap,cliprect,w,scrn_reg.disp_bank,scrn_reg.ply);
407410   draw_fgtilemap(screen->machine,bitmap,cliprect,w);
408411   draw_gfxbitmap(screen->machine,bitmap,cliprect,w,scrn_reg.disp_bank,scrn_reg.ply^0xff);
r5794r5795
690693{
691694   if(key_irq_flag != 0)
692695      return Z80_DAISY_INT;
693     
696
694697   return 0;
695698}
696699
r5794r5795
10481051   else
10491052   {
10501053      /* FIXME: this should be inside the MC6845 core! */
1054      if(addr_latch == 0x09)
1055         tile_height = data;
10511056      if(addr_latch == 0x0c)
10521057         crtc_start_addr = ((data<<8) & 0x3f00) | (crtc_start_addr & 0xff);
10531058      else if(addr_latch == 0x0d)
r5794r5795
19341939   cmt_current_cmd = 0;
19351940   cmt_test = 0;
19361941   cassette_change_state(devtag_get_device(machine, "cass" ),CASSETTE_MOTOR_DISABLED,CASSETTE_MASK_MOTOR);
1937   
1942
19381943   key_irq_flag = ctc_irq_flag = 0;
19391944}
19401945
r5794r5795
20332038   MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.20)
20342039
20352040   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)
20382043MACHINE_DRIVER_END
20392044
20402045static MACHINE_DRIVER_START( x1turbo )

Previous 15994 Revisions Next


© 1998-2018 The MESS Team