getting the AGEMAME ball rolling.

Moved over some of the drivers (thanks to James Wallace / ageMAME)
This commit is contained in:
davidhay 2009-02-02 22:52:37 +00:00
parent c4a4a0630b
commit ed3bf17889
17 changed files with 12655 additions and 16 deletions

11
.gitattributes vendored
View File

@ -1757,6 +1757,7 @@ src/mame/drivers/mouser.c svneol=native#text/plain
src/mame/drivers/mpoker.c svneol=native#text/plain
src/mame/drivers/mpu4.c svneol=native#text/plain
src/mame/drivers/mpu4drvr.c svneol=native#text/plain
src/mame/drivers/mpu5.c svneol=native#text/plain
src/mame/drivers/mquake.c svneol=native#text/plain
src/mame/drivers/mrdo.c svneol=native#text/plain
src/mame/drivers/mrflea.c svneol=native#text/plain
@ -2521,8 +2522,12 @@ src/mame/layout/armora.lay svneol=native#text/plain
src/mame/layout/atarifb.lay svneol=native#text/plain
src/mame/layout/atarifb4.lay svneol=native#text/plain
src/mame/layout/avalnche.lay svneol=native#text/plain
src/mame/layout/awpdmd.lay svneol=native#text/plain
src/mame/layout/awpvid14.lay svneol=native#text/plain
src/mame/layout/awpvid16.lay svneol=native#text/plain
src/mame/layout/babydad.lay svneol=native#text/plain
src/mame/layout/babypkr.lay svneol=native#text/plain
src/mame/layout/bfm_sc1.lay svneol=native#text/plain
src/mame/layout/bfm_sc2.lay svneol=native#text/plain
src/mame/layout/blckjack.lay svneol=native#text/plain
src/mame/layout/buckrog.lay svneol=native#text/plain
@ -2537,11 +2542,13 @@ src/mame/layout/crusnexo.lay svneol=native#text/plain
src/mame/layout/darius.lay svneol=native#text/plain
src/mame/layout/deadeye.lay svneol=native#text/plain
src/mame/layout/dlair.lay svneol=native#text/plain
src/mame/layout/drwho.lay svneol=native#text/plain
src/mame/layout/elecyoyo.lay svneol=native#text/plain
src/mame/layout/fashion.lay svneol=native#text/plain
src/mame/layout/firebeat.lay svneol=native#text/plain
src/mame/layout/funworld.lay svneol=native#text/plain
src/mame/layout/galaxi.lay -text svneol=native#plain/text
src/mame/layout/gamball.lay svneol=native#text/plain
src/mame/layout/geebee.lay svneol=native#text/plain
src/mame/layout/gldncrwn.lay svneol=native#text/plain
src/mame/layout/goldnpkr.lay svneol=native#text/plain
@ -2842,6 +2849,8 @@ src/mame/video/atetris.c svneol=native#text/plain
src/mame/video/attckufo.c svneol=native#text/plain
src/mame/video/avgdvg.c svneol=native#text/plain
src/mame/video/avgdvg.h svneol=native#text/plain
src/mame/video/awpvid.c svneol=native#text/plain
src/mame/video/awpvid.h svneol=native#text/plain
src/mame/video/aztarac.c svneol=native#text/plain
src/mame/video/badlands.c svneol=native#text/plain
src/mame/video/bagman.c svneol=native#text/plain
@ -2858,6 +2867,8 @@ src/mame/video/beathead.c svneol=native#text/plain
src/mame/video/beezer.c svneol=native#text/plain
src/mame/video/bfm_adr2.c svneol=native#text/plain
src/mame/video/bfm_adr2.h svneol=native#text/plain
src/mame/video/bfm_dm01.c svneol=native#text/plain
src/mame/video/bfm_dm01.h svneol=native#text/plain
src/mame/video/bigevglf.c svneol=native#text/plain
src/mame/video/bigstrkb.c svneol=native#text/plain
src/mame/video/bionicc.c svneol=native#text/plain

View File

