mirror of
https://github.com/holub/mame
synced 2025-05-20 20:58:51 +03:00
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:
parent
d52ac19bdf
commit
9af89c3a52
@ -484,7 +484,9 @@ layout_element::layout_element(running_machine &machine, xml_data_node &elemnode
|
|||||||
m_maxstate = 255;
|
m_maxstate = 255;
|
||||||
if (newcomp.m_type == component::CTYPE_DOTMATRIX5DOT)
|
if (newcomp.m_type == component::CTYPE_DOTMATRIX5DOT)
|
||||||
m_maxstate = 31;
|
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);
|
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;
|
m_type = CTYPE_DOTMATRIX5DOT;
|
||||||
}
|
}
|
||||||
|
else if (strcmp(compnode.name, "dotmatrixdot") == 0)
|
||||||
|
{
|
||||||
|
m_type = CTYPE_DOTMATRIXDOT;
|
||||||
|
}
|
||||||
// simplecounter nodes
|
// simplecounter nodes
|
||||||
else if (strcmp(compnode.name, "simplecounter") == 0)
|
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);
|
draw_dotmatrix(5, dest, bounds, state);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case CTYPE_DOTMATRIXDOT:
|
||||||
|
draw_dotmatrix(1, dest, bounds, state);
|
||||||
|
break;
|
||||||
|
|
||||||
case CTYPE_SIMPLECOUNTER:
|
case CTYPE_SIMPLECOUNTER:
|
||||||
draw_simplecounter(machine, dest, bounds, state);
|
draw_simplecounter(machine, dest, bounds, state);
|
||||||
break;
|
break;
|
||||||
|
@ -122,6 +122,7 @@ private:
|
|||||||
CTYPE_LED16SEGSC,
|
CTYPE_LED16SEGSC,
|
||||||
CTYPE_DOTMATRIX,
|
CTYPE_DOTMATRIX,
|
||||||
CTYPE_DOTMATRIX5DOT,
|
CTYPE_DOTMATRIX5DOT,
|
||||||
|
CTYPE_DOTMATRIXDOT,
|
||||||
CTYPE_SIMPLECOUNTER,
|
CTYPE_SIMPLECOUNTER,
|
||||||
CTYPE_REEL,
|
CTYPE_REEL,
|
||||||
CTYPE_MAX
|
CTYPE_MAX
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -29,9 +29,6 @@ Standard dm01 memorymap
|
|||||||
4000-FFFF | W | D D D D D D D D | ROM (48k)
|
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
|
TODO: - find out clockspeed of CPU
|
||||||
- sometimes screen isn't cleared, is the a clear bit missing?
|
- sometimes screen isn't cleared, is the a clear bit missing?
|
||||||
|
|
||||||
@ -61,10 +58,10 @@ typedef struct _dm01
|
|||||||
int data_avail,
|
int data_avail,
|
||||||
control,
|
control,
|
||||||
xcounter,
|
xcounter,
|
||||||
|
segbuffer[65],
|
||||||
busy;
|
busy;
|
||||||
|
|
||||||
UINT8 scanline[DM_BYTESPERROW],
|
UINT8 scanline[DM_BYTESPERROW],
|
||||||
segbuffer[72],
|
|
||||||
comdata;
|
comdata;
|
||||||
|
|
||||||
} bfmdm01;
|
} bfmdm01;
|
||||||
@ -149,10 +146,9 @@ static WRITE8_HANDLER( mux_w )
|
|||||||
dm01.scanline[8] &= 0x80;//filter all other bits
|
dm01.scanline[8] &= 0x80;//filter all other bits
|
||||||
if ( (row >= 0) && (row < DM_MAXLINES) )
|
if ( (row >= 0) && (row < DM_MAXLINES) )
|
||||||
{
|
{
|
||||||
int p,pos; //,dots;
|
int p,pos;
|
||||||
pos =0;
|
pos =0;
|
||||||
p = 0;
|
p = 0;
|
||||||
// dots = 0;
|
|
||||||
|
|
||||||
while ( p < (DM_BYTESPERROW) )
|
while ( p < (DM_BYTESPERROW) )
|
||||||
{
|
{
|
||||||
@ -161,33 +157,19 @@ static WRITE8_HANDLER( mux_w )
|
|||||||
|
|
||||||
for (int bitpos=0; bitpos <8; bitpos++)
|
for (int bitpos=0; bitpos <8; bitpos++)
|
||||||
{
|
{
|
||||||
if (d & 1<<(7-bitpos)) dm01.segbuffer[(p*8)+bitpos]=1;
|
if (((p*8)+bitpos) <65)
|
||||||
else dm01.segbuffer[(p*8)+bitpos]=0;
|
{
|
||||||
|
if (d & 1<<(7-bitpos)) dm01.segbuffer[(p*8)+bitpos]=1;
|
||||||
|
else dm01.segbuffer[(p*8)+bitpos]=0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
p++;
|
p++;
|
||||||
}
|
}
|
||||||
|
|
||||||
while ( pos < 13 )
|
for (int pos=0;pos<65;pos++)
|
||||||
{
|
{
|
||||||
int element =0;
|
output_set_indexed_value("dotmatrix", pos +(65*row), dm01.segbuffer[(pos)]);
|
||||||
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++;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user