Previous 15994 Revisions Next

r8513 Thursday 15th July, 2010 at 18:42:05 UTC by Angelo Salese
[PASOPIA7]: Added preliminary cursor drawing
[src/mess/drivers]pasopia.c

src/mess/drivers/pasopia.c
r8512r8513
44
55    preliminary driver by Angelo Salese
66
7   TODO:
8   - cursor seems too slow, missing irqs?
9
710****************************************************************************/
811
912#include "emu.h"
r8512r8513
1619static UINT8 vram_sel;
1720static UINT8 *p7_vram;
1821static UINT8 bank_reg;
22static UINT16 cursor_addr;
23static UINT8 cursor_blink;
1924
2025static VIDEO_START( paso7 )
2126{
r8512r8513
3641
3742         drawgfx_opaque(bitmap,cliprect,screen->machine->gfx[0],tile,0,0,0,x*8,y*8);
3843
44         if(((cursor_addr*8) == count) && !cursor_blink) // draw cursor
45            drawgfx_opaque(bitmap,cliprect,screen->machine->gfx[0],0x5f,0,0,0,x*8,y*8);
46
3947         count+=8;
4048      }
4149   }
4250
43
4451    return 0;
4552}
4653
r8512r8513
151158   cpu[offset] = data;
152159}
153160
161static WRITE8_HANDLER( pasopia7_6845_w )
162{
163   static int addr_latch;
164
165   if(offset == 0)
166   {
167      addr_latch = data;
168      mc6845_address_w(devtag_get_device(space->machine, "crtc"), 0,data);
169   }
170   else
171   {
172      /* FIXME: this should be inside the MC6845 core! */
173      if(addr_latch == 0x0e)
174         cursor_addr = ((data<<8) & 0x3f00) | (cursor_addr & 0xff);
175      else if(addr_latch == 0x0f)
176         cursor_addr = (cursor_addr & 0x3f00) | (data & 0xff);
177
178      mc6845_register_w(devtag_get_device(space->machine, "crtc"), 0,data);
179   }
180}
181
182
154183static ADDRESS_MAP_START(paso7_mem, ADDRESS_SPACE_PROGRAM, 8)
155184   ADDRESS_MAP_UNMAP_HIGH
156185   AM_RANGE( 0x0000, 0x7fff ) AM_WRITE( ram_bank_w )
r8512r8513
165194   ADDRESS_MAP_GLOBAL_MASK(0xff)
166195   AM_RANGE( 0x08, 0x0b ) AM_DEVREADWRITE("ppi8255_0", i8255a_r, i8255a_w)
167196   AM_RANGE( 0x0c, 0x0f ) AM_DEVREADWRITE("ppi8255_1", i8255a_r, i8255a_w)
168   AM_RANGE( 0x10, 0x10 ) AM_DEVWRITE("crtc", mc6845_address_w)
169   AM_RANGE( 0x11, 0x11 ) AM_DEVWRITE("crtc", mc6845_register_w)
197   AM_RANGE( 0x10, 0x11 ) AM_WRITE(pasopia7_6845_w)
170198   AM_RANGE( 0x18, 0x1b ) AM_READWRITE( pac2_r, pac2_w )
171199   AM_RANGE( 0x20, 0x23 ) AM_DEVREADWRITE("ppi8255_2", i8255a_r, i8255a_w)
172200   AM_RANGE( 0x28, 0x2b ) AM_DEVREADWRITE("ctc", z80ctc_r, z80ctc_w)
r8512r8513
270298static WRITE8_DEVICE_HANDLER( video_misc_w )
271299{
272300   /*
273      else if(id == SIG_MEMORY_I8255_1_C)
274         attr_wrap = (data & 0x10) ? true : false;
275         pal_sel = (data & 0xc) ? true : false;
276301      --x- ---- blinking
277302      ---x ---- attribute wrap
278303      ---- x--- pal disable
279304      ---- xx-- palette selector (both bits enables this, odd hook-up)
280305   */
281306//   printf("VIDEO MISC REG %02x\n",data);
307   cursor_blink = data & 0x20;
308
282309}
283310
284311static WRITE8_DEVICE_HANDLER( nmi_mask_w )

Previous 15994 Revisions Next


© 1998-2018 The MESS Team