summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author Angelo Salese <angelosa@users.noreply.github.com>2009-06-21 20:23:59 +0000
committer Angelo Salese <angelosa@users.noreply.github.com>2009-06-21 20:23:59 +0000
commitbf75260ae4d23cd4a2935fa0aa73e66f9f50256c (patch)
treee7bcfc343f66d7da0043e881f0a146ad3970e70e
parent341cb728cd7e74b30c4f17aec17fe38d15ce0e61 (diff)
Would help if I c+p the hitpoker file actually...
-rw-r--r--src/mame/drivers/hitpoker.c117
1 files changed, 78 insertions, 39 deletions
diff --git a/src/mame/drivers/hitpoker.c b/src/mame/drivers/hitpoker.c
index 19192edfeec..f620b412d8f 100644
--- a/src/mame/drivers/hitpoker.c
+++ b/src/mame/drivers/hitpoker.c
@@ -82,30 +82,17 @@ VIDEO_UPDATE(hitpoker)
bitmap_fill(bitmap, cliprect, 0);
- for (x=0;x<42;x++)
+ for (y=0;y<30;y++)
{
- for (y=0;y<42;y+=2)
+ count+=2;
+ for (x=1;x<81;x++) //it's probably 80 + 1 global line attribute at the start of each line
{
int tile;
-// if(videoram[count+1] & 0x80)
-// {
- tile = ((videoram[count]<<8)|(videoram[count+1])) & 0x1fff;
- drawgfx(bitmap,gfx,tile,1,0,0,x*16,(y+0)*8,cliprect,TRANSPARENCY_NONE,0);
+ tile = (((videoram[count]<<8)|(videoram[count+1])) & 0x1fff);
+ drawgfx(bitmap,gfx,tile,1,0,0,(x-1)*8,(y+0)*8,cliprect,TRANSPARENCY_NONE,0);
- tile = ((videoram[count+2]<<8)|(videoram[count+3])) & 0x1fff;
- drawgfx(bitmap,gfx,tile,1,0,0,x*16,(y+1)*8,cliprect,TRANSPARENCY_NONE,0);
-// }
-// else
-// {
-// tile = ((videoram[count]<<8)|(videoram[count+1])) & 0x1fff;
-// drawgfx(bitmap,gfx,tile^0x80,1,0,0,x*16,(y+0)*8,cliprect,TRANSPARENCY_NONE,0);
-
-// tile = ((videoram[count+2]<<8)|(videoram[count+3])) & 0x1fff;
-// drawgfx(bitmap,gfx,tile^0x80,1,0,0,x*16,(y+1)*8,cliprect,TRANSPARENCY_NONE,0);
-// }
-
- count+=4;
+ count+=2;
}
}
@@ -115,18 +102,12 @@ VIDEO_UPDATE(hitpoker)
/* It wants that the even/odd memory is equal for this, 8-bit vram on a 16-bit wide bus? */
static READ8_HANDLER( hitpoker_work_ram_r )
{
- if(hitpoker_sys_regs[0x00] & 0x10)
- return work_ram[offset];
- else
- return work_ram[offset & ~1];
+ return work_ram[offset & ~1];
}
static WRITE8_HANDLER( hitpoker_work_ram_w )
{
- if(hitpoker_sys_regs[0x00] & 0x10)
- work_ram[offset] = data;
- else
- work_ram[offset & ~1] = data;
+ work_ram[offset & ~1] = data;
}
static READ8_HANDLER( hitpoker_vram_r )
@@ -172,37 +153,63 @@ static WRITE8_HANDLER( hitpoker_cram_w )
palette_set_color_rgb(space->machine, offset, pal6bit(r), pal5bit(g), pal5bit(b));
}
+static WRITE8_HANDLER( hitpoker_crtc_w )
+{
+ static UINT8 address;
+
+ if(offset == 0)
+ address = data;
+ else
+ {
+ switch(address)
+ {
+ default:
+ logerror("Video Register %02x called with %02x data\n",address,data);
+ }
+ }
+}
+
+static READ8_HANDLER( rtc_r )
+{
+ return 0x80; //kludge it for now
+}
+
/* overlap empty rom addresses */
static ADDRESS_MAP_START( main_map, ADDRESS_SPACE_PROGRAM, 8 )
AM_RANGE(0x0000, 0x00ff) AM_RAM // stack ram
AM_RANGE(0x1000, 0x103f) AM_RAM AM_BASE(&hitpoker_sys_regs) // hw regs?
AM_RANGE(0x8000, 0xb5ff) AM_READWRITE(hitpoker_vram_r,hitpoker_vram_w)
- AM_RANGE(0xb600, 0xbeff) AM_READWRITE(hitpoker_work_ram_r,hitpoker_work_ram_w) AM_BASE(&work_ram) //actually nvram
+ AM_RANGE(0xb600, 0xbdff) AM_RAM
+ AM_RANGE(0xbe0d, 0xbe0d) AM_READ(rtc_r)
+ AM_RANGE(0xbe80, 0xbe81) AM_WRITE(hitpoker_crtc_w)
+ AM_RANGE(0xbe90, 0xbe91) AM_READWRITE(hitpoker_work_ram_r,hitpoker_work_ram_w) AM_BASE(&work_ram) //???
+ AM_RANGE(0xbea0, 0xbea0) AM_READ_PORT("VBLANK") //probably other bits as well
AM_RANGE(0xc000, 0xefff) AM_READWRITE(hitpoker_cram_r,hitpoker_cram_w)
- AM_RANGE(0x0000, 0xffff) AM_ROM
+ AM_RANGE(0x0000, 0xbdff) AM_ROM
+ AM_RANGE(0xbf00, 0xffff) AM_ROM
ADDRESS_MAP_END
static ADDRESS_MAP_START( main_io, ADDRESS_SPACE_IO, 8 )
ADDRESS_MAP_END
static INPUT_PORTS_START( hitpoker )
+ PORT_START("VBLANK")
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_VBLANK )
INPUT_PORTS_END
static const gfx_layout hitpoker_layout =
{
- 16,8,
+ 8,8,
RGN_FRAC(1,2),
8,
{ RGN_FRAC(1,2)+0,RGN_FRAC(1,2)+4,RGN_FRAC(1,2)+8,RGN_FRAC(1,2)+12,0,4,8,12 },
{ 0,1,2,3,
- 16,17,18,19,
- 8*32+0,8*32+1,8*32+2,8*32+3,
- 8*32+16,8*32+17,8*32+18,8*32+19 },
+ 16,17,18,19 },
{ 0*32, 1*32, 2*32, 3*32,4*32,5*32,6*32,7*32 },
- 8*64
+ 8*32
};
static GFXDECODE_START( hitpoker )
@@ -218,10 +225,10 @@ static MACHINE_DRIVER_START( hitpoker )
/* video hardware */
MDRV_SCREEN_ADD("screen", RASTER)
MDRV_SCREEN_REFRESH_RATE(60)
- MDRV_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
+ MDRV_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) // not accurate
MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16)
- MDRV_SCREEN_SIZE(1024, 512)
- MDRV_SCREEN_VISIBLE_AREA(0, 1024-1, 0, 512-1)
+ MDRV_SCREEN_SIZE(640, 480)
+ MDRV_SCREEN_VISIBLE_AREA(0, 640-1, 0, 224-1)
MDRV_GFXDECODE(hitpoker)
MDRV_PALETTE_LENGTH(0x3000)
@@ -230,6 +237,39 @@ static MACHINE_DRIVER_START( hitpoker )
MDRV_VIDEO_UPDATE(hitpoker)
MACHINE_DRIVER_END
+DRIVER_INIT(hitpoker)
+{
+ UINT8 *ROM = memory_region(machine, "maincpu");
+
+ ROM[0x10c6] = 0x01;
+ ROM[0x10c7] = 0x01; //patch the checksum routine for now...
+
+ #if 0
+ ROM[0x1128] = 0x01;
+ ROM[0x1129] = 0x01;
+ ROM[0x112a] = 0x01;
+
+ ROM[0x1143] = 0x01;
+ ROM[0x1144] = 0x01;
+ ROM[0x1145] = 0x01;
+
+ ROM[0x1152] = 0x01;
+ ROM[0x1153] = 0x01;
+ ROM[0x1154] = 0x01;
+
+ ROM[0x115e] = 0x01;
+ ROM[0x115f] = 0x01;
+ ROM[0x1160] = 0x01;
+
+ ROM[0x1167] = 0x01;
+ ROM[0x1168] = 0x01;
+ ROM[0x1169] = 0x01;
+
+ ROM[0x1170] = 0x01;
+ ROM[0x1171] = 0x01;
+ ROM[0x1172] = 0x01;
+ #endif
+}
ROM_START( hitpoker )
ROM_REGION( 0x10000, "maincpu", 0 )
@@ -240,8 +280,7 @@ ROM_START( hitpoker )
ROM_LOAD16_BYTE( "u43.bin", 0x00000, 0x40000, CRC(6c0d4283) SHA1(04a4fd82f5cc0ed9f548e490ac67d287227073c3) )
ROM_LOAD16_BYTE( "u44.bin", 0x80001, 0x40000, CRC(e23d5f30) SHA1(ca8855301528aa4eeff40cb820943b4268f8596e) ) // the 'adult images' are 8bpp
ROM_LOAD16_BYTE( "u45.bin", 0x80000, 0x40000, CRC(e65b3e52) SHA1(c0c1a360a4a1823bf71c0a4105ff41f4102862e8) ) // the first part of these 2 is almost empty as the standard gfx are 4bpp
-// ROM_FILL( 0x93200, 0x010000, 0x00 )
ROM_END
-GAME( 1997, hitpoker, 0, hitpoker, hitpoker, 0, ROT0, "Accept Ltd.", "Hit Poker (Bulgaria)", GAME_NOT_WORKING|GAME_NO_SOUND )
+GAME( 1997, hitpoker, 0, hitpoker, hitpoker, hitpoker, ROT0, "Accept Ltd.", "Hit Poker (Bulgaria)", GAME_NOT_WORKING|GAME_NO_SOUND )