@ -125,22 +125,24 @@ typedef UINT32 (*video_update_func)(const device_config *screen, bitmap_t *bitma
/* ----- flags for game drivers ----- */
#define ORIENTATION_MASK 0x0007
#define GAME_NOT_WORKING 0x0008
#define GAME_UNEMULATED_PROTECTION 0x0010 /* game's protection not fully emulated */
#define GAME_WRONG_COLORS 0x0020 /* colors are totally wrong */
#define GAME_IMPERFECT_COLORS 0x0040 /* colors are not 100% accurate, but close */
#define GAME_IMPERFECT_GRAPHICS 0x0080 /* graphics are wrong/incomplete */
#define GAME_NO_COCKTAIL 0x0100 /* screen flip support is missing */
#define GAME_NO_SOUND 0x0200 /* sound is missing */
#define GAME_IMPERFECT_SOUND 0x0400 /* sound is known to be wrong */
#define GAME_SUPPORTS_SAVE 0x0800 /* game supports save states */
#define GAME_IS_BIOS_ROOT 0x1000 /* this driver entry is a BIOS root */
#define GAME_NO_STANDALONE 0x2000 /* this driver cannot stand alone */
#define ORIENTATION_MASK 0x00000007
#define GAME_NOT_WORKING 0x00000008
#define GAME_UNEMULATED_PROTECTION 0x00000010 /* game's protection not fully emulated */
#define GAME_WRONG_COLORS 0x00000020 /* colors are totally wrong */
#define GAME_IMPERFECT_COLORS 0x00000040 /* colors are not 100% accurate, but close */
#define GAME_IMPERFECT_GRAPHICS 0x00000080 /* graphics are wrong/incomplete */
#define GAME_NO_COCKTAIL 0x00000100 /* screen flip support is missing */
#define GAME_NO_SOUND 0x00000200 /* sound is missing */
#define GAME_IMPERFECT_SOUND 0x00000400 /* sound is known to be wrong */
#define GAME_SUPPORTS_SAVE 0x00000800 /* game supports save states */
#define GAME_IS_BIOS_ROOT 0x00001000 /* this driver entry is a BIOS root */
#define GAME_NO_STANDALONE 0x00002000 /* this driver cannot stand alone */
#define GAME_REQUIRES_ARTWORK 0x00004000 /* this driver cannot stand alone */
#ifdef MESS
#define GAME_COMPUTER 0x8000 /* Driver is a computer (needs full keyboard) */
#define GAME_COMPUTER_MODIFIED 0x4000 /* Official? Hack */
#define GAME_COMPUTER_MODIFIED 0x00008000 /* Official? Hack */
#define GAME_COMPUTER 0x00001000 /* Driver is a computer (needs full keyboard) */
#endif

View File

@ -290,7 +290,7 @@ int ui_display_startup_screens(running_machine *machine, int first_time, int sho
if (show_warnings && astring_len(warnings_string(machine, messagebox_text)) > 0)
{
ui_set_handler(handler_messagebox_ok, 0);
if (machine->gamedrv->flags & (GAME_WRONG_COLORS | GAME_IMPERFECT_COLORS | GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND | GAME_NO_SOUND))
if (machine->gamedrv->flags & (GAME_WRONG_COLORS | GAME_IMPERFECT_COLORS | GAME_REQUIRES_ARTWORK | GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND | GAME_NO_SOUND))
messagebox_backcolor = UI_YELLOWCOLOR;
if (machine->gamedrv->flags & (GAME_NOT_WORKING | GAME_UNEMULATED_PROTECTION))
messagebox_backcolor = UI_REDCOLOR;
@ -883,6 +883,7 @@ static astring *warnings_string(running_machine *machine, astring *string)
GAME_UNEMULATED_PROTECTION | \
GAME_WRONG_COLORS | \
GAME_IMPERFECT_COLORS | \
GAME_REQUIRES_ARTWORK | \
GAME_NO_SOUND | \
GAME_IMPERFECT_SOUND | \
GAME_IMPERFECT_GRAPHICS | \
@ -925,6 +926,13 @@ static astring *warnings_string(running_machine *machine, astring *string)
astring_catc(string, "The game lacks sound.\n");
if (machine->gamedrv->flags & GAME_NO_COCKTAIL)
astring_catc(string, "Screen flipping in cocktail mode is not supported.\n");
/* check if external artwork is present before displaying this warning? */
if (machine->gamedrv->flags & GAME_REQUIRES_ARTWORK)
astring_catc(string, "The game requires external artwork files\n");
/* if there's a NOT WORKING or UNEMULATED PROTECTION warning, make it stronger */
if (machine->gamedrv->flags & (GAME_NOT_WORKING | GAME_UNEMULATED_PROTECTION))

File diff suppressed because it is too large Load Diff

46
src/mame/drivers/mpu5.c Normal file
View File

@ -0,0 +1,46 @@
/*
MPU5
Skeleton Driver
-- there are a wide range of titles running on this hardware, the recent ones are said to be encrypted
-- the driver does nothing, and currently only serves to act as a placeholder to document what existed on this hardware
-- the main CPU is a 68340, which is a 32-bit 680xx variant with modified opcodes etc.
-- should there be a bios using an 8-bit cpu like MPU4, or is the 68340 the only CPU?
*/
#include "driver.h"
#include "cpu/m68000/m68000.h"
static ADDRESS_MAP_START( mpu5_map, ADDRESS_SPACE_PROGRAM, 32 )
AM_RANGE(0x000000, 0x2fffff) AM_ROM
ADDRESS_MAP_END
static INPUT_PORTS_START( mpu5 )
INPUT_PORTS_END
static MACHINE_DRIVER_START( mpu5 )
MDRV_CPU_ADD("main", M68EC020, 16000000) // ?
MDRV_CPU_PROGRAM_MAP(mpu5_map,0)
/* no video? */
/* unknown sound */
MACHINE_DRIVER_END
ROM_START( m_honmon )
ROM_REGION( 0x300000, "main", 0 ) /* Code */
ROM_LOAD16_BYTE( "hmo_23s.p1", 0x000000, 0x80000, CRC(44bc1bd9) SHA1(8b72909c53b09b9287bf90bcd8970bdf9c1b8798) )
ROM_LOAD16_BYTE( "hmo_23l.p2", 0x000001, 0x80000, CRC(625a311b) SHA1(38fa0d240b253fcc8dc89438582a9c446410b636) )
ROM_LOAD16_BYTE( "hmo_23l.p3", 0x100000, 0x80000, CRC(44bc1bd9) SHA1(8b72909c53b09b9287bf90bcd8970bdf9c1b8798) )
ROM_LOAD16_BYTE( "hmo_23l.p4", 0x100001, 0x80000, CRC(625a311b) SHA1(38fa0d240b253fcc8dc89438582a9c446410b636) )
ROM_LOAD16_BYTE( "hmo_23l.p5", 0x200000, 0x80000, CRC(44bc1bd9) SHA1(8b72909c53b09b9287bf90bcd8970bdf9c1b8798) )
ROM_LOAD16_BYTE( "hmo_23l.p6", 0x200001, 0x80000, CRC(625a311b) SHA1(38fa0d240b253fcc8dc89438582a9c446410b636) )
ROM_END
GAME( 199?, m_honmon, 0, mpu5, mpu5, 0, ROT0, "Vivid", "Honey Money", GAME_NOT_WORKING|GAME_NO_SOUND|GAME_REQUIRES_ARTWORK )

1201
src/mame/layout/awpdmd.lay Normal file

File diff suppressed because it is too large Load Diff

1298
src/mame/layout/awpvid14.lay Normal file

File diff suppressed because it is too large Load Diff

1298
src/mame/layout/awpvid16.lay Normal file

File diff suppressed because it is too large Load Diff

2092
src/mame/layout/bfm_sc1.lay Normal file

File diff suppressed because it is too large Load Diff

2432
src/mame/layout/drwho.lay Normal file

File diff suppressed because it is too large Load Diff

2073
src/mame/layout/gamball.lay Normal file

File diff suppressed because it is too large Load Diff

View File

@ -554,12 +554,13 @@ $(MAMEOBJ)/atlus.a: \
$(MAMEOBJ)/barcrest.a: \
$(MACHINE)/meters.o \
$(DRIVERS)/mpu4.o \
$(DRIVERS)/mpu5.o \
$(MACHINE)/steppers.o \
$(MAMEOBJ)/bfm.a: \
$(DRIVERS)/bfcobra.o \
$(DRIVERS)/bfm_sc2.o $(VIDEO)/bfm_adr2.o \
$(MACHINE)/bfm_bd1.o \
$(MACHINE)/bfm_bd1.o $(VIDEO)/bfm_dm01.o $(VIDEO)/awpvid.o\
$(MAMEOBJ)/bmc.a: \
$(DRIVERS)/bmcbowl.o \
@ -1711,6 +1712,10 @@ $(DRIVERS)/brasil.o: $(LAYOUT)/fashion.lh
$(DRIVERS)/bzone.o: $(LAYOUT)/bzone.lh
$(DRIVERS)/bfm_sc2.o: $(LAYOUT)/bfm_sc2.lh \
$(LAYOUT)/awpdmd.lh \
$(LAYOUT)/awpvid14.lh \
$(LAYOUT)/awpvid16.lh \
$(LAYOUT)/drwho.lh \
$(LAYOUT)/gldncrwn.lh \
$(LAYOUT)/quintoon.lh \
$(LAYOUT)/paradice.lh \

View File

@ -8603,4 +8603,39 @@ Other Sun games
/* Sanki Denshi Kogyo */
DRIVER( pachifev ) /* (c) 1983? */
/* Drivers below are mechanical games, usually with no video display, requiring external artwork to function.
These are currently mostly 'fruit machine' style games, although this may later be extended to system logic
emulation for pinball machiens.
the m_ prefix is used to identify them as many have very generic names.
*/
/* Scorpion 2 */
DRIVER( m_bdrwho )
DRIVER( m_bdrwh1 )
DRIVER( m_bdrwh2 )
DRIVER( m_bdrwh3 )
DRIVER( m_bdrwh4 )
DRIVER( m_bdrwh5 )
DRIVER( m_bdrwh6 )
DRIVER( m_bdrwh7 )
DRIVER( m_bdrwh8 )
DRIVER( m_bdrwh9 )
DRIVER( m_bdrw10 )
DRIVER( m_bdrw11 )
DRIVER( m_bdrw12 )
DRIVER( m_bdrw13 )
DRIVER( m_bdrw14 )
DRIVER( m_bdrw15 )
DRIVER( m_bdrw16 )
DRIVER( m_bfocus )
DRIVER( m_bcgslm )
DRIVER( m_luvjub )
DRIVER( m_cpeno1 )
/* MPU5 */
DRIVER( m_honmon )
#endif /* DRIVER_RECURSIVE */

127
src/mame/video/awpvid.c Normal file
View File

@ -0,0 +1,127 @@
/*************************************************************************************
AWP Hardware video simulation system
A.G.E Code Copyright J. Wallace and the AGEMAME Development Team.
Visit http://www.mameworld.net/agemame/ for more information.
M.A.M.E Core Copyright Nicola Salmoria and the MAME Team,
used under license from http://mamedev.org
**************************************************************************************
NOTE: Fading lamp system currently only recognises three lamp states:
0=off, 1, 2= fully on
Based on evidence, newer techs may need more states, but we can give them their own
handlers at some stage in the distant future.
Instructions:
In order to set up displays (dot matrices, etc) we normally set up the unique
displays first, and then add the remainder in order.
The priorities (in descending order) are:
Full video screens
Dot matrix displays
Other, as yet unknown devices
**************************************************************************************/
#include "driver.h"
#include "awpvid.h"
#include "rendlay.h"
#include "machine/steppers.h"
//#include "awpvid14.lh"
//#include "awpvid16.lh"
static UINT8 steps[MAX_STEPPERS];
static UINT8 symbols[MAX_STEPPERS];
static UINT8 reelpos[MAX_STEPPERS];
void awp_reel_setup(void)
{
int x,reels;
char rstep[16],rsym[16];
if (!output_get_value("TotalReels"))
{
reels = 6 ;
}
else
{
reels = output_get_value("TotalReels");
}
for ( x = 0; x < reels; x++ )
{
sprintf(rstep, "ReelSteps%d",x+1);
sprintf(rsym, "ReelSymbols%d",x+1);
if (!output_get_value(rstep))
{
steps[x] = 6 ;
}
else
{
steps[x] = output_get_value(rstep);
}
if (!output_get_value(rsym))
{
symbols[x] = 1 ;
}
else
{
symbols[x] = output_get_value(rsym);
}
}
}
void awp_draw_reel(int rno)
{
int rsteps = steps[rno];
int rsymbols = symbols[rno];
int m;
int x = rno + 1;
char rg[16], rga[16], rgb[16];
sprintf(rg,"reel%d", x);
reelpos[rno] = stepper_get_position(rno);
if (reelpos[rno] == output_get_value(rg))
{
// Not moved, no need to update.
}
else
{
reelpos[rno] = stepper_get_position(rno)%(stepper_get_max(rno)-1);
for ( m = 0; m < (rsymbols-1); m++ )
{
{
sprintf(rga,"reel%da%d", x, m);
output_set_value(rga,(reelpos[rno] + rsteps * m)%stepper_get_max(rno));
}
{
if ((reelpos[rno] - rsteps * m) < 0)
{
sprintf(rgb,"reel%db%d", x, m);
output_set_value(rgb,(reelpos[rno] - (rsteps * m - stepper_get_max(rno))));
}
else
{
sprintf(rgb,"reel%db%d", x, m);
output_set_value(rgb,(reelpos[rno] - rsteps * m));
}
}
}
output_set_value(rg,(reelpos[rno]));
}
}

15
src/mame/video/awpvid.h Normal file
View File

@ -0,0 +1,15 @@
/*************************************************************************************
AWP Hardware video simulation system
*************************************************************************************/
#ifndef AWP_VIDEO
#define AWP_VIDEO
extern const char layout_awpvid14[]; /* main layout positioning 6 reels, a lamp matrix and a 14seg VFD */
extern const char layout_awpvid16[]; /* main layout positioning 6 reels, a lamp matrix and a 16seg VFD */
extern void awp_draw_reel(int rno);
extern void awp_reel_setup(void);
#endif

283
src/mame/video/bfm_dm01.c Normal file
View File

@ -0,0 +1,283 @@
/***************************************************************************
Bellfruit dotmatrix driver, (under heavy construction !!!)
19-08-2005: Re-Animator
25-08-2005: Fixed feedback through sc2 input line
A.G.E Code Copyright J. Wallace and the AGEMAME Development Team.
Visit http://www.mameworld.net/agemame/ for more information.
M.A.M.E Core Copyright Nicola Salmoria and the MAME Team,
used under license from http://mamedev.org
Standard dm01 memorymap
hex |r/w| D D D D D D D D |
location | | 7 6 5 4 3 2 1 0 | function
-----------+---+-----------------+-----------------------------------------
0000-1FFF |R/W| D D D D D D D D | RAM (8k)
-----------+---+-----------------+-----------------------------------------
2000 |R/W| D D D D D D D D | control register
-----------+---+-----------------+-----------------------------------------
2800 |R/W| D D D D D D D D | mux
-----------+---+-----------------+-----------------------------------------
3000 |R/W| D D D D D D D D | communication with mainboard
-----------+---+-----------------+-----------------------------------------
3800 |R/W| D D D D D D D D | ???
-----------+---+-----------------+-----------------------------------------
4000-FFFF | W | D D D D D D D D | ROM (48k)
-----------+---+-----------------+-----------------------------------------
TODO: - find out clockspeed of CPU
Layout notes: the dot matrix is set to screen 0.
Multiple matrices and matrix/VFD combos are not yet supported.
***************************************************************************/
#include "driver.h"
#include "cpu/m6809/m6809.h"
#include "video/awpvid.h"
#include "bfm_dm01.h"
// local prototypes ///////////////////////////////////////////////////////
extern void Scorpion2_DMSetSwitchState(int strobe, int data, int state);
extern int Scorpion2_DMGetSwitchState(int strobe, int data);
// local vars /////////////////////////////////////////////////////////////
#define DM_BYTESPERROW 9
#define DM_MAXLINES 21
#define FEEDBACK_STROBE 4
#define FEEDBACK_DATA 4
static int control;
static int xcounter;
static int busy;
static int data_avail;
static UINT8 scanline[DM_BYTESPERROW];
static UINT8 comdata;
//static int read_index;
//static int write_index;
static bitmap_t *dm_bitmap;
#ifdef MAME_DEBUG
#define VERBOSE 1
#else
#define VERBOSE 0
#endif
#define LOG(x) do { if (VERBOSE) logerror x; } while (0)
///////////////////////////////////////////////////////////////////////////
static int read_data(void)
{
int data = comdata;
data_avail = 0;
return data;
}
///////////////////////////////////////////////////////////////////////////
static READ8_HANDLER( control_r )
{
return 0;
}
///////////////////////////////////////////////////////////////////////////
static WRITE8_HANDLER( control_w )
{
int changed = control ^ data;
control = data;
if ( changed & 2 )
{ // reset horizontal counter
if ( !(data & 2) )
{
//int offset = 0;
xcounter = 0;
}
}
if ( changed & 8 )
{ // bit 3 changed = BUSY line
if ( data & 8 ) busy = 0;
else busy = 1;
Scorpion2_DMSetSwitchState(FEEDBACK_STROBE,FEEDBACK_DATA, busy?0:1);
}
}
///////////////////////////////////////////////////////////////////////////
static READ8_HANDLER( mux_r )
{
return 0;
}
///////////////////////////////////////////////////////////////////////////
static WRITE8_HANDLER( mux_w )
{
int x = xcounter;
if ( x < DM_BYTESPERROW )
{
scanline[xcounter++] = data;
}
if ( x == 8 )
{
int off = ((0xFF^data) & 0x7C) >> 2; // 7C = 000001111100
scanline[x] &= 0x80;
if ( (off >= 0) && (off < DM_MAXLINES) )
{
int p;
x = 0;
p = 0;
while ( p < DM_BYTESPERROW )
{
UINT8 d = scanline[p++];
LOG(("%d",d));
*BITMAP_ADDR16(dm_bitmap, off, x++) = (d & 0x80) ? 0 : 1;
*BITMAP_ADDR16(dm_bitmap, off, x++) = (d & 0x40) ? 0 : 1;
*BITMAP_ADDR16(dm_bitmap, off, x++) = (d & 0x20) ? 0 : 1;
*BITMAP_ADDR16(dm_bitmap, off, x++) = (d & 0x10) ? 0 : 1;
*BITMAP_ADDR16(dm_bitmap, off, x++) = (d & 0x08) ? 0 : 1;
*BITMAP_ADDR16(dm_bitmap, off, x++) = (d & 0x04) ? 0 : 1;
*BITMAP_ADDR16(dm_bitmap, off, x++) = (d & 0x02) ? 0 : 1;
*BITMAP_ADDR16(dm_bitmap, off, x++) = (d & 0x01) ? 0 : 1;
}
}
}
}
///////////////////////////////////////////////////////////////////////////
static READ8_HANDLER( comm_r )
{
int result = 0;
if ( data_avail )
{
result = read_data();
#ifdef UNUSED_FUNCTION
if ( data_avail() )
{
cpu_set_irq_line(1, M6809_IRQ_LINE, ASSERT_LINE ); // trigger IRQ
}
#endif
}
return result;
}
///////////////////////////////////////////////////////////////////////////
static WRITE8_HANDLER( comm_w )
{
}
///////////////////////////////////////////////////////////////////////////
static READ8_HANDLER( unknown_r )
{
return 0;
}
///////////////////////////////////////////////////////////////////////////
static WRITE8_HANDLER( unknown_w )
{
cpu_set_input_line(space->machine->cpu[1], INPUT_LINE_NMI, CLEAR_LINE ); //?
}
///////////////////////////////////////////////////////////////////////////
ADDRESS_MAP_START( bfm_dm01_memmap, ADDRESS_SPACE_PROGRAM, 8 )
AM_RANGE(0x0000, 0x1fff) AM_RAM // 8k RAM
AM_RANGE(0x2000, 0x2000) AM_READWRITE(control_r, control_w) // control reg
AM_RANGE(0x2800, 0x2800) AM_READWRITE(mux_r,mux_w) // mux
AM_RANGE(0x3000, 0x3000) AM_READWRITE(comm_r,comm_w) //
AM_RANGE(0x3800, 0x3800) AM_READWRITE(unknown_r,unknown_w) // ???
AM_RANGE(0x4000, 0xFfff) AM_ROM // 48k ROM
ADDRESS_MAP_END
///////////////////////////////////////////////////////////////////////////
void BFM_dm01_writedata(running_machine *machine, UINT8 data)
{
comdata = data;
data_avail = 1;
//pulse IRQ line
cpu_set_input_line(machine->cpu[1], M6809_IRQ_LINE, HOLD_LINE ); // trigger IRQ
}
///////////////////////////////////////////////////////////////////////////
INTERRUPT_GEN( bfm_dm01_vbl )
{
cpu_set_input_line(device, INPUT_LINE_NMI, ASSERT_LINE );
}
///////////////////////////////////////////////////////////////////////////
VIDEO_START( bfm_dm01 )
{
dm_bitmap = auto_bitmap_alloc(DM_BYTESPERROW*8, DM_MAXLINES,video_screen_get_format(machine->primary_screen));
}
///////////////////////////////////////////////////////////////////////////
// Note that we assume square pixels, which isn't strictly true (the elements are round).
VIDEO_UPDATE( bfm_dm01 )
{
const rectangle *visarea = video_screen_get_visible_area(screen);
copybitmap(bitmap, dm_bitmap, 0,0,0,0, visarea);
LOG(("Busy=%X",data_avail));
LOG(("%X",Scorpion2_DMGetSwitchState(FEEDBACK_STROBE,FEEDBACK_DATA)));
return 0;
}
int BFM_dm01_busy(void)
{
return data_avail;
}
void BFM_dm01_reset(void)
{
busy = 0;
control = 0;
xcounter = 0;
data_avail = 0;
Scorpion2_DMSetSwitchState(FEEDBACK_STROBE,FEEDBACK_DATA, busy?0:1);
}
PALETTE_INIT( bfm_dm01 )
{
palette_set_color(machine, 0, MAKE_RGB(0xFF,0x00,0x00));
palette_set_color(machine, 1, MAKE_RGB(0x40,0x00,0x00));
}

23
src/mame/video/bfm_dm01.h Normal file
View File

@ -0,0 +1,23 @@
/************************************************************************************
Bellfruit dotmatrix driver, (under heavy construction !!!)
*************************************************************************************/
#ifndef BFM_DM01
#define BFM_DM01
ADDRESS_MAP_EXTERN( bfm_dm01_memmap,8 );
INTERRUPT_GEN( bfm_dm01_vbl );
VIDEO_START( bfm_dm01 );
VIDEO_UPDATE( bfm_dm01 );
PALETTE_INIT( bfm_dm01 );
void BFM_dm01_reset(void);
void BFM_dm01_writedata(running_machine *machine,UINT8 data);
int BFM_dm01_busy(void);
#endif