Previous 199869 Revisions Next

r25519 Friday 4th October, 2013 at 12:34:34 UTC by Robbbert
(MESS) sapi1 : last part (nw)
[src/mess/drivers]sapi1.c

trunk/src/mess/drivers/sapi1.c
r25518r25519
1616        According to wikipedia, sapi1 & 2 have cassette facility,
1717        while sapi3 uses 8 inch floppy disk.
1818
19ToDo:
20- Add cassette to sapi1 and 2
21-- UART on port 12, save and load bytes
22-- port 11 bit 7 for load, chr available
23-- port 11 bit 6 for save, tx buffer empty
24- sapi3 is trying to read a disk, so there is no response after showing the logo
25
26Unable to proceed due to no info available (& in English).
27
1928****************************************************************************/
2029
2130
r25518r25519
5968   DECLARE_MACHINE_RESET(sapi1);
6069   DECLARE_MACHINE_RESET(sapizps3);
6170   UINT32 screen_update_sapi1(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
71   UINT32 screen_update_sapi3(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
6272private:
6373   UINT8 m_term_data;
6474   UINT8 m_keyboard_mask;
r25518r25519
334344   return 0;
335345}
336346
347// The attributes seem to be different on this one, they need to be understood, so disabled for now
348UINT32 sapi1_state::screen_update_sapi3(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
349{
350   bool val;
351   UINT16 addr,xpos;
352   UINT8 chr,attr,ra,x,y,b;
353
354   for(y = 0; y < 20; y++ )
355   {
356      addr = y*64;
357      xpos = 0;
358      for(x = 0; x < 40; x++ )
359      {
360         chr = m_p_videoram[addr + x];
361         attr = 0;//(chr >> 6) & 3;
362         if (chr > 0x3f)
363            chr &= 0x1f;
364
365         for(ra = 0; ra < 9; ra++ )
366         {
367            for(b = 0; b < 6; b++ )
368            {
369               val = 0;
370
371               if (ra==8)
372               {
373                  if (attr==2)
374                     val = BIT(m_refresh_counter, 5);
375               }
376               else
377               {
378                  val = BIT(MHB2501[(chr<<3) | ra], 5-b);
379                  if (attr==1)
380                     val = BIT(m_refresh_counter, 5) ? val : 0;
381               }
382
383               if(attr==3)
384               {
385                  bitmap.pix16(y*9+ra, xpos+2*b   ) = val;
386                  bitmap.pix16(y*9+ra, xpos+2*b+1 ) = val;
387               }
388               else
389               {
390                  bitmap.pix16(y*9+ra, xpos+b ) = val;
391               }
392            }
393         }
394         xpos+= (attr==3) ? 12 : 6;
395         if (xpos>=6*40) break;
396      }
397   }
398   m_refresh_counter++;
399   return 0;
400}
401
337402static MC6845_UPDATE_ROW( update_row )
338403{
339404   sapi1_state *state = device->machine().driver_data<sapi1_state>();
r25518r25519
518583   MCFG_CPU_PROGRAM_MAP(sapi3_mem)
519584   MCFG_CPU_IO_MAP(sapi3_io)
520585   MCFG_MACHINE_RESET_OVERRIDE(sapi1_state, sapizps3 )
586   MCFG_SCREEN_MODIFY("screen")
587   MCFG_SCREEN_SIZE(40*6, 20*9)
588   MCFG_SCREEN_VISIBLE_AREA(0, 40*6-1, 0, 20*9-1)
589   MCFG_SCREEN_UPDATE_DRIVER(sapi1_state, screen_update_sapi3)
521590MACHINE_CONFIG_END
522591
523592static MACHINE_CONFIG_DERIVED( sapi3b, sapi3 )

Previous 199869 Revisions Next


© 1997-2024 The MAME Team