Previous 15994 Revisions Next

r13809 Sunday 1st January, 2012 at 15:16:29 UTC by Robbbert
Indiana - added video, F4 display, and some notes.
[src/mess/drivers]indiana.c

src/mess/drivers/indiana.c
r13808r13809
44
55        08/12/2009 Skeleton driver.
66
7        If 6001F7 is held at 40, then '>' will appear on screen.
8        System often reads/writes 6003D4/5, might be a cut-down 6845,
9        as it only uses registers C,D,E,F.
10
711****************************************************************************/
812#define ADDRESS_MAP_MODERN
913
r13808r13809
1721   indiana_state(const machine_config &mconfig, device_type type, const char *tag)
1822      : driver_device(mconfig, type, tag) { }
1923
24   UINT8 *m_p_chargen;
25   UINT8 *m_p_videoram;
2026};
2127
2228
r13808r13809
2834   AM_RANGE(0x00400000, 0x004fffff) AM_MIRROR(0x7f800000) AM_RAM // 16 bit PC IO
2935   AM_RANGE(0x00500000, 0x005fffff) AM_MIRROR(0x7f800000) AM_RAM // 16 bit PC MEM
3036   AM_RANGE(0x00600000, 0x006fffff) AM_MIRROR(0x7f800000) AM_RAM // 8 bit PC IO
31   AM_RANGE(0x00700000, 0x007fffff) AM_MIRROR(0x7f800000) AM_RAM // 8 bit PC MEM // 7f7b8000 location of VGA RAM
37   AM_RANGE(0x00700000, 0x007b7fff) AM_MIRROR(0x7f800000) AM_RAM // 8 bit PC MEM
38   AM_RANGE(0x007b8000, 0x007fffff) AM_MIRROR(0x7f800000) AM_RAM AM_BASE(m_p_videoram) // 8 bit PC MEM
3239   AM_RANGE(0x80000000, 0x803fffff) AM_MIRROR(0x7fc00000) AM_RAM // 4 MB RAM
3340ADDRESS_MAP_END
3441
r13808r13809
4451
4552static VIDEO_START( indiana )
4653{
54   indiana_state *state = machine.driver_data<indiana_state>();
55   static const UINT16 chargens[3] = { 0x6710, 0x671c, 0x66a4 };
56   state->m_p_chargen = machine.region("user1")->base()+chargens[rom_system_bios(machine)-1];
4757}
4858
4959static SCREEN_UPDATE( indiana )
5060{
61   indiana_state *state = screen.machine().driver_data<indiana_state>();
62   UINT8 y,ra,chr,gfx,fg;
63   UINT16 sy=0,ma=0,x;
64
65   for (y = 0; y < 25; y++)
66   {
67      for (ra = 0; ra < 16; ra++)
68      {
69         UINT16 *p = &bitmap->pix16(sy++);
70
71         for (x = ma; x < ma + 160; x+=2)
72         {
73            chr = state->m_p_videoram[(x^2)+1];
74            fg = state->m_p_videoram[x^2] & 7;
75
76            gfx = state->m_p_chargen[(chr<<4) | (ra ^ 3) ];
77
78            *p++ = BIT(gfx, 7) ? fg : 0;
79            *p++ = BIT(gfx, 6) ? fg : 0;
80            *p++ = BIT(gfx, 5) ? fg : 0;
81            *p++ = BIT(gfx, 4) ? fg : 0;
82            *p++ = BIT(gfx, 3) ? fg : 0;
83            *p++ = BIT(gfx, 2) ? fg : 0;
84            *p++ = BIT(gfx, 1) ? fg : 0;
85            *p++ = BIT(gfx, 0) ? fg : 0;
86         }
87      }
88      ma+=160;
89   }
90
5191   return 0;
5292}
5393
94/* F4 Character Displayer */
95static const gfx_layout indiana_charlayout =
96{
97   8, 16,               /* 8 x 16 characters */
98   128,               /* 128 characters */
99   1,               /* 1 bits per pixel */
100   { 0 },               /* no bitplanes */
101   /* x offsets */
102   { 0, 1, 2, 3, 4, 5, 6, 7 },
103   /* y offsets */
104   { 3*8, 2*8, 1*8, 0*8, 7*8, 6*8, 5*8, 4*8, 11*8, 10*8, 9*8, 8*8, 15*8, 14*8, 13*8, 12*8 },
105   8*16               /* every char takes 16 bytes */
106};
107
108static GFXDECODE_START( indiana )
109   GFXDECODE_ENTRY( "user1", 0x6710, indiana_charlayout, 0, 4 ) // offset is for -bios 0
110GFXDECODE_END
111
54112static MACHINE_CONFIG_START( indiana, indiana_state )
55113   /* basic machine hardware */
56114   MCFG_CPU_ADD("maincpu",M68030, XTAL_16MHz)
r13808r13809
63121   MCFG_SCREEN_REFRESH_RATE(50)
64122   MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */
65123   MCFG_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16)
66   MCFG_SCREEN_SIZE(640, 480)
67   MCFG_SCREEN_VISIBLE_AREA(0, 640-1, 0, 480-1)
124   MCFG_SCREEN_SIZE(640, 400)
125   MCFG_SCREEN_VISIBLE_AREA(0, 640-1, 0, 400-1)
126   MCFG_VIDEO_START(indiana)
68127   MCFG_SCREEN_UPDATE(indiana)
69
70   MCFG_PALETTE_LENGTH(2)
71   MCFG_PALETTE_INIT(black_and_white)
72
73   MCFG_VIDEO_START(indiana)
128   MCFG_GFXDECODE(indiana)
129   MCFG_PALETTE_LENGTH(8)
130   //MCFG_PALETTE_INIT(black_and_white)
74131MACHINE_CONFIG_END
75132
76133/* ROM definition */

Previous 15994 Revisions Next


© 1998-2018 The MESS Team