Finally done the last part of the dotmatrix changes, which is to create a dot by dot display mode. This makes the BFMDM01 emulation far more straightforward, and should mean that anyone wanting a matrix can call some combination of functions and make it work. [James Wallace]

This commit is contained in:
Scott Stone 2012-05-17 10:49:51 +00:00
parent d52ac19bdf
commit 9af89c3a52
4 changed files with 8231 additions and 1688 deletions

View File

@ -484,7 +484,9 @@ layout_element::layout_element(running_machine &machine, xml_data_node &elemnode
m_maxstate = 255;
if (newcomp.m_type == component::CTYPE_DOTMATRIX5DOT)
m_maxstate = 31;
if (newcomp.m_type == component::CTYPE_SIMPLECOUNTER)
if (newcomp.m_type == component::CTYPE_DOTMATRIXDOT)
m_maxstate = 1;
if (newcomp.m_type == component::CTYPE_SIMPLECOUNTER)
{
m_maxstate = xml_get_attribute_int_with_subst(machine, *compnode, "maxstate", 999);
}
@ -653,6 +655,10 @@ layout_element::component::component(running_machine &machine, xml_data_node &co
{
m_type = CTYPE_DOTMATRIX5DOT;
}
else if (strcmp(compnode.name, "dotmatrixdot") == 0)
{
m_type = CTYPE_DOTMATRIXDOT;
}
// simplecounter nodes
else if (strcmp(compnode.name, "simplecounter") == 0)
{
@ -812,6 +818,10 @@ void layout_element::component::draw(running_machine &machine, bitmap_argb32 &de
draw_dotmatrix(5, dest, bounds, state);
break;
case CTYPE_DOTMATRIXDOT:
draw_dotmatrix(1, dest, bounds, state);
break;
case CTYPE_SIMPLECOUNTER:
draw_simplecounter(machine, dest, bounds, state);
break;

View File

@ -122,6 +122,7 @@ private:
CTYPE_LED16SEGSC,
CTYPE_DOTMATRIX,
CTYPE_DOTMATRIX5DOT,
CTYPE_DOTMATRIXDOT,
CTYPE_SIMPLECOUNTER,
CTYPE_REEL,
CTYPE_MAX

File diff suppressed because it is too large Load Diff

View File

@ -29,9 +29,6 @@ Standard dm01 memorymap
4000-FFFF | W | D D D D D D D D | ROM (48k)
-----------+---+-----------------+-----------------------------------------
NOTE: The board uses only one dot of its last set of eight in a row, as the
rest are used for the row counter. Because of the way we do dots, we show
the blank ones that are most likely hidden by bezels on the unit.
TODO: - find out clockspeed of CPU
- sometimes screen isn't cleared, is the a clear bit missing?
@ -61,10 +58,10 @@ typedef struct _dm01
int data_avail,
control,
xcounter,
segbuffer[65],
busy;
UINT8 scanline[DM_BYTESPERROW],
segbuffer[72],
comdata;
} bfmdm01;
@ -149,10 +146,9 @@ static WRITE8_HANDLER( mux_w )
dm01.scanline[8] &= 0x80;//filter all other bits
if ( (row >= 0) && (row < DM_MAXLINES) )
{
int p,pos; //,dots;
int p,pos;
pos =0;
p = 0;
// dots = 0;
while ( p < (DM_BYTESPERROW) )
{
@ -161,33 +157,19 @@ static WRITE8_HANDLER( mux_w )
for (int bitpos=0; bitpos <8; bitpos++)
{
if (d & 1<<(7-bitpos)) dm01.segbuffer[(p*8)+bitpos]=1;
else dm01.segbuffer[(p*8)+bitpos]=0;
if (((p*8)+bitpos) <65)
{
if (d & 1<<(7-bitpos)) dm01.segbuffer[(p*8)+bitpos]=1;
else dm01.segbuffer[(p*8)+bitpos]=0;
}
}
p++;
}
while ( pos < 13 )
for (int pos=0;pos<65;pos++)
{
int element =0;
for (int dotpos=0; dotpos <5; dotpos++)
{
if (dm01.segbuffer[(pos*5)+dotpos])
{
element |= (1<<(dotpos));
}
else
{
element &= ~(1<<(dotpos));
}
}
output_set_indexed_value("dotmatrix", pos +(13*row), element);
pos++;
}
output_set_indexed_value("dotmatrix", pos +(65*row), dm01.segbuffer[(pos)]);
}
}
}
}