roul: added a preliminary blitter (wrong)

This commit is contained in:
Roberto Zandona 2009-04-15 14:59:46 +00:00
parent 6c3cc9f813
commit 0e65c50fc3

View File

@ -30,45 +30,51 @@ ROM text showed SUPER LUCKY ROULETTE LEISURE ENT
#include "cpu/z80/z80.h"
#include "sound/ay8910.h"
#define VIDEOBUF_SIZE 256*256
UINT8 reg[0x10];
UINT8 *videobuf;
static READ8_HANDLER( testf5_r )
{
//logerror("Read unknown port $f5 at %04x\n",cpu_get_pc(space->cpu));
return mame_rand(space->machine) & 0x00ff;
return 0xc0;
logerror("Read unknown port $f5 at %04x\n",cpu_get_pc(space->cpu));
return mame_rand(space->machine) & 0x00ff;
}
static READ8_HANDLER( testf8_r )
{
//logerror("Read unknown port $f8 at %04x\n",cpu_get_pc(space->cpu));
return mame_rand(space->machine) & 0x00ff;
return 0xc0;
logerror("Read unknown port $f8 at %04x\n",cpu_get_pc(space->cpu));
return mame_rand(space->machine) & 0x00ff;
}
static READ8_HANDLER( testfa_r )
{
//logerror("Read unknown port $fa at %04x\n",cpu_get_pc(space->cpu));
return mame_rand(space->machine) & 0x00ff;
return 0xc0;
logerror("Read unknown port $fa at %04x\n",cpu_get_pc(space->cpu));
return mame_rand(space->machine) & 0x00ff;
}
static READ8_HANDLER( testfd_r )
{
//logerror("Read unknown port $fd at %04x\n",cpu_get_pc(space->cpu));
return mame_rand(space->machine) & 0x00ff;
return 0xc0;
logerror("Read unknown port $fd at %04x\n",cpu_get_pc(space->cpu));
return mame_rand(space->machine) & 0x00ff;
}
static WRITE8_HANDLER( testfx_w )
{
// logerror("Write [%02x] -> %02x\n",offset,data);
if (offset==2)
videobuf[reg[0]*256+reg[1]] = 1;
else
reg[offset] = data;
logerror("Write [%02x] -> %02x\n",offset,data);
}
/*
static READ8_HANDLER( test_r )
{
logerror("Read unknown port $f5 at %04x\n",cpu_get_pc(space->cpu));
return mame_rand(space->machine) & 0x00ff;
return 0xc0;
logerror("Read unknown port $f5 at %04x\n",cpu_get_pc(space->cpu));
return mame_rand(space->machine) & 0x00ff;
}
*/
static ADDRESS_MAP_START( roul_map, ADDRESS_SPACE_PROGRAM, 8 )
AM_RANGE(0x0000, 0x7fff) AM_ROM
@ -91,17 +97,22 @@ ADDRESS_MAP_END
static ADDRESS_MAP_START( sound_cpu_io_map, ADDRESS_SPACE_IO, 8 )
ADDRESS_MAP_GLOBAL_MASK(0xff)
AM_RANGE(0x00, 0x00) AM_READ(test_r) // AM_READ(soundlatch_r)
AM_RANGE(0x00, 0x00) AM_READ(soundlatch_r)
AM_RANGE(0x00, 0x01) AM_DEVWRITE("ay", ay8910_address_data_w)
ADDRESS_MAP_END
static VIDEO_START(roul)
{
videobuf = auto_malloc(VIDEOBUF_SIZE * sizeof(*videobuf));
memset(videobuf, 0, VIDEOBUF_SIZE * sizeof(*videobuf));
}
static VIDEO_UPDATE(roul)
{
int i,j;
for (i=0; i<256; i++)
for (j=0; j<256; j++)
*BITMAP_ADDR16(bitmap, i, j ) = videobuf[j*256+i];
return 0;
}