diff options
Diffstat (limited to 'src/mame/drivers/halleys.c')
-rw-r--r-- | src/mame/drivers/halleys.c | 120 |
1 files changed, 60 insertions, 60 deletions
diff --git a/src/mame/drivers/halleys.c b/src/mame/drivers/halleys.c index f3fd3f94480..4dbd06297b1 100644 --- a/src/mame/drivers/halleys.c +++ b/src/mame/drivers/halleys.c @@ -779,21 +779,21 @@ COMMAND_MODE: if (command == STARPASS1 && flags & COLOR_ON) { /* - Each star map is generated by two data sets pointed by the second source - address. The first 256-byte set has scattered bits to reflect the star - population while the second 256-byte set appears to have random values. - When the game runs the the star fields are updated a small portion at a - time by a third data set containing gradient patterns which may indicate - gray shades or alpha levels. - - Halley's Comet draws and clears the two star fields as if they are - independent from the backgrounds, making it a total of four scrollable - layers. However, only two pairs of scroll registers are in use and they - affect the stars and the backgrounds together - possibly afterthoughts - on the original Ben Bero Beh hardware. - - This algorithm is based on speculation and deemed inaccurate. - */ + Each star map is generated by two data sets pointed by the second source + address. The first 256-byte set has scattered bits to reflect the star + population while the second 256-byte set appears to have random values. + When the game runs the the star fields are updated a small portion at a + time by a third data set containing gradient patterns which may indicate + gray shades or alpha levels. + + Halley's Comet draws and clears the two star fields as if they are + independent from the backgrounds, making it a total of four scrollable + layers. However, only two pairs of scroll registers are in use and they + affect the stars and the backgrounds together - possibly afterthoughts + on the original Ben Bero Beh hardware. + + This algorithm is based on speculation and deemed inaccurate. + */ #define RORB(R,N) ( ((R>>N)|(R<<(8-N))) & 0xff ) #define C2S(X,Y,O) ( (((Y+(O>>4))&YMASK)<<SCREEN_WIDTH_L2) + ((X+(O&0xf))&XMASK) ) @@ -861,21 +861,21 @@ COMMAND_MODE: if (command == TILEPASS1 && flags & COLOR_ON) { /* - Tile positioning in this mode is very cryptic and different from - others. The coordinate system seems banked and influenced by layer - number and whether the blit code is written to the upper or lower - off-screen area. These conditions may also imply height-doubling, - Y-flipping and draw-from-bottom attributes. - - Pixel and color information is embedded but the game draws a - second pass at the same location with zeroes. In addition the - X and Y values passed to the blitter do not reflect the tiles true - locations. For example, tiles near the top or bottom of the screen - are positioned resonably close but those in the middle are oddly - shifted toward either side. The tiles also resemble predefined - patterns but I don't know if there are supposed to be lookup tables - in ROM or hard-wired to the blitter chips. - */ + Tile positioning in this mode is very cryptic and different from + others. The coordinate system seems banked and influenced by layer + number and whether the blit code is written to the upper or lower + off-screen area. These conditions may also imply height-doubling, + Y-flipping and draw-from-bottom attributes. + + Pixel and color information is embedded but the game draws a + second pass at the same location with zeroes. In addition the + X and Y values passed to the blitter do not reflect the tiles true + locations. For example, tiles near the top or bottom of the screen + are positioned resonably close but those in the middle are oddly + shifted toward either side. The tiles also resemble predefined + patterns but I don't know if there are supposed to be lookup tables + in ROM or hard-wired to the blitter chips. + */ if (y & 1) x -= 8; y = tyremap[y] << 3; @@ -1655,24 +1655,24 @@ READ8_MEMBER(halleys_state::io_mirror_r) static ADDRESS_MAP_START( halleys_map, AS_PROGRAM, 8, halleys_state ) AM_RANGE(0x0000, 0x0fff) AM_READWRITE(blitter_r, blitter_w) AM_SHARE("blitter_ram") - AM_RANGE(0x1f00, 0x1fff) AM_WRITE(bgtile_w) // background tiles?(Ben Bero Beh only) + AM_RANGE(0x1f00, 0x1fff) AM_WRITE(bgtile_w) // background tiles?(Ben Bero Beh only) AM_RANGE(0x1000, 0xefff) AM_ROM - AM_RANGE(0xf000, 0xfeff) AM_RAM // work ram + AM_RANGE(0xf000, 0xfeff) AM_RAM // work ram AM_RANGE(0xff66, 0xff66) AM_READ(collision_id_r) // HACK: collision detection bypass(Halley's Comet only) AM_RANGE(0xff71, 0xff71) AM_READ(blitter_status_r) AM_RANGE(0xff80, 0xff83) AM_READ(io_mirror_r) AM_RANGE(0xff8a, 0xff8a) AM_WRITE(soundcommand_w) - AM_RANGE(0xff90, 0xff90) AM_READ_PORT("IN0") // coin/start - AM_RANGE(0xff91, 0xff91) AM_READ_PORT("IN1") // player 1 - AM_RANGE(0xff92, 0xff92) AM_READ_PORT("IN2") // player 2 - AM_RANGE(0xff93, 0xff93) AM_READ_PORT("IN3") // unused? + AM_RANGE(0xff90, 0xff90) AM_READ_PORT("IN0") // coin/start + AM_RANGE(0xff91, 0xff91) AM_READ_PORT("IN1") // player 1 + AM_RANGE(0xff92, 0xff92) AM_READ_PORT("IN2") // player 2 + AM_RANGE(0xff93, 0xff93) AM_READ_PORT("IN3") // unused? AM_RANGE(0xff94, 0xff94) AM_READ(coin_lockout_r) - AM_RANGE(0xff95, 0xff95) AM_READ_PORT("DSW1") // dipswitch 4 - AM_RANGE(0xff96, 0xff96) AM_READ_PORT("DSW2") // dipswitch 3 - AM_RANGE(0xff97, 0xff97) AM_READ_PORT("DSW3") // dipswitch 2 + AM_RANGE(0xff95, 0xff95) AM_READ_PORT("DSW1") // dipswitch 4 + AM_RANGE(0xff96, 0xff96) AM_READ_PORT("DSW2") // dipswitch 3 + AM_RANGE(0xff97, 0xff97) AM_READ_PORT("DSW3") // dipswitch 2 AM_RANGE(0xff9c, 0xff9c) AM_WRITE(firq_ack_w) - AM_RANGE(0xff00, 0xffbf) AM_RAM AM_SHARE("io_ram") // I/O write fall-through + AM_RANGE(0xff00, 0xffbf) AM_RAM AM_SHARE("io_ram") // I/O write fall-through AM_RANGE(0xffc0, 0xffdf) AM_RAM_WRITE(halleys_paletteram_IIRRGGBB_w) AM_SHARE("paletteram") AM_RANGE(0xffe0, 0xffff) AM_READ(vector_r) @@ -1697,7 +1697,7 @@ ADDRESS_MAP_END // Port Maps static INPUT_PORTS_START( benberob ) - PORT_START("DSW1") /* 0xff95 */ + PORT_START("DSW1") /* 0xff95 */ PORT_DIPNAME( 0x03, 0x03, DEF_STR( Bonus_Life ) ) /* code at 0xb00e */ PORT_DIPSETTING( 0x02, "Every 100k" ) PORT_DIPSETTING( 0x03, "100k 300k 200k+" ) @@ -1719,7 +1719,7 @@ static INPUT_PORTS_START( benberob ) PORT_DIPSETTING( 0x80, DEF_STR( Upright ) ) PORT_DIPSETTING( 0x00, DEF_STR( Cocktail ) ) - PORT_START("DSW2") /* 0xff96 */ + PORT_START("DSW2") /* 0xff96 */ PORT_DIPNAME( 0x0f, 0x00, DEF_STR( Coin_A ) ) PORT_DIPSETTING( 0x0f, DEF_STR( 9C_1C ) ) PORT_DIPSETTING( 0x0e, DEF_STR( 8C_1C ) ) @@ -1755,7 +1755,7 @@ static INPUT_PORTS_START( benberob ) PORT_DIPSETTING( 0x60, DEF_STR( 1C_7C ) ) PORT_DIPSETTING( 0x70, DEF_STR( 1C_8C ) ) - PORT_START("DSW3") /* 0xff97 */ + PORT_START("DSW3") /* 0xff97 */ PORT_DIPNAME( 0x01, 0x01, DEF_STR( Difficulty ) ) PORT_DIPSETTING( 0x01, DEF_STR( Easy ) ) PORT_DIPSETTING( 0x00, DEF_STR( Hard ) ) @@ -1780,7 +1780,7 @@ static INPUT_PORTS_START( benberob ) PORT_DIPSETTING( 0x80, "9" ) PORT_DIPSETTING( 0x00, "16" ) - PORT_START("DSW4") /* 0xff94 - read by coin_lockout_r */ + PORT_START("DSW4") /* 0xff94 - read by coin_lockout_r */ PORT_DIPUNUSED( 0x01, IP_ACTIVE_LOW ) PORT_DIPUNUSED( 0x02, IP_ACTIVE_LOW ) PORT_DIPUNUSED( 0x04, IP_ACTIVE_LOW ) @@ -1792,7 +1792,7 @@ static INPUT_PORTS_START( benberob ) PORT_DIPUNUSED( 0x40, IP_ACTIVE_LOW ) PORT_DIPUNUSED( 0x80, IP_ACTIVE_LOW ) - PORT_START("IN0") /* 0xff90 */ + PORT_START("IN0") /* 0xff90 */ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNKNOWN ) PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNKNOWN ) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_START1 ) @@ -1802,7 +1802,7 @@ static INPUT_PORTS_START( benberob ) PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_COIN2 ) PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_COIN1 ) - PORT_START("IN1") /* 0xff91 */ + PORT_START("IN1") /* 0xff91 */ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY @@ -1812,7 +1812,7 @@ static INPUT_PORTS_START( benberob ) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON1 ) - PORT_START("IN2") /* 0xff92 */ + PORT_START("IN2") /* 0xff92 */ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_COCKTAIL PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_COCKTAIL PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_COCKTAIL @@ -1822,16 +1822,16 @@ static INPUT_PORTS_START( benberob ) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_COCKTAIL PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL - PORT_START("IN3") /* 0xff93 */ + PORT_START("IN3") /* 0xff93 */ INPUT_PORTS_END static INPUT_PORTS_START( halleys ) - PORT_START("DSW1") /* 0xff95 */ + PORT_START("DSW1") /* 0xff95 */ TAITO_MACHINE_COCKTAIL_LOC(SW4) TAITO_COINAGE_JAPAN_OLD_LOC(SW4) - PORT_START("DSW2") /* 0xff96 */ + PORT_START("DSW2") /* 0xff96 */ TAITO_DIFFICULTY_LOC(SW3) PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION("SW3:3,4") /* index of tables at 0x1a2f or 0x19b5 */ PORT_DIPSETTING( 0x00, "100k 600k 500k+" ) /* last bonus life at 5600k : max. 12 bonus lives */ @@ -1849,8 +1849,8 @@ static INPUT_PORTS_START( halleys ) PORT_DIPUNUSED_DIPLOC( 0x80, IP_ACTIVE_LOW, "SW3:8" ) /* From US manual : "DIP SW 2 is not used and all contacts should be set off." - However, they enable debug features if you press START1 during the boot sequence. */ - PORT_START("DSW3") /* 0xff97 */ + However, they enable debug features if you press START1 during the boot sequence. */ + PORT_START("DSW3") /* 0xff97 */ PORT_DIPUNUSED_DIPLOC( 0x01, IP_ACTIVE_LOW, "SW2:1" ) PORT_DIPNAME( 0x02, 0x02, DEF_STR( Free_Play ) ) PORT_DIPLOCATION("SW2:2") PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) @@ -1873,8 +1873,8 @@ static INPUT_PORTS_START( halleys ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) /* From US manual : "Coin mechs system can be optioned by setting DIP SW 1. - Position 6 on for single coin selector. Position 6 off for twin coin selector." */ - PORT_START("DSW4") /* 0xff94 - read by coin_lockout_r */ + Position 6 on for single coin selector. Position 6 off for twin coin selector." */ + PORT_START("DSW4") /* 0xff94 - read by coin_lockout_r */ PORT_DIPUNUSED_DIPLOC( 0x01, IP_ACTIVE_LOW, "SW1:1" ) PORT_DIPUNUSED_DIPLOC( 0x02, IP_ACTIVE_LOW, "SW1:2" ) PORT_DIPUNUSED_DIPLOC( 0x04, IP_ACTIVE_LOW, "SW1:3" ) @@ -1886,7 +1886,7 @@ static INPUT_PORTS_START( halleys ) PORT_DIPUNUSED_DIPLOC( 0x40, IP_ACTIVE_LOW, "SW1:7" ) PORT_DIPUNUSED_DIPLOC( 0x80, IP_ACTIVE_LOW, "SW1:8" ) - PORT_START("IN0") /* 0xff90 */ + PORT_START("IN0") /* 0xff90 */ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNKNOWN ) PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNKNOWN ) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_START1 ) @@ -1896,7 +1896,7 @@ static INPUT_PORTS_START( halleys ) PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_COIN2 ) PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_COIN1 ) - PORT_START("IN1") /* 0xff91 */ + PORT_START("IN1") /* 0xff91 */ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY @@ -1906,7 +1906,7 @@ static INPUT_PORTS_START( halleys ) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON1 ) - PORT_START("IN2") /* 0xff92 */ + PORT_START("IN2") /* 0xff92 */ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_COCKTAIL PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_COCKTAIL PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_COCKTAIL @@ -1916,10 +1916,10 @@ static INPUT_PORTS_START( halleys ) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_COCKTAIL PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL - PORT_START("IN3") /* 0xff93 */ + PORT_START("IN3") /* 0xff93 */ #ifdef MAME_DEBUG - PORT_START("DEBUG") /* just to be safe */ + PORT_START("DEBUG") /* just to be safe */ PORT_DIPNAME( 0x01, 0x00, "Show Unused Layer" ) PORT_DIPSETTING( 0x00, DEF_STR( No ) ) PORT_DIPSETTING( 0x01, DEF_STR( Yes ) ) @@ -1969,7 +1969,7 @@ static MACHINE_CONFIG_START( halleys, halleys_state ) // video hardware MCFG_SCREEN_ADD("screen", RASTER) - MCFG_SCREEN_REFRESH_RATE(59.50) /* verified on PCB */ + MCFG_SCREEN_REFRESH_RATE(59.50) /* verified on PCB */ MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0)) MCFG_SCREEN_SIZE(SCREEN_WIDTH, SCREEN_HEIGHT) MCFG_SCREEN_VISIBLE_AREA(VIS_MINX, VIS_MAXX, VIS_MINY, VIS_MAXY) |