summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author Roberto Zandona <robertoz@mamedev.org>2009-04-15 14:59:46 +0000
committer Roberto Zandona <robertoz@mamedev.org>2009-04-15 14:59:46 +0000
commit0e65c50fc39a2dbe1857f0d2f15d14b621da3280 (patch)
treeaec654cc9ab962f1203da2b99fb8662fb564232e
parent6c3cc9f813cfac94e512c90bfa7fa6bdaa5b0b6d (diff)
roul: added a preliminary blitter (wrong)
-rw-r--r--src/mame/drivers/roul.c47
1 files changed, 29 insertions, 18 deletions
diff --git a/src/mame/drivers/roul.c b/src/mame/drivers/roul.c
index da26fe7f1e2..b5c1a881d38 100644
--- a/src/mame/drivers/roul.c
+++ b/src/mame/drivers/roul.c
@@ -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;
